Commit graph

19004 commits

Author SHA1 Message Date
Yoshinobu Inoue 9c275a58b3 Added ip6_forwarding check when prefix related ioctl is called.
(prefix related ioctl should only be called on router,
because host use dynamic address and prefix configuration mechanism,
and those prefix are managed separately with ones whih are assined
manually.)
2000-01-27 10:04:28 +00:00
Bruce Evans 6bfb820292 Quick fix for stack overflow when there are more than about 25 slices.
Using recursion to traverse the recursive data structure for extended
partitions was never good, but when slice support was implemented in
1995, the recursion worked for the default maximum number of slices
(32), and standard fdisk utilities didn't support creating more than
the default number.  Even then, corrupt extended partitions could
cause endless recursion, because we attempt to check all slices, even
ones which we don't turn into devices.

The recursion has succumbed to creeping features.  The stack requirements
for each level had grown to 204 bytes on i386's.  Most of the growth was
caused by adding a 64-byte copy of the DOSpartition table to each frame.
The kernel stack size has shrunk to about 5K on i386's.  Most of the
shrinkage was caused by the growth of `struct sigacts' by 2388 bytes
to support 128 signals.

Linux fdisk (a 1997 version at least) can now create 60 slices (4 standard
ones, 56 for logical drives within extended partitions, and it seems to
be leaving room to map the 4 BSD partitions on my test drive), and Linux
(2.2.29 and 2.3.35 at least) now reports all these slices at boot time.

The fix limits the recursion to 16 levels (4 + 16 slices) and recovers
32 bytes per level caused by gcc pessimizing for space.  Switching to
a static buffer doesn't cause any problems due to recursion, since the
buffer is not passed down.  Using a static buffer is wrong in general
because it requires the giant lock to protect it.  However, this problem
is small compared with using a static buffer for dsname().  We sometimes
neglect to copy the result of dsname() before sleeping.

Also fixed slice names when we find more than MAX_SLICES (32) slices.
The number of the last slice found was not passed passed recursively.
The limit on the recursion now prevents finding more than 32 slices
with a standard extended partition data structure anyway.
2000-01-27 05:11:29 +00:00
Archie Cobbs 5c63f81fd4 Add control message ASCII conversion for this node type. 2000-01-27 01:32:53 +00:00
Kirk McKusick 7881bb5d5f Add soft updates to the set of things being tagged. Syntax cleanup. 2000-01-27 01:22:06 +00:00
Matthew Dillon c9ef26814c Fix catastrophic bug in NQNFS related to UDP mounts. The 'nqhost'
struct contains a major union for which lph_slp was being initialized
    only for TCP connections, but accessed for all types of connections
    leading to a crash.  Also, a conditional controlling an nfs_slplock()
    call contained an improper paren grouping, causing a second crash in
    the UDP case.

    The nqhost structure has been reorganized and lph_slp has been made a
    normal structural field rather then a union field, and properly
    initialized for all connection types.

Approved by: jkh
2000-01-26 20:51:29 +00:00
Cameron Grant 45248baa3c handle simplex devices right 2000-01-26 20:27:45 +00:00
Robert Watson a3ffb0bb55 A few more touchups:
- clean up unneeded AFS ID type
- Add Coda, NTFS, NWFS ACL types
- Add acl_dup() prototype
- Remove acl_calc_mask, which belongs in the editing library
- Introduce posix1e.3, a man page introducing POSIX.1e library calls
  (more man pages to follow)
2000-01-26 16:15:48 +00:00
Peter Wemm 13ba9040aa Re-add vpo. I've just re-tested this in a 'make world' on a December
vintage system, well before the ppbus changes.  When I called it an
"example" module, I meant as an example for the rest of the ppbus client
drivers, not that it was worthless.  I'll mail my 5.8MB world.log to
anybody who doesn't believe me.

Wrongly accused by:	obrien
2000-01-26 15:15:50 +00:00
KATO Takenori cd1d380722 Synced with sys/i386/isa/isa_compat.h and pcaudio.c revisions 1.26 and
1.58, respectively.
2000-01-26 11:23:51 +00:00
KATO Takenori 3c7aa0b427 Synced with sys/i386/isa/npx.c rev 1.79. 2000-01-26 11:16:14 +00:00
Nick Hibma 2aff98945c Properly teardown the allocated and initialised stuff when an error
occurs (OHCIwas already done for UHCI).

Get rid of the usbus variable. It is confusing.

Align uhci_pci.c and ohci_pci.c again.
2000-01-26 10:52:27 +00:00
Bruce Evans 2f40e526a5 Improved English in the messages printed by diskerr().
Fixed some formatting bugs.
2000-01-26 10:28:23 +00:00
Nick Hibma 9e2bdb4369 Don't set ivars until we checked the return value from device_add_child. 2000-01-26 10:27:12 +00:00
Nick Hibma 06ffae8586 Add comments 2000-01-26 08:46:41 +00:00
Robert Watson 8f45e8c076 Minor fixes to library interface to improve POSIX.1e compliance. This
adds _np to a couple of function prototypes that provided more broad/useful
interfaces than POSIX.1e interfaces included.

Also, move from using a heuristic to identify POSIX.1e-semantic ACLs to
using different ACL types for non-POSIX.1e ACLs.  This should clean up the
existing fuzzy logic that determined when acl_sort() should be applied
before kernel submission.
2000-01-26 04:19:38 +00:00
David E. O'Brien 2fff585062 Remove `vpo' with a vengeance -- "EXAMPLE" modules have *NO* business
being hooked up to the build system, *COMPILABLE WORKING* modules do.

Not `make' tested by:	Peter
2000-01-26 02:05:16 +00:00
Mike Smith a6291d5558 Correctly initialise the available IRQ numbers in the APIC_IO case.
IRQ 2 was being unilaterally disallowed, which is only appropriate if
the interrupt hardware is the traditional chained PIC arrangement.

Reviewed by:	tegge (in principle)
2000-01-26 01:32:51 +00:00
Brian Somers f54537c6c0 Don't use ATM on the alpha - it #errors out.
Pointed out by: jdp
2000-01-26 01:08:03 +00:00
David E. O'Brien 2e3fb30989 if_tun is out of here -- it can come back with it stops breaking the
Alpha build.
2000-01-26 00:47:45 +00:00
Doug Rabson 589672bd68 The ppc driver has moved to sys/isa. 2000-01-25 22:26:44 +00:00
Doug Rabson 9c26dc2b43 Get the ppc driver from sys/isa instead of sys/i386/isa. 2000-01-25 22:25:52 +00:00
Doug Rabson 150630c449 Make this lot build on alpha. 2000-01-25 22:23:48 +00:00
Doug Rabson d64d73c906 * Don't use ivars to access resources, bus_set/get_resource is much better.
* First approximation of making this work on alpha (not working yet).
2000-01-25 22:21:45 +00:00
Doug Rabson 98fc43f74a Convert pca driver to newbus and add PnP ids. 2000-01-25 21:58:43 +00:00
Doug Rabson a43a8fd704 Use device_printf() instead of device_print_prettyname(). 2000-01-25 21:39:20 +00:00
Matt Jacob c7abe45ece Because we added 4 bytes to the inquiry data size, we need to
rev the CAM revision too. Tsk.
Submitted by:	ken@freebsd.org
2000-01-25 21:24:52 +00:00
Søren Schmidt 0817db9f98 Retry a bit more agressively on the atapi identify.
Try to support older systems reporting irq0 for the first channels.

Support sharing of the std interrupts (says peter :) )

Dont use READ_CD on normal data reads (2048 bytes), too many old drives
doesn't support this command even if the std says "shall" :(, but still
use READ_CD on all other blocksizes.

Add the geometry to the ad probe, its still usefull.
2000-01-25 20:14:51 +00:00
Peter Wemm ba6017903c Fix left over references to things like 'ata0' in comments.
Submitted by:	Jim Bloom <bloom@acm.org>
2000-01-25 18:56:41 +00:00
Nick Hibma f68d3a9c5c Add usbd_clear_endpoint_toggle(pipe) function.
This is needed to implement a asynchronous callback for clear endpoint
stall, needed for the umass driver.
2000-01-25 18:40:39 +00:00
Nick Hibma ad705781e1 Correct subroutine names in DPRINTF 2000-01-25 18:37:58 +00:00
Matt Jacob c19cf05d0d Redo the SHORT INQUIRY length stuff to be a bit cleaner.
Obtained from:gibbs@freebsd.org
2000-01-25 18:25:22 +00:00
Matthew Dillon 6e8b65472e The swapdev_vp changes made to rip out the swap specfs interaction
also broke diskless swapping.  Moving the swapdev_vp initialization
    to more commonly run code solves the problem.

PR: kern/16165
Additional testing by: David Gilbert <dgilbert@velocet.ca>
2000-01-25 17:49:12 +00:00
Kenneth D. Merry 56e3e24bfd When autosense fails, make sure we retry the command.
PR:		kern/15975
Submitted by:	Carl Mascott <cmascott@world.std.com>, n_hibma
2000-01-25 17:45:02 +00:00
Matt Jacob 937097d9cc Propagate sense data through from SIM (if there) and mark the CTIO
that there's sense to send with status (if the SIM does it), and
then clear any pending contingent allegiance state for this initiator
if the SIM actually did send the sense data.

Widen MAX_INITITATORS to 256- that's still not quite right, but will
accomodate the widest Fibre Channel support in FreeBSD now.

Obtained from:(partially) gibbs@freebsd.org
2000-01-25 17:42:27 +00:00
Matt Jacob 471da22662 Propagate sense data through from SIM (if there) and mark the CTIO
that there's sense to send with status (if the SIM does it).
Reviewed by:	gibbs@freebsd.org
2000-01-25 17:39:09 +00:00
Matt Jacob 366f55288e Go for the gusto and do the full 256 bytes for inquiry data.
Obtained from:gibbs@freebsd.org
2000-01-25 17:37:02 +00:00
Peter Wemm 931e989797 Always leave SP_DCEN on (monitor DCD). Otherwise the firmware *really*
does ignore DCD.  Even TIOCMGET cannot read DCD as the firmware doesn't
report it.  This has pretty interesting effects for ppp(8) which runs
in clocal mode and polls carrier (!).  (Specialix's linux driver does
this too)

Also update the firmware to 3.0.6 for the SX cards, as apparently there
was a problem with floating (disconnected) DCD pins causing stray carrier
transitions, especially at port open time.

It seems to work here, and carrier loss is detected nearly immediately
rather than having to wait for a LQR timeout (a few minutes) before ppp(8)
gives up.

DCD problem noted by: nsayer
2000-01-25 16:45:54 +00:00
Bruce Evans b10e61549b Remove i8042.h. This file is an improvement on its successors, but it
has been unused for too long.
2000-01-25 11:16:16 +00:00
Bruce Evans f4675a30ed Don't follow null pointers if we somehow have a null devswitch entry
despite having a non-null cn_tab entry.  This case now works the same
as if there is no physical console, except i/o at the kernel printf
level may still work.  This frees drivers of physical console drivers
from the responsibility of attaching the device no matter what.
2000-01-25 09:20:08 +00:00
Bruce Evans be16a3aba0 Fixed the profiling version ALTENTRY(). Again. The previous version
didn't set up the frame pointer before calling mcount, and then jumped
to the wrong place in ENTRY() to defeat the point of the jump.
2000-01-25 09:01:55 +00:00
Bruce Evans 615e071ef3 Removed ssc and su. 2000-01-25 08:46:15 +00:00
Matt Jacob 8dc7582ba5 put things in place for jumbograms 2000-01-25 06:09:53 +00:00
Matt Jacob 110bbc0dcf define jumbo packet size 2000-01-25 04:11:33 +00:00
Archie Cobbs 931f2cebff Reserve a major number for /dev/skip, used by the "security/skip" port. 2000-01-25 02:11:02 +00:00
Yoshinobu Inoue 69a3468578 Avoid m_len and m_pkthdr.len inconsistency when changing m_len
for an mbuf whose M_PKTHDR is set.

PR: related to kern/15175
Reviewed by: archie
2000-01-25 01:26:47 +00:00
Yoshinobu Inoue e2de10abe4 Fix the bug that IPv4 ttl is not initialized when AF_INET6 socket is used
for IPv4 communication.(IPv4 mapped IPv6 addr.)
Also removed IPv6 hoplimit initialization because it is alway done at
tcp_output.

Confirmed by: Bernd Walter <ticso@cicely5.cicely.de>
2000-01-25 01:05:18 +00:00
Søren Schmidt fe08efdcfb General cleanup.
Dont be so verbose in the probe, only ONE line printed now, to get more
info boot verbose. Centralise most printf's in ata-all & ata-dma to use
the ata_printf function, it saves alot of codelines.

Repeat the identify command if drive fails the first.

Protect the timeout functions with splbio.

Dont update the transfer details before we are sure the transfer
succeded, this way they are proberly retried on errors.

Move the handling of next_writeable to userland.

Use the READ_CD command to read CD's. That enables us to read _anything_
via the normal read/write interface. This kindof obsoletes the READAUDIO
ioctl, but we keep that for now.
2000-01-24 20:45:24 +00:00
Brian Somers 367d34f853 Move the *intrq variables into net/intrq.c and unconditionally
include this in all kernels.  Declare some const *intrq_present
variables that can be checked by a module prior to using *intrq
to queue data.

Make the if_tun module capable of processing atm, ip, ip6, ipx,
natm and netatalk packets when TUNSIFHEAD is ioctl()d on.

Review not required by: freebsd-hackers
2000-01-24 20:39:02 +00:00
Bill Paul f43d9309a5 Add support for DM9102A boards with Davicom DM9801 HomePNA PHYs. 2000-01-24 17:19:37 +00:00
Peter Wemm d224cddc38 Copy i386/isa/atapi-cd.[ch] to a new name so that it doesn't have the
same object file (atapi-cd.o) as the ata drivers. I'd have called it
wcd.[ch], but there's already one of those in the Attic that we can't
clobber - the good names are taken.
Fix building so that it can be compiled into LINT alongside ata.

Requested by:	bde
2000-01-24 17:16:03 +00:00