lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130605175512.GC13461@kroah.com>
Date:	Wed, 5 Jun 2013 10:55:12 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Tobias Winter <tobias@...uxdingsda.de>,
	Bjørn Mork <bjorn@...k.no>,
	Rob Landley <rob@...dley.net>
Cc:	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] USB: serial: increase the number of devices we support

From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

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
us a few more years.

Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

---
 drivers/usb/serial/usb-serial.c |    8 ++++++--
 include/linux/usb/serial.h      |    4 ----
 2 files changed, 6 insertions(+), 6 deletions(-)

--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -43,6 +43,10 @@
 #define DRIVER_AUTHOR "Greg Kroah-Hartman <gregkh@...uxfoundation.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_NO_MINOR	(SERIAL_TTY_MINORS + 1)
+
 /* There is no MODULE_DEVICE_TABLE for usbserial.c.  Instead
    the MODULE_DEVICE_TABLE declarations in each serial driver
    cause the "hotplug" program to pull in whatever module is necessary
@@ -105,12 +109,12 @@ static int get_free_serial(struct usb_se
 
 	dev_dbg(&serial->interface->dev, "%s %d\n", __func__, num_ports);
 
-	*minor = 0xffffffff;
+	*minor = SERIAL_TTY_NO_MINOR;
 	for (i = 0; i < num_ports; ++i) {
 		x = get_free_port(serial->port[i]);
 		if (x < 0)
 			goto error;
-		if (*minor == 0xffffffff)
+		if (*minor == SERIAL_TTY_NO_MINOR)
 			*minor = x;
 		serial->port[i]->port_number = i;
 	}
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -19,10 +19,6 @@
 #include <linux/sysrq.h>
 #include <linux/kfifo.h>
 
-#define SERIAL_TTY_MAJOR	188	/* Nice legal number now */
-#define SERIAL_TTY_MINORS	254	/* loads of devices :) */
-#define SERIAL_TTY_NO_MINOR	0xffffffff	/* No minor was assigned */
-
 /* The maximum number of ports one device can grab at once */
 #define MAX_NUM_PORTS		8
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