aboutsummaryrefslogtreecommitdiffstats
diff options
-rw-r--r--usb-serial-increase-the-number-of-devices-we-support.patch9
-rw-r--r--usb-serial-ports-add-minor-and-port-number.patch2
2 files changed, 8 insertions, 3 deletions
diff --git a/usb-serial-increase-the-number-of-devices-we-support.patch b/usb-serial-increase-the-number-of-devices-we-support.patch
index 97096a24b93978..c8fbf22a128ed7 100644
--- a/usb-serial-increase-the-number-of-devices-we-support.patch
+++ b/usb-serial-increase-the-number-of-devices-we-support.patch
@@ -6,9 +6,14 @@ Subject: [PATCH 3/3] USB: serial: increase the number of devices we support
We had the limit of 255 USB to serial devices on one system for almost
15 years, with no complaints. But now it's time to move on from these
-tiny "baby" systems, and bump the number up to 3000, which should last
+tiny "baby" systems, and bump the number up to 500, which should last
us a few more years.
+Note, this is still a static value, and uses up tty core memory with
+this many tty devices allocated. Converting the driver to use
+TTY_DRIVER_DYNAMIC_DEV is the next thing to do in order to remove this
+limitation.
+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
@@ -23,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
#define DRIVER_DESC "USB Serial Driver core"
+#define SERIAL_TTY_MAJOR 188
-+#define SERIAL_TTY_MINORS 3000 /* should be enough for a while */
++#define SERIAL_TTY_MINORS 500 /* should be enough for a while */
+#define SERIAL_TTY_NO_MINOR (SERIAL_TTY_MINORS + 1)
+
/* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead
diff --git a/usb-serial-ports-add-minor-and-port-number.patch b/usb-serial-ports-add-minor-and-port-number.patch
index 467c82e9234306..6ee79ad1eac4a3 100644
--- a/usb-serial-ports-add-minor-and-port-number.patch
+++ b/usb-serial-ports-add-minor-and-port-number.patch
@@ -1062,7 +1062,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct whiteheat_port_settings port_settings;
unsigned int cflag = tty->termios.c_cflag;
-- port_settings.port = port->number + 1;
+- port_settings.port = port->number - port->serial->minor + 1;
+ port_settings.port = port->port_number + 1;
/* get the byte size */