Commit Graph

867 Commits

Author SHA1 Message Date
junyoung cc537c2f3a Add option NEW_BUFQ_STRATEGY, a new buffer queue strategy for better
system responsiness under high disk I/O load.

OK'ed by Juergen Hannken-Illjes.
2002-10-18 14:31:10 +00:00
thorpej 60adad59bd Define a "scsi_core" attribute. Make the "scsi" attribute depend on
"scsi_core".  Make all the files previously selected by the "scsi"
attribute selected by the "scsi_core" attribute.  Give the "scsibus"
device the "scsi_core" attribute.
2002-10-09 20:23:56 +00:00
soren 98ec436df3 As in scsiconf.c, don't print the numberic device type in the attach message. 2002-10-04 18:58:45 +00:00
soren 3a89aff59e Slightly simplicy the SCSI device attachment message:
- Use the plain words 'disk' and 'tape' instead of 'direct' and 'sequential'.
- Media status will be printed in the frontend, so don't bother with it.
- Don't bother printing the SCSI version, which is fixed these days, or the
  numberic device type.
2002-10-04 17:53:33 +00:00
soren af7ec6d1b2 Pass on indication of absent media in the general case as in the optical
device case.
2002-10-04 03:43:06 +00:00
soren 25674469e6 Leave error printing to the callers of scsipi_size(). 2002-10-04 03:41:50 +00:00
thorpej b75a007d9f Add trailing ; to CFATTACH_DECL. 2002-10-02 16:51:16 +00:00
thorpej 239b192ca3 Use CFATTACH_DECL(). 2002-09-30 23:07:07 +00:00
thorpej bf97c13c6c Declare all cfattach structures const. 2002-09-27 20:41:46 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
jmc c7258354f0 Force the initial probes to happen within the newly forked off kthread.
This eliminates problems where the underlying interrupt handler isn't the
specific layer calling scsipi_complete() for a given scsi transaction.
This avoids deadlocks where the kthread that called the autoconf routines
to configure a scsibus shouldn't be the one put to sleep waiting on a
scsipi_complete (only the scsibus's kthread should be doing that).

To avoid jitter this will force the scsibus's to probe in the order they
run through autoconf (so machines with multiple bus's don't move sd* devices
around on every reboot).
2002-09-19 08:31:05 +00:00
chs 128b037bfc remove all vesitages of dk_establish(). 2002-09-18 01:46:23 +00:00
chs f0beff44d2 recognize HP ScanJet 4c.
add a catch-all case for other HP scanners.
remove a local version of atoi() in favor of strtoul() from libkern.
2002-09-14 21:41:24 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
hannken 815491c0b3 Remove the old device buffer queue interface.
Approved by: Jason R. Thorpe <thorpej@wasabisystems.com>
2002-08-30 15:43:36 +00:00
bouyer 36969486b0 Add yet another broken sony cdrom. This one, in addition to broken LUN
handling, has broken sync negotiation. Also add PQUIRK_NOWIDE to be safe.
Fix PR kern/17773.
2002-08-02 08:00:36 +00:00
wiz 645df36eff Spell '[Rr]ight' correctly. From Jim Bernard. 2002-07-26 14:11:34 +00:00
wiz 5db23d2c5d enouth -> enough. 2002-07-26 01:00:39 +00:00
mjacob 0bf3a73821 Fixes kern/17573: correctly describe the bfi && physical sector defect list
formats.

Obtained from PR submitter.
2002-07-24 23:45:03 +00:00
matt 7a023d8f5f Add a quirk for a HITACHI driver (CAP_SYNC|CAP_WIDE16). 2002-07-23 21:10:16 +00:00
bouyer 4a33970e19 Do PIO transfers for len < 4 bytes. From Matthias Drochner in private mail. 2002-07-22 20:31:56 +00:00
hannken 4d121bd094 Convert to new device buffer queue interface. 2002-07-22 14:59:43 +00:00
hannken 7de36862a8 Rename bufq_init() to bufq_alloc().
Add bufq_free() to remove a buffer queue.
Avoid MALLOC while holding a spinlock.

From Chuck Silvers.
2002-07-21 15:32:17 +00:00
hannken 10ff5e6607 Implement a new device buffer queue interface.
One basic struct, a function to setup a queue with a specific strategy and
three macros to put buf's into the queue, get and remove the next buf or
get the next buf without removal.

The BUFQ_XXX interface will be removed in the future.
The B_ORDERED flag is not longer supported.

Approved by: Jason R. Thorpe <thorpej@wasabisystems.com>
2002-07-16 18:03:17 +00:00
mjacob 787aeb4081 As per a discussion on tech-kern a while back- honor retries for
XS_SELTIMEOUT and XS_TIMEOUT errors- but only do so if the device exists
already.

Devices that are being probed won't be found via periph_lookup, so we can
use that to find if a device exists for the purposes of honoring retries.
2002-06-05 00:15:33 +00:00
bouyer 622fdb1fe6 Doh, the return of scsipi_lookup_periph() was meant to be assigned to
periph.
periph was used uninitialised, and caused a panic when the scsibus is reset
with siop or esiop, and possibly others HBA drivers.
2002-06-03 16:17:57 +00:00
drochner eafdf8c95d add translations for two ASC/ASCQs which occur before
the DVD player's region code is dealt with
2002-05-28 16:40:03 +00:00
drochner 259cb04e6f put multisession offset code into a separate function and initialize
the p_cdsession field of partition 'a' in the default disklabel
2002-05-27 16:42:30 +00:00
bouyer 29270413af If the data len if not a multiple of 2 bytes, force PIO mode. DMA can't
deal with such xfers, and can wedge the system with some controllers.
It's a bug to request such xfers for ATAPI, but as the request may come
from userland we have to protect against it.
2002-05-18 14:49:55 +00:00
mjacob 16fa96cfc8 Give XS_DRIVER_STUFFUP a case all by itself. 2002-05-17 18:56:05 +00:00
thorpej 64c6407d7b Garbage-collect the empty-for-years "su" device. 2002-05-16 02:59:57 +00:00
thorpej f4cc1100b0 Don't use a 2-dimensional array for the channel's periph table. Instead,
hash the target and lun together and use a hash table.  This will be
necessary in order to support very large (64-bit) LUN number spaces.
2002-05-16 02:54:20 +00:00
bouyer 445778d624 The number of sector is unsigned long, so use %lu to print it. 2002-05-15 13:01:27 +00:00
bouyer 3d5ee1e719 Change PQUIRK_CAP_SYNC to set PERIPH_CAP_SYNC aslo for devices that
improperly claim to only support DT clocking.
Add a PQUIRK_CAP_WIDE16 quirk.
Add a quirk for IBM DXHS36D SCSI disk (claims to only support DT).
2002-05-15 11:43:22 +00:00
bouyer 36ce07cc3b scsipi_print_xfer_mode(): PERIPH_CAP_DT is an equivalent of
(PERIPH_CAP_SYNC | PERIPH_CAP_WIDE16) here.
2002-05-15 11:19:38 +00:00
bouyer f23186dae7 Don't return an error for "Not Ready To Ready Transition (Medium May Have
Changed)" and "Power On, Reset, or Bus Device Reset Occurred" senses, if
we're trying to open the device.
2002-05-06 13:43:57 +00:00
bouyer df3d2c7ac3 If periph->periph_callout is already active, don't freeze the periph again:
scispi_periph_timed_thaw() will be called only one time anyway.
2002-05-05 15:16:30 +00:00
thorpej ca83c89dd4 A statement must follow a label. 2002-05-05 06:01:28 +00:00
bouyer b3f8d22993 Back out previous. It has issues with multiple dumps to one tape using
/dev/nrstx, as pointed out by Matthew Jacob.
My problem is probably related to mt using /dev/nrst0 instead of /dev/enrst0
by default.
2002-05-03 20:41:17 +00:00
bouyer 1d5fb5d90e If we get a Unit Attention Not Ready To Ready Transition (medium may have
changed) sense, and the periph was not open, then ignore the error.
2002-05-02 12:36:23 +00:00
bouyer cd3578d7ef More copyright fixes, pointed out by Thomas. Thanks ! 2002-04-23 20:41:13 +00:00
bouyer 15c40f8b5b The IBM drive I have here supports DT, but claim version 3 only.
So check for version 3, not 4 when looking for DT support.
This should be safe as these bits are reserved for older devices, they
should be set to 0 when not supported.
2002-04-23 17:28:43 +00:00
bouyer d77c3b3d84 Add the Parallel Protocol Request message. 2002-04-23 09:46:51 +00:00
bouyer e49057af19 Report SPC-2 features (DT clocking, quick arbitration and selection,
information unit transfers) though periph_cap.
2002-04-23 09:09:55 +00:00
joda 518cc55c27 Maxtor D040H2 also can't modesense 2002-04-15 12:40:28 +00:00
bouyer e5727031fb Implement mstohz() as discussed on tech-kern, and use it in SCSI drivers
to convert xs->timeout to callout() parameter.
2002-04-05 18:27:45 +00:00
bouyer 4940346b10 Add a chan_name to struct scsipi_channel, holding the channel's name.
Set this to dv_xname for scsibus and atapibus.
Set the name of the kernel thread to chan_name instead of controller's
name:channel number (so that we can use this name for controller-specific
threads).
2002-04-01 20:37:41 +00:00
martin 3adb535884 Don't clear the adapt structure of the attaching channel - this nukes
all function pointers passed in from the adapter driver.

This partly fixes PR 13480, i.e. the FREECOM CD driver works now in pcmcia
adapters.

The remaining issue (timing problems with slow cards and cardbus bridges)
is probably the cause of several other PRs too.
2002-03-31 14:36:59 +00:00