diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2010-10-21 15:22:28 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-03-13 21:07:07 -0400 |
commit | 0b8ca72a23df365a413e03f991bc6b8179dee13f (patch) | |
tree | cbd91979d8c085346638e00bf07f0012d3fd83b7 /drivers/usb/host | |
parent | db7c7c0aeef51dba12d877875b8deb78d9886647 (diff) |
xhci: Remove old no-op test.
The test of placing a number of command no-ops on the command ring and
counting the number of no-op events that were generated was only used
during the initial xHCI driver bring up. This test is no longer used, so
delete it.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 19 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 10 | ||||
-rw-r--r-- | drivers/usb/host/xhci.h | 6 |
3 files changed, 0 insertions, 35 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 3e8211c1ce5..b36d3b003fe 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -1113,7 +1113,6 @@ bandwidth_change: | |||
1113 | handle_set_deq_completion(xhci, event, xhci->cmd_ring->dequeue); | 1113 | handle_set_deq_completion(xhci, event, xhci->cmd_ring->dequeue); |
1114 | break; | 1114 | break; |
1115 | case TRB_TYPE(TRB_CMD_NOOP): | 1115 | case TRB_TYPE(TRB_CMD_NOOP): |
1116 | ++xhci->noops_handled; | ||
1117 | break; | 1116 | break; |
1118 | case TRB_TYPE(TRB_RESET_EP): | 1117 | case TRB_TYPE(TRB_RESET_EP): |
1119 | handle_reset_ep_completion(xhci, event, xhci->cmd_ring->dequeue); | 1118 | handle_reset_ep_completion(xhci, event, xhci->cmd_ring->dequeue); |
@@ -3125,24 +3124,6 @@ static int queue_command(struct xhci_hcd *xhci, u32 field1, u32 field2, | |||
3125 | return 0; | 3124 | return 0; |
3126 | } | 3125 | } |
3127 | 3126 | ||
3128 | /* Queue a no-op command on the command ring */ | ||
3129 | static int queue_cmd_noop(struct xhci_hcd *xhci) | ||
3130 | { | ||
3131 | return queue_command(xhci, 0, 0, 0, TRB_TYPE(TRB_CMD_NOOP), false); | ||
3132 | } | ||
3133 | |||
3134 | /* | ||
3135 | * Place a no-op command on the command ring to test the command and | ||
3136 | * event ring. | ||
3137 | */ | ||
3138 | void *xhci_setup_one_noop(struct xhci_hcd *xhci) | ||
3139 | { | ||
3140 | if (queue_cmd_noop(xhci) < 0) | ||
3141 | return NULL; | ||
3142 | xhci->noops_submitted++; | ||
3143 | return xhci_ring_cmd_db; | ||
3144 | } | ||
3145 | |||
3146 | /* Queue a slot enable or disable request on the command ring */ | 3127 | /* Queue a slot enable or disable request on the command ring */ |
3147 | int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id) | 3128 | int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id) |
3148 | { | 3129 | { |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 34cf4e16587..64f82b99922 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -350,7 +350,6 @@ void xhci_event_ring_work(unsigned long arg) | |||
350 | 350 | ||
351 | temp = xhci_readl(xhci, &xhci->ir_set->irq_pending); | 351 | temp = xhci_readl(xhci, &xhci->ir_set->irq_pending); |
352 | xhci_dbg(xhci, "ir_set 0 pending = 0x%x\n", temp); | 352 | xhci_dbg(xhci, "ir_set 0 pending = 0x%x\n", temp); |
353 | xhci_dbg(xhci, "No-op commands handled = %d\n", xhci->noops_handled); | ||
354 | xhci_dbg(xhci, "HC error bitmask = 0x%x\n", xhci->error_bitmask); | 353 | xhci_dbg(xhci, "HC error bitmask = 0x%x\n", xhci->error_bitmask); |
355 | xhci->error_bitmask = 0; | 354 | xhci->error_bitmask = 0; |
356 | xhci_dbg(xhci, "Event ring:\n"); | 355 | xhci_dbg(xhci, "Event ring:\n"); |
@@ -370,10 +369,6 @@ void xhci_event_ring_work(unsigned long arg) | |||
370 | xhci_dbg_ep_rings(xhci, i, j, &xhci->devs[i]->eps[j]); | 369 | xhci_dbg_ep_rings(xhci, i, j, &xhci->devs[i]->eps[j]); |
371 | } | 370 | } |
372 | } | 371 | } |
373 | |||
374 | if (xhci->noops_submitted != NUM_TEST_NOOPS) | ||
375 | if (xhci_setup_one_noop(xhci)) | ||
376 | xhci_ring_cmd_db(xhci); | ||
377 | spin_unlock_irqrestore(&xhci->lock, flags); | 372 | spin_unlock_irqrestore(&xhci->lock, flags); |
378 | 373 | ||
379 | if (!xhci->zombie) | 374 | if (!xhci->zombie) |
@@ -402,7 +397,6 @@ int xhci_run(struct usb_hcd *hcd) | |||
402 | u32 ret; | 397 | u32 ret; |
403 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); | 398 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
404 | struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller); | 399 | struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller); |
405 | void (*doorbell)(struct xhci_hcd *) = NULL; | ||
406 | 400 | ||
407 | hcd->uses_new_polling = 1; | 401 | hcd->uses_new_polling = 1; |
408 | 402 | ||
@@ -475,8 +469,6 @@ int xhci_run(struct usb_hcd *hcd) | |||
475 | &xhci->ir_set->irq_pending); | 469 | &xhci->ir_set->irq_pending); |
476 | xhci_print_ir_set(xhci, xhci->ir_set, 0); | 470 | xhci_print_ir_set(xhci, xhci->ir_set, 0); |
477 | 471 | ||
478 | if (NUM_TEST_NOOPS > 0) | ||
479 | doorbell = xhci_setup_one_noop(xhci); | ||
480 | if (xhci->quirks & XHCI_NEC_HOST) | 472 | if (xhci->quirks & XHCI_NEC_HOST) |
481 | xhci_queue_vendor_command(xhci, 0, 0, 0, | 473 | xhci_queue_vendor_command(xhci, 0, 0, 0, |
482 | TRB_TYPE(TRB_NEC_GET_FW)); | 474 | TRB_TYPE(TRB_NEC_GET_FW)); |
@@ -486,8 +478,6 @@ int xhci_run(struct usb_hcd *hcd) | |||
486 | return -ENODEV; | 478 | return -ENODEV; |
487 | } | 479 | } |
488 | 480 | ||
489 | if (doorbell) | ||
490 | (*doorbell)(xhci); | ||
491 | if (xhci->quirks & XHCI_NEC_HOST) | 481 | if (xhci->quirks & XHCI_NEC_HOST) |
492 | xhci_ring_cmd_db(xhci); | 482 | xhci_ring_cmd_db(xhci); |
493 | 483 | ||
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 7f236fd2201..2cb5932935d 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -1243,8 +1243,6 @@ struct xhci_hcd { | |||
1243 | */ | 1243 | */ |
1244 | #define XHCI_STATE_DYING (1 << 0) | 1244 | #define XHCI_STATE_DYING (1 << 0) |
1245 | /* Statistics */ | 1245 | /* Statistics */ |
1246 | int noops_submitted; | ||
1247 | int noops_handled; | ||
1248 | int error_bitmask; | 1246 | int error_bitmask; |
1249 | unsigned int quirks; | 1247 | unsigned int quirks; |
1250 | #define XHCI_LINK_TRB_QUIRK (1 << 0) | 1248 | #define XHCI_LINK_TRB_QUIRK (1 << 0) |
@@ -1264,9 +1262,6 @@ struct xhci_hcd { | |||
1264 | unsigned int num_usb2_ports; | 1262 | unsigned int num_usb2_ports; |
1265 | }; | 1263 | }; |
1266 | 1264 | ||
1267 | /* For testing purposes */ | ||
1268 | #define NUM_TEST_NOOPS 0 | ||
1269 | |||
1270 | /* convert between an HCD pointer and the corresponding EHCI_HCD */ | 1265 | /* convert between an HCD pointer and the corresponding EHCI_HCD */ |
1271 | static inline struct xhci_hcd *hcd_to_xhci(struct usb_hcd *hcd) | 1266 | static inline struct xhci_hcd *hcd_to_xhci(struct usb_hcd *hcd) |
1272 | { | 1267 | { |
@@ -1471,7 +1466,6 @@ struct xhci_segment *trb_in_td(struct xhci_segment *start_seg, | |||
1471 | dma_addr_t suspect_dma); | 1466 | dma_addr_t suspect_dma); |
1472 | int xhci_is_vendor_info_code(struct xhci_hcd *xhci, unsigned int trb_comp_code); | 1467 | int xhci_is_vendor_info_code(struct xhci_hcd *xhci, unsigned int trb_comp_code); |
1473 | void xhci_ring_cmd_db(struct xhci_hcd *xhci); | 1468 | void xhci_ring_cmd_db(struct xhci_hcd *xhci); |
1474 | void *xhci_setup_one_noop(struct xhci_hcd *xhci); | ||
1475 | int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id); | 1469 | int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id); |
1476 | int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, | 1470 | int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, |
1477 | u32 slot_id); | 1471 | u32 slot_id); |