shithub: riscv

Download patch

ref: 2d221e61e3820a007ff2204adb73ad3ab27010c6
parent: 22fc5467a4366579fcc7bfc389eaa9b397a3db7f
author: mischief <[email protected]>
date: Mon Oct 15 00:14:59 EDT 2018

nusb/disk: also drive usb attached scsi devices

--- a/sys/src/cmd/nusb/disk/disk.c
+++ b/sys/src/cmd/nusb/disk/disk.c
@@ -929,7 +929,7 @@
 			continue;
 		csp = ep->iface->csp;
 		sc = Subclass(csp);
-		if(!(Class(csp) == Clstorage && (Proto(csp) == Protobulk)))
+		if(!(Class(csp) == Clstorage && (Proto(csp) == Protobulk || Proto(csp) == Protouas)))
 			continue;
 		if(sc != Subatapi && sc != Sub8070 && sc != Subscsi)
 			fprint(2, "disk: subclass %#ulx not supported. trying anyway\n", sc);
--- a/sys/src/cmd/nusb/disk/ums.h
+++ b/sys/src/cmd/nusb/disk/ums.h
@@ -14,6 +14,7 @@
 	Protocbi =	0,	/* control/bulk/interrupt; mainly floppies */
 	Protocb =	1,	/*   "  with no interrupt; mainly floppies */
 	Protobulk =	0x50,	/* bulk only */
+	Protouas =	0x62,	/* USB-attached SCSI */
 
 	Subrbc =	1,	/* reduced blk cmds */
 	Subatapi =	2,	/* cd/dvd using sff-8020i or mmc-2 cmd blks */