Merge to Fedora kernel-2.6.7-1.441
[linux-2.6.git] / drivers / usb / net / usbnet.c
index e2e328f..db96e3b 100644 (file)
  *             disconnect; other cleanups. (db)  Flush net1080 fifos
  *             after several sequential framing errors. (Johannes Erdfelt)
  * 22-aug-2003 AX8817X support (Dave Hollis).
+ * 14-jun-2004  Trivial patch for AX8817X based Buffalo LUA-U2-KTX in Japan
+ *             (Neil Bortnak)
  *
  *-------------------------------------------------------------------------*/
 
@@ -1157,6 +1159,7 @@ static int cdc_bind (struct usbnet *dev, struct usb_interface *intf)
 
        status = get_ethernet_addr (dev, info->ether);
        if (status < 0) {
+               usb_set_intfdata(info->data, NULL);
                usb_driver_release_interface (&usbnet_driver, info->data);
                return status;
        }
@@ -2668,9 +2671,7 @@ static int usbnet_ioctl (struct net_device *net, struct ifreq *rq, int cmd)
        struct usbnet *dev = (struct usbnet *)net->priv;
 
        if (dev->mii.mdio_read != NULL && dev->mii.mdio_write != NULL)
-               return generic_mii_ioctl(&dev->mii,
-                               (struct mii_ioctl_data *) &rq->ifr_data,
-                               cmd, NULL);
+               return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL);
        }
 #endif
        return -EOPNOTSUPP;
@@ -3206,6 +3207,10 @@ static const struct usb_device_id        products [] = {
        // ATEN UC210T
        USB_DEVICE (0x0557, 0x2009),
        .driver_info =  (unsigned long) &ax8817x_info,
+}, {
+       // Buffalo LUA-U2-KTX
+       USB_DEVICE (0x0411, 0x003d),
+       .driver_info =  (unsigned long) &ax8817x_info,
 },
 #endif