Commit graph

24923 commits

Author SHA1 Message Date
Justin T. Gibbs 705581e102 This is an MFC candidate.
aic7xxx.c:
	Correct code that traverses the phase table.  A much too quick
	push to staticize this structure resulted in non-functional
	lookup code.  This corrects the printing of the phase where
	a timeout occurred.

aic7xxx.reg:
	Use FIFOQWDEMP as the name for bit 5 of DFSTATUS just like
	the Adaptec data books.

aic7xxx.seq:
	Refine the 2.1 PCI retry bug workaround for certain, non-ULTRA2,
	controllers.  When the DMA of an SCB completes, it can take
	some time for HDONE to come true after MREQPEN (PCI memory request
	pending) falls.  If HDONE never comes true, we are in the hung
	state and must manually drain the FIFO.  We used to test HDONE for
	3 clock cycles to detect this condition.  This works on all of the
	hardware I can personally test.  Some controllers were reported
	to take 4 clock cycles, so the last version of this code waited
	4 clock cycles.  This still didn't work for everyone.  To fix this,
	I've adjusted the work around so that even if the hardware hasn't
	hung, but we run the work-around code, the result is a long winded
	way to complete the transfer, rather than a hang.
2001-03-19 04:40:35 +00:00
Robert Watson 516081f288 o Change options FFS_EXTATTR and options FFS_EXTATTR_AUTOSTART to
options UFS_EXTATTR and UFS_EXTATTR_AUTOSTART respectively.  This change
  reflects the fact that our EA support is implemented entirely at the
  UFS layer (modulo FFS start/stop/autostart hooks for mount and unmount
  events).  This also better reflects the fact that [shortly] MFS will also
  support EAs, as well as possibly IFS.

o Consumers of the EA support in FFS are reminded that as a result, they
  must change kernel config files to reflect the new option names.

Obtained from:	TrustedBSD Project
2001-03-19 04:35:40 +00:00
Chris D. Faulhaber 14721edabe Add the following POSIX 1003.1e functions and man pages:
o acl_calc_mask(): calculates the ACL mask entry associated with
    the given ACL.
  o acl_delete_entry(): remove a specified ACL entry from the given
    ACL.

Approved by:	rwatson
2001-03-19 03:19:51 +00:00
Dag-Erling Smørgrav a6221d8c82 Show the bzero() bandwidth in kBps instead of Bps; use u_int32_t instead
of long and int64_t; and print the result as an unsigned long. This should
make the output from the bzero() test more readable, and avoid printing a
negative bandwidth. Note that this doesn't change the decision process,
since that is based on time elapsed, not on computed bandwidth.
2001-03-19 00:28:04 +00:00
Orion Hodson dfe67249d2 pcm driver for S3 Sonicvibes chipset.
Reviewed by:	Cameron Grant
2001-03-19 00:26:41 +00:00
Ian Dowse f7cbf2b00e Use a module name of 'if_lnc' in both the PCI and ISA sections of
the driver. Doing this breaks the ability to unload the unneeded
parts of the driver (e.g unload the PCI section when using an ISA
card), but currently ifconfig(8) expects an interface `XXX' to have
a driver name of `if_XXX'.

PR:		kern/25582
Submitted by:	Alexander N. Kabaev <kabaev@mail.ru>, imp (apparently
		Warner suggested a similar fix some time ago).
Reviewed by:	paul (who would prefer to see ifconfig changed instead)
2001-03-18 17:44:23 +00:00
Ruslan Ermilov 4078ffb154 Make sure the cached forwarding route (ipforward_rt) is still up before
using it.  Not checking this may have caused the wrong IP address to be
used when processing certain IP options (see example below).  This also
caused the wrong route to be passed to ip_output() when forwarding, but
fortunately ip_output() is smart enough to detect this.

This example demonstrates the wrong behavior of the Record Route option
observed with this bug.  Host ``freebsd'' is acting as the gateway for
the ``sysv''.

1. On the gateway, we add the route to the destination.  The new route
   will use the primary address of the loopback interface, 127.0.0.1:

:  freebsd# route add 10.0.0.66 -iface lo0 -reject
:  add host 10.0.0.66: gateway lo0

