Age | Commit message (Collapse) | Author |
|
will always be some scsi_xfer structures around. Hopefully that means the
pagedaemon can actually write out pages to swap if we're out of physical
memory.
ok krw@
|
|
mtx_init() ensures the mutex' lock_object has static storage duration.
This makes it safe to re-enable WITNESS with stack-based mutexes.
OK bluhm@ miod@
|
|
the ddb command 'show witness' to succeed without panicking.
Leaving witness enabled on these mutexes saves a pointer to
struct lock_type on the stack which gets clobbered resulting
in a panic in witness_ddb_display_descendants().
okay miod@
|
|
sufficient to get sdgetdisklabel() to correctly set d_type to
DTYPE_FLOPPY in the default disklabel.
installboot(8) in particular likes to know it is dealing with a
floppy.
ok miod@
|
|
iostat(8)
|
|
feedback and ok jmc@ miod, ok millert@
|
|
anyone. No need to also set d_flags to 0.
|
|
any attention for some time.
ok otto@ as part of larger diff
|
|
Also remove unneeded includes of <sys/poll.h> and <sys/select.h>.
Some addenda from jsg@.
OK miod@ mpi@
|
|
ok krw@
|
|
From millert@
|
|
true. This enables the discovery and probing of other LUNs the
target has to offer.
Add uk* to amd64 RAMDISK_CD so such devices are configured.
Allows bsd.rd as well as bsd[.mp] to boot on Oracle Cloud amd64
instances.
Issue reported by Ryan Kavanagh and Scott Nicholas via bugs@.
Original diff and much subsequent testing by Scott. Thanks!
ok dlg@ jmatthew@
|
|
the SDEV_OWN_IOPL flag check.
Ambiguous/inconsistant code pointed out by Coverity #1515557.
|
|
a partially configured struct scsi_link.
Problematic code path found by jungle Boogie was plugged
by r1.249.
|
|
Avoids a potential panic.
|
|
Problem reported by jungle Boogie via bugs@
|
|
fallen at one of the subsequent hurdles of scsi_probe_link()
don't partially replicate scsi_discard_link(). Just
call scsi_discard_link(). It now handles such partially configured
scsi_link's.
|
|
compare pointer to NULL instead of 0.
No functional change.
|
|
|
|
Ditto config_detach() if link->device_softc is NULL.
Currently just some extra paranoia, but will allow simplification
of exit logic in scsi_probe_link() and other future uses of
scsi_detach_link() on partially configured links.
No intentional functional change.
|
|
|
|
|
|
flag setting bits of creating a scsi_link into scsi_alloc_link().
Shrinks the bloated scsi_probe_link() a bit, makes it possible to
eventually create a useable scsi_link even when scsi_probe_link()
can't attach a device.
Developed from part of a diff submitted by Scott Nicholas via
tech@.
|
|
LUNs available to a target into scsi_get_target_luns(). Clearer
code and prep for future changes.
No functional change.
Extracted from a larger diff submitted by Scott Nicholas via
tech@.
|
|
emitted verbiage, and show INQUIRY header & vendor info early so
humans can more easily determine what scsi_probe_link() will
do.
No functional change outside SCSIDEBUG.
|
|
code to make it so.
Pointed out by clang when prodded with SCSIDEBUG.
|
|
|
|
ok visa@ a long time ago, ok krw@
|
|
this fixes a bug in bacula where the catalog was not properly kept
up-to-date if a tape was in a drive becuse its source slot was
unknown
based on code from FreeBSD; ok krw@
picker 0: sense: <0x00/0x00> voltag: <:0> avoltag: <:0> source: <>
slot 0: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1168L1:0> avoltag: <:0> source: <slot 0>
slot 1: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1187L1:0> avoltag: <:0> source: <slot 1>
slot 2: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1184L1:0> avoltag: <:0> source: <slot 2>
slot 3: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1195L1:0> avoltag: <:0> source: <slot 3>
slot 4: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1037L1:0> avoltag: <:0> source: <slot 4>
slot 5: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1038L1:0> avoltag: <:0> source: <slot 5>
slot 6: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1166L1:0> avoltag: <:0> source: <slot 6>
slot 7: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1167L1:0> avoltag: <:0> source: <slot 7>
slot 8: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1180L1:0> avoltag: <:0> source: <slot 8>
slot 9: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1186L1:0> avoltag: <:0> source: <slot 9>
slot 10: <ACCESS> sense: <0x00/0x00> voltag: <:0> avoltag: <:0> source: <picker 0>
slot 11: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1182L1:0> avoltag: <:0> source: <slot 11>
slot 12: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1181L1:0> avoltag: <:0> source: <slot 12>
slot 13: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1196L1:0> avoltag: <:0> source: <slot 13>
slot 14: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1169L1:0> avoltag: <:0> source: <slot 14>
slot 15: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1197L1:0> avoltag: <:0> source: <slot 15>
slot 16: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1165L1:0> avoltag: <:0> source: <slot 16>
slot 17: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1199L1:0> avoltag: <:0> source: <slot 17>
slot 18: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1189L1:0> avoltag: <:0> source: <slot 18>
slot 19: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1185L1:0> avoltag: <:0> source: <slot 19>
slot 20: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1198L1:0> avoltag: <:0> source: <slot 20>
slot 21: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1039L1:0> avoltag: <:0> source: <slot 21>
slot 22: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1035L1:0> avoltag: <:0> source: <slot 22>
slot 23: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1188L1:0> avoltag: <:0> source: <slot 23>
drive 0: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1183L1:0> avoltag: <:0> source: <slot 10>
|
|
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.
|
|
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.
|