General Linux 1 - Set Up USB Devices (2) : (Linux Professional Institute Certification)
General Linux 1 - Set Up USB Devices (2) : (Linux Professional Institute Certification)
c 2002 Andrew Eager, Geoffrey Robertson. Permission is granted to make and distribute verbatim copies or modied versions of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundationeither version 2 of the License or (at your option) any later version.
a Copyright
The Linux USB Sub System : by Brad Hards, Sigma Bravo Pty Ltd
5-a
5-b
5-c
5-d
5-e
USB Topology
The system unit contains the host controller and one virtual root hub with at least one (and normally two) USB interfaces. These interfaces can then be connected directly to a USB device or to another HUB.
USB Host Controller Virtual Root Hub
Device Upstream
HUB
Device
Device
HUB
Device
Device
Donwstream
USBCORE
USB Controllers
There are two categories of USB controller usb-uhci For Intel, PIIX4, Via controllers usb-ohci For Compaq, iMacs, OPTi, SiS, ALi controllers
USB Controllers
There are two categories of USB controller usb-uhci For Intel, PIIX4, Via controllers usb-ohci For Compaq, iMacs, OPTi, SiS, ALi controllers The UHCI controllers use a 16 bit IO address: I/O at 0xHHHH eg: I/O at 0xe400
8-a
USB Controllers
There are two categories of USB controller usb-uhci For Intel, PIIX4, Via controllers usb-ohci For Compaq, iMacs, OPTi, SiS, ALi controllers The UHCI controllers use a 16 bit IO address: I/O at 0xHHHH
eg:
I/O at 0xe400
The OHCI controllers use a 32 bit memory address: memory at 0xHH000000 eg memory at 0xee000000
8-b
USB Controllers
To determine your controller type, examine /proc/pci for a clue:
[root@Node4] root]# cat /proc/pci PCI devices found: ......... Bus 0, device 7, function 2: USB Controller: VIA Technologies Inc. UHCI USB(rev 17). IRQ 10. Master Capable. Latency=32. I/O at 0xe400 [0xe41f]. .........
USB Modules
Assuming you have a modular kernel, the following modules will be required: usbcore The base usb kernel module plus one of the controller specic modules either usb-uhci For Intel, PIIX4, Via controllers usb-ohci For Compaq, iMacs, OPTi, SiS, ALi controllers
10
USB Modules
Conguration
An entry in /etc/modules.conf aliases the specic controller to usb-controller as follows: alias usb-controller usb-uhci
11
USB Modules
Starting up the USB sub-system
To have the usb sub-sytem startup automatically at boot time, all you need to do is ensure that the above alias line is present in /etc/modules.conf.
12
USB Modules
Starting up the USB sub-system
To have the usb sub-sytem startup automatically at boot time, all you need to do is ensure that the above alias line is present in /etc/modules.conf. To startup manually, do the following steps:
12-a
USB Modules
Starting up the USB sub-system
To have the usb sub-sytem startup automatically at boot time, all you need to do is ensure that the above alias line is present in /etc/modules.conf. To startup manually, do the following steps: insmod usbcore
12-b
USB Modules
Starting up the USB sub-system
To have the usb sub-sytem startup automatically at boot time, all you need to do is ensure that the above alias line is present in /etc/modules.conf. To startup manually, do the following steps: insmod usbcore insmod usb-uhci (or usb-ohci)
12-c
USB Modules
Starting up the USB sub-system
To have the usb sub-sytem startup automatically at boot time, all you need to do is ensure that the above alias line is present in /etc/modules.conf. To startup manually, do the following steps: insmod usbcore insmod usb-uhci (or usb-ohci) mount the usbdevfs lesystem (optional but highly recommended)
12-d
USB Modules
Example
usbcore [root@Node4]# insmod usbcore Using /lib/modules/2.4.18-4/kernel/drivers/usb/usbcore.o
13
USB Modules
Example
usbcore [root@Node4]# insmod usbcore Using /lib/modules/2.4.18-4/kernel/drivers/usb/usbcore.o usb-uhci [root@Node4] root]# insmod usb-uhci Using /lib/modules/2.4.18-4/kernel/drivers/usb/usb-uhci.o
13-a
USB Modules
Example
usbcore [root@Node4]# insmod usbcore Using /lib/modules/2.4.18-4/kernel/drivers/usb/usbcore.o usb-uhci [root@Node4] root]# insmod usb-uhci Using /lib/modules/2.4.18-4/kernel/drivers/usb/usb-uhci.o mount [root@Node4]# mount -t usbdevfs usbdevfs /proc/bus/usb
13-b
USB Modules
Example
usbcore [root@Node4]# insmod usbcore Using /lib/modules/2.4.18-4/kernel/drivers/usb/usbcore.o usb-uhci [root@Node4] root]# insmod usb-uhci Using /lib/modules/2.4.18-4/kernel/drivers/usb/usb-uhci.o mount [root@Node4]# mount -t usbdevfs usbdevfs /proc/bus/usb Once this is done, you should see the following entries in /proc/bus/usb: [root@Node4] root]# ls /proc/bus/usb 001 devices drivers
13-c
14
17
18
19
19-a
19-b
20
20-a
20-b
The End
21