]> git.baikalelectronics.ru Git - kernel.git/commitdiff
e100: Fix ring parameter change handling regression.
authorDavid S. Miller <davem@davemloft.net>
Mon, 15 Mar 2010 22:23:30 +0000 (15:23 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Mar 2010 22:23:30 +0000 (15:23 -0700)
When the PCI pool changes were added to fix resume failures:

commit ac495cde63981b97386d586257e721545bc10b11
e100: Use pci pool to work around GFP_ATOMIC order 5 memory allocation failu

and

commit b9a76b13fcf80804f0cc29898e6fed5dd3ca2316
e100: Fix broken cbs accounting due to missing memset.

This introduced a problem that can happen if the TX ring size
is increased.  We need to size the PCI pool using cbs->max
instead of the default cbs->count value.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/e100.c

index a26ccab057d56fe305c760eb4e64ac4744c3e4e2..b997e578e58f21295e1f01129aa27bc7815a07d0 100644 (file)
@@ -2858,7 +2858,7 @@ static int __devinit e100_probe(struct pci_dev *pdev,
        }
        nic->cbs_pool = pci_pool_create(netdev->name,
                           nic->pdev,
-                          nic->params.cbs.count * sizeof(struct cb),
+                          nic->params.cbs.max * sizeof(struct cb),
                           sizeof(u32),
                           0);
        DPRINTK(PROBE, INFO, "addr 0x%llx, irq %d, MAC addr %pM\n",