Commit Graph

258 Commits

Author SHA1 Message Date
pgoyette
4eee9f144a Update scsiverbose module to use module_autoload() rather than module_load().
Load the module right before each attempt to use its features, and let the
module subsystem handle unloading.
2010-06-07 01:41:39 +00:00
pgoyette
1dad7e2286 Extract SCSIVERBOSE into a kernel module. The module can be builtin
by defining 'options SCSIVERBOSE' in the kernel config file (no change
from current behavior), or it can be loaded at boot time on those
architectures that support the boot loader's "load" command.

The module is built for all architectures, whether or not SCSI or
atapi support exists.
2010-05-30 04:38:03 +00:00
dyoung
c23dc9c098 For clarity of scsidevdetached(), rename some variables: sc ->
self, dev -> child, ssc -> sc.
2010-04-27 18:55:12 +00:00
dyoung
acb06354f1 Remove superfluous activation hooks. 2009-11-12 19:44:17 +00:00
rmind
40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
cegger
7cf2991222 struct device * -> device_t, no functional changes intended. 2009-05-12 14:38:26 +00:00
cegger
d16a259fe3 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 13:15:24 +00:00
dyoung
3098a4fbed Detach atapibus(4), scsibus(4), cd(4), and sd(4) during shutdown.
Destroy sd->sc_callout in sddetach().  Delete some dead code in
cddetach().
2009-04-07 18:35:17 +00:00
drochner
a3df0dfc03 split device/softc for scsibus 2008-07-16 18:50:58 +00:00
hannken
773658bf7e The Intel SCA backplane "ESG-SHV" does not support logical units. 2008-07-03 13:22:31 +00:00
tsutsui
887a89aa5c Use device_lookup_private() rather than using cd_devs[] directly to get softc.
XXX maybe we should change a type of cd_devs[] in struct cfdriver
    from (void *) to device_t.
2008-06-08 18:18:33 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cegger
13783bfd7e use aprint_*_dev and device_xname 2008-04-05 15:47:00 +00:00
ad
0664a0459b Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
2008-01-04 21:17:40 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
bouyer
786853f62a The SEAGATE ST318203LSUN18G announces DT only capabilitie although it also
supports ST. Because of this the HBA doesn't initiate sync/wide negotiation,
so add PQUIRK_CAP_SYNC | PQUIRK_CAP_WIDE16 for this drive; fix
problem reported by Havard Eidnes.
2007-02-17 17:01:29 +00:00
christos
d048649c18 Add a quirk for Initio drives (from Rhialto) 2006-11-30 17:39:25 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos
144543fb61 add missing initializer 2006-09-03 05:18:03 +00:00
bjh21
8009229e9b The Fujitsu drive in my A540 supports sync transfers but apparently
doesn't advertise this in INQUIRY.  It makes it nice and obvious with
SDTR, though, so add it to the list.
2006-08-29 20:40:23 +00:00
thorpej
07c30f824f Use device_private(). 2006-03-30 16:09:28 +00:00
thorpej
78ffd948be Replace device_locators() with device_locator(), and use it. 2006-03-29 06:00:46 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
tsutsui
d0c28ccd6d Fix typo (FALLTHOUGH -> FALLTHROUGH). From Jeff Ito. 2005-11-26 13:54:18 +00:00
drochner
e6a178f21f kill a number of autoconf submatch functions which follow the
standard scheme:
if (<configured> != <wildcard> && <configured> != <real>)
	then fail
else
	ask device match function

This is handled by config_stdsubmatch() now.
2005-08-25 22:33:18 +00:00
drochner
fa3cb84d62 replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
2005-08-25 18:35:38 +00:00
christos
a984bbf91a - remove bogus casts
- add more const
2005-05-30 04:25:32 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
reinoud
f323bc537c Backing out changes to clean up scsipi. I was pointed out there were
problems i hadn't seen. To prevent lossage i'd decided to back off all
changes and let them be reviewed on tech-kern.
2005-02-01 00:19:34 +00:00
reinoud
b220d67a3e Part of the cleanup of sys/scsipi's use of types; rename all u_int* to
uint* and change the u_long's to uint32_t's where possible. Note that the
iocl definitions/hooks have to be ulong (or u_long) or they'll bomb out.
2005-01-31 23:06:41 +00:00
thorpej
be6339d21a Use ANSI function decls and make use of static. 2004-08-21 21:29:39 +00:00
drochner
6ea832578d Use the new autoconf functions to rescan busses and detach devices
on user request.
This duplicates the functionality provided by a private ioctl
interface (accessible through scsictl(8)), but in a more generic way.
2004-08-18 11:50:59 +00:00
mycroft
849d423c4e Whoops. Swap the order of the delref() and the config_pending_decr(). 2004-08-12 14:36:46 +00:00
mycroft
f1b2ffd886 Hold a reference to the adapter until scsibus_config() has been called. This
avoids an extra enable/disable cycle on removable controllers (i.e. PCMCIA).
2004-08-10 15:46:44 +00:00
bouyer
0bb75b5f94 Ops, don't return before the end of the function.
Catched by enami tsugutomo.
2004-08-06 09:27:43 +00:00
bouyer
178586b7f4 scsi_kill_pending(): don't kill the commands in periph_xferq here.
The controller is handling them, calling scsipi_done() here will end up in the
xfer being scsipi_done()'ed a second time when it completes in the controller
code. In addition, the way the loop was done here would end up in an infinite
loop, because the channel kernel thread needs to run to remove a command from
this queue.

scsibusdetach(): scsipi_done() all commands from periph_xferq. The controller
is already gone, and these commands will never complete.
Shut down the channel (which will cause the kenrel thread to exit) after
detaching the childs, as they will need the kernel thread for
scsipi_wait_drain().

Fix kernel hang or deadlock when detaching devices (either by scsictl detach
or unplug) with active commands.
2004-08-05 19:45:13 +00:00
bouyer
ece6a039c7 Add a drive with broken tagged queuing support. From Jim Faulkner.
Fix PR kern/23815.
2004-03-12 23:00:40 +00:00
mycroft
289d7af075 Remove PQUIRK_CDROM. It is definitely not correct -- witness that no other
OS needs such a hack, and the same drive works fine on Suns -- and is much
more likely to be a bug in the host adapter driver (which is corroborated by
the PQUIRK_NOLUNS).
2004-02-22 07:26:15 +00:00
matt
2f05a561da Remove a quirk I added for a Hitachi drive. 2003-10-10 18:04:46 +00:00
mycroft
f96fe2cc8a Don't print junk if an INQUIRY fails (usually with an ILLEGAL REQUEST due to
an unused LUN).  Also, if the qualifier says the LUN is non-existant, don't
try to attach a device here.
2003-09-18 05:06:53 +00:00
mycroft
af0c320925 Some devices really want INQUIRY to be the first command they receive. Also,
the result of the extra TEST UNIT READY was being ignored anyway.  So, I wrote
it, I nuke it.
2003-09-12 16:39:25 +00:00
mycroft
5118c3e1e9 Set up the blank fields in the INQUIRY buffer *before* executing the command --
because we can't really rely on the "additional length" being correct (any
more?).  Fixes some problems with devices showing up as "<, , >".
2003-09-10 05:35:50 +00:00
mycroft
f733d9708b Remove NOMODESENSE quirks for Iomega drives -- they're totally unneeded. 2003-09-09 03:57:57 +00:00
mycroft
1c4e2cf723 Delete the NOMODESENSE quirks for Maxtor USB hard drives, as these are no
doubt resolved (and were never actually needed in the first place -- someone
was let out without supervision).
2003-09-09 03:01:27 +00:00
mycroft
06fca94595 Exorcise PQUIRK_NODOORLOCK. 2003-09-09 02:37:55 +00:00
mycroft
5ad03464f5 There is absolutely no sense in having a PQUIRK_NODOORLOCK entry for a
non-removable device.  Nuke it.
2003-09-08 23:43:05 +00:00
mycroft
a599f64320 If maxlun>0, automatically set PQUIRK_FORCELUNS, rather than using quirk
table entries.
2003-09-08 19:57:29 +00:00
mycroft
648730c4cf Do a START UNIT only if the TEST UNIT READY reports that the device is not
ready.  This avoids gratuitously starting the motor on floppy and CD-ROM
drives, and eliminates the need for the audio playing test in cdopen().

Therefore, also remove PQUIRK_NOSTARTUNIT.
2003-09-08 18:51:33 +00:00