Lines Matching refs:ecbno

343 	int ecbno, nseg;  in aha1740_queuecommand_lck()  local
368 ecbno = host->last_ecb_used + 1; /* An optimization */ in aha1740_queuecommand_lck()
369 if (ecbno >= AHA1740_ECBS) in aha1740_queuecommand_lck()
370 ecbno = 0; in aha1740_queuecommand_lck()
372 if (!host->ecb[ecbno].cmdw) in aha1740_queuecommand_lck()
374 ecbno++; in aha1740_queuecommand_lck()
375 if (ecbno >= AHA1740_ECBS) in aha1740_queuecommand_lck()
376 ecbno = 0; in aha1740_queuecommand_lck()
377 } while (ecbno != host->last_ecb_used); in aha1740_queuecommand_lck()
379 if (host->ecb[ecbno].cmdw) in aha1740_queuecommand_lck()
382 host->ecb[ecbno].cmdw = AHA1740CMD_INIT; /* SCSI Initiator Command in aha1740_queuecommand_lck()
385 host->last_ecb_used = ecbno; in aha1740_queuecommand_lck()
389 printk("Sending command (%d %x)...", ecbno, done); in aha1740_queuecommand_lck()
392 host->ecb[ecbno].cdblen = SCpnt->cmd_len; /* SCSI Command in aha1740_queuecommand_lck()
402 memcpy(host->ecb[ecbno].cdb, cmd, SCpnt->cmd_len); in aha1740_queuecommand_lck()
422 host->ecb[ecbno].sg = 1; /* SCSI Initiator Command in aha1740_queuecommand_lck()
429 host->ecb[ecbno].datalen = nseg * sizeof(struct aha1740_chain); in aha1740_queuecommand_lck()
430 host->ecb[ecbno].dataptr = sg_dma; in aha1740_queuecommand_lck()
437 host->ecb[ecbno].datalen = 0; in aha1740_queuecommand_lck()
438 host->ecb[ecbno].dataptr = 0; in aha1740_queuecommand_lck()
440 host->ecb[ecbno].lun = SCpnt->device->lun; in aha1740_queuecommand_lck()
441 host->ecb[ecbno].ses = 1; /* Suppress underrun errors */ in aha1740_queuecommand_lck()
442 host->ecb[ecbno].dir = direction; in aha1740_queuecommand_lck()
443 host->ecb[ecbno].ars = 1; /* Yes, get the sense on an error */ in aha1740_queuecommand_lck()
444 host->ecb[ecbno].senselen = 12; in aha1740_queuecommand_lck()
445 host->ecb[ecbno].senseptr = ecb_cpu_to_dma (SCpnt->device->host, in aha1740_queuecommand_lck()
446 host->ecb[ecbno].sense); in aha1740_queuecommand_lck()
447 host->ecb[ecbno].statusptr = ecb_cpu_to_dma (SCpnt->device->host, in aha1740_queuecommand_lck()
448 host->ecb[ecbno].status); in aha1740_queuecommand_lck()
449 host->ecb[ecbno].done = done; in aha1740_queuecommand_lck()
450 host->ecb[ecbno].SCpnt = SCpnt; in aha1740_queuecommand_lck()
455 for (i = 0; i < sizeof(host->ecb[ecbno]) - 10; i++) in aha1740_queuecommand_lck()
456 printk("%02x ", ((unchar *)&host->ecb[ecbno])[i]); in aha1740_queuecommand_lck()
477 DEB(printk("aha1740[%d] critical section\n",ecbno)); in aha1740_queuecommand_lck()
483 printk("aha1740[%d]_mbxout wait!\n",ecbno); in aha1740_queuecommand_lck()
488 outl (ecb_cpu_to_dma (SCpnt->device->host, host->ecb + ecbno), in aha1740_queuecommand_lck()
493 printk("aha1740[%d]_attn wait!\n",ecbno); in aha1740_queuecommand_lck()
500 DEB(printk("aha1740[%d] request queued.\n",ecbno)); in aha1740_queuecommand_lck()