summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/serial/usb_serial.h
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>2010-11-03 21:50:49 +0000
committern_hibma <n_hibma@FreeBSD.org>2010-11-03 21:50:49 +0000
commit0850594b2bfebda9bb43e482518bfba7ab603377 (patch)
treed8dadea89d8c948ce0d2dfa99cdd1e2a720a6e54 /sys/dev/usb/serial/usb_serial.h
parent06824871e773f65faaf3bc5bb9ca1d6d91f4711c (diff)
downloadFreeBSD-src-0850594b2bfebda9bb43e482518bfba7ab603377.zip
FreeBSD-src-0850594b2bfebda9bb43e482518bfba7ab603377.tar.gz
- 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
Diffstat (limited to 'sys/dev/usb/serial/usb_serial.h')
-rw-r--r--sys/dev/usb/serial/usb_serial.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/usb/serial/usb_serial.h b/sys/dev/usb/serial/usb_serial.h
index 7f7590b..eb2cc8a 100644
--- a/sys/dev/usb/serial/usb_serial.h
+++ b/sys/dev/usb/serial/usb_serial.h
@@ -104,7 +104,7 @@ struct ucom_callback {
void (*ucom_stop_read) (struct ucom_softc *);
void (*ucom_start_write) (struct ucom_softc *);
void (*ucom_stop_write) (struct ucom_softc *);
- void (*ucom_tty_name) (struct ucom_softc *, char *pbuf, uint16_t buflen, uint16_t local_subunit);
+ void (*ucom_tty_name) (struct ucom_softc *, char *pbuf, uint16_t buflen, uint16_t unit, uint16_t subunit);
void (*ucom_poll) (struct ucom_softc *);
};
@@ -132,6 +132,8 @@ struct ucom_param_task {
struct ucom_super_softc {
struct usb_process sc_tq;
+ uint32_t sc_unit;
+ uint32_t sc_subunits;
};
struct ucom_softc {
@@ -158,10 +160,10 @@ struct ucom_softc {
const struct ucom_callback *sc_callback;
struct ucom_super_softc *sc_super;
struct tty *sc_tty;
+ char sc_devname[10];
struct mtx *sc_mtx;
void *sc_parent;
- uint32_t sc_unit;
- uint32_t sc_local_unit;
+ uint32_t sc_subunit;
uint16_t sc_portno;
uint16_t sc_flag;
#define UCOM_FLAG_RTS_IFLOW 0x01 /* use RTS input flow control */
@@ -191,8 +193,7 @@ struct ucom_softc {
int ucom_attach(struct ucom_super_softc *,
struct ucom_softc *, uint32_t, void *,
const struct ucom_callback *callback, struct mtx *);
-void ucom_detach(struct ucom_super_softc *,
- struct ucom_softc *, uint32_t);
+void ucom_detach(struct ucom_super_softc *, struct ucom_softc *);
void ucom_status_change(struct ucom_softc *);
uint8_t ucom_get_data(struct ucom_softc *, struct usb_page_cache *,
uint32_t, uint32_t, uint32_t *);
OpenPOWER on IntegriCloud