Commit Graph

29027 Commits

Author SHA1 Message Date
Kashyap D Desai
dbcc81dfdc Corrected indentation on conflicted source files.
Reviewed by:	ambrisko
MFC after:	2 weeks
Sponsored by:	AVAGO Technologies
2015-05-06 10:46:28 +00:00
Kashyap D Desai
1bebd87179 Configured the mrsas(4) driver to support UNMAPPED I/O and updated driver version.
Reviewed by:	ambrisko
MFC after:	2 weeks
Sponsored by:	AVAGO Technologies
2015-05-06 10:45:56 +00:00
Kashyap D Desai
ecea5be464 1. All LSI namings are converted to AVAGO Tech.
2. Fix in AEN path(suggested by John Baldwin).
3. Fix IOCTL path w.r.t Sense key handling

Reviewed by:	ambrisko
MFC after:	2 weeks
Sponsored by:	AVAGO Technologies
2015-05-06 10:45:13 +00:00
Kashyap D Desai
2f863eb8d8 Bug fixes found internally as detailed below:
1. While disabling interrupt the FW disables interrupts for only 16 vectors.
In case of Invader which supports 96 MSI-x vectors, some spurious interrupts
may come on other vectors even after interrupt disable. So, driver uses a flag
and ignores the spurious interrupts.
2. Reply queue depth is made double the number of commands supported by FW.
3. Misplaced interrupt enable code is now moved down in the OCR path.
4. Updated error handling code in OCR path.
5. Removed un-necessary print.

Reviewed by:	ambrisko
MFC after:	2 weeks
Sponsored by:	AVAGO Technologies
2015-05-06 10:44:08 +00:00
Kashyap D Desai
daeed97380 Driver calls mrsas_complete_cmd() to call mrsas_wakeup() for each MFI frame that was
issued through the ioctl() interface prior to the kill adapter. This ensures
userspace ioctl() system calls issued just before a kill adapter don't get stuck in
wait state and IOCTLs are returned to application.

Reviewed by:	ambrisko
MFC after:	2 weeks
Sponsored by:	AVAGO Technologies
2015-05-06 10:43:19 +00:00
Kashyap D Desai
af51c29f66 In OCR(Online Controller Reset) path, driver sets adapter state to
MEGASAS_HBA_OPERATIONAL before getting new RAID map.
There will be a small window where IO will come from OS with old RAID map.
This patch will update adapter state to MEGASAS_HBA_OPERATIONAL,
only after driver has new RAID map to avoid any IOs getting build using old RAID map.

Reviewed by:	ambrisko
MFC after:	2 weeks
Sponsored by:	AVAGO Technologies
2015-05-06 10:42:44 +00:00
Kashyap D Desai
16dc2814ee Current driver does fast path read load balancing between arm and mirror disk
for two Drive Raid-1 configuration only.

Now, Driver support fast path read load balancing for all (any number of disk) Raid-1 configuration.

Reviewed by:	ambrisko
MFC after:	2 weeks
Sponsored by:	AVAGO Technologies
2015-05-06 10:41:27 +00:00
Kashyap D Desai
77cf7df804 Now Driver expose Secure Jbod Support via driver_operations in MFI INIT Frame.
FW expose Secure Jbod support via Controller properity.

Firmware expect IOs to be received from different IO path than
conventional fast path queue, in case of SED drives.

To have Secure jbod support user need driver and firmware support.

Reviewed by:    ambrisko
MFC after:  2 weeks
Sponsored by:   AVAGO Technologies
2015-05-06 10:36:53 +00:00
Kashyap D Desai
5844115e3a This patch adds the feature to provide PCI information via IOCTL query.
Reviewed by:	ambrisko
MFC after:	2 weeks
Sponsored by:	AVAGO Technologies
2015-05-06 10:32:27 +00:00
Hans Petter Selasky
0de2373fa2 Add new USB ID.
PR:		199843
MFC after:	1 week
2015-05-05 19:34:23 +00:00
Andrew Turner
2c0d026b52 Move the point we attach the ofw driver on arm64 to nexus.c. This will
allow us to have a single place to decide to use ofw or acpi.
2015-05-05 11:13:16 +00:00
Renato Botelho
8854b88e66 Add support for Sierra MC7354 card
Author:		Jeremy Porter <jporter@netgate.com>
Differential Revision:	https://reviews.freebsd.org/D2444
Reviewed by:	gnn, hselasky
MFC after:	1 week
Sponsored by:	Netgate
2015-05-05 10:19:43 +00:00
Warner Losh
531258ace4 Add some data found in TI's application note "SCPA035: PCI1510
Implementation Guide" about default values.
2015-05-05 04:23:55 +00:00
Warner Losh
55d793dc6e When dealing with the TI12XX family of parts, we sometimes need to
initialize the MFUNC registers. Our old test of assuming that if this
register is set at all is not quite right. Many scenarios (including
the power-on defaults for chips w/o EEPROMs) land us in trouble. The
MFUNC0 pin should be set to signal #INTA and the MFUNC1 pin should be
set to signal #INTB of multi-socketed devices. Since my memory recalls
issues with blindly clearing the upper bytes of this register, perform
the heuristic only when both MFUNC0 and 1 are clear. We won't work
well using these pins for GPIO, and the serial interrupts won't save
us because we go out of our way to generally disable them. They are
needed to support legacy drivers for 16-bit PC Cards that are
hard-wired to specific IRQ values. Since FreeBSD never had any of
these, we configure the more reliable direct signaling. This was just
one small piece of that which had been left out back in the day.
2015-05-05 04:13:48 +00:00
Justin Hibbits
98be38e7fb Implement a driver for the PowerPC-base RouterBoard (RB333/600/800/1100)
Summary:
This has been tested on the RB800, but should work on the RB333, RB600, and
RB1100 as well.

It's currently missing ECC support, but read and write are complete.

Reviewers: imp

Reviewed By: imp

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D2223
2015-05-04 20:36:00 +00:00
Ian Lepore
28315e27a7 Implement a mechanism for making changes in the kernel<->driver PPS
interface without breaking ABI or API compatibility with existing drivers.

The existing data structures used to communicate between the kernel and
driver portions of PPS processing contain no spare/padding fields and no
flags field or other straightforward mechanism for communicating changes
in the structures or behaviors of the code.  This makes it difficult to
MFC new features added to the PPS facility.  ABI compatibility is
important; out-of-tree drivers in module form are known to exist.  (Note
that the existing api_version field in the pps_params structure must
contain the value mandated by RFC 2783 and any RFCs that come along after.)

These changes introduce a pair of abi-version fields which are filled in
by the driver and the kernel respectively to indicate the interface
version.  The driver sets its version field before calling the new
pps_init_abi() function.  That lets the kernel know how much of the
pps_state structure is understood by the driver and it can avoid using
newer fields at the end of the structure that it knows about if the driver
is a lower version.  The kernel fills in its version field during the init
call, letting the driver know what features and data the kernel supports.

To implement the new version information in a way that is backwards
compatible with code from before these changes, the high bit of the
lightly-used 'kcmode' field is repurposed as a flag bit that indicates the
driver is aware of the abi versioning scheme.  Basically if this bit is
clear that indicates a "version 0" driver and if it is set the driver_abi
field indicates the version.

These changes also move the recently-added 'mtx' field of pps_state from
the middle to the end of the structure, and make the kernel code that uses
this field conditional on the driver being abi version 1 or higher.  It
changes the only driver currently supplying the mtx field, usb_serial, to
use pps_init_abi().

