Commit Graph

26107 Commits

Author SHA1 Message Date
Rui Paulo
fc4153c26f Revert r252725 as it breaks WPA.
We need to fix wpa_supplicant because it checks whether the card has
ic_cryptocaps set. Since net80211 can do software encryption this check in
wpa_supplicant is wrong.
2013-07-14 18:26:47 +00:00
Hans Petter Selasky
0ccd2fb09e Allow regular off-the-shelf keyboards to be overclocked like so-called
"Gamers Keyboards" by adding a tunable, "hw.usb.ukbd.pollrate", which
can fix the polling rate of the attached USB keyboards in the range
1..1000Hz. A similar feature already exists in the USB mouse
driver. Use with care! Might leave you without keyboard input. This
feature is only available when the USB_DEBUG option is set in the
kernel configuration file.

Correct "unit" type to "int" while at it.
2013-07-13 22:39:56 +00:00
Matt Jacob
22629d2996 When fiddling with options of which registers to copy out for
a mailbox command and which registers to copy back in when
the command completes, the bits being set need to not only
specify what bits you want to add from the default from the
table but also what bits you want *subtract* (mask) from the
default from the table.

A failing ISP2200 command pointed this out.

Much appreciation to: marius, who persisted and narrowed down what
the failure delta was, and shamed me into actually fixing it.
MFC after:	1 week
2013-07-13 21:24:25 +00:00
Jack F Vogel
a1db87ec73 Change the E1000 driver option header handling to match the
ixgbe driver. As it was, when building them as a module INET
and INET6 are not defined. In these drivers it does not cause
a panic, however it does result in different behavior in the
ioctl routine when you are using a module vs static, and I
think the behavior should be the same.

MFC after: 3 days
2013-07-12 22:36:26 +00:00
Xin LI
76505954aa Merge from hpt27xx, r249468 (mav):
MFprojects/camlock r248982:
Stop abusing xpt_periph in random plases that really have no periph related
to CCB, for example, bus scanning.  NULL value is fine in such cases and it
is correctly logged in debug messages as "noperiph".  If at some point we
need some real XPT periphs (alike to pmpX now), quite likely they will be
per-bus, and not a single global instance as xpt_periph now.
2013-07-12 21:36:29 +00:00
Jack F Vogel
bae4b87e8a Opps, need to change the VF code as well.
MFC after:	ASAP
2013-07-12 21:21:15 +00:00
Jack F Vogel
ee738eea01 Remove the conditional define around the option headers,
when building the driver as a module the result of the present
system results in INET and INET6 being undefined, and will cause
the panic in ixgbe_tso_setup(). The Makefile in the module directory
now renders the conditional in the source unnecessary and wrong.

MFC after: ASAP - the panic as a module must not get into 9.2
2013-07-12 21:14:42 +00:00
Navdeep Parhar
2b66d73259 Attach to the 4x10G T540-CR card. 2013-07-11 19:09:31 +00:00
Jim Harris
66619178b5 Fix a poorly worded comment in nvme(4).
MFC after:	3 days
2013-07-11 15:02:38 +00:00
Jack F Vogel
3f80cc03fd Fix my last commit, flags rather than flag... duh.
MFC after: 2 days
2013-07-11 03:44:06 +00:00
Jack F Vogel
804d70535a Fix to a panic found internally, bad pointer during rxeof
processing. Thanks for John Baldwin for catching this. Not
clearing the flag member of the rxbuf could result in a NULL
mbuf pointer being used.

MFC after:	2 days (this needs to get into 9.2!)
2013-07-10 23:14:24 +00:00
Marcel Moolenaar
eead2d551c Protect against broken hardware. In this particular case, protect against
H/W not de-asserting the interrupt at all. On x86, and because of the
following conditions, this results in a hard hang with interrupts disabled:
1.  The uart(4) driver uses a spin lock to protect against concurrent
    access to the H/W. Spin locks disable and restore interrupts.
2.  Restoring the interrupt on x86 always writes the flags register. Even
    if we're restoring the interrupt from disabled to disabled.
3.  The x86 CPU has a short window in which interrupts are enabled when the
    flags register is written.
4.  The uart(4) driver registers a fast interrupt by default.

