NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: USB regression in 10.1



On Sun 26 Jan 2025 at 15:56:46 -0000, Michael van Elst wrote:
> Index: sd.c
> ===================================================================
> RCS file: /cvsroot/src/sys/dev/scsipi/sd.c,v
> retrieving revision 1.337
> diff -p -u -r1.337 sd.c
> --- sd.c        28 Sep 2024 08:57:47 -0000      1.337
> +++ sd.c        26 Jan 2025 15:50:23 -0000
> @@ -1091,12 +1091,13 @@ sd_interpret_sense(struct scsipi_xfer *x
>         }
>  
>  
> -
> +#if 0
>         /*
>          * If the device is not open yet, let the generic code handle it.
>          */
>         if ((periph->periph_flags & PERIPH_MEDIA_LOADED) == 0)
>                 return (retval);
> +#endif
>  
>         /*
>          * If it isn't a extended or extended/deferred error, let
> 
> Since the handler tests specifically for a device at startup,
> it shouldn't impact devices that stay offline due to e.g. missing
> media (and it works fine with my SD card readers).
> 
> It would be interesting if this helps with the WD elements drive
> and if it creates side effects for e.g. SCSI or Fibre Channel
> controllers.

It works perfectly for me, even better than the earlier patch. This
time it shows the fake geometry, for instance.

[    68.177145] umass1 at uhub0 port 4 configuration 1 interface 0
[    68.177145] umass1: Western Digital (0x1058) Elements 25A3 (0x25a3), rev 3.10/10.21, addr 7
[    68.177145] umass1: using SCSI over Bulk-Only
[    68.177145] scsibus1 at umass1: 2 targets, 1 lun per target
[    68.187142] sd1 at scsibus1 target 0 lun 0: <WD, Elements 25A3, 1021> disk fixed
[    68.187142] sd1: waiting for pack to spin up...
[    73.187220] sd1: waiting for pack to spin up...
[    78.197291] sd1: fabricating a geometry
[    78.197291] sd1: 3725 GB, 3815415 cyl, 64 head, 32 sec, 512 bytes/sect x 7813969920 sectors
[    78.207291] sd1: fabricating a geometry
[    78.227291] sd1: GPT GUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
[    78.227291] dk0 at sd1: "xxxxxxxx", 262144 blocks at 4096, type: msdos
[    78.227291] dk1 at sd1: "xxxxxxxxx", 1572864 blocks at 266240, type: ffs
...

I think I had those "waiting for pack to spin up..." messages with
earlier NetBSD versions as well, but I only now realise that they were
gone for some time.

-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



Home | Main Index | Thread Index | Old Index