Re: [PATCH 2/2] usb/uhci: initialize sg_table

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

 



On Tue, 10 Jan 2012, Sebastian Andrzej Siewior wrote:

> Commit 689d6eac ("USB: UHCI: add native scatter-gather support(v1))
> added sg support to uhci but forgot to set the sg_table so this feature
> remained unused.
> 
> Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> Cc: Ming Lei <tom.leiming@xxxxxxxxx>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> ---
>  drivers/usb/host/uhci-hcd.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
> index c8ae199..73def82 100644
> --- a/drivers/usb/host/uhci-hcd.c
> +++ b/drivers/usb/host/uhci-hcd.c
> @@ -164,6 +164,11 @@ static void uhci_hc_died(struct uhci_hcd *uhci)
>   */
>  static void check_and_reset_hc(struct uhci_hcd *uhci)
>  {

I see why you put the new code here, but IMO a more logical place would
be somewhere near the beginning of uhci_start().  check_and_reset_hc()  
is a little unusual in that it gets called in other places as well as
during initialization.

> +	struct usb_hcd *hcd = uhci_to_hcd(uhci);
> +
> +	/* Accept arbitrarily long scatter-gather lists */
> +	if (!(hcd->driver->flags & HCD_LOCAL_MEM))
> +		hcd->self.sg_tablesize = ~0;
>  	if (uhci->check_and_reset_hc(uhci))
>  		finish_reset(uhci);
>  }

Alan Stern

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