summaryrefslogtreecommitdiff
path: root/sys/src/cmd/nusb/disk/disk.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-01-03 20:46:25 +0100
committercinap_lenrek <cinap_lenrek@gmx.de>2013-01-03 20:46:25 +0100
commit8c8149965994d4122bd22d29fbcf114282175ec9 (patch)
tree52fd4f316942754e7270810de7cf7be58650d1cb /sys/src/cmd/nusb/disk/disk.c
parent857502c364fc281a9f5265c3192b030431768583 (diff)
scsi: do only 36 byte inquiry
some devices freeze up with inqiry allocation length other than 36 bytes. as we do not really care about the vendor specific part of the inquiry, lets only do 36 byte inquiry for now.
Diffstat (limited to 'sys/src/cmd/nusb/disk/disk.c')
-rw-r--r--sys/src/cmd/nusb/disk/disk.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/src/cmd/nusb/disk/disk.c b/sys/src/cmd/nusb/disk/disk.c
index 41260aacd..60052922b 100644
--- a/sys/src/cmd/nusb/disk/disk.c
+++ b/sys/src/cmd/nusb/disk/disk.c
@@ -341,7 +341,13 @@ umsinit(void)
i, lun->inquiry[0]);
continue;
}
- SRstart(lun, 1);
+
+ if(SRready(lun) < 0 && SRready(lun) < 0 && SRready(lun) < 0)
+ dprint(2, "disk: lun %d not ready\n", i);
+
+ if((lun->inquiry[0] & 0x1F) == 0)
+ SRstart(lun, 1);
+
/*
* we ignore the device type reported by inquiry.
* Some devices return a wrong value but would still work.