Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / drivers / net / usb / asix.c
index c979159..8653eb7 100644 (file)
@@ -361,7 +361,7 @@ static int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb,
                }
 
                if (rx->size > dev->net->mtu + ETH_HLEN + VLAN_HLEN) {
-                       netdev_err(dev->net, "asix_rx_fixup() Bad RX Length %d\n",
+                       netdev_dbg(dev->net, "asix_rx_fixup() Bad RX Length %d\n",
                                   rx->size);
                        kfree_skb(rx->ax_skb);
                        return 0;
@@ -1132,19 +1132,7 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
                return ret;
        }
 
-       ret = asix_sw_reset(dev, AX_SWRESET_IPPD | AX_SWRESET_PRL);
-       if (ret < 0)
-               return ret;
-
-       msleep(150);
-
-       ret = asix_sw_reset(dev, AX_SWRESET_CLEAR);
-       if (ret < 0)
-               return ret;
-
-       msleep(150);
-
-       ret = asix_sw_reset(dev, embd_phy ? AX_SWRESET_IPRL : AX_SWRESET_PRTE);
+       ax88772_reset(dev);
 
        /* Read PHYID register *AFTER* the PHY was reset properly */
        phyid = asix_get_phyid(dev);
@@ -1555,12 +1543,23 @@ static const struct driver_info ax88772_info = {
        .unbind = ax88772_unbind,
        .status = asix_status,
        .link_reset = ax88772_link_reset,
-       .reset = ax88772_reset,
+       .reset = ax88772_link_reset,
        .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR | FLAG_MULTI_PACKET,
        .rx_fixup = asix_rx_fixup_common,
        .tx_fixup = asix_tx_fixup,
 };
 
+static const struct driver_info hg20f9_info = {
+       .description = "HG20F9 USB 2.0 Ethernet",
+       .bind = ax88772_bind,
+       .status = asix_status,
+       .link_reset = ax88772_link_reset,
+       .reset = ax88772_reset,
+       .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR,
+       .rx_fixup = asix_rx_fixup_common,
+       .tx_fixup = asix_tx_fixup,
+};
+
 static const struct driver_info ax88178_info = {
        .description = "ASIX AX88178 USB 2.0 Ethernet",
        .bind = ax88178_bind,
@@ -1568,7 +1567,8 @@ static const struct driver_info ax88178_info = {
        .status = asix_status,
        .link_reset = ax88178_link_reset,
        .reset = ax88178_reset,
-       .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR,
+       .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR |
+                FLAG_MULTI_PACKET,
        .rx_fixup = asix_rx_fixup_common,
        .tx_fixup = asix_tx_fixup,
 };
@@ -1698,6 +1698,10 @@ static const struct usb_device_id        products [] = {
        // ASIX 88772a
        USB_DEVICE(0x0db0, 0xa877),
        .driver_info = (unsigned long) &ax88772_info,
+}, {
+       // HG20F9
+       USB_DEVICE(0x066B, 0x20F9),
+       .driver_info = (unsigned long) &hg20f9_info,
 }, {
        // Asus USB Ethernet Adapter
        USB_DEVICE (0x0b95, 0x7e2b),