]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoFollow up commit to reindent the code.
delphij [Fri, 12 Mar 2010 21:15:35 +0000 (21:15 +0000)]
Follow up commit to reindent the code.

MFC after: 1 month

14 years agoTwo optimizations to MI strlen(3) inspired by David S. Miller's
delphij [Fri, 12 Mar 2010 21:14:56 +0000 (21:14 +0000)]
Two optimizations to MI strlen(3) inspired by David S. Miller's
blog posting [1].

 - Use word-sized test for unaligned pointer before working
   the hard way.

   Memory page boundary is always integral multiple of a word
   alignment boundary.  Therefore, if we can access memory
   referenced by pointer p, then (p & ~word mask) must be also
   accessible.

 - Better utilization of multi-issue processor's ability of
   concurrency.

   The previous implementation utilized a formular that must be
   executed sequentially.  However, the ~, & and - operations can
   actually be caculated at the same time when the operand were
   different and unrelated.

   The original Hacker's Delight formular also offered consistent
   performance regardless whether the input would contain
   characters with their highest-bit set, as it catches real
   nul characters only.

These two optimizations has shown further improvements over the
previous implementation on microbenchmarks on i386 and amd64 CPU
including Pentium 4, Core Duo 2 and i7.

[1] http://vger.kernel.org/~davem/cgi-bin/blog.cgi/2010/03/08#strlen_1

MFC after: 1 month

14 years agoflowtable_get_hashkey is only used by a DDB function - move under #ifdef DDB
kmacy [Fri, 12 Mar 2010 19:58:51 +0000 (19:58 +0000)]
flowtable_get_hashkey is only used by a DDB function - move under #ifdef DDB

pointed out by jkim@

14 years agoAdd pci ids for Intel Ironlake chipsets.
rnoland [Fri, 12 Mar 2010 19:43:39 +0000 (19:43 +0000)]
Add pci ids for Intel Ironlake chipsets.

These behave just like g45 for agp.

Tested by: Torfinn Ingolfsen

MFC after: 3 days

14 years agoFix a style(9) nit.
jkim [Fri, 12 Mar 2010 19:42:42 +0000 (19:42 +0000)]
Fix a style(9) nit.

14 years agore-update copyright to 2010
kmacy [Fri, 12 Mar 2010 19:26:45 +0000 (19:26 +0000)]
re-update copyright to 2010
pointed out by danfe@

14 years agoTidy up callout for select(2) and read timeout.
jkim [Fri, 12 Mar 2010 19:14:58 +0000 (19:14 +0000)]
Tidy up callout for select(2) and read timeout.

- Add a missing callout_drain(9) before the descriptor deallocation.[1]
- Prefer callout_init_mtx(9) over callout_init(9) and let the callout
subsystem handle the mutex for callout function.

PR: kern/144453
Submitted by: Alexander Sack (asack at niksun dot com)[1]
MFC after: 1 week

14 years agoImplement Rx checksum offloading for Yukon EC, Yukon Ultra,
yongari [Fri, 12 Mar 2010 18:41:41 +0000 (18:41 +0000)]
Implement Rx checksum offloading for Yukon EC, Yukon Ultra,
Yukon FE and Yukon Ultra2. These controllers provide very simple
checksum computation mechanism and it requires additional pseudo
header checksum computation in upper stack. Even though I couldn't
see much performance difference with/without Rx checksum offloading
it may help notebook based controllers.

Actually controller can compute two checksum value by giving
different starting position of checksum computation on received
frame. However, for long time, Marvell's checksum offloading engine
have been known to have several silicon bugs so don't blindly trust
computed partial checksum value. Instead, compute partial checksum
twice by giving the same checksum computation position and compare
the result. If the value is different it's clear indication of
hardware bug. This configuration lose IP checksum offloading
capability but I think it's better to take safe route.
Note, Rx checksum offloading for Yukon XL was still disabled due to
known silicon bug.

14 years agoReorder interrupt handler a bit such that producer/consumer
yongari [Fri, 12 Mar 2010 18:18:04 +0000 (18:18 +0000)]
Reorder interrupt handler a bit such that producer/consumer
index of status block is read first before acknowledging the
interrupts. Otherwise bge(4) may get stale status block as
acknowledging an interrupt may yield another status block update.

Reviewed by: marius

14 years agoUpdate to upstream version 2.3
fanf [Fri, 12 Mar 2010 17:55:29 +0000 (17:55 +0000)]
Update to upstream version 2.3

Add -V (display version) and -S (list controlling symbols per #if
with nesting information) options, and improve unifdefall debug output.
Done committing 0 revisions to SVN

Obtained from: http://dotat.at/prog/unifdef

14 years agoNow fix functionality of 'netstat -f netgraph' that hasn't worked
glebius [Fri, 12 Mar 2010 15:04:59 +0000 (15:04 +0000)]
Now fix functionality of 'netstat -f netgraph' that hasn't worked
starting from netgraph import in 1999.

netstat(8) used pointer to node as node address, oops. That didn't
work, we need the node ID in brackets to successfully address a node.
We can't look into ng_node, due to inability to include netgraph/netgraph.h
in userland code. So let the node make a hint for a userland, storing
the node ID in its private data.

MFC after: 2 weeks

14 years agoFix 'netstat -f netgraph', which I had broken in r163463 ling time
glebius [Fri, 12 Mar 2010 14:51:42 +0000 (14:51 +0000)]
Fix 'netstat -f netgraph', which I had broken in r163463 ling time
ago in 2006. This linked list is actually needed for userland.

PR: kern/140446
Submitted by: Adrian Steinmann <ast marabu.ch>

14 years agoForce commit to correct Bug ID:
pjd [Fri, 12 Mar 2010 13:36:58 +0000 (13:36 +0000)]
Force commit to correct Bug ID:

Obtained from: OpenSolaris, Bug ID 6920880

14 years agoRemove bogus assertion.
pjd [Fri, 12 Mar 2010 12:07:21 +0000 (12:07 +0000)]
Remove bogus assertion.

Reported by: Johan Ström <johan@stromnet.se>
Obtained from: OpenSolaris, Bug ID 6827260
MFC after: 1 week

14 years agoFix typo in macro name and macro usage.
uqs [Fri, 12 Mar 2010 11:05:37 +0000 (11:05 +0000)]
Fix typo in macro name and macro usage.

Found by: make manlint
Reviewed by: ru
Approved by: harti, philip (mentor)

14 years agoThe flow-table module retrieves the destination and source
qingli [Fri, 12 Mar 2010 10:24:58 +0000 (10:24 +0000)]
The flow-table module retrieves the destination and source
address as well as the transport protocol port information
from the outbound packets. The routing code is generic and
compares every byte in the given sockaddr object. Therefore
the temporary sockaddr objects must be cleared due to padding
bytes. In addition, the port information must be stripped
or the route search will either fail or return the incorrect
route entry.

Unit testing is done using OpenVPN over the if_tun interface.

MFC after: 7 days

14 years agoFix several typos in macros or macro misusage.
uqs [Fri, 12 Mar 2010 10:01:06 +0000 (10:01 +0000)]
Fix several typos in macros or macro misusage.

Found by: make manlint
Reviewed by: ru
Approved by: philip (mentor)

14 years agoWith the recent change of the sctp checksum to support offload,
rrs [Fri, 12 Mar 2010 08:10:30 +0000 (08:10 +0000)]
With the recent change of the sctp checksum  to support offload,
no delayed checksum was added to the ip6 output code. This
causes cards that do not support SCTP checksum offload to
have SCTP packets that are IPv6 NOT have the sctp checksum
performed. Thus you could not communicate with a peer. This
adds the missing bits to make the checksum happen for these cards.

PR: 144529
MFC after: 2 weeks

14 years agoMask disk_idx to avoid panic because of extra bits set.
mav [Fri, 12 Mar 2010 07:49:10 +0000 (07:49 +0000)]
Mask disk_idx to avoid panic because of extra bits set.

PR: kern/102211
Submitted by: yoichi

14 years agoRegen:
brooks [Fri, 12 Mar 2010 07:26:37 +0000 (07:26 +0000)]
Regen:

* Hart: rev 671 of pcidevs.txt; 22-01-2008 (D-M-Y).
* Boemler: vendors.txt (2010-03126)

PR: kern/133733
MFC after: 1 week

14 years ago- Enable kernel stack guard page.
neel [Fri, 12 Mar 2010 07:08:20 +0000 (07:08 +0000)]
- Enable kernel stack guard page.

- Unmap the unused kernel stack page that we cannot use because it is
  not aligned on a (PAGE_SIZE * 2) boundary.

