Commit Graph

28965 Commits

Author SHA1 Message Date
Kevin Lo
9e2a7dccfe - Add a new urtwn(4) device
- Remove duplicate REALTEK RTL8188CU_0 entry.
2015-04-28 03:24:27 +00:00
Gleb Smirnoff
a5e0fa4063 Don't use ifm_data. It was used only for self checking debug.
Reviewed by:	np
2015-04-26 21:31:30 +00:00
Hans Petter Selasky
d3f37016f7 Allow DSP basename cloning to be disabled or enabled at boot and
runtime. This is useful when implementing OSS sound stacks in
userspace via libcuse for example.

MFC after:	2 weeks
2015-04-26 11:39:13 +00:00
Luiz Otavio O Souza
0261c55538 Make the pcf8563 RTC work on FDT systems and on interrupt based i2c
controllers.

Call iicbus_transfer() from the device context and not from the iicbus
context.

I am committing a slightly different patch, so if something break, it is
probably my fault.

PR:		199496
Submitted by:	Juraj Lutter <otis@sk.FreeBSD.org>
2015-04-25 21:43:29 +00:00
Michael Gmelin
202379af84 Expand SMBUS API to add smbus_trans() function.
Differential Revision:	https://reviews.freebsd.org/D1955
Reviewed by:	adrian, jhb, wblock
Approved by:	adrian, jhb
2015-04-25 16:15:01 +00:00
Ed Maste
382abd8c81 vt(4): Simplify mouse area detection
vt_is_cursor_in_area needs to return true if any part of the mouse
cursor is visible in the rectangle area. Replace the existing test with
a simpler version of a test for overlapping rectangles.

Differential Revision:	https://reviews.freebsd.org/D2356
Reviewed by:	ray
Sponsored by:	The FreeBSD Foundation
2015-04-24 17:36:26 +00:00
John Baldwin
9662eef57a Watchdog drivers need to support rearming the watchdog in contexts which
are not permitted to sleep.  Only use the IPMI watchdog with backends
which poll driver-initiated requests to meet this requirement.

In practice this means that watchdogs will no longer be used on systems
that use the SSIF backend.

Differential Revision:	https://reviews.freebsd.org/D2062
MFC after:	2 weeks
2015-04-24 16:56:23 +00:00
Takanori Watanabe
7a4864d1bb Add Lynx-Point LP smbus controller ID. 2015-04-24 07:24:31 +00:00
Kevin Lo
0339d2cfcc - Fix the length of efuse content.
- Replace the magic numbers with something more readable.
2015-04-24 04:57:18 +00:00
Ed Maste
2a4b3913bb Revert r281889, it broke keyboard input 2015-04-23 20:26:22 +00:00
Pedro F. Giffuni
77990dfda9 Plug memory leaks in kbdmux(4)
Al kudos here for the Clang static analyzer which, unlike Coverity,
failed to flag a false positive.

Found by:	clang static analyzer
CID:		1007072
CID:		1007073
CID:		1007074

MFC after:	1 week
2015-04-23 14:53:45 +00:00
John Baldwin
179fa75e6e Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.

Approved by:	Hudson River Trading LLC (who owns ACT LLC)
MFC after:	1 week
2015-04-23 14:22:20 +00:00
Hans Petter Selasky
4e36e4528c Disable multi process interrupts, because the current code doesn't use
them. Else we can end up in an infinite interrupt loop in USB device
mode.

MFC after:	3 days
2015-04-23 07:41:58 +00:00
Pyun YongHyeon
0d3c2a9a16 Add another variant of BCM5708S controller to IBM HS21 workaround
list.

PR:		118238
MFC after:	2 weeks
2015-04-23 01:39:28 +00:00
John Baldwin
ad6f36f845 Update the pci_cfg_save/restore routines to operate on bridge devices
(type 1 and type 2) as well as leaf devices (type 0).  In particular,
this allows the existing PCI bus logic to save and restore capability
registers such as MSI and PCI-express work for bridge devices rather than
requiring that code to be duplicated in bridge drivers.  It also means
that bridge drivers no longer need to save and restore basic registers
such as the PCI command register or BARs nor manage powerstates for the
bridge device.

While here, pci_setup_secbus() has been changed to initialize the 'sec'
and 'sub' fields in the 'secbus' structure instead of requiring the pcib
and pccbb drivers to do this in the NEW_PCIB + PCI_RES_BUS case.

Differential Revision:	https://reviews.freebsd.org/D2240
Reviewed by:	imp, jmg
MFC after:	2 weeks
2015-04-22 22:02:27 +00:00
John Baldwin
7212fc6a34 Don't explicitly manage power states for PCI-PCI bridge devices in the
driver's suspend and resume routines.  These have been redundant no-ops
since r214065 changed the PCI bus driver to manage power states for
all devices (including type 1/2 bridge devices) during suspend and resume.
2015-04-22 21:56:44 +00:00
John Baldwin
2ae5fd151f Fix some incorrect #if conditions around older workarounds for bus
numbering goofs.

MFC after:	1 week
2015-04-22 21:47:51 +00:00
John Baldwin
65c7c1b424 The minimim grant and maximum latency PCI config registers are only valid
for type 0 devices, not type 1 or 2 bridges.  Don't read them for bridge
devices during bus scans and return an error when attempting to read them
as ivars for bridge devices.
2015-04-22 21:41:59 +00:00
John Baldwin
f2d55827ea Cosmetic change: use PCIR_SECLAT_2 rather than PCIR_SECLAT_1. 2015-04-22 21:38:21 +00:00
Craig Rodrigues
d9db52256e Move zlib.c from net to libkern.
It is not network-specific code and would
be better as part of libkern instead.
Move zlib.h and zutil.h from net/ to sys/
Update includes to use sys/zlib.h and sys/zutil.h instead of net/

Submitted by:		Steve Kiernan stevek@juniper.net
Obtained from:		Juniper Networks, Inc.
GitHub Pull Request:	https://github.com/freebsd/freebsd/pull/28
Relnotes:		yes
2015-04-22 14:38:58 +00:00
Hiren Panchasara
270538b2b6 For igb(4), when we are doing multiqueue, we are all setup to have full 32bit
RSS hash from the card. We do not need to hide that under "ifdef RSS" and should
expose that by default so others like lagg(4) can use that and avoid hashing the
traffic by themselves.
While here, improve comments and get rid of hidden/unimplemented RSS support
code for UDP.

Differential Revision:	https://reviews.freebsd.org/D2296
Reviewed by:	jfv, erj
Discussed with:	adrian
Sponsored by:	Limelight Networks
2015-04-21 20:24:15 +00:00
Jason A. Harmening
0afebee290 Fix numerous issues in iic(4) and iicbus(4):
--Allow multiple open iic fds by storing addressing state in cdevpriv
--Fix, as much as possible, the baked-in race conditions in the iic
ioctl interface by requesting bus ownership on I2CSTART, releasing it on
I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv
to use the I/O ioctls
--Reduce internal iic buffer size and remove 1K read/write limit by
iteratively calling iicbus_read/iicbus_write
--Eliminate dynamic allocation in I2CWRITE/I2CREAD
--Move handling of I2CRDWR to separate function and improve error handling
--Add new I2CSADDR ioctl to store address in current cdevpriv so that
I2CSTART is not needed for read(2)/write(2) to work
--Redesign iicbus_request_bus() and iicbus_release_bus():
    --iicbus_request_bus() no longer falls through if the bus is already
owned by the requesting device.  Multiple threads on the same device may
want exclusive access.  Also, iicbus_release_bus() was never
device-recursive anyway.
    --Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but
the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be
issued again
    --Do not hold iicbus mtx during IICBUS_CALLBACK call.  There are
several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed.
    --Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns
EWOULDBLOCK; instead pass that to the caller so that it can retry if so
desired.

Differential Revision:	https://reviews.freebsd.org/D2140
Reviewed by:	imp, jhb, loos
Approved by:	kib (mentor)
2015-04-21 11:50:31 +00:00
Gleb Smirnoff
27e1f92dbf Instead of storing mii_media_table array index in ifm_data, determine
it in mii_phy_setmedia() functionally.

Sponsored by:	Nginx, Inc.
2015-04-21 09:39:48 +00:00
Gleb Smirnoff
ac55afa3ca The comment on BMCR data in if_media entry is wrong. The ifm_data stores
the index array, not a value for BMCR register. In case of IFM_10_T there
could be either MII_MEDIA_10_T or MII_MEDIA_10_T_FDX, which are 1 and 2,
accordingly. Neither matches a valid BMCR value. My guessing is that this
write is harmless, since later mii_phy_setmedia() would write a proper
value there.

