Commit Graph

150811 Commits

Author SHA1 Message Date
Konstantin Belousov
3770189a65 MFC r205416:
Correct the type for uio_resid.
2010-03-24 09:27:12 +00:00
Jilles Tjoelker
135346b2c1 MFC r205398: Do not create *.gmon files for PIE executables on i386.
Scrt1_c.o was accidentally compiled with -DGCRT (profiling), like gcrt1_c.o.
This problem is i386-specific, the other architectures are OK.

If you have problems with PIE executables such as samba and cups leaving
behind gmon files, rebuild them after installing this change.

PR:		ports/143924
2010-03-23 23:25:17 +00:00
Pyun YongHyeon
065ee77712 MFC r204378:
Add TSO support on VLANs. While I'm here remove unnecessary check
  of VLAN hardware checksum offloading. vlan(4) already takes care of
  this.
2010-03-23 22:22:26 +00:00
Pyun YongHyeon
14b52a7e1c MFC r204377:
Add TSO support on VLANs. While I'm here remove unnecessary check
  of VLAN hardware checksum offloading. vlan(4) already takes care of
  this.
2010-03-23 22:19:27 +00:00
Pyun YongHyeon
7b575694a1 MFC r204376:
Disable TSO on BCM5755M controller until I understand better for
  the issue. I still have no idea why TSO does not work on this
  controller. davidch@ also confirmed there is no known TSO related
  issues for this controller.
2010-03-23 22:16:12 +00:00
Pyun YongHyeon
051ea6ca19 MFC r204373-204374:
r204373:
  Move TSO setup to new function bce_tso_setup(). Also remove VLAN
  parsing code in TSO path as the controller requires VLAN hardware
  tagging to make TSO work over VLANs.
  While parsing the mbuf in TSO patch, always perform check for
  writable mbuf as bce(4) have to reset IP length and IP checksum
  field of IP header and make sure to ensure contiguous buffer before
  accessing IP/TCP headers. While I'm here replace magic number 40 to
  more readable sizeof(struct ip) + sizeof(struct tcphdr).

r204374:
  Add TSO support on VLANs. bce(4) controllers require VLAN hardware
  tagging to make TSO work on VLANs so explicitly disable TSO on VLAN
  if VLAN hardware tagging is disabled.
2010-03-23 22:11:39 +00:00
Pyun YongHyeon
2634815492 MFC r204368,204370-204372:
r204368:
  Allow disabling VLAN hardware tag stripping with software work
  around. Management firmware(ASF/IPMI/UMP) requires the VLAN
  hardware tag stripping so don't actually disable VLAN hardware tag
  stripping. If VLAN hardware tag stripping was disabled, bce(4)
  manually reconstruct VLAN frame by appending stripped VLAN tag.
  Also remove unnecessary IFCAP_VLAN_MTU message.

r204370:
  Make sure to stop controller first before changing MTU. And if
  interface is not running don't initialize controller.
  While here remove unnecessary update of error variable.

r204371:
  Make toggling TSO, VLAN hardware checksum offloading work. Also fix
  TX/RX checksum handler to set/clear relavant assist bits which was
  used to cause unexpected results.
  With this change, bce(4) can be bridged with other interfaces that
  lack TSO, VLAN checksum offloading.

r204372:
  Prefer m_collapse(9) over m_defrag(9).
2010-03-23 22:04:18 +00:00
Pyun YongHyeon
5774c1ed84 MFC r204363,204365-204367,204539-204540:
r204363:
  Optimize inserting LE for TX checksum computation. Controller does
  not require checksum LE configuration if checksum start and write
  position is the same as before. So keep track last checksum start
  and write position and insert new LE whenever the position is
  changed. This reduces number of LEs used in TX path as well as
  slightly enhance TX performance.

