Commit Graph

345 Commits

Author SHA1 Message Date
Joerg Wunsch
94e156264e Make the Nakamichi CD-ROM changer detection detect more recent devices,
too.
1997-11-06 08:29:50 +00:00
Jean-Marc Zucconi
1f32911745 Use a MODE SELECT command to reset the block size, instead of calling the
prepare_track() function, which caused fixation problems with some drives.
1997-10-27 21:09:27 +00:00
Joerg Wunsch
ad89c7c62f Make the Sun OEM version of the DLT a known multi-LUN device so changers
will work.

PR:		kern/4802
Submitted by:	dawes@physics.usyd.edu.au (David Dawes)
1997-10-19 09:37:49 +00:00
Joerg Wunsch
4dec470e39 Remove the call to scsi_start_unit() from sd_open(). It was causing
much grieve to owners of IBM drives when used in conjunction with
tagged command queuing, and didn't serve any purpose at all (since
experiments have proven that it simply didn't work).

Instead, call scsi_start_unit() once in sd_attach(), so in case the
drive has been configured to `remote start', it will spin up there.
(If it has spun down later, it must have been because of administrator
action (scsi(8)) anyway.)

While i was at it, bump the timeout for scsi_start_unit() to 30
seconds.  10 seconds were way too few for most drives.
1997-10-12 08:54:47 +00:00
Joerg Wunsch
b8a0cb287a Add the REGAL CDC-4X as a known CD-ROM changer device.
Submitted by:	shanee@augusta.de (Andreas Kohout)
1997-10-05 13:38:17 +00:00
Justin T. Gibbs
e74a2bdcb0 Convert to use the new bufq* functions for dealing with buffer
queues.
1997-09-21 22:03:22 +00:00
Mike Smith
46c52ddc37 Remove line noise from the quirk list (kernel build stopper) 1997-09-18 00:15:55 +00:00
Joerg Wunsch
381b241308 Add the C1557A as a known tape changer (thus non-broken multi-LUN tape
device).

Submitted by:	Andre.Albsmeier@mchp.siemens.de (Andre Albsmeier)
1997-09-17 21:49:06 +00:00
Peter Wemm
35b8b2ddab Update select -> poll in drivers. 1997-09-14 03:19:42 +00:00
Joerg Wunsch
cae6f73ac2 Revert the logic behind my last change, and use a function called
`is_physical_memory()' now for the decision whether to dump some
region of memory or not.

Suggested by:	davidg
1997-09-13 16:12:15 +00:00
Joerg Wunsch
e0b78e19f2 Do not ever try to coredump adapter memory regions.
PR:		4486
Submitted by:	tegge@idi.ntnu.no (Tor Egge)

Implement a function is_adapter_memory() in order to determine what
should nto be dumped at all.  Currently, only populated with the ``ISA
memory hole''.  Adapter regions of other busses should be added.
1997-09-10 12:31:40 +00:00
Joerg Wunsch
c816cfc962 Add a quirk flag for CD drives that jam when seeing a START STOP UNIT
command.

PR:		2388
Submitted by:	nsayer@quack.kfu.com (Nick Sayer) [basically]
1997-09-07 15:06:08 +00:00
Joerg Wunsch
db72f913bb Silence the PREVENT ALLOW MEDIUM REMOVAL call.
Submitted by:	jmattson@wco.com (Jim Mattson)
1997-09-07 10:08:23 +00:00
Joerg Wunsch
d32eff99cc Make the Sony TSL-7000 a known tape changer device. 1997-09-05 10:16:03 +00:00
Bruce Evans
e4ba6a82b0 Removed unused #includes. 1997-09-02 20:06:59 +00:00
Bruce Evans
68366fa6e8 Removed another vestige of devconf. 1997-09-02 04:37:59 +00:00
Steve Price
fae3ea2ced Increase the retry timeouts.
PR:		kern/3447
Submitted by:	dawes@rf900.physics.usyd.edu.au
1997-08-23 21:05:32 +00:00
Jun-ichiro itojun Hagino
14bb0309a4 preparation for scsi device RESERVATION CONFLICT support.
PR:		4257
1997-08-17 14:02:18 +00:00
Julian Elischer
63fe995cb4 Teach both disk drivers how to cope with a hardware watchdog
while dumping core.. I'm tired of getting 1/2 of a core-dump

