Commit Graph

12 Commits

Author SHA1 Message Date
Kenneth D. Merry 9dfb44710e Patches from DES to create three new kernel config options to control
timeouts in the SA driver (timeouts for space, rewind and erase).  Folks
can lengthen the timeouts if their hardware is especially slow, or shorten
them if they want to be notified of errors a little sooner.

Also, get rid of two OD driver options.  The od driver has been made
obsolete by the da driver.

Reviewed by:	ken, gibbs
Submitted by:	Dag-Erling Coidan Smørgrav <des@FreeBSD.ORG>
1998-10-02 05:15:51 +00:00
Kenneth D. Merry e5b118dd3d In the bootverbose case, print out error messages for all errors that will
not be retried again, even if the SF_NO_PRINT flag is set.

Reviewed by:	gibbs
1998-09-29 22:11:30 +00:00
Kenneth D. Merry 54cbee5db2 Treat not ready errors (asc 0x04) as non-fatal errors for attach. We
already allowed medium not present type errors (0x3a), but some Philips and
HP WORM drives return 0x04,0x00 when you issue a read capacity without
media in the drive.
1998-09-23 03:17:08 +00:00
Kenneth D. Merry 050279e55a Some fixes to the CD driver that may fix PR kern/7996. The data direction
flags on some of the operations in the driver weren't quite right.  Also,
clean up scsi_cd.h, change u_char to u_int8_t.

I'm surprised this problem didn't show up sooner.  (the code has been in
there almost a year and a half)

PR:		        7996
Reviewed by:	        ken
Submitted (mostly) by:	gibbs
1998-09-20 22:48:15 +00:00
Justin T. Gibbs 0c4930f525 Don't invalidate devices due to unexpected unit attention errors. In
a perfect world, we'd notice the UA and do some device validation to ensure
that the device hasn't changed.  We may get this before the year ends,
but not before 3.0R.  This change gives the adminstrator ample ammunition
to take off a foot or two, but hey this *is* UN*X.
1998-09-20 07:17:11 +00:00
Justin T. Gibbs 9eec0f7d5a Don't leave the device queue in a frozen state if the Synchronize Cache
command on close fails.
1998-09-19 04:59:35 +00:00
Kenneth D. Merry 66411419a6 Fix error recovery in scsi_interpret_sense(). It turns out that ERESTART
wasn't getting sent back for most errors, even if there were retries left
on the command.  I'm not sure how I ever let this slip by before...

In any case, we now send back ERESTART if there are retries left for the
command, and send back the default error code when there are no retries
left.

Reviewed by:	gibbs
1998-09-19 01:23:04 +00:00
Kenneth D. Merry 37b9efd37b Fix the CAM code so that people can compile kernels with the CD driver but
without the DA driver.

The problem was that the CD driver depended on scsi_read_write() and
scsi_start_stop(), which were defined in scsi_da.c.

I moved both functions, and their associated data structures and defines
from scsi_da.* to scsi_all.*.  This is technically the "wrong" thing to do
since those commands are really only for direct-access type devices, not
for all SCSI devices.  I think, though, that the advantage (allowing people
to compile kernels without the disk driver) outweighs any architectural
purity arguments.

PR:		kern/7969
Reviewed by:	gibbs
1998-09-18 22:33:59 +00:00
Kenneth D. Merry c5e6ca4410 Some Alpha patches for CAM from Doug Rabson.
Reviewed by:	gibbs
Submitted by:	dfr
1998-09-16 23:30:11 +00:00
Kenneth D. Merry 66a0780e8e Check to make sure that this device is opened read-write, not just read
only.  Previously, if the device was chmoded 644, someone could open it
with the O_RDONLY flag and issue any ioctl to the device.

Reviewed by:	imp, gibbs
1998-09-16 00:11:53 +00:00
Justin T. Gibbs 5ee58402df Correct printf format bugs. 1998-09-15 22:05:44 +00:00
Justin T. Gibbs 76babe507b SCSI Peripheral drivers for CAM:
da	- Direct Access Devices (disks, optical devices, SS disks)
	cd	- CDROM (or devices that can act like them, WORM, CD-RW, etc)
	ch	- Medium Changer devices.
	sa	- Sequential Access Devices (tape drives)
	pass	- Application pass-thru driver
	targ	- Target Mode "Processor Target" Emulator
	pt	- Processor Target Devices (scanners, cpus, etc.)

Submitted by:	The CAM Team
1998-09-15 06:36:34 +00:00