Re: [PATCH 06/20] usb: hcd-pci: introduce pm-ops for platform-pci devs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/05/2011 06:11 PM, Alan Stern wrote:
The setup routine requires the ehci_hcd struct in case
of ehci. It sets some parameters here and there like the reg&  caps
offset members or hcs_params and of course the quirks. I don't think
you can move them out because some of them call generic routines like
ehci_reset() or init and those may require some quirks to be set.

Are you saying that these reset routines need to do some extra work
after calling ehci_reset()?  I bet much of that work could be done
before ehci_reset().  However, for the stuff that can't, we can fall

After ehci_reset()? After ehci_reset() I see for instance in pci code
doing a quirk which updates ehci->hcs_params. This can be most likely
moved before ehci_reset() invocation. There is hardly anything special.

back on your idea of an extra parameter.

We could rewrite those functions to do the same thing without the ehci
struct but this will most likely duplicate code we still don't have the
fields (quirks) set in the ehci struct and some platforms requires them
to be set upfront like a few ppc where you have to use a different
read/write routine.

We might get away with it if each platform driver allocates the
ehci_hcd + usb_hcd those structs in usb_create_hcd().

They already do.

  However I'm not
sure how smart it is to poke around in registers without the initialized
root hub, or flags HCD_FLAG_RH_RUNNING +
HCD_FLAG_HW_ACCESSIBLE set.

Those things don't matter.  The root hub isn't running anyway at the
time the reset callback occurs.

Oh really. So let me move those things and see if something explodes.


Alan Stern


Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux