|
@@ -127,8 +127,11 @@ int usb_host_eth_scan(int mode)
|
|
|
|
|
|
old_async = usb_disable_asynch(1); /* asynch transfer not allowed */
|
|
|
|
|
|
- for (i = 0; i < USB_MAX_ETH_DEV; i++)
|
|
|
- memset(&usb_eth[i], 0, sizeof(usb_eth[i]));
|
|
|
+ /* unregister a previously detected device */
|
|
|
+ for (i = 0; i < usb_max_eth_dev; i++)
|
|
|
+ eth_unregister(&usb_eth[i].eth_dev);
|
|
|
+
|
|
|
+ memset(usb_eth, 0, sizeof(usb_eth));
|
|
|
|
|
|
for (i = 0; prob_dev[i].probe; i++) {
|
|
|
if (prob_dev[i].before_probe)
|