| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
'sc_link'. 'sc_link' is a field in the various device *_softc
structures, where the sc_ prefix was for 'softc'. Reduces potential
mental confusion. Newer code from down under was already using
'link'.
No functional change.
Prompted by bluhm@'s adventures in scsi. ok dlg@ jmatthew@
|
|
|
|
|
|
|
|
| |
things by renaming the field 'SLIST_HEAD(, scsi_link) sc_link' to
'sc_link_list' in struct scsibus_softc. Use 'sb' as the short name
for scsibus_softc variables.
Impetus from & ok bluhm@
|
| |
|
| |
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
| |
sys/atomic.h for atomic_setbits_int.
|
| |
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
|
| |
a whole bus, a target, or a specific lun on a target from the bioctl
and scsi_req paths.
i want to reuse this factored code for something claudio wants.
|
|
|
|
| |
generate a devid. if its an fc device this is good enough.
|
|
|
|
|
|
|
|
| |
kernel resumes normal (non-cold, able to run processes, etc) operation.
Previously we were relying on specific DVACT_RESUME op's in drivers
creating callback/threads themselves, but that has become too common,
indicating the need for a built-in mechanism.
ok dlg kettenis, tested by a sufficient amount of people
|
|
|
|
| |
matches the rest of the scsi code.
|
|
|
|
|
|
|
|
|
|
| |
paths are reflexive. It is now possible to fail part-way through a
suspend sequence, and recover along the resume code path.
Split DVACT_SUSPEND by adding a new DVACT_POWERDOWN method is used
after hibernate (and suspend too) to finish the job. Some drivers
must be converted at the same time to use this instead of shutdown hooks
(the others will follow at a later time)
ok kettenis mlarkin
|
| |
|
|
|
|
| |
ok krw@
|
|
|
|
|
|
| |
is causing problems when trying to boot sparc64 from an isp(4).
Verified to fix the sparc64/isp(4) regression by krw@; ok deraadt@
|
|
|
|
|
|
|
|
|
| |
These will be used to replace scsi_link's adapter_buswidth and luns
fields, but for now we stay compatible with existing SCSI adapter
driver conventions while I update them to set the scsibus_attach_args
fields directly.
ok dlg@
|
|
|
|
|
|
| |
needs either of them.
ok krw@
|
|
|
|
|
|
|
|
| |
that's ever used it, and it's long since been changed to use
DVACT_{QUIESCE,SUSPEND,RESUME} instead.
ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it
up a few weeks ago
|
|
|
|
|
|
|
|
| |
remove two of the remaining three uses of it. (softraid(4) still uses
it at the moment, so the field and its assignment in scsibusattach()
stay for now...)
ok krw@; feedback and "tenteiramen rejid"(!?) miod@
|
|
|
|
|
|
|
|
|
|
| |
whitespace into one. Written after Mitja showed a particularly unwieldy
attach line:
sd0 at scsibus0 targ 2 lun 0: <ATA, HTS721010G9SA00, MCZI> SCSI3 0/direct fixed t10.ATA_____HTS721010G9SA00_______________________________blahblahblah
ok/incorporating a suggestion from matthew@, krw@ likes it, dlg@ doesn't
feel strongly either way.
|
|
|
|
|
| |
by copying the adapters scsi_link. this way devices wont inherit the
adapters addresses on fc fabrics.
|
|
|
|
|
|
| |
it up by using the usb devices iSerial thing.
ok deraadt@
|
|
|
|
|
|
| |
enabled so people can get used to it.
ok deraadt@
|
|
|
|
|
| |
found by marco@
ok and tweaks deraadt@ krw@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the big change is how paths between mpath capable devices and the
kernel are managed.
originally the midlayer would steal the links to the devices and
hide them behind mpath. all the changes an adapter made to a link
(eg activate or detach), the midlayer had to test if it was an mpath
link and then call special mpath code to handle it.
the original code also assumed that all paths behaved the same, but
the reality is that different devices have different command sets
and behaviours. figuring out which behaviour to pick and prioritising
them is basically the same job autoconf does with match and attach.
rather than special casing mpath in the midlayer and reimplimenting
autoconf, this turns paths into actual device drivers with match
and attach routines. after they figure out if the path is active,
they then give it to mpath(4) to use as a backend.
i have written drivers for symmetric access devices (sym(4)) where
all paths to the same logical unit are as good as each other,
lsi/engenio arrays (rdac(4), and emc arrays (emc(4)).
the rdac and emc drivers only detect active paths at attach time,
the do not cope if the controller changes state unless you unplug
the path and plug it in again to retest the active state. they also
do not have support for directing array failover.
operating and hoplugging has been tested with mpii(4), fc and sas
mpi(4), and iscsi via vscsi (claudio did this too).
ok krw@ deraadt@
|
|
|
|
| |
ok krw@
|
|
|
|
|
| |
to be in the right address space.
help from matthew and krw
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
than 1 i/o active at once. This reduces the chances that concurrent
i/o's for such devices will confuse the device or the adapter code.
It also eliminates a reason for adapter code to maintain its own
queues.
Tweak all drivers that fake INQUIRY results to set the SID_CmdQue
flag, thus continuing to claim to be able to do tagged i/o.
Positive feedback from matthew@ and marco@ for an earlier version.
ok dlg@
|
|
|
|
|
| |
all from deraadt@
tested by me with hotplugged disks on mpi(4)
|
|
|
|
| |
ok krw@ marco@ matthew@
|
|
|
|
|
|
|
|
| |
DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations
to get ready.
Discussed quite a while back with kettenis and jakemsr, oga suddenly needed
it as well and wrote half of it, so it was time to finish it.
proofread by miod.
|
|
|
|
|
|
|
|
|
|
|
|
| |
device are going away, this will walk the pool and link queues and
wake up processes that are sleeping while waiting for an io or xs.
they will return NULL to the scsi_{xs,io}_get callers, which should
then check if they device is still alive. all other handlers that
are registered on the queues should be removed by their owners
before the destroy/shutdown funcs are called.
lots of help and discussion with matthew@
ok matthew@
|
|
|
|
|
|
|
|
|
| |
initialization strategy, rather than pretending to do user reference
counting. Previously, we would re-initialize the SCSI pool(9)s, which
had the fun consequence of causing sysctl(kern.pool.npools) to
infinite loop at IPL_VM.
ok krw@
|
|
|
|
|
|
|
|
|
|
|
|
| |
to interpret sense errors. This is initialized to the basic
interpretation routine, and specific scsi drivers (sd/st/cd) can
replace this with their own. While here kill EJUSTRETURN dance and
make more specialized interpretation routines directly call the
basic routine if desired.
Fixes by matthew@ to my first diff. Most original work by dlg@.
ok matthew@ marco@ dlg@
|
|
|
|
|
|
| |
sparsely populated buses.
ok dlg@, krw@
|
|
|
|
|
| |
they are supposed to do, or be silent.
ok mlarkin
|
|
|
|
| |
ok krw@, marco@
|
|
|
|
|
| |
since it is time to start transitioning away from the no-op behaviour.
ok oga kettenis
|
|
|
|
| |
runqueue. less is more sometimes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of optimistically trying to use a resource by executing an
xs and then failing when there's no room for it, this puts things
that want to use the hardware on a runqueue. as resources become
available on the bus then consumers on the runqueue are popped off
and guaranteed access to the resource.
the resources are generally "ccbs" in adapter drivers, so this
abstracts a way for the midlayer to get access to them into something
called iopools.
it also provides a callback api for consumers of resources to use:
the scsi_ioh api for things that want direct access to the ccbs,
and the scsi_xsh api for things that want to issue a scsi_xfer on
the bus. these apis have been modelled on the timeout api.
scsi_xs_get and therefore scsi_scs_cmd have been cut over to using these
apis internally, so if they are allowed to sleep then can wait on the
runqueue for a resource to become available and therefore guarantee that
when executed on an adapter providing an iopool that they will succeed.
ok krw@ beck@ marco@
tested by many including krw@ beck@ mk@ okan@ todd@
|
|
|
|
| |
of relying upon other headers bringing it in for you.
|
|
|
|
|
|
| |
runtime out into a separate state variable. only operate on the state bits
with atomic ops. introduce the DYING state so things that sleep can figure
out if they should keep going or not.
|
|
|
|
|
|
|
|
|
|
|
| |
the two issues affecting it last time are gone. the first, mishandling of
TRY_AGAIN_LATER is not relevant now that krw got rid of TRY_AGAIN_LATER.
the second, the misbehaving IBM disk was found to be a problem with siop
using ordered tags on most ops combined with the speed of the new code.
putting this in so we can move forward.
ok krw@ "commit please" marco@
|
|
|
|
|
|
|
| |
causing a weird problems on an alpha and also appears responsible for
isp(4) weirdness i havent had a chance to examine yet.
sigh, this makes me sad.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DEVID_CMP now evaluates to false if the devids are NULL.
some stupid devices dont understand luns, so we have code that
detects when the device at lun 0 also appears at luns 1, 2, 3, and
so on. this check is short circuited if the devices report different
devids. no devids isnt the same as different devids though.
found by okan@ on ciss (which currently ignores luns).
tested by krw@ marco@ johan@ okan@
ok krw@ marco@
|
|
|
|
|
|
|
| |
the fix for the NO_CCB breakage will follow shortly.
tested by krw@ marco@ johan@
ok krw@ marco@
|
|
|
|
|
|
|
|
|
|
| |
TRY_AGAIN_LATER. NO_CCB is a timer based mechanism that can trivially
be made to fail by running IO to two or more disks simultaneously. The
TRY_AGAIN_LATER thing is more subtle because it now is a permanent
failure instead of transient however this is much harder to hit because
something must have gone wrong before it hits.
ok deraadt krw miod
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
many luns, or the entire bus), dont report ENXIO as an error to the
caller. this broke autoconf when it tried to forcefully remove a
bus such as umass and it thought there was a failure.
this introduces a way for scsi hbas to call activate/deactivate on
a device based on its target/lun address via a call to scsi_activate().
they can then schedule the actual detach/attach in a thread later via
scsi_req_probe/detach.
the mpi changes tweak the sas event handling code to use these apis
to properly handle attaches and detaches of disks. event handling
is still disabled till i can make it less chatty.
umass breakage reported by form@
|