Hi,
> this makes me think something is wrong with the data structure.
> We should have a be32 there, it seems to me.
You mean something like :
struct ti_write_data_bytes {
u8 bAddrType;
u8 bDataType;
u8 bDataCounter;
__be32 wBaseAddr;
u8
> in that case, where is the initialisation to 0 you avoid and hence
> can remove from the code?
Hi,
In v1, kzalloc was useful to avoid wFlags initialisation to 0 :
https://lkml.org/lkml/2016/5/12/139
In v2 wFlags initialisation has be removed so this patch has no purpose
anymore, my bad.
Tha
Use C_X tty.h macros to avoid direct manipulation of termios
c_cflag variable.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb
Hi Johan,
Thanks for your review ! Here is the v2 of the serie.
I didn't resubmit patches related to the switch to generic
implementation (open, close, read and write).
I will work on them later when this first batch will be
pushed.
Thank you,
Mathieu
Mathieu OTHACEHE (22):
usb: s
__uX types should only be used for user-space interactions.
Signed-off-by: Mathieu OTHACEHE
---
Changelog:
v2:
* Replace cpu_to_be16s calls by cpu_to_be16
* Remove other useless casts
drivers/usb/serial/ti_usb_3410_5052.c | 101 +-
1 file changed, 51 insertions
Remove useless ti_device pointer, and change addr to u32.
Change size variable in function from int to size_t.
Also fix minor style issue.
Signed-off-by: Mathieu OTHACEHE
---
Changelog:
v2:
* Do not delete prototype and move function declaration
drivers/usb/serial/ti_usb_3410_5052.c | 20
It is useless to pass a specific context (ti_device) to the interrupt
callback. So use the default context (usb_serial_port).
Remove useless variables in ti_interrupt_callback.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 58 ---
1
It is sufficient to pass usb_serial_port structure to ti_get_serial_info
and ti_set_serial_info.
Also use unsigned int instead of unsigned for cwait variable.
Signed-off-by: Mathieu OTHACEHE
---
Changelog:
v2:
* Do not remove prototypes and move functions declarations.
drivers/usb/serial
tty_wakeup is already called when blocked bulk-out transfers complete.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
index
Use the format "error text: error value\n" when possible.
Drop redundant function names from error messages.
Also move a couple err messages to dbg messages.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 105 --
1 file c
It is useless to check the return of usb_get_serial_port_data.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 34 +-
1 file changed, 1 insertion(+), 33 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb
Use macros to define 3410 and 5052 baud bases.
Use macro to define usb download timeout.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 22 +++---
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b
to do any padding.
This patch also move firmware buffer manipulation to ti_do_download
function.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 61 +++
1 file changed, 33 insertions(+), 28 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_
The old_termios parameter is never used in set_termios callback.
Add a check to old_termios to see if we can return right away because
there is nothing to change.
Also pass NULL for old_termios in open callback because it is the
initial call to set_termios.
Signed-off-by: Mathieu OTHACEHE
Use variables for vendor and product in download_firmware to improve
readability.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb
Remove variables affected but never read.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
index 29bb62c..2b7fe89 100644
--- a
mmand
sending.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 157 +++---
1 file changed, 88 insertions(+), 69 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
index b5f3328..e8515eb 1
Use kzalloc instead of kmalloc to avoid field initialisation to 0.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
index
Save msr before testing the delta and waking up any waiters.
Also use port directly instead of tport->tp_port.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/ser
Add CMSPAR support in set_termios callback.
Move TI_UART_ENABLE_PARITY_CHECKING setting in the upper
block to avoid doing it twice.
Delete useless TI_UART_ENABLE_PARITY_CHECKING unsetting.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 19 ++-
1 file
If speed is non null anymore, we can raise DTR and RTS flags in
ti_set_termios.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
index
Setting DTR/RTS is handled using dtr_rts in tty_core.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
index 3a88c2f..b5ea850 100644
--- a
Fix some minor indentation problems.
Also correct a multi-line comment.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 42 +++
1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b
There is no need to keep a pointer to usb_serial in ti_port
structure.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial
Remove useless or redundant dev_dbg messages.
Fix debug-message typos.
Signed-off-by: Mathieu OTHACEHE
---
Changelog:
v2:
* Keep some debug messages
drivers/usb/serial/ti_usb_3410_5052.c | 23 +--
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/drivers/usb
__packed is preferred over __attribute__((packed)) for portability.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.h | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.h
b/drivers/usb/serial
The definitions in ti_usb_3410_5052.h are only used in
ti_usb_3410_5052.c.
The content of the header is copied in ti_usb_3410_5052.c.
Also correct a typo in macro TI_PIPE_MODE_CONTINOUS.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 237
Hi,
The now reverted mxu11x0 turned out to be a copy of ti_usb_3410_5052 driver.
This aim of this serie is to apply all of the cleanups we did in mxu11x0 to
ti_usb_3410_5052.
Thank you,
Mathieu
Mathieu OTHACEHE (36):
usb: serial: ti_usb_3410_5052: Remove useless comments
usb: serial
ti_read_data_request, ti_read_data_bytes and ti_interrupt are unused.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 21 -
1 file changed, 21 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052
Inline functions are preferable to macros resembling functions.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial
__uX types should only be used for user-space interactions.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 66 ++-
1 file changed, 34 insertions(+), 32 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb
Closing wait delay is configurable per device using TIOCSSERIAL.
Also initialise tty_port closing_wait in port_probe with default value.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a
Remove useless or redundant dev_dbg messages.
Fix debug-message typos.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 28 +---
1 file changed, 9 insertions(+), 19 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb
Remove lines commenting the obvious.
Remove vi related comment.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 23 ++-
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial
Use macros to define 3410 and 5052 baud bases and remove useless casting.
Use macro to define usb download timeout.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 22 +++---
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/drivers/usb
Remove read_bulk_callback, write_bulk_callback, write, write_room,
chars_in_buffer, throttle and unthrottle callbacks who uselessly
reimplements generic functions.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 315 --
1 file changed
Remove variables affected but never read.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 12
1 file changed, 12 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
index 58df42d..00ae52e 100644
--- a
Use C_X tty.h macros to avoid direct manipulation of termios
c_cflag variable.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb
It is useless to check the return of usb_get_serial_port_data.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 34 +-
1 file changed, 1 insertion(+), 33 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb
There is no need to keep a pointer to usb_serial in ti_port
structure.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial
Use bulk_out_size instead of recalculate it with kfifo_size
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
index eb4df1e
The generic driver doesn't call tty_wakeup in
usb_serial_generic_msr_changed so this tty_wakeup seems useless.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/dr
Remove useless ti_device pointer, and change addr to u32.
Move function upper to avoid function prototyping.
Also change size variable in function from int to size_t.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 76 ---
1 file
Use kzalloc instead of kmalloc to avoid field initialisation to 0.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
It is useless to pass a specific context (ti_device) to the interrupt
callback.
So use the default context (usb_serial_port).
Remove useless variables in ti_interrupt_callback.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 55
mmand
sending.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 156 +++---
1 file changed, 88 insertions(+), 68 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
index 91ea1b5..eb4df1e 1
Use usb_serial_generic_close in close callback.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 12 ++--
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
index
Setting DTR/RTS is handled using dtr_rts in tty_core.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
index 2a993a2..d8bed30 100644
--- a
It is sufficient to pass usb_serial_port structure to ti_get_serial_info
and ti_set_serial_info.
Also move functions above ioctl to avoid function prototyping
and use unsigned int instead of unsigned for cwait variable.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c
Remove prefixes from ti_port and ti_device structures.
Also change type of is_3410 from int to bool.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 114 +-
1 file changed, 57 insertions(+), 57 deletions(-)
diff --git a/drivers/usb
Save msr before testing the delta and waking up any waiters.
Also use port directly instead of tport->tp_port.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/ser
Use variables for vendor and product in download_firmware to improve
readability.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb
Only shadow msr is accessed from interrupt context. So use the ti_port
spinlock to protect only shadow msr.
Add a mutex in ti_port to protect mcr from concurrent access.
Also move shadow mcr setting out of ti_set_mcr function.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial
In ti_port structure, remove useless tp_tdev backpointer.
Also remove pointer to usb_serial_port.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 44 ---
1 file changed, 20 insertions(+), 24 deletions(-)
diff --git a/drivers/usb
Use usb_serial_generic_open in open callback to start read urb.
Also remove useless usb_device pointer.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 21 -
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/drivers/usb/serial
to do any padding.
This patch also move firmware buffer manipulation to ti_do_download
function.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 62 +++
1 file changed, 33 insertions(+), 29 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_
Use the format "error text: error value\n" when possible.
Drop redundant function names from error messages.
Also move a couple err messages to dbg messages.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 83 +--
1 file c
Add CMSPAR support in set_termios callback.
Move TI_UART_ENABLE_PARITY_CHECKING setting in the upper
block to avoid doing it twice.
Delete useless TI_UART_ENABLE_PARITY_CHECKING unsetting.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 19 ++-
1 file
callback because it is the
initial call to set_termios.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
index
Declare functions in a the right order to avoid prototyping.
There is no functional change here.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 1112 -
1 file changed, 544 insertions(+), 568 deletions(-)
diff --git a/drivers/usb
Fix some minor indentation problems.
Also correct a multi-line comment.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 27 +++
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers
Add myself in the copyright section and as an author of the driver.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ti_usb_3410_5052.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c
b/drivers/usb/serial/ti_usb_3410_5052.c
Hub with Isolation.
These devices are based on TI 3410 chip.
Signed-off-by: Mathieu OTHACEHE
---
Hi,
Here is the second version of the patch.
Thank you,
Mathieu
Changelog:
v2:
* Add a rs485_only flag to device structure.
* Try to load moxa firmware without fallback.
drivers/usb/serial
> No, I was trying to say that the we should not attempt to load a
> firmware on the "ti_usb-v%04x-p%04x.fw" format before loading the moxa
> firmware.
For MTS devices (mts_*.fw) and for devices using generic firmware (ti_3410.fw
and ti_5052.fw), ti_usb-v%04x-p%04x.fw loading is already failing.
Hi Johan,
Thanks for your review.
> Looks like this code could use a few vid/pid temporaries.
> I'm not sure it makes sense to try to load a "ti_usb-v110a-p1150.fw"
> firmware before requesting the moxa firmware. Avoids a confusing:
> usb 1-2.2: Direct firmware load for ti_usb-v110a-p1150.fw fa
Hub with Isolation.
These devices are based on TI 3410 chip.
Signed-off-by: Mathieu OTHACEHE
---
Hi,
This patch add support for MOXA UPORT 11x0 devices to ti_usb_3410_5052.
The informations are extracted from the now reverted mxu11x0 driver.
There is a delicate point in the attach callback
On Sun, Feb 28, 2016 at 01:20:16PM +0100, Johan Hovold wrote:
> On Sat, Jan 30, 2016 at 06:40:30PM +0100, Mathieu OTHACEHE wrote:
> > On Mon, Jan 25, 2016 at 01:01:59PM +0100, Johan Hovold wrote:
> > > On Mon, Jan 04, 2016 at 07:49:36PM +0100, Mathieu OTHACEHE wrote:
> >
Bool initializations should use true and false. Bool tests don't need
comparisons.
Also, use IS_ENABLED instead of ifdef.
Generated by: scripts/coccinelle/misc/boolinit.cocci
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/iuu_phoenix.c | 4 ++--
drivers/usb/serial/mos7840.c
This series of patches fixes all coccinelle warnings in
USB serial subsystem.
V2:
* Squash patches per type of issues reported by coccinelle
Mathieu OTHACEHE (4):
USB: serial: fix compare_const_fl.cocci warnings
USB: serial: fix returnvar.cocci warnings
USB: serial: fix boolinit.cocci
Remove unneeded semicolons.
Generated by: scripts/coccinelle/misc/semicolon.cocci
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/keyspan.c| 2 +-
drivers/usb/serial/kl5kusb105.c | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/usb/serial/keyspan.c b
Remove unneeded variables when "0" can be returned.
Generated by: scripts/coccinelle/misc/returnvar.cocci
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/cyberjack.c | 3 +--
drivers/usb/serial/garmin_gps.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git
Move constants to the right of binary operators.
Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
Signed-off-by: Mathieu OTHACEHE
---
Move constants to the right improve readability in my opinion.
But it's a matter of taste, and nothing is specified in CodingStyle.
driver
On Sun, Jan 31, 2016 at 10:33:54PM +0100, Bjørn Mork wrote:
> Mathieu OTHACEHE writes:
>
> > This patch fixes the following coccinelle warnings:
> >
> > drivers/usb/serial/mos7840.c:2042:4-10: Move constant to right.
> > drivers/usb/serial/mos7840.c:2062
This patch fixes the following coccinelle warnings:
drivers/usb/serial/safe_serial.c:84:12-16: WARNING: Assignment of bool to 0/1
drivers/usb/serial/safe_serial.c:281:2-8: WARNING: Assignment of bool to 0/1
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/safe_serial.c | 4 ++--
1 file
This series of patches fixes all coccinelle warnings in
USB serial subsystem
Mathieu OTHACEHE (14):
USB: serial: safe_serial: fix assignment of bool to 0/1
USB: serial: safe_serial: fix assignment of bool to non 0/1 constant
USB: serial: quatech2: remove comparison to bool
USB: serial
This patch fixes the following coccinelle warning:
drivers/usb/serial/iuu_phoenix.c:383:5-9: WARNING: Comparison of bool to 0/1
drivers/usb/serial/iuu_phoenix.c:363:5-9: WARNING: Comparison of bool to 0/1
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/iuu_phoenix.c | 4 ++--
1 file
This patch fixes the following coccinelle warning:
drivers/usb/serial/mos7840.c:1845:5-32: WARNING: Comparison to bool
drivers/usb/serial/mos7840.c:1909:5-32: WARNING: Comparison to bool
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/mos7840.c | 4 ++--
1 file changed, 2 insertions
This patch fixes the following coccinelle error:
drivers/usb/serial/safe_serial.c:85:12-18: ERROR: Assignment of bool to non-0/1
constant
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/safe_serial.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/usb
This patch fixes the following coccinelle warning:
drivers/usb/serial/quatech2.c:976:5-26: WARNING: Comparison to bool
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/quatech2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/quatech2.c b/drivers
/ftdi_sio.c:1324:9-30: Move constant to right.
drivers/usb/serial/ftdi_sio.c:1325:9-30: Move constant to right.
drivers/usb/serial/ftdi_sio.c:1326:9-32: Move constant to right.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ftdi_sio.c | 16
drivers/usb/serial/ftdi_sio.h | 8
/garmin_gps.c:240:5-6: Move constant to right.
drivers/usb/serial/garmin_gps.c:242:5-6: Move constant to right.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/garmin_gps.c | 48 -
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers
This patch fixes the following coccinelle warning:
drivers/usb/serial/ch341.c:373:2-18: Move constant to right.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/ch341.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial
This patch fixes the following coccinelle warnings:
drivers/usb/serial/mos7840.c:2042:4-10: Move constant to right.
drivers/usb/serial/mos7840.c:2062:16-22: Move constant to right.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/mos7840.c | 4 ++--
1 file changed, 2 insertions(+), 2
This patch fixes the following coccinelle warning:
drivers/usb/serial/garmin_gps.c:863:5-11: Unneeded variable:
"status". Return "0" on line 873
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/garmin_gps.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
This patch fixes the following coccinelle warning:
drivers/usb/serial/keyspan.c:1966:49-50: Unneeded semicolon
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/keyspan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial
This patch fixes the following coccinelle warning:
drivers/usb/serial/cyberjack.c:143:5-11: Unneeded variable:
"result". Return "0" on line 155
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/cyberjack.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
This patch fixes the following coccinelle warning:
drivers/usb/serial/f81232.c:193:7-20: Move constant to right.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/f81232.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial
This patch fixes the following coccinelle warnings:
drivers/usb/serial/kl5kusb105.c:475:2-3: Unneeded semicolon
drivers/usb/serial/kl5kusb105.c:530:2-3: Unneeded semicolon
drivers/usb/serial/kl5kusb105.c:549:2-3: Unneeded semicolon
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial
On Mon, Jan 25, 2016 at 01:01:59PM +0100, Johan Hovold wrote:
> On Mon, Jan 04, 2016 at 07:49:36PM +0100, Mathieu OTHACEHE wrote:
> > On nominal execution, private data allocated on port_probe and attach
> > are never freed. Add port_remove and release callbacks to free them
&
On nominal execution, private data allocated on port_probe and attach
are never freed. Add port_remove and release callbacks to free them
respectively.
Signed-off-by: Mathieu OTHACEHE
---
Changes in v2:
* Move release callback after attach callback
drivers/usb/serial/mxu11x0.c | 20
Thanks,
Mathieu
Mathieu OTHACEHE (4):
USB: mxu11x0: fix memory leak on usb_serial private data
USB: mxu11x0: clean device control commands
USB: mxu11x0: remove duplicated set_termios call
USB: mxu11x0: move firmware download and endpoint testing to probe
callback
drivers/usb/serial/mxu11x0.c
The function mxu1_set_termios is called twice in open callback.
Only the first call is necessary.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/mxu11x0.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/usb/serial/mxu11x0.c b/drivers/usb/serial/mxu11x0.c
index 7ad2727
Sending OPEN and START commands twice is not necessary for this driver.
Also send STOP command at close.
Signed-off-by: Mathieu OTHACEHE
---
Changes in v2:
* Only remove OPEN_PORT and START_PORT in open callback.
drivers/usb/serial/mxu11x0.c | 21 +++--
1 file changed, 7
fails
by returning ENODEV.
Signed-off-by: Mathieu OTHACEHE
---
Changes in v2:
* Remove useless paranthesis
* Fix multi-line comment
drivers/usb/serial/mxu11x0.c | 131 ++-
1 file changed, 79 insertions(+), 52 deletions(-)
diff --git a/drivers/usb/serial
Sending OPEN and START commands twice is not necessary for this driver.
Also send STOP command at close.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/mxu11x0.c | 31 +++
1 file changed, 7 insertions(+), 24 deletions(-)
diff --git a/drivers/usb/serial
fails
by returning ENODEV.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/mxu11x0.c | 130 ++-
1 file changed, 78 insertions(+), 52 deletions(-)
diff --git a/drivers/usb/serial/mxu11x0.c b/drivers/usb/serial/mxu11x0.c
index 354fcb5..0392531 100644
On nominal execution, private data allocated on port_probe and attach
are never freed. Add port_remove and release callbacks to free them
respectively.
Signed-off-by: Mathieu OTHACEHE
---
drivers/usb/serial/mxu11x0.c | 20
1 file changed, 20 insertions(+)
diff --git a
Hi,
Here are the follow up commits proposed during last Johan review of the
new mxu11x0 driver. I also patched a memory leak on usb_serial private data.
Mathieu
Mathieu OTHACEHE (3):
USB: mxu11x0: fix memory leak on usb_serial private data
USB: mxu11x0: clean device control commands
USB
Hi Johan,
Thanks for merging !
About the follow ups, I have tested the driver on uport 1110 without double
OPEN_PORT/START_PORT commands.
It is still working fine so, I guess it can be removed.
Plus, I sniffed the Windows USB driver for uport 1110 and the commands sent are
: OPEN_PORT, SET_CONF
USB to Serial Hub with Isolation.
This driver is based on GPL MOXA driver written by Hen Huang and available
on MOXA website. The original driver was based on io_ti serial driver.
Signed-off-by: Mathieu OTHACEHE
---
Hi Johan,
Here is the v6 of the driver.
I understand the problems with the
1 - 100 of 107 matches
Mail list logo