Brian Walsh wrote: > Brian Walsh wrote: >> Greg KH wrote: >>> On Wed, May 17, 2006 at 01:26:33PM -0400, Brian Walsh wrote: >>>> I am having a problem with a cardbus modem. The cardbus device has an >>>> internal >>>> OHCI host controller and 2 usbserial devices attached to that controller. >>>> I am >>>> running a 2.6.16 kernel on an Arm ixp425 Coyote based system. >>>> >>>> The device works fine. However to insert the device I must first unload >>>> the >>>> ohci_hcd module. Insert the card and then let hotplug take care of >>>> reinitializing everything. All the ohci host devices are reattached along >>>> with >>>> all the attached usb devices. >>>> >>>> If I insert the card without unloading the ohci_hcd module hotplug will >>>> see and >>>> attach the ohci host controller but never attaches the usbserial devices. >>> Can you post the kernel log messages (with CONFIG_USB_DEBUG enabled) for >>> when you do this? >>> >>> Oh, and does this work properly on a i386 machine? >>> >> I posted the log files. They were a bit long to post to the list. >> >> http://www.walsh.ws/usb_hang.txt >> http://www.walsh.ws/usb_reload.txt >> >> In usb_reload.txt I first unload the ohci_hcd module then insert the cardbus >> card. >> >> In usb_hang.txt the ohci_hcd module is already loaded when I insert the card. >> >> I can not say at this time if it works on an i386 machine, as soon as I can >> set >> one up I will test it out. >> >> Brian >> >> > > After looking through the logs again it appears this may be an Arm related > problem. The dmabounce message is saying there is a device on the pci bus and > then the drivers attach. When it fails the dmabounce message is coming after > the usb drivers have attached to the device. Anyway I am posting this problem > over to the arm-kernel list as well. >
Ok I am still not sure where the problem exactly lies but here is the fix I came up with. I moved the call to platform_notify up in the call to device_add. This allows the device to fully attach to the system before the driver starts to mess with it. I don't know if it is the best solution but it works for my hardware. Comments? --- linux-2.6.16.a/drivers/base/core.c 2006-03-20 00:53:29.000000000 -0500 +++ linux-2.6.16.b/drivers/base/core.c 2006-05-18 18:21:15.000000000 -0400 @@ -269,6 +269,9 @@ dev->uevent_attr.attr.name = "uevent"; dev->uevent_attr.attr.mode = S_IWUSR; + /* notify platform of device entry */ + if (platform_notify) + platform_notify(dev); if (dev->driver) dev->uevent_attr.attr.owner = dev->driver->owner; dev->uevent_attr.store = store_uevent; @@ -283,8 +286,8 @@ klist_add_tail(&dev->knode_parent, &parent->klist_children); /* notify platform of device entry */ - if (platform_notify) - platform_notify(dev); + //if (platform_notify) + // platform_notify(dev); Done: put_device(dev); return error; ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel