Commit Graph

288 Commits

Author SHA1 Message Date
Ian Lepore
fc43ff0865 Add support to the uftdi driver for reading and writing the serial eeprom
that can be attached to the chips, via ioctl() calls.
2015-08-06 19:29:26 +00:00
Hans Petter Selasky
0de2373fa2 Add new USB ID.
PR:		199843
MFC after:	1 week
2015-05-05 19:34:23 +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
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
Ian Lepore
78261920b0 The "get latency" and "get bitmode" device commands are read operations,
not writes.
2015-04-10 13:20:31 +00:00
Hans Petter Selasky
efccd9f054 Switch polarity of PPS events.
PR:		196897
Submitted by:	ian @
MFC after:	1 week
2015-03-08 08:34:49 +00:00
Hans Petter Selasky
ef826045f8 Use correct mode variable for PPS support.
PR:		196897
Submitted by:	ian @
MFC after:	1 week
2015-03-07 22:46:35 +00:00
Hans Petter Selasky
bb057644cf Add PPS support to USB serial drivers.
Bump kernel version to reflect structure change.

PR:		196897
MFC after:	1 week
2015-03-07 18:25:58 +00:00
Hans Petter Selasky
68492bc279 Add more USB IDs.
PR:		197753
MFC after:	1 week
2015-03-07 17:11:07 +00:00
Dmitry Chagin
5fea5a57b6 Add Neoway WM620 module ID.
MFC after:	1 Week
2015-02-08 11:55:29 +00:00
Hans Petter Selasky
c8563d530c Add more USB device IDs.
Submitted by:	max.n.boyarov@gmail.com
PR:		196362
MFC after:	1 week
2015-01-16 12:16:21 +00:00
Hans Petter Selasky
27aae1967d Add support for USB device side mode to the USB modem driver.
MFC after:	1 week
Submitted by:	br@
2015-01-09 18:40:12 +00:00
Hans Petter Selasky
ece4b0bd43 Make a bunch of USB debug SYSCTLs tunable, so that their value(s) can
be set before the USB device(s) are probed.
2015-01-05 15:04:17 +00:00
Hans Petter Selasky
3d9b56b045 Resolve USB driver identification conflict.
Reported by:	Anish Mistry <amistry@am-productions.biz>
MFC after:	1 week
2014-12-15 09:23:40 +00:00
Hans Petter Selasky
431088e693 Add more U3G USB IDs.
Submitted by:	Benediktus Anindito <bennybroz105@gmail.com>
MFC after:	1 week
2014-12-08 10:49:23 +00:00
Hans Petter Selasky
e470cd2382 Add new USB IDs.
Submitted by:	G'abor Zahemszky <gabor@zahemszky.hu>
MFC after:	1 week
2014-11-07 11:04:27 +00:00
Hans Petter Selasky
e17bdf9f1b Add support for new USB 3G device.
Submitted by:	gabor@zahemszky.hu
MFC after:	1 week
2014-10-18 15:11:13 +00:00
Hans Petter Selasky
d60bfba9d6 Add support for new USB 3G device.
Submitted by:	gabor@zahemszky.hu
MFC after:	1 week
2014-10-17 13:40:17 +00:00
Joerg Wunsch
374e43f2e3 Add the Dresden Elektronik deRFnode device to uftdi(4).
MFC after:	1 week
2014-10-16 19:53:32 +00:00
Hans Petter Selasky
9dc2190371 Add new USB IDs.
PR:		193775
MFC after:	1 week
2014-09-19 16:06:54 +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
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
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
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
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
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
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
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
Ian Lepore
0a34210d99 The FTDI product ID we've been calling BEAGLEBONE is actually TI XDS100V2,
a jtag debugging product, which was used on early Beaglebone boards (later
boards used a standard FTDI 2232C product ID).  Change the name accordingly,
and also add an entry for XDS100V3, the latest version of that product
which has its own new product ID number.
2014-04-25 19:47:27 +00:00
Ian Lepore
74855db616 Remove device type from the uftdi_devs table, enhance the jtag-skip feature.
Device type and revision is now determined from the bcdDevice field and
doesn't need to be in the table at all.  The feature that skips creation
of /dev/ttyU* entries for jtag and gpio interfaces is enhanced:

 - The feature is now optional, but enabled by default.  A tunable and
   sysctl are available to control it: hw.usb.uftdi.skip_jtag_interfaces.
 - We no longer assume interface #0 is the only jtag interface.  Up to
   eight interfaces per chip can be flagged as jtag.  (Current ftdi chips
   support a max of 4 interfaces; this leaves room for growth.)
 - Some manufacturers don't change the product ID or use the same ID for
   different devices intended for both serial-comms and jtag/gpio use.
   Often while the product ID is the same, the product name string is
   different, so it's now possible to search for the product name in a
   table of strings and get the set of non-tty interfaces from that table.
