Age | Commit message (Collapse) | Author |
|
|
|
history, nuke all mentions of XS_NO_CCB and the #define.
2006 - 2017. R.I.P.
ok kettenis@ inferred ok dlg@
|
|
the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.
most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.
the manpage and subr_pool.c bits i did myself.
ok tedu@ jmatthew@
@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);
|
|
'sc_link'. 'sc_link' is a field in the various device *_softc
structures, where the sc_ prefix was for 'softc'. Reduces potential
mental confusion. Newer code from down under was already using
'link'.
No functional change.
Prompted by bluhm@'s adventures in scsi. ok dlg@ jmatthew@
|
|
things by renaming the field 'SLIST_HEAD(, scsi_link) sc_link' to
'sc_link_list' in struct scsibus_softc. Use 'sb' as the short name
for scsibus_softc variables.
Impetus from & ok bluhm@
|
|
ok mpi@ millert@
|
|
|
|
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
Pointed out by Kor son of Rynar (sic) when trying to test
some debug code.
ok matthew@
|
|
when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.
now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.
so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.
ok krw@
|
|
ok krw@, jsg@
|
|
ok mpi@ kspillner@
|
|
tested on mpi(4) sas.
|
|
should be safe to call the midlayer io path without the biglock now.
|
|
|
|
the kernel biglock. the plan is to have the midlayer assume its
running without the biglock, but that it cant call adapters or
devices without taking the biglock first.
this diff just wraps the calls to the adapter iopool get and put
handlers up in the biglock.
this is safe now because of kettenis' commit to src/sys/kern/init_main.c
r1.120. ive been running this in various places since early 2011.
|
|
a whole bus, a target, or a specific lun on a target from the bioctl
and scsi_req paths.
i want to reuse this factored code for something claudio wants.
|
|
use it should cause a fault.
based on discussion with miod@
|
|
outside scsi_base.c.
this will allow adapters to restrict access to iopool resources
based on some state, and then kick the pending requests on the pool
when the state comes good again.
ive been avoiding this for a long time, but it is the least worst
way to deal with some uses of XS_NO_CCB.
discussion with kettenis@ helped me decide this was right.
|
|
|
|
to cd.c and call it cd_size(), like sd_size() lives in sd.c.
Tweak some daddr_t variables to u_int64_t on the way, when they are
for disk sector numbers, not 512-byte block numbers.
|
|
the wrappers around handling of pending work, theyre not semaphores.
names from tedu@
ok krw@ guenther@
|
|
other things scsi_sem_enter. the things protected by this do as
much work as they can, so they only need to be told to try again
once.
this isnt a semaphore anymore (and probably never was) so there's
a name change coming too.
|
|
on or off the queues so things calling them can tell if something
is or isnt going to happen.
|
|
other than scsi_base.c can use them.
|
|
test period; i think 3 years ago the last bugs fell out.
ok otto beck others
|
|
devices which advertize themselves as non-SCSI2-aware, since this command
appeared in the SCSI-2 specification.
This makes the Insite Floptical work when connected to a controller which
correctly handles spontaneous deselection (which happens when a non-zero
lun on said floptical device is addressed), such an esp(4) but not wdsc(4).
This is step one of getting Floptical devices working on SGI systems.
feedback and ok krw@
|
|
scsi_init_inquiry(). cut the compiled INQUIRY code over to it.
ok and tweaks from krw@
ok matthew@
|
|
to be in the right address space.
help from matthew and krw
|
|
Prompted by dlg@'s tape library trying to report a failure to thread
a media (0x53, 0x04).
|
|
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
|
|
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@
|
|
just a target/lun.
|
|
cmd->opcode through the type casted command pointer rather than
through xs->cmd->opcode.
Requested by deraadt@; ok krw@.
|
|
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@
|
|
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@
|
|
scsi_inquire_vpd(). scsi_inquire_vpd() oddness noted by jsg@ after
report of macppc problems by kili@.
|
|
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@
|
|
with UMASS devices. Fixes scsi_scsi_cmd() removal regression.
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@
|
|
flags which I perpetrated when I paid insufficient attention to
dlg@'s original diff.
Belatedly tested by marco@ and myself. Bad marco@. Bad krw@.
ok marco@
|
|
that get XS_NO_CCB until retry limit exceeded. On to getting rid
of XS_NO_CCB.
ok matthew@ "so be it" dlg@
|
|
the READ CAPACITY(10) values already retrieved. Creates the possibility
to look at other interesting READ CAPACITY(16) data for future
consideration.
ok matthew@ marco@ deraadt@
|
|
matthew@ who won't be home until late.
ok matthew@ & tedu@.
|
|
stack and malloc/free them instead. First stirrings of the tide of
de-stacking to come.
Feedback, fixes and ok matthew@ & tedu@.
|
|
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@
|