On Saturday 07 August 2004 15:27, Ray Lehtiniemi wrote: > you mean that when, for example, usb_hcd_sa1111_probe() calls > driver->hcd_alloc(), it should pass a pointer to struct sa1111_dev *dev, > (or the underlying struct device...), and the ohci_hcd_alloc() > routine should then take care of the dma_alloc_coherent() to set up > ohci->hcca? why would it need a pointer to the dev then?
Yes, like that ... pass the "struct device *" so it can be used for example with dma_alloc_coherent(). > hmm... looking at it, shouldn't the lh7a404, sa1111, omap probe routines > take care to call driver->hcd_free(hcd) if the hcd_buffer_create (hcd) > fails? seems like they all leak the hcd in that event... the err1 label > should move up a few lines... Sounds right to me; not a common leak though. > > PCI supports a newish HCD reset() method, which usbcore will > > call. That doesn't actually look very PCI-specific. All the OHCIs > > should provide reset() in the bus glue, not just PCI. > > i only see this reset routine being called from usb_hcd_pci_probe(). is it > used elsewhere? OK, so that must be why the non-PCI probe() logic uses hc_reset() ... :) > > The OMAP stuff now uses platform_bus though that's not merged. > > In the near term I think using that is the most likely path to success > > where's the omap repository? linux-omap.bkbits.net/main, though it doesn't have the suspend/resume code there yet. > > I'd certainly prefer if there was more shared code there, but for > > historical reasons PCI has its own scheme that doesn't involve > > publishing resources. It'd be nicest if the driver model addressed > > at least some of those issues ... but so far it doesn't. > > yah, i've been trying to wrap my head around the new driver model. seems > like there's still a few rough edges here and there (or maybe just lack > of established conventions, i guess) Also IMO teething pains; it took a while just to get the "platform" bus to be called that, instead of the "legacy" bus! :) - Dave ------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
