Age | Commit message (Collapse) | Author |
|
Reported by Ashton Fagg via tech@. Thanks!
|
|
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.
|
|
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@
|
|
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.
|
|
struct scsi_rw_10.
ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
|
|
allow shrinking the names arrays.
|
|
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.
|
|
|
|
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.
|
|
hex value after named flags. Make flag name arrays NULL terminated rathar than
fixed size.
|
|
|
|
adapter_softc, adapter_buswidth) via link->bus rather than using
copies currently residing in the link.
|
|
than scsi_mode_header[_big] pointers to the same data.
Continues the umtamgling and simplification of the mode sense code.
CID 1491299
CID 1491297
|
|
rather than after the only invocation.
No functional change.
|
|
always sizeof(struct scsi_mode_sense_buf).
No functional change.
|
|
xs->timeout.
Just set xs->timeout to 20000 and drop the parameter.
No functional change.
|
|
If we want to sleep for a multiple of seconds we can do that without
involving lbolt.
This may cause some paths to sleep longer than they have on average,
as sleeping on lbolt wakes you up within one second, not after one
second. If this is a problem we will need to shorten the intervals
given to scsi_delay().
With insight from deraadt@.
ok krw@
|
|
Comment fixes.
|
|
not attempted.
|
|
pointers returning possible block descriptor values for block size,
block count and density. Most calls were passing "NULL, NULL, NULL"
since they did not care.
Call scsi_parse_blkdesc() directly in those few cases where one or
more of the values is of interest.
No intentional functional change.
|
|
always pass 0. i.e. never disable block descriptors, never accept
long LBA values.
|
|
scsi_mode_sense_page() and scsi_mode_sense_big_page() into
scsi_base.c.
They are just internal helper functions for scsi_do_mode_sense().
|
|
ok krw@, jca@
|
|
when
constructing the pointer to the page data. Remove now unneeded DISK_PGCODE().
Usual misc whitespace/modernization tweaks to functions being modified.
|
|
|
|
not the number of bytes that were available in the buffer.
|
|
obtained by scsi_inquire_vpd().
|
|
field names in sense mode structs.
|
|
'const' from the only two 'const int' instances.
|
|
|
|
|
|
Sets up some simplifications.
|
|
scsi_do_mode_sense(). Just update the values when valid data is
available. Initialize the variables passed to scsi_do_mode_sense() in
the one instance where they weren't already set.
Fixes issue with softraid crypto volumes on 4K-sector disks.
Found, fix tested, and ok tim@
|
|
scsi_all.h.
Add scsi_read_cap_10() and scsi_read_cap_16() functions to
scsi_base.c, i.e. move logic to do actual READ_CAPACITY commands out
of sd_read_cap() and sd_read_cap_16().
This will allow the READ_CAPACITY code to be reused by cd(4).
Return -1 for errors where the error code is just discarded, reducing
ENOMEM, ENXIO, EIO uses.
No intentional functional change.
|
|
|
|
|
|
|
|
|
|
|
|
Remove extraneous whitespace in SCSIDEBUG read capacity display.
|
|
of three line SCSIDEBUG chunks.
|
|
single invocation of the same. Clearer.
|
|
idiom for
the debug functions.
|
|
|
|
more intuitive locations.
|
|
openings, flags and quirks.
|
|
device claims to have more than the 36 bytes of SCSI2 data, issue a
2nd INQUIRY (under SCSIDEBUG!) to get up to 96 bytes of data.
Add some length sanity checks to debug output. Print VPD data under
SCSIDEBUG.
|
|
|