Commit Graph

182619 Commits

Author SHA1 Message Date
gabor
7595cc54ef - Remove GNU sort and the WITH_GNU_SORT knob 2012-10-13 18:40:39 +00:00
mav
b2c37a9f0e Don't exclude XPT SIM from locking in xpt_create_path_unlocked().
We don't want xpt periph, device, target or bus disappeared because of
incorrect reference counting.
2012-10-13 18:24:52 +00:00
mav
e21d57c65c Use xpt_create_path_unlocked() for initial debug path compilation because
we are not holding respective SIM lock.
2012-10-13 18:11:50 +00:00
mav
fd39176a32 Extend SIM lock coverage during the bus registration process. 2012-10-13 17:55:06 +00:00
ume
e2e55abec2 Make a command for pkg_info changeable like pkg_version in
/etc/periodic/weekly/400.status-pkg to be friendly with pkgng.

MFC after:	1 week
2012-10-13 14:45:42 +00:00
mav
6d988f09cf Fix XPT_DEBUG paths operations locking:
- Extend the lock to cover xpt_path_release() for the new path.
 - While xpt_action() is called while holding right SIM lock for the new
   bus, the old path release may require different SIM lock. So we have
   to temporary drop the new lock and get the old one.
2012-10-13 11:23:16 +00:00
mav
fd248e3cc6 XPT_DEV_MATCH is probably the only xpt_action() method that is called
without holding SIM lock. It really doesn't need that lock, but adding it
removes that specific exception, allowing to assert locking there later.

Submitted by:	ken@ (earlier version)
2012-10-13 10:18:36 +00:00
melifaro
85ee5d74ce Cleanup documentation: cloning route support has been removed in r186119.
MFC after:	2 weeks
2012-10-13 09:31:01 +00:00
melifaro
8eaa0b7dca Add forgotten documentation for new NGM_NETFLOW_V9INFO message.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov at gmail.com>
MFC with:	r241446
2012-10-13 09:25:29 +00:00
adrian
f8f061cd55 Fix the non-TDMA build. 2012-10-13 06:27:34 +00:00
dteske
1388f55af3 SVN r240684 broke the ability of the dot module to map include dependencies.
Teach the dot module about the new location these includes moved to (as part
of r240684) and clean things up a bit.

Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-13 03:56:33 +00:00
alc
0014523dbd Replace all uses of the vm page queues lock by a new R/W lock.
Unfortunately, this lock cannot be defined as static under Xen because it
is (ab)used to serialize queued page table changes.

Tested by:	sbruno
2012-10-12 23:26:00 +00:00
n_hibma
5f97c24afc Some 3G modems return the wrong signature in echo packets and make it
impossible to use LQR/ECHO. They return want_magic instead.

With this change it is now possible to use

	enable lqr
	set lqrperiod 5
	enable echo
	set echoperiod 5

in your ppp.conf file.

MFC after:	3 days
2012-10-12 22:48:33 +00:00
mav
2db2a2f9c6 Fix build with PAE enabled. I doubt any code uses CAM_SCATTER_VALID or
CAM_DATA_PHYS, or they ever correctly worked, but make this build at least.
2012-10-12 22:06:06 +00:00
np
15609ffe5b Temporary fix for kern/172364.
PR:		kern/172364
MFC after:	3 days
2012-10-12 21:58:21 +00:00
np
aaf451dcc7 Use global knob in the TP_PARA_REG3 register to disable congestion
drops if the user has chosen this behaviour.

MFC after:	3 days
2012-10-12 21:48:21 +00:00
jhb
79e2851dcf Add locking to adv(4) driver and mark it MPSAFE.
- Disable the support for the second channel on twin-channel EISA cards as
  the current incarnation can't possibly work correctly (it hasn't worked
  since switching to new-bus where new-bus allocates the softc).  If anyone
  bothers to test this again it can be fixed properly and brought back.
- Use device_printf() and device_get_nameunit() instead of adv_name().
- Remove use of explicit bus space handles and tags.
- Use PCI bus accessors and helper routines rather than accessing
  config registers directly.
- Handle failures from adv_attach().

Tested by:	no one (hope it works)
2012-10-12 21:31:44 +00:00
glebius
f1a41bb5d1 Fix type in last commit.
Submitted by:	brueffer
2012-10-12 19:53:13 +00:00
mav
69de44a310 Get SIM lock in several places while calling CAM functions.
This fixes several use-after-free panics on systems with SAS enclosures.

