From: "adr via 9fans" <9fans@9fans.net>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] Miller's 9pi image (rpi4) problems
Date: Sat, 19 Jun 2021 11:41:09 +0000 [thread overview]
Message-ID: <YM3X1ew1R+njl5zx@SDF.ORG> (raw)
In-Reply-To: <7e05610fb9e5e7aa0d5134ec124813ac@quintile.net>
> 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
next prev parent reply other threads:[~2021-06-19 11:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 18:59 adr via 9fans
2021-06-11 9:05 ` Richard Miller
2021-06-11 9:14 ` Richard Miller
2021-06-11 14:38 ` adr via 9fans
2021-06-11 16:00 ` Richard Miller
2021-06-11 16:13 ` adr via 9fans
2021-06-11 16:26 ` Richard Miller
2021-06-11 17:57 ` adr via 9fans
2021-06-11 18:18 ` Richard Miller
2021-06-11 18:50 ` a
2021-06-11 19:10 ` hiro
2021-06-11 21:07 ` adr via 9fans
2021-06-13 17:22 ` [9fans] " adr via 9fans
2021-06-17 15:05 ` [9fans] " Steve Simon
2021-06-17 19:48 ` adr via 9fans
2021-06-19 11:41 ` adr via 9fans [this message]
2021-06-19 12:44 ` Richard Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YM3X1ew1R+njl5zx@SDF.ORG \
--to=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).