linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [1/6] usb: hub:Extend usb_hub_clear_tt_buffer parameter
@ 2019-04-26 14:50 Jim Lin
  2019-04-26 14:50 ` [PATCH 1/6] " Jim Lin
  2019-04-27  6:58 ` [1/6] " Greg Kroah-Hartman
  0 siblings, 2 replies; 4+ messages in thread
From: Jim Lin @ 2019-04-26 14:50 UTC (permalink / raw)
  To: linux-usb; +Cc: linux-kernel, Jim Lin

Extend usb_hub_clear_tt_buffer parameter to specify device number
that will have the TT state of its hub cleared.

Signed-off-by: Jim Lin <jilin@nvidia.com>
---
 drivers/usb/core/hub.c  | 5 +++--
 include/linux/usb/hcd.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 15a2934dc29d..4dec054c9776 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -840,6 +840,7 @@ int usb_hub_set_port_power(struct usb_device *hdev, struct usb_hub *hub,
 /**
  * usb_hub_clear_tt_buffer - clear control/bulk TT state in high speed hub
  * @urb: an URB associated with the failed or incomplete split transaction
+ * @devnum : device number that will have the TT state of its hub cleared
  *
  * High speed HCDs use this to tell the hub driver that some split control or
  * bulk transaction failed in a way that requires clearing internal state of
@@ -851,7 +852,7 @@ int usb_hub_set_port_power(struct usb_device *hdev, struct usb_hub *hub,
  *
  * Return: 0 if successful. A negative error code otherwise.
  */
-int usb_hub_clear_tt_buffer(struct urb *urb)
+int usb_hub_clear_tt_buffer(struct urb *urb, int devnum)
 {
 	struct usb_device	*udev = urb->dev;
 	int			pipe = urb->pipe;
@@ -873,7 +874,7 @@ int usb_hub_clear_tt_buffer(struct urb *urb)
 	/* info that CLEAR_TT_BUFFER needs */
 	clear->tt = tt->multi ? udev->ttport : 1;
 	clear->devinfo = usb_pipeendpoint (pipe);
-	clear->devinfo |= udev->devnum << 4;
+	clear->devinfo |= devnum << 4;
 	clear->devinfo |= usb_pipecontrol(pipe)
 			? (USB_ENDPOINT_XFER_CONTROL << 11)
 			: (USB_ENDPOINT_XFER_BULK << 11);
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index 695931b03684..01720f1f7d62 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -559,7 +559,7 @@ struct usb_tt_clear {
 	struct usb_host_endpoint	*ep;
 };
 
-extern int usb_hub_clear_tt_buffer(struct urb *urb);
+extern int usb_hub_clear_tt_buffer(struct urb *urb, int devnum);
 extern void usb_ep0_reinit(struct usb_device *);
 
 /* (shifted) direction/type/recipient from the USB 2.0 spec, table 9.2 */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 1/6] usb: hub:Extend usb_hub_clear_tt_buffer parameter
  2019-04-26 14:50 [1/6] usb: hub:Extend usb_hub_clear_tt_buffer parameter Jim Lin
@ 2019-04-26 14:50 ` Jim Lin
  2019-04-27  6:58 ` [1/6] " Greg Kroah-Hartman
  1 sibling, 0 replies; 4+ messages in thread
From: Jim Lin @ 2019-04-26 14:50 UTC (permalink / raw)
  To: linux-usb; +Cc: linux-kernel, Jim Lin

Extend usb_hub_clear_tt_buffer parameter to specify device number
that will have the TT state of its hub cleared.

Signed-off-by: Jim Lin <jilin@nvidia.com>
---
 drivers/usb/core/hub.c  | 5 +++--
 include/linux/usb/hcd.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 15a2934dc29d..4dec054c9776 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -840,6 +840,7 @@ int usb_hub_set_port_power(struct usb_device *hdev, struct usb_hub *hub,
 /**
  * usb_hub_clear_tt_buffer - clear control/bulk TT state in high speed hub
  * @urb: an URB associated with the failed or incomplete split transaction
+ * @devnum : device number that will have the TT state of its hub cleared
  *
  * High speed HCDs use this to tell the hub driver that some split control or
  * bulk transaction failed in a way that requires clearing internal state of
@@ -851,7 +852,7 @@ int usb_hub_set_port_power(struct usb_device *hdev, struct usb_hub *hub,
  *
  * Return: 0 if successful. A negative error code otherwise.
  */
-int usb_hub_clear_tt_buffer(struct urb *urb)
+int usb_hub_clear_tt_buffer(struct urb *urb, int devnum)
 {
 	struct usb_device	*udev = urb->dev;
 	int			pipe = urb->pipe;
@@ -873,7 +874,7 @@ int usb_hub_clear_tt_buffer(struct urb *urb)
 	/* info that CLEAR_TT_BUFFER needs */
 	clear->tt = tt->multi ? udev->ttport : 1;
 	clear->devinfo = usb_pipeendpoint (pipe);
-	clear->devinfo |= udev->devnum << 4;
+	clear->devinfo |= devnum << 4;
 	clear->devinfo |= usb_pipecontrol(pipe)
 			? (USB_ENDPOINT_XFER_CONTROL << 11)
 			: (USB_ENDPOINT_XFER_BULK << 11);
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index 695931b03684..01720f1f7d62 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -559,7 +559,7 @@ struct usb_tt_clear {
 	struct usb_host_endpoint	*ep;
 };
 
-extern int usb_hub_clear_tt_buffer(struct urb *urb);
+extern int usb_hub_clear_tt_buffer(struct urb *urb, int devnum);
 extern void usb_ep0_reinit(struct usb_device *);
 
 /* (shifted) direction/type/recipient from the USB 2.0 spec, table 9.2 */
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [1/6] usb: hub:Extend usb_hub_clear_tt_buffer parameter
@ 2019-04-27  6:58 ` Greg Kroah-Hartman
  2019-04-27  6:58   ` [PATCH 1/6] " Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2019-04-27  6:58 UTC (permalink / raw)
  To: Jim Lin; +Cc: linux-usb, linux-kernel

On Fri, Apr 26, 2019 at 10:50:06PM +0800, Jim Lin wrote:
> Extend usb_hub_clear_tt_buffer parameter to specify device number
> that will have the TT state of its hub cleared.
> 
> Signed-off-by: Jim Lin <jilin@nvidia.com>
> ---
>  drivers/usb/core/hub.c  | 5 +++--
>  include/linux/usb/hcd.h | 2 +-
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 15a2934dc29d..4dec054c9776 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -840,6 +840,7 @@ int usb_hub_set_port_power(struct usb_device *hdev, struct usb_hub *hub,
>  /**
>   * usb_hub_clear_tt_buffer - clear control/bulk TT state in high speed hub
>   * @urb: an URB associated with the failed or incomplete split transaction
> + * @devnum : device number that will have the TT state of its hub cleared
>   *
>   * High speed HCDs use this to tell the hub driver that some split control or
>   * bulk transaction failed in a way that requires clearing internal state of
> @@ -851,7 +852,7 @@ int usb_hub_set_port_power(struct usb_device *hdev, struct usb_hub *hub,
>   *
>   * Return: 0 if successful. A negative error code otherwise.
>   */
> -int usb_hub_clear_tt_buffer(struct urb *urb)
> +int usb_hub_clear_tt_buffer(struct urb *urb, int devnum)
>  {
>  	struct usb_device	*udev = urb->dev;
>  	int			pipe = urb->pipe;
> @@ -873,7 +874,7 @@ int usb_hub_clear_tt_buffer(struct urb *urb)
>  	/* info that CLEAR_TT_BUFFER needs */
>  	clear->tt = tt->multi ? udev->ttport : 1;
>  	clear->devinfo = usb_pipeendpoint (pipe);
> -	clear->devinfo |= udev->devnum << 4;
> +	clear->devinfo |= devnum << 4;
>  	clear->devinfo |= usb_pipecontrol(pipe)
>  			? (USB_ENDPOINT_XFER_CONTROL << 11)
>  			: (USB_ENDPOINT_XFER_BULK << 11);
> diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
> index 695931b03684..01720f1f7d62 100644
> --- a/include/linux/usb/hcd.h
> +++ b/include/linux/usb/hcd.h
> @@ -559,7 +559,7 @@ struct usb_tt_clear {
>  	struct usb_host_endpoint	*ep;
>  };
>  
> -extern int usb_hub_clear_tt_buffer(struct urb *urb);
> +extern int usb_hub_clear_tt_buffer(struct urb *urb, int devnum);
>  extern void usb_ep0_reinit(struct usb_device *);
>  
>  /* (shifted) direction/type/recipient from the USB 2.0 spec, table 9.2 */
> -- 
> 2.1.4

You just broke the build with this patch.  No individual patch can ever
do that, they all have to be stand-alone.

Also, when you send a patch series, please make it such that they are
"linked" together.  git send-email does this automatically, I don't know
how you sent these, but it did not work that way :(

Also, always use scripts/get_maintainer.pl to determine who to send the
patches to.  You missed all of the maintainers and developers who need
to review your patches :(

sorry,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/6] usb: hub:Extend usb_hub_clear_tt_buffer parameter
  2019-04-27  6:58 ` [1/6] " Greg Kroah-Hartman
@ 2019-04-27  6:58   ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2019-04-27  6:58 UTC (permalink / raw)
  To: Jim Lin; +Cc: linux-usb, linux-kernel

On Fri, Apr 26, 2019 at 10:50:06PM +0800, Jim Lin wrote:
> Extend usb_hub_clear_tt_buffer parameter to specify device number
> that will have the TT state of its hub cleared.
> 
> Signed-off-by: Jim Lin <jilin@nvidia.com>
> ---
>  drivers/usb/core/hub.c  | 5 +++--
>  include/linux/usb/hcd.h | 2 +-
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 15a2934dc29d..4dec054c9776 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -840,6 +840,7 @@ int usb_hub_set_port_power(struct usb_device *hdev, struct usb_hub *hub,
>  /**
>   * usb_hub_clear_tt_buffer - clear control/bulk TT state in high speed hub
>   * @urb: an URB associated with the failed or incomplete split transaction
> + * @devnum : device number that will have the TT state of its hub cleared
>   *
>   * High speed HCDs use this to tell the hub driver that some split control or
>   * bulk transaction failed in a way that requires clearing internal state of
> @@ -851,7 +852,7 @@ int usb_hub_set_port_power(struct usb_device *hdev, struct usb_hub *hub,
>   *
>   * Return: 0 if successful. A negative error code otherwise.
>   */
> -int usb_hub_clear_tt_buffer(struct urb *urb)
> +int usb_hub_clear_tt_buffer(struct urb *urb, int devnum)
>  {
>  	struct usb_device	*udev = urb->dev;
>  	int			pipe = urb->pipe;
> @@ -873,7 +874,7 @@ int usb_hub_clear_tt_buffer(struct urb *urb)
>  	/* info that CLEAR_TT_BUFFER needs */
>  	clear->tt = tt->multi ? udev->ttport : 1;
>  	clear->devinfo = usb_pipeendpoint (pipe);
> -	clear->devinfo |= udev->devnum << 4;
> +	clear->devinfo |= devnum << 4;
>  	clear->devinfo |= usb_pipecontrol(pipe)
>  			? (USB_ENDPOINT_XFER_CONTROL << 11)
>  			: (USB_ENDPOINT_XFER_BULK << 11);
> diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
> index 695931b03684..01720f1f7d62 100644
> --- a/include/linux/usb/hcd.h
> +++ b/include/linux/usb/hcd.h
> @@ -559,7 +559,7 @@ struct usb_tt_clear {
>  	struct usb_host_endpoint	*ep;
>  };
>  
> -extern int usb_hub_clear_tt_buffer(struct urb *urb);
> +extern int usb_hub_clear_tt_buffer(struct urb *urb, int devnum);
>  extern void usb_ep0_reinit(struct usb_device *);
>  
>  /* (shifted) direction/type/recipient from the USB 2.0 spec, table 9.2 */
> -- 
> 2.1.4

You just broke the build with this patch.  No individual patch can ever
do that, they all have to be stand-alone.

Also, when you send a patch series, please make it such that they are
"linked" together.  git send-email does this automatically, I don't know
how you sent these, but it did not work that way :(

Also, always use scripts/get_maintainer.pl to determine who to send the
patches to.  You missed all of the maintainers and developers who need
to review your patches :(

sorry,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-27  6:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-26 14:50 [1/6] usb: hub:Extend usb_hub_clear_tt_buffer parameter Jim Lin
2019-04-26 14:50 ` [PATCH 1/6] " Jim Lin
2019-04-27  6:58 ` [1/6] " Greg Kroah-Hartman
2019-04-27  6:58   ` [PATCH 1/6] " Greg KH

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).