To catch this case, we first try to clear any pending H/W interrupts and in
particular, before setting up the interrupt. This makes sure the interrupt
is masked on the PIC. The interrupt handler now has a limit set on the
number of iterations it'll go through to clear interrupt conditions. If the
limit is hit, the handler will return FILTER_SCHEDULE_THREAD. The attach
function will check for this return code and avoid setting up the interrupt
and foce polling in that case.

Obtained from:	Juniper Networks, Inc.
2013-07-10 17:42:20 +00:00
Hiren Panchasara
3c9d5a037d Adding urtwn(4) firmware and related changes.
Reviewed by:	rpaulo
Approved by:	sbruno (mentor)
2013-07-10 08:21:09 +00:00
Pyun YongHyeon
37d17b6b63 Avoid controller reinitialization which could be triggered by
dhclient(8) or alias addresses are added.

Tested by:	dcx dcy <dcbsdx@hotmail.com>
2013-07-10 06:46:46 +00:00
David E. O'Brien
d0961945bb Refactor random_systat to be a *random_systat. This avoids unnecessary
structure copying in random_ident_hardware(). This change will also help
further modularization of random(4) subsystem.

Submitted by: arthurmesh@gmail.com
Reviewed by: obrien
Obtained from: Juniper Networks
2013-07-09 23:47:28 +00:00
Marius Strobl
68e9cbd385 - As it turns out, not only MSI-X is broken for devices passed through by
VMware up to at least ESXi 5.1. Actually, using INTx in that case instead
  may still result in interrupt storms, with MSI being the only working
  option in some configurations. So introduce a PCI_QUIRK_DISABLE_MSIX quirk
  which only blacklists MSI-X but not also MSI and use it for the VMware
  PCI-PCI-bridges. Note that, currently, we still assume that if MSI doesn't
  work, MSI-X won't work either - but that's part of the internal logic and
  not guaranteed as part of the API contract. While at it, add and employ
  a pci_has_quirk() helper.
  Reported and tested by: Paul Bucher
- Use NULL instead of 0 for pointers.

Submitted by:	jhb (mostly)
Approved by:	jhb
MFC after:	3 days
2013-07-09 23:12:26 +00:00
Jim Harris
bd6b0ac5be Add comment explaining why CACHE_LINE_SIZE is defined in nvme_private.h
if not already defined elsewhere.

Requested by:	attilio
MFC after:	3 days
2013-07-09 21:24:19 +00:00
Jim Harris
e9efbc134f Update copyright dates.
MFC after:	3 days
2013-07-09 21:22:17 +00:00
Jim Harris
ec526ea90b Do not retry failed async event requests.
Sponsored by:	Intel
MFC after:	3 days
2013-07-09 21:03:39 +00:00
Jim Harris
eb32b874f6 Add pci_enable_busmaster() and pci_disable_busmaster() calls in
nvme_attach() and nvme_detach() respectively.

Sponsored by:	Intel
MFC after:	3 days
2013-07-09 21:02:45 +00:00
Jung-uk Kim
835fbe0ae7 Remove redundant definitions to appease tinderbox. 2013-07-09 18:15:59 +00:00
Konstantin Belousov
89d02670ab Use MSI for xhci(4), if supported.
Reviewed by:	jhb
Tested by:	dchagin
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2013-07-09 12:55:01 +00:00
Alexander Motin
122ecf1eca Add ID for Marvell 88SE9215 AHCI SATA controller.
MFC after:	3 days
2013-07-09 08:49:17 +00:00
Alexander Motin
c4aea6be90 Add one more ID of Marvell SATA controller.
Submitted by:	marck
MFC after:	3 days
2013-07-09 08:32:17 +00:00
Rui Paulo
88e07d922d Use meaningful names when creating mmc/sd threads.
This can be useful when we want to be able to identify which mmcsd is stuck.
2013-07-09 03:00:06 +00:00
Alexander Motin
fff11ae8af Add quirk to configure headphones redirection on ASUS UX31A laptop.
MFC after:	3 days
2013-07-08 15:28:09 +00:00
Rui Paulo
9a0c3479e2 Add a mailbox interface.
Mailboxes are an IPC mechanism found on several ARM architectures, namely
OMAP4, BCM2385, Sitara, etc.

Reviewed by:	gonzo
2013-07-07 19:47:22 +00:00
Oleksandr Tymoshenko
860e12e971 - Add initial host mode support for Mentor Graphics USB OTG controller
- Sync musb_otg_atmelarm with new core logic API
2013-07-07 04:18:35 +00:00
Xin LI
291a1934fa Update driver with recent vendor improvements, most notably support
of Skyhawk adapters.

