]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoIf including vnet.h one has to include opt_route.h as well. This is
bz [Fri, 22 May 2009 23:03:15 +0000 (23:03 +0000)]
If including vnet.h one has to include opt_route.h as well. This is
because struct vnet_net holds the rt_tables[][] for MRT and array size
is compile time dependent.  If you had ROUTETABLES set to >1 after
r192011 V_loif was pointing into nonsense leading to strange results
or even panics for some people.

Reviewed by: mz

15 years agoSet ifp->if_afdata_initialized to 0 while holding IF_AFDATA_LOCK on ifp,
zec [Fri, 22 May 2009 22:22:21 +0000 (22:22 +0000)]
Set ifp->if_afdata_initialized to 0 while holding IF_AFDATA_LOCK on ifp,
not after the lock has been released.

Reviewed by: bz
Discussed with: rwatson

15 years agoAdd myself to the src committers graph.
jilles [Fri, 22 May 2009 22:13:29 +0000 (22:13 +0000)]
Add myself to the src committers graph.

Approved by: ed (mentor)

15 years agoIntroduce the if_vmove() function, which will be used in the future
zec [Fri, 22 May 2009 22:09:00 +0000 (22:09 +0000)]
Introduce the if_vmove() function, which will be used in the future
for reassigning ifnets from one vnet to another.

if_vmove() works by calling a restricted subset of actions normally
executed by if_detach() on an ifnet in the current vnet, and then
switches to the target vnet and executes an appropriate subset of
if_attach() actions there.

if_attach() and if_detach() have become wrapper functions around
if_attach_internal() and if_detach_internal(), where the later
variants have an additional argument, a flag indicating whether a
full attach or detach sequence is to be executed, or only a
restricted subset suitable for moving an ifnet from one vnet to
another.  Hence, if_vmove() will not call if_detach() and if_attach()
directly, but will call the if_detach_internal() and
if_attach_internal() variants instead, with the vmove flag set.

While here, staticize ifnet_setbyindex() since it is not referenced
from outside of sys/net/if.c.

Also rename ifccnt field in struct vimage to ifcnt, and do some minor
whitespace garbage collection where appropriate.

This change should have no functional impact on nooptions VIMAGE kernel
builds.

Reviewed by: bz, rwatson, brooks?
Approved by: julian (mentor)

15 years agoFix the name of the module common to the client and server
rmacklem [Fri, 22 May 2009 20:55:29 +0000 (20:55 +0000)]
Fix the name of the module common to the client and server
in the experimental nfs subsystem to the correct one for
the MODULE_DEPEND() macro.

Approved by: kib (mentor)

15 years agoExpand $FreeBSD$
des [Fri, 22 May 2009 20:07:39 +0000 (20:07 +0000)]
Expand $FreeBSD$

15 years agoChange the printf of r192595 to identify the function,
rmacklem [Fri, 22 May 2009 19:05:48 +0000 (19:05 +0000)]
Change the printf of r192595 to identify the function,
as requested by Sam.

Approved by: kib (mentor)

15 years agoUpgrade to OpenSSH 5.2p1.
des [Fri, 22 May 2009 18:46:28 +0000 (18:46 +0000)]
Upgrade to OpenSSH 5.2p1.

MFC after: 3 months

15 years agoPartial reversion of previous commit. The CXGB_SHUTDOWN flag does NOT
gnn [Fri, 22 May 2009 18:26:47 +0000 (18:26 +0000)]
Partial reversion of previous commit.  The CXGB_SHUTDOWN flag does NOT
need to be inverted when doing an ifconfig down of an interface.

Pointed out by: Navdeep Parhar
MFC after: 1 week

15 years agoModified the printf message of r192590 to remove the
rmacklem [Fri, 22 May 2009 18:10:39 +0000 (18:10 +0000)]
Modified the printf message of r192590 to remove the
possible DOS attack, as suggested by Sam.

Approved by: kib (mentor)

15 years agoChange the comment at the beginning of the function to reflect the
rmacklem [Fri, 22 May 2009 16:46:01 +0000 (16:46 +0000)]
Change the comment at the beginning of the function to reflect the
change from panic() to printf() done by r192588.

15 years agoChange the reboot panic that would have occurred if clientid
rmacklem [Fri, 22 May 2009 16:41:33 +0000 (16:41 +0000)]
Change the reboot panic that would have occurred if clientid
numbers wrapped around to a printf() warning of a possible
DOS attack, in the experimental nfsv4 server.

Approved by: kib (mentor)

15 years agoMake 'struct acl' larger, as required to support NFSv4 ACLs. Provide
trasz [Fri, 22 May 2009 15:56:43 +0000 (15:56 +0000)]
Make 'struct acl' larger, as required to support NFSv4 ACLs.  Provide
compatibility interfaces in both kernel and libc.

Reviewed by: rwatson

15 years agoModify the mount handling code in the experimental nfs client to
rmacklem [Fri, 22 May 2009 15:08:12 +0000 (15:08 +0000)]
Modify the mount handling code in the experimental nfs client to
use the newer nmount() style arguments, as is used by mount_nfs.c.
This prepares the kernel code for the use of a mount_nfs.c with
changes for the experimental client integrated into it.

Approved by: kib (mentor)

15 years agoFix a possible panic cxgb_controller_attach() routine that would occur
gnn [Fri, 22 May 2009 15:06:03 +0000 (15:06 +0000)]
Fix a possible panic cxgb_controller_attach() routine that would occur
only if prepping the adapter failed.

Slight adjustment to comments.

Fix a bug whereby downing the interface didn't preven it from
processing packets.

Submitted by: Navdeep Parhar
MFC after: 1 week

15 years agoChange the code in the experimental nfs client to avoid flushing
rmacklem [Fri, 22 May 2009 15:01:47 +0000 (15:01 +0000)]
Change the code in the experimental nfs client to avoid flushing
writes upon close when a write delegation is held by the client.
This should be safe to do, now that nfsv4 Close operations are
delayed until ncl_inactive() is called for the vnode.

Approved by: kib (mentor)

15 years agoFix the comment in sys/fs/nfs/nfs.h to correctly reflect the
rmacklem [Fri, 22 May 2009 14:53:26 +0000 (14:53 +0000)]
Fix the comment in sys/fs/nfs/nfs.h to correctly reflect the
current use of the R_xxx flags. This changed when the
NFS_LEGACYRPC code was removed from the subsystem.

Approved by: kib (mentor)

15 years agoAdd University of Michigan removed files to ObsoleteFiles.inc.
rwatson [Fri, 22 May 2009 13:57:44 +0000 (13:57 +0000)]
Add University of Michigan removed files to ObsoleteFiles.inc.

Submitted by: Pawel Worach <pawel.worach at gmail.com>

15 years agoFurther idmapd garbage collection -- remove rc.d Makefile reference and
rwatson [Fri, 22 May 2009 13:56:16 +0000 (13:56 +0000)]
Further idmapd garbage collection -- remove rc.d Makefile reference and
default settings.

Submitted by: Pawel Worach <pawel.worach at gmail.com>

15 years agoRemove the unmaintained University of Michigan NFSv4 client from 8.x
rwatson [Fri, 22 May 2009 12:35:12 +0000 (12:35 +0000)]
Remove the unmaintained University of Michigan NFSv4 client from 8.x
prior to 8.0-RELEASE.  Rick Macklem's new and more feature-rich NFSv234
client and server are replacing it.

Discussed with: rmacklem

15 years agoAdd privileges for Capi4BSD to control:
bz [Fri, 22 May 2009 09:59:34 +0000 (09:59 +0000)]
Add privileges for Capi4BSD to control:
- controller reset/firmware loading.
- controller level tracing and tracing of capi messages of applications
  running with different user credentials.

Reviewed by: rwatson
MFC after: 2 weeks

15 years agoFix the experimental nfs server so that it depends on the nlm,
rmacklem [Fri, 22 May 2009 01:15:07 +0000 (01:15 +0000)]
Fix the experimental nfs server so that it depends on the nlm,
since it now calls nlm_acquire_next_sysid().

Approved by: kib (mentor)

15 years agoupdate for r192468 (monitor mode changes)
sam [Thu, 21 May 2009 23:19:49 +0000 (23:19 +0000)]
update for r192468 (monitor mode changes)

Submitted by: jkim

15 years agoUse calloc().
delphij [Thu, 21 May 2009 23:00:20 +0000 (23:00 +0000)]
Use calloc().

15 years agoAdd myself to the list of ports committers.
tota [Thu, 21 May 2009 21:21:22 +0000 (21:21 +0000)]
Add myself to the list of ports committers.

Approved by: maho (mentor)

15 years agoPullup from p4 tip:
bms [Thu, 21 May 2009 18:05:17 +0000 (18:05 +0000)]
Pullup from p4 tip:
 * Fix MLDv2 general query timer (fallout from automated refactoring).
 * Refactor MLDv1 timer.
MLDv2 query processing is now working.

15 years agoWhen man pages are formatted in UTF-8, .Fl is encoded as U+2212 "MINUS
des [Thu, 21 May 2009 17:56:00 +0000 (17:56 +0000)]
When man pages are formatted in UTF-8, .Fl is encoded as U+2212 "MINUS
SIGN" instead of U+002D "HYPHEN-MINUS".  This is unfortunate for two
reasons: 1) this is not the character which is actually used on the
command line, and 2) it makes it impossible to search a man page for a
specific command-line option.

This patch fixes this, but there are other unresolved issues, such as
confusion between -, \- and hy: while the latter is always (and only)
used for hyphenation, both - and \- are used for negation and
subtraction, and \- is used for command-line options and sometimes
also for parenthesis.  IMHO, the correct Unicode characters are:

 - hyphenation: either U+2010 or U+00AD, most likely the former (the
   latter is the so-called soft hyphen, used to indicate a point at
   which a text processor is allowed to hyphenate a word)

 - negation and subtraction: U+2212

 - parenthesis: in English, U+2214, with spaces suppressed before and
   after; in some others (such as Norwegian), U+2213 with spaces
   retained.

 - command-line options: U+002D, because that is what is actually used
   on the command line.

However, fixing this would require extensive modifications to (at least)
the doc and man macro sets...

MFC after: 1 week

15 years agoDon't clear last usage when a new HID item is found, it improves parsing of
thompsa [Thu, 21 May 2009 17:55:18 +0000 (17:55 +0000)]
Don't clear last usage when a new HID item is found, it improves parsing of
Apple keyboard HID descriptors.

Submitted by: Hans Petter Selasky

15 years agoRemove README.TXT as the info is in usb(4).
thompsa [Thu, 21 May 2009 17:48:41 +0000 (17:48 +0000)]
Remove README.TXT as the info is in usb(4).

15 years agoAdd Sharp WILLCOM03 ipaq and Option GTHSDPA 3g device ids.
thompsa [Thu, 21 May 2009 17:47:27 +0000 (17:47 +0000)]
Add Sharp WILLCOM03 ipaq and Option GTHSDPA 3g device ids.

Submitted by: Hans Petter Selasky

15 years agoUse the correct usb config number on attach.
thompsa [Thu, 21 May 2009 17:45:37 +0000 (17:45 +0000)]
Use the correct usb config number on attach.

Reported by: Greg Rivers
Submitted by: Hans Petter Selasky

15 years agoFix a failure to report failure on stalled status stage for control
thompsa [Thu, 21 May 2009 17:43:35 +0000 (17:43 +0000)]
Fix a failure to report failure on stalled status stage for control
transactions.

Submitted by: Hans Petter Selasky

15 years agoAdd a driver for the AVR32 series USB Device Controller. Not hooked up as
thompsa [Thu, 21 May 2009 17:42:32 +0000 (17:42 +0000)]
Add a driver for the AVR32 series USB Device Controller. Not hooked up as
FreeBSD does not yet support this platform but it makes it easier to stay in
sync.

Submitted by: Hans Petter Selasky

15 years agoImprove device mode (gadget) stall handling.
thompsa [Thu, 21 May 2009 17:39:21 +0000 (17:39 +0000)]
Improve device mode (gadget) stall handling.

Some hardware easily comes out of sync with regard to whether the current or
the next control transfer should be stalled, if a stall command is always
issued before receiving the SETUP packet. After this patch the stall command
will only be issued when a transfer should actually be stalled.

Submitted by: Hans Petter Selasky

15 years agoUpdate usb(4) to match reality, remove section on permissions.
thompsa [Thu, 21 May 2009 17:26:20 +0000 (17:26 +0000)]
Update usb(4) to match reality, remove section on permissions.
Delete usb2_core.4.

Submitted by: Hans Petter Selasky

15 years agoFix libusb20_dev_get_device_desc and defunt xref.
thompsa [Thu, 21 May 2009 17:16:35 +0000 (17:16 +0000)]
Fix libusb20_dev_get_device_desc and defunt xref.

Submitted by: Hans Petter Selasky

15 years agoPullup svn source to p4 top of tree:
bms [Thu, 21 May 2009 17:01:38 +0000 (17:01 +0000)]
Pullup svn source to p4 top of tree:
 * Fix LOR in MLDv2 query input path.
 * Strip embedded KAME scope IDs for on-wire IPv6 address comparisons.

15 years agoEnable secure TTY input buffer flushing by default.
ed [Thu, 21 May 2009 16:48:06 +0000 (16:48 +0000)]
Enable secure TTY input buffer flushing by default.

I'm leaving the sysctl there. If people really notice a slowdown, they
can revert to the old behaviour.

Discussed with: kib

15 years agoModify src/etc/mtree/BSD.include.dist and src/include/Makefile
rmacklem [Thu, 21 May 2009 16:27:47 +0000 (16:27 +0000)]
Modify src/etc/mtree/BSD.include.dist and src/include/Makefile
so that the .h files in src/sys/fs/nfs will be installed under
/usr/include/fs/nfs. This will allow the following utilities to
build, once additions and changes for the experimental nfs subsystem
are committed:
usr.sbin/mountd - Once modified to add support for the
  experimental nfs subsystem.
ur.sbin/nfsstat - Once modified to add support for the
  experimental nfs subsystem.
usr.sbin/nfscbd - The client side callback daemon for NFSv4.
usr.sbin/nfsuserd - The NFSv4 user/group name<->uid/gid mapping daemon.
usr.sbin/nfsdumpstate - The NFSv4 utility for dumping open/lock state.
usr.sbin/nfsrevoke - The sysadmin command for revoking NFSv4 state.

Approved by: kib (mentor)

15 years agoAdd a new sysctl: kern.tty_inq_flush_secure.
ed [Thu, 21 May 2009 16:19:54 +0000 (16:19 +0000)]
Add a new sysctl: kern.tty_inq_flush_secure.

When enabled all TTY input queue buffers are zeroed when flushing or
closing the TTY. Because TTY input queues are also used to store filled
in passwords, this may be an interesting switch to enable for security
minded people.

15 years agoOnly use the ABI compat shim for vfs.bufspace if the old buffer is smaller
jhb [Thu, 21 May 2009 16:18:45 +0000 (16:18 +0000)]
Only use the ABI compat shim for vfs.bufspace if the old buffer is smaller
than a long.

PR: amd64/134786
Submitted by: Emil Mikulic  emikulic| gmail
MFC after: 3 days

15 years agorssi/nf data are now dbm, tag them accordingly
sam [Thu, 21 May 2009 15:30:59 +0000 (15:30 +0000)]
rssi/nf data are now dbm, tag them accordingly

15 years agoo remove bpf tap call missed in r192468
sam [Thu, 21 May 2009 15:30:29 +0000 (15:30 +0000)]
o remove bpf tap call missed in r192468
o correct rssi taken from rx descriptor; need dbm

15 years agoIntegrate three changes from Chelsio.
gnn [Thu, 21 May 2009 15:08:03 +0000 (15:08 +0000)]
Integrate three changes from Chelsio.

1) Add a sysctl that will say what type of PHYs exist on the card.
2) Fix a bug that occurs when an AEL 2005 PHY resets without a transciever
in the card.
3) Unify the PHY link detection code.

Obtained from: Navdeep Parhar
MFC after: 10 days

15 years agoFix the comment at line 3711 to be consistent with the change
rmacklem [Thu, 21 May 2009 14:52:36 +0000 (14:52 +0000)]
Fix the comment at line 3711 to be consistent with the change
applied for r192537.

Approved by: kib (mentor)

15 years agoModified the attach and detach routines to handle bringing ports up
gnn [Thu, 21 May 2009 14:43:12 +0000 (14:43 +0000)]
Modified the attach and detach routines to handle bringing ports up
and down more cleanly.  This addresses a problem where if we have the
link flap during boot the driver would lock up the system.

Reviewed by: jhb
MFC after: 1 week

15 years agoAttempt to clarify some confusing wording regarding atomic_load() and
jhb [Thu, 21 May 2009 13:39:46 +0000 (13:39 +0000)]
Attempt to clarify some confusing wording regarding atomic_load() and
atomic_store().

15 years agoMove the M_WAITOK flag in notify() into an M_NOWAIT one in order to match
attilio [Thu, 21 May 2009 13:22:07 +0000 (13:22 +0000)]
Move the M_WAITOK flag in notify() into an M_NOWAIT one in order to match
the behaviour alredy present with the further malloc() call in
devctl_notify().
This fixes a bug in the CAM layer where the camisr handler finished to
call camperiphfree() (and subsequently destroy_dev() resulting in a new
dev notify) while the xpt lock is held.

PR: kern/130330
Tested by: Riccardo Torrini <riccardo dot torrini at esaote dot com>

15 years agoLargely revert the earlier change to use a single CCB for the RAID recovery
jhb [Thu, 21 May 2009 12:36:40 +0000 (12:36 +0000)]
Largely revert the earlier change to use a single CCB for the RAID recovery
thread.  Multiple RAID events in quick succession can cause an additional
bus rescan to be scheduled before an earlier scan has completed.  In this
case the driver was attempting to use the same CCB storage for two requests.

PR: kern/130330
Reviewed by: Riccardo Torrini  riccardo.torrini | esaote com
MFC after: 1 week

15 years agoImprove style(9), clean up.
raj [Thu, 21 May 2009 12:05:15 +0000 (12:05 +0000)]
Improve style(9), clean up.

15 years agoInitial support for SMP on PowerPC MPC85xx.
raj [Thu, 21 May 2009 11:43:37 +0000 (11:43 +0000)]
Initial support for SMP on PowerPC MPC85xx.

Tested with Freescale dual-core MPC8572DS development system.

Obtained from: Freescale, Semihalf

15 years agoSkip interleaved RAM target on MPC85xx during renitialization of the local
raj [Thu, 21 May 2009 11:37:56 +0000 (11:37 +0000)]
Skip interleaved RAM target on MPC85xx during renitialization of the local
access windows. This eliminates hangs on systems which are configured to use
interleaved mode: prior to this fix we were simply cutting ourselves from
access to the main memory in this case.

Obtained from: Freescale, Semihalf

15 years agonge(4) should work on all archs now.
brueffer [Thu, 21 May 2009 10:04:51 +0000 (10:04 +0000)]
nge(4) should work on all archs now.

