Commit Graph

151008 Commits

Author SHA1 Message Date
Andrew Thompson
7e2c44f008 MFC r203138
Use device_printf rather than printf + device_get_nameunit.
2010-04-06 23:15:44 +00:00
Andrew Thompson
13548b8bd0 MFC r203137
Release the firmware after loading to the device.
2010-04-06 23:15:16 +00:00
Andrew Thompson
0b2d5c2977 MFC r203134
Add run(4), a driver for Ralink RT2700U/RT2800U/RT3000U USB 802.11agn devices.

 This driver was written for OpenBSD by Damien Bergamini and ported over by
 Akinori Furukoshi.
2010-04-06 23:14:43 +00:00
Rick Macklem
9377fe1021 MFC: r205562
When the regular NFS server replied to a UDP client out of the replay
cache, it did not free the request argument mbuf list, resulting in a leak.
This patch fixes that leak.

PR:	kern/144330
2010-04-06 23:03:20 +00:00
Daniel Gerzo
c161c6f4a7 Merge r205659:
- update zfs and zpool manual pages to match the current state of the source

PR:		144984
Submitted by:	mm@
Approved by:	pjd@
Obtained from:	OpenSolaris
2010-04-06 21:39:18 +00:00
Ken Smith
775e2b25c3 Merge r204044:
Provide a script that can be used to create the memstick images.
2010-04-06 17:57:27 +00:00
Rui Paulo
8d3cd908c4 MFC r203422, r205516:
When receiving a management frame, pass the mbuf to bpf before calling
 iv_recv_mgmt(). iv_recv_mgmt() will generate management frame
 responses
 and pass them to bpf before the management frame that triggered the
 response.

 PR:		144323
 Submitted by:	Alexander Egorenkov <egorenar at gmail.com>
 Sponsored by:	iXsystems, inc.
2010-04-06 14:07:48 +00:00
Rui Paulo
b02c965e31 MFC r205514:
Add a missing LINE_BREAK() after printing the roaming parameters in
 verbose mode.

 Sponsored by:	iXsystems, inc.
2010-04-06 13:04:27 +00:00
Edward Tomasz Napierala
807645566b MFC r201213:
Remove examples for pppd and SLIP-related stuff.

PR:		conf/144950
2010-04-06 10:58:40 +00:00
Edward Tomasz Napierala
24b82d83bc MFC r201211:
Remove pppd and SLIP-related stuff.
2010-04-06 10:34:15 +00:00
Edward Tomasz Napierala
e2aa0109fb MFC r201210:
Remove pppd, it's gone.
2010-04-06 10:32:26 +00:00
Xin LI
f33c89d1ae MFC r205534:
Add PCI ID for MCS9901's parallel port.

PR:		kern/144713
Submitted by:	gcooper
2010-04-06 00:50:23 +00:00
Xin LI
f4516d699b MFC r205520:
Correct cross reference.
2010-04-06 00:46:49 +00:00
Navdeep Parhar
423a1f84bf MFC r204267: Allow cxgbtool to build with WARNS=6 2010-04-05 23:55:04 +00:00
Edwin Groothuis
b6b8213e38 MFC of tzdata2010h:
From tzdata2010h:

- Tunis will not go into DST this year.
- Pakistan will not go into DST this year.

From tzdata2010g:

- Bangladesh cancels DST.
- Palestine goes into DST one day later than expected.

- Russian timezones update:
  Europe/Samara goes to Moscow time.
  Asia/Kamchatka goes to Moscow+8 time.
  Asia/Anadyr goes to Moscow+8 time.
2010-04-05 23:43:23 +00:00
Navdeep Parhar
ece8cb8889 cxgb(4) MFCs: r204271,r204274,r204348,r204921,r205944,r205945,r205946,r205947,r205948,r205949,r205950,r206109
r204271:
Accessing an mbuf after it has been handed off to the hardware is a bad
race as it could already have been tx'd and freed by that time.  Place
the bpf tap just _before_ writing the gen bit.

This fixes a panic when running tcpdump on a cxgb interface.

r204274:
There is no need to test __FreeBSD_version for features that have
been around for a long time now (7.1-ish or even earlier); assume
they are present.  These includes MSI, TSO, LRO, VLAN, INTR_FILTERS,
FIRMWARE, etc.

Also, eliminate some dead code and clean up in other places as part
of this quick once-over.

