Message ID | 20140405180416.GB29787@1wt.eu (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Willy, Thomas, I have the igb module blacklisted so that it doesn’t get loaded during boot. Then I simply did: # echo 1 > /sys/bus/pci/devices/0000\:01\:00.1/remove # modprobe igb and it only fires up the first port. I have tried the reverse (and removed 0000:01:00.0 instead) but that gives the oops. Cheers, Neil On Saturday, 5 April 2014 at 7:04pm, Willy Tarreau wrote: > Hi Thomas, > > On Sat, Apr 05, 2014 at 07:34:35PM +0200, Thomas Petazzoni wrote: > > Also, can you detail how you tested with just one port? > > > > OK I just found this ugly method, I'm not sure it's the best one but it > does the job :-) It simply refuses to configure any controller but the > first one on the chip. > > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c > index 46d31a4..88bf1d5 100644 > --- a/drivers/net/ethernet/intel/igb/igb_main.c > +++ b/drivers/net/ethernet/intel/igb/igb_main.c > @@ -2208,6 +2208,9 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > return -EINVAL; > } > > + if (PCI_FUNC(pdev->devfn) != 0) > + return -ENODEV; > + > err = pci_enable_device_mem(pdev); > if (err) > return err; > > Best regards, > Willy
On Sat, Apr 05, 2014 at 07:55:03PM +0100, Neil Greatorex wrote: > Willy, Thomas, > > I have the igb module blacklisted so that it doesn???t get loaded during > boot. Then I simply did: > > # echo 1 > /sys/bus/pci/devices/0000\:01\:00.1/remove > # modprobe igb Hehe feeling stupid now :-) Thanks for the trick, that's really useful. > and it only fires up the first port. I have tried the reverse (and removed > 0000:01:00.0 instead) but that gives the oops. Quite interesting indeed. Thanks, Willy
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 46d31a4..88bf1d5 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -2208,6 +2208,9 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) return -EINVAL; } + if (PCI_FUNC(pdev->devfn) != 0) + return -ENODEV; + err = pci_enable_device_mem(pdev); if (err) return err;
Hi Thomas, On Sat, Apr 05, 2014 at 07:34:35PM +0200, Thomas Petazzoni wrote: > Also, can you detail how you tested with just one port? OK I just found this ugly method, I'm not sure it's the best one but it does the job :-) It simply refuses to configure any controller but the first one on the chip. Best regards, Willy