Age | Commit message (Collapse) | Author |
|
breaks at least one previously working device, as discovered by
naddy@. dlg@ confirmed other kernels also avoid attempting this
operation on usb disks.
ok dlg@ deraadt@
|
|
wasn't ok deraadt & dlg.
|
|
Tested by lots of people during c2k10
ok phessler krw thib
|
|
click upon suspend that my laptop with ahci(4) has.
ok dlg@, ok marco@ on an earlier iteration of this diff
|
|
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@
|
|
ok miod@, krw@
|
|
ok krw@, marco@
|
|
disk is now ready to handle I/O.
ok krw@ dlg@
|
|
SCSI_NOSLEEP flag on the xs when setting extra flags by oring them in
rather than assigning them.
from matthew dempsky
|
|
NULL'ness of the pointer to the actual page data. Fixes a NULL deref
when trying to set caching on my ASUS eeePC 1000HE's SD slot.
ok dlg@
|
|
requested by deraadt@
ok krw@ marco@
|
|
ioctl requests, and dont pass the proc pointers around for any ioctl
requests in scsi land at all. neither were used, so trim the fat.
ok krw@ marco@
|
|
in the great re-write. If the scsi device *_interpret_sense()
function returns 0 that means there was no error.
Fixes restore(8) problems seen on certain tape drives.
Found and fix tested by Percey Piper. Suggestions from Matthew
Dempsky. Thanks!
ok dlg@
|
|
NO_CCB.
if sd_buf_done is told that the adapter has no more ccbs via NO_CCB, this
sets a flag so sdstart doesnt try and queue more io straight away.
this fixes the lockups on ciss that halex and okan were experiencing after
the iopools code went in. it will fix any other hba that returns NO_CCB
too.
tested by me@, okan@, and halex@
ok krw@ okan@ halex@
|
|
Reintroduce bufqs. A few changes since it was backed out after some good
comments from dlg@.
No need for a separate bufq.h, keep all of in buf.h; As requested by kittens
and deraadt.
Only sd(4) and wd(4) for now. The rest of the drivers will be converted soon,
also other goodies like heuristics for sd(4) for selecting the bufq type and
the death of disksort() are forthcoming.
Tested on: i386, amd64, sparc64, macppc, loongson and alpha by myself and
phessler.
OK art@, beck@, kettenis@, oga@
|
|
No functional change.
ok dlg@
|
|
|
|
caches, and implement handling of these ioctls on vanilla scsi disks.
discussed with krw@, marco@, miod@, kettenis@.
krw@ has a diff to make the sd.c code prettier coming shortly.
|
|
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include
<sys/dkio.h> to the places that actually want and use the disk
ioctls.
this became an issue when krw@'s X build failed when he was testing
a change to dkio.h.
tested by krw@
help from and ok miod@
|
|
discovered by oga@
|
|
identifier, allowing the disk to be identified without relying on the
device name.
ok deraadt@ krw@ beck@ marco@ todd@
|
|
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@
|
|
one place for easier debugging and maintenance. No intended functional
changes.
ok dlg@
|
|
ok dlg@
|
|
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@
|
|
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@
|
|
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@
|
|
it when we hit NO_CCB). retried io would call unbusy twice before this
change.
noticed by deraadt@
|
|
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@
|
|
from dlg@, tweaking by me to make it compile.
ok dlg@
|
|
was to try to play dangerous games with tagged queuing.
ok marco@
|
|
|
|
|
|
down to the disk while a process is doing the same thing. this will avoid
some relatively minor io reordering from occurring.
discovered by krw@ during his long dark trek through the code. requested
by marco@
|
|
noticed by deraadt@ and miod@
|
|
SYNCHRONIZE_CACHE commands on device close.
ok dlg@ marco@
|
|
requested by krw@ after spending a week munging through my code.
|
|
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.
|
|
marco@ discovered my rewrite retried commands rejected by an adapter
from a timeout, which was trivially starved by normal io going to
disks. this diff allows an xs to be marked as XS_NO_CCB, which will
cause it to be returned to the device driver to be retried as part
of the normal io queue.
tested by krw@ marco@ johan@
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
|
|
boundary.
miod "go for it."
|
|
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@
|
|
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
|
|
have been going on. this appears to bring us back to stable state.
lots of testing by oga and ariane and my self.
|