Date: Wed, 20 Apr 2022 12:34:02 +0000 From: "Brian McGovern (bmcgover)" <bmcgover@cisco.com> To: Chris Hill <chris@monochrome.org> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: Number of USB devices limited? Message-ID: <BL1PR11MB55096D7496B9E6449ACD6B89C5F59@BL1PR11MB5509.namprd11.prod.outlook.com> In-Reply-To: <alpine.BSF.2.20.2204192304410.2458@tripel.monochrome.org> References: <BL1PR11MB550957CB5932655D66799676C5F29@BL1PR11MB5509.namprd11.prod.outlook.com> <alpine.BSF.2.20.2204192304410.2458@tripel.monochrome.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--_000_BL1PR11MB55096D7496B9E6449ACD6B89C5F59BL1PR11MB5509namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > Not specific to FreeBSD, but to the USB standard itself (I think). There = is a limit to the number of endpoints, as you describe, but there is also a= limit to the number of > hubs you can cascade. The number is low; I think = it's 7. If you have more than $NUMBER of hubs in a row, you will get errati= c behavior from your USB endpoints. And > many things count as a "hub" - your computer probably takes up two, for e= xample. Thanks. I'll take a look when I get online and see if I can figure out what= the hub[s] is[are] adding to the overhead. -Brian ________________________________ From: Chris Hill <chris@monochrome.org> Sent: Tuesday, April 19, 2022 11:09 PM To: Brian McGovern (bmcgover) <bmcgover@cisco.com> Cc: freebsd-questions@freebsd.org <freebsd-questions@freebsd.org> Subject: Re: Number of USB devices limited? Not specific to FreeBSD, but to the USB standard itself (I think). There is a limit to the number of endpoints, as you describe, but there is also a limit to the number of hubs you can cascade. The number is low; I think it's 7. If you have more than $NUMBER of hubs in a row, you will get erratic behavior from your USB endpoints. And many things count as a "hub" - your computer probably takes up two, for example. On Tue, 19 Apr 2022, Brian McGovern (bmcgover) wrote: > Looking at the FreeBSD handbook, Chapter 13, it looks like the > expectation is that I should be able to attach "the maximum of 126 > devices". Unfortunately, it seems I'm getting in the low 20s (21 FTDI > serial cables, USB keyboard, and mouse), after which I start getting > the following in the logs: > > "Error initializing deviceusb_alloc_device: device init 34 failed > (USB_ERR_IOERROR, ignored)" > > and > > "uhub_reattach_port: could not allocate new device". > > > If I look at /dev/ugen*, there are the ugen devices for 0.1->0.33; so > its feeling like there may be limit in the serial port driver for the > number of /dev/cua* devices, which presently only number > cuaU0->cuaU20. So, I'm assuming this may not be a "USB" issue as much > as the number of USB serial ports (ucom?) that can be connected. > > Before I go on a code crawl to figure out how this is failing and if > it can be scaled up, I'm curious if anyone is aware of a coded limit > for the number of USB serial devices (or USB devices in general) that > can be connected before running in to this? I'm looking to push > upwards to _maybe_ 40 FTDI devices. > > -Brian > -- Chris Hill chris@monochrome.org --_000_BL1PR11MB55096D7496B9E6449ACD6B89C5F59BL1PR11MB5509namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"= > <style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo= ttom:0;} </style> </head> <body dir=3D"ltr"> <div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size= : 12pt; color: rgb(0, 0, 0);"> <font size=3D"2"><span style=3D"font-size:11pt">> Not specific to FreeBS= D, but to the USB standard itself (I think). There is a limit to the number= of endpoints, as you describe, but there is also a limit to the number of = > hubs you can cascade. The number is low; I think it's 7. If you have more than $NUMBER of hubs in a row, you will g= et erratic behavior from your USB endpoints. And <br> </span></font></div> <div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size= : 12pt; color: rgb(0, 0, 0);"> <font size=3D"2"><span style=3D"font-size:11pt">> many things count as a= "hub" - your computer probably takes up two, for example.</span>= </font></div> <div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size= : 12pt; color: rgb(0, 0, 0);"> <br> </div> <div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size= : 12pt; color: rgb(0, 0, 0);"> <font size=3D"2">Thanks. I'll take a look when I get online and see if I ca= n figure out what the hub[s] is[are] adding to the overhead. <br> </font></div> <div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size= : 12pt; color: rgb(0, 0, 0);"> <br> </div> <div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size= : 12pt; color: rgb(0, 0, 0);"> <font size=3D"2"> &nbs= p; -Brian</font><br> </div> <div id=3D"appendonsend"></div> <hr style=3D"display:inline-block;width:98%" tabindex=3D"-1"> <div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st= yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> Chris Hill <chris@= monochrome.org><br> <b>Sent:</b> Tuesday, April 19, 2022 11:09 PM<br> <b>To:</b> Brian McGovern (bmcgover) <bmcgover@cisco.com><br> <b>Cc:</b> freebsd-questions@freebsd.org <freebsd-questions@freebsd.org&= gt;<br> <b>Subject:</b> Re: Number of USB devices limited?</font> <div> </div> </div> <div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt;= "> <div class=3D"PlainText">Not specific to FreeBSD, but to the USB standard i= tself (I think). There <br> is a limit to the number of endpoints, as you describe, but there is <br> also a limit to the number of hubs you can cascade. The number is low; I <b= r> think it's 7. If you have more than $NUMBER of hubs in a row, you will <br> get erratic behavior from your USB endpoints. And many things count as a <b= r> "hub" - your computer probably takes up two, for example.<br> <br> <br> On Tue, 19 Apr 2022, Brian McGovern (bmcgover) wrote:<br> <br> > Looking at the FreeBSD handbook, Chapter 13, it looks like the <br> > expectation is that I should be able to attach "the maximum of 12= 6 <br> > devices". Unfortunately, it seems I'm getting in the low 20s (21 = FTDI <br> > serial cables, USB keyboard, and mouse), after which I start getting <= br> > the following in the logs:<br> ><br> > "Error initializing deviceusb_alloc_device: device init 34 failed= <br> > (USB_ERR_IOERROR, ignored)"<br> ><br> > and<br> ><br> > "uhub_reattach_port: could not allocate new device".<br> ><br> ><br> > If I look at /dev/ugen*, there are the ugen devices for 0.1->0.33; = so <br> > its feeling like there may be limit in the serial port driver for the = <br> > number of /dev/cua* devices, which presently only number <br> > cuaU0->cuaU20. So, I'm assuming this may not be a "USB" i= ssue as much <br> > as the number of USB serial ports (ucom?) that can be connected.<br> ><br> > Before I go on a code crawl to figure out how this is failing and if <= br> > it can be scaled up, I'm curious if anyone is aware of a coded limit <= br> > for the number of USB serial devices (or USB devices in general) that = <br> > can be connected before running in to this? I'm looking to push <br> > upwards to _maybe_ 40 FTDI devices.<br> ><br> > -Brian<br> ><br> <br> -- <br> Chris Hill  = ; chris@monochrome.org<br> </div> </span></font></div> </body> </html> --_000_BL1PR11MB55096D7496B9E6449ACD6B89C5F59BL1PR11MB5509namp_--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BL1PR11MB55096D7496B9E6449ACD6B89C5F59>