Commit a60f2dd ("[usb] Try multiple USB device configurations") changed the behaviour of register_usb() such that if no drivers are found then the device will be closed and the memory used will be freed. If a port status change subsequently occurs while the device is still physically attached, then usb_hotplug() will see this as a new device having been attached, since there is no device recorded as being currently attached to the port. This can lead to spurious hotplug events (or even endless loops of hotplug events, if the process of opening and closing the device happens to generate a port status change). Fix by using a separate flag to indicate that a device is physically attached (even if we have no corresponding struct usb_device). Reported-by: Dan Ellis <Dan.Ellis@displaylink.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
1314 |
|
1314 |
|
1315 |
|
1315 |
|
1316 |
|
1316 |
|
|
1317 |
|
|
|
1318 |
|
|
|
1319 |
|
|
1317 |
|
1320 |
|
1318 |
|
1321 |
|
1319 |
|
1322 |
|
|
|
||
1345 |
|
1348 |
|
1346 |
|
1349 |
|
1347 |
|
1350 |
|
1348 |
|
|
|
1349 |
|
|
|
|
1351 |
|
|
|
1352 |
|
|
|
1353 |
|
|
|
1354 |
|
|
|
1355 |
|
|
|
1356 |
|
|
1350 |
|
1357 |
|
1351 |
|
1358 |
|
1352 |
|
1359 |
|
|
|
||
1373 |
|
1380 |
|
1374 |
|
1381 |
|
1375 |
|
1382 |
|
1376 |
|
|
|
|
1383 |
|
|
1377 |
|
1384 |
|
1378 |
|
1385 |
|
1379 |
|
|
|
|
1386 |
|
|
1380 |
|
1387 |
|
1381 |
|
1388 |
|
1382 |
|
1389 |
|
|
|
||
1546 |
|
1553 |
|
1547 |
|
1554 |
|
1548 |
|
1555 |
|
1549 |
|
|
|
|
1556 |
|
|
1550 |
|
1557 |
|
1551 |
|
1558 |
|
1552 |
|
1559 |
|
|
|
||
1576 |
|
1583 |
|
1577 |
|
1584 |
|
1578 |
|
1585 |
|
|
1586 |
|
|
1579 |
|
1587 |
|
1580 |
|
1588 |
|
1581 |
|
1589 |
|
|
|
||
702 |
|
702 |
|
703 |
|
703 |
|
704 |
|
704 |
|
705 |
|
|
|
|
705 |
|
|
|
706 |
|
|
|
707 |
|
|
|
708 |
|
|
|
709 |
|
|
|
710 |
|
|
|
711 |
|
|
706 |
|
712 |
|
707 |
|
713 |
|
708 |
|
714 |
|