> Some modern disks use the "UASP" protocol in preference to the
> traditional bulk-only mass storage protocol supported by the Plan
> 9 usbdisk driver. Even if the disk also supports bulk-only, the
> existing driver won't try to pick an alternate configuration to
> force the disk to fall back to that protocol. Below is a patch
> (tested on only one drive, as far as I know) which will make it do
> that.

Richards that patch makes other devices to not work, have you tested
it after compiling all usb and kernel? The test for storage and
bulk is done in usb/disk.c. Adding Protouas to the test solve the
problem. This is done also in 9front.

Regards,
adr.

diff -urP /n/img/sys/src/cmd/usb/disk/disk.c /sys/src/cmd/usb/disk/disk.c
--- /n/img/sys/src/cmd/usb/disk/disk.c  Tue Dec 13 23:35:47 2011
+++ /sys/src/cmd/usb/disk/disk.c        Sat Jun 19 10:45:37 2021
@@ -663,7 +663,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);
diff -urP /n/img/sys/src/cmd/usb/disk/ums.h /sys/src/cmd/usb/disk/ums.h
--- /n/img/sys/src/cmd/usb/disk/ums.h   Wed Feb 13 21:22:23 2013
+++ /sys/src/cmd/usb/disk/ums.h Sat Jun 19 10:44:13 2021
@@ -13,6 +13,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 */


------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tc5dcd85d69518168-M3f0383a01a6fdeb9cd22a303
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to