Hi,
Here's a patch against 2.5.1-pre7 that adds a new device to the pegasus
driver, cleans up the module locking code, and removes the USB_ST_*
error codes.
thanks,
greg k-h
diff -Nru a/drivers/usb/pegasus.c b/drivers/usb/pegasus.c
--- a/drivers/usb/pegasus.c Fri Dec 7 21:30:07 2001
+++ b/drivers/usb/pegasus.c Fri Dec 7 21:30:07 2001
@@ -53,7 +53,7 @@
/*
* Version Information
*/
-#define DRIVER_VERSION "v0.4.21 (2001/08/27)"
+#define DRIVER_VERSION "v0.4.22 (2001/12/07)"
#define DRIVER_AUTHOR "Petko Manolov <[EMAIL PROTECTED]>"
#define DRIVER_DESC "Pegasus/Pegasus II USB Ethernet driver"
@@ -102,7 +102,7 @@
return;
switch ( urb->status ) {
- case USB_ST_NOERROR:
+ case 0:
if ( pegasus->flags & ETH_REGS_CHANGE ) {
pegasus->flags &= ~ETH_REGS_CHANGE;
pegasus->flags |= ETH_REGS_CHANGED;
@@ -110,9 +110,9 @@
return;
}
break;
- case USB_ST_URB_PENDING:
+ case -EINPROGRESS:
return;
- case USB_ST_URB_KILLED:
+ case -ENOENT:
break;
default:
warn( __FUNCTION__ " status %d", urb->status);
@@ -526,9 +526,9 @@
pegasus->flags |= PEGASUS_RX_BUSY;
switch ( urb->status ) {
- case USB_ST_NOERROR:
+ case 0:
break;
- case USB_ST_NORESPONSE:
+ case -ETIMEDOUT:
dbg( "reset MAC" );
pegasus->flags &= ~PEGASUS_RX_BUSY;
break;
@@ -607,9 +607,9 @@
return;
switch ( urb->status ) {
- case USB_ST_NOERROR:
+ case 0:
break;
- case USB_ST_URB_KILLED:
+ case -ENOENT:
return;
default:
info("intr status %d", urb->status);
@@ -713,10 +713,8 @@
pegasus_t *pegasus = (pegasus_t *)net->priv;
int res;
- MOD_INC_USE_COUNT;
if ( (res = enable_net_traffic(net, pegasus->usb)) ) {
err("can't enable_net_traffic() - %d", res);
- MOD_DEC_USE_COUNT;
return -EIO;
}
FILL_BULK_URB( &pegasus->rx_urb, pegasus->usb,
@@ -755,7 +753,6 @@
#ifdef PEGASUS_USE_INTR
usb_unlink_urb( &pegasus->intr_urb );
#endif
- MOD_DEC_USE_COUNT;
return 0;
}
@@ -867,6 +864,7 @@
pegasus->usb = dev;
pegasus->net = net;
+ SET_MODULE_OWNER(net);
net->priv = pegasus;
net->open = pegasus_open;
net->stop = pegasus_close;
diff -Nru a/drivers/usb/pegasus.h b/drivers/usb/pegasus.h
--- a/drivers/usb/pegasus.h Fri Dec 7 21:30:07 2001
+++ b/drivers/usb/pegasus.h Fri Dec 7 21:30:07 2001
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999,2000 Petko Manolov - Petkan ([EMAIL PROTECTED])
+ * Copyright (c) 1999,2000 Petko Manolov - Petkan ([EMAIL PROTECTED])
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -138,6 +138,7 @@
#define VENDOR_DLINK 0x2001
#define VENDOR_ELSA 0x05cc
#define VENDOR_IODATA 0x04bb
+#define VENDOR_KINGSTON 0x0951
#define VENDOR_LANEED 0x056e
#define VENDOR_LINKSYS 0x066b
#define VENDOR_MELCO 0x0411
@@ -210,6 +211,8 @@
DEFAULT_GPIO_RESET )
PEGASUS_DEV( "IO DATA USB ET/TX", VENDOR_IODATA, 0x0904,
DEFAULT_GPIO_RESET )
+PEGASUS_DEV( "Kingston KNU101TX Ethernet", VENDOR_KINGSTON, 0x000a,
+ DEFAULT_GPIO_RESET)
PEGASUS_DEV( "LANEED USB Ethernet LD-USB/TX", VENDOR_LANEED, 0x4002,
DEFAULT_GPIO_RESET )
PEGASUS_DEV( "LANEED USB Ethernet LD-USB/TX", VENDOR_LANEED, 0x400b,
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel