bz [Tue, 17 Aug 2010 07:58:10 +0000 (07:58 +0000)]
MFC r211301:
In rip6_input(), in case of multicast, we might skip the normal processing
and go to the next iteration early if multicast filtering would decide that
this socket shall not receive the data.
Unlock the pcb in that case or we leak the read lock and next time trying
to get a write lock, would hang forever.
PR: kern/149608
Submitted by: Chris Luke (chrisy flirble.org)
yongari [Sun, 15 Aug 2010 23:47:04 +0000 (23:47 +0000)]
MFC r210263,210267,210269-210270:
r210263:
Do not report current link state if interface is not UP.
r210267:
Add KASSERT to check number of returned DMA segments.
r210269:
Use bus_get_dma_tag() to get parent tag. Also use
BUS_SPACE_MAXSIZE_32BIT to specify sum of all segment lengths.
Previously it used MAXBSIZE which was wrong.
r210270:
Specify BUS_DMA_ZERO flag to bus_dmamem_alloc(9) and remove bzero()
calls. Also add BUS_DMA_COHERENT flag to bus_dmamem_alloc(9) to
take advantage of efficient synchronization for architectures that
support that feature.
yongari [Sun, 15 Aug 2010 23:38:49 +0000 (23:38 +0000)]
MFC r210257,210259-210261:
r210257:
When we didn't find a matching flash device, do not touch flash
config data. While I'm here, use return code of bce_init_nvram()
to set error instead of directly setting ENODEV.
r210259:
Have bce_init_ctx() return error code and make caller check the
return code. If context was not setup correctly give up
initialization. While I'm here move variable declarations to the
beginning of the function.
r210260:
Don't change current media in bce_stop(). There is no need to do
this here.
r210261:
Correctly check the result of media selection. Previously it always
returned success.
yongari [Sun, 15 Aug 2010 23:30:53 +0000 (23:30 +0000)]
MFC r207411:
- Enable flow control.
- Print device details only when verbose boot is enabled.
- Add debug output for shared memory access.
- Add debug statistics (checksum offload & VLAN frame counters).
- Modify TX path to update consumer index for each frame completed
rather than updating the consumer index only once for a group of
frames to improve small packet performance.
- Print driver/firmware pulse messages only when verbose boot
is enabled.
- Add debug sysctl to clear statistics.
- Fix more style(9) violations.
yongari [Sun, 15 Aug 2010 22:57:50 +0000 (22:57 +0000)]
MFC r210083,210152:
r210083:
Remove enabling Data FIFO protection with indirect memory access.
r165114 added that code and that change ignored the same logic
committed in r135772. In addition, data FIFO protection should be
selectively enabled instead of applying to all PCIe devices.
While I'm here add BCM5785 to devices that do not require this
fix.
r210152:
Use Miscellaneous Configuration Register bit definition instead of
magic number.
yongari [Sun, 15 Aug 2010 22:40:47 +0000 (22:40 +0000)]
MFC r209714:
It seems read DMA mode register requires both IPv4 TSO and IPv6 TSO
configuration to get IPv4 TSO work on BCM57780. While I'm here
apply the same fix to BCM5785 which shares similar hardware feature
of BCM57780. This change makes TSO work on BCM57780.
yongari [Sun, 15 Aug 2010 21:56:45 +0000 (21:56 +0000)]
MFC r209818:
Remove enabling RX checksum offloading in RX filter setup. RX
checksum is enabled in sge_init_locked().
While I'm here do not set RX checksum bits in RX descriptor
initialization. It is controller's job to set these bits.
yongari [Sun, 15 Aug 2010 21:51:10 +0000 (21:51 +0000)]
MFC r209865:
Some revision of Yukon controller generates corrupted frame when TX
checksum offloading is enabled. The frame has a valid checksum
value so payload might be modified during TX checksum calculation.
Disable TX checksum offloading but give users chance to enable it
when they know their controller works without problems with TX
checksum offloading.
Reported by: Andrzej Tobola <ato <> iem dot pw dot edu dot pl>
yongari [Sun, 15 Aug 2010 21:43:51 +0000 (21:43 +0000)]
MFC r211089:
It seems some old Sundace(now IC Plus Corp.) controllers do not
like memory mapped register access. Typical problem from the issue
was MII access returned unreliable values. I'm not sure this comes
from lack of register flushing in MII access after accessing
STE_PHYCTL register though.
To address the issue, read hints data that controls which type of
memory mapping should be used in driver. ste(4) still prefers
memory mapping to io mapping but honor hints entered by user except
for controllers that have problems with memory mapping.
The hint to use iomapping could be given by adding the following
line to /boot/device.hints file.
andre [Sat, 14 Aug 2010 19:36:48 +0000 (19:36 +0000)]
MFC r210666:
Fix a bug in syncache where the initial CWND for new incoming connections
was limited to one segment under the faulty assumption of a retransmit.
Due to this the opportunity to initialize the increased congestion window
according to RFC3390 was missed.
kib [Sat, 14 Aug 2010 14:13:58 +0000 (14:13 +0000)]
MFC r211006:
Prefer struct sysentvec sv_psstrings to hardcoding FREEBSD32_PS_STRINGS
in the compat32 code. Use sv_usrstack instead of FREEBSD32_USRSTACK as well.
bz [Sat, 14 Aug 2010 13:44:24 +0000 (13:44 +0000)]
MFC r210686:
MFp4 @181628:
Free the rtentry after we diconnected it from the FIB and are counting
it as rttrash. There might still be a chance we leak it from a different
code path but there is nothing we can do about this here.
rmacklem [Wed, 11 Aug 2010 03:08:03 +0000 (03:08 +0000)]
MFC: r210786
Modify the return value for nfscl_mustflush() from boolean_t,
which I mistakenly thought was correct w.r.t. style(9), back
to int and add the checks for != 0. This is just a stylistic
modification.
fabient [Mon, 9 Aug 2010 14:29:23 +0000 (14:29 +0000)]
MFC r210794:
Allow file as a top source, it works with socket now.
This will allow top monitoring using socket/ssh tunnelling
of system without local symbols.
- Move the file read in the event loop
- Initialize and clean log in all cases
- Preserve global stats value during top refresh
- Fix the rtld/line resolver that ignore '-r' prefix
- Support socket for '-R' (server mode)
- Display the statistics when exiting top mode
- Don't return EAGAIN from gv_unload(). It was used to work around the
deadlock fixed in r207671.
- Wait for worker process to exit at class unload. The worker process
was not guaranteed to exit before the linker unloaded the module.
- Use 0 as the worker process exit status instead of ENXIO and style
the NOTREACHED comment.
brucec [Sat, 7 Aug 2010 12:51:44 +0000 (12:51 +0000)]
MFC r209468:
Make it easier to cancel a failing installation by only attempting to
extract distributions once. If a distribution fails to fetch/extract
and the user doesn't want to retry, abort the installation.
brucec [Sat, 7 Aug 2010 12:41:12 +0000 (12:41 +0000)]
MFC r209467:
When installing on a machine which doesn't have a VGA card installed, enable
a getty on the serial port so that it's possible to login when the system is
rebooted.
brucec [Sat, 7 Aug 2010 12:18:36 +0000 (12:18 +0000)]
MFC r209764:
Increase the default and minimum partition sizes.
Bump / to 1GB, /var to 4GB and /tmp to 1GB.
A 512MB root partition is now too small to hold two kernels, so to
prevent installkernel failing 1GB is a better default. Likewise,
applications are storing more data in /var so 4GB is more reasonable
on a modern machine.
The previous minimum partition sizes were too small to hold a minimal
installation, and have been adjusted accordingly.
brucec [Sat, 7 Aug 2010 10:51:01 +0000 (10:51 +0000)]
MFC r209235, r210381 (bug fix for r209235):
* Allow partial MB/GB values to be entered in the slice and label editors.
* Don't strdup the name when calling deviceRegister because the string is
copied within new_device.
* Use a subtype of 165, not 3, when creating a slice in noninteractive
mode.
rmacklem [Sat, 7 Aug 2010 01:05:02 +0000 (01:05 +0000)]
MFC: r210455, r210456
Move sys/nfsclient/nfs_lock.c into sys/nfs and build it as a separate
module that can be used by both the regular and experimental nfs
clients. This fixes the problem reported by jh@ where /dev/nfslock
would be registered twice when both nfs clients were used.
I also defined the size of the lm_fh field to be the correct value,
as it should be the maximum size of an NFSv3 file handle.
Also fix the include path for nfs_lock.h for usr.sbin/rpc.lockd/kern.c.
Since r186119 IP6 input counters for octets and packets were not
working anymore. In addition more checks and operations were missing.
In case lla_lookup results in a match, get the ifaddr to update the
statistics counters, and check that the address is neither tentative,
duplicate or otherwise invalid before accepting the packet. If ok,
record the address information in the mbuf. [ as is done in case
lla_lookup does not return a result and we go through the FIB ].
Document the mandatory argument to the arptimer() and
nd6_llinfo_timer() functions with a KASSERT().
Note: there is no need to return after panic.
In the legacy IP case, only assign the arg after the check,
in the IPv6 case, remove the extra checks for the table and
interface as they have to be there unless we freed and forgot
to cancel the timer. It doesn't matter anyway as we would
panic on the NULL pointer deref immediately and the bug is
elsewhere.
This unifies the code of both address families to some extend.
brian [Fri, 6 Aug 2010 08:17:44 +0000 (08:17 +0000)]
MFC r209756:
Log dhclient's reason for exiting and change the 10 second
ignore-routing-messages dhclient-script timeout to be effective
from script completion rather than from script start time.
Ignore RTM_DELADDR and RTM_NEWADDR messages when the message
contains no interface address (which should not happen) rather than
exiting.
jhb [Thu, 5 Aug 2010 22:01:14 +0000 (22:01 +0000)]
MFC 210623:
Mark the __curthread() functions as __pure2 and remove the volatile keyword
from the inline assembly. This allows the compiler to cache invocations of
curthread since it's value does not change within a thread context.
jhb [Thu, 5 Aug 2010 20:39:52 +0000 (20:39 +0000)]
MFC 210505:
- Change the warning about PCI-e links narrower than x8 to only apply to
10G cards. 1G cards are x4 only.
- Use constants from pcireg.h for reading the current link width.
- Use pci_set_max_read_req() rather than implementing it by hand.
jhb [Thu, 5 Aug 2010 19:40:48 +0000 (19:40 +0000)]
MFC 210136:
Retire the NFS access cache timestamp structure. It was used in VOP_OPEN()
to avoid sending multiple ACCESS/GETATTR RPCs during a single open()
between VOP_LOOKUP() and VOP_OPEN(). Now we always send the RPC in
VOP_LOOKUP() and not VOP_OPEN() in the cases that multiple RPCs could be
sent.
To preserve the ABI I have left the structure in place, but renamed it
to 'n_unused' and just removed the code that updates it.
jhb [Thu, 5 Aug 2010 19:11:13 +0000 (19:11 +0000)]
MFC 210135:
Move attribute cache flushes from VOP_OPEN() to VOP_LOOKUP() to provide
more graceful recovery for stale filehandles and eliminate the need for
conditionally clearing the attribute cache in the !NMODIFIED case in
VOP_OPEN().
delphij [Wed, 4 Aug 2010 01:36:48 +0000 (01:36 +0000)]
MFC r210358:
Apply vendor version 1.20.00.17.
This version adds support for ARC1880; additionally this version fixed
an issue where all devices on a SAS port gets offlined when any device
failed on the port [1].
Many thanks to Areca for continuing to support FreeBSD.
rmacklem [Mon, 2 Aug 2010 23:57:50 +0000 (23:57 +0000)]
MFC: r210268
For the experimental NFSv4 server's dumplocks operation, add the
MPSAFE flag to cn_flags so that it doesn't panic. The panics weren't
seen since nfsdumpstate(8) is broken for the "-l" case, so this
was never done. I'll do a separate commit to fix nfsdumpstate(8).
gnn [Mon, 2 Aug 2010 19:56:07 +0000 (19:56 +0000)]
MFC: 210428
Fix a bug in the statistics code for tracking the head and
tail pointers of the tx and rx queues. We needed a SYSCTL_PROC
to correctly get the values at run time.
Submitted by: Andrew Boyer aboyer at averesystems.com
In reallocf(3), free the memory only when size != 0. Otherwise, when the
System V compatibility option (malloc "V" flag) is in effect a zero sized
reallocf() could cause a double free.
- Don't assign the return value from read(2) to a variable of type
int.
- Use errx(3) instead of err(3) to print the error message on short
reads in readlabel(). errno won't be set on short reads which can
easily occur here due to the fixed size read request.
rmacklem [Mon, 2 Aug 2010 00:37:33 +0000 (00:37 +0000)]
MFC: r210227
Add a call to nfscl_mustflush() in nfs_close() of the experimental
NFSv4 client, so that attributes are not acquired from the server
when a delegation for the file is held. This can reduce the number
of Getattr Ops significantly.
rmacklem [Sun, 1 Aug 2010 23:58:26 +0000 (23:58 +0000)]
MFC: r210201
Change the nfscl_mustflush() function in the experimental NFSv4
client to return a boolean_t in order to make it more compatible
with style(9).