Commit graph

11291 commits

Author SHA1 Message Date
Gary Palmer b177082524 Add the ISP Qlogic SCSI card to the list of known devices. 1998-08-02 09:32:52 +00:00
David Greenman 35517ab7e8 Added 82555B support for media status. 1998-08-02 00:33:38 +00:00
David Greenman 3614387536 Reordered fxp_softc for optimal cacheline behavior. 1998-08-02 00:29:15 +00:00
David Greenman b63e51cae4 Killed unused variable/assignment. 1998-08-02 00:28:45 +00:00
KATO Takenori 7ea1329d05 Sync with sys/i386/boot/netboot/main.c revision 1.23. 1998-08-01 12:20:59 +00:00
Peter Wemm c5fa8d1a2c If we get an ENOBUFS from the network, it's normally transient network
interface congestion (eg: nfs over a ppp link, etc).  Don't log these
for UDP mounts, and don't cause syscalls to fail with EINTR.
This stops the 'nfs send error 55' warnings.

If the error is because the system is really hosed, this is the least
of your problems...
1998-08-01 09:04:02 +00:00
Peter Wemm 9de9737f47 Fix a compile error if IPFIREWALL_FORWARD active without IPDIVERT. 1998-08-01 08:44:33 +00:00
Doug Rabson e35d857d64 Cosmetic change to driver registration. 1998-07-31 09:20:35 +00:00
Doug Rabson bb54cacb41 Make it possible to have a driver registered with more than one parent bus. 1998-07-31 09:18:52 +00:00
Doug Rabson bb6e8960ac Only perform byte/word accesses in the correct EV56 memory space.
Sparse macros have moved to <machine/swiz.h>.
Fix sparse memory access so that it actually works as intended.
Tidy up sparse configuration access slightly.
1998-07-31 09:17:51 +00:00
Doug Rabson 1ba83e535e Add definitions of EV56 INT1/INT2/INT4/INT8 memory spaces. 1998-07-31 09:14:49 +00:00
Doug Rabson df317c7516 Merge with i386/isa/diskslice_machdep.c 1.30 1998-07-31 09:13:25 +00:00
Poul-Henning Kamp 948cb33b78 TFTP_ACK goes to port 69 (default tftp port) and tftpd says 'Timeout'.
It will be sent to source port of received packet.

PR:		7442
Reviewed by:	phk
Submitted by:	Sergey Shkonda <serg@bcs.zp.ua>
1998-07-31 09:03:15 +00:00
Poul-Henning Kamp b3816f9e60 In sys/scsi/st.c, st_close() does not check for errors from calling
st_write_filemarks().  This means that it is possible to write a file
on the tape for which all the writes and the close return without
errors, but the all bits did not make it onto the tape.

PR:		741
Reviewed by:	phk
Submitted by:	Andrew Heybey <ath@niksun.com>
1998-07-31 09:00:39 +00:00
Bruce Evans 89785a1654 Fixed printf format errors. 1998-07-30 17:40:45 +00:00
Bruce Evans 85badd7eba Fixed printf format errors. 1998-07-30 17:12:39 +00:00
Bruce Evans 483de21480 Use the slice interfaces for SCSI cdroms. This centralizes handling
of some disk ioctls and uniformizes bounds checking in the strategy
routine.  EOF handling got fixed as a side effect.  The changes
are similar to old changes for SCSI disks, except slices and labels
are not searched for on the disk and the in-core label has a few
more details (mostly just for backwards compatibility).  Bugs in
the in-core label had to be fixed to get dsopen() to accept it.
The slice interfaces had to support large sectors for all this to
work.
1998-07-30 17:05:10 +00:00
Bruce Evans 34e9dea435 Added a flags arg to dsopen() and updated drivers. The DSO_ONESLICE
and DSO_NOLABELS flags prevent searching for slices and labels
respectively.  Current drivers don't set these flags.  When
DSO_NOLABELS is set, the in-core label for the whole disk is cloned
to create an in-core label for each slice.  This gives the correct
result (a good in-core label for the compatibility slice) if
DSO_ONESLICE is set or only one slice is found, but usually gives
broken labels otherwise, so DSO_ONESLICE should be set if DSO_NOLABELS
is set.
1998-07-30 15:16:06 +00:00
KATO Takenori 523bea959c Sync with sys/i386/isa/fd.c revision 1.120. 1998-07-30 09:01:12 +00:00
Doug Rabson 82153dc247 Change load address to 0xfffffc0000300000 to help support AS200. 1998-07-30 08:12:14 +00:00
Doug Rabson 25729629a2 Remove spurious printf. 1998-07-30 08:10:26 +00:00
Julian Elischer 49cc016a39 add anti-panic workaround from chris radek (cradek@in221.inetnebr.com)
Not sure why this is needed but but does stop crashes.
1998-07-30 03:22:52 +00:00
Alexander Langer f7aad78d24 Typo fix: teh --> (the|they) 1998-07-30 02:27:41 +00:00
Bruce Evans 7010319f16 Fixed sign extension bugs awoken by changing speed_t to an unsigned
type.  19200, 1200 and other relatively uninteresting speeds were
broken.

Submitted by:	Rob Mallory <rmallory@qualcomm.com>
1998-07-29 18:48:20 +00:00
Doug Rabson 8a8a13c8f0 Only access an int for READU/WRITEU since that is what ptrace is declared to
return.
1998-07-29 18:41:30 +00:00
Doug Rabson a9d81f7c5c Default to FreeBSD if no brand detected. This makes life easier when
bootstrapping from NetBSD/alpha.
1998-07-29 18:39:35 +00:00
Doug Rabson ab1fdd6291 Fix msgbuf so that it actually works properly. 1998-07-29 18:36:29 +00:00
Bruce Evans d974cf4dda Fixed printf format errors. 1998-07-29 17:38:14 +00:00
Bruce Evans e4e6ae1366 Fixed print format errors. 1998-07-29 16:43:00 +00:00
Bruce Evans e33e271f08 Fixed printf format errors.
Use offsetof() instead of null pointer hacks.  Use a home made offsetof()
because including <stddef.h> is not permitted in LKMs.
1998-07-29 15:50:41 +00:00
Bruce Evans e0e2794cd8 Honor NOSHARED for tools. All tools should be built static for
`make world' to avoid problems with picking up (new) target or (stale)
host shared libraries.

Don't honor -static in LDFLAGS for linking LKMs.  LDFLAGS is not
actually for ld, but we use it anyway, and must prevent -static being
misinterpreted as -s.

Don't hide any of the link steps.
1998-07-29 14:19:48 +00:00
Bruce Evans 5c1a1eae83 Fixed error handling:
- Call isa_dmadone() whenever necessary to stop DMA and/or free bounce
  buffers.  Undead DMA corrupted the malloc freelist fairly consistently
  in the following configuration: SLICE kernel, 2 floppy drives, no disk
  in fd0, disk in fd1.
- Don't call fdc_reset() from fd_timeout().  Doing so gave an "extra"
  interrupt which was usually misinterpreted as being for completion
  of the next FDC command; the interrupt for completion of the next
  FDC command was then usually misinterpreted...  There were further
  complications for interrupts latched by the soft-spl mechanism so
  that they were delivered after all the h/w interrupts went away.
  This caused at least wrong head settle delays and may be why the
  FreeBSD floppy driver seems to munch floppies more than most floppy
  drivers.  The reset was unnecessary anyway in cases that didn't have
  the bug described next, since is was repeated a little later for
  the IOTIMEDOUT state.  The state machine has complications to handle
  resets correctly, so just use it.
- Don't call retrier() from fd_timeout().  The IOTIMEDOUT state needs
  to be processed next, and it isn't valid to set to that state if
  retrier() has aborted the current transfer.  Doing so caused null
  pointer panics after the previous bug was fixed.

Improved error handling:
- If an i/o is aborted, arrange to reset in the state machine before
  doing the next i/o.  New fdc flag for this.  This fixes spurious
  warnings and lengthy busy-waiting for the next i/o.
- Split STARTRECAL into RESETCOMPLETE and STARTRECAL and only check
  for the results from reset if we actually reset.  This fixes spurious
  warnings for other paths to STARTRECAL.  [Oops, it may break reset
  handling for motor-off resets.]

Cleanups in fd_timeout():
- Renamed to fd_iotimeout() to make it clearer that it is only used
  for i/o.
- Don't handle the bp == 0 case.  This case can't happen for i/o.
- Don't check for controller-busy.  We know it must be.
- Don't print anything.  retrier() already prints too much for normal
  errors.
- Fudge the state differently so that the state machine advances
  fdc->retry and the status is invalid (perhaps this should fudge a
  valid state like the one for WP).
- Style fixes.
1998-07-29 13:00:42 +00:00
Bruce Evans f9a9c96c25 Centralized and optimized handling of large sectors. Centralized
checking of transfer sizes and alignments.

Old version tested with 2K-sectors on od disks by: Shunsuke Akiyama
<akiyama@kme.mei.co.jp>.
1998-07-29 11:15:54 +00:00
Bruce Evans ea0823f2c9 Use the slice-relative blkno in all parts of the label write
protection checks.  Using the partition-relative blkno in some
parts broke the write protection for partitions at unusual
offsets (only for partitions at offset 1 on i386's).
1998-07-29 08:24:23 +00:00
Kenjiro Cho 4f53e3cc7a update ATM driver. (base version: midway.c 1.67 --> 1.68)
several new features are added:
	- support vc/vp shaping
	- support pvc shadow interface

code cleanup:
	- remove WMAYBE related code.  ENI WMAYBE DMA doen't work.
	- remove updating if_lastchange for every packet.
	- BPF related code is moved to midway.c as it should be.
	  (bpfwrite should work if atm_pseudohdr and LLC/SNAP are
	  prepended.)
	- BPF link type is changed to DLT_ATM_RFC1483.
	  BPF now understands only LLC/SNAP!! (because bpf can't
	  handle variable link header length.)
	  It is recommended to use LLC/SNAP instead of NULL
	  encapsulation for various reasons.  (BPF, IPv6,
	  interoperability, etc.)

the code has been used for months in ALTQ and KAME IPv6.

OKed by phk long time ago.
1998-07-29 05:35:16 +00:00
Joerg Wunsch 57308494ec Make the logging of abnormally exiting processes optional by a sysctl.
PR:		kern/1711
Submitted by:	Nick Sayer <nsayer@kfu.com>
1998-07-28 22:34:12 +00:00
Brian Somers 5c3c780ffa pseudo-device ssc requires su.c (pseudo-device su)
Submitted by: woods@zeus.leitch.com (Greg A. Woods)
PR: 7413
1998-07-28 22:06:16 +00:00
Bruce Evans 1733a6c1df Set bp->b_resid for failed transfers in dscheck(). This is the
best place to set it, and the wd and wfd strategy routines don't
set it (for failed transfers) because they expect dscheck() to
initialize everything necessary.  dscheck() has always set B_ERROR,
but this is not quite sufficient, because b_resid is used by physio()
to decide how much of a B_ERROR'ed i/o was done.
1998-07-28 19:39:09 +00:00
Bruce Evans ce4fb6afc1 Set the disk type to SCSI in the in-core label for the whole disk. 1998-07-28 18:59:49 +00:00
Bruce Evans aa6db4230d Used daddr_t's, not ints, to store disk block numbers. Updated printf
formats and args to match.  Fixed old printf format errors (all related;
most were hidden by calling printf indirectly).

This change somehow avoids compiler bugs for 64-bit longs on i386's,
although it increases the number of 64-bit calculations.
1998-07-28 18:25:51 +00:00
Bruce Evans e539380ea8 Set p->p_switchtime to switchtime instead of to the current time in
fork_trampoline() if switchtime is valid.  This fixes not accounting
for the time between the previous context switch and and the current
time (when the forked child starts up here) in most cases - the time
is now counted in the child's runtime.  I think it actually fixes
all cases, and switchtime is always valid here, since there must have
been a context switch just before the forked child starts up.  Some
code should be removed if this is correct.  The check that switchtime
is valid sometimes gives a false negative because the check isn't
correct until the after the first context switch after the system
has been up for >= 1 second.
1998-07-28 17:55:37 +00:00
Bruce Evans aa839b4b07 Micro-optimized and cleaned up the clearing of switchtime in idle().
Cleaned up the conditionals in the disgusting SMP ifdef in idle().
1998-07-28 17:35:09 +00:00
Bruce Evans ccbbd9271b Fixed two spl nesting bugs. They caused (at least) the entire pageout
daemon to run at splvm() forever after swap_pager_putpages() is called
from vm_pageout_scan().

Broken in: rev.1.189 (1998/02/23)
1998-07-28 15:30:01 +00:00
Jonathan Lemon 525187f914 u_int --> unsigned int, remove (now unneeded) <sys/types.h> 1998-07-28 15:22:51 +00:00
Doug Rabson 51f14853fd Record the new physical address of the pcb in pmap_swapin_proc.
Third attempt at pmap_remove().  This one actually works properly :-).
1998-07-28 09:34:50 +00:00
Poul-Henning Kamp 358cb8ddc1 I have a PD drive (Matsushita PD/CD Drive LF-1600).
The machine can not recognize this PD drive
as neither PD drive nor CD-ROM Drive.
So I can not use CD-ROMs and PDs from FreeBSD.

PR:		7423
Reviewed by:	phk
Submitted by:	Takura Koyama <takura@popweb.ne.jp>
1998-07-28 09:03:37 +00:00
Jonathan Lemon f88a03565a Add wrappers for i386_*_ioperm, i386_vm86 so userland code does
not have to call sysarch() directly.
Added man pages for above, as well as sysarch()
1998-07-28 03:33:27 +00:00
Jonathan Lemon ec9ed6196a Fix an off-by-one error when setting the iomap bits.
Change struct i386_*_iomap to use ints instead of shorts/chars.
  (pointed out by bde long ago, prodded into action by msmith)
1998-07-28 03:29:32 +00:00
Alexander Langer f35f7d0dfd Style fixes and a bug fix: don't remove the exit handler if unmount
fails.

Submitted by:	bde
1998-07-27 22:47:17 +00:00
Bruce Evans bc9e7c3b42 Fixed double counting of runtime after a process exits. The last
timeslice of the exiting process was counted for both the exiting
process and the next process to run if the next process runs
immediately.

Broken in:	mostly in kern_clock.c rev.1.70 (1998/05/28)
1998-07-27 19:16:21 +00:00