r204365:
  Don't hardcod register offset to set PCIe max read request size.
  The register offset is not valid on 88E8072 controller. Also don't
  blindly increase max read request size to 4096, instead, use 2048
  which seems to be more sane value and only change the value if the
  hardware default size(512) was used on that register.
  For PCIX controllers, use system defined constant rather than using
  magic value.
  While I'm here stop showing negotiated link width.

r204366:
  Allocate single MSI message. msk(4) used to allocate 2 MSI messages
  for controllers like 88E8053 which reports two MSI messages.
  Because we don't get anything useful things with 2 MSI messages,
  allocating 1 MSI message would be more sane approach.
  While I'm here, enable MSI for dual-port controllers too. Because
  status block is shared for dual-port controllers, I don't think
  msk(4) will encounter problem for using MSI on dual-port
  controllers.

r204367:
  Remove trailing white spaces.

r204539:
  Properly sync status LEs after processing.

r204540:
  Make sure to enable flow-control only if established link is
  full-duplex. Previously msk(4) used to allow flow-control on
  1000baseT half-duplex media. Also GMAC pause is enabled if link
  partner is capable of handling it.
  While I'm here use IFM_OPTIONS instead of using IFM_GMASK to check
  optional flags of link.
2010-03-23 21:51:31 +00:00
Pyun YongHyeon
b951499f98 MFC r204361-204362:
r204361:
  Reuse the configured LE for VLAN if new LE was created for TSO.
  Only old controllers need to create new LE for TSO. This change
  makes TSO work over VLANs.

r204362:
  Add TSO support on VLANs. Controller requires VLAN hardware tagging
  to make TSO work over VLANs.
2010-03-23 21:38:25 +00:00
Pyun YongHyeon
061d3abfa8 MFC r204228,204230:
r204228:
  Add TSO support on VLANs. Also make sure to update TSO capability
  whenever jumbo frame is configured.
  While I'm here remove unnecessary check of VLAN hardware checksum
  offloading. vlan(4) already takes care of this.

r204230:
  Remove Tx mbuf parsing code for VLAN in TSO path. Controller does
  not support TSO over VLAN if VLAN hardware tagging is disabled so
  there is no need to check VLAN here.
2010-03-23 19:41:43 +00:00
Pyun YongHyeon
ac8ed73502 MFC r204225:
Add TSO support on VLANs. jme(4) controllers do not require VLAN
  hardware tagging to make TSO work over VLANs.
2010-03-23 19:37:15 +00:00
Pyun YongHyeon
d95d4a8336 MFC r204155,204219:
r204155:
  Increase PCIe maximuim read request size to 2048. Because re(4) uses
  Tx DMA burst size 2048, I beleive PCIe maximum read request size
  also should match to the value of Tx DMA burst size. With this
  change I can get more than 800Mbps for TCP bulk transfers.
  Previously I was not able to get more than 700Mbps. If I enable TSO
  it now shows 927Mbps.

r204219:
  Add TSO on VLANs. Because re(4) has a TSO limitation for jumbo
  frame, make sure to update VLAN capabilities whenever jumbo frame
  is configured.
  While I'm here rearrange interface capabilities configuration. The
  controller requires VLAN hardware tagging to make TSO work on VLANs
  so explicitly check this requirement.
2010-03-23 19:30:15 +00:00
Pyun YongHyeon
60a337785e MFC r204151,204223:
r204151:
  Add TSO support on VLAN. Controller requires VLAN hardware tagging
  to make TSO work on VLAN. So if VLAN hardware tagging is disabled
  explicitly clear TSO on VLAN. While I'm here remove duplicated
  VLAN_CAPABILITIES call.

r204223:
  Remove Tx mbuf parsing code for VLAN in TSO path. Controller does
  not support TSO over VLAN if VLAN hardware tagging is disabled so
  there is no need to check VLAN here.
  While I'm here make sure to pullup IP/TCP headers in the first
  buffer.
2010-03-23 19:16:35 +00:00
Andriy Gapon
229c84e85b MFC r205333: vfs_mount.9: drop cross-reference to a removed manual 2010-03-23 17:14:50 +00:00
Jaakko Heinonen
0ebeb8cec4 MFC r205121:
Use an unique directory name instead of hardcoded /tmp/.diskless.
A malicious user could create a file named /tmp/.diskless and cause
the script to misbehave.

PR:		conf/141258
2010-03-23 16:45:29 +00:00
Luigi Rizzo
8018e843a3 MFC of a large number of ipfw and dummynet fixes and enhancements
done in CURRENT over the last 4 months.
HEAD and RELENG_8 are almost in sync now for ipfw, dummynet
the pfil hooks and related components.

Among the most noticeable changes:
- r200855 more efficient lookup of skipto rules, and remove O(N)
  blocks from critical sections in the kernel;
- r204591 large restructuring of the dummynet module, with support
  for multiple scheduling algorithms (4 available so far)
See the original commit logs for details.

Changes in the kernel/userland ABI should be harmless because the
kernel is able to understand previous requests from RELENG_8 and
RELENG_7. For this reason, this changeset would be applicable
to RELENG_7 as well, but i am not sure if it is worthwhile.
2010-03-23 09:58:59 +00:00
Qing Li
521dd44db5 MFC r205272
Need to set the proper flag bit when inserting ARP
entries into the kernel.
2010-03-22 23:33:40 +00:00
Pyun YongHyeon
9832320129 MFC r204156:
Add __FBSDID.
2010-03-22 23:23:47 +00:00
Hiroki Sato
7fe6975097 MFC r203272:
- Fix a bug when adding an interface with an invalid MTU sets the
  bridge's MTU if it is the firstly-added one while the addition
  itself fails.

- Allow SIOCSIFMTU only when all members have the same MTU.

- Remove IFT_GIF check when defining the brige MTU by the
  firstly-added interface's one.  The MTU of the gif interface
  has to be the same as the bridge's one.
2010-03-22 22:07:19 +00:00
Edwin Groothuis
274885ab20 MFC of r205475, tzdata2010f:
The Australian Antartic Division:
- Macquarie Island will stay on UTC+11 for winter and not switch back from DST.
- Casey station reverted to its normal time of UTC+8 on 5 March 2010.
- Davis station will revert to its normal time of UTC+7 at 10 March 2010
- Mawson station stays on UTC+5.

Syria will start DST on Thursday 1 April 2010 at midnight.

Correct Samao DST start date (26 Sep vs 24 Oct)
2010-03-22 21:35:54 +00:00
Jung-uk Kim
a0bc6d1ca6 MFC: r205223
Fix a long standing regression of readdir(3) in fdescfs(5) introduced
in r1.48.  We were stopping at the first null pointer when multiple file
descriptors were opened and one in the middle was closed.  This restores
traditional behaviour of fdescfs.
2010-03-22 20:36:35 +00:00
Jung-uk Kim
1288863fa2 MFC: r205092
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]
2010-03-22 19:59:00 +00:00
Jung-uk Kim
e651ff978b MFC: r203943
Remove COMPILATIONDATE from the default section.  This string is no longer
being substituted since r162063.
2010-03-22 19:50:57 +00:00
Luigi Rizzo
f2f7c1447a mfc r205179: print correctly addresses with an OR block 2010-03-22 16:40:10 +00:00
John Baldwin
f5ccef8fd9 MFC 204950,205020:
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.
2010-03-22 15:52:26 +00:00
Andrew Gallatin
accbb468d5 MFC 204212: Update mxge to support IFCAP_VLAN_HWTSO. 2010-03-22 14:50:08 +00:00
Andrew Gallatin
c6c73f9880 MFC 205255: Fix 2 bugs in mxge_attach() 2010-03-22 11:18:51 +00:00
Gleb Smirnoff
948165be1c MFC r200183 by luigi:
restore setting of sin_len (was removed in 1.146 last february) as
  it seems that now it is necessary for 'forward' to work outside lo0.

