linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lan Tianyu <tianyu.lan@intel.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: lenb@kernel.org, linux-usb@vger.kernel.org,
	linux-acpi@vger.kernel.org, stern@rowland.harvard.edu,
	sarah.a.sharp@linux.intel.com, mjg59@srcf.ucam.org,
	mfm@muteddisk.com
Subject: Re: [Resend PATCH V3 7/8] usb/acpi: add the support of usb hub ports' acpi binding without attached devices.
Date: Sun, 13 May 2012 00:00:06 +0800	[thread overview]
Message-ID: <4FAE8906.9050606@intel.com> (raw)
In-Reply-To: <20120512001548.GA31948@kroah.com>

On 2012/5/12 8:15, Greg KH wrote:
> On Fri, May 11, 2012 at 04:08:31PM +0800, Lan Tianyu wrote:
>> The usb port is a device in the acpi table but it's not in the linux
>> usb subsystem. USB hub port doesn't have struct device. So the acpi
>> glue framework only can cover the usb port connected with usb device
>> and store the acpi handle to struct device.archdata.acpi_handle. This
>> patch adds the member platform_data in the struct usb_hub_port and
>> gets the hub port's acpi_handle and store it in the port's platform_data
>> to resolve no attached device no binding problem. The acpi method "_UPC"
>> and "_PLD" can be accessed without attached device.
> No, that's a hack.  Please do this correctly and use the real structures
> here, not an unsigned long.
>
> Why not make the hub a real struct device?  That would solve this
> problem, right?
You mean make the hub ports a real struct device. Yeah. But that may be
a little complex.  The device tree and sys fs hierarchy will be changed.
>   struct usb_hub_port {
>   	void			*port_owner;
>   	struct usb_device	*child;
> +	unsigned long		platform_data;
How about this?

struct usb_hub_port {
  	void			*port_owner;
  	struct usb_device	*child;
+	#ifdef CONFIG_ACPI
+	acpi_handle		port_acpi_handle;
+	#endif

> Yeah, no, that's not ok, sorry.  We use real pointers because we can,
> don't use opaque types here, where you are really putting a pointer in
> here.  Be specific.
>
> I'm not going to accept this patch, sorry.  Please rework it, and I'm
> guessing, the one after this.
All right.
> I'll go test the other patches in this series now...
Great thanks for your  patience to me(a freshman). :)
> greg k-h


-- 
Best Regards
Tianyu Lan
linux kernel enabling team


  reply	other threads:[~2012-05-12 16:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11  8:08 [Resend PATCH V3 0/8] usb/acpi: Add binding usb device with acpi Lan Tianyu
     [not found] ` <1336723712-7686-1-git-send-email-tianyu.lan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2012-05-11  8:08   ` [Resend PATCH V3 1/8] ACPI: Add stubs for (un)register_acpi_bus_type Lan Tianyu
2012-05-11  8:08   ` [Resend PATCH V3 2/8] ACPI: Add _PLD support Lan Tianyu
2012-05-11  8:08   ` [Resend PATCH V3 6/8] usb: move struct usb_device->children to struct usb_hub_port->child Lan Tianyu
2012-05-12  0:10     ` Greg KH
     [not found]       ` <20120512001027.GA25600-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2012-05-12 15:31         ` Lan Tianyu
2012-05-11  8:08   ` [Resend PATCH V3 8/8] usb/acpi: add usb check for the connect type of usb port Lan Tianyu
2012-05-11  8:08 ` [Resend PATCH V3 3/8] usb: Bind devices to ACPI devices when possible Lan Tianyu
2012-05-11  8:08 ` [Resend PATCH V3 4/8] usb: Set device removable state based on ACPI USB data Lan Tianyu
2012-05-11  8:08 ` [Resend PATCH V3 5/8] usb: add struct usb_hub_port to store port related members Lan Tianyu
2012-05-11  8:08 ` [Resend PATCH V3 7/8] usb/acpi: add the support of usb hub ports' acpi binding without attached devices Lan Tianyu
     [not found]   ` <1336723712-7686-8-git-send-email-tianyu.lan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2012-05-12  0:15     ` Greg KH
2012-05-12 16:00       ` Lan Tianyu [this message]
2012-05-12 16:26         ` Greg KH
2012-05-12  0:26 ` [Resend PATCH V3 0/8] usb/acpi: Add binding usb device with acpi Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FAE8906.9050606@intel.com \
    --to=tianyu.lan@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mfm@muteddisk.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).