Commit Graph

3342 Commits

Author SHA1 Message Date
Brooks Davis
58ab5b0a13 Fix some extra whitespace noticed when reviewing git diffs. 2014-09-16 17:07:32 +00:00
Hans Petter Selasky
b75ac2ba76 Workaround for receiving Voice Calls using the E1750 dongle from
Huawei. It might appear as if the firmware is allocating memory blocks
according to the USB transfer size and if there is initially a lot of
data, like at the answering machine prompt, it simply dies without any
apparent reason. The simple workaround for this is to force a zero
length packet at hardware level after every 512 bytes of data. This
will force the other side to use smaller memory blocks aswell.

MFC after:	1 week
2014-09-12 22:40:12 +00:00
Kevin Lo
141aa3b93a Drop frames that have larger than MCLBYTES. 2014-09-09 05:21:31 +00:00
Kevin Lo
6bd03b20fd The USB LED driver for the Dream Cheeky WebMail Notifier.
Reviewed by:	hselasky
2014-09-05 11:25:58 +00:00
Alexander Motin
4255b98bc1 Add IDs for Intel Patsburg USB 2.0 controller. 2014-09-05 07:42:34 +00:00
Hans Petter Selasky
6301574838 Fix spelling.
PR:		193279
MFC after:	1 week
2014-09-03 13:15:16 +00:00
Hans Petter Selasky
7b520cfbc5 Add new quirk.
PR:		193279
MFC after:	1 week
2014-09-03 11:46:43 +00:00
Hans Petter Selasky
6084a8c0ec Fix logical error.
MFC after:	3 days
2014-09-03 05:14:50 +00:00
Kevin Lo
15cb19cd6a Fix typo: s/mac_rev/mac_ver/
Submitted by:	Stefan Sperling <stsp at openbsd dot org>
2014-08-26 02:20:37 +00:00
Kevin Lo
51a25d3479 If eapol packets are sent at the lowest rate, key negotiation will
become more reliable.

Submitted by:	Akinori Furukoshi <moonlightakkiy at yahoo dot ca>
2014-08-20 01:32:04 +00:00
Kevin Lo
d4bcd25553 Add the D-Link DWA-125 rev D1.
Tested by myself.
2014-08-20 01:26:27 +00:00
Kevin Lo
7e1c22c476 Sort ASUS section and add USB device ID of ASUS USB-AC51. 2014-08-19 09:02:58 +00:00
Hans Petter Selasky
14607326b9 Make sure the USB audio level residue is non-zero. 2014-08-07 12:47:25 +00:00
Glen Barber
a74c18162d Add device ID for the Chicony USB 2.0 HD UVC Webcam
found on the Asus X550LA.

Reviewed by:	sbruno
Sponsored by:	The FreeBSD Foundation
2014-08-05 19:43:44 +00:00
Hans Petter Selasky
5ec70ad261 - Implement fast interrupt handler to save CPU usage.
- Cleanup some register reads and writes to use existing register
  access macros.
- Ensure code which only applies to the control endpoint is not run
  for other endpoints in the data transfer path.

MFC after:	3 days
2014-08-05 18:48:12 +00:00
Hans Petter Selasky
ae369036ec Add handler for read-back of USB audio volume levels. 2014-08-05 18:35:34 +00:00
Hans Petter Selasky
88e27ba861 - Ensure code which only applies to the control endpoint is not run
for other endpoints in the data transfer path.
- Ensure all bits of the "EPCON" register is written during
initialisation.

MFC after:	3 days
2014-08-05 13:36:26 +00:00
Nick Hibma
c376f4397d Add support for Huawei E3272 modems which are supported by the CDC
ethernet class.

Note: This is untested as I do not have a device like this. That is
reflected in the MFC timeout.

PR:		192345
Submitted by:	rozhuk.im gmail.com
MFC after:	4 weeks
2014-08-05 12:08:50 +00:00
Nick Hibma
273e613024 don't OR integer error values together as this does not make sense.
Instead bail on the first failed command.
2014-08-05 11:50:16 +00:00
Nick Hibma
dc26b3369f Return USB_ERR_INVAL if the eject method is not known.
PR:		145319
Submitted by:	rozhuk.im gmail.com
2014-08-05 09:59:16 +00:00
Nick Hibma
c5377460ea Add a second Huawei SCSI eject command as USB mode switch config files
sometimes use one or the other. Maybe newer Huawei modems switched.