2014-04-25 19:13:57 +00:00
Kevin Lo
66b8205e11 Oops, revert r264801. 2014-04-23 05:54:55 +00:00
Kevin Lo
0f009f73b9 Add a missing break. 2014-04-23 05:53:03 +00:00
Hans Petter Selasky
543b6e5899 - Get transmit loop more in line with the other serial drivers.
- Add a comment about FTDI and ZLPs.
- Correctly check odditiy of baud rate divisor.
- Correct IOCTL handling for "error" and "event" char.

MFC after:	1 weeks
2014-04-23 05:50:55 +00:00
Ian Lepore
a9d84a2ba7 Add ioctl(2) calls to uftdi(4) to access bitbang, MPSSE, CPU_FIFO, and
other modes supported by the FTDI serial adapter chips.

In addition to adding the new ioctls, this change removes all the code
that reset the chip at attach and open/close time, and also the code
that turned on RTS/CTS flow control on open without any permission to do
so (that was just always a bug in the driver).

When FTDI chips are configured as GPIO or MPSSE or other special-purpose
uses by an attached serial eeprom, the chip will power on with certain
pins driven or floating, and it's important that the driver not do
anything to the chip to perturb that unless it receives a specific
command to do so.  When used for "plain old serial comms" the chip
powers on into the right mode and never needs to be reset while it's
running to operate properly, so this change is transparent to most users.
2014-04-05 16:08:13 +00:00
Joerg Wunsch
9f7fef595d Add the Dresden Elektronik "USB Levelshifter Stick Low Cost" to the
list of known FTDI devices.

https://shop.dresden-elektronik.de/accessories/levelshifter/usb-pegelwandler-stick-basic.html

MFC after:	1 week
2014-04-03 20:00:02 +00:00
Ian Lepore
07a5254736 Use 2K buffers for IO to help achieve full device speed, rather than the
default wMaxPacketSize (64 or 512 bytes).  This actually helps older FTDI
devices (which were USB 1/full speed) more than the new H-series high
speed, but even for the new chips it helps cut the number of interrupts
when doing very high speed (3-12mbaud).
2014-04-02 01:58:54 +00:00
Ian Lepore
9537ab6cc8 Support serial speeds up to 12mbaud with newer FTDI chips.
Recent FDTI chips have the ability to operate at up to 12mbps.  The newer
chips with faster clocks have the same usb vendor/product IDs as the older
chips; the bcdDevice field must be used to detect the newer versions.  This
change includes a new function to do that instead of using just the IDs from
the vendor/product table.

The code to choose the baud clock divisor is completely rewritten.  In
addition to supporting the new higher clock rates, the rewrite fixes a
longstanding bug in the old code which put the high bits of the fractional
part of the divisor into the wrong place in the wIndex field.  That bug
was mostly harmless -- it accidentally didn't affect standard baud rates
and would only show up when using relatively fast non-standard rates.
2014-04-01 15:56:31 +00:00
Ed Maste
0fcefb433d Update NetBSD Foundation copyrights to 2-clause BSD
The NetBSD Foundation states "Third parties are encouraged to change the
license on any files which have a 4-clause license contributed to the
NetBSD Foundation to a 2-clause license."

This change removes clauses 3 and 4 from copyright / license blocks that
list The NetBSD Foundation as the only copyright holder.

