Skip to content

Commit 63443a0

Browse files
Flashedjhovold
authored andcommitted
USB: serial: ark3116: remove dummy TIOCSSERIAL ioctl
The patch removes unused TIOCSSERIAL ioctl case and adds the default block to the switch. This will make the ioctl return -ENOTTY to user space (e.g. setserial), which indicates that TIOCSSERIAL really isn't supported for these devices currently. Note that these (dummy) ioctl implementations where added by commit 2f430b4 ("USB: ark3116: Add TIOCGSERIAL and TIOCSSERIAL ioctl calls.") back in 2006. This in turn appears to have been triggered by a change in a user space tool, wvdial, which started erroring out if either was missing. There are some bug reports about that against wvdial from around that time, and looking at the wvstreams (library) code now, it looks like the issue has indeed been resolved by handling errors more gracefully (e.g. just logging them). User space really should not make assumptions about these ioctl always being implemented, but if this turns out to be a problem for anyone using this driver, we'll add TIOCSSERIAL back in some form. Signed-off-by: Mikhail Zaytsev <flashed@mail.ru> [johan: amend commit message with backstory ] Signed-off-by: Johan Hovold <johan@kernel.org>
1 parent c7b8f77 commit 63443a0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/usb/serial/ark3116.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,8 @@ static int ark3116_ioctl(struct tty_struct *tty,
418418
return -EFAULT;
419419

420420
return 0;
421-
case TIOCSSERIAL:
422-
if (copy_from_user(&serstruct, user_arg, sizeof(serstruct)))
423-
return -EFAULT;
424-
return 0;
421+
default:
422+
break;
425423
}
426424

427425
return -ENOIOCTLCMD;

0 commit comments

Comments
 (0)