Bug 43009 - mct_u232 usb serial driver return code wrong on ioctl( , TIOCMSET, )
Summary: mct_u232 usb serial driver return code wrong on ioctl( , TIOCMSET, )
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Serial (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Alan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-29 11:01 UTC by Erik Thiele
Modified: 2012-07-01 09:49 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.2.0-1-rt-686-pae #1 SMP PREEMPT RT
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Erik Thiele 2012-03-29 11:01:02 UTC
the documentation on
http://linux.die.net/man/4/tty_ioctl
sais:
Return Value

The ioctl(2) system call returns 0 on success. On error it returns -1
and sets errno appropriately.


opposing to this i straced the following on the mct_u232 driver:

ioctl(5, TIOCMGET, [TIOCM_DTR|TIOCM_RTS]) = 0
ioctl(5, TIOCMSET, [TIOCM_DTR|TIOCM_RTS]) = 1

the returncode of 1 is illegal. i checked for errno value and it is 0
then. please return 0 or set errno accordingly.
Comment 1 Alan 2012-06-18 10:33:49 UTC
Fix queued
Comment 2 Florian Mickler 2012-07-01 09:49:47 UTC
A patch referencing this bug report has been merged in Linux v3.5-rc3:

commit 1aa3c63cf0a79153ee13c8f82e4eb6c40b66a161
Author: Alan Cox <alan@linux.intel.com>
Date:   Tue May 22 20:45:13 2012 +0100

    USB: mct_u232: Fix incorrect TIOCMSET return

Note You need to log in before you can comment on or make changes to this bug.