Lines Matching refs:pSCB
188 extern int init_tulip(HCS * pHCB, SCB * pSCB, int tul_num_scb, BYTE * pbBiosAdr, int reset_time);
191 extern void tul_exec_scb(HCS * pHCB, SCB * pSCB);
192 extern void tul_release_scb(HCS * pHCB, SCB * pSCB);
311 SCB *pSCB; in i91u_detect() local
367 pSCB = tul_scb; in i91u_detect()
368 for (i = 0; i < tul_num_ch * tul_num_scb; i++, pSCB++) { in i91u_detect()
369 pSCB->SCB_SGPAddr = (U32) VIRT_TO_BUS(&pSCB->SCB_SGList[0]); in i91u_detect()
458 static void i91uBuildSCB(HCS * pHCB, SCB * pSCB, Scsi_Cmnd * SCpnt) in i91uBuildSCB() argument
465 pSCB->SCB_Post = i91uSCBPost; /* i91u's callback routine */ in i91uBuildSCB()
466 pSCB->SCB_Srb = SCpnt; in i91uBuildSCB()
467 pSCB->SCB_Opcode = ExecSCSI; in i91uBuildSCB()
468 pSCB->SCB_Flags = SCF_POST; /* After SCSI done, call post routine */ in i91uBuildSCB()
469 pSCB->SCB_Target = SCpnt->target; in i91uBuildSCB()
470 pSCB->SCB_Lun = SCpnt->lun; in i91uBuildSCB()
471 pSCB->SCB_Ident = SCpnt->lun | DISC_ALLOW; in i91uBuildSCB()
472 pSCB->SCB_Flags |= SCF_SENSE; /* Turn on auto request sense */ in i91uBuildSCB()
474 pSCB->SCB_SensePtr = (U32) VIRT_TO_BUS(SCpnt->sense_buffer); in i91uBuildSCB()
476 pSCB->SCB_SenseLen = SENSE_SIZE; in i91uBuildSCB()
478 pSCB->SCB_CDBLen = SCpnt->cmd_len; in i91uBuildSCB()
479 pSCB->SCB_HaStat = 0; in i91uBuildSCB()
480 pSCB->SCB_TaStat = 0; in i91uBuildSCB()
481 memcpy(&pSCB->SCB_CDB[0], &SCpnt->cmnd, SCpnt->cmd_len); in i91uBuildSCB()
484 pSCB->SCB_TagMsg = SIMPLE_QUEUE_TAG; /* Do simple tag only */ in i91uBuildSCB()
486 pSCB->SCB_TagMsg = 0; /* No tag support */ in i91uBuildSCB()
492 pSCB->SCB_BufPtr = (U32) VIRT_TO_BUS(pSrbSG->address); in i91uBuildSCB()
494 pSCB->SCB_SGLen = 0; in i91uBuildSCB()
496 pSCB->SCB_BufPtr = pSCB->SCB_SGPAddr; in i91uBuildSCB()
497 pSCB->SCB_Flags |= SCF_SG; /* Turn on SG list flag */ in i91uBuildSCB()
498 for (i = 0, TotalLen = 0, pSG = &pSCB->SCB_SGList[0]; /* 1.01g */ in i91uBuildSCB()
504 pSCB->SCB_SGLen = i; in i91uBuildSCB()
506 pSCB->SCB_BufLen = (SCpnt->request_bufflen > TotalLen) ? in i91uBuildSCB()
509 pSCB->SCB_BufPtr = (U32) VIRT_TO_BUS(SCpnt->request_buffer); in i91uBuildSCB()
510 pSCB->SCB_BufLen = SCpnt->request_bufflen; in i91uBuildSCB()
511 pSCB->SCB_SGLen = 0; in i91uBuildSCB()
522 register SCB *pSCB; in i91u_queue() local
535 if ((pSCB = tul_alloc_scb(pHCB)) == NULL) { in i91u_queue()
539 i91uBuildSCB(pHCB, pSCB, SCpnt); in i91u_queue()
540 tul_exec_scb(pHCB, pSCB); /* Start execute SCB */ in i91u_queue()
632 SCB *pSCB; in i91uSCBPost() local
635 pSCB = (SCB *) pScb; in i91uSCBPost()
636 if ((pSRB = pSCB->SCB_Srb) == 0) { in i91uSCBPost()
639 tul_release_scb(pHCB, pSCB); /* Release SCB for current channel */ in i91uSCBPost()
642 switch (pSCB->SCB_HaStat) { in i91uSCBPost()
646 pSCB->SCB_HaStat = 0; in i91uSCBPost()
651 pSCB->SCB_HaStat = DID_TIME_OUT; in i91uSCBPost()
658 pSCB->SCB_HaStat = DID_RESET; in i91uSCBPost()
662 pSCB->SCB_HaStat = DID_ABORT; in i91uSCBPost()
672 printk("ini9100u: %x %x\n", pSCB->SCB_HaStat, pSCB->SCB_TaStat); in i91uSCBPost()
673 pSCB->SCB_HaStat = DID_ERROR; /* Couldn't find any better */ in i91uSCBPost()
677 pSRB->result = pSCB->SCB_TaStat | (pSCB->SCB_HaStat << 16); in i91uSCBPost()
687 i91uBuildSCB(pHCB, pSCB, pSRB); /* Create corresponding SCB */ in i91uSCBPost()
689 tul_exec_scb(pHCB, pSCB); /* Start execute SCB */ in i91uSCBPost()
691 tul_release_scb(pHCB, pSCB); /* Release SCB for current channel */ in i91uSCBPost()