Hi, I'm using smc9194.c driver with my Laptop port replicator for a while. I managed to fix Warning: kfree_sdb on hard IRQ that the driver sent to me. The patch works great for me and I think very few persons use this driver. For information, it has been market as OBSOLETE for a while and is only recently back (partlty to my request) to 2.4.testxx kernel. PLEASE ADD THIS TO THE NEXT test release. *** smc9194-old.c Wed Dec 13 09:39:18 2000 --- smc9194.c Wed Dec 13 12:44:38 2000 *************** *** 50,55 **** --- 50,56 ---- . 04/14/00 Heiko Pruessing (SMA Regelsysteme) Fixed bug in chip memory . allocation . 08/20/00 Arnaldo Melo fix kfree(skb) in smc_hardware_send_packet + . 12/13/00 Christian Jullien fix Warning: kfree_skb on hard IRQ ------------------------------------------------------------------------- ---*/ static const char *version = *************** *** 99,104 **** --- 100,107 ---- 0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0, 0 }; + #define SMC_dev_kfree_skb(ptr) (in_irq()?dev_kfree_skb_irq(ptr):dev_kfree_skb(ptr)) + /* . Wait time for memory to be free. This probably shouldn't be . tuned that much, as waiting for this means nothing else happens *************** *** 525,531 **** printk(CARDNAME": Far too big packet error. \n"); /* freeing the packet is a good thing here... but should . any packets of this size get down here? */ ! dev_kfree_skb (skb); lp->saved_skb = NULL; /* this IS an error, but, i don't want the skb saved */ netif_wake_queue(dev); --- 528,534 ---- printk(CARDNAME": Far too big packet error. \n"); /* freeing the packet is a good thing here... but should . any packets of this size get down here? */ ! SMC_dev_kfree_skb (skb); lp->saved_skb = NULL; /* this IS an error, but, i don't want the skb saved */ netif_wake_queue(dev); *************** *** 615,621 **** if ( packet_no & 0x80 ) { /* or isn't there? BAD CHIP! */ printk(KERN_DEBUG CARDNAME": Memory allocation failed. \n"); ! dev_kfree_skb(skb); lp->saved_skb = NULL; netif_wake_queue(dev); return; --- 618,624 ---- if ( packet_no & 0x80 ) { /* or isn't there? BAD CHIP! */ printk(KERN_DEBUG CARDNAME": Memory allocation failed. \n"); ! SMC_dev_kfree_skb(skb); lp->saved_skb = NULL; netif_wake_queue(dev); return; *************** *** 678,684 **** PRINTK2((CARDNAME": Sent packet of length %d \n",length)); lp->saved_skb = NULL; ! dev_kfree_skb (skb); dev->trans_start = jiffies; --- 681,687 ---- PRINTK2((CARDNAME": Sent packet of length %d \n",length)); lp->saved_skb = NULL; ! SMC_dev_kfree_skb (skb); dev->trans_start = jiffies; Regards Christian Jullien - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org