Lines Matching refs:desc
202 static void __ismt_desc_dump(struct device *dev, const struct ismt_desc *desc) in __ismt_desc_dump() argument
205 dev_dbg(dev, "Descriptor struct: %p\n", desc); in __ismt_desc_dump()
206 dev_dbg(dev, "\ttgtaddr_rw=0x%02X\n", desc->tgtaddr_rw); in __ismt_desc_dump()
207 dev_dbg(dev, "\twr_len_cmd=0x%02X\n", desc->wr_len_cmd); in __ismt_desc_dump()
208 dev_dbg(dev, "\trd_len= 0x%02X\n", desc->rd_len); in __ismt_desc_dump()
209 dev_dbg(dev, "\tcontrol= 0x%02X\n", desc->control); in __ismt_desc_dump()
210 dev_dbg(dev, "\tstatus= 0x%02X\n", desc->status); in __ismt_desc_dump()
211 dev_dbg(dev, "\tretry= 0x%02X\n", desc->retry); in __ismt_desc_dump()
212 dev_dbg(dev, "\trxbytes= 0x%02X\n", desc->rxbytes); in __ismt_desc_dump()
213 dev_dbg(dev, "\ttxbytes= 0x%02X\n", desc->txbytes); in __ismt_desc_dump()
214 dev_dbg(dev, "\tdptr_low= 0x%08X\n", desc->dptr_low); in __ismt_desc_dump()
215 dev_dbg(dev, "\tdptr_high= 0x%08X\n", desc->dptr_high); in __ismt_desc_dump()
224 struct ismt_desc *desc = &priv->hw[priv->head]; in ismt_desc_dump() local
227 __ismt_desc_dump(dev, desc); in ismt_desc_dump()
321 static int ismt_process_desc(const struct ismt_desc *desc, in ismt_process_desc() argument
329 __ismt_desc_dump(&priv->pci_dev->dev, desc); in ismt_process_desc()
333 if (desc->status & ISMT_DESC_SCS) { in ismt_process_desc()
348 if (desc->rxbytes != dma_buffer[0] + 1) in ismt_process_desc()
351 memcpy(data->block, dma_buffer, desc->rxbytes); in ismt_process_desc()
354 memcpy(&data->block[1], dma_buffer, desc->rxbytes); in ismt_process_desc()
355 data->block[0] = desc->rxbytes; in ismt_process_desc()
361 if (likely(desc->status & ISMT_DESC_NAK)) in ismt_process_desc()
364 if (desc->status & ISMT_DESC_CRC) in ismt_process_desc()
367 if (desc->status & ISMT_DESC_COL) in ismt_process_desc()
370 if (desc->status & ISMT_DESC_LPR) in ismt_process_desc()
373 if (desc->status & (ISMT_DESC_DLTO | ISMT_DESC_CLTO)) in ismt_process_desc()
398 struct ismt_desc *desc; in ismt_access() local
403 desc = &priv->hw[priv->head]; in ismt_access()
409 memset(desc, 0, sizeof(struct ismt_desc)); in ismt_access()
410 desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(addr, read_write); in ismt_access()
417 desc->control = ISMT_DESC_INT | ISMT_DESC_FAIR; in ismt_access()
419 desc->control = ISMT_DESC_FAIR; in ismt_access()
423 desc->control |= ISMT_DESC_PEC; in ismt_access()
437 desc->control |= ISMT_DESC_CWRL; in ismt_access()
438 desc->wr_len_cmd = command; in ismt_access()
444 desc->rd_len = 1; in ismt_access()
455 desc->wr_len_cmd = 2; in ismt_access()
463 desc->control |= ISMT_DESC_CWRL; in ismt_access()
464 desc->wr_len_cmd = command; in ismt_access()
465 desc->rd_len = 1; in ismt_access()
475 desc->wr_len_cmd = 3; in ismt_access()
484 desc->wr_len_cmd = command; in ismt_access()
485 desc->control |= ISMT_DESC_CWRL; in ismt_access()
486 desc->rd_len = 2; in ismt_access()
494 desc->wr_len_cmd = 3; in ismt_access()
495 desc->rd_len = 2; in ismt_access()
512 desc->wr_len_cmd = dma_size; in ismt_access()
513 desc->control |= ISMT_DESC_BLK; in ismt_access()
521 desc->rd_len = dma_size; in ismt_access()
522 desc->wr_len_cmd = command; in ismt_access()
523 desc->control |= (ISMT_DESC_BLK | ISMT_DESC_CWRL); in ismt_access()
540 desc->wr_len_cmd = dma_size; in ismt_access()
541 desc->control |= ISMT_DESC_I2C; in ismt_access()
549 desc->rd_len = dma_size; in ismt_access()
550 desc->wr_len_cmd = command; in ismt_access()
551 desc->control |= (ISMT_DESC_I2C | ISMT_DESC_CWRL); in ismt_access()
558 desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(addr, 0); in ismt_access()
589 desc->dptr_low = lower_32_bits(dma_addr); in ismt_access()
590 desc->dptr_high = upper_32_bits(dma_addr); in ismt_access()
612 ret = ismt_process_desc(desc, data, priv, size, read_write); in ismt_access()