Commit Graph

30029 Commits

Author SHA1 Message Date
Steven Hartland
c82d74037f Fix panic on shutdown due to iscsi event priority
iscsi's shutdown_pre_sync prio was SHUTDOWN_PRI_FIRST which caused it to
run before other high priority handlers such as filesystems e.g. ZFS.

This meant the iscsi sessions where removed before the ZFS geom consumer
was closed, resulting in a panic from g_access calls on debug kernels
due to negative acr.

Instead use the same as the old iscsi_initiator SHUTDOWN_PRI_DEFAULT-1
which allows it to run before dashutdown etc but after filesystems.

MFC after:	2 weeks
Sponsored by:	Multiplay
2015-12-07 02:56:08 +00:00
Kevin Lo
eab02f464a - Fix Tx queues to USB endpoints mapping
- Merge urtwn_r92c_dma_init() and urtwn_r88e_dma_init() into one

Reviewed by:	adrian, avos
Differential Revision:	https://reviews.freebsd.org/D4381
2015-12-06 14:07:57 +00:00
Alexander Motin
8a30def363 There is no priority request queue on 16Gig chips. 2015-12-05 22:07:02 +00:00
Alexander Motin
a193dc4b82 Rework WWNs generation to make cards without NVRAM more useful. 2015-12-05 21:38:04 +00:00
Andrew Rybchenko
af128f2270 sfxge: erase nvram partitions in chunks equal to their erase size
The erase size is reported by the nvram info command.

Submitted by:   Paul Fox <pfox at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4386
2015-12-05 17:11:14 +00:00
Kevin Lo
d4438cd2b4 Remove a duplicate definition. 2015-12-05 15:09:19 +00:00
Andriy Voskoboinyk
2e3c0e969e urtwn: fix some regressions after r290630
- Restore R92C_TXDW4_HWSEQ_EN bit - it is used by non-8188EU chips.
- Fix DRVRATE bit usage.

Tested with:
 - RTL8188EU, STA mode.
 - RTL8188CUS, STA mode.

Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4352
2015-12-05 15:08:01 +00:00
Navdeep Parhar
a89012b294 Fix RSS build.
Reported by:	arybchik@
2015-12-05 10:10:18 +00:00
Andrew Rybchenko
4d982a2562 sfxge: pick up the new TLV structures
The header is auto-generated from firmware sources.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-05 08:34:51 +00:00
Andrew Rybchenko
029f0fcd79 sfxge: cleanup: remove set but not used trailer variable
Required to build with -Werror=unused-but-set-variable.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-05 08:26:16 +00:00
Andrew Rybchenko
6f750b3281 sfxge: cleanup: remove set but not used variable with parse error indication
Required to build with -Werror=unused-but-set-variable.
Keep it under #if 0 as a reminder for parse error processing.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-05 08:24:54 +00:00
Andrew Rybchenko
5a28872b84 sfxge: cleanup: remove set but not used saved_spec variable
Required to build with -Werror=unused-but-set-variable.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-05 08:21:45 +00:00
Andrew Rybchenko
3005902f91 sfxge: cleanup: remove SFL9122 "Huntington" PCI IDs
The SFL9122 "Huntington" controller was never built.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-05 08:10:32 +00:00
Andrew Rybchenko
9c2c444b10 sfxge: support for MCDI logging implemented
Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4355
2015-12-05 07:04:11 +00:00
Conrad Meyer
c2b69205ac ioat(4): Add MODULE_VERSION so MODULE_DEPEND works
Suggested by:	jhb
Review in progress:	cc
Sponsored by:	EMC / Isilon Storage Division
2015-12-04 23:31:32 +00:00
Alexander Motin
cd201b7b55 Make 16Gig chips to use new queue pointer registers.
While 24xx-style ATIO and reply queue registers seems like still working,
request queue doesn't.  So instead of that use registers from PCI BAR(4).
2015-12-04 19:46:49 +00:00
Andrew Rybchenko
ca8c913582 sfxge: [EF10] support RxQ scattering control
If, for example, a VF is configured to use a 1500 byte MTU, but the port
it is attached to is set to 9000 bytes, overlength frames can be received
by the VF. As Huntington scatters by default, these overlength packets
would be scattered across several descriptors, with all except the last
having the CONT bit set.