Sponsored by:	The FreeBSD Foundation
2014-03-18 01:40:25 +00:00
Hans Petter Selasky
b353507895 Don't do synchronous USB requests inside USB transfer callbacks. It is
technically OK, but not recommended.

MFC after:	1 weeks
2014-01-12 11:44:28 +00:00
Hans Petter Selasky
5199761b66 Move USB ID from u3g driver to uhso driver.
Submitted by:	Lundberg, Johannes <johannes@brilliantservice.co.jp>
MFC after:	1 week
2014-01-11 07:53:03 +00:00
Don Lewis
3ca52b0d34 Add alternate ID for Novatel MiFi 2200 CDMA, which is used by my
Virgin Mobile branded device.  It needs the U3GINIT_SCSIEJECT quirk.

Reviewed by:	hselasky
MFC after:	1 month
2013-11-20 02:16:47 +00:00
Adrian Chadd
c48efaecf6 Allow the Arduino Leonardo to work by supporting CDC=0 devices.
CDC=0 simply means "no command codes", CDC=1 means "AT command codes."
There's no driver change required!  It's purely to tell the application
layer whether to speak AT commands or not.  Things are all still serial.

PR:		usb/183505
Reviewed by:	hps
MFC after:	1 week
2013-10-31 13:54:51 +00:00
Nick Hibma
d884c4ddaa Add id for GTM661W. 2013-10-25 19:39:22 +00:00
Gavin Atkinson
ee0d8611db Add 26 new device IDs to uslcom(4). This brings us in sync with Linux
v3.12 rc5.

MFC after:	3 days
2013-10-20 11:19:37 +00:00
Ian Lepore
e5efecdbeb Add the device ID for a new flavor of FTDI serial adapter (model 232EX). 2013-09-01 14:15:31 +00:00
Remko Lodder
80196fbd91 Add support for the NTT Docomo L-02C card.
PR:		180017
Submitted by:	Masaharu FUJITA
Glanced at by:	imp
MFC after:	1 week
2013-06-27 09:06:00 +00:00
Thomas Quinot
73ecbbb39c Revert previous change to uark.c (restore previous rev), which was
committed by mistake.
2013-06-23 20:22:49 +00:00
Thomas Quinot
9aa5c929ba Fix minor typo in comment 2013-06-23 20:19:51 +00:00
Gavin Atkinson
1c6951aeb6 o Retrive the part number (CP2103 etc) from the hardware on attach.
o  The CP2101 and CP2102 do not support GPIO pin use at all, enforce this.
o  Support reading the GPIO status on the second port of the CP2105.  More
   work is needed before the CP2105 GPIO pins can be used as outputs.

Hardware donated by:	Silicon Labs
MFC after:		3 weeks
2013-05-17 19:13:31 +00:00
Eitan Adler
a164074fc4 Fix several typos
PR:		kern/176054
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
MFC after:	3 days
2013-05-12 16:43:26 +00:00
Hans Petter Selasky
a1e969b8b2 Add new USB ID.
PR:		usb/177666
Submitted by:	Nicolai Petri <nicolai@petri.dk>
2013-04-06 17:00:11 +00:00
Hans Petter Selasky
565d8205f3 Add new USB ID.
PR:		usb/177105
MFC after:	1 week
2013-03-19 12:52:13 +00:00
Gavin Atkinson
cd4c88cad4 Add support for Optoelectronics USB barcode readers to uftdi(4).
Add entries for other Optoelectronics devices to usbdevs.

MFC after:	1 week
2013-03-11 22:17:39 +00:00
Hans Petter Selasky
b7f9bfb502 Add new USB ID to FTDI driver.
MFC after:	1 week
PR:		kern/175893
Submitted by:	Tomek
2013-02-13 08:28:27 +00:00
Hans Petter Selasky
c25ca7790c Add new u3g device quirk.
Submitted by:	Lowell Gilbert
MFC after:	1 week
2013-01-14 17:41:04 +00:00
Hans Petter Selasky
92e2321883 Add new USB ID.
PR:		usb/174814
Submitted by:	Andy Balholm
MFC after:	1 week
2012-12-29 21:22:38 +00:00
Hans Petter Selasky
3d6709a572 Make sure we block recursion on TTY's inwakeup callback
Suggested by:	davide
MFC after:	1 week
2012-12-20 16:21:02 +00:00
Hans Petter Selasky
9fbf6da58c Add new USB ID.
MFC after:	1 week
Submitted by:	Artyom Mirgorodskiy
2012-12-09 09:58:44 +00:00
Eitan Adler
1a12569c85 Add support for AT&T Sierra Wireless USB 3G adapter
PR:		kern/173982
Submitted by:	Eric Camachat <eric@camachat.org>
Approved by:	cperciva (implicit)
MFC after:	1 week
2012-11-29 00:32:03 +00:00
Hans Petter Selasky
9efb73396e Fix uplcom clear stall logic for PL2303HX.
Submitted by:	Mark Johnston
MFC after:	1 week
2012-11-21 22:04:40 +00:00
Hans Petter Selasky
b70f0569e8 Add new USB IDs.
MFC after:	1 week
PR:		usb/173503
2012-11-12 07:25:51 +00:00
Hans Petter Selasky
9a630052d4 Add lock asserts instead of "auto-locking".
MFC after:	1 weeks
Suggested by:	ed @
2012-11-07 18:59:42 +00:00
Hans Petter Selasky
3b8e984374 The tty_inwakeup callback appears to be called both locked and unlocked.
Handle the required locking automatically for now.

MFC after:	1 weeks
2012-11-07 18:44:05 +00:00
Hans Petter Selasky
3e2d883535 Patch to improve USB serial console.
MFC after:	1 weeks
Submitted by:	Bruce Evans
2012-11-07 08:13:56 +00:00
Hans Petter Selasky
d30d96ea57 Add a jitter buffer in the common USB serial driver code which
temporarily stores characters if the TTY buffer is full when
used a as a console. This can happen when a console is suspended.
Also properly do the flow stop signalling when this happens and
flow start when the condition changes back to normal again.

Bump __FreeBSD_version to force external kernel modules
to be recompiled. No kernel API changes.

MFC after:	1 week
Suggested by:	ed @
2012-11-05 17:50:40 +00:00
Hans Petter Selasky
83cadd7dcc Add missing CTLFLAG_TUN flag to tunable sysctls in USB stack.
Rearrange the tunables and belonging sysctl declarations, so
that they are next to eachother.

Submitted by:	n_hibma @
MFC after:	1 week
2012-10-26 06:04:47 +00:00
Nick Hibma
da016e84de Implement modem control in u3g. Tested on Option GTM382W, Huawei E220,
and Sierra Wireless MC8790V. Also implement the .ucom_poll method.

Note: This makes it possible to use lqr/echo in ppp.conf. And it
resolves ppp hanging during the PPp> phase.

Reviewed by:	hps
MFC after:	1 week
2012-10-14 19:15:54 +00:00
Hans Petter Selasky
3c12706c5e Correct driver name.
MFC after:	1 weeks
2012-09-23 09:39:04 +00:00
Kevin Lo
26f370d011 Fix typo: s/protocl/protocol 2012-09-20 10:07:31 +00:00
Kevin Lo
92665d2b55 Restart the USB transfer if the error is not USB_ERR_CANCELLED. 2012-09-12 07:59:28 +00:00
Gavin Atkinson
5163813777 Support another uchcom(4) device.
MFC after:	1 week
2012-09-04 23:13:24 +00:00
Hans Petter Selasky
6623910e4a Add new USB device ID.
Submitted by:	Dmitry Luhtionov
MFC after:	1 week
2012-08-22 18:30:13 +00:00
Hans Petter Selasky
c01fc06ee9 Revert r239178 and implement two new functions, namely
"device_free_softc()" and "device_claim_softc()",
to allow USB serial drivers refcounting the softc.
These functions are used to grab the softc from
auto-free and to free the softc back to the correct
malloc type, respectivly.

Discussed with:	jhb
MFC after:	2 weeks
2012-08-15 15:42:57 +00:00
Gavin Atkinson
c64253a898 Rename command defines to match names used in the datasheet, in order to
make maintaining this driver from the documentation easier in the future.
This is a mostly mechanical change.

