Commit Graph

83 Commits

Author SHA1 Message Date
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
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
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
Peter Wemm
6875d25465 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
Joerg Wunsch
17d9b79a9f Add an entry for the Nakamichi 4-disk changer.
Submitted by:	K.R.Marshall@ukc.ac.uk (K.R.Marshall)
1997-02-08 13:26:31 +00:00
Bill Paul
9baa6352dc Make some small tweaks to the messages to clean up some stuff
from last time. Some people have pointed out that there were some odd
side-effects in the changes I made. Two things are different:

- sc_print_addr() will print 'foodev0:' (i.e. sd0:, st0:, cd0:, etc...)
  if the device name is known. If it's not known, it'll use a longer
  notation. This shortens error messages back to a sane length.

- Added a small function called sc_print_init() to set the sc_printing
  flag so that sc_print_addr() will know that we want it to print a
  linefeed. Used this in scsi_device_attach() to restore proper carriage
  return printing behavior which I broke.

Remaining bogons: the NCR SCSI driver prints out information while the
device-specific attach routine is running with its own linefeeds. This
breaks up the individual messages emitted by the subdriver modules and
causes at least one message to appear on a line by itself without a
device spec prefix. I'm not sure of the correct way to fix this, and
I don't have any NCR SCSI hardware to test with anyway.

There's probably more, but I gather that a rewrite of the SCSI subsystem
is pending anyway, so I'll leave the rest to Those Who Know More About
This Than I (tm).
1997-02-08 03:42:22 +00:00
Joerg Wunsch
c1b822b746 Do not accidentally default a device that failed probing to T_DIRECT
(since T_DIRECT just incidentally happens to be equal 0).  This causes
more harm than it would do good.  Instead , get it at the uk driver.