The code is here since the initial checkin. Note that case IFM_100_TX has
the same comment, but a proper value of BMCR_ISO is written. So, collapse
two cases into one, always writing there BMCR_ISO.

Sponsored by:	Nginx, Inc.
2015-04-21 08:54:14 +00:00
Gleb Smirnoff
2eba9bbe06 Since xmphy doesn't call mii_phy_setmedia(), there is no reason to set ifm_data.
Sponsored by:	Nginx, Inc.
2015-04-21 06:59:40 +00:00
Gleb Smirnoff
4a473e462c Since brgphy doesn't call mii_phy_setmedia(), there is no reason to
set any value to ifm_data.  If brgphy ever to call mii_phy_setmedia(),
then the value of BRGPHY_S1000 | BRGPHY_BMCR_FDX will trigger KASSERT.

While here, remove the obfuscating macro and wrap long lines.

Sponsored by:	Nginx, Inc.
2015-04-21 06:46:11 +00:00
Hans Petter Selasky
30b44000d9 Don't print uninitialized variables.
CID:	1295242
2015-04-21 06:11:47 +00:00
Marcelo Araujo
d8edb414c9 Remove unused variable.
Differential Revision:	D2333
Reviewed by:		royger
2015-04-20 17:30:13 +00:00
Marcelo Araujo
32e85f856a Add back ixgbe_rxeof, just remove the assignment to more. 2015-04-20 17:24:39 +00:00
Marcelo Araujo
201df06bb2 Remove unused variable.
Differential Revision:	D2331
Reviewed by:		erj
2015-04-20 17:21:15 +00:00
Adrian Chadd
5d18c60a93 Refactor out the _PXM -> VM domain lookup done in ACPI, in preparation for
its use in upcoming code.

This is inspired by something in jhb's NUMA IRQ allocation patchset.

However, the tricky bit here is that the PXM lookup for a node may
fail, requiring a lookup on the parent node.  So if it doesn't
exist, don't fail - just go up to the parent.  Only error out of the
lookup is the ACPI lookup returns an error.

Sponsored by:	Norse Corp, Inc.
2015-04-19 17:15:55 +00:00
Kevin Lo
8aa853d5c1 Add new USB ID.
PR:	199522
2015-04-19 15:53:58 +00:00
Justin Hibbits
a745246822 Implement hwpmc(4) for Freescale e500 core.
This supports e500v1, e500v2, and e500mc. Tested only on e500v2, but the
performance counters are identical across all, with e500mc having some
additional events.

Relnotes:	Yes
2015-04-18 21:39:17 +00:00
Rui Paulo
1321d68db0 Synaptics: don't report the middle button when clickPad is used.
On trackpads that had support for both, we were sending two button
events when the trackpad was pressed.

Tested by:	Jakob Alvermark <jakob at alvermark.net>
MFC after:	1 week
2015-04-18 20:55:55 +00:00
Alexander Motin
18c5ed7145 Do not report stripe size if it is equal to sector size.
MFC after:	1 week
2015-04-18 19:37:37 +00:00
Rui Paulo
52f243678d Fix French typos in etherswitch. 2015-04-18 07:34:39 +00:00
Gleb Smirnoff
28ebe80cab Provide functions to determine presence of a given address
configured on a given interface.

Discussed with:	np
Sponsored by:	Nginx, Inc.
2015-04-17 11:57:06 +00:00
Hans Petter Selasky
55e11a037a Buffers which can be memory mapped into userspace should never be
freed. Recycle the buffers instead. This patch also fixes a panic at
reboot issue when an UDL adapter is attached to the system.
2015-04-17 07:07:06 +00:00
Kevin Lo
c3358f4ed2 Enable LDO to 2.5V before efuse r/w action in order to prevent
incorrect mac address read from efuse.

Reported by:	swills
Tested by:	rpaulo and myself on RPi
2015-04-16 07:40:01 +00:00
Rui Paulo
420827da5b snd_hda: add support for the Lenovo X1 20BS model.
This requires a patch to redirect the output to a separate DAC when
the headphones are used.  While there, add device strings for Intel
Broadwell HDA controllers and Realtek ALC292 codecs.