14 years ago- With the introduction of -A, -B and -3, not all combinations of
edwin [Fri, 12 Mar 2010 06:57:53 +0000 (06:57 +0000)]
- With the introduction of -A, -B and -3, not all combinations of
  arguments makes sense anymore. For example, what would a combination
  of -3 (show three months) and -y (show the whole year) do?
  We will abort on these cases.
- Move the debug option -d to -H (from highlight), while -d is now
  used for setting the day of "today" so that -y and friends can
  be tested.

14 years agofix stats reporting sysctl
kmacy [Fri, 12 Mar 2010 06:31:19 +0000 (06:31 +0000)]
fix stats reporting sysctl

14 years ago- restructure flowtable to support ipv6
kmacy [Fri, 12 Mar 2010 05:03:26 +0000 (05:03 +0000)]
- restructure flowtable to support ipv6
- add a name argument to flowtable_alloc for printing with ddb commands
- extend ddb commands to print destination address or 4-tuples
- don't parse ports in ulp header if FL_HASH_ALL is not passed
- add kern_flowtable_insert to enable more generic use of flowtable
  (e.g. system calls for adding entries)
- don't hash loopback addresses
- cleanup whitespace
- keep statistics per-cpu for per-cpu flowtables to avoid cache line contention
- add sysctls to accumulate stats and report aggregate

MFC after: 7 days

14 years agoMake the ddb command "show tlb" SMP friendly.
neel [Fri, 12 Mar 2010 03:49:17 +0000 (03:49 +0000)]
Make the ddb command "show tlb" SMP friendly.

It now accepts an argument to dump out the tlb of a particular cpu.

14 years agoFix the previous attempt to fix kernel builds of HEAD on 7.x. Use the
jhb [Fri, 12 Mar 2010 03:08:47 +0000 (03:08 +0000)]
Fix the previous attempt to fix kernel builds of HEAD on 7.x.  Use the
__gnu_inline__ attribute for PMAP_INLINE when using the 7.x compiler to
match what 7.x uses for PMAP_INLINE.

14 years agoo) Send packets being queued for transmission up to BPF if there's a listener.
jmallett [Fri, 12 Mar 2010 02:56:45 +0000 (02:56 +0000)]
o) Send packets being queued for transmission up to BPF if there's a listener.
o) Properly configure the CAM to handle IFF_PROMISC and note where IFF_ALLMULTI
   handling would go if we didn't already force the NIC to receive all
   multicast traffic.

Reviewed by: imp
Sponsored by: Packet Forensics

14 years agoimplement listing of a subset of pipes/queues/schedulers.
luigi [Thu, 11 Mar 2010 22:42:33 +0000 (22:42 +0000)]
implement listing of a subset of pipes/queues/schedulers.
The filtering of the output is done in the kernel instead of userland
to reduce the amount of data transfered.

14 years agoAdd bpf and random to Octeon configurations, since they're needed to run
jmallett [Thu, 11 Mar 2010 22:29:45 +0000 (22:29 +0000)]
Add bpf and random to Octeon configurations, since they're needed to run
dhclient and ssh respectively.

Reviewed by: imp

14 years agoDon't force single user on Octeon anymore.
jmallett [Thu, 11 Mar 2010 22:25:53 +0000 (22:25 +0000)]
Don't force single user on Octeon anymore.

14 years agoo) Eliminate use of sc->typestr, which is always NULL.
jmallett [Thu, 11 Mar 2010 22:22:06 +0000 (22:22 +0000)]
o) Eliminate use of sc->typestr, which is always NULL.
o) Inline octeon_rgmx_mark_ready into octeon_rgmx_init.
o) Add a media status handler that reports link and media status.
o) Set link state when if_init is called.
o) Remove some printfs related to driver state changes.
o) Remove some gratuitous comments.

Reviewed by: imp
Sponsored by: Packet Forensics

14 years agoAdd device ID for the NATURAL4000 keyboard
thompsa [Thu, 11 Mar 2010 22:09:21 +0000 (22:09 +0000)]
Add device ID for the NATURAL4000 keyboard

14 years ago- Integrate latest driver code from OpenBSD
thompsa [Thu, 11 Mar 2010 22:05:12 +0000 (22:05 +0000)]
- Integrate latest driver code from OpenBSD
- Drain our tasks from the ieee80211 taskqueue
- Add more IDs

Submitted by: Akinori Furukoshi

14 years agoextend search for Apple Function Key.
thompsa [Thu, 11 Mar 2010 21:57:01 +0000 (21:57 +0000)]
extend search for Apple Function Key.

PR: usb/144414
Submitted by: Hans Petter Selasky

14 years agoAdd new device ID for the SMC 2514HUB
thompsa [Thu, 11 Mar 2010 21:55:25 +0000 (21:55 +0000)]
Add new device ID for the SMC 2514HUB

Submitted by: Alexander Best

14 years agoadd new vendor ID for APACER
thompsa [Thu, 11 Mar 2010 21:54:23 +0000 (21:54 +0000)]
add new vendor ID for APACER

Submitted by: Paul B Mahol

14 years agoImplement USB kernel driver detach from userland.
thompsa [Thu, 11 Mar 2010 21:50:36 +0000 (21:50 +0000)]
Implement USB kernel driver detach from userland.

Submitted by: Hans Petter Selasky

14 years agoMake sure there is a way to reset the endpoint FIFO on transfer errors for
thompsa [Thu, 11 Mar 2010 21:49:43 +0000 (21:49 +0000)]
Make sure there is a way to reset the endpoint FIFO on transfer errors for
ISOCHRONOUS transfers

Submitted by: Hans Petter Selasky

14 years agoFor USS820 driver we need to manually reset TX FIFO at each SETUP transaction
thompsa [Thu, 11 Mar 2010 21:49:00 +0000 (21:49 +0000)]
For USS820 driver we need to manually reset TX FIFO at each SETUP transaction
because the chip doesn't do this by itself.

Submitted by: Hans Petter Selasky

14 years agoisochronous endpoint descriptors should have two more bytes which are zero by
thompsa [Thu, 11 Mar 2010 21:48:10 +0000 (21:48 +0000)]
isochronous endpoint descriptors should have two more bytes which are zero by
default.

Submitted by: Hans Petter Selasky

14 years agoAdd new uvisor(4) device ID.
thompsa [Thu, 11 Mar 2010 21:47:25 +0000 (21:47 +0000)]
Add new uvisor(4) device ID.

PR: usb/144201

14 years agoIt appears that some UVISOR devices do not handle when the clear stall command
thompsa [Thu, 11 Mar 2010 21:46:33 +0000 (21:46 +0000)]
It appears that some UVISOR devices do not handle when the clear stall command
is issued at the beginning of the initial IN/OUT data transfers.  Reason
unknown, probably firmware fault. Now the stall is only cleared on data
transfer errors.

PR: usb/144199
Submitted by: Hans Petter Selasky

14 years ago- make the usb_temp_setup() and usb_temp_unsetup() functions public so that
thompsa [Thu, 11 Mar 2010 21:45:31 +0000 (21:45 +0000)]
- make the usb_temp_setup() and usb_temp_unsetup() functions public so that
  other modules can generate USB descriptors.
- extend the vendor specific request function by one length pointer argument,
  because not all descriptors store the length in the first byte. For example
  HID descriptors.

Submitted by: Hans Petter Selasky

14 years agoUse wMaxPacketSize for the uftdi input buffer size.
thompsa [Thu, 11 Mar 2010 21:42:09 +0000 (21:42 +0000)]
Use wMaxPacketSize for the uftdi input buffer size.

Submitted by: Hans Petter Selasky

14 years agoFix ARM cache handling yet more.
raj [Thu, 11 Mar 2010 21:16:54 +0000 (21:16 +0000)]
Fix ARM cache handling yet more.

1) vm_machdep.c: remove the dangling allocations so they do not
   un-necessarily turn off the cache upon consecutive access.

2) busdma_machdep.c: remove the same amount than shadow mapped.

Reported by: Maks Verver
Submitted by: Mark Tinguely
Reviewed by: Grzegorz Bernacki
MFC after: 3 days

14 years agoLet detailed info about CPU features print on Marvell Sheeva CPU as well.
raj [Thu, 11 Mar 2010 21:04:29 +0000 (21:04 +0000)]
Let detailed info about CPU features print on Marvell Sheeva CPU as well.

Provide missing entry in the cpu_classes[].

Reported by: Maks Verver
MFC after: 1 week

14 years agoReapply r185998 which was overwritten at some point.
thompsa [Thu, 11 Mar 2010 20:41:21 +0000 (20:41 +0000)]
Reapply r185998 which was overwritten at some point.

