Re: [PATCH] media: dvb-core: Don't force CAN_INVERSION_AUTO in oneshot mode.
On 31/08/15 18:03, Johann Klammer wrote: Why not just remove the line? info->caps |= FE_CAN_INVERSION_AUTO; The capabilities call interacting with the oneshot setting is rather weird and maybe unexpected. No, because in normal mode it can do auto inversion. -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] media: dvb-core: Don't force CAN_INVERSION_AUTO in oneshot mode.
Hi Devin On 31/08/15 19:07, Devin Heitmueller wrote: Hi Malcolm, The capabilities call interacting with the oneshot setting is rather weird and maybe unexpected. No, because in normal mode it can do auto inversion. ... If the goal was for the software-emulated auto inversion to be transparent to userland, perhaps it makes more sense for the oneshot mode to toggle the inversion if needed. The oneshot mode would continue to disable zigzag and the stats monitoring. I realize that this is a bit messy since it won't really be "oneshot", but I don't know what else can be done without breaking the ABI. I did think flagging INVERSION_AUTO to INVERSION_OFF on frontends not supporting inversion in oneshot mode. But it's still messy, as INVERSION_AUTO is need for emulation to work. Regards Malcolm -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: dvb-core: Don't force CAN_INVERSION_AUTO in oneshot mode.
When in FE_TUNE_MODE_ONESHOT the frontend must report the actual capabilities so user can take appropriate action. With frontends that can't do auto inversion this is done by dvb-core automatically so CAN_INVERSION_AUTO is valid. However, when in FE_TUNE_MODE_ONESHOT this is not true. So only set FE_CAN_INVERSION_AUTO in modes other than FE_TUNE_MODE_ONESHOT Signed-off-by: Malcolm Priestley <tvbox...@gmail.com> Cc: <stable@vger.kernel.org> --- drivers/media/dvb-core/dvb_frontend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index c38ef1a..e2a3833 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -2313,9 +2313,9 @@ static int dvb_frontend_ioctl_legacy(struct file *file, dev_dbg(fe->dvb->device, "%s: current delivery system on cache: %d, V3 type: %d\n", __func__, c->delivery_system, fe->ops.info.type); - /* Force the CAN_INVERSION_AUTO bit on. If the frontend doesn't -* do it, it is done for it. */ - info->caps |= FE_CAN_INVERSION_AUTO; + /* Set CAN_INVERSION_AUTO bit on in other than oneshot mode */ + if (!(fepriv->tune_mode_flags & FE_TUNE_MODE_ONESHOT)) + info->caps |= FE_CAN_INVERSION_AUTO; err = 0; break; } -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: vt6655: vnt_bss_info_changed check conf-beacon_rate is not NULL
conf-beacon_rate can be NULL on association. So check conf-beacon_rate BSS_CHANGED_BEACON_INFO needs to flagged in changed as the beacon_rate will appear later. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.19+ --- drivers/staging/vt6655/device_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index c97353b..b74af8d 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -1456,8 +1456,9 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, } } - if (changed BSS_CHANGED_ASSOC priv-op_mode != NL80211_IFTYPE_AP) { - if (conf-assoc) { + if (changed (BSS_CHANGED_ASSOC | BSS_CHANGED_BEACON_INFO) + priv-op_mode != NL80211_IFTYPE_AP) { + if (conf-assoc conf-beacon_rate) { CARDbUpdateTSF(priv, conf-beacon_rate-hw_value, conf-sync_tsf); -- 2.5.0 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: vt6656: check ieee80211_bss_conf bssid not NULL
Sometimes bssid can go null on failed association. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.17+ --- drivers/staging/vt6656/main_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index f97323f..af572d7 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -701,7 +701,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, priv-current_aid = conf-aid; - if (changed BSS_CHANGED_BSSID) + if (changed BSS_CHANGED_BSSID conf-bssid) vnt_mac_set_bssid_addr(priv, (u8 *)conf-bssid); -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/4] staging: vt6655: check ieee80211_bss_conf bssid not NULL
Sometimes bssid can go null on failed association. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.19+ --- drivers/staging/vt6655/device_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index ed040fb..b0c8e23 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -1418,7 +1418,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, priv-current_aid = conf-aid; - if (changed BSS_CHANGED_BSSID) { + if (changed BSS_CHANGED_BSSID conf-bssid) { unsigned long flags; spin_lock_irqsave(priv-lock, flags); -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 9/9] staging: vt6655: device_rx_srv check sk_buff is NULL
There is a small chance that pRD-pRDInfo-skb could go NULL while the interrupt is processing. Put NULL check on loop to break out. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org --- drivers/staging/vt6655/device_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index aec3cce..8dbde24 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -805,6 +805,10 @@ static int device_rx_srv(struct vnt_private *pDevice, unsigned int uIdx) pRD = pRD-next) { if (works++ 15) break; + + if (!pRD-pRDInfo-skb) + break; + if (vnt_receive_frame(pDevice, pRD)) { if (!device_alloc_rx_buf(pDevice, pRD)) { dev_err(pDevice-pcid-dev, -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
staging: vt6655: Upstream fixes for 3.19
The following upstream fixes issue with TX path for 3.19 and apply cleanly in the following order. commit 187e2a81805f4b7ba1acf118aed8937a718d894c staging: vt6655: move setting of PSTxDesc-buff_addr to vnt_tx_packet commit d17f4c8a42256dae6aa598bdbc00eff8b38cc949 staging: vt6655: Fix TD_FLAGS_NETIF_SKB only on TYPE_AC0DMA commit c312530589ed9524fc7cc921105dc9b67ea32d6a staging: vt6655: vnt_tx_packet fix dma_idx selection. commit d65d2b25d2761153390df8026cca1a528d9b6c5a staging: vt6655: vnt_tx_packet Correct TX order of OWNED_BY_NIC commit 95775d12219285d6e0116acb6267864582cd01ef staging: vt6655: [BUG] Protect MACvSelectPage1 with lock. -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] staging: vt6655: vnt_tx_packet Correct TX order of OWNED_BY_NIC
The state of m_td0TD0.f1Owner should change after the buff_addr has been filled otherwise the device grabs the buffer too early. m_td0TD0.f1Owner is protected by memory barriers on both sides of change. iTDUsed is best incremented after MACvTransmit. It appears that f1Owner actually polls to do the memory transfer. A back port patch will be needed for v3.19 Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v4.0+ --- drivers/staging/vt6655/device_main.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index c5f8233..ed90b6f 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -1201,14 +1201,6 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) if (dma_idx == TYPE_AC0DMA) head_td-pTDInfo-byFlags = TD_FLAGS_NETIF_SKB; - priv-iTDUsed[dma_idx]++; - - /* Take ownership */ - wmb(); - head_td-m_td0TD0.f1Owner = OWNED_BY_NIC; - - /* get Next */ - wmb(); priv-apCurrTD[dma_idx] = head_td-next; spin_unlock_irqrestore(priv-lock, flags); @@ -1229,11 +1221,18 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) head_td-buff_addr = cpu_to_le32(head_td-pTDInfo-skb_dma); + /* Poll Transmit the adapter */ + wmb(); + head_td-m_td0TD0.f1Owner = OWNED_BY_NIC; + wmb(); /* second memory barrier */ + if (head_td-pTDInfo-byFlags TD_FLAGS_NETIF_SKB) MACvTransmitAC0(priv-PortOffset); else MACvTransmit0(priv-PortOffset); + priv-iTDUsed[dma_idx]++; + spin_unlock_irqrestore(priv-lock, flags); return 0; -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] staging: vt6655: lock MACvWriteBSSIDAddress.
This function selects page 1 and cause intermittent problems on interrupt handler. lock call with spin_lock_irqsave. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.19+ --- drivers/staging/vt6655/device_main.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 26a6f67..8f96cc9 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -1412,9 +1412,16 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, priv-current_aid = conf-aid; - if (changed BSS_CHANGED_BSSID) + if (changed BSS_CHANGED_BSSID) { + unsigned long flags; + + spin_lock_irqsave(priv-lock, flags); + MACvWriteBSSIDAddress(priv-PortOffset, (u8 *)conf-bssid); + spin_unlock_irqrestore(priv-lock, flags); + } + if (changed BSS_CHANGED_BASIC_RATES) { priv-basic_rates = conf-basic_rates; -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: vt6655: Fix TX retransmission race condition
On 12/04/15 00:47, Malcolm Priestley wrote: With high tx flow the same buffer can transmit more than once and get stuck in loop. Reset TCR to zero in device_tx_srv. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.19+ --- drivers/staging/vt6655/device_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index c5f8233..9b5d840 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -963,6 +963,9 @@ static int device_tx_srv(struct vnt_private *pDevice, unsigned int uIdx) vnt_int_report_rate(pDevice, pTD-pTDInfo, byTsr0, byTsr1); device_free_tx_buf(pDevice, pTD); + + /* Done with TCR reset to avoid retransmission */ + pTD-m_td1TD1.byTCR = 0; pDevice-iTDUsed[uIdx]--; } } Hi Greg Please could you drop this patch, it causes a regression in driver. Thanks Malcolm -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: vt6655: Fix 80211 control and management status reporting.
Currently only TD_FLAGS_NETIF_SKB are reported back to mac80211. Move vnt_int_report_rate to report all frame types. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.19+ --- drivers/staging/vt6655/device_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 521d44f..c5f8233 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -941,9 +941,6 @@ static int device_tx_srv(struct vnt_private *pDevice, unsigned int uIdx) /* Only the status of first TD in the chain is correct */ if (pTD-m_td1TD1.byTCR TCR_STP) { if ((pTD-pTDInfo-byFlags TD_FLAGS_NETIF_SKB) != 0) { - - vnt_int_report_rate(pDevice, pTD-pTDInfo, byTsr0, byTsr1); - if (!(byTsr1 TSR1_TERR)) { if (byTsr0 != 0) { pr_debug( Tx[%d] OK but has error. tsr1[%02X] tsr0[%02X]\n, @@ -962,6 +959,9 @@ static int device_tx_srv(struct vnt_private *pDevice, unsigned int uIdx) (int)uIdx, byTsr1, byTsr0); } } + + vnt_int_report_rate(pDevice, pTD-pTDInfo, byTsr0, byTsr1); + device_free_tx_buf(pDevice, pTD); pDevice-iTDUsed[uIdx]--; } -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: vt6655: Fix TX retransmission race condition
With high tx flow the same buffer can transmit more than once and get stuck in loop. Reset TCR to zero in device_tx_srv. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.19+ --- drivers/staging/vt6655/device_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index c5f8233..9b5d840 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -963,6 +963,9 @@ static int device_tx_srv(struct vnt_private *pDevice, unsigned int uIdx) vnt_int_report_rate(pDevice, pTD-pTDInfo, byTsr0, byTsr1); device_free_tx_buf(pDevice, pTD); + + /* Done with TCR reset to avoid retransmission */ + pTD-m_td1TD1.byTCR = 0; pDevice-iTDUsed[uIdx]--; } } -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] staging: vt6655: implement IEEE80211_TX_STAT_NOACK_TRANSMITTED
Make use of this macro for non ack frames. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v4.0 --- drivers/staging/vt6655/device_main.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 8f48c84..521d44f 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -912,7 +912,11 @@ static int vnt_int_report_rate(struct vnt_private *priv, if (!(tsr1 TSR1_TERR)) { info-status.rates[0].idx = idx; - info-flags |= IEEE80211_TX_STAT_ACK; + + if (info-flags IEEE80211_TX_CTL_NO_ACK) + info-flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED; + else + info-flags |= IEEE80211_TX_STAT_ACK; } return 0; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] staging: vt6655: device_free_tx_buf use only ieee80211_tx_status_irqsafe
TD_FLAGS_NETIF_SKB is only for data. Fixes issue of ack frames not being reported. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.19+ --- drivers/staging/vt6655/device_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 5b3de43..8f48c84 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -989,10 +989,8 @@ static void device_free_tx_buf(struct vnt_private *pDevice, PSTxDesc pDesc) skb-len, DMA_TO_DEVICE); } - if (pTDInfo-byFlags TD_FLAGS_NETIF_SKB) + if (skb) ieee80211_tx_status_irqsafe(pDevice-hw, skb); - else - dev_kfree_skb_irq(skb); pTDInfo-skb_dma = 0; pTDInfo-skb = NULL; -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: vt6656: use ieee80211_tx_info to select packet type.
Information for packet type is in ieee80211_tx_info band IEEE80211_BAND_5GHZ for PK_TYPE_11A. IEEE80211_TX_RC_USE_CTS_PROTECT via tx_rate flags selects PK_TYPE_11GB This ensures that the packet is always the right type. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.17+ --- drivers/staging/vt6656/rxtx.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index f6c2cf8..5c58996 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -805,10 +805,18 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) vnt_schedule_command(priv, WLAN_CMD_SETPOWER); } - if (current_rate RATE_11M) - pkt_type = priv-packet_type; - else + if (current_rate RATE_11M) { + if (info-band == IEEE80211_BAND_5GHZ) { + pkt_type = PK_TYPE_11A; + } else { + if (tx_rate-flags IEEE80211_TX_RC_USE_CTS_PROTECT) + pkt_type = PK_TYPE_11GB; + else + pkt_type = PK_TYPE_11GA; + } + } else { pkt_type = PK_TYPE_11B; + } spin_lock_irqsave(priv-lock, flags); -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] staging: vt6655: use ieee80211_tx_info to select packet type.
Information for packet type is in ieee80211_tx_info band IEEE80211_BAND_5GHZ for PK_TYPE_11A. IEEE80211_TX_RC_USE_CTS_PROTECT via tx_rate flags selects PK_TYPE_11GB This ensures that the packet is always the right type. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.19+ --- drivers/staging/vt6655/rxtx.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 195dcc9..7468776 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1305,10 +1305,18 @@ int vnt_generate_fifo_header(struct vnt_private *priv, u32 dma_idx, priv-hw-conf.chandef.chan-hw_value); } - if (current_rate RATE_11M) - pkt_type = (u8)priv-byPacketType; - else + if (current_rate RATE_11M) { + if (info-band == IEEE80211_BAND_5GHZ) { + pkt_type = PK_TYPE_11A; + } else { + if (tx_rate-flags IEEE80211_TX_RC_USE_CTS_PROTECT) + pkt_type = PK_TYPE_11GB; + else + pkt_type = PK_TYPE_11GA; + } + } else { pkt_type = PK_TYPE_11B; + } /*Set fifo controls */ if (pkt_type == PK_TYPE_11A) -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: vt6656: vnt_rf_setpower: fix missing rate RATE_12M
On 26/03/15 15:22, Luis Henriques wrote: Hi Malcolm, On Sat, Mar 07, 2015 at 04:36:37PM +, Malcolm Priestley wrote: When the driver sets this rate a power of zero value is set causing data flow stoppage until another rate is tried. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.17+ Is there a reason for this patch being tagged for stable v3.17+ ? Hi Luis Sorry I thought it wouldn't apply to 3.16. I need to do a backport patch for earlier kernels. Regards Malcolm -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH resend 1/3] vt6655: RFbSetPower fix missing rate RATE_12M
When the driver sets this rate a power of zero value is set causing data flow stoppage until another rate is tried. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org --- drivers/staging/vt6655/rf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c index 941b2ad..7626f63 100644 --- a/drivers/staging/vt6655/rf.c +++ b/drivers/staging/vt6655/rf.c @@ -794,6 +794,7 @@ bool RFbSetPower( break; case RATE_6M: case RATE_9M: + case RATE_12M: case RATE_18M: byPwr = priv-abyOFDMPwrTbl[uCH]; if (priv-byRFType == RF_UW2452) -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH resend 2/3] vt6655: Fix late setting of byRFType.
byRFType is not set prior to registration of mac80211 causing unpredictable operation after channel scans. With byRFType unset all channels are enabled this causes tx power to be set to values not present its eeprom. Move setting of this variable to vt6655_probe. byRFType must have a mask set. byRevId not used by driver and is removed. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.19+ --- drivers/staging/vt6655/device_main.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 0204ea5..a512f83 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -330,16 +330,6 @@ static void device_init_registers(struct vnt_private *pDevice) /* zonetype initial */ pDevice-byOriginalZonetype = pDevice-abyEEPROM[EEP_OFS_ZONETYPE]; - /* Get RFType */ - pDevice-byRFType = SROMbyReadEmbedded(pDevice-PortOffset, EEP_OFS_RFTYPE); - - /* force change RevID for VT3253 emu */ - if ((pDevice-byRFType RF_EMU) != 0) - pDevice-byRevId = 0x80; - - pDevice-byRFType = RF_MASK; - pr_debug(pDevice-byRFType = %x\n, pDevice-byRFType); - if (!pDevice-bZoneRegExist) pDevice-byZoneType = pDevice-abyEEPROM[EEP_OFS_ZONETYPE]; @@ -1780,6 +1770,12 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) MACvInitialize(priv-PortOffset); MACvReadEtherAddress(priv-PortOffset, priv-abyCurrentNetAddr); + /* Get RFType */ + priv-byRFType = SROMbyReadEmbedded(priv-PortOffset, EEP_OFS_RFTYPE); + priv-byRFType = RF_MASK; + + dev_dbg(pcid-dev, RF Type = %x\n, priv-byRFType); + device_get_options(priv); device_set_options(priv); /* Mask out the options cannot be set to the chip */ -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: vt6656: vnt_rf_setpower: fix missing rate RATE_12M
When the driver sets this rate a power of zero value is set causing data flow stoppage until another rate is tried. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.17+ --- drivers/staging/vt6656/rf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index c42cde5..c4286cc 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -640,6 +640,7 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel) break; case RATE_6M: case RATE_9M: + case RATE_12M: case RATE_18M: case RATE_24M: case RATE_36M: -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2 fix for 3.20] vt6655: Fix late setting of byRFType.
byRFType is not set prior to registration of mac80211 causing unpredictable operation after channel scans. With byRFType unset all channels are enabled this causes tx power to be set to values not present its eeprom. Move setting of this variable to vt6655_probe. byRFType must have a mask set. byRevId not used by driver and is removed. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.19+ --- drivers/staging/vt6655/device_main.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index f5c5872..03b2a90 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -330,16 +330,6 @@ static void device_init_registers(struct vnt_private *pDevice) /* zonetype initial */ pDevice-byOriginalZonetype = pDevice-abyEEPROM[EEP_OFS_ZONETYPE]; - /* Get RFType */ - pDevice-byRFType = SROMbyReadEmbedded(pDevice-PortOffset, EEP_OFS_RFTYPE); - - /* force change RevID for VT3253 emu */ - if ((pDevice-byRFType RF_EMU) != 0) - pDevice-byRevId = 0x80; - - pDevice-byRFType = RF_MASK; - pr_debug(pDevice-byRFType = %x\n, pDevice-byRFType); - if (!pDevice-bZoneRegExist) pDevice-byZoneType = pDevice-abyEEPROM[EEP_OFS_ZONETYPE]; @@ -1780,6 +1770,12 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) MACvInitialize(priv-PortOffset); MACvReadEtherAddress(priv-PortOffset, priv-abyCurrentNetAddr); + /* Get RFType */ + priv-byRFType = SROMbyReadEmbedded(priv-PortOffset, EEP_OFS_RFTYPE); + priv-byRFType = RF_MASK; + + dev_dbg(pcid-dev, RF Type = %x\n, priv-byRFType); + device_get_options(priv); device_set_options(priv); /* Mask out the options cannot be set to the chip */ -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2 fix for 3.20] vt6655: RFbSetPower fix missing rate RATE_12M
When the driver sets this rate a power of zero value is set causing data flow stoppage until another rate is tried. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org --- drivers/staging/vt6655/rf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c index 941b2ad..7626f63 100644 --- a/drivers/staging/vt6655/rf.c +++ b/drivers/staging/vt6655/rf.c @@ -794,6 +794,7 @@ bool RFbSetPower( break; case RATE_6M: case RATE_9M: + case RATE_12M: case RATE_18M: byPwr = priv-abyOFDMPwrTbl[uCH]; if (priv-byRFType == RF_UW2452) -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/5] lmedm04: Increase Interupt due time to 200 msec.
Ocassionally the device fails to report back an interrupt urb status which results in false no lock trigger on the RS2000 demodulator. Increase time from 60 msecs to 200 msecs. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.17+ --- drivers/media/usb/dvb-usb-v2/lmedm04.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 994de53..f1edb29 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -344,9 +344,10 @@ static void lme2510_int_response(struct urb *lme_urb) usb_submit_urb(lme_urb, GFP_ATOMIC); - /* interrupt urb is due every 48 msecs while streaming -* add 12msecs for system lag */ - st-int_urb_due = jiffies + msecs_to_jiffies(60); + /* Interrupt urb is due every 48 msecs while streaming the buffer +* stores up to 4 periods if missed. Allow 200 msec for next interrupt. +*/ + st-int_urb_due = jiffies + msecs_to_jiffies(200); } static int lme2510_int_read(struct dvb_usb_adapter *adap) -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/5] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb
A quirk of some older firmwares that report endpoint pipe type as PIPE_BULK but the endpoint otheriwse functions as interrupt. Check if usb_endpoint_type is USB_ENDPOINT_XFER_BULK and set as usb_rcvbulkpipe. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org --- drivers/media/usb/dvb-usb-v2/lmedm04.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index f1edb29..15db9f6 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -354,6 +354,7 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap) { struct dvb_usb_device *d = adap_to_d(adap); struct lme2510_state *lme_int = adap_to_priv(adap); + struct usb_host_endpoint *ep; lme_int-lme_urb = usb_alloc_urb(0, GFP_ATOMIC); @@ -375,6 +376,12 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap) adap, 8); + /* Quirk of pipe reporting PIPE_BULK but behaves as interrupt */ + ep = usb_pipe_endpoint(d-udev, lme_int-lme_urb-pipe); + + if (usb_endpoint_type(ep-desc) == USB_ENDPOINT_XFER_BULK) + lme_int-lme_urb-pipe = usb_rcvbulkpipe(d-udev, 0xa), + lme_int-lme_urb-transfer_flags |= URB_NO_TRANSFER_DMA_MAP; usb_submit_urb(lme_int-lme_urb, GFP_ATOMIC); -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] af9035: new IDs: add support for PCTV 78e and PCTV 79e
add the following IDs USB_PID_PCTV_78E (0x025a) for PCTV 78e USB_PID_PCTV_79E (0x0262) for PCTV 79e For these it9135 devices. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: Antti Palosaari cr...@iki.fi Cc: stable@vger.kernel.org # v3.14+ --- drivers/media/dvb-core/dvb-usb-ids.h | 2 ++ drivers/media/usb/dvb-usb-v2/af9035.c | 4 2 files changed, 6 insertions(+) diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h index 5135a09..12ce19c 100644 --- a/drivers/media/dvb-core/dvb-usb-ids.h +++ b/drivers/media/dvb-core/dvb-usb-ids.h @@ -280,6 +280,8 @@ #define USB_PID_PCTV_400E 0x020f #define USB_PID_PCTV_450E 0x0222 #define USB_PID_PCTV_452E 0x021f +#define USB_PID_PCTV_78E 0x025a +#define USB_PID_PCTV_79E 0x0262 #define USB_PID_REALTEK_RTL2831U 0x2831 #define USB_PID_REALTEK_RTL2832U 0x2832 #define USB_PID_TECHNOTREND_CONNECT_S2_36000x3007 diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index 75ec1c6..c82beac 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -1575,6 +1575,10 @@ static const struct usb_device_id af9035_id_table[] = { af9035_props, Leadtek WinFast DTV Dongle Dual, NULL) }, { DVB_USB_DEVICE(USB_VID_HAUPPAUGE, 0xf900, af9035_props, Hauppauge WinTV-MiniStick 2, NULL) }, + { DVB_USB_DEVICE(USB_VID_PCTV, USB_PID_PCTV_78E, + af9035_props, PCTV 78e, RC_MAP_IT913X_V1) }, + { DVB_USB_DEVICE(USB_VID_PCTV, USB_PID_PCTV_79E, + af9035_props, PCTV 79e, RC_MAP_IT913X_V2) }, { } }; MODULE_DEVICE_TABLE(usb, af9035_id_table); -- 2.0.1 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [stable rebased backport 3.15] staging: vt6655: Fix Warning on boot handle_irq_event_percpu.
commit 6cff1f6ad4c615319c1a146b2aa0af1043c5e9f5 uptream backport rebased on v3.15 and will apply to v3.10+ WARNING: CPU: 0 PID: 929 at /home/apw/COD/linux/kernel/irq/handle.c:147 handle_irq_event_percpu+0x1d1/0x1e0() irq 17 handler device_intr+0x0/0xa80 [vt6655_stage] enabled interrupts Using spin_lock_irqsave appears to fix this. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # v3.10+ Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/vt6655/device_main.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index a952df1..6f13f0e 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -2430,6 +2430,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { int handled = 0; unsigned char byData = 0; int ii = 0; + unsigned long flags; //unsigned char byRSSI; MACvReadISR(pDevice-PortOffset, pDevice-dwIsr); @@ -2455,7 +2456,8 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { handled = 1; MACvIntDisable(pDevice-PortOffset); - spin_lock_irq(pDevice-lock); + + spin_lock_irqsave(pDevice-lock, flags); //Make sure current page is 0 VNSvInPortB(pDevice-PortOffset + MAC_REG_PAGE1SEL, byOrgPageSel); @@ -2696,7 +2698,8 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { MACvSelectPage1(pDevice-PortOffset); } - spin_unlock_irq(pDevice-lock); + spin_unlock_irqrestore(pDevice-lock, flags); + MACvIntEnable(pDevice-PortOffset, IMR_MASK_VALUE); return IRQ_RETVAL(handled); -- 2.0.1 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] staging: vt6655: Fix Warning on boot handle_irq_event_percpu.
On 24/07/14 00:12, Greg KH wrote: On Wed, Jul 23, 2014 at 09:35:11PM +0100, Malcolm Priestley wrote: WARNING: CPU: 0 PID: 929 at /home/apw/COD/linux/kernel/irq/handle.c:147 handle_irq_event_percpu+0x1d1/0x1e0() irq 17 handler device_intr+0x0/0xa80 [vt6655_stage] enabled interrupts Using spin_lock_irqsave appears to fix this. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org So should both of these go into the 3.16-final kernel release? Yes, the driver is very unstable without these patches Regards Malcolm -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] staging: vt6655: Fix Warning on boot handle_irq_event_percpu.
WARNING: CPU: 0 PID: 929 at /home/apw/COD/linux/kernel/irq/handle.c:147 handle_irq_event_percpu+0x1d1/0x1e0() irq 17 handler device_intr+0x0/0xa80 [vt6655_stage] enabled interrupts Using spin_lock_irqsave appears to fix this. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org --- drivers/staging/vt6655/device_main.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 5eeb19e..a0863ca 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -2322,6 +2322,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { int handled = 0; unsigned char byData = 0; int ii = 0; + unsigned long flags; MACvReadISR(pDevice-PortOffset, pDevice-dwIsr); @@ -2335,7 +2336,8 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { handled = 1; MACvIntDisable(pDevice-PortOffset); - spin_lock_irq(pDevice-lock); + + spin_lock_irqsave(pDevice-lock, flags); //Make sure current page is 0 VNSvInPortB(pDevice-PortOffset + MAC_REG_PAGE1SEL, byOrgPageSel); @@ -2564,7 +2566,8 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { if (byOrgPageSel == 1) MACvSelectPage1(pDevice-PortOffset); - spin_unlock_irq(pDevice-lock); + spin_unlock_irqrestore(pDevice-lock, flags); + MACvIntEnable(pDevice-PortOffset, IMR_MASK_VALUE); return IRQ_RETVAL(handled); -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] staging: vt6655: Fix disassociated messages every 10 seconds
byReAssocCount is incremented every second resulting in disassociated message being send every 10 seconds whether connection or not. byReAssocCount should only advance while eCommandState is in WLAN_ASSOCIATE_WAIT Change existing scope to if condition. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org --- drivers/staging/vt6655/bssdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index eb3474d..1bd7a5a 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -981,7 +981,7 @@ start: pDevice-byERPFlag = ~(WLAN_SET_ERP_USE_PROTECTION(1)); } - { + if (pDevice-eCommandState == WLAN_ASSOCIATE_WAIT) { pDevice-byReAssocCount++; /* 10 sec timeout */ if ((pDevice-byReAssocCount 10) (!pDevice-bLinkPass)) { -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [stable back port for = 3.8] staging: vt6656: [BUG] Fix for TX USB resets from vendors driver.
upstream commit 9df682927c2e3a92f43803d6b52095992e3b2ab8 back port for 3.8 and less kernels. This fixes resets on heavy TX data traffic. Vendor driver VT6656_Linux_src_v1.21.03_x86_11.04.zip http://www.viaembedded.com/servlet/downloadSvl?id=1890download_file_id=14704 This is GPL-licensed code. original code BBbVT3184Init ... //2007-0725, RobertChang add, Enable Squelch detect reset option(SQ_RST_Opt), USB (register4, bit1) CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ, (WORD)0x600+4, // USB's Reg4's bit1 MESSAGE_REQUEST_MEM, 1, (PBYTE) byData); byData = byData|2 ; CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE, (WORD)0x600+4, // USB's Reg4's bit1 MESSAGE_REQUEST_MEM, 1, (PBYTE) byData); return TRUE;//ntStatus; A back port patch is needed for kernels less than 3.10. Signed-off-by: Malcolm Priestley tvbox...@gmail.com Cc: stable@vger.kernel.org # = v3.8 Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/vt6656/baseband.c | 11 +++ drivers/staging/vt6656/rndis.h| 1 + 2 files changed, 12 insertions(+) diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index 3855015..65503b9 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -976,6 +976,7 @@ BOOL BBbVT3184Init(PSDevice pDevice) PBYTE pbyAgc; WORDwLengthAgc; BYTEabyArray[256]; + u8 data; ntStatus = CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ, @@ -1144,6 +1145,16 @@ else { ControlvWriteByte(pDevice,MESSAGE_REQUEST_BBREG,0x0D,0x01); RFbRFTableDownload(pDevice); + + /* Fix for TX USB resets from vendors driver */ + CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ, USB_REG4, + MESSAGE_REQUEST_MEM, sizeof(data), data); + + data |= 0x2; + + CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE, USB_REG4, + MESSAGE_REQUEST_MEM, sizeof(data), data); + return TRUE;//ntStatus; } diff --git a/drivers/staging/vt6656/rndis.h b/drivers/staging/vt6656/rndis.h index fccf7e9..dcf7bf5 100644 --- a/drivers/staging/vt6656/rndis.h +++ b/drivers/staging/vt6656/rndis.h @@ -69,6 +69,7 @@ #define VIAUSB20_PACKET_HEADER 0x04 +#define USB_REG4 0x604 /*- Export Classes */ -- 1.8.4.4 -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH for stable/back-port] staging: vt6656: fix headers - key.c only
On Sun, 2013-01-13 at 15:26 +, Ben Hutchings wrote: On Sun, 2012-12-30 at 15:01 +, Malcolm Priestley wrote: On Sun, 2012-12-30 at 00:50 +0100, Ben Hutchings wrote: On Sat, 2012-12-29 at 13:10 +, Malcolm Priestley wrote: shorted back-ported version of upstream commit 11d404cb56ecd53bb23499897fbe7be1a9ac4827 staging: vt6656: fix headers and add cfg80211. key.c only This patch fixes the deadlock of 64 bit systems on successful association. In key.h void pointer pvKeyTable in SKeyItem is out of alignment on 64 bit kernel. The upstream arrangement of headers fixes this. [...] Please explain how. I don't see anything weird about key.h and mac.h that would cause structure definitions to be interpreted differently depending on inclusion order. The difference is that key.h is no longer defined in key.c. It is declared in path; mac.h -device.h --key.h The structure is now as seen by rxtx.c and dpc.c. Before the patch, key.c has it's own localised version declared in key.h and for some reason(?) is not packed the same. [...] Here are the key structure definitions and the layout they should have depending on word size and native/packed alignment: 32n 32p 64n 64p typedef struct tagSKeyItem { BOOLbKeyValid; 0 0 0 0 u32 uKeyLength; 4 4 4 4 BYTEabyKey[MAX_KEY_LEN];8 8 8 8 QWORD KeyRSC;40 40 40 40 DWORD dwTSC47_16;48 48 48 48 WORDwTSC15_0; 52 52 52 52 BYTEbyCipherSuite; 54 54 54 54 BYTEbyReserved0; 55 55 55 55 DWORD dwKeyIndex;56 56 56 56 void *pvKeyTable; 60 60 64 60 } SKeyItem, *PSKeyItem; //64 64 64 72 68 typedef struct tagSKeyTable { BYTEabyBSSID[ETH_ALEN]; 0 0 0 0 BYTEbyReserved0[2]; 6 6 6 6 SKeyItemPairwiseKey;8 8 8 8 SKeyItemGroupKey[MAX_GROUP_KEY]; 72 72 80 76 DWORD dwGTKeyIndex; 328 328 368 348 BOOLbInUse; 332 332 372 352 WORDwKeyCtl; 336 336 376 356 BOOLbSoftWEP; 340 338 380 358 BYTEbyReserved1[6]; 344 342 384 362 } SKeyTable, *PSKeyTable; //352 352 348 392 368 This agrees with your observed offsets of bSoftWEP, if SKeyItem and SKeyTable are defined packed or not depending on the order of inclusion. The only thing that should cause alignment to change in this way is the abominable '#pragma pack', and sure enough several of the headers have '#pragma pack(1)' but no '#pragma pack()' to reset this. Does the following work for you? (It's based on 3.7; the context is slightly different for earlier versions.) --- Subject: vt6656: Fix inconsistent structure packing vt6656 has several headers that use the #pragma pack(1) directive to enable structure packing, but never disable it. The layout of structures defined in other headers can then depend on which order the various headers are included in, breaking the One Definition Rule. This removes those directives and adds __packed to structure definitions where packing appears to have been intended. Reported-by: Malcolm Priestley tvbox...@gmail.com Signed-off-by: Ben Hutchings b...@decadent.org.uk Thanks Ben I have tested the patch on 3.7 and 3.8-rc2 and it has resolved the issue. Regards Malcolm -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH for stable/back-port] staging: vt6656: fix headers - key.c only
On Sun, 2012-12-30 at 10:27 -0500, Ben Collins wrote: On Dec 29, 2012, at 6:50 PM, Ben Hutchings b...@decadent.org.uk wrote: On Sat, 2012-12-29 at 13:10 +, Malcolm Priestley wrote: shorted back-ported version of upstream commit 11d404cb56ecd53bb23499897fbe7be1a9ac4827 staging: vt6656: fix headers and add cfg80211. key.c only This patch fixes the deadlock of 64 bit systems on successful association. In key.h void pointer pvKeyTable in SKeyItem is out of alignment on 64 bit kernel. The upstream arrangement of headers fixes this. [...] Please explain how. I don't see anything weird about key.h and mac.h that would cause structure definitions to be interpreted differently depending on inclusion order. Also, I would argue that such a dependency is a bug in itself. If such a dependency does exist, it needs to be either resolved so it's not possible for this to happen as described, or it needs a compile-time check to error out if the includes are not done in the proper order. I agree, but that is a matter for upstream. This device is usually built-in to desktops/laptops. The situation we have at the moment with 64 bit CD. 1) The machine hangs on boot. 2) Now to hangs on connection to a wifi point. There is nothing that annoys or ticks off users more. After rechecking everything this morning, this patch is the final fix for down stream. Regards Malcolm -- Servergy : http://www.servergy.com/ SwissDisk : http://www.swissdisk.com/ Ubuntu: http://www.ubuntu.com/ My Blog : http://ben-collins.blogspot.com/ -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH upstream for stable 2/8] staging: vt6656: 64 bit- Correctly address void structure.
On Fri, 2012-12-28 at 00:52 +0100, Ben Hutchings wrote: On Thu, 2012-12-27 at 22:47 +, Malcolm Priestley wrote: On Thu, 2012-12-27 at 20:09 +0100, Ben Hutchings wrote: On Thu, 2012-12-27 at 13:01 +, Malcolm Priestley wrote: upstream commit e2efba763b472835fdface597fe2216b3403967e Tested on kernels 2.6.35, 3.0, 3.2, 3.5 3.7 staging: vt6656: 64 bit- Correctly address void structure. Fixes 64 bit deadlock on successful association. Cc: sta...@kernel.org # 2.6.35+ Signed-off-by: Malcolm Priestley tvbox...@gmail.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 0f35a9a..1f87213 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -1452,12 +1452,10 @@ s_bPacketToWirelessUsb( Hi Ben, Ah, you are correct. However, as it stands, reverting upstream on 64 bit will cause a regression. I don't understand why you think this has something to do with '64 bit'. I haven't found any regressions on 32bit and it is only a condition check. Only WEP 256 users affected and the chances of the address hitting TRUE(1) during WEP/WPA negotiation. I would prefer to submit a patch to correct upstream. It's not my decision, anyway. But if this is reverted first then we can cherry-pick just the real fix for stable. Hmm, something has already fix it upstream on the driver. So, both upstream commits e2efba763b472835fdface597fe2216b3403967e and eb304bddc47b59927b650d43c3f35b9266c807a9 need to be reversed. I will try and find out what fixed it. Regards Malcolm Ben. -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH upstream for stable 3/8]staging: vt6656: 64bit fixes: dpc.c incorrect addressing of void structure.
upstream commit eb304bddc47b59927b650d43c3f35b9266c807a9 Tested on kernels 2.6.35, 3.0, 3.2, 3.5 3.7 staging: vt6656: 64bit fixes: dpc.c incorrect addressing of void structure. Fixes the deadlock on 64 bit. Cc: sta...@kernel.org # 2.6.35+ Signed-off-by: Malcolm Priestley tvbox...@gmail.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index 5ad7abb..e1b0881 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -1217,7 +1217,7 @@ static BOOL s_bHandleRxEncryption ( if (byDecMode == KEY_CTL_WEP) { // handle WEP if ((pDevice-byLocalID = REV_ID_VT3253_A1) || -(((PSKeyTable)(pKey-pvKeyTable))-bSoftWEP == TRUE)) { + (((PSKeyTable)(pKey-pvKeyTable))-bSoftWEP == TRUE)) { // Software WEP // 1. 3253A // 2. WEP 256 @@ -1324,9 +1324,9 @@ static BOOL s_bHostWepRxEncryption ( if (byDecMode == KEY_CTL_WEP) { // handle WEP -DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFObyDecMode == KEY_CTL_WEP \n); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFObyDecMode == KEY_CTL_WEP\n); if ((pDevice-byLocalID = REV_ID_VT3253_A1) || -(((PSKeyTable)(pKey-pvKeyTable))-bSoftWEP == TRUE) || + (((PSKeyTable)(pKey-pvKeyTable))-bSoftWEP == TRUE) || (bOnFly == FALSE)) { // Software WEP // 1. 3253A -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH upstream for stable 1/8] staging: vt6656: [BUG] out of bound array reference in RFbSetPower.
upstream commit ab1dd9963137a1e122004d5378a581bf16ae9bc8 Tested on kernels 2.6.35, 3.0, 3.2, 3.5 3.7 This upstream commit and the ones in patch 2 3 are critical for boot dead lock on 64 bit systems, the remaining commits bring the driver up. staging: vt6656: [BUG] out of bound array reference in RFbSetPower. Calling RFbSetPower with uCH zero value will cause out of bound array reference. This causes 64 bit kernels to oops on boot. Note: Driver does not function on 64 bit kernels and should be blacklisted on them. Cc: sta...@kernel.org # 2.6.35+ Signed-off-by: Malcolm Priestley tvbox...@gmail.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 593cdc7..74c0598 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -769,6 +769,9 @@ BYTEbyPwr = pDevice-byCCKPwr; return TRUE; } + if (uCH == 0) + return -EINVAL; + switch (uRATE) { case RATE_1M: case RATE_2M: -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH upstream for stable 4/8]staging: vt6656: 64 bit fixes: use u32 for QWORD definition.
upstream commit a552397d5e4ef0cc0bd3e9595d6acc9a3b381171 Tested on kernels 2.6.35, 3.0, 3.2, 3.5 3.7 staging: vt6656: 64 bit fixes: use u32 for QWORD definition. Size of long issues replace with u32. Cc: sta...@kernel.org # 2.6.35+ Signed-off-by: Malcolm Priestley tvbox...@gmail.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org diff --git a/drivers/staging/vt6656/ttype.h b/drivers/staging/vt6656/ttype.h index 8e9450e..0f70562c 100644 --- a/drivers/staging/vt6656/ttype.h +++ b/drivers/staging/vt6656/ttype.h @@ -29,6 +29,8 @@ #ifndef __TTYPE_H__ #define __TTYPE_H__ +#include linux/types.h + /*** Common definitions and typedefs ***/ typedef int BOOL; @@ -51,8 +53,8 @@ typedef unsigned long DWORD; // 32-bit // which is NOT really a floating point number. typedef union tagUQuadWord { struct { -DWORD dwLowDword; -DWORD dwHighDword; + u32 dwLowDword; + u32 dwHighDword; } u; double DoNotUseThisField; } UQuadWord; -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH upstream for stable 2/8] staging: vt6656: 64 bit- Correctly address void structure.
upstream commit e2efba763b472835fdface597fe2216b3403967e Tested on kernels 2.6.35, 3.0, 3.2, 3.5 3.7 staging: vt6656: 64 bit- Correctly address void structure. Fixes 64 bit deadlock on successful association. Cc: sta...@kernel.org # 2.6.35+ Signed-off-by: Malcolm Priestley tvbox...@gmail.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 0f35a9a..1f87213 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -1452,12 +1452,10 @@ s_bPacketToWirelessUsb( pvRrvTime = pMICHDR = pvRTS = pvCTS = pvTxDataHd = NULL; -if ((bNeedEncryption) (pTransmitKey != NULL)) { -if (((PSKeyTable) (pTransmitKey-pvKeyTable))-bSoftWEP == TRUE) { -// WEP 256 -bSoftWEP = TRUE; -} -} + if (bNeedEncryption pTransmitKey-pvKeyTable) { + if (((PSKeyTable)pTransmitKey-pvKeyTable)-bSoftWEP == TRUE) + bSoftWEP = TRUE; /* WEP 256 */ + } pTxBufHead = (PTX_BUFFER) usbPacketBuf; memset(pTxBufHead, 0, sizeof(TX_BUFFER)); -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH upstream for stable 5/8]staging: vt6656: 64 bit fixes : correct all type sizes
upstream commit 7730492855a2f9c828599bcd8d62760f96d319e4 Tested on kernels 2.6.35, 3.0, 3.2, 3.5 3.7 staging: vt6656: 64 bit fixes : correct all type sizes After this patch all BYTE/WORD/DWORD types can be replaced with the appropriate u sizes. Cc: sta...@kernel.org # 2.6.35+ Signed-off-by: Malcolm Priestley tvbox...@gmail.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org diff --git a/drivers/staging/vt6656/ttype.h b/drivers/staging/vt6656/ttype.h index 0f70562c..dfbf747 100644 --- a/drivers/staging/vt6656/ttype.h +++ b/drivers/staging/vt6656/ttype.h @@ -44,9 +44,9 @@ typedef int BOOL; /** Simple typedefs ***/ -typedef unsigned char BYTE; // 8-bit -typedef unsigned short WORD; // 16-bit -typedef unsigned long DWORD; // 32-bit +typedef u8 BYTE; +typedef u16 WORD; +typedef u32 DWORD; // QWORD is for those situation that we want // an 8-byte-aligned 8 byte long structure @@ -62,8 +62,8 @@ typedef UQuadWord QWORD; // 64-bit /** Common pointer types ***/ -typedef unsigned long ULONG_PTR; // 32-bit -typedef unsigned long DWORD_PTR; // 32-bit +typedef u32 ULONG_PTR; +typedef u32 DWORD_PTR; // boolean pointer -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH upstream for stable 6/8]staging: vt6656: 64 bit fixes: fix long warning messages.
upstream commit b4dc03af5513774277c9c36b12a25cd3f25f4404 Tested on kernels 2.6.35, 3.0, 3.2, 3.5 3.7 Fixes long warning messages from patch [5/8]staging: vt6656: 64 bit fixes : correct all type sizes staging: vt6656: 64 bit fixes: fix long warning messages. Fixes long warning messages from patch [PATCH 08/14] staging: vt6656: 64 bit fixes : correct all type sizes Cc: sta...@kernel.org # 2.6.35+ Signed-off-by: Malcolm Priestley tvbox...@gmail.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index 1ff6ea3..6f9b2b4 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -1238,7 +1238,7 @@ static BOOL s_bHandleRxEncryption ( PayloadLen -= (WLAN_HDR_ADDR3_LEN + 8 + 4); // 24 is 802.11 header, 8 is IVExtIV, 4 is crc *pdwRxTSC47_16 = cpu_to_le32(*(PDWORD)(pbyIV + 4)); -DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOExtIV: %lx\n,*pdwRxTSC47_16); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOExtIV: %x\n, *pdwRxTSC47_16); if (byDecMode == KEY_CTL_TKIP) { *pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV)); } else { @@ -1349,7 +1349,7 @@ static BOOL s_bHostWepRxEncryption ( PayloadLen -= (WLAN_HDR_ADDR3_LEN + 8 + 4); // 24 is 802.11 header, 8 is IVExtIV, 4 is crc *pdwRxTSC47_16 = cpu_to_le32(*(PDWORD)(pbyIV + 4)); -DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOExtIV: %lx\n,*pdwRxTSC47_16); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOExtIV: %x\n, *pdwRxTSC47_16); if (byDecMode == KEY_CTL_TKIP) { *pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV)); diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c index a61fcb9..617fda1 100644 --- a/drivers/staging/vt6656/key.c +++ b/drivers/staging/vt6656/key.c @@ -235,7 +235,8 @@ BOOL KeybSetKey( PSKeyItem pKey; unsigned intuKeyIdx; -DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOEnter KeybSetKey: %lX\n, dwKeyIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO + Enter KeybSetKey: %X\n, dwKeyIndex); j = (MAX_KEY_TABLE-1); for (i=0;i(MAX_KEY_TABLE-1);i++) { @@ -261,7 +262,9 @@ BOOL KeybSetKey( if ((dwKeyIndex TRANSMIT_KEY) != 0) { // Group transmit key pTable-KeyTable[i].dwGTKeyIndex = dwKeyIndex; -DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOGroup transmit key(R)[%lX]: %d\n, pTable-KeyTable[i].dwGTKeyIndex, i); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO + Group transmit key(R)[%X]: %d\n, + pTable-KeyTable[i].dwGTKeyIndex, i); } pTable-KeyTable[i].wKeyCtl = 0xFF0F; // clear group key control filed pTable-KeyTable[i].wKeyCtl |= (byKeyDecMode 4); @@ -302,9 +305,12 @@ BOOL KeybSetKey( } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO\n); -DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOpKey-dwTSC47_16: %lx\n , pKey-dwTSC47_16); -DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOpKey-wTSC15_0: %x\n , pKey-wTSC15_0); -DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOpKey-dwKeyIndex: %lx\n , pKey-dwKeyIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOpKey-dwTSC47_16: %x\n , + pKey-dwTSC47_16); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOpKey-wTSC15_0: %x\n , + pKey-wTSC15_0); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOpKey-dwKeyIndex: %x\n , + pKey-dwKeyIndex); return (TRUE); } @@ -326,7 +332,9 @@ BOOL KeybSetKey( if ((dwKeyIndex TRANSMIT_KEY) != 0) { // Group transmit key pTable-KeyTable[j].dwGTKeyIndex = dwKeyIndex; -DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOGroup transmit key(N)[%lX]: %d\n, pTable-KeyTable[j].dwGTKeyIndex, j); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO + Group transmit key(N)[%X]: %d\n, + pTable-KeyTable[j].dwGTKeyIndex, j); } pTable-KeyTable[j].wKeyCtl = 0xFF0F; // clear group key control filed pTable-KeyTable[j].wKeyCtl |= (byKeyDecMode 4); @@ -367,9 +375,11 @@ BOOL KeybSetKey( } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO\n); -DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOpKey-dwTSC47_16: %lx\n , pKey-dwTSC47_16); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOpKey-dwTSC47_16: %x\n , + pKey-dwTSC47_16); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOpKey-wTSC15_0: %x\n , pKey-wTSC15_0); -DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOpKey-dwKeyIndex: %lx\n , pKey-dwKeyIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFOpKey-dwKeyIndex: %x\n , + pKey-dwKeyIndex); return (TRUE); } @@ -597,7 +607,8 @@ BOOL KeybGetTransmitKey(PSKeyManagement pTable, PBYTE
[PATCH upstream for stable 7/8]staging: vt6656: 64bit fixes: key.c/h change unsigned long to u32
upstream commit c0d05b305b00c698b0a8c1b3d46c9380bce9db45 Tested on kernel 2.6.35, 3.0, 3.2, 3.5 3.7 staging: vt6656: 64bit fixes: key.c/h change unsigned long to u32 Fixes long issues. Cc: sta...@kernel.org # 2.6.35+ Signed-off-by: Malcolm Priestley tvbox...@gmail.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c index 617fda1..bf24adb 100644 --- a/drivers/staging/vt6656/key.c +++ b/drivers/staging/vt6656/key.c @@ -223,7 +223,7 @@ BOOL KeybSetKey( PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyIndex, -unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTEbyKeyDecMode @@ -675,7 +675,7 @@ BOOL KeybSetDefaultKey( void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, -unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTEbyKeyDecMode @@ -791,7 +791,7 @@ BOOL KeybSetAllGroupKey( void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, -unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTEbyKeyDecMode diff --git a/drivers/staging/vt6656/key.h b/drivers/staging/vt6656/key.h index f749c7a..bd35d39 100644 --- a/drivers/staging/vt6656/key.h +++ b/drivers/staging/vt6656/key.h @@ -58,7 +58,7 @@ typedef struct tagSKeyItem { BOOLbKeyValid; -unsigned long uKeyLength; + u32 uKeyLength; BYTEabyKey[MAX_KEY_LEN]; QWORD KeyRSC; DWORD dwTSC47_16; @@ -107,7 +107,7 @@ BOOL KeybSetKey( PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyIndex, -unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTEbyKeyDecMode @@ -146,7 +146,7 @@ BOOL KeybSetDefaultKey( void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, -unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTEbyKeyDecMode @@ -156,7 +156,7 @@ BOOL KeybSetAllGroupKey( void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, -unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTEbyKeyDecMode -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH upstream for stable 8/8]staging: vt6656: 64bit fixes: vCommandTimerWait change calculation of timer.
upstream commit 70e227790d4ee4590023d8041a3485f8053593fc Tested on kernel 2.6.35, 3.0, 3.2, 3.5 3.7 staging: vt6656: 64bit fixes: vCommandTimerWait change calculation of timer. The timer appears to run too fast/race on 64 bit systems. Using msecs_to_jiffies seems to cause a deadlock on 64 bit. A calculation of (MSecond * HZ) / 1000 appears to run satisfactory. Change BSSIDInfoCount to u32. After this patch the driver can be successfully connect on little endian 64/32 bit systems. Cc: sta...@kernel.org # 2.6.35+ Signed-off-by: Malcolm Priestley tvbox...@gmail.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c index 586fbe1..b854d7e 100644 --- a/drivers/staging/vt6656/wcmd.c +++ b/drivers/staging/vt6656/wcmd.c @@ -316,17 +316,19 @@ s_MgrMakeProbeRequest( return pTxPacket; } -void vCommandTimerWait(void *hDeviceContext, unsigned int MSecond) +void vCommandTimerWait(void *hDeviceContext, unsigned long MSecond) { -PSDevicepDevice = (PSDevice)hDeviceContext; + PSDevice pDevice = (PSDevice)hDeviceContext; -init_timer(pDevice-sTimerCommand); -pDevice-sTimerCommand.data = (unsigned long)pDevice; -pDevice-sTimerCommand.function = (TimerFunction)vRunCommand; -// RUN_AT :1 msec ~= (HZ/1024) -pDevice-sTimerCommand.expires = (unsigned int)RUN_AT((MSecond * HZ) 10); -add_timer(pDevice-sTimerCommand); -return; + init_timer(pDevice-sTimerCommand); + + pDevice-sTimerCommand.data = (unsigned long)pDevice; + pDevice-sTimerCommand.function = (TimerFunction)vRunCommand; + pDevice-sTimerCommand.expires = RUN_AT((MSecond * HZ) / 1000); + + add_timer(pDevice-sTimerCommand); + + return; } void vRunCommand(void *hDeviceContext) diff --git a/drivers/staging/vt6656/wpa2.h b/drivers/staging/vt6656/wpa2.h index 46c2959..c359252 100644 --- a/drivers/staging/vt6656/wpa2.h +++ b/drivers/staging/vt6656/wpa2.h @@ -45,8 +45,8 @@ typedef struct tagsPMKIDInfo { } PMKIDInfo, *PPMKIDInfo; typedef struct tagSPMKIDCache { -unsigned long BSSIDInfoCount; -PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE]; + u32 BSSIDInfoCount; + PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE]; } SPMKIDCache, *PSPMKIDCache; -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH upstream for stable 2/8] staging: vt6656: 64 bit- Correctly address void structure.
On Thu, 2012-12-27 at 20:09 +0100, Ben Hutchings wrote: On Thu, 2012-12-27 at 13:01 +, Malcolm Priestley wrote: upstream commit e2efba763b472835fdface597fe2216b3403967e Tested on kernels 2.6.35, 3.0, 3.2, 3.5 3.7 staging: vt6656: 64 bit- Correctly address void structure. Fixes 64 bit deadlock on successful association. Cc: sta...@kernel.org # 2.6.35+ Signed-off-by: Malcolm Priestley tvbox...@gmail.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 0f35a9a..1f87213 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -1452,12 +1452,10 @@ s_bPacketToWirelessUsb( pvRrvTime = pMICHDR = pvRTS = pvCTS = pvTxDataHd = NULL; -if ((bNeedEncryption) (pTransmitKey != NULL)) { -if (((PSKeyTable) (pTransmitKey-pvKeyTable))-bSoftWEP == TRUE) { -// WEP 256 -bSoftWEP = TRUE; -} -} + if (bNeedEncryption pTransmitKey-pvKeyTable) { + if (((PSKeyTable)pTransmitKey-pvKeyTable)-bSoftWEP == TRUE) + bSoftWEP = TRUE; /* WEP 256 */ + } This cast is blatantly wrong - pvKeyTable points to and SKeyTable; it's not the first element of an SKeyTable. Greg, I suggest you revert this upstream as it's only 'fixing' the problem by chance. Hi Ben, Ah, you are correct. However, as it stands, reverting upstream on 64 bit will cause a regression. I haven't found any regressions on 32bit and it is only a condition check. Only WEP 256 users affected and the chances of the address hitting TRUE(1) during WEP/WPA negotiation. I would prefer to submit a patch to correct upstream. Regards Malcolm Ben. pTxBufHead = (PTX_BUFFER) usbPacketBuf; memset(pTxBufHead, 0, sizeof(TX_BUFFER)); -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [stable for 3.2][patch] Kernel 3.2 add support for IT9135 chip version 2 devices.
On Tue, 2012-04-10 at 16:10 -0700, Greg KH wrote: On Sun, Apr 01, 2012 at 08:36:15AM -0700, Greg KH wrote: On Sun, Apr 01, 2012 at 02:30:54PM +0100, Malcolm Priestley wrote: Originally, IT9135 chip version 2 devices were never intended to be supported in kernel 3.2 as they were thought at the time only on ID 048d:9006. However, they have since been supplied on ID 048d:9135, the following error occurs. [ 53.512013] usb 2-4: new high-speed USB device number 5 using ehci_hcd [ 53.648936] it913x: Chip Version=02 Chip Type=9135 [ 53.650434] it913x: Dual mode=0 Remote=5 Tuner Type=5f [ 53.651556] dvb-usb: found a 'ITE 9135 Generic' in cold state, will try to load a firmware [ 53.660244] dvb-usb: downloading firmware from file 'dvb-usb-it9137-01.fw' [ 53.661026] it913x: FRM Starting Firmware Download [ 54.152006] it913x: FRM Firmware Download Failed (ffed) [ 54.352082] it913x: Chip Version=6f Chip Type=0203 [ 55.188050] it913x: DEV it913x Error This patch and the cherry picks fixes the issue and applies firmware differences in commit 7330f7c157308166c507da9b9926107d85f960d3 and the 3.2 tree. The driver is updated to version it913x 1.24 and it913x-fe 1.12. Note existing 048d:9135 version 1 users will need to switch to dvb-usb-it9135-01.fw firmware as in kernel 3.3 after this update. ./get_dvb_firmware it9135 extracts dvb-usb-it9135-01.fw dvb-usb-it9135-02.fw ./get_dvb_firmware it9137 extracts dvb-usb-it9137-01.fw The following upstream cherry-picks in order need to be applied. Cc: stable@vger.kernel.org # .32.x: b7d425d39179e125604cbf451a06d3204d2e1398: sched: it913x Support it9135 Verions 2 chip Cc: stable@vger.kernel.org # .32.x: 2b3c13ecce3bc0fbdeb5ef0596b350dc702d01d5: sched: it913x-fe ver 1.09 amend adc table entries Cc: stable@vger.kernel.org # .32.x: 3822c7cef7b422833f1b58949a01bd87b822d280: sched: it913x ver 1.09 support for USB 1 devices (IT9135) Cc: stable@vger.kernel.org # .32.x: 3339a5b165c2769a84346cac342ade67d7b7a510: sched: it913x-fe ver 1.10 correct SNR reading from frontend Cc: stable@vger.kernel.org # .32.x: ed942c50746528a5342f83af1638ba05a6ac: sched: it913x-fe: more user and debugging info Cc: stable@vger.kernel.org # .32.x: fdb5a9111ef77d537efb86e90e8073ebfd0b553e: sched: Support for Sveon STV22 (IT9137) Cc: stable@vger.kernel.org # .32.x: 9c1133c7c89266d4969e36527ce7be958d1b93c6: sched: it913x: endpoint size changes Cc: stable@vger.kernel.org # .32.x: 990f49af3f564b9a0f572e06f22e2ae34c79c37d: sched: it913x: support for different tuner regs Cc: stable@vger.kernel.org # .32.x: c725ff69737313647f981813e8f39a372c99b0f0: sched: it913x: support for NEC extended keys Cc: stable@vger.kernel.org # .32.x: b69902914803a8bf93f39f0db642430504c800ba: sched: it913x: multi firmware loader Cc: stable@vger.kernel.org # .32.x: 5e642c06b561fd95d77d13f41adeb6e906acc31d: sched: it9135: add support for IT9135 9005 devices Cc: stable@vger.kernel.org # .32.x: 15157c506d742b6767edcd486d6c73ea907fb7cf: sched: it913x add retry to USB bulk endpoints and IO Cc: stable@vger.kernel.org # .32.x: 50815707eebc7ce12bfd97933a6e68a482c4d7ab: sched: it913x: multiple devices on system. Cc: stable@vger.kernel.org # .32.x: a7187c324ff5a879b5b0e6bb947664071c870803: sched: [BUG] Re: add support for IT9135 9005 devices Cc: stable@vger.kernel.org # .32.x: f36472da3a6d62ee46ae773bbbf05ddb24cd970c: sched: it913x stop dual frontend attach in warm state with single devices Cc: stable@vger.kernel.org # .32.x: 53844c4fc7912fef2f56c1b3f851b30c8ebd1d8a: sched: it913x add support for IT9135 9006 devices Cc: stable@vger.kernel.org # .32.x: ed3189cf989128fe283d6dbffbbae08b67d9e5bd: sched: it913x ver 1.18 Turn pid filter off by caps option only Cc: stable@vger.kernel.org # .32.x: d4d5a40710701abd4535d6a5ada601c885a08865: sched: [BUG] it913x ver 1.20. PID filter problems Cc: stable@vger.kernel.org # .32.x: fa52520cff0b3dce483efa8fb4ae1a4b18a82109: sched: [BUG] it913x ver 1.21 Fixed for issue with 9006 and warm boot Cc: stable@vger.kernel.org # .32.X: 245900c4a7a7d23c2e5b2b64b70770debcac5814: sched: [media] it913x ver 1.22 corrections to Tuner IDs Cc: stable@vger.kernel.org # .32.x: f0e07d7658a81bc185b8ba58f062c16b79ac0e2b: sched: it913x changed firmware loader for chip version 2 types Cc: stable@vger.kernel.org # .32.x: a8ea0218625699a5c635655a17b565bab5888ea1: sched: it913x v1.23 use it913x_config.chip_ver to select firmware Cc: stable@vger.kernel.org # .32.x: fc594e3e5196d4cf7ace7735eeca399f7a80868b: sched: it913x ver 1.24 Make 0x60 default on version 2 devices Cc: stable@vger.kernel.org # .32.x You're kidding right
[stable for 3.2][patch] Kernel 3.2 add support for IT9135 chip version 2 devices.
Originally, IT9135 chip version 2 devices were never intended to be supported in kernel 3.2 as they were thought at the time only on ID 048d:9006. However, they have since been supplied on ID 048d:9135, the following error occurs. [ 53.512013] usb 2-4: new high-speed USB device number 5 using ehci_hcd [ 53.648936] it913x: Chip Version=02 Chip Type=9135 [ 53.650434] it913x: Dual mode=0 Remote=5 Tuner Type=5f [ 53.651556] dvb-usb: found a 'ITE 9135 Generic' in cold state, will try to load a firmware [ 53.660244] dvb-usb: downloading firmware from file 'dvb-usb-it9137-01.fw' [ 53.661026] it913x: FRM Starting Firmware Download [ 54.152006] it913x: FRM Firmware Download Failed (ffed) [ 54.352082] it913x: Chip Version=6f Chip Type=0203 [ 55.188050] it913x: DEV it913x Error This patch and the cherry picks fixes the issue and applies firmware differences in commit 7330f7c157308166c507da9b9926107d85f960d3 and the 3.2 tree. The driver is updated to version it913x 1.24 and it913x-fe 1.12. Note existing 048d:9135 version 1 users will need to switch to dvb-usb-it9135-01.fw firmware as in kernel 3.3 after this update. ./get_dvb_firmware it9135 extracts dvb-usb-it9135-01.fw dvb-usb-it9135-02.fw ./get_dvb_firmware it9137 extracts dvb-usb-it9137-01.fw The following upstream cherry-picks in order need to be applied. Cc: stable@vger.kernel.org # .32.x: b7d425d39179e125604cbf451a06d3204d2e1398: sched: it913x Support it9135 Verions 2 chip Cc: stable@vger.kernel.org # .32.x: 2b3c13ecce3bc0fbdeb5ef0596b350dc702d01d5: sched: it913x-fe ver 1.09 amend adc table entries Cc: stable@vger.kernel.org # .32.x: 3822c7cef7b422833f1b58949a01bd87b822d280: sched: it913x ver 1.09 support for USB 1 devices (IT9135) Cc: stable@vger.kernel.org # .32.x: 3339a5b165c2769a84346cac342ade67d7b7a510: sched: it913x-fe ver 1.10 correct SNR reading from frontend Cc: stable@vger.kernel.org # .32.x: ed942c50746528a5342f83af1638ba05a6ac: sched: it913x-fe: more user and debugging info Cc: stable@vger.kernel.org # .32.x: fdb5a9111ef77d537efb86e90e8073ebfd0b553e: sched: Support for Sveon STV22 (IT9137) Cc: stable@vger.kernel.org # .32.x: 9c1133c7c89266d4969e36527ce7be958d1b93c6: sched: it913x: endpoint size changes Cc: stable@vger.kernel.org # .32.x: 990f49af3f564b9a0f572e06f22e2ae34c79c37d: sched: it913x: support for different tuner regs Cc: stable@vger.kernel.org # .32.x: c725ff69737313647f981813e8f39a372c99b0f0: sched: it913x: support for NEC extended keys Cc: stable@vger.kernel.org # .32.x: b69902914803a8bf93f39f0db642430504c800ba: sched: it913x: multi firmware loader Cc: stable@vger.kernel.org # .32.x: 5e642c06b561fd95d77d13f41adeb6e906acc31d: sched: it9135: add support for IT9135 9005 devices Cc: stable@vger.kernel.org # .32.x: 15157c506d742b6767edcd486d6c73ea907fb7cf: sched: it913x add retry to USB bulk endpoints and IO Cc: stable@vger.kernel.org # .32.x: 50815707eebc7ce12bfd97933a6e68a482c4d7ab: sched: it913x: multiple devices on system. Cc: stable@vger.kernel.org # .32.x: a7187c324ff5a879b5b0e6bb947664071c870803: sched: [BUG] Re: add support for IT9135 9005 devices Cc: stable@vger.kernel.org # .32.x: f36472da3a6d62ee46ae773bbbf05ddb24cd970c: sched: it913x stop dual frontend attach in warm state with single devices Cc: stable@vger.kernel.org # .32.x: 53844c4fc7912fef2f56c1b3f851b30c8ebd1d8a: sched: it913x add support for IT9135 9006 devices Cc: stable@vger.kernel.org # .32.x: ed3189cf989128fe283d6dbffbbae08b67d9e5bd: sched: it913x ver 1.18 Turn pid filter off by caps option only Cc: stable@vger.kernel.org # .32.x: d4d5a40710701abd4535d6a5ada601c885a08865: sched: [BUG] it913x ver 1.20. PID filter problems Cc: stable@vger.kernel.org # .32.x: fa52520cff0b3dce483efa8fb4ae1a4b18a82109: sched: [BUG] it913x ver 1.21 Fixed for issue with 9006 and warm boot Cc: stable@vger.kernel.org # .32.X: 245900c4a7a7d23c2e5b2b64b70770debcac5814: sched: [media] it913x ver 1.22 corrections to Tuner IDs Cc: stable@vger.kernel.org # .32.x: f0e07d7658a81bc185b8ba58f062c16b79ac0e2b: sched: it913x changed firmware loader for chip version 2 types Cc: stable@vger.kernel.org # .32.x: a8ea0218625699a5c635655a17b565bab5888ea1: sched: it913x v1.23 use it913x_config.chip_ver to select firmware Cc: stable@vger.kernel.org # .32.x: fc594e3e5196d4cf7ace7735eeca399f7a80868b: sched: it913x ver 1.24 Make 0x60 default on version 2 devices Cc: stable@vger.kernel.org # .32.x Signed-off-by: Malcolm Priestley tvbox...@gmail.com --- Documentation/dvb/get_dvb_firmware | 22 +- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware index e67be7a..a4ff8e7 100755 --- a/Documentation/dvb/get_dvb_firmware +++ b/Documentation/dvb/get_dvb_firmware @@ -28,7 +28,7 @@ use IO::Handle; opera1, cx231xx, cx18, cx23885, pvrusb2, mpc718, af9015, ngene, az6027, lme2510_lg, lme2510c_s7395