History log of /freebsd-10.2-release/sys/dev/usb/serial/uslcom.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 285830 23-Jul-2015 gjb

- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.2.
- Update default pkg(8) configuration to use the quarterly branch.[1]

Discussed with: re, portmgr [1]
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 265610 07-May-2014 gavin

Merge r256782 from head:

Add 26 new device IDs to uslcom(4). This brings us in sync with Linux
v3.12 rc5


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 250749 17-May-2013 gavin

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


# 239299 15-Aug-2012 hselasky

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


# 239260 14-Aug-2012 gavin

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.


# 239180 10-Aug-2012 hselasky

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


# 239050 05-Aug-2012 hselasky

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


# 239037 04-Aug-2012 gavin

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


# 238804 26-Jul-2012 gavin

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


# 238803 26-Jul-2012 gavin

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


# 238778 25-Jul-2012 gavin

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


# 227463 12-Nov-2011 hselasky

- This patch adds custom IOCTLs to read and write the 4 GPIO pins on the
cp2103 usb-to-serial chip.
- This patch also makes the line status polling asynchronous, to reduce
the time needed to change the GPIO pins.

Submitted by: JD Louw
MFC after: 1 week


# 227383 09-Nov-2011 hselasky

Some minor corrections to a modem driver.

PR: usb/162307
MFC after: 3 days


# 227309 07-Nov-2011 ed

Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.

The SYSCTL_NODE macro defines a list that stores all child-elements of
that node. If there's no SYSCTL_DECL macro anywhere else, there's no
reason why it shouldn't be static.


# 227108 05-Nov-2011 hselasky

Implement support for modem control lines.
Don't short terminate transmitted BULK data.
Assume that the chip reads one USB packet at a time.

PR: usb/162307
MFC after: 3 days


# 223486 24-Jun-2011 hselasky

- Move all USB device ID arrays into so-called sections,
sorted according to the mode which they support:
host, device or dual mode
- Add generic tool to extract these data:
tools/bus_autoconf

Discussed with: imp
Suggested by: Robert Millan <rmh@debian.org>
PR: misc/157903
MFC after: 14 days


# 217265 11-Jan-2011 jhb

Remove unneeded includes of <sys/linker_set.h>. Other headers that use
it internally contain nested includes.

Reviewed by: bde


# 217200 09-Jan-2011 gavin

Sync the list of devices supported by uslcom(4) with Linux, bringing in
all new devices added between our r211022 and their git revision
93ad03d60b5b18897030038234aa2ebae8234748

Also correct a Foxconn entry.

MFC after: 1 week


# 214843 05-Nov-2010 n_hibma

Implement ucom_set_pnpinfo_usb() providing ttyname and port number
information through devd. My E220 now produces the notification (1 line):

+u3g0 at bus=1 hubaddr=1 port=0 devaddr=2 interface=0 \
vendor=0x12d1 product=0x1003 devclass=0x00 devsubclass=0x00 \
sernum="" release=0x0000 intclass=0xff intsubclass=0xff \
ttyname=U0 ttyports=2 on uhub0

Note: serial/ufoma and net/uhso still provide port number and tty name
(uhso only) information through sysctls, which should now be removed.

Reviewed by: hpselasky


# 214761 03-Nov-2010 n_hibma

- Simplify the way unit/subunit allocation is done in ucom.
- hw.usb.ucom.cons_unit is now split into
hw.usb.ucom.cons_unit/...cons_subunit.

Note: The tunable/sysctl hw.usb.ucom.cons_unit needs to be reviewed if

a) a console was defined a USB serial devices, and a USB device with
more than 1 subunit is present, and this device is attached before the
device functioning as a console

or

b) a console was defined on a USB device with more than 1 subunit

Reviewed by: hps
MFC after: 2 weeks


# 211022 07-Aug-2010 gavin

Sync the list of devices supported by uslcom(4) with NetBSD, Linux, OpenBSD
and BeOS. The devices supported by uslcom(4) are now in sync with:

NetBSD src/sys/dev/usb/uslsa.c 1.11
OpenBSD src/sys/dev/usb/uslcom.c 1.20
Linux source/drivers/usb/serial/cp210x.c from kernel 2.6.35
BeOS usb_serial/driver.c 1.32

Two vendor/product IDs from Linux have not been added to uslcom(4):
SILABS SAEL - This device has special code in u3g to support it
SILABS GSM2228 - I suspect this should also be covered by u3g(4).

MFC after: 1 week


# 210524 27-Jul-2010 gavin

- Support two devices made by West Mountain Radio in uslcom(4) [1]

- Bring in several other devices from OpenBSD while here. Use the
official manufacturer name over the OpenBSD name in the case of
GEMALTO. Reorder list slightly to aid future syncing.

- Remove duplicate SILABS CP2102 define from usbdevs

PR: usb/131912 [1]
Submitted by: Jack Twilley <mathuin gmail.com> [1]
MFC after: 1 week


# 207077 22-Apr-2010 thompsa

Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this had
the illusion of a tunable setting but was always turned on regardless.

MFC after: 1 week


# 201028 26-Dec-2009 thompsa

Use macros to strip off USB_VENDOR_ and USB_PRODUCT_ from some id tables to make
them more compact and readable.


# 197570 28-Sep-2009 thompsa

Add experimental support for usb serial console and polled mode during DDB.

Submitted by: Hans Petter Selasky


# 196219 14-Aug-2009 jhb

Purge mergeinfo from files that were temporarily renamed while USB2 was
imported into the tree alongside USB.

Approved by: re (mergeinfo blanket)


# 194677 23-Jun-2009 thompsa

- Make struct usb_xfer opaque so that drivers can not access the internals
- Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h


# 194228 15-Jun-2009 thompsa

s/usb2_/usb_|usbd_/ on all function names for the USB stack.


# 194099 13-Jun-2009 thompsa

Make variables static where appropriate.

Found by: cscout


# 193045 29-May-2009 thompsa

s/usb2_/usb_/ on all typedefs for the USB stack.


# 192984 28-May-2009 thompsa

s/usb2_/usb_/ on all C structs for the USB stack.


# 192502 21-May-2009 thompsa

Rename the usb sysctl tree from hw.usb2.* back to hw.usb.*.

Submitted by: Hans Petter Selasky


# 192499 21-May-2009 thompsa

- rename usb2_mode to usb_mode [1]
- change variable types to use the enum

Submitted by: Hans Petter Selasky [1]


# 190749 05-Apr-2009 piso

Remove pointeless mergeinfo that crept in from r190633.


# 190734 05-Apr-2009 thompsa

MFp4 //depot/projects/usb@159909

- make usb2_power_mask_t 16-bit
- remove "usb2_config_sub" structure from "usb2_config". To compensate for this
"usb2_config" has a new field called "usb_mode" which select for which mode
the current xfer entry is active. Options are: a) Device mode only b) Host
mode only (default-by-zero) c) Both modes. This change was scripted using
the following sed script: "s/\.mh\././g".
- the standard packet size table in "usb_transfer.c" is now a function, hence
the code for the function uses less memory than the table itself.

Submitted by: Hans Petter Selasky


# 190633 01-Apr-2009 piso

Implement an ipfw action to reassemble ip packets: reass.


# 190581 30-Mar-2009 mav

Integrate user/mav/ata branch:

Add ch_suspend/ch_resume methods for PCI controllers and implement them
for AHCI. Refactor AHCI channel initialization according to it.

Fix Port Multipliers operation. It is far from perfect yet, but works now.
Tested with JMicron JMB363 AHCI + SiI 3726 PMP pair.
Previous version was also tested with SiI 4726 PMP.

Hardware sponsored by: Vitsch Electronics / VEHosting.nl


# 189275 02-Mar-2009 thompsa

Rename the ushub device class back to uhub as it was in the old usb stack,
moused(8) looks for "uhub/ums" to decide if needs to load the module.

Reported by: Garrett Cooper


# 189265 02-Mar-2009 thompsa

Move the serial drivers from Giant to using their own mutexs.

Tested with: u3g, ubser, uplcom


# 188942 23-Feb-2009 thompsa

Move the new USB stack into its new home.


# 188746 18-Feb-2009 thompsa

Switch over to usbdevs.h generated at compile time.


# 188664 15-Feb-2009 thompsa

Make uslcom compile, cut'n'paste errors from uplcom.


# 188413 09-Feb-2009 thompsa

MFp4 //depot/projects/usb; 157069, 157136, 157143, 157145, 157429

- USB serial drivers cleanup, factor out code
- Simplify line state programming
- Integrate uslcom from old USB stack

Submitted by: Hans Petter Selasky