Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200872
b: refs/heads/master
c: 7b00ac5
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Jul 3, 2010
1 parent 8dd1217 commit 2bb1f43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c89827e0e9346c039aed9b63c14096c2d36796b1
refs/heads/master: 7b00ac51ffcda994ef0839001257be894cc6e5a8
18 changes: 6 additions & 12 deletions trunk/drivers/net/usb/rndis_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
struct cdc_state *info = (void *) &dev->data;
struct usb_cdc_notification notification;
int master_ifnum;
int retval;
int partial;
unsigned count;
__le32 rsp;
u32 xid = 0, msg_len, request_id;
Expand Down Expand Up @@ -135,17 +133,13 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen)
if (unlikely(retval < 0 || xid == 0))
return retval;

/* Some devices don't respond on the control channel until
* polled on the status channel, so do that first. */
retval = usb_interrupt_msg(
dev->udev,
usb_rcvintpipe(dev->udev, dev->status->desc.bEndpointAddress),
&notification, sizeof(notification), &partial,
RNDIS_CONTROL_TIMEOUT_MS);
if (unlikely(retval < 0))
return retval;
// FIXME Seems like some devices discard responses when
// we time out and cancel our "get response" requests...
// so, this is fragile. Probably need to poll for status.

/* 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;
for (count = 0; count < 10; count++) {
memset(buf, 0, CONTROL_BUFFER_SIZE);
Expand Down

0 comments on commit 2bb1f43

Please sign in to comment.