r204348:
Support IFCAP_VLANHWTSO in cxgb(4).  It works with or without vlanhwtag.
While here, remove old DPRINTFs and tidy up the capability code a bit.

r204921:
Better TwinAx transceiver detection.

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

r205944:
Refresh the firmware version immediately after it is upgraded (or downgraded).

r205945:
Improved PHY EDC settings.

r205946:
Do not attempt to retrieve interrupt information before it is available.

r205947:
Fix build with "nooptions INET"

r205948:
Fix tx drop statistics.

r205949:
Fix signed/unsigned mix-up that allowed txq->in_use to grow beyond txq->size.

r205950:
Multiple fixes related to queue set sizing and resources:

- Only the tunnelq (TXQ_ETH) requires a buf_ring, an ifq, and the watchdog/timer
  callouts.  Do not allocate these for the other tx queues.

- Use 16k jumbo clusters only on offload capable cards by default.

- Do not allocate a full tx ring for the offload queue if the card is not
  offload capable.

- Slightly better freelist size calculation.

- Fix nmbjumbo4 typo, remove unneeded global variables.

r206109:
Increase response queue size to avoid starvation, add a counter
to track it when it does occur.
2010-04-05 23:29:27 +00:00
Jack F Vogel
dd75f66126 Add missing module Makefile for ixgbe and em MFCs 2010-04-05 21:43:22 +00:00
Jack F Vogel
d05b20c60c MFC of the em/igb drivers 2010-04-05 20:39:44 +00:00
Jack F Vogel
d4e2e2a53f MFC of version 2.1.7 of the ixgbe driver. 2010-04-05 18:46:29 +00:00
Matt Jacob
be5d0cf413 This is an MFC of 205712.
D'oh- isp_handle_index' logic was reversed (not used in FreeBSD).
2010-04-05 18:36:47 +00:00
Marius Strobl
3d9988b326 MFC: r206086
- Try do deal gracefully with correctable ECC errors.
- Improve the reporting of unhandled kernel and user traps.
2010-04-05 18:25:30 +00:00
Matt Jacob
59a8fbd208 This is an MFC of 205698
Clean up some printing stuff so that we can have a bit finer control
on debug output. Add a new platform function requirement to allow
for printing based upon the ITL nexus instead of the isp unit plus
channel, target and lun. This allows some printouts and error messages
from the core code to appear in the same format as the platform's
subsystem (in FreeBSD's case, CAM path).
2010-04-05 18:22:42 +00:00
Marius Strobl
bd7099bd19 MFC: r206020
Use device_get_nameunit(9) rather than device_get_name(9) so one can
identify the reporting bridge in machines with multiple PCI domains.
2010-04-05 18:04:01 +00:00
Marius Strobl
1592a77552 MFC: r206019
Don't re-implement device_get_nameunit(9).
2010-04-05 17:58:47 +00:00
Marius Strobl
ceb8e6f350 MFC: r206018
- Take advantage of the INTCLR_* macros.
- Right-justify the backslashes as per style(9).
2010-04-05 17:56:40 +00:00
Jung-uk Kim
29f7dafb4c MFC: r205095
Fix a style(9) nit.
2010-04-05 17:37:35 +00:00
Jung-uk Kim
7493cc345a MFC: r205858
Check the pointer to JIT binary filter before its de-allocation.
2010-04-05 17:32:49 +00:00
Alan Cox
02b5123ee3 MFC r204907, r204913, r205402, r205573, r205573
Implement AMD's recommended workaround for Erratum 383 on Family 10h
  processors.

  Enable machine check exceptions by default.
2010-04-05 16:11:42 +00:00
Randall Stewart
54bb41671a MFC of 2 items to fix the csum for v6 issue:
Revision 205075 and 205104:

---------205075----------
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.
-------------------------
---------205104----------
The proper fix for the delayed SCTP checksum is to
have the delayed function take an argument as to the offset
to the SCTP header. This allows it to work for V4 and V6.
This of course means changing all callers of the function
to either pass the header len, if they have it, or create
it (ip_hl << 2 or sizeof(ip6_hdr)).
-------------------------
PR:		144529
2010-04-05 13:48:23 +00:00
Randall Stewart
9b355dc71d MFC of 204670:
-------------------------
sched_getparam was just plain broke for time-share
processes. It did not return an error but instead
just let garbage be passed back. This I fix so
it actually properly translates the priority the
process is at to a posix's high means more priority.
I also fix it so that if the ULE scheduler has bumped
it up to a realtime process you get back a sane value
i.e. the highest priority (63 for time-share).

sched_setscheduler() had the setting of the
timeshare class priority disabled. With some notes
about rejecting the posix high numbers is greater
priority and use nice instead. This fix also
adjusts that to work, with the cavet that a t-s
process may well get bumped up or down i.e. the
setscheduler() will NOT change the nice value only
the current priority. I think this is reasonable
considering if the user wants to play with nice then
he can. At least all the posix'ish interfaces now
respond sanely.
-----------------------
2010-04-05 13:33:54 +00:00
Robert Noland
ca23c89977 MFC r205120,r205126
Add drm support for Intel Pineview chips.
2010-04-04 15:46:46 +00:00
Robert Noland
616641e987 MFC r203289,r203367
Enable MTRR on all VIA CPUs that claim support
2010-04-04 15:42:52 +00:00
Robert Noland
707a9a4c19 MFC r205096, r205102
Add AGP support for Intel Pineview and Ironlake chipsets.
2010-04-04 15:37:47 +00:00
Marius Strobl
cdf8665e67 MFC: r205269
o Add support for UltraSparc-IV+:
  - Swap the configuration of the first and second large dTLB as with
    US-IV+ these can only hold entries of certain page sizes each, which
    we happened to chose the non-working way around.
  - Additionally ensure that the large iTLB is set up to hold 8k pages
    (currently this happens to be a NOP though).
  - Add a workaround for US-IV+ erratum #2.
  - Turn off dTLB parity error reporting as otherwise we get seemingly
    false positives when copying in the user window by simulating a
    fill trap on return to usermode. Given that these parity errors can
    be avoided by disabling multi issue mode and the problem could be
    reproduced with a second machine this appears to be a silicon bug of
    some sort.
  - Add a membar #Sync also before the stores to ASI_DCACHE_TAG. While
    at it, turn of interrupts across the whole cheetah_cache_flush() for
    simplicity instead of around every flush. This should have next to no
    impact as for cheetah-class machines we typically only need to flush
    the caches a few times during boot when recovering from peeking/poking
    non-existent PCI devices, if at all.
  - Just use KERNBASE for FLUSH as we also do elsewhere as the US-IV+
    documentation doesn't seem to mention that these CPUs also ignore the
    address like previous cheetah-class CPUs do. Again the code changing
    LSU_IC is executed seldom enough that the negligible optimization of
    using %g0 instead should have no real impact.

  With these changes FreeBSD runs stable on V890 equipped with US-IV+
  and -j128 buildworlds in a loop for days are no problem. Unfortunately,
  the performance isn't were it should be as a buildworld on a 4x1.5GHz
  US-IV+ V890 takes nearly 3h while on a V440 with (theoretically) less
  powerfull 4x1.5GHz US-IIIi it takes just over 1h. It's unclear whether
  this is related to the supposed silicon bug mentioned above or due to
  another issue. The documentation (which contains a sever bug in the
  description of the bits added to the context registers though) at least
  doesn't mention any requirements for changes in the CPU handling besides
  those implemented and the cache as well as the TLB configurations and
  handling look fine.
o Re-arrange cheetah_init() so it's easier to add support for SPARC64
  V up to VIIIfx CPUs, which only require parts of this initialization.

Committed from:	EH2010
2010-04-04 14:57:46 +00:00
Alan Cox
c7014073a8 MFC r205652
A ptrace(2) by one process may trigger a page size promotion in the
  address space of another process.  Modify pmap_promote_pde() to handle
  this.
2010-04-03 15:43:28 +00:00
Fabien Thomas
caa4eaacd7 MFC r205998:
If there is multiple PMCs for the same interrupt ignore new post.
This will indirectly fix a bug where the thread will be pinned
forever if the assert is not compiled.
2010-04-03 07:12:35 +00:00
Bjoern A. Zeeb
22177b7279 MFC r205637:
We are holding a write lock here so avoid aquiring it twice calling
  the "locked" version rather than the wrapper function.
2010-04-02 17:52:50 +00:00
Bjoern A. Zeeb
ac28297bce MFC r205789:
When tearing down IPsec as part of a (virtual) network stack,
  do not try to free the same list twice but free both the
  acquiring list and the security policy acquiring list.

  Reviewed by:  anchie
2010-04-02 17:48:01 +00:00
Andriy Gapon
32a9ef6d33 MFC r205854: calendar.freebsd: add my entry 2010-04-02 15:33:24 +00:00
Konstantin Belousov
003465f5f1 MFC r205317:
Remove dead statement.
2010-04-02 13:43:16 +00:00
Konstantin Belousov
131e8de2da MFC r205316:
Fix two style issues.
2010-04-02 13:39:30 +00:00
Gleb Smirnoff
033a5be7fa Merge r205082, r205083 that fix 'netstat -f netgraph' functionality. 2010-04-02 11:07:55 +00:00
Qing Li
f3939d3288 MFC 205268
Set the device capabilities to include dynamic link-state for
those modern drivers.

Reviewed by: imp (and suggested by imp)
2010-04-02 05:15:27 +00:00
Qing Li
94190b3925 MFC 205222
Verify interface up status using its link state only
if the interface has such capability. The interface
capability flag indicates whether such capability
exists. This approach is much more backward compatible.
Physical device driver changes will be part of another
commit.

Also updated the ifconfig utility to show the LINKSTATE
capability if present.

Reviewed by:  rwatson, imp, juli
2010-04-02 05:12:46 +00:00
Qing Li
243785f92f MFC 205024
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.
2010-04-02 05:05:51 +00:00
Qing Li
c951da56b4 MFC 204902
One of the advantages of enabling ECMP (a.k.a RADIX_MPATH) is to
allow for connection load balancing across interfaces. Currently
the address alias handling method is colliding with the ECMP code.
For example, when two interfaces are configured on the same prefix,
only one prefix route is installed. So connection load balancing
among the available interfaces is not possible.

The other advantage of ECMP is for failover. The issue with the
current code, is that the interface link-state is not reflected
in the route entry. For example, if there are two interfaces on
the same prefix, the cable on one interface is unplugged, new and
existing connections should switch over to the other interface.
This is not done today and packets go into a black hole.

Also, there is a small bug in the kernel where deleting ECMP routes
in the userland will always return an error even though the command
is successfully executed.
2010-04-02 05:02:50 +00:00
Qing Li
ca2d42b2a1 MFC 201131
introduce a local variable rte acting as a cache of ro->ro_rt
within ip_output, achieving (in random order of importance):
- a reduction of the number of 'r's in the source code;
- improved legibility;
- a reduction of 64 bytes in the .text
2010-04-02 04:58:17 +00:00
Qing Li
01104d862b MFC 205077
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.
2010-04-01 20:23:43 +00:00
Marius Strobl
618de50c3f MFC: r205409
- The firmware of Sun Fire V1280 has a misfeature of setting %wstate to
  7 which corresponds to WSTATE_KMIX in OpenSolaris whenever calling into
  it which totally screws us even when restoring %wstate afterwards as
  spill/fill traps can happen while in OFW. The rather hackish OpenBSD
  approach of just setting the equivalent of WSTATE_KERNEL to 7 also is
  no option as we treat %wstate as a bit field. So in order to deal with
  this problem actually implement spill/fill handlers for %wstate 7 which
  just act as the WSTATE_KERNEL ones except of theoretically also handling
  32-bit, turn off interrupts completely so we don't even take IPIs while
  in OFW which should ensure we only take spill/fill traps at most and
  restore %wstate after calling into OFW once we have taken over the trap
  table. While at it, actually set WSTATE_{,PROM}_KMIX before calling into
  OFW just like OpenSolaris does, which should at least help testing this
  change on non-V1280.
- Remove comments referring to the %wstate usage in BSD/OS.
- Remove the no longer used RSF_ALIGN_RETRY macro.
- Correct some trap table addresses in comments.
- Ensure %wstate is set to WSTATE_KERNEL when taking over the trap table.
- Ensure PSTATE_AM is off when entering or exiting to OFW as well as that
  interrupts are also completely off when exiting to OFW as the firmware
  trap table shouldn't be used to handle our interrupts.
2010-04-01 15:17:50 +00:00
Nathan Whitehorn
3c7ec531af MFC r204694,204719,205370
Update the page table locking for the 64-bit PMAP. One of these revisions
largely reverted the other, so there is a small amount of churn and the
addition of some mtx_assert()s.
2010-04-01 13:27:27 +00:00