Approved by:	luigi
2010-03-22 10:11:59 +00:00
Konstantin Belousov
1b90b87fba MFC r204879:
Teach procstat(1) to display some information about signal disposition
and pending/blocked status for signals.

MFC r204880:
Add file forgotten in r204879.
2010-03-22 09:29:56 +00:00
Nathan Whitehorn
9c4dbddb29 MFC r204211:
Support the extended PLT format used when objects have more than 8192
PLT relocations on PPC32.
2010-03-20 15:28:39 +00:00
Nathan Whitehorn
fca060b9f9 MFC r204297:
Move the OEA64 scratchpage to the end of KVA from the beginning, and set
its PVO to map physical address 0 instead of kernelstart. This fixes a
situation in which a user process could attempt to return this address
via KVM, have it fault while being modified, and then panic the kernel
because (a) it is supposed to map a valid address and (b) it lies in the
no-fault region between VM_MIN_KERNEL_ADDRESS and virtual_avail.

While here, move msgbuf and dpcpu back into regular KVA space for
consistency with other implementations.
2010-03-20 15:27:01 +00:00
Nathan Whitehorn
1f70273a79 MFC r204296:
Provide an implementation of pmap_dev_direct_mapped() on OEA64. This is
required in order to be able to mmap the running kernel, which is turn
required to avoid fstat returning gibberish.
2010-03-20 15:23:06 +00:00
Nathan Whitehorn
59908d2f72 MFC r204269:
Use dcbz instead of word stores for page zeroing, providing a factor of
3-4 speedup.
2010-03-20 15:21:13 +00:00
Nathan Whitehorn
aba7e013d6 MFC r204268:
Close a race involving the OEA64 scratchpage. When the scratch page's
physical address is changed, there is a brief window during which its PTE
is invalid. Since moea64_set_scratchpage_pa() does not and cannot hold
the page table lock, it was possible for another CPU to insert a new PTE
into the scratch page's PTEG slot during this interval, corrupting both
mappings.

Solve this by creating a new flag, LPTE_LOCKED, such that
moea64_pte_insert will avoid claiming locked PTEG slots even if they
are invalid. This change also incorporates some additional paranoia
added to solve things I thought might be this bug.

Reported by:	linimon
2010-03-20 15:19:57 +00:00
Nathan Whitehorn
e868629641 MFC r204128:
Reduce KVA pressure on OEA64 systems running in bridge mode by mapping
UMA segments at their physical addresses instead of into KVA. This emulates
the direct mapping behavior of OEA32 in an ad-hoc way. To make this work
properly required sharing the entire kernel PMAP with Open Firmware, so
ofw_pmap is transformed into a stub on 64-bit CPUs.

Also implement some more tweaks to get more mileage out of our limited
amount of KVA, principally by extending KVA into segment 16 until the
beginning of the first OFW mapping.

Reported by:	linimon
2010-03-20 15:15:54 +00:00
Nathan Whitehorn
6f88556c52 Fix a bug where pages being removed from memory entirely no longer have
PVOs, and so the modified state of the page can no longer be communicated
to the VM layer, causing pages not to be flushed to swap when needed, in
turn causing memory corruption. Also make several correctness adjustments
to I-Cache synchronization and TLB invalidation for 64-bit Book-S CPUs.

Obtained from:	projects/ppc64
Discussed with:	grehan
2010-03-20 15:05:44 +00:00
Nathan Whitehorn
006e2f2ce5 MFC r204903:
Place interrupt handling in a critical section and remove double
counting in incrementing the interrupt nesting level. This fixes a number
of bugs in which the interrupt thread could be preempted by an IPI,
indefinitely delaying acknowledgement of the interrupt to the PIC, causing
interrupt starvation and hangs.

