Age | Commit message (Collapse) | Author |
|
Treat INQUIRY data with fewer than SID_SCSI2_HDRLEN bytes as invalid.
Use only INQUIRY data returned by the device.
Get all available INQUIRY data (up to sizeof(struct scsi_inquiry_data))
even when SCSIDEBUG is not set.
Tweak returned INQUIRY data so additional_length field does not point
past end of returned data when available data is greater than
sizeof(struct scsi_inquiry_data).
Missing dmafree() spotted by gnezdo@. ok jmatthew@.
|
|
scsi_xfer. Will replace various equivalent functions/hand-rolled chunks, none of
which were setting xs->resid.
|
|
Unused since mpi@ removed sd_shutdown() in 2014.
|
|
member of 'struct scsi_xfer' has always been pointed at the 'struct scsi_generic
cmdstore' member of the same instance. So nuke 'cmdstore' and remove the '*'
from cmd. Take the address of cmd as required by the various casts.
No intentional functional change.
luna88k test by aoyama@, sparc64 test by jmatthew@
Identification of 2009's last *cmd use and ok jmatthew@
|
|
if/else. Just do it once before the if.
Move the SC_DEBUG() documenting entry into sdopen() to before the various error
bailouts.
|
|
READ(16)/WRITE(16) to access the last sectors
Fixes (at least) large 512E (a.k.a. emulated 512-byte sector) devices plugged
into overly helpful USB <-> ATA/ATAPI bridges. Which can tell you they are using
512-byte sector addresses but spontaneously/silently interpret
READ(10)/WRITE(10) commands as using 4K sector addresses/sizes.
Diagnosed and fix tested with James Cook. Thanks!
|
|
|
|
scsi_link.
|
|
scsi_link's inqdata.
|
|
when the request is unsupported.
So check mode sense(6) and mode sense(10) results for valid headers before
passing the results back.
Avoid overwriting any error that was returned.
ok jmatthew@
|
|
to replace various uses of '5' when calculating the amount of data in the
INQUIRY response. Matches up more naturally with SID_SCSI2_ALEN.
Also use to fix SCSIDEBUG display of INQUIRY responses to show correct count of
bytes received/available.
|
|
magic numbers. As the nearby comment says '< 2 is obsolete. >2 is reserved'. So
0x2 is just right.
|
|
struct scsi_rw_10.
ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
|
|
allow shrinking the names arrays.
|
|
and let cdstart() use it if the requested i/o is unable to fit into a READ(10).
Certainly better than silently truncating the i/o into a READ(10)/WRITE(10).
|
|
|
|
|
|
are expected to fit into a 4-byte field.
|
|
have the caller assign it to xs->cmdlen. Pass in xs->cmd instead of xs. A
slightly cleaner API that provides the potential of detecting and reacting to a
failure to create the desired command.
|
|
xs fields to a more convenient location, shrinking upcoming diffs. Nuke some
Captain Obvious comments.
|
|
|
|
favour of simply using the device's claimed SCSI level of support. Except of
course for ATAPI/USB devices which often don't claim anything. Keep assuming
they are at least SCSI-2. Use consistant tests in
sdminphys/cdminphys/sdstart/cdstart.
|
|
and was always checked in concert with SDEV_ATAPI. Just rely on SDEV_ATAPI and
SDEV_UMASS in all but the one place sd(4) where SDEV_ONLYBIG is set
independently of SDEV_ATAPI/_UMASS.
ok jmatthew@
|
|
pointless timeout_set(sc_timoeut) and timeout_del(sc_timeout) calls and the
sc_timeout fields themselves.
|
|
|
|
|
|
SDEV_S_DYING instead. Makes it clear that the scsi_link and the [cd|sd|st]
device always agree on their state.
|
|
the bus. Use SLIST_FOREACH_SAFE() rather than 'while (!SLIST_EMPTY())'' as there
is a condition which would cause scsi_detach_link() to return without removing
the scsi_link from the SLIST.
|
|
contents thereof.
Compile tests by martjn@ (alpha), visa@ (sgi) jmatthew@ (sparc64) aoyama@
(luna88k)
|
|
XS_NO_CCB purge of 2017.
Nuke pointless ISSET()/CLR() checks and the #define's.
|
|
make the three variants more similar and easier to understand. Ensures
consistent error checks and eliminates pointless adapter_buswidth checks when
processing the list of scsi_links.
|
|
it.
Prepares for removal of #include <scsi/scsi_debug.h> from scsiconf.h as soon as
the alpha tester digs out from hurricane to compile last untested files.
|
|
nestled together. Rename scsibusprint() to scsibussubprint() since it is used
with scsibussubmatch().
|
|
|
|
leading whitespace. Rename some local functions.
|
|
scsibus_softc pointers around.
|
|
hex value after named flags. Make flag name arrays NULL terminated rathar than
fixed size.
|
|
|
|
driver successfully compiles on one or more of amd64, i386, hppa.
|
|
fields to struct scsibus_attach_args. Nuke the struct scsi_link *
(saa_sc_link) in scaibus_attach_args.
Explicitly initialize each field in scsibus_attach_args variables.
|
|
adapter_buswidth, adapter_softc) from struct scsi_link to struct
scsibus_attach_args.
Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
|
|
adapter_softc, adapter_buswidth) via link->bus rather than using
copies currently residing in the link.
|
|
initialize the scsi_link's on the bus. After sucking this information
out of the "prototype" link provided by the scsibus_attach_arg, no
need to keep a pointer to that prototype.
|
|
(ahc(4) and qlw(4)) can just compare the values of the "bus" member
directly.
A slightly different path to the same result that matthew@ traversed
in his work culminating in scsiconf.h r1.146.
|
|
points to the inquiry data contained in the struct scsi_link pointed
to by the other member, sa_sc_link.
|
|
2010.
Part of matthew@'s reverted scsiconf.h r1.146.
|
|
2015 in favour of ql*(4).
|
|
immediately before initializing the only field in the struct.
|
|
aassigned to adapter_buswidth to indicate the adapter is not a target
on the bus.
ok dlg@ as part of a larger diff.
|
|
'adapter_target' to a value greater than or equal to
'adapater_buswidth' to allow all possible targets to be probed.
Add SDEV_NO_ADAPTER_TARGET (0xffff), a value guaranteed to
be greater than or equal to the u_int16_t 'adapter_buswidth'.
ok dlg@ as part of a larger diff.
|