Commit Graph

27059 Commits

Author SHA1 Message Date
Dimitry Andric
e9e21b6e41 In cxgbe, conditionalize the t4_pgprot_wc() function, since it is only
used when DOT5 is defined.

Reviewed by:	np
MFC after:	3 days
2014-02-14 23:38:42 +00:00
Christian Brueffer
d01195e3a9 Correct the order of arguments to mtx_init().
PR:		186701
Submitted by:	Takanori Sawada <tak.swd at gmail.com>
MFC after:	2 weeks
2014-02-14 11:18:15 +00:00
Hans Petter Selasky
c4a1e93fa6 Fix minor logical error in the XHCI driver. Set correct SETUP packet
direction value.

MFC after:	2 days
Reported by:	Horse Ma <HMa@wyse.com>
2014-02-14 07:17:36 +00:00
Rui Paulo
a999ce6abf Add urtwn_start_locked() to avoid unlocking during TX. 2014-02-14 01:47:12 +00:00
David C Somayajulu
b23deb2719 check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in
qla_hw_send is moot.
2014-02-14 01:02:06 +00:00
Luiz Otavio O Souza
bf17755477 Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems.
This change makes ofw_iicbus attach to iicbb(4) controllers in addition to
the already supported i2c host bridges (iichb).

On iicbb(4) allow the direct access of the OFW parent node by its children,
so they can be directly attached to iicbb(4) node on the DTS without the
need of describing the i2c bus.

Approved by:	adrian (mentor, implicit)
2014-02-13 18:22:49 +00:00
Luiz Otavio O Souza
9a2a079a51 Add OFW support to the in tree gpio compatible devices: gpioiic(4) and
gpioled(4).

Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for
the I2C tests).  It was also verified for regressions on RSPRO (MIPS/ar71xx)
used as reference for a non OFW-based system.

Update the gpioled(4) and gpioiic(4) man pages with some details and
examples about the FDT/OFW support.

Some compatibility details pointed out by imp@ will follow in subsequent
commits.

Approved by:	adrian (mentor, implicit)
2014-02-13 17:58:52 +00:00
Luiz Otavio O Souza
6d866ed35b Add an OFW GPIO compatible bus. This allows the use of the DTS files to
describe GPIO bindings in the system.

Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between
the OFW and the non OFW versions of GPIO bus.

Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus.

Approved by:	adrian (mentor, implicit)
2014-02-13 17:08:29 +00:00
Hans Petter Selasky
4e7b9cba60 - Remove not needed definitions from driver.
- Get USB input report length from HID descriptor.
- Use 1 finger TAP for devices which has no integrated button.
- Move data buffer to softc instead of allocating it.

MFC after:	1 week
2014-02-13 09:09:14 +00:00
Ian Lepore
4c155ae194 Fix the definition of the SDHCI_STATE_DAT and SDHCI_STATE_CMD fields, and
add SDHCI_RETUNE_REQUEST.  None of these are actually used in the code yet.
2014-02-12 22:25:08 +00:00
Hans Petter Selasky
4a6af12570 Issue doorbell twice before finally freeing the DMA descriptors. This
should fix DMA descriptor caching issues seen with the EHCI controller
found in Google Chromebook C720 during removal and insertion of USB
devices.

MFC after:	1 week
Reported by:	Matthew Dillon at DragonFlyBSD
2014-02-12 08:04:38 +00:00
Warner Losh
cca7539760 Better nomatch messages: include compat string. Also, flag devices as
disabled in the successful probe message, but leave what that means to
the actual driver (no semantic changes).
2014-02-12 04:56:34 +00:00
John Baldwin
4edef187b8 Add support for managing PCI bus numbers. As with BARs and PCI-PCI bridge
I/O windows, the default is to preserve the firmware-assigned resources.
PCI bus numbers are only managed if NEW_PCIB is enabled and the architecture
defines a PCI_RES_BUS resource type.
- Add a helper API to create top-level PCI bus resource managers for each
  PCI domain/segment.  Host-PCI bridge drivers use this API to allocate
  bus numbers from their associated domain.