14 years agoThe if_tap interface is of IFT_ETHERNET type, but it
qingli [Thu, 11 Mar 2010 17:56:46 +0000 (17:56 +0000)]
The if_tap interface is of IFT_ETHERNET type, but it
does not set or update the if_link_state variable.
As such RT_LINK_IS_UP() fails for the if_tap interface.

Also, the RT_LINK_IS_UP() needs to bypass all loopback
interfaces because loopback interfaces are considered
up logically as long as the system is running.

This patch fixes the above issues by setting and updating
the if_link_state variable when the tap interface is
opened or closed respectively. Similary approach is
already done in the if_tun device.

MFC after: 3 days

14 years ago- Use an initializer macro to initialize fields in 'fake' FILE objects used
jhb [Thu, 11 Mar 2010 17:03:32 +0000 (17:03 +0000)]
- Use an initializer macro to initialize fields in 'fake' FILE objects used
  by *sprintf(), etc.
- Explicitly initialize _fl_mutex to PTHREAD_MUTEX_INITIALIZER for all FILE
  objects.  This is currently a nop on FreeBSD, but is import for other
  platforms (or in the future) where PTHREAD_MUTEX_INITIALIZER is not simply
  zero.

PR: threads/141198
Reported by: Jeremy Huddleston @ Apple
MFC after: 2 weeks

14 years agoFix a bug in the previous change: remove function-local definition of
jhb [Thu, 11 Mar 2010 16:58:15 +0000 (16:58 +0000)]
Fix a bug in the previous change: remove function-local definition of
tcp_key and udp_key that shadows the global definition.

PR: threads/144558
Submitted by: Sam Robb

14 years agoSmall whitespace fixes.
jhb [Thu, 11 Mar 2010 15:25:47 +0000 (15:25 +0000)]
Small whitespace fixes.

14 years agoStyle fixes.
jhb [Thu, 11 Mar 2010 15:13:55 +0000 (15:13 +0000)]
Style fixes.

Submitted by: bde

14 years agoRegen after big endian compatibility import.
nwhitehorn [Thu, 11 Mar 2010 14:56:59 +0000 (14:56 +0000)]
Regen after big endian compatibility import.

14 years agoAccidentally committed test code. Remove it.
nwhitehorn [Thu, 11 Mar 2010 14:54:54 +0000 (14:54 +0000)]
Accidentally committed test code. Remove it.

Big pointy hat: me

14 years agoProvide groundwork for 32-bit binary compatibility on non-x86 platforms,
nwhitehorn [Thu, 11 Mar 2010 14:49:06 +0000 (14:49 +0000)]
Provide groundwork for 32-bit binary compatibility on non-x86 platforms,
for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32
option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts
of the kernel and enhances the freebsd32 compatibility code to support
big-endian platforms.

Reviewed by: kib, jhb

14 years agoPrint out the family and model from the cpu_id. This is especially useful
jhb [Thu, 11 Mar 2010 14:17:37 +0000 (14:17 +0000)]
Print out the family and model from the cpu_id.  This is especially useful
given the advent of the extended family and extended model fields.  The
values are printed in hex to match their common usage in documentation.

Submitted by: Alexander Best
MFC after: 1 week

14 years agoFix a comment nit.
jhb [Thu, 11 Mar 2010 13:16:06 +0000 (13:16 +0000)]
Fix a comment nit.

Submitted by: Alexander Best

14 years agoThe number after the command is *not* optional.
joerg [Thu, 11 Mar 2010 12:18:52 +0000 (12:18 +0000)]
The number after the command is *not* optional.

MFC after: 1 day

14 years agoUpdate nfsrv_getsocksndseq() for changes in TCP internals since FreeBSD 6.x:
rwatson [Thu, 11 Mar 2010 11:33:04 +0000 (11:33 +0000)]
Update nfsrv_getsocksndseq() for changes in TCP internals since FreeBSD 6.x:

- so_pcb is now guaranteed to be non-NULL and valid if a valid socket
  reference is held.

- Need to check INP_TIMEWAIT and INP_DROPPED before assuming inp_ppcb is a
  tcpcb, as it might be a tcptw or NULL otherwise.

- tp can never be NULL by the end of the function, so only check
  TCPS_ESTABLISHED before extracting tcpcb fields.

The NFS server arguably incorporates too many assumptions about TCP
internals, but fixing that is left for nother day.

MFC after: 1 week
Reviewed by: bz
Reviewed and tested by: rmacklem
Sponsored by: Juniper Networks

14 years agoImprove the change made in the previous commit.
ed [Thu, 11 Mar 2010 11:28:29 +0000 (11:28 +0000)]
Improve the change made in the previous commit.

doshell() never returns, so there is no need to see whether we are the
parent process.

14 years agoMake script(1) a little less broken.
ed [Thu, 11 Mar 2010 11:09:58 +0000 (11:09 +0000)]
Make script(1) a little less broken.

Close the file descriptor to the TTY. There is no reason why the parent
process should keep track of the descriptor. This ensures that the
application inside properly drains the TTY during exit(2).

Reported by: alfred
MFC after: 2 weeks

14 years agoWrap the proc wakeup special case for ddb in ifdef DDB.
thompsa [Thu, 11 Mar 2010 08:33:39 +0000 (08:33 +0000)]
Wrap the proc wakeup special case for ddb in ifdef DDB.

Submitted by: Giovanni Trematerra

14 years agoRevert r204992 and just wrap it all in ifdef INVARIANTS to fix the debug and
thompsa [Thu, 11 Mar 2010 08:03:56 +0000 (08:03 +0000)]
Revert r204992 and just wrap it all in ifdef INVARIANTS to fix the debug and
non-debug cases.

14 years agoFix a typo in r204974 so that FTYPE_LNG matches the initialisers of
marius [Thu, 11 Mar 2010 07:46:17 +0000 (07:46 +0000)]
Fix a typo in r204974 so that FTYPE_LNG matches the initialisers of
the opmask array.

Pointed out by: Peter Jeremy

14 years agoStash the context of the running thread at the time an IPI_STOP is received
neel [Thu, 11 Mar 2010 07:17:14 +0000 (07:17 +0000)]
Stash the context of the running thread at the time an IPI_STOP is received
in 'stoppcbs[]'. We use the 'stoppcbs[]' context to generate the backtrace
of such stopped threads.

14 years agofixes a compile error if INVARIANTS is disabled.
weongyo [Thu, 11 Mar 2010 01:35:38 +0000 (01:35 +0000)]
fixes a compile error if INVARIANTS is disabled.

Pointy hat to: me
Submitted by: Michael Butler <imb at protected-networks dot net>

14 years agoFix style(9) bugs in the previous revision.
sobomax [Wed, 10 Mar 2010 23:02:06 +0000 (23:02 +0000)]
Fix style(9) bugs in the previous revision.

14 years agofurther narrow down no carrier workaround, since it appears to only affect
sobomax [Wed, 10 Mar 2010 23:00:15 +0000 (23:00 +0000)]
further narrow down no carrier workaround, since it appears to only affect
very specific IBM hardware and other machines with the same BCM ASIC chip id
0x57081021 are just fine.

MFC after: 1 month

14 years agoFix build breakage introduced in r204922.
yongari [Wed, 10 Mar 2010 21:45:40 +0000 (21:45 +0000)]
Fix build breakage introduced in r204922.

14 years agoFix typo in r204978.
yongari [Wed, 10 Mar 2010 21:37:19 +0000 (21:37 +0000)]
Fix typo in r204978.

Pointed out by: marius

14 years agoAdd descriptions for debug.ktr sysctl nodes.
jhb [Wed, 10 Mar 2010 21:35:42 +0000 (21:35 +0000)]
Add descriptions for debug.ktr sysctl nodes.

14 years agoFix typo in r204975.
yongari [Wed, 10 Mar 2010 20:55:55 +0000 (20:55 +0000)]
Fix typo in r204975.

Pointed out by: marius

14 years agoSet maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
yongari [Wed, 10 Mar 2010 20:54:08 +0000 (20:54 +0000)]
Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
Also disable relaxed ordering as recommended by data sheet for
PCI-X devices. For PCI-X BCM5704, set maximum outstanding split
transactions to 0 as indicated by data sheet.
For BCM5703 in PCI-X mode, DMA read watermark should be less than
or equal to maximum read byte count configuration. Enforce this
limitation in DMA read watermark configuration.

14 years agoFix copyright spelling.
imp [Wed, 10 Mar 2010 20:31:30 +0000 (20:31 +0000)]
Fix copyright spelling.