Submitted by:	ken@, mav@
2012-10-12 18:21:31 +00:00
mav
c5f476d2d7 Protect xpt_getattr() calls with the SIM lock and assert that.
Submitted by:	ken@ (earlier version)
2012-10-12 17:18:24 +00:00
emaste
6e22acd47b Use CLOCK_UPTIME to get the uptime. 2012-10-12 15:03:28 +00:00
glebius
d778566d95 Be more explicit on how "intact" incoming packets in raw sockets are. 2012-10-12 12:27:30 +00:00
glebius
1e75ca6470 Revert fixup of ip_len from r241480. Now stack isn't yet
ready for that change.
2012-10-12 09:32:38 +00:00
glebius
9879a454af In ip_stripoptions():
- Remove unused argument and incorrect comment.
  - Fixup ip_len after stripping.
2012-10-12 09:24:24 +00:00
joel
1f46bef563 Remove whitespace. 2012-10-12 06:16:51 +00:00
kevlo
8c77f1f6a8 Since the moduledata structure member priv is a void pointer, using
NULL instead of 0 when dealing with pointers.
2012-10-12 01:31:02 +00:00
grehan
789936ed16 Virtio SCSI driver
Submitted by:	Bryan Venteicher  bryanv at daemoninthecloset dot org
Reviewed by:	grehan
2012-10-11 23:41:18 +00:00
grehan
c075ec12dd Patch from Bryan to fix a virtqueue issue:
virtqueue: Fix non-indirect virtqueues

    We really must walk the entire descriptor chain in order
    to append the to be free'd chain to the existing free
    chain.

Submitted by:	Bryan Venteicher (bryanv@daemoninthecloset.org)
Reported by:	cognet
2012-10-11 23:03:42 +00:00
emaste
f0db6be72a Make local function static. 2012-10-11 21:24:07 +00:00
ray
a4ce9b8e4a Fix tiypo.
Submitted by:	Luiz Otavio O Souza
Approved by:	adrian (mentor)
2012-10-11 21:19:42 +00:00
peter
bd5be964da Point freebsd.org cluster machines to mx1 for their smarthost. 2012-10-11 20:46:04 +00:00
mav
3b492402e1 Use separate malloc buckets for CAM devices, CCBs and paths. This will
make it easier to track down the source of any use after free problems.

Submitted by:	ken@
2012-10-11 20:14:11 +00:00
mav
def5df11b3 Don't duplicate path/ccb allocation code, use existing functions. 2012-10-11 19:57:11 +00:00
emaste
e4cf877fdd Exclude potential circular symlink when creating src tarball.
Normal release builds are not affected by this but it can happen if using
these release bits against a work tree.

Sponsored by: ADARA Networks
2012-10-11 18:41:32 +00:00
melifaro
564aca31ca Add NG_NETFLOW_V9INFO_TYPE command to be able to request netflowv9-specific
data.

Submitted by:	Dmitry Luhtionov <dmitryluhtionov at gmail.com>
MFC after:	2 weeks
2012-10-11 16:15:18 +00:00
mav
e867826c02 Increase device CCB queue array size by CAM_RL_VALUES - 1 (4) elements.
It is required to store extra recovery requests in case of bus resets.
On ATA/SATA this fixes assertion panics on HEAD with INVARIANTS enabled or
possible memory corruptions otherwise if timeout/reset happens when device
CCB queue is already full.

Reported by:	gibbs@
MFC after:	1 week
2012-10-11 15:21:07 +00:00
stefanf
61816f86e1 Fix my last commit. Only call strunvis after properly checking the argument is
not NULL.
2012-10-11 08:18:28 +00:00
stefanf
054e35b9ef Decode the first two fstab fields with strunvis(3). This allows having spaces
in devices and mount paths, encoded as \s or \040.

PR:		bin/117687
Submitted by:	Martin Kammerhofer
Discussed on:	arch
2012-10-11 07:54:29 +00:00
stefanf
1ae38f4b7e Apply some style. Checked with md5. 2012-10-11 07:39:51 +00:00
yongari
6572982b10 Add APE firmware support and improve firmware handshake procedure.
This change will enable IPMI access on 5717/5718/5719/5720 and 5761
controllers. Because ASF is not available when APE firmware is
present, bge_allow_asf tunable is ignored when driver detects APE
firmware.  Also bge(4) no longer performs two resets(one blind
reset and the other reset with firmware in mind) in device attach.
Now bge(4) performs a reset with enough information in bge_reset().
The APE firmware also needs special handling to make suspend/resume
work but it was not implemented yet.

With this change, bge(4) should work on any 5717/5718/5719/5720
controllers. Special thanks to Mike Hibler at Emulab who setup
remote debugging on Dell R820. Without his help I couldn't be able
to address several issues happened on Dell Rx20 systems. And many
thanks to Broadcom for continuing to support FreeBSD!