2. From the client, we ping the destination.  We see the correct replies.
   Please note that this also causes the relevant route on the ``freebsd''
   gateway to be cached in ipforward_rt variable:

:  sysv# ping -snv 10.0.0.66
:  PING 10.0.0.66: 56 data bytes
:  ICMP Host Unreachable from gateway 192.168.0.115
:  ICMP Host Unreachable from gateway 192.168.0.115
:  ICMP Host Unreachable from gateway 192.168.0.115
:
:  ----10.0.0.66 PING Statistics----
:  3 packets transmitted, 0 packets received, 100% packet loss

3. On the gateway, we delete the route to the destination, thus making
   the destination reachable through the `default' route:

:  freebsd# route delete 10.0.0.66
:  delete host 10.0.0.66

4. From the client, we ping destination again, now with the RR option
   turned on.  The surprise here is the 127.0.0.1 in the first reply.
   This is caused by the bug in ip_rtaddr() not checking the cached
   route is still up befor use.  The debug code also shows that the
   wrong (down) route is further passed to ip_output().  The latter
   detects that the route is down, and replaces the bogus route with
   the valid one, so we see the correct replies (192.168.0.115) on
   further probes:

:  sysv# ping -snRv 10.0.0.66
:  PING 10.0.0.66: 56 data bytes
:  64 bytes from 10.0.0.66: icmp_seq=0. time=10. ms
:    IP options:  <record route> 127.0.0.1, 10.0.0.65, 10.0.0.66,
:                                192.168.0.65, 192.168.0.115, 192.168.0.120,
:                                0.0.0.0(Current), 0.0.0.0, 0.0.0.0
:  64 bytes from 10.0.0.66: icmp_seq=1. time=0. ms
:    IP options:  <record route> 192.168.0.115, 10.0.0.65, 10.0.0.66,
:                                192.168.0.65, 192.168.0.115, 192.168.0.120,
:                                0.0.0.0(Current), 0.0.0.0, 0.0.0.0
:  64 bytes from 10.0.0.66: icmp_seq=2. time=0. ms
:    IP options:  <record route> 192.168.0.115, 10.0.0.65, 10.0.0.66,
:                                192.168.0.65, 192.168.0.115, 192.168.0.120,
:                                0.0.0.0(Current), 0.0.0.0, 0.0.0.0
:
:  ----10.0.0.66 PING Statistics----
:  3 packets transmitted, 3 packets received, 0% packet loss
:  round-trip (ms)  min/avg/max = 0/3/10
2001-03-18 13:04:07 +00:00
Matthew N. Dodd 0623d11f51 - Add iso88025_ifdetach().
- Add support for 802.2 type IPX frames.
- Cleanup iso88025_output() and iso88025_output() a bit.
2001-03-18 05:43:25 +00:00
Matthew N. Dodd 09efa444d5 - Define payload length constants for 4Mbps and 16Mbps.
- Use explicit sizes for header structure fields.
- Use __attribute__ ((__packed__)) for header structures.
- Define struct iso88025_rif; for future use.
- Prototype upcoming iso88025_ifdetach()
- Get rid of __P() constructs in prototypes.
2001-03-18 05:41:07 +00:00
Robert Watson 3938ca1cc4 o Caused FFS_EXTATTR_AUTOSTART to scan two sub-directories of ".attribute"
off of the file system root: "user" for user attributes, and "system"
  for system attributes.  When the scan occurs, attribute backing files
  discovered in those directories will be started in the respective
  namespaces.  This re-introduces support for auto-starting of user
  attributes, which was removed when the "$" prefix for system attributes
  was replaced with explicit namespacing.

  For users of the TrustedBSD UFS POSIX.1e ACL code, you'll need to:
    mv ${FSROOT}/'$posix1e.acl_access' ${FSROOT}/system/posix1e.acl_access
    mv ${FSROOT}/'$posix1e.acl_default' ${FSROOT}/system/posix1e.acl_default

  For users of the TrustedBSD POSIX.1e Capability code, you'll need to:
    mv ${FSROOT}/'$posix1e.cap' ${FSROOT}/system/posix1e.cap

  For users of the TrustedBSD MAC code, you'll need to:
    mv ${FSROOT}/'$freebsd.mac' ${FSROOT}/system/freebsd.mac

  Updated versions of relevant patches will be released in the near
  future.

Obtained from:	TrustedBSD Project
2001-03-18 04:04:23 +00:00
Bosko Milekic 9612101e4c Fix a couple of things in the internal mbuf allocation interface:
- Make sure that m_mballoc() really doesn't allow over nmbufs mbufs to
  be allocated from mb_map. In the case where nmbufs-reserved space is not
  an exact multiple of PAGE_SIZE (which it should be, but anyway...), we
  hold nmbufs as an absolute maximum which need not ever be reached.

- Clean up m_clalloc(); make it more consistent in the sense that the first
  argument `ncl' really means "the number of clusters ensured to be allocated"
  and not "the number of pages worth of clusters to be allocated," as was
  previously the case. This also makes it consistent with m_mballoc() as well
  as the comment that preceeds it.

Reviewed by: jlemon
2001-03-17 23:23:24 +00:00
Cameron Grant c6c3b893e5 destroy child devices on detach to prevent ever-increasing numbers of
pcm/midi devices trying to attach if the module is repeatedly loaded and
unloaded.
2001-03-17 16:04:25 +00:00
KATO Takenori e2e953a675 Merged from sys/i386/conf/GENERIC revision 1.305 (moved the fxp driver
into the miibus section.)
2001-03-17 14:04:24 +00:00
Poul-Henning Kamp 8a24546c85 Add a new entrypoint to the hashes in libmd:
char *
  FooFileChunk(const char *filename, char *buf, off_t offset, off_t length)
Which only hashes part of a file.
Implement FooFile() in terms of this function.

Submitted by:	roam
2001-03-17 10:00:50 +00:00
Peter Wemm 6eb39ac8fc Use a generic implementation of the Fowler/Noll/Vo hash (FNV hash).
Make the name cache hash as well as the nfsnode hash use it.

As a special tweak, create an unsigned version of register_t.  This allows
us to use a special tweak for the 64 bit versions that significantly
speeds up the i386 version (ie: int64 XOR int64 is slower than int64
XOR int32).

The code layout is a little strange for the string function, but I was
able to get between 5 to 10% improvement over the original version I
started with. The layout affects gcc code generation choices and this way
was fastest on x86 and alpha.

