提交 7b00ac51 编写于 作者: B Ben Hutchings 提交者: David S. Miller

net: Revert "rndis_host: Poll status channel before control channel"

This reverts commit c17b274d.

That change was reported to break rndis_wlan support for the WUSB54GS.
Reported-by: NLuís Picciochi Oliveira <pitxyoki@gmail.com>
Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c89827e0
...@@ -104,10 +104,8 @@ static void rndis_msg_indicate(struct usbnet *dev, struct rndis_indicate *msg, ...@@ -104,10 +104,8 @@ static void rndis_msg_indicate(struct usbnet *dev, struct rndis_indicate *msg,
int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen) int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen)
{ {
struct cdc_state *info = (void *) &dev->data; struct cdc_state *info = (void *) &dev->data;
struct usb_cdc_notification notification;
int master_ifnum; int master_ifnum;
int retval; int retval;
int partial;
unsigned count; unsigned count;
__le32 rsp; __le32 rsp;
u32 xid = 0, msg_len, request_id; u32 xid = 0, msg_len, request_id;
...@@ -135,17 +133,13 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen) ...@@ -135,17 +133,13 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen)
if (unlikely(retval < 0 || xid == 0)) if (unlikely(retval < 0 || xid == 0))
return retval; return retval;
/* Some devices don't respond on the control channel until // FIXME Seems like some devices discard responses when
* polled on the status channel, so do that first. */ // we time out and cancel our "get response" requests...
retval = usb_interrupt_msg( // so, this is fragile. Probably need to poll for status.
dev->udev,
usb_rcvintpipe(dev->udev, dev->status->desc.bEndpointAddress),
&notification, sizeof(notification), &partial,
RNDIS_CONTROL_TIMEOUT_MS);
if (unlikely(retval < 0))
return retval;
/* Poll the control channel; the request probably completed immediately */ /* ignore status endpoint, just poll the control channel;
* the request probably completed immediately
*/
rsp = buf->msg_type | RNDIS_MSG_COMPLETION; rsp = buf->msg_type | RNDIS_MSG_COMPLETION;
for (count = 0; count < 10; count++) { for (count = 0; count < 10; count++) {
memset(buf, 0, CONTROL_BUFFER_SIZE); memset(buf, 0, CONTROL_BUFFER_SIZE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册