|
Free Open Book
PC Hardware in a Nutshell, 3nd Edition |
24.3 Configuring USBWhen you are installing new USB devices or troubleshooting existing USB devices, you may need to determine detailed configuration information about your USB interfaces, drivers, hubs, and ports, including the following:
The following sections detail the steps necessary to view and change USB configuration. 24.3.1 Identifying the USB HCI Under Windows 9XTo determine which USB HCI your system uses under Windows 9X, right-click My Computer, choose Properties, and click the Device Manager tab to display the Device Manager, shown in Figure 24-4. Double-click the Universal Serial Bus controllers item to expand it. Figure 24-4. Windows 9X Device Manager showing this system uses an Intel 82801AA![]() 24.3.2 Viewing USB HCI Properties Under Windows 9XFrom the Device Manager, double-clicking the Host Controller Interface item displays the Properties dialog for the HCI, shown in Figure 24-5. This dialog includes detailed HCI information that may be useful in troubleshooting USB problems and resolving conflicts. Figure 24-5. The Windows 9X HCI Properties dialog displaying detailed HCI information![]() The HCI Properties dialog includes the following pages:
24.3.3 Viewing USB Root Hub Properties Under Windows 9XFrom the Device Manager, double-clicking the USB Root Hub item displays the Properties dialog for the root hub, shown in Figure 24-6. This dialog includes detailed root hub information that may be useful in troubleshooting USB problems and resolving conflicts. Figure 24-6. The Windows 9X Root Hub Properties dialog displaying detailed root hub information![]() The USB Root Hub Properties dialog includes the following pages:
24.3.4 Verifying USB Interrupt Sharing Under Windows 9XWindows ordinarily assigns a shared interrupt to the USB HCI, which sometimes works properly. Often, however, USB works improperly unless the HCI has a dedicated interrupt. To verify USB interrupt sharing status under Windows 9X, from the main Device Manager dialog, click the Properties button to display the Computer Properties dialog shown in Figure 24-8. Figure 24-8. Windows 9X Device Manager showing this system shares an interrupt between the USB HCI and an Ethernet adapter![]() In this instance, the Device Manager shows that USB HCI is sharing interrupt 09. You can safely disregard the ACPI IRQ Holder for PCI IRQ Steering entry; IRQ Steering entries are simply placeholders, and are unlikely to cause conflicts (at least on motherboards that have ACPI properly implemented, which essentially includes only recent motherboards that use recent Intel chipsets). Similarly, the SCI IRQ used by ACPI bus is a system-level entry, which is unlikely to cause a problem. The Intel 8255x-based PCI Ethernet Adapter (10/100) entry, however, represents a real piece of hardware that is using real interrupts and therefore has the potential to cause a conflict. In this case, it does not. If it did, we would go to the Resources page of USB HCI Properties and manually assign a dedicated IRQ to it. 24.3.5 Identifying the USB HCI Under Windows 2000/XPTo determine which USB HCI your system uses under Windows 2000 or Windows XP, right-click My Computer, choose Properties, display the Hardware page, and then click the Device Manager button to display the Device Manager. Double-click the Universal Serial Bus controllers item to expand it, as shown in Figure 24-9. Figure 24-9. Windows XP Device Manager showing that this system uses two Intel 82801BA/BAM UHCIs![]() In this case, as is common on recent systems, the motherboard includes two distinct HCIs. These operate completely independently, and each HCI has a separate root hub associated with it. This doubles the number of root hub ports available, some of which may appear at the front of the case and some of which connect directly to the traditional location on the rear ATX I/O panel. Note that the secondary root hub ports often appear as a set of header pins on the motherboard, which may be extended to the front or the rear of the case, as necessary. 24.3.6 Viewing USB HCI Properties Under Windows 2000/XPFrom the Device Manager, double-clicking the Host Controller Interface item displays the Properties dialog for the HCI, shown in Figure 24-10. This dialog includes detailed HCI information that may be useful in troubleshooting USB problems and resolving conflicts. Figure 24-10. The Windows XP HCI Properties dialog displaying detailed HCI information![]() The HCI Properties dialog includes the following pages:
24.3.7 Viewing USB Root Hub Properties Under Windows 2000/XPFrom the Device Manager, double-clicking the USB Root Hub item displays the USB Root Hub Properties dialog, shown in Figure 24-11. This dialog includes detailed root hub information that may be useful in troubleshooting USB problems and resolving conflicts. Figure 24-11. The Windows XP Root Hub Properties dialog displaying detailed root hub information![]() The USB Root Hub Properties dialog includes the following pages:
24.3.8 Verifying USB Interrupt Sharing Under Windows 2000/XP
To
verify USB interrupt sharing status under Windows 2000 or Windows XP,
from the Device Manager, choose View Figure 24-12. Windows XP Device Manager showing that this system dedicates PCI interrupts 19 and 23 to the two USB HCIs![]() On recent motherboards, Windows 2000 and Windows XP typically assign a dedicated PCI interrupt above 15 to each device. On older motherboards, Windows 2000 and Windows XP typically assign a shared PCI interrupt to the HCI, as shown in Figure 24-13. Despite all assurances by hardware manufacturers and Microsoft that USB operates properly with a shared interrupt, that is frequently not true. If Windows has assigned a shared interrupt to USB, use the Device Manager to locate an unused interrupt, clear the Use Automatic Settings checkbox, and assign the unused interrupt to the HCI. Figure 24-13. Windows 2000 Device Manager showing that this system shares one interrupt among the USB HCI and four other devices![]() On the system shown in Figure 24-13, Windows 2000 has assigned one shared PCI interrupt among the USB HCI, the SCSI host adapter, the video card, the network adapter, and the sound adapter. Surprisingly enough, all of these functions work properly. If a conflict did occur, we would use the Resources page of USB HCI Properties to manually assign a dedicated IRQ to it. 24.3.8.1 Configuring USB under LinuxThe first draft of this section originally began, "USB under Linux is not ready for prime time." We eventually came to realize that USB under Linux "just works," and the reason for that change of heart is instructive. In preparing to write this section, we installed current releases of Red Hat and Mandrake Linux on three representative test-bed systems—a Pentium III on an i815 motherboard, a Pentium 4 on an i845PE motherboard, and an Athlon on an nForce2 motherboard. We then connected diverse USB peripherals, from mice and keyboards to printers and scanners to external optical drives. Some of them weren't even recognized. Some of them worked, more or less. Some of them worked sometimes and not other times. Others didn't work at all. None of them worked reliably. We had just about written off Linux as having poor USB support. Fortunately, we have a "back channel" mailing list of experienced Linux users to whom we turn when we have questions about Linux hardware issues. We told them about our problems with USB under Linux, and received many responses, all of which basically said, "USB works fine for me under Linux." Hmmm. After much hair-pulling, we finally determined that the problem was ... a bad cable. Trying to make testing more convenient, we did something stupid. As often happens, cutting corners to save time actually ended up costing us time. We swapped systems and peripherals around during the failed initial testing, but we always used the same cables. One of the cables came with an HP scanner. It looked like a good cable, but it turned out to be a snake in the grass. If it had failed completely, we would have isolated the problem quickly. But it "almost worked," and that cost us days of frustration. If we'd followed our own troubleshooting advice we'd have solved the problem quickly. The moral is, if you're having USB problems, try using a known-good cable. In general, recent Linux releases require no USB configuration. If you run a recent Linux release on modern hardware, USB generally just works. The usual caveats apply, however. Recent Intel HCIs are much less likely to have compatibility problems than are older HCIs and those from some other manufacturers. VIA HCIs in particular seem to have as many USB problems under Linux as they do under Windows. Accordingly, it is important to determine the HCI your motherboard uses. The KDE Control Center provides an easy way to identify the HCI. To use it for this purpose, start KDE Control Center, expand the Information branch in the left pane, double-click the PCI item, and scroll down in the right pane to locate the USB HCI items. Figure 24-14 shows dual 82801BA/BAM HCIs on an Intel ICH2 motherboard. The ICH2 HCIs are well-behaved in general, and function well under Linux. The HCI listing also provides other useful information, including the I/O port addresses and interrupts assigned to each HCI. Figure 24-14. KDE Control Center displaying HCI type, I/O ports, and interrupts![]() From the command line, you can display HCI information using the command /sbin/lspci -v|grep HCI, the output from which is shown in the following example: 00:1f.2 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #1) (rev 05) (prog-if 00 [UHCI]) 00:1f.4 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #2) (rev 05) (prog-if 00 [UHCI]) 02:00.0 FireWire (IEEE-1394): Lucent Microelectronics FW323 (rev 04) (prog-if 10 [OHCI]) You can also use KDE Control Center to determine interrupt-sharing status by double-clicking the Interrupts item. Figure 24-15 shows that the first usb-uhci has exclusive use of Interrupt 10, but that the second usb-uhci shares Interrupt 11 with ohci1394 (a FireWire interface) and eth0 (an Ethernet interface). Although shared interrupts may cause USB conflicts under Windows, we have never encountered any problems with a USB shared interrupt under Linux. Figure 24-15. KDE Control Center displaying interrupt assignments![]() KDE Control Center can also list USB devices. To display a list of connected USB devices, double-click the USB Devices item. To view the details for a device, double-click that device. For example, Figure 24-16 shows the details for a UMAX Astra 3400U scanner. (We still haven't figured out what the "Unknown" device is, but it shows up regularly and doesn't seem to cause any problems.) Figure 24-16. KDE Control Center displaying details for connected USB devices![]() If you don't have KDE installed or if you simply prefer the command line, use the command cat /proc/bus/usb/devices to display more USB configuration information than you'll know what to do with. The following example shows the USB configuration for the same system used for the previous GUI example: T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 11/900 us ( 1%), #Int= 1, #Iso= 0 D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 0.00 S: Product=USB UHCI Root Hub S: SerialNumber=ef80 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 4 D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=8086 ProdID=1122 Rev= 0.00 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms T: Bus=02 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=1606 ProdID=0060 Rev= 1.00 S: Manufacturer=UMAX S: Product=USB SCANNER C:* #Ifs= 1 Cfg#= 1 Atr=00 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none) E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=16ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms T: Bus=02 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 4 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=04b8 ProdID=0005 Rev= 1.00 S: Manufacturer=EPSON S: Product=USB Printer S: SerialNumber=W30169912131319590 C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA I: If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 0.00 S: Product=USB UHCI Root Hub S: SerialNumber=ef40 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms The default USB configuration is suitable for most purposes. However, if you need to tweak the USB configuration, you can rebuild the kernel with different USB support options. The KDE Linux Kernel Configurator, shown in Figure 24-17, provides an easy way to do that.
Figure 24-17. The Linux Kernel Configurator![]() Reconfiguring USB support options in the kernel is not for the faint of heart. Before you attempt it, make sure to read and understand the detailed technical documentation available on the Linux USB Project web site (http://www.linux-usb.org/). To run the KDE Linux Kernel Configurator, log on as root, start KDE Control Center, expand the System item in the left menu pane, and choose Linux Kernel Configurator. Make any necessary changes, save those changes, compile and install the new kernel, and reboot the system. If you don't know how to compile and install a kernel, see the Linux Kernel HOWTO (http://www.tldp.org/HOWTO/Kernel-HOWTO.html). Always save the new kernel under a different name. That way, if the new kernel won't boot, you can simply boot to the old kernel. If there's a problem with the new kernel and you saved it under the same name as the old kernel, your system may be unbootable.
|
Main Menu
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 500 Juegos Gratis | 500 Giochi Gratis | 500 Jeux Gratuits | 500 Jogos Gratis | 500 Kostenlose Spiele |