tag | line | file | source code |
mbo | 317 | drivers/scsi/aha1542.c | int errstatus, mbi, mbo, mbistatus; |
mbo | 390 | drivers/scsi/aha1542.c | mbo = (scsi2int(mb[mbi].ccbptr) - ((unsigned int) &ccb[0])) / sizeof(struct ccb); |
mbo | 398 | drivers/scsi/aha1542.c | if (ccb[mbo].tarstat|ccb[mbo].hastat) |
mbo | 400 | drivers/scsi/aha1542.c | ccb[mbo].tarstat + ((int) ccb[mbo].hastat << 16), mb[mbi].status); |
mbo | 407 | drivers/scsi/aha1542.c | printk("...done %d %d\n",mbo, mbi); |
mbo | 410 | drivers/scsi/aha1542.c | SCtmp = HOSTDATA(shost)->SCint[mbo]; |
mbo | 414 | drivers/scsi/aha1542.c | printk("tarstat=%x, hastat=%x idlun=%x ccb#=%d \n", ccb[mbo].tarstat, |
mbo | 415 | drivers/scsi/aha1542.c | ccb[mbo].hastat, ccb[mbo].idlun, mbo); |
mbo | 425 | drivers/scsi/aha1542.c | if (ccb[mbo].tarstat == 2) |
mbo | 426 | drivers/scsi/aha1542.c | memcpy(SCtmp->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen], |
mbo | 435 | drivers/scsi/aha1542.c | errstatus = makecode(ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 441 | drivers/scsi/aha1542.c | ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 444 | drivers/scsi/aha1542.c | if (ccb[mbo].tarstat == 2) { |
mbo | 451 | drivers/scsi/aha1542.c | printk("%02x ", ccb[mbo].cdb[ccb[mbo].cdblen+i]); |
mbo | 463 | drivers/scsi/aha1542.c | HOSTDATA(shost)->SCint[mbo] = NULL; /* This effectively frees up the mailbox slot, as |
mbo | 479 | drivers/scsi/aha1542.c | int mbo; |
mbo | 525 | drivers/scsi/aha1542.c | mbo = HOSTDATA(SCpnt->host)->aha1542_last_mbo_used + 1; |
mbo | 526 | drivers/scsi/aha1542.c | if (mbo >= AHA1542_MAILBOXES) mbo = 0; |
mbo | 529 | drivers/scsi/aha1542.c | if(mb[mbo].status == 0 && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL) |
mbo | 531 | drivers/scsi/aha1542.c | mbo++; |
mbo | 532 | drivers/scsi/aha1542.c | if (mbo >= AHA1542_MAILBOXES) mbo = 0; |
mbo | 533 | drivers/scsi/aha1542.c | } while (mbo != HOSTDATA(SCpnt->host)->aha1542_last_mbo_used); |
mbo | 535 | drivers/scsi/aha1542.c | if(mb[mbo].status || HOSTDATA(SCpnt->host)->SCint[mbo]) |
mbo | 538 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt; /* This will effectively prevent someone else from |
mbo | 541 | drivers/scsi/aha1542.c | HOSTDATA(SCpnt->host)->aha1542_last_mbo_used = mbo; |
mbo | 545 | drivers/scsi/aha1542.c | printk("Sending command (%d %x)...",mbo, done); |
mbo | 548 | drivers/scsi/aha1542.c | any2scsi(mb[mbo].ccbptr, &ccb[mbo]); /* This gets trashed for some reason*/ |
mbo | 550 | drivers/scsi/aha1542.c | memset(&ccb[mbo], 0, sizeof(struct ccb)); |
mbo | 552 | drivers/scsi/aha1542.c | ccb[mbo].cdblen = COMMAND_SIZE(*cmd); /* SCSI Command Descriptor Block Length */ |
mbo | 560 | drivers/scsi/aha1542.c | memcpy(ccb[mbo].cdb, cmd, ccb[mbo].cdblen); |
mbo | 569 | drivers/scsi/aha1542.c | ccb[mbo].op = 2; /* SCSI Initiator Command w/scatter-gather*/ |
mbo | 592 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].datalen, SCpnt->use_sg * sizeof(struct chain)); |
mbo | 594 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].dataptr, cptr); |
mbo | 601 | drivers/scsi/aha1542.c | ccb[mbo].op = 0; /* SCSI Initiator Command */ |
mbo | 603 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].datalen, bufflen); |
mbo | 604 | drivers/scsi/aha1542.c | any2scsi(ccb[mbo].dataptr, buff); |
mbo | 606 | drivers/scsi/aha1542.c | ccb[mbo].idlun = (target&7)<<5 | direction | (lun & 7); /*SCSI Target Id*/ |
mbo | 607 | drivers/scsi/aha1542.c | ccb[mbo].rsalen = 12; |
mbo | 608 | drivers/scsi/aha1542.c | ccb[mbo].linkptr[0] = ccb[mbo].linkptr[1] = ccb[mbo].linkptr[2] = 0; |
mbo | 609 | drivers/scsi/aha1542.c | ccb[mbo].commlinkid = 0; |
mbo | 614 | drivers/scsi/aha1542.c | for (i = 0; i < sizeof(ccb[mbo])-10; i++) |
mbo | 615 | drivers/scsi/aha1542.c | printk("%02x ", ((unchar *)&ccb[mbo])[i]); |
mbo | 622 | drivers/scsi/aha1542.c | mb[mbo].status = 1; |
mbo | 981 | drivers/scsi/aha1542.c | int mbi, mbo, i; |
mbo | 1028 | drivers/scsi/aha1542.c | for(mbo = 0; mbo < AHA1542_MAILBOXES; mbo++) |
mbo | 1029 | drivers/scsi/aha1542.c | if (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]){ |
mbo | 1030 | drivers/scsi/aha1542.c | mb[mbo].status = 2; /* Abort command */ |
mbo | 426 | drivers/scsi/buslogic.c | size_t mbi, mbo = 0; |
mbo | 506 | drivers/scsi/buslogic.c | mbo = (struct ccb *)mb[mbi].ccbptr - ccb; |
mbo | 526 | drivers/scsi/buslogic.c | if (ccb[mbo].tarstat || ccb[mbo].hastat) |
mbo | 528 | drivers/scsi/buslogic.c | ((int)ccb[mbo].hastat << 16) | ccb[mbo].tarstat, |
mbo | 536 | drivers/scsi/buslogic.c | buslogic_printk("...done %u %u\n", mbo, mbi); |
mbo | 539 | drivers/scsi/buslogic.c | sctmp = HOSTDATA(shpnt)->sc[mbo]; |
mbo | 544 | drivers/scsi/buslogic.c | ccb[mbo].tarstat, ccb[mbo].hastat, |
mbo | 545 | drivers/scsi/buslogic.c | ccb[mbo].id, ccb[mbo].lun, mbo); |
mbo | 557 | drivers/scsi/buslogic.c | if (ccb[mbo].tarstat == 2) /* ??? */ |
mbo | 558 | drivers/scsi/buslogic.c | memcpy(sctmp->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen], |
mbo | 565 | drivers/scsi/buslogic.c | errstatus = makecode(ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 572 | drivers/scsi/buslogic.c | errstatus, ccb[mbo].hastat, ccb[mbo].tarstat); |
mbo | 574 | drivers/scsi/buslogic.c | if (status_byte(ccb[mbo].tarstat) == CHECK_CONDITION) { |
mbo | 588 | drivers/scsi/buslogic.c | HOSTDATA(shpnt)->sc[mbo] = NULL; /* This effectively frees up |
mbo | 606 | drivers/scsi/buslogic.c | int mbo; |
mbo | 661 | drivers/scsi/buslogic.c | mbo = HOSTDATA(scpnt->host)->last_mbo_used + 1; |
mbo | 662 | drivers/scsi/buslogic.c | if (mbo >= BUSLOGIC_MAILBOXES) |
mbo | 663 | drivers/scsi/buslogic.c | mbo = 0; |
mbo | 666 | drivers/scsi/buslogic.c | if (mb[mbo].status == MBX_NOT_IN_USE |
mbo | 667 | drivers/scsi/buslogic.c | && HOSTDATA(scpnt->host)->sc[mbo] == NULL) |
mbo | 669 | drivers/scsi/buslogic.c | mbo++; |
mbo | 670 | drivers/scsi/buslogic.c | if (mbo >= BUSLOGIC_MAILBOXES) |
mbo | 671 | drivers/scsi/buslogic.c | mbo = 0; |
mbo | 672 | drivers/scsi/buslogic.c | } while (mbo != HOSTDATA(scpnt->host)->last_mbo_used); |
mbo | 674 | drivers/scsi/buslogic.c | if (mb[mbo].status != MBX_NOT_IN_USE |
mbo | 675 | drivers/scsi/buslogic.c | || HOSTDATA(scpnt->host)->sc[mbo]) { |
mbo | 681 | drivers/scsi/buslogic.c | HOSTDATA(scpnt->host)->sc[mbo] = scpnt; /* This will effectively |
mbo | 685 | drivers/scsi/buslogic.c | HOSTDATA(scpnt->host)->last_mbo_used = mbo; |
mbo | 690 | drivers/scsi/buslogic.c | buslogic_printk("sending command (%d %08X)...", mbo, done); |
mbo | 694 | drivers/scsi/buslogic.c | mb[mbo].ccbptr = &ccb[mbo]; |
mbo | 696 | drivers/scsi/buslogic.c | memset(&ccb[mbo], 0, sizeof (struct ccb)); |
mbo | 698 | drivers/scsi/buslogic.c | ccb[mbo].cdblen = COMMAND_SIZE(*cmd); /* SCSI Command Descriptor |
mbo | 707 | drivers/scsi/buslogic.c | memcpy(ccb[mbo].cdb, cmd, ccb[mbo].cdblen); |
mbo | 714 | drivers/scsi/buslogic.c | ccb[mbo].op = CCB_OP_INIT_SG; /* SCSI Initiator Command |
mbo | 732 | drivers/scsi/buslogic.c | ccb[mbo].datalen = scpnt->use_sg * sizeof (struct chain); |
mbo | 733 | drivers/scsi/buslogic.c | ccb[mbo].dataptr = cptr; |
mbo | 746 | drivers/scsi/buslogic.c | ccb[mbo].op = CCB_OP_INIT; /* SCSI Initiator Command */ |
mbo | 748 | drivers/scsi/buslogic.c | ccb[mbo].datalen = bufflen; |
mbo | 749 | drivers/scsi/buslogic.c | ccb[mbo].dataptr = buff; |
mbo | 751 | drivers/scsi/buslogic.c | ccb[mbo].id = target; |
mbo | 752 | drivers/scsi/buslogic.c | ccb[mbo].lun = lun; |
mbo | 753 | drivers/scsi/buslogic.c | ccb[mbo].dir = direction; |
mbo | 754 | drivers/scsi/buslogic.c | ccb[mbo].rsalen = sizeof scpnt->sense_buffer; |
mbo | 755 | drivers/scsi/buslogic.c | ccb[mbo].senseptr = scpnt->sense_buffer; |
mbo | 756 | drivers/scsi/buslogic.c | ccb[mbo].linkptr = NULL; |
mbo | 757 | drivers/scsi/buslogic.c | ccb[mbo].commlinkid = 0; |
mbo | 764 | drivers/scsi/buslogic.c | for (i = 0; i < sizeof ccb[mbo] - 10; i++) |
mbo | 765 | drivers/scsi/buslogic.c | printk(" %02X", ((unsigned char *)&ccb[mbo])[i]); |
mbo | 776 | drivers/scsi/buslogic.c | mb[mbo].status = MBX_ACTION_START; |
mbo | 1212 | drivers/scsi/buslogic.c | size_t mbi, mbo; |
mbo | 1272 | drivers/scsi/buslogic.c | for (mbo = 0; mbo < BUSLOGIC_MAILBOXES; mbo++) |
mbo | 1273 | drivers/scsi/buslogic.c | if (scpnt == HOSTDATA(scpnt->host)->sc[mbo]) { |
mbo | 1274 | drivers/scsi/buslogic.c | mb[mbo].status = MBX_ACTION_ABORT; |