Reviewed by:	hselasky@
2015-05-04 17:59:39 +00:00
Adrian Chadd
3077c104f5 [iwn] Do not filter control frames in monitor mode.
PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:40:12 +00:00
Adrian Chadd
a20c9aff42 Handle properly IBSS merges (works with patch from bug 199632).
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:39:44 +00:00
Adrian Chadd
5cacb17fa2 Fix various powersave races + optimize tx/rx pointer update when powersave is off.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:39:02 +00:00
Adrian Chadd
9b7cc717ed [iwn?] Use correct sequence numbers with non-QoS STAs.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:38:32 +00:00
Adrian Chadd
e43b274af6 Fix warning about comparison of integers of different signs.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:37:13 +00:00
Adrian Chadd
978d805f34 [iwn?] Fix memory leak in wpi_reset_tx_ring().
PR:		kern/197143
Differential Revision:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:36:25 +00:00
Adrian Chadd
12e0ff3b76 Use nitems() for counting elements in arrays.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:35:44 +00:00
Adrian Chadd
cbaa708073 Do not include WPI_START_SCAN event processing into non-debug builds.
PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:35:11 +00:00
Adrian Chadd
c39df5f423 Fix sequence number generation for beacon frames.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:34:24 +00:00
Adrian Chadd
6ddc7d4d45 Add debug output for WPI_BEACON_SENT event.
PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:30:04 +00:00
Adrian Chadd
6f5066748d Try to fix passive scanning hang on beacon miss.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:28:54 +00:00
Adrian Chadd
89023da2eb Add comment about AUTH -> AUTH state transition + fix some style issues.
PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:27:36 +00:00
Adrian Chadd
cf990903c7 Display more information for beacon miss debugging.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:25:33 +00:00
Adrian Chadd
5c0159195d Limit minimum threshold of missed beacons.
PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:24:20 +00:00
Adrian Chadd
b4324a50bd Improve beacon miss detection.
PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:21:16 +00:00
Adrian Chadd
3e54d9fdc0 Create another debug category for WPI_BEACON_MISSED notification.
Differential Revision:	kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:18:28 +00:00
Adrian Chadd
a4703831f1 Unbreak scanning after RUN -> SCAN state transition.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:09:47 +00:00
Adrian Chadd
64c9b99b3e Check channels which are passed in IBSS mode.
PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:08:25 +00:00
Adrian Chadd
b3195a3fdf Do not disable beacon notifications (unbreaks scanning on passive channels).
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:06:19 +00:00
Adrian Chadd
efccc3c60c Fix pause scan time calculation (the remainder must be less than beacon interval).
PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:03:06 +00:00
Adrian Chadd
42946b7dbc Fix active/passive dwell calculation.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 22:56:36 +00:00
Adrian Chadd
3289bbc9e3 Turn off led when leaving RUN state.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 22:55:06 +00:00
Adrian Chadd
3d9089a6f1 Add TX status codes (obtained from iwlegacy)
PR:		kern/197143
Differential Revision:	Andriy Voskoboinyk <s3erios@gmail.com>
Obtained from:	Linux drivers/net/wireless/iwlegacy
2015-05-03 22:49:47 +00:00
Adrian Chadd
b3cd88da75 Move radiooff_task to the internal taskqueue.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 22:47:06 +00:00
Adrian Chadd
e948ddb6d1 Use another workaround for scanning.
PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 22:43:45 +00:00
Adrian Chadd
621f1a7594 Add wpi_check_bss_filter()
PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 22:34:32 +00:00
Adrian Chadd
205cb272ea Fix KASSERT statements in if_wpi_debug.h
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 22:32:45 +00:00
Adrian Chadd
b625a56aae Remove workaround for bug 199676.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 22:30:11 +00:00
Adrian Chadd
6b997e0c7d Add a few local variables to improve readability.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 22:13:55 +00:00
Adrian Chadd
2ead385419 Remove this; it's currently a no-op.
History note: it's good to document what the driver expects like this even
if it's currently a no-op.

Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 22:10:28 +00:00
Adrian Chadd
30b6048179 Retry twice at the same rate.
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 20:56:33 +00:00
Mariusz Zaborski
bd1da0a002 Approved, oprócz użycie RESTORE_ERRNO() do ustawiania errno.
Change the nvlist_recv() function to take additional argument that
specifies flags expected on the received nvlist. Receiving a nvlist with
different set of flags than the ones we expect might lead to undefined
behaviour, which might be potentially dangerous.

Update consumers of this and related functions and update the tests.

Approved by:	pjd (mentor)

Update man page for nvlist_unpack, nvlist_recv, nvlist_xfer, cap_recv_nvlist
and cap_xfer_nvlist.

Reviewed by:	AllanJude
Approved by:	pjd (mentor)
2015-05-02 17:45:52 +00:00
Bjoern A. Zeeb
24f5e9f694 Remove the extra extern which makes gcc complain; I assume it came from
r282289.

We do include ixgbe.h which does include ixgbe_common.h which has the
extern statement for ixgbe_stop_mac_link_on_d3_82599().
2015-05-01 12:10:36 +00:00
Eric Joyner
6f37f2324d Add support for certain Intel X550 devices.
These include standalone X550 adapters, X552 10GbE backplane, and
X552/X557-AT 10GBASE-T; with the latter two being integrated into Xeon D SoCs.

As well, this bumps the ixgbe version number to 2.8.3, and includes updates
to shared code for support for the new devices.

Differential Revision: D2414
Reviewed by:	gnn, adrian
Approved by:	jfv (mentor), gnn (mentor)
2015-04-30 22:53:27 +00:00