PR: 139825
Submitted by: Ruslan Mahmatkhanov

14 years agoFix copyright spelling
imp [Wed, 10 Mar 2010 20:30:51 +0000 (20:30 +0000)]
Fix copyright spelling

PR: 139825
Submitted by: Ruslan Mahmatkhanov

14 years agoEnable hardware fixes for BCM5704 B0 as recommended by data sheet.
yongari [Wed, 10 Mar 2010 20:22:57 +0000 (20:22 +0000)]
Enable hardware fixes for BCM5704 B0 as recommended by data sheet.

14 years ago- The OPSZ macro actually only does the right thing for int32 and int64
marius [Wed, 10 Mar 2010 19:55:48 +0000 (19:55 +0000)]
- The OPSZ macro actually only does the right thing for int32 and int64
  operands but not for double and extended double ones. Instead of trying
  to fix the macro just nuke it and unroll the loops in the correct way
  though as extended double operands turn out to be the only special case.
- For FxTO{s,d,q} the source operand is int64 so rs2 has to be re-decoded
  after setting type accordingly as it's generally decoded using the low
  2 bits as the type, which are 0 for these three instructions.
- Similarly, in case of F{s,d,q}TOx the target is int64 so rd has to be
  re-decoded using not only the operand mask appropriate for int64 but
  also the correct register number encoding.
- Use const where appropriate.
- Wrap long lines.

Submitted by: Peter Jeremy (partly)
MFC after: 3 days

14 years agoMake NKPT a kernel option on i386 so that it can be set to a non-default
jhb [Wed, 10 Mar 2010 19:50:52 +0000 (19:50 +0000)]
Make NKPT a kernel option on i386 so that it can be set to a non-default
value from kernel config files.

Tested by: Charles Sprickman  spork of bway net
MFC after: 2 weeks

14 years agonos-tun(8): make WARNS=3 clean
uqs [Wed, 10 Mar 2010 18:51:13 +0000 (18:51 +0000)]
nos-tun(8): make WARNS=3 clean

The renames are in spirit of DragonflyBSD, to keep diff minimal.

PR: bin/140060
Approved by: ed (co-mentor)

14 years agoFix white spaces.
jkim [Wed, 10 Mar 2010 18:30:55 +0000 (18:30 +0000)]
Fix white spaces.

14 years agoFall back to wbinvd when region for CLFLUSH is >= 2MB.
kib [Wed, 10 Mar 2010 15:50:38 +0000 (15:50 +0000)]
Fall back to wbinvd when region for CLFLUSH is >= 2MB.

Submitted by: Kevin Day <toasty dragondata com>
Reviewed by: jhb
MFC after: 2 weeks

14 years agoTypo.
jhb [Wed, 10 Mar 2010 15:22:26 +0000 (15:22 +0000)]
Typo.

14 years agofix handling of commands issued by RELENG_7 version of /sbin/ipfw,
luigi [Wed, 10 Mar 2010 14:21:05 +0000 (14:21 +0000)]
fix handling of commands issued by RELENG_7 version of /sbin/ipfw,

Submitted by: Riccardo Panicucci

14 years agoUse thr_once() with once_t controls to initialize various thread_key_t
jhb [Wed, 10 Mar 2010 13:23:25 +0000 (13:23 +0000)]
Use thr_once() with once_t controls to initialize various thread_key_t
objects used to provide per-thread storage in the RPC code.  Almost all
of these used double-checking with a dedicated mutex (tsd_lock) to do this
before.  However, that is not always safe with more relaxed memory orders.
There were also other bugs, such as one in __rpc_createrr() that caused a
new key to be allocated each time __rpc_createrr() was invoked.

PR: threads/144558
Reported by: Sam Robb  samrobb of averesystems com (key leak)
MFC after: 1 week

14 years agoRevert r204939
des [Wed, 10 Mar 2010 11:33:15 +0000 (11:33 +0000)]
Revert r204939

14 years agoForgot to svn add the Makefile.
des [Wed, 10 Mar 2010 11:05:31 +0000 (11:05 +0000)]
Forgot to svn add the Makefile.

14 years agoUse more proper terms (from official documents) for AMD CPU's.
obrien [Wed, 10 Mar 2010 06:10:39 +0000 (06:10 +0000)]
Use more proper terms (from official documents) for AMD CPU's.

