Lines Matching +full:host +full:- +full:command
4 Linux Driver for BusLogic MultiMaster and FlashPoint SCSI Host Adapters
6 Copyright 1995-1998 by Leonard N. Zubkoff <lnz@dandelion.com>
20 Special thanks to Wayne Yen, Jin-Lon Hon, and Alex Win of BusLogic, whose
44 #include <linux/dma-mapping.h>
60 #define FAILURE (-1)
67 Options specifications provided via the Linux Kernel Command Line or via
76 BusLogic Driver Options specifications provided via the Linux Kernel Command
96 all BusLogic Host Adapters.
104 all BusLogic Host Adapters.
120 to be checked for potential BusLogic Host Adapters. It is initialized by
130 call to blogic_cmd failed. It is only non-NULL when blogic_cmd
144 blogic_announce("Copyright 1995-1998 by Leonard N. Zubkoff " "<lnz@dandelion.com>\n", adapter); in blogic_announce_drvr()
149 blogic_drvr_info returns the Host Adapter Name to identify this SCSI
150 Driver and Host Adapter.
153 static const char *blogic_drvr_info(struct Scsi_Host *host) in blogic_drvr_info() argument
156 (struct blogic_adapter *) host->hostdata; in blogic_drvr_info()
157 return adapter->full_model; in blogic_drvr_info()
161 blogic_init_ccbs initializes a group of Command Control Blocks (CCBs)
162 for Host Adapter from the blk_size bytes located at blk_pointer. The newly
163 created CCBs are added to Host Adapter's free list.
172 ccb->allocgrp_head = blkp; in blogic_init_ccbs()
173 ccb->allocgrp_size = blk_size; in blogic_init_ccbs()
174 while ((blk_size -= sizeof(struct blogic_ccb)) >= 0) { in blogic_init_ccbs()
175 ccb->status = BLOGIC_CCB_FREE; in blogic_init_ccbs()
176 ccb->adapter = adapter; in blogic_init_ccbs()
177 ccb->dma_handle = (u32) blkp + offset; in blogic_init_ccbs()
179 ccb->callback = blogic_qcompleted_ccb; in blogic_init_ccbs()
180 ccb->base_addr = adapter->fpinfo.base_addr; in blogic_init_ccbs()
182 ccb->next = adapter->free_ccbs; in blogic_init_ccbs()
183 ccb->next_all = adapter->all_ccbs; in blogic_init_ccbs()
184 adapter->free_ccbs = ccb; in blogic_init_ccbs()
185 adapter->all_ccbs = ccb; in blogic_init_ccbs()
186 adapter->alloc_ccbs++; in blogic_init_ccbs()
194 blogic_create_initccbs allocates the initial CCBs for Host Adapter.
203 while (adapter->alloc_ccbs < adapter->initccbs) { in blogic_create_initccbs()
204 blk_pointer = pci_alloc_consistent(adapter->pci_device, in blogic_create_initccbs()
207 blogic_err("UNABLE TO ALLOCATE CCB GROUP - DETACHING\n", in blogic_create_initccbs()
218 blogic_destroy_ccbs deallocates the CCBs for Host Adapter.
223 struct blogic_ccb *next_ccb = adapter->all_ccbs, *ccb, *lastccb = NULL; in blogic_destroy_ccbs()
224 adapter->all_ccbs = NULL; in blogic_destroy_ccbs()
225 adapter->free_ccbs = NULL; in blogic_destroy_ccbs()
227 next_ccb = ccb->next_all; in blogic_destroy_ccbs()
228 if (ccb->allocgrp_head) { in blogic_destroy_ccbs()
230 pci_free_consistent(adapter->pci_device, in blogic_destroy_ccbs()
231 lastccb->allocgrp_size, lastccb, in blogic_destroy_ccbs()
232 lastccb->allocgrp_head); in blogic_destroy_ccbs()
237 pci_free_consistent(adapter->pci_device, lastccb->allocgrp_size, in blogic_destroy_ccbs()
238 lastccb, lastccb->allocgrp_head); in blogic_destroy_ccbs()
243 blogic_create_addlccbs allocates Additional CCBs for Host Adapter. If
246 multiple host adapters share the same IRQ Channel.
253 int prev_alloc = adapter->alloc_ccbs; in blogic_create_addlccbs()
258 while (adapter->alloc_ccbs - prev_alloc < addl_ccbs) { in blogic_create_addlccbs()
259 blk_pointer = pci_alloc_consistent(adapter->pci_device, in blogic_create_addlccbs()
265 if (adapter->alloc_ccbs > prev_alloc) { in blogic_create_addlccbs()
267 …ated %d additional CCBs (total now %d)\n", adapter, adapter->alloc_ccbs - prev_alloc, adapter->all… in blogic_create_addlccbs()
271 if (adapter->drvr_qdepth > adapter->alloc_ccbs - adapter->tgt_count) { in blogic_create_addlccbs()
272 adapter->drvr_qdepth = adapter->alloc_ccbs - adapter->tgt_count; in blogic_create_addlccbs()
273 adapter->scsi_host->can_queue = adapter->drvr_qdepth; in blogic_create_addlccbs()
278 blogic_alloc_ccb allocates a CCB from Host Adapter's free list,
279 allocating more memory from the Kernel if necessary. The Host Adapter's
287 ccb = adapter->free_ccbs; in blogic_alloc_ccb()
289 ccb->serial = ++serial; in blogic_alloc_ccb()
290 adapter->free_ccbs = ccb->next; in blogic_alloc_ccb()
291 ccb->next = NULL; in blogic_alloc_ccb()
292 if (adapter->free_ccbs == NULL) in blogic_alloc_ccb()
293 blogic_create_addlccbs(adapter, adapter->inc_ccbs, in blogic_alloc_ccb()
297 blogic_create_addlccbs(adapter, adapter->inc_ccbs, true); in blogic_alloc_ccb()
298 ccb = adapter->free_ccbs; in blogic_alloc_ccb()
301 ccb->serial = ++serial; in blogic_alloc_ccb()
302 adapter->free_ccbs = ccb->next; in blogic_alloc_ccb()
303 ccb->next = NULL; in blogic_alloc_ccb()
309 blogic_dealloc_ccb deallocates a CCB, returning it to the Host Adapter's
310 free list. The Host Adapter's Lock should already have been acquired by the
316 struct blogic_adapter *adapter = ccb->adapter; in blogic_dealloc_ccb()
318 if (ccb->command != NULL) in blogic_dealloc_ccb()
319 scsi_dma_unmap(ccb->command); in blogic_dealloc_ccb()
321 pci_unmap_single(adapter->pci_device, ccb->sensedata, in blogic_dealloc_ccb()
322 ccb->sense_datalen, PCI_DMA_FROMDEVICE); in blogic_dealloc_ccb()
324 ccb->command = NULL; in blogic_dealloc_ccb()
325 ccb->status = BLOGIC_CCB_FREE; in blogic_dealloc_ccb()
326 ccb->next = adapter->free_ccbs; in blogic_dealloc_ccb()
327 adapter->free_ccbs = ccb; in blogic_dealloc_ccb()
332 blogic_cmd sends the command opcode to adapter, optionally
338 the Host Adapter (including any discarded data); on failure, it returns
339 -1 if the command was invalid, or -2 if a timeout occurred.
341 blogic_cmd is called exclusively during host adapter detection and
343 access to the Host Adapter hardware is assumed. Once the host adapter and
344 driver are initialized, the only Host Adapter command that is issued is the
345 single byte Execute Mailbox Command operation code, which does not require
346 waiting for the Host Adapter Ready bit to be set in the Status Register.
366 must be disabled while issuing host adapter commands since a in blogic_cmd()
367 Command Complete interrupt could occur if the IRQ Channel was in blogic_cmd()
368 previously enabled by another BusLogic Host Adapter or another in blogic_cmd()
371 if (!adapter->irq_acquired) in blogic_cmd()
374 Wait for the Host Adapter Ready bit to be set and the in blogic_cmd()
375 Command/Parameter Register Busy bit to be reset in the Status in blogic_cmd()
379 while (--timeout >= 0) { in blogic_cmd()
387 "Timeout waiting for Host Adapter Ready"; in blogic_cmd()
388 result = -2; in blogic_cmd()
392 Write the opcode to the Command/Parameter Register. in blogic_cmd()
394 adapter->adapter_cmd_complete = false; in blogic_cmd()
400 while (paramlen > 0 && --timeout >= 0) { in blogic_cmd()
402 Wait 100 microseconds to give the Host Adapter enough in blogic_cmd()
404 Command/Parameter Register was valid or not. If the in blogic_cmd()
405 Command Complete bit is set in the Interrupt Register, in blogic_cmd()
406 then the Command Invalid bit in the Status Register will in blogic_cmd()
408 and the command has completed, or set if the Operation in blogic_cmd()
412 back from the Host Adapter. Otherwise, wait for the in blogic_cmd()
413 Command/Parameter Register Busy bit in the Status in blogic_cmd()
421 if (adapter->adapter_cmd_complete) in blogic_cmd()
428 paramlen--; in blogic_cmd()
433 result = -2; in blogic_cmd()
437 The Modify I/O Address command does not cause a Command Complete in blogic_cmd()
445 result = -1; in blogic_cmd()
454 Select an appropriate timeout value for awaiting command completion. in blogic_cmd()
469 Receive any Reply Bytes, waiting for either the Command in blogic_cmd()
471 Interrupt Handler to set the Host Adapter Command Completed in blogic_cmd()
472 bit in the Host Adapter structure. in blogic_cmd()
474 while (--timeout >= 0) { in blogic_cmd()
479 if (adapter->adapter_cmd_complete) in blogic_cmd()
494 "Timeout waiting for Command Complete"; in blogic_cmd()
495 result = -2; in blogic_cmd()
499 Clear any pending Command Complete Interrupt. in blogic_cmd()
518 Process Command Invalid conditions. in blogic_cmd()
522 Some early BusLogic Host Adapters may not recover in blogic_cmd()
523 properly from a Command Invalid condition, so if this in blogic_cmd()
525 Host Adapter. Potentially invalid commands are never in blogic_cmd()
527 so there should be no Host Adapter state lost by a in blogic_cmd()
528 Soft Reset in response to a Command Invalid condition. in blogic_cmd()
542 blogic_cmd_failure_reason = "Command Invalid"; in blogic_cmd()
543 result = -1; in blogic_cmd()
551 result = -1; in blogic_cmd()
555 Indicate the command completed successfully. in blogic_cmd()
563 if (!adapter->irq_acquired) in blogic_cmd()
572 Host Adapters.
581 probeinfo->adapter_type = BLOGIC_MULTIMASTER; in blogic_add_probeaddr_isa()
582 probeinfo->adapter_bus_type = BLOGIC_ISA_BUS; in blogic_add_probeaddr_isa()
583 probeinfo->io_addr = io_addr; in blogic_add_probeaddr_isa()
584 probeinfo->pci_device = NULL; in blogic_add_probeaddr_isa()
590 Bus Probe Information to be checked for potential BusLogic SCSI Host Adapters
631 int last_exchange = probeinfo_cnt - 1, bound, j; in blogic_sort_probeinfo()
641 if (probeinfo1->bus > probeinfo2->bus || in blogic_sort_probeinfo()
642 (probeinfo1->bus == probeinfo2->bus && in blogic_sort_probeinfo()
643 (probeinfo1->dev > probeinfo2->dev))) { in blogic_sort_probeinfo()
662 SCSI Host Adapters by interrogating the PCI Configuration Space on PCI
664 I/O Addresses. It returns the number of PCI MultiMaster Host Adapters found.
684 Iterate over the MultiMaster PCI Host Adapters. For each in blogic_init_mm_probeinfo()
685 enumerated host adapter, determine whether its ISA Compatible in blogic_init_mm_probeinfo()
687 Primary I/O Address. A host adapter that is assigned the in blogic_init_mm_probeinfo()
689 The MultiMaster BIOS will first recognize a host adapter at in blogic_init_mm_probeinfo()
690 the Primary I/O Address, then any other PCI host adapters, in blogic_init_mm_probeinfo()
691 and finally any host adapters located at the remaining in blogic_init_mm_probeinfo()
692 standard ISA I/O Addresses. When a PCI host adapter is found in blogic_init_mm_probeinfo()
693 with its ISA Compatible I/O Port enabled, a command is issued in blogic_init_mm_probeinfo()
697 pr_probeinfo->io_addr = 0; in blogic_init_mm_probeinfo()
718 bus = pci_device->bus->number; in blogic_init_mm_probeinfo()
719 device = pci_device->devfn >> 3; in blogic_init_mm_probeinfo()
720 irq_ch = pci_device->irq; in blogic_init_mm_probeinfo()
725 …blogic_err("BusLogic: Base Address0 0x%X not I/O for " "MultiMaster Host Adapter\n", NULL, base_ad… in blogic_init_mm_probeinfo()
730 …blogic_err("BusLogic: Base Address1 0x%X not Memory for " "MultiMaster Host Adapter\n", NULL, base… in blogic_init_mm_probeinfo()
735 blogic_err("BusLogic: IRQ Channel %d invalid for " "MultiMaster Host Adapter\n", NULL, irq_ch); in blogic_init_mm_probeinfo()
740 blogic_notice("BusLogic: PCI MultiMaster Host Adapter " "detected at\n", NULL); in blogic_init_mm_probeinfo()
744 Issue the Inquire PCI Host Adapter Information command to determine in blogic_init_mm_probeinfo()
749 host_adapter->io_addr = io_addr; in blogic_init_mm_probeinfo()
759 Issue the Modify I/O Address command to disable the in blogic_init_mm_probeinfo()
760 ISA Compatible I/O Port. On PCI Host Adapters, the in blogic_init_mm_probeinfo()
761 Modify I/O Address command allows modification of the in blogic_init_mm_probeinfo()
762 ISA compatible I/O Address that the Host Adapter in blogic_init_mm_probeinfo()
770 For the first MultiMaster Host Adapter enumerated, in blogic_init_mm_probeinfo()
771 issue the Fetch Host Adapter Local RAM command to read in blogic_init_mm_probeinfo()
774 Issue the Inquire Board ID command since this option is in blogic_init_mm_probeinfo()
775 only valid for the BT-948/958/958D. in blogic_init_mm_probeinfo()
796 Determine whether this MultiMaster Host Adapter has its in blogic_init_mm_probeinfo()
799 MultiMaster Host Adapter and must be recognized first. in blogic_init_mm_probeinfo()
801 after any Primary MultiMaster Host Adapter is probed. in blogic_init_mm_probeinfo()
804 pr_probeinfo->adapter_type = BLOGIC_MULTIMASTER; in blogic_init_mm_probeinfo()
805 pr_probeinfo->adapter_bus_type = BLOGIC_PCI_BUS; in blogic_init_mm_probeinfo()
806 pr_probeinfo->io_addr = io_addr; in blogic_init_mm_probeinfo()
807 pr_probeinfo->pci_addr = pci_addr; in blogic_init_mm_probeinfo()
808 pr_probeinfo->bus = bus; in blogic_init_mm_probeinfo()
809 pr_probeinfo->dev = device; in blogic_init_mm_probeinfo()
810 pr_probeinfo->irq_ch = irq_ch; in blogic_init_mm_probeinfo()
811 pr_probeinfo->pci_device = pci_dev_get(pci_device); in blogic_init_mm_probeinfo()
816 probeinfo->adapter_type = BLOGIC_MULTIMASTER; in blogic_init_mm_probeinfo()
817 probeinfo->adapter_bus_type = BLOGIC_PCI_BUS; in blogic_init_mm_probeinfo()
818 probeinfo->io_addr = io_addr; in blogic_init_mm_probeinfo()
819 probeinfo->pci_addr = pci_addr; in blogic_init_mm_probeinfo()
820 probeinfo->bus = bus; in blogic_init_mm_probeinfo()
821 probeinfo->dev = device; in blogic_init_mm_probeinfo()
822 probeinfo->irq_ch = irq_ch; in blogic_init_mm_probeinfo()
823 probeinfo->pci_device = pci_dev_get(pci_device); in blogic_init_mm_probeinfo()
827 blogic_warn("BusLogic: Too many Host Adapters " "detected\n", NULL); in blogic_init_mm_probeinfo()
831 option is ON for the first enumerated MultiMaster Host Adapter, in blogic_init_mm_probeinfo()
832 and if that host adapter is a BT-948/958/958D, then the in blogic_init_mm_probeinfo()
833 MultiMaster BIOS will recognize MultiMaster Host Adapters in in blogic_init_mm_probeinfo()
837 MultiMaster Host Adapters in the order they are enumerated by in blogic_init_mm_probeinfo()
844 If no PCI MultiMaster Host Adapter is assigned the Primary in blogic_init_mm_probeinfo()
846 explicitly before any PCI host adapters are probed. in blogic_init_mm_probeinfo()
849 if (pr_probeinfo->io_addr == 0 && in blogic_init_mm_probeinfo()
852 pr_probeinfo->adapter_type = BLOGIC_MULTIMASTER; in blogic_init_mm_probeinfo()
853 pr_probeinfo->adapter_bus_type = BLOGIC_ISA_BUS; in blogic_init_mm_probeinfo()
854 pr_probeinfo->io_addr = 0x330; in blogic_init_mm_probeinfo()
883 Iterate over the older non-compliant MultiMaster PCI Host Adapters, in blogic_init_mm_probeinfo()
901 bus = pci_device->bus->number; in blogic_init_mm_probeinfo()
902 device = pci_device->devfn >> 3; in blogic_init_mm_probeinfo()
903 irq_ch = pci_device->irq; in blogic_init_mm_probeinfo()
911 if (probeinfo->io_addr == io_addr && in blogic_init_mm_probeinfo()
912 probeinfo->adapter_type == BLOGIC_MULTIMASTER) { in blogic_init_mm_probeinfo()
913 probeinfo->adapter_bus_type = BLOGIC_PCI_BUS; in blogic_init_mm_probeinfo()
914 probeinfo->pci_addr = 0; in blogic_init_mm_probeinfo()
915 probeinfo->bus = bus; in blogic_init_mm_probeinfo()
916 probeinfo->dev = device; in blogic_init_mm_probeinfo()
917 probeinfo->irq_ch = irq_ch; in blogic_init_mm_probeinfo()
918 probeinfo->pci_device = pci_dev_get(pci_device); in blogic_init_mm_probeinfo()
930 Host Adapters by interrogating the PCI Configuration Space. It returns the
931 number of FlashPoint Host Adapters found.
939 Interrogate PCI Configuration Space for any FlashPoint Host Adapters. in blogic_init_fp_probeinfo()
958 bus = pci_device->bus->number; in blogic_init_fp_probeinfo()
959 device = pci_device->devfn >> 3; in blogic_init_fp_probeinfo()
960 irq_ch = pci_device->irq; in blogic_init_fp_probeinfo()
965 …blogic_err("BusLogic: Base Address0 0x%X not I/O for " "FlashPoint Host Adapter\n", NULL, base_add… in blogic_init_fp_probeinfo()
970 …blogic_err("BusLogic: Base Address1 0x%X not Memory for " "FlashPoint Host Adapter\n", NULL, base_… in blogic_init_fp_probeinfo()
975 blogic_err("BusLogic: IRQ Channel %d invalid for " "FlashPoint Host Adapter\n", NULL, irq_ch); in blogic_init_fp_probeinfo()
980 blogic_notice("BusLogic: FlashPoint Host Adapter " "detected at\n", NULL); in blogic_init_fp_probeinfo()
986 probeinfo->adapter_type = BLOGIC_FLASHPOINT; in blogic_init_fp_probeinfo()
987 probeinfo->adapter_bus_type = BLOGIC_PCI_BUS; in blogic_init_fp_probeinfo()
988 probeinfo->io_addr = io_addr; in blogic_init_fp_probeinfo()
989 probeinfo->pci_addr = pci_addr; in blogic_init_fp_probeinfo()
990 probeinfo->bus = bus; in blogic_init_fp_probeinfo()
991 probeinfo->dev = device; in blogic_init_fp_probeinfo()
992 probeinfo->irq_ch = irq_ch; in blogic_init_fp_probeinfo()
993 probeinfo->pci_device = pci_dev_get(pci_device); in blogic_init_fp_probeinfo()
996 blogic_warn("BusLogic: Too many Host Adapters " "detected\n", NULL); in blogic_init_fp_probeinfo()
998 …blogic_err("BusLogic: FlashPoint Host Adapter detected at " "PCI Bus %d Device %d\n", NULL, bus, d… in blogic_init_fp_probeinfo()
1004 The FlashPoint BIOS will scan for FlashPoint Host Adapters in the order of in blogic_init_fp_probeinfo()
1015 Probe Information to be checked for potential BusLogic SCSI Host Adapters by
1018 FlashPoint and PCI MultiMaster Host Adapters are present, this driver will
1019 probe for FlashPoint Host Adapters first unless the BIOS primary disk is
1020 controlled by the first PCI MultiMaster Host Adapter, in which case
1021 MultiMaster Host Adapters will be probed first. The BusLogic Driver Options
1030 FlashPoint Host Adapters; otherwise, default to the standard in blogic_init_probeinfo_list()
1050 while (probeinfo->adapter_bus_type != in blogic_init_probeinfo_list()
1053 myadapter->io_addr = probeinfo->io_addr; in blogic_init_probeinfo_list()
1065 PCI MultiMaster Host Adapter, then reverse in blogic_init_probeinfo_list()
1066 the probe order so that MultiMaster Host in blogic_init_probeinfo_list()
1067 Adapters are probed before FlashPoint Host in blogic_init_probeinfo_list()
1072 int mmcount = blogic_probeinfo_count - fpcount; in blogic_init_probeinfo_list()
1105 if (adapter->adapter_bus_type == BLOGIC_PCI_BUS) { in blogic_failure()
1106 blogic_err("While configuring BusLogic PCI Host Adapter at\n", in blogic_failure()
1108 …O Address 0x%X PCI Address 0x%X:\n", adapter, adapter->bus, adapter->dev, adapter->io_addr, adapte… in blogic_failure()
1110 …blogic_err("While configuring BusLogic Host Adapter at " "I/O Address 0x%X:\n", adapter, adapter->… in blogic_failure()
1111 blogic_err("%s FAILED - DETACHING\n", adapter, msg); in blogic_failure()
1113 blogic_err("ADDITIONAL FAILURE INFO - %s\n", adapter, in blogic_failure()
1120 blogic_probe probes for a BusLogic Host Adapter.
1129 FlashPoint Host Adapters are Probed by the FlashPoint SCCB Manager. in blogic_probe()
1132 struct fpoint_info *fpinfo = &adapter->fpinfo; in blogic_probe()
1133 fpinfo->base_addr = (u32) adapter->io_addr; in blogic_probe()
1134 fpinfo->irq_ch = adapter->irq_ch; in blogic_probe()
1135 fpinfo->present = false; in blogic_probe()
1137 fpinfo->present)) { in blogic_probe()
1138 …blogic_err("BusLogic: FlashPoint Host Adapter detected at " "PCI Bus %d Device %d\n", adapter, ada… in blogic_probe()
1139 …Address 0x%X PCI Address 0x%X, " "but FlashPoint\n", adapter, adapter->io_addr, adapter->pci_addr); in blogic_probe()
1144 blogic_notice("BusLogic_Probe(0x%X): FlashPoint Found\n", adapter, adapter->io_addr); in blogic_probe()
1146 Indicate the Host Adapter Probe completed successfully. in blogic_probe()
1153 BusLogic Host Adapter. A nonexistent I/O port will return 0xFF, in which in blogic_probe()
1154 case there is definitely no BusLogic Host Adapter at this base I/O Address. in blogic_probe()
1155 The test here is a subset of that used by the BusLogic Host Adapter BIOS. in blogic_probe()
1161 …X): Status 0x%02X, Interrupt 0x%02X, " "Geometry 0x%02X\n", adapter, adapter->io_addr, statusreg.a… in blogic_probe()
1168 an I/O port that responded. Adaptec Host Adapters do not in blogic_probe()
1173 later when the Inquire Extended Setup Information command is in blogic_probe()
1174 issued in blogic_checkadapter. The AMI FastDisk Host Adapter in blogic_probe()
1176 earlier BusLogic Host Adapters, including the undocumented in blogic_probe()
1185 Indicate the Host Adapter Probe completed successfully. in blogic_probe()
1192 blogic_hwreset issues a Hardware Reset to the Host Adapter
1193 and waits for Host Adapter Diagnostics to complete. If hard_reset is true, a
1195 Soft Reset is performed which only resets the Host Adapter without forcing a
1204 FlashPoint Host Adapters are Hard Reset by the FlashPoint in blogic_hwreset()
1208 struct fpoint_info *fpinfo = &adapter->fpinfo; in blogic_hwreset()
1209 fpinfo->softreset = !hard_reset; in blogic_hwreset()
1210 fpinfo->report_underrun = true; in blogic_hwreset()
1211 adapter->cardhandle = in blogic_hwreset()
1213 if (adapter->cardhandle == (void *)FPOINT_BADCARD_HANDLE) in blogic_hwreset()
1216 Indicate the Host Adapter Hard Reset completed successfully. in blogic_hwreset()
1221 Issue a Hard Reset or Soft Reset Command to the Host Adapter. in blogic_hwreset()
1222 The Host Adapter should respond by setting Diagnostic Active in in blogic_hwreset()
1233 while (--timeout >= 0) { in blogic_hwreset()
1240 …ardwareReset(0x%X): Diagnostic Active, " "Status 0x%02X\n", adapter, adapter->io_addr, statusreg.a… in blogic_hwreset()
1253 while (--timeout >= 0) { in blogic_hwreset()
1260 …wareReset(0x%X): Diagnostic Completed, " "Status 0x%02X\n", adapter, adapter->io_addr, statusreg.a… in blogic_hwreset()
1264 Wait until at least one of the Diagnostic Failure, Host Adapter in blogic_hwreset()
1268 while (--timeout >= 0) { in blogic_hwreset()
1276 …blogic_notice("BusLogic_HardwareReset(0x%X): Host Adapter Ready, " "Status 0x%02X\n", adapter, ada… in blogic_hwreset()
1280 If Diagnostic Failure is set or Host Adapter Ready is reset, in blogic_hwreset()
1281 then an error occurred during the Host Adapter diagnostics. in blogic_hwreset()
1288 blogic_err("HOST ADAPTER STATUS REGISTER = %02X\n", adapter, in blogic_hwreset()
1291 blogic_err("HOST ADAPTER ERROR CODE = %d\n", adapter, in blogic_hwreset()
1296 Indicate the Host Adapter Hard Reset completed successfully. in blogic_hwreset()
1304 Host Adapter.
1313 FlashPoint Host Adapters do not require this protection. in blogic_checkadapter()
1318 Issue the Inquire Extended Setup Information command. Only genuine in blogic_checkadapter()
1319 BusLogic Host Adapters and true clones support this command. in blogic_checkadapter()
1320 Adaptec 1542C series Host Adapters that respond to the Geometry in blogic_checkadapter()
1321 Register I/O port will fail this command. in blogic_checkadapter()
1333 adapter->io_addr, in blogic_checkadapter()
1341 from Host Adapter and initializes the Host Adapter structure.
1361 Configuration Information for FlashPoint Host Adapters is in blogic_rdconfig()
1364 Host Adapter structure from the fpoint_info structure. in blogic_rdconfig()
1367 struct fpoint_info *fpinfo = &adapter->fpinfo; in blogic_rdconfig()
1368 tgt = adapter->model; in blogic_rdconfig()
1371 *tgt++ = '-'; in blogic_rdconfig()
1372 for (i = 0; i < sizeof(fpinfo->model); i++) in blogic_rdconfig()
1373 *tgt++ = fpinfo->model[i]; in blogic_rdconfig()
1375 strcpy(adapter->fw_ver, FLASHPOINT_FW_VER); in blogic_rdconfig()
1376 adapter->scsi_id = fpinfo->scsi_id; in blogic_rdconfig()
1377 adapter->ext_trans_enable = fpinfo->ext_trans_enable; in blogic_rdconfig()
1378 adapter->parity = fpinfo->parity; in blogic_rdconfig()
1379 adapter->reset_enabled = !fpinfo->softreset; in blogic_rdconfig()
1380 adapter->level_int = true; in blogic_rdconfig()
1381 adapter->wide = fpinfo->wide; in blogic_rdconfig()
1382 adapter->differential = false; in blogic_rdconfig()
1383 adapter->scam = true; in blogic_rdconfig()
1384 adapter->ultra = true; in blogic_rdconfig()
1385 adapter->ext_lun = true; in blogic_rdconfig()
1386 adapter->terminfo_valid = true; in blogic_rdconfig()
1387 adapter->low_term = fpinfo->low_term; in blogic_rdconfig()
1388 adapter->high_term = fpinfo->high_term; in blogic_rdconfig()
1389 adapter->scam_enabled = fpinfo->scam_enabled; in blogic_rdconfig()
1390 adapter->scam_lev2 = fpinfo->scam_lev2; in blogic_rdconfig()
1391 adapter->drvr_sglimit = BLOGIC_SG_LIMIT; in blogic_rdconfig()
1392 adapter->maxdev = (adapter->wide ? 16 : 8); in blogic_rdconfig()
1393 adapter->maxlun = 32; in blogic_rdconfig()
1394 adapter->initccbs = 4 * BLOGIC_CCB_GRP_ALLOCSIZE; in blogic_rdconfig()
1395 adapter->inc_ccbs = BLOGIC_CCB_GRP_ALLOCSIZE; in blogic_rdconfig()
1396 adapter->drvr_qdepth = 255; in blogic_rdconfig()
1397 adapter->adapter_qdepth = adapter->drvr_qdepth; in blogic_rdconfig()
1398 adapter->sync_ok = fpinfo->sync_ok; in blogic_rdconfig()
1399 adapter->fast_ok = fpinfo->fast_ok; in blogic_rdconfig()
1400 adapter->ultra_ok = fpinfo->ultra_ok; in blogic_rdconfig()
1401 adapter->wide_ok = fpinfo->wide_ok; in blogic_rdconfig()
1402 adapter->discon_ok = fpinfo->discon_ok; in blogic_rdconfig()
1403 adapter->tagq_ok = 0xFFFF; in blogic_rdconfig()
1407 Issue the Inquire Board ID command. in blogic_rdconfig()
1413 Issue the Inquire Configuration command. in blogic_rdconfig()
1420 Issue the Inquire Setup Information command. in blogic_rdconfig()
1428 Issue the Inquire Extended Setup Information command. in blogic_rdconfig()
1437 Issue the Inquire Firmware Version 3rd Digit command. in blogic_rdconfig()
1447 Issue the Inquire Host Adapter Model Number command. in blogic_rdconfig()
1450 /* BusLogic BT-542B ISA 2.xx */ in blogic_rdconfig()
1455 /* BusLogic BT-742A EISA 2.1x or 2.20 */ in blogic_rdconfig()
1466 "INQUIRE HOST ADAPTER MODEL NUMBER"); in blogic_rdconfig()
1469 BusLogic MultiMaster Host Adapters can be identified by their in blogic_rdconfig()
1473 5.xx BusLogic "W" Series Host Adapters: in blogic_rdconfig()
1474 BT-948/958/958D in blogic_rdconfig()
1475 4.xx BusLogic "C" Series Host Adapters: in blogic_rdconfig()
1476 BT-946C/956C/956CD/747C/757C/757CD/445C/545C/540CF in blogic_rdconfig()
1477 3.xx BusLogic "S" Series Host Adapters: in blogic_rdconfig()
1478 BT-747S/747D/757S/757D/445S/545S/542D in blogic_rdconfig()
1479 BT-542B/742A (revision H) in blogic_rdconfig()
1480 2.xx BusLogic "A" Series Host Adapters: in blogic_rdconfig()
1481 BT-542B/742A (revision G and below) in blogic_rdconfig()
1482 0.xx AMI FastDisk VLB/EISA BusLogic Clone Host Adapter in blogic_rdconfig()
1485 Save the Model Name and Host Adapter Name in the Host Adapter in blogic_rdconfig()
1488 tgt = adapter->model; in blogic_rdconfig()
1491 *tgt++ = '-'; in blogic_rdconfig()
1500 Save the Firmware Version in the Host Adapter structure. in blogic_rdconfig()
1502 tgt = adapter->fw_ver; in blogic_rdconfig()
1510 Issue the Inquire Firmware Version Letter command. in blogic_rdconfig()
1512 if (strcmp(adapter->fw_ver, "3.3") >= 0) { in blogic_rdconfig()
1523 Save the Host Adapter SCSI ID in the Host Adapter structure. in blogic_rdconfig()
1525 adapter->scsi_id = config.id; in blogic_rdconfig()
1527 Determine the Bus Type and save it in the Host Adapter structure, in blogic_rdconfig()
1529 and save the DMA Channel for ISA Host Adapters. in blogic_rdconfig()
1531 adapter->adapter_bus_type = in blogic_rdconfig()
1532 blogic_adater_bus_types[adapter->model[3] - '4']; in blogic_rdconfig()
1533 if (adapter->irq_ch == 0) { in blogic_rdconfig()
1535 adapter->irq_ch = 9; in blogic_rdconfig()
1537 adapter->irq_ch = 10; in blogic_rdconfig()
1539 adapter->irq_ch = 11; in blogic_rdconfig()
1541 adapter->irq_ch = 12; in blogic_rdconfig()
1543 adapter->irq_ch = 14; in blogic_rdconfig()
1545 adapter->irq_ch = 15; in blogic_rdconfig()
1547 if (adapter->adapter_bus_type == BLOGIC_ISA_BUS) { in blogic_rdconfig()
1549 adapter->dma_ch = 5; in blogic_rdconfig()
1551 adapter->dma_ch = 6; in blogic_rdconfig()
1553 adapter->dma_ch = 7; in blogic_rdconfig()
1557 the Host Adapter structure. in blogic_rdconfig()
1560 adapter->ext_trans_enable = georeg.gr.ext_trans_enable; in blogic_rdconfig()
1564 Ultra SCSI flag in the Host Adapter structure. in blogic_rdconfig()
1566 adapter->adapter_sglimit = ext_setupinfo.sg_limit; in blogic_rdconfig()
1567 adapter->drvr_sglimit = adapter->adapter_sglimit; in blogic_rdconfig()
1568 if (adapter->adapter_sglimit > BLOGIC_SG_LIMIT) in blogic_rdconfig()
1569 adapter->drvr_sglimit = BLOGIC_SG_LIMIT; in blogic_rdconfig()
1571 adapter->level_int = true; in blogic_rdconfig()
1572 adapter->wide = ext_setupinfo.wide; in blogic_rdconfig()
1573 adapter->differential = ext_setupinfo.differential; in blogic_rdconfig()
1574 adapter->scam = ext_setupinfo.scam; in blogic_rdconfig()
1575 adapter->ultra = ext_setupinfo.ultra; in blogic_rdconfig()
1578 information in the Host Adapter structure. in blogic_rdconfig()
1580 if (adapter->fw_ver[0] == '5' || (adapter->fw_ver[0] == '4' && in blogic_rdconfig()
1581 adapter->wide)) in blogic_rdconfig()
1582 adapter->ext_lun = true; in blogic_rdconfig()
1584 Issue the Inquire PCI Host Adapter Information command to read the in blogic_rdconfig()
1585 Termination Information from "W" series MultiMaster Host Adapters. in blogic_rdconfig()
1587 if (adapter->fw_ver[0] == '5') { in blogic_rdconfig()
1592 "INQUIRE PCI HOST ADAPTER INFORMATION"); in blogic_rdconfig()
1594 Save the Termination Information in the Host Adapter in blogic_rdconfig()
1598 adapter->terminfo_valid = true; in blogic_rdconfig()
1599 adapter->low_term = adapter_info.low_term; in blogic_rdconfig()
1600 adapter->high_term = adapter_info.high_term; in blogic_rdconfig()
1604 Issue the Fetch Host Adapter Local RAM command to read the in blogic_rdconfig()
1605 AutoSCSI data from "W" and "C" series MultiMaster Host Adapters. in blogic_rdconfig()
1607 if (adapter->fw_ver[0] >= '4') { in blogic_rdconfig()
1614 "FETCH HOST ADAPTER LOCAL RAM"); in blogic_rdconfig()
1617 and Termination Information in the Host Adapter structure. in blogic_rdconfig()
1619 adapter->parity = autoscsi.parity; in blogic_rdconfig()
1620 adapter->reset_enabled = autoscsi.reset_enabled; in blogic_rdconfig()
1621 if (adapter->fw_ver[0] == '4') { in blogic_rdconfig()
1622 adapter->terminfo_valid = true; in blogic_rdconfig()
1623 adapter->low_term = autoscsi.low_term; in blogic_rdconfig()
1624 adapter->high_term = autoscsi.high_term; in blogic_rdconfig()
1629 SCAM Information in the Host Adapter structure. in blogic_rdconfig()
1631 adapter->wide_ok = autoscsi.wide_ok; in blogic_rdconfig()
1632 adapter->fast_ok = autoscsi.fast_ok; in blogic_rdconfig()
1633 adapter->sync_ok = autoscsi.sync_ok; in blogic_rdconfig()
1634 adapter->discon_ok = autoscsi.discon_ok; in blogic_rdconfig()
1635 if (adapter->ultra) in blogic_rdconfig()
1636 adapter->ultra_ok = autoscsi.ultra_ok; in blogic_rdconfig()
1637 if (adapter->scam) { in blogic_rdconfig()
1638 adapter->scam_enabled = autoscsi.scam_enabled; in blogic_rdconfig()
1639 adapter->scam_lev2 = autoscsi.scam_lev2; in blogic_rdconfig()
1643 Initialize fields in the Host Adapter structure for "S" and "A" in blogic_rdconfig()
1644 series MultiMaster Host Adapters. in blogic_rdconfig()
1646 if (adapter->fw_ver[0] < '4') { in blogic_rdconfig()
1648 adapter->sync_ok = 0xFF; in blogic_rdconfig()
1649 if (adapter->adapter_bus_type == BLOGIC_EISA_BUS) { in blogic_rdconfig()
1651 adapter->fast_ok = 0xFF; in blogic_rdconfig()
1652 if (strcmp(adapter->model, "BT-757") == 0) in blogic_rdconfig()
1653 adapter->wide_ok = 0xFF; in blogic_rdconfig()
1656 adapter->discon_ok = 0xFF; in blogic_rdconfig()
1657 adapter->parity = setupinfo.parity; in blogic_rdconfig()
1658 adapter->reset_enabled = true; in blogic_rdconfig()
1662 supported by this driver for Wide and Narrow Host Adapters. in blogic_rdconfig()
1664 adapter->maxdev = (adapter->wide ? 16 : 8); in blogic_rdconfig()
1665 adapter->maxlun = (adapter->ext_lun ? 32 : 8); in blogic_rdconfig()
1674 not supported, then the Host Adapter must scan all the Outgoing in blogic_rdconfig()
1676 cause a substantial performance penalty. The host adapters in blogic_rdconfig()
1681 set to the Mailbox Count, rather than the Host Adapter Queue in blogic_rdconfig()
1686 192 BT-948/958/958D in blogic_rdconfig()
1687 100 BT-946C/956C/956CD/747C/757C/757CD/445C in blogic_rdconfig()
1688 50 BT-545C/540CF in blogic_rdconfig()
1689 30 BT-747S/747D/757S/757D/445S/545S/542D/542B/742A in blogic_rdconfig()
1691 if (adapter->fw_ver[0] == '5') in blogic_rdconfig()
1692 adapter->adapter_qdepth = 192; in blogic_rdconfig()
1693 else if (adapter->fw_ver[0] == '4') in blogic_rdconfig()
1694 adapter->adapter_qdepth = (adapter->adapter_bus_type != in blogic_rdconfig()
1697 adapter->adapter_qdepth = 30; in blogic_rdconfig()
1698 if (strcmp(adapter->fw_ver, "3.31") >= 0) { in blogic_rdconfig()
1699 adapter->strict_rr = true; in blogic_rdconfig()
1700 adapter->mbox_count = BLOGIC_MAX_MAILBOX; in blogic_rdconfig()
1702 adapter->strict_rr = false; in blogic_rdconfig()
1703 adapter->mbox_count = 32; in blogic_rdconfig()
1705 adapter->drvr_qdepth = adapter->mbox_count; in blogic_rdconfig()
1706 adapter->initccbs = 4 * BLOGIC_CCB_GRP_ALLOCSIZE; in blogic_rdconfig()
1707 adapter->inc_ccbs = BLOGIC_CCB_GRP_ALLOCSIZE; in blogic_rdconfig()
1710 all "W" series MultiMaster Host Adapters, on "C" series in blogic_rdconfig()
1711 MultiMaster Host Adapters with firmware version 4.22 and above, in blogic_rdconfig()
1712 and on "S" series MultiMaster Host Adapters with firmware version in blogic_rdconfig()
1715 adapter->tagq_ok = 0; in blogic_rdconfig()
1716 switch (adapter->fw_ver[0]) { in blogic_rdconfig()
1718 adapter->tagq_ok = 0xFFFF; in blogic_rdconfig()
1721 if (strcmp(adapter->fw_ver, "4.22") >= 0) in blogic_rdconfig()
1722 adapter->tagq_ok = 0xFFFF; in blogic_rdconfig()
1725 if (strcmp(adapter->fw_ver, "3.35") >= 0) in blogic_rdconfig()
1726 adapter->tagq_ok = 0xFFFF; in blogic_rdconfig()
1730 Determine the Host Adapter BIOS Address if the BIOS is enabled and in blogic_rdconfig()
1731 save it in the Host Adapter structure. The BIOS is disabled if the in blogic_rdconfig()
1734 adapter->bios_addr = ext_setupinfo.bios_addr << 12; in blogic_rdconfig()
1736 ISA Host Adapters require Bounce Buffers if there is more than in blogic_rdconfig()
1739 if (adapter->adapter_bus_type == BLOGIC_ISA_BUS && in blogic_rdconfig()
1741 adapter->need_bouncebuf = true; in blogic_rdconfig()
1743 BusLogic BT-445S Host Adapters prior to board revision E have a in blogic_rdconfig()
1746 incorrectly. Only properly functioning BT-445S Host Adapters in blogic_rdconfig()
1748 be used for the buggy BT-445S models if there is more than 16MB in blogic_rdconfig()
1751 if (adapter->bios_addr > 0 && strcmp(adapter->model, "BT-445S") == 0 && in blogic_rdconfig()
1752 strcmp(adapter->fw_ver, "3.37") < 0 && in blogic_rdconfig()
1754 adapter->need_bouncebuf = true; in blogic_rdconfig()
1757 Host Adapters. in blogic_rdconfig()
1761 Initialize the Host Adapter Full Model Name from the Model Name. in blogic_rdconfig()
1763 strcpy(adapter->full_model, "BusLogic "); in blogic_rdconfig()
1764 strcat(adapter->full_model, adapter->model); in blogic_rdconfig()
1767 BusLogic Driver Options specification, or based on whether this Host in blogic_rdconfig()
1774 if (adapter->drvr_opts != NULL && in blogic_rdconfig()
1775 adapter->drvr_opts->qdepth[tgt_id] > 0) in blogic_rdconfig()
1776 qdepth = adapter->drvr_opts->qdepth[tgt_id]; in blogic_rdconfig()
1777 else if (adapter->need_bouncebuf) in blogic_rdconfig()
1779 adapter->qdepth[tgt_id] = qdepth; in blogic_rdconfig()
1781 if (adapter->need_bouncebuf) in blogic_rdconfig()
1782 adapter->untag_qdepth = BLOGIC_UNTAG_DEPTH_BB; in blogic_rdconfig()
1784 adapter->untag_qdepth = BLOGIC_UNTAG_DEPTH; in blogic_rdconfig()
1785 if (adapter->drvr_opts != NULL) in blogic_rdconfig()
1786 adapter->common_qdepth = adapter->drvr_opts->common_qdepth; in blogic_rdconfig()
1787 if (adapter->common_qdepth > 0 && in blogic_rdconfig()
1788 adapter->common_qdepth < adapter->untag_qdepth) in blogic_rdconfig()
1789 adapter->untag_qdepth = adapter->common_qdepth; in blogic_rdconfig()
1795 adapter->tagq_ok &= adapter->discon_ok; in blogic_rdconfig()
1800 if (adapter->drvr_opts != NULL) in blogic_rdconfig()
1801 adapter->tagq_ok = (adapter->drvr_opts->tagq_ok & in blogic_rdconfig()
1802 adapter->drvr_opts->tagq_ok_mask) | in blogic_rdconfig()
1803 (adapter->tagq_ok & ~adapter->drvr_opts->tagq_ok_mask); in blogic_rdconfig()
1810 if (adapter->drvr_opts != NULL && in blogic_rdconfig()
1811 adapter->drvr_opts->bus_settle_time > 0) in blogic_rdconfig()
1812 adapter->bus_settle_time = adapter->drvr_opts->bus_settle_time; in blogic_rdconfig()
1814 adapter->bus_settle_time = BLOGIC_BUS_SETTLE_TIME; in blogic_rdconfig()
1816 Indicate reading the Host Adapter Configuration completed in blogic_rdconfig()
1824 blogic_reportconfig reports the configuration of Host Adapter.
1829 unsigned short alltgt_mask = (1 << adapter->maxdev) - 1; in blogic_reportconfig()
1844 …Host Adapter\n", adapter, adapter->model, blogic_adapter_busnames[adapter->adapter_bus_type], (ada… in blogic_reportconfig()
1845 … 0x%X, " "IRQ Channel: %d/%s\n", adapter, adapter->fw_ver, adapter->io_addr, adapter->irq_ch, (ada… in blogic_reportconfig()
1846 if (adapter->adapter_bus_type != BLOGIC_PCI_BUS) { in blogic_reportconfig()
1848 if (adapter->dma_ch > 0) in blogic_reportconfig()
1849 blogic_info("%d, ", adapter, adapter->dma_ch); in blogic_reportconfig()
1852 if (adapter->bios_addr > 0) in blogic_reportconfig()
1854 adapter->bios_addr); in blogic_reportconfig()
1859 adapter->bus, adapter->dev); in blogic_reportconfig()
1860 if (adapter->pci_addr > 0) in blogic_reportconfig()
1861 blogic_info("0x%X, ", adapter, adapter->pci_addr); in blogic_reportconfig()
1865 blogic_info("Host Adapter SCSI ID: %d\n", adapter, adapter->scsi_id); in blogic_reportconfig()
1867 adapter, (adapter->parity ? "Enabled" : "Disabled"), in blogic_reportconfig()
1868 (adapter->ext_trans_enable ? "Enabled" : "Disabled")); in blogic_reportconfig()
1869 alltgt_mask &= ~(1 << adapter->scsi_id); in blogic_reportconfig()
1870 sync_ok = adapter->sync_ok & alltgt_mask; in blogic_reportconfig()
1871 fast_ok = adapter->fast_ok & alltgt_mask; in blogic_reportconfig()
1872 ultra_ok = adapter->ultra_ok & alltgt_mask; in blogic_reportconfig()
1874 (adapter->fw_ver[0] >= '4' || in blogic_reportconfig()
1875 adapter->adapter_bus_type == BLOGIC_EISA_BUS)) || in blogic_reportconfig()
1896 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_reportconfig()
1898 syncstr[adapter->scsi_id] = '#'; in blogic_reportconfig()
1899 syncstr[adapter->maxdev] = '\0'; in blogic_reportconfig()
1903 wide_ok = adapter->wide_ok & alltgt_mask; in blogic_reportconfig()
1909 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_reportconfig()
1911 widestr[adapter->scsi_id] = '#'; in blogic_reportconfig()
1912 widestr[adapter->maxdev] = '\0'; in blogic_reportconfig()
1914 discon_ok = adapter->discon_ok & alltgt_mask; in blogic_reportconfig()
1920 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_reportconfig()
1922 discon_str[adapter->scsi_id] = '#'; in blogic_reportconfig()
1923 discon_str[adapter->maxdev] = '\0'; in blogic_reportconfig()
1925 tagq_ok = adapter->tagq_ok & alltgt_mask; in blogic_reportconfig()
1931 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_reportconfig()
1933 tagq_str[adapter->scsi_id] = '#'; in blogic_reportconfig()
1934 tagq_str[adapter->maxdev] = '\0'; in blogic_reportconfig()
1941 … %d segments, " "Mailboxes: %d\n", adapter, adapter->drvr_sglimit, adapter->adapter_sglimit, adapt… in blogic_reportconfig()
1942 …ogic_info(" Driver Queue Depth: %d, " "Host Adapter Queue Depth: %d\n", adapter, adapter->drvr_qd… in blogic_reportconfig()
1944 …th: %d, " "Scatter/Gather Limit: %d segments\n", adapter, adapter->drvr_qdepth, adapter->drvr_sgli… in blogic_reportconfig()
1947 for (tgt_id = 1; tgt_id < adapter->maxdev; tgt_id++) in blogic_reportconfig()
1948 if (adapter->qdepth[tgt_id] != adapter->qdepth[0]) { in blogic_reportconfig()
1953 if (adapter->qdepth[0] > 0) in blogic_reportconfig()
1954 blogic_info("%d", adapter, adapter->qdepth[0]); in blogic_reportconfig()
1960 adapter->untag_qdepth); in blogic_reportconfig()
1961 if (adapter->terminfo_valid) { in blogic_reportconfig()
1962 if (adapter->wide) in blogic_reportconfig()
1964 …(adapter->low_term ? (adapter->high_term ? "Both Enabled" : "Low Enabled") : (adapter->high_term ?… in blogic_reportconfig()
1967 (adapter->low_term ? "Enabled" : "Disabled")); in blogic_reportconfig()
1968 if (adapter->scam) in blogic_reportconfig()
1970 …(adapter->scam_enabled ? (adapter->scam_lev2 ? "Enabled, Level 2" : "Enabled, Level 1") : "Disable… in blogic_reportconfig()
1974 Indicate reporting the Host Adapter configuration completed in blogic_reportconfig()
1983 Host Adapter.
1988 if (adapter->irq_ch == 0) { in blogic_getres()
1989 blogic_err("NO LEGAL INTERRUPT CHANNEL ASSIGNED - DETACHING\n", in blogic_getres()
1996 if (request_irq(adapter->irq_ch, blogic_inthandler, IRQF_SHARED, in blogic_getres()
1997 adapter->full_model, adapter) < 0) { in blogic_getres()
1998 blogic_err("UNABLE TO ACQUIRE IRQ CHANNEL %d - DETACHING\n", in blogic_getres()
1999 adapter, adapter->irq_ch); in blogic_getres()
2002 adapter->irq_acquired = true; in blogic_getres()
2006 if (adapter->dma_ch > 0) { in blogic_getres()
2007 if (request_dma(adapter->dma_ch, adapter->full_model) < 0) { in blogic_getres()
2008 blogic_err("UNABLE TO ACQUIRE DMA CHANNEL %d - DETACHING\n", adapter, adapter->dma_ch); in blogic_getres()
2011 set_dma_mode(adapter->dma_ch, DMA_MODE_CASCADE); in blogic_getres()
2012 enable_dma(adapter->dma_ch); in blogic_getres()
2013 adapter->dma_chan_acquired = true; in blogic_getres()
2032 if (adapter->irq_acquired) in blogic_relres()
2033 free_irq(adapter->irq_ch, adapter); in blogic_relres()
2037 if (adapter->dma_chan_acquired) in blogic_relres()
2038 free_dma(adapter->dma_ch); in blogic_relres()
2042 if (adapter->mbox_space) in blogic_relres()
2043 pci_free_consistent(adapter->pci_device, adapter->mbox_sz, in blogic_relres()
2044 adapter->mbox_space, adapter->mbox_space_handle); in blogic_relres()
2045 pci_dev_put(adapter->pci_device); in blogic_relres()
2046 adapter->mbox_space = NULL; in blogic_relres()
2047 adapter->mbox_space_handle = 0; in blogic_relres()
2048 adapter->mbox_sz = 0; in blogic_relres()
2053 blogic_initadapter initializes Host Adapter. This is the only
2054 function called during SCSI Host Adapter detection which modifies the state
2055 of the Host Adapter from its initial power on or hard reset state.
2069 adapter->firstccb = NULL; in blogic_initadapter()
2070 adapter->lastccb = NULL; in blogic_initadapter()
2074 Command Successful Flag, Active Commands, and Commands Since Reset in blogic_initadapter()
2077 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) { in blogic_initadapter()
2078 adapter->bdr_pend[tgt_id] = NULL; in blogic_initadapter()
2079 adapter->tgt_flags[tgt_id].tagq_active = false; in blogic_initadapter()
2080 adapter->tgt_flags[tgt_id].cmd_good = false; in blogic_initadapter()
2081 adapter->active_cmds[tgt_id] = 0; in blogic_initadapter()
2082 adapter->cmds_since_rst[tgt_id] = 0; in blogic_initadapter()
2086 FlashPoint Host Adapters do not use Outgoing and Incoming Mailboxes. in blogic_initadapter()
2094 …adapter->mbox_sz = adapter->mbox_count * (sizeof(struct blogic_outbox) + sizeof(struct blogic_inbo… in blogic_initadapter()
2095 adapter->mbox_space = pci_alloc_consistent(adapter->pci_device, in blogic_initadapter()
2096 adapter->mbox_sz, &adapter->mbox_space_handle); in blogic_initadapter()
2097 if (adapter->mbox_space == NULL) in blogic_initadapter()
2099 adapter->first_outbox = (struct blogic_outbox *) adapter->mbox_space; in blogic_initadapter()
2100 adapter->last_outbox = adapter->first_outbox + adapter->mbox_count - 1; in blogic_initadapter()
2101 adapter->next_outbox = adapter->first_outbox; in blogic_initadapter()
2102 adapter->first_inbox = (struct blogic_inbox *) (adapter->last_outbox + 1); in blogic_initadapter()
2103 adapter->last_inbox = adapter->first_inbox + adapter->mbox_count - 1; in blogic_initadapter()
2104 adapter->next_inbox = adapter->first_inbox; in blogic_initadapter()
2109 memset(adapter->first_outbox, 0, in blogic_initadapter()
2110 adapter->mbox_count * sizeof(struct blogic_outbox)); in blogic_initadapter()
2111 memset(adapter->first_inbox, 0, in blogic_initadapter()
2112 adapter->mbox_count * sizeof(struct blogic_inbox)); in blogic_initadapter()
2115 Initialize the Host Adapter's Pointer to the Outgoing/Incoming in blogic_initadapter()
2118 extmbox_req.mbox_count = adapter->mbox_count; in blogic_initadapter()
2119 extmbox_req.base_mbox_addr = (u32) adapter->mbox_space_handle; in blogic_initadapter()
2124 Enable Strict Round Robin Mode if supported by the Host Adapter. In in blogic_initadapter()
2125 Strict Round Robin Mode, the Host Adapter only looks at the next in blogic_initadapter()
2126 Outgoing Mailbox for each new command, rather than scanning in blogic_initadapter()
2131 if (adapter->strict_rr) { in blogic_initadapter()
2140 For Host Adapters that support Extended LUN Format CCBs, issue the in blogic_initadapter()
2141 Set CCB Format command to allow 32 Logical Units per Target Device. in blogic_initadapter()
2143 if (adapter->ext_lun) { in blogic_initadapter()
2154 if (!adapter->adapter_initd) { in blogic_initadapter()
2156 adapter->full_model); in blogic_initadapter()
2160 adapter->full_model); in blogic_initadapter()
2161 adapter->adapter_initd = true; in blogic_initadapter()
2164 Indicate the Host Adapter Initialization completed successfully. in blogic_initadapter()
2172 through Host Adapter.
2185 Wait a few seconds between the Host Adapter Hard Reset which in blogic_inquiry()
2190 blogic_delay(adapter->bus_settle_time); in blogic_inquiry()
2192 FlashPoint Host Adapters do not provide for Target Device Inquiry. in blogic_inquiry()
2199 if (adapter->drvr_opts != NULL && adapter->drvr_opts->stop_tgt_inquiry) in blogic_inquiry()
2202 Issue the Inquire Target Devices command for host adapters with in blogic_inquiry()
2204 ID 0 to 7 command for older host adapters. This is necessary to in blogic_inquiry()
2207 valid data. The Inquire Target Devices command is preferable to in blogic_inquiry()
2211 if (strcmp(adapter->fw_ver, "4.25") >= 0) { in blogic_inquiry()
2214 Issue a Inquire Target Devices command. Inquire Target in blogic_inquiry()
2217 Logical Units 0 - 7. Two bytes are returned, where byte in blogic_inquiry()
2225 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_inquiry()
2226 adapter->tgt_flags[tgt_id].tgt_exists = in blogic_inquiry()
2231 Issue an Inquire Installed Devices command. For each in blogic_inquiry()
2243 adapter->tgt_flags[tgt_id].tgt_exists = in blogic_inquiry()
2247 Issue the Inquire Setup Information command. in blogic_inquiry()
2254 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_inquiry()
2255 …adapter->sync_offset[tgt_id] = (tgt_id < 8 ? setupinfo.sync0to7[tgt_id].offset : setupinfo.sync8to… in blogic_inquiry()
2256 if (strcmp(adapter->fw_ver, "5.06L") >= 0) in blogic_inquiry()
2257 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_inquiry()
2258 …->tgt_flags[tgt_id].wide_active = (tgt_id < 8 ? (setupinfo.wide_tx_active0to7 & (1 << tgt_id) ? tr… in blogic_inquiry()
2260 Issue the Inquire Synchronous Period command. in blogic_inquiry()
2262 if (adapter->fw_ver[0] >= '3') { in blogic_inquiry()
2264 /* Issue a Inquire Synchronous Period command. For each in blogic_inquiry()
2275 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_inquiry()
2276 adapter->sync_period[tgt_id] = sync_period[tgt_id]; in blogic_inquiry()
2278 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_inquiry()
2280 adapter->sync_period[tgt_id] = 20 + 5 * setupinfo.sync0to7[tgt_id].tx_period; in blogic_inquiry()
2288 blogic_inithoststruct initializes the fields in the SCSI Host
2290 SCSI Host structure are intentionally left uninitialized, as this driver
2292 ensuring exclusive access to the Host Adapter hardware and data structures
2293 through explicit acquisition and release of the Host Adapter's Lock.
2297 struct Scsi_Host *host) in blogic_inithoststruct() argument
2299 host->max_id = adapter->maxdev; in blogic_inithoststruct()
2300 host->max_lun = adapter->maxlun; in blogic_inithoststruct()
2301 host->max_channel = 0; in blogic_inithoststruct()
2302 host->unique_id = adapter->io_addr; in blogic_inithoststruct()
2303 host->this_id = adapter->scsi_id; in blogic_inithoststruct()
2304 host->can_queue = adapter->drvr_qdepth; in blogic_inithoststruct()
2305 host->sg_tablesize = adapter->drvr_sglimit; in blogic_inithoststruct()
2306 host->unchecked_isa_dma = adapter->need_bouncebuf; in blogic_inithoststruct()
2307 host->cmd_per_lun = adapter->untag_qdepth; in blogic_inithoststruct()
2321 (struct blogic_adapter *) dev->host->hostdata; in blogic_slaveconfig()
2322 int tgt_id = dev->id; in blogic_slaveconfig()
2323 int qdepth = adapter->qdepth[tgt_id]; in blogic_slaveconfig()
2325 if (adapter->tgt_flags[tgt_id].tagq_ok && in blogic_slaveconfig()
2326 (adapter->tagq_ok & (1 << tgt_id))) { in blogic_slaveconfig()
2329 adapter->qdepth[tgt_id] = qdepth; in blogic_slaveconfig()
2332 adapter->tagq_ok &= ~(1 << tgt_id); in blogic_slaveconfig()
2333 qdepth = adapter->untag_qdepth; in blogic_slaveconfig()
2334 adapter->qdepth[tgt_id] = qdepth; in blogic_slaveconfig()
2338 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_slaveconfig()
2339 if (adapter->tgt_flags[tgt_id].tgt_exists) in blogic_slaveconfig()
2340 qdepth += adapter->qdepth[tgt_id]; in blogic_slaveconfig()
2341 if (qdepth > adapter->alloc_ccbs) in blogic_slaveconfig()
2342 blogic_create_addlccbs(adapter, qdepth - adapter->alloc_ccbs, in blogic_slaveconfig()
2348 blogic_init probes for BusLogic Host Adapters at the standard
2350 reporting the configuration of each BusLogic Host Adapter it finds. It
2351 returns the number of BusLogic Host Adapters successfully initialized and
2367 return -ENODEV; in blogic_init()
2374 return -ENOMEM; in blogic_init()
2380 blogic_err("BusLogic: Unable to allocate Prototype Host Adapter\n", NULL); in blogic_init()
2381 return -ENOMEM; in blogic_init()
2393 struct Scsi_Host *host; in blogic_init() local
2395 if (probeinfo->io_addr == 0) in blogic_init()
2398 myadapter->adapter_type = probeinfo->adapter_type; in blogic_init()
2399 myadapter->adapter_bus_type = probeinfo->adapter_bus_type; in blogic_init()
2400 myadapter->io_addr = probeinfo->io_addr; in blogic_init()
2401 myadapter->pci_addr = probeinfo->pci_addr; in blogic_init()
2402 myadapter->bus = probeinfo->bus; in blogic_init()
2403 myadapter->dev = probeinfo->dev; in blogic_init()
2404 myadapter->pci_device = probeinfo->pci_device; in blogic_init()
2405 myadapter->irq_ch = probeinfo->irq_ch; in blogic_init()
2406 myadapter->addr_count = in blogic_init()
2407 blogic_adapter_addr_count[myadapter->adapter_type]; in blogic_init()
2412 if (!request_region(myadapter->io_addr, myadapter->addr_count, in blogic_init()
2416 Probe the Host Adapter. If unsuccessful, abort further in blogic_init()
2420 release_region(myadapter->io_addr, in blogic_init()
2421 myadapter->addr_count); in blogic_init()
2425 Hard Reset the Host Adapter. If unsuccessful, abort further in blogic_init()
2429 release_region(myadapter->io_addr, in blogic_init()
2430 myadapter->addr_count); in blogic_init()
2434 Check the Host Adapter. If unsuccessful, abort further in blogic_init()
2438 release_region(myadapter->io_addr, in blogic_init()
2439 myadapter->addr_count); in blogic_init()
2446 myadapter->drvr_opts = in blogic_init()
2454 Register the SCSI Host structure. in blogic_init()
2457 host = scsi_host_alloc(&blogic_template, in blogic_init()
2459 if (host == NULL) { in blogic_init()
2460 release_region(myadapter->io_addr, in blogic_init()
2461 myadapter->addr_count); in blogic_init()
2464 myadapter = (struct blogic_adapter *) host->hostdata; in blogic_init()
2466 myadapter->scsi_host = host; in blogic_init()
2467 myadapter->host_no = host->host_no; in blogic_init()
2469 Add Host Adapter to the end of the list of registered in blogic_init()
2470 BusLogic Host Adapters. in blogic_init()
2472 list_add_tail(&myadapter->host_list, &blogic_host_list); in blogic_init()
2475 Read the Host Adapter Configuration, Configure the Host in blogic_init()
2477 the Host Adapter, then Create the Initial CCBs, Initialize in blogic_init()
2478 the Host Adapter, and finally perform Target Device in blogic_init()
2480 assumed to be due to a problem with the Host Adapter, in blogic_init()
2482 as belonging to a BusLogic Host Adapter. The I/O Address in blogic_init()
2484 being incorrectly identified as any other type of Host in blogic_init()
2495 Release and re-register usage of the I/O Address in blogic_init()
2496 range so that the Model Name of the Host Adapter in blogic_init()
2497 will appear, and initialize the SCSI Host structure. in blogic_init()
2499 release_region(myadapter->io_addr, in blogic_init()
2500 myadapter->addr_count); in blogic_init()
2501 if (!request_region(myadapter->io_addr, in blogic_init()
2502 myadapter->addr_count, in blogic_init()
2503 myadapter->full_model)) { in blogic_init()
2505 "BusLogic: Release and re-register of " in blogic_init()
2507 (unsigned long)myadapter->io_addr); in blogic_init()
2510 list_del(&myadapter->host_list); in blogic_init()
2511 scsi_host_put(host); in blogic_init()
2512 ret = -ENOMEM; in blogic_init()
2515 host); in blogic_init()
2516 if (scsi_add_host(host, myadapter->pci_device in blogic_init()
2517 ? &myadapter->pci_device->dev in blogic_init()
2524 list_del(&myadapter->host_list); in blogic_init()
2525 scsi_host_put(host); in blogic_init()
2526 ret = -ENODEV; in blogic_init()
2528 scsi_scan_host(host); in blogic_init()
2534 An error occurred during Host Adapter Configuration in blogic_init()
2535 Querying, Host Adapter Configuration, Resource in blogic_init()
2536 Acquisition, CCB Creation, Host Adapter in blogic_init()
2538 remove Host Adapter from the list of registered in blogic_init()
2539 BusLogic Host Adapters, destroy the CCBs, Release in blogic_init()
2541 Host. in blogic_init()
2545 list_del(&myadapter->host_list); in blogic_init()
2546 scsi_host_put(host); in blogic_init()
2547 ret = -ENODEV; in blogic_init()
2559 support a specific Host Adapter, including the I/O Address range, and
2560 unregisters the BusLogic Host Adapter.
2565 struct Scsi_Host *host = adapter->scsi_host; in blogic_deladapter() local
2567 scsi_remove_host(host); in blogic_deladapter()
2570 FlashPoint Host Adapters must first be released by the FlashPoint in blogic_deladapter()
2574 FlashPoint_ReleaseHostAdapter(adapter->cardhandle); in blogic_deladapter()
2577 support Host Adapter. in blogic_deladapter()
2584 release_region(adapter->io_addr, adapter->addr_count); in blogic_deladapter()
2586 Remove Host Adapter from the list of registered BusLogic in blogic_deladapter()
2587 Host Adapters. in blogic_deladapter()
2589 list_del(&adapter->host_list); in blogic_deladapter()
2591 scsi_host_put(host); in blogic_deladapter()
2602 struct blogic_adapter *adapter = ccb->adapter; in blogic_qcompleted_ccb()
2604 ccb->status = BLOGIC_CCB_COMPLETE; in blogic_qcompleted_ccb()
2605 ccb->next = NULL; in blogic_qcompleted_ccb()
2606 if (adapter->firstccb == NULL) { in blogic_qcompleted_ccb()
2607 adapter->firstccb = ccb; in blogic_qcompleted_ccb()
2608 adapter->lastccb = ccb; in blogic_qcompleted_ccb()
2610 adapter->lastccb->next = ccb; in blogic_qcompleted_ccb()
2611 adapter->lastccb = ccb; in blogic_qcompleted_ccb()
2613 adapter->active_cmds[ccb->tgt_id]--; in blogic_qcompleted_ccb()
2619 the Host Adapter Status and Target Device Status.
2665 blogic_warn("Unknown Host Adapter Status 0x%02X\n", adapter, in blogic_resultcode()
2684 is essential that for each CCB and SCSI Command issued, command in blogic_scan_inbox()
2686 only Incoming Mailboxes with completion code Command Completed in blogic_scan_inbox()
2687 Without Error, Command Completed With Error, or Command Aborted in blogic_scan_inbox()
2688 At Host Request are saved for completion processing. When an in blogic_scan_inbox()
2689 Incoming Mailbox has a completion code of Aborted Command Not in blogic_scan_inbox()
2694 struct blogic_inbox *next_inbox = adapter->next_inbox; in blogic_scan_inbox()
2697 while ((comp_code = next_inbox->comp_code) != BLOGIC_INBOX_FREE) { in blogic_scan_inbox()
2707 (struct blogic_ccb *) bus_to_virt(next_inbox->ccb); in blogic_scan_inbox()
2709 if (ccb->status == BLOGIC_CCB_ACTIVE || in blogic_scan_inbox()
2710 ccb->status == BLOGIC_CCB_RESET) { in blogic_scan_inbox()
2715 ccb->comp_code = comp_code; in blogic_scan_inbox()
2722 the Host Adapter firmware. in blogic_scan_inbox()
2724 …blogic_warn("Illegal CCB #%ld status %d in " "Incoming Mailbox\n", adapter, ccb->serial, ccb->stat… in blogic_scan_inbox()
2727 next_inbox->comp_code = BLOGIC_INBOX_FREE; in blogic_scan_inbox()
2728 if (++next_inbox > adapter->last_inbox) in blogic_scan_inbox()
2729 next_inbox = adapter->first_inbox; in blogic_scan_inbox()
2731 adapter->next_inbox = next_inbox; in blogic_scan_inbox()
2736 blogic_process_ccbs iterates over the completed CCBs for Host
2737 Adapter setting the SCSI Command Result Codes, deallocating the CCBs, and
2738 calling the SCSI Subsystem Completion Routines. The Host Adapter's Lock
2744 if (adapter->processing_ccbs) in blogic_process_ccbs()
2746 adapter->processing_ccbs = true; in blogic_process_ccbs()
2747 while (adapter->firstccb != NULL) { in blogic_process_ccbs()
2748 struct blogic_ccb *ccb = adapter->firstccb; in blogic_process_ccbs()
2749 struct scsi_cmnd *command = ccb->command; in blogic_process_ccbs() local
2750 adapter->firstccb = ccb->next; in blogic_process_ccbs()
2751 if (adapter->firstccb == NULL) in blogic_process_ccbs()
2752 adapter->lastccb = NULL; in blogic_process_ccbs()
2756 if (ccb->opcode == BLOGIC_BDR) { in blogic_process_ccbs()
2757 int tgt_id = ccb->tgt_id; in blogic_process_ccbs()
2759 …blogic_warn("Bus Device Reset CCB #%ld to Target " "%d Completed\n", adapter, ccb->serial, tgt_id); in blogic_process_ccbs()
2760 blogic_inc_count(&adapter->tgt_stats[tgt_id].bdr_done); in blogic_process_ccbs()
2761 adapter->tgt_flags[tgt_id].tagq_active = false; in blogic_process_ccbs()
2762 adapter->cmds_since_rst[tgt_id] = 0; in blogic_process_ccbs()
2763 adapter->last_resetdone[tgt_id] = jiffies; in blogic_process_ccbs()
2765 Place CCB back on the Host Adapter's free list. in blogic_process_ccbs()
2770 Bus Device Reset CCBs have the command field in blogic_process_ccbs()
2771 non-NULL only when a Bus Device Reset was requested in blogic_process_ccbs()
2772 for a command that did not have a currently active in blogic_process_ccbs()
2773 CCB in the Host Adapter (i.e., a Synchronous Bus in blogic_process_ccbs()
2777 while (command != NULL) { in blogic_process_ccbs()
2779 command->reset_chain; in blogic_process_ccbs()
2780 command->reset_chain = NULL; in blogic_process_ccbs()
2781 command->result = DID_RESET << 16; in blogic_process_ccbs()
2782 command->scsi_done(command); in blogic_process_ccbs()
2783 command = nxt_cmd; in blogic_process_ccbs()
2787 Iterate over the CCBs for this Host Adapter in blogic_process_ccbs()
2791 for (ccb = adapter->all_ccbs; ccb != NULL; in blogic_process_ccbs()
2792 ccb = ccb->next_all) in blogic_process_ccbs()
2793 if (ccb->status == BLOGIC_CCB_RESET && in blogic_process_ccbs()
2794 ccb->tgt_id == tgt_id) { in blogic_process_ccbs()
2795 command = ccb->command; in blogic_process_ccbs()
2797 adapter->active_cmds[tgt_id]--; in blogic_process_ccbs()
2798 command->result = DID_RESET << 16; in blogic_process_ccbs()
2799 command->scsi_done(command); in blogic_process_ccbs()
2801 adapter->bdr_pend[tgt_id] = NULL; in blogic_process_ccbs()
2804 Translate the Completion Code, Host Adapter Status, in blogic_process_ccbs()
2808 switch (ccb->comp_code) { in blogic_process_ccbs()
2812 blogic_warn("CCB #%ld to Target %d Impossible State\n", adapter, ccb->serial, ccb->tgt_id); in blogic_process_ccbs()
2815 adapter->tgt_stats[ccb->tgt_id] in blogic_process_ccbs()
2817 adapter->tgt_flags[ccb->tgt_id] in blogic_process_ccbs()
2819 command->result = DID_OK << 16; in blogic_process_ccbs()
2823 adapter, ccb->serial, ccb->tgt_id); in blogic_process_ccbs()
2824 blogic_inc_count(&adapter->tgt_stats[ccb->tgt_id].aborts_done); in blogic_process_ccbs()
2825 command->result = DID_ABORT << 16; in blogic_process_ccbs()
2828 command->result = blogic_resultcode(adapter, in blogic_process_ccbs()
2829 ccb->adapter_status, ccb->tgt_status); in blogic_process_ccbs()
2830 if (ccb->adapter_status != BLOGIC_SELECT_TIMEOUT) { in blogic_process_ccbs()
2831 adapter->tgt_stats[ccb->tgt_id] in blogic_process_ccbs()
2835 blogic_notice("CCB #%ld Target %d: Result %X Host " in blogic_process_ccbs()
2836 … %02X " "Target Status %02X\n", adapter, ccb->serial, ccb->tgt_id, command->result, ccb->adapter_s… in blogic_process_ccbs()
2838 for (i = 0; i < ccb->cdblen; i++) in blogic_process_ccbs()
2839 blogic_notice(" %02X", adapter, ccb->cdb[i]); in blogic_process_ccbs()
2842 for (i = 0; i < ccb->sense_datalen; i++) in blogic_process_ccbs()
2843 blogic_notice(" %02X", adapter, command->sense_buffer[i]); in blogic_process_ccbs()
2850 When an INQUIRY command completes normally, save the in blogic_process_ccbs()
2854 if (ccb->cdb[0] == INQUIRY && ccb->cdb[1] == 0 && in blogic_process_ccbs()
2855 ccb->adapter_status == BLOGIC_CMD_CMPLT_NORMAL) { in blogic_process_ccbs()
2857 &adapter->tgt_flags[ccb->tgt_id]; in blogic_process_ccbs()
2859 (struct scsi_inquiry *) scsi_sglist(command); in blogic_process_ccbs()
2860 tgt_flags->tgt_exists = true; in blogic_process_ccbs()
2861 tgt_flags->tagq_ok = inquiry->CmdQue; in blogic_process_ccbs()
2862 tgt_flags->wide_ok = inquiry->WBus16; in blogic_process_ccbs()
2865 Place CCB back on the Host Adapter's free list. in blogic_process_ccbs()
2869 Call the SCSI Command Completion Routine. in blogic_process_ccbs()
2871 command->scsi_done(command); in blogic_process_ccbs()
2874 adapter->processing_ccbs = false; in blogic_process_ccbs()
2879 blogic_inthandler handles hardware interrupts from BusLogic Host
2888 Acquire exclusive access to Host Adapter. in blogic_inthandler()
2890 spin_lock_irqsave(adapter->scsi_host->host_lock, processor_flag); in blogic_inthandler()
2892 Handle Interrupts appropriately for each Host Adapter type. in blogic_inthandler()
2897 Read the Host Adapter Interrupt Register. in blogic_inthandler()
2902 Acknowledge the interrupt and reset the Host Adapter in blogic_inthandler()
2908 Mailbox Loaded Interrupts. Command Complete in blogic_inthandler()
2913 adapter->adapter_extreset = true; in blogic_inthandler()
2917 adapter->adapter_cmd_complete = true; in blogic_inthandler()
2921 Check if there is a pending interrupt for this Host Adapter. in blogic_inthandler()
2923 if (FlashPoint_InterruptPending(adapter->cardhandle)) in blogic_inthandler()
2924 switch (FlashPoint_HandleInterrupt(adapter->cardhandle)) { in blogic_inthandler()
2928 adapter->adapter_extreset = true; in blogic_inthandler()
2931 blogic_warn("Internal FlashPoint Error detected - Resetting Host Adapter\n", adapter); in blogic_inthandler()
2932 adapter->adapter_intern_err = true; in blogic_inthandler()
2939 if (adapter->firstccb != NULL) in blogic_inthandler()
2942 Reset the Host Adapter if requested. in blogic_inthandler()
2944 if (adapter->adapter_extreset) { in blogic_inthandler()
2945 blogic_warn("Resetting %s due to External SCSI Bus Reset\n", adapter, adapter->full_model); in blogic_inthandler()
2946 blogic_inc_count(&adapter->ext_resets); in blogic_inthandler()
2948 adapter->adapter_extreset = false; in blogic_inthandler()
2949 } else if (adapter->adapter_intern_err) { in blogic_inthandler()
2950 blogic_warn("Resetting %s due to Host Adapter Internal Error\n", adapter, adapter->full_model); in blogic_inthandler()
2951 blogic_inc_count(&adapter->adapter_intern_errors); in blogic_inthandler()
2953 adapter->adapter_intern_err = false; in blogic_inthandler()
2956 Release exclusive access to Host Adapter. in blogic_inthandler()
2958 spin_unlock_irqrestore(adapter->scsi_host->host_lock, processor_flag); in blogic_inthandler()
2965 Mailbox for execution by Host Adapter. The Host Adapter's Lock should
2974 next_outbox = adapter->next_outbox; in blogic_write_outbox()
2975 if (next_outbox->action == BLOGIC_OUTBOX_FREE) { in blogic_write_outbox()
2976 ccb->status = BLOGIC_CCB_ACTIVE; in blogic_write_outbox()
2979 since the Host Adapter is operating asynchronously and the in blogic_write_outbox()
2981 by the Host Adapter. in blogic_write_outbox()
2983 next_outbox->ccb = ccb->dma_handle; in blogic_write_outbox()
2984 next_outbox->action = action; in blogic_write_outbox()
2986 if (++next_outbox > adapter->last_outbox) in blogic_write_outbox()
2987 next_outbox = adapter->first_outbox; in blogic_write_outbox()
2988 adapter->next_outbox = next_outbox; in blogic_write_outbox()
2990 adapter->active_cmds[ccb->tgt_id]++; in blogic_write_outbox()
2991 if (ccb->opcode != BLOGIC_BDR) in blogic_write_outbox()
2992 adapter->tgt_stats[ccb->tgt_id].cmds_tried++; in blogic_write_outbox()
3004 (struct blogic_adapter *) SCpnt->device->host->hostdata; in blogic_hostreset()
3006 unsigned int id = SCpnt->device->id; in blogic_hostreset()
3007 struct blogic_tgt_stats *stats = &adapter->tgt_stats[id]; in blogic_hostreset()
3010 spin_lock_irq(SCpnt->device->host->host_lock); in blogic_hostreset()
3012 blogic_inc_count(&stats->adapter_reset_req); in blogic_hostreset()
3015 spin_unlock_irq(SCpnt->device->host->host_lock); in blogic_hostreset()
3020 blogic_qcmd creates a CCB for Command and places it into an
3021 Outgoing Mailbox for execution by the associated Host Adapter.
3024 static int blogic_qcmd_lck(struct scsi_cmnd *command, in blogic_qcmd_lck() argument
3028 (struct blogic_adapter *) command->device->host->hostdata; in blogic_qcmd_lck()
3030 &adapter->tgt_flags[command->device->id]; in blogic_qcmd_lck()
3031 struct blogic_tgt_stats *tgt_stats = adapter->tgt_stats; in blogic_qcmd_lck()
3032 unsigned char *cdb = command->cmnd; in blogic_qcmd_lck()
3033 int cdblen = command->cmd_len; in blogic_qcmd_lck()
3034 int tgt_id = command->device->id; in blogic_qcmd_lck()
3035 int lun = command->device->lun; in blogic_qcmd_lck()
3036 int buflen = scsi_bufflen(command); in blogic_qcmd_lck()
3043 Host Adapter for any errors, so they should not be executed in blogic_qcmd_lck()
3047 if (cdb[0] == REQUEST_SENSE && command->sense_buffer[0] != 0) { in blogic_qcmd_lck()
3048 command->result = DID_OK << 16; in blogic_qcmd_lck()
3049 comp_cb(command); in blogic_qcmd_lck()
3053 Allocate a CCB from the Host Adapter's free list. In the unlikely in blogic_qcmd_lck()
3055 wait 1 second and try again. If that fails, the Host Adapter is in blogic_qcmd_lck()
3056 probably hung so signal an error as a Host Adapter Hard Reset in blogic_qcmd_lck()
3061 spin_unlock_irq(adapter->scsi_host->host_lock); in blogic_qcmd_lck()
3063 spin_lock_irq(adapter->scsi_host->host_lock); in blogic_qcmd_lck()
3066 command->result = DID_ERROR << 16; in blogic_qcmd_lck()
3067 comp_cb(command); in blogic_qcmd_lck()
3073 Initialize the fields in the BusLogic Command Control Block (CCB). in blogic_qcmd_lck()
3075 count = scsi_dma_map(command); in blogic_qcmd_lck()
3081 ccb->opcode = BLOGIC_INITIATOR_CCB_SG; in blogic_qcmd_lck()
3082 ccb->datalen = count * sizeof(struct blogic_sg_seg); in blogic_qcmd_lck()
3084 ccb->data = (void *)((unsigned int) ccb->dma_handle + in blogic_qcmd_lck()
3085 ((unsigned long) &ccb->sglist - in blogic_qcmd_lck()
3088 ccb->data = ccb->sglist; in blogic_qcmd_lck()
3090 scsi_for_each_sg(command, sg, count, i) { in blogic_qcmd_lck()
3091 ccb->sglist[i].segbytes = sg_dma_len(sg); in blogic_qcmd_lck()
3092 ccb->sglist[i].segdata = sg_dma_address(sg); in blogic_qcmd_lck()
3095 ccb->opcode = BLOGIC_INITIATOR_CCB; in blogic_qcmd_lck()
3096 ccb->datalen = buflen; in blogic_qcmd_lck()
3097 ccb->data = 0; in blogic_qcmd_lck()
3103 ccb->datadir = BLOGIC_DATAIN_CHECKED; in blogic_qcmd_lck()
3110 ccb->datadir = BLOGIC_DATAOUT_CHECKED; in blogic_qcmd_lck()
3116 ccb->datadir = BLOGIC_UNCHECKED_TX; in blogic_qcmd_lck()
3119 ccb->cdblen = cdblen; in blogic_qcmd_lck()
3120 ccb->adapter_status = 0; in blogic_qcmd_lck()
3121 ccb->tgt_status = 0; in blogic_qcmd_lck()
3122 ccb->tgt_id = tgt_id; in blogic_qcmd_lck()
3123 ccb->lun = lun; in blogic_qcmd_lck()
3124 ccb->tag_enable = false; in blogic_qcmd_lck()
3125 ccb->legacytag_enable = false; in blogic_qcmd_lck()
3129 Tagged Queue fashion so that the Host Adapter and Target Device in blogic_qcmd_lck()
3138 from non-tagged to tagged commands, so it is necessary to wait in blogic_qcmd_lck()
3142 if (adapter->cmds_since_rst[tgt_id]++ >= BLOGIC_MAX_TAG_DEPTH && in blogic_qcmd_lck()
3143 !tgt_flags->tagq_active && in blogic_qcmd_lck()
3144 adapter->active_cmds[tgt_id] == 0 in blogic_qcmd_lck()
3145 && tgt_flags->tagq_ok && in blogic_qcmd_lck()
3146 (adapter->tagq_ok & (1 << tgt_id))) { in blogic_qcmd_lck()
3147 tgt_flags->tagq_active = true; in blogic_qcmd_lck()
3151 if (tgt_flags->tagq_active) { in blogic_qcmd_lck()
3156 a queued command will not remain in a disconnected state in blogic_qcmd_lck()
3163 last sequence point, this command will be issued with an in blogic_qcmd_lck()
3166 queued commands before this command may be executed. in blogic_qcmd_lck()
3168 if (adapter->active_cmds[tgt_id] == 0) in blogic_qcmd_lck()
3169 adapter->last_seqpoint[tgt_id] = jiffies; in blogic_qcmd_lck()
3171 adapter->last_seqpoint[tgt_id] + 4 * HZ)) { in blogic_qcmd_lck()
3172 adapter->last_seqpoint[tgt_id] = jiffies; in blogic_qcmd_lck()
3175 if (adapter->ext_lun) { in blogic_qcmd_lck()
3176 ccb->tag_enable = true; in blogic_qcmd_lck()
3177 ccb->queuetag = queuetag; in blogic_qcmd_lck()
3179 ccb->legacytag_enable = true; in blogic_qcmd_lck()
3180 ccb->legacy_tag = queuetag; in blogic_qcmd_lck()
3183 memcpy(ccb->cdb, cdb, cdblen); in blogic_qcmd_lck()
3184 ccb->sense_datalen = SCSI_SENSE_BUFFERSIZE; in blogic_qcmd_lck()
3185 ccb->command = command; in blogic_qcmd_lck()
3186 sense_buf = pci_map_single(adapter->pci_device, in blogic_qcmd_lck()
3187 command->sense_buffer, ccb->sense_datalen, in blogic_qcmd_lck()
3189 if (dma_mapping_error(&adapter->pci_device->dev, sense_buf)) { in blogic_qcmd_lck()
3195 ccb->sensedata = sense_buf; in blogic_qcmd_lck()
3196 command->scsi_done = comp_cb; in blogic_qcmd_lck()
3204 again. If that fails, the Host Adapter is probably hung in blogic_qcmd_lck()
3205 so signal an error as a Host Adapter Hard Reset should in blogic_qcmd_lck()
3209 spin_unlock_irq(adapter->scsi_host->host_lock); in blogic_qcmd_lck()
3210 blogic_warn("Unable to write Outgoing Mailbox - " "Pausing for 1 second\n", adapter); in blogic_qcmd_lck()
3212 spin_lock_irq(adapter->scsi_host->host_lock); in blogic_qcmd_lck()
3215 blogic_warn("Still unable to write Outgoing Mailbox - " "Host Adapter Dead?\n", adapter); in blogic_qcmd_lck()
3217 command->result = DID_ERROR << 16; in blogic_qcmd_lck()
3218 command->scsi_done(command); in blogic_qcmd_lck()
3226 ccb->status = BLOGIC_CCB_ACTIVE; in blogic_qcmd_lck()
3227 adapter->active_cmds[tgt_id]++; in blogic_qcmd_lck()
3229 FlashPoint_StartCCB(adapter->cardhandle, ccb); in blogic_qcmd_lck()
3231 The Command may have already completed and in blogic_qcmd_lck()
3235 if (ccb->status == BLOGIC_CCB_COMPLETE) in blogic_qcmd_lck()
3245 blogic_abort aborts Command if possible. in DEF_SCSI_QCMD()
3248 static int blogic_abort(struct scsi_cmnd *command) in DEF_SCSI_QCMD()
3251 (struct blogic_adapter *) command->device->host->hostdata; in DEF_SCSI_QCMD()
3253 int tgt_id = command->device->id; in DEF_SCSI_QCMD()
3255 blogic_inc_count(&adapter->tgt_stats[tgt_id].aborts_request); in DEF_SCSI_QCMD()
3258 Attempt to find an Active CCB for this Command. If no Active in DEF_SCSI_QCMD()
3259 CCB for this Command is found, then no Abort is necessary. in DEF_SCSI_QCMD()
3261 for (ccb = adapter->all_ccbs; ccb != NULL; ccb = ccb->next_all) in DEF_SCSI_QCMD()
3262 if (ccb->command == command) in DEF_SCSI_QCMD()
3265 blogic_warn("Unable to Abort Command to Target %d - No CCB Found\n", adapter, tgt_id); in DEF_SCSI_QCMD()
3267 } else if (ccb->status == BLOGIC_CCB_COMPLETE) { in DEF_SCSI_QCMD()
3268 blogic_warn("Unable to Abort Command to Target %d - CCB Completed\n", adapter, tgt_id); in DEF_SCSI_QCMD()
3270 } else if (ccb->status == BLOGIC_CCB_RESET) { in DEF_SCSI_QCMD()
3271 blogic_warn("Unable to Abort Command to Target %d - CCB Reset\n", adapter, tgt_id); in DEF_SCSI_QCMD()
3278 generate the non-tagged Abort message. Since non-tagged in DEF_SCSI_QCMD()
3279 commands are not sent by the Host Adapter until the queue in DEF_SCSI_QCMD()
3281 Abort message is treated as a non-tagged command, it is in DEF_SCSI_QCMD()
3287 if (adapter->tgt_flags[tgt_id].tagq_active && in DEF_SCSI_QCMD()
3288 adapter->fw_ver[0] < '5') { in DEF_SCSI_QCMD()
3289 …blogic_warn("Unable to Abort CCB #%ld to Target %d - Abort Tag Not Supported\n", adapter, ccb->ser… in DEF_SCSI_QCMD()
3294 adapter, ccb->serial, tgt_id); in DEF_SCSI_QCMD()
3295 blogic_inc_count(&adapter->tgt_stats[tgt_id].aborts_tried); in DEF_SCSI_QCMD()
3298 …blogic_warn("Unable to Abort CCB #%ld to Target %d - No Outgoing Mailboxes\n", adapter, ccb->seria… in DEF_SCSI_QCMD()
3307 ccb->serial, tgt_id); in DEF_SCSI_QCMD()
3308 blogic_inc_count(&adapter->tgt_stats[tgt_id].aborts_tried); in DEF_SCSI_QCMD()
3309 FlashPoint_AbortCCB(adapter->cardhandle, ccb); in DEF_SCSI_QCMD()
3315 if (ccb->status == BLOGIC_CCB_COMPLETE) in DEF_SCSI_QCMD()
3324 blogic_resetadapter resets Host Adapter if possible, marking all
3334 * Attempt to Reset and Reinitialize the Host Adapter.
3340 adapter->full_model);
3348 for (ccb = adapter->all_ccbs; ccb != NULL; ccb = ccb->next_all)
3349 if (ccb->status == BLOGIC_CCB_ACTIVE)
3352 * Wait a few seconds between the Host Adapter Hard Reset which
3359 spin_unlock_irq(adapter->scsi_host->host_lock);
3360 blogic_delay(adapter->bus_settle_time);
3361 spin_lock_irq(adapter->scsi_host->host_lock);
3364 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) {
3365 adapter->last_resettried[tgt_id] = jiffies;
3366 adapter->last_resetdone[tgt_id] = jiffies;
3377 may be enabled in AutoSCSI on FlashPoint Host Adapters and on "W" and "C"
3378 series MultiMaster Host Adapters, or by a dip switch setting on "S" and "A"
3379 series MultiMaster Host Adapters. With Extended Translation enabled, drives
3392 (struct blogic_adapter *) sdev->host->hostdata; in blogic_diskparam()
3396 if (adapter->ext_trans_enable && capacity >= 2 * 1024 * 1024 /* 1 GB in 512 byte sectors */) { in blogic_diskparam()
3398 diskparam->heads = 255; in blogic_diskparam()
3399 diskparam->sectors = 63; in blogic_diskparam()
3401 diskparam->heads = 128; in blogic_diskparam()
3402 diskparam->sectors = 32; in blogic_diskparam()
3405 diskparam->heads = 64; in blogic_diskparam()
3406 diskparam->sectors = 32; in blogic_diskparam()
3408 diskparam->cylinders = (unsigned long) capacity / (diskparam->heads * diskparam->sectors); in blogic_diskparam()
3420 int saved_cyl = diskparam->cylinders, part_no; in blogic_diskparam()
3424 part_end_head = part_entry->end_head; in blogic_diskparam()
3425 part_end_sector = part_entry->end_sector & 0x3F; in blogic_diskparam()
3426 if (part_end_head == 64 - 1) { in blogic_diskparam()
3427 diskparam->heads = 64; in blogic_diskparam()
3428 diskparam->sectors = 32; in blogic_diskparam()
3430 } else if (part_end_head == 128 - 1) { in blogic_diskparam()
3431 diskparam->heads = 128; in blogic_diskparam()
3432 diskparam->sectors = 32; in blogic_diskparam()
3434 } else if (part_end_head == 255 - 1) { in blogic_diskparam()
3435 diskparam->heads = 255; in blogic_diskparam()
3436 diskparam->sectors = 63; in blogic_diskparam()
3442 part_end_head = part1_entry->end_head; in blogic_diskparam()
3443 part_end_sector = part1_entry->end_sector & 0x3F; in blogic_diskparam()
3445 diskparam->cylinders = (unsigned long) capacity / (diskparam->heads * diskparam->sectors); in blogic_diskparam()
3446 if (part_no < 4 && part_end_sector == diskparam->sectors) { in blogic_diskparam()
3447 if (diskparam->cylinders != saved_cyl) in blogic_diskparam()
3448 …n("Adopting Geometry %d/%d from Partition Table\n", adapter, diskparam->heads, diskparam->sectors); in blogic_diskparam()
3451 …("not compatible with current BusLogic " "Host Adapter Geometry %d/%d\n", adapter, diskparam->head… in blogic_diskparam()
3467 (struct blogic_adapter *) shost->hostdata; in blogic_write_info()
3470 tgt_stats = adapter->tgt_stats; in blogic_write_info()
3471 adapter->ext_resets = 0; in blogic_write_info()
3472 adapter->adapter_intern_errors = 0; in blogic_write_info()
3479 struct blogic_adapter *adapter = (struct blogic_adapter *) shost->hostdata; in blogic_show_info()
3483 tgt_stats = adapter->tgt_stats; in blogic_show_info()
3484 seq_write(m, adapter->msgbuf, adapter->msgbuflen); in blogic_show_info()
3487 Currently Allocated CCBs: %d\n", adapter->drvr_qdepth, adapter->alloc_ccbs); in blogic_show_info()
3493 for (tgt = 0; tgt < adapter->maxdev; tgt++) { in blogic_show_info()
3494 struct blogic_tgt_flags *tgt_flags = &adapter->tgt_flags[tgt]; in blogic_show_info()
3495 if (!tgt_flags->tgt_exists) in blogic_show_info()
3497 …seq_printf(m, " %2d %s", tgt, (tgt_flags->tagq_ok ? (tgt_flags->tagq_active ? " Active" : (ada… in blogic_show_info()
3501 …" %3d %3u %9u %9u\n", adapter->qdepth[tgt], adapter->active_cmds[tgt], tgt_stats[tgt]… in blogic_show_info()
3506 for (tgt = 0; tgt < adapter->maxdev; tgt++) { in blogic_show_info()
3507 struct blogic_tgt_flags *tgt_flags = &adapter->tgt_flags[tgt]; in blogic_show_info()
3508 if (!tgt_flags->tgt_exists) in blogic_show_info()
3521 Target Command 0-1KB 1-2KB 2-4KB 4-8KB 8-16KB\n\ in blogic_show_info()
3523 for (tgt = 0; tgt < adapter->maxdev; tgt++) { in blogic_show_info()
3524 struct blogic_tgt_flags *tgt_flags = &adapter->tgt_flags[tgt]; in blogic_show_info()
3525 if (!tgt_flags->tgt_exists) in blogic_show_info()
3537 Target Command 16-32KB 32-64KB 64-128KB 128-256KB 256KB+\n\ in blogic_show_info()
3539 for (tgt = 0; tgt < adapter->maxdev; tgt++) { in blogic_show_info()
3540 struct blogic_tgt_flags *tgt_flags = &adapter->tgt_flags[tgt]; in blogic_show_info()
3541 if (!tgt_flags->tgt_exists) in blogic_show_info()
3555 Command Aborts Bus Device Resets Host Adapter Resets\n\ in blogic_show_info()
3559 for (tgt = 0; tgt < adapter->maxdev; tgt++) { in blogic_show_info()
3560 struct blogic_tgt_flags *tgt_flags = &adapter->tgt_flags[tgt]; in blogic_show_info()
3561 if (!tgt_flags->tgt_exists) in blogic_show_info()
3574 seq_printf(m, "\nExternal Host Adapter Resets: %d\n", adapter->ext_resets); in blogic_show_info()
3575 seq_printf(m, "Host Adapter Internal Errors: %d\n", adapter->adapter_intern_errors); in blogic_show_info()
3597 strcpy(&adapter->msgbuf[adapter->msgbuflen], buf); in blogic_msg()
3598 adapter->msgbuflen += len; in blogic_msg()
3602 strcpy(&adapter->msgbuf[adapter->msgbuflen], buf); in blogic_msg()
3603 adapter->msgbuflen += len; in blogic_msg()
3606 printk("%sscsi%d: %s", blogic_msglevelmap[msglevel], adapter->host_no, buf); in blogic_msg()
3611 if (adapter != NULL && adapter->adapter_initd) in blogic_msg()
3612 printk("%sscsi%d: %s", blogic_msglevelmap[msglevel], adapter->host_no, buf); in blogic_msg()
3618 begin = (buf[len - 1] == '\n'); in blogic_msg()
3634 strch += 'a' - 'Z'; in blogic_parse()
3636 keywordch += 'a' - 'Z'; in blogic_parse()
3649 BusLogic Driver Options may be specified either via the Linux Kernel Command
3651 for multiple host adapters may be specified either by separating the option
3653 command line. Individual option specifications for a single host adapter are
3654 separated by commas. The Probing and Debugging Options apply to all host
3656 selected host adapter.
3720 drvr_opts->qdepth[tgt_id] = qdepth; in blogic_parseopts()
3742 drvr_opts->common_qdepth = qdepth; in blogic_parseopts()
3744 drvr_opts->qdepth[tgt_id] = qdepth; in blogic_parseopts()
3748 drvr_opts->tagq_ok = 0x0000; in blogic_parseopts()
3749 drvr_opts->tagq_ok_mask = 0x0000; in blogic_parseopts()
3751 drvr_opts->tagq_ok = 0xFFFF; in blogic_parseopts()
3752 drvr_opts->tagq_ok_mask = 0xFFFF; in blogic_parseopts()
3754 drvr_opts->tagq_ok = 0x0000; in blogic_parseopts()
3755 drvr_opts->tagq_ok_mask = 0xFFFF; in blogic_parseopts()
3763 drvr_opts->tagq_ok |= tgt_bit; in blogic_parseopts()
3764 drvr_opts->tagq_ok_mask |= tgt_bit; in blogic_parseopts()
3767 drvr_opts->tagq_ok &= ~tgt_bit; in blogic_parseopts()
3768 drvr_opts->tagq_ok_mask |= tgt_bit; in blogic_parseopts()
3773 options--; in blogic_parseopts()
3788 drvr_opts->bus_settle_time = bus_settle_time; in blogic_parseopts()
3791 drvr_opts->stop_tgt_inquiry = true; in blogic_parseopts()
3825 if (drvr_opts->qdepth[tgt_id] == 1) { in blogic_parseopts()
3827 drvr_opts->tagq_ok &= ~tgt_bit; in blogic_parseopts()
3828 drvr_opts->tagq_ok_mask |= tgt_bit; in blogic_parseopts()
3862 blogic_setup handles processing of Kernel Command Line Arguments.
3872 blogic_err("BusLogic: Obsolete Command Line Entry " "Format Ignored\n", NULL); in blogic_setup()