Age | Commit message (Collapse) | Author |
|
other stuff ive been doing in here. everything that needs protection
inside the midlayer and the scsi device drivers (sd, cd, etc) uses
mutexes now.
this pushes splbio out of the midlayer. splbio is only taken before
biodone is called now.
ok beck@ marco@ krw@ deraadt@. theyre all terrified, but they all
say if we're going to do then now is the right stage of the dev
cycle.
|
|
the disk as soon as it gets any from the block layer, this now registers
a callback for when a resource becomes available on the bus.
ok krw@ beck@ marco@
tested by many including krw@ beck@ mk@ okan@ todd@
|
|
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@
|
|
pages. this if the first step in figuring out if disks use a different
physical block size compared to the logical block size they present to the
operating system.
|
|
void. Use XS_NO_CCB error in the scsi command (xs) to report the
NO_CCB condition. Eliminates all SUCCESSFULLY_QUEUED and COMPLETE
confusion and untangles the midlayer from the adapter a bit more.
Eyes and some fixes by miod@
There may be some compile issues on little used (i.e. I don't have
any) drivers but the change is mechanical and thus easy to remedy.
ok dlg@
|
|
ok.
Stops cdio(1) from printing bogus TOC info.
ok marco@ beck@
|
|
what to tell the user. Silences cdio and cdrecord while probing
media.
ok dlg@ marco@ deraadt@
|
|
Should quieten booting again.
And thus ends n2k10.
|
|
one place for easier debugging and maintenance. No intended functional
changes.
ok dlg@
|
|
ok dlg@
|
|
data when SCSIDEBUG is set, irrespective of SCSI_SILENT. Tweak
output a bit.
Noticed in output generated by todd@.
|
|
scsi_xs_show.
No functional change.
|
|
initialized. Bring back panics on non-NULL done and cookie fields,
but put inside DIAGNOSTIC.
ok dlg@
|
|
until we figure out why.
|
|
is dying. if so, return ENXIO.
this should make detach of devices during scsi attaches less dangerous.
idea (and the first version of this diff) ok deraadt@
ok krw@
|
|
cannot. panic if theyre set before scsi_xs_sync is called.
question raised by and ok krw@
|
|
is dlg@'s fault.
ok dlg@
|
|
Pointed out and original diff by jcs@.
|
|
|
|
ie, dont clear the WAITING flag when restarting the xxstart loops.
|
|
us to loop forever.
follow sdstart through to to an adapters scsi_cmd handler and assume that
handler returns NO_CCB to enjoy the bug in full.
ok kettenis@ krw@ beck@
|
|
commands.
Noticed & fix tested by halex@.
ok dlg@
|
|
done in sd. Make names consistant across all three.
ok dlg@ tested (cd) & ok beck@
|
|
st's queue manipulations. i.e. ensure b_actb is correctly updated as the
queue becomes empty or has an i/o requeued on it.
Tested on claudio@'s backup crashing box.
ok dlg@ beck@
|
|
one thread will be grabbing xs's at a time and dequeuing work, but avoids
a race between notification there is work to do and exiting the loop
releasing the xs's.
Fixes problem noticed by claudio where usb disks would hang with the new
minty dlg midlayer.
ok krw@, dlg@, tested by claudio@
|
|
logic to eliminate FALLTHROUGH craziness.
ok marco@ dlg@
|
|
in the drivers just before calling scsi_done().
ok dlg@ beck@
|
|
rather than generating a fluffy printf.
|
|
by setting flags around the loop. there is a race which can prevent
necessary work being completed by any of the currently running instances
of xxstart.
the caveat with the removal of this code is because multiple xxstarts can
be running at the same time they can cause io reordering, but that is less
of a problem than no io.
found by and fix tested by claudio@
debugged with krw@ claudio@ beck@ deraadt@
|
|
scsi_xs_put.
|
|
rather than panic.
ok krw@
|
|
it when we hit NO_CCB). retried io would call unbusy twice before this
change.
noticed by deraadt@
|
|
the adapter will call scsi_done on it.
|
|
and do the appropriate sleeps, retries, error processing, and finally
returns an errno style value to the caller.
this cuts scsi_scsi_cmd, the ioctl code, sd_flush, and scsi_inquiry over
to scsi_xs_sync.
ok krw@
|
|
|
|
|
|
think this is the last chunk of code using a buf pointer in the scsi_xfer
now.
this has not been tested due to a lack of hardware anywhere. if there are
problems please report them as soon as possible.
ok krw@ miod@
|
|
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.
|
|
much testing and debugging from krw@
his diff was a nice christmas present
|
|
ok marco@ guenther@
|
|
defines it.
|
|
|
|
cd.
|
|
this brings it in line with the new midlayer changes.
mostly borrowed from sd(4) changes.
tested by krw@ and me
ok krw@
|
|
snuck back in.
Noticed by kettenis@.
|
|
from dlg@, tweaking by me to make it compile.
ok dlg@
|
|
was to try to play dangerous games with tagged queuing.
ok marco@
|
|
the midlayer.
|