patch-2.4.19 linux-2.4.19/drivers/usb/kaweth.c
Next file: linux-2.4.19/drivers/usb/ov511.c
Previous file: linux-2.4.19/drivers/usb/inode.c
Back to the patch index
Back to the overall index
- Lines: 59
- Date:
Fri Aug 2 17:39:45 2002
- Orig file:
linux-2.4.18/drivers/usb/kaweth.c
- Orig date:
Tue Nov 13 09:19:41 2001
diff -urN linux-2.4.18/drivers/usb/kaweth.c linux-2.4.19/drivers/usb/kaweth.c
@@ -123,6 +123,7 @@
{ USB_DEVICE(0x0557, 0x2002) }, /* ATEN USB Ethernet */
{ USB_DEVICE(0x0557, 0x4000) }, /* D-Link DSB-650C */
{ USB_DEVICE(0x0565, 0x0002) }, /* Peracom Enet */
+ { USB_DEVICE(0x0565, 0x0003) }, /* Optus@Home UEP1045A */
{ USB_DEVICE(0x0565, 0x0005) }, /* Peracom Enet2 */
{ USB_DEVICE(0x05e9, 0x0008) }, /* KLSI KL5KUSB101B */
{ USB_DEVICE(0x05e9, 0x0009) }, /* KLSI KL5KUSB101B (Board change) */
@@ -238,8 +239,7 @@
return -EBUSY;
}
- dr = kmalloc(sizeof(devrequest),
- in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
+ dr = kmalloc(sizeof(devrequest), GFP_ATOMIC);
if(!dr)
{
@@ -587,14 +587,10 @@
{
struct kaweth_device *kaweth = urb->context;
- spin_lock(&kaweth->device_lock);
-
if (urb->status)
kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status);
netif_wake_queue(kaweth->net);
-
- spin_unlock(&kaweth->device_lock);
}
/****************************************************************
@@ -722,6 +718,7 @@
kaweth->stats.tx_errors++;
net->trans_start = jiffies;
+ kaweth->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
usb_unlink_urb(kaweth->tx_urb);
}
@@ -825,6 +822,7 @@
/* Device will now disappear for a moment... */
kaweth_info("Firmware loaded. I'll be back...");
+ kfree(kaweth);
return NULL;
}
@@ -927,6 +925,9 @@
return;
}
+ usb_unlink_urb(kaweth->rx_urb);
+ usb_unlink_urb(kaweth->tx_urb);
+
if(kaweth->net) {
if(kaweth->net->flags & IFF_UP) {
kaweth_dbg("Closing net device");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)