Date: Wed, 20 Apr 2022 12:30:55 +0000 From: "Brian McGovern (bmcgover)" <bmcgover@cisco.com> To: "Dan Mahoney (Ports)" <freebsd@gushi.org>, Chris Hill <chris@monochrome.org> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: Number of USB devices limited? Message-ID: <BL1PR11MB5509E452349D0E6EC34CB106C5F59@BL1PR11MB5509.namprd11.prod.outlook.com> In-Reply-To: <92560B47-41A7-4DBA-A444-FDF67D552FFE@gushi.org> References: <BL1PR11MB550957CB5932655D66799676C5F29@BL1PR11MB5509.namprd11.prod.outlook.com> <alpine.BSF.2.20.2204192304410.2458@tripel.monochrome.org> <92560B47-41A7-4DBA-A444-FDF67D552FFE@gushi.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--_000_BL1PR11MB5509E452349D0E6EC34CB106C5F59BL1PR11MB5509namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable > At the dayjob I will say that we=92ve had good success using usb-to-8-por= t or usb-to-16 port devices that sidestep the issue of single discrete FTDI= cables. A reference/link would be interesting. Always looking for alternatives. Rig= ht now, I'm running two Sedna 13-port hubs from the various systems (and fo= rtunately I stocked up because the prices are popping) https://www.amazon.c= om/Port-USB-3-1-Gen-5Gbps/dp/B07G2L3QY3/ref=3Dsr_1_4?crid=3D1271B15DMH9ET&k= eywords=3Dsedna+13+port+hub&qid=3D1650457431&sprefix=3Dsedna+13+port+hubs%2= Caps%2C97&sr=3D8-4 > That said, if you have multiple boxes, the order in which they enumerate = can sometimes be non-deterministic, based on which USB port the thing is pl= ugged into, > which probes first, and the phase of the moon. That is _always_ a problem with USB, since they're hot pluggable. Some nice= folks here on the mailing list put some devd scripts together to map the F= TDI cable's serial number in to the device name, so while the /dev/cuaU_X_ = names still come up not-quite-randomly, I also get /dev/cu.ABCDEFG, where A= BCDEFG =3D The serial number of the cable, which is consistent as long as y= ou don't change the cable. At this point, the only headache is that I start getting the errors in the = low 20s of ports, and I'm trying to avoid two hosts/rack. -Brian ________________________________ From: Dan Mahoney (Ports) <freebsd@gushi.org> Sent: Tuesday, April 19, 2022 11:39 PM To: Chris Hill <chris@monochrome.org> Cc: Brian McGovern (bmcgover) <bmcgover@cisco.com>; freebsd-questions@freeb= sd.org <freebsd-questions@freebsd.org> Subject: Re: Number of USB devices limited? At the dayjob I will say that we=92ve had good success using usb-to-8-port = or usb-to-16 port devices that sidestep the issue of single discrete FTDI c= ables. That said, if you have multiple boxes, the order in which they enumerate ca= n sometimes be non-deterministic, based on which USB port the thing is plug= ged into, which probes first, and the phase of the moon. -Dan > On Apr 19, 2022, at 8:09 PM, Chris Hill <chris@monochrome.org> wrote: > > 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 c= omputer 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 expectati= on is that I should be able to attach "the maximum of 126 devices". Unfortu= nately, it seems I'm getting in the low 20s (21 FTDI serial cables, USB key= board, and mouse), after which I start getting the following in the logs: >> >> "Error initializing deviceusb_alloc_device: device init 34 failed (USB_E= RR_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 it= s 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 as= suming this may not be a "USB" issue as much as the number of USB serial po= rts (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 n= umber of USB serial devices (or USB devices in general) that can be connect= ed before running in to this? I'm looking to push upwards to _maybe_ 40 FTD= I devices. >> >> -Brian >> > > -- > Chris Hill chris@monochrome.org --_000_BL1PR11MB5509E452349D0E6EC34CB106C5F59BL1PR11MB5509namp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1= 252"> <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">> At the dayjob I will s= ay that we=92ve had good success using usb-to-8-port or usb-to-16 port devi= ces that sidestep the issue of single discrete FTDI cables.</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">A reference/link would be interesting. Always looking for = alternatives. Right now, I'm running two Sedna 13-port hubs from the variou= s systems (and fortunately I stocked up because the prices are popping) <a href=3D"https://www.amazon.com/Port-USB-3-1-Gen-5Gbps/dp/B07G2L3QY3/ref= =3Dsr_1_4?crid=3D1271B15DMH9ET&keywords=3Dsedna+13+port+hub&qid=3D1= 650457431&sprefix=3Dsedna+13+port+hubs%2Caps%2C97&sr=3D8-4" id=3D"L= Plnk332506"> https://www.amazon.com/Port-USB-3-1-Gen-5Gbps/dp/B07G2L3QY3/ref=3Dsr_1_4?cr= id=3D1271B15DMH9ET&keywords=3Dsedna+13+port+hub&qid=3D1650457431&am= p;sprefix=3Dsedna+13+port+hubs%2Caps%2C97&sr=3D8-4</a><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"><span style=3D"font-size:11pt">That said, if you have= multiple boxes, the order in which they enumerate can sometimes be non-det= erministic, based on which USB port the thing is plugged into, <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">> which probes first, an= d the phase of the moon.</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">That is _always_ a problem with USB, since they're hot plu= ggable. Some nice folks here on the mailing list put some devd scripts toge= ther to map the FTDI cable's serial number in to the device name, so while = the /dev/cuaU_X_ names still come up not-quite-randomly, I also get /dev/cu.ABCDEFG, where ABCDEFG =3D The s= erial number of the cable, which is consistent as long as you don't change = the cable.</font></div> <div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size= : 12pt; color: rgb(0, 0, 0);"> <br> <font size=3D"2">At this point, the only headache is that I start getting t= he errors in the low 20s of ports, and I'm trying to avoid two hosts/rack.<= /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"> -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> Dan Mahoney (Ports) &= lt;freebsd@gushi.org><br> <b>Sent:</b> Tuesday, April 19, 2022 11:39 PM<br> <b>To:</b> Chris Hill <chris@monochrome.org><br> <b>Cc:</b> Brian McGovern (bmcgover) <bmcgover@cisco.com>; freebsd-qu= estions@freebsd.org <freebsd-questions@freebsd.org><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">At the dayjob I will say that we=92ve had good suc= cess using usb-to-8-port or usb-to-16 port devices that sidestep the issue = of single discrete FTDI cables.<br> <br> That said, if you have multiple boxes, the order in which they enumerate ca= n sometimes be non-deterministic, based on which USB port the thing is plug= ged into, which probes first, and the phase of the moon.<br> <br> -Dan<br> <br> > On Apr 19, 2022, at 8:09 PM, Chris Hill <chris@monochrome.org> w= rote:<br> > <br> > Not specific to FreeBSD, but to the USB standard itself (I think). The= re is a limit to the number of endpoints, as you describe, but there is als= o 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. A= nd many things count as a "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 exp= ectation is that I should be able to attach "the maximum of 126 device= s". 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:<br> >> <br> >> "Error initializing deviceusb_alloc_device: device init 34 fa= iled (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 its feeling like there may be limit in the serial port driver for th= e 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.<b= r> >> <br> >> 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 c= onnected before running in to this? I'm looking to push upwards to _maybe_ 40 FTDI devices.<br> >> <br> >> -Brian<br> >> <br> > <br> > -- <br> > Chris Hill = chris@monochrome.org<br> <br> </div> </span></font></div> </body> </html> --_000_BL1PR11MB5509E452349D0E6EC34CB106C5F59BL1PR11MB5509namp_--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BL1PR11MB5509E452349D0E6EC34CB106C5F59>