MFC after:	1 week
2015-04-15 05:24:39 +00:00
Ed Maste
a04eaf906b Increase vt font limits to allow use of GNU Unifont
PR:		199438
Submitted by:	Ting-Wei Lan <lantw44@gmail.com>
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-04-14 19:18:34 +00:00
Neel Natu
9b0e3c5a47 Modify the return value of the uhci/ehci/xhci PCI probe routines to
'BUS_PROBE_DEFAULT'. This allows bhyve's 'ppt' driver to claim ownership
of the device and pass it through to the guest.

In the common case where there are no competing drivers for USB controllers
this change is a no-op.

Reviewed by:	hselasky
MFC after:	2 weeks
2015-04-13 19:13:51 +00:00
Andrew Turner
7d9cff3d23 Add psci for arm64. This is currently used when rebooting and powering off
in qemu.

Sponsored by:	The FreeBSD Foundation
2015-04-13 16:41:33 +00:00
Andrew Turner
e5acd89c78 Bring in the start of the arm64 kernel.
This is only the minimum set of files needed to boot in qemu. As such it is
missing a few things.

The bus_dma code is currently only stub functions with a full implementation
from the development tree to follow.

The gic driver has been copied as the interrupt framework is different. It
is expected the two drivers will be merged by the arm intrng project,
however this will need to be imported into the tree and support for arm64
would need to be added.

This includes code developed by myself, SemiHalf, Ed Maste, and Robin
Randhawa from ARM. This has been funded by the FreeBSD Foundation, with
early development by myself in my spare time with assistance from Robin.

Differential Revision:	https://reviews.freebsd.org/D2199
Reviewed by:	emaste, imp
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-04-13 14:43:10 +00:00
Andrew Turner
46b1fe9224 Add a driver for the ARM Power State Coordination Interface (PSCI). This
handles versions 0.1 and 0.2 of the standard on 32-bit ARM.

With this driver we can shutdown in QEMU. Further work is needed to
turn secondary cores on on boot and to support later revisions of the
specification.

Submitted by:	Robin Randhawa <Robin.Randhawa at ARM.com>
Sponsored by:	The FreeBSD Foundation
2015-04-12 13:00:58 +00:00
Konstantin Belousov
4f1c158445 Define capabilities bits from the revision 007 of the document 302223
"Intelб╝ Processor Vendor-Specific ACPI Interface Specification",
issied Dec 2014.  Previous revision 005 was from Sep 2006.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-04-12 10:28:15 +00:00
Rui Paulo
e6ef49ea68 Add support for controlling the trackpoint when Synaptics is enabled.
To accomplish this, we must put the Synaptics hardware in passthrough
mode when talking to the trackpoint.

I only performed minor style modifications.

Submitted by:	Jan Kokemüller <jan.kokemueller at gmail.com>
MFC after:	1 week
2015-04-11 18:45:22 +00:00
Rui Paulo
e197118083 Improve Synaptics support for newer touchpads.
Enable two finger scrolling by default and disable the edge scrolling if
the touchpad has no physical zone for it.  Disable directional scrolling
by default to avoid using extended buttons as scroll buttons.

Add support for ClickPad.  On Lenovo laptops, this is the button
reported when one presses the touchpad.

While there, fix a problem where the extended buttons were not reporting
the button release event correctly: we need to save the state of the
buttons and report it to sysmouse until we receive a packet from the
touchpad indicating the button has been released.  This makes it
possible to use an extended button to resize a window.  On Lenovo
laptops, the major buttons are actually reported as extended buttons.

Tested by:	many (current@)
MFC after:	1 week
2015-04-11 18:44:07 +00:00
Andrew Turner
405ada37fb Add support for the uart classes to set their default register shift value.
This is needed with the pl011 driver. Before this change it would default
to a shift of 0, however the hardware places the registers at 4-byte
addresses meaning the value should be 2.

This patch fixes this for the pl011 when configured using the fdt. The
other drivers have a default value of 0 to keep this a no-op.

MFC after:	1 week
2015-04-11 17:16:23 +00:00
Mateusz Guzik
90f54cbfeb fd: remove filedesc argument from fdclose
Just accept a thread instead. This makes it consistent with fdalloc.

No functional changes.
2015-04-11 15:40:28 +00:00