taglinefilesource code
ecbno254drivers/scsi/aha1740.cint ecbno;
ecbno286drivers/scsi/aha1740.cecbno = aha1740_last_ecb_used + 1;    /* An optimization */
ecbno287drivers/scsi/aha1740.cif (ecbno >= AHA1740_ECBS) ecbno = 0;
ecbno290drivers/scsi/aha1740.cif( ! ecb[ecbno].cmdw )
ecbno292drivers/scsi/aha1740.cecbno++;
ecbno293drivers/scsi/aha1740.cif (ecbno >= AHA1740_ECBS ) ecbno = 0;
ecbno294drivers/scsi/aha1740.c} while (ecbno != aha1740_last_ecb_used);
ecbno296drivers/scsi/aha1740.cif( ecb[ecbno].cmdw )
ecbno299drivers/scsi/aha1740.cecb[ecbno].cmdw = AHA1740CMD_INIT;  /* SCSI Initiator Command doubles as reserved flag */
ecbno301drivers/scsi/aha1740.caha1740_last_ecb_used = ecbno;    
ecbno305drivers/scsi/aha1740.cprintk("Sending command (%d %x)...",ecbno, done);
ecbno308drivers/scsi/aha1740.cecb[ecbno].cdblen = SCpnt->cmd_len;  /* SCSI Command Descriptor Block Length */
ecbno316drivers/scsi/aha1740.cmemcpy(ecb[ecbno].cdb, cmd, ecb[ecbno].cdblen);
ecbno326drivers/scsi/aha1740.cecb[ecbno].sg = 1;    /* SCSI Initiator Command  w/scatter-gather*/
ecbno336drivers/scsi/aha1740.cecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain);
ecbno337drivers/scsi/aha1740.cecb[ecbno].dataptr = (long) cptr;
ecbno347drivers/scsi/aha1740.cecb[ecbno].datalen = bufflen;
ecbno348drivers/scsi/aha1740.cecb[ecbno].dataptr = (long) buff;
ecbno350drivers/scsi/aha1740.cecb[ecbno].lun = SCpnt->lun;
ecbno351drivers/scsi/aha1740.cecb[ecbno].ses = 1;  /* Suppress underrun errors */
ecbno352drivers/scsi/aha1740.cecb[ecbno].dir= direction;
ecbno353drivers/scsi/aha1740.cecb[ecbno].ars=1;  /* Yes, get the sense on an error */
ecbno354drivers/scsi/aha1740.cecb[ecbno].senselen = 12;
ecbno355drivers/scsi/aha1740.cecb[ecbno].senseptr = (long) ecb[ecbno].sense;
ecbno356drivers/scsi/aha1740.cecb[ecbno].statusptr = (long) ecb[ecbno].status;
ecbno357drivers/scsi/aha1740.cecb[ecbno].done = done;
ecbno358drivers/scsi/aha1740.cecb[ecbno].SCpnt = SCpnt;
ecbno363drivers/scsi/aha1740.cfor (i = 0; i < sizeof(ecb[ecbno])-10; i++)
ecbno364drivers/scsi/aha1740.cprintk("%02x ", ((unchar *)&ecb[ecbno])[i]);
ecbno379drivers/scsi/aha1740.cDEB(printk("aha1740[%d] critical section\n",ecbno));
ecbno384drivers/scsi/aha1740.cprintk("aha1740[%d]_mbxout wait!\n",ecbno);
ecbno389drivers/scsi/aha1740.coutl(virt_to_bus(ecb+ecbno), MBOXOUT0);
ecbno392drivers/scsi/aha1740.cprintk("aha1740[%d]_attn wait!\n",ecbno);
ecbno398drivers/scsi/aha1740.cDEB(printk("aha1740[%d] request queued.\n",ecbno));