Commit Graph

819 Commits

Author SHA1 Message Date
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
christos 03b1503c21 PR/16110: Chris Jepeway: scsipi_complete() calls (*psw_done)() b/4
setting buffer fields
2002-03-28 22:01:22 +00:00
mjacob 6424bafe73 kern/16014- if we do an 'mt offline', make sure we've allowed the tape
to be ejected (PR_ALLOW). This got nuked in a previous change.
2002-03-22 21:39:36 +00:00
mjacob ff9ae73488 Forced commit so that some more detail on the previous patches can be
inserted into comments. I really think that more testing was required,
but Christos was eager.

+ Add in tape block/file position reporting support.

+ Change the prevent/allow ejection code so that if the device
  is close the tape can be ejected. This allows robots to eject
  the tape even if the tape isn't at BOT.

+ Don't do a null filemark write if we're reading block position. This
  was such an abysmal performance killer that it had to go. Assume
  that the tape will DTRT and tell you what the tape position really is
  including any buffered data. You are depending on the tape to do
  the right thing to report position at all, so the risk factors don't
  increase appreciably here. BTW- we only do this for logical block
  position. For 'hardware' block position, we still flush.

+ Some substantial tweaking in st_interpret_sense. This essentially duplicates
  the FreeBSD driver's exception handling code. This is to try and correctly
  handle EOM cases. I'm not sure that this is now correct with respect to
  the ENABLE EARLY WARNING code- I hadn't gotten around to validating that.
  Add in full 32 bit residuals- this can then be available to an update
  MTIOCGET in the future.

+ Make sure we handle SKEY_VOLUME_OVERFLOW correctly.
2002-03-22 02:03:30 +00:00
christos e5160e810e Add the ability to report file number/block number. From Matt Jacob. 2002-03-20 14:53:59 +00:00
chs bbc8f01aef add a quirk for some disks I have that don't like tagged queuing. 2002-03-16 23:26:34 +00:00
bouyer 0b16dfbbae Present the same interface to periph driver for ASYNC scsipi_command() in the
normal case, and in the polling or "no thread yet" cases:
don't return an error from scsipi_complete(), as the error should already have
been handled in scsipi_complete() and eventually periph driver callbacks.
Should fix kern/15190.
2002-03-16 17:21:19 +00:00
thorpej a180cee23b Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.
2002-03-08 20:48:27 +00:00
enami 147331af13 Fix broken indentation. 2002-02-21 05:30:30 +00:00
thorpej 3e9025cfbf Remove a pretty much useless autoconfiguration message. 2002-02-10 23:28:27 +00:00
bouyer 3ba24c2b42 IF we change the ATA modes, also reset the device, so that we can retry
the command with the new mode.
2002-01-27 22:00:40 +00:00
uwe 2536236e11 Add notag quirk for Seagate "ST11200N SUN1.05". 2002-01-23 18:13:08 +00:00
bouyer f03445a59f For fixed block drive, for invalid sense error code, set info to
xs->datalen / st->blksize instead of xs->datalen; as code assume later
that info is a block number.
Should fix kern/2727.
2002-01-12 20:30:11 +00:00
tsutsui 1267bddc09 Call malloc(9) with M_ZERO flag instead of memset() after malloc(). 2002-01-12 16:29:30 +00:00
drochner dcea5d31ee -don't apply scsipi_strvis() twice, it tries to octal-print the string
terminating zero and uninitialized dada following
-use use the "vendor" field for the name which is used in the default
 disklabel, the "product" field is meaningless or not existing for ATAPI
 (serial number)
2002-01-09 18:48:18 +00:00
thorpej 229efaff69 Add ioctls to get (DIOCGCACHE) and set (DIOCSCACHE) cache enables
on disks in a generic way.  Implement these ioctls for SCSI disks.