Submitted by:	davidch (initial version)
H/W donated by:	Broadcom
Tested by:	many
Tested on:	Del R820/R720/R620/R420/R320 and HP Proliant DL 360 G8
2012-10-11 06:43:43 +00:00
yongari
9fe7d51dd3 For 5717C/5719C/5720C and 57765 PHYs, do not perform any special
handling(jumbo, wire speed etc) in brgphy_reset().  Touching
BRGPHY_MII_AUXCTL register seems to confuse APE firmware such that
it couldn't establish a link.
2012-10-11 06:07:48 +00:00
yongari
a96edbf7e8 Rework controller reset procedure. Previously driver saved
BGE_PCI_PCISTATE register before issuing global reset. After
issuing reset, it reads BGE_PCI_PCISTATE register again and
compares the saved register value and current value. It was used to
know whether the global reset operation was completed or not.
Unfortunately, this logic caused several issues on recent BCM5717/
5718/5719 and BCM5720 controllers. It seems APE firmware accesses
some registers while global reset is in progress such that reading
BGE_PCI_PCISTATE register after reset does not yield old pre-reset
state value. This resulted in consuming too much time in global
reset and sometimes it couldn't successfully complete reset.

The BGE_MISCCFG_RESET_CORE_CLOCKS of BGE_MISC_CFG register is
self-clearing bit so driver is able to know the reset completion.
But the core-lock reset will disable indirect/flat/standard access
modes such that driver cannot poll BGE_MISCCFG_RESET_CORE_CLOCKS
bit of BGE_MISC_CFG register. So just wait enough time for
core-clock reset to complete.
Data sheet says driver should wait 100us for PCI/PCI-X devices and
100ms for PCIe devices. I chose 1ms for PCI/PCI-X since this value
was used for many years in bge(4). For PCIe devices, use 100ms as
recommended by data sheet.

bge_chipinit() also cleared BGE_MAC_MODE register which shall clear
firmware configured mode information. I think this will result in
losing ASF/IPMI link in device attachment. Let bge_reset() honor
firmware configured BGE_MAC_MODE register and don't announce driver
is UP in bge_reset(). Firmware should have control over driver until
it's fully initialized by driver.

While I'm here, enable workaround for PCI-X BCM5704 A0 in
bge_reset(). This will prevent internal arbitration logic from
switching to the other DMA engine after a retry cycle.
2012-10-11 05:48:04 +00:00
jimharris
251b0e8a48 Count number of times each queue pair's interrupt handler is invoked.
Also add sysctls to query and reset each queue pair's stats, including
the new count added here.

Sponsored by:	Intel
2012-10-10 23:35:16 +00:00
jimharris
757271a213 Put the nvme_qpair mutex on its own cacheline.
Sponsored by:	Intel
2012-10-10 23:28:58 +00:00
mav
37cc4ef7d0 - Remove ancient checks for sim->softc == NULL. It can't be NULL, as it is
set not-NULL during SIM registration and set to UMASS_GONE on destruction.
Debug messages there look broken for at least 9 years, as they dereference
softc value that was just checked to be equal to NULL.
 - Remove magic pointer value UMASS_GONE and use simple NULL instead.

Found by:	Clang Static Analyzer
2012-10-10 22:02:11 +00:00
jimharris
d70da7871e Add man pages for nvme(4) and nvd(4).
Sponsored by:	Intel
Reviewed by:	joel
2012-10-10 21:38:17 +00:00
dim
181fd8e457 Pull in r164132 from upstream llvm trunk:
When creating MCAsmBackend pass the CPU string as well. In X86AsmBackend
  store this and use it to not emit long nops when the CPU is geode which
  doesnt support them.

  Fixes PR11212.

Pull in r164133 from upstream clang trunk:

  Follow up on llvm r164132.

This should prevent illegal instructions when building world on Geode
CPUs (e.g. Soekris).

MFC after:	3 days
2012-10-10 21:37:21 +00:00
dim
38198ecb8a Pull in r163710 from upstream llvm trunk:
Add support for AMD Geode.

MFC after:	3 days
2012-10-10 21:29:00 +00:00
mav
7849b3fa4d NULL-ify last previously used pointer instead of last possible pointer.
This should be only a cosmetic change.

Found by:	Clang Static Analyzer
2012-10-10 20:41:37 +00:00
np
d69f5fddc1 Add a "clearstats" subcommand to cxgbetool that lets you clear the
MAC statistics for any port.

For example:
# cxgbetool t4nex0 clearstats 0

Submitted by:	gnn@
MFC after:	3 days
2012-10-10 20:09:19 +00:00