Commit Graph

26817 Commits

Author SHA1 Message Date
Aleksandr Rybalko
c3ebd5edbc Do not try to probe/attach if attempt to add fbd child are failed.
Sponsored by:	The FreeBSD Foundation
2013-12-12 14:49:26 +00:00
Hans Petter Selasky
27ce2fd67c Set chain bit correctly. This will fix some problems sending and
receiving Zero Length Packets, ZLPs. See comment in code for more
information.

MFC after:	1 week
Reported by:	Kohji Okuno <okuno.kohji@jp.panasonic.com>
2013-12-12 08:34:51 +00:00
Alexander Motin
8adff99c8d Destroy mtx lock when failed to allocate memory during attach.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2013-12-11 17:40:35 +00:00
George V. Neville-Neil
8528c7c86e Fix a panic when booting with kernels that have FREEBBSD_COMPAT
4, 5, 6 or 43 by only thunking the data parameter for old ioctls
compatability ioctls instead of doing it for all of them.

Submitted by:	jhb@
2013-12-11 17:18:10 +00:00
Hans Petter Selasky
e892b3fe36 USB method structures for USB controllers and USB pipes should be
constant and does not need to be modified. This also saves a small
amount of RAM.
2013-12-11 13:20:32 +00:00
Konstantin Belousov
68a9d67c29 The opt_*.h headers must be included before any system header, except
sys/cdefs.h.  In particular, in case of COMPAT_43, param.h includes
sys/types.h, which includes sys/select.h, which includes
sys/_sigset.h.  The _sigset.h customizes the provided definions based
on COMPAT_43, eliminating osigset_t if symbol is not defined.  The
sys/proc.h is included after opt_compat.h and needs osigset_t.

Move opt_compat.h inclusion into the right place.

Sponsored by:	The FreeBSD Foundation
2013-12-10 22:33:02 +00:00
Nathan Whitehorn
641ed4622f Return the correct IEEE 1275 code for "nextprop". 2013-12-10 21:01:28 +00:00
Konstantin Belousov
60b6e19785 Only assert the length of the passed bio in the mdstart_vnode() when
the bio is unmapped, so we must map the bio pages into pbuf.  This
works around the geom classes which do not follow the MAXPHYS limit on
the i/o size, since such classes do not know about unmapped bios
either.

Reported by:	Paolo Pinto <paolo.pinto@netasq.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2013-12-10 20:52:31 +00:00
Edward Tomasz Napierala
0260023fbb Properly refuse handoff requests on already connected sessions. Previously
this would result in dropping the session.

MFC after:	2 days
Sponsored by:	The FreeBSD Foundation
2013-12-10 18:18:39 +00:00
Pawel Jakub Dawidek
ca5b58f5b1 Fix missing new line after:
Netvsc initializing...

during boot.
2013-12-10 17:16:13 +00:00
Aleksandr Rybalko
8c68d7b224 Disable error message about failed attempt to attach fbd when drm2 built with
syscons.

Sponsored by:	The FreeBSD Foundation
2013-12-10 15:53:00 +00:00
Aleksandr Rybalko
00f4f023f1 Break build with error in case when both syscons and newcons are enabled.
Sponsored by:	The FreeBSD Foundation
2013-12-10 15:36:29 +00:00
Adrian Chadd
ac68deae6d Print out the full PCIe link negotiation during dmesg.
I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot
or not.

Reviewed by:	np
Sponsored by:	Netflix, inc.
2013-12-10 00:07:04 +00:00
Navdeep Parhar
d419aaa126 Unstaticize t4_list and t4_uld_list. This works around a clang
annoyance[1] and allows kgdb to find these symbols.

[1] http://lists.freebsd.org/pipermail/freebsd-hackers/2012-November/041166.html

MFC after:	3 days
2013-12-09 23:33:57 +00:00
Aleksandr Rybalko
c323f8035b o Compat options have to be defined before sys/ioccom.h included, so move
inclusion of right after sys/param.h.
o Only vt_core module use compat options, move it from common header to module.

Reported by:	Larry Rosenman ler at lerctr dot org

Sponsored by:	The FreeBSD Foundation
2013-12-09 15:28:34 +00:00
Aleksandr Rybalko
0f49db6e47 Respect SC_NO_CUTPASTE option. It disable mouse cursor and cut/paste support
for vt(9). Note: /dev/sysmouse not affected.

Sponsored by:	The FreeBSD Foundation
2013-12-09 15:01:34 +00:00
Adrian Chadd
929f6e3c8b Add some initial support for the Intel 6235.
Tested:

* Intel 5100
* Intel 6235

Obtained from:	mav, others
2013-12-09 03:40:02 +00:00
Aleksandr Rybalko
37fd54ff81 o Build syscons(9)'s splash support if both sc and splash are enabled.
o Include opt_splash.h for vt(9) to know when splash device is enabled.
o Build logo_freebsd.c only if splash and vt are enabled.
o Include opt_compat.h to know when we have to respect compatibility.

Sponsored by:	The FreeBSD Foundation
2013-12-08 22:49:12 +00:00
Jean-Sébastien Pédron
01a31db4d1 drm/radeon: radeon_dp_i2c_aux_ch() must return 0 on FreeBSD
The code was unmodified compared to Linux and returned the amount of
received bytes from the i2c bus. This led to non-working i2c bus and
failure to eg. read monitor's EDID, if connected to DisplayPort.

MFC after:	3 days
Tested by:	Mikaël Urankar <mikael.urankar@gmail.com>
2013-12-08 18:48:07 +00:00
Navdeep Parhar
273ef9912d cxgbe(4): save a copy of the RSS map for each port for the driver's use. 2013-12-08 17:47:37 +00:00
Jean-Sébastien Pédron
a7c17730f4 drm/radeon: agp_info->ai_aperture_size is in bytes, not Mbytes
This fixes radeon_agp_init() and gtt_size is now correct. However, this
is not enough to make Radeon AGP cards work: ttm_agp_backend.c isn't
implemented yet.

Submitted by:	tijl@
2013-12-08 14:21:54 +00:00
Hans Petter Selasky
468f354b0e Fix typos.
Found by:	remko
2013-12-08 06:52:22 +00:00
Justin Hibbits
e17bec9172 Make more unsigned ints signed.
Found by:	clang (powerpc64)
MFC after:	1 week
2013-12-07 22:25:07 +00:00
Justin Hibbits
8991c54091 Fix some integer signs. These unsigned integers should all be signed.
Found by:	clang (powerpc64)
2013-12-07 19:55:34 +00:00
Adrian Chadd
a22cfd04e7 Refactor out the scan id and scan vap as part of the scan work.
Make the scan state optional - we'll obviously need a vap, but we now
won't require the scan state.  the only thing the scan state is needed
for is to check for the list of SSIDs to scan - which we can now
just plain ignore by passing in NULL as the scan state pointer.

Tested:

* Intel 5100 (STA)
2013-12-07 08:32:15 +00:00
Adrian Chadd
6c214017d0 Add a channel parameter to iwn_scan().
This is in preparation for being able to use iwn_scan() to do an off
channel scan to reset the RF tuning.

It should be a no-op.

Tested:

* Intel 5100 (STA)
2013-12-07 08:25:24 +00:00
Adrian Chadd
b860b2a9aa Refactor out the scan channel to be assigned early on in iwn_scan()
rather than it all being a mess of 'c' and 'ic->ic_curchan'.

Tested:

* Intel 5100 (STA)
2013-12-07 08:20:24 +00:00
Adrian Chadd
92d7ab9562 Begin fleshing out some code to handle tracking PLCP error rates
in preparation for the scan based retune logic.

The linux iwlwifi driver does a rescan (onto a non-active channel)
to force an RF retune when the PLCP error rates exceed a certain threshold.

* Add code to track HT PLCP rate errors;
* Separate out the PLCP error count fetch and update so the delta
  can be used when checking for PLCP error rates;
* Implement the PLCP error logic from iwlwifi;
* For now, just print out whenever the error rate exceeds the
  threshold.

The actual scan based retune will take a bit more effort; the scan
command code right now assumes that a scan state is passed in.
This does need to change to be more flexible (both for this and
in preparation for scanning multiple channels at once.)

Tested:

* 5100 (STA mode)
* 2200 (STA mode)
* 2230 (STA mode)
2013-12-07 08:03:10 +00:00
Adrian Chadd
90a4274834 Add some PLCP thresholds from Linux iwlwifi driver in preparation for
working on some RF tuning issues.

The linux iwlwifi driver has these thresholds which they use to see
if there are PLCP errors over a certain interval.  If they hit this,
they trigger a single-channel (different from active channels!)
scan to retune the RF front-end.
2013-12-07 06:45:09 +00:00
Aleksandr Rybalko
5ffea144c7 Fix td_frame flags for i386.
Submitted by:	jilles

