Commit Graph

79 Commits

Author SHA1 Message Date
Andreas Schulz
d3378ee165 Include "scbus.h" in scsiconfig.c to get the number NSCBUS from the
config file.
1994-11-27 23:30:48 +00:00
Andreas Schulz
80aee6ac1f Submitted by: Lawrence J. King ljking@ljk.OCUnix.On.Ca
Check the firmware revision for non-printing characters and replace them
question-marks if necessary. Problem is known with old Seagate ST296N
drives.
1994-11-17 23:22:22 +00:00
Bruce Evans
baffceaddc Remove bogus and unused declaration and definition of Debugger(). 1994-11-15 14:49:56 +00:00
Bruce Evans
f8d920b2db Remove unused definition of Debugger(). 1994-11-15 14:49:12 +00:00
Bruce Evans
16bb31e361 Remove bogus declaration of Debugger(). Change the macro for Debugger()
to call the function instead of doing nothing.
1994-11-15 14:47:49 +00:00
Andreas Schulz
e9bc745de3 scsiconf.h:
Change the sc_link structure from 8 targets with 8 lun's to
16 targets with 8 lun's. Wide scsi and the ncr 825 does support 16 targets.
scsiconf.c:
move the addition of the trailing NUL's out of a then clause, they are also
needed in the else clause for an unknown device.
1994-11-14 23:39:33 +00:00
Andreas Schulz
9055754b40 Delete a bogus check that the SCSI_DELAY only works for the first
scsi adapter. Let it work on every adapter. Someone want to rewrite
this to be coupled with the adapter specification in the config file,
so that you can say which adapters need it ?
1994-11-12 17:13:23 +00:00
Joerg Wunsch
bc8cb7d0b4 Avoid a division by zero if the actual sector size isn't known during the
device announcement; assume a sector size of 512 instead (likely to be
right at all).
This case happens when booting with a removable disk device attached
(e.g. an MOD), but no medium inserted.
1994-11-07 20:09:35 +00:00
Joerg Wunsch
f73af18476 |Both, the wd and the sd driver do not reject invalid request of odd
|sizes. They simply pass them to the disks, which usually causes
|fatal errors then.
1994-11-03 18:20:15 +00:00
Poul-Henning Kamp
beef52db54 Changed RAW_PART to RAWPART so it comes from disklabel.h.
Force RAW_PART to have the right size.
Set d_secperunit in the disklabel.
1994-10-31 23:45:40 +00:00
Jordan K. Hubbard
7366bf01ab Andreas Klemm's tape erase patches from 1.1.5.1
Submitted by:	andreas
1994-10-28 13:19:42 +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
091b0456f4 Make my ALLDEVS kernel compile (basically, LINT minus a lot of options).
This involves fixing a few things I broke last time.
1994-10-21 01:19:28 +00:00
Poul-Henning Kamp
953ca71d9d Peter Dufaults comconsole changes.
Submitted by:	Peter Dufault
1994-10-20 00:08:31 +00:00
Garrett Wollman
33d2aba4dc Implement scsi_externalize(), again. (This was supposed to be committed in the
last batch of changes but somehow got lost in the shuffle.)
1994-10-19 20:34:15 +00:00
Garrett Wollman
87b5fe25aa Define SCSI_EXTERNALLEN outside of #ifdef KERNEL, for lsdev. 1994-10-19 01:49:23 +00:00
Garrett Wollman
fc4375072a Forgot to bring this file over from previous commit. 1994-10-19 01:20:44 +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
Rodney W. Grimes
71d20391bf In sd_get_params() the timeout for the MODE_SENSE command was too
short. I changed it from 2000 to 4000 and now my disk works fine.

Submitted by:	John Hay <jhay@mikom.csir.co.za>
1994-10-04 06:45:57 +00:00
Rodney W. Grimes
1c1483cb2a Pull in 1.1.5.1 changes to sd.c from 1.23 to 1.27 (basically the fixes for
drives that return sector counts of 0 and cause division by 0 traps during
the probe).
Reviewed by:	Dave <root@hclb.demon.co.uk>
Obtained from:	FreeBSD 1.1.5.1
1994-10-04 06:39:27 +00:00
Poul-Henning Kamp
623ae52e4e GCC cleanup.
Reviewed by:
Submitted by:
Obtained from:
1994-10-02 17:48:58 +00:00
Stefan Eßer
92a25df797 Reviewed by: Julian Elischer / Jordan K. Hubbard
Changes are only effective, if NEW_SCSICONF is defined:

1) Added u_int16 quirks to struct scsi_link for device quirks.
2) Added void *devmodes to struct scsi_link for tape density modes.
3) Modified selectdev() to return first full match (with wildcard).

With this patch all device dependent configuration is done in one place
(scsiconf.c), while there were some specifications in st.c and some
hardware dependent drivers (ie. ncr.c) before.
1994-09-28 20:16:45 +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
David Greenman
2c7a40c7ca Removed all vestiges of tlbflush(). Replaced them with calls to pmap_update().
Made pmap_update an inline assembly function.
1994-09-02 04:12:26 +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
eda43f1aca Change RAW_PART back to 3, too early step right now, disklabels need more
work
Change hardcoded 3 value in several places to RAW_PART define
1994-08-30 14:31:38 +00:00
Jordan K. Hubbard
2de1d01ab8 Make decl/define for Debugger() match reality.
Submitted by:	jkh
1994-08-30 00:12:11 +00:00
Andrey A. Chernov
39a66415f6 RAW_PART=2 1994-08-29 21:37: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
David Greenman
7b42c960f8 1) cleaned up after Garrett - fixed more redundant declarations, changed
use of timeout_t -> timeout_func_t in aha1542 and aha1742 drivers.
2) fix a bug in the portalfs that was uncovered by better prototyping -
   specifically, the time must be converted from timeval to timespec
   before storing in va_atime.
3) fixed/added some miscellaneous prototypes
1994-08-20 03:49:02 +00:00
Garrett Wollman
f540b1065a Change all #includes to follow the current Berkeley style. Some of these
``changes'' are actually not changes at all, but CVS sometimes has trouble
telling the difference.

This also includes support for second-directory compiles.  This is not
quite complete yet, as `config' doesn't yet do the right thing.  You can
still make it work trivially, however, by doing the following:

rm /sys/compile
mkdir /usr/obj/sys/compile
ln -s M-. /sys/compile
cd /sys/i386/conf
config MYKERNEL
cd ../../compile/MYKERNEL
ln -s /sys @
rm machine
ln -s @/i386/include machine
make depend
make
1994-08-13 03:50:34 +00:00
David Greenman
3c4dd3568f Added $Id$ 1994-08-02 07:55:43 +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
Jordan K. Hubbard
382bb6cf5d Wait a much longer time for slow devices like CD multichangers to timeout
(by request of Horo Hideo).
1994-05-19 22:21:05 +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
1561d038b1 from John Dyson:
1) fixed some bugs related to the bounce buffer code
2) vnode pager now supports clustered pageouts
3) experimental code for clustering all I/O via a new "cldisksort"
4) added >16MB check to Bustek driver
5) made some experimental algorithmic changes to the pageout daemon
6) fixed bugs in truncating mapped files (esp when mapped via NFS)
7) reorganized vnode pager I/O code
1994-04-05 03:23:32 +00:00
David Greenman
d5e26ef0ef Bounce buffers. From John Dyson with help from me. 1994-03-23 09:16:04 +00:00
Garrett Wollman
1547917a09 Get rid of a nagging call to sleep() which crept back in. 1994-03-20 00:30:59 +00:00
Andreas Schulz
ee3794ce7d Catch the divide by zero bug earlier. If the drive give back
a zero cylinder and/or head count, set them and the sector count
to some fictious values. The same already happens if the request
sense is unsuccessfull.
1994-03-15 20:49:09 +00:00
Andreas Schulz
d6e2315539 Put a safety check in for the secsiz divide for the MB printf. Else
we get a panic integer divide fault in the kernel if the drive returns
a bogus zero secsize.
1994-03-14 23:09:34 +00:00
Rodney W. Grimes
c18a08b91d Gee, seems like I have commited this fix at least 3 times :-)
>From: Adam David <adam@veda.is>
Subject: SCSI timeout in sdopen()
Date: Sun, 6 Feb 1994 21:40:48 GMT

Index: sys FreeBSD-current
Reference: FreeBSD-current/sys/9

Description:
	sdopen() times out on slow SCSI devices. This code was moved into
	a different file, which might explain why it got missed again.
Repeat-By:
	using slow SCSI disks
1994-02-07 02:15:01 +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
David Greenman
e5be428b59 Fixed bug in dump code that caused the wrong physical page to be dumped. 1994-01-29 11:17:10 +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
Rodney W. Grimes
d7820b925e Remove bogus and missleading comment, this has been fixed.
-       /* blkcnt = initialise_me; */
1994-01-22 11:05:16 +00:00
David Greenman
7f8cb36869 "New" VM system from John Dyson & myself. For a run-down of the
major changes, see the log of any effected file in the sys/vm
directory (swap_pager.c for instance).
1994-01-14 16:25:31 +00:00