Re: [PATCH 2/21] ehci: Support for Intel Moorestown MPH and OTG host

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

 



On Thu, Dec 02, 2010 at 10:03:23PM +0800, Hao Wu wrote:
> From: Alek Du <alek.du@xxxxxxxxx>
> 
> The Intel Moorestown platform has EHCI MPH and EHCI OTG host. This patch adds
> PCI probe part for them. The HNP part and SRAM part will be added in another
> patch. This patch depends on the OTG transceive and OTG client patch from Hang
> Yuan that should be accepted already.

Well was this patch accepted yet?  Is it in a tree somewhere?

> 
> Signed-off-by: Jacob Pan <jacob.jun.pan@xxxxxxxxx>
> Signed-off-by: Alek Du <alek.du@xxxxxxxxx>
> Signed-off-by: Alan Cox <alan@xxxxxxxxxxxxxxx>
> Signed-off-by: Hao Wu <hao.wu@xxxxxxxxx>
> ---
>  drivers/usb/core/hub.c               |   10 ++
>  drivers/usb/core/usb.h               |    1 -
>  drivers/usb/host/ehci-hcd.c          |   19 ++++
>  drivers/usb/host/ehci-hub.c          |   13 ++-
>  drivers/usb/host/ehci-langwell-pci.c |  195 ++++++++++++++++++++++++++++++++++
>  drivers/usb/host/ehci-pci.c          |   15 +++
>  drivers/usb/host/ehci.h              |    6 +
>  include/linux/usb/hcd.h              |    6 +
>  8 files changed, 262 insertions(+), 3 deletions(-)
>  create mode 100644 drivers/usb/host/ehci-langwell-pci.c
> 
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 27115b4..4e14c00 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -1549,6 +1549,14 @@ static void hub_free_dev(struct usb_device *udev)
>  		hcd->driver->free_dev(hcd, udev);
>  }
>  
> +static void otg_notify(struct usb_device *udev, unsigned action)
> +{
> +	struct usb_hcd *hcd = bus_to_hcd(udev->bus);
> +
> +	if (hcd->otg_notify)
> +		hcd->otg_notify(udev, action);
> +}
> +
>  /**
>   * usb_disconnect - disconnect a device (usbcore-internal)
>   * @pdev: pointer to device being disconnected
> @@ -1606,6 +1614,7 @@ void usb_disconnect(struct usb_device **pdev)
>  	 * notifier chain (used by usbfs and possibly others).
>  	 */
>  	device_del(&udev->dev);
> +	otg_notify(udev, USB_DEVICE_REMOVE);
>  
>  	/* Free the device number and delete the parent's children[]
>  	 * (or root_hub) pointer.
> @@ -1829,6 +1838,7 @@ int usb_new_device(struct usb_device *udev)
>  		dev_err(&udev->dev, "can't device_add, error %d\n", err);
>  		goto fail;
>  	}
> +	otg_notify(udev, USB_DEVICE_ADD);
>  
>  	(void) usb_create_ep_devs(&udev->dev, &udev->ep0, udev);
>  	return err;

Why would we need to create a new callback for every device added and
removed?  Why do you need this and why doesn't the existing functions to
do this type of thing work for you?

> diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
> index cd88220..1227650 100644
> --- a/drivers/usb/core/usb.h
> +++ b/drivers/usb/core/usb.h
> @@ -147,4 +147,3 @@ extern void usb_notify_add_device(struct usb_device *udev);
>  extern void usb_notify_remove_device(struct usb_device *udev);
>  extern void usb_notify_add_bus(struct usb_bus *ubus);
>  extern void usb_notify_remove_bus(struct usb_bus *ubus);
> -

I really don't think you needed to make this change, so I'm guessing you
really didn't review this patch well.  Not good.

greg k-h
--
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