Skip to content

Commit

Permalink
staging: vt6656: [BUG] Fix for TX USB resets from vendors driver.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Malcolm Priestley authored and Greg Kroah-Hartman committed Nov 25, 2013
1 parent 6330f9c commit 9df6829
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/staging/vt6656/baseband.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ int BBbVT3184Init(struct vnt_private *pDevice)
u8 * pbyAgc;
u16 wLengthAgc;
u8 abyArray[256];
u8 data;

ntStatus = CONTROLnsRequestIn(pDevice,
MESSAGE_TYPE_READ,
Expand Down Expand Up @@ -1104,6 +1105,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;
}

Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/vt6656/rndis.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@

#define VIAUSB20_PACKET_HEADER 0x04

#define USB_REG4 0x604

typedef struct _CMD_MESSAGE
{
u8 byData[256];
Expand Down

0 comments on commit 9df6829

Please sign in to comment.