Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-09-15 Thread Peter Chen
On Tue, Sep 15, 2015 at 01:40:30PM +0800, Barry Song wrote: > 2015-09-14 15:17 GMT+08:00 Peter Chen : > > On Tue, Aug 11, 2015 at 09:43:13AM +, Barry Song wrote: > >> From: Rong Wang > >> > >> Chipidea puts ci information to drvdata, but this

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-09-14 Thread Barry Song
2015-09-14 15:17 GMT+08:00 Peter Chen : > On Tue, Aug 11, 2015 at 09:43:13AM +, Barry Song wrote: >> From: Rong Wang >> >> Chipidea puts ci information to drvdata, but this overwrites the drvdata >> placed by EHCI core. EHCI core thinks drvdata is

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-09-14 Thread Peter Chen
On Tue, Aug 11, 2015 at 09:43:13AM +, Barry Song wrote: > From: Rong Wang > > Chipidea puts ci information to drvdata, but this overwrites the drvdata > placed by EHCI core. EHCI core thinks drvdata is ehci_hcd. We can find this > from codes like ehci-sysfs.c: > static

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-08-17 Thread Alan Stern
On Mon, 17 Aug 2015, Peter Chen wrote: That's not quite what I had in mind. I was thinking of something more like this: Platform device drvdata struct usb_pointers | | |---|---| |

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-08-16 Thread Peter Chen
On Fri, Aug 14, 2015 at 10:26:35AM -0400, Alan Stern wrote: On Fri, 14 Aug 2015, Peter Chen wrote: In the old days, a single device could be a USB host controller and nothing else. Then later, a single device could be either a host controller or a device controller. Now a single

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-08-14 Thread Peter Chen
On Thu, Aug 13, 2015 at 11:01:18AM -0400, Alan Stern wrote: On Thu, 13 Aug 2015, Peter Chen wrote: Alan, do you have any suggestions? Currently, IP core driver and ehci core both takes its internal structure as driver data. Thanks. It's not just ehci-hcd: The USB core stores the

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-08-14 Thread Felipe Balbi
On Fri, Aug 14, 2015 at 10:26:35AM -0400, Alan Stern wrote: On Fri, 14 Aug 2015, Peter Chen wrote: In the old days, a single device could be a USB host controller and nothing else. Then later, a single device could be either a host controller or a device controller. Now a single

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-08-14 Thread Alan Stern
On Fri, 14 Aug 2015, Peter Chen wrote: In the old days, a single device could be a USB host controller and nothing else. Then later, a single device could be either a host controller or a device controller. Now a single device can be both. Obviously this causes problems for our

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-08-14 Thread Alan Stern
On Fri, 14 Aug 2015, Felipe Balbi wrote: That's not quite what I had in mind. I was thinking of something more like this: Platform device drvdata struct usb_pointers | | |---|---| |

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-08-13 Thread Alan Stern
On Thu, 13 Aug 2015, Peter Chen wrote: Alan, do you have any suggestions? Currently, IP core driver and ehci core both takes its internal structure as driver data. Thanks. It's not just ehci-hcd: The USB core stores the hcd address as driver data. usb_create_shared_hcd() does:

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-08-12 Thread Alan Stern
On Wed, 12 Aug 2015, Peter Chen wrote: On Tue, Aug 11, 2015 at 09:43:13AM +, Barry Song wrote: From: Rong Wang rong.w...@csr.com Chipidea puts ci information to drvdata, but this overwrites the drvdata placed by EHCI core. EHCI core thinks drvdata is ehci_hcd. We can find this

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-08-12 Thread Peter Chen
On Wed, Aug 12, 2015 at 10:45:37AM -0400, Alan Stern wrote: On Wed, 12 Aug 2015, Peter Chen wrote: On Tue, Aug 11, 2015 at 09:43:13AM +, Barry Song wrote: From: Rong Wang rong.w...@csr.com Chipidea puts ci information to drvdata, but this overwrites the drvdata placed by EHCI

Re: [PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-08-12 Thread Peter Chen
On Tue, Aug 11, 2015 at 09:43:13AM +, Barry Song wrote: From: Rong Wang rong.w...@csr.com Chipidea puts ci information to drvdata, but this overwrites the drvdata placed by EHCI core. EHCI core thinks drvdata is ehci_hcd. We can find this from codes like ehci-sysfs.c: static ssize_t

[PATCH] usb: chipidea: reuse the platform_data to store the ci info

2015-08-11 Thread Barry Song
From: Rong Wang rong.w...@csr.com Chipidea puts ci information to drvdata, but this overwrites the drvdata placed by EHCI core. EHCI core thinks drvdata is ehci_hcd. We can find this from codes like ehci-sysfs.c: static ssize_t show_companion(struct device *dev,