15 years agoConsolidate and clean up the first section of ip_output.c in light of the
rwatson [Thu, 21 May 2009 09:45:47 +0000 (09:45 +0000)]
Consolidate and clean up the first section of ip_output.c in light of the
last year or two's work on routing:

- Combine iproute initialization and flowtable lookup blocks, eliminating
  unnecessary tests for known-zero'd iproute fields.

- Add a comment indicating (a) why the route entry returned by the
  flowtable is considered stable and (b) that the flowtable lookup must
  occur after the setup of the mbuf flow ID.

- Assert the inpcb lock before any use of inpcb fields.

Reviewed by: kmacy

15 years agoforce type match
sam [Thu, 21 May 2009 04:00:31 +0000 (04:00 +0000)]
force type match

15 years agoAdd nge(4) to the list of drivers supporting ALTQ.
yongari [Thu, 21 May 2009 02:47:46 +0000 (02:47 +0000)]
Add nge(4) to the list of drivers supporting ALTQ.

15 years agonge(4) supports altq(4). Xr altq
yongari [Thu, 21 May 2009 02:44:32 +0000 (02:44 +0000)]
nge(4) supports altq(4). Xr altq

15 years agoDP83821 also supports jumbo frames.
yongari [Thu, 21 May 2009 02:42:15 +0000 (02:42 +0000)]
DP83821 also supports jumbo frames.

15 years agoDocument sysctl variable dev.nge.%d.int_holdoff.
yongari [Thu, 21 May 2009 02:39:47 +0000 (02:39 +0000)]
Document sysctl variable dev.nge.%d.int_holdoff.

15 years agoPrint out device attachment.
thompsa [Thu, 21 May 2009 02:26:51 +0000 (02:26 +0000)]
Print out device attachment.

15 years agoAdd nge(4), nge(4) should work on all architectures.
yongari [Thu, 21 May 2009 02:19:01 +0000 (02:19 +0000)]
Add nge(4), nge(4) should work on all architectures.

15 years agobus_dma(9) conversion and make nge(4) work on all architectures.
yongari [Thu, 21 May 2009 02:12:10 +0000 (02:12 +0000)]
bus_dma(9) conversion and make nge(4) work on all architectures.
o Header file cleanup.
o bus_dma(9) conversion.
  - Removed all consumers of vtophys(9) and converted to use
    bus_dma(9).
  - 64bit DMA support was disabled because DP83821 is not capable
    of handling the DMA request. 64bit DMA request on DP83820
    requires different descriptor structures and it's hard to
    dynamically change descriptor format at run time so I disabled
    it. Note, this is the same behavior as previous one but
    previously nge(4) didn't explicitly disable 64bit mode on
    DP83820.
  - Added Tx/Rx descriptor ring alignment requirements(8 bytes
    alignment).
  - Limit maximum number of Tx DMA segments to 16. In fact,
    controller does not seem to have limitations on number of Tx
    DMA segments but 16 should be enough for most cases and
    m_collapse(9) will handle highly fragmented frames without
    consuming a lot of CPU cycles.
  - Added Rx buffer alignment requirements(8 bytes alignment). This
    means driver should fixup received frames to align on 16bits
    boundary on strict-alignment architectures.
  - Nuked driver private data structure in descriptor ring.
  - Added endianness support code in Tx/Rx descriptor access.
o Prefer faster memory mapped register access to I/O mapped access.
   Added fall-back mechanism to use alternative register access.
   The hardware supports both memory and I/O mapped access.
o Added suspend/resume methods but it wasn't tested as controller I
  have does not support PCI PME.
o Removed swap argument in nge_read_eeprom() since endianness
  should be handled after reading EEPROM.
o Implemented experimental 802.3x full-duplex flow-control. ATM
  it was commented out but will be activated after we have generic
  flow-control framework in mii(4) layer.
o Rearranged promiscuous mode settings and simplified logic.
o Always disable Rx filter prior to changing Rx filter functions as
  indicated in DP83820/DP83821 datasheet.
o Added an explicit DELAY in timeout loop of nge_reset().
o Added a sysctl variable dev.nge.%d.int_holdoff to control
  interrupt moderation. Valid ranges are 1 to 255(default 1) in
  units of 100us. The actual delivery of interrupt would be delayed
  based on the sysctl value. The interface has to be brought down
  and up again before a change takes effect. With proper tuning
  value, users do not need to resort to polling(4) anymore.
o Added ALTQ(4) support.
o Added missing IFCAP_VLAN_HWCSUM as nge(4) can offload Tx/Rx
  checksum calculation on VLAN tagged frames as well as VLAN tag
  insertion/stripping. Also add IFCAP_VLAN_MTU capability as nge(4)
  can handle VLAN tagged oversized frames.
o Fixed media header length for VLAN.
o Rearranged nge_detach routine such that it's now used for general
  clean-up routine.
o Enabled MWI.
o Accessing EEPROM takes very long time so read 6 bytes ethernet
  address with one call instead of 3 separate accesses.
o Don't set if_mtu in device attach, it's already set in
  ether_ifattach().
o Don't do any special things for TBI interface. Remove TBI
  specific media handling in the driver and have gentbi(4) handle
  it. Add glue code to read/write TBI PHY registers in miibus
  method. This change removes a lot of PHY handling code in driver
  and now its functionality is handled by mii(4).
o Alignment fixup code is now applied only for strict-alignment
  architectures. Previously the code was applied for all
  architectures except i386. With this change amd64 will get
  instant Rx performance boost.
o When driver fails to allocate a new mbuf, update if_qdrops so
  users can see what was wrong in Rx path.
o Added a workaround for a hardware bug which resulted in short
  VLAN tagged frames(e.g. ARP) was rejected as if runt frame was
  received. With this workaround nge(4) now accepts the short VLAN
  tagged frame and nge(4) can take full advantage of hardware VLAN
  tag stripping. I have no idea how this bug wasn't known so far,
  without the workaround nge(4) may never work on VLAN
  environments.
o Fixed Rx checksum offload logic such that it now honors active
  interface capability configured with ifconfig(8).
o In nge_start()/nge_txencap(), always leave at least one free
  descriptor as indicated in datasheet. Without this the hardware
  would be confused with ring descriptor structure(e.g. no clue
  for the end of descriptor ring).
o Removed dead-code that checks interrupts on PHY hardware. The
  code was designed to detect link state changes but it was
  disabled as driving nge_tick clock would break auto-negotiation
  timer. This code is no longer needed as nge(4) now uses mii(4)
  and link state change handling is done with mii callback.
o Rearranged ethernet address programming logic such that it works
   on strict-alignment architectures.
o Added IFCAP_VLAN_HWTAGGING/IFCAP_VLAN_HWCSUM handler in
   nge_ioctl() such that the functionality is configurable with
   ifconfig(8). DP83820/DP83821 can do checksum offload for VLAN
   tagged frames so enable Tx/Rx checksum offload for VLAN
   interfaces.
o Simplified IFCAP_POLLING selection logic in nge_ioctl().
o Fixed module unload panic when bpf listeners are active.
o Tx/Rx descriptor ring address uses 64bit DMA address for
   readability. High address part of DMA would be 0 as nge(4)
   disabled 64bit DMA transfers so it's ok for DP83821.
o Removed volatile keyword in softc as bus_dmamap_sync(9) should
   take care of this.
o Removed extra driver private structures in descriptor ring. These
   extra elements are not part of descriptor structure. Embedding
   private driver structure into descriptor ring is not good idea
   as its size may be different on 32bit/64bit architectures.
o Added miibus_linkchg method handler to catch link state changes.
o Removed unneeded nge_ifmedia in softc. All TBI access is handled
  in gentbi(4). There is no difference between TBI and non-TBI case
  now.
o Removed "gigabit link up" message handling in nge_tick. Link
  state change notification is already performed by mii(4) and
  checking link state by accessing PHY registers in periodic timer
  handler of driver is wrong. All link state and speed/duplex
  monitoring should be handled in PHY driver.
o Use our own timer for watchdog instead of if_watchdog/if_timer
  interface.
o Added hardware MAC statistics counter, users canget current MAC
  statistics from dev.nge.%d.stats sysctl node(%d is unit number of
  a device).
o Removed unused macros, NGE_LASTDESC, NGE_MODE, NGE_OWNDESC,
  NGE_RXBYTES.
o Increased number of Tx/Rx descriptors from 128 to 256. From my
  experience on gigabit ethernet controllers, number of descriptors
  should be 256 or higher to get an optimal performance on gigabit
  link.
o Increased jumbo frame length to 9022 bytes to cope with other
  gigabit ethernet drivers. Experimentation shows no problems with
  9022 bytes.
o Removed unused member variables in softc.
o Switched from bus_space_{read|write}_4 to bus_{read|write}_4.
o Added support for WOL.

15 years agoFix a few variable renames of usb2_mode outside dev/usb.
thompsa [Thu, 21 May 2009 02:09:12 +0000 (02:09 +0000)]
Fix a few variable renames of usb2_mode outside dev/usb.

15 years agoModify sys/fs/nfsserver/nfs_nfsdport.c to use nlm_acquire_next_sysid()
rmacklem [Thu, 21 May 2009 01:50:27 +0000 (01:50 +0000)]
Modify sys/fs/nfsserver/nfs_nfsdport.c to use nlm_acquire_next_sysid()
to set the l_sysid for locks correctly.

Approved by: kib (mentor)

15 years agoRename the usb sysctl tree from hw.usb2.* back to hw.usb.*.
thompsa [Thu, 21 May 2009 01:48:42 +0000 (01:48 +0000)]
Rename the usb sysctl tree from hw.usb2.* back to hw.usb.*.

Submitted by: Hans Petter Selasky

15 years agoAdd a function to sys/nlm/nlm_prot_impl.c that returns a unique
rmacklem [Thu, 21 May 2009 01:14:12 +0000 (01:14 +0000)]
Add a function to sys/nlm/nlm_prot_impl.c that returns a unique
lock sysid to be used for non-nlm remote locking. This is required
for the experimental nfsv4 server, so that it can acquire byte
range locks correctly on behalf of nfsv4 clients.

Reviewed by: dfr
Approved by: kib (mentor)

15 years agoUse enums for speed and rev data types.
thompsa [Thu, 21 May 2009 01:05:21 +0000 (01:05 +0000)]
Use enums for speed and rev data types.

15 years ago- rename usb2_mode to usb_mode [1]
thompsa [Thu, 21 May 2009 00:04:17 +0000 (00:04 +0000)]
- rename usb2_mode to usb_mode [1]
- change variable types to use the enum

Submitted by: Hans Petter Selasky [1]

15 years agoupdate for net80211 rx api change
sam [Wed, 20 May 2009 23:33:40 +0000 (23:33 +0000)]
update for net80211 rx api change

15 years agoRevert last junk...
imp [Wed, 20 May 2009 22:28:55 +0000 (22:28 +0000)]
Revert last junk...

15 years agoA few more style changes as well as a more broad allowance for
gnn [Wed, 20 May 2009 22:19:22 +0000 (22:19 +0000)]
A few more style changes as well as a more broad allowance for
errors to be given by the caller.  Change output to be easier
for use in scripts.

Submitted by: bce

15 years agoAdd regression tests for the date(1) + argument for user-defined
edwin [Wed, 20 May 2009 22:01:43 +0000 (22:01 +0000)]
Add regression tests for the date(1) + argument for user-defined
format strings.

PR: bin/127514
Submitted by: edwin@
MFC after: 1 week

