------- Original Message -------
On Friday, October 27th, 2023 at 10:20 AM, Bill Barry <[email protected]> 
wrote:


> On Fri, Oct 27, 2023 at 12:15 PM Russell Senior [email protected]
> 
> wrote:
> 
> > It wasn't the RS-232 that surprised me, it was the combination of RS-232
> > and PCI-E, when I expected that modern RS-232 interfaces to just use a USB
> > converter. It is kind of like finding someone putting a Pratt and Whitney
> > turbo fan on a Sopwith Camel.
> > 
> > And here I was just about to reply and ask what would be the advantage of
> 
> a PCI-E card over the much cheaper USB converters :)
> 
> Bill

USB is designed as a user-friendly Plug 'n Play connection. There is a lot of 
variety in how it is implemented and it tends to do weird things when used for 
long term connectivity. 

I encountered this in the storage world. People who use USB for backup storage 
typically leave the external HDD connected indefinitely, which eventually 
causes problems. At some point the USB host controller will reset the port. 
There are also issues with power management where host controllers will put a 
port to "sleep" and issues with the amount of power delivered to the port not 
being consistent. 

PCIe on the other hand, is a much more robust interface. Once you plug it in 
and power it on, it stays that way until the rapture. Less variance in how 
vendors implement it. 

In Linux, the USB host controller drivers include a system of "quirks" which 
are enabled/disabled based on the make/model of the chip. For example, here's a 
bit of code from the latest stable kernel where they describe enabling one of 
these quirks for Intel hosts.

<code>
/* Existing Intel xHCI controllers require a delay of 1 mS,
* after setting the CMD_RESET bit, and before accessing any
* HC registers. This allows the HC to complete the
* reset operation and be ready for HC register access.
* Without this delay, the subsequent HC register access,
* may result in a system hang very rarely.
*/
if (xhci->quirks & XHCI_INTEL_HOST)
                udelay(1000);
</code>

Note how this specifically calls out Intel. As if other vendors don't implement 
this same 1ms delay? 
-Ben

Reply via email to