PERFORCE change 155229 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Wed Dec 24 01:53:39 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=155229
Change 155229 by hselasky at hselasky_laptop001 on 2008/12/24 09:52:59
USB serial drivers must report ENOIOCTL when
the IOCTL is not handled, else MPSAFETTY
will forward the error code to the application!
The USB serial layer will return ENOIOCTL when
there is no ioctl callback present.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb2/serial/uchcom2.c#13 edit
.. //depot/projects/usb/src/sys/dev/usb2/serial/uplcom2.c#14 edit
.. //depot/projects/usb/src/sys/dev/usb2/serial/uvscom2.c#13 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb2/serial/uchcom2.c#13 (text+ko) ====
@@ -74,7 +74,6 @@
#include <dev/usb2/include/usb2_mfunc.h>
#include <dev/usb2/include/usb2_error.h>
#include <dev/usb2/include/usb2_cdc.h>
-#include <dev/usb2/include/usb2_ioctl.h>
#define USB_DEBUG_VAR uchcom_debug
@@ -196,8 +195,6 @@
/* protypes */
-static int uchcom_ioctl(struct usb2_com_softc *, uint32_t, caddr_t, int,
- struct thread *);
static int uchcom_pre_param(struct usb2_com_softc *, struct termios *);
static void uchcom_cfg_get_status(struct usb2_com_softc *, uint8_t *,
uint8_t *);
@@ -297,7 +294,6 @@
.usb2_com_cfg_set_break = &uchcom_cfg_set_break,
.usb2_com_cfg_param = &uchcom_cfg_param,
.usb2_com_pre_param = &uchcom_pre_param,
- .usb2_com_ioctl = &uchcom_ioctl,
.usb2_com_start_read = &uchcom_start_read,
.usb2_com_stop_read = &uchcom_stop_read,
.usb2_com_start_write = &uchcom_start_write,
@@ -738,13 +734,6 @@
*msr = sc->sc_msr;
}
-static int
-uchcom_ioctl(struct usb2_com_softc *ucom, uint32_t cmd, caddr_t data, int flag,
- struct thread *td)
-{
- return (ENOTTY);
-}
-
static void
uchcom_cfg_set_dtr(struct usb2_com_softc *ucom, uint8_t onoff)
{
==== //depot/projects/usb/src/sys/dev/usb2/serial/uplcom2.c#14 (text+ko) ====
@@ -171,8 +171,6 @@
static void uplcom_stop_write(struct usb2_com_softc *);
static void uplcom_cfg_get_status(struct usb2_com_softc *, uint8_t *,
uint8_t *);
-static int uplcom_ioctl(struct usb2_com_softc *, uint32_t, caddr_t, int,
- struct thread *);
static void uplcom_cfg_do_request(struct uplcom_softc *,
struct usb2_device_request *, void *);
@@ -260,7 +258,6 @@
.usb2_com_cfg_set_break = &uplcom_cfg_set_break,
.usb2_com_cfg_param = &uplcom_cfg_param,
.usb2_com_pre_param = &uplcom_pre_param,
- .usb2_com_ioctl = &uplcom_ioctl,
.usb2_com_start_read = &uplcom_start_read,
.usb2_com_stop_read = &uplcom_stop_read,
.usb2_com_start_write = &uplcom_start_write,
@@ -768,13 +765,6 @@
*msr = sc->sc_msr;
}
-static int
-uplcom_ioctl(struct usb2_com_softc *ucom, uint32_t cmd, caddr_t data, int flag,
- struct thread *td)
-{
- return (ENOTTY);
-}
-
static void
uplcom_intr_callback(struct usb2_xfer *xfer)
{
==== //depot/projects/usb/src/sys/dev/usb2/serial/uvscom2.c#13 (text+ko) ====
@@ -172,8 +172,6 @@
static void uvscom_stop_write(struct usb2_com_softc *);
static void uvscom_cfg_get_status(struct usb2_com_softc *, uint8_t *,
uint8_t *);
-static int uvscom_ioctl(struct usb2_com_softc *, uint32_t, caddr_t, int,
- struct thread *);
static void uvscom_cfg_write(struct uvscom_softc *, uint8_t, uint16_t);
static uint16_t uvscom_cfg_read_status(struct uvscom_softc *);
@@ -247,7 +245,6 @@
.usb2_com_cfg_close = &uvscom_cfg_close,
.usb2_com_pre_open = &uvscom_pre_open,
.usb2_com_pre_param = &uvscom_pre_param,
- .usb2_com_ioctl = &uvscom_ioctl,
.usb2_com_start_read = &uvscom_start_read,
.usb2_com_stop_read = &uvscom_stop_read,
.usb2_com_start_write = &uvscom_start_write,
@@ -753,13 +750,6 @@
*msr = sc->sc_msr;
}
-static int
-uvscom_ioctl(struct usb2_com_softc *ucom, uint32_t cmd, caddr_t data, int fflag,
- struct thread *td)
-{
- return (ENOTTY);
-}
-
static void
uvscom_cfg_write(struct uvscom_softc *sc, uint8_t index, uint16_t value)
{
More information about the p4-projects
mailing list