diff options
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r-- | drivers/usb/host/xhci.h | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 6c7e3430ec93..34a60d9f056a 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -720,6 +720,14 @@ struct xhci_virt_ep { | |||
720 | struct timer_list stop_cmd_timer; | 720 | struct timer_list stop_cmd_timer; |
721 | int stop_cmds_pending; | 721 | int stop_cmds_pending; |
722 | struct xhci_hcd *xhci; | 722 | struct xhci_hcd *xhci; |
723 | /* | ||
724 | * Sometimes the xHC can not process isochronous endpoint ring quickly | ||
725 | * enough, and it will miss some isoc tds on the ring and generate | ||
726 | * a Missed Service Error Event. | ||
727 | * Set skip flag when receive a Missed Service Error Event and | ||
728 | * process the missed tds on the endpoint ring. | ||
729 | */ | ||
730 | bool skip; | ||
723 | }; | 731 | }; |
724 | 732 | ||
725 | struct xhci_virt_device { | 733 | struct xhci_virt_device { |
@@ -911,6 +919,9 @@ struct xhci_event_cmd { | |||
911 | /* Control transfer TRB specific fields */ | 919 | /* Control transfer TRB specific fields */ |
912 | #define TRB_DIR_IN (1<<16) | 920 | #define TRB_DIR_IN (1<<16) |
913 | 921 | ||
922 | /* Isochronous TRB specific fields */ | ||
923 | #define TRB_SIA (1<<31) | ||
924 | |||
914 | struct xhci_generic_trb { | 925 | struct xhci_generic_trb { |
915 | u32 field[4]; | 926 | u32 field[4]; |
916 | }; | 927 | }; |
@@ -1082,6 +1093,12 @@ struct xhci_scratchpad { | |||
1082 | dma_addr_t *sp_dma_buffers; | 1093 | dma_addr_t *sp_dma_buffers; |
1083 | }; | 1094 | }; |
1084 | 1095 | ||
1096 | struct urb_priv { | ||
1097 | int length; | ||
1098 | int td_cnt; | ||
1099 | struct xhci_td *td[0]; | ||
1100 | }; | ||
1101 | |||
1085 | /* | 1102 | /* |
1086 | * Each segment table entry is 4*32bits long. 1K seems like an ok size: | 1103 | * Each segment table entry is 4*32bits long. 1K seems like an ok size: |
1087 | * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table, | 1104 | * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table, |
@@ -1130,7 +1147,7 @@ struct xhci_hcd { | |||
1130 | int page_size; | 1147 | int page_size; |
1131 | /* Valid values are 12 to 20, inclusive */ | 1148 | /* Valid values are 12 to 20, inclusive */ |
1132 | int page_shift; | 1149 | int page_shift; |
1133 | /* only one MSI vector for now, but might need more later */ | 1150 | /* msi-x vectors */ |
1134 | int msix_count; | 1151 | int msix_count; |
1135 | struct msix_entry *msix_entries; | 1152 | struct msix_entry *msix_entries; |
1136 | /* data structures */ | 1153 | /* data structures */ |
@@ -1327,11 +1344,6 @@ void xhci_setup_no_streams_ep_input_ctx(struct xhci_hcd *xhci, | |||
1327 | struct xhci_ring *xhci_dma_to_transfer_ring( | 1344 | struct xhci_ring *xhci_dma_to_transfer_ring( |
1328 | struct xhci_virt_ep *ep, | 1345 | struct xhci_virt_ep *ep, |
1329 | u64 address); | 1346 | u64 address); |
1330 | struct xhci_ring *xhci_urb_to_transfer_ring(struct xhci_hcd *xhci, | ||
1331 | struct urb *urb); | ||
1332 | struct xhci_ring *xhci_triad_to_transfer_ring(struct xhci_hcd *xhci, | ||
1333 | unsigned int slot_id, unsigned int ep_index, | ||
1334 | unsigned int stream_id); | ||
1335 | struct xhci_ring *xhci_stream_id_to_ring( | 1347 | struct xhci_ring *xhci_stream_id_to_ring( |
1336 | struct xhci_virt_device *dev, | 1348 | struct xhci_virt_device *dev, |
1337 | unsigned int ep_index, | 1349 | unsigned int ep_index, |
@@ -1339,6 +1351,7 @@ struct xhci_ring *xhci_stream_id_to_ring( | |||
1339 | struct xhci_command *xhci_alloc_command(struct xhci_hcd *xhci, | 1351 | struct xhci_command *xhci_alloc_command(struct xhci_hcd *xhci, |
1340 | bool allocate_in_ctx, bool allocate_completion, | 1352 | bool allocate_in_ctx, bool allocate_completion, |
1341 | gfp_t mem_flags); | 1353 | gfp_t mem_flags); |
1354 | void xhci_urb_free_priv(struct xhci_hcd *xhci, struct urb_priv *urb_priv); | ||
1342 | void xhci_free_command(struct xhci_hcd *xhci, | 1355 | void xhci_free_command(struct xhci_hcd *xhci, |
1343 | struct xhci_command *command); | 1356 | struct xhci_command *command); |
1344 | 1357 | ||
@@ -1358,6 +1371,7 @@ void xhci_stop(struct usb_hcd *hcd); | |||
1358 | void xhci_shutdown(struct usb_hcd *hcd); | 1371 | void xhci_shutdown(struct usb_hcd *hcd); |
1359 | int xhci_get_frame(struct usb_hcd *hcd); | 1372 | int xhci_get_frame(struct usb_hcd *hcd); |
1360 | irqreturn_t xhci_irq(struct usb_hcd *hcd); | 1373 | irqreturn_t xhci_irq(struct usb_hcd *hcd); |
1374 | irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd); | ||
1361 | int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev); | 1375 | int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev); |
1362 | void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev); | 1376 | void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev); |
1363 | int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev, | 1377 | int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev, |
@@ -1386,8 +1400,6 @@ struct xhci_segment *trb_in_td(struct xhci_segment *start_seg, | |||
1386 | int xhci_is_vendor_info_code(struct xhci_hcd *xhci, unsigned int trb_comp_code); | 1400 | int xhci_is_vendor_info_code(struct xhci_hcd *xhci, unsigned int trb_comp_code); |
1387 | void xhci_ring_cmd_db(struct xhci_hcd *xhci); | 1401 | void xhci_ring_cmd_db(struct xhci_hcd *xhci); |
1388 | void *xhci_setup_one_noop(struct xhci_hcd *xhci); | 1402 | void *xhci_setup_one_noop(struct xhci_hcd *xhci); |
1389 | void xhci_handle_event(struct xhci_hcd *xhci); | ||
1390 | void xhci_set_hc_event_deq(struct xhci_hcd *xhci); | ||
1391 | int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id); | 1403 | int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id); |
1392 | int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, | 1404 | int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, |
1393 | u32 slot_id); | 1405 | u32 slot_id); |
@@ -1401,6 +1413,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, | |||
1401 | int slot_id, unsigned int ep_index); | 1413 | int slot_id, unsigned int ep_index); |
1402 | int xhci_queue_intr_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, | 1414 | int xhci_queue_intr_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, |
1403 | int slot_id, unsigned int ep_index); | 1415 | int slot_id, unsigned int ep_index); |
1416 | int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci, gfp_t mem_flags, | ||
1417 | struct urb *urb, int slot_id, unsigned int ep_index); | ||
1404 | int xhci_queue_configure_endpoint(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, | 1418 | int xhci_queue_configure_endpoint(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, |
1405 | u32 slot_id, bool command_must_succeed); | 1419 | u32 slot_id, bool command_must_succeed); |
1406 | int xhci_queue_evaluate_context(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, | 1420 | int xhci_queue_evaluate_context(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, |