NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
possible fix for strange USB sticks / SD card readers
As it was reported repeatedly, some USB sticks do not work on NetBSD,
often a "Generic HBA error" is reported in the kernel log.
There seem to be different kinds of misbehavior which cause this
symptom. Finally I got one strange USB stick between my fingers,
this one answers the SCSI "Request Sense" after an unsupported
command with an USB pipe stall.
Here is a patch which makes the code tolerate this behavior in
certain cases. With that, the stick I got works properly.
Can those of you with other non-working USB sticks (or SD card
readers which sometimes use similar controller chips) try
the patch and report whether it helps?
best regards
Matthias
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Kennen Sie schon unsere app? http://www.fz-juelich.de/app
# HG changeset patch
# Parent da9a11f068ab6496d09db5a3e644e115f78523bc
diff -r da9a11f068ab -r 935aaa80dad2 sys/dev/usb/umass_scsipi.c
--- a/sys/dev/usb/umass_scsipi.c Fri Aug 10 22:18:40 2012 +0200
+++ b/sys/dev/usb/umass_scsipi.c Fri Aug 10 22:45:50 2012 +0200
@@ -487,7 +487,10 @@
default:
DPRINTF(UDMASS_SCSI, ("%s: Autosense failed, status %d\n",
device_xname(sc->sc_dev), status));
- xs->error = XS_DRIVER_STUFFUP;
+ if (xs->xs_control & XS_CTL_IGNORE_ILLEGAL_REQUEST)
+ xs->error = XS_NOERROR;
+ else
+ xs->error = XS_DRIVER_STUFFUP;
break;
}
Home |
Main Index |
Thread Index |
Old Index