Age | Commit message (Collapse) | Author |
|
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@
|
|
scsibusdetach wasnt doign it properly, so we would be leaking on detach in
some cases.
now, with the introduction of mpath, the scsi_link structures can
represent a path to a mpath node as well as normal devices. this
intercepts the device activate entrypoints and sends them to mpath
if it it in use rather than assuming a device is always there. the
scsibusdetach change ensures that detach always ends up handling
the mpath node case too.
hotplug bus functionality (eg, usb) tested by form@
|
|
boundary.
miod "go for it."
|
|
uses of it in our tree.
ok krw@ deraadt@
|
|
previously a devid was a structure containing its type, length, and
a pointer to the actual devid value. this has been changed so a
devid is a header followed immediately by the memory making up the
id value. this allows the header and its value to be allocated
together.
devids are now reference counted, so multiple things (eg, the mpath
node handlers and the various scsi_link structures) can share the
same allocation safely. this also frees devids when scsi_links go
away, which was previously not done.
if mpath is enabled, then print the devids out as part of the devices
attach line.
|
|
This is needed for the addition of further suspend/resume actions.
Okay deraadt@, marco@.
|
|
|
|
|
|
with it which became extremely annoying with what mpath wants to
do.
the major change is a new interface for submitting scsi commands.
previously the only way for drivers like sd, cd, st, etc to push
commands onto the hardware was via scsi_scsi_cmd(). the problem
with scsi_scsi_cmd is that it doesnt tell the caller if the command
failed, was queued, or completed unless you shoved a buf down with
it. this is important for mpath which wants to know what the physical
path to the device did so it can report it back to the midlayer
which called it.
this provides a new api which lets drivers like cd/sd/st/mpath etc
allocate an xs, fill it in, and provide a completion routine which
the midlayer will call with the state of the command when it is
finished with it. the caller is then responsible for freeing the
xs.
from the hba side of thing, the return code from the scsi_cmd
entrypoint is largely ignored now, and it is now always the
responsibility of the hba driver to call scsi_done when it has
completed the io, rather than returning COMPLETE and expecting the
midlayer to do it for you.
i have emulated scsi_scsi_cmd on top of this new api so existing
users of it will continue to work. sd(4) has been reworked to use
the new api directly to both demonstrate its use and test that the
new api actually does work.
this diff was mostly written in a day at f2k9. thanks to miod for poking
through hba drivers to help mitigate against fallout from the change to
the COMPLETE semantic. this has been reviewed by krw who didnt spot
anything wrong.
thanks to dave del debbio for testing.
ok deraadt@
|
|
|
|
|
|
|
|
do it (but doesnt preclude them using it internally).
discussed with krw@ miod@ and deraadt@
|
|
|
|
OK dlg@
|
|
midlayer that a scsi device has appeared or dissapeared. the midlayer will
queue an event and run it in the system workq (which has process context)
to handle the attach or detach.
|
|
errnos. Note that the error strings are being ignored, since we long ago
decided to not spam the console, and there is no other nice way to use the
errors (without changing the ioctls to pass it back)
The errno is now useful, since we can pass b_error from failing IO up, and
the drive can decide how to use that
ok miod
|
|
shows the physical topology of your system.
|
|
structures by things other than autoconf.
|
|
so we can guarantee that any of the paths we push the io down later will
work.
with help from a discussion from beck and krw
|
|
is worth noting that the device on mpath will persist even if all the paths
behind it have gone away. returning the paths will allow operations to work
against the device again.
|
|
thinks they could be available via multiple paths. those stolen
devices are then made available via mpath(4).
this is the minimum amount of code to implement the stealing. it
is generally broken and very brittle, so it is currently disabled.
it is going in so i can work on it in the tree.
|
|
we need this to get some clue as to which ports are which on an fc fabric.
requested by and ok deraadt@
|
|
have been going on. this appears to bring us back to stable state.
lots of testing by oga and ariane and my self.
|
|
|
|
one by tedu@. It doesn't do anything smart yet, it just uses
plain old disksort. we also keep the old method of queueing bufs
since some miods have crazy MD drivers that need some love.
ok beck@, art@
tested by many on many archs.
|
|
device, as some devices will be stalled by the request.
ok krw@
|
|
|
|
as additional argument. This will allow intermediate layers between
scsi devices such as sd and scsi host adapters to take appropriate
action if necessary.
|
|
use to identify devices of interest.
ok deraadt@
|
|
anything. we represent that in the midlayre by moving the initiator id out
of the buswidth. let's not print it in that case.
ok deraadt@ kettenis@ krw@ marco@
|
|
ok miod@, dlg@
|
|
a size to them, because the original author of this stuff obviously
didn't grok pointer arithmatic.
ok krw@, tedu@, marco@, kettenis@
|
|
on apple laptops.
The eject button will only eject the disc when it's not used by
anything.
ok miod@
|
|
and newer versions of gcc all object to.
ok miod@ krw@ beck@
|
|
ok deraadt@
|
|
#ifdef _KERNEL
|
|
userland processes should not see all the kernel components.
|
|
ok krw@
|
|
commented out, remove it. Unifdef TFS while there.
ok marco@ krw@
|
|
set. SCSI_SILENT mediates printing error messages only.
|
|
days. if you really want it still you can fetch it via disklabel(8).
ok krw@ deraadt@
|
|
ok krw@ marco@ miod@ deraadt@
|
|
|
|
INQUIRY options don't spam dmesg during probe. Seen by miod@ and kettenis@
for SCSI CD's.
ok miod@
|
|
|
|
a vpd page that uniquely identifies a device no matter what bus topology or
addressing was used to find it.
we have a workaround for old school scsi devices that do not differentiate
between luns. if the inq data for high luns is the same as the inq data
for lun 0, we assume it is one of these buggy devices.
the problem with this is that things like SANs present multiple
volumes as luns and they all have the same inq data. if you wanted
to present more than one volume to openbsd you would only ever see
the first one.
devices give us a mechanism to differentiate between luns, so now
i do get all my volumes attached in openbsde.
review and feedback by krw@ marco@ testing by todd@
|
|
|
|
keeps it on the stack till we attach a driver to it. then it copies
the inquiry data int the scsi_link struct.
this diff uses the scsi_link struct instead of the stack for that data,
which makes the inq data for users of the scsi_link struct available much
earlier during device probe.
review and feedback from both krw@ and marco@
|
|
to all the scsi midlayer code into a local variable.
ok krw@ marco@
|