Commit Graph

64 Commits

Author SHA1 Message Date
Andrey A. Chernov
b03135a62b I forget the fact that cd_read_toc reads toc header in any case 1996-02-02 20:43:11 +00:00
Andrey A. Chernov
3681ddfb6e Remove statement that does nothing now, forget in my prev. commit 1996-02-01 17:35:15 +00:00
Andrey A. Chernov
f1956303bb Oops, pick wrong volume size for leadout entry 1996-02-01 16:22:58 +00:00
Andrey A. Chernov
5d33645207 Don't convert LBA to host order, they must stay in network order
as old code does.
1996-01-30 23:11:06 +00:00
Andrey A. Chernov
ba6d026ac8 OOPS, forget to adjust starting track to not physically read
leadout entry
1996-01-30 16:38:30 +00:00
Andrey A. Chernov
62bdf2b7c6 Use ntohs/ntohl when reading TOC instead of hardcoded byte swapping.
Put fake entry len for MSF format too.
1996-01-30 16:12:18 +00:00
Andrey A. Chernov
b7d2756067 READTOCENTRYS: make fake leadout entry 1996-01-30 14:30:43 +00:00
Andrey A. Chernov
e9a22c0c14 READTOCENTRYS: handle 0 and lead out requests, add argument checking 1996-01-30 12:59:00 +00:00
Garrett Wollman
8890984dc9 Convert BOUNCE_BUFFERS and BOUNCEPAGES to new option scheme. 1996-01-05 20:12:53 +00:00
Joerg Wunsch
32871264d8 Use a medium_type field of 0 (Default), instead of the value that was
obtained by the MOSE SENSE command.  SONY drives are too stupid to eat
their own food.

Submitted by:	stu@solaris.com (Stu Phillips)

While i was at it, i've removed two bogus channel numbers in the``set
mono'' command, that kept my Toshiba drive complaining.

Also remove Julian's misspelling of `stereo'.
1995-12-30 13:56:28 +00:00
Peter Dufault
23dd4ed477 Bruce's fix for when dk_ndrive >= DK_NDRIVE. Fixes CDROM changer
and other "lots of CDROM devices" problems.  This code should be
put in a single place.
1995-12-20 12:02:43 +00:00
Poul-Henning Kamp
f708ef1b9e Another mega commit to staticize things. 1995-12-14 09:55:16 +00:00
Bruce Evans
658a9cba7e Replaced cdsize by generic nopsize.
Added prototypes.

Declared statics consistently.
1995-12-10 20:02:47 +00:00
Bruce Evans
4439655d52 Replaced nxdump by nodump (if the dump function gets called, then the
device must be configured, so ENXIO is a bogus errno).

Replaced zerosize by nopsize.  zerosize was a temporary alias.
1995-12-10 19:53:42 +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
Poul-Henning Kamp
d2f265fab8 Julian forgot to make the *devsw structures static. 1995-12-08 23:23:00 +00:00
Julian Elischer
87f6c6625d Pass 3 of the great devsw changes
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)

If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)

pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
1995-12-08 11:19:42 +00:00
Julian Elischer
7198bf4725 If you're going to mechanically replicate something in 50 files
it's best to not have a (compiles cleanly) typo in it! (sigh)
1995-11-29 14:41:20 +00:00
Julian Elischer
53ac6efbd8 OK, that's it..
That's EVERY SINGLE driver that has an entry in conf.c..
my next trick will be to define cdevsw[] and bdevsw[]
as empty arrays and remove all those DAMNED defines as well..

Each of these drivers has a SYSINIT linker set entry
that comes in very early.. and asks teh driver to add it's own
entry to the two devsw[] tables.

some slight reworking of the commits from yesterday (added the SYSINIT
stuff and some usually wrong but token DEVFS entries to all these
devices.

BTW does anyone know where the 'ata' entries in conf.c actually reside?
seems we don't actually have a 'ataopen() etc...

If you want to add a new device in conf.c
please  make sure I know
so I can keep it up to date too..

as before, this is all dependent on #if defined(JREMOD)
(and #ifdef DEVFS in parts)
1995-11-29 10:49:16 +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
John Dyson
68a2196fad First set of changes to eliminate the ad-hoc device buffer queues,
replacing them with TAILQ's as appropriate.  The SCSI code is the
first to be changed -- until the changes are complete, both b_act and
b_actf will be in the buf structure.  b_actf will eventually be removed.
1995-11-19 22:22:35 +00:00
Satoshi Asami
e77a9fca43 Minor aesthetics (changed "." to space in "cd present.[a x b records]"
and removed extraneous newline after "can't get the size").
1995-11-15 03:27:14 +00:00
Poul-Henning Kamp
7503109d24 Make a lot of things static. 1995-10-21 23:13:11 +00:00
Rodney W. Grimes
9b2e535452 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
Peter Dufault
7d613f6a39 Moved unit definitions out of scsiconf.h;
Added CONTROL device that only does user-ioctl and nothing else;
Added protection so user-ioctl requires write access;
Clean up scsiconf.h a little. It needs more work.
1995-05-03 18:09:20 +00:00
Justin T. Gibbs
a34bad999b Set SCSI_NOSLEEP only when we really need to. This requires an additional
flags parameter to all xxstart routines so that the correct information can
be passed down into the device specific routines.  This is needed to ensure
that ccb/scb allocation routines don't hang.

Submitted by: John Dyson
1995-04-23 22:07:56 +00:00
Peter Dufault
81e01d44ce Added "scsi target" device that can act as a target for scsi transfers
from an initiator
Added Julian's support for residuals.
Added Julian's fixes to the tape driver
Made compile cleanly with -Wall
Reduce boot up output
1995-04-14 15:10:44 +00:00
Peter Dufault
3358f19c6e cd.c: Julian's CD audio cleanup
sd.c: Julian's removal of subdriver requests
st.c, scsi_tape.h: Julian's suport of compressed tape drives

Note: compressed tape drives are still not working fully.

scsiconf.h, scsi_base.c, scsi_driver.c: address problems in probes
and error console logs
1995-03-21 11:21:08 +00:00
Peter Dufault
73d664ca78 1. Add text for ASC/ASCQ
2. Clean up probe messages.  This is how I propose it looks for 2.1 so
if you don't like it you have my e-mail address.
1995-03-15 14:22:12 +00:00
Peter Dufault
f29b7a5d14 1. Change driver signatures to full signature for slice support.
2. Add "pt" (processor type) driver.
3. Add "worm" (Write Once) driver for Jordan.
1995-03-04 20:51:10 +00:00
Peter Dufault
a0520fbaac Reviewed by: gibbs@freefall.cdrom.com julian@freefall.cdrom.com
1. Support for fixed device configuration
2. Hoisted common code to scsi_driver
3. SCSI busses dynamically allocated at boot
4. Reorg'd for LKMs
1995-03-01 22:24:47 +00:00
Peter Dufault
7562b0d606 Reviewed by: gibbs@estienne.CS.Berkeley.EDU
Reenabled "SCIOCOMAND" ioctl.
Restructured so low level drivers can easily request retries.
Added preliminary fixed SCSI devices (should be revisited before 2.1)
Added "ssc" device that can have its' (HBA, ID, LUN) set via ioctl.
1995-01-08 13:38:38 +00:00
Bruce Evans
9834a1b204 Fix the "wds" count stat. 1994-12-24 09:48:32 +00:00
Poul-Henning Kamp
a31f80dc67 Allocate all scsi-devices on the fly, not just CDs.
Reviewed by:	phk
Submitted by:	rgrimes
1994-12-16 06:03:28 +00:00
Poul-Henning Kamp
0c290b8b2d added a missing '\n' in both files. 1994-12-03 22:52:57 +00:00
Bruce Evans
f8d920b2db Remove unused definition of Debugger(). 1994-11-15 14:49:12 +00:00
Jordan K. Hubbard
54c7241bd3 Julian Elischer's disklabel fixes. 1994-10-27 20:45:13 +00:00
Garrett Wollman
2f86936a07 Finished device configuration database work for all ISA devices (except `ze')
and all SCSI devices (except that it's not done quite the way I want).  New
information added includes:

-	A text description of the device
-	A ``state''---unknown, unconfigured, idle, or busy
-	A generic parent device (with support in the m.i. code)
-	An interrupt mask type field (which will hopefully go away) so that
.	  ``doconfig'' can be written

This requires a new version of the `lsdev' program as well (next commit).
1994-10-23 21:28:03 +00:00
Garrett Wollman
324b24896b all: register devices
cd.c sd.c: implement disk stats
1994-10-19 00:09:47 +00:00
Poul-Henning Kamp
07716162c6 Removed unused vars. Silenced gcc -Wall. Some of this stuff is virtually
type-less.  Everything is "u_int32" :-(
1994-10-08 22:26:40 +00:00
Stefan Eßer
ac48588ac5 Changed CDOUTSTANDING back to a value of 2 (from 1), since this is now only
an upper limit, not a fixed value (ignoring the host adapter capabilities)
as before.
1994-09-16 23:43:28 +00:00
Stefan Eßer
8eae5644c1 Reviewed by: Stefan Esser <se>
Calculation of 'cd->cmdscount' now as in 'sd.c' (required for ncr scsi).
CDOUTSTANDING defined as '1' (as the comment says), was '2' in fact ...
Debugger takes an (char*) argument, changed macro definition accordingly.
1994-08-31 22:50:08 +00:00
David Greenman
9aba88bf29 Rather than exclude bounce buffers support with NOBOUNCE, include it
with BOUNCE_BUFFERS. This is more intuitive, and is better for future
multiplatform support. Added BOUNCE_BUFFERS option to the GENERIC and
LINT kernel config files.
1994-08-31 06:17:49 +00:00
Andrey A. Chernov
c594d6c8a3 Raw partition is 2 now 1994-08-29 21:25:11 +00:00
David Greenman
8a129caed5 1) Changed ddb into a option rather than a pseudo-device (use options DDB
in your kernel config now).
2) Added ps ddb function from 1.1.5. Cleaned it up a bit and moved into its
   own file.
3) Added \r handing in db_printf.
4) Added missing memory usage stats to statclock().
5) Added dummy function to pseudo_set so it will be emitted if there
   are no other pseudo declarations.