Add a quirk for it as well.

PR:		145319
Submitted by:	rozhuk.im gmail.com
2014-08-05 09:35:25 +00:00
Nick Hibma
e28d2b2275 Reset the error value in the softc before starting a BBB transfer.
PR:		145319
Submitted by:	rozhuk.im gmail.com
MFC after:	3 days
2014-08-05 08:48:24 +00:00
Nick Hibma
89fc30aaa5 Add ID for Novatel MC990D to u3g.
PR:		145319
Submitted by:	rozhuk.im gmail.com
MFC after:	3 days
2014-08-05 08:29:16 +00:00
Nick Hibma
7ae432c00d Remove unused defines.
Fix some device_printf's that were missing '\n' at the end or had
speling errors.

PR:		145319
Submitted by:	rozhuk.im gmail.com
2014-08-05 08:24:41 +00:00
Hans Petter Selasky
f9478f91fb Add new USB phone descriptor template for USB device side mode.
MFC after:	3 days
2014-08-05 07:03:16 +00:00
Hans Petter Selasky
c3ccd2bf8c Fix for deadlock in USB device side mode.
MFC after:	3 days
2014-08-05 06:38:21 +00:00
Hans Petter Selasky
c65494287f Rename driver name a bit to avoid unit number confusion in dmesg.
MFC after:	3 days
2014-08-05 06:37:07 +00:00
Hans Petter Selasky
6d3fae9533 - Implement fast interrupt handler to save CPU usage.
- Add support for striding register offsets.
- Cleanup some register reads and writes to use existing register
access macros.
2014-08-05 06:33:59 +00:00
Hans Petter Selasky
08b3b75235 Ensure we catch USB transfers which complete right away. 2014-08-05 06:31:09 +00:00
Joerg Wunsch
4cac8309a3 Avoid a divide-by-zero panic when setting the baudrate to 0.
MFC after:	2 weeks
2014-08-03 10:47:45 +00:00
Kevin Lo
5dc8bea6de Replace the whole license block with the standard one.
Suggested by:	emaste
2014-07-31 05:12:21 +00:00
Kevin Lo
77c6646471 In copyright statement correct that the author is me, not Bill Paul. 2014-07-31 03:34:25 +00:00
Hans Petter Selasky
0722247439 Split the XHCI TRB allocations into smaller parts, so that we don't
end up allocating contiguous busdma buffers above PAGE_SIZE bytes.

MFC after:	1 week
Tested by:	Ruslan Bukin <br@bsdpad.com>
2014-07-26 19:08:52 +00:00
Hans Petter Selasky
b8e3094c34 Fix for division by zero.
MFC after:	3 days
2014-07-26 16:06:01 +00:00
Hans Petter Selasky
de65cb9aa9 Add new device ID.
MFC after:	1 week
PR:		191959
2014-07-20 21:02:35 +00:00
Hans Petter Selasky
0a54509ff9 Improve support for Intel Lynx Point USB 3.0 controllers by using the
USB 2.0 port mask in addition to the USB 3.0 port mask. The hardware
does not always accept when writing -1U to the port switching
registers.

MFC after:	3 days
Tested by:	Huang Wen Hui <huanghwh@gmail.com>
2014-07-16 06:14:41 +00:00
Hans Petter Selasky
817a8cac2e Turn off blinking device leds at attach.
MFC after:	3 days
PR:		183735
2014-07-13 09:34:59 +00:00
Hans Petter Selasky
948d799e27 Fix performance problems with AXGE network adapter in RX direction:
- Remove 4 extra bytes from the ethernet payload.
- The maximum RX buffer was incorrectly set. Increase it to 64K for
now, until the exact limit is understood.
- Enable hardware checksumming again.
- Make hardware data structure packed.

MFC after:	3 days
2014-07-13 07:39:28 +00:00
Kevin Lo
b11ce478cf Enable 8051 before downloading firmware.
Tested by:	Carlos Jacobo Puga Medina <cpm at fbsd dot es>
2014-07-10 09:42:34 +00:00
Hans Petter Selasky
88e0a63961 Improve support for Intel Lynx Point USB 3.0 controllers by masking
the port routing bits like done in Linux.