- Change the PCI bus and CardBus drivers to allocate a bus resource for
  their bus number from the parent PCI bridge device.
- Change the PCI-PCI and PCI-CardBus bridge drivers to allocate the
  full range of bus numbers from secbus to subbus from their parent bridge.
  The drivers also always program their primary bus register.  The bridge
  drivers also support growing their bus range by extending the bus resource
  and updating subbus to match the larger range.
- Add support for managing PCI bus resources to the Host-PCI bridge drivers
  used for amd64 and i386 (acpi_pcib, mptable_pcib, legacy_pcib, and qpi_pcib).
- Define a PCI_RES_BUS resource type for amd64 and i386.

Reviewed by:	imp
MFC after:	1 month
2014-02-12 04:30:37 +00:00
Warner Losh
6efc5b1db6 Remove FreeBSD 6 support 2014-02-08 04:29:36 +00:00
John Baldwin
8044460976 - Use a callout instead of the deprecated timeout_handle.
- Set the console name always so that the bvm console device can be used
  via conscontrol even if it isn't chosen as the default console.
2014-02-07 15:10:24 +00:00
Aleksandr Rybalko
06716ffd17 Implement vd_drawrect and vd_setpixel for vt(9)'s VGA driver.
Sponsored by:	The FreeBSD Foundation
2014-02-07 12:39:58 +00:00
Pyun YongHyeon
f6f20128c7 Revert r234666. Clearing TWSI IRQ seems to cause watchdog timeout
on old Yukon II controllers.

Tested by:	bsam
MFC after:	2 weeks
2014-02-07 05:08:59 +00:00
Scott Long
f7a74e061b Add a new sysctl, dev.cxgbe.N.rsrv_noflow, and a companion tunable,
hw.cxgbe.rsrv_noflow.  When set, queue 0 of the port is reserved for
TX packets without a flowid.  The hash value of packets with a flowid
is bumped up by 1.  The intent is to provide a private queue for
link-level packets like LACP that is unlikely to overflow or suffer
deep queue latency.

Reviewed by:	np
Obtained from:	Netflix
MFC after:	3 days
2014-02-06 18:40:38 +00:00
Aleksandr Rybalko
4d55a4250e Add vt_set_border function to help to change border color.
Use vt_set_border to reset color after font changed (different font size may
change border sizes)

Sponsored by:	The FreeBSD Foundation
2014-02-06 15:16:38 +00:00
Aleksandr Rybalko
9e497e7b04 Add two new vt(9) driver methods: vd_drawrect and vd_setpixel.
Implement vd_drawrect and vd_setpixel for vt_fb driver.

Sponsored by:	The FreeBSD Foundation
2014-02-06 15:12:44 +00:00
Hans Petter Selasky
7a7e829428 Resolve probe conflict for now.
MFC after:	2 weeks
2014-02-06 10:47:47 +00:00
Hans Petter Selasky
99b5dd8fbe Fix kernelbuild when full debugging features are enabled.
Pointyhat:	hselasky @
MFC after:	2 weeks
2014-02-06 10:38:40 +00:00
Hans Petter Selasky
2931122745 Import USB RNDIS driver to FreeBSD from OpenBSD.
Useful for so-called USB tethering.
- Imported code from OpenBSD
- Adapted code to FreeBSD
- Removed some unused functions
- Fixed some buffer encoding and decoding issues
- Optimised data transport path a bit, by sending multiple packets at a time
- Increased receive buffer to 16K

Obtained from:	OpenBSD
Requested by:	eadler @
MFC after:	2 weeks
2014-02-06 08:47:14 +00:00
Navdeep Parhar
e46dcc5670 cxgbe(4): Use the rx channel map (instead of the tx channel map) as the
congestion channel map.

