Re: hotplug e1000 failed after 32 times

From: Li Shaohua
Date: Fri Sep 17 2004 - 00:56:48 EST


On Fri, 2004-09-17 at 13:14, Andrew Morton wrote:
> Li Shaohua <shaohua.li@xxxxxxxxx> wrote:
> >
> > I'm testing a hotplug driver. In my test, I will hot add/remove an e1000
> > NIC frequently. The result is my hot add failed after 32 times hotadd.
> > After looking at the code of e1000 driver, I found
> > e1000_adapter->bd_number has maxium limitation of 32, and it increased
> > one every hot add. Looks like the remove driver routine didn't free the
> > 'bd_number', so hot add failed after 32 times. Below patch fixes this
> > issue.
>
> Yeah. I think you'll find that damn near every net driver in the kernel
> has this problem. I think it would be better to create a little suite of
> library functions in net/core/dev.c to handle this situation.
Thanks Andrew. That makes sense. I will add as you said.

Thanks,
Shaohua

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/