tag | line | file | source code |
mbo | 257 | drivers/scsi/aha1542.c | int errstatus, mbi, mbo, mbistatus; |
mbo | 310 | drivers/scsi/aha1542.c | mbo = (scsi2int(mb[mbi].ccbptr) - ((unsigned int) &ccb[0])) / sizeof(struct ccb); |
mbo | 318 | drivers/scsi/aha1542.c | if (ccb[mbo].tarstat|ccb[mbo].hastat) |
mbo | 320 | drivers/scsi/aha1542.c | ccb[mbo].tarstat + ((int) ccb[mbo].hastat << 16), mb[mbi].status); |
mbo | 327 | drivers/scsi/aha1542.c | printk("...done %d %d\n",mbo, mbi); |
mbo | 330 | drivers/scsi/aha1542.c | SCtmp = HOSTDATA(shost)->SCint[mbo]; |
mbo | 343 | drivers/scsi/aha1542.c | if (ccb[mbo].tarstat == 2) |
mbo | 344 | drivers/scsi/aha1542.c | memcpy(SCtmp->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen], |
mbo | 353 | drivers/scsi/aha1542.c | errstatus = makecode(ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 359 | drivers/scsi/aha1542.c | ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 362 | drivers/scsi/aha1542.c | if (ccb[mbo].tarstat == 2) { |
mbo | 369 | drivers/scsi/aha1542.c | printk("%02x ", ccb[mbo].cdb[ccb[mbo].cdblen+i]); |
mbo | 381 | drivers/scsi/aha1542.c | HOSTDATA(shost)->SCint[mbo] = NULL; /* This effectively frees up the mailbox slot, as |
mbo | 397 | drivers/scsi/aha1542.c | int mbo; |
mbo | 444 | drivers/scsi/aha1542.c | mbo = HOSTDATA(SCpnt->host)->aha1542_last_mbo_used + 1; |
mbo | 445 | drivers/scsi/aha1542.c | if (mbo >= AHA1542_MAILBOXES) mbo = 0; |
mbo | 448 | drivers/scsi/aha1542.c | if(mb[mbo].status == 0 && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL) |
mbo | 450 | drivers/scsi/aha1542.c | mbo++; |
mbo | 451 | drivers/scsi/aha1542.c | if (mbo >= AHA1542_MAILBOXES) mbo = 0; |
mbo | 452 | drivers/scsi/aha1542.c | } while (mbo != HOSTDATA(SCpnt->host)->aha1542_last_mbo_used); |
mbo | 454 | drivers/scsi/aha1542.c | if(mb[mbo].status || HOSTDATA(SCpnt->host)->SCint[mbo]) |
mbo | 457 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt; /* This will effectively prevent someone else from |
mbo | 460 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->aha1542_last_mbo_used = mbo; |
mbo | 464 | drivers/scsi/aha1542.c | printk("Sending command (%d %x)...",mbo, done); |
mbo | 467 | drivers/scsi/aha1542.c | any2scsi(mb[mbo].ccbptr, &ccb[mbo]); /* This gets trashed for some reason*/ |
mbo | 469 | drivers/scsi/aha1542.c | memset(&ccb[mbo], 0, sizeof(struct ccb)); |
mbo | 471 | drivers/scsi/aha1542.c | ccb[mbo].cdblen = COMMAND_SIZE(*cmd); /* SCSI Command Descriptor Block Length */ |
mbo | 479 | drivers/scsi/aha1542.c | memcpy(ccb[mbo].cdb, cmd, ccb[mbo].cdblen); |
mbo | 488 | drivers/scsi/aha1542.c | ccb[mbo].op = 2; /* SCSI Initiator Command w/scatter-gather*/ |
mbo | 511 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].datalen, SCpnt->use_sg * sizeof(struct chain)); |
mbo | 513 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].dataptr, cptr); |
mbo | 520 | drivers/scsi/aha1542.c | ccb[mbo].op = 0; /* SCSI Initiator Command */ |
mbo | 522 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].datalen, bufflen); |
mbo | 523 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].dataptr, buff); |
mbo | 525 | drivers/scsi/aha1542.c | ccb[mbo].idlun = (target&7)<<5 | direction | (lun & 7); /*SCSI Target Id*/ |
mbo | 526 | drivers/scsi/aha1542.c | ccb[mbo].rsalen = 12; |
mbo | 527 | drivers/scsi/aha1542.c | ccb[mbo].linkptr[0] = ccb[mbo].linkptr[1] = ccb[mbo].linkptr[2] = 0; |
mbo | 528 | drivers/scsi/aha1542.c | ccb[mbo].commlinkid = 0; |
mbo | 533 | drivers/scsi/aha1542.c | for (i = 0; i < sizeof(ccb[mbo])-10; i++) |
mbo | 534 | drivers/scsi/aha1542.c | printk("%02x ", ((unchar *)&ccb[mbo])[i]); |
mbo | 541 | drivers/scsi/aha1542.c | mb[mbo].status = 1; |
mbo | 871 | drivers/scsi/aha1542.c | int mbo; |
mbo | 876 | drivers/scsi/aha1542.c | for(mbo = 0; mbo < AHA1542_MAILBOXES; mbo++) |
mbo | 877 | drivers/scsi/aha1542.c | if (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){ |
mbo | 878 | drivers/scsi/aha1542.c | mb[mbo].status = 2; /* Abort command */ |