MFC after:	1 week
Tested by:	Tur-Wei Chan <twchan@singnet.com.sg>
2014-07-07 05:17:16 +00:00
Hans Petter Selasky
2110950be8 - Disable hardware checksumming until it is properly tested.
- Don't discard frames if the dropped or error flag is set.
- Don't remove the last 4-bytes of every packet.
- Add extra range check for data position offset when receiving data.

MFC after:	1 day
PR:		191432
2014-07-03 10:49:46 +00:00
Hans Petter Selasky
d9b6ab3a76 Fix order of USB serial layer uninit. Currently module dependency
rules prevent the USB serial module to be unloaded before any client
modules. This patch ensures that the "ucom_mtx" mutex is destroyed
last when doing a system uninit in a monotolith build aswell.

MFC after:	3 days
2014-07-01 07:30:29 +00:00
Hans Petter Selasky
31136808a4 Fix for use after free.
MFC after:	3 days
2014-07-01 07:13:41 +00:00
Hans Petter Selasky
af3b2549c4 Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
Glen Barber
37a107a407 Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output,
such as:

 1) no output from sysctl(8)
 2) erroneously returning ENOMEM with tools like truss(1)
    or uname(1)
 truss: can not get etype: Cannot allocate memory
2014-06-27 22:05:21 +00:00
Hans Petter Selasky
3da1cf1e88 Extend the meaning of the CTLFLAG_TUN flag to automatically check if
there is an environment variable which shall initialize the SYSCTL
during early boot. This works for all SYSCTL types both statically and
dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
be used in the case a tunable sysctl has a custom initialisation
function allowing the sysctl to still be marked as a tunable. The
kernel SYSCTL API is mostly the same, with a few exceptions for some
special operations like iterating childrens of a static/extern SYSCTL
node. This operation should probably be made into a factored out
common macro, hence some device drivers use this. The reason for
changing the SYSCTL API was the need for a SYSCTL parent OID pointer
and not only the SYSCTL parent OID list pointer in order to quickly
generate the sysctl path. The motivation behind this patch is to avoid
parameter loading cludges inside the OFED driver subsystem. Instead of
adding special code to the OFED driver subsystem to post-load tunables
into dynamically created sysctls, we generalize this in the kernel.

Other changes:
- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
to "hw.pcic.intr_mask".
- Removed redundant TUNABLE statements throughout the kernel.
- Some minor code rewrites in connection to removing not needed
TUNABLE statements.
- Added a missing SYSCTL_DECL().
- Wrapped two very long lines.
- Avoid malloc()/free() inside sysctl string handling, in case it is
called to initialize a sysctl from a tunable, hence malloc()/free() is
not ready when sysctls from the sysctl dataset are registered.
- Bumped FreeBSD version to indicate SYSCTL API change.

MFC after:	2 weeks
Sponsored by:	Mellanox Technologies
2014-06-27 16:33:43 +00:00
Hans Petter Selasky
561227da30 Add proper rangechecks in "axge_rx_frame()" function and
fix receive loop header parsing.

MFC after:	3 days
PR:		191432
2014-06-27 10:24:36 +00:00
Marius Strobl
cabe79d9d8 Avoid the USB device disconnected and controller shutdown clutter on system
shutdown by putting the former under !rebooting and turning the latter into
debug messages.

Reviewed by:	hps
MFC after:	1 week
Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-06-10 08:20:00 +00:00
Hans Petter Selasky
d64e9217c4 Resolve a deadlock setting the USB configuration index from userspace
on USB HUBs by moving the code into the USB explore threads. The
deadlock happens because child devices of the USB HUB don't have the
expected reference count when called from outside the explore
thread. Only the HUB device itself, which the IOCTL interface locks,
gets the correct reference count.

MFC after:	3 days
2014-06-08 20:10:29 +00:00
Hans Petter Selasky
4a4da38fcf Make WITNESS happy by giving USB mutexes different names.
Reported by:	trociny @
MFC after:	3 days
2014-06-07 15:51:29 +00:00