Commit Graph

506 Commits

Author SHA1 Message Date
leo c81639d273 Change quirk entry: "FX320S", "", " q01" to: "FX320S", "", "q01". This
space does seem to matter...
1998-12-21 21:40:12 +00:00
gibbs c9eb836a6a Return ENODEV when the device capability check fails for MOVE and EXCHANGE
operations.
1998-12-17 22:28:07 +00:00
gibbs 1b30d7e440 Correct the definition of the changer device capabilities page. The
previous definition confused some reserved bytes for exchange capabilities.
1998-12-17 22:27:18 +00:00
bouyer 85078af6c4 Add a new quirk flags, "ADEV_NOSENSE", for devices that don't
handle properly the request sense command. Add <FX320S, , q01> as being
sense-unfriendly in the quirk table.
1998-12-17 13:05:05 +00:00
bouyer 945acd7834 Leave some room for the string-terminating char in temp. buffers.
Pointed out by Scott Presnell (thanks !).
1998-12-16 13:06:52 +00:00
bouyer c37bf0ccb4 Keep track of DMA errors, and downgrade the transert mode (UDMA ->DMA,
DMA->PIO) in case of 2 consecutive errors. Don't downgrade if the
PIO/DMA/UDMA modes were forced by a config flag.
1998-12-16 13:02:03 +00:00
mycroft 95aa0d0b7d Simplify the copy loops a bit. 1998-12-12 16:58:10 +00:00
mjacob 7f5c8f7db2 add Adaptec RAID units as devices that do not return geometry pages 1998-12-10 18:13:29 +00:00
thorpej 10d50739c7 Actually, restructure scsipi_wait_drain() slightly. 1998-12-08 00:26:22 +00:00
thorpej 8ebf1e8824 Remove xs_free_list; it no longer exists. 1998-12-08 00:20:16 +00:00
thorpej 624619a881 When closing, wait for pending xfers to drain before deleting the reference
to the adapter.
1998-12-08 00:19:27 +00:00
thorpej dcc5f32c2b When closing, wait for pending xfers to drain before unlocking the door,
and wait again before deleting the reference to the adapter.
1998-12-08 00:18:46 +00:00
thorpej 1ddd2ffec0 - When allocating a scsipi_xfer, add it to the specified device's
pending_xfers queue.
- When freeing a scsipi_xfer, remove it from the device's pending_xfers
  queue.  If the queue is empty, and SDEV_WAITDRAIN is set, wakeup
  those waiting for the queue to drain.
- Implement scsipi_wait_drain(), which waits for a device's pending_xfers
  queue to drain.
1998-12-08 00:17:21 +00:00
thorpej 98194169ea When allocating a device's scsipi_link, initialize the pending_xfers
queue.
1998-12-08 00:14:41 +00:00
thorpej 126dc6bfcc - Remove the "free_list" member from scsipi_xfer. Add "adapter_q" and
"device_q" TAILQ entries.  The former is for use by the adapter driver,
  as it sees fit.  The latter is for the scsipi middle layer to track
  pending xfers per device.
- Add a pending_xfers queue to scsipi_link, to track pending xfers per
  device.
- Grow scsipi_link's flags to int, and add SDEV_WAITDRAIN, to indicate that
  we're waiting for the pending_xfers queue to empty.
1998-12-08 00:13:58 +00:00
mjacob 337eb43541 NOMODESENSE for all Seagate ST19171- not just FC 1998-12-05 20:52:47 +00:00
mjacob 4b8245a959 Add a max_lun property to match with the max_target property. Shorten
max_target to int16.
1998-12-05 19:41:31 +00:00
mjacob 33fde1ad76 Eliminate the moreluns entry as it makes no sense for fat SCSI busses (e.g,
FC loops). Change the semantics of scsi_probedev so that it returns 1 if
you should continue probing at this target, else 0 for not.