Reported by:	linimon
Reviewed by:	marcel, jhb
2010-03-20 14:55:22 +00:00
Nathan Whitehorn
81484b9174 MFC r204082,204179,204180,204218,204241,204247,204270,204692:
Provide thermal management and monitoring features in smu(4). This allows
fan control and thermal monitoring on SMU-based Apple G5 machines, as well
as an led(4) interface to control the sleep LED.
2010-03-20 14:49:44 +00:00
Konstantin Belousov
2219384ff7 MFC r205225:
Add missing headers. While there, arrange headers alphabetically.
2010-03-19 10:33:45 +00:00
Konstantin Belousov
b2eaa3b2c2 MFC r205224:
Add missing headers.
2010-03-19 10:28:49 +00:00
Konstantin Belousov
5a9ca220b2 MFC r204755:
Update the list of the process flags. Note that the lists of pending
signals for process and its threads are distinct.
2010-03-19 10:25:59 +00:00
Pyun YongHyeon
4f7bf104f0 MFC r202717:
- Added a workaround for NC-SI management firmware that would allow
    frames to be accepted while the driver is resetting the hardware.
    This failure is generally observed when broadcast frames are received
    during driver load and will generate "Unable to write CTX memory"
    errors.
  - Small changes to driver flags display.

PR:	kern/135836, kern/140684
2010-03-19 00:26:45 +00:00
Pyun YongHyeon
be3410a939 MFC r204150:
Add TSO support on VLAN in fconfig(8).
2010-03-18 19:10:03 +00:00
Pyun YongHyeon
d5eda01f75 MFC r204149:
Add TSO support on VLANs. Intentionally separated IFCAP_VLAN_HWTSO
  from IFCAP_VLAN_HWTAGGING. I think some hardwares may be able to
  TSO over VLAN without VLAN hardware tagging.
  Driver changes and userland support will follow.
2010-03-18 19:04:04 +00:00
Pyun YongHyeon
12c4b5ef43 MFC r202826-202827,204146
r202826:
  s/Mhz/MHz/g

  Submitted by:	N.J. Mann <njm <> njm dot me dot uk >

r202827:
  Yukon Ultra2 has 125MHz clock.

r204146:
  Correct inversed programming of ethernet hardware address on
  big-endian architecture.

  Submitted by:	C. Jayachandran <c.jayachandran at gmail dot com> (initial version)
2010-03-18 18:58:24 +00:00
Pyun YongHyeon
0debac0d3a MFC r203358,203716:
r203358:
  PCI express device status register has W1C feature. Writing 0 has
  no effect. Make sure to clear error bits by writing 1. [1]
  While I'm here use predefined value instead of hardcodig magic
  vlaue.

  Submitted by:	msaitoh at NetBSD [1]

r203716:
  Move device specific flag configuration to attach routine.
  The softc obtained in device probe wouldn't be the same one used in
  device attach. Drivers should not assume any values stored in softc
  structure in probe routine will be available for its attach routine.
2010-03-18 18:50:20 +00:00
Pyun YongHyeon
bb8c5f9792 MFC r203355:
Add more bit definitions to PCI express device control and device
  status register.
2010-03-18 18:44:08 +00:00
Pyun YongHyeon
194bfbdd24 MFC r202821-202822.
r202821:
  Fix a long standing ASF heartbeat sending bug. The initial
  implementation of heartbeat interval was 2 but there was typo which
  caused the heartbeat is sent approximately every 5 seconds. This
  caused unintended controller reset by firmware because firmware
  thought OS was crashed.

  Submitted by:	Floris Bos < info <> je-eigen-domein dot nl >
  Tested by:	Andrzej Tobola < ato <> iem dot pw dot edu dot pl >

r202822:
  Use new handshake command for BCM5750 or new controllers.
2010-03-18 18:35:28 +00:00
Max Laier
29f2c008fd MFC r203834 and r205197: Make ALTQ work for drbr consumers. 2010-03-18 17:00:44 +00:00
Rafal Jaworowski
7088545a40 MFC r205027
Let detailed info about CPU features print on Marvell Sheeva CPU as well.

Provide missing entry in the cpu_classes[].

Reported by:	Maks Verver
2010-03-18 11:53:32 +00:00