PERFORCE change 105586 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Sun Sep 3 13:12:47 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=105586
Change 105586 by hselasky at hselasky_mini_itx on 2006/09/03 13:12:11
Improve ata-usb reset timeout recovery.
Affected files ...
.. //depot/projects/usb/src/sys/dev/ata/ata-usb.c#4 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/ata/ata-usb.c#4 (text) ====
@@ -544,10 +544,6 @@
return;
tr_setup:
- if (sc->reset_count >= 16) {
- device_printf(sc->dev, "timeout: giving up reset!\n");
- return;
- }
sc->reset_count ++;
@@ -916,9 +912,20 @@
sc->last_xfer_no);
}
- /* start reset before any callback */
+ if (sc->reset_count < 16) {
+
+ /* start reset before any callback */
+
+ atausb_transfer_start(sc, ATAUSB_T_BBB_RESET1);
+ } else {
+
+ /* suspend reset until next command */
+
+ sc->last_xfer_no = ATAUSB_T_BBB_RESET1;
+ sc->reset_count = 0;
- atausb_transfer_start(sc, ATAUSB_T_BBB_RESET1);
+ device_printf(sc->dev, "timeout: giving up reset!\n");
+ }
}
if (request) {
More information about the p4-projects
mailing list