Hi all, I use a Fedora flavour kernel. I have a specific notebook that needs a patch. One of the kernel developpers has sent me a patch for the kernel that could suit me. I tried to modify the patch to suit the Fedora src.rpm stuff. But I still have some problems: all the patch is rejected. I guess it's a directory-<kernel-version> problem that hides to me... I'm not a very good developper and I dont really play with patches so that I need some external help from you to apply it. I use the 1450FC4 kernel from the testing updates. I join you the original patch. Please help me :-) -- Administration & Formation à l'administration de serveurs dédiés: http://www.google.fr/search?q=aspo+infogerance+serveur
Disable 8139too NAPI for testing the Leval-Edge trigger problem Signed-off-by: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> --- drivers/net/8139too.c | 37 ++++++++++++++++++++++++++++++------- 1 files changed, 30 insertions(+), 7 deletions(-) diff -puN drivers/net/8139too.c~8139too-napi-revert drivers/net/8139too.c --- linux-2.6.13-rc6/drivers/net/8139too.c~8139too-napi-revert 2005-08-16 03:42:13.000000000 +0900 +++ linux-2.6.13-rc6-hirofumi/drivers/net/8139too.c 2005-08-16 03:52:15.000000000 +0900 @@ -112,7 +112,7 @@ #include <asm/uaccess.h> #include <asm/irq.h> -#define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver " DRV_VERSION +#define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver (Disable NAPI) " DRV_VERSION #define PFX DRV_NAME ": " /* Default Message level */ @@ -120,6 +120,7 @@ NETIF_MSG_PROBE | \ NETIF_MSG_LINK) +//#define ENABLE_NAPI /* enable PIO instead of MMIO, if CONFIG_8139TOO_PIO is selected */ #ifdef CONFIG_8139TOO_PIO @@ -624,7 +625,9 @@ static void rtl8139_tx_timeout (struct n static void rtl8139_init_ring (struct net_device *dev); static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev); +#ifdef ENABLE_NAPI static int rtl8139_poll(struct net_device *dev, int *budget); +#endif #ifdef CONFIG_NET_POLL_CONTROLLER static void rtl8139_poll_controller(struct net_device *dev); #endif @@ -974,8 +977,10 @@ static int __devinit rtl8139_init_one (s /* The Rtl8139-specific entries in the device structure. */ dev->open = rtl8139_open; dev->hard_start_xmit = rtl8139_start_xmit; +#ifdef ENABLE_NAPI dev->poll = rtl8139_poll; dev->weight = 64; +#endif dev->stop = rtl8139_close; dev->get_stats = rtl8139_get_stats; dev->set_multicast_list = rtl8139_set_rx_mode; @@ -2024,8 +2029,11 @@ no_early_rx: dev->last_rx = jiffies; tp->stats.rx_bytes += pkt_size; tp->stats.rx_packets++; - +#ifdef ENABLE_NAPI netif_receive_skb (skb); +#else + netif_rx (skb); +#endif } else { if (net_ratelimit()) printk (KERN_WARNING @@ -2103,7 +2111,7 @@ static void rtl8139_weird_interrupt (str dev->name, pci_cmd_status); } } - +#ifdef ENABLE_NAPI static int rtl8139_poll(struct net_device *dev, int *budget) { struct rtl8139_private *tp = netdev_priv(dev); @@ -2137,7 +2145,7 @@ static int rtl8139_poll(struct net_devic return !done; } - +#endif /* !ENABLE_NAPI */ /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */ static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance, @@ -2149,8 +2157,14 @@ static irqreturn_t rtl8139_interrupt (in u16 status, ackstat; int link_changed = 0; /* avoid bogus "uninit" warning */ int handled = 0; +#ifndef ENABLE_NAPI + int boguscnt = 20; +#endif spin_lock (&tp->lock); +#ifndef ENABLE_NAPI +retry: +#endif status = RTL_R16 (IntrStatus); /* shared irq? */ @@ -2162,13 +2176,13 @@ static irqreturn_t rtl8139_interrupt (in /* h/w no longer present (hotplug?) or major error, bail */ if (unlikely(status == 0xFFFF)) goto out; - +#ifdef ENABLE_NAPI /* close possible race's with dev_close */ if (unlikely(!netif_running(dev))) { RTL_W16 (IntrMask, 0); goto out; } - +#endif /* Acknowledge all of the current interrupt sources ASAP, but an first get an additional status bit from CSCR. */ if (unlikely(status & RxUnderrun)) @@ -2178,6 +2192,7 @@ static irqreturn_t rtl8139_interrupt (in if (ackstat) RTL_W16 (IntrStatus, ackstat); +#ifdef ENABLE_NAPI /* Receive packets are processed by poll routine. If not running start it now. */ if (status & RxAckBits){ @@ -2186,7 +2201,10 @@ static irqreturn_t rtl8139_interrupt (in __netif_rx_schedule (dev); } } - +#else + if (netif_running(dev) && (status & RxAckBits)) + rtl8139_rx (dev, tp, INT_MAX); +#endif /* Check uncommon events with one test. */ if (unlikely(status & (PCIErr | PCSTimeout | RxUnderrun | RxErr))) rtl8139_weird_interrupt (dev, tp, ioaddr, @@ -2197,6 +2215,11 @@ static irqreturn_t rtl8139_interrupt (in if (status & TxErr) RTL_W16 (IntrStatus, TxErr); } +#ifndef ENABLE_NAPI + boguscnt--; + if (boguscnt > 0) + goto retry; +#endif out: spin_unlock (&tp->lock); _
-- fedora-test-list mailing list fedora-test-list@xxxxxxxxxx To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-test-list