Lines Matching refs:cpqfcHBAdata

86 static void Cpqfc_initHBAdata(CPQFCHBA * cpqfcHBAdata, struct pci_dev *PciDev)  in Cpqfc_initHBAdata()  argument
89 cpqfcHBAdata->PciDev = PciDev; // copy PCI info ptr in Cpqfc_initHBAdata()
92 cpqfcHBAdata->fcChip.Registers.IOBaseL = PciDev->resource[1].start & PCI_BASE_ADDRESS_IO_MASK; in Cpqfc_initHBAdata()
93 cpqfcHBAdata->fcChip.Registers.IOBaseU = PciDev->resource[2].start & PCI_BASE_ADDRESS_IO_MASK; in Cpqfc_initHBAdata()
96 cpqfcHBAdata->fcChip.Registers.MemBase = PciDev->resource[3].start & PCI_BASE_ADDRESS_MEM_MASK; in Cpqfc_initHBAdata()
97cpqfcHBAdata->fcChip.Registers.ReMapMemBase = ioremap(PciDev->resource[3].start & PCI_BASE_ADDRESS… in Cpqfc_initHBAdata()
98 cpqfcHBAdata->fcChip.Registers.RAMBase = PciDev->resource[4].start; in Cpqfc_initHBAdata()
99 cpqfcHBAdata->fcChip.Registers.SROMBase = PciDev->resource[5].start; // NULL for HP TS adapter in Cpqfc_initHBAdata()
105cpqfcHBAdata->fcChip.Registers.SFQconsumerIndex.address = cpqfcHBAdata->fcChip.Registers.ReMapMemB… in Cpqfc_initHBAdata()
107cpqfcHBAdata->fcChip.Registers.ERQproducerIndex.address = cpqfcHBAdata->fcChip.Registers.ReMapMemB… in Cpqfc_initHBAdata()
110cpqfcHBAdata->fcChip.Registers.FMconfig.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase + TL… in Cpqfc_initHBAdata()
111cpqfcHBAdata->fcChip.Registers.FMcontrol.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase + T… in Cpqfc_initHBAdata()
112cpqfcHBAdata->fcChip.Registers.FMstatus.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase + TL… in Cpqfc_initHBAdata()
113cpqfcHBAdata->fcChip.Registers.FMLinkStatus1.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase… in Cpqfc_initHBAdata()
114cpqfcHBAdata->fcChip.Registers.FMLinkStatus2.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase… in Cpqfc_initHBAdata()
115cpqfcHBAdata->fcChip.Registers.FMBB_CreditZero.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBa… in Cpqfc_initHBAdata()
118cpqfcHBAdata->fcChip.Registers.TYconfig.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase + TL… in Cpqfc_initHBAdata()
119cpqfcHBAdata->fcChip.Registers.TYcontrol.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase + T… in Cpqfc_initHBAdata()
120cpqfcHBAdata->fcChip.Registers.TYstatus.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase + TL… in Cpqfc_initHBAdata()
121cpqfcHBAdata->fcChip.Registers.rcv_al_pa.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase + T… in Cpqfc_initHBAdata()
122cpqfcHBAdata->fcChip.Registers.ed_tov.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase + TL_M… in Cpqfc_initHBAdata()
125cpqfcHBAdata->fcChip.Registers.INTEN.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase + IINTE… in Cpqfc_initHBAdata()
126cpqfcHBAdata->fcChip.Registers.INTPEND.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase + IIN… in Cpqfc_initHBAdata()
127cpqfcHBAdata->fcChip.Registers.INTSTAT.address = cpqfcHBAdata->fcChip.Registers.ReMapMemBase + IIN… in Cpqfc_initHBAdata()
130 DEBUG_PCI(printk(" IOBaseL = %x\n", cpqfcHBAdata->fcChip.Registers.IOBaseL)); in Cpqfc_initHBAdata()
131 DEBUG_PCI(printk(" IOBaseU = %x\n", cpqfcHBAdata->fcChip.Registers.IOBaseU)); in Cpqfc_initHBAdata()
133 printk(" ioremap'd Membase: %p\n", cpqfcHBAdata->fcChip.Registers.ReMapMemBase); in Cpqfc_initHBAdata()
135 …DEBUG_PCI(printk(" SFQconsumerIndex.address = %p\n", cpqfcHBAdata->fcChip.Registers.SFQconsumer… in Cpqfc_initHBAdata()
136 …DEBUG_PCI(printk(" ERQproducerIndex.address = %p\n", cpqfcHBAdata->fcChip.Registers.ERQproducer… in Cpqfc_initHBAdata()
137 DEBUG_PCI(printk(" TYconfig.address = %p\n", cpqfcHBAdata->fcChip.Registers.TYconfig.address)); in Cpqfc_initHBAdata()
138 DEBUG_PCI(printk(" FMconfig.address = %p\n", cpqfcHBAdata->fcChip.Registers.FMconfig.address)); in Cpqfc_initHBAdata()
139 …DEBUG_PCI(printk(" FMcontrol.address = %p\n", cpqfcHBAdata->fcChip.Registers.FMcontrol.address)… in Cpqfc_initHBAdata()
142 cpqfcHBAdata->fcChip.Options.initiator = 1; // default: SCSI initiator in Cpqfc_initHBAdata()
143 cpqfcHBAdata->fcChip.Options.target = 0; // default: SCSI target in Cpqfc_initHBAdata()
144 cpqfcHBAdata->fcChip.Options.extLoopback = 0; // default: no loopback @GBIC in Cpqfc_initHBAdata()
145 cpqfcHBAdata->fcChip.Options.intLoopback = 0; // default: no loopback inside chip in Cpqfc_initHBAdata()
149 cpqfcHBAdata->fcChip.highest_FCPH_ver = FC_PH3; in Cpqfc_initHBAdata()
150 cpqfcHBAdata->fcChip.lowest_FCPH_ver = FC_PH43; in Cpqfc_initHBAdata()
153 cpqfcHBAdata->fcChip.ResetTachyon = CpqTsResetTachLite; in Cpqfc_initHBAdata()
154 cpqfcHBAdata->fcChip.FreezeTachyon = CpqTsFreezeTachlite; in Cpqfc_initHBAdata()
155 cpqfcHBAdata->fcChip.UnFreezeTachyon = CpqTsUnFreezeTachlite; in Cpqfc_initHBAdata()
156 cpqfcHBAdata->fcChip.CreateTachyonQues = CpqTsCreateTachLiteQues; in Cpqfc_initHBAdata()
157 cpqfcHBAdata->fcChip.DestroyTachyonQues = CpqTsDestroyTachLiteQues; in Cpqfc_initHBAdata()
158 cpqfcHBAdata->fcChip.InitializeTachyon = CpqTsInitializeTachLite; in Cpqfc_initHBAdata()
159 cpqfcHBAdata->fcChip.LaserControl = CpqTsLaserControl; in Cpqfc_initHBAdata()
160 cpqfcHBAdata->fcChip.ProcessIMQEntry = CpqTsProcessIMQEntry; in Cpqfc_initHBAdata()
161 cpqfcHBAdata->fcChip.InitializeFrameManager = CpqTsInitializeFrameManager;; in Cpqfc_initHBAdata()
162 cpqfcHBAdata->fcChip.ReadWriteWWN = CpqTsReadWriteWWN; in Cpqfc_initHBAdata()
163 cpqfcHBAdata->fcChip.ReadWriteNVRAM = CpqTsReadWriteNVRAM; in Cpqfc_initHBAdata()
175 CPQFCHBA *cpqfcHBAdata = (CPQFCHBA *) HostAdapter->hostdata; in launch_FCworker_thread() local
179 cpqfcHBAdata->notify_wt = &sem; in launch_FCworker_thread()
190 cpqfcHBAdata->notify_wt = NULL; in launch_FCworker_thread()
223 CPQFCHBA *cpqfcHBAdata = NULL; in cpqfcTS_detect() local
286 cpqfcHBAdata = (CPQFCHBA *) HostAdapter->hostdata; in cpqfcTS_detect()
289 memset(cpqfcHBAdata, 0, sizeof(CPQFCHBA)); in cpqfcTS_detect()
293 cpqfcHBAdata->HBAnum = NumberOfAdapters; in cpqfcTS_detect()
295 cpqfcHBAdata->HostAdapter = HostAdapter; // back ptr in cpqfcTS_detect()
296 Cpqfc_initHBAdata(cpqfcHBAdata, PciDev); // fill MOST fields in cpqfcTS_detect()
298 cpqfcHBAdata->HBAnum = NumberOfAdapters; in cpqfcTS_detect()
299 cpqfcHBAdata->hba_spinlock = SPIN_LOCK_UNLOCKED; in cpqfcTS_detect()
309 if (check_region(cpqfcHBAdata->fcChip.Registers.IOBaseU, 0xff)) { in cpqfcTS_detect()
310 printk(" cpqfcTS address in use: %x\n", cpqfcHBAdata->fcChip.Registers.IOBaseU); in cpqfcTS_detect()
316 if (check_region(cpqfcHBAdata->fcChip.Registers.IOBaseL, 0xff)) { in cpqfcTS_detect()
317 printk(" cpqfcTS address in use: %x\n", cpqfcHBAdata->fcChip.Registers.IOBaseL); in cpqfcTS_detect()
323 request_region(cpqfcHBAdata->fcChip.Registers.IOBaseL, 0xff, DEV_NAME); in cpqfcTS_detect()
324 request_region(cpqfcHBAdata->fcChip.Registers.IOBaseU, 0xff, DEV_NAME); in cpqfcTS_detect()
325 …DEBUG_PCI(printk(" Requesting 255 I/O addresses @ %x\n", cpqfcHBAdata->fcChip.Registers.IOBaseL)); in cpqfcTS_detect()
326 …DEBUG_PCI(printk(" Requesting 255 I/O addresses @ %x\n", cpqfcHBAdata->fcChip.Registers.IOBaseU)); in cpqfcTS_detect()
336 cpqfcTStimer = &cpqfcHBAdata->cpqfcTStimer; in cpqfcTS_detect()
340 cpqfcTStimer->data = (unsigned long) cpqfcHBAdata; // this adapter in cpqfcTS_detect()
347 if (cpqfcHBAdata->fcChip.InitializeTachyon(cpqfcHBAdata, 1, 1)) { in cpqfcTS_detect()
352 cpqfcHBAdata->fcStatsTime = jiffies; // (for FC Statistics delta) in cpqfcTS_detect()
404 CPQFCHBA *cpqfcHBAdata = (CPQFCHBA *) HostAdapter->hostdata; in cpqfcTS_ioctl() local
405 PTACHYON fcChip = &cpqfcHBAdata->fcChip; in cpqfcTS_ioctl()
556 pciinfo.bus = cpqfcHBAdata->PciDev->bus->number; in cpqfcTS_ioctl()
557 pciinfo.dev_fn = cpqfcHBAdata->PciDev->devfn; in cpqfcTS_ioctl()
558 pciinfo.board_id = cpqfcHBAdata->PciDev->device | (cpqfcHBAdata->PciDev->vendor << 16); in cpqfcTS_ioctl()
619 CPQFCHBA *cpqfcHBAdata = (CPQFCHBA *) HostAdapter->hostdata; in cpqfcTS_release() local
625 del_timer(&cpqfcHBAdata->cpqfcTStimer); in cpqfcTS_release()
629 cpqfcHBAdata->fcChip.ResetTachyon(cpqfcHBAdata, CLEAR_FCPORTS); in cpqfcTS_release()
632 if (cpqfcHBAdata->worker_thread) // (only if exists) in cpqfcTS_release()
636 cpqfcHBAdata->notify_wt = &sem; in cpqfcTS_release()
638 send_sig(SIGKILL, cpqfcHBAdata->worker_thread, 1); in cpqfcTS_release()
640 cpqfcHBAdata->notify_wt = NULL; in cpqfcTS_release()
647 release_region(cpqfcHBAdata->fcChip.Registers.IOBaseL, 0xff); in cpqfcTS_release()
648 release_region(cpqfcHBAdata->fcChip.Registers.IOBaseU, 0xff); in cpqfcTS_release()
1029 static void QueCmndOnBoardLock(CPQFCHBA * cpqfcHBAdata, Scsi_Cmnd * Cmnd) in QueCmndOnBoardLock() argument
1034 if (cpqfcHBAdata->BoardLockCmnd[i] == NULL) { in QueCmndOnBoardLock()
1035 cpqfcHBAdata->BoardLockCmnd[i] = Cmnd; in QueCmndOnBoardLock()
1048 static void QueLinkDownCmnd(CPQFCHBA * cpqfcHBAdata, Scsi_Cmnd * Cmnd) in QueLinkDownCmnd() argument
1056 if (cpqfcHBAdata->LinkDnCmnd[indx] == NULL) // available? in QueLinkDownCmnd()
1061 cpqfcHBAdata->LinkDnCmnd[indx] = Cmnd; in QueLinkDownCmnd()
1083 static void QueBadTargetCmnd(CPQFCHBA * cpqfcHBAdata, Scsi_Cmnd * Cmnd) in QueBadTargetCmnd() argument
1089 if (cpqfcHBAdata->BadTargetCmnd[i] == NULL) { in QueBadTargetCmnd()
1090 cpqfcHBAdata->BadTargetCmnd[i] = Cmnd; in QueBadTargetCmnd()
1105 CPQFCHBA *cpqfcHBAdata = (CPQFCHBA *) HostAdapter->hostdata; in cpqfcTS_queuecommand() local
1106 PTACHYON fcChip = &cpqfcHBAdata->fcChip; in cpqfcTS_queuecommand()
1127 if (cpqfcHBAdata->BoardLock) { in cpqfcTS_queuecommand()
1129 QueCmndOnBoardLock(cpqfcHBAdata, Cmnd); in cpqfcTS_queuecommand()
1143 CPQ_SPINLOCK_HBA(cpqfcHBAdata) in cpqfcTS_queuecommand()
1154 QueBadTargetCmnd(cpqfcHBAdata, Cmnd); in cpqfcTS_queuecommand()
1157 QueBadTargetCmnd(cpqfcHBAdata, Cmnd); in cpqfcTS_queuecommand()
1168 QueBadTargetCmnd(cpqfcHBAdata, Cmnd); in cpqfcTS_queuecommand()
1181 QueLinkDownCmnd(cpqfcHBAdata, Cmnd); in cpqfcTS_queuecommand()
1198 ulStatus = cpqfcTSBuildExchange(cpqfcHBAdata, SESTtype, // e.g. Initiator Read Entry (IRE) in cpqfcTS_queuecommand()
1206 if (cpqfcHBAdata->BoardLock) { in cpqfcTS_queuecommand()
1211 ulStatus = cpqfcTSStartExchange(cpqfcHBAdata, ExchangeID); in cpqfcTS_queuecommand()
1232 CPQ_SPINUNLOCK_HBA(cpqfcHBAdata) in cpqfcTS_queuecommand()
1263 CPQFCHBA *cpqfcHBAdata = (CPQFCHBA *) HostAdapter->hostdata; in cpqfcTS_eh_abort() local
1264 PTACHYON fcChip = &cpqfcHBAdata->fcChip; in cpqfcTS_eh_abort()
1298 cpqfcTSPutLinkQue(cpqfcHBAdata, BLS_ABTS, &i); in cpqfcTS_eh_abort()
1311 if (cpqfcHBAdata->BadTargetCmnd[i] == Cmnd) { in cpqfcTS_eh_abort()
1312 cpqfcHBAdata->BadTargetCmnd[i] = NULL; in cpqfcTS_eh_abort()
1321 if (cpqfcHBAdata->LinkDnCmnd[i] == Cmnd) { in cpqfcTS_eh_abort()
1322 cpqfcHBAdata->LinkDnCmnd[i] = NULL; in cpqfcTS_eh_abort()
1330 if (cpqfcHBAdata->BoardLockCmnd[i] == Cmnd) { in cpqfcTS_eh_abort()
1331 cpqfcHBAdata->BoardLockCmnd[i] = NULL; in cpqfcTS_eh_abort()