[PATCH][ATM] nicstar doesnt count all dropped pdus (and powerpc fixup)

From: chas williams (chas@locutus.cmf.nrl.navy.mil)
Date: Fri Mar 21 2003 - 11:50:10 EST


these two issues with the nicstar have annoyed for some time now. i
have a powerpc platform and the +=KERNELBASE doenst work/make sense.
pci_resource_start() should take care of this if necessary. the
second gripe, when atm_charge() fails, you need to count the pdu you
are about to drop.

Index: linux/drivers/atm/nicstar.c
===================================================================
RCS file: /home/chas/CVSROOT/linux/drivers/atm/nicstar.c,v
retrieving revision 1.2
diff -b -B -u -r1.2 nicstar.c
--- linux/drivers/atm/nicstar.c 26 Feb 2003 02:23:53 -0000 1.2
+++ linux/drivers/atm/nicstar.c 21 Mar 2003 16:42:27 -0000
@@ -487,11 +487,6 @@
    card->atmdev = NULL;
    card->pcidev = pcidev;
    card->membase = pci_resource_start(pcidev, 1);
-#ifdef __powerpc__
- /* Compensate for different memory map between host CPU and PCI bus.
- Shouldn't we use a macro for this? */
- card->membase += KERNELBASE;
-#endif /* __powerpc__ */
    card->membase = (unsigned long) ioremap(card->membase, NS_IOREMAP_SIZE);
    if (card->membase == 0)
    {
@@ -2315,6 +2310,7 @@
          {
             push_rxbufs(card, BUF_SM, (u32) skb, (u32) virt_to_bus(skb->data),
                         0, 0);
+ atomic_inc(&vcc->stats->rx_drop);
          }
          else
          {
@@ -2342,6 +2338,7 @@
             {
                push_rxbufs(card, BUF_SM, (u32) sb, (u32) virt_to_bus(sb->data),
                            0, 0);
+ atomic_inc(&vcc->stats->rx_drop);
             }
             else
             {
@@ -2366,6 +2363,7 @@
             {
                push_rxbufs(card, BUF_LG, (u32) skb,
                            (u32) virt_to_bus(skb->data), 0, 0);
+ atomic_inc(&vcc->stats->rx_drop);
             }
             else
             {
@@ -2450,6 +2448,7 @@
             }
             else
                dev_kfree_skb_any(hb);
+ atomic_inc(&vcc->stats->rx_drop);
          }
          else
          {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Mar 23 2003 - 22:00:36 EST