Lines Matching refs:ecb
81 struct ecb ecb[AHA1740_ECBS];
92 static inline struct ecb *ecb_dma_to_cpu (struct Scsi_Host *host,
100 return (struct ecb *)(((char *) hdata->ecb) + (unsigned int) offset);
108 offset = (char *) cpu - (char *) hdata->ecb;
218 struct ecb *ecbptr;
287 memset(ecbptr,0,sizeof(struct ecb));
355 /* locate an available ecb */
361 if (!host->ecb[ecbno].cmdw)
368 if (host->ecb[ecbno].cmdw)
369 panic("Unable to find empty ecb for aha1740.\n");
371 host->ecb[ecbno].cmdw = AHA1740CMD_INIT; /* SCSI Initiator Command
381 host->ecb[ecbno].cdblen = SCpnt->cmd_len; /* SCSI Command
391 memcpy(host->ecb[ecbno].cdb, cmd, SCpnt->cmd_len);
411 host->ecb[ecbno].sg = 1; /* SCSI Initiator Command
418 host->ecb[ecbno].datalen = nseg * sizeof(struct aha1740_chain);
419 host->ecb[ecbno].dataptr = sg_dma;
426 host->ecb[ecbno].datalen = 0;
427 host->ecb[ecbno].dataptr = 0;
429 host->ecb[ecbno].lun = SCpnt->device->lun;
430 host->ecb[ecbno].ses = 1; /* Suppress underrun errors */
431 host->ecb[ecbno].dir = direction;
432 host->ecb[ecbno].ars = 1; /* Yes, get the sense on an error */
433 host->ecb[ecbno].senselen = 12;
434 host->ecb[ecbno].senseptr = ecb_cpu_to_dma (SCpnt->device->host,
435 host->ecb[ecbno].sense);
436 host->ecb[ecbno].statusptr = ecb_cpu_to_dma (SCpnt->device->host,
437 host->ecb[ecbno].status);
438 host->ecb[ecbno].done = done;
439 host->ecb[ecbno].SCpnt = SCpnt;
444 for (i = 0; i < sizeof(host->ecb[ecbno]) - 10; i++)
445 printk("%02x ", ((unchar *)&host->ecb[ecbno])[i]);
477 outl (ecb_cpu_to_dma (SCpnt->device->host, host->ecb + ecbno),
598 host->ecb_dma_addr = dma_map_single (&edev->dev, host->ecb,
599 sizeof (host->ecb),
627 sizeof (host->ecb), DMA_BIDIRECTIONAL);
645 sizeof (host->ecb), DMA_BIDIRECTIONAL);