* [TRIVIAL PATCH] usb/serial.h: Increase max number of serial ports per USB-serial device
@ 2015-07-02 15:13 Bartosz Tomeczko
2015-07-03 8:28 ` Johan Hovold
0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Tomeczko @ 2015-07-02 15:13 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-kernel, trivial
Hello,
I am using MOXA USB-to-serial converter with 16 serial ports. This
device is namely a MOXA UPort 1650-16. This device works as a simple
usb-serial adapter and therefore its driver uses
include/linux/usb/serial.h file. In this very file however maximal
number of serial ports served by the driver is eight (MAX_NUM_PORTS).
I would like to propose a trivial patch which would allow MOXA users
to use all ports of the device instead of just having eight of them
usable (as it is right now). Trivial change which might be applied on
the top of (4da3064d1775810f10f7ddc1c34c3f1ff502a654) is as follows:
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 704a1ab..b7af736 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -20,7 +20,7 @@
#include <linux/kfifo.h>
/* The maximum number of ports one device can grab at once */
-#define MAX_NUM_PORTS 8
+#define MAX_NUM_PORTS 16
/* parity check flag */
#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
Best regards
Bartosz Tomeczko
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [TRIVIAL PATCH] usb/serial.h: Increase max number of serial ports per USB-serial device
2015-07-02 15:13 [TRIVIAL PATCH] usb/serial.h: Increase max number of serial ports per USB-serial device Bartosz Tomeczko
@ 2015-07-03 8:28 ` Johan Hovold
2015-07-03 8:49 ` Bartosz Tomeczko
0 siblings, 1 reply; 3+ messages in thread
From: Johan Hovold @ 2015-07-03 8:28 UTC (permalink / raw)
To: Bartosz Tomeczko; +Cc: Johan Hovold, linux-kernel, trivial
On Thu, Jul 02, 2015 at 05:13:47PM +0200, Bartosz Tomeczko wrote:
> Hello,
>
> I am using MOXA USB-to-serial converter with 16 serial ports. This
> device is namely a MOXA UPort 1650-16. This device works as a simple
> usb-serial adapter and therefore its driver uses
> include/linux/usb/serial.h file. In this very file however maximal
> number of serial ports served by the driver is eight (MAX_NUM_PORTS).
> I would like to propose a trivial patch which would allow MOXA users
> to use all ports of the device instead of just having eight of them
> usable (as it is right now). Trivial change which might be applied on
> the top of (4da3064d1775810f10f7ddc1c34c3f1ff502a654) is as follows:
>
> diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
> index 704a1ab..b7af736 100644
> --- a/include/linux/usb/serial.h
> +++ b/include/linux/usb/serial.h
> @@ -20,7 +20,7 @@
> #include <linux/kfifo.h>
>
> /* The maximum number of ports one device can grab at once */
> -#define MAX_NUM_PORTS 8
> +#define MAX_NUM_PORTS 16
>
> /* parity check flag */
> #define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
I'm aware that this limit is too low be able to use all ports on that
Moxa device. I have some patches lying around that I never got to finish
that clean up the descriptor handling and removes the arbitrary port
limitation completely.
Let me revisit those, and I'll make sure this gets fixed for 4.3.
Thanks,
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [TRIVIAL PATCH] usb/serial.h: Increase max number of serial ports per USB-serial device
2015-07-03 8:28 ` Johan Hovold
@ 2015-07-03 8:49 ` Bartosz Tomeczko
0 siblings, 0 replies; 3+ messages in thread
From: Bartosz Tomeczko @ 2015-07-03 8:49 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-kernel, trivial
2015-07-03 10:28 GMT+02:00 Johan Hovold <johan@kernel.org>:
> On Thu, Jul 02, 2015 at 05:13:47PM +0200, Bartosz Tomeczko wrote:
>> Hello,
>>
>> I am using MOXA USB-to-serial converter with 16 serial ports. This
>> device is namely a MOXA UPort 1650-16. This device works as a simple
>> usb-serial adapter and therefore its driver uses
>> include/linux/usb/serial.h file. In this very file however maximal
>> number of serial ports served by the driver is eight (MAX_NUM_PORTS).
>> I would like to propose a trivial patch which would allow MOXA users
>> to use all ports of the device instead of just having eight of them
>> usable (as it is right now). Trivial change which might be applied on
>> the top of (4da3064d1775810f10f7ddc1c34c3f1ff502a654) is as follows:
>>
>> diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
>> index 704a1ab..b7af736 100644
>> --- a/include/linux/usb/serial.h
>> +++ b/include/linux/usb/serial.h
>> @@ -20,7 +20,7 @@
>> #include <linux/kfifo.h>
>>
>> /* The maximum number of ports one device can grab at once */
>> -#define MAX_NUM_PORTS 8
>> +#define MAX_NUM_PORTS 16
>>
>> /* parity check flag */
>> #define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
>
> I'm aware that this limit is too low be able to use all ports on that
> Moxa device. I have some patches lying around that I never got to finish
> that clean up the descriptor handling and removes the arbitrary port
> limitation completely.
>
> Let me revisit those, and I'll make sure this gets fixed for 4.3.
>
> Thanks,
> Johan
Hello Johan,
Thanks for that! So we are staying tuned for upcoming changes.
Meanwhile we will keep our kernel patched locally to support more that
eight ports.
Have a nice day.
Bartosz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-03 8:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-02 15:13 [TRIVIAL PATCH] usb/serial.h: Increase max number of serial ports per USB-serial device Bartosz Tomeczko
2015-07-03 8:28 ` Johan Hovold
2015-07-03 8:49 ` Bartosz Tomeczko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.