In uslcom_param(), move the zeroing of the final two fields of the
flowctrl structure outside of the "if CRTSCTS" section - not only were
they being zeroed in both the clauses, but these two fields have nothing
to do with hardware flow control anyway.
2012-08-14 22:21:46 +00:00
Hans Petter Selasky
65b31289ae Style.
MFC after:	2 weeks
2012-08-10 17:43:20 +00:00
Hans Petter Selasky
1216d2c543 Remove unused structure field.
MFC after:	2 weeks
2012-08-10 17:42:14 +00:00
Hans Petter Selasky
5805d1782d Take advantage of new UCOM and bus functionality so that
the device_detach() function doesn't block on UCOM device
drivers until the TTY handle is closed by the userspace
application. This is implemented by a postpone of the
softc free where the UCOM structures reside until the
TTY references are gone.

Discussed with:	kib, ed
MFC after:	2 weeks
2012-08-10 15:29:41 +00:00
Hans Petter Selasky
8f42c74844 Switch unit management in UCOM to unrhdr.
Extend the callback table of UCOM to include a
"ucom_free" function pointer which is called when
all refs on a UCOM super structure is gone.

Implement various helper functions to handle
refcounting and draining on the UCOM super
structure.

Implement macro which can be used in device
drivers to avoid module unload before all
pending TTY references are gone.

The UCOM API is backwards compatible after this
change and device drivers require no changes
to function with this change. Only a recompilation
of UCOM device drivers is required. The FreeBSD
version has been bumped in that regard.

Discussed with:	kib, ed
MFC after:	2 weeks
2012-08-10 15:21:12 +00:00
Hans Petter Selasky
3426950e9c Update the list of devices supported by the FTDI driver. It might be
that the wrong UART reference clock will be used for a few of the IDs.
It is currently not possible to figure that out because the Linux FTDI
driver detects this run-time and not compile time based on the bcdDevice
field of the USB device descriptor. Some of the ID's in usbdevs are not
sorted according to the product ID value. Please feel free to fix this.
I'm out of my xemacs magic today.

This syncronises us with the linux kernel at kernel.org (HEAD).

MFC after:	2 weeks
2012-08-05 11:50:56 +00:00
Hans Petter Selasky
7a27d904bd Minor style nit:
Use the interface number from the USB interface descriptor
like in the other USB serial drivers. These numbers are not
supposed to be different, though in theory they can. Make sure
that the driver then uses the interface number given by the USB
descriptor, and not the logical index of the USB stack.

For the future:
Whenever the term "index" is used in the USB code, it refers to
a number computed by the USB stack.
Whenever the term "number" is used in the USB code, it refers to
a number in a USB descriptor.

MFC after:	2 weeks
2012-08-05 08:56:29 +00:00
Gavin Atkinson
b5ba3bdb25 Support multiple interface devices. The driver had previously hardcoded
support for only the first port, but the CP2105 can have multiple ports.
Although this allowed the first port to mostly work on multi port devices,
there could be issues with this arrangement.

Update the man page to reflect support for both ports and the CP2105.

Many thanks to Silicon Labs (www.silabs.com) for providing a CP2105-EK
dev board for testing.

MFC after:	2 weeks
2012-08-04 15:11:36 +00:00
Gavin Atkinson
a713d656da Improve descriptions for several devices supported by uslcom(4).
Correct the spelling of the company Telegesis.
Move MpMan to the correct location alphabetically.

MFC after:	2 weeks
2012-07-26 12:18:23 +00:00
Gavin Atkinson
78a1f1400f Add support for more devices to uslcom(4). This commit syncronises the
list of supported devices with the union of:

NetBSD  src/sys/dev/usb/uslsa.c 1.18
OpenBSD src/sys/dev/usb/uslcom.c 1.24
Linux   source/drivers/usb/serial/cp210x.c HEAD

Remove duplicate JABLOTRON PC60B entry.

Note that some of the devices added here are multi-port devices.  The
uslcom(4) driver currently only supports the first port on such devices.

Update the man page to reflect the full list of supported devices.
Remove two caveats from the CAVEATS section, as both listed caveats no
longer apply.  Add a caveat about multi-port devices.

MFC after:	2 weeks
2012-07-26 12:10:19 +00:00
Gavin Atkinson
0ba4723b9e The baud rate on CP1201/2/3 devices can be set in one of two ways:
- The USLCOM_SET_BAUD_DIV command (0x01)
 - The USLCOM_SET_BAUD_RATE command (0x13)

Devices based on the CP1204 will only accept the latter command, and ignore
the former.  As the latter command works on all chips that this driver
supports, switch to always using it.

A slight confusion here is that the previously used command was incorrectly
named USLCOM_BAUD_RATE - even though we no longer use it, rename it to
USLCOM_SET_BAUD_DIV to closer match the name used in the datasheet.

This change reflects a similar change made in the Linux driver, which was
submitted by preston.fick at silabs.com, and has been tested on all of the
uslcom(4) devices I have to hand.

MFC after:	2 weeks
2012-07-25 20:46:22 +00:00
Gavin Atkinson
d01755ed20 Update the list of devices supported by uplcom. Although this only adds
one device (support for Motorola cables), this syncronises us with:

OpenBSD src/sys/dev/usb/uplcom.c 1.56
NetBSD  src/sys/dev/usb/uplcom.c 1.73
Linux   kernel.org HEAD

MFC after:	1 week
2012-07-25 11:33:43 +00:00
Eygene Ryabinkin
411e2f7fc8 u3g: add support for Huawei E392 LTE modem
I am using it rebranded and it carries the label "Megafon"
(it is Russian mobile operator); works fine with my 3G network.

Approved by: hselasky
2012-07-23 14:22:45 +00:00
Hans Petter Selasky
c6b5a9a02b Add new USB device ID.
PR:		usb/169789
Submitted by:	Ruslan Bukin
MFC after:	1 week
2012-07-16 10:12:07 +00:00
Hans Petter Selasky
6446f79981 Add new USB device ID.
PR:		usb/169789
MFC after:	1 week
2012-07-16 09:35:47 +00:00
Hans Petter Selasky
48804d9c0e Add new USB device ID.
PR:		usb/169789
MFC after:	1 week
2012-07-15 18:12:09 +00:00
Hans Petter Selasky
583cd66931 Add new USB device ID.
Submitted by:	Erich Dollansky
MFC after:	1 week
2012-07-03 16:32:47 +00:00
Marius Strobl
f3b44896bb Refine r237102 a bit:
- Anounce JTAG interfaces deliberately skipped.
- Bring back empty lines too eagerly removed.

MFC after:	3 days
2012-06-18 19:18:31 +00:00
Marius Strobl
a589806b07 - Add support for the FT2232 based egnite Turtelizer 2 JTAG/RS232 Adapter.
This includes adding support for skipping FTDI interfaces used for JTAG
  leaving them for userland and just attaching to the RS232 half, similarly
  to how the corresponding Linux drivers handles these kind of adapters.
  While at it, sort uftdi_devs and return BUS_PROBE_SPECIFIC (because
  uftdi_probe() alters the instance variables for better or worse as do
  other probe routines of USB drivers) instead of 0.
- Remove duplicated entries for BeagleBone.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Remove some stray lines.

MFC after:	3 days
2012-06-14 21:16:19 +00:00
Kevin Lo
03167052c4 Add support for the SIMCom SIM5218, tested by me. 2012-04-21 14:30:51 +00:00
Thomas Quinot
4815449e08 Fix typo in comment 2012-04-18 12:50:13 +00:00
Hans Petter Selasky
6d917491f5 Fix compiler warnings, mostly signed issues,
when USB modules are compiled with WARNS=9.

MFC after:	1 weeks
2012-04-02 10:50:42 +00:00
Hans Petter Selasky
b733be57cc Add new USB device IDs.
PR:		usb/165815
MFC after:	1 week
2012-03-08 07:22:41 +00:00
Hans Petter Selasky
a40c00a535 Add new USB device ID.
MFC after:	3 days
PR:		usb/165154
2012-02-14 21:36:55 +00:00