conditional on -DHW_WDOG for now
this will migrate to 2.2 as that's where I need it.
1997-08-09 01:44:25 +00:00
Bruce Evans
1fd0b0588f Removed unused #includes. 1997-08-02 14:33:27 +00:00
Jean-Marc Zucconi
e694f4795a My previous commit was incomplete because it ignored the READ case.
Now set explicitly the block size to 2048 when the device is opened
for reading.
1997-08-01 12:48:35 +00:00
Jean-Marc Zucconi
ffd8332856 Ignore the block size returned by scsi_read_capacity(): this value is
rarely correct and the block size is already specified in the prepare_track()
functions.
1997-07-26 15:07:42 +00:00
John Polstra
f7218f9f22 In SCSI diagnostic messages, cause "0x" to be prepended to the number
in the "info" field to make it clear that it is hexadecimal.
1997-07-25 23:25:20 +00:00
Bruce Evans
a24a66635c Don't depend on gcc's feature of permitting labels that aren't followed
by a statement.
1997-07-01 00:22:51 +00:00
Tor Egge
7a1d27b301 Introduce an advisory exclusive lock on the scsi link structure.
Change sd_open, sd_close and sd_ioctl to use this lock to ensure
serialization of some critical operations, thus avoiding some
race conditions. Ideas picked from NetBSD (ccd and sd devices).
This fixes one of the problems noted in PR kern/3688.
Reviewed by:	"Justin T. Gibbs" <gibbs@plutotech.com>
1997-06-25 19:07:43 +00:00
Stefan Eßer
79a853b932 Add quirk "no tags" entry for HP 3724/5 hard disk drives. 1997-06-11 22:29:01 +00:00
Jean-Marc Zucconi
7344a61e7b Add 2 new ioctls: WORMIOCREADSESSIONINFO and WORMIOCWRITESESSION.
These commands are required for the "Disk-At-Once" write process:
WORMIOCREADSESSIONINFO returns the length of the lead-in and lead-out areas
and WORMIOCWRITESESSION is used to send  the table of contents of the disk.
1997-06-02 20:05:39 +00:00
Jean-Marc Zucconi
ab4fa45fb7 The correct way to combine 2 4bit values into a 8bit one is (a<<4) | b, not
(a<<8) || b.
The conical hat please!
1997-05-28 21:25:49 +00:00
Joerg Wunsch
998bb1a784 Add an entry for the Epson scanners since some of them repsond to more
than one LUN:

Submitted by:	simokawa@sat.t.u-tokyo.ac.jp (Hidetoshi Shimokawa)
1997-05-25 14:20:28 +00:00
Joerg Wunsch
eceeb60438 Initialize the buf_queue of the pt(4) driver.
PR:		kern/3629: /sys/scsi/pt.c doesn't...
Submitted by:	simokawa@sat.t.u-tokyo.ac.jp (Hidetoshi Shimokawa)

Add a catch-all record for removable SCSI devices to default them to
only one LUN.

PR:		kern/3580: Bad LUN probes on Xyratex...
1997-05-21 19:35:11 +00:00
Jean-Marc Zucconi
8d496aeec7 Set the quirks for the worm drives. 1997-05-19 17:32:10 +00:00
Jean-Marc Zucconi
1ad8b2cb84 A few improvements to the worm driver.
- remove all calls to scsi_stop_unit(). Some drives refuse commands when
  stopped. This will fix the 'device not configured' message which was
  cleared after opening/closing the tray.
- Never set the logical block address in the scsi_cmd struct when writing.
  The computation was bogus for block sizes not a multiple of DEV_BSIZE.
  (the bug is still there in the READ case)
- reset the block size to the 2048 bytes in finalize_track() track to avoid
  an error when mounting a disk after an audio write.
- remove the WORMIOCQUIRKSELECT ioctl. Quirks are now recorded at probe time
  (see scsiconf.c)
- change and expand the argument to the WORMIOCPREPTRACK ioctl. It now possible
  to select more track options (copy bits, ISRC codes, track type,
  track number)
- add an error handler to catch false errors (warnings in fact) and record
  the error type.
- add an ioctl call (WORMIOERROR) to get more information on the nature of the
  error when a command or a write failed.
- add an ioctl call (WORMIOCFINISHTRACK) to finalize a track without closing
  the device (closing the device still finalize the track if the command was
  not performed)

Approved by:	joerg
1997-05-19 17:30:50 +00:00
Joerg Wunsch
28d90c30ee Add the D_DISK flag to the cdevsw structs of various CD-ROM drivers. 1997-05-10 12:13:17 +00:00
Joerg Wunsch
5adee135aa Duplicate the TOC handling ioctls from the cd(4) driver. Duplicating
the work is silly, and all this will be a moot point with Justin's CAM
driver, and there are still many ioctls missing -- but i need these
right now.  It's silly to need to move the CD-R back to the other
drive in order to determine the session start info when burning multi-
session CD-Rs.
1997-05-05 13:35:01 +00:00
Joerg Wunsch
5a9714de76 This mega-commit brings the following:
. It makes cd9660 root f/s working again.
. It makes CD9660 a new-style option.
. It adds support to mount an ISO9660 multi-session CD-ROM as the root
  filesystem (the last session actually, but that's what is expected
  behaviour).

Sigh.  The CDIOREADTOCENTRYS did a copyout() of its own, and thus has
been unusable for me for this work.  Too bad it didn't simply stuff
the max 100 entries into the struct ioc_read_toc_entry, but relied on
a user supplied data buffer instead. :-(  I now had to reinvent the
wheel, and created a CDIOREADTOCENTRY ioctl command that can be used
in a kernel context.

While doing this, i noticed the following bogosities in existing CD-ROM
drivers:

wcd:	This driver is likely to be totally bogus when someone tries
	two succeeding CDIOREADTOCENTRYS (or now CDIOREADTOCENTRY)
	commands with requesting MSF format, since it apparently
	operates on an internal table.

scd:	This driver apparently returns just a single TOC entry only for
	the CDIOREADTOCENTRYS command.

I have only been able to test the CDIOREADTOCENTRY command with the
cd(4) driver.  I hereby request the respective maintainers of the
other CD-ROM drivers to verify my code for their driver.  When it
comes to merging this CD-ROM multisession stuff into RELENG_2_2 i will
only consider drivers where i've got a confirmation that it actually
works.
1997-05-04 15:24:23 +00:00
Joerg Wunsch
a5e62cce18 Add the Archive 4586NP tape changer.
PR:		kern/3481
Submitted by:	bruce@zuhause.mn.org (Bruce Albrecht)
1997-05-03 22:23:13 +00:00
Søren Schmidt
19accede88 Remove old code in #if 0, leftovers from the days before != 512byte
sector support.
1997-05-01 19:15:38 +00:00
Jordan K. Hubbard
6c0a2b9722 Implement dkstats for worm devices so they show up in iostat et al.
I got tired of not seeing my worm stats show up during a burn. :)
[Joerg, I just stapled in 1MB/sec for a bogus xfer rate and left seek = 1,
 as suggested - I'm not going to dynamically calculate the xfer rate from
 a known device spectable, OK? :-)]
Reviewed by:	joerg
1997-04-04 22:12:55 +00:00
Justin T. Gibbs
92fb126230 Add a 1ms delay in the XS_BUSY case. This is the same error code returned
for the QUEUE FULL condition.  This may help avoid wedging a device by
immediately requeeuing the transaction in this case.
1997-04-04 19:37:20 +00:00
KATO Takenori
61b80893b2 Moved prototypes of scsi_data, scsi_link and proc before scsi_adapter.
If PC98 is defined, the type of the first argument of open_target_lu
is scsi_link structure.
1997-04-03 10:09:29 +00:00
John-Mark Gurney
21a69f7c65 add a cd quirk flag CD_Q_BCD_TRACKS, that will convert bcd2bin the track
id's from broken scsi cdrom drives like my Chinon... plus update the quirk
entry for it :)

Closes my own PR#2423
1997-04-02 09:05:43 +00:00
Joerg Wunsch
e49784d15d Add an entry for the newer Philips CDD26xx family CD-R drives. They
come out with PHILIPS as the vendor string, as opposed to IMS for the
older ones.

Submitted by:	"Brian N. Handy" <handy@sag.space.lockheed.com>
1997-04-01 19:28:03 +00:00
Bruce Evans
fce002fdef Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include
it when it is not used.  In most cases, the reasons for including it
went away when the special ioctl headers became self-sufficient.
1997-03-24 11:25:10 +00:00
Bruce Evans
a02b0b9694 Removed nested #includes of <scsi/scsi_debug.h> and <scsi/scsi_driver.h>
from <scsi/scsiconf.h> and fixed everything that depended on them.
(Missed this one.)
1997-03-24 04:26:46 +00:00
Justin T. Gibbs
65e5a3a9df free_xs must be called at splbio(). This is usually the case since the main
caller is scsi_done which the controller interrupt handlers call.  In the
case of a non-buffer based transaction, the xs structure is freed by the
process that initiated the transfer in scsi_scsi_cmd.  In this case, an
explicit splbio/splx pair around the call to free_xs is required.  Without
the splbio protection, the xs free list could be corrupted, and the type
driver's start routine might run without spl protection.

Submitted by:	Tor Egge <Tor.Egge@idt.ntnu.no>
Obtained from: PR kern/2891
1997-03-24 01:46:15 +00:00
Bruce Evans
6617929964 Removed nested #includes of <scsi/scsi_debug.h> and <scsi/scsi_driver.h>
from <scsi/scsiconf.h> and fixed everything that depended on them.
1997-03-23 06:33:55 +00:00
Bruce Evans
08febfa741 Removed nested #include of <sys/conf.h> from <scsi/scsi_driver.h>
and fixed everything that depended on getting it from the wrong
place.  Most of the broken things actually only depended on getting
the declaration of their interrupt handler from "ioconf.h".
1997-03-23 04:40:00 +00:00
Bruce Evans
3ac4d1ef0c Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.
Fixed everything that depended on getting fcntl.h stuff from the wrong
place.  Most things don't depend on file.h stuff at all.
1997-03-23 03:37:54 +00:00
Joerg Wunsch
930bb1a4da Add a quirk entry for the HP6020i, after John has just confirmed that
it works now.

Submitted by:	jhay@zibbi.mikom.csir.co.za (John Hay)
1997-03-10 20:51:17 +00:00
Joerg Wunsch
f357773315 Merge Jason Thorpe's updated changer stuff into the actual system.
Many things have been changing in the kernel since mid-1996, so there's
quite some amount of diffs here already.  It compiles, but i cannot
test it anywhere here.

2.2 candidate?

Closes PR # 1201.
1997-03-06 15:36:45 +00:00