Lines Matching refs:x_ID
134 static void cpqfcTSCheckandSnoopFCP(PTACHYON fcChip, u32 x_ID);
424 s32 x_ID = fcLQ->Qitem[QconsumerNdx].ulBuff[0]; in cpqfcTS_WorkTask() local
427 if (x_ID > TACH_SEST_LEN) // (in)sanity check in cpqfcTS_WorkTask()
432 if (Exchanges->fcExchange[x_ID].Cmnd == NULL) // should be RARE in cpqfcTS_WorkTask()
439 printk("INV SEST[%X] ", x_ID); in cpqfcTS_WorkTask()
440 if (Exchanges->fcExchange[x_ID].status & FC2_TIMEOUT) { in cpqfcTS_WorkTask()
443 if (Exchanges->fcExchange[x_ID].status & INITIATOR_ABORT) { in cpqfcTS_WorkTask()
446 if (Exchanges->fcExchange[x_ID].status & PORTID_CHANGED) { in cpqfcTS_WorkTask()
449 if (Exchanges->fcExchange[x_ID].status & DEVICE_REMOVED) { in cpqfcTS_WorkTask()
452 if (Exchanges->fcExchange[x_ID].status & LINKFAIL_TX) { in cpqfcTS_WorkTask()
455 if (Exchanges->fcExchange[x_ID].status & FRAME_TO) { in cpqfcTS_WorkTask()
458 if (Exchanges->fcExchange[x_ID].status & ABORTSEQ_NOTIFY) { in cpqfcTS_WorkTask()
461 if (Exchanges->fcExchange[x_ID].status & SFQ_FRAME) { in cpqfcTS_WorkTask()
465 if (Exchanges->fcExchange[x_ID].type == 0x2000) in cpqfcTS_WorkTask()
467 else if (Exchanges->fcExchange[x_ID].type == 0x3000) in cpqfcTS_WorkTask()
469 else if (Exchanges->fcExchange[x_ID].type == 0x10) in cpqfcTS_WorkTask()
472 printk(" %Xh", Exchanges->fcExchange[x_ID].type); in cpqfcTS_WorkTask()
474 if (!(Exchanges->fcExchange[x_ID].status & INITIATOR_ABORT)) { in cpqfcTS_WorkTask()
475 printk(" Cmd %p, ", Exchanges->fcExchange[x_ID].Cmnd); in cpqfcTS_WorkTask()
478 …>fcExchange[x_ID].Cmnd->channel, Exchanges->fcExchange[x_ID].Cmnd->target, Exchanges->fcExchange[x… in cpqfcTS_WorkTask()
494 PCI_TRACEO(x_ID, 0xB4) in cpqfcTS_WorkTask()
508 fcChip->SEST->u[x_ID].IWE.Hdr_Len &= 0x7FFFFFFF; in cpqfcTS_WorkTask()
528 PCI_TRACEO(x_ID, 0xB4) in cpqfcTS_WorkTask()
535 if (!(Exchanges->fcExchange[x_ID].status & PORTID_CHANGED) in cpqfcTS_WorkTask()
536 && !(Exchanges->fcExchange[x_ID].status & DEVICE_REMOVED)) { in cpqfcTS_WorkTask()
537 Exchanges->fcExchange[x_ID].type = BLS_ABTS; in cpqfcTS_WorkTask()
538 fchs.s_id = Exchanges->fcExchange[x_ID].fchs.d_id; in cpqfcTS_WorkTask()
541 &x_ID); // ABTS on this Exchange ID in cpqfcTS_WorkTask()
554 Exchanges->fcExchange[x_ID].status |= EXCHANGE_QUEUED; in cpqfcTS_WorkTask()
559 PFC_LOGGEDIN_PORT pLoggedInPort = Exchanges->fcExchange[x_ID].pLoggedInPort; in cpqfcTS_WorkTask()
569 if (Exchanges->fcExchange[x_ID].status & EXCHANGE_QUEUED) { in cpqfcTS_WorkTask()
574 ulStatus = cpqfcTSStartExchange(dev, x_ID); in cpqfcTS_WorkTask()
586 printk("ABTS exchange build failed -status %Xh, x_ID %Xh\n", ulStatus, x_ID); in cpqfcTS_WorkTask()
592 cpqfcTSCompleteExchange(dev->PciDev, fcChip, x_ID); in cpqfcTS_WorkTask()
988 u32 x_ID; in cpqfcTSTerminateExchange() local
994 for (x_ID = 0; x_ID < TACH_SEST_LEN; x_ID++) { in cpqfcTSTerminateExchange()
995 if (Exchanges->fcExchange[x_ID].type) // in use? in cpqfcTSTerminateExchange()
999 Exchanges->fcExchange[x_ID].status = TerminateStatus; in cpqfcTSTerminateExchange()
1000 cpqfcTSPutLinkQue(dev, BLS_ABTS, &x_ID); in cpqfcTSTerminateExchange()
1005 if (Exchanges->fcExchange[x_ID].Cmnd) // Cmnd in progress? in cpqfcTSTerminateExchange()
1007 if ((Exchanges->fcExchange[x_ID].Cmnd->target == ScsiNexus->target) in cpqfcTSTerminateExchange()
1008 && (Exchanges->fcExchange[x_ID].Cmnd->channel == ScsiNexus->channel)) { in cpqfcTSTerminateExchange()
1009 Exchanges->fcExchange[x_ID].status = TerminateStatus; in cpqfcTSTerminateExchange()
1010 cpqfcTSPutLinkQue(dev, BLS_ABTS, &x_ID); // timed-out in cpqfcTSTerminateExchange()
2121 u32 x_ID = 0xFFFFFFFF; in ScsiReportLunsDone() local
2133 x_ID = i; // found exchange! in ScsiReportLunsDone()
2137 if (x_ID == 0xFFFFFFFF) { in ScsiReportLunsDone()
2145 … Exchanges->fcExchange[x_ID].fchs.d_id & 0xFFFFFF, NULL, // DON'T search linked list for FC WWN in ScsiReportLunsDone()
2161 TachFCHDR_GCMND *fchs = &Exchanges->fcExchange[x_ID].fchs; in ScsiReportLunsDone()
2315 s32 x_ID; in IssueReportLunsCommand() local
2360 &x_ID); // fcController->fcExchanges index, -1 if failed in IssueReportLunsCommand()
2364 ulStatus = cpqfcTSStartExchange(dev, x_ID); in IssueReportLunsCommand()
2756 u32 x_ID; in RevalidateSEST() local
2762 for (x_ID = 0; x_ID < TACH_SEST_LEN; x_ID++) { in RevalidateSEST()
2766 if ((Exchanges->fcExchange[x_ID].type == SCSI_IRE) in RevalidateSEST()
2767 || (Exchanges->fcExchange[x_ID].type == SCSI_IWE)) { in RevalidateSEST()
2768 …if ((Exchanges->fcExchange[x_ID].fchs.d_id & 0xFFFFFF) == pLoggedInPort->port_id) // (24-bit port… in RevalidateSEST()
2773 fcChip->SEST->u[x_ID].IWE.Hdr_Len |= 0x80000000; // set VAL bit in RevalidateSEST()
4870 static void cpqfc_pci_unmap_extended_sg(struct pci_dev *pcidev, PTACHYON fcChip, u32 x_ID) in cpqfc_pci_unmap_extended_sg() argument
4877 if (!USES_EXTENDED_SGLIST(fcChip->SEST, x_ID)) in cpqfc_pci_unmap_extended_sg()
4881 for (i = fcChip->SEST->sgPages[x_ID]; i != NULL; i = i->next) in cpqfc_pci_unmap_extended_sg()
4886 void cpqfc_pci_unmap(struct pci_dev *pcidev, Scsi_Cmnd * cmd, PTACHYON fcChip, u32 x_ID) in cpqfc_pci_unmap() argument
4890 cpqfc_pci_unmap_extended_sg(pcidev, fcChip, x_ID); in cpqfc_pci_unmap()
4895 …pci_unmap_single(pcidev, fcChip->SEST->u[x_ID].IWE.GAddr1, cmd->request_bufflen, scsi_to_pci_dma_d… in cpqfc_pci_unmap()
4907 void cpqfcTSCompleteExchange(struct pci_dev *pcidev, PTACHYON fcChip, u32 x_ID) in cpqfcTSCompleteExchange() argument
4912 if (x_ID < TACH_SEST_LEN) // SEST-based (or LinkServ for FCP exchange) in cpqfcTSCompleteExchange()
4914 if (Exchanges->fcExchange[x_ID].Cmnd == NULL) // what#@! in cpqfcTSCompleteExchange()
4917 printk(" x_ID %Xh, type %Xh, NULL ptr!\n", x_ID, Exchanges->fcExchange[x_ID].type); in cpqfcTSCompleteExchange()
4924 if (Exchanges->fcExchange[x_ID].status) // perhaps a Tach indicated problem, in cpqfcTSCompleteExchange()
4929 if (Exchanges->fcExchange[x_ID].status & FC2_TIMEOUT) in cpqfcTSCompleteExchange()
4931 if (Exchanges->fcExchange[x_ID].status & INITIATOR_ABORT) in cpqfcTSCompleteExchange()
4933 if (Exchanges->fcExchange[x_ID].status & COUNT_ERROR) in cpqfcTSCompleteExchange()
4935 if (Exchanges->fcExchange[x_ID].status & LINKFAIL_TX) in cpqfcTSCompleteExchange()
4937 if (Exchanges->fcExchange[x_ID].status & LINKFAIL_RX) in cpqfcTSCompleteExchange()
4939 if (Exchanges->fcExchange[x_ID].status & OVERFLOW) in cpqfcTSCompleteExchange()
4944 if (Exchanges->fcExchange[x_ID].status == INITIATOR_ABORT) { in cpqfcTSCompleteExchange()
4945 printk(" DID_ABORT, x_ID %Xh, Cmnd %p ", x_ID, Exchanges->fcExchange[x_ID].Cmnd); in cpqfcTSCompleteExchange()
4950 else if (Exchanges->fcExchange[x_ID].status & FC2_TIMEOUT) { in cpqfcTSCompleteExchange()
4953 Exchanges->fcExchange[x_ID].Cmnd->result = (DID_SOFT_ERROR << 16); in cpqfcTSCompleteExchange()
4957 else if (Exchanges->fcExchange[x_ID].status & SFQ_FRAME) { in cpqfcTSCompleteExchange()
4960 Exchanges->fcExchange[x_ID].Cmnd->result = (DID_SOFT_ERROR << 16); in cpqfcTSCompleteExchange()
4964 else if ((Exchanges->fcExchange[x_ID].status & LINKFAIL_TX) || in cpqfcTSCompleteExchange()
4965 …x_ID].status & PORTID_CHANGED) || (Exchanges->fcExchange[x_ID].status & FRAME_TO) || (Exchanges->f… in cpqfcTSCompleteExchange()
4970 Exchanges->fcExchange[x_ID].Cmnd->result = (DID_SOFT_ERROR << 16); in cpqfcTSCompleteExchange()
4975 else if (Exchanges->fcExchange[x_ID].status & DEVICE_REMOVED) { in cpqfcTSCompleteExchange()
4979 Exchanges->fcExchange[x_ID].Cmnd->result = (DID_BAD_TARGET << 16); in cpqfcTSCompleteExchange()
4984 else if (Exchanges->fcExchange[x_ID].status == COUNT_ERROR) { in cpqfcTSCompleteExchange()
4986 FCP_STATUS_RESPONSE *pFcpStatus = (PFCP_STATUS_RESPONSE) & fcChip->SEST->RspHDR[x_ID].pl; in cpqfcTSCompleteExchange()
4994 …x_ID].Cmnd->cmnd[0] == 0x8) || (Exchanges->fcExchange[x_ID].Cmnd->cmnd[0] == 0x28) || (Exchanges->… in cpqfcTSCompleteExchange()
5000 Exchanges->fcExchange[x_ID].Cmnd->result = (DID_SOFT_ERROR << 16); in cpqfcTSCompleteExchange()
5005 cpqfcTSCheckandSnoopFCP(fcChip, x_ID); // (will set ->result) in cpqfcTSCompleteExchange()
5012 unsigned int stat = Exchanges->fcExchange[x_ID].status; in cpqfcTSCompleteExchange()
5013 …esult %Xh, x_ID %Xh, Cmnd %p", Exchanges->fcExchange[x_ID].status, x_ID, Exchanges->fcExchange[x_I… in cpqfcTSCompleteExchange()
5067 Exchanges->fcExchange[x_ID].Cmnd->result = (DID_ERROR << 16); in cpqfcTSCompleteExchange()
5073 cpqfcTSCheckandSnoopFCP(fcChip, x_ID); // (will set ->result) in cpqfcTSCompleteExchange()
5076 cpqfc_pci_unmap(pcidev, Exchanges->fcExchange[x_ID].Cmnd, fcChip, x_ID); // undo DMA mappings. in cpqfcTSCompleteExchange()
5083 PCI_TRACEO((u32) Exchanges->fcExchange[x_ID].Cmnd, 0xAC); in cpqfcTSCompleteExchange()
5085 if (Exchanges->fcExchange[x_ID].Cmnd->scsi_done != NULL) { in cpqfcTSCompleteExchange()
5089 if (Exchanges->fcExchange[x_ID].Cmnd->result != (DID_ABORT << 16)) { in cpqfcTSCompleteExchange()
5091 call_scsi_done(Exchanges->fcExchange[x_ID].Cmnd); in cpqfcTSCompleteExchange()
5093 Exchanges->fcExchange[x_ID].Cmnd->SCp.sent_command = 0; in cpqfcTSCompleteExchange()
5098 Exchanges->fcExchange[x_ID].Cmnd->SCp.sent_command = 0; in cpqfcTSCompleteExchange()
5099 …printk(" x_ID %Xh, type %Xh, Cdb0 %Xh\n", x_ID, Exchanges->fcExchange[x_ID].type, Exchanges->fcExc… in cpqfcTSCompleteExchange()
5108 cpqfc_pci_unmap(pcidev, Exchanges->fcExchange[x_ID].Cmnd, fcChip, x_ID); // undo DMA mappings. in cpqfcTSCompleteExchange()
5112 if (!(fcChip->SEST->u[x_ID].IWE.Buff_Off & 0x80000000)) { in cpqfcTSCompleteExchange()
5116 for (p = fcChip->SEST->sgPages[x_ID]; p != NULL; p = next) { in cpqfcTSCompleteExchange()
5120 fcChip->SEST->sgPages[x_ID] = NULL; in cpqfcTSCompleteExchange()
5123 Exchanges->fcExchange[x_ID].Cmnd = NULL; in cpqfcTSCompleteExchange()
5130 Exchanges->fcExchange[x_ID].type = 0; // there -- FREE! in cpqfcTSCompleteExchange()
5131 Exchanges->fcExchange[x_ID].status = 0; in cpqfcTSCompleteExchange()
5133 PCI_TRACEO(x_ID, 0xAC) in cpqfcTSCompleteExchange()
5144 void cpqfcTSCheckandSnoopFCP(PTACHYON fcChip, u32 x_ID) in cpqfcTSCheckandSnoopFCP() argument
5147 Scsi_Cmnd *Cmnd = Exchanges->fcExchange[x_ID].Cmnd; in cpqfcTSCheckandSnoopFCP()
5148 FCP_STATUS_RESPONSE *pFcpStatus = (PFCP_STATUS_RESPONSE) & fcChip->SEST->RspHDR[x_ID].pl; in cpqfcTSCheckandSnoopFCP()
5164 printk("cpqfcTS: FCP data len not burst len, x_ID %Xh\n", x_ID); in cpqfcTSCheckandSnoopFCP()
5191 … Exchanges->fcExchange[x_ID].fchs.d_id & 0xFFFFFF, NULL, // DON'T search linked list for FC WWN in cpqfcTSCheckandSnoopFCP()
5197 …printk("cpqfcTS: can't find LoggedIn FC port %06X for INQUIRY\n", Exchanges->fcExchange[x_ID].fchs… in cpqfcTSCheckandSnoopFCP()