Commit Graph

22502 Commits

Author SHA1 Message Date
Pyun YongHyeon
caa19d50d1 Add new device id of D-Link DGE-530T Rev. C controller. DGE-503T
Rev A1 and B1 is supported by sk(4) but the DGE-530T Rev. C
controller is re-branded RealTek 8169 controller.

PR:	kern/159116
Approved by:	re (kib)
2011-07-30 01:06:12 +00:00
Adrian Chadd
f9da901e77 Reset the NIC if ANI is enabled or disabled.
Although this may not be what the original sysctl was designed to do,
it feels a bit more "expected".

Before, if ANI is disabled, the initial ANI parameters are still written
to the hardware, even if they're not enabled. "ANI enabled" would then
adjust the noise immunity parameters dynamically. Disabling ANI would
simply leave the existing noise immunity parameters where they are,
and disable the dynamic part.

The problem is that disabling ANI doesn't leave the hardware in
a consistent, predictable state - so asking a user to disable ANI
wouldn't actually reset the NIC to a consistent set of PHY signal
detection parameters, resulting in an unpredictable/unreliable outcome.
This makes it difficult to get reliable debugging information from
the user.

Approved by:	re (kib)
2011-07-29 23:55:17 +00:00
Alexander Motin
7ea00a6866 Make ums(4) driver more picky, not attaching to "mouses" with absolute
coordinates, such as digitizers and touch-screens, leaving these devices
to uhid(4) and user-level. Specially patched xf86-input-mouse driver can
handle them, that isn't done and can't be done properly with ums(4)
because of mouse(4) protocol limitations.

Approved by:	re (kib)
2011-07-29 20:38:06 +00:00
Alexander Motin
2d33cc7688 In some cases, at least on Marvell 88SE912x controllers, Current Command
Slot field of the PxCMD register may point to an empty command slot.
That breaks command timeout detection logic, making impossible to find
what command actually caused timeout, and leading to infinite wait.
Workaround that by checking whether pointed command slot is really used
and can timeout in its time. And if not, fallback to the dumb algorithm
used with FBS -- let all commands to time out and then fail all of them.

Approved by:	re (kib)
MFC after:	1 week
2011-07-29 20:35:23 +00:00
Marius Strobl
ec3e6e77a1 - Send the RELSIM_ADJUST_OPENINGS in response to a MPI_EVENT_QUEUE_FULL using
the right SIM in case the HBA is RAID-capable but the target in question is
  not a hot spare or member of a RAID volume.
- Report the loss and addition of SAS and SATA targets detected via PHY link
  status changes and signalled by MPI_EVENT_SAS_DEVICE_STATUS_CHANGE to cam(4)
  as lost devices and trigger rescans as appropriate. Without this it can take
  quite some time until a lost device actually is no longer tried to be used,
  if it ever stops. [1]
- Handle MPI_EVENT_IR2, MPI_EVENT_LOG_ENTRY_ADDED, MPI_EVENT_SAS_DISCOVERY
  and MPI_EVENT_SAS_PHY_LINK_STATUS silently as these serve no additional
  purpose beyond adding cryptic entries to logs.

Thanks to Hans-Joerg Sirtl for providing one of the HBAs these changes were
developed with and RIP to the mainboard that didn't survive testing them.

PR:		157534 [1]
Approved by:	re (kib)
MFC after:	2 weeks
2011-07-29 18:38:31 +00:00
Marius Strobl
87e255ac52 - Staticize functions as appropriate and comment out unused ones.
- Sprinkle some const where appropriate.
- Consistently use target_id_t for the target parameter of mpt_map_physdisk()
  and mpt_is_raid_volume().
- Fix some whitespace bugs.

Approved by:	re (kib)
2011-07-29 18:35:10 +00:00
Alexander Motin
dd60e051f7 - Use mutex to serialize index/data register pair usage, when
accessing SATA registers. Unserialized access under heavy load caused
wrong speed reporting and potentially could cause device loss.
 - To free memory and other resources (including above), allocated
during chipinit() method call on attach, add new chipdeinit() method,
called during driver detach.

Submitted by:   Andrew Boyer <aboyer@averesystems.com> (initial version)
Approved by:	re (kib)
MFC after:	1 week
2011-07-22 16:37:04 +00:00
Hans Petter Selasky
ff11fd7fa7 Add missing XHCI early takeover code. The XHCI takeover code
is supposed to disable the BIOS from using the XHCI controller
after bootup.

Approved by:	re (kib)
Reported by:	Mike Tancsa
MFC after:	1 week
2011-07-22 15:37:23 +00:00
Adrian Chadd
c5f2a23c79 Implement a basic radar parameter API in the dfs_null module.
Since no actual radar data is ever handled, this won't
do anything. It's mostly here as a reference for those who
wish to experiment with radar detection.

Approved by:	re (kib)
2011-07-22 09:39:49 +00:00
John Baldwin
e9f91b2b2a Allow non-fixed endpoints for a producer address range if the length of
the resource covers the entire range.  Some BIOSes appear to mark
endpoints as non-fixed incorrectly (non-fixed endpoints are supposed to
be used in _PRS when OSPM is allowed to allocate a certain chunk of
address space within a larger range, I don't believe it is supposed to be
used for _CRS).

Approved by:	re (kib)
2011-07-21 20:43:43 +00:00
Adrian Chadd
f51c84eaf6 This links in the ath dfs ioctl into the driver and defines the
ioctl interface for DFS modules to use.

Since there's no open source dfs code yet, this doesn't introduce any
operational changes.

Approved by:	re (kib)
2011-07-21 14:25:12 +00:00
Adrian Chadd
09ac182ca5 Modify the radar API a little to be easier to "change" via run-time
tools.

* introduce pe_enabled, which (will) indicate whether the radar
  detection stuff is enabled or not. Right now it's incorrectly
  set, based on something previously written. I'll sort it out
  later.

* Don't set HAL_PHYERR_PARAM_ENABLE in pe_relstep to say whether
  radar detection is on.

* Return whether blockradar, fir128 and enmaxrssi is enabled.

* Change some of the phyerr params to be integers rather than
  HAL_BOOL so they can be set to the NOPARAM value when the
  setup function is called. This is in line with other radar
  parameters.

* Add new configuration parameters for fir128, blockradar and
  enmaxrssi, rather than defaulting to off, on and on respectively.

Approved by:	re (kib)
2011-07-21 14:16:42 +00:00
Adrian Chadd
64d6d2d3fc Break out the PLL setup into (mostly) per-chip methods, rather than
polluting the AR5416 code with later chipset support.

Note: ar9280InitPLL() supports Merlin (AR9280) and later (AR9285, AR9287.)

Submitted by:	ssgriffonuser@gmail.com
Approved by:	re (kib)
2011-07-21 08:35:10 +00:00
Adrian Chadd
e8e6035991 This re-enables HT40 channels for use when DFS is enabled.
These should be disabled for the AR5416 in hostap/mesh/ibss mode,
as the AR5416 doesn't have support for radar detection on the
ext channel of a HT40 setup. Later chips do.

Approved by:	re (kib)
2011-07-21 08:31:55 +00:00
Hans Petter Selasky
14bd1ee52c Add new USB ID to u3g driver.
Approved by:	re (kib)
Submitted by:	Nick Hibma
MFC after:	3 days
2011-07-21 06:55:43 +00:00
Adrian Chadd
e2e849485f These two are ath_hal regulatory domain updates from the Atheros
reference driver.

* Australia should use FCC3_WORLD
* Add some new SKUs; these are just the EEPROM values and haven't been
  fully defined yet. As such they won't affect anything.

Obtained from:	Atheros
Approved by:	re (kib)
2011-07-20 12:46:58 +00:00
Hans Petter Selasky
25abfdf02f Only the USB root HUB thread is allowed to attach and detach drivers
to and from USB devices. Remove related DEVMETHOD() lines from USB
drivers.

Reported by:	YongHyeon PYUN
MFC after:	3 days
2011-07-18 12:03:58 +00:00
Pyun YongHyeon
23b179f5d3 Revert r222135 by allowing controller reinitialization. Due to
unknown reason Apple UniNorth2 gem(4) device required manual
interface down/up operation after r222135.  Even though this is not
correct thing and I don't like to revert it but it would be better
than breaking gem(4) on PPC.  This should be revisited.

PR:	kern/157405
2011-07-17 21:54:51 +00:00
John Baldwin
30ee9e615d Don't ignore negatively decoded address ranges.
Reported by:	scottl
2011-07-17 12:42:51 +00:00
Ed Schouten
78d4d8eeb2 Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.
Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctls
to support wide characters. I created a patch to add ABI compatibility
for the old calls, but I didn't get any feedback to that.

It seems now people are upgrading from 8 to 9 they experience this
issue, so add it anyway.
2011-07-17 08:19:19 +00:00
Hans Petter Selasky
f6bd103ef0 Fix for VirtualBox 4.x and other virtual machines that fail
to generate a port reset change event.