Note that 'CPUTYPE=p3' etc makes a fair difference to this.  It is
around 45% faster with -march=pentiumpro on a p6 cpu.
2001-03-17 09:31:06 +00:00
Peter Wemm be1d4058eb Dramatically improve the **lame** nfs_hash(). This is based on the
Fowler / Noll / Vo Hash (http://www.isthe.com/chongo/tech/comp/fnv/).

This improves hash coverage a *massive* amount.  We were seeing one
set of machines that were using 0.84% of their 131072 entry nfsnode
hash buckets with maximum chain lengths of up to ~500 entries.  The
machine was spending nearly 100% of its time in 'system'.
A test with this has pushed the coverage from a few perCent up to 91%
utilization with a max chain length of 11.

Submitted by:  David Filo
2001-03-17 05:43:01 +00:00
Scott Long d383383e6f Fix the building of the aac driver as a module. Add a comment about enabling
debug information for the driver.
2001-03-17 04:42:33 +00:00
Yoshihiro Takahashi 0197892d6a Always call resource_int_value function for getting portsize and msize.
It was not set resource size (portsize/msize) if resource address was set.

This is MFC candidate.
2001-03-17 04:23:12 +00:00
Jonathan Lemon 469961321f Really fix NWAY negotiation for the 82553 PHY. Locking down the
media interface selection should not imply disabling NWAY negotiaton
as well.

Problem pointed out by: peter
2001-03-17 02:50:20 +00:00
Justin T. Gibbs da4c1ce305 This is an MFC candidate.
Add the AAC_DEBUG option to enable debugging in the aac driver.

Correct a race condition in the interrupt handler where the
controller may queue a fib to a response queue after the driver
has serviced the queue but before the interrupt is cleared.
This could leave a completed fib stranded in the response queue
unless another I/O completed and generated another interrupt.

Reviewed by:	msmith
2001-03-17 00:12:15 +00:00
Justin T. Gibbs acf1b64c89 Add the AAC_DEBUG option to enable debugging in the aac driver.
Reviewed by:	msmith
2001-03-17 00:09:47 +00:00
Jonathan Lemon 4d286823c5 When doing a recv(.. MSG_WAITALL) for a message which is larger than
the socket buffer size, the receive is done in sections.  After completing
a read, call pru_rcvd on the underlying protocol before blocking again.

This allows the the protocol to take appropriate action, such as
sending a TCP window update to the peer, if the window happened to
close because the socket buffer was filled.  If the protocol is not
notified, a TCP transfer may stall until the remote end sends a window
probe.
2001-03-16 22:37:06 +00:00
Kenneth D. Merry 76db0ab017 Fix a few things in the aic(4) driver:
- enable 10MHz (fast SCSI) operation on boards that support it.  (only
   aic6360 boards with fast SCSI enabled can do it)

 - bounds check sync periods and offsets passed in from the transport layer

 - tell the user which resource allocation failed (for the ISA probe) if we
   weren't able to allocate an IRQ, DRQ or I/O port.
2001-03-16 22:20:19 +00:00
Kenneth D. Merry e35550e2bc Fix inquiry length detection for the ses(4) driver. It was using the
inq_len member of the ccb_getdev structure, but we've never filled that
value in..

So we now get the length from the inquiry data returned by the drive.
(Since we will fetch as much inquiry data as the drive claims to support.)

Reviewed by:	mjacob
Reported by:	Andrzej Tobola <san@iem.pw.edu.pl>
2001-03-16 22:16:54 +00:00
Andrew Gallatin 283da0012f prevent gdb from panic'ing an alpha with "mutex Giant not owned"
reviewed by: jhb
2001-03-16 21:44:21 +00:00
Mike Smith eeba0d1008 Fix a typo which would cause containers between 1GB and 2GB to have the wrong
geometry reported.

Submitted by:	mark tinguely <tinguely@web.cs.ndsu.NoDak.edu>
2001-03-16 21:43:32 +00:00
Cameron Grant bd22a64c45 fix a typo preventing the second dma channel being released
use isa_dma_release when releasing dma channels
2001-03-16 21:04:14 +00:00
Cameron Grant effbadb7eb don't leak memory allocated for feeders at module unload
kill the fake channel when unregistering
2001-03-16 20:58:44 +00:00
Poul-Henning Kamp 462b86fe91 <sys/queue.h> makeover. 2001-03-16 20:00:53 +00:00
Poul-Henning Kamp ccd6f42dc9 Fix a style(9) nit. 2001-03-16 19:36:23 +00:00
Hajimu UMEMOTO eb44ab84e0 nuke IPSEC_SRCSEL which does not do the right thing.
adjust state->ro if the tunnel endpoint is offlink.
KAME PR 233.

PR:		kern/21079
2001-03-16 17:52:48 +00:00
Jonathan Lemon 32de04d557 Enable some undocumented bits in the DP83840 PHY, which is needed
when using it with the Intel fxp driver.

Tested by: peter, Ollivier Robert <roberto@eurocontrol.fr>,
	   Peter Schultz <pete@jocose.org>
2001-03-16 14:17:02 +00:00
Søren Schmidt 538845ea72 Sigh, try to get this in sync with an offical src tree...
I hate it when this happens...
2001-03-16 13:08:19 +00:00
Søren Schmidt 48c1424385 Remove the now defunct ATA_ENABLE* options
Spotted by: phk
2001-03-16 11:52:25 +00:00
Jun Kuriyama f13bb83292 Merge from kame (1.175 -> 1.176):
cope with freebsd4 bridge code.
2001-03-16 10:58:16 +00:00
Warner Losh d6f40bb4b7 add cnw driver to notes/lint 2001-03-16 07:29:58 +00:00
Warner Losh b21d8bdad9 Add cwn driver 2001-03-16 07:27:49 +00:00
Warner Losh fc0f791a64 Commit port of cnw driver from Hiroyuki Aizu-san. This driver
supports Xircom netwave series of cards.  I have one of these cards
(but am trying to find one or two to test with), but it compiles and
aizu-san says it works.

I don't know if this supports 802.11 or not.  I've seen conflicting
information on this.

Submitted by: Hiroyuki Aizu <aizu@jaist.ac.jp>
Obtained from: NetBSD
2001-03-16 07:25:42 +00:00
Søren Schmidt 8fb0d5e891 Remove the SMART ioctls, they are not in the official sources yet..
This should restore world...
2001-03-16 07:23:59 +00:00
Warner Losh cc60620649 Resync to GENERIC. This backs out the spammage that I committed wrt
killing ipv6 and some other things.

This makes GENERIC and NEWCARD the same, with OLDCARD stuff commented
out and the NEWCARD stuff included.  For the moment, pcic is commented
out (which has a old).  Plus invariants.  Plus ddb.
2001-03-16 06:33:44 +00:00
Søren Schmidt 2186ce6742 Hmm, the last commit apparently only made it halfways 2001-03-15 16:43:55 +00:00
Søren Schmidt 364a86d049 Remove the ATA_ENABLE_ATAPI_DMA, ATA_ENABLE_WC and ATA_ENABLE_TAGS
options, use the tuneables listed in ata.4 instead.
2001-03-15 15:37:26 +00:00
Søren Schmidt a2dca80a1d Provide the interface to atacontrol and associated logic.
see atacontrol(8) for more.

Also the ATA_ENABLE_ATAPI_DMA, ATA_ENABLE_WC and ATA_ENABLE_TAGS
options are gone, use the tuneables listed in ata.4 instead from
the loader (this makes it possible to switch off DMA before the
driver has to touch the devices on broken hardware).
2001-03-15 15:36:25 +00:00
Søren Schmidt 2d0bee4493 Add the ata control device. 2001-03-15 15:26:38 +00:00
Ruslan Ermilov 089cdfad78 net/route.c:
A route generated from an RTF_CLONING route had the RTF_WASCLONED flag
  set but did not have a reference to the parent route, as documented in
  the rtentry(9) manpage.  This prevented such routes from being deleted
  when their parent route is deleted.

  Now, for example, if you delete an IP address from a network interface,
  all ARP entries that were cloned from this interface route are flushed.

  This also has an impact on netstat(1) output.  Previously, dynamically
  created ARP cache entries (RTF_STATIC flag is unset) were displayed as
  part of the routing table display (-r).  Now, they are only printed if
  the -a option is given.

netinet/in.c, netinet/in_rmx.c:

  When address is removed from an interface, also delete all routes that
  point to this interface and address.  Previously, for example, if you
  changed the address on an interface, outgoing IP datagrams might still
  use the old address.  The only solution was to delete and re-add some
  routes.  (The problem is easily observed with the route(8) command.)

  Note, that if the socket was already bound to the local address before
  this address is removed, new datagrams generated from this socket will
  still be sent from the old address.

PR:		kern/20785, kern/21914
Reviewed by:	wollman (the idea)
2001-03-15 14:52:12 +00:00
Søren Schmidt 009344d130 Add new ATA specific file, to be used with the upcoming atacontrol. 2001-03-15 13:56:08 +00:00
Peter Wemm 5cf1e3c8c0 Add a placeholder for the ServerWorks OSB4 device id. The SMBus
interface on this chip is compatable with the PIIX4.  The catch is that
this interferes with isab0 which wants to attach to the same PCI node.
It seems to work, but we only tested it on systems with no ISA cards.
2001-03-15 06:56:51 +00:00
Peter Wemm 3e481a771a The serverworks OSB4 pci->isa bridge has the same mapping register at
offset 0x90 for the SMBus device as the PIIX4.
2001-03-15 06:51:45 +00:00
Peter Wemm 50e2347e68 Kill the 4MB kernel limit dead. [I hope :-)].
For UP, we were using $tmp_stk as a stack from the data section.  If the
kernel text section grew beyond ~3MB, the data section would be pushed
beyond the temporary 4MB P==V mapping.  This would cause the trampoline
up to high memory to fault.  The hack workaround I did was to use all of
the page table pages that we already have while preparing the initial
P==V mapping, instead of just the first one.
For SMP, the AP bootstrap process suffered the same sort of problem and
got the same treatment.

MFC candidate - this breaks on 4.x just the same..

Thanks to:	Richard Todd <rmtodd@ichotolot.servalan.com>
2001-03-15 05:10:06 +00:00
Peter Wemm 6fe01250f4 Jake essentially rewrote this. It is not by any stretch of the
imagination a derivative of what I did before.
2001-03-15 05:02:08 +00:00