Alan, I'm pleased to tell you that the patch you created seems to be working. I've improved it slightly to take a "mode" parameter, and it's apparently working well.
However, I'm having a problem now that may or may not exactly fall into your area of expertise, but I'll tell you anyway, just in case: as you've told me, the port is being reset to the "default" once I unplug the device. If I send the command to switch to the companion controller (uhci in my case), it seems that the port is not being switched at that point yet (or maybe it's being reset once I connect the device). That is, If I plug the device, it's still being connected to the "ehci hub". It's not until I send the switching command *after* the device has been plugged in that I see the device connected to the right (uhci, the "companion") controller. When I plug the device, I get this: May 26 21:17:07 [kernel] [17182057.596000] usb 4-2: new high speed USB device using ehci_hcd and address 6 After I send my command (echo 4-2:1 > /sys/class/usb_host/usb_host4/companion): May 26 21:17:36 [kernel] [17182086.168000] usb 1-2: new full speed USB device using uhci_hcd and address 6 May 26 21:17:36 [kernel] [17182086.348000] usb 1-2: not running at top speed; connect to a high speed hub Then I loaded the ndiswrapper module by hand: May 26 21:19:49 [kernel] [17182219.804000] ndiswrapper version 1.15 loaded (preempt=no,smp=no) May 26 21:19:51 [kernel] [17182221.220000] wlan0: vendor: 'Ralink Technology Inc.' May 26 21:19:51 [kernel] [17182221.232000] wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK May 26 21:19:51 [kernel] [17182221.256000] usbcore: registered new driver ndiswrapper May 26 21:19:52 [kernel] [17182221.856000] ndiswrapper (iw_set_tx_power:458): setting tx_power failed (C0010015) May 26 21:19:55 [kernel] [17182224.936000] ndiswrapper (set_infra_mode:199): setting operating mode failed (C0010015) The problem is obvious now: how can I intercept this device being plugged in, so that I can send the command to set the companion controller *before* the actual higher level module (ndiswrapper in my case) takes over? The idea is that I don't want ndiswrapper "seeing" the device connected to the ehci controller, and I think the easier/more correct way of achieving this is to have some control (maybe via hotplug?) *before* ndiswrapper is being used to control the device to set the companion controller, then letting things go as normal (hopefully ndiswrapper will then "see" the device connected to the uhci controller). Any ideas will be much appreciated. Thanks again. Best regards, Ezequiel Valenzuela Quoting Alan Stern <[EMAIL PROTECTED]>: >> Thank you very much for taking the time to do this patch. I'll >> probably try and improve it slightly to force a certain mode >> (probably sending "0" or "1" to the file that's created) instead of >> toggling between the two. > > Be aware that each time you write to that file, it only affects the > current device (or the next one that gets plugged into the port). > > Whenever you unplug a device the port switches automatically back to > the EHCI controller. > > Alan Stern ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users