diff options
| author | hathach <[email protected]> | 2013-03-22 21:21:00 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-03-22 21:21:00 +0700 |
| commit | 397d62db10f11c2ee49950f51d28b2e2156ac5c8 (patch) | |
| tree | 31cc2bb736169f5f0efc0311446fbbcadd92552c /tests/test/host | |
| parent | f6acca666421cddb4e25842ad1215e951f898ecb (diff) | |
fix bug: adjust all bulk queue head from ehci_data.device
Diffstat (limited to 'tests/test/host')
| -rw-r--r-- | tests/test/host/ehci/test_ehci_usbh_hcd_integration.c | 4 | ||||
| -rw-r--r-- | tests/test/host/ehci/test_pipe_bulk_open.c | 4 | ||||
| -rw-r--r-- | tests/test/host/ehci/test_pipe_bulk_xfer.c | 2 | ||||
| -rw-r--r-- | tests/test/host/ehci/test_pipe_control_xfer.c | 6 | ||||
| -rw-r--r-- | tests/test/host/ehci/test_pipe_interrupt_open.c | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/tests/test/host/ehci/test_ehci_usbh_hcd_integration.c b/tests/test/host/ehci/test_ehci_usbh_hcd_integration.c index db44746d3..fbfdea6fd 100644 --- a/tests/test/host/ehci/test_ehci_usbh_hcd_integration.c +++ b/tests/test/host/ehci/test_ehci_usbh_hcd_integration.c @@ -127,7 +127,7 @@ void test_isr_disconnect_then_async_advance_control_pipe(void) .wValue = 3 }, NULL); - ehci_qhd_t *p_qhd = &ehci_data.device[dev_addr].control.qhd; + ehci_qhd_t *p_qhd = get_control_qhd(dev_addr); ehci_qtd_t *p_qtd_head = p_qhd->p_qtd_list_head; ehci_qtd_t *p_qtd_tail = p_qhd->p_qtd_list_tail; @@ -162,7 +162,7 @@ void test_bulk_pipe_close(void) hcd_pipe_xfer(pipe_hdl, xfer_data, sizeof(xfer_data), 100); hcd_pipe_xfer(pipe_hdl, xfer_data, sizeof(xfer_data), 50); - ehci_qhd_t *p_qhd = &ehci_data.device[dev_addr].qhd[pipe_hdl.index]; + ehci_qhd_t *p_qhd = &ehci_data.device[dev_addr-1].qhd[pipe_hdl.index]; ehci_qtd_t *p_qtd_head = p_qhd->p_qtd_list_head; ehci_qtd_t *p_qtd_tail = p_qhd->p_qtd_list_tail; diff --git a/tests/test/host/ehci/test_pipe_bulk_open.c b/tests/test/host/ehci/test_pipe_bulk_open.c index b6c11d76e..03c7d0b85 100644 --- a/tests/test/host/ehci/test_pipe_bulk_open.c +++ b/tests/test/host/ehci/test_pipe_bulk_open.c @@ -153,7 +153,7 @@ void test_open_bulk_qhd_data(void) TEST_ASSERT_EQUAL(dev_addr, pipe_hdl.dev_addr); TEST_ASSERT_EQUAL(TUSB_XFER_BULK, pipe_hdl.xfer_type); - p_qhd = &ehci_data.device[ pipe_hdl.dev_addr ].qhd[ pipe_hdl.index ]; + p_qhd = &ehci_data.device[ pipe_hdl.dev_addr-1 ].qhd[ pipe_hdl.index ]; verify_bulk_open_qhd(p_qhd, desc_endpoint, TUSB_CLASS_MSC); //------------- async list check -------------// @@ -169,7 +169,7 @@ void test_bulk_close(void) { tusb_descriptor_endpoint_t const * desc_endpoint = &desc_ept_bulk_in; pipe_handle_t pipe_hdl = hcd_pipe_open(dev_addr, desc_endpoint, TUSB_CLASS_MSC); - ehci_qhd_t *p_qhd = &ehci_data.device[ pipe_hdl.dev_addr ].qhd[ pipe_hdl.index ]; + ehci_qhd_t *p_qhd = &ehci_data.device[ pipe_hdl.dev_addr-1].qhd[ pipe_hdl.index ]; //------------- Code Under TEST -------------// hcd_pipe_close(pipe_hdl); diff --git a/tests/test/host/ehci/test_pipe_bulk_xfer.c b/tests/test/host/ehci/test_pipe_bulk_xfer.c index 327dbdfc4..ac9be3727 100644 --- a/tests/test/host/ehci/test_pipe_bulk_xfer.c +++ b/tests/test/host/ehci/test_pipe_bulk_xfer.c @@ -101,7 +101,7 @@ void setUp(void) TEST_ASSERT_EQUAL(dev_addr, pipe_hdl_bulk.dev_addr); TEST_ASSERT_EQUAL(TUSB_XFER_BULK, pipe_hdl_bulk.xfer_type); - p_qhd_bulk = &ehci_data.device[ dev_addr ].qhd[ pipe_hdl_bulk.index ]; + p_qhd_bulk = &ehci_data.device[ dev_addr -1].qhd[ pipe_hdl_bulk.index ]; } void tearDown(void) diff --git a/tests/test/host/ehci/test_pipe_control_xfer.c b/tests/test/host/ehci/test_pipe_control_xfer.c index 583a6d313..754db1295 100644 --- a/tests/test/host/ehci/test_pipe_control_xfer.c +++ b/tests/test/host/ehci/test_pipe_control_xfer.c @@ -98,9 +98,9 @@ void setUp(void) async_head = get_async_head( hostid ); - p_setup = &ehci_data.device[dev_addr].control.qtd[0]; - p_data = &ehci_data.device[dev_addr].control.qtd[1]; - p_status = &ehci_data.device[dev_addr].control.qtd[2]; + p_setup = &ehci_data.device[dev_addr-1].control.qtd[0]; + p_data = &ehci_data.device[dev_addr-1].control.qtd[1]; + p_status = &ehci_data.device[dev_addr-1].control.qtd[2]; } void tearDown(void) diff --git a/tests/test/host/ehci/test_pipe_interrupt_open.c b/tests/test/host/ehci/test_pipe_interrupt_open.c index 62da7d7b3..0ae65b2ab 100644 --- a/tests/test/host/ehci/test_pipe_interrupt_open.c +++ b/tests/test/host/ehci/test_pipe_interrupt_open.c @@ -148,7 +148,7 @@ void test_open_interrupt_qhd_hs(void) TEST_ASSERT_EQUAL(dev_addr, pipe_hdl.dev_addr); TEST_ASSERT_EQUAL(TUSB_XFER_INTERRUPT, pipe_hdl.xfer_type); - p_qhd = &ehci_data.device[ pipe_hdl.dev_addr ].qhd[ pipe_hdl.index ]; + p_qhd = &ehci_data.device[ pipe_hdl.dev_addr-1].qhd[ pipe_hdl.index ]; verify_int_qhd(p_qhd, &desc_ept_interrupt_out, TUSB_CLASS_HID); @@ -169,7 +169,7 @@ void test_open_interrupt_qhd_non_hs(void) TEST_ASSERT_EQUAL(dev_addr, pipe_hdl.dev_addr); TEST_ASSERT_EQUAL(TUSB_XFER_INTERRUPT, pipe_hdl.xfer_type); - p_qhd = &ehci_data.device[ pipe_hdl.dev_addr ].qhd[ pipe_hdl.index ]; + p_qhd = &ehci_data.device[ pipe_hdl.dev_addr-1].qhd[ pipe_hdl.index ]; verify_int_qhd(p_qhd, &desc_ept_interrupt_out, TUSB_CLASS_HID); |
