Age | Commit message (Collapse) | Author |
|
automatic reading of disklabel on attach.
ok deraadt@ miod@ krw@
|
|
|
|
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@
|
|
about the device rather than the contents of whichever disklabel
was read. Tweak whitespace in sd.c to make the code appearance
consistant.
|
|
ok deraadt@ krw@ matthew@
|
|
to deactivate transactions we are currently doing.
ok dlg
|
|
src/sys/dev/ata/atascsi.c r1.92 solves the problem that my scsi_link
change tickled.
tested by josh elsasser who reported the problem in pr6470
deraadt@ is letting it in again so it can get widespread testing
|
|
disks in atascsi.
as reported in pr6470
|
|
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.
|
|
scsi device can have in flight. instead of counting users of openings on
the bus by taking away from the openings value, count the number of
pending commands on the bus in a new pending variable.
this lets us know how many outstanding commands there are. we can then use
that to make sure that all commands a device has generated get completed
before detaching the device. this helps avoid resource leaks and use after
frees.
tested by me on pci ehci/umass, fc mpi, and sas mpi.
tested by jakemsr on cardbus ohci umass.
it found issues in sas mpi which were fixed as a result of this diff.
ok krw@
|
|
embarrsssment.
discovered by okan@
|
|
need to calculate and save. Not used anywhere in tree.
|
|
rather than 'sc_params'. No change to .o file.
|
|
512 == DEV_BSIZE units and variable-sized physical device 'sectors'.
I hope this reduces confusion a bit more. No change to .o files.
ok for intent miod@, with tweak.
|
|
a device thats now gone, or from being on the list of pending io when
the device is actually detached.
found and fix tested by jakemsr@
"go for it" jakemsr@
|
|
verifying that the resulting device is present on the disklist. This
avoids a race whereby the disk driver can be accessed as soon as the
softc has been allocated, but before the disk has completed
initialisation and has called disk_attach() (up until this point
dk_label is still a null pointer).
Cut cd(4), sd(4) and wd(4) across to disk_lookup(). All callers of
disk_attach() need to be tested and cut over in due course.
ok deraadt@ krw@
|
|
disk_attach() is called by the device driver. We will be building on
this shortly.
ok deraadt@ krw@
|
|
just a target/lun.
|
|
all from deraadt@
tested by me with hotplugged disks on mpi(4)
|
|
traversal code to suspend/resume
ok oga kettenis blambert
|
|
(which creates a potential race against cd detach)
discussed with krw and dlg seperately
|
|
ok krw@ marco@ matthew@
|
|
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@
|
|
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.
|
|
There is a bit of concern that this workq can race against a detach
happening... any solutions from the peanut gallery?
|
|
can expect to be used
|
|
cmd->opcode through the type casted command pointer rather than
through xs->cmd->opcode.
Requested by deraadt@; ok krw@.
|
|
ok miod@; "please go ahead" jsing@
|
|
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@
|
|
Bogus chunks pointed out by matthew@ and miod@. No cookies for
marco@ and jasper@.
ok deraadt@ miod@ matthew@ jasper@ macro@
|
|
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@
|
|
been put back in the pool. Fixes Daniel Dickman's ses device.
ok matthew@ deraadt@
|
|
xs->datalen and reset xs->data to NULL. This prevents a spurious
attempt to setup (dma map, etc) and possibly attempt data tranfser.
In line with what Linux and FreeBSD do as far as I can tell.
Reduces the delay before my DVD starts playing its movie.
Idea to also set xs->data to NULL from matthew@.
"No objection" matthew@
|
|
ok matthew@
|
|
and update atascsi(4) to make use of it. (Other HBAs will be updated
post-release.) Should allow for use of SATA drives with >2^32 LBAs.
ok deraadt@, dlg@, krw@
|
|
of a separate struct which the ioh struct includes for no good reason
anymore. just put the vars directly in the ioh.
this removes this useless abstraction.
ok krw@ matthew@
|
|
confusion. Fixes at least my usb DVD reader and The Blue Tick.
|
|
scsi_inquire_vpd(). scsi_inquire_vpd() oddness noted by jsg@ after
report of macppc problems by kili@.
|
|
Symptoms noted by oga@. actual bug spotted by dlg@
|
|
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@
|
|
-Wuninitialized.
Silly typo in my first diff noticed by oga@ and krw@; 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@
|
|
with UMASS devices. Fixes scsi_scsi_cmd() removal regression.
ok dlg@
|
|
which should never happen anyway. Fixes scsi_scsi_cmd() removal
regression.
ok dlg@
|