MFC after:	1 weeks
2011-07-16 12:50:30 +00:00
John Baldwin
34ff71eecd Respect the BIOS/firmware's notion of acceptable address ranges for PCI
resource allocation on x86 platforms:
- Add a new helper API that Host-PCI bridge drivers can use to restrict
  resource allocation requests to a set of address ranges for different
  resource types.
- For the ACPI Host-PCI bridge driver, use Producer address range resources
  in _CRS to enumerate valid address ranges for a given Host-PCI bridge.
  This can be disabled by including "hostres" in the debug.acpi.disabled
  tunable.
- For the MPTable Host-PCI bridge driver, use entries in the extended
  MPTable to determine the valid address ranges for a given Host-PCI
  bridge.  This required adding code to parse extended table entries.

Similar to the new PCI-PCI bridge driver, these changes are only enabled
if the NEW_PCIB kernel option is enabled (which is enabled by default on
amd64 and i386).

Approved by:	re (kib)
2011-07-15 21:08:58 +00:00
Ed Maste
cb0f0a028f Improve portability #defines for compiling aicasm on other systems.
Submitted by:	Robert Millan  rmh debian.org
Obtained from:	Debian GNU/kFreeBSD
2011-07-15 00:36:47 +00:00
Adrian Chadd
1292e2e98a Add a missing check for the global ath_hal_debug.
This was removed accidentally when the per HAL instance
code was added, and not reverted when I added back the
global debug variable (for early chip setup debugging.)
2011-07-14 23:30:30 +00:00
John Baldwin
5dbee633d2 Support controllers whose option ROM is disabled in the BIOS by kicking
the firmware so that it boots.

PR:		kern/154978
Submitted by:	Andrew Boyer  aboyer of averesystems com
Obtained from:	LSI
MFC after:	1 week
2011-07-14 20:20:33 +00:00
John Baldwin
c2e3261ad6 Use MFI_STAT_* constants for cmd_status field values rather than magic
numbers in a few places.

PR:		bin/145960
Submitted by:	gcooper
MFC after:	1 week
2011-07-14 20:11:27 +00:00
Hans Petter Selasky
e0b17a622d Restore USB MIDI transmit buffer size to 1Kbyte.
MFC after:	1 week
2011-07-14 17:43:18 +00:00
Pyun YongHyeon
14ae1fa4cf Add initial support for AX88772B USB Fast Ethernet. AX88772B
supports IPv4/IPv6 checksum offloading and VLAN tag insertion/
stripping as well as WOL.  Because uether does not provide a way
to announce driver specific offload capabilities to upper stack,
checksum offloading support needs more work and will be done in
future.
Special thanks to ASIX for donating sample hardware.

H/W donated by:	ASIX Electronics
Reviewed by:	hselasky
2011-07-14 17:19:00 +00:00
Hans Petter Selasky
2b6ce80c82 Fix for dump after shutdown with USB keyboard plugged in. It appears that the
system timer is stopped during shutdown and that the pause() statement in ukbd
causes infinite hang in this regard. The fix is to use mi_switch() instead of
pause() to do the required task switch to ensure that the required USB processes
get executed.

Reported by:	Mike_Karels@mcafee.com
MFC after:	1 week
2011-07-13 21:07:50 +00:00
Marius Strobl
fcdbb666c0 - Expand the scope of the lock in the interrupt routine to close races with
checking IFF_DRV_RUNNING and simplify the code. This also involves holding
  the driver lock in the rx_ch callout.
- Just use ifp instead of sc->sc_ifp.

Submitted by:	jhb (mostly)
2011-07-13 18:52:11 +00:00
Marius Strobl
caa59dc8b8 - For SAS but neither FC nor SPI controllers default to using MSI (still
allowing their use to be disabled via device hints though). This matches
  what the corresponding Linux driver provided by LSI does. Tested with
  SAS1064.
- There's no need to keep track of the RIDs used.
- Don't allocate MSI/MSI-X as RF_SHAREABLE.
- Remove a comment which no longer applies since r209599.
- Assign NULL rather than 0 to pointers.

MFC after:	1 month
2011-07-13 18:48:51 +00:00
Marius Strobl
eb06e7719b PCIB_ALLOC_MSIX() may already fail on the first pass, f.e. when the PCI-PCI
bridge is blacklisted. In that case just return from pci_alloc_msix_method(),
otherwise we continue without a single MSI-X resource, causing subsequent
attempts to use the seemingly available resource to fail or when booting
verbose a NULL-pointer dereference of rle->start when trying to print the
IRQ in pci_alloc_msix_method().

