Thanks very much for your advice, Alan! Alan Stern <[EMAIL PROTECTED]> writes:
> On Wed, 31 Jan 2007, Joe Wells wrote: > >> I want to simulate the effect of unplugging a USB device and >> plugging it back in without having to physically unplug it. Is it >> possible to "unplug" a USB device by software actions alone? If >> so, could someone please tell me how? > > It depends on exactly what you want to simulate. I have a piece of hardware that works reliably when I unplug it from the USB port and remove associated kernel modules between every two openings of the device file. It works unreliably when I don't follow this procedure. (Yes, obviously something is buggy, but which piece of hardware or software has the bug is unclear and I have a procedure that works.) > For example, unplugging a USB device will interrupt the +5 V power > it receives from the bus. With most PC systems, the USB hardware > does not permit you to do this in software. How would I find out if I can turn off the power to the USB port in software? If it could be done on a particular computer, which software actions would do it? > Other aspects of replugging (in particular, the device reset it > causes) can indeed be carried out in software. > >> In case it matters, I am only using one USB device, so resetting >> the entire USB subsystem would not be a problem for me. > > In that case it would be enough to unload the USB controller driver > and then load it back. For instance, "rmmod ohci-hcd ; modprobe > ohci-hcd". The actual driver to use will depend on your system and > on the USB device in question; check the system log to find out. If I run "lsmod | egrep 'hci|usb'", I get this output: usbserial 29992 2 keyspan_pda,keyspan hsfusbcd2 59352 0 hsfserial 21444 6 hsfusbcd2,hsfmc97sis,hsfmc97ati,hsfmc97ali,hsfmc97via,hsfpcibasic2 hsfengine 1312916 7 hsfusbcd2,hsfmc97sis,hsfmc97ati,hsfmc97ali,hsfmc97via,hsfpcibasic2,hsfserial hsfosspec 88680 8 hsfusbcd2,hsfmc97sis,hsfmc97ati,hsfmc97ali,hsfmc97via,hsfpcibasic2,hsfserial,hsfengine hsfsoar 85704 6 hsfusbcd2,hsfmc97sis,hsfmc97ati,hsfmc97ali,hsfmc97via,hsfpcibasic2 hci_usb 14292 2 bluetooth 44068 7 rfcomm,l2cap,hci_usb ohci1394 31856 0 ieee1394 299544 2 sbp2,ohci1394 ehci_hcd 30152 0 uhci_hcd 21260 0 usbcore 117312 9 keyspan_pda,keyspan,usbserial,hsfusbcd2,hsfosspec,hci_usb,ehci_hcd,uhci_hcd Which of these modules should go? I'm guessing that ohci1394 is my USB controller driver (see my lspci output quoted from previous message below), but it is not clear to me. Would I need also to remove usbcore? (If I need to remove usbcore, then I would need to understand what all of the hsf* modules are doing, because they would need to be unloaded first.) What about ehci_hcd and uhci_hcd? >> I'm using Linux kernel version 2.6.17 with some patches (applied by >> Emperor Linux who supplied me a kernel customized for my hardware). >> My distribution is (except for the kernel) Ubuntu 6.06 LTS. My >> computer is a Sony Vaio VGN-TX770P. According to "lspci -tv", my USB >> controller is a "Texas Instruments OHCI Compliant IEEE 1394 Host >> Controller". Thanks very much for any additional help that anyone can offer! -- Joe Wells ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users