summaryrefslogtreecommitdiff
path: root/drivers/net/usb/rndis_host.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-07-21 19:43:03 (GMT)
committerIngo Molnar <mingo@elte.hu>2010-07-21 19:43:06 (GMT)
commit9dcdbf7a33d9018ac5d45debcf261be648bdd56a (patch)
treebbcc1a018f11ff76cd7ce174ef3ffe2c02da07ee /drivers/net/usb/rndis_host.c
parentcc5edb0eb9ce892b530e34a5d110382483587942 (diff)
parentcd5b8f8755a89a57fc8c408d284b8b613f090345 (diff)
downloadlinux-fsl-qoriq-9dcdbf7a33d9018ac5d45debcf261be648bdd56a.tar.xz
Merge branch 'linus' into perf/core
Merge reason: Pick up the latest perf fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/net/usb/rndis_host.c')
-rw-r--r--drivers/net/usb/rndis_host.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 28d3ee1..dd8a4ad 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -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;
@@ -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);