diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-20 23:26:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-24 19:20:32 -0400 |
commit | 3d940b7d27c5fec35de66449836ab9a01575447c (patch) | |
tree | 828d2c62f530a7ebd9d40588b970c24d8131d4ea /drivers/usb/serial/symbolserial.c | |
parent | 68b44eaed5def7b6490c23c3e88c6f2ccec57beb (diff) |
USB: symbolserial: log the ioctl commands
We need to figure out what userspace programs are expecting from this
driver, so log them so we can try to get it right.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/symbolserial.c')
-rw-r--r-- | drivers/usb/serial/symbolserial.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c index c5990fd88e2c..8b3cbc87adc7 100644 --- a/drivers/usb/serial/symbolserial.c +++ b/drivers/usb/serial/symbolserial.c | |||
@@ -205,6 +205,62 @@ static void symbol_unthrottle(struct tty_struct *tty) | |||
205 | __func__, result); | 205 | __func__, result); |
206 | } | 206 | } |
207 | 207 | ||
208 | static int symbol_ioctl(struct tty_struct *tty, struct file *file, | ||
209 | unsigned int cmd, unsigned long arg) | ||
210 | { | ||
211 | struct usb_serial_port *port = tty->driver_data; | ||
212 | struct device *dev = &port->dev; | ||
213 | |||
214 | /* | ||
215 | * Right now we need to figure out what commands | ||
216 | * most userspace tools want to see for this driver, | ||
217 | * so just log the things. | ||
218 | */ | ||
219 | switch (cmd) { | ||
220 | case TIOCSERGETLSR: | ||
221 | dev_info(dev, "%s: TIOCSERGETLSR\n", __func__); | ||
222 | break; | ||
223 | |||
224 | case TIOCGSERIAL: | ||
225 | dev_info(dev, "%s: TIOCGSERIAL\n", __func__); | ||
226 | break; | ||
227 | |||
228 | case TIOCMIWAIT: | ||
229 | dev_info(dev, "%s: TIOCMIWAIT\n", __func__); | ||
230 | break; | ||
231 | |||
232 | case TIOCGICOUNT: | ||
233 | dev_info(dev, "%s: TIOCGICOUNT\n", __func__); | ||
234 | break; | ||
235 | default: | ||
236 | dev_info(dev, "%s: unknown (%d)\n", __func__, cmd); | ||
237 | } | ||
238 | return -ENOIOCTLCMD; | ||
239 | } | ||
240 | |||
241 | static int symbol_tiocmget(struct tty_struct *tty, struct file *file) | ||
242 | { | ||
243 | struct usb_serial_port *port = tty->driver_data; | ||
244 | struct device *dev = &port->dev; | ||
245 | |||
246 | /* TODO */ | ||
247 | /* probably just need to shadow whatever was sent to us here */ | ||
248 | dev_info(dev, "%s\n", __func__); | ||
249 | return 0; | ||
250 | } | ||
251 | |||
252 | static int symbol_tiocmset(struct tty_struct *tty, struct file *file, | ||
253 | unsigned int set, unsigned int clear) | ||
254 | { | ||
255 | struct usb_serial_port *port = tty->driver_data; | ||
256 | struct device *dev = &port->dev; | ||
257 | |||
258 | /* TODO */ | ||
259 | /* probably just need to shadow whatever was sent to us here */ | ||
260 | dev_info(dev, "%s\n", __func__); | ||
261 | return 0; | ||
262 | } | ||
263 | |||
208 | static int symbol_startup(struct usb_serial *serial) | 264 | static int symbol_startup(struct usb_serial *serial) |
209 | { | 265 | { |
210 | struct symbol_private *priv; | 266 | struct symbol_private *priv; |
@@ -311,6 +367,9 @@ static struct usb_serial_driver symbol_device = { | |||
311 | .shutdown = symbol_shutdown, | 367 | .shutdown = symbol_shutdown, |
312 | .throttle = symbol_throttle, | 368 | .throttle = symbol_throttle, |
313 | .unthrottle = symbol_unthrottle, | 369 | .unthrottle = symbol_unthrottle, |
370 | .ioctl = symbol_ioctl, | ||
371 | .tiocmget = symbol_tiocmget, | ||
372 | .tiocmset = symbol_tiocmset, | ||
314 | }; | 373 | }; |
315 | 374 | ||
316 | static int __init symbol_init(void) | 375 | static int __init symbol_init(void) |