public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [stable back port for <= 3.8] staging: vt6656: [BUG] Fix for TX USB resets from vendors driver.
@ 2013-12-01  8:57 Malcolm Priestley
  2013-12-02 12:32 ` Luis Henriques
  2013-12-11 19:14 ` Kamal Mostafa
  0 siblings, 2 replies; 3+ messages in thread
From: Malcolm Priestley @ 2013-12-01  8:57 UTC (permalink / raw)
  To: stable; +Cc: gregkh, linux-wireless

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=1890&download_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 <tvboxspy@gmail.com>
Cc: stable@vger.kernel.org # <= v3.8
Signed-off-by: Greg Kroah-Hartman <gregkh@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;
     WORD                    wLengthAgc;
     BYTE                    abyArray[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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] [stable back port for <= 3.8] staging: vt6656: [BUG] Fix for TX USB resets from vendors driver.
  2013-12-01  8:57 [PATCH] [stable back port for <= 3.8] staging: vt6656: [BUG] Fix for TX USB resets from vendors driver Malcolm Priestley
@ 2013-12-02 12:32 ` Luis Henriques
  2013-12-11 19:14 ` Kamal Mostafa
  1 sibling, 0 replies; 3+ messages in thread
From: Luis Henriques @ 2013-12-02 12:32 UTC (permalink / raw)
  To: Malcolm Priestley; +Cc: stable, gregkh, linux-wireless

On Sun, Dec 01, 2013 at 08:57:26AM +0000, Malcolm Priestley wrote:
> 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=1890&download_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.

Thank you, I'll queue it for the 3.5 kernel.

Cheers,
--
Luis


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [stable back port for <= 3.8] staging: vt6656: [BUG] Fix for TX USB resets from vendors driver.
  2013-12-01  8:57 [PATCH] [stable back port for <= 3.8] staging: vt6656: [BUG] Fix for TX USB resets from vendors driver Malcolm Priestley
  2013-12-02 12:32 ` Luis Henriques
@ 2013-12-11 19:14 ` Kamal Mostafa
  1 sibling, 0 replies; 3+ messages in thread
From: Kamal Mostafa @ 2013-12-11 19:14 UTC (permalink / raw)
  To: Malcolm Priestley; +Cc: stable, gregkh, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 3075 bytes --]

On Sun, 2013-12-01 at 08:57 +0000, Malcolm Priestley wrote:
> upstream commit
> 9df682927c2e3a92f43803d6b52095992e3b2ab8
> back port for 3.8 and less kernels.

Thanks very much Malcolm...  I'll queue this up for 3.8-stable.

 -Kamal


> 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=1890&download_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 <tvboxspy@gmail.com>
> Cc: stable@vger.kernel.org # <= v3.8
> Signed-off-by: Greg Kroah-Hartman <gregkh@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;
>      WORD                    wLengthAgc;
>      BYTE                    abyArray[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  ----------------------------*/
>  


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-11 19:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-01  8:57 [PATCH] [stable back port for <= 3.8] staging: vt6656: [BUG] Fix for TX USB resets from vendors driver Malcolm Priestley
2013-12-02 12:32 ` Luis Henriques
2013-12-11 19:14 ` Kamal Mostafa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox