Commit efafe6fb authored by Malte Doersam's avatar Malte Doersam Committed by Greg Kroah-Hartman

[PATCH] USB: Pegasus: Linksys USBVPN1 support + cleanup

This patch adds a second linksys vendor-id (077b) and the product id of the
pegasus based adapter USBVPN1

http://www1.linksys.com/Products/product.asp?prid=3D543&scid=3D30

Furthermore it replaces all LINKSYS_GPIO_RESET with DEFAULT_GPIO_RESET as both
are declared like this:
#define        DEFAULT_GPIO_RESET      0x24
#define        LINKSYS_GPIO_RESET      0x24

This is misleading and confusing.
The check is now done via the VENDOR_ID in pegasus.c:
if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS
Signed-off-by: default avatarMalte Doersam <mdoersam@arcor.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent aef4e266
...@@ -524,6 +524,7 @@ static int enable_net_traffic(struct net_device *dev, struct usb_device *usb) ...@@ -524,6 +524,7 @@ static int enable_net_traffic(struct net_device *dev, struct usb_device *usb)
ret = set_registers(pegasus, EthCtrl0, 3, data); ret = set_registers(pegasus, EthCtrl0, 3, data);
if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS || if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS ||
usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS2 ||
usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK) { usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK) {
u16 auxmode; u16 auxmode;
read_mii_word(pegasus, 0, 0x1b, &auxmode); read_mii_word(pegasus, 0, 0x1b, &auxmode);
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#define PHY_READ 0x40 #define PHY_READ 0x40
#define PHY_WRITE 0x20 #define PHY_WRITE 0x20
#define DEFAULT_GPIO_RESET 0x24 #define DEFAULT_GPIO_RESET 0x24
#define LINKSYS_GPIO_RESET 0x24
#define DEFAULT_GPIO_SET 0x26 #define DEFAULT_GPIO_SET 0x26
#define PEGASUS_PRESENT 0x00000001 #define PEGASUS_PRESENT 0x00000001
...@@ -140,6 +139,7 @@ struct usb_eth_dev { ...@@ -140,6 +139,7 @@ struct usb_eth_dev {
#define VENDOR_KINGSTON 0x0951 #define VENDOR_KINGSTON 0x0951
#define VENDOR_LANEED 0x056e #define VENDOR_LANEED 0x056e
#define VENDOR_LINKSYS 0x066b #define VENDOR_LINKSYS 0x066b
#define VENDOR_LINKSYS2 0x077b
#define VENDOR_MELCO 0x0411 #define VENDOR_MELCO 0x0411
#define VENDOR_MICROSOFT 0x045e #define VENDOR_MICROSOFT 0x045e
#define VENDOR_MOBILITY 0x1342 #define VENDOR_MOBILITY 0x1342
...@@ -218,15 +218,15 @@ PEGASUS_DEV( "Corega FEter USB-TX", VENDOR_COREGA, 0x0004, ...@@ -218,15 +218,15 @@ PEGASUS_DEV( "Corega FEter USB-TX", VENDOR_COREGA, 0x0004,
PEGASUS_DEV( "Corega FEter USB-TXS", VENDOR_COREGA, 0x000d, PEGASUS_DEV( "Corega FEter USB-TXS", VENDOR_COREGA, 0x000d,
DEFAULT_GPIO_RESET | PEGASUS_II ) DEFAULT_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4001, PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4001,
LINKSYS_GPIO_RESET ) DEFAULT_GPIO_RESET )
PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4002, PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4002,
LINKSYS_GPIO_RESET ) DEFAULT_GPIO_RESET )
PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4102, PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4102,
LINKSYS_GPIO_RESET | PEGASUS_II ) DEFAULT_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x400b, PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x400b,
LINKSYS_GPIO_RESET | PEGASUS_II ) DEFAULT_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x200c, PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x200c,
LINKSYS_GPIO_RESET | PEGASUS_II ) DEFAULT_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "D-Link DSB-650TX(PNA)", VENDOR_DLINK, 0x4003, PEGASUS_DEV( "D-Link DSB-650TX(PNA)", VENDOR_DLINK, 0x4003,
DEFAULT_GPIO_RESET | HAS_HOME_PNA ) DEFAULT_GPIO_RESET | HAS_HOME_PNA )
PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK, 0xabc1, PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK, 0xabc1,
...@@ -260,17 +260,19 @@ PEGASUS_DEV( "LANEED USB Ethernet LD-USB/T", VENDOR_LANEED, 0xabc1, ...@@ -260,17 +260,19 @@ PEGASUS_DEV( "LANEED USB Ethernet LD-USB/T", VENDOR_LANEED, 0xabc1,
PEGASUS_DEV( "LANEED USB Ethernet LD-USB/TX", VENDOR_LANEED, 0x200c, PEGASUS_DEV( "LANEED USB Ethernet LD-USB/TX", VENDOR_LANEED, 0x200c,
DEFAULT_GPIO_RESET | PEGASUS_II ) DEFAULT_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x2202, PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x2202,
LINKSYS_GPIO_RESET ) DEFAULT_GPIO_RESET )
PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2203, PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2203,
LINKSYS_GPIO_RESET ) DEFAULT_GPIO_RESET )
PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2204, PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2204,
LINKSYS_GPIO_RESET | HAS_HOME_PNA ) DEFAULT_GPIO_RESET | HAS_HOME_PNA )
PEGASUS_DEV( "Linksys USB10T Ethernet Adapter", VENDOR_LINKSYS, 0x2206, PEGASUS_DEV( "Linksys USB10T Ethernet Adapter", VENDOR_LINKSYS, 0x2206,
LINKSYS_GPIO_RESET | PEGASUS_II) DEFAULT_GPIO_RESET | PEGASUS_II)
PEGASUS_DEV( "Linksys USBVPN1", VENDOR_LINKSYS2, 0x08b4,
DEFAULT_GPIO_RESET )
PEGASUS_DEV( "Linksys USB USB100TX", VENDOR_LINKSYS, 0x400b, PEGASUS_DEV( "Linksys USB USB100TX", VENDOR_LINKSYS, 0x400b,
LINKSYS_GPIO_RESET | PEGASUS_II ) DEFAULT_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x200c, PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x200c,
LINKSYS_GPIO_RESET | PEGASUS_II ) DEFAULT_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "MELCO/BUFFALO LUA-TX", VENDOR_MELCO, 0x0001, PEGASUS_DEV( "MELCO/BUFFALO LUA-TX", VENDOR_MELCO, 0x0001,
DEFAULT_GPIO_RESET ) DEFAULT_GPIO_RESET )
PEGASUS_DEV( "MELCO/BUFFALO LUA-TX", VENDOR_MELCO, 0x0005, PEGASUS_DEV( "MELCO/BUFFALO LUA-TX", VENDOR_MELCO, 0x0005,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment