Re: Please explain how hotplug works in lay terms.

From: Dave Carrigan (dave_at_rudedog.org)
Date: 02/07/05


Date: Mon, 07 Feb 2005 10:38:46 -0800

Al. C wrote:

> but it's pretty technical. I'm just trying to figure out how the kernel
> knows that no matter what USB slot I plug in my Palm, it lets Jpilot find
> it.

USB is a bus. Physical USB ports don't correspond to a specific device.
Think of your PCI bus. It doesn't matter what slot you stick your modem
card, it's still /dev/ttyS0. Ditto for a SCSI bus. It doesn't matter what
ID you give the disk, it's always /dev/sda. The only time things matter is
if two devices of the same type are on the bus.

In the case of USB, each device type gets registered when it's plugged into
the port, and the device gets the lowest available device number. Palm
devices actually register two serial devices, so they get the lowest two
device numbers (ttyS0 and ttyS1).

-- 
Dave Carrigan
Seattle, WA, USA
dave@rudedog.org | http://www.rudedog.org/ | ICQ:161669680
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL
Dave is currently listening to David Bowie - Ziggy Stardust (The Rise And
Fall Of Ziggy Stardust And The Spiders From Mars)


Relevant Pages