Lines Matching refs:desc

205 static void __ismt_desc_dump(struct device *dev, const struct ismt_desc *desc)  in __ismt_desc_dump()  argument
208 dev_dbg(dev, "Descriptor struct: %p\n", desc); in __ismt_desc_dump()
209 dev_dbg(dev, "\ttgtaddr_rw=0x%02X\n", desc->tgtaddr_rw); in __ismt_desc_dump()
210 dev_dbg(dev, "\twr_len_cmd=0x%02X\n", desc->wr_len_cmd); in __ismt_desc_dump()
211 dev_dbg(dev, "\trd_len= 0x%02X\n", desc->rd_len); in __ismt_desc_dump()
212 dev_dbg(dev, "\tcontrol= 0x%02X\n", desc->control); in __ismt_desc_dump()
213 dev_dbg(dev, "\tstatus= 0x%02X\n", desc->status); in __ismt_desc_dump()
214 dev_dbg(dev, "\tretry= 0x%02X\n", desc->retry); in __ismt_desc_dump()
215 dev_dbg(dev, "\trxbytes= 0x%02X\n", desc->rxbytes); in __ismt_desc_dump()
216 dev_dbg(dev, "\ttxbytes= 0x%02X\n", desc->txbytes); in __ismt_desc_dump()
217 dev_dbg(dev, "\tdptr_low= 0x%08X\n", desc->dptr_low); in __ismt_desc_dump()
218 dev_dbg(dev, "\tdptr_high= 0x%08X\n", desc->dptr_high); in __ismt_desc_dump()
227 struct ismt_desc *desc = &priv->hw[priv->head]; in ismt_desc_dump() local
230 __ismt_desc_dump(dev, desc); in ismt_desc_dump()
324 static int ismt_process_desc(const struct ismt_desc *desc, in ismt_process_desc() argument
332 __ismt_desc_dump(&priv->pci_dev->dev, desc); in ismt_process_desc()
336 if (desc->status & ISMT_DESC_SCS) { in ismt_process_desc()
353 if (desc->rxbytes != dma_buffer[0] + 1) in ismt_process_desc()
356 memcpy(data->block, dma_buffer, desc->rxbytes); in ismt_process_desc()
359 memcpy(&data->block[1], dma_buffer, desc->rxbytes); in ismt_process_desc()
360 data->block[0] = desc->rxbytes; in ismt_process_desc()
366 if (likely(desc->status & ISMT_DESC_NAK)) in ismt_process_desc()
369 if (desc->status & ISMT_DESC_CRC) in ismt_process_desc()
372 if (desc->status & ISMT_DESC_COL) in ismt_process_desc()
375 if (desc->status & ISMT_DESC_LPR) in ismt_process_desc()
378 if (desc->status & (ISMT_DESC_DLTO | ISMT_DESC_CLTO)) in ismt_process_desc()
403 struct ismt_desc *desc; in ismt_access() local
408 desc = &priv->hw[priv->head]; in ismt_access()
414 memset(desc, 0, sizeof(struct ismt_desc)); in ismt_access()
415 desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(addr, read_write); in ismt_access()
422 desc->control = ISMT_DESC_INT | ISMT_DESC_FAIR; in ismt_access()
424 desc->control = ISMT_DESC_FAIR; in ismt_access()
428 desc->control |= ISMT_DESC_PEC; in ismt_access()
442 desc->control |= ISMT_DESC_CWRL; in ismt_access()
443 desc->wr_len_cmd = command; in ismt_access()
449 desc->rd_len = 1; in ismt_access()
460 desc->wr_len_cmd = 2; in ismt_access()
468 desc->control |= ISMT_DESC_CWRL; in ismt_access()
469 desc->wr_len_cmd = command; in ismt_access()
470 desc->rd_len = 1; in ismt_access()
480 desc->wr_len_cmd = 3; in ismt_access()
489 desc->wr_len_cmd = command; in ismt_access()
490 desc->control |= ISMT_DESC_CWRL; in ismt_access()
491 desc->rd_len = 2; in ismt_access()
499 desc->wr_len_cmd = 3; in ismt_access()
500 desc->rd_len = 2; in ismt_access()
517 desc->wr_len_cmd = dma_size; in ismt_access()
518 desc->control |= ISMT_DESC_BLK; in ismt_access()
526 desc->rd_len = dma_size; in ismt_access()
527 desc->wr_len_cmd = command; in ismt_access()
528 desc->control |= (ISMT_DESC_BLK | ISMT_DESC_CWRL); in ismt_access()
538 desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(addr, 1); in ismt_access()
539 desc->wr_len_cmd = data->block[0] + 1; in ismt_access()
540 desc->rd_len = dma_size; in ismt_access()
541 desc->control |= ISMT_DESC_BLK; in ismt_access()
560 desc->wr_len_cmd = dma_size; in ismt_access()
561 desc->control |= ISMT_DESC_I2C; in ismt_access()
569 desc->rd_len = dma_size; in ismt_access()
570 desc->wr_len_cmd = command; in ismt_access()
571 desc->control |= (ISMT_DESC_I2C | ISMT_DESC_CWRL); in ismt_access()
578 desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(addr, 0); in ismt_access()
609 desc->dptr_low = lower_32_bits(dma_addr); in ismt_access()
610 desc->dptr_high = upper_32_bits(dma_addr); in ismt_access()
632 ret = ismt_process_desc(desc, data, priv, size, read_write); in ismt_access()