tag | line | file | source code |
mbo | 283 | drivers/scsi/aha1542.c | int errstatus, mbi, mbo, mbistatus; |
mbo | 356 | drivers/scsi/aha1542.c | mbo = (scsi2int(mb[mbi].ccbptr) - ((unsigned int) &ccb[0])) / sizeof(struct ccb); |
mbo | 364 | drivers/scsi/aha1542.c | if (ccb[mbo].tarstat|ccb[mbo].hastat) |
mbo | 366 | drivers/scsi/aha1542.c | ccb[mbo].tarstat + ((int) ccb[mbo].hastat << 16), mb[mbi].status); |
mbo | 373 | drivers/scsi/aha1542.c | printk("...done %d %d\n",mbo, mbi); |
mbo | 376 | drivers/scsi/aha1542.c | SCtmp = HOSTDATA(shost)->SCint[mbo]; |
mbo | 380 | drivers/scsi/aha1542.c | printk("tarstat=%x, hastat=%x idlun=%x ccb#=%d \n", ccb[mbo].tarstat, |
mbo | 381 | drivers/scsi/aha1542.c | ccb[mbo].hastat, ccb[mbo].idlun, mbo); |
mbo | 391 | drivers/scsi/aha1542.c | if (ccb[mbo].tarstat == 2) |
mbo | 392 | drivers/scsi/aha1542.c | memcpy(SCtmp->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen], |
mbo | 401 | drivers/scsi/aha1542.c | errstatus = makecode(ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 407 | drivers/scsi/aha1542.c | ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 410 | drivers/scsi/aha1542.c | if (ccb[mbo].tarstat == 2) { |
mbo | 417 | drivers/scsi/aha1542.c | printk("%02x ", ccb[mbo].cdb[ccb[mbo].cdblen+i]); |
mbo | 429 | drivers/scsi/aha1542.c | HOSTDATA(shost)->SCint[mbo] = NULL; /* This effectively frees up the mailbox slot, as |
mbo | 445 | drivers/scsi/aha1542.c | int mbo; |
mbo | 491 | drivers/scsi/aha1542.c | mbo = HOSTDATA(SCpnt->host)->aha1542_last_mbo_used + 1; |
mbo | 492 | drivers/scsi/aha1542.c | if (mbo >= AHA1542_MAILBOXES) mbo = 0; |
mbo | 495 | drivers/scsi/aha1542.c | if(mb[mbo].status == 0 && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL) |
mbo | 497 | drivers/scsi/aha1542.c | mbo++; |
mbo | 498 | drivers/scsi/aha1542.c | if (mbo >= AHA1542_MAILBOXES) mbo = 0; |
mbo | 499 | drivers/scsi/aha1542.c | } while (mbo != HOSTDATA(SCpnt->host)->aha1542_last_mbo_used); |
mbo | 501 | drivers/scsi/aha1542.c | if(mb[mbo].status || HOSTDATA(SCpnt->host)->SCint[mbo]) |
mbo | 504 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt; /* This will effectively prevent someone else from |
mbo | 507 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->aha1542_last_mbo_used = mbo; |
mbo | 511 | drivers/scsi/aha1542.c | printk("Sending command (%d %x)...",mbo, done); |
mbo | 514 | drivers/scsi/aha1542.c | any2scsi(mb[mbo].ccbptr, &ccb[mbo]); /* This gets trashed for some reason*/ |
mbo | 516 | drivers/scsi/aha1542.c | memset(&ccb[mbo], 0, sizeof(struct ccb)); |
mbo | 518 | drivers/scsi/aha1542.c | ccb[mbo].cdblen = COMMAND_SIZE(*cmd); /* SCSI Command Descriptor Block Length */ |
mbo | 526 | drivers/scsi/aha1542.c | memcpy(ccb[mbo].cdb, cmd, ccb[mbo].cdblen); |
mbo | 535 | drivers/scsi/aha1542.c | ccb[mbo].op = 2; /* SCSI Initiator Command w/scatter-gather*/ |
mbo | 558 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].datalen, SCpnt->use_sg * sizeof(struct chain)); |
mbo | 560 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].dataptr, cptr); |
mbo | 567 | drivers/scsi/aha1542.c | ccb[mbo].op = 0; /* SCSI Initiator Command */ |
mbo | 569 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].datalen, bufflen); |
mbo | 570 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].dataptr, buff); |
mbo | 572 | drivers/scsi/aha1542.c | ccb[mbo].idlun = (target&7)<<5 | direction | (lun & 7); /*SCSI Target Id*/ |
mbo | 573 | drivers/scsi/aha1542.c | ccb[mbo].rsalen = 12; |
mbo | 574 | drivers/scsi/aha1542.c | ccb[mbo].linkptr[0] = ccb[mbo].linkptr[1] = ccb[mbo].linkptr[2] = 0; |
mbo | 575 | drivers/scsi/aha1542.c | ccb[mbo].commlinkid = 0; |
mbo | 580 | drivers/scsi/aha1542.c | for (i = 0; i < sizeof(ccb[mbo])-10; i++) |
mbo | 581 | drivers/scsi/aha1542.c | printk("%02x ", ((unchar *)&ccb[mbo])[i]); |
mbo | 588 | drivers/scsi/aha1542.c | mb[mbo].status = 1; |
mbo | 946 | drivers/scsi/aha1542.c | int mbi, mbo, i; |
mbo | 993 | drivers/scsi/aha1542.c | for(mbo = 0; mbo < AHA1542_MAILBOXES; mbo++) |
mbo | 994 | drivers/scsi/aha1542.c | if (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){ |
mbo | 995 | drivers/scsi/aha1542.c | mb[mbo].status = 2; /* Abort command */ |
mbo | 398 | drivers/scsi/buslogic.c | size_t mbi, mbo = 0; |
mbo | 461 | drivers/scsi/buslogic.c | mbo = (struct ccb *)mb[mbi].ccbptr - ccb; |
mbo | 478 | drivers/scsi/buslogic.c | if (ccb[mbo].tarstat || ccb[mbo].hastat) |
mbo | 480 | drivers/scsi/buslogic.c | ((int)ccb[mbo].hastat << 16) | ccb[mbo].tarstat, |
mbo | 488 | drivers/scsi/buslogic.c | buslogic_printk("...done %u %u\n", mbo, mbi); |
mbo | 491 | drivers/scsi/buslogic.c | SCtmp = HOSTDATA(SHpnt)->SCint[mbo]; |
mbo | 505 | drivers/scsi/buslogic.c | errstatus = makecode(ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 512 | drivers/scsi/buslogic.c | errstatus, ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 514 | drivers/scsi/buslogic.c | if (status_byte(ccb[mbo].tarstat) == CHECK_CONDITION) { |
mbo | 528 | drivers/scsi/buslogic.c | HOSTDATA(SHpnt)->SCint[mbo] = NULL; /* This effectively frees up |
mbo | 545 | drivers/scsi/buslogic.c | int mbo; |
mbo | 599 | drivers/scsi/buslogic.c | mbo = HOSTDATA(SCpnt->host)->last_mbo_used + 1; |
mbo | 600 | drivers/scsi/buslogic.c | if (mbo >= BUSLOGIC_MAILBOXES) |
mbo | 601 | drivers/scsi/buslogic.c | mbo = 0; |
mbo | 604 | drivers/scsi/buslogic.c | if (mb[mbo].status == MBX_NOT_IN_USE |
mbo | 605 | drivers/scsi/buslogic.c | && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL) |
mbo | 607 | drivers/scsi/buslogic.c | mbo++; |
mbo | 608 | drivers/scsi/buslogic.c | if (mbo >= BUSLOGIC_MAILBOXES) |
mbo | 609 | drivers/scsi/buslogic.c | mbo = 0; |
mbo | 610 | drivers/scsi/buslogic.c | } while (mbo != HOSTDATA(SCpnt->host)->last_mbo_used); |
mbo | 612 | drivers/scsi/buslogic.c | if (mb[mbo].status != MBX_NOT_IN_USE || HOSTDATA(SCpnt->host)->SCint[mbo]) { |
mbo | 618 | drivers/scsi/buslogic.c | HOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt; /* This will effectively |
mbo | 622 | drivers/scsi/buslogic.c | HOSTDATA(SCpnt->host)->last_mbo_used = mbo; |
mbo | 627 | drivers/scsi/buslogic.c | buslogic_printk("sending command (%d %08X)...", mbo, done); |
mbo | 631 | drivers/scsi/buslogic.c | mb[mbo].ccbptr = &ccb[mbo]; |
mbo | 633 | drivers/scsi/buslogic.c | memset(&ccb[mbo], 0, sizeof (struct ccb)); |
mbo | 635 | drivers/scsi/buslogic.c | ccb[mbo].cdblen = COMMAND_SIZE(*cmd); /* SCSI Command Descriptor |
mbo | 644 | drivers/scsi/buslogic.c | memcpy(ccb[mbo].cdb, cmd, ccb[mbo].cdblen); |
mbo | 651 | drivers/scsi/buslogic.c | ccb[mbo].op = CCB_OP_INIT_SG; /* SCSI Initiator Command w/scatter-gather */ |
mbo | 666 | drivers/scsi/buslogic.c | ccb[mbo].datalen = SCpnt->use_sg * sizeof (struct chain); |
mbo | 667 | drivers/scsi/buslogic.c | ccb[mbo].dataptr = cptr; |
mbo | 680 | drivers/scsi/buslogic.c | ccb[mbo].op = CCB_OP_INIT; /* SCSI Initiator Command */ |
mbo | 682 | drivers/scsi/buslogic.c | ccb[mbo].datalen = bufflen; |
mbo | 683 | drivers/scsi/buslogic.c | ccb[mbo].dataptr = buff; |
mbo | 685 | drivers/scsi/buslogic.c | ccb[mbo].id = target; |
mbo | 686 | drivers/scsi/buslogic.c | ccb[mbo].lun = lun; |
mbo | 687 | drivers/scsi/buslogic.c | ccb[mbo].dir = direction; |
mbo | 688 | drivers/scsi/buslogic.c | ccb[mbo].rsalen = sizeof SCpnt->sense_buffer; |
mbo | 689 | drivers/scsi/buslogic.c | ccb[mbo].senseptr = SCpnt->sense_buffer; |
mbo | 690 | drivers/scsi/buslogic.c | ccb[mbo].linkptr = NULL; |
mbo | 691 | drivers/scsi/buslogic.c | ccb[mbo].commlinkid = 0; |
mbo | 698 | drivers/scsi/buslogic.c | for (i = 0; i < sizeof ccb[mbo]; i++) |
mbo | 699 | drivers/scsi/buslogic.c | printk(" %02X", ((unsigned char *)&ccb[mbo])[i]); |
mbo | 710 | drivers/scsi/buslogic.c | mb[mbo].status = MBX_ACTION_START; |
mbo | 1101 | drivers/scsi/buslogic.c | int mbi, mbo, i; |
mbo | 1158 | drivers/scsi/buslogic.c | for (mbo = 0; mbo < BUSLOGIC_MAILBOXES; mbo++) |
mbo | 1159 | drivers/scsi/buslogic.c | if (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]) { |
mbo | 1160 | drivers/scsi/buslogic.c | HOSTDATA(SCpnt->host)->mb[mbo].status = MBX_ACTION_ABORT; |