Commit af30bd03 authored by Brice Goglin's avatar Brice Goglin Committed by Greg Kroah-Hartman

myri10ge: do not forget to setup the single slice pointers

part of commit 0dcffac1 upstream
(the upstream multislice patch contains the same fix within
 myri10ge_alloc_slices() which does this for every slice)

Even if we don't have multiple slices in myri10ge in 2.6.26,
we already use some multislice-aware routines that need the
slice state pointers to mgp and dev to be valid.

This patch fixes a regression where configuring the interface up
would oops in myri10ge_allocate_rings() when using ss->mgp
(and later when using ss->dev).

Oops reported and patch tested by Lukas Hejtmanek at
http://lkml.org/lkml/2008/7/23/101Signed-off-by: default avatarBrice Goglin <brice@myri.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e6fb1df0
...@@ -3126,6 +3126,8 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -3126,6 +3126,8 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
mgp = netdev_priv(netdev); mgp = netdev_priv(netdev);
mgp->dev = netdev; mgp->dev = netdev;
mgp->ss.mgp = mgp;
mgp->ss.dev = mgp->dev;
netif_napi_add(netdev, &mgp->ss.napi, myri10ge_poll, myri10ge_napi_weight); netif_napi_add(netdev, &mgp->ss.napi, myri10ge_poll, myri10ge_napi_weight);
mgp->pdev = pdev; mgp->pdev = pdev;
mgp->csum_flag = MXGEFW_FLAGS_CKSUM; mgp->csum_flag = MXGEFW_FLAGS_CKSUM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment