aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalte Doersam <mdoersam@arcor.de>2006-01-28 11:48:33 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:56 -0500
commitefafe6fb72b2bbab40080a08f7946f1eadb9bad9 (patch)
tree502053738219df278ecc7b0175d7fee4d8ec611c
parentaef4e266964bc15861b5835c1f5b9d2ebc155c2a (diff)
[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: Malte Doersam <mdoersam@arcor.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/net/pegasus.c1
-rw-r--r--drivers/usb/net/pegasus.h26
2 files changed, 15 insertions, 12 deletions
diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c
index 156a2f1cb39a..5b6675684567 100644
--- a/drivers/usb/net/pegasus.c
+++ b/drivers/usb/net/pegasus.c
@@ -524,6 +524,7 @@ static int enable_net_traffic(struct net_device *dev, struct usb_device *usb)
524 ret = set_registers(pegasus, EthCtrl0, 3, data); 524 ret = set_registers(pegasus, EthCtrl0, 3, data);
525 525
526 if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS || 526 if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS ||
527 usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS2 ||
527 usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK) { 528 usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK) {
528 u16 auxmode; 529 u16 auxmode;
529 read_mii_word(pegasus, 0, 0x1b, &auxmode); 530 read_mii_word(pegasus, 0, 0x1b, &auxmode);
diff --git a/drivers/usb/net/pegasus.h b/drivers/usb/net/pegasus.h
index 9fbd59b55cb6..a54752ce1493 100644
--- a/drivers/usb/net/pegasus.h
+++ b/drivers/usb/net/pegasus.h
@@ -25,7 +25,6 @@
25#define PHY_READ 0x40 25#define PHY_READ 0x40
26#define PHY_WRITE 0x20 26#define PHY_WRITE 0x20
27#define DEFAULT_GPIO_RESET 0x24 27#define DEFAULT_GPIO_RESET 0x24
28#define LINKSYS_GPIO_RESET 0x24
29#define DEFAULT_GPIO_SET 0x26 28#define DEFAULT_GPIO_SET 0x26
30 29
31#define PEGASUS_PRESENT 0x00000001 30#define PEGASUS_PRESENT 0x00000001
@@ -140,6 +139,7 @@ struct usb_eth_dev {
140#define VENDOR_KINGSTON 0x0951 139#define VENDOR_KINGSTON 0x0951
141#define VENDOR_LANEED 0x056e 140#define VENDOR_LANEED 0x056e
142#define VENDOR_LINKSYS 0x066b 141#define VENDOR_LINKSYS 0x066b
142#define VENDOR_LINKSYS2 0x077b
143#define VENDOR_MELCO 0x0411 143#define VENDOR_MELCO 0x0411
144#define VENDOR_MICROSOFT 0x045e 144#define VENDOR_MICROSOFT 0x045e
145#define VENDOR_MOBILITY 0x1342 145#define VENDOR_MOBILITY 0x1342
@@ -218,15 +218,15 @@ PEGASUS_DEV( "Corega FEter USB-TX", VENDOR_COREGA, 0x0004,
218PEGASUS_DEV( "Corega FEter USB-TXS", VENDOR_COREGA, 0x000d, 218PEGASUS_DEV( "Corega FEter USB-TXS", VENDOR_COREGA, 0x000d,
219 DEFAULT_GPIO_RESET | PEGASUS_II ) 219 DEFAULT_GPIO_RESET | PEGASUS_II )
220PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4001, 220PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4001,
221 LINKSYS_GPIO_RESET ) 221 DEFAULT_GPIO_RESET )
222PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4002, 222PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4002,
223 LINKSYS_GPIO_RESET ) 223 DEFAULT_GPIO_RESET )
224PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4102, 224PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4102,
225 LINKSYS_GPIO_RESET | PEGASUS_II ) 225 DEFAULT_GPIO_RESET | PEGASUS_II )
226PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x400b, 226PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x400b,
227 LINKSYS_GPIO_RESET | PEGASUS_II ) 227 DEFAULT_GPIO_RESET | PEGASUS_II )
228PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x200c, 228PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x200c,
229 LINKSYS_GPIO_RESET | PEGASUS_II ) 229 DEFAULT_GPIO_RESET | PEGASUS_II )
230PEGASUS_DEV( "D-Link DSB-650TX(PNA)", VENDOR_DLINK, 0x4003, 230PEGASUS_DEV( "D-Link DSB-650TX(PNA)", VENDOR_DLINK, 0x4003,
231 DEFAULT_GPIO_RESET | HAS_HOME_PNA ) 231 DEFAULT_GPIO_RESET | HAS_HOME_PNA )
232PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK, 0xabc1, 232PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK, 0xabc1,
@@ -260,17 +260,19 @@ PEGASUS_DEV( "LANEED USB Ethernet LD-USB/T", VENDOR_LANEED, 0xabc1,
260PEGASUS_DEV( "LANEED USB Ethernet LD-USB/TX", VENDOR_LANEED, 0x200c, 260PEGASUS_DEV( "LANEED USB Ethernet LD-USB/TX", VENDOR_LANEED, 0x200c,
261 DEFAULT_GPIO_RESET | PEGASUS_II ) 261 DEFAULT_GPIO_RESET | PEGASUS_II )
262PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x2202, 262PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x2202,
263 LINKSYS_GPIO_RESET ) 263 DEFAULT_GPIO_RESET )
264PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2203, 264PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2203,
265 LINKSYS_GPIO_RESET ) 265 DEFAULT_GPIO_RESET )
266PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2204, 266PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2204,
267 LINKSYS_GPIO_RESET | HAS_HOME_PNA ) 267 DEFAULT_GPIO_RESET | HAS_HOME_PNA )
268PEGASUS_DEV( "Linksys USB10T Ethernet Adapter", VENDOR_LINKSYS, 0x2206, 268PEGASUS_DEV( "Linksys USB10T Ethernet Adapter", VENDOR_LINKSYS, 0x2206,
269 LINKSYS_GPIO_RESET | PEGASUS_II) 269 DEFAULT_GPIO_RESET | PEGASUS_II)
270PEGASUS_DEV( "Linksys USBVPN1", VENDOR_LINKSYS2, 0x08b4,
271 DEFAULT_GPIO_RESET )
270PEGASUS_DEV( "Linksys USB USB100TX", VENDOR_LINKSYS, 0x400b, 272PEGASUS_DEV( "Linksys USB USB100TX", VENDOR_LINKSYS, 0x400b,
271 LINKSYS_GPIO_RESET | PEGASUS_II ) 273 DEFAULT_GPIO_RESET | PEGASUS_II )
272PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x200c, 274PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x200c,
273 LINKSYS_GPIO_RESET | PEGASUS_II ) 275 DEFAULT_GPIO_RESET | PEGASUS_II )
274PEGASUS_DEV( "MELCO/BUFFALO LUA-TX", VENDOR_MELCO, 0x0001, 276PEGASUS_DEV( "MELCO/BUFFALO LUA-TX", VENDOR_MELCO, 0x0001,
275 DEFAULT_GPIO_RESET ) 277 DEFAULT_GPIO_RESET )
276PEGASUS_DEV( "MELCO/BUFFALO LUA-TX", VENDOR_MELCO, 0x0005, 278PEGASUS_DEV( "MELCO/BUFFALO LUA-TX", VENDOR_MELCO, 0x0005,