Jan, Below the git patch as requested.
Frederik >From 0f1f4a6976edeb7c30749a96e9b51172d897a12b Mon Sep 17 00:00:00 2001 From: Frederik Bayart <frederik.bay...@triphase.com> Date: Wed, 1 Apr 2009 10:10:18 +0200 Subject: [PATCH] fix incorrect reading of input params : if in rtnet.conf RT_DRIVER_OPTIONS="cards=0,1,0 and RxIntDelay=0,1,2", the parameter will be initialized with 2 instead of 1 for the 2nd card. Signed-off-by: Frederik Bayart <frederik.bay...@triphase.com> --- drivers/e1000/e1000_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/e1000/e1000_main.c b/drivers/e1000/e1000_main.c index 27c85c3..7c2747e 100644 --- a/drivers/e1000/e1000_main.c +++ b/drivers/e1000/e1000_main.c @@ -779,7 +779,7 @@ e1000_probe(struct pci_dev *pdev, netdev->mem_end = mmio_start + mmio_len; netdev->base_addr = adapter->hw.io_base; - adapter->bd_number = cards_found; + adapter->bd_number = cards_found+1; /* setup the private structure */ -- 1.6.2 -----Original Message----- From: jan.kis...@web.de [mailto:jan.kis...@web.de] Sent: zaterdag 28 maart 2009 10:24 To: Frederik Bayart Cc: rtnet-users@lists.sourceforge.net Subject: Re: [RTnet-users] [PATCH] e1000 parameters are read incorrectly Frederik Bayart wrote: > Hallo, > > I reported this problem already on March, but I don't find my mail in the > archives, so I report it again. > > I found a bug in e1000_main.c, in function e1000_probe : > > adapter->bd_number = cards_found > > should be : > > adapter->bd_number = cards_found -1 > > because cards_found was incremented at the start of the function : > > if (cards[cards_found++] == 0) > { > return -ENODEV; > } > > This has as consequence dat the parameters are initialized incorrect, e.g. > if in rtnet.conf > > RT_DRIVER_OPTIONS="cards=0,1,0 and RxIntDelay=0,1,2" > > the parameter will be > initialized with 2 instead of 1 for the 2nd card. > > Below you find the output from git diff > > Frederik (frederik.bay...@triphase.com) > > diff --git a/drivers/e1000/e1000_main.c b/drivers/e1000/e1000_main.c > index 27c85c3..12a8ef3 100644 > --- a/drivers/e1000/e1000_main.c > +++ b/drivers/e1000/e1000_main.c > @@ -779,7 +779,7 @@ e1000_probe(struct pci_dev *pdev, > netdev->mem_end = mmio_start + mmio_len; > netdev->base_addr = adapter->hw.io_base; > > - adapter->bd_number = cards_found; > + adapter->bd_number = cards_found - 1; > > /* setup the private structure */ > Thanks, good catch. But let me explain (also for everyone else interested in sending patches) how you could produce the preferred patch format: 1. Commit your change(s) to you local git repository (e.g. via 'git commit -s -a' which commits all changes). You will be asked for a commit comment, please provide a precise summary of the above. 2. Use 'git format-patch HEAD^..HEAD' to extract the patch in right format and copy&paste it into your mail client (there are also other ways like 'git send-email', but the latter is more transparent for starters). Please give this a try and I will happily apply the result. Thanks again, Jan ------------------------------------------------------------------------------ _______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users