git: 9front

Download patch

ref: 8829ab98c2514890b179dd34a12f9c4cd0c231ab
parent: 656e22d91f62399d67cd5be0ca88d15abddf2a29
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Wed Feb 13 05:03:53 EST 2013

nusb/disk: allow 12 and 16 byte raw scsi commands (from erik quanstro)

--- a/sys/src/cmd/nusb/disk/disk.c
+++ b/sys/src/cmd/nusb/disk/disk.c
@@ -812,7 +812,7 @@
 		}
 		switch(lun->phase){
 		case Pcmd:
-			if(count != 6 && count != 10){
+			if(count != 6 && count != 10 && count != 12 && count != 16){
 				respond(req, "bad command length");
 				break;
 			}
--- a/sys/src/cmd/nusb/disk/ums.h
+++ b/sys/src/cmd/nusb/disk/ums.h
@@ -79,7 +79,7 @@
 	/* partitions */
 	Part part[Maxparts];
 
-	uchar 	rawcmd[10];
+	uchar 	rawcmd[16];
 	uchar	phase;
 	char	*inq;
 	Ums	*ums;
--