taglinefilesource code
ecbno246drivers/scsi/aha1740.cint ecbno;
ecbno277drivers/scsi/aha1740.cecbno = aha1740_last_ecb_used + 1;    /* An optimization */
ecbno278drivers/scsi/aha1740.cif (ecbno >= AHA1740_ECBS) ecbno = 0;
ecbno281drivers/scsi/aha1740.cif( ! ecb[ecbno].cmdw )
ecbno283drivers/scsi/aha1740.cecbno++;
ecbno284drivers/scsi/aha1740.cif (ecbno >= AHA1740_ECBS ) ecbno = 0;
ecbno285drivers/scsi/aha1740.c} while (ecbno != aha1740_last_ecb_used);
ecbno287drivers/scsi/aha1740.cif( ecb[ecbno].cmdw )
ecbno290drivers/scsi/aha1740.cecb[ecbno].cmdw = AHA1740CMD_INIT;  /* SCSI Initiator Command doubles as reserved flag */
ecbno292drivers/scsi/aha1740.caha1740_last_ecb_used = ecbno;    
ecbno296drivers/scsi/aha1740.cprintk("Sending command (%d %x)...",ecbno, done);
ecbno299drivers/scsi/aha1740.cecb[ecbno].cdblen = COMMAND_SIZE(*cmd);  /* SCSI Command Descriptor Block Length */
ecbno307drivers/scsi/aha1740.cmemcpy(ecb[ecbno].cdb, cmd, ecb[ecbno].cdblen);
ecbno317drivers/scsi/aha1740.cecb[ecbno].sg = 1;    /* SCSI Initiator Command  w/scatter-gather*/
ecbno327drivers/scsi/aha1740.cecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain);
ecbno328drivers/scsi/aha1740.cecb[ecbno].dataptr = (long) cptr;
ecbno338drivers/scsi/aha1740.cecb[ecbno].datalen = bufflen;
ecbno339drivers/scsi/aha1740.cecb[ecbno].dataptr = (long) buff;
ecbno341drivers/scsi/aha1740.cecb[ecbno].lun = SCpnt->lun;
ecbno342drivers/scsi/aha1740.cecb[ecbno].ses = 1;  /* Suppress underrun errors */
ecbno343drivers/scsi/aha1740.cecb[ecbno].dir= direction;
ecbno344drivers/scsi/aha1740.cecb[ecbno].ars=1;  /* Yes, get the sense on an error */
ecbno345drivers/scsi/aha1740.cecb[ecbno].senselen = 12;
ecbno346drivers/scsi/aha1740.cecb[ecbno].senseptr = (long) ecb[ecbno].sense;
ecbno347drivers/scsi/aha1740.cecb[ecbno].statusptr = (long) ecb[ecbno].status;
ecbno348drivers/scsi/aha1740.cecb[ecbno].done = done;
ecbno349drivers/scsi/aha1740.cecb[ecbno].SCpnt = SCpnt;
ecbno354drivers/scsi/aha1740.cfor (i = 0; i < sizeof(ecb[ecbno])-10; i++)
ecbno355drivers/scsi/aha1740.cprintk("%02x ", ((unchar *)&ecb[ecbno])[i]);
ecbno371drivers/scsi/aha1740.cDEB(printk("aha1740[%d] critical section\n",ecbno));
ecbno375drivers/scsi/aha1740.cprintk("aha1740[%d]_mbxout wait!\n",ecbno);
ecbno379drivers/scsi/aha1740.cadrs = (ulong) &(ecb[ecbno]);      /* Spit the command */
ecbno386drivers/scsi/aha1740.cprintk("aha1740[%d]_attn wait!\n",ecbno);
ecbno392drivers/scsi/aha1740.cDEB(printk("aha1740[%d] request queued.\n",ecbno));