Replace the blanket use of '7' with the use of the new sc_maxlun property
that is now gathered from HBAs. Allocate scsipi_link arrays based upon this.
Fix a really nasty and silly bug that has been there for a while where the
number of first level scsipi_link structures was one less than it needed
to be.
1998-12-05 19:39:23 +00:00
leo bea7038c02 The IOMEGA ZIP 100, J.03 does not grok LUN's. 1998-11-26 13:39:14 +00:00
drochner 3e38051bc5 in wdc_softc: access the per-channel data via a pointer array instead of
an array of fixed-sized channel_softc elements. This way IDE controllers
which more than 1 channel (pciide) can extend the channel data easily
for private needs.
To avoid the double dereference at runtime, change the argument of
wdcstart() to the channel data pointer instead of the array index.
1998-11-21 15:41:41 +00:00
thorpej 6a60e078ee Add adapter reference counting for SCSI and ATAPI devices. 1998-11-20 00:35:39 +00:00
thorpej baec89716d Add a reference to the adapter when the scsibus is opened, and delete it
when it is closed.
1998-11-19 22:28:20 +00:00
thorpej 54b52fb5f6 Add a reference to the adapter before probing the bus, and delete it
once we are done probing.
1998-11-19 22:25:56 +00:00
thorpej 3b068a6c78 Adapt to the new scsipi_adapter interface. 1998-11-19 21:53:32 +00:00
thorpej e87fa217f4 Add support for reference counting and enabling/disabling SCSI and
ATAPI controllers.  This will eventually be used for power management
of e.g. PCMCIA SCSI and IDE controller cards.
1998-11-19 20:08:52 +00:00
thorpej fd684d874c Protect against multiple inclusion. 1998-11-19 03:45:39 +00:00
bouyer 0af9847a2d The ATAPI-specific hack is not needed any more. 1998-11-17 14:46:26 +00:00
bouyer 0d0ff884e5 In atapi_wdc.c, issue a 'REQUEST SENSE' command when appropriate.
Return XS_SENSE when the full sense info has been retrieved, or
XS_SHORTSENSE if only the sense key was available (from the error register)
Make atapi_interpret_sense() deal with this, and call scsipi_interpret_sense()
for XS_SENSE. (XXX sd_interpret_sense() and the ioctl code needs to be made
aware of XS_SHORTSENSE too ! sense hanlding for these is now less broken for
devices that support 'REQUEST SENSE')
All the ATAPI devices I have access to seems to honnor the SENSE_REQUEST
command, but I suspect some ATAPI devices will not (althouh it's mandatory).
The code should be able to deal with this, but is untested ...
1998-11-17 14:45:39 +00:00
bouyer 00d93f776b Rename scsi_interpret_sense() to scsipi_interpret_sense() and move it from
scsi_base.c to scsipi_base.c. Rename the functions from scsi_verbose.c
too, and rename the file itself. Cleaup includes too (scsi_*.h should not
be #included in scsipi_*.h files, which are supposed to be
common to atapi and scsi).
1998-11-17 14:38:42 +00:00
thorpej ed473183ef Define the FORMAT UNIT command, and several related structures. 1998-10-30 02:07:15 +00:00
thorpej c0ba12768e Fix a sight open flags buglet pointed out by Matthias Scheler. 1998-10-20 22:26:04 +00:00
bouyer f6f8ba3446 Allow uk to attach at atapibus. 1998-10-19 12:28:52 +00:00
bouyer 5f723da8af Move the "warning: bcount value is %d after io" message in a WDCDEBUG_PRINT.
Ifdef DIAGNOSTIC, print the above message only if bcount is < 0.
1998-10-19 12:28:03 +00:00
thorpej d153ad6324 Some const poisioning. 1998-10-15 07:06:47 +00:00
thorpej 859b5d88a6 Protect kernel prototypes w/ #ifdef _KERNEL. 1998-10-15 05:11:52 +00:00
thorpej 2ebdceb3f7 Forward decl of struct proc. 1998-10-15 05:10:20 +00:00
bouyer e8322de657 Add a new drive flag, DRIVE_MODE, set when the drive properly reported its
PIO/DMA modes. Don't try a SET_FEATURE if it didn't report its mode.
1998-10-13 15:18:46 +00:00
bouyer 7545a59b8c In debug message, always print controller:channel:drive 1998-10-13 15:02:41 +00:00
bouyer ff0134b99f Properly separate DEBUF_XFERS and DEBUG_FUNCS: DEBUF_XFERS is for data
transfers (may be called often), where DEBUG_FUNCS is for setup functions
(not used for normal contitions).
1998-10-13 09:33:59 +00:00
bouyer da5d0a6f17 pciide.c: don't define WDCDEBUG, so it compiles on alpha. Correct a bogon
in the printing of DMA mode (piix3/4 only)
others: set the debug_mask to 0, so that debug messages are turned off by
default but can be easily turned on.
Reset drive_flags to 0 for unconfigured devices, so that they are ignored
later. For configured devices, reset state to 0 after probe/attach.
1998-10-13 08:59:45 +00:00
kim cd7e3136ad Use ETHERTYPE_ATALK instead of ETHERTYPE_AT. The former seems more common.
Our other constants also use "ATALK".

Added many new ETHERTYPE constants to sys/net/ethertypes.h, including the
ones from libpcap and tcpdump "ethertype.h" files.
1998-10-13 02:34:31 +00:00
enami 13b8051475 Make this file compile again with -DATAPI_DEBUG_PROBE. 1998-10-13 02:09:47 +00:00
bouyer 19fddaeeb5 Merge bouyer-ide 1998-10-12 16:09:10 +00:00
thorpej fe56f257b2 If the adapter returned XS_RESET and the xfer specifies a retry count,
attempt to reissue the command (which was destroyed by the bus reset).

Slightly modified from PR #6090, from Matt Jacob.
1998-10-10 03:42:53 +00:00
thorpej 16cf223098 Enforce open-for-writing on ioctls that change the bus's state.
Implement ioctl pass-through to the host bus adapter, allowing both
SCBUS* ioctls handled at that level and host adapter-specific ioctls
to be implemented.  Implement SCBUSIORESET as a pass-through.

Inspired by PR #6090, from Matt Jacob.
1998-10-10 03:33:01 +00:00
thorpej 45bf57f8a6 Garbage-collect the SCIOCREPROBE and OSCIOCREPROBE ioctls. This is a
bus-oriented command.  (How much sense does it make to open a device
to rescan the bus?!)
1998-10-10 02:35:30 +00:00
thorpej 1e2b6a99ed Implement the SCBUSIOSCAN ioctl. Rescans the bus for new devices. 1998-10-10 02:34:15 +00:00
thorpej e3fb94a7b4 Add the open/close/ioctl entry points for the SCSI bus, i.e. /dev/scsibusN. 1998-10-10 01:14:26 +00:00
thorpej dda872c16a Define an additional host adapter return code, XS_RESET, indicating
that the bus was reset while the command was pending.  The middle
layer may choose to retry the command.
1998-10-10 00:36:13 +00:00
thorpej 29d472f53d Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter.  This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
1998-10-10 00:28:28 +00:00