tag | line | file | source code |
ecbno | 260 | drivers/scsi/aha1740.c | int ecbno; |
ecbno | 292 | drivers/scsi/aha1740.c | ecbno = aha1740_last_ecb_used + 1; /* An optimization */ |
ecbno | 293 | drivers/scsi/aha1740.c | if (ecbno >= AHA1740_ECBS) ecbno = 0; |
ecbno | 296 | drivers/scsi/aha1740.c | if( ! ecb[ecbno].cmdw ) |
ecbno | 298 | drivers/scsi/aha1740.c | ecbno++; |
ecbno | 299 | drivers/scsi/aha1740.c | if (ecbno >= AHA1740_ECBS ) ecbno = 0; |
ecbno | 300 | drivers/scsi/aha1740.c | } while (ecbno != aha1740_last_ecb_used); |
ecbno | 302 | drivers/scsi/aha1740.c | if( ecb[ecbno].cmdw ) |
ecbno | 305 | drivers/scsi/aha1740.c | ecb[ecbno].cmdw = AHA1740CMD_INIT; /* SCSI Initiator Command doubles as reserved flag */ |
ecbno | 307 | drivers/scsi/aha1740.c | aha1740_last_ecb_used = ecbno; |
ecbno | 311 | drivers/scsi/aha1740.c | printk("Sending command (%d %x)...",ecbno, done); |
ecbno | 314 | drivers/scsi/aha1740.c | ecb[ecbno].cdblen = SCpnt->cmd_len; /* SCSI Command Descriptor Block Length */ |
ecbno | 322 | drivers/scsi/aha1740.c | memcpy(ecb[ecbno].cdb, cmd, ecb[ecbno].cdblen); |
ecbno | 332 | drivers/scsi/aha1740.c | ecb[ecbno].sg = 1; /* SCSI Initiator Command w/scatter-gather*/ |
ecbno | 342 | drivers/scsi/aha1740.c | ecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain); |
ecbno | 343 | drivers/scsi/aha1740.c | ecb[ecbno].dataptr = (long) cptr; |
ecbno | 353 | drivers/scsi/aha1740.c | ecb[ecbno].datalen = bufflen; |
ecbno | 354 | drivers/scsi/aha1740.c | ecb[ecbno].dataptr = (long) buff; |
ecbno | 356 | drivers/scsi/aha1740.c | ecb[ecbno].lun = SCpnt->lun; |
ecbno | 357 | drivers/scsi/aha1740.c | ecb[ecbno].ses = 1; /* Suppress underrun errors */ |
ecbno | 358 | drivers/scsi/aha1740.c | ecb[ecbno].dir= direction; |
ecbno | 359 | drivers/scsi/aha1740.c | ecb[ecbno].ars=1; /* Yes, get the sense on an error */ |
ecbno | 360 | drivers/scsi/aha1740.c | ecb[ecbno].senselen = 12; |
ecbno | 361 | drivers/scsi/aha1740.c | ecb[ecbno].senseptr = (long) ecb[ecbno].sense; |
ecbno | 362 | drivers/scsi/aha1740.c | ecb[ecbno].statusptr = (long) ecb[ecbno].status; |
ecbno | 363 | drivers/scsi/aha1740.c | ecb[ecbno].done = done; |
ecbno | 364 | drivers/scsi/aha1740.c | ecb[ecbno].SCpnt = SCpnt; |
ecbno | 369 | drivers/scsi/aha1740.c | for (i = 0; i < sizeof(ecb[ecbno])-10; i++) |
ecbno | 370 | drivers/scsi/aha1740.c | printk("%02x ", ((unchar *)&ecb[ecbno])[i]); |
ecbno | 385 | drivers/scsi/aha1740.c | DEB(printk("aha1740[%d] critical section\n",ecbno)); |
ecbno | 390 | drivers/scsi/aha1740.c | printk("aha1740[%d]_mbxout wait!\n",ecbno); |
ecbno | 395 | drivers/scsi/aha1740.c | outl(virt_to_bus(ecb+ecbno), MBOXOUT0); |
ecbno | 398 | drivers/scsi/aha1740.c | printk("aha1740[%d]_attn wait!\n",ecbno); |
ecbno | 404 | drivers/scsi/aha1740.c | DEB(printk("aha1740[%d] request queued.\n",ecbno)); |