Lines Matching refs:desc
256 NPCM7xxEMCTxDesc *desc) in emc_read_tx_desc() argument
258 qtest_memread(qts, addr, desc, sizeof(*desc)); in emc_read_tx_desc()
259 desc->flags = le32_to_cpu(desc->flags); in emc_read_tx_desc()
260 desc->txbsa = le32_to_cpu(desc->txbsa); in emc_read_tx_desc()
261 desc->status_and_length = le32_to_cpu(desc->status_and_length); in emc_read_tx_desc()
262 desc->ntxdsa = le32_to_cpu(desc->ntxdsa); in emc_read_tx_desc()
265 static void emc_write_tx_desc(QTestState *qts, const NPCM7xxEMCTxDesc *desc, in emc_write_tx_desc() argument
270 le_desc.flags = cpu_to_le32(desc->flags); in emc_write_tx_desc()
271 le_desc.txbsa = cpu_to_le32(desc->txbsa); in emc_write_tx_desc()
272 le_desc.status_and_length = cpu_to_le32(desc->status_and_length); in emc_write_tx_desc()
273 le_desc.ntxdsa = cpu_to_le32(desc->ntxdsa); in emc_write_tx_desc()
278 NPCM7xxEMCRxDesc *desc) in emc_read_rx_desc() argument
280 qtest_memread(qts, addr, desc, sizeof(*desc)); in emc_read_rx_desc()
281 desc->status_and_length = le32_to_cpu(desc->status_and_length); in emc_read_rx_desc()
282 desc->rxbsa = le32_to_cpu(desc->rxbsa); in emc_read_rx_desc()
283 desc->reserved = le32_to_cpu(desc->reserved); in emc_read_rx_desc()
284 desc->nrxdsa = le32_to_cpu(desc->nrxdsa); in emc_read_rx_desc()
287 static void emc_write_rx_desc(QTestState *qts, const NPCM7xxEMCRxDesc *desc, in emc_write_rx_desc() argument
292 le_desc.status_and_length = cpu_to_le32(desc->status_and_length); in emc_write_rx_desc()
293 le_desc.rxbsa = cpu_to_le32(desc->rxbsa); in emc_write_rx_desc()
294 le_desc.reserved = cpu_to_le32(desc->reserved); in emc_write_rx_desc()
295 le_desc.nrxdsa = cpu_to_le32(desc->nrxdsa); in emc_write_rx_desc()
444 static void init_tx_desc(NPCM7xxEMCTxDesc *desc, size_t count, in init_tx_desc() argument
448 memset(&desc[0], 0, sizeof(*desc) * count); in init_tx_desc()
451 desc[i].flags = in init_tx_desc()
456 desc[i].status_and_length = in init_tx_desc()
469 desc[i].ntxdsa = desc_addr + (i + 1) * sizeof(*desc); in init_tx_desc()
474 const NPCM7xxEMCTxDesc *desc, size_t count, in enable_tx() argument
479 emc_write_tx_desc(qts, desc + i, desc_addr + i * sizeof(*desc)); in enable_tx()
534 NPCM7xxEMCTxDesc desc[NUM_TX_DESCRIPTORS]; in emc_send_verify() local
547 init_tx_desc(&desc[0], NUM_TX_DESCRIPTORS, desc_addr); in emc_send_verify()
548 desc[0].txbsa = data1_addr; in emc_send_verify()
549 desc[0].status_and_length |= sizeof(test1_data); in emc_send_verify()
550 desc[1].txbsa = data2_addr; in emc_send_verify()
551 desc[1].status_and_length |= sizeof(test2_data); in emc_send_verify()
553 enable_tx(qts, mod, &desc[0], NUM_TX_DESCRIPTORS, desc_addr, in emc_send_verify()
580 end_desc_addr = desc_addr + 2 * sizeof(desc[0]); in emc_send_verify()
589 desc_addr + sizeof(desc[0]), end_desc_addr, in emc_send_verify()
594 static void init_rx_desc(NPCM7xxEMCRxDesc *desc, size_t count, in init_rx_desc() argument
598 memset(desc, 0, sizeof(*desc) * count); in init_rx_desc()
599 desc[0].rxbsa = data_addr; in init_rx_desc()
600 desc[0].status_and_length = in init_rx_desc()
610 desc[0].nrxdsa = desc_addr + sizeof(*desc); in init_rx_desc()
614 const NPCM7xxEMCRxDesc *desc, size_t count, in enable_rx() argument
624 emc_write_rx_desc(qts, desc + i, desc_addr + i * sizeof(*desc)); in enable_rx()
649 NPCM7xxEMCRxDesc desc[NUM_RX_DESCRIPTORS]; in emc_recv_verify() local
673 init_rx_desc(&desc[0], NUM_RX_DESCRIPTORS, desc_addr, data_addr); in emc_recv_verify()
674 enable_rx(qts, mod, &desc[0], NUM_RX_DESCRIPTORS, desc_addr, in emc_recv_verify()
698 desc_addr + sizeof(desc[0])); in emc_recv_verify()
731 NPCM7xxEMCRxDesc desc[NUM_RX_DESCRIPTORS]; in emc_test_ptle() local
757 init_rx_desc(&desc[0], NUM_RX_DESCRIPTORS, desc_addr, data_addr); in emc_test_ptle()
758 enable_rx(qts, mod, &desc[0], NUM_RX_DESCRIPTORS, desc_addr, in emc_test_ptle()