Commit Graph

121648 Commits

Author SHA1 Message Date
Gleb Smirnoff
78b6fc8d2d Make an example command correct and copyable to terminal.
Submitted by:	ru
2006-01-27 11:56:59 +00:00
Gleb Smirnoff
f6883559be Update NGM_PPPOE_GETMODE and NGM_PPPOE_SETMODE descriptions, since
new D-Link compat mode is introduced.
2006-01-27 11:28:32 +00:00
Pawel Jakub Dawidek
b322d85d53 Call NDFREE() only when vn_open() succeeded.
MFC after:	3 days
2006-01-27 11:27:55 +00:00
Pawel Jakub Dawidek
f220f7afa6 Grr. Backout previous change. vn_open_cred() will call NDFREE() on failure. 2006-01-27 11:25:06 +00:00
Pawel Jakub Dawidek
970c7ca2ef Don't forget to call NDFREE(9) in case of vn_open_cred() failure.
MFC after:	3 days
2006-01-27 11:19:53 +00:00
Gleb Smirnoff
1c8aa594a8 o Introduce D-Link compat mode, that is default to off and can be set
by NGM_PPPOE_SETMODE message. When D-Link compat mode is on, we will
  broadcast PADI with empty Service-Name to all listening hooks.
o Rewrite the compatibility options. Before we had two modes - standard
  and non-standard (aka 3Com). Now we have standard mode and two compat
  flags, that can be combined.
o Be consistent and do s/STUPID/3COM/g. I don't say that 3Com mode isn't
  stupid, just want to make code easier to read.
2006-01-27 10:56:22 +00:00
John-Mark Gurney
7ea60cedb5 add an option BKTR_USE_FREEBSD_SMBUS that enables compiling the module
with same option...

MFC after:	3 days
2006-01-27 09:08:32 +00:00
Roman Kurakin
2ee4be8ec6 Initial import of ce(4) driver for Cronyx Tau-PCI/32 adapters.
Not yet connected to the build.
2006-01-27 09:02:09 +00:00
Hajimu UMEMOTO
d042befb98 make wall(1) work with pts. 2006-01-27 08:52:14 +00:00
John-Mark Gurney
bb80263411 if we are compiling with smbus support, properly depend upon the iic and
smbus modules, otherwise as a module you can't kldload bktr...

MFC after:	3 days
2006-01-27 08:42:48 +00:00
Alan Cox
82eedee4a4 Use the new macros abstracting the page coloring/queues implementation.
(There are no functional changes.)
2006-01-27 08:35:32 +00:00
Warner Losh
8d0ed6fe4a Create mediachg functions for the 3c503 and hpp cards. This is used
to properly configure the right interface to use.

Also call the mediachg function when we set flags UP and are already
running.  If this were a pure ifmedia driver, we'd not need to do this
since we'd be ignoring the linkX flags.

This reduces the number of ifdefs to support sub-devices a little as a
nice side effect.  It also reduces the number of hpp interfaces
exposed by 33%.
2006-01-27 08:25:47 +00:00
Warner Losh
6d4833ddbe Style(9) issue: return (foo); 2006-01-27 08:10:36 +00:00
David Xu
6d53aa6297 Just like dofilewrite(), call bwillwrite before fo_write. 2006-01-27 08:02:25 +00:00
Warner Losh
0fbdbd5068 Transition from ALTPHYS to LINK2. We already document in the ed(4)
man page that the ifconfig option link2 is used to disable the AUI
transceiver on the 3com boards (should also say HP PC Lan+).  This
makes the connection clearer.

Add a note about why we set this flag prior to attaching the device.
We never set or clear the flag later, only test it.  There can be no
races here, but this might be asthetically displeasing to some.  Also
note that we may no longer need to have this knob at all as we may be
able to do it with the more sophisticated rc.d scripts we have today I
think the only reason it is there is because we didn't used to allow
its proper setting when configured to get the IP address via DHCP.

I'll note that this would be better handled by using ifmedia for all
ed cards, not just those with a miibus...
2006-01-27 08:00:40 +00:00
Warner Losh
e6c59e911f minor nit in comment about what kind of flags these are 2006-01-27 07:51:26 +00:00
Jason Evans
4fae5e8fda Remove unwarranted uses of 'goto'. 2006-01-27 07:46:22 +00:00
Alan Cox
997e1c252b Use the new macros abstracting the page coloring/queues implementation.
(There are no functional changes.)
2006-01-27 07:28:51 +00:00
Jason Evans
a3d0ab47a6 Add NO_MALLOC_EXTRAS, so that various extra features that can cause
performance degradation can be disabled via something like the following
in /etc/malloc.conf:

	CFLAGS+=-DNO_MALLOC_EXTRAS

Suggested by:	deischen
2006-01-27 04:42:10 +00:00
Jason Evans
7138ef5b1d Fix the type of a statistics counter (unsigned --> unsigned long). 2006-01-27 04:36:39 +00:00
David Xu
03d66b36c7 return final error code in aio_return rather than a hardcoded 0. 2006-01-27 04:14:16 +00:00
Joseph Koshy
3d425b66e4 Note that options are set using sh(1) syntax.
MFC after:	3 days
2006-01-27 02:46:08 +00:00
Jason Evans
842e5e3d91 Clean up statistics gathering and printing. 2006-01-27 02:36:44 +00:00
Ariff Abdullah
86b391b2e1 Enable full duplex operation since it works and to solve panic issue.
PR:		kern/91992
MFC after:	2 days
2006-01-27 02:01:27 +00:00
Matt Jacob
09ae127f7d Hackamatic: turn off target mode on Sparc64 with KLD_MODULE- this triggers
a compiler error I have no idea what its about.

This should unbreak tinderbox for now.
2006-01-27 00:46:10 +00:00
Olivier Houchard
f94cf2b10b Take into account that bits 0x0000ff00 can't be used for minor. 2006-01-27 00:21:48 +00:00
Doug Ambrisko
4302d37921 When the RAID firmware returns a failure, don't hard error the result.
This is important with MegaLib, when issuing a GET_REBUILD_PROG since
it returns an error if the drive is not in rebuild state.

This will be MFC'ed shortly.

Submitted by:	ps
Reviewed by:	scottl
Found by:	ambrisko
2006-01-26 22:39:12 +00:00
Olivier Houchard
d425dbec89 Fix a typo : deivce => device
Spotted by:	rwatson
2006-01-26 21:48:50 +00:00
Erwin Lansing
5bc32c2c2b After changing hostres from libdisk to libgeom, it now compiles
and runs on amd64, so revert the stopgap from rev. 1.10

Approved by:		harti
Hardware borrowed from:	simon
2006-01-26 21:32:51 +00:00
Marius Strobl
aa3ee926a9 - Register the generic implementations for the device shutdown, suspend
and resume methods so these events propagate through the device driver
  hierarchy.
- In dma(4) enable the chaining of the DMA engine interrupt handler for
  the LANCE devices via a dma_setup_intr(). This was commented out before
  as I was unsure whether I'd use it but this is probably cleaner than
  fiddling with the DMA engine interrupt in the LANCE driver directly.
- In ebus_setup_dinfo() free 'intrs' instead of 'reg' twice in case
  setting up a child fails due to routing one of its interrupts fails. [1]

Found by:	Coverity Prevent [1]
MFC after:	3 days
2006-01-26 21:14:32 +00:00
Brooks Davis
f1bacaa501 Fix rev 1.12.
/tmp may not be writeable yet when dhclient is first run via
/etc/rc.d/netif so using it may not work.  Also, writing to a
predictable file in /tmp as root is a really bad idea since a malicious
user may be able to win a race and insert a symlink which will allow
them to cause any file to be overwritten.  To solve these problems,
create the tempory file in /var/run which will exist this early and is
writable only by root.

Security:	Local risk if users can cause dhclient to run on demand
		(such as by unplugging and replugging the network cable).
2006-01-26 21:05:39 +00:00
Olivier Houchard
169c44907a Don't attempt to re-create the /dev entry for the slave part if it already
exist when opening the master. This can happen if one open the master, then
open the slave, then close and re-open the master.

Reported by:	Peter Holm
2006-01-26 20:54:49 +00:00
Stefan Farfeleder
3acb8d3f94 Analogous to __printflike and __scanflike, add the macro __format_arg which
expands to the GCC format_arg attribute if supported.

This fixes a syntax error in <nl_types.h> for compilers/tools not
implementing the GCC __attribute__ extensions.
2006-01-26 20:53:40 +00:00
Nate Lawson
c74da55a0e Since the A-Z range is contained in the previous check, the else-if is
dead code.  Clean up both by using isprint() instead, since that's what
it really wants.

Coverity ID:	100
Found by:	Coverity Prevent
2006-01-26 19:55:29 +00:00
Alan Cox
972e95c81a opt_vmpage.h is no longer needed here because it is not included by
vm_page.h.
2006-01-26 19:21:27 +00:00
Marius Strobl
0574df71dc - Only touch the LED bit of the (LED) AUXIO register when turning the
system LED on or off. Unlike the EBus LED AUXIO register where the
  remaining bits are unused the upper bits of the SBus AUXIO register
  are used to control other things like the link test enable pin of
  the on-board NIC which we don't want to change as a side-effect.
- Remove the superfluous bzero()'ing of the softc obtained from
  device_get_softc().

Reviewed by:	yongari
MFC after:	3 days
2006-01-26 19:04:18 +00:00
Olivier Houchard
668816ed50 Version bump for pts import. 2006-01-26 18:23:16 +00:00
Gleb Smirnoff
68b789b23f From the RFC2516 it is not clear, what is the correct behavior for a
PPPoE AC, servicing a specific Service-Name, when client sends a PADI
with an empty Service-Name. Should it reply with all available service
names or should it be silent? Our implementation had chosen the latter,
while some other had chosen the former (they say Linux and Cisco). Now
some PPPoE clients appear, that rely on the assumption that AC will
send all names in a PADO reply to a PADI with wildcard Service-Name.
These clients can't connect to FreeBSD AC.

I have requested comments from authors of RFC2516 via email, but
received no reply.

This change makes FreeBSD AC compatible with D-Link DI-614+ and
D-Link DI-624+ SOHO routers, and probably others.

Big thanks to D-Link's Russian office, namely Victor Platov, for
assistance and support in investigation and testing of this change.

Details:
  o Split pppoe_match_svc() into three different functions serving
    different purposes:
    - pppoe_match_svc() - match non-empty Service-Name tag from PADI
      against all available hooks in listening state.
    - pppoe_find_svc() - check that given Service-Name is not yet
      registered.
    - pppoe_broadcast_padi() - send a copy of PADI packet with empty
      Service-Name tag to all listening hooks.
  o For NGM_PPPOE_LISTEN message use pppoe_find_svc().
  o In ng_pppoe_rcvdata() in a PADI case use pppoe_match_svc() for
    a non-empty Service-Name tag, and pppoe_broadcast_padi() in
    either case.

A side effect from the above changes is that now pppoed(8) and mpd
will reply to a empty Service-Name PADI sending a PADO with two
Service-Name tags - an empty one and correct one. This is not fatal,
and will be corrected in pppoed(8) and mpd later. No need to update
node interface version.

Supported by:	D-Link
2006-01-26 13:06:49 +00:00
Hartmut Brandt
4ecdfdcf91 Replace ki_ocomm by ki_comm. The former will go away.
Submitted by:	Victor Cruceru <soc-victor>
Suggested by:   Julian Elischer
2006-01-26 12:19:10 +00:00
Hartmut Brandt
1de368e2f2 Fix a bug in the processor load code: the wrong process was used to
get the inital processor load. Also fix compilation on sparc64 without NDEBUG.
2006-01-26 12:15:06 +00:00
Hartmut Brandt
c8203bd856 Fix false positives when searching for disks. Things like adv(4) are not
disks.

Submitted by:	Victor Cruceru <soc-victor@>
2006-01-26 11:49:27 +00:00
Pawel Jakub Dawidek
c3b878a8c6 Remove debug printf. 2006-01-26 11:15:08 +00:00
Hartmut Brandt
e8689b4ce4 Fix the MIB to use libgeom instead of libdisk.
Submitted by:	Victor Cruceru <soc-victor>
2006-01-26 10:13:32 +00:00
Brad Davis
6267a27838 - Fix the www build by removing obsolete references to &hwlist.sound;
Approved by:	ceri@
Pointy Hat to:	joel@
2006-01-26 09:37:24 +00:00
David Xu
55a122bf28 in aio_aqueue, store same return code into job->_aiocb_private.error.
in aio_return, unlock proc lock before suword.
2006-01-26 08:37:02 +00:00
Jason Evans
499168546f Optimize arena_bin_pop() to reduce the number of separator operations.
Remove the block of code that tries to use delayed regions in LIFO order,
since from a policy perspective, it conflicts with LRU caching of newly
coalesced regions in arena_undelay().  There are numerous policy
alternatives, and it isn't readily obvious which (if any) is superior;
this change at least has the virtue of being consistent with policy.
2006-01-26 08:11:23 +00:00
Matt Jacob
6c4266852d oops 2006-01-26 06:15:58 +00:00
Alan Cox
cfc26cd69c Plug a leak in the newer contigmalloc() implementation. Specifically, if
a multipage allocation was aborted midway, the pages that were already
allocated were not always returned to the free list.

Submitted by: tegge
2006-01-26 05:51:26 +00:00
Christian Brueffer
aed1a1f179 Document JMicron JMB360. 2006-01-26 05:31:19 +00:00
Tim Kientzle
2cac97cafe Fix an aliasing error in the new TP support and reenable it in the build. 2006-01-26 05:28:56 +00:00