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>
This commit is contained in:
Родитель
db7c7c0aee
Коммит
0b8ca72a23
|
@ -1113,7 +1113,6 @@ bandwidth_change:
|
||||||
handle_set_deq_completion(xhci, event, xhci->cmd_ring->dequeue);
|
handle_set_deq_completion(xhci, event, xhci->cmd_ring->dequeue);
|
||||||
break;
|
break;
|
||||||
case TRB_TYPE(TRB_CMD_NOOP):
|
case TRB_TYPE(TRB_CMD_NOOP):
|
||||||
++xhci->noops_handled;
|
|
||||||
break;
|
break;
|
||||||
case TRB_TYPE(TRB_RESET_EP):
|
case TRB_TYPE(TRB_RESET_EP):
|
||||||
handle_reset_ep_completion(xhci, event, xhci->cmd_ring->dequeue);
|
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,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Queue a no-op command on the command ring */
|
|
||||||
static int queue_cmd_noop(struct xhci_hcd *xhci)
|
|
||||||
{
|
|
||||||
return queue_command(xhci, 0, 0, 0, TRB_TYPE(TRB_CMD_NOOP), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Place a no-op command on the command ring to test the command and
|
|
||||||
* event ring.
|
|
||||||
*/
|
|
||||||
void *xhci_setup_one_noop(struct xhci_hcd *xhci)
|
|
||||||
{
|
|
||||||
if (queue_cmd_noop(xhci) < 0)
|
|
||||||
return NULL;
|
|
||||||
xhci->noops_submitted++;
|
|
||||||
return xhci_ring_cmd_db;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Queue a slot enable or disable request on the command ring */
|
/* Queue a slot enable or disable request on the command ring */
|
||||||
int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id)
|
int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id)
|
||||||
{
|
{
|
||||||
|
|
|
@ -350,7 +350,6 @@ void xhci_event_ring_work(unsigned long arg)
|
||||||
|
|
||||||
temp = xhci_readl(xhci, &xhci->ir_set->irq_pending);
|
temp = xhci_readl(xhci, &xhci->ir_set->irq_pending);
|
||||||
xhci_dbg(xhci, "ir_set 0 pending = 0x%x\n", temp);
|
xhci_dbg(xhci, "ir_set 0 pending = 0x%x\n", temp);
|
||||||
xhci_dbg(xhci, "No-op commands handled = %d\n", xhci->noops_handled);
|
|
||||||
xhci_dbg(xhci, "HC error bitmask = 0x%x\n", xhci->error_bitmask);
|
xhci_dbg(xhci, "HC error bitmask = 0x%x\n", xhci->error_bitmask);
|
||||||
xhci->error_bitmask = 0;
|
xhci->error_bitmask = 0;
|
||||||
xhci_dbg(xhci, "Event ring:\n");
|
xhci_dbg(xhci, "Event ring:\n");
|
||||||
|
@ -370,10 +369,6 @@ void xhci_event_ring_work(unsigned long arg)
|
||||||
xhci_dbg_ep_rings(xhci, i, j, &xhci->devs[i]->eps[j]);
|
xhci_dbg_ep_rings(xhci, i, j, &xhci->devs[i]->eps[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xhci->noops_submitted != NUM_TEST_NOOPS)
|
|
||||||
if (xhci_setup_one_noop(xhci))
|
|
||||||
xhci_ring_cmd_db(xhci);
|
|
||||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||||
|
|
||||||
if (!xhci->zombie)
|
if (!xhci->zombie)
|
||||||
|
@ -402,7 +397,6 @@ int xhci_run(struct usb_hcd *hcd)
|
||||||
u32 ret;
|
u32 ret;
|
||||||
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
|
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
|
||||||
struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller);
|
struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller);
|
||||||
void (*doorbell)(struct xhci_hcd *) = NULL;
|
|
||||||
|
|
||||||
hcd->uses_new_polling = 1;
|
hcd->uses_new_polling = 1;
|
||||||
|
|
||||||
|
@ -475,8 +469,6 @@ int xhci_run(struct usb_hcd *hcd)
|
||||||
&xhci->ir_set->irq_pending);
|
&xhci->ir_set->irq_pending);
|
||||||
xhci_print_ir_set(xhci, xhci->ir_set, 0);
|
xhci_print_ir_set(xhci, xhci->ir_set, 0);
|
||||||
|
|
||||||
if (NUM_TEST_NOOPS > 0)
|
|
||||||
doorbell = xhci_setup_one_noop(xhci);
|
|
||||||
if (xhci->quirks & XHCI_NEC_HOST)
|
if (xhci->quirks & XHCI_NEC_HOST)
|
||||||
xhci_queue_vendor_command(xhci, 0, 0, 0,
|
xhci_queue_vendor_command(xhci, 0, 0, 0,
|
||||||
TRB_TYPE(TRB_NEC_GET_FW));
|
TRB_TYPE(TRB_NEC_GET_FW));
|
||||||
|
@ -486,8 +478,6 @@ int xhci_run(struct usb_hcd *hcd)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doorbell)
|
|
||||||
(*doorbell)(xhci);
|
|
||||||
if (xhci->quirks & XHCI_NEC_HOST)
|
if (xhci->quirks & XHCI_NEC_HOST)
|
||||||
xhci_ring_cmd_db(xhci);
|
xhci_ring_cmd_db(xhci);
|
||||||
|
|
||||||
|
|
|
@ -1243,8 +1243,6 @@ struct xhci_hcd {
|
||||||
*/
|
*/
|
||||||
#define XHCI_STATE_DYING (1 << 0)
|
#define XHCI_STATE_DYING (1 << 0)
|
||||||
/* Statistics */
|
/* Statistics */
|
||||||
int noops_submitted;
|
|
||||||
int noops_handled;
|
|
||||||
int error_bitmask;
|
int error_bitmask;
|
||||||
unsigned int quirks;
|
unsigned int quirks;
|
||||||
#define XHCI_LINK_TRB_QUIRK (1 << 0)
|
#define XHCI_LINK_TRB_QUIRK (1 << 0)
|
||||||
|
@ -1264,9 +1262,6 @@ struct xhci_hcd {
|
||||||
unsigned int num_usb2_ports;
|
unsigned int num_usb2_ports;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* For testing purposes */
|
|
||||||
#define NUM_TEST_NOOPS 0
|
|
||||||
|
|
||||||
/* convert between an HCD pointer and the corresponding EHCI_HCD */
|
/* convert between an HCD pointer and the corresponding EHCI_HCD */
|
||||||
static inline struct xhci_hcd *hcd_to_xhci(struct usb_hcd *hcd)
|
static inline struct xhci_hcd *hcd_to_xhci(struct usb_hcd *hcd)
|
||||||
{
|
{
|
||||||
|
@ -1471,7 +1466,6 @@ struct xhci_segment *trb_in_td(struct xhci_segment *start_seg,
|
||||||
dma_addr_t suspect_dma);
|
dma_addr_t suspect_dma);
|
||||||
int xhci_is_vendor_info_code(struct xhci_hcd *xhci, unsigned int trb_comp_code);
|
int xhci_is_vendor_info_code(struct xhci_hcd *xhci, unsigned int trb_comp_code);
|
||||||
void xhci_ring_cmd_db(struct xhci_hcd *xhci);
|
void xhci_ring_cmd_db(struct xhci_hcd *xhci);
|
||||||
void *xhci_setup_one_noop(struct xhci_hcd *xhci);
|
|
||||||
int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id);
|
int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id);
|
||||||
int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
|
int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
|
||||||
u32 slot_id);
|
u32 slot_id);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче