Commit Graph

634 Commits

Author SHA1 Message Date
enami
a2bf544200 Allocate the variable `inqbuf' in scsi_probedev on stack rather than
statically.  Since this function may called for another luns immediately,
allocating it statically doesn't make sense and may cause race condition
as pointed out by PR#9749.
2000-04-19 04:49:50 +00:00
enami
c560e9a77b When killing pending xfers on device detach, we can't expect scsipi_done
to remove all xfers from the pending queue.  It removes only xfers for
asynchronous transactions.  So, simply loop over all pending xfers
with calling scsipi_done and wait xfers to drain.  Addresses PR#9703.
2000-04-03 03:37:33 +00:00
enami
ae8fb348b3 Fold long line. 2000-04-03 01:40:51 +00:00
augustss
b6cee95eb7 Let the device thet gets an atapibus attached specify how to kill pending
transfers by giving a function pointer.
The old method always called wdc specific code.
2000-04-02 23:38:19 +00:00
augustss
7246364f07 With SCSIVERBOSE, only print sense data if there actually is a problem. 2000-04-02 17:58:17 +00:00
augustss
7797648425 Change the initial field in struct ata_atapi_attach and struct scsipi_link
slightly to allow scsibus and atapibus to attach to the same device.
Furthermore, only attach a scsibus when the bus type is BUS_SCSI.
2000-04-02 17:25:52 +00:00
enami
28d49dce4e Add missing protect from disk interrupt while calling scsipi_free_xs. 2000-04-02 03:05:55 +00:00
bouyer
26f6c9a9cf - DMA code cleanup: pciide_dma_finish() doesn't stop/unload the current DMA op
if an IRQ was not detected, unless the force flag was given. Use this to
  detect if the IRQ was for us (closer to shared IRQ for controllers which
  don't have their own IRQ handler in pciide.c) and to poll for DMA xfer.
  Also makes the timeout recovery code simpler.
- ATAPI cleanup: don't call controller-specific functions from atapiconf.c
  (wdc_*), so that it's possible to attach an atapibus to something else
  than a wdc/pciide (Hi Lennart :).
  Overload struct scsi_adapter with struct atapi_adapter, defined
  as struct scsi_adapter + atapi-specific callbacks. scsipi_link still points
  to an scsi_adapter, atapi code casts it to atapi_adapter if needed.
  Move atapi_softc to atapiconf.h so that it can be used by the underlying
  controller code (e.g. atapi_wdc.c).
  Add an atapi-specific callback *atapi_probedev(), which probe a drive
  in a controller-specific way, allocate the sc_link and fills in the
  ataparams if needed. It then calls atapi_probedev() (from atapiconf.c)
  to do the generic initialisations and attach the device.
- While I'm there merge and centralise the state definitions in atavar.h.
  It should now be possible to use a common ata/atapi routine to set the
  drive's modes (will do later).
2000-04-01 14:32:22 +00:00
augustss
fc4d9ff403 Get rid of register declarations. 2000-03-30 00:00:55 +00:00
augustss
356d681927 Add ukactivate&ukdetach so uk devices can be detached. 2000-03-29 18:11:44 +00:00
simonb
9ff7681a33 Don't need to include <sys/conf.h> here. 2000-03-29 03:43:31 +00:00
augustss
fc39329153 Change a printf() to a panic() since the kernel is going to die on the next
line anyway.
2000-03-28 17:24:46 +00:00
augustss
439812ba3b In attach message, spell it "target" not "targ", as in the locator. 2000-03-27 11:45:42 +00:00
thorpej
fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
enami
68e028fe82 Cancel requested command if controller isn't active. 2000-03-20 22:57:00 +00:00
sjg
281c45ba53 Added NOLUNS quirk for YAMAHA CRW8424S 2000-03-19 10:33:26 +00:00
soren
11bd453515 scsiprint() is needed even without scsibus'es, so move it to scsi_base.c . 2000-03-17 11:45:49 +00:00
soren
82ad0bf745 atapiprint() does not exist. 2000-03-17 11:23:23 +00:00
fvdl
d025f5705e Add a couple of defines/aliases for messages. 2000-03-15 02:02:37 +00:00
soren
95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
martin
112137cd30 Added Artec/Ultima A6000C scanner to the quirks table (no LUNs). 2000-03-13 09:56:26 +00:00
augustss
ce6f0100c1 Remove extra \n in attach message. 2000-03-12 19:16:48 +00:00
thorpej
d788e0dbad Make sure to initialize xs->req_sense_length (to 0). This appears to be
a historical leftover, and very few drivers actually look at it.  But the
PCI `ncr' driver does, and if this field is not initialized to its default
value, that driver will fall over flat on its face when it attempts to get
sense data from a target.
2000-02-28 17:44:20 +00:00
jdolecek
86ae2ab1fc Add ADEV_NOSENSE quirk for HITACHI CDR-7730.
Patch sent by Hume Smith in kern/9489.
2000-02-28 09:46:25 +00:00
tls
08ef0cfe07 revert previous change 2000-02-22 21:09:50 +00:00
mjacob
64fa8aa0d6 remove SES driver 2000-02-22 17:43:57 +00:00
mjacob
296fbeed2a Patches from msouth@scruz.net to handle QIC 3220 (HP T20). 2000-02-21 05:11:09 +00:00
mjacob
a3a129e6f5 Oops...I forgot that the GEM-2 chip is so lame that if you don't tell
it exactly the right amount of data to transfer for WRITE BUFFER/Global
it will stay stuck in command phase (causing a command phase overrun).
2000-02-20 21:30:44 +00:00
mjacob
1c4521f1da add ses.h to list of includes 2000-02-20 07:39:41 +00:00
mjacob
c5f8d33f85 minor spelling change 2000-02-20 07:38:48 +00:00
thorpej
fe551f0e64 Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle.  Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.
2000-02-07 20:16:47 +00:00
drochner
e81d123f6d try to dtrt for sector sizes <DEV_BSIZE (at least, don't divide by 0) 2000-01-25 20:42:33 +00:00
drochner
05261ccb43 include "rnd.h" explicitely since the size of sd_softc depends on it
(sd_scsi.c and sd_atapi.c missed it, leading to random memory corruption)
2000-01-22 16:35:25 +00:00
mjacob
91c88eb52f PR/9271 (from srp@zgi.com)- recognize (indirectly) HP4000s via density
code and do the right QIC type dance (1 FM @EOT, fixed block size).
2000-01-22 04:29:58 +00:00
thorpej
dc59bc1db3 Update for sys/buf.h/disksort_*() changes. 2000-01-21 23:39:55 +00:00
mjacob
04b750733c slight change for platform independence 2000-01-21 21:19:57 +00:00
mjacob
7faf9d32ea cleanup SAF-TE attachment code 2000-01-21 21:10:41 +00:00
mjacob
56196ffa4e Nobody said no to adding a pointer to original scsi inquiry data
to the scsibus attach args. Make sure it's nulled for ATAPI. Also,
for scsiconf.c, modify SENA's quirk entry.
2000-01-20 17:10:18 +00:00
mjacob
3bcc285367 add SES driver 2000-01-20 17:07:41 +00:00
mjacob
a8f0034523 add SES device 2000-01-20 16:07:43 +00:00
abs
3a63eeee63 newline terminate ss: atatch message - from Roger Brooks 2000-01-19 01:00:07 +00:00
bouyer
e51ae5d23a Use SCSIPIRETRIES instead of hard-coded value '2' for number of retries in
common routines. Define SCSIPIRETRIES as 4, so that the command will finally
succeed after several consecutive downgrades from UDMA2 to PIO4.
2000-01-17 17:59:48 +00:00
abs
0f75dd5dc4 allow ioctl() on all scanner device nodes - now SANE can work with ss* driver 2000-01-17 11:25:31 +00:00
bouyer
638e1a6958 Improve the downgrade logic:
- If UDMA 2 is failing try UDMA 1 first, it helps in some cases
- downgrade if we get an error in the first 4000 xfers, or if we get
  4 errors in 4000 xfers if the first 4000 went without troubles.

While I'm there commit a local change I have since some time to get my CD
probed: issue a "blanck" IDENTIFY before the one used to detect slave ghosts,
with my drive the first IDENTIFY following a controller reset fails with an
aborted command ...
2000-01-17 00:01:00 +00:00
mjacob
4cb8fbf10d Print out the contents of an otherwise unreported undecodable
sense data buffer. This helps catch adapter breakage mostly.
2000-01-14 02:40:45 +00:00
nisimura
1775fae985 Add tweaks for TEAC compact cassette tape drive. 2000-01-13 00:18:27 +00:00
mjacob
34721cbe92 Check in the implementation of the ST_MOUNT_DELAY option.
This is an attempt to allow people to change the default configuration
to try harder at 'mounting' a tape. This allows you to specify, in
seconds, the amount of time a non-control unit open will retry
(once per second) the scsipi_test_unit_ready when it tries to mount
the tape. It also turns off the over-verbose error reporting at
this time unless SCSIDEBUG is set.

The reason this is not enabled as a default is that it's a large change
of behaviour. I find it useful to 'try harder' at mounting a tape in
the tape driver, particularly when loaded via a media changer device
rather than specifying the delays in the backup program.
2000-01-12 14:46:43 +00:00
pk
33f192535d <machine/cpu.h> is not needed here. 2000-01-11 15:32:37 +00:00
mjacob
4783eac2b8 add ST_MOUNT_DELAY options for st 2000-01-06 18:28:28 +00:00
mjacob
182c6629c1 oops, bad patch 2000-01-04 22:47:12 +00:00