tag | line | file | source code |
ecbno | 254 | drivers/scsi/aha1740.c | int ecbno; |
ecbno | 286 | drivers/scsi/aha1740.c | ecbno = aha1740_last_ecb_used + 1; /* An optimization */ |
ecbno | 287 | drivers/scsi/aha1740.c | if (ecbno >= AHA1740_ECBS) ecbno = 0; |
ecbno | 290 | drivers/scsi/aha1740.c | if( ! ecb[ecbno].cmdw ) |
ecbno | 292 | drivers/scsi/aha1740.c | ecbno++; |
ecbno | 293 | drivers/scsi/aha1740.c | if (ecbno >= AHA1740_ECBS ) ecbno = 0; |
ecbno | 294 | drivers/scsi/aha1740.c | } while (ecbno != aha1740_last_ecb_used); |
ecbno | 296 | drivers/scsi/aha1740.c | if( ecb[ecbno].cmdw ) |
ecbno | 299 | drivers/scsi/aha1740.c | ecb[ecbno].cmdw = AHA1740CMD_INIT; /* SCSI Initiator Command doubles as reserved flag */ |
ecbno | 301 | drivers/scsi/aha1740.c | aha1740_last_ecb_used = ecbno; |
ecbno | 305 | drivers/scsi/aha1740.c | printk("Sending command (%d %x)...",ecbno, done); |
ecbno | 308 | drivers/scsi/aha1740.c | ecb[ecbno].cdblen = SCpnt->cmd_len; /* SCSI Command Descriptor Block Length */ |
ecbno | 316 | drivers/scsi/aha1740.c | memcpy(ecb[ecbno].cdb, cmd, ecb[ecbno].cdblen); |
ecbno | 326 | drivers/scsi/aha1740.c | ecb[ecbno].sg = 1; /* SCSI Initiator Command w/scatter-gather*/ |
ecbno | 336 | drivers/scsi/aha1740.c | ecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain); |
ecbno | 337 | drivers/scsi/aha1740.c | ecb[ecbno].dataptr = (long) cptr; |
ecbno | 347 | drivers/scsi/aha1740.c | ecb[ecbno].datalen = bufflen; |
ecbno | 348 | drivers/scsi/aha1740.c | ecb[ecbno].dataptr = (long) buff; |
ecbno | 350 | drivers/scsi/aha1740.c | ecb[ecbno].lun = SCpnt->lun; |
ecbno | 351 | drivers/scsi/aha1740.c | ecb[ecbno].ses = 1; /* Suppress underrun errors */ |
ecbno | 352 | drivers/scsi/aha1740.c | ecb[ecbno].dir= direction; |
ecbno | 353 | drivers/scsi/aha1740.c | ecb[ecbno].ars=1; /* Yes, get the sense on an error */ |
ecbno | 354 | drivers/scsi/aha1740.c | ecb[ecbno].senselen = 12; |
ecbno | 355 | drivers/scsi/aha1740.c | ecb[ecbno].senseptr = (long) ecb[ecbno].sense; |
ecbno | 356 | drivers/scsi/aha1740.c | ecb[ecbno].statusptr = (long) ecb[ecbno].status; |
ecbno | 357 | drivers/scsi/aha1740.c | ecb[ecbno].done = done; |
ecbno | 358 | drivers/scsi/aha1740.c | ecb[ecbno].SCpnt = SCpnt; |
ecbno | 363 | drivers/scsi/aha1740.c | for (i = 0; i < sizeof(ecb[ecbno])-10; i++) |
ecbno | 364 | drivers/scsi/aha1740.c | printk("%02x ", ((unchar *)&ecb[ecbno])[i]); |
ecbno | 379 | drivers/scsi/aha1740.c | DEB(printk("aha1740[%d] critical section\n",ecbno)); |
ecbno | 384 | drivers/scsi/aha1740.c | printk("aha1740[%d]_mbxout wait!\n",ecbno); |
ecbno | 389 | drivers/scsi/aha1740.c | outl(virt_to_bus(ecb+ecbno), MBOXOUT0); |
ecbno | 392 | drivers/scsi/aha1740.c | printk("aha1740[%d]_attn wait!\n",ecbno); |
ecbno | 398 | drivers/scsi/aha1740.c | DEB(printk("aha1740[%d] request queued.\n",ecbno)); |