delphij [Sat, 16 Mar 2013 01:16:57 +0000 (01:16 +0000)]
Diff reduction against stable/9: this is a pure mechanical comment
change that eliminates the unwanted diff caused by different
Pod::Simple version and have no runtime impact.
We do this in the hope of minimizing variants of patches that would
need to be published, should an update is required during the
remaining lifetime of the stable/8 branch.
lstewart [Mon, 11 Mar 2013 08:21:43 +0000 (08:21 +0000)]
MFC r247906:
The hashmask returned by hashinit() is a valid index in the returned
hash array. Fix a siftr(4) potential memory leak and INVARIANTS
triggered kernel panic in hashdestroy() by ensuring the last array index
in the flow counter hash table is flushed of entries.
rstone [Fri, 8 Mar 2013 21:07:31 +0000 (21:07 +0000)]
MFC r244631
Correct a series of errors in the hand-rolled locking for drace_debug.c:
- Use spinlock_enter()/spinlock_exit() to prevent a thread holding a
debug lock from being preempted to prevent other threads waiting
on that lock from starvation.
- Handle the possibility of CPU migration in between the fetch of curcpu
and the call to spinlock_enter() by saving curcpu in a local variable.
- Use memory barriers to prevent reordering of loads and stores of the
data protected by the lock outside of the critical section
- Eliminate false sharing of the locks by moving them into the structures
that they protect and aligning them to a cacheline boundary.
- Record the owning thread in the lock to make debugging future problems
easier.
rstone [Fri, 8 Mar 2013 19:36:44 +0000 (19:36 +0000)]
MFC r241009
Ensure that all cases that enqueue a netgraph item for delivery by a
ngthread properly set the item's depth to 1. In particular, prior to this
change if ng_snd_item failed to acquire a lock on a node, the item's depth
would not be set at all. This fix ensures that the error code from rcvmsg/
rcvdata is properly passed back to the apply callback. For example, this
fixes a bug where an error from rcvmsg/rcvdata would not previously
propagate back to a libnetgraph consumer when the message was queued.
rstone [Fri, 8 Mar 2013 19:02:45 +0000 (19:02 +0000)]
MFC r240923
Some aac(4) adapters will always report that a direct access device is
offline in response to a INQUIRY command that does not retreive vital
product data(I personally have observed the behaviour on an Adaptec 2405
and a 5805). Force the peripheral qualifier to "connected" so that upper
layers correctly recognize that a disk is present.
This bug was uncovered by r216236. Prior to that fix, aac(4) was
accidentally clearing the peripheral qualifier for all inquiry commands.
This fixes an issue where passthrough devices were not created for
disks behind aac(4) controllers suffering from the bug. I have
verified that if a disk is not present that we still properly detect
that and not create the passthrough device.
marius [Fri, 8 Mar 2013 12:58:25 +0000 (12:58 +0000)]
- Complete r231621 (MFC'ed to stable/8 in r232093) by also blacklisting the
bridge used by VMware for PCIe devices. While at it, update the comment
now that we know that MSI-X doesn't work with ESXi 5.1 for Intel 82576
either and the underlying issue is a bug in the MSI-X allocation code of
the hypervisor.
Reported by: Harald Schmalzbauer
- Make the nomatch table const.
marius [Fri, 8 Mar 2013 12:50:31 +0000 (12:50 +0000)]
MFC: r247600, r247620
- While Netra X1 generally show no ill effects when registering a power
fail interrupt handler, there seems to be either a broken batch of them
or a tendency to develop a defect which causes this interrupt to fire
inadvertedly. Given that apart from this problem these machines work
just fine, add a tunable allowing the setup of the power fail interrupt
to be disabled.
While at it, remove the DEBUGGER_ON_POWERFAIL compile time option and
make that behavior also selectable via the newly added tunable.
- Correct an incorrect argument to shutdown_nice(9).
- Mark unused parameters as such.
- Use NULL instead of 0 for pointers.
marius [Fri, 8 Mar 2013 12:44:40 +0000 (12:44 +0000)]
MFC: r223951
Partially merge r223648 and r223949 from gem(4) (committed to stable/8 in
r224367):
- Consistently use the newly introduced sc_mac_rxcfg throughout the driver
instead of reading the old content of CAS_MAC_RX_CONF.
- Increment if_iqdrops instead of if_ierrors in case of RX buffer allocation
failure.
- According to the Cassini datasheet the RX MAC should also be disabled in
cas_setladrf() before changing its configuration.
- Add error messages to gem_disable_{r,t}x() and take advantage of these
throughout the driver instead of duplicating their functionality all over
the place.
MFC: r247579
- Move reporting of failures to disable RX/TX MAC under bootverbose as at
least the Saturn chips of 501-6738 cards may fail to do so the first
time, which isn't fatal though.
Reported by: Paul Keusemann
- Explain why we don't enable infinite bursts on sparc64.
- Given that these chips support memory write invalidate, make sure that
it's enabled in the command register. Also make sure that PERR# and
SERR# assertion is enabled.
marius [Fri, 8 Mar 2013 12:11:41 +0000 (12:11 +0000)]
MFC: r247573
- Remove an unused header.
- Use NULL instead of 0 for pointers.
- Let ofw_pcib_probe() return BUS_PROBE_DEFAULT instead of 0 so specialized
PCI-PCI-bridge drivers may attach instead.
- Add WARs for PLX Technology PEX 8114 bridges and PEX 8532 switches.
Ideally, these should live in MI code but at least for the latter we're
missing the necessary infrastructure there.
marius [Fri, 8 Mar 2013 11:41:52 +0000 (11:41 +0000)]
MFC: r247571
- Apparently, r186520 was just wrong and the clock of Oxford OX16PCI958 is
neither DEFAULT_RCLK * 2 nor DEFAULT_RCLK * 10 but plain DEFAULT_RCLK
and there's no (open) source indicating otherwise. This was tested with
an EXSYS EX-41098-2, whose clock is not configurable and identifies as:
puc0@pci0:5:1:0: class=0x070200 card=0x06711415 chip=0x95381415 rev=0x01 hdr=0x00
vendor = 'Oxford Semiconductor Ltd'
class = simple comms
subclass = multiport serial
Note that this exactly matches the card mentioned in PR 129665 so no
sub-device/sub-vendor based quirking of the latter is possible. So maybe
we should grow some sort of tunable, in case non-default cards such as
the latter aren't configurable either (this also wouldn't be the first
time an allegedly tested commit turns out to be wrong though).
- Make the TiMedia tables const.
marius [Fri, 8 Mar 2013 11:33:02 +0000 (11:33 +0000)]
MFC: r247565, r247590
- Make tables, device ID strings etc const.
- Use NULL instead of 0 for pointers.
- Remove redundant bzero(9)'ing of the softc.
- Remove redundant/unused softc members.
- Don't allocate MSI/MSI-X as RF_SHAREABLE.
- Re-use bus accessor macros instead of duplicating them.
- In bce_miibus_{read,write}_reg(), remove superfluous limiting of the PHY
address (missed in r213893, which was MFC'ed to stable/8 in r214909).
tuexen [Fri, 8 Mar 2013 01:33:07 +0000 (01:33 +0000)]
MFC r247412:
Fix a potential race in returning setting errno when an
association goes down.
Reported by Mozilla in
https://bugzilla.mozilla.org/show_bug.cgi?id=845513
tuexen [Fri, 8 Mar 2013 01:29:05 +0000 (01:29 +0000)]
MFC r246674:
Don't send kernel provided information in the User Initiated
ABORT cause, since the user can also provide this kind of
information. So the receiver doesn't know who provided the
information.
While there: Fix a bug where the stack would send a malformed
ABORT chunk when using a send() call with SCTP_ABORT|SCT_SENDALL
flags.
tuexen [Fri, 8 Mar 2013 01:10:33 +0000 (01:10 +0000)]
MFC r244021:
Ensure that the padding of the last parameter of an INIT chunk
is not included in the chunk length as required by RFC 4960.
While there, cleanup sctp_send_initiate().
tuexen [Fri, 8 Mar 2013 00:48:15 +0000 (00:48 +0000)]
MFC r243157:
Get the accounting working. We now have counters how many
chunks for each SCTP outgoing stream are in the send and
sent queue.
While there, improve the naming of NR-SACK related constants
recently introduced.
tuexen [Fri, 8 Mar 2013 00:46:05 +0000 (00:46 +0000)]
MFC r242714:
Add per outgoing stream accounting for chunks in the send
and sent queue. This provides no functional change, but is
a preparation for an upcoming stream reset improvement.
Done with rrs@.
tuexen [Fri, 8 Mar 2013 00:41:20 +0000 (00:41 +0000)]
MFC r242627:
Move from early SSN assignment to late SSN assignment.
This doesn't change functionality, but makes upcoming change
much easier.
Developed with rrs@ at the IETF 85.
tuexen [Thu, 7 Mar 2013 23:53:11 +0000 (23:53 +0000)]
MFC r238790:
Fix the sctp_sockstore union such that userland programs don't depend
on INET and/or INET6 to be defined and in-tune with how the kernel
was compiled.
tuexen [Thu, 7 Mar 2013 23:37:53 +0000 (23:37 +0000)]
MFC r238454:
Bugfix: Send up a COMM UP notification for active 1-to-1 style sockets
also in the case where the assoc comes up due to a remotely
started handshake (collision case).
tuexen [Thu, 7 Mar 2013 21:17:37 +0000 (21:17 +0000)]
MFC r236959:
Add a IP_RECVTOS socket option to receive for received UDP/IPv4
packets a cmsg of type IP_RECVTOS which contains the TOS byte.
Much like IP_RECVTTL does for TTL. This allows to implement a
protocol on top of UDP and implementing ECN.
tuexen [Thu, 7 Mar 2013 21:11:16 +0000 (21:11 +0000)]
MFC r236958:
Deliver IPV6_TCLASS, IPV6_HOPLIMIT and IPV6_PKTINFO cmsgs (if
requested) on IPV6 sockets, which have been marked to be not IPV6_V6ONLY,
for each received IPV4 packet.