Many thanks to Emulex for their continued support of FreeBSD.

Submitted by:	"Duvvuru,Venkat Kumar" <VenkatKumar.Duvvuru Emulex.Com>
MFC after:	1 day
2013-07-06 08:30:45 +00:00
Xin LI
1fdeb1651c Import HighPoint DC Series Data Center HBA (DC7280 and R750) driver.
This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms.

Many thanks to HighPoint for providing this driver.

MFC after:	1 day
2013-07-06 07:49:41 +00:00
Konstantin Belousov
5af68df670 Remove unneeded page lock around vm_page_insert().
Submitted by:	alc
2013-07-06 04:46:42 +00:00
Xin LI
abfdbca922 Refresh vendor driver version which fixes command queue
full issue with ARC-1214 and ARC-1224.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by:	黃清隆 <ching2048 areca com tw>
MFC after:	1 day
2013-07-06 01:46:58 +00:00
Xin LI
e587249b7f Update hpt27xx(4) driver to address a problem reported by FreeNAS
user, where when more than one hpt27xx adapters are being used,
the "unit number" stays at 0.

Many thanks to HighPoint for providing this driver update.

MFC after:	1 day
2013-07-05 23:13:54 +00:00
Xin LI
bba8d13ed9 Add PCI IDs for HighPoint RocketRAID 4521, 3620, 3622 and 3640
controllers.  Update the hptiop(4) manual page to reflect this
as well as mentioning that some cards are already end-of-life.

Many thanks to Highpoint for providing this driver update.

MFC after:	1 day
2013-07-05 23:10:02 +00:00
Jamie Gritton
c71e336230 Add new privileges, PRIV_KMEM_READ and PRIV_KMEM_WRITE, used in opening
/dev/kmem and /dev/mem (in addition to traditional file permission checks).
PRIV_KMEM_READ is different from other PRIV_* checks in that it's allowed
by default.

Reviewed by:	kib, mckusick
2013-07-05 21:31:16 +00:00
Navdeep Parhar
3a760ee793 - Show the reason why link is down if this information is available.
- Display the temperature and PHY firmware version of the BT PHY.

MFC after:	1 day
2013-07-05 01:53:51 +00:00
Navdeep Parhar
6eb3180fb2 - Make note of interface MTU change if the rx queues exist, and not just
when the interface is up.
- Add a tunable to control the TOE's rx coalesce feature (enabled by
  default as it always has been).  Consider the interface MTU or the
  coalesce size when deciding which cluster zone to use to fill the
  offload rx queue's free list.  The tunable is:
  dev.{t4nex,t5nex}.<N>.toe.rx_coalesce

MFC after:	1 day
2013-07-04 21:19:01 +00:00
Adrian Chadd
f8bf74f232 Implement basic 802.11n awareness in the PHY and AMRR rate control code.
* Add 802.11n 2ghz and 5ghz tables, including legacy rates and up to
  MCS23 rates (3x3.)

* Populate the rate code -> rate index lookup table with MCS _and_
  normal rates, but _not_ the basic rate flag.  Since the basic rate flag
  is the same as the MCS flag, we can only use one.

* Introduce some accessor inlines that do PLCP and rate table lookup/access
  and enforce that it doesn't set the basic rate bit.  They're not
  designed for MCS rates, so it will panic.

* Start converting drivers that use the rate table stuff to use the
  accessor inlines and strip the basic flag.

* Teach AMRR about basic 11n - it's still as crap for MCS as it is
  being used by iwn, so it's not a step _backwardS_.

* Convert iwn over to accept 11n MCS rates rather than 'translate' legacy
  to MCS rates.  It doesn't use a lookup table any longer; instead it's a
  function which takes the current node (for HT parameters) and the
  rate code, and returns the hardware PLCP code to use.

Tested:

* ath - it's a no-op, and it works that way
* iwn - both 11n and non-11n
2013-07-04 21:16:49 +00:00
Rui Paulo
2173825bac Set ic_cryptocaps to make sure wpa_supplicant works with WEP. 2013-07-04 20:57:15 +00:00
Navdeep Parhar
6300655cc1 On-the-fly changes to the interrupt coalescing timer should apply to the
TOE rx queues too.

