Age | Commit message (Collapse) | Author |
|
|
|
make code clearer.
Pointed out by brad@ and his friend llvm.
|
|
test period; i think 3 years ago the last bugs fell out.
ok otto beck others
|
|
both 'Fast Forward Space File = yes' and 'Hardware End of Medium = yes'.
Mostly taken from FreeBSD.
Constant prodding by robert@, testing actual backup and restore by
ajacoutot@.
|
|
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
|
|
like {cd,sd}{read,write}().
ok krw@, dlg@
|
|
ok krw@
|
|
Some stylistic tweaks after discussions with krw@ and deraadt@.
ok krw@; "Lovely" deraadt@
|
|
to be in the right address space.
help from matthew and krw
|
|
way st(4) does. Have both decline to open read-only devices for
anything but read-only access.
Suggestion to fail opens rather than individual i/o's from deraadt@.
Problem USB device found and donated by chefren, who also tested
diffs. Thanks!
ok dlg@ marco@
|
|
Noticed by Damien McGuckin. Thanks!
|
|
no point in keeping it around.
"i like this" thib@ (a while back); ok krw@ and oga@; reminder to
update the man page and tweaks jmc@
|
|
to deactivate transactions we are currently doing.
ok dlg
|
|
pointed out by matthew@
|
|
same change as sd.c r1.212. matthew@ pointed out that cd(4) and
st(4) would need the same change.
|
|
and more plausibly correct.
Tested by jsing@ and myself.
|
|
inside st_interpret_sense() and then exit without making sure it's
set back to <= xs->datalen.
Fixes 'done < 0; strategy broken' panics when un-tar'ing /cvs from
my ahci DAT tape drive.
ok dlg@ more-or-less-ok matthew@
|
|
rather than it being a pointer to something that needs to be allocated
at attach. since all these devices need a bufq to operate, it makes
sense to have it allocated as part of the softc and get bufq_init
to just initialise all its fields. it also gets rid of the possibility
that you wont be able to allocate the bufq struct during attach,
which is something you dont want to happen.
secondly, it consistently implements a split between wrapper functions
and the per discipline implementation of the bufq handlers. it
consistently does the locking in the wrappers rather than doing
half in the wrappers and the other half in the implementations.
it also consistently handles the outstanding bufq bq pointer in the
wrappers.
this hides most of the implementation inside kern_bufq.c. the only
stuff left in buf.h is for the bits each implementation needs to
put inside struct buf.
tested by thib@ krw@ and me
ok thib@ matthew@
no objection from krw@
|
|
cmd->opcode through the type casted command pointer rather than
through xs->cmd->opcode.
Requested by deraadt@; ok krw@.
|
|
set st->media_fileno and st->media_blkno before returning. Not sure
if this is needed or even really correct, but it's an unintentional
behavior change due to removing scsi_scsi_cmd().
ok dlg@
|
|
last bastardized sync and buf call through scsi_scsi_cmd(). Flatten
code to call scsi_xs_sync() directly for all commands.
Airplane typos shaken out by various.
ok dlg@ matthew@ deraadt@
|
|
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@
|
|
always explicitly sets bp->b_resid before calling biodone(), so these
are unneeded.
ok krw@
|
|
default disk-sorting one.
ok krw@
|
|
it defines. In some cases, this means pulling in uvm.h or pcb.h
instead, but most of the inclusions were just noise. Tested on
alpha, amd64, armish, hppa, i386, macpcc, sgi, sparc64, and vax,
mostly by krw and naddy.
ok krw@
|
|
same changes in cd and sd.
tested by and ok krw@
|
|
sure buf's are correctly completed.
Feedback from Matthew Dempsky.
ok dlg@
|
|
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@
|
|
Tested by myself and krw.
ok krw@
|
|
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.
|
|
one place for easier debugging and maintenance. No intended functional
changes.
ok dlg@
|
|
ok dlg@
|
|
ie, dont clear the WAITING flag when restarting the xxstart loops.
|
|
done in sd. Make names consistant across all three.
ok dlg@ tested (cd) & ok beck@
|
|
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@
|
|
much testing and debugging from krw@
his diff was a nice christmas present
|
|
This is needed for the addition of further suspend/resume actions.
Okay deraadt@, marco@.
|
|
as additional argument. This will allow intermediate layers between
scsi devices such as sd and scsi host adapters to take appropriate
action if necessary.
|
|
ok krw@
|
|
set. SCSI_SILENT mediates printing error messages only.
|
|
all defined to 4. Replace some magic number 4's with SCSI_RETRIES. Fix a
few lines that were now too long.
|
|
tape drives it is nice not to crash if one is detached. Basically use
a consistant mechanism modelled on sd to lookup devices and do the
device reference increments and decrements. Problem reported (PR#5811)
and fix tested by Jozef Hatala. Still some corner cases Jozef is
looking for but we'll fix those as discovered.
|
|
devices using 'sdopen'. PR#5810 from Jozef Hatala.
ok beck@
|
|
sys/dev/pci/pciide.c from naddy@
|
|
|
|
correct st_softc. Fixes 'mt rewoffl' panics, as reported on misc@ by
Jeff Ross and reproduced on my tape machine.
|
|
of pr 5635 confirms this works for him. similar diff authored by krw
who was unaware i wrote this and mailed it to Lucas...
|
|
|