To avoid this, disable scatter when creating RXQs if the firmware
supports doing so, which all recent versions do. Then we only get
a single descriptor from an overlength frame. This will have the CONT
bit set to indicate it was truncated, so we can discard it.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4354
2015-12-04 06:54:46 +00:00
Andrew Rybchenko
9cb71b166c sfxge: add additional WRITESIZE value for NVRAM_INFO command
Submitted by:   Paul Fox <pfox at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4353
2015-12-04 06:51:37 +00:00
Bryan Drewery
eacae6dc66 Fix LDADD/DPADD that should be LIBADD.
Sponsored by:	EMC / Isilon Storage Division
2015-12-04 03:17:47 +00:00
Alexander Motin
829dfec04f Update isp_put_icb_2400() for new structure fields. 2015-12-04 01:28:48 +00:00
Alexander Motin
7bd4b42414 Enable interrupt handshake for 16Gig chips.
We don't support MSI-X so far, so it is always required.
2015-12-03 22:55:40 +00:00
Kenneth D. Merry
a9934668aa Add asynchronous command support to the pass(4) driver, and the new
camdd(8) utility.

CCBs may be queued to the driver via the new CAMIOQUEUE ioctl, and
completed CCBs may be retrieved via the CAMIOGET ioctl.  User
processes can use poll(2) or kevent(2) to get notification when
I/O has completed.

While the existing CAMIOCOMMAND blocking ioctl interface only
supports user virtual data pointers in a CCB (generally only
one per CCB), the new CAMIOQUEUE ioctl supports user virtual and
physical address pointers, as well as user virtual and physical
scatter/gather lists.  This allows user applications to have more
flexibility in their data handling operations.

Kernel memory for data transferred via the queued interface is
allocated from the zone allocator in MAXPHYS sized chunks, and user
data is copied in and out.  This is likely faster than the
vmapbuf()/vunmapbuf() method used by the CAMIOCOMMAND ioctl in
configurations with many processors (there are more TLB shootdowns
caused by the mapping/unmapping operation) but may not be as fast
as running with unmapped I/O.

The new memory handling model for user requests also allows
applications to send CCBs with request sizes that are larger than
MAXPHYS.  The pass(4) driver now limits queued requests to the I/O
size listed by the SIM driver in the maxio field in the Path
Inquiry (XPT_PATH_INQ) CCB.

There are some things things would be good to add:

1. Come up with a way to do unmapped I/O on multiple buffers.
   Currently the unmapped I/O interface operates on a struct bio,
   which includes only one address and length.  It would be nice
   to be able to send an unmapped scatter/gather list down to
   busdma.  This would allow eliminating the copy we currently do
   for data.

2. Add an ioctl to list currently outstanding CCBs in the various
   queues.

3. Add an ioctl to cancel a request, or use the XPT_ABORT CCB to do
   that.

4. Test physical address support.  Virtual pointers and scatter
   gather lists have been tested, but I have not yet tested
   physical addresses or scatter/gather lists.

5. Investigate multiple queue support.  At the moment there is one
   queue of commands per pass(4) device.  If multiple processes
   open the device, they will submit I/O into the same queue and
   get events for the same completions.  This is probably the right
   model for most applications, but it is something that could be
   changed later on.

Also, add a new utility, camdd(8) that uses the asynchronous pass(4)
driver interface.

This utility is intended to be a basic data transfer/copy utility,
a simple benchmark utility, and an example of how to use the
asynchronous pass(4) interface.

It can copy data to and from pass(4) devices using any target queue
depth, starting offset and blocksize for the input and ouptut devices.
It currently only supports SCSI devices, but could be easily extended
to support ATA devices.

It can also copy data to and from regular files, block devices, tape
devices, pipes, stdin, and stdout.  It does not support queueing
multiple commands to any of those targets, since it uses the standard
read(2)/write(2)/writev(2)/readv(2) system calls.

The I/O is done by two threads, one for the reader and one for the
writer.  The reader thread sends completed read requests to the
writer thread in strictly sequential order, even if they complete
out of order.  That could be modified later on for random I/O patterns
or slightly out of order I/O.

camdd(8) uses kqueue(2)/kevent(2) to get I/O completion events from
the pass(4) driver and also to send request notifications internally.

For pass(4) devcies, camdd(8) uses a single buffer (CAM_DATA_VADDR)
per CAM CCB on the reading side, and a scatter/gather list
(CAM_DATA_SG) on the writing side.  In addition to testing both
interfaces, this makes any potential reblocking of I/O easier.  No
data is copied between the reader and the writer, but rather the
reader's buffers are split into multiple I/O requests or combined
into a single I/O request depending on the input and output blocksize.

For the file I/O path, camdd(8) also uses a single buffer (read(2),
write(2), pread(2) or pwrite(2)) on reads, and a scatter/gather list
(readv(2), writev(2), preadv(2), pwritev(2)) on writes.

Things that would be nice to do for camdd(8) eventually:

1.  Add support for I/O pattern generation.  Patterns like all
    zeros, all ones, LBA-based patterns, random patterns, etc. Right
    Now you can always use /dev/zero, /dev/random, etc.

2.  Add support for a "sink" mode, so we do only reads with no
    writes.  Right now, you can use /dev/null.

3.  Add support for automatic queue depth probing, so that we can
    figure out the right queue depth on the input and output side
    for maximum throughput.  At the moment it defaults to 6.

4.  Add support for SATA device passthrough I/O.

5.  Add support for random LBAs and/or lengths on the input and
    output sides.

6.  Track average per-I/O latency and busy time.  The busy time
    and latency could also feed in to the automatic queue depth
    determination.

sys/cam/scsi/scsi_pass.h:
	Define two new ioctls, CAMIOQUEUE and CAMIOGET, that queue
	and fetch asynchronous CAM CCBs respectively.

	Although these ioctls do not have a declared argument, they
	both take a union ccb pointer.  If we declare a size here,
	the ioctl code in sys/kern/sys_generic.c will malloc and free
	a buffer for either the CCB or the CCB pointer (depending on
	how it is declared).  Since we have to keep a copy of the
	CCB (which is fairly large) anyway, having the ioctl malloc
	and free a CCB for each call is wasteful.

sys/cam/scsi/scsi_pass.c:
	Add asynchronous CCB support.

	Add two new ioctls, CAMIOQUEUE and CAMIOGET.

	CAMIOQUEUE adds a CCB to the incoming queue.  The CCB is
	executed immediately (and moved to the active queue) if it
	is an immediate CCB, but otherwise it will be executed
	in passstart() when a CCB is available from the transport layer.

	When CCBs are completed (because they are immediate or
	passdone() if they are queued), they are put on the done
	queue.

	If we get the final close on the device before all pending
	I/O is complete, all active I/O is moved to the abandoned
	queue and we increment the peripheral reference count so
	that the peripheral driver instance doesn't go away before
	all pending I/O is done.

	The new passcreatezone() function is called on the first
	call to the CAMIOQUEUE ioctl on a given device to allocate
	the UMA zones for I/O requests and S/G list buffers.  This
	may be good to move off to a taskqueue at some point.
	The new passmemsetup() function allocates memory and
	scatter/gather lists to hold the user's data, and copies
	in any data that needs to be written.  For virtual pointers
	(CAM_DATA_VADDR), the kernel buffer is malloced from the
	new pass(4) driver malloc bucket.  For virtual
	scatter/gather lists (CAM_DATA_SG), buffers are allocated
	from a new per-pass(9) UMA zone in MAXPHYS-sized chunks.
	Physical pointers are passed in unchanged.  We have support
	for up to 16 scatter/gather segments (for the user and
	kernel S/G lists) in the default struct pass_io_req, so
	requests with longer S/G lists require an extra kernel malloc.

	The new passcopysglist() function copies a user scatter/gather
	list to a kernel scatter/gather list.  The number of elements
	in each list may be different, but (obviously) the amount of data
	stored has to be identical.

	The new passmemdone() function copies data out for the
	CAM_DATA_VADDR and CAM_DATA_SG cases.

	The new passiocleanup() function restores data pointers in
	user CCBs and frees memory.

	Add new functions to support kqueue(2)/kevent(2):

	passreadfilt() tells kevent whether or not the done
	queue is empty.

	passkqfilter() adds a knote to our list.

	passreadfiltdetach() removes a knote from our list.

	Add a new function, passpoll(), for poll(2)/select(2)
	to use.

	Add devstat(9) support for the queued CCB path.

sys/cam/ata/ata_da.c:
	Add support for the BIO_VLIST bio type.

sys/cam/cam_ccb.h:
	Add a new enumeration for the xflags field in the CCB header.
	(This doesn't change the CCB header, just adds an enumeration to
	use.)

sys/cam/cam_xpt.c:
	Add a new function, xpt_setup_ccb_flags(), that allows specifying
	CCB flags.

sys/cam/cam_xpt.h:
	Add a prototype for xpt_setup_ccb_flags().

sys/cam/scsi/scsi_da.c:
	Add support for BIO_VLIST.

sys/dev/md/md.c:
	Add BIO_VLIST support to md(4).

sys/geom/geom_disk.c:
	Add BIO_VLIST support to the GEOM disk class.  Re-factor the I/O size
	limiting code in g_disk_start() a bit.

sys/kern/subr_bus_dma.c:
	Change _bus_dmamap_load_vlist() to take a starting offset and
	length.

	Add a new function, _bus_dmamap_load_pages(), that will load a list
	of physical pages starting at an offset.

	Update _bus_dmamap_load_bio() to allow loading BIO_VLIST bios.
	Allow unmapped I/O to start at an offset.

sys/kern/subr_uio.c:
	Add two new functions, physcopyin_vlist() and physcopyout_vlist().

sys/pc98/include/bus.h:
	Guard kernel-only parts of the pc98 machine/bus.h header with
	#ifdef _KERNEL.

	This allows userland programs to include <machine/bus.h> to get the
	definition of bus_addr_t and bus_size_t.

sys/sys/bio.h:
	Add a new bio flag, BIO_VLIST.

sys/sys/uio.h:
	Add prototypes for physcopyin_vlist() and physcopyout_vlist().

share/man/man4/pass.4:
	Document the CAMIOQUEUE and CAMIOGET ioctls.

usr.sbin/Makefile:
	Add camdd.

usr.sbin/camdd/Makefile:
	Add a makefile for camdd(8).

usr.sbin/camdd/camdd.8:
	Man page for camdd(8).

usr.sbin/camdd/camdd.c:
	The new camdd(8) utility.

Sponsored by:	Spectra Logic
MFC after:	1 week
2015-12-03 20:54:55 +00:00
Conrad Meyer
b23896a221 if_ntb: Don't roundup MW size to full BAR size unnecessarily
Note that the MW allocation still must be BAR *aligned*.  So, this only
loosens the constraints on MW allocation slightly.  BAR-aligned does not
play well with large (GB+) BAR sizes.

Going forward, if anyone cares about if_ntb on very large BARs, I
suggest they add functionality to allocate a smaller window than the BAR
size, and set the BAR range to cover a window much larger than the
allocated window.  This will require negotiating a window offset and
limit for protocol traffic.  None of this is implemented in this
revision.

Sponsored by:	EMC / Isilon Storage Division
2015-12-03 17:22:55 +00:00
Conrad Meyer
64448a2a50 if_ntb: Log error *before* zeroing relevant variables
Sponsored by:	EMC / Isilon Storage Division
2015-12-03 17:22:45 +00:00
Andriy Voskoboinyk
a7d4c4c102 urtwn(4): add error handling for urtwn_write_X() functions.
- Call ieee80211_stop() when urtwn_init() fails
(i.e., stop vap explicitly)
- Return an error when urtwn_write_<smth>() fails.
- Handle errors from them in:
 * urtwn_fw_cmd();
 * urtwn_llt_write();
 * urtwn_efuse_*();
 * urtwn_*_power_on();
 * urtwn_*_dma_init();
 * urtwn_mac_init();
 * urtwn_init();

Tested with RTL8188EU, STA mode

Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4291
2015-12-03 14:38:55 +00:00
Andriy Voskoboinyk
aacc26e329 urtwn(4): move duplicate code from urtwn_(r92c/r88e)_dma_init()
to urtwn_dma_init() (noop).