Sponsored by:	The FreeBSD Foundation
2013-12-06 23:12:21 +00:00
Hans Petter Selasky
daab849b2c Fix compilation when the "USB_DEBUG" option is set. 2013-12-06 22:13:51 +00:00
Luiz Otavio O Souza
d442709662 Move the GPIOBUS_SET_PINFLAGS(..., ..., pin, GPIO_PIN_OUTPUT) to led(4)
control callback function.  This makes gpioled(4) works even if the pin
is accidentally set to an input.

Approved by:	adrian (mentor)
2013-12-06 17:56:20 +00:00
Luiz Otavio O Souza
41ec463c1e Remove unnecessary includes and an unused softc variable. While here apply
two minor style(9) fixes.

Approved by:	adrian (mentor)
2013-12-06 17:49:34 +00:00
Kevin Lo
242dbae34c Add support for the MediaTek/Ralink RT5572 chipset.
Committed over the TP-LINK TL-WDN3200 (RT5572) on amd64 with WPA.

While here, add my copyright.
2013-12-06 15:26:39 +00:00
Kevin Lo
e0790ad8eb Replace the magic numbers with something more readable. 2013-12-06 15:17:28 +00:00
Kevin Lo
b8161ff3c1 Cosmetic changes. 2013-12-06 15:15:58 +00:00
Kevin Lo
1d66c7a9cf Remove daft KASSERT. 2013-12-06 15:14:18 +00:00
Hans Petter Selasky
563ab08139 Improve the XHCI command timeout recovery handling code.
MFC after:	1 week
2013-12-06 08:42:41 +00:00
Aleksandr Rybalko
27cf7d04ef Merge VT(9) project (a.k.a. newcons).
Reviewed by:	nwhitehorn
MFC_to_10_after:	re approval

Sponsored by:	The FreeBSD Foundation
2013-12-05 22:38:53 +00:00
Robert Millan
7514065056 Initialize modesetting sysctls in radeonkms.
This is intended for MFC if re@ permits.

Reviewed by:	kib, dumbbell
Tested by:	Steven Chamberlain <steven@pyro.eu.org>
MFC after:	3 days
2013-12-05 20:23:32 +00:00
Hans Petter Selasky
bce421e9f7 Fix external compiler warning about write-only assigned variable. 2013-12-05 07:18:06 +00:00
Xin LI
b41206d84a Apply vendor improvements to oce(4) driver:
- Add support to 40Gbps devices;
 - Add support to control adaptive interrupt coalescing (AIC)
   via sysctl;
 - Improve support of BE3 devices;

Many thanks to Emulex for their continued support of FreeBSD.

Submitted by:	Venkata Duvvuru <VenkatKumar.Duvvuru Emulex Com>
MFC after:	3 days
2013-12-04 20:24:18 +00:00
Jean-Sébastien Pédron
20fa47be09 drm: Read PCIER_LINK_CAP/PCIER_LINK_CAP2 from the PCI bridge
Before this fix, capabilities were read from vgapci and were incorrect.
2013-12-04 19:04:56 +00:00
Hans Petter Selasky
0aff597a1f Fix what looks like a typo after r258732. 2013-12-04 12:30:51 +00:00
Hans Petter Selasky
8cfe54400e Fix external compiler warning(s). Avoid pointer dereferencing. 2013-12-04 12:07:46 +00:00
Edward Tomasz Napierala
bc2308d49e Change comment to match code.
Discussed with:	thompsa
Sponsored by:	The FreeBSD Foundation
2013-12-04 09:48:52 +00:00
Edward Tomasz Napierala
0efd9bfd47 Add "null" backend to mdconfig(8). This does exactly what the name
suggests, and is somewhat useful for benchmarking.

MFC after:	1 month
No objections from:	kib
Sponsored by:	The FreeBSD Foundation
2013-12-04 07:38:23 +00:00
Navdeep Parhar
05337b80ee cxgbe(4): T4_SET_SCHED_CLASS and T4_SET_SCHED_QUEUE ioctls to program
scheduling classes in the chip and to bind tx queue(s) to a scheduling
class respectively.  These can be used for various kinds of tx traffic
throttling (to force selected tx queues to drain at a fixed Kbps rate,
or a % of the port's total bandwidth, or at a fixed pps rate, etc.).

Obtained from:	Chelsio
2013-12-03 18:34:52 +00:00
Kevin Lo
405886883d The RUN_MAX_TXSZ constat is defined as Tx desc + Tx wireless info + MCLBYTES +
max padding.  We were lucky in that run(4) working fine since both
rt2860_rxwi and rt2860_txwi structure sizes are the same.
2013-12-02 09:07:43 +00:00
Adrian Chadd
352c016bc1 * Sort the copyright lines by date
* Ok ok, I've touched this enough to claim part of it.
2013-12-02 05:45:11 +00:00