aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-hcd.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-04-29 22:14:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:44:50 -0400
commit700e2052c6814b1b1d2714225d568c5c64bc49ae (patch)
tree67c62f3c3773d2b856e21662435c839a1aab9dd4 /drivers/usb/host/xhci-hcd.c
parentb7258a4aba2b24d5c27a0f6674795e83e7771969 (diff)
USB: xhci: fix lots of compiler warnings.
Turns out someone never built this code on a 64bit platform. Someone owes me a beer... Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/xhci-hcd.c')
-rw-r--r--drivers/usb/host/xhci-hcd.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c
index 197e6bb5b93d..9ffa1fa507cf 100644
--- a/drivers/usb/host/xhci-hcd.c
+++ b/drivers/usb/host/xhci-hcd.c
@@ -397,10 +397,8 @@ int xhci_run(struct usb_hcd *hcd)
397 xhci_writel(xhci, temp, &xhci->op_regs->command); 397 xhci_writel(xhci, temp, &xhci->op_regs->command);
398 398
399 temp = xhci_readl(xhci, &xhci->ir_set->irq_pending); 399 temp = xhci_readl(xhci, &xhci->ir_set->irq_pending);
400 xhci_dbg(xhci, "// Enabling event ring interrupter 0x%x" 400 xhci_dbg(xhci, "// Enabling event ring interrupter %p by writing 0x%x to irq_pending\n",
401 " by writing 0x%x to irq_pending\n", 401 xhci->ir_set, (unsigned int) ER_IRQ_ENABLE(temp));
402 (unsigned int) xhci->ir_set,
403 (unsigned int) ER_IRQ_ENABLE(temp));
404 xhci_writel(xhci, ER_IRQ_ENABLE(temp), 402 xhci_writel(xhci, ER_IRQ_ENABLE(temp),
405 &xhci->ir_set->irq_pending); 403 &xhci->ir_set->irq_pending);
406 xhci_print_ir_set(xhci, xhci->ir_set, 0); 404 xhci_print_ir_set(xhci, xhci->ir_set, 0);
@@ -431,8 +429,7 @@ int xhci_run(struct usb_hcd *hcd)
431 xhci_writel(xhci, temp, &xhci->op_regs->command); 429 xhci_writel(xhci, temp, &xhci->op_regs->command);
432 /* Flush PCI posted writes */ 430 /* Flush PCI posted writes */
433 temp = xhci_readl(xhci, &xhci->op_regs->command); 431 temp = xhci_readl(xhci, &xhci->op_regs->command);
434 xhci_dbg(xhci, "// @%x = 0x%x\n", 432 xhci_dbg(xhci, "// @%p = 0x%x\n", &xhci->op_regs->command, temp);
435 (unsigned int) &xhci->op_regs->command, temp);
436 if (doorbell) 433 if (doorbell)
437 (*doorbell)(xhci); 434 (*doorbell)(xhci);
438 435
@@ -660,7 +657,7 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
660 if (ret || !urb->hcpriv) 657 if (ret || !urb->hcpriv)
661 goto done; 658 goto done;
662 659
663 xhci_dbg(xhci, "Cancel URB 0x%x\n", (unsigned int) urb); 660 xhci_dbg(xhci, "Cancel URB %p\n", urb);
664 ep_index = xhci_get_endpoint_index(&urb->ep->desc); 661 ep_index = xhci_get_endpoint_index(&urb->ep->desc);
665 ep_ring = xhci->devs[urb->dev->slot_id]->ep_rings[ep_index]; 662 ep_ring = xhci->devs[urb->dev->slot_id]->ep_rings[ep_index];
666 td = (struct xhci_td *) urb->hcpriv; 663 td = (struct xhci_td *) urb->hcpriv;
@@ -702,10 +699,10 @@ int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
702 int ret; 699 int ret;
703 700
704 ret = xhci_check_args(hcd, udev, ep, 1, __func__); 701 ret = xhci_check_args(hcd, udev, ep, 1, __func__);
705 xhci_dbg(xhci, "%s called for udev %#x\n", __func__, (unsigned int) udev);
706 if (ret <= 0) 702 if (ret <= 0)
707 return ret; 703 return ret;
708 xhci = hcd_to_xhci(hcd); 704 xhci = hcd_to_xhci(hcd);
705 xhci_dbg(xhci, "%s called for udev %p\n", __func__, udev);
709 706
710 drop_flag = xhci_get_endpoint_flag(&ep->desc); 707 drop_flag = xhci_get_endpoint_flag(&ep->desc);
711 if (drop_flag == SLOT_FLAG || drop_flag == EP0_FLAG) { 708 if (drop_flag == SLOT_FLAG || drop_flag == EP0_FLAG) {
@@ -730,8 +727,8 @@ int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
730 */ 727 */
731 if ((ep_ctx->ep_info & EP_STATE_MASK) == EP_STATE_DISABLED || 728 if ((ep_ctx->ep_info & EP_STATE_MASK) == EP_STATE_DISABLED ||
732 in_ctx->drop_flags & xhci_get_endpoint_flag(&ep->desc)) { 729 in_ctx->drop_flags & xhci_get_endpoint_flag(&ep->desc)) {
733 xhci_warn(xhci, "xHCI %s called with disabled ep %#x\n", 730 xhci_warn(xhci, "xHCI %s called with disabled ep %p\n",
734 __func__, (unsigned int) ep); 731 __func__, ep);
735 spin_unlock_irqrestore(&xhci->lock, flags); 732 spin_unlock_irqrestore(&xhci->lock, flags);
736 return 0; 733 return 0;
737 } 734 }
@@ -817,8 +814,8 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
817 * ignore this request. 814 * ignore this request.
818 */ 815 */
819 if (in_ctx->add_flags & xhci_get_endpoint_flag(&ep->desc)) { 816 if (in_ctx->add_flags & xhci_get_endpoint_flag(&ep->desc)) {
820 xhci_warn(xhci, "xHCI %s called with enabled ep %#x\n", 817 xhci_warn(xhci, "xHCI %s called with enabled ep %p\n",
821 __func__, (unsigned int) ep); 818 __func__, ep);
822 spin_unlock_irqrestore(&xhci->lock, flags); 819 spin_unlock_irqrestore(&xhci->lock, flags);
823 return 0; 820 return 0;
824 } 821 }
@@ -904,7 +901,7 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)
904 spin_unlock_irqrestore(&xhci->lock, flags); 901 spin_unlock_irqrestore(&xhci->lock, flags);
905 return -EINVAL; 902 return -EINVAL;
906 } 903 }
907 xhci_dbg(xhci, "%s called for udev %#x\n", __func__, (unsigned int) udev); 904 xhci_dbg(xhci, "%s called for udev %p\n", __func__, udev);
908 virt_dev = xhci->devs[udev->slot_id]; 905 virt_dev = xhci->devs[udev->slot_id];
909 906
910 /* See section 4.6.6 - A0 = 1; A1 = D0 = D1 = 0 */ 907 /* See section 4.6.6 - A0 = 1; A1 = D0 = D1 = 0 */
@@ -1009,7 +1006,7 @@ void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)
1009 spin_unlock_irqrestore(&xhci->lock, flags); 1006 spin_unlock_irqrestore(&xhci->lock, flags);
1010 return; 1007 return;
1011 } 1008 }
1012 xhci_dbg(xhci, "%s called for udev %#x\n", __func__, (unsigned int) udev); 1009 xhci_dbg(xhci, "%s called for udev %p\n", __func__, udev);
1013 virt_dev = xhci->devs[udev->slot_id]; 1010 virt_dev = xhci->devs[udev->slot_id];
1014 /* Free any rings allocated for added endpoints */ 1011 /* Free any rings allocated for added endpoints */
1015 for (i = 0; i < 31; ++i) { 1012 for (i = 0; i < 31; ++i) {
@@ -1184,16 +1181,16 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
1184 xhci_dbg(xhci, "Op regs DCBAA ptr[0] = %#08x\n", temp); 1181 xhci_dbg(xhci, "Op regs DCBAA ptr[0] = %#08x\n", temp);
1185 temp = xhci_readl(xhci, &xhci->op_regs->dcbaa_ptr[1]); 1182 temp = xhci_readl(xhci, &xhci->op_regs->dcbaa_ptr[1]);
1186 xhci_dbg(xhci, "Op regs DCBAA ptr[1] = %#08x\n", temp); 1183 xhci_dbg(xhci, "Op regs DCBAA ptr[1] = %#08x\n", temp);
1187 xhci_dbg(xhci, "Slot ID %d dcbaa entry[0] @%08x = %#08x\n", 1184 xhci_dbg(xhci, "Slot ID %d dcbaa entry[0] @%p = %#08x\n",
1188 udev->slot_id, 1185 udev->slot_id,
1189 (unsigned int) &xhci->dcbaa->dev_context_ptrs[2*udev->slot_id], 1186 &xhci->dcbaa->dev_context_ptrs[2*udev->slot_id],
1190 xhci->dcbaa->dev_context_ptrs[2*udev->slot_id]); 1187 xhci->dcbaa->dev_context_ptrs[2*udev->slot_id]);
1191 xhci_dbg(xhci, "Slot ID %d dcbaa entry[1] @%08x = %#08x\n", 1188 xhci_dbg(xhci, "Slot ID %d dcbaa entry[1] @%p = %#08x\n",
1192 udev->slot_id, 1189 udev->slot_id,
1193 (unsigned int) &xhci->dcbaa->dev_context_ptrs[2*udev->slot_id+1], 1190 &xhci->dcbaa->dev_context_ptrs[2*udev->slot_id+1],
1194 xhci->dcbaa->dev_context_ptrs[2*udev->slot_id+1]); 1191 xhci->dcbaa->dev_context_ptrs[2*udev->slot_id+1]);
1195 xhci_dbg(xhci, "Output Context DMA address = %#08x\n", 1192 xhci_dbg(xhci, "Output Context DMA address = %#08llx\n",
1196 virt_dev->out_ctx_dma); 1193 (unsigned long long)virt_dev->out_ctx_dma);
1197 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id); 1194 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id);
1198 xhci_dbg_ctx(xhci, virt_dev->in_ctx, virt_dev->in_ctx_dma, 2); 1195 xhci_dbg_ctx(xhci, virt_dev->in_ctx, virt_dev->in_ctx_dma, 2);
1199 xhci_dbg(xhci, "Slot ID %d Output Context:\n", udev->slot_id); 1196 xhci_dbg(xhci, "Slot ID %d Output Context:\n", udev->slot_id);