Reviewed by: imp

14 years agoAdd -i to the first post-install mergemaster example to make
dougb [Wed, 10 Mar 2010 05:44:57 +0000 (05:44 +0000)]
Add -i to the first post-install mergemaster example to make
it consistent with the other. [1]

Add a note about -U to the mergemaster footnote.

Submitted by: obrien [1]

14 years agoProvide workaround for the ages old bug affecting certain BCM5708S
sobomax [Wed, 10 Mar 2010 05:19:14 +0000 (05:19 +0000)]
Provide workaround for the ages old bug affecting certain BCM5708S
chip revision often found in the blades and resulting in interfaces
not sensing carrier signal. Looking at all problem reports it
appears that it only affects some very specific silicon revision
(ASIC (0x57081021); Rev (B2)) and version of the PHY that
supports 1000baseSX-FDX media only. Therefore, narrow the scope of
workaround to combination of that revision and media type. Given
that the first report on this issue is dated back to 2007, there is
not much hope that this issue will ever be properly resolved.

Among affected systems are IBM HS21, Intel SBXD132 and HP BL460c.

PR: 118238, 122551, 140970
MFC after: 1 month

14 years agoFix the build. The ssh-pkcs11-helper directory is empty, which is
dougb [Wed, 10 Mar 2010 02:17:57 +0000 (02:17 +0000)]
Fix the build. The ssh-pkcs11-helper directory is empty, which is
causing confusion.

14 years agoRevert to r197433, the more recent change doesn't work for the common
dougb [Wed, 10 Mar 2010 01:00:37 +0000 (01:00 +0000)]
Revert to r197433, the more recent change doesn't work for the common
case, and has not been well received.

14 years agoFix "Empty input line" mdoc warning.
sobomax [Wed, 10 Mar 2010 00:47:09 +0000 (00:47 +0000)]
Fix "Empty input line" mdoc warning.

Submitted by: Alexander Best

14 years agoIntegrate OpenBSD rev 1.5 of x86emu.c.
delphij [Tue, 9 Mar 2010 22:42:24 +0000 (22:42 +0000)]
Integrate OpenBSD rev 1.5 of x86emu.c.

14 years agoAdd SIZE_MAX overflow check
ache [Tue, 9 Mar 2010 21:06:17 +0000 (21:06 +0000)]
Add SIZE_MAX overflow check

14 years agoAdd SIZE_MAX overflow check
ache [Tue, 9 Mar 2010 21:06:01 +0000 (21:06 +0000)]
Add SIZE_MAX overflow check

14 years agoAdd warnings to <regexp.h> and <sys/timeb.h>.
ed [Tue, 9 Mar 2010 21:01:12 +0000 (21:01 +0000)]
Add warnings to <regexp.h> and <sys/timeb.h>.

These header files only provide functionality that can be used in
combination with libcompat. In order to prevent people from including
them without any actual use (which happens a lot with <sys/timeb.h>),
put a warning here to make people more aware.

This means we have to lower WARNS for libcompat, which is no big deal.

14 years agoRemove unneeded include of <sys/timeb.h>.
ed [Tue, 9 Mar 2010 20:58:15 +0000 (20:58 +0000)]
Remove unneeded include of <sys/timeb.h>.

This header file should not be included by anything.

14 years agouses KOBJMETHOD_END macro to indicate the end of method table.
weongyo [Tue, 9 Mar 2010 20:07:41 +0000 (20:07 +0000)]
uses KOBJMETHOD_END macro to indicate the end of method table.

Submitted by: yongari

14 years agoo uses bus accessor macros to read values from ivar so no more values
weongyo [Tue, 9 Mar 2010 19:58:00 +0000 (19:58 +0000)]
o uses bus accessor macros to read values from ivar so no more values
  are referenced directly from ivar pointer.  It's to do like what other
  buses do. [1]
o changes exported prototypes.  It doesn't use struct siba_* structures
  anymore that instead of it it uses only device_t.
o removes duplicate code and debug messages.
o style(9)

Pointed out by: imp [1]

14 years agoBetter TwinAx transceiver detection.
np [Tue, 9 Mar 2010 19:57:44 +0000 (19:57 +0000)]
Better TwinAx transceiver detection.

Originally submitted by: <Bruno dot Bittner at isilon dot com>
(This is a rewritten, corrected version of that patch)

MFC after:    1 week