MFC after:	1 week
2014-02-06 03:30:12 +00:00
Navdeep Parhar
7293a15f54 cxgbe(4): The T5 allows for a different freelist starvation threshold
for queues with buffer packing.  Use the correct value to calculate a
freelist's low water mark.

MFC after:	1 week
2014-02-06 03:21:43 +00:00
Mark Johnston
3b8ad66ea9 Add support for MegaRAID Fury cards. The main change needed to boot from a
9341-4i controller was to ensure that scatter/gather lists are ended with
an end-of-list marker. Both the mrsas and Linux megaraid_sas drivers use
this marker with Invader cards as well, so we do the same thing, though
it is apparently not strictly necessary.

Reviewed by:	ambrisko
Tested by:	ambrisko (Invader card)
MFC after:	3 weeks
Sponsored by:	Sandvine Inc.
2014-02-06 02:54:04 +00:00
Navdeep Parhar
454813ff9c cxgbe(4): Use the port's tx channel to identify it to t4_clr_port_stats.
MFC after:	3 days
2014-02-06 02:34:29 +00:00
Marius Strobl
f1a5f291dd - Implement the RX EARLYOFF and RXDV GATED bits as done by RealTek's Linux
driver as version 8.037.00 for RTL8168{E-VL,EP,F,G,GU} and RTL8111B. This
  makes reception of packets work with the RTL8168G (HW rev. 0x4c000000) in
  my Shuttle DS47.
- Consistently use RL_MSI_MESSAGES.
In joint forces with:	yongari

MFC after:	5 days
2014-02-05 23:13:40 +00:00
Marius Strobl
67d363915b Add bus space barriers for page switches missed in r260050. 2014-02-05 22:21:08 +00:00
John Baldwin
0070c94be9 Add two tunables to ignore certain firmware-assigned resources. These
are mostly useful for debugging.
- hw.pci.clear_bars ignores all firmware-assigned ranges for BARs when
  set.
- hw.pci.clear_pcib ignores all firmware-assigned ranges for PCI-PCI
  bridge I/O windows when set.

MFC after:	1 week
2014-02-05 20:52:12 +00:00
John Baldwin
b986a7ec18 Simplify pci_reserve_map() by calling resource_list_reserve() to allocate
the resource after creating a resource list entry rather than reimplementing
it by hand.

MFC after:	1 week
2014-02-05 20:47:49 +00:00
John Baldwin
8d280bcbfc Properly set the alignment flags when allocating the initial range for a
BAR.  This only really matters when pci_do_realloc_bars is enabled and
the initial allocation of a specific range fails.

MFC after:	1 week
2014-02-05 19:24:16 +00:00
John Baldwin
e0c34b5787 Fix a typo. 2014-02-05 19:23:05 +00:00
John Baldwin
e432d5f6a7 Drop the 3rd clause from all 3 clause BSD licenses where I am the sole
holder to convert them to 2 clause BSD licenses.

MFC after:	1 week
2014-02-05 18:13:27 +00:00
Alexander Motin
718724fd0d Fix I/O freezes in some cases, caused by r257916.
Delaying isp_reqodx update, we should be ready to update it every time
we read it.  Otherwise requests using several indexes may be requeued
ndefinitely without ever updating the variable.

MFC after:	3 days
2014-02-05 16:22:02 +00:00
Nathan Whitehorn
65d08437ef Move Open Firmware device root on PowerPC, ARM, and MIPS systems to
a sub-node of nexus (ofwbus) rather than direct attach under nexus. This
fixes FDT on x86 and will make coexistence with ACPI on ARM systems easier.
SPARC is unchanged.

Reviewed by:	imp, ian
2014-02-05 14:44:22 +00:00
Hans Petter Selasky
42cb359e6e Use system macro instead of own hand-rolled one. 2014-02-05 08:29:24 +00:00
Hans Petter Selasky
6b97b1b3fe Add more quirks for making builtin audio speakers work with more
MacBookPro's. Only tested with MacBookPro 9,2.

Obtained from:	Linux
MFC after:	1 week
2014-02-05 08:27:02 +00:00
Kevin Lo
c1033bd401 Correct setting R92C_TXAGC_MCS11_MCS08 register. 2014-02-05 08:09:02 +00:00
Hans Petter Selasky
5fb878a957 Fix a regression issue. Contiguous single segment allocations above
PAGE_SIZE bytes should only use one USB page structure. Fixes a
problem with some external drivers.

MFC after:	2 days
2014-02-05 08:02:52 +00:00
Robert Millan
4139f4a0c1 Abort when firmware isn't present in R600+ models.
More details at:
http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux/debian/patches/bugfix/all/radeon-firmware-is-required-for-drm-and-kms-on-r600-onward.patch?revision=20909&view=co

Reviewed by:	dumbbell
MFC after:	1 week
2014-02-04 21:23:12 +00:00
Ed Schouten
35a3f5a1b9 Use right buffer to print to.
PR:		kern/176597
Submitted by:	Christoph Mallon <christoph mallon gmx de>
MFC after:	2 weeks
2014-02-04 20:52:33 +00:00
Doug Ambrisko
96f9425f06 Add a tunable "hw.mfi.mrsas_enable" to allow mfi(4) to drop priority and
allow mrsas(4) from LSI to attach to newer LSI cards that are support by
mrsas(4).  If mrsas(4) is not loaded into the system at boot then mfi(4)
will always attach.  If a modified mrsas(4) is loaded in the system.  That
modification is return "-30" in it's probe since that is between
BUS_PROBE_DEFAULT and BUS_PROBE_LOW_PRIORITY.

This option is controller by a new probe flag "MFI_FLAGS_MRSAS" in mfi_ident
that denotes cards that should work with mrsas(4).  New entries that should
have this option.

This is the first step to get mrsas(4) checked into FreeBSD and to avoid
collision with people that use mrsas(4) from LSI.  Since mfi(4) takes
priority, then mrsas(4) users need to rebuild GENERIC.  Using the
.disabled="1" method doesn't work since that blocks attaching and the
probe gave it to mfi(4).

Discussed with:		LSI (Kashyap Desai)
2014-02-04 17:35:41 +00:00
Ian Lepore
bcbcc48fbf Sort the list. 2014-02-03 02:56:23 +00:00
Ian Lepore
e347507d5f Add the imx sdhci controller. 2014-02-03 02:52:07 +00:00
Justin Hibbits
c017acc769 Add driver for the ADT7460/ADT7467 fan controller found in later PowerBooks
and iBooks.  Original work by andreast.

MFC after:	1 month
2014-02-03 01:22:50 +00:00
Ian Lepore
add35ed5b8 Follow r261352 by updating all drivers which are children of simplebus
to check the status property in their probe routines.

Simplebus used to only instantiate its children whose status="okay"
but that was improper behavior, fixed in r261352.  Now that it doesn't
check anymore and probes all its children; the children all have to
do the check because really only the children know how to properly
interpret their status property strings.

Right now all existing drivers only understand "okay" versus something-
that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
2014-02-02 19:17:28 +00:00
Ian Lepore
b4122742a6 Be more robust with malformed interrupt config data. Instead of crashing
or going into a near-infinite loop, warn and make potentially-reasonable
assumptions.
2014-02-02 16:56:40 +00:00
Nathan Whitehorn
e4be5a1636 Add a set of helpers (ofw_bus_get_status() and ofw_bus_status_okay()) to
process "status" properties of OF nodes.

I've avoided adding new KOBJ methods here so that we don't have to modify
every ofw_bus in the tree. Since 100% of implementations of ofw_bus use
only ofw_bus_gen_*(), it might be worth garbage-collecting the other
methods as well.
2014-02-02 16:41:54 +00:00
Nathan Whitehorn
f18ac51a90 Fix missing offset. 2014-02-02 05:52:34 +00:00