Lines Matching defs:ecbno
324 int ecbno, nseg;
349 ecbno = host->last_ecb_used + 1; /* An optimization */
350 if (ecbno >= AHA1740_ECBS)
351 ecbno = 0;
353 if (!host->ecb[ecbno].cmdw)
355 ecbno++;
356 if (ecbno >= AHA1740_ECBS)
357 ecbno = 0;
358 } while (ecbno != host->last_ecb_used);
360 if (host->ecb[ecbno].cmdw)
363 host->ecb[ecbno].cmdw = AHA1740CMD_INIT; /* SCSI Initiator Command
366 host->last_ecb_used = ecbno;
370 printk("Sending command (%d %x)...", ecbno, done);
373 host->ecb[ecbno].cdblen = SCpnt->cmd_len; /* SCSI Command
383 memcpy(host->ecb[ecbno].cdb, cmd, SCpnt->cmd_len);
403 host->ecb[ecbno].sg = 1; /* SCSI Initiator Command
410 host->ecb[ecbno].datalen = nseg * sizeof(struct aha1740_chain);
411 host->ecb[ecbno].dataptr = sg_dma;
418 host->ecb[ecbno].datalen = 0;
419 host->ecb[ecbno].dataptr = 0;
421 host->ecb[ecbno].lun = SCpnt->device->lun;
422 host->ecb[ecbno].ses = 1; /* Suppress underrun errors */
423 host->ecb[ecbno].dir = direction;
424 host->ecb[ecbno].ars = 1; /* Yes, get the sense on an error */
425 host->ecb[ecbno].senselen = 12;
426 host->ecb[ecbno].senseptr = ecb_cpu_to_dma (SCpnt->device->host,
427 host->ecb[ecbno].sense);
428 host->ecb[ecbno].statusptr = ecb_cpu_to_dma (SCpnt->device->host,
429 host->ecb[ecbno].status);
430 host->ecb[ecbno].done = done;
431 host->ecb[ecbno].SCpnt = SCpnt;
436 for (i = 0; i < sizeof(host->ecb[ecbno]) - 10; i++)
437 printk("%02x ", ((unchar *)&host->ecb[ecbno])[i]);
458 DEB(printk("aha1740[%d] critical section\n",ecbno));
464 printk("aha1740[%d]_mbxout wait!\n",ecbno);
469 outl (ecb_cpu_to_dma (SCpnt->device->host, host->ecb + ecbno),
474 printk("aha1740[%d]_attn wait!\n",ecbno);
481 DEB(printk("aha1740[%d] request queued.\n",ecbno));