diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2013-11-07 16:49:04 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-25 12:14:29 -0500 |
commit | 9df682927c2e3a92f43803d6b52095992e3b2ab8 (patch) | |
tree | 2f7163a9de3e839bba505a39a8477e450833df05 /drivers/staging | |
parent | 6330f9cf347849de74899e5fac00bfecd84a6b43 (diff) |
staging: vt6656: [BUG] Fix for TX USB resets from vendors driver.
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.10+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/vt6656/baseband.c | 11 | ||||
-rw-r--r-- | drivers/staging/vt6656/rndis.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index 1e8b8412e67e..4aa5ef54b683 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c | |||
@@ -939,6 +939,7 @@ int BBbVT3184Init(struct vnt_private *pDevice) | |||
939 | u8 * pbyAgc; | 939 | u8 * pbyAgc; |
940 | u16 wLengthAgc; | 940 | u16 wLengthAgc; |
941 | u8 abyArray[256]; | 941 | u8 abyArray[256]; |
942 | u8 data; | ||
942 | 943 | ||
943 | ntStatus = CONTROLnsRequestIn(pDevice, | 944 | ntStatus = CONTROLnsRequestIn(pDevice, |
944 | MESSAGE_TYPE_READ, | 945 | MESSAGE_TYPE_READ, |
@@ -1104,6 +1105,16 @@ else { | |||
1104 | ControlvWriteByte(pDevice,MESSAGE_REQUEST_BBREG,0x0D,0x01); | 1105 | ControlvWriteByte(pDevice,MESSAGE_REQUEST_BBREG,0x0D,0x01); |
1105 | 1106 | ||
1106 | RFbRFTableDownload(pDevice); | 1107 | RFbRFTableDownload(pDevice); |
1108 | |||
1109 | /* Fix for TX USB resets from vendors driver */ | ||
1110 | CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ, USB_REG4, | ||
1111 | MESSAGE_REQUEST_MEM, sizeof(data), &data); | ||
1112 | |||
1113 | data |= 0x2; | ||
1114 | |||
1115 | CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE, USB_REG4, | ||
1116 | MESSAGE_REQUEST_MEM, sizeof(data), &data); | ||
1117 | |||
1107 | return true;//ntStatus; | 1118 | return true;//ntStatus; |
1108 | } | 1119 | } |
1109 | 1120 | ||
diff --git a/drivers/staging/vt6656/rndis.h b/drivers/staging/vt6656/rndis.h index 5e073062017a..5cf5e732a36f 100644 --- a/drivers/staging/vt6656/rndis.h +++ b/drivers/staging/vt6656/rndis.h | |||
@@ -66,6 +66,8 @@ | |||
66 | 66 | ||
67 | #define VIAUSB20_PACKET_HEADER 0x04 | 67 | #define VIAUSB20_PACKET_HEADER 0x04 |
68 | 68 | ||
69 | #define USB_REG4 0x604 | ||
70 | |||
69 | typedef struct _CMD_MESSAGE | 71 | typedef struct _CMD_MESSAGE |
70 | { | 72 | { |
71 | u8 byData[256]; | 73 | u8 byData[256]; |