MFC after:	1 day
2013-07-04 20:17:39 +00:00
Adrian Chadd
2fc5db16ed Enable the station-side power management flag.
It's not enabled by default in net80211 so this is a no-op unless
if you enable it (ifconfig wlan0 powersave).

Tested:

* iwn0: <Intel WiFi Link 5100> mem 0xf4300000-0xf4301fff irq 17 at device 0.0 on pci3

TODO:

* .. test on all the other NICs
* See if I have to disable it during scan and such
* Make it configurable live, rather than only after it's done its initial
  receive calibration.
2013-07-04 19:45:34 +00:00
Navdeep Parhar
50ce3d40aa Pay attention to TCP_NODELAY when it's set/unset after the connection
is established.

MFC after:	1 day
2013-07-04 19:44:30 +00:00
Navdeep Parhar
7e2fb22f81 Ring the egress queue's doorbell as soon as there are 8 or more
descriptors ready to be processed.

MFC after:	1 day
2013-07-04 19:15:41 +00:00
Navdeep Parhar
054a2dc11c The T5 allows the driver to specify the ISS. Do so; use the ISS picked
by the kernel.

MFC after:	1 day
2013-07-04 18:41:21 +00:00
Bryan Venteicher
4d5919ec0b Merge virtio_scsi change from projects/virtio
r252680:
    Fix SIM lock not owned panic

    The CAM locking requirements of registering an async
    callback has changed so the SIM lock must be held. Remove
    code that explicitly dropped the lock around the register.

    Also return CAM_SEL_TIMEOUT instead of CAM_TID_INVALID
    for bad targets to avoid a lot console spam during bus
    scans.

MFC after:	1 month
2013-07-04 18:00:27 +00:00
Bryan Venteicher
62a69c4153 Merge virtio_pci changes from projects/virtio
This commit is primarily a significant cleanup to the interrupt
allocation code that had gotten a bit jumbled from having to
support per-vq MSIX, shared MSIX, MSI, and legacy style interrupts.

Contains projects/virtio commits:

r246064:
    virtio_pci: Rewrite allocation of interrupts
r246065:
    virtio_pci: Remove spaces before a tab
r246066:
    virtio_pci: Dynamically allocate the virtqueue array
r246304:
    virtio_pci: Clean up after failed virtqueue alloc attempt
r246305:
    virtio_pci: Move no interrupt check into the PCI interrupt handlers
r246308:
    virtio_pci: Remove unused variable

MFC after:	1 month
2013-07-04 17:59:09 +00:00
Bryan Venteicher
abd6790ce8 Merge virtio changes from projects/virtio
Contains projects/virtio commits:

r245738:
    virtio: Minor man page tweaks
r246060:
    virtio: Cleanup feature description printing
r246306:
    virtio: Remove old debugging flag
r247238:
    virtio: Remove PRIx64 macros from format strings
r247239:
    virtio: Constify some fields
r247240:
    virtio: Minor code simplifications
r249962:
    virtio: Update to my freebsd.org email address

MFC after:	1 month
2013-07-04 17:57:26 +00:00
Bryan Venteicher
3dd8d840ed Merge vtnet changes from projects/virtio
Minor changes to the network driver. A multiqueue driver that is
a significant rewrite will be in merged shortly.

Contains projects/virtio commits:

r246058:
    vtnet: Move an mbuf ASSERT to the calling function
r246059:
    vtnet: Tweak ASSERT message

MFC after:	1 month
2013-07-04 17:55:58 +00:00
Navdeep Parhar
c337fa30af - Read all TP parameters in one place.
- Read the filter mode, calculate various shifts, and use them
  properly during active open (in select_ntuple).

MFC after:	1 day
2013-07-04 17:55:52 +00:00
Bryan Venteicher
6f7e608220 Merge virtio_balloon changes from projects/virtio
Contains projects/virtio commits:

r245717:
    virtio_balloon: Make the softc lock a regular mutex
r245718:
    virtio_balloon: Remove two unuseful ASSERTs
r245719:
    virtio_balloon: More verbose ASSERT messages
r245720:
    virtio_balloon: Simplify lowmem handling in vtballoon_inflate()
r252530:
    virtio_balloon: Use just a kthread instead of dedciated kproc
r252568:
    virtio_balloon: Need to use kthread_exit() after r252530

MFC after:	1 month
2013-07-04 17:54:46 +00:00