On Sat 25 Jan 2025 at 12:27:32 -0000, Michael van Elst wrote: > N.B. as this behaviour is rare for simple USB disks, a PQUIRK_START > for one or more WD Elements models might be all we need here. I don't know if it's only WD Elements disks, but I imagine they are fairly plentyful. I just did the experiment with reverting http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/scsipi/sd.c.diff?r1=1.335;r2=1.335.4.1;f=h and unconditionally call dkwedge_discover(). I did it on another machine but with the same disk and kernel version. [ 60.785171] umass1 at uhub0 port 4 configuration 1 interface 0 [ 60.785171] umass1: Western Digital (0x1058) Elements 25A3 (0x25a3), rev 3.10/10.21, addr 7 [ 60.785171] umass1: using SCSI over Bulk-Only [ 60.785171] scsibus1 at umass1: 2 targets, 1 lun per target [ 60.795168] sd1 at scsibus1 target 0 lun 0: <WD, Elements 25A3, 1021> disk fixed [ 60.795168] sd1(umass1:0:0:0): Check Condition on CDB: 0x00 00 00 00 00 00 [ 60.795168] SENSE KEY: Not Ready [ 60.795168] ASC/ASCQ: Logical Unit Is In Process Of Becoming Ready [ 60.795168] sd1: drive offline [ 70.325309] sd1: fabricating a geometry [ 70.355309] sd1: GPT GUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx [ 70.355309] dk0 at sd1: "xxxxxxxx", 262144 blocks at 4096, type: msdos [ 70.355309] dk1 at sd1: "xxxxxxxxx", 1572864 blocks at 266240, type: ffs etc As you can see it worked again. I can understand that if a disk is permanently offline, it makes no sense to poll for it to become online. At least something appears to be polling, since about 10 seconds after "sd1: drive offline" it continues with "sd1: fabricating a geometry". Note that the disk isn't just offline. It told us "Logical Unit Is In Process Of Becoming Ready". I think in that case it's probably worth to start the polling. Or whatever it is that triggers the wedge discovery 10 seconds later, I did not look into that. If there is polling going on, it is probably fine if that only tries for some limited time and not forever. -Olaf. -- ___ Olaf 'Rhialto' Seibert <rhialto/at/falu.nl> \X/ There is no AI. There is just someone else's work. --I. Rose
Attachment:
signature.asc
Description: PGP signature