Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
This commit is contained in:
@@ -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),
|
||||
¬ification, 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);
|
||||
|
@@ -1293,6 +1293,9 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* netdev_printk() needs this so do it as early as possible */
|
||||
SET_NETDEV_DEV(net, &udev->dev);
|
||||
|
||||
dev = netdev_priv(net);
|
||||
dev->udev = xdev;
|
||||
dev->intf = udev;
|
||||
@@ -1377,8 +1380,6 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
|
||||
dev->rx_urb_size = dev->hard_mtu;
|
||||
dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
|
||||
|
||||
SET_NETDEV_DEV(net, &udev->dev);
|
||||
|
||||
if ((dev->driver_info->flags & FLAG_WLAN) != 0)
|
||||
SET_NETDEV_DEVTYPE(net, &wlan_type);
|
||||
if ((dev->driver_info->flags & FLAG_WWAN) != 0)
|
||||
|
Reference in New Issue
Block a user