1994-08-27 16:14:39 +00:00
Rodney W. Grimes
26f9a76710 The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.
Reviewed by:	Rodney W. Grimes
Submitted by:	John Dyson and David Greenman
1994-05-25 09:21:21 +00:00
David Greenman
0e195446b7 Bug fixes and performance improvements from John Dyson and myself:
1) check va before clearing the page clean flag. Not doing so was
	causing the vnode pager error 5 messages when paging from
	NFS. (pmap.c)
2) put back interrupt protection in idle_loop. Bruce didn't think
	it was necessary, John insists that it is (and I agree). (swtch.s)
3) various improvements to the clustering code (vm_machdep.c). It's
	now enabled/used by default.
4) bad disk blocks are now handled properly when doing clustered IOs.
	(wd.c, vm_machdep.c)
5) bogus bad block handling fixed in wd.c.
6) algorithm improvements to the pageout/pagescan daemons. It's amazing
	how well 4MB machines work now.
1994-04-20 07:06:57 +00:00
David Greenman
d5e26ef0ef Bounce buffers. From John Dyson with help from me. 1994-03-23 09:16:04 +00:00
Steven Wallace
9e09767910 Fixed CDIOREADTOCENTRYS ioctl call so that it returns only the entries
and not header + entries as per definition.
1994-02-05 09:08:46 +00:00
Rodney W. Grimes
861e92cb98 Patch from Julian. Commit message by me.
cd.c:
Initialize channel info in CDIOCSETVOL ioctl.
Correct CDIOCSTOP and CDIOCEJCET ioctls to use scsi_stop_unit
instead of scsi_start_unit.
Add CDIOCALLOW and CDIOCPREVENT ioctls.

ch.h:
Return EBUSY instead of ENXIO if the device is already in use.

scsi_base.c:
Add scsi_stop_unit routine.

sd.c:
Add mising indirection through sc_link to sd_get_parms routine
when checking for media loaded.

st.c:
Return EBUSY instead of ENXIO if the device is already in use.
Clear the SDEV_WAITING flag in ststart if we do the wakeup call.
1994-01-29 10:30:41 +00:00