Reviewed by:	jhb
MFC after:	1 week
2011-07-13 18:35:47 +00:00
Marius Strobl
82b263787e Remove extra empty lines. 2011-07-13 14:10:28 +00:00
Andrew Gallatin
40eaac6360 Update mxge(4) firmware to the latest version available from
Myricom (1.4.53a).

MFC after:	7 days
Sponored by: Myricom, Inc.
2011-07-12 15:07:17 +00:00
Andrew Gallatin
30882b10fc Fix media reporting for dual port CX4 myri10ge NICs
MFC after: 7 days
Sponsored by: Myricom, Inc.
2011-07-12 14:43:49 +00:00
John Baldwin
a27d4bdc9f Properly align the end of a candidate back region based on the window's
granularity when growing a PCI-PCI window up.

Tested by:	dougb
MFC after:	3 days
2011-07-12 13:28:39 +00:00
Marius Strobl
5f8a9ae4a9 Partially merge r223648, r223648 and r223949 from gem(4):
- 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.
2011-07-12 13:22:17 +00:00
Marius Strobl
5ed0b95417 Correct r223648; as gem_init_locked() was calling gem_setladrf(), which
sets GEM_MAC_RX_CONFIG based on sc_mac_rxcfg which in turn is initialized
to zero, before reading the supposedly default configuration we were
effectively not basing sc_mac_rxcfg and thus GEM_MAC_RX_CONFIG on the
default configuration. Solve this by calling gem_setladrf() after reading
in the default configuration of GEM_MAC_RX_CONFIG. This also avoids the
need to distinguish whether gem_setladrf() should enable the RX MAC again
and should be slightly more correct as we're now doing all of the RX MAC
configuration in the intended step.
2011-07-12 13:06:44 +00:00
Marius Strobl
9f9cc2edd8 According to the OpenSolaris source the PCI latency and the cache line size
should be set for Sun ERI.
Tested by:	yongari
2011-07-12 08:20:15 +00:00
Aleksandr Rybalko
bdb2e91b7c Fix typo, lost 0 in SYSCTL_ADD_INT usage. 2011-07-11 08:42:09 +00:00
Aleksandr Rybalko
a4e33603b2 Support of Ralink Ethernet MAC, used in RT3050F/RT3052F and I belive in other Ralink SoCs.
Approved by: adrian (mentor)
2011-07-11 08:23:59 +00:00
Andrey V. Elsukov
657bd8b132 Include sys/sbuf.h directly. 2011-07-11 05:19:28 +00:00
Hans Petter Selasky
5863e1bc8c Remove reviewed line from copyright header.
Suggested by:	joel @
2011-07-09 20:16:52 +00:00
Konstantin Belousov
141c08f9c0 Implement pci_find_class(9), the function to find a pci device by its class.
Sponsored by:	The FreeBSD Foundation
Reviewed by:	jhb
MFC after:	1 week
2011-07-09 14:30:13 +00:00
John Baldwin
2f8c04ad8f Add device ID for the Davicom 56PDV PCI Modem.
PR:		kern/75132
Submitted by:	Mike Tancsa @ Sentex (older patch against puc(4))
MFC after:	1 week
2011-07-08 17:45:38 +00:00
Hans Petter Selasky
49901133a1 Add new USB 3G driver.
Submitted by:	PseudoCylon <moonlightakkiy@yahoo.ca>
MFC after:	14 days
2011-07-08 10:58:56 +00:00
Jack F Vogel
980729b244 A fix to make the LINT-NOINET build happy, if this
works out the ixgbe driver should be changed as well.
2011-07-07 00:46:50 +00:00
Attilio Rao
470107b2f1 MFC 2011-07-04 11:13:00 +00:00
Hans Petter Selasky
e92091ad3d Make the USB keyboard driver more HID compliant.
Try to auto-detect keyboards which should use the BOOT protocol.

MFC after:	2 weeks
2011-07-04 07:37:28 +00:00
Bjoern A. Zeeb
a34c6aeb85 Tag mbufs of all incoming frames or packets with the interface's FIB
setting (either default or if supported as set by SIOCSIFFIB, e.g.
from ifconfig).

Submitted by:	Alexander V. Chernikov (melifaro ipfw.ru)
Reviewed by:	julian
MFC after:	2 weeks
2011-07-03 16:08:38 +00:00