tag | line | file | source code |
mbo | 355 | drivers/scsi/aha1542.c | int errstatus, mbi, mbo, mbistatus; |
mbo | 426 | drivers/scsi/aha1542.c | mbo = (scsi2int(mb[mbi].ccbptr) - ((unsigned int) &ccb[0])) / sizeof(struct ccb); |
mbo | 434 | drivers/scsi/aha1542.c | if (ccb[mbo].tarstat|ccb[mbo].hastat) |
mbo | 436 | drivers/scsi/aha1542.c | ccb[mbo].tarstat + ((int) ccb[mbo].hastat << 16), mb[mbi].status); |
mbo | 443 | drivers/scsi/aha1542.c | printk("...done %d %d\n",mbo, mbi); |
mbo | 446 | drivers/scsi/aha1542.c | SCtmp = HOSTDATA(shost)->SCint[mbo]; |
mbo | 450 | drivers/scsi/aha1542.c | printk("tarstat=%x, hastat=%x idlun=%x ccb#=%d \n", ccb[mbo].tarstat, |
mbo | 451 | drivers/scsi/aha1542.c | ccb[mbo].hastat, ccb[mbo].idlun, mbo); |
mbo | 461 | drivers/scsi/aha1542.c | if (ccb[mbo].tarstat == 2) |
mbo | 462 | drivers/scsi/aha1542.c | memcpy(SCtmp->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen], |
mbo | 471 | drivers/scsi/aha1542.c | errstatus = makecode(ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 477 | drivers/scsi/aha1542.c | ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 480 | drivers/scsi/aha1542.c | if (ccb[mbo].tarstat == 2) { |
mbo | 487 | drivers/scsi/aha1542.c | printk("%02x ", ccb[mbo].cdb[ccb[mbo].cdblen+i]); |
mbo | 499 | drivers/scsi/aha1542.c | HOSTDATA(shost)->SCint[mbo] = NULL; /* This effectively frees up the mailbox slot, as |
mbo | 516 | drivers/scsi/aha1542.c | int mbo; |
mbo | 563 | drivers/scsi/aha1542.c | mbo = HOSTDATA(SCpnt->host)->aha1542_last_mbo_used + 1; |
mbo | 564 | drivers/scsi/aha1542.c | if (mbo >= AHA1542_MAILBOXES) mbo = 0; |
mbo | 567 | drivers/scsi/aha1542.c | if(mb[mbo].status == 0 && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL) |
mbo | 569 | drivers/scsi/aha1542.c | mbo++; |
mbo | 570 | drivers/scsi/aha1542.c | if (mbo >= AHA1542_MAILBOXES) mbo = 0; |
mbo | 571 | drivers/scsi/aha1542.c | } while (mbo != HOSTDATA(SCpnt->host)->aha1542_last_mbo_used); |
mbo | 573 | drivers/scsi/aha1542.c | if(mb[mbo].status || HOSTDATA(SCpnt->host)->SCint[mbo]) |
mbo | 576 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt; /* This will effectively prevent someone else from |
mbo | 579 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->aha1542_last_mbo_used = mbo; |
mbo | 583 | drivers/scsi/aha1542.c | printk("Sending command (%d %x)...",mbo, done); |
mbo | 586 | drivers/scsi/aha1542.c | any2scsi(mb[mbo].ccbptr, &ccb[mbo]); /* This gets trashed for some reason*/ |
mbo | 588 | drivers/scsi/aha1542.c | memset(&ccb[mbo], 0, sizeof(struct ccb)); |
mbo | 590 | drivers/scsi/aha1542.c | ccb[mbo].cdblen = SCpnt->cmd_len; |
mbo | 598 | drivers/scsi/aha1542.c | memcpy(ccb[mbo].cdb, cmd, ccb[mbo].cdblen); |
mbo | 607 | drivers/scsi/aha1542.c | ccb[mbo].op = 2; /* SCSI Initiator Command w/scatter-gather*/ |
mbo | 630 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].datalen, SCpnt->use_sg * sizeof(struct chain)); |
mbo | 631 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].dataptr, cptr); |
mbo | 638 | drivers/scsi/aha1542.c | ccb[mbo].op = 0; /* SCSI Initiator Command */ |
mbo | 640 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].datalen, bufflen); |
mbo | 642 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].dataptr, buff); |
mbo | 644 | drivers/scsi/aha1542.c | ccb[mbo].idlun = (target&7)<<5 | direction | (lun & 7); /*SCSI Target Id*/ |
mbo | 645 | drivers/scsi/aha1542.c | ccb[mbo].rsalen = 12; |
mbo | 646 | drivers/scsi/aha1542.c | ccb[mbo].linkptr[0] = ccb[mbo].linkptr[1] = ccb[mbo].linkptr[2] = 0; |
mbo | 647 | drivers/scsi/aha1542.c | ccb[mbo].commlinkid = 0; |
mbo | 652 | drivers/scsi/aha1542.c | for (i = 0; i < sizeof(ccb[mbo])-10; i++) |
mbo | 653 | drivers/scsi/aha1542.c | printk("%02x ", ((unchar *)&ccb[mbo])[i]); |
mbo | 660 | drivers/scsi/aha1542.c | mb[mbo].status = 1; |
mbo | 1103 | drivers/scsi/aha1542.c | int mbi, mbo, i; |
mbo | 1151 | drivers/scsi/aha1542.c | for(mbo = 0; mbo < AHA1542_MAILBOXES; mbo++) |
mbo | 1152 | drivers/scsi/aha1542.c | if (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){ |
mbo | 1153 | drivers/scsi/aha1542.c | mb[mbo].status = 2; /* Abort command */ |
mbo | 503 | drivers/scsi/buslogic.c | int mbo = (struct ccb *)mb[mbi].ccbptr - ccb; |
mbo | 505 | drivers/scsi/buslogic.c | sctmp = HOSTDATA(shpnt)->sc[mbo]; |
mbo | 516 | drivers/scsi/buslogic.c | saved_mbo[found++] = mbo; |
mbo | 519 | drivers/scsi/buslogic.c | result = makecode(ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 544 | drivers/scsi/buslogic.c | int mbo = saved_mbo[i]; |
mbo | 545 | drivers/scsi/buslogic.c | sctmp = HOSTDATA(shpnt)->sc[mbo]; |
mbo | 558 | drivers/scsi/buslogic.c | HOSTDATA(shpnt)->sc[mbo] = NULL; |
mbo | 577 | drivers/scsi/buslogic.c | int mbo; |
mbo | 632 | drivers/scsi/buslogic.c | mbo = HOSTDATA(shpnt)->last_mbo_used + 1; |
mbo | 633 | drivers/scsi/buslogic.c | if (mbo >= BUSLOGIC_MAILBOXES) |
mbo | 634 | drivers/scsi/buslogic.c | mbo = 0; |
mbo | 637 | drivers/scsi/buslogic.c | if (mb[mbo].status == MBX_NOT_IN_USE |
mbo | 638 | drivers/scsi/buslogic.c | && HOSTDATA(shpnt)->sc[mbo] == NULL) |
mbo | 640 | drivers/scsi/buslogic.c | mbo++; |
mbo | 641 | drivers/scsi/buslogic.c | if (mbo >= BUSLOGIC_MAILBOXES) |
mbo | 642 | drivers/scsi/buslogic.c | mbo = 0; |
mbo | 643 | drivers/scsi/buslogic.c | } while (mbo != HOSTDATA(shpnt)->last_mbo_used); |
mbo | 645 | drivers/scsi/buslogic.c | if (mb[mbo].status != MBX_NOT_IN_USE || HOSTDATA(shpnt)->sc[mbo]) { |
mbo | 653 | drivers/scsi/buslogic.c | HOSTDATA(shpnt)->sc[mbo] = scpnt; /* This will effectively |
mbo | 657 | drivers/scsi/buslogic.c | HOSTDATA(shpnt)->last_mbo_used = mbo; |
mbo | 662 | drivers/scsi/buslogic.c | buslogic_printk("sending command (%d %08X)...", mbo, done); |
mbo | 665 | drivers/scsi/buslogic.c | ccb = &HOSTDATA(shpnt)->ccbs[mbo]; |
mbo | 668 | drivers/scsi/buslogic.c | mb[mbo].ccbptr = ccb; |
mbo | 753 | drivers/scsi/buslogic.c | mb[mbo].status = MBX_ACTION_START; |
mbo | 1357 | drivers/scsi/buslogic.c | int mbi, mbo, last_mbi; |
mbo | 1419 | drivers/scsi/buslogic.c | for (mbo = 0; mbo < BUSLOGIC_MAILBOXES; mbo++) |
mbo | 1420 | drivers/scsi/buslogic.c | if (scpnt == HOSTDATA(scpnt->host)->sc[mbo]) { |
mbo | 1421 | drivers/scsi/buslogic.c | mb[mbo].status = MBX_ACTION_ABORT; |