15 years agoRevert junk from last commit. These are WIP and not ready (and don't
imp [Wed, 20 May 2009 22:00:39 +0000 (22:00 +0000)]
Revert junk from last commit.  These are WIP and not ready (and don't
match the description of the last commit).

15 years agoLast commit was in error, revert.
imp [Wed, 20 May 2009 21:31:47 +0000 (21:31 +0000)]
Last commit was in error, revert.

15 years agoWhen an interface address is removed and the last prefix
qingli [Wed, 20 May 2009 21:07:15 +0000 (21:07 +0000)]
When an interface address is removed and the last prefix
route is also being deleted, the link-layer address table
(arp or nd6) will flush those L2 llinfo entries that match
the removed prefix.

Reviewed by: kmacy

15 years agoPrepare to distribute sysctl code to reduce global definitions:
sam [Wed, 20 May 2009 20:18:01 +0000 (20:18 +0000)]
Prepare to distribute sysctl code to reduce global definitions:
o expose net.wlan sysctl node
o expose ieee80211_sysctl_msecs_ticks

Reviewed by: rpaulo, thompsa

15 years agobump for net80211 monitor mode changes
sam [Wed, 20 May 2009 20:05:56 +0000 (20:05 +0000)]
bump for net80211 monitor mode changes

15 years agoOverhaul monitor mode handling:
sam [Wed, 20 May 2009 20:00:40 +0000 (20:00 +0000)]
Overhaul monitor mode handling:
o replace DLT_IEEE802_11 support in net80211 with DLT_IEEE802_11_RADIO
  and remove explicit bpf support from wireless drivers; drivers now
  use ieee80211_radiotap_attach to setup shared data structures that
  hold the radiotap header for each packet tx/rx
o remove rx timestamp from the rx path; it was used only by the tdma support
  for debugging and was mostly useless due to it being 32-bits and mostly
  unavailable
o track DLT_IEEE80211_RADIO bpf attachments and maintain per-vap and
  per-com state when there are active taps
o track the number of monitor mode vaps
o use bpf tap and monitor mode vap state to decide when to collect radiotap
  state and dispatch frames; drivers no longer explicitly directly check
  bpf state or use bpf calls to tap frames
o handle radiotap state updates on channel change in net80211; drivers
  should not do this (unless they bypass net80211 which is almost always
  a mistake)
o update various drivers to be more consistent/correct in handling radiotap
o update ral to include TSF in radiotap'd frames
o add promisc mode callback to wi

Reviewed by: cbzimmer, rpaulo, thompsa

15 years agoAlthough it should never happen, all the nfsv4 server can do
rmacklem [Wed, 20 May 2009 18:58:07 +0000 (18:58 +0000)]
Although it should never happen, all the nfsv4 server can do
when it runs out of clientids is reboot. I had replaced cpu_reboot()
with printf(), since cpu_reboot() doesn't exist for sparc64.
This change replaces the printf() with panic(), so the reboot
would occur for this highly unlikely occurrence.

Approved by: kib (mentor)

15 years agoAdd a new locking note for p_aioinfo as it is not a normal PROC_LOCK field.
jhb [Wed, 20 May 2009 18:45:49 +0000 (18:45 +0000)]
Add a new locking note for p_aioinfo as it is not a normal PROC_LOCK field.

15 years agoSet the umask in a new file descriptor table earlier in fdcopy() to remove
jhb [Wed, 20 May 2009 18:42:04 +0000 (18:42 +0000)]
Set the umask in a new file descriptor table earlier in fdcopy() to remove
two lock operations.

15 years agoSlightly adjust copyright text.
joel [Wed, 20 May 2009 18:38:43 +0000 (18:38 +0000)]
Slightly adjust copyright text.

Approved by: matk

15 years agoComment nits.
jhb [Wed, 20 May 2009 18:36:17 +0000 (18:36 +0000)]
Comment nits.

15 years agoRemove license clauses 3 and 4 as per rev. 1.65 of midi.c in NetBSD.
joel [Wed, 20 May 2009 18:34:26 +0000 (18:34 +0000)]
Remove license clauses 3 and 4 as per rev. 1.65 of midi.c in NetBSD.

Approved by: matk

15 years agoRemove license clauses 3 and 4 as per rev. 1.65 of auvia.c in NetBSD.
joel [Wed, 20 May 2009 18:31:11 +0000 (18:31 +0000)]
Remove license clauses 3 and 4 as per rev. 1.65 of auvia.c in NetBSD.

15 years agoRemove an obsolete assertion. We always wake up all waiters when unlocking
jhb [Wed, 20 May 2009 18:29:14 +0000 (18:29 +0000)]
Remove an obsolete assertion.  We always wake up all waiters when unlocking
a mutex and never set the lock cookie == MTX_CONTESTED.

15 years agoPut the vnode returned from namei() immediately after namei() returns in
jhb [Wed, 20 May 2009 18:25:16 +0000 (18:25 +0000)]
Put the vnode returned from namei() immediately after namei() returns in
svr4_sys_resolvepath().

15 years agoRemove license clauses 3 and 4 as per rev. 1.112 of uaudio.c and rev. 1.15 of
joel [Wed, 20 May 2009 18:15:13 +0000 (18:15 +0000)]
Remove license clauses 3 and 4 as per rev. 1.112 of uaudio.c and rev. 1.15 of
uaudioreg.h in NetBSD.

15 years agoRemove license clauses 3 and 4 as per rev. 1.12 of cs4231reg.h in NetBSD.
joel [Wed, 20 May 2009 18:04:56 +0000 (18:04 +0000)]
Remove license clauses 3 and 4 as per rev. 1.12 of cs4231reg.h in NetBSD.

15 years agoTweak some comments.
jhb [Wed, 20 May 2009 17:59:49 +0000 (17:59 +0000)]
Tweak some comments.

15 years agoWe no longer need to use d_thread_t, migrate to struct thread *.
imp [Wed, 20 May 2009 17:29:21 +0000 (17:29 +0000)]
We no longer need to use d_thread_t, migrate to struct thread *.

15 years agoFix a typo.
jhb [Wed, 20 May 2009 17:19:30 +0000 (17:19 +0000)]
Fix a typo.

15 years agoUse defines for register offsets that do not change.
thompsa [Wed, 20 May 2009 17:03:12 +0000 (17:03 +0000)]
Use defines for register offsets that do not change.

Submitted by: Hans Petter Selasky

15 years agoUse struct thread instead of d_thread_t.
imp [Wed, 20 May 2009 17:01:40 +0000 (17:01 +0000)]
Use struct thread instead of d_thread_t.

15 years ago- Add new register definitions
thompsa [Wed, 20 May 2009 17:00:55 +0000 (17:00 +0000)]
- Add new register definitions
- Enable the controller and wait for the PLL to start

Submitted by: Hans Petter Selasky

15 years agoReplace d_thread_t * with struct thread *.
imp [Wed, 20 May 2009 17:00:16 +0000 (17:00 +0000)]
Replace d_thread_t * with struct thread *.

15 years agoThe register shift is not needed on this controller.
thompsa [Wed, 20 May 2009 16:58:53 +0000 (16:58 +0000)]
The register shift is not needed on this controller.

Submitted by: Hans Petter Selasky

15 years agoWe no longer need to use d_thread_t for portability here, switch to
imp [Wed, 20 May 2009 16:58:16 +0000 (16:58 +0000)]
We no longer need to use d_thread_t for portability here, switch to
struct thread *.

15 years agoWe don't need d_thread_t for cross-branch portability here anymore.
imp [Wed, 20 May 2009 16:47:40 +0000 (16:47 +0000)]
We don't need d_thread_t for cross-branch portability here anymore.
Move do struct thread * instead.

15 years agoSome minor style changes:
imp [Wed, 20 May 2009 16:29:22 +0000 (16:29 +0000)]
Some minor style changes:
o Convert K&R function definitions to ANSI
o Eliminate spaces/tabs that should have been deleted as part of the de__P
  efforts
o Use struct thread * in preference to d_thread_t *.