Reviewed by:	obrien@NUXI.com (David O'Brien)
1997-02-02 20:57:12 +00:00
Bill Paul
fc7c79b907 Make the SCSI probe messages more BSDish. This may raise a few eyebrows
("Hey! Who made _you_ the keeper of all things BSDish?!") but this has
bugged me for a long time, and now that I finally have the chance
to hack on it (and test the results), I'll take my chances. I can also
point to other BSD implementations for precedents if you put my back to
the wall.

The only thing that's changed is how the messages are formatted. Now,
instead of having this:

aha0 at 0x330-0x333 irq 11 drq 5 on isa
(aha0:3:0): "HP C1553A 9503" type 1 removable SCSI 2
st0(aha0:3:0): Sequential-Access density code 0x24, variable blocks, write-enabled
(aha0:3:1): "HP C1553A 9503" type 8 removable SCSI 2
ch0(aha0:3:1): Medium-Changer 6 slot(s) 1 drive(s) 0 arm(s) 0 i/e-slot(s)

We have this:

aha0 at 0x330-0x333 irq 11 drq 5 on isa
scbus0 at aha0 bus 0
st0 at scbus0 target 3 lun 0
st0: <HP C1553A 9503> type 1 removable SCSI 2
st0: Sequential-Access density code 0x24, variable blocks, write-enabled
ch0 at scbus0 target 3 lun 1
ch0: <HP C1553A 9503> type 8 removable SCSI 2
ch0: Medium-Changer 6 slot(s) 1 drive(s) 0 arm(s) 0 i/e-slot(s)

Which is (to me anyway) is a lot more pleasant to look at. (Call me
crazy -- g'head: you know you wanna -- but the previous messages remind
me of Linux. Ever see the output from the linux device probes? It's a mess
of copyright notices, version numbers/dates, author e-mail addresses and
other crap. Let's not go there, okay? Bleh.)

Notice that devices are now specified in terms of the scsi bus they
live on rather than the adapter. This better reflects the contents
of the kernel config file (if you use wired-down device specifications
anyway) and removes some ambiguity that may arise if you have a multi-
channel adapter with more than one bus.

Also, sc_print_addr() now generates messages like this:
st0 at scbus0 target 3 lun 0: NOT READY asc:3a,0 Medium not present

instead of this:
st0(aha0:3:0): NOT READY asc:3a,0 Medium not present

I also added a quirk entry for the HP Superstore 12000e 6 tape DAT
autoloader, which needs SC_MORE_LUS in order for the changer device
to be properly probed and attached. (I'm working on a chcontrol utility
to manipulate the changer on this drive which should hopefully be general
enough to work with other changers too. If you want the prototype I have
now, it's at ftp://skynet.ctr.columbia.edu/pub/freebsd/changer.c.)

Remaining bugs:

- The 'foodev0: yadda yadda yadda' bits should probably be printed entirely
  by the device-specific subdriver attach code instead of half by the
  scsi_device_attach() routine and half by the device specific attach
  routine like it is now.

- The wired-down device specifications in the kernel config file should
  be used to control bus/device probing to some extent rather than just
  for choosing names for devices we find. If the config says there's a
  device at scbus0 target 0 lun 0 called sd0, we should look there and
  check for a device that can be managed by the sd driver. If we don't
  find one, we should probably complain that there's no device there or
  that there is a device but of the wrong type. Once all the devices from
  the wired down list have been probed, the code can then autodetect and
  autoattach any devices that remain unassigned.

- Apparently some tape changers (hi Ulf!) return 'not ready/medium not
  present' when the magazine is loaded but a tape has not been put in the
  drive yet. This causes an open(/dev/ch0) to fail and prevents you from
  using the changer.c utility to load the first tape into the drive. My
  HP changer does not behave this way. The workaround is to manually load
  a tape into the drive before attempting to use the changer program, but
  you can get in trouble if you accidentally eject a tape without loading
  a new one and you're at a remote location: you won't be able to load
  any tapes anymore. I'm not sure what the correct software solution is
  for this but ideally there should be one.

- I should not be doing this: I'm the NIS guru, not the SCSI guru.
  (This is not my beautiful code. How did I get here? My god: what
  have I done?)
1997-01-25 20:27:13 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Joerg Wunsch
2f401e5f09 Reorder the wildcard entries to the end of the quirks list, so they
will be probed last.  It's otherwise impossible in some cases to get
SCSI type override working.

Supposed fix for PR # kern/2225.
1996-12-20 20:43:45 +00:00
Joerg Wunsch
fb2efb8992 Add an entry for Ricoh's MO drives.
Submitted by:	msmith@atrad.adelaide.edu.au (Michael Smith)
1996-12-14 09:57:04 +00:00
Joerg Wunsch
5a4a0aacba Slightly change the `od' driver quirk for the Matsushita LF-1000
series drives, and add the NAKAMICHI MO drive RMD-5200-S.

Closes PR # kern/2200: Change/Add new optical di...

Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1996-12-13 00:00:51 +00:00
Joerg Wunsch
7a9717ae8e Default the CD-ROM devices to a single LUN only. Too many of them are
broken and respond to multiple LUNs.

Reviewed by:	rv@groa.uct.ac.za (Russell Vincent)
1996-12-07 22:45:15 +00:00
Joerg Wunsch
bf65a4116b Add the Quantum DLT drives. All of them grok SC_MORE_LUS, so the tape
library devices will properly come up with all LUNs detected.

Submitted by:	dawes@Physics.usyd.edu.au (David Dawes)
1996-11-30 07:39:37 +00:00
Poul-Henning Kamp
3faaf0b64a Rogue entry for DEC DLT2700
Reviewed by:	julian & phk
Submitted by:	Andre Albsmeier <Andre.Albsmeier@mchp.siemens.de>
1996-11-28 09:51:03 +00:00
Masafumi Max NAKANE
1473a85114 Back out my previous change.
It probably broke the support for the device.

Pointed-Out by:	joerg
1996-11-09 02:44:11 +00:00
Masafumi Max NAKANE
9358777784 Typo, MATSHITA -> MATSUSHITA.
2.2 & 2.1.6 candidate.
1996-11-07 18:13:57 +00:00
Joerg Wunsch
b99dd17277 Updates and bugfixes to the worm driver:
. also detect the Phlips CDD2000; it's software-compatible with the HP part

Submitted by:	cau@cc.gatech.edu (Carlos Ugarte)

. correct the blocksize handling for CD-DA tracks, and fix multitrack
  handling

Submitted by:	nsayer@quack.kfu.com (Nick Sayer)

2.2 candidates!
1996-11-06 13:33:53 +00:00
Bruce Evans
b568ea4e01 Removed more devconf leftovers. 1996-09-10 23:31:13 +00:00
Poul-Henning Kamp
40f3771f7f Various cleanups for remanents of devconf. 1996-09-08 10:44:18 +00:00
Poul-Henning Kamp
bfbb029d87 Remove devconf, it never grew up to be of any use. 1996-09-06 23:09:20 +00:00
Bruce Evans
6ab46d52a5 Don't use NULL in non-pointer contexts. 1996-07-12 04:12:25 +00:00
Satoshi Asami
ad63a118b2 The Great PC98 Merge.
All new code is "#ifdef PC98"ed so this should make no difference to
PC/AT (and its clones) users.

Ok'd by:	core
Submitted by:	FreeBSD(98) development team
1996-06-14 11:02:28 +00:00
John Fieber
18182fa7a3 Append a * to the model field of the Archive Viper quirk entry.
Without the wildcard, the drive would never match the entry.
Also add a comment describing how matching takes place to help avoid
problems like this.
1996-06-03 14:25:11 +00:00
Bruce Evans
3157adc8af Removed now-unused #includes of <machine/cpu.h>. They were for bootverbose
being declared in the wrong place.
1996-04-07 17:32:42 +00:00
Justin T. Gibbs
9932c050b9 Cleanse the SCSI subsystem of its internally defined types
u_int32, u_int16, u_int8, int32, int16, int8.
	Use the system defined *_t types instead.
1996-03-10 07:13:15 +00:00
Peter Wemm
c146b42dc0 Fix broken SCSI_DELAY option.. (missing #include "opt_scsi.h")
Pointed out by: Boyd Faulkner <faulkner@asgard.bga.com>
1996-03-09 07:13:57 +00:00
Julian Elischer
e69f051247 allow the default tape unit to try figure out what it is rather than
forcing it to 512 byte blocks....
1996-02-19 09:26:07 +00:00
Stefan Eßer
9df7e08732 Add: CDU-8003A aka Apple CDROM-300
Submitted by:	Michael Reifenberger <root@totum.plaut.de>
1996-02-17 23:59:24 +00:00
Andrey A. Chernov
a034e85849 Recognize NRC MBR-7.4 too 1996-02-12 23:22:33 +00:00
Joerg Wunsch
c38a76a7d0 Add a quirk record for the Tandberg 42XX series. Not only that these
drives require ST_Q_SNS_HLP, they also wrongly accept a blocksize of
1024 in the first place (for a QIC-150 cartridge), but complain later
about it.  The hack is to only probe for 512 for them.

Reorder the entries in st_decide_mode() so that QIC >= 525 is properly
accepted as variable blocksize.
1996-02-03 13:31:13 +00:00
Joerg Wunsch
1d98b891d0 Add the HP4020i CD-R as a known device.
Reorder the CD-R entries in knowndevs[].

Submitted by:	fred@jjarray.umd.edu (Fred Cawthorne)
1996-02-02 22:59:48 +00:00
Joerg Wunsch
b73b631531 Add the Emulex MD21 ESDI-to-SCSI bridge as a known device (with more than
one LUN).
Submitted by:	Wilko Bulte
1996-02-02 22:57:27 +00:00
Jordan K. Hubbard
10fd4c5933 Add an entry for my HP Model 4020i CDR drive. 1996-01-31 07:32:11 +00:00
Julian Elischer
1c07bf3556 Submitted by: rich (which one?)
Another special case for probing multi-CD cdrom drives.

2nd try at this patch.
1996-01-28 22:41:44 +00:00
Jordan K. Hubbard
93f4df92ad Back out the previous change. It's not correct for -current. 1996-01-28 21:51:57 +00:00
Jordan K. Hubbard
b73daed8ca Add an entry for the "MBR-7", whatever that is.
Submitted by:	rich
1996-01-28 20:43:49 +00:00
Paul Traina
dfe11c5d9d Add NEC CDR 210 to list of devices with broken LUN support 1995-12-27 17:07:12 +00:00
Peter Wemm
f84e9bf4af Add an entry for the NEC CDROM:55 drive to stop it answering all 7 LUNS. 1995-12-26 21:08:39 +00:00
Bruce Evans
157b9ad554 Added prototypes. 1995-12-14 19:44:29 +00:00
Poul-Henning Kamp
f708ef1b9e Another mega commit to staticize things. 1995-12-14 09:55:16 +00:00
Peter Wemm
b10853f674 Check before dereferencing a possible null pointer (cdevsw[i]->d_open) 1995-12-13 20:08:53 +00:00
Julian Elischer
6ba9ebce28 devsw tables are now arrays of POINTERS to struct [cb]devsw
seems to work hre just fine though  I can't check every file
that changed due to limmited h/w, however I've checked enught to be petty
happy withe hte code..

WARNING... struct lkm[mumble] has changed
so it might be an idea to recompile any lkm related programs
1995-12-13 15:13:57 +00:00
Julian Elischer
76092b8329 Make NEW_SCSICONF the default way of doing things
It will need to be changed
but it's the better starting point..

also add '?' to wildcarding in SCSI identification of devices..
so we can catch all PIONEER	CD 6??* devices instead of having
separate entries for the 600, 602, 604X, 624X etc..

it's getting so we should have a small regexp routine in the kernel
maybe just a little one..  matching CDX-6[0-9][0-9][ A-Z] would be better

there will be drastic changes in this
but this is the best starting point..
1995-12-10 10:58:30 +00:00
Bruce Evans
f30e535f00 Completed function declarations, added prototypes and removed redundant
declarations.
1995-11-21 15:14:28 +00:00
Poul-Henning Kamp
4b2af45f4b Mega commit for sysctl.
Convert the remaining sysctl stuff to the new way of doing things.
the devconf stuff is the reason for the large number of files.
Cleaned up some compiler warnings while I were there.
1995-11-20 12:42:39 +00:00
Joerg Wunsch
f60e6466c4 Include the "od" driver. (Oops, forgot to cvs add the driver file
itself.  Will do this after this commit.)

Make scsiconf more flexible about recognizing ``foreign'' devices.
This part needs to be rewritten some day to allow for matches whithou
strict version number checks, but either Julian as Peter seem to be
too busy right now, so i'm finally commiting the version that's
working for me stable now for several months, as an interim
workaround.

Submitted by: akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1995-10-31 17:21:00 +00:00
Joerg Wunsch
b629f8ebbe Some bug fixes for the worm driver:
o  don't use polled mode after the device probe phase
o  don't biodone() a NULL buffer pointer
o  increase the timeout for scsi_read_capacity(); WORMs are slooow
o  make WORMMs known to scsiconf at all

This brings the driver in a state where it at least doesn't
immediately panic, nor hangs the controller any more.  Unfortunately,
at least the YAMAHA CDR100 i've been testing with answered my write
attempts with an "Incorrect command sequence" response.  Perhaps other
CD burners might work however.

Reviewed by:	dufault
1995-10-09 15:15:01 +00:00
Justin T. Gibbs
07b1c6b3c9 Remove hard coded assumption that SCSI busses have 7 targets.
This change forces the controller drivers to allocate a scsibus_data struct
via a call to scsi_alloc_bus(), fill in the adapter_link field, and optionally
modify any other fields of the struct.  Scsi_alloc_bus() initializes all fields
to the default, so the changes in most drivers are very minimal.  For drivers
that support Wide controllers, the maxtarg field will have to be updated to
allow probing of all targets (for an example, look at the aic7xxx driver).

Scsi_attachdevs() now takes a scsibus_data* as its argument instead of an
sc_link*.  This allows us to expand the role of the scsibus_data struct for
other bus level configuration setings (max number of transactions, current
transaction opennings, etc for better tagged queuing support).

Reviewed by: Rodney Grimes <rgrimes>, Peter Dufault <dufault>, Julian Elischer <julian>
1995-08-23 23:03:34 +00:00