tag | line | file | source code |
ecbno | 246 | drivers/scsi/aha1740.c | int ecbno; |
ecbno | 277 | drivers/scsi/aha1740.c | ecbno = aha1740_last_ecb_used + 1; /* An optimization */ |
ecbno | 278 | drivers/scsi/aha1740.c | if (ecbno >= AHA1740_ECBS) ecbno = 0; |
ecbno | 281 | drivers/scsi/aha1740.c | if( ! ecb[ecbno].cmdw ) |
ecbno | 283 | drivers/scsi/aha1740.c | ecbno++; |
ecbno | 284 | drivers/scsi/aha1740.c | if (ecbno >= AHA1740_ECBS ) ecbno = 0; |
ecbno | 285 | drivers/scsi/aha1740.c | } while (ecbno != aha1740_last_ecb_used); |
ecbno | 287 | drivers/scsi/aha1740.c | if( ecb[ecbno].cmdw ) |
ecbno | 290 | drivers/scsi/aha1740.c | ecb[ecbno].cmdw = AHA1740CMD_INIT; /* SCSI Initiator Command doubles as reserved flag */ |
ecbno | 292 | drivers/scsi/aha1740.c | aha1740_last_ecb_used = ecbno; |
ecbno | 296 | drivers/scsi/aha1740.c | printk("Sending command (%d %x)...",ecbno, done); |
ecbno | 299 | drivers/scsi/aha1740.c | ecb[ecbno].cdblen = COMMAND_SIZE(*cmd); /* SCSI Command Descriptor Block Length */ |
ecbno | 307 | drivers/scsi/aha1740.c | memcpy(ecb[ecbno].cdb, cmd, ecb[ecbno].cdblen); |
ecbno | 317 | drivers/scsi/aha1740.c | ecb[ecbno].sg = 1; /* SCSI Initiator Command w/scatter-gather*/ |
ecbno | 327 | drivers/scsi/aha1740.c | ecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain); |
ecbno | 328 | drivers/scsi/aha1740.c | ecb[ecbno].dataptr = (long) cptr; |
ecbno | 338 | drivers/scsi/aha1740.c | ecb[ecbno].datalen = bufflen; |
ecbno | 339 | drivers/scsi/aha1740.c | ecb[ecbno].dataptr = (long) buff; |
ecbno | 341 | drivers/scsi/aha1740.c | ecb[ecbno].lun = SCpnt->lun; |
ecbno | 342 | drivers/scsi/aha1740.c | ecb[ecbno].ses = 1; /* Suppress underrun errors */ |
ecbno | 343 | drivers/scsi/aha1740.c | ecb[ecbno].dir= direction; |
ecbno | 344 | drivers/scsi/aha1740.c | ecb[ecbno].ars=1; /* Yes, get the sense on an error */ |
ecbno | 345 | drivers/scsi/aha1740.c | ecb[ecbno].senselen = 12; |
ecbno | 346 | drivers/scsi/aha1740.c | ecb[ecbno].senseptr = (long) ecb[ecbno].sense; |
ecbno | 347 | drivers/scsi/aha1740.c | ecb[ecbno].statusptr = (long) ecb[ecbno].status; |
ecbno | 348 | drivers/scsi/aha1740.c | ecb[ecbno].done = done; |
ecbno | 349 | drivers/scsi/aha1740.c | ecb[ecbno].SCpnt = SCpnt; |
ecbno | 354 | drivers/scsi/aha1740.c | for (i = 0; i < sizeof(ecb[ecbno])-10; i++) |
ecbno | 355 | drivers/scsi/aha1740.c | printk("%02x ", ((unchar *)&ecb[ecbno])[i]); |
ecbno | 371 | drivers/scsi/aha1740.c | DEB(printk("aha1740[%d] critical section\n",ecbno)); |
ecbno | 375 | drivers/scsi/aha1740.c | printk("aha1740[%d]_mbxout wait!\n",ecbno); |
ecbno | 379 | drivers/scsi/aha1740.c | adrs = (ulong) &(ecb[ecbno]); /* Spit the command */ |
ecbno | 386 | drivers/scsi/aha1740.c | printk("aha1740[%d]_attn wait!\n",ecbno); |
ecbno | 392 | drivers/scsi/aha1740.c | DEB(printk("aha1740[%d] request queued.\n",ecbno)); |