Commit Graph

274 Commits

Author SHA1 Message Date
cgd
0b469d4a12 add/change a few quirks:
(1) all Chinon CDS-431 CD-ROMs (regardless of revision)
		are forced to only having LUN 0, at the suggestion
		of Michael Hitch.
	(2) _force_ searching of extra LUNs for the Emulex MD21/S2
		ESDI bridge.  It's pre-SCSI 1, but knows about LUNs.
		"amazing."  From Jason Thorpe.
	(3) recognize an Emulex tape adapter in front of a QIC-36
		tape, and have it forced to only LUN 0.  This is
		an odd one; vendor, name, and rev strings are all
		spaces.  Anything that mathes this is very likely
		broken, anyway, so might as well give it a shot.
		Again from Jason Thorpe.
1995-07-12 09:56:09 +00:00
cgd
d8fe81c04c implement SDEV_FORCELUNS flag, as suggested by Jason Thorpe. 1995-07-12 09:43:29 +00:00
cgd
f60db5f02a add a SDEV_FORCELUNS flag, as suggested by Jason Thorpe, to force
the SCSI code to look for LUNs on prehistoric (pre-SCSI 1) drives &
controllers, where normally it would not.
1995-07-12 09:42:00 +00:00
cgd
5b671ea6a8 Morningstar SnapLink -> SDEV_NOLUNS, per Peter Galbavy in pr 1192. 1995-07-09 09:44:57 +00:00
cgd
21b6db23b7 play the alphabetization game 1995-07-09 09:43:07 +00:00
cgd
5a5eb678c9 QUANTUM P105S 910-10-94x A.3 -> SDEV_NOLUNS 1995-07-09 09:30:42 +00:00
mycroft
7263209ce6 Make each disk and tape driver define its own read and write functions.
Deprecate rawread() and rawwrite() completely.  Remove d_strategy from cdevsw to
force the abstraction barrier.
1995-07-04 07:15:28 +00:00
cgd
1c5d265cad another CD-ROM quirk, a la PR 1166 1995-06-27 20:42:45 +00:00
cgd
2a8d6461a8 implement new-style block device dump routine if __BDEVSW_DUMP_OLD_TYPE
not defined, otherwise use an "not implemented" stub.
1995-06-26 05:16:55 +00:00
cgd
d093e5d8b8 make dump stubs consistent 1995-06-26 05:15:33 +00:00
cgd
d8264613c8 add entry for another tweaked Texel CD-ROM. from pr 1151 1995-06-24 01:22:30 +00:00
mycroft
6664ae1ddd Add another CD-ROM drive to The List. 1995-06-18 05:13:09 +00:00
pk
7d18c2534d Add `Maxtor LXT-213S', this time without a Sun OEM addition. 1995-06-02 21:44:11 +00:00
cgd
011aa68805 looks like some extra ')'s were left in here. 1995-05-03 21:38:57 +00:00
mycroft
1d2f0bce2a Make the byte-shifting code consistent. 1995-05-03 19:38:45 +00:00
cgd
224a7f4533 config.new description of SCSI mi files. 1995-04-17 07:15:40 +00:00
mycroft
04e937dcbd Don't boundary check I/O to the `raw' partition. 1995-04-15 05:01:26 +00:00
mycroft
68c8c80929 kernel_pmap --> pmap_kernel() 1995-04-10 16:48:27 +00:00
mycroft
3836533fc6 Add another broken CD-ROM drive to The List. 1995-04-04 05:44:32 +00:00
mycroft
7e2dabf972 Add a missing unlock. 1995-04-01 10:29:41 +00:00
mycroft
1d568eab9a Revamp the locking mechanism slightly. 1995-03-29 23:04:39 +00:00
mycroft
b51403f60d Remove the write protect check altogether, and rely on the drive to do it. 1995-03-25 19:45:18 +00:00
mycroft
12a1b9ad67 Add a rogue entry for the ANRITSU DMT780. 1995-03-25 18:41:42 +00:00
glass
911fbf48fa fix syntax error. Andreas Gustafsson <gson@clinet.fi> 1995-03-24 20:17:15 +00:00
mycroft
990077ba88 Don't bother with DIOCWLABEL. 1995-03-23 12:13:37 +00:00
mycroft
06d0a67a07 Check for read-only media in open(), not write(). 1995-03-23 12:11:07 +00:00
mycroft
d21add8356 Revert cdsize() to do nothing. 1995-03-23 11:51:22 +00:00
mycroft
4712cd33dc Rearrange DIOCWDINFO a little; closer to wd.c. 1995-03-23 11:43:09 +00:00
mycroft
562ca7760b Fix typo. 1995-03-23 11:37:51 +00:00
mycroft
02df08a47e Allow DIOCWDINFO even if label is not `writable'. 1995-03-23 11:33:18 +00:00
mycroft
e203e49ef5 Correct spelling of `fictitious'. Add patterns for optical memory devices.
From Alistair Crooks.
1995-03-07 21:46:06 +00:00
mycroft
2986fc2fd0 Be less picky about revision numbers for some broken devices. 1995-02-22 19:32:33 +00:00
pk
e560d77223 Another Maxtor botch. 1995-02-09 10:23:14 +00:00
mycroft
d8743f51a2 Add Exabyte 8200 to the list. 1995-02-01 09:37:54 +00:00
mycroft
52bacd79d6 Fix invocation of scsi_scsi_cmd(), per John Kohl. 1995-01-30 15:54:42 +00:00
mycroft
1076165d07 All revisions of the TDC 3600 are rogues. 1995-01-30 15:39:33 +00:00
mycroft
7639253b70 Finish last change. 1995-01-30 11:50:23 +00:00
mycroft
321b00bd07 Some drives don't grok START with LoEj=1, either. 1995-01-30 11:47:56 +00:00
mycroft
0ece1143f6 Set the LoadEject bit when issuing a START. 1995-01-30 11:37:17 +00:00
mycroft
9085638020 Some devices really do require the START before the PREVENT. This makes no
sense.
1995-01-30 11:34:25 +00:00
mycroft
1611df6ae0 Update copyrights. 1995-01-26 12:05:49 +00:00
mycroft
b76a328caa Redo the `wait for spin up' code. The Mach 3 method clearly doesn't work.
Also, rearrange the first open sequences a bit; SDEV_OPEN is no longer magic.
1995-01-26 11:56:51 +00:00
mycroft
726fa4e94f Do the PREVENT before the START. 1995-01-23 18:17:22 +00:00
mycroft
feb5b29596 Remove old, misleading comment. 1995-01-23 17:56:26 +00:00
mycroft
a6e7fe0d2a If the disk reports a block size of 0, assume it really meant 512. 1995-01-16 21:40:17 +00:00
mycroft
4a1e51751b Trivial simplification. 1995-01-16 21:34:10 +00:00
mycroft
e71e917e9d Remove unused macros. 1995-01-16 21:31:34 +00:00
mycroft
85532dd4ce Don't clear the debug flags when copying the prototype scsi_link. 1995-01-16 21:13:40 +00:00
mycroft
28775a6a5d Add a DIAGNOSTIC check. 1995-01-13 14:38:13 +00:00
mycroft
7650bd97fc Always boundary check I/O. 1995-01-13 10:46:32 +00:00
mycroft
83a1c4799e Add two more broken devices. 1995-01-12 10:25:44 +00:00
mycroft
dff292c275 Put Dan's broken tape drive in The List. 1995-01-01 11:37:03 +00:00
mycroft
bfd9901daf Fix some oversights in the debugging code. 1994-12-30 05:33:06 +00:00
mycroft
d78ddddef6 Update the rogue entry for ancient drivers to match reality. 1994-12-30 05:23:49 +00:00
mycroft
6e9d6a0d75 And a little better... 1994-12-30 05:20:22 +00:00
mycroft
0a83cd8c57 Deal with short inquiry response a little better. 1994-12-30 05:14:52 +00:00
mycroft
5d3bd57538 Fix a couple of things in the sense printing code. 1994-12-29 13:49:57 +00:00
mycroft
f2909dc62b Increase the st_space() timeout. 1994-12-28 19:55:50 +00:00
mycroft
8fd135209c Numerous changes. Many bugs fixed, better autoconfig, a few new features. 1994-12-28 19:42:47 +00:00
mycroft
3e7afdbe8a Remove DIOCSBAD handling. It's not actually handled, so why recognize it? 1994-12-16 04:38:30 +00:00
mycroft
ca65f2ce5d Remove dkbad.h. 1994-12-14 15:17:22 +00:00
mycroft
1b372b7e96 Remove some redundant code. 1994-12-01 13:07:28 +00:00
mycroft
0109779d43 Remove unneeded override of SCSI_NOSLEEP. 1994-12-01 12:45:25 +00:00
mycroft
c1cbd9c635 Set UIO residual count. 1994-12-01 12:36:35 +00:00
mycroft
71ab8bb627 Always set the device number correctly, even though we don't need it. 1994-12-01 12:26:37 +00:00
mycroft
d18cbacd88 Redux. 1994-12-01 12:12:08 +00:00
mycroft
1066219897 Uncomment call to scsi_user_done(), and remove a duplicate biodone() (and
another si_free()).
1994-12-01 12:04:43 +00:00
mycroft
a10cbd7179 Remove the silly statically allocated array, and simply malloc the data
structures as needed.  Also, put the buf in the malloc()ed area.  Remove a
duplicate si_free() (though this was harmless before).
1994-12-01 11:53:56 +00:00
mycroft
cc44b4600c There's no point in bothering to unlock what we didn't lock. 1994-11-23 07:54:15 +00:00
mycroft
95edd299b0 Add still more locking. 1994-11-22 03:23:49 +00:00
mycroft
284d17e8f0 Complete last change. 1994-11-22 00:14:24 +00:00
deraadt
0c36dd6762 C botch repair from bostic 1994-11-22 00:05:36 +00:00
mycroft
c81c637ee3 Return EIO when the drive is empty. 1994-11-21 11:37:26 +00:00
mycroft
7a1dcbfac6 Clean up open and close routines somewhat. 1994-11-21 11:28:47 +00:00
mycroft
fd32202948 Replace dev_unit with device_softc in scsi_link. Change argument to foostart()
to void*.
1994-11-21 10:39:09 +00:00
mycroft
5bd4115690 Add some missing locking, and some general cleanup. 1994-11-20 22:36:43 +00:00
deraadt
38483bbbf0 Enough Chinese torture already 1994-11-15 23:00:23 +00:00
mycroft
d8561ad477 Oops; update scsibusmatch() arg list. 1994-11-03 22:09:00 +00:00
mycroft
ef0c18e1cf Always use direct configuration for SCSI devices. 1994-11-03 22:05:08 +00:00
mycroft
54608f7ea0 Remove a couple of i386-specific hacks, and make a couple of others #ifdef
CONFIG_INDIRECT instead.
1994-11-03 20:24:21 +00:00
cgd
6ac2bbfc35 be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +00:00
mycroft
28cbceeec7 Make this more likely to work. 1994-10-23 19:24:01 +00:00
mycroft
e5d974c51f First cut at making user-level SCSI commands work. This is untested.
Partly from John Brezak.
1994-10-20 20:31:23 +00:00
mycroft
b8ab5f65d1 Back out change to print geometry from label at boot; can't do this reliably. 1994-10-20 16:54:44 +00:00
mycroft
7d391c250d Fix minor omission. 1994-10-20 14:10:18 +00:00
mycroft
cd66683989 openpart -> openmask 1994-10-20 14:08:07 +00:00
mycroft
bb12b9c8a2 Trivial stylistic changes. 1994-10-20 14:05:08 +00:00
mycroft
caaeda044b Similar changes to sd.c. 1994-10-20 14:03:38 +00:00
mycroft
b1568d887e Use the block size in the label in most cases. 1994-10-20 13:50:38 +00:00
mycroft
d5b3572f5c Various changes:
* Get rid of unused `partflags'.
* Use dk_openpart, and remove `openparts'.  Also, allow an open on both
the block and characters devices at the same time.
* If there was a label, print the geometry from the label at boot time.
* Turn `wlabel' into a flag, and *don't* set it automatically in
DIOCWLABEL; disklabel(8) does that.
Other minor changes.
1994-10-20 13:33:36 +00:00
cgd
49c34d3337 move arch dependence to archs. clean up a bit. deal with weird MAXPARTITONS. 1994-10-14 18:26:22 +00:00
deraadt
5aa2f1e6bb remove an un-aligned access 1994-08-30 17:01:57 +00:00
deraadt
692c724215 un-aligned access is not cool on some processors 1994-08-12 08:57:18 +00:00
mycroft
da79c879cd On probe or open, retry the READ CAPACITY once if the drive reports NOT READY. 1994-08-11 23:51:26 +00:00
mycroft
3e685aec5c Change ST_Q_NEEDS_PAGE_0 to something more generic. 1994-08-09 18:50:17 +00:00
mycroft
558c00c001 Fix spelling of `STEREO'. 1994-08-05 22:56:19 +00:00
mycroft
b5c5c47f92 Obey the command queue size for the controller. 1994-08-04 09:52:47 +00:00
mycroft
863c736e39 Normalize label handling. 1994-07-26 19:39:19 +00:00
chopps
b10a5d5fac change to support other MAXPARTITIONS vals aside from 8 1994-07-04 20:39:46 +00:00
deraadt
fd7c79353e knf 1994-06-29 23:32:42 +00:00
cgd
fccfa11af5 New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:39:25 +00:00
mycroft
72679b6801 Fix a comment. 1994-06-19 03:29:37 +00:00
chopps
7d3285c3d4 resolve confusion over who owns the buf after calling scsi_scsi_cmd() 1994-06-16 15:57:39 +00:00
mycroft
a69dd750a2 b_un.b_addr -> b_data 1994-06-16 01:07:30 +00:00
mycroft
d023a319a4 Nuke some junk in scsi_link, as pointed out by Gordon. 1994-05-12 22:16:04 +00:00
mycroft
02ec14c597 Add dummy *dump() routines. 1994-05-11 09:49:17 +00:00
chopps
95faa87c60 remove union's from sense_data struct, conditionaly define RAW_PART 1994-05-09 07:40:47 +00:00
mycroft
efbbf1b09f Deal with variable-length drives that don't specify a maximum block size.
c.f. SCSI 2 protocol definition.
1994-04-24 05:40:05 +00:00
mycroft
df873c8545 Maintain the xs free list with LIST_*(). 1994-04-20 22:13:33 +00:00
mycroft
eee893f9ea Various cleanup, but no functional differences. 1994-04-13 05:43:19 +00:00
mycroft
58dfc9dffc Fix various types. Remove some outdated flags. 1994-04-11 03:53:58 +00:00
mycroft
c01cb5c454 Fix various types. Remove some outdated flags. Actually sleep a bit if
there are too many commands pending on the controller.
1994-04-11 03:53:45 +00:00
mycroft
8b10b2cd18 Combine scsi_start_unit() and scsi_stop_unit(), and increase the start
timeout (again).
1994-04-11 02:23:41 +00:00
mycroft
f16c2e25f8 Add another rogue... 1994-04-10 00:07:02 +00:00
mycroft
5fe1b5b538 Redo the last change; it was compltely bogus. 1994-04-06 00:43:57 +00:00
mycroft
87e831ef86 Try to detect garbage data from page 4 sense. 1994-04-06 00:23:31 +00:00
mycroft
100fdbd6d1 This line is redundant for LD_UNLOAD (only one use, and it does this itself)
but breaks LD_RETEN, forcing a reload of the driver state on the next I/O
operation.  Therefore, it goes away.
1994-04-05 22:39:37 +00:00
mycroft
8d0730c420 Reload the tape after retension. 1994-04-05 22:18:00 +00:00
mycroft
44f11a89b3 Implement MTRETEN (untested). 1994-04-05 22:08:09 +00:00
mycroft
692dc0e998 Implement MTEOM, currently untested. 1994-04-05 21:59:49 +00:00
mycroft
96f452cd84 Deal with Mark Weaver's rogue tape drive. 1994-04-01 06:49:22 +00:00
mycroft
2e5a28159f New SCSI system, based on Julian's more recent work. 1994-03-29 04:29:20 +00:00
mycroft
d5a269b4dd Put controller target in scsi_switch. 1994-03-25 07:38:51 +00:00
cgd
c3218832ba print even more SCSI sense data; this should be in a function... 1994-03-24 17:47:35 +00:00
cgd
20c82de12d print out lots of info on non-media hardware error... 1994-03-24 04:32:44 +00:00
mycroft
499efbcbdd More KNF-like. 1994-02-16 02:41:10 +00:00
mycroft
4335fa14b3 Increase the timeout for start_unit. 1994-02-16 00:47:35 +00:00
mycroft
94b2718bd1 PARANOID --> DIAGNOSTIC for inexpensive tests. 1994-02-14 21:43:33 +00:00
mycroft
adeebc448e Use b_actf, not av_forw. 1994-02-06 10:00:30 +00:00
mycroft
42e64dc254 Remove another use of b_actl. 1994-02-06 08:01:45 +00:00
mycroft
4ecdacf90d Add scsi_stop_unit(), from Mac code. Other minor nits. 1994-02-01 20:05:19 +00:00
deraadt
894bb31ed1 print nice numbers for disks >2G. from <adrian@lemmings.cursci.com> 1994-01-25 08:56:45 +00:00
briggs
80f5666771 If SCSI_DEBUG is on, a structure member wasn't updated from adapter_unit
to scsibus.
1994-01-22 14:16:58 +00:00
mycroft
efdb9fa688 *strategy functions return void. 1994-01-11 17:19:37 +00:00
cgd
f59a5e6fcd fix from Nick Cuccia (cuccia@remarque.berkeley.edu), apparently
originating from Gary Grebus <glg@k8lt.ampr.org>: partition size
must be in units of DEV_BSIZE.
1993-12-23 09:35:51 +00:00
mycroft
b4d3382694 Canonicalize all #includes. 1993-12-17 07:56:32 +00:00
mycroft
31a8c70935 0xfe000000 --> KERNBASE 1993-12-13 11:50:13 +00:00
mycroft
8caf0ca62b Use new struct buf fields. 1993-11-29 20:33:25 +00:00
mycroft
5820418cb2 Remove remaining sleep()s. 1993-11-27 19:49:09 +00:00
mycroft
8cd6aec465 Patch from Julian to fix hangage when opening a device multiple times. 1993-11-25 04:03:20 +00:00
mycroft
e985f4041a Still under construction... 1993-11-24 09:45:04 +00:00
mycroft
37548328a1 Under construction... 1993-11-24 04:52:44 +00:00
brezak
67dfce6728 Normalize play_msf changes with 386bsd patch. 1993-08-04 19:33:44 +00:00
brezak
80a965ba28 Add play_msf command and MSF variants. This is SCSI2 stuff and is needed for many flavors of player utilities. 1993-08-04 17:26:20 +00:00
mycroft
4862b84c92 Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
1993-08-01 19:22:24 +00:00
cgd
7b2afa7fe6 incorporate changes from 0-9-base to 0-9-ALPHA 1993-07-28 02:20:34 +00:00
cgd
30c2a20262 patches from allen briggs to fix a minor bug in *attach() 1993-07-19 11:30:49 +00:00
cgd
cb880ccb94 fix evil interaction with new physio; don't set error bit for short reads. 1993-07-09 04:28:55 +00:00
andrew
44b5013862 Reject non block-aligned transfers (where a block is 512 bytes in length);
they were causing scsi controller lockups.  Replace an occurrence of "512"
with SECSIZE, which is #defined to be 512.
1993-07-04 07:09:59 +00:00
andrew
1b69e917eb ANSIfications. 1993-06-27 06:59:20 +00:00