Reviewed by:	kevlo
Approved by:	adrian (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D4271
2015-12-03 14:17:28 +00:00
Andrew Turner
14df39ad40 Add support for a generic AHCI attachment. This allows us to attach to a
typically memory mapped bus, for example on the AMD Opteron A1100 the AHCI
device is mapped in the CPUs address space, and not through a PCI
controller.

Further work is needed for this to work with ACPI as this is expected to be
common on ARMv8 servers.

Reviewed by:	mav, mmel
Obtained from:	mmel, ABT Systems Ltd
Relnotes:	yes
Sponsored by:	SoftIron Inc
Differential Revision:	https://reviews.freebsd.org/D4269
2015-12-03 11:24:11 +00:00
Konstantin Belousov
f28b929a9e Fix build for !TCP_OFFLOAD case. 2015-12-03 10:33:57 +00:00
Andrew Rybchenko
26702cb592 sfxge: regenerate MCDI headers
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-03 08:06:10 +00:00
Andrew Rybchenko
f880676264 sfxge: remove internal register definitions that should not be used by host code
Submitted by:   Guido Barzini <gbarzini at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-03 07:28:57 +00:00
Andrew Rybchenko
946b5480b0 sfxge: add markers for autogenerated defines
Move use defines outside.

Submitted by:   Guido Barzini <gbarzini at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-03 07:24:59 +00:00
Andrew Rybchenko
501fe79d8e sfxge: sync TLV layout headers with firmwaresrc for event merging config
Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2015-12-03 07:22:53 +00:00
Andrew Rybchenko
870b11865a sfxge: add MCDI logging support to common code
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4331
2015-12-03 07:13:13 +00:00
Pyun YongHyeon
7aa69e3107 Disable EEE(Energy Efficient Ethernet) for RTL8211F PHY.
It seems the EEE made RX MAC enter LPI(Low Power Idle) mode such
that dwc(4) was not able to receive packets.  Ideally dwc(4) should
be able to use EEE to save power during periods of low link
utilization(i.e. gating off clock).  Due to lack of dwc(4)
datasheet it's not easy to take required steps for EEE on LPI
enter/exit events.  Disabling EEE in PHY seems to be easy
workaround until dwc(4) supports EEE.

Updating EEE advertisement register on RTL8211F seems to have no
effect until reprogramming MII_ANAR, MII_100T2CR and MII_BMCR
with auto-negotiation. It's not clear whether it's related with
mii_phy_reset()'s BMCR_ISO handling for RTL8211F though.
It seems rgephy_reset() needs careful investigation for newer
RealTek PHYs.

Ganbold submitted working version based on NetBSD change and
tested lots of changes I made. Thanks a lot!

Submitted by:	ganbold (initial version)
In collaboration with:	ganbold
2015-12-03 05:27:39 +00:00
John Baldwin
fe2ebb7644 Add support for configuring additional virtual interfaces (VIs) on a port.
Each virtual interface has its own MAC address, queues, and statistics.
The dedicated netmap interfaces (ncxgbeX / ncxlX) were already implemented
as additional VIs on each port.  This change allows additional non-netmap
interfaces to be configured on each port.  Additional virtual interfaces
use the naming scheme vcxgbeX or vcxlX.

Additional VIs are enabled by setting the hw.cxgbe.num_vis tunable to a
value greater than 1 before loading the cxgbe(4) or cxl(4) driver.
NB: The first VI on each port is the "main" interface (cxgbeX or cxlX).

T4/T5 NICs provide a limited number of MAC addresses for each physical port.
As a result, a maximum of six VIs can be configured on each port (including
the "main" interface and the netmap interface when netmap is enabled).

One user-visible result is that when netmap is enabled, packets received
or transmitted via the netmap interface are no longer counted in the stats
for the "main" interface, but are not accounted to the netmap interface.

The netmap interfaces now also have a new-bus device and export various
information sysctl nodes via dev.n(cxgbe|cxl).X.

The cxgbetool 'clearstats' command clears the stats for all VIs on the
specified port along with the port's stats.  There is currently no way to
clear the stats of an individual VI.

Reviewed by:	np
MFC after:	1 month
Sponsored by:	Chelsio
2015-12-03 00:02:01 +00:00
Alexander Motin
218be0b2ee Add initial support for 16Gbps FC QLogic chips.
I still don't know how to read NVRAM there, so WWNs and other parameters
are incorrect, but other then that driver seems like attaching normally.
2015-12-02 20:22:50 +00:00
Michal Meloun
821a61efa0 OFW: Move code for searching interrupt parent into separate function.
It can be used by interrupt controller drivers.

Approved by:	kib (mentor)
2015-12-02 14:21:16 +00:00
Xin LI
b23a1998d8 Update arcmsr(4) to 1.30.00.00 in order to add support of
ARC-1203 SATA RAID controllers.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by:	黃清隆 <ching2048 areca com tw>
MFC after:	2 weeks
2015-12-02 05:35:04 +00:00
Andrew Rybchenko
eaf3f5c649 sfxge: retry VF vAdaptor allocation if it fails because of no EVB port yet
After an MC reboot, a VF driver may reset before the PF driver has
finished bringing everything back up. This includes the VFs EVB port.
MC_CMD_VADAPTOR_ALLOC is the first MCDI call after an MC reboot to
require the EVB port, so if it fails with MC_CMD_ERR_NO_EVB_PORT,
retry the command a few times after waiting a while.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4333
2015-12-01 15:54:46 +00:00
Andrew Rybchenko
d486ce4b1b sfxge: add function to query link control privilege
Make link control privilege visible to OS driver to guard updates to
flow control and PHY advertised capabilities.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4330
2015-12-01 15:38:39 +00:00
Andrew Rybchenko
f990a59205 sfxge: FPGA and FPGA backup (diagnostic) partitions added to hunt_parttbl
It allows manftest to program them.

Submitted by:   Paul Fox <pfox at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4329
2015-12-01 15:32:37 +00:00
Andrew Rybchenko
f2588d15ef sfxge: allow VFs to have locally administered MAC addresses
Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4328
2015-12-01 15:29:51 +00:00
Andrew Rybchenko
63fa4a6afc sfxge: support MAC spoofing for 4.2.x firmare
Common code should infer other privileges from Admin privilege to
support firmware that pre-dates introduction of specific privilege
flags.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4327
2015-12-01 15:26:46 +00:00
Andrew Rybchenko
a32efb9731 sfxge: parse packets for TSO early in if_transmit
Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4309
2015-12-01 14:55:24 +00:00
Andrew Rybchenko
8ce7856dca sfxge: added setting TSO-related parameters
Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4308
2015-12-01 06:29:11 +00:00
Andrew Rybchenko
120584dca6 sfxge: avoid TSO packets collapses if packet header uses 2 segments
It is really observed in the case of VLAN over sfxge interface.
Also this change makes total value equal to 35 which is default assumed
by the kernel for if_hw_tsomaxsegcount.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4319
2015-12-01 06:23:15 +00:00
Kevin Lo
e1b74f21f5 Add initial support for RTL8152 USB Fast Ethernet. RTL8152 supports
IPv4/IPv6 checksum offloading and VLAN tag insertion/stripping.

Since uether doesn't provide a way to announce driver specific offload
capabilities to upper stack, checksum offloading support needs more work
and will be done in the future.

Special thanks to Hayes Wang from RealTek who gave input.
2015-12-01 05:12:13 +00:00
Randall Stewart
f19bae413c Add support for Intel Skylake and Intel Broadwell PMC's. The Broadwell PMC's have been
tested on the Broadwell-Xeon with a hacked up version of pmcstudy -T. I still need
to circle back and add in to pmcstudy all the new tests from the Broadwell Vtune
guide (for the hacked up version I just made it so I could run the -T option). The
Skylake CPU is not yet available (even though Intel is advertising it .. imagine that).
The Skylake PMC's will need to be tested once we can get a sample skylake CPU :-)

Sponsored by: Netflix Inc.
2015-11-30 17:35:49 +00:00
Andriy Voskoboinyk
54b27b3583 wpi: ignore ic_update_promisc() call when device is not running
This change will fix kernel panic with uninitialized (zeroed)
RXON structure.

Tested with Intel 3945BG, IBSS mode.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4304
2015-11-30 17:16:51 +00:00
Andrew Rybchenko
cb3acb3e9b sfxge: avoid TSO packets collapses bacause of not 2K aligned data
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4310
2015-11-30 13:27:40 +00:00