Re: Drop READ(6) / WRITE(6) support in da/cd
- In reply to: Warner Losh : "Drop READ(6) / WRITE(6) support in da/cd"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 10 Dec 2023 18:28:26 UTC
On Sat, Dec 9, 2023 at 8:44 PM Warner Losh <imp@bsdimp.com> wrote: > I'd like to move the default CDB size in the da driver from 6 to 10. I'd > like to make the driver never send READ6 commands (and likely the cd driver > too). > > READ10 was an extended command in X.131-1986 (SCSI-1) required for any > computer with self configuring software. It became mandatory in X.131-1994 > (SCSI-2), 4 years before CAM entered the tree. It's been required for any > device larger than 2GB. We purposely disable it on all USB and Firewire > attached devices. Its support has been strongly encouraged as an > alternative to READ6 since SBC (1997), with threats to withdraw READ6 once > certain system software had been updated. It became obsolete in SBC-4 > (2019).The days of minimizing a couple of bytes in the CDB have long since > passed. We have a lot of quirks to disable these commands for both da and > cd (as well as blanket disabling them for RBC devices). > > In short, it's a lot of hassle that we go to, and there doesn't seem like > there's any benefit. A quick search of the mailing list shows the > overwhelming majority of traffic are the problems it causes. I can find no > place where the benefits of using it are explained (though maybe I missed > something). > > So, I'd like to remove it before 15, making 10 the minimum CDB for I/O > commands (READ/WRITE,etc). we'll still send 6 byte commands for TEST UNIT > READ, MODE SENSE, etc. > > While, as luck would have it, I still have some 100MB and 200MB drives, I > have not HBA that has the right kind of interconnect to read them, so I > can't even experiment to see if these old MAXTOR drives from the 80s > support READ10... > Some additional points after looking at some old manuals on bitsavers and reading other people's code: 1) Linux uses READ10 or bigger by default (though they still have code to allow READ6/WRITE6). 2) OpenBSD sends READ6/WRITE6 only to SCSI1 devices (and omits atapi and usb devices) 3) NetBSD will send read6/write6 commands, but provides overrides for SIMs to disable them (much like we do for USB and Firewire). 4) A survey of half a dozen manuals for old SCSI drives show that Seagate, Maxtor and Quantum drives larger than about 30MB support READ10/WRITE10 (called Read extended in their manuals). Only an Apple 20MB external drive from 1985 didn't support it. Sony SCSI CD from 1989 supports READ10. All of the above suggests that we can just remove support entirely and nobody would notice... SCSI disks were in the 75MB-200MB range when FreeBSD 1.0 came out, and were mostly > 500MB by the time CAM went into the tree. SCSI CDROMs weren't exactly rare, but they weren't super common and have largely disappeared except as USB attached devices where we disable READ6 already anyway. I noticed this while testing a new I/O tracing program I've written... > Comments? > > Warner >