This is not fully fleshed-out yet, but it allows people to experiment
with disk caches more easily.
2002-01-09 04:12:11 +00:00
augustss 8164bd8bae Move some USB device quirks to the umass_quirk table. 2001-12-29 14:06:18 +00:00
augustss b965a7d6eb Remove some quirk entries that are handled in umass_quirk now. 2001-12-29 13:55:02 +00:00
nathanw 5dbef63175 Use PQUIRK_ONLYBIG for all Olympus cameras, not just the C-1.
Use PQUIRK_ONLYBIG for the PQI TravelFlash.
2001-12-27 18:57:46 +00:00
gehenna 59c47ef767 The FujiFilm USB storage drive doesn't have a flex geom page and
doesn't know REQUEST SENSE.
2001-12-22 13:29:50 +00:00
nathanw 8d1585affa The Olympus C-1 engine cameras seem to need the PQIRK_ONLYBIG quirk. 2001-12-14 22:15:52 +00:00
veego 9d39bbf3a8 Support for dvd region code (RPC). 2001-12-09 22:56:10 +00:00
yamt 272f471ee0 add detach support for st. 2001-12-07 11:26:30 +00:00
bouyer bfc80822c7 Update my copyrigth. 2001-12-03 00:20:22 +00:00
bouyer 65768c08e2 No need to include atavar.h here. 2001-12-02 22:59:40 +00:00
bouyer 4809ad42cb Clean up attach of wd/atapibus:
kill ata_atapi_attach. Change atapibus to use a struct scsipi_channel instead
of ata_atapi_attach as attach arch. Create a ata_device, compatible with
scsipi_channel, to attach wd.
2001-12-02 22:44:32 +00:00
bouyer c6c2c476eb Hum, no need to print a message each time we're waiting for the drive. 2001-12-01 00:05:04 +00:00
bouyer e6922f82d6 Various quirks for the ATAPI OnStream DI-30, mostly from the FreeBSD driver.
Many thanks to Chris Pinnock for giving me remote access to his hardware.
2001-12-01 00:03:45 +00:00
bouyer cd8d64fe2b For ATAPI tape drives, poll for DSC (using a callout), to get the real
status of the command, and make sure the drive is ready for the next one.
2001-12-01 00:00:29 +00:00
lukem ecb81c3f6d - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
  "options FOO=xxx"). options that take a value were converted to
  defparam recently.
- minor whitespace & formatting cleanups
2001-11-28 10:21:10 +00:00
fredette 4fd267f75d Added the new defopt SCSI_OLD_NOINQUIRY; this is used instead
of sun2 to wrap code that conjures up INQUIRY responses for
certain specific old devices.
2001-11-28 01:04:49 +00:00
fredette 83c021b2a7 Added quirk entries for Adaptec and Emulex SCSI interposer boards.
Decode a limited set of SASI/SCSI-1 sense codes, and under sun2
only, conjure up INQUIRY responses for these boards.
2001-11-26 20:39:29 +00:00
lukem 0fa231134c - replace "defopt" with "defparam" for options which must take a value,
as config(8) will warn for value-less defparam options
- minor whitespace/formatting cleanup
- consolidate opt_tcp_recvspace.h and opt_tcp_sendspace.h into opt_tcp_space.h
2001-11-20 14:34:18 +00:00
tsutsui 859356d03b Add a new quirk value PQUIRK_CAP_SYNC for SCSI1 devices which support
sync transfers, and set PERIPH_CAP_SYNC for them in scsi_probe_device().
As per discussion on tech-kern.
2001-11-19 22:50:00 +00:00
soren eefc317219 Remove duplicate struct scsipi_start_stop. 2001-11-19 17:18:08 +00:00
soren 27e3d258cd Floptical drive needs PQUIRK_NODOORLOCK as well. 2001-11-19 16:54:20 +00:00
soren ae27210d46 Insite Floptical drive needs PQUIRK_NOLUNS. 2001-11-19 00:22:47 +00:00
tsutsui c8f45396b3 Fix formatting of scsi_quirk_patterns[] and wrap long lines. 2001-11-18 17:22:43 +00:00
lukem 2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem 7ba10b3532 add RCSIDs 2001-11-13 06:54:32 +00:00
augustss a1ba73d6c3 Add a quirk for a USB CD/RW. 2001-11-06 13:31:20 +00:00
tsutsui 5e6dd3ae03 Add common macro to check message length. 2001-11-04 12:03:03 +00:00
tsutsui f82eb7bfa1 Replace a magic number with macro. 2001-11-03 15:52:03 +00:00
bouyer da77194a02 We can't have XS_CTL_DATA_OUT and XS_CTL_DATA_IN at the same time.
Pointed out by Bernd Ernesti.
2001-10-22 16:16:00 +00:00
mjl 51a4b6098f Add ST15150N to quirk table, as per PR/13817. 2001-10-21 23:25:04 +00:00
christos 070d583bb3 PR/14256: Kevin P. Neal: Add quirk for micropolis drive. 2001-10-16 13:33:02 +00:00
bouyer 69fff4726e Refuse to register a callback if the completion thread isn't started yet. 2001-10-14 21:17:41 +00:00
bouyer a84535fd3e Call ADAPTER_REQ_GROW_RESOURCES from the completion thread, if possible.
This allows HBA drivers to call bus_dmamem_map() safely.
2001-10-14 20:31:24 +00:00
bouyer ce6aaa187a Split channel flags in chan_flags used for communications between
scsipi and HBA, and chan_tflags used for communications between scsipi
and its kernel thread. No functionnal change.
2001-10-14 19:03:43 +00:00