]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agosh: Improve handling of setjmp/longjmp volatile:
Jilles Tjoelker [Tue, 23 Jun 2009 20:45:12 +0000 (20:45 +0000)]
sh: Improve handling of setjmp/longjmp volatile:
- remove ineffective and unnecessary (void) &var; [1]
- remove some unnecessary volatile keywords
- add a necessary volatile keyword
- save the old handler before doing something that could use the saved
  value

Submitted by: Christoph Mallon [1]
Approved by: ed (mentor)

15 years ago- Update regarding the support for SBus GEM added in r194763.
Marius Strobl [Tue, 23 Jun 2009 20:38:35 +0000 (20:38 +0000)]
- Update regarding the support for SBus GEM added in r194763.
- Improve the description a bit and add a reference to vlan(4).

15 years ago- Initialize the ifnet structure, especially if_dname, before probing
Marius Strobl [Tue, 23 Jun 2009 20:36:59 +0000 (20:36 +0000)]
- Initialize the ifnet structure, especially if_dname, before probing
  the PHYs as some PHY drivers use it (but probably shouldn't). How
  gem(4) has worked with brgphy(4) on powerpc without this so far is
  unclear to me.
- Introduce a dying flag which is set during detach and checked in
  gem_ioctl() in order to prevent active BPF listeners to clear
  promiscuous mode which may lead to the tick callout being restarted
  which will trigger a panic once it's actually gone.
- In gem_stop() reset rather than just disable the transmitter and
  receiver in order to ensure we're not unloading DMA maps still in
  use by the hardware. [1]
- The blanking time is specified in PCI clocks so we should use twice
  the value when operating at 66MHz.
- Spell some 2 as ETHER_ALIGN and a 19 as GEM_STATUS_TX_COMPLETION_SHFT
  to make the actual intentions clear.
- As we don't unload the peak attempts counter ignore its overflow
  interrupts.
- Remove a stale setting of a variable to GEM_TD_INTERRUPT_ME which
  isn't used afterwards.
- For optimum performance increment the TX kick register in multiples
  of 4 if possible as suggested by the documentation.
- Partially revert r164931; drivers should only clear the watchdog
  timer if all outstanding TX descriptors are done.
- Fix some debugging strings.
- Add a missing BUS_DMASYNC_POSTWRITE in gem_rint().
- As the error paths in the interrupt handler are generally unlikely
  predict them as false.
- Add support for the SBus version of the GEM controller. [2]
- Add some lock assertions.
- Improve some comments.
- Fix some more or less cosmetic issues in the code of the PCI front-end.
- Change some softc members to be unsigned where more appropriate and
  remove unused ones.

Approved by: re (kib)
Obtained from: NetBSD (partially) [2], OpenBSD [1]
MFC after: 2 weeks

15 years agoAdd a limit for child jails via the "children.cur" and "children.max"
Jamie Gritton [Tue, 23 Jun 2009 20:35:51 +0000 (20:35 +0000)]
Add a limit for child jails via the "children.cur" and "children.max"
parameters.  This replaces the simple "allow.jails" permission.

Approved by: bz (mentor)

15 years ago- Fix bug where device would loose promisc setting when reset.
Andrew Gallatin [Tue, 23 Jun 2009 20:22:34 +0000 (20:22 +0000)]
- Fix bug where device would loose promisc setting when reset.
- Allow all rss hash modes to be chosen

15 years agoModify most routines returning 'struct ifaddr *' to return references
Robert Watson [Tue, 23 Jun 2009 20:19:09 +0000 (20:19 +0000)]
Modify most routines returning 'struct ifaddr *' to return references
rather than pointers, requiring callers to properly dispose of those
references.  The following routines now return references:

  ifaddr_byindex
  ifa_ifwithaddr
  ifa_ifwithbroadaddr
  ifa_ifwithdstaddr
  ifa_ifwithnet
  ifaof_ifpforaddr
  ifa_ifwithroute
  ifa_ifwithroute_fib
  rt_getifa
  rt_getifa_fib
  IFP_TO_IA
  ip_rtaddr
  in6_ifawithifp
  in6ifa_ifpforlinklocal
  in6ifa_ifpwithaddr
  in6_ifadd
  carp_iamatch6
  ip6_getdstifaddr

Remove unused macro which didn't have required referencing:

  IFP_TO_IA6

This closes many small races in which changes to interface
or address lists while an ifaddr was in use could lead to use of freed
memory (etc).  In a few cases, add missing if_addr_list locking
required to safely acquire references.

Because of a lack of deep copying support, we accept a race in which
an in6_ifaddr pointed to by mbuf tags and extracted with
ip6_getdstifaddr() doesn't hold a reference while in transmit.  Once
we have mbuf tag deep copy support, this can be fixed.

Reviewed by: bz
Obtained from: Apple, Inc. (portions)
MFC after: 6 weeks (portions)

15 years agoAdd some sysctl info so that we can see what is going on with vblanks.
Robert Noland [Tue, 23 Jun 2009 20:19:02 +0000 (20:19 +0000)]
Add some sysctl info so that we can see what is going on with vblanks.

MFC after: 3 days

15 years agoNow that we have UARTs running with fast interrupt handlers the ata
Sam Leffler [Tue, 23 Jun 2009 19:29:23 +0000 (19:29 +0000)]
Now that we have UARTs running with fast interrupt handlers the ata
driver's i/o ops must be locked to avoid chaos.  Extend the cambria
bus tag to support ata and add a spin lock.  The ata driver is
hacked to use that instead of it's builtin hack for ixp425.  Once
the ata driver is fixed to not be confused about byte order we can
generalize the cambria bus tag code and make it generally useful.

While here take advantage of our being ixp435-specific to remove
delays when switching between byte+word accesses and to eliminate
the 2us delay for the uarts (the spin lock overhead looks to do
this for us).

15 years agouse consistent style
Sam Leffler [Tue, 23 Jun 2009 19:05:02 +0000 (19:05 +0000)]
use consistent style

15 years agoRevert most of 193311 so as to track mxge transmit stats
Andrew Gallatin [Tue, 23 Jun 2009 19:04:25 +0000 (19:04 +0000)]
Revert most of 193311 so as to track mxge transmit stats
on a per-ring basis and avoid racy (and costly) updates
to the ifp stats via drbr by defining NO_SLOW_STATS

Discussed with: kmacy

15 years agoInclude sys/lock.h before sys/rwlock.h. If anything used to bring it for us
Olivier Houchard [Tue, 23 Jun 2009 18:36:42 +0000 (18:36 +0000)]
Include sys/lock.h before sys/rwlock.h. If anything used to bring it for us
before, it does not anymore.

15 years agoOnly release irq resources if we were actually using them.
Robert Noland [Tue, 23 Jun 2009 18:24:09 +0000 (18:24 +0000)]
Only release irq resources if we were actually using them.

MFC after: 3 days

15 years agoUsing signals for vblank events is prone to issues. There have never
Robert Noland [Tue, 23 Jun 2009 18:09:35 +0000 (18:09 +0000)]
Using signals for vblank events is prone to issues.  There have never
been any consumers and likely will never be.  Furthermore, we have
never enabled the code for it, so just get rid of it.

MFC after: 3 days

15 years agoUpdate mxge firmware from 1.4.39 to 1.4.43. Changes include:
Andrew Gallatin [Tue, 23 Jun 2009 18:00:43 +0000 (18:00 +0000)]
Update mxge firmware from 1.4.39 to 1.4.43.  Changes include:

- Support for 10G-PCIE*-8B*-C (dual-port CX4)  NICs
- For dual-port NICs, f/w failover is now a few microsecs
    instead of a few millisecs.
-  On failover, f/w sends RARP broadcast to make the change
   immediately known to the network
- Fixed a bug observed on IBM X3 architecture where
   some spurious ecrc errors would be reported when OS enabled
   ecrc support.

Sponsored by: Myricom Inc.

15 years agoGiven that vblanks generally occur 60 times a second, waiting 3 seconds
Robert Noland [Tue, 23 Jun 2009 17:52:41 +0000 (17:52 +0000)]
Given that vblanks generally occur 60 times a second, waiting 3 seconds
seems rather excessive.

MFC after: 3 days

15 years agovblank[crtc].last represents the hardware counter while request.sequence
Robert Noland [Tue, 23 Jun 2009 17:50:35 +0000 (17:50 +0000)]
vblank[crtc].last represents the hardware counter while request.sequence
represents the software counter.  Don't currupt things here.

MFC after: 3 days

15 years agoImplement minimal set of changes suggested by bz to make
Andrew Gallatin [Tue, 23 Jun 2009 17:42:06 +0000 (17:42 +0000)]
Implement minimal set of changes suggested by bz to make
mxge no longer depend on INET.

15 years agoHold the lock while we save/restore register for suspend/resume.
Robert Noland [Tue, 23 Jun 2009 17:38:28 +0000 (17:38 +0000)]
Hold the lock while we save/restore register for suspend/resume.

MFC after: 3 days

15 years agoAfter cleaning up rt_tables from vnet.h and cleaning up opt_route.h
Bjoern A. Zeeb [Tue, 23 Jun 2009 17:03:45 +0000 (17:03 +0000)]
After cleaning up rt_tables from vnet.h and cleaning up opt_route.h
a lot of files no longer need route.h either. Garbage collect them.
While here remove now unneeded vnet.h #includes as well.

15 years agoFix build with ACPI_DEBUG.
Rui Paulo [Tue, 23 Jun 2009 15:08:03 +0000 (15:08 +0000)]
Fix build with ACPI_DEBUG.

MFC after: 2 weeks

15 years agoFix double path issue and other nits.
Rui Paulo [Tue, 23 Jun 2009 14:57:06 +0000 (14:57 +0000)]
Fix double path issue and other nits.

MFC after: 2 weeks

15 years agoIn r194702 I meant to remove vnet.h which is no longer needed, not route.h.
Bjoern A. Zeeb [Tue, 23 Jun 2009 14:54:42 +0000 (14:54 +0000)]
In r194702 I meant to remove vnet.h which is no longer needed, not route.h.

15 years agoWhitespace fix.
Jamie Gritton [Tue, 23 Jun 2009 14:40:08 +0000 (14:40 +0000)]
Whitespace fix.

Approved by: bz (mentor)

15 years agoRemove obsolete comment describing how the command line is
Jamie Gritton [Tue, 23 Jun 2009 14:39:51 +0000 (14:39 +0000)]
Remove obsolete comment describing how the command line is
no longer parsed.

Approved by: bz (mentor)

15 years agoRemove unnecessary/redundant includes.
Jamie Gritton [Tue, 23 Jun 2009 14:39:21 +0000 (14:39 +0000)]
Remove unnecessary/redundant includes.

Approved by: bz (mentor)

15 years agoCode cleanup by moving some repetitive code into an ndis_get_bssid_list
Coleman Kane [Tue, 23 Jun 2009 14:37:07 +0000 (14:37 +0000)]
Code cleanup by moving some repetitive code into an ndis_get_bssid_list
helper function. Also, add ieee80211_announce() call for bootverbose case.

Submitted by: Paul B. Mahol <onemda@gmail.com>

15 years agoFix a typo in the same comment, one line below.
Ed Schouten [Tue, 23 Jun 2009 14:12:49 +0000 (14:12 +0000)]
Fix a typo in the same comment, one line below.

Submitted by: bf1783 googlemail com

15 years agoRemove unneeded stdlib directories.
Ed Schouten [Tue, 23 Jun 2009 14:11:41 +0000 (14:11 +0000)]
Remove unneeded stdlib directories.

It's not necessary to add stdlib directories for each architecture, even
if the architecture doesn't implement any files of its own.

Submitted by: Christoph Mallon

15 years agoSimplify. We can just use .sinclude here.
Ed Schouten [Tue, 23 Jun 2009 14:10:46 +0000 (14:10 +0000)]
Simplify. We can just use .sinclude here.

Submitted by: Christoph Mallon

15 years agoin6_rtqdrain() has been unused. Cleanup.
Bjoern A. Zeeb [Tue, 23 Jun 2009 13:22:19 +0000 (13:22 +0000)]
in6_rtqdrain() has been unused.  Cleanup.
As this was the only consumer of net/route.h left remove that as well.

15 years ago* Driver for ACPI WMI (Windows Management Instrumentation)
Rui Paulo [Tue, 23 Jun 2009 13:17:25 +0000 (13:17 +0000)]
* Driver for ACPI WMI (Windows Management Instrumentation)
* Driver for ACPI HP extra functionations, which required
  ACPI WMI driver.

Submitted by: Michael <freebsdusb at bindone.de>
Approved by: re
MFC after: 2 weeks

15 years agoRemove duplicate #include <net/route.h> from the middle of the file.
Bjoern A. Zeeb [Tue, 23 Jun 2009 13:16:16 +0000 (13:16 +0000)]
Remove duplicate #include <net/route.h> from the middle of the file.

15 years agoMark ng_ether node hooks as HI_STACK. It is usually the last point when
Alexander Motin [Tue, 23 Jun 2009 12:30:21 +0000 (12:30 +0000)]
Mark ng_ether node hooks as HI_STACK. It is usually the last point when
netgraph may unroll the call stack, and I have found that in some cases 2K
guarantied there for i386 may be not enough for NIC driver and BPF.

15 years agovn_open_cred() needs a non NULL ucred pointer
Peter Holm [Tue, 23 Jun 2009 11:29:54 +0000 (11:29 +0000)]
vn_open_cred() needs a non NULL ucred pointer

Reviewed by: kib

15 years agoFix typo in comment.
Ed Schouten [Tue, 23 Jun 2009 09:50:50 +0000 (09:50 +0000)]
Fix typo in comment.

Submitted by: Christoph Mallon

15 years agoRemove hand-written labs/abs implementations. GCC is smart enough.
Ed Schouten [Tue, 23 Jun 2009 09:04:59 +0000 (09:04 +0000)]
Remove hand-written labs/abs implementations. GCC is smart enough.

It turns out GCC generates code that's a couple of bytes big bigger, but
performs no branching whatsoever.

Submitted by: Christoph Mallon

15 years agoFix what seems to be an obvious typo preventing the body of the
Roman Divacky [Tue, 23 Jun 2009 09:02:24 +0000 (09:02 +0000)]
Fix what seems to be an obvious typo preventing the body of the
if statement to ever be executed.

Approved by: ed (mentor)

15 years agoo Fix usage() prototype [1] and correct its call.
Maxim Konovalov [Tue, 23 Jun 2009 08:51:11 +0000 (08:51 +0000)]
o Fix usage() prototype [1] and correct its call.

Submitted by: ed [1]

15 years ago - Add a new cpuset macro, CPU_FILL(), for setting the set to all 1s.
Jeff Roberson [Tue, 23 Jun 2009 06:57:46 +0000 (06:57 +0000)]
 - Add a new cpuset macro, CPU_FILL(), for setting the set to all 1s.

15 years agotime_t does not always fit into long, for instance on arm. So rather cast
John Hay [Tue, 23 Jun 2009 06:46:14 +0000 (06:46 +0000)]
time_t does not always fit into long, for instance on arm. So rather cast
it intmax_t and use %j in printf.

15 years agoConnect ng_pipe to the default build.
Marko Zec [Tue, 23 Jun 2009 06:11:04 +0000 (06:11 +0000)]
Connect ng_pipe to the default build.

Approved by: julian (mentor)

15 years agoFix a typeo in the frame len function to unbreak the build, make it shorter
Andrew Thompson [Tue, 23 Jun 2009 06:00:31 +0000 (06:00 +0000)]
Fix a typeo in the frame len function to unbreak the build, make it shorter
while I am here.

15 years agoo style(9) usage() definition: it doesn't need an argument.
Maxim Konovalov [Tue, 23 Jun 2009 05:55:56 +0000 (05:55 +0000)]
o style(9) usage() definition: it doesn't need an argument.

15 years agoo Remove unneeded argument in fprintf(3) call in usage().
Maxim Konovalov [Tue, 23 Jun 2009 05:51:48 +0000 (05:51 +0000)]
o Remove unneeded argument in fprintf(3) call in usage().

Submitted by: Pawel Worach

15 years agoAdd cpufreq support on the PowerPC G5, along with a skeleton SMU driver
Nathan Whitehorn [Tue, 23 Jun 2009 04:28:32 +0000 (04:28 +0000)]
Add cpufreq support on the PowerPC G5, along with a skeleton SMU driver
in order to slew CPU voltage during frequency changes. The OpenBSD SMU
driver was an extremely helpful reference for this.

15 years agoFix copy/paste typo in last revision. PMC0 control should be shifted 8
Nathan Whitehorn [Tue, 23 Jun 2009 04:02:36 +0000 (04:02 +0000)]
Fix copy/paste typo in last revision. PMC0 control should be shifted 8
bits, not 6, on the PPC 970.

15 years ago- Make struct usb_xfer opaque so that drivers can not access the internals
Andrew Thompson [Tue, 23 Jun 2009 02:19:59 +0000 (02:19 +0000)]
- Make struct usb_xfer opaque so that drivers can not access the internals
- Reduce the number of headers needed for a usb driver, the common case is just   usb.h and usbdi.h

15 years agoAdd files missed in r194674.
Andrew Thompson [Tue, 23 Jun 2009 01:04:58 +0000 (01:04 +0000)]
Add files missed in r194674.

Add libusb 1.0 support which is compatible with the latest revision on
Sourceforge. Libusb 1.0 is a portable usb api released December 2008 and
supersedes the original libusb released 10 years ago, it supports isochronous
endpoints and asynchronous I/O.  Many applications have already started using
the interfaces.

This has been developed as part of Google Summer of Code this year by Sylvestre
Gallon and has been cribbed early due to it being desirable in FreeBSD 8.0

Submitted by: Sylvestre Gallon
Sponsored by: Google Summer of Code 2009
Reviewed by:  Hans Petter Selasky

15 years agoDescribe the new algorithm for handling __FreeBSD_version, specifically
Ken Smith [Tue, 23 Jun 2009 01:03:09 +0000 (01:03 +0000)]
Describe the new algorithm for handling __FreeBSD_version, specifically
the 'R' value now being allowed to take on more values than 0 or 1 and
permitting more than 100 version bumps in pre-release branches.

15 years agoAdd libusb 1.0 support which is compatible with the latest revision on
Andrew Thompson [Tue, 23 Jun 2009 01:00:26 +0000 (01:00 +0000)]
Add libusb 1.0 support which is compatible with the latest revision on
Sourceforge. Libusb 1.0 is a portable usb api released December 2008 and
supersedes the original libusb released 10 years ago, it supports isochronous
endpoints and asynchronous I/O.  Many applications have already started using
the interfaces.

This has been developed as part of Google Summer of Code this year by Sylvestre
Gallon and has been cribbed early due to it being desirable in FreeBSD 8.0

Submitted by: Sylvestre Gallon
Sponsored by: Google Summer of Code 2009
Reviewed by: Hans Petter Selasky

15 years agokill left over cruft
Sam Leffler [Mon, 22 Jun 2009 23:22:38 +0000 (23:22 +0000)]
kill left over cruft

15 years agoAdd soreceive_stream(), an optimized version of soreceive() for
Andre Oppermann [Mon, 22 Jun 2009 23:08:05 +0000 (23:08 +0000)]
Add soreceive_stream(), an optimized version of soreceive() for
stream (TCP) sockets.

It is functionally identical to generic soreceive() but has a
number stream specific optimizations:
o does only one sockbuf unlock/lock per receive independent of
  the length of data to be moved into the uio compared to
  soreceive() which unlocks/locks per *mbuf*.
o uses m_mbuftouio() instead of its own copy(out) variant.
o much more compact code flow as a large number of special
  cases is removed.
o much improved reability.

It offers significantly reduced CPU usage and lock contention
when receiving fast TCP streams.  Additional gains are obtained
when the receiving application is using SO_RCVLOWAT to batch up
some data before a read (and wakeup) is done.

This function was written by "reverse engineering" and is not
just a stripped down variant of soreceive().

It is not yet enabled by default on TCP sockets.  Instead it is
commented out in the protocol initialization in tcp_usrreq.c
until more widespread testing has been done.

Testers, especially with 10GigE gear, are welcome.

MFP4: r164817 //depot/user/andre/soreceive_stream/

15 years agoenable optional GPS+RS485 uarts
Sam Leffler [Mon, 22 Jun 2009 22:54:44 +0000 (22:54 +0000)]
enable optional GPS+RS485 uarts

15 years agoo add a bus space tag that forces a 2usec delay between r/w ops; this is
Sam Leffler [Mon, 22 Jun 2009 22:54:13 +0000 (22:54 +0000)]
o add a bus space tag that forces a 2usec delay between r/w ops; this is
  used for the optional GPS+RS485 uarts on the Gateworks Cambria boards
  which otherwise are unreliable
o setup the hack bus space tag for the GPS+RS485 uarts
o program the gpio interrupts for the uarts to be edge-rising
o force timing on the expansion bus for the uarts to be "slow"

Thanks to Chris Lang of Gateworks for these tips.

15 years agofix typo
Sam Leffler [Mon, 22 Jun 2009 22:47:06 +0000 (22:47 +0000)]
fix typo

15 years agoo remove hack to write UUE+RTOIE in the uart's IER; force them with hints
Sam Leffler [Mon, 22 Jun 2009 22:46:37 +0000 (22:46 +0000)]
o remove hack to write UUE+RTOIE in the uart's IER; force them with hints
o honor hints for the rclk

15 years agoAdd m_mbuftouio() helper function to copy(out) an arbitrary
Andre Oppermann [Mon, 22 Jun 2009 22:20:38 +0000 (22:20 +0000)]
Add m_mbuftouio() helper function to copy(out) an arbitrary
long mbuf chain into an arbitrary large uio in a single step.
It is a functional mirror image of m_uiotombuf().

This function is supposed to be used instead of hand rolled code
with the same purpose and to concentrate it into one place for
potential further optimization or hardware assistance.

15 years agodone method is supposed to return int.
Xin LI [Mon, 22 Jun 2009 22:09:18 +0000 (22:09 +0000)]
done method is supposed to return int.

15 years agoStart documenting some of the new sound stuff. More is on the way.
Joel Dahl [Mon, 22 Jun 2009 21:51:29 +0000 (21:51 +0000)]
Start documenting some of the new sound stuff.  More is on the way.
Probably also needs some more mdoc love.

Reviewed by: ariff

15 years agofree(3) won't mess with errno so return it as-is.
Xin LI [Mon, 22 Jun 2009 21:49:55 +0000 (21:49 +0000)]
free(3) won't mess with errno so return it as-is.

Submitted by: Jaakko Heinonen <jh saunalahti fi>

15 years agoIn sbappendstream_locked() demote all incoming packet mbufs (and
Andre Oppermann [Mon, 22 Jun 2009 21:46:40 +0000 (21:46 +0000)]
In sbappendstream_locked() demote all incoming packet mbufs (and
chains) to pure data mbufs using m_demote().  This removes the
packet header and all m_tag information as they are not meaningful
anymore on a stream socket where mbufs are linked through m->m_next.
Strictly speaking a packet header can be only ever valid on the first
mbuf in an m_next chain.

sbcompress() was doing this already when the mbuf chain layout lent
itself to it (e.g. header splitting or merge-append), just not
consistently.

This frees resources at socket buffer append time instead of at
sbdrop_internal() time after data has been read from the socket.

For MAC the per packet information has done its duty and during
socket buffer appending the policy of the socket itself takes over.
With the append the packet boundaries disappear naturally and with
it any context that was based on it.  None of the residual information
from mbuf headers in the socket buffer on stream sockets was looked at.

15 years agoFix cxgb's ifmedia ioctl handling. Also fixed a comment.
Navdeep Parhar [Mon, 22 Jun 2009 21:42:57 +0000 (21:42 +0000)]
Fix cxgb's ifmedia ioctl handling.  Also fixed a comment.

Reviewed by: kmacy
Approved by: gnn (mentor)

15 years agoV_irtualize flowtable state.
Marko Zec [Mon, 22 Jun 2009 21:19:24 +0000 (21:19 +0000)]
V_irtualize flowtable state.

This change should make options VIMAGE kernel builds usable again,
to some extent at least.

Note that the size of struct vnet_inet has changed, though in
accordance with one-bump-per-day policy we didn't update the
__FreeBSD_version number, given that it has already been touched
by r194640 a few hours ago.
Reviewed by: bz
Approved by: julian (mentor)

15 years agoFix length check for ugen control transfer.
Andrew Thompson [Mon, 22 Jun 2009 21:09:52 +0000 (21:09 +0000)]
Fix length check for ugen control transfer.

Submitted by: Sylvestre Gallon, HPS

15 years agohook arm_post_filter to ACK GPIO interrupts; this fixes the interrupt
Sam Leffler [Mon, 22 Jun 2009 20:57:51 +0000 (20:57 +0000)]
hook arm_post_filter to ACK GPIO interrupts; this fixes the interrupt
storm observed on the GPS+RS485 uarts on Gateworks Cambria boards

Reviewed by: cognet

15 years agoalways define Cambria GPS+RS485 mappings as they are no longer conditional
Sam Leffler [Mon, 22 Jun 2009 20:42:28 +0000 (20:42 +0000)]
always define Cambria GPS+RS485 mappings as they are no longer conditional

15 years agomap the optional GPS and RS485 uart's on the Gateworks Cambria board
Sam Leffler [Mon, 22 Jun 2009 20:41:02 +0000 (20:41 +0000)]
map the optional GPS and RS485 uart's on the Gateworks Cambria board
(may want to make these conditional)

15 years agoadd ixp425_set_gpio to program the gpio interrupt type
Sam Leffler [Mon, 22 Jun 2009 20:38:55 +0000 (20:38 +0000)]
add ixp425_set_gpio to program the gpio interrupt type

15 years agorewrite arm_get_next_irq to always make forward progress (should be optimized)
Sam Leffler [Mon, 22 Jun 2009 20:36:22 +0000 (20:36 +0000)]
rewrite arm_get_next_irq to always make forward progress (should be optimized)

15 years agokill stray whitespace
Sam Leffler [Mon, 22 Jun 2009 20:34:50 +0000 (20:34 +0000)]
kill stray whitespace

15 years agomove logic to ACK a GPIO to a separate function
Sam Leffler [Mon, 22 Jun 2009 20:33:59 +0000 (20:33 +0000)]
move logic to ACK a GPIO to a separate function

15 years agoswap order in ddb show gpio printf
Sam Leffler [Mon, 22 Jun 2009 20:31:06 +0000 (20:31 +0000)]
swap order in ddb show gpio printf

15 years agomake type use consistent
Sam Leffler [Mon, 22 Jun 2009 20:30:02 +0000 (20:30 +0000)]
make type use consistent

15 years agoRegen.
John Baldwin [Mon, 22 Jun 2009 20:24:03 +0000 (20:24 +0000)]
Regen.

15 years agoInclude definitions for the audit identifiers for compat system calls in
John Baldwin [Mon, 22 Jun 2009 20:14:10 +0000 (20:14 +0000)]
Include definitions for the audit identifiers for compat system calls in
sysproto.h.  This makes it possible to use SYSCALL_MODULE() for compat
system calls that live in kernel modules.

15 years agoFix a typo in a comment.
John Baldwin [Mon, 22 Jun 2009 20:12:40 +0000 (20:12 +0000)]
Fix a typo in a comment.

15 years agoEnable MSI in the MSI capability registers any time that the first message
John Baldwin [Mon, 22 Jun 2009 20:08:06 +0000 (20:08 +0000)]
Enable MSI in the MSI capability registers any time that the first message
in an MSI group is enabled, not just if the address/data pair are not
initialized.

Reported by: rnoland
MFC after: 1 week

15 years agoUpdate m_demote:
Andre Oppermann [Mon, 22 Jun 2009 19:35:39 +0000 (19:35 +0000)]
Update m_demote:
- remove HT_HEADER test (MT_HEADER == MT_DATA for some time now)
- be more pedantic about m_nextpkt in other than first mbuf
- update m_flags to be retained

15 years agoValidate the page in one place, dev_pager_getpages(), rather than doing it
Alan Cox [Mon, 22 Jun 2009 19:09:48 +0000 (19:09 +0000)]
Validate the page in one place, dev_pager_getpages(), rather than doing it
in two places, dev_pager_getfake() and dev_pager_updatefake().

Compare a pointer to "NULL" rather than "0".

15 years agoUpdates after r194640:
Bjoern A. Zeeb [Mon, 22 Jun 2009 17:56:07 +0000 (17:56 +0000)]
Updates after r194640:
- shrink size guards for vnet_net.
  vnet_rtable does not need size guards as it is self-contained.
- remove a bunch of defines from vnet.h no longer valid.

15 years agoMove virtualization of routing related variables into their own
Bjoern A. Zeeb [Mon, 22 Jun 2009 17:48:16 +0000 (17:48 +0000)]
Move virtualization of routing related variables into their own
Vimage module, which had been there already but now is stateful.

All variables are now file local; so this further limits the global
spreading of routing related things throughout the kernel.

Add a missing function local variable in case of MPATHing.

Reviewed by: zec

15 years agoAdd a missing return in NULL mutex case.
Jung-uk Kim [Mon, 22 Jun 2009 17:46:55 +0000 (17:46 +0000)]
Add a missing return in NULL mutex case.

Submitted by: Pawel Worach (pawel dot worach at gmail dot com)

15 years agoSplit tolower/toupper code from usual xlat16 kiconv table, and make it
Xin LI [Mon, 22 Jun 2009 17:09:46 +0000 (17:09 +0000)]
Split tolower/toupper code from usual xlat16 kiconv table, and make it
possible to do tolower/toupper independently without code conversion.

Submitted by: imura (but bugs are mine)
Obtained from: http://people.freebsd.org/~imura/kiconv/
(1_kiconv_wctype_kern.diff, 1_kiconv_wctype_user.diff)

15 years agoAdd prototypes when the library is compiled static.
Xin LI [Mon, 22 Jun 2009 17:00:20 +0000 (17:00 +0000)]
Add prototypes when the library is compiled static.

15 years agofix wrong name for the iso!
Luigi Rizzo [Mon, 22 Jun 2009 16:06:38 +0000 (16:06 +0000)]
fix wrong name for the iso!

15 years agoBump PowerPC loader(8) version to reflect extensions it has recently grown.
Rafal Jaworowski [Mon, 22 Jun 2009 15:57:12 +0000 (15:57 +0000)]
Bump PowerPC loader(8) version to reflect extensions it has recently grown.

15 years agoKeep file list sorted.
Rafal Jaworowski [Mon, 22 Jun 2009 15:53:41 +0000 (15:53 +0000)]
Keep file list sorted.

15 years agoDS1553 RTC module driver. On the MPC8555CDS system it hangs off of the LBC bus.
Rafal Jaworowski [Mon, 22 Jun 2009 15:48:47 +0000 (15:48 +0000)]
DS1553 RTC module driver. On the MPC8555CDS system it hangs off of the LBC bus.

Obtained from: Semihalf

15 years agoAdd code to generate a bootable ISO image, so we are finally
Luigi Rizzo [Mon, 22 Jun 2009 15:45:26 +0000 (15:45 +0000)]
Add code to generate a bootable ISO image, so we are finally
free from the 2.88MB that we had using El Torito emulation.

The --iso option was already there, just didn't do anything before.

Submitted by: Marta Carbone
MFC after: 3 days

15 years agoIntegrated I2C controller driver (found in MPC85xx and other SOC parts).
Rafal Jaworowski [Mon, 22 Jun 2009 15:34:32 +0000 (15:34 +0000)]
Integrated I2C controller driver (found in MPC85xx and other SOC parts).

Obtained from: Freescale, Semihalf

15 years agoCollect all VIMAGE_GLOBALS variables in one place.
Bjoern A. Zeeb [Mon, 22 Jun 2009 15:07:12 +0000 (15:07 +0000)]
Collect all VIMAGE_GLOBALS variables in one place.

No longer export rt_tables as all lookups go through
rt_tables_get_rnh().

We cannot make rt_tables (and rtstat, rttrash[1]) static as
netstat -r (-rs[1]) would stop working on a stripped
VIMAGE_GLOBALS kernel.

Reviewed by: zec
Presumably broken by: phk 13.5y ago in r12820 [1]

15 years ago- Fall-back to /etc/termcap.small if there is no /usr/share/misc/termcap
Rong-En Fan [Mon, 22 Jun 2009 15:00:15 +0000 (15:00 +0000)]
- Fall-back to /etc/termcap.small if there is no /usr/share/misc/termcap
  (i.e. /etc/termcap). This can be useful when using /rescue/vi while /usr
  is not (or unable to be) mounted. The termcap.small can be found in
  src/etc/termcap.small.

PR: bin/80256 (audit-trail)
Submitted by: Brian Candler <B.Candler at pobox.com>, Alex Kozlov <spam at rm-rf.kiev.ua>
MFC after: 1 month

15 years agoChange cam_periph_ioctl() to take 'cmd' and a u_long instead of an
Scott Long [Mon, 22 Jun 2009 14:43:48 +0000 (14:43 +0000)]
Change cam_periph_ioctl() to take 'cmd' and a u_long instead of an
int.  All of its callers pass in cmd as a u_long, so this has
always been a dangerous type demotion.  It was spooted by clang/llvm
trying to do a type promotion and sign extension within
cam_periph_ioctl.

Submitted by: rdivacky

15 years agoAdd a new function, ifa_ifwithaddr_check(), which rather than returning
Robert Watson [Mon, 22 Jun 2009 10:59:34 +0000 (10:59 +0000)]
Add a new function, ifa_ifwithaddr_check(), which rather than returning
a pointer to an ifaddr matching the passed socket address, returns a
boolean indicating whether one was present.  In the (near) future,
ifa_ifwithaddr() will return a referenced ifaddr rather than a raw
ifaddr pointer, and the new wrapper will allow callers that care only
about the boolean condition to avoid having to free that reference.

MFC after: 3 weeks

15 years agoRemove unneeded stores back into the function arguments.
Ed Schouten [Mon, 22 Jun 2009 10:56:08 +0000 (10:56 +0000)]
Remove unneeded stores back into the function arguments.

Submitted by: Christoph Mallon

15 years agoAfter the update to fxp(4) in r194573 we should no longer need
Bjoern A. Zeeb [Mon, 22 Jun 2009 10:27:20 +0000 (10:27 +0000)]
After the update to fxp(4) in r194573 we should no longer need
this DELAY(100) hack introduced in r56938.

Thanks to: yongari
MFC after: 6 weeks
X-MFC note: not before the fxp(4) changes

15 years agoAdd a global rwlock, at_ifaddr_rw, to protect the global netatalk
Robert Watson [Mon, 22 Jun 2009 10:23:54 +0000 (10:23 +0000)]
Add a global rwlock, at_ifaddr_rw, to protect the global netatalk
address lists, at_ifaddr_list.  Acquire the lock, and use ifaddr
refcounts where necessary, to close most known address-related
races in netatalk.

Annotate one potential race in at_control() where we acquire an
ifaddr reference, drop the global lock, and scrub the address from
the ifnet before re-acquiring the global lock, which could allow
for a writer-writer race.

MFC after: 3 weeks

15 years agoMove definitions of AT_* constants from the middle of the open(2) flags
Konstantin Belousov [Mon, 22 Jun 2009 10:11:35 +0000 (10:11 +0000)]
Move definitions of AT_* constants from the middle of the open(2) flags
enumeration.

Noted by: bde

15 years agoO_NOFOLLOW shall be in flags, not in cmode.
Konstantin Belousov [Mon, 22 Jun 2009 10:08:48 +0000 (10:08 +0000)]
O_NOFOLLOW shall be in flags, not in cmode.

Noted by: bde

15 years agoRemove a hack from r186086 so that IPsec via loopback routes continued
Bjoern A. Zeeb [Mon, 22 Jun 2009 09:24:46 +0000 (09:24 +0000)]
Remove a hack from r186086 so that IPsec via loopback routes continued
working. It was targeted for stable/7 compatibility and actually never
did anything in HEAD.

Reminded by: rwatson
X-MFC after: never