Commit Graph

29016 Commits

Author SHA1 Message Date
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
John Baldwin
625d12c609 Various fixes to the stats in igb(4), ixgbe(4), and ixl(4).
- Use hardware counters for ifnet stats in igb(4) when possible.  This
  ensures these stats include packets that bypass the regular stack via
  netmap.
- Don't derefence values off the end of the igb(4) VF stats structure.
  Instead, add a dedicated if_get_counter method for igb(4) VF interfaces.
- Report missed packets on igb(4) as input queue drops rather than an
  input error.
- Report bug_ring drop counts as output queue drops for igb(4) and ixgbe(4).
- Export the buf_ring drop stats for individual rings via sysctl on
  ixgbe(4).
- Fix a typo that in ixl(4) that caused output queue drops to be reported
  as input queue drops and input queue drops to be unreported.

Differential Revision:	https://reviews.freebsd.org/D2402
Reviewed by:	jfv, rstone (6)
Sponsored by:	Norse Corp, Inc.
2015-04-30 18:23:38 +00:00
Jung-uk Kim
59023e6ce2 Remove leftover from r282269.
MFC after:	2 weeks
X-MFC with:	r282269
2015-04-30 17:49:35 +00:00
John Baldwin
ed95805e90 Remove support for Xen PV domU kernels. Support for HVM domU kernels
remains.  Xen is planning to phase out support for PV upstream since it
is harder to maintain and has more overhead.  Modern x86 CPUs include
virtualization extensions that support HVM guests instead of PV guests.
In addition, the PV code was i386 only and not as well maintained recently
as the HVM code.
- Remove the i386-only NATIVE option that was used to disable certain
  components for PV kernels.  These components are now standard as they
  are on amd64.
- Remove !XENHVM bits from PV drivers.
- Remove various shims required for XEN (e.g. PT_UPDATES_FLUSH, LOAD_CR3,
  etc.)
- Remove duplicate copy of <xen/features.h>.
- Remove unused, i386-only xenstored.h.

Differential Revision:	https://reviews.freebsd.org/D2362
Reviewed by:	royger
Tested by:	royger (i386/amd64 HVM domU and amd64 PVH dom0)
Relnotes:	yes
2015-04-30 15:48:48 +00:00
Roger Pau Monné
b19f7eece6 atkbd: remove usage of x86bios
Instead of trying to get the keyboard repeat rate set by the BIOS just set a
default one. This allows removing the usage of x86bios from atkbd.

Sponsored by: Citrix Systems R&D
Reviewed by: jkim, delphij
Differential Revision: https://reviews.freebsd.org/D2399
MFC after: 2 weeks
2015-04-30 07:00:25 +00:00
Kevin Lo
32bbc2d0bb - Disable usb aggregation mode by default since it boots performance
- Minor tweak

PR:	199718
Submitted by:	Mikhail <mp39590 at gmail dot com>
2015-04-30 02:47:21 +00:00
Ed Maste
2c48063b30 vt: fix vt_fb_bitblt_bitmap mask corruption
Previously the mask wrapped when one or more of the mask bytes extended
past the right edge of the window. Simplify the logic and use the same
byte offset and bit in both the pattern and mask.

PR:		199648
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2360
2015-04-29 20:30:11 +00:00
Pedro F. Giffuni
1faac5bc09 Revert r281889:
The change would appease the static analyzers but it is pretty much a
no-op. I need to trust static analyzers much less, especially for the
kernel.

Requested by:	jkim
2015-04-29 20:08:03 +00:00
John Baldwin
4dc78216f8 Don't free mbufs when stopping an interface in netmap mode.
Currently if you ifconfig down a vtnet interface while it is being used
via netmap, the kernel panics due to trying to treat the cookie values
in the virtio rings as mbufs to be freed. When netmap is enabled, these
cookie values are pointers to something else.

Note that other netmap-aware drivers don't seem to need this as they
store the mbuf pointers in the software rings that mirror the hardware
descriptor rings, and since netmap doesn't touch those, the software
state always has NULL mbuf pointers causing the loops to free mbufs to
not do anything. However, vtnet reuses the same state area for both
netmap and non-netmap mode, so it needs to explicitly avoid looking at
the rings and treating the cookie values as mbufs if netmap is
enabled.

Differential Revision:	https://reviews.freebsd.org/D2348
Reviewed by:	adrian, bryanv, luigi
MFC after:	1 week
Sponsored by:	Norse Corp, Inc.
2015-04-29 17:48:25 +00:00
Pedro F. Giffuni
3b7176c90a Plug memory leaks in kbdmux(4) (take 2)
This is a fix to the previous attempt in r281889, which some (most?)
keyboards.

Discussed with:	emaste, jkim

Found by:	clang static analyzer
CID:		1007072
CID:		1007073
CID:		1007074
2015-04-29 15:41:19 +00:00
Roger Pau Monné
f0e31fe074 vt_vga: add a timeout while waiting for vertical retrace
On one of my systems FreeBSD will fail to boot because vt_vga gets stuck
waiting for the vertical retrace if there's no monitor attached. Fix this by
adding a timeout and exiting if the vertical retrace times out.

Sponsored by: Citrix Systems R&D
Reviewed by: emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D2397
2015-04-29 12:53:41 +00:00
Wei Hu
da2f98a1cf Microsoft vmbus, storage and other related driver enhancements for HyperV.
- Vmbus multi channel support.
    - Vector interrupt support.
    - Signal optimization.
    - Storvsc driver performance improvement.
    - Scatter and gather support for storvsc driver.
    - Minor bug fix for KVP driver.
Thanks royger, jhb and delphij from FreeBSD community for the reviews
and comments. Also thanks Hovy Xu from NetApp for the contributions to
the storvsc driver.

PR:     195238
Submitted by:   whu
Reviewed by:    royger, jhb, delphij
Approved by:    royger
MFC after:      2 weeks
Relnotes:       yes
Sponsored by:   Microsoft OSTC
2015-04-29 10:12:34 +00:00