Lines Matching full:adapter
135 static void blogic_announce_drvr(struct blogic_adapter *adapter) in blogic_announce_drvr() argument
137 …** BusLogic SCSI Driver Version " blogic_drvr_version " of " blogic_drvr_date " *****\n", adapter); in blogic_announce_drvr()
138 blogic_announce("Copyright 1995-1998 by Leonard N. Zubkoff <lnz@dandelion.com>\n", adapter); in blogic_announce_drvr()
143 blogic_drvr_info returns the Host Adapter Name to identify this SCSI
144 Driver and Host Adapter.
149 struct blogic_adapter *adapter = in blogic_drvr_info() local
151 return adapter->full_model; in blogic_drvr_info()
156 for Host Adapter from the blk_size bytes located at blk_pointer. The newly
157 created CCBs are added to Host Adapter's free list.
160 static void blogic_init_ccbs(struct blogic_adapter *adapter, void *blk_pointer, in blogic_init_ccbs() argument
170 ccb->adapter = adapter; in blogic_init_ccbs()
172 if (blogic_flashpoint_type(adapter)) { in blogic_init_ccbs()
174 ccb->base_addr = adapter->fpinfo.base_addr; in blogic_init_ccbs()
176 ccb->next = adapter->free_ccbs; in blogic_init_ccbs()
177 ccb->next_all = adapter->all_ccbs; in blogic_init_ccbs()
178 adapter->free_ccbs = ccb; in blogic_init_ccbs()
179 adapter->all_ccbs = ccb; in blogic_init_ccbs()
180 adapter->alloc_ccbs++; in blogic_init_ccbs()
188 blogic_create_initccbs allocates the initial CCBs for Host Adapter.
191 static bool __init blogic_create_initccbs(struct blogic_adapter *adapter) in blogic_create_initccbs() argument
197 while (adapter->alloc_ccbs < adapter->initccbs) { in blogic_create_initccbs()
198 blk_pointer = dma_alloc_coherent(&adapter->pci_device->dev, in blogic_create_initccbs()
202 adapter); in blogic_create_initccbs()
205 blogic_init_ccbs(adapter, blk_pointer, blk_size, blkp); in blogic_create_initccbs()
212 blogic_destroy_ccbs deallocates the CCBs for Host Adapter.
215 static void blogic_destroy_ccbs(struct blogic_adapter *adapter) in blogic_destroy_ccbs() argument
217 struct blogic_ccb *next_ccb = adapter->all_ccbs, *ccb, *lastccb = NULL; in blogic_destroy_ccbs()
218 adapter->all_ccbs = NULL; in blogic_destroy_ccbs()
219 adapter->free_ccbs = NULL; in blogic_destroy_ccbs()
224 dma_free_coherent(&adapter->pci_device->dev, in blogic_destroy_ccbs()
231 dma_free_coherent(&adapter->pci_device->dev, in blogic_destroy_ccbs()
238 blogic_create_addlccbs allocates Additional CCBs for Host Adapter. If
244 static void blogic_create_addlccbs(struct blogic_adapter *adapter, in blogic_create_addlccbs() argument
248 int prev_alloc = adapter->alloc_ccbs; in blogic_create_addlccbs()
253 while (adapter->alloc_ccbs - prev_alloc < addl_ccbs) { in blogic_create_addlccbs()
254 blk_pointer = dma_alloc_coherent(&adapter->pci_device->dev, in blogic_create_addlccbs()
258 blogic_init_ccbs(adapter, blk_pointer, blk_size, blkp); in blogic_create_addlccbs()
260 if (adapter->alloc_ccbs > prev_alloc) { in blogic_create_addlccbs()
262 …e("Allocated %d additional CCBs (total now %d)\n", adapter, adapter->alloc_ccbs - prev_alloc, adap… in blogic_create_addlccbs()
265 blogic_notice("Failed to allocate additional CCBs\n", adapter); in blogic_create_addlccbs()
266 if (adapter->drvr_qdepth > adapter->alloc_ccbs - adapter->tgt_count) { in blogic_create_addlccbs()
267 adapter->drvr_qdepth = adapter->alloc_ccbs - adapter->tgt_count; in blogic_create_addlccbs()
268 adapter->scsi_host->can_queue = adapter->drvr_qdepth; in blogic_create_addlccbs()
273 blogic_alloc_ccb allocates a CCB from Host Adapter's free list,
274 allocating more memory from the Kernel if necessary. The Host Adapter's
278 static struct blogic_ccb *blogic_alloc_ccb(struct blogic_adapter *adapter) in blogic_alloc_ccb() argument
282 ccb = adapter->free_ccbs; in blogic_alloc_ccb()
285 adapter->free_ccbs = ccb->next; in blogic_alloc_ccb()
287 if (adapter->free_ccbs == NULL) in blogic_alloc_ccb()
288 blogic_create_addlccbs(adapter, adapter->inc_ccbs, in blogic_alloc_ccb()
292 blogic_create_addlccbs(adapter, adapter->inc_ccbs, true); in blogic_alloc_ccb()
293 ccb = adapter->free_ccbs; in blogic_alloc_ccb()
297 adapter->free_ccbs = ccb->next; in blogic_alloc_ccb()
304 blogic_dealloc_ccb deallocates a CCB, returning it to the Host Adapter's
305 free list. The Host Adapter's Lock should already have been acquired by the
311 struct blogic_adapter *adapter = ccb->adapter; in blogic_dealloc_ccb() local
316 dma_unmap_single(&adapter->pci_device->dev, ccb->sensedata, in blogic_dealloc_ccb()
321 ccb->next = adapter->free_ccbs; in blogic_dealloc_ccb()
322 adapter->free_ccbs = ccb; in blogic_dealloc_ccb()
327 blogic_cmd sends the command opcode to adapter, optionally
333 the Host Adapter (including any discarded data); on failure, it returns
336 blogic_cmd is called exclusively during host adapter detection and
338 access to the Host Adapter hardware is assumed. Once the host adapter and
339 driver are initialized, the only Host Adapter command that is issued is the
341 waiting for the Host Adapter Ready bit to be set in the Status Register.
344 static int blogic_cmd(struct blogic_adapter *adapter, enum blogic_opcode opcode, in blogic_cmd() argument
361 must be disabled while issuing host adapter commands since a in blogic_cmd()
363 previously enabled by another BusLogic Host Adapter or another in blogic_cmd()
366 if (!adapter->irq_acquired) in blogic_cmd()
369 Wait for the Host Adapter Ready bit to be set and the in blogic_cmd()
375 statusreg.all = blogic_rdstatus(adapter); in blogic_cmd()
382 "Timeout waiting for Host Adapter Ready"; in blogic_cmd()
389 adapter->adapter_cmd_complete = false; in blogic_cmd()
390 blogic_setcmdparam(adapter, opcode); in blogic_cmd()
397 Wait 100 microseconds to give the Host Adapter enough in blogic_cmd()
407 back from the Host Adapter. Otherwise, wait for the in blogic_cmd()
412 intreg.all = blogic_rdint(adapter); in blogic_cmd()
413 statusreg.all = blogic_rdstatus(adapter); in blogic_cmd()
416 if (adapter->adapter_cmd_complete) in blogic_cmd()
422 blogic_setcmdparam(adapter, *param_p++); in blogic_cmd()
436 statusreg.all = blogic_rdstatus(adapter); in blogic_cmd()
444 …blogic_notice("blogic_cmd(%02X) Status = %02X: (Modify I/O Address)\n", adapter, opcode, statusreg… in blogic_cmd()
466 Interrupt Handler to set the Host Adapter Command Completed in blogic_cmd()
467 bit in the Host Adapter structure. in blogic_cmd()
470 intreg.all = blogic_rdint(adapter); in blogic_cmd()
471 statusreg.all = blogic_rdstatus(adapter); in blogic_cmd()
474 if (adapter->adapter_cmd_complete) in blogic_cmd()
478 *reply_p++ = blogic_rddatain(adapter); in blogic_cmd()
480 blogic_rddatain(adapter); in blogic_cmd()
496 blogic_intreset(adapter); in blogic_cmd()
503 adapter, opcode, statusreg.all, replylen, in blogic_cmd()
508 blogic_notice(" %02X", adapter, in blogic_cmd()
510 blogic_notice("\n", adapter); in blogic_cmd()
520 Host Adapter. Potentially invalid commands are never in blogic_cmd()
522 so there should be no Host Adapter state lost by a in blogic_cmd()
526 statusreg.all = blogic_rdstatus(adapter); in blogic_cmd()
534 blogic_softreset(adapter); in blogic_cmd()
558 if (!adapter->irq_acquired) in blogic_cmd()
608 static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter) in blogic_init_mm_probeinfo() argument
623 enumerated host adapter, determine whether its ISA Compatible in blogic_init_mm_probeinfo()
625 Primary I/O Address. A host adapter that is assigned the in blogic_init_mm_probeinfo()
627 The MultiMaster BIOS will first recognize a host adapter at in blogic_init_mm_probeinfo()
630 standard ISA I/O Addresses. When a PCI host adapter is found in blogic_init_mm_probeinfo()
639 struct blogic_adapter *host_adapter = adapter; in blogic_init_mm_probeinfo()
663 …blogic_err("BusLogic: Base Address0 0x%lX not I/O for MultiMaster Host Adapter\n", NULL, base_addr… in blogic_init_mm_probeinfo()
668 …blogic_err("BusLogic: Base Address1 0x%lX not Memory for MultiMaster Host Adapter\n", NULL, base_a… in blogic_init_mm_probeinfo()
673 blogic_err("BusLogic: IRQ Channel %d invalid for MultiMaster Host Adapter\n", NULL, irq_ch); in blogic_init_mm_probeinfo()
678 blogic_notice("BusLogic: PCI MultiMaster Host Adapter detected at\n", NULL); in blogic_init_mm_probeinfo()
682 Issue the Inquire PCI Host Adapter Information command to determine in blogic_init_mm_probeinfo()
697 ISA compatible I/O Address that the Host Adapter in blogic_init_mm_probeinfo()
705 For the first MultiMaster Host Adapter enumerated, in blogic_init_mm_probeinfo()
706 issue the Fetch Host Adapter Local RAM command to read in blogic_init_mm_probeinfo()
731 Determine whether this MultiMaster Host Adapter has its in blogic_init_mm_probeinfo()
734 MultiMaster Host Adapter and must be recognized first. in blogic_init_mm_probeinfo()
736 after any Primary MultiMaster Host Adapter is probed. in blogic_init_mm_probeinfo()
766 option is ON for the first enumerated MultiMaster Host Adapter, in blogic_init_mm_probeinfo()
767 and if that host adapter is a BT-948/958/958D, then the in blogic_init_mm_probeinfo()
830 static int __init blogic_init_fp_probeinfo(struct blogic_adapter *adapter) in blogic_init_fp_probeinfo() argument
861 …blogic_err("BusLogic: Base Address0 0x%lX not I/O for FlashPoint Host Adapter\n", NULL, base_addr0… in blogic_init_fp_probeinfo()
866 …blogic_err("BusLogic: Base Address1 0x%lX not Memory for FlashPoint Host Adapter\n", NULL, base_ad… in blogic_init_fp_probeinfo()
871 blogic_err("BusLogic: IRQ Channel %d invalid for FlashPoint Host Adapter\n", NULL, irq_ch); in blogic_init_fp_probeinfo()
876 blogic_notice("BusLogic: FlashPoint Host Adapter detected at\n", NULL); in blogic_init_fp_probeinfo()
894 …blogic_err("BusLogic: FlashPoint Host Adapter detected at PCI Bus %d Device %d\n", NULL, bus, devi… in blogic_init_fp_probeinfo()
916 controlled by the first PCI MultiMaster Host Adapter, in which case
922 static void __init blogic_init_probeinfo_list(struct blogic_adapter *adapter) in blogic_init_probeinfo_list() argument
931 blogic_init_mm_probeinfo(adapter); in blogic_init_probeinfo_list()
932 blogic_init_fp_probeinfo(adapter); in blogic_init_probeinfo_list()
934 blogic_init_fp_probeinfo(adapter); in blogic_init_probeinfo_list()
935 blogic_init_mm_probeinfo(adapter); in blogic_init_probeinfo_list()
937 int fpcount = blogic_init_fp_probeinfo(adapter); in blogic_init_probeinfo_list()
938 int mmcount = blogic_init_mm_probeinfo(adapter); in blogic_init_probeinfo_list()
942 struct blogic_adapter *myadapter = adapter; in blogic_init_probeinfo_list()
961 PCI MultiMaster Host Adapter, then reverse in blogic_init_probeinfo_list()
990 static bool blogic_failure(struct blogic_adapter *adapter, char *msg) in blogic_failure() argument
992 blogic_announce_drvr(adapter); in blogic_failure()
993 if (adapter->adapter_bus_type == BLOGIC_PCI_BUS) { in blogic_failure()
994 blogic_err("While configuring BusLogic PCI Host Adapter at\n", in blogic_failure()
995 adapter); in blogic_failure()
996 … %d I/O Address 0x%lX PCI Address 0x%lX:\n", adapter, adapter->bus, adapter->dev, adapter->io_addr… in blogic_failure()
998 …blogic_err("While configuring BusLogic Host Adapter at I/O Address 0x%lX:\n", adapter, adapter->io… in blogic_failure()
999 blogic_err("%s FAILED - DETACHING\n", adapter, msg); in blogic_failure()
1001 blogic_err("ADDITIONAL FAILURE INFO - %s\n", adapter, in blogic_failure()
1008 blogic_probe probes for a BusLogic Host Adapter.
1011 static bool __init blogic_probe(struct blogic_adapter *adapter) in blogic_probe() argument
1019 if (blogic_flashpoint_type(adapter)) { in blogic_probe()
1020 struct fpoint_info *fpinfo = &adapter->fpinfo; in blogic_probe()
1021 fpinfo->base_addr = (u32) adapter->io_addr; in blogic_probe()
1022 fpinfo->irq_ch = adapter->irq_ch; in blogic_probe()
1026 …blogic_err("BusLogic: FlashPoint Host Adapter detected at PCI Bus %d Device %d\n", adapter, adapte… in blogic_probe()
1027 …c: I/O Address 0x%lX PCI Address 0x%lX, but FlashPoint\n", adapter, adapter->io_addr, adapter->pci… in blogic_probe()
1028 blogic_err("BusLogic: Probe Function failed to validate it.\n", adapter); in blogic_probe()
1032 blogic_notice("BusLogic_Probe(0x%lX): FlashPoint Found\n", adapter, adapter->io_addr); in blogic_probe()
1034 Indicate the Host Adapter Probe completed successfully. in blogic_probe()
1041 BusLogic Host Adapter. A nonexistent I/O port will return 0xFF, in which in blogic_probe()
1042 case there is definitely no BusLogic Host Adapter at this base I/O Address. in blogic_probe()
1043 The test here is a subset of that used by the BusLogic Host Adapter BIOS. in blogic_probe()
1045 statusreg.all = blogic_rdstatus(adapter); in blogic_probe()
1046 intreg.all = blogic_rdint(adapter); in blogic_probe()
1047 georeg.all = blogic_rdgeom(adapter); in blogic_probe()
1049 …_Probe(0x%lX): Status 0x%02X, Interrupt 0x%02X, Geometry 0x%02X\n", adapter, adapter->io_addr, sta… in blogic_probe()
1062 issued in blogic_checkadapter. The AMI FastDisk Host Adapter in blogic_probe()
1073 Indicate the Host Adapter Probe completed successfully. in blogic_probe()
1080 blogic_hwreset issues a Hardware Reset to the Host Adapter
1081 and waits for Host Adapter Diagnostics to complete. If hard_reset is true, a
1083 Soft Reset is performed which only resets the Host Adapter without forcing a
1087 static bool blogic_hwreset(struct blogic_adapter *adapter, bool hard_reset) in blogic_hwreset() argument
1095 if (blogic_flashpoint_type(adapter)) { in blogic_hwreset()
1096 struct fpoint_info *fpinfo = &adapter->fpinfo; in blogic_hwreset()
1099 adapter->cardhandle = in blogic_hwreset()
1101 if (adapter->cardhandle == (void *)FPOINT_BADCARD_HANDLE) in blogic_hwreset()
1104 Indicate the Host Adapter Hard Reset completed successfully. in blogic_hwreset()
1109 Issue a Hard Reset or Soft Reset Command to the Host Adapter. in blogic_hwreset()
1110 The Host Adapter should respond by setting Diagnostic Active in in blogic_hwreset()
1114 blogic_hardreset(adapter); in blogic_hwreset()
1116 blogic_softreset(adapter); in blogic_hwreset()
1122 statusreg.all = blogic_rdstatus(adapter); in blogic_hwreset()
1128 …BusLogic_HardwareReset(0x%lX): Diagnostic Active, Status 0x%02X\n", adapter, adapter->io_addr, sta… in blogic_hwreset()
1142 statusreg.all = blogic_rdstatus(adapter); in blogic_hwreset()
1148 …Logic_HardwareReset(0x%lX): Diagnostic Completed, Status 0x%02X\n", adapter, adapter->io_addr, sta… in blogic_hwreset()
1152 Wait until at least one of the Diagnostic Failure, Host Adapter in blogic_hwreset()
1157 statusreg.all = blogic_rdstatus(adapter); in blogic_hwreset()
1164 …blogic_notice("BusLogic_HardwareReset(0x%lX): Host Adapter Ready, Status 0x%02X\n", adapter, adapt… in blogic_hwreset()
1168 If Diagnostic Failure is set or Host Adapter Ready is reset, in blogic_hwreset()
1169 then an error occurred during the Host Adapter diagnostics. in blogic_hwreset()
1175 blogic_failure(adapter, "HARD RESET DIAGNOSTICS"); in blogic_hwreset()
1176 blogic_err("HOST ADAPTER STATUS REGISTER = %02X\n", adapter, in blogic_hwreset()
1179 blogic_err("HOST ADAPTER ERROR CODE = %d\n", adapter, in blogic_hwreset()
1180 blogic_rddatain(adapter)); in blogic_hwreset()
1184 Indicate the Host Adapter Hard Reset completed successfully. in blogic_hwreset()
1192 Host Adapter.
1195 static bool __init blogic_checkadapter(struct blogic_adapter *adapter) in blogic_checkadapter() argument
1203 if (blogic_flashpoint_type(adapter)) in blogic_checkadapter()
1212 if (blogic_cmd(adapter, BLOGIC_INQ_EXTSETUP, &req_replylen, in blogic_checkadapter()
1220 blogic_notice("BusLogic_Check(0x%lX): MultiMaster %s\n", adapter, in blogic_checkadapter()
1221 adapter->io_addr, in blogic_checkadapter()
1229 from Host Adapter and initializes the Host Adapter structure.
1232 static bool __init blogic_rdconfig(struct blogic_adapter *adapter) in blogic_rdconfig() argument
1252 Host Adapter structure from the fpoint_info structure. in blogic_rdconfig()
1254 if (blogic_flashpoint_type(adapter)) { in blogic_rdconfig()
1255 struct fpoint_info *fpinfo = &adapter->fpinfo; in blogic_rdconfig()
1256 tgt = adapter->model; in blogic_rdconfig()
1263 strcpy(adapter->fw_ver, FLASHPOINT_FW_VER); in blogic_rdconfig()
1264 adapter->scsi_id = fpinfo->scsi_id; in blogic_rdconfig()
1265 adapter->ext_trans_enable = fpinfo->ext_trans_enable; in blogic_rdconfig()
1266 adapter->parity = fpinfo->parity; in blogic_rdconfig()
1267 adapter->reset_enabled = !fpinfo->softreset; in blogic_rdconfig()
1268 adapter->level_int = true; in blogic_rdconfig()
1269 adapter->wide = fpinfo->wide; in blogic_rdconfig()
1270 adapter->differential = false; in blogic_rdconfig()
1271 adapter->scam = true; in blogic_rdconfig()
1272 adapter->ultra = true; in blogic_rdconfig()
1273 adapter->ext_lun = true; in blogic_rdconfig()
1274 adapter->terminfo_valid = true; in blogic_rdconfig()
1275 adapter->low_term = fpinfo->low_term; in blogic_rdconfig()
1276 adapter->high_term = fpinfo->high_term; in blogic_rdconfig()
1277 adapter->scam_enabled = fpinfo->scam_enabled; in blogic_rdconfig()
1278 adapter->scam_lev2 = fpinfo->scam_lev2; in blogic_rdconfig()
1279 adapter->drvr_sglimit = BLOGIC_SG_LIMIT; in blogic_rdconfig()
1280 adapter->maxdev = (adapter->wide ? 16 : 8); in blogic_rdconfig()
1281 adapter->maxlun = 32; in blogic_rdconfig()
1282 adapter->initccbs = 4 * BLOGIC_CCB_GRP_ALLOCSIZE; in blogic_rdconfig()
1283 adapter->inc_ccbs = BLOGIC_CCB_GRP_ALLOCSIZE; in blogic_rdconfig()
1284 adapter->drvr_qdepth = 255; in blogic_rdconfig()
1285 adapter->adapter_qdepth = adapter->drvr_qdepth; in blogic_rdconfig()
1286 adapter->sync_ok = fpinfo->sync_ok; in blogic_rdconfig()
1287 adapter->fast_ok = fpinfo->fast_ok; in blogic_rdconfig()
1288 adapter->ultra_ok = fpinfo->ultra_ok; in blogic_rdconfig()
1289 adapter->wide_ok = fpinfo->wide_ok; in blogic_rdconfig()
1290 adapter->discon_ok = fpinfo->discon_ok; in blogic_rdconfig()
1291 adapter->tagq_ok = 0xFFFF; in blogic_rdconfig()
1297 if (blogic_cmd(adapter, BLOGIC_GET_BOARD_ID, NULL, 0, &id, in blogic_rdconfig()
1299 return blogic_failure(adapter, "INQUIRE BOARD ID"); in blogic_rdconfig()
1303 if (blogic_cmd(adapter, BLOGIC_INQ_CONFIG, NULL, 0, &config, in blogic_rdconfig()
1306 return blogic_failure(adapter, "INQUIRE CONFIGURATION"); in blogic_rdconfig()
1311 if (blogic_cmd(adapter, BLOGIC_INQ_SETUPINFO, &req_replylen, in blogic_rdconfig()
1314 return blogic_failure(adapter, "INQUIRE SETUP INFORMATION"); in blogic_rdconfig()
1319 if (blogic_cmd(adapter, BLOGIC_INQ_EXTSETUP, &req_replylen, in blogic_rdconfig()
1322 return blogic_failure(adapter, in blogic_rdconfig()
1329 if (blogic_cmd(adapter, BLOGIC_INQ_FWVER_D3, NULL, 0, in blogic_rdconfig()
1332 return blogic_failure(adapter, in blogic_rdconfig()
1335 Issue the Inquire Host Adapter Model Number command. in blogic_rdconfig()
1350 if (blogic_cmd(adapter, BLOGIC_INQ_MODELNO, &req_replylen, in blogic_rdconfig()
1353 return blogic_failure(adapter, in blogic_rdconfig()
1354 "INQUIRE HOST ADAPTER MODEL NUMBER"); in blogic_rdconfig()
1370 0.xx AMI FastDisk VLB/EISA BusLogic Clone Host Adapter in blogic_rdconfig()
1373 Save the Model Name and Host Adapter Name in the Host Adapter in blogic_rdconfig()
1376 tgt = adapter->model; in blogic_rdconfig()
1388 Save the Firmware Version in the Host Adapter structure. in blogic_rdconfig()
1390 tgt = adapter->fw_ver; in blogic_rdconfig()
1400 if (strcmp(adapter->fw_ver, "3.3") >= 0) { in blogic_rdconfig()
1401 if (blogic_cmd(adapter, BLOGIC_INQ_FWVER_LETTER, NULL, 0, in blogic_rdconfig()
1404 return blogic_failure(adapter, in blogic_rdconfig()
1411 Save the Host Adapter SCSI ID in the Host Adapter structure. in blogic_rdconfig()
1413 adapter->scsi_id = config.id; in blogic_rdconfig()
1415 Determine the Bus Type and save it in the Host Adapter structure, in blogic_rdconfig()
1419 adapter->adapter_bus_type = in blogic_rdconfig()
1420 blogic_adater_bus_types[adapter->model[3] - '4']; in blogic_rdconfig()
1421 if (adapter->irq_ch == 0) { in blogic_rdconfig()
1423 adapter->irq_ch = 9; in blogic_rdconfig()
1425 adapter->irq_ch = 10; in blogic_rdconfig()
1427 adapter->irq_ch = 11; in blogic_rdconfig()
1429 adapter->irq_ch = 12; in blogic_rdconfig()
1431 adapter->irq_ch = 14; in blogic_rdconfig()
1433 adapter->irq_ch = 15; in blogic_rdconfig()
1437 the Host Adapter structure. in blogic_rdconfig()
1439 georeg.all = blogic_rdgeom(adapter); in blogic_rdconfig()
1440 adapter->ext_trans_enable = georeg.gr.ext_trans_enable; in blogic_rdconfig()
1444 Ultra SCSI flag in the Host Adapter structure. in blogic_rdconfig()
1446 adapter->adapter_sglimit = ext_setupinfo.sg_limit; in blogic_rdconfig()
1447 adapter->drvr_sglimit = adapter->adapter_sglimit; in blogic_rdconfig()
1448 if (adapter->adapter_sglimit > BLOGIC_SG_LIMIT) in blogic_rdconfig()
1449 adapter->drvr_sglimit = BLOGIC_SG_LIMIT; in blogic_rdconfig()
1451 adapter->level_int = true; in blogic_rdconfig()
1452 adapter->wide = ext_setupinfo.wide; in blogic_rdconfig()
1453 adapter->differential = ext_setupinfo.differential; in blogic_rdconfig()
1454 adapter->scam = ext_setupinfo.scam; in blogic_rdconfig()
1455 adapter->ultra = ext_setupinfo.ultra; in blogic_rdconfig()
1458 information in the Host Adapter structure. in blogic_rdconfig()
1460 if (adapter->fw_ver[0] == '5' || (adapter->fw_ver[0] == '4' && in blogic_rdconfig()
1461 adapter->wide)) in blogic_rdconfig()
1462 adapter->ext_lun = true; in blogic_rdconfig()
1464 Issue the Inquire PCI Host Adapter Information command to read the in blogic_rdconfig()
1467 if (adapter->fw_ver[0] == '5') { in blogic_rdconfig()
1468 if (blogic_cmd(adapter, BLOGIC_INQ_PCI_INFO, NULL, 0, in blogic_rdconfig()
1471 return blogic_failure(adapter, in blogic_rdconfig()
1472 "INQUIRE PCI HOST ADAPTER INFORMATION"); in blogic_rdconfig()
1474 Save the Termination Information in the Host Adapter in blogic_rdconfig()
1478 adapter->terminfo_valid = true; in blogic_rdconfig()
1479 adapter->low_term = adapter_info.low_term; in blogic_rdconfig()
1480 adapter->high_term = adapter_info.high_term; in blogic_rdconfig()
1484 Issue the Fetch Host Adapter Local RAM command to read the in blogic_rdconfig()
1487 if (adapter->fw_ver[0] >= '4') { in blogic_rdconfig()
1490 if (blogic_cmd(adapter, BLOGIC_FETCH_LOCALRAM, &fetch_localram, in blogic_rdconfig()
1493 return blogic_failure(adapter, in blogic_rdconfig()
1494 "FETCH HOST ADAPTER LOCAL RAM"); in blogic_rdconfig()
1497 and Termination Information in the Host Adapter structure. in blogic_rdconfig()
1499 adapter->parity = autoscsi.parity; in blogic_rdconfig()
1500 adapter->reset_enabled = autoscsi.reset_enabled; in blogic_rdconfig()
1501 if (adapter->fw_ver[0] == '4') { in blogic_rdconfig()
1502 adapter->terminfo_valid = true; in blogic_rdconfig()
1503 adapter->low_term = autoscsi.low_term; in blogic_rdconfig()
1504 adapter->high_term = autoscsi.high_term; in blogic_rdconfig()
1509 SCAM Information in the Host Adapter structure. in blogic_rdconfig()
1511 adapter->wide_ok = autoscsi.wide_ok; in blogic_rdconfig()
1512 adapter->fast_ok = autoscsi.fast_ok; in blogic_rdconfig()
1513 adapter->sync_ok = autoscsi.sync_ok; in blogic_rdconfig()
1514 adapter->discon_ok = autoscsi.discon_ok; in blogic_rdconfig()
1515 if (adapter->ultra) in blogic_rdconfig()
1516 adapter->ultra_ok = autoscsi.ultra_ok; in blogic_rdconfig()
1517 if (adapter->scam) { in blogic_rdconfig()
1518 adapter->scam_enabled = autoscsi.scam_enabled; in blogic_rdconfig()
1519 adapter->scam_lev2 = autoscsi.scam_lev2; in blogic_rdconfig()
1523 Initialize fields in the Host Adapter structure for "S" and "A" in blogic_rdconfig()
1526 if (adapter->fw_ver[0] < '4') { in blogic_rdconfig()
1528 adapter->sync_ok = 0xFF; in blogic_rdconfig()
1529 if (adapter->adapter_bus_type == BLOGIC_EISA_BUS) { in blogic_rdconfig()
1531 adapter->fast_ok = 0xFF; in blogic_rdconfig()
1532 if (strcmp(adapter->model, "BT-757") == 0) in blogic_rdconfig()
1533 adapter->wide_ok = 0xFF; in blogic_rdconfig()
1536 adapter->discon_ok = 0xFF; in blogic_rdconfig()
1537 adapter->parity = setupinfo.parity; in blogic_rdconfig()
1538 adapter->reset_enabled = true; in blogic_rdconfig()
1544 adapter->maxdev = (adapter->wide ? 16 : 8); in blogic_rdconfig()
1545 adapter->maxlun = (adapter->ext_lun ? 32 : 8); in blogic_rdconfig()
1554 not supported, then the Host Adapter must scan all the Outgoing in blogic_rdconfig()
1561 set to the Mailbox Count, rather than the Host Adapter Queue in blogic_rdconfig()
1571 if (adapter->fw_ver[0] == '5') in blogic_rdconfig()
1572 adapter->adapter_qdepth = 192; in blogic_rdconfig()
1573 else if (adapter->fw_ver[0] == '4') in blogic_rdconfig()
1574 adapter->adapter_qdepth = 100; in blogic_rdconfig()
1576 adapter->adapter_qdepth = 30; in blogic_rdconfig()
1577 if (strcmp(adapter->fw_ver, "3.31") >= 0) { in blogic_rdconfig()
1578 adapter->strict_rr = true; in blogic_rdconfig()
1579 adapter->mbox_count = BLOGIC_MAX_MAILBOX; in blogic_rdconfig()
1581 adapter->strict_rr = false; in blogic_rdconfig()
1582 adapter->mbox_count = 32; in blogic_rdconfig()
1584 adapter->drvr_qdepth = adapter->mbox_count; in blogic_rdconfig()
1585 adapter->initccbs = 4 * BLOGIC_CCB_GRP_ALLOCSIZE; in blogic_rdconfig()
1586 adapter->inc_ccbs = BLOGIC_CCB_GRP_ALLOCSIZE; in blogic_rdconfig()
1594 adapter->tagq_ok = 0; in blogic_rdconfig()
1595 switch (adapter->fw_ver[0]) { in blogic_rdconfig()
1597 adapter->tagq_ok = 0xFFFF; in blogic_rdconfig()
1600 if (strcmp(adapter->fw_ver, "4.22") >= 0) in blogic_rdconfig()
1601 adapter->tagq_ok = 0xFFFF; in blogic_rdconfig()
1604 if (strcmp(adapter->fw_ver, "3.35") >= 0) in blogic_rdconfig()
1605 adapter->tagq_ok = 0xFFFF; in blogic_rdconfig()
1609 Determine the Host Adapter BIOS Address if the BIOS is enabled and in blogic_rdconfig()
1610 save it in the Host Adapter structure. The BIOS is disabled if the in blogic_rdconfig()
1613 adapter->bios_addr = ext_setupinfo.bios_addr << 12; in blogic_rdconfig()
1621 if (adapter->bios_addr > 0 && in blogic_rdconfig()
1622 strcmp(adapter->model, "BT-445S") == 0 && in blogic_rdconfig()
1623 strcmp(adapter->fw_ver, "3.37") < 0) in blogic_rdconfig()
1624 return blogic_failure(adapter, "Too old firmware"); in blogic_rdconfig()
1631 Initialize the Host Adapter Full Model Name from the Model Name. in blogic_rdconfig()
1633 strcpy(adapter->full_model, "BusLogic "); in blogic_rdconfig()
1634 strcat(adapter->full_model, adapter->model); in blogic_rdconfig()
1638 Adapter requires that ISA Bounce Buffers be used. The Tagged Queue in blogic_rdconfig()
1644 if (adapter->drvr_opts != NULL && in blogic_rdconfig()
1645 adapter->drvr_opts->qdepth[tgt_id] > 0) in blogic_rdconfig()
1646 qdepth = adapter->drvr_opts->qdepth[tgt_id]; in blogic_rdconfig()
1647 adapter->qdepth[tgt_id] = qdepth; in blogic_rdconfig()
1649 adapter->untag_qdepth = BLOGIC_UNTAG_DEPTH; in blogic_rdconfig()
1650 if (adapter->drvr_opts != NULL) in blogic_rdconfig()
1651 adapter->common_qdepth = adapter->drvr_opts->common_qdepth; in blogic_rdconfig()
1652 if (adapter->common_qdepth > 0 && in blogic_rdconfig()
1653 adapter->common_qdepth < adapter->untag_qdepth) in blogic_rdconfig()
1654 adapter->untag_qdepth = adapter->common_qdepth; in blogic_rdconfig()
1660 adapter->tagq_ok &= adapter->discon_ok; in blogic_rdconfig()
1665 if (adapter->drvr_opts != NULL) in blogic_rdconfig()
1666 adapter->tagq_ok = (adapter->drvr_opts->tagq_ok & in blogic_rdconfig()
1667 adapter->drvr_opts->tagq_ok_mask) | in blogic_rdconfig()
1668 (adapter->tagq_ok & ~adapter->drvr_opts->tagq_ok_mask); in blogic_rdconfig()
1675 if (adapter->drvr_opts != NULL && in blogic_rdconfig()
1676 adapter->drvr_opts->bus_settle_time > 0) in blogic_rdconfig()
1677 adapter->bus_settle_time = adapter->drvr_opts->bus_settle_time; in blogic_rdconfig()
1679 adapter->bus_settle_time = BLOGIC_BUS_SETTLE_TIME; in blogic_rdconfig()
1681 Indicate reading the Host Adapter Configuration completed in blogic_rdconfig()
1689 blogic_reportconfig reports the configuration of Host Adapter.
1692 static bool __init blogic_reportconfig(struct blogic_adapter *adapter) in blogic_reportconfig() argument
1694 unsigned short alltgt_mask = (1 << adapter->maxdev) - 1; in blogic_reportconfig()
1709 …Adapter\n", adapter, adapter->model, blogic_adapter_busnames[adapter->adapter_bus_type], (adapter-… in blogic_reportconfig()
1710 …/O Address: 0x%lX, IRQ Channel: %d/%s\n", adapter, adapter->fw_ver, adapter->io_addr, adapter->irq… in blogic_reportconfig()
1711 if (adapter->adapter_bus_type != BLOGIC_PCI_BUS) { in blogic_reportconfig()
1712 blogic_info(" DMA Channel: None, ", adapter); in blogic_reportconfig()
1713 if (adapter->bios_addr > 0) in blogic_reportconfig()
1714 blogic_info("BIOS Address: 0x%X, ", adapter, in blogic_reportconfig()
1715 adapter->bios_addr); in blogic_reportconfig()
1717 blogic_info("BIOS Address: None, ", adapter); in blogic_reportconfig()
1719 blogic_info(" PCI Bus: %d, Device: %d, Address: ", adapter, in blogic_reportconfig()
1720 adapter->bus, adapter->dev); in blogic_reportconfig()
1721 if (adapter->pci_addr > 0) in blogic_reportconfig()
1722 blogic_info("0x%lX, ", adapter, adapter->pci_addr); in blogic_reportconfig()
1724 blogic_info("Unassigned, ", adapter); in blogic_reportconfig()
1726 blogic_info("Host Adapter SCSI ID: %d\n", adapter, adapter->scsi_id); in blogic_reportconfig()
1728 adapter, (adapter->parity ? "Enabled" : "Disabled"), in blogic_reportconfig()
1729 (adapter->ext_trans_enable ? "Enabled" : "Disabled")); in blogic_reportconfig()
1730 alltgt_mask &= ~(1 << adapter->scsi_id); in blogic_reportconfig()
1731 sync_ok = adapter->sync_ok & alltgt_mask; in blogic_reportconfig()
1732 fast_ok = adapter->fast_ok & alltgt_mask; in blogic_reportconfig()
1733 ultra_ok = adapter->ultra_ok & alltgt_mask; in blogic_reportconfig()
1734 if ((blogic_multimaster_type(adapter) && in blogic_reportconfig()
1735 (adapter->fw_ver[0] >= '4' || in blogic_reportconfig()
1736 adapter->adapter_bus_type == BLOGIC_EISA_BUS)) || in blogic_reportconfig()
1737 blogic_flashpoint_type(adapter)) { in blogic_reportconfig()
1757 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_reportconfig()
1759 syncstr[adapter->scsi_id] = '#'; in blogic_reportconfig()
1760 syncstr[adapter->maxdev] = '\0'; in blogic_reportconfig()
1764 wide_ok = adapter->wide_ok & alltgt_mask; in blogic_reportconfig()
1770 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_reportconfig()
1772 widestr[adapter->scsi_id] = '#'; in blogic_reportconfig()
1773 widestr[adapter->maxdev] = '\0'; in blogic_reportconfig()
1775 discon_ok = adapter->discon_ok & alltgt_mask; in blogic_reportconfig()
1781 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_reportconfig()
1783 discon_str[adapter->scsi_id] = '#'; in blogic_reportconfig()
1784 discon_str[adapter->maxdev] = '\0'; in blogic_reportconfig()
1786 tagq_ok = adapter->tagq_ok & alltgt_mask; in blogic_reportconfig()
1792 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_reportconfig()
1794 tagq_str[adapter->scsi_id] = '#'; in blogic_reportconfig()
1795 tagq_str[adapter->maxdev] = '\0'; in blogic_reportconfig()
1798 adapter, syncmsg, widemsg); in blogic_reportconfig()
1799 blogic_info(" Disconnect/Reconnect: %s, Tagged Queuing: %s\n", adapter, in blogic_reportconfig()
1801 if (blogic_multimaster_type(adapter)) { in blogic_reportconfig()
1802 …Limit: %d of %d segments, Mailboxes: %d\n", adapter, adapter->drvr_sglimit, adapter->adapter_sglim… in blogic_reportconfig()
1803 …logic_info(" Driver Queue Depth: %d, Host Adapter Queue Depth: %d\n", adapter, adapter->drvr_qdep… in blogic_reportconfig()
1805 …r Queue Depth: %d, Scatter/Gather Limit: %d segments\n", adapter, adapter->drvr_qdepth, adapter->d… in blogic_reportconfig()
1806 blogic_info(" Tagged Queue Depth: ", adapter); in blogic_reportconfig()
1808 for (tgt_id = 1; tgt_id < adapter->maxdev; tgt_id++) in blogic_reportconfig()
1809 if (adapter->qdepth[tgt_id] != adapter->qdepth[0]) { in blogic_reportconfig()
1814 if (adapter->qdepth[0] > 0) in blogic_reportconfig()
1815 blogic_info("%d", adapter, adapter->qdepth[0]); in blogic_reportconfig()
1817 blogic_info("Automatic", adapter); in blogic_reportconfig()
1819 blogic_info("Individual", adapter); in blogic_reportconfig()
1820 blogic_info(", Untagged Queue Depth: %d\n", adapter, in blogic_reportconfig()
1821 adapter->untag_qdepth); in blogic_reportconfig()
1822 if (adapter->terminfo_valid) { in blogic_reportconfig()
1823 if (adapter->wide) in blogic_reportconfig()
1824 blogic_info(" SCSI Bus Termination: %s", adapter, in blogic_reportconfig()
1825 …(adapter->low_term ? (adapter->high_term ? "Both Enabled" : "Low Enabled") : (adapter->high_term ?… in blogic_reportconfig()
1827 blogic_info(" SCSI Bus Termination: %s", adapter, in blogic_reportconfig()
1828 (adapter->low_term ? "Enabled" : "Disabled")); in blogic_reportconfig()
1829 if (adapter->scam) in blogic_reportconfig()
1830 blogic_info(", SCAM: %s", adapter, in blogic_reportconfig()
1831 …(adapter->scam_enabled ? (adapter->scam_lev2 ? "Enabled, Level 2" : "Enabled, Level 1") : "Disable… in blogic_reportconfig()
1832 blogic_info("\n", adapter); in blogic_reportconfig()
1835 Indicate reporting the Host Adapter configuration completed in blogic_reportconfig()
1844 Host Adapter.
1847 static bool __init blogic_getres(struct blogic_adapter *adapter) in blogic_getres() argument
1849 if (adapter->irq_ch == 0) { in blogic_getres()
1851 adapter); in blogic_getres()
1857 if (request_irq(adapter->irq_ch, blogic_inthandler, IRQF_SHARED, in blogic_getres()
1858 adapter->full_model, adapter) < 0) { in blogic_getres()
1860 adapter, adapter->irq_ch); in blogic_getres()
1863 adapter->irq_acquired = true; in blogic_getres()
1876 static void blogic_relres(struct blogic_adapter *adapter) in blogic_relres() argument
1881 if (adapter->irq_acquired) in blogic_relres()
1882 free_irq(adapter->irq_ch, adapter); in blogic_relres()
1886 if (adapter->mbox_space) in blogic_relres()
1887 dma_free_coherent(&adapter->pci_device->dev, adapter->mbox_sz, in blogic_relres()
1888 adapter->mbox_space, adapter->mbox_space_handle); in blogic_relres()
1889 pci_dev_put(adapter->pci_device); in blogic_relres()
1890 adapter->mbox_space = NULL; in blogic_relres()
1891 adapter->mbox_space_handle = 0; in blogic_relres()
1892 adapter->mbox_sz = 0; in blogic_relres()
1897 blogic_initadapter initializes Host Adapter. This is the only
1898 function called during SCSI Host Adapter detection which modifies the state
1899 of the Host Adapter from its initial power on or hard reset state.
1902 static bool blogic_initadapter(struct blogic_adapter *adapter) in blogic_initadapter() argument
1913 adapter->firstccb = NULL; in blogic_initadapter()
1914 adapter->lastccb = NULL; in blogic_initadapter()
1921 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) { in blogic_initadapter()
1922 adapter->bdr_pend[tgt_id] = NULL; in blogic_initadapter()
1923 adapter->tgt_flags[tgt_id].tagq_active = false; in blogic_initadapter()
1924 adapter->tgt_flags[tgt_id].cmd_good = false; in blogic_initadapter()
1925 adapter->active_cmds[tgt_id] = 0; in blogic_initadapter()
1926 adapter->cmds_since_rst[tgt_id] = 0; in blogic_initadapter()
1932 if (blogic_flashpoint_type(adapter)) in blogic_initadapter()
1938 …adapter->mbox_sz = adapter->mbox_count * (sizeof(struct blogic_outbox) + sizeof(struct blogic_inbo… in blogic_initadapter()
1939 adapter->mbox_space = dma_alloc_coherent(&adapter->pci_device->dev, in blogic_initadapter()
1940 adapter->mbox_sz, &adapter->mbox_space_handle, in blogic_initadapter()
1942 if (adapter->mbox_space == NULL) in blogic_initadapter()
1943 return blogic_failure(adapter, "MAILBOX ALLOCATION"); in blogic_initadapter()
1944 adapter->first_outbox = (struct blogic_outbox *) adapter->mbox_space; in blogic_initadapter()
1945 adapter->last_outbox = adapter->first_outbox + adapter->mbox_count - 1; in blogic_initadapter()
1946 adapter->next_outbox = adapter->first_outbox; in blogic_initadapter()
1947 adapter->first_inbox = (struct blogic_inbox *) (adapter->last_outbox + 1); in blogic_initadapter()
1948 adapter->last_inbox = adapter->first_inbox + adapter->mbox_count - 1; in blogic_initadapter()
1949 adapter->next_inbox = adapter->first_inbox; in blogic_initadapter()
1954 memset(adapter->first_outbox, 0, in blogic_initadapter()
1955 adapter->mbox_count * sizeof(struct blogic_outbox)); in blogic_initadapter()
1956 memset(adapter->first_inbox, 0, in blogic_initadapter()
1957 adapter->mbox_count * sizeof(struct blogic_inbox)); in blogic_initadapter()
1960 Initialize the Host Adapter's Pointer to the Outgoing/Incoming in blogic_initadapter()
1963 extmbox_req.mbox_count = adapter->mbox_count; in blogic_initadapter()
1964 extmbox_req.base_mbox_addr = (u32) adapter->mbox_space_handle; in blogic_initadapter()
1965 if (blogic_cmd(adapter, BLOGIC_INIT_EXT_MBOX, &extmbox_req, in blogic_initadapter()
1967 return blogic_failure(adapter, "MAILBOX INITIALIZATION"); in blogic_initadapter()
1969 Enable Strict Round Robin Mode if supported by the Host Adapter. In in blogic_initadapter()
1970 Strict Round Robin Mode, the Host Adapter only looks at the next in blogic_initadapter()
1976 if (adapter->strict_rr) { in blogic_initadapter()
1978 if (blogic_cmd(adapter, BLOGIC_STRICT_RR, &rr_req, in blogic_initadapter()
1980 return blogic_failure(adapter, in blogic_initadapter()
1988 if (adapter->ext_lun) { in blogic_initadapter()
1990 if (blogic_cmd(adapter, BLOGIC_SETCCB_FMT, &setccb_fmt, in blogic_initadapter()
1992 return blogic_failure(adapter, "SET CCB FORMAT"); in blogic_initadapter()
1999 if (!adapter->adapter_initd) { in blogic_initadapter()
2000 blogic_info("*** %s Initialized Successfully ***\n", adapter, in blogic_initadapter()
2001 adapter->full_model); in blogic_initadapter()
2002 blogic_info("\n", adapter); in blogic_initadapter()
2004 blogic_warn("*** %s Initialized Successfully ***\n", adapter, in blogic_initadapter()
2005 adapter->full_model); in blogic_initadapter()
2006 adapter->adapter_initd = true; in blogic_initadapter()
2009 Indicate the Host Adapter Initialization completed successfully. in blogic_initadapter()
2017 through Host Adapter.
2020 static bool __init blogic_inquiry(struct blogic_adapter *adapter) in blogic_inquiry() argument
2030 Wait a few seconds between the Host Adapter Hard Reset which in blogic_inquiry()
2035 blogic_delay(adapter->bus_settle_time); in blogic_inquiry()
2039 if (blogic_flashpoint_type(adapter)) in blogic_inquiry()
2044 if (adapter->drvr_opts != NULL && adapter->drvr_opts->stop_tgt_inquiry) in blogic_inquiry()
2056 if (strcmp(adapter->fw_ver, "4.25") >= 0) { in blogic_inquiry()
2066 if (blogic_cmd(adapter, BLOGIC_INQ_DEV, NULL, 0, in blogic_inquiry()
2069 return blogic_failure(adapter, "INQUIRE TARGET DEVICES"); in blogic_inquiry()
2070 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_inquiry()
2071 adapter->tgt_flags[tgt_id].tgt_exists = in blogic_inquiry()
2082 if (blogic_cmd(adapter, BLOGIC_INQ_DEV0TO7, NULL, 0, in blogic_inquiry()
2085 return blogic_failure(adapter, in blogic_inquiry()
2088 adapter->tgt_flags[tgt_id].tgt_exists = in blogic_inquiry()
2095 if (blogic_cmd(adapter, BLOGIC_INQ_SETUPINFO, &req_replylen, in blogic_inquiry()
2098 return blogic_failure(adapter, "INQUIRE SETUP INFORMATION"); in blogic_inquiry()
2099 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_inquiry()
2100 …adapter->sync_offset[tgt_id] = (tgt_id < 8 ? setupinfo.sync0to7[tgt_id].offset : setupinfo.sync8to… in blogic_inquiry()
2101 if (strcmp(adapter->fw_ver, "5.06L") >= 0) in blogic_inquiry()
2102 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_inquiry()
2103 …adapter->tgt_flags[tgt_id].wide_active = (tgt_id < 8 ? (setupinfo.wide_tx_active0to7 & (1 << tgt_i… in blogic_inquiry()
2107 if (adapter->fw_ver[0] >= '3') { in blogic_inquiry()
2115 if (blogic_cmd(adapter, BLOGIC_INQ_SYNC_PERIOD, &req_replylen, in blogic_inquiry()
2118 return blogic_failure(adapter, in blogic_inquiry()
2120 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_inquiry()
2121 adapter->sync_period[tgt_id] = sync_period[tgt_id]; in blogic_inquiry()
2123 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_inquiry()
2125 adapter->sync_period[tgt_id] = 20 + 5 * setupinfo.sync0to7[tgt_id].tx_period; in blogic_inquiry()
2137 ensuring exclusive access to the Host Adapter hardware and data structures
2138 through explicit acquisition and release of the Host Adapter's Lock.
2141 static void __init blogic_inithoststruct(struct blogic_adapter *adapter, in blogic_inithoststruct() argument
2144 host->max_id = adapter->maxdev; in blogic_inithoststruct()
2145 host->max_lun = adapter->maxlun; in blogic_inithoststruct()
2147 host->unique_id = adapter->io_addr; in blogic_inithoststruct()
2148 host->this_id = adapter->scsi_id; in blogic_inithoststruct()
2149 host->can_queue = adapter->drvr_qdepth; in blogic_inithoststruct()
2150 host->sg_tablesize = adapter->drvr_sglimit; in blogic_inithoststruct()
2151 host->cmd_per_lun = adapter->untag_qdepth; in blogic_inithoststruct()
2164 struct blogic_adapter *adapter = in blogic_slaveconfig() local
2167 int qdepth = adapter->qdepth[tgt_id]; in blogic_slaveconfig()
2169 if (adapter->tgt_flags[tgt_id].tagq_ok && in blogic_slaveconfig()
2170 (adapter->tagq_ok & (1 << tgt_id))) { in blogic_slaveconfig()
2173 adapter->qdepth[tgt_id] = qdepth; in blogic_slaveconfig()
2176 adapter->tagq_ok &= ~(1 << tgt_id); in blogic_slaveconfig()
2177 qdepth = adapter->untag_qdepth; in blogic_slaveconfig()
2178 adapter->qdepth[tgt_id] = qdepth; in blogic_slaveconfig()
2182 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) in blogic_slaveconfig()
2183 if (adapter->tgt_flags[tgt_id].tgt_exists) in blogic_slaveconfig()
2184 qdepth += adapter->qdepth[tgt_id]; in blogic_slaveconfig()
2185 if (qdepth > adapter->alloc_ccbs) in blogic_slaveconfig()
2186 blogic_create_addlccbs(adapter, qdepth - adapter->alloc_ccbs, in blogic_slaveconfig()
2194 reporting the configuration of each BusLogic Host Adapter it finds. It
2202 struct blogic_adapter *adapter; in blogic_init() local
2221 adapter = kzalloc(sizeof(struct blogic_adapter), GFP_KERNEL); in blogic_init()
2222 if (adapter == NULL) { in blogic_init()
2224 blogic_err("BusLogic: Unable to allocate Prototype Host Adapter\n", NULL); in blogic_init()
2232 blogic_init_probeinfo_list(adapter); in blogic_init()
2236 struct blogic_adapter *myadapter = adapter; in blogic_init()
2260 Probe the Host Adapter. If unsuccessful, abort further in blogic_init()
2269 Hard Reset the Host Adapter. If unsuccessful, abort further in blogic_init()
2278 Check the Host Adapter. If unsuccessful, abort further in blogic_init()
2309 memcpy(myadapter, adapter, sizeof(struct blogic_adapter)); in blogic_init()
2313 Add Host Adapter to the end of the list of registered in blogic_init()
2319 Read the Host Adapter Configuration, Configure the Host in blogic_init()
2320 Adapter, Acquire the System Resources necessary to use in blogic_init()
2321 the Host Adapter, then Create the Initial CCBs, Initialize in blogic_init()
2322 the Host Adapter, and finally perform Target Device in blogic_init()
2324 assumed to be due to a problem with the Host Adapter, in blogic_init()
2326 as belonging to a BusLogic Host Adapter. The I/O Address in blogic_init()
2329 Adapter. in blogic_init()
2340 range so that the Model Name of the Host Adapter in blogic_init()
2376 An error occurred during Host Adapter Configuration in blogic_init()
2377 Querying, Host Adapter Configuration, Resource in blogic_init()
2378 Acquisition, CCB Creation, Host Adapter in blogic_init()
2380 remove Host Adapter from the list of registered in blogic_init()
2392 kfree(adapter); in blogic_init()
2401 support a specific Host Adapter, including the I/O Address range, and
2402 unregisters the BusLogic Host Adapter.
2405 static int __exit blogic_deladapter(struct blogic_adapter *adapter) in blogic_deladapter() argument
2407 struct Scsi_Host *host = adapter->scsi_host; in blogic_deladapter()
2415 if (blogic_flashpoint_type(adapter)) in blogic_deladapter()
2416 FlashPoint_ReleaseHostAdapter(adapter->cardhandle); in blogic_deladapter()
2419 support Host Adapter. in blogic_deladapter()
2421 blogic_destroy_ccbs(adapter); in blogic_deladapter()
2422 blogic_relres(adapter); in blogic_deladapter()
2426 release_region(adapter->io_addr, adapter->addr_count); in blogic_deladapter()
2428 Remove Host Adapter from the list of registered BusLogic in blogic_deladapter()
2431 list_del(&adapter->host_list); in blogic_deladapter()
2444 struct blogic_adapter *adapter = ccb->adapter; in blogic_qcompleted_ccb() local
2448 if (adapter->firstccb == NULL) { in blogic_qcompleted_ccb()
2449 adapter->firstccb = ccb; in blogic_qcompleted_ccb()
2450 adapter->lastccb = ccb; in blogic_qcompleted_ccb()
2452 adapter->lastccb->next = ccb; in blogic_qcompleted_ccb()
2453 adapter->lastccb = ccb; in blogic_qcompleted_ccb()
2455 adapter->active_cmds[ccb->tgt_id]--; in blogic_qcompleted_ccb()
2461 the Host Adapter Status and Target Device Status.
2464 static int blogic_resultcode(struct blogic_adapter *adapter, in blogic_resultcode() argument
2483 adapter, adapter_status); in blogic_resultcode()
2508 blogic_warn("Unknown Host Adapter Status 0x%02X\n", adapter, in blogic_resultcode()
2521 blogic_inbox_to_ccb(struct blogic_adapter *adapter, struct blogic_inbox *inbox) in blogic_inbox_to_ccb() argument
2525 for (ccb = adapter->all_ccbs; ccb; ccb = ccb->next_all) in blogic_inbox_to_ccb()
2536 static void blogic_scan_inbox(struct blogic_adapter *adapter) in blogic_scan_inbox() argument
2551 struct blogic_inbox *next_inbox = adapter->next_inbox; in blogic_scan_inbox()
2555 struct blogic_ccb *ccb = blogic_inbox_to_ccb(adapter, next_inbox); in blogic_scan_inbox()
2561 blogic_warn("Could not find CCB for dma address %x\n", adapter, next_inbox->ccb); in blogic_scan_inbox()
2576 the Host Adapter firmware. in blogic_scan_inbox()
2578 …blogic_warn("Illegal CCB #%ld status %d in Incoming Mailbox\n", adapter, ccb->serial, ccb->status); in blogic_scan_inbox()
2582 if (++next_inbox > adapter->last_inbox) in blogic_scan_inbox()
2583 next_inbox = adapter->first_inbox; in blogic_scan_inbox()
2585 adapter->next_inbox = next_inbox; in blogic_scan_inbox()
2591 Adapter setting the SCSI Command Result Codes, deallocating the CCBs, and
2592 calling the SCSI Subsystem Completion Routines. The Host Adapter's Lock
2596 static void blogic_process_ccbs(struct blogic_adapter *adapter) in blogic_process_ccbs() argument
2598 if (adapter->processing_ccbs) in blogic_process_ccbs()
2600 adapter->processing_ccbs = true; in blogic_process_ccbs()
2601 while (adapter->firstccb != NULL) { in blogic_process_ccbs()
2602 struct blogic_ccb *ccb = adapter->firstccb; in blogic_process_ccbs()
2604 adapter->firstccb = ccb->next; in blogic_process_ccbs()
2605 if (adapter->firstccb == NULL) in blogic_process_ccbs()
2606 adapter->lastccb = NULL; in blogic_process_ccbs()
2613 blogic_warn("Bus Device Reset CCB #%ld to Target %d Completed\n", adapter, ccb->serial, tgt_id); in blogic_process_ccbs()
2614 blogic_inc_count(&adapter->tgt_stats[tgt_id].bdr_done); in blogic_process_ccbs()
2615 adapter->tgt_flags[tgt_id].tagq_active = false; in blogic_process_ccbs()
2616 adapter->cmds_since_rst[tgt_id] = 0; in blogic_process_ccbs()
2617 adapter->last_resetdone[tgt_id] = jiffies; in blogic_process_ccbs()
2619 Place CCB back on the Host Adapter's free list. in blogic_process_ccbs()
2627 CCB in the Host Adapter (i.e., a Synchronous Bus in blogic_process_ccbs()
2641 Iterate over the CCBs for this Host Adapter in blogic_process_ccbs()
2645 for (ccb = adapter->all_ccbs; ccb != NULL; in blogic_process_ccbs()
2651 adapter->active_cmds[tgt_id]--; in blogic_process_ccbs()
2655 adapter->bdr_pend[tgt_id] = NULL; in blogic_process_ccbs()
2658 Translate the Completion Code, Host Adapter Status, in blogic_process_ccbs()
2666 blogic_warn("CCB #%ld to Target %d Impossible State\n", adapter, ccb->serial, ccb->tgt_id); in blogic_process_ccbs()
2669 adapter->tgt_stats[ccb->tgt_id] in blogic_process_ccbs()
2671 adapter->tgt_flags[ccb->tgt_id] in blogic_process_ccbs()
2677 adapter, ccb->serial, ccb->tgt_id); in blogic_process_ccbs()
2678 blogic_inc_count(&adapter->tgt_stats[ccb->tgt_id].aborts_done); in blogic_process_ccbs()
2682 command->result = blogic_resultcode(adapter, in blogic_process_ccbs()
2685 adapter->tgt_stats[ccb->tgt_id] in blogic_process_ccbs()
2690 …"Adapter Status %02X Target Status %02X\n", adapter, ccb->serial, ccb->tgt_id, command->result, cc… in blogic_process_ccbs()
2691 blogic_notice("CDB ", adapter); in blogic_process_ccbs()
2693 blogic_notice(" %02X", adapter, ccb->cdb[i]); in blogic_process_ccbs()
2694 blogic_notice("\n", adapter); in blogic_process_ccbs()
2695 blogic_notice("Sense ", adapter); in blogic_process_ccbs()
2697 blogic_notice(" %02X", adapter, command->sense_buffer[i]); in blogic_process_ccbs()
2698 blogic_notice("\n", adapter); in blogic_process_ccbs()
2711 &adapter->tgt_flags[ccb->tgt_id]; in blogic_process_ccbs()
2719 Place CCB back on the Host Adapter's free list. in blogic_process_ccbs()
2728 adapter->processing_ccbs = false; in blogic_process_ccbs()
2739 struct blogic_adapter *adapter = (struct blogic_adapter *) devid; in blogic_inthandler() local
2742 Acquire exclusive access to Host Adapter. in blogic_inthandler()
2744 spin_lock_irqsave(adapter->scsi_host->host_lock, processor_flag); in blogic_inthandler()
2746 Handle Interrupts appropriately for each Host Adapter type. in blogic_inthandler()
2748 if (blogic_multimaster_type(adapter)) { in blogic_inthandler()
2751 Read the Host Adapter Interrupt Register. in blogic_inthandler()
2753 intreg.all = blogic_rdint(adapter); in blogic_inthandler()
2756 Acknowledge the interrupt and reset the Host Adapter in blogic_inthandler()
2759 blogic_intreset(adapter); in blogic_inthandler()
2767 adapter->adapter_extreset = true; in blogic_inthandler()
2769 blogic_scan_inbox(adapter); in blogic_inthandler()
2771 adapter->adapter_cmd_complete = true; in blogic_inthandler()
2775 Check if there is a pending interrupt for this Host Adapter. in blogic_inthandler()
2777 if (FlashPoint_InterruptPending(adapter->cardhandle)) in blogic_inthandler()
2778 switch (FlashPoint_HandleInterrupt(adapter->cardhandle)) { in blogic_inthandler()
2782 adapter->adapter_extreset = true; in blogic_inthandler()
2785 blogic_warn("Internal FlashPoint Error detected - Resetting Host Adapter\n", adapter); in blogic_inthandler()
2786 adapter->adapter_intern_err = true; in blogic_inthandler()
2793 if (adapter->firstccb != NULL) in blogic_inthandler()
2794 blogic_process_ccbs(adapter); in blogic_inthandler()
2796 Reset the Host Adapter if requested. in blogic_inthandler()
2798 if (adapter->adapter_extreset) { in blogic_inthandler()
2799 blogic_warn("Resetting %s due to External SCSI Bus Reset\n", adapter, adapter->full_model); in blogic_inthandler()
2800 blogic_inc_count(&adapter->ext_resets); in blogic_inthandler()
2801 blogic_resetadapter(adapter, false); in blogic_inthandler()
2802 adapter->adapter_extreset = false; in blogic_inthandler()
2803 } else if (adapter->adapter_intern_err) { in blogic_inthandler()
2804 blogic_warn("Resetting %s due to Host Adapter Internal Error\n", adapter, adapter->full_model); in blogic_inthandler()
2805 blogic_inc_count(&adapter->adapter_intern_errors); in blogic_inthandler()
2806 blogic_resetadapter(adapter, true); in blogic_inthandler()
2807 adapter->adapter_intern_err = false; in blogic_inthandler()
2810 Release exclusive access to Host Adapter. in blogic_inthandler()
2812 spin_unlock_irqrestore(adapter->scsi_host->host_lock, processor_flag); in blogic_inthandler()
2819 Mailbox for execution by Host Adapter. The Host Adapter's Lock should
2823 static bool blogic_write_outbox(struct blogic_adapter *adapter, in blogic_write_outbox() argument
2828 next_outbox = adapter->next_outbox; in blogic_write_outbox()
2833 since the Host Adapter is operating asynchronously and the in blogic_write_outbox()
2835 by the Host Adapter. in blogic_write_outbox()
2839 blogic_execmbox(adapter); in blogic_write_outbox()
2840 if (++next_outbox > adapter->last_outbox) in blogic_write_outbox()
2841 next_outbox = adapter->first_outbox; in blogic_write_outbox()
2842 adapter->next_outbox = next_outbox; in blogic_write_outbox()
2844 adapter->active_cmds[ccb->tgt_id]++; in blogic_write_outbox()
2846 adapter->tgt_stats[ccb->tgt_id].cmds_tried++; in blogic_write_outbox()
2857 struct blogic_adapter *adapter = in blogic_hostreset() local
2861 struct blogic_tgt_stats *stats = &adapter->tgt_stats[id]; in blogic_hostreset()
2868 rc = blogic_resetadapter(adapter, false); in blogic_hostreset()
2875 Outgoing Mailbox for execution by the associated Host Adapter.
2881 struct blogic_adapter *adapter = in blogic_qcmd_lck() local
2884 &adapter->tgt_flags[command->device->id]; in blogic_qcmd_lck()
2885 struct blogic_tgt_stats *tgt_stats = adapter->tgt_stats; in blogic_qcmd_lck()
2897 Host Adapter for any errors, so they should not be executed in blogic_qcmd_lck()
2907 Allocate a CCB from the Host Adapter's free list. In the unlikely in blogic_qcmd_lck()
2909 wait 1 second and try again. If that fails, the Host Adapter is in blogic_qcmd_lck()
2910 probably hung so signal an error as a Host Adapter Hard Reset in blogic_qcmd_lck()
2913 ccb = blogic_alloc_ccb(adapter); in blogic_qcmd_lck()
2915 spin_unlock_irq(adapter->scsi_host->host_lock); in blogic_qcmd_lck()
2917 spin_lock_irq(adapter->scsi_host->host_lock); in blogic_qcmd_lck()
2918 ccb = blogic_alloc_ccb(adapter); in blogic_qcmd_lck()
2937 if (blogic_multimaster_type(adapter)) in blogic_qcmd_lck()
2983 Tagged Queue fashion so that the Host Adapter and Target Device in blogic_qcmd_lck()
2996 if (adapter->cmds_since_rst[tgt_id]++ >= BLOGIC_MAX_TAG_DEPTH && in blogic_qcmd_lck()
2998 adapter->active_cmds[tgt_id] == 0 in blogic_qcmd_lck()
3000 (adapter->tagq_ok & (1 << tgt_id))) { in blogic_qcmd_lck()
3003 adapter, tgt_id); in blogic_qcmd_lck()
3022 if (adapter->active_cmds[tgt_id] == 0) in blogic_qcmd_lck()
3023 adapter->last_seqpoint[tgt_id] = jiffies; in blogic_qcmd_lck()
3025 adapter->last_seqpoint[tgt_id] + 4 * HZ)) { in blogic_qcmd_lck()
3026 adapter->last_seqpoint[tgt_id] = jiffies; in blogic_qcmd_lck()
3029 if (adapter->ext_lun) { in blogic_qcmd_lck()
3040 sense_buf = dma_map_single(&adapter->pci_device->dev, in blogic_qcmd_lck()
3043 if (dma_mapping_error(&adapter->pci_device->dev, sense_buf)) { in blogic_qcmd_lck()
3045 adapter); in blogic_qcmd_lck()
3050 if (blogic_multimaster_type(adapter)) { in blogic_qcmd_lck()
3057 again. If that fails, the Host Adapter is probably hung in blogic_qcmd_lck()
3058 so signal an error as a Host Adapter Hard Reset should in blogic_qcmd_lck()
3061 if (!blogic_write_outbox(adapter, BLOGIC_MBOX_START, ccb)) { in blogic_qcmd_lck()
3062 spin_unlock_irq(adapter->scsi_host->host_lock); in blogic_qcmd_lck()
3063 blogic_warn("Unable to write Outgoing Mailbox - Pausing for 1 second\n", adapter); in blogic_qcmd_lck()
3065 spin_lock_irq(adapter->scsi_host->host_lock); in blogic_qcmd_lck()
3066 if (!blogic_write_outbox(adapter, BLOGIC_MBOX_START, in blogic_qcmd_lck()
3068 blogic_warn("Still unable to write Outgoing Mailbox - Host Adapter Dead?\n", adapter); in blogic_qcmd_lck()
3080 adapter->active_cmds[tgt_id]++; in blogic_qcmd_lck()
3082 FlashPoint_StartCCB(adapter->cardhandle, ccb); in blogic_qcmd_lck()
3089 blogic_process_ccbs(adapter); in blogic_qcmd_lck()
3103 struct blogic_adapter *adapter = in DEF_SCSI_QCMD()
3108 blogic_inc_count(&adapter->tgt_stats[tgt_id].aborts_request); in DEF_SCSI_QCMD()
3114 for (ccb = adapter->all_ccbs; ccb != NULL; ccb = ccb->next_all) in DEF_SCSI_QCMD()
3118 blogic_warn("Unable to Abort Command to Target %d - No CCB Found\n", adapter, tgt_id); in DEF_SCSI_QCMD()
3121 blogic_warn("Unable to Abort Command to Target %d - CCB Completed\n", adapter, tgt_id); in DEF_SCSI_QCMD()
3124 blogic_warn("Unable to Abort Command to Target %d - CCB Reset\n", adapter, tgt_id); in DEF_SCSI_QCMD()
3127 if (blogic_multimaster_type(adapter)) { in DEF_SCSI_QCMD()
3132 commands are not sent by the Host Adapter until the queue in DEF_SCSI_QCMD()
3140 if (adapter->tgt_flags[tgt_id].tagq_active && in DEF_SCSI_QCMD()
3141 adapter->fw_ver[0] < '5') { in DEF_SCSI_QCMD()
3142 …blogic_warn("Unable to Abort CCB #%ld to Target %d - Abort Tag Not Supported\n", adapter, ccb->ser… in DEF_SCSI_QCMD()
3144 } else if (blogic_write_outbox(adapter, BLOGIC_MBOX_ABORT, in DEF_SCSI_QCMD()
3147 adapter, ccb->serial, tgt_id); in DEF_SCSI_QCMD()
3148 blogic_inc_count(&adapter->tgt_stats[tgt_id].aborts_tried); in DEF_SCSI_QCMD()
3151 …blogic_warn("Unable to Abort CCB #%ld to Target %d - No Outgoing Mailboxes\n", adapter, ccb->seria… in DEF_SCSI_QCMD()
3159 blogic_warn("Aborting CCB #%ld to Target %d\n", adapter, in DEF_SCSI_QCMD()
3161 blogic_inc_count(&adapter->tgt_stats[tgt_id].aborts_tried); in DEF_SCSI_QCMD()
3162 FlashPoint_AbortCCB(adapter->cardhandle, ccb); in DEF_SCSI_QCMD()
3169 blogic_process_ccbs(adapter); in DEF_SCSI_QCMD()
3177 blogic_resetadapter resets Host Adapter if possible, marking all
3181 static int blogic_resetadapter(struct blogic_adapter *adapter, bool hard_reset)
3187 * Attempt to Reset and Reinitialize the Host Adapter.
3190 if (!(blogic_hwreset(adapter, hard_reset) &&
3191 blogic_initadapter(adapter))) {
3192 blogic_err("Resetting %s Failed\n", adapter,
3193 adapter->full_model);
3201 for (ccb = adapter->all_ccbs; ccb != NULL; ccb = ccb->next_all)
3205 * Wait a few seconds between the Host Adapter Hard Reset which
3212 spin_unlock_irq(adapter->scsi_host->host_lock);
3213 blogic_delay(adapter->bus_settle_time);
3214 spin_lock_irq(adapter->scsi_host->host_lock);
3217 for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++) {
3218 adapter->last_resettried[tgt_id] = jiffies;
3219 adapter->last_resetdone[tgt_id] = jiffies;
3244 struct blogic_adapter *adapter = in blogic_diskparam() local
3249 if (adapter->ext_trans_enable && capacity >= 2 * 1024 * 1024 /* 1 GB in 512 byte sectors */) { in blogic_diskparam()
3302 …blogic_warn("Adopting Geometry %d/%d from Partition Table\n", adapter, diskparam->heads, diskparam… in blogic_diskparam()
3304 …blogic_warn("Warning: Partition Table appears to have Geometry %d/%d which is\n", adapter, part_en… in blogic_diskparam()
3305 …blogic_warn("not compatible with current BusLogic Host Adapter Geometry %d/%d\n", adapter, diskpar… in blogic_diskparam()
3320 struct blogic_adapter *adapter = in blogic_write_info() local
3324 tgt_stats = adapter->tgt_stats; in blogic_write_info()
3325 adapter->ext_resets = 0; in blogic_write_info()
3326 adapter->adapter_intern_errors = 0; in blogic_write_info()
3333 struct blogic_adapter *adapter = (struct blogic_adapter *) shost->hostdata; in blogic_show_info() local
3337 tgt_stats = adapter->tgt_stats; in blogic_show_info()
3338 seq_write(m, adapter->msgbuf, adapter->msgbuflen); in blogic_show_info()
3341 Currently Allocated CCBs: %d\n", adapter->drvr_qdepth, adapter->alloc_ccbs); in blogic_show_info()
3347 for (tgt = 0; tgt < adapter->maxdev; tgt++) { in blogic_show_info()
3348 struct blogic_tgt_flags *tgt_flags = &adapter->tgt_flags[tgt]; in blogic_show_info()
3351 …s", tgt, (tgt_flags->tagq_ok ? (tgt_flags->tagq_active ? " Active" : (adapter->tagq_ok & (1 << … in blogic_show_info()
3355 …" %3d %3u %9u %9u\n", adapter->qdepth[tgt], adapter->active_cmds[tgt], tgt_stats[tgt]… in blogic_show_info()
3360 for (tgt = 0; tgt < adapter->maxdev; tgt++) { in blogic_show_info()
3361 struct blogic_tgt_flags *tgt_flags = &adapter->tgt_flags[tgt]; in blogic_show_info()
3377 for (tgt = 0; tgt < adapter->maxdev; tgt++) { in blogic_show_info()
3378 struct blogic_tgt_flags *tgt_flags = &adapter->tgt_flags[tgt]; in blogic_show_info()
3393 for (tgt = 0; tgt < adapter->maxdev; tgt++) { in blogic_show_info()
3394 struct blogic_tgt_flags *tgt_flags = &adapter->tgt_flags[tgt]; in blogic_show_info()
3409 Command Aborts Bus Device Resets Host Adapter Resets\n\ in blogic_show_info()
3413 for (tgt = 0; tgt < adapter->maxdev; tgt++) { in blogic_show_info()
3414 struct blogic_tgt_flags *tgt_flags = &adapter->tgt_flags[tgt]; in blogic_show_info()
3428 seq_printf(m, "\nExternal Host Adapter Resets: %d\n", adapter->ext_resets); in blogic_show_info()
3429 seq_printf(m, "Host Adapter Internal Errors: %d\n", adapter->adapter_intern_errors); in blogic_show_info()
3439 struct blogic_adapter *adapter, ...) in blogic_msg() argument
3446 va_start(args, adapter); in blogic_msg()
3451 strcpy(&adapter->msgbuf[adapter->msgbuflen], buf); in blogic_msg()
3452 adapter->msgbuflen += len; in blogic_msg()
3456 strcpy(&adapter->msgbuf[adapter->msgbuflen], buf); in blogic_msg()
3457 adapter->msgbuflen += len; in blogic_msg()
3460 printk("%sscsi%d: %s", blogic_msglevelmap[msglevel], adapter->host_no, buf); in blogic_msg()
3465 if (adapter != NULL && adapter->adapter_initd) in blogic_msg()
3466 printk("%sscsi%d: %s", blogic_msglevelmap[msglevel], adapter->host_no, buf); in blogic_msg()
3507 command line. Individual option specifications for a single host adapter are
3510 selected host adapter.