Hi David,
This patch is fine in general, however I can't seem to get it to apply.
I tried 3.12, 3.13-rc4, and my for-usb-next-queue branch, and `git am`
failed on all three kernels. Can you rebase this against either
3.13-rc4 or my for-usb-next-queue branch?
Thanks,
Sarah Sharp
On Wed, Nov 13, 2013 at 05:01:46PM -, David Laight wrote:
> The xhci_queue_bulk_tx() function is used for both OUT and IN
> transactions, but the name implies that it is only used for transmits.
> Rename it to xhci_queue_bulk_urb() to avoid any confusion.
>
> Similarly rename the functions for ctrl, intr and isoc URB.
> Rename the existing xhci_queue_isoc_tx() to write_isoc_trbs() to allow
> consistent naming.
>
> Signed-off-by: David Laight
> ---
> drivers/usb/host/xhci-ring.c | 16
> drivers/usb/host/xhci.c | 8
> drivers/usb/host/xhci.h | 8
> 3 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index 8bce4c3..45a4cde 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -3146,7 +3146,7 @@ static void giveback_first_trb(struct xhci_hcd *xhci,
> int slot_id,
> * (comprised of sg list entries) can take several service intervals to
> * transmit.
> */
> -int xhci_queue_intr_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
> +int xhci_queue_intr_urb(struct xhci_hcd *xhci, gfp_t mem_flags,
> struct urb *urb, int slot_id, unsigned int ep_index)
> {
> struct xhci_ep_ctx *ep_ctx = xhci_get_ep_ctx(xhci,
> @@ -3174,7 +3174,7 @@ int xhci_queue_intr_tx(struct xhci_hcd *xhci, gfp_t
> mem_flags,
> urb->dev->speed == USB_SPEED_FULL)
> urb->interval /= 8;
> }
> - return xhci_queue_bulk_tx(xhci, mem_flags, urb, slot_id, ep_index);
> + return xhci_queue_bulk_urb(xhci, mem_flags, urb, slot_id, ep_index);
> }
>
> /*
> @@ -3228,7 +3228,7 @@ static u32 xhci_v1_0_td_remainder(int running_total,
> int trb_buff_len,
> return (total_packet_count - packets_transferred) << 17;
> }
>
> -int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
> +int xhci_queue_bulk_urb(struct xhci_hcd *xhci, gfp_t mem_flags,
> struct urb *urb, int slot_id, unsigned int ep_index)
> {
> struct xhci_ring *ep_ring;
> @@ -3370,7 +3370,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t
> mem_flags,
> }
>
> /* Caller must have locked xhci->lock */
> -int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
> +int xhci_queue_ctrl_urb(struct xhci_hcd *xhci, gfp_t mem_flags,
> struct urb *urb, int slot_id, unsigned int ep_index)
> {
> struct xhci_ring *ep_ring;
> @@ -3557,7 +3557,7 @@ static unsigned int
> xhci_get_last_burst_packet_count(struct xhci_hcd *xhci,
> }
>
> /* This is for isoc transfer */
> -static void xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
> +static void write_isoc_trbs(struct xhci_hcd *xhci, gfp_t mem_flags,
> struct urb *urb, int slot_id, unsigned int ep_index)
> {
> struct xhci_ring *ep_ring;
> @@ -3702,11 +3702,11 @@ static void xhci_queue_isoc_tx(struct xhci_hcd *xhci,
> gfp_t mem_flags,
> /*
> * Check transfer ring to guarantee there is enough room for the urb.
> * Update ISO URB start_frame and interval.
> - * Update interval as xhci_queue_intr_tx does. Just use xhci frame_index to
> + * Update interval as xhci_queue_intr_urb does. Just use xhci frame_index to
> * update the urb->start_frame by now.
> * Always assume URB_ISO_ASAP set, and NEVER use urb->start_frame as input.
> */
> -int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci, gfp_t mem_flags,
> +int xhci_queue_isoc_urb(struct xhci_hcd *xhci, gfp_t mem_flags,
> struct urb *urb, int slot_id, unsigned int ep_index)
> {
> struct xhci_virt_device *xdev;
> @@ -3762,7 +3762,7 @@ int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci,
> gfp_t mem_flags,
> urb->interval /= 8;
> }
>
> - xhci_queue_isoc_tx(xhci, mem_flags, urb, slot_id, ep_index);
> + write_isoc_trbs(xhci, mem_flags, urb, slot_id, ep_index);
> return 0;
> }
>
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 4f378f3..076292f 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -1302,7 +1302,7 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb
> *urb, gfp_t mem_flags)
> spin_lock_irqsave(&xhci->lock, flags);
> if (xhci->xhc_state & XHCI_STATE_DYING)
> goto dying;
> - ret = xhci_queue_ctrl_tx(xhci, GFP_ATOMIC, urb,
> + ret = xhci_queue_ctrl_urb(xhci, GFP_ATOMIC, urb,
> slot_id, ep_index);
> if (ret)
> goto free_priv;
> @@ -1323,7 +1323,7 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb
> *urb, gfp_t me