isp_freebsd.c (45286) | isp_freebsd.c (46581) |
---|---|
1/* $Id: isp_freebsd.c,v 1.15 1999/04/04 01:35:03 mjacob Exp $ */ | 1/* $Id: isp_freebsd.c,v 1.16 1999/04/04 02:22:42 mjacob Exp $ */ |
2/* release_4_3_99 */ 3/* 4 * Platform (FreeBSD) dependent common attachment code for Qlogic adapters. 5 * 6 *--------------------------------------- 7 * Copyright (c) 1997, 1998 by Matthew Jacob 8 * NASA/Ames Research Center 9 * All rights reserved. --- 68 unchanged lines hidden (view full) --- 78 79 xpt_setup_ccb(&csa.ccb_h, isp->isp_path, 5); 80 csa.ccb_h.func_code = XPT_SASYNC_CB; 81 csa.event_enable = AC_LOST_DEVICE; 82 csa.callback = isp_cam_async; 83 csa.callback_arg = isp->isp_sim; 84 xpt_action((union ccb *)&csa); 85 | 2/* release_4_3_99 */ 3/* 4 * Platform (FreeBSD) dependent common attachment code for Qlogic adapters. 5 * 6 *--------------------------------------- 7 * Copyright (c) 1997, 1998 by Matthew Jacob 8 * NASA/Ames Research Center 9 * All rights reserved. --- 68 unchanged lines hidden (view full) --- 78 79 xpt_setup_ccb(&csa.ccb_h, isp->isp_path, 5); 80 csa.ccb_h.func_code = XPT_SASYNC_CB; 81 csa.event_enable = AC_LOST_DEVICE; 82 csa.callback = isp_cam_async; 83 csa.callback_arg = isp->isp_sim; 84 xpt_action((union ccb *)&csa); 85 |
86 /* 87 * Set base transfer capabilities for Fibre Channel. 88 * Technically not correct because we don't know 89 * what media we're running on top of- but we'll 90 * look good if we always say 100MB/s. 91 */ 92 if (isp->isp_type & ISP_HA_FC) { 93 isp->isp_sim->base_transfer_speed = 100000; 94 } | |
95 if (isp->isp_state == ISP_INITSTATE) 96 isp->isp_state = ISP_RUNSTATE; 97} 98 99static void 100isp_cam_async(void *cbarg, u_int32_t code, struct cam_path *path, void *arg) 101{ 102 struct cam_sim *sim; --- 416 unchanged lines hidden (view full) --- 519 cpi->max_target = MAX_FC_TARG-1; 520 cpi->initiator_id = 521 ((fcparam *)isp->isp_param)->isp_loopid; 522#ifdef SCCLUN 523 cpi->max_lun = (1 << 16) - 1; 524#else 525 cpi->max_lun = (1 << 4) - 1; 526#endif | 86 if (isp->isp_state == ISP_INITSTATE) 87 isp->isp_state = ISP_RUNSTATE; 88} 89 90static void 91isp_cam_async(void *cbarg, u_int32_t code, struct cam_path *path, void *arg) 92{ 93 struct cam_sim *sim; --- 416 unchanged lines hidden (view full) --- 510 cpi->max_target = MAX_FC_TARG-1; 511 cpi->initiator_id = 512 ((fcparam *)isp->isp_param)->isp_loopid; 513#ifdef SCCLUN 514 cpi->max_lun = (1 << 16) - 1; 515#else 516 cpi->max_lun = (1 << 4) - 1; 517#endif |
518 /* 519 * Set base transfer capabilities for Fibre Channel. 520 * Technically not correct because we don't know 521 * what media we're running on top of- but we'll 522 * look good if we always say 100MB/s. 523 */ 524 cpi->base_transfer_speed = 100000; |
|
527 } else { 528 cpi->hba_misc = 0; 529 cpi->initiator_id = 530 ((sdparam *)isp->isp_param)->isp_initiator_id; 531 cpi->max_target = MAX_TARGETS-1; 532 if (ISP_FW_REVX(isp->isp_fwrev) >= 533 ISP_FW_REV(7, 55, 0)) { 534#if 0 535 /* 536 * Too much breakage. 537 */ 538 cpi->max_lun = (1 << 5) - 1; 539#else 540 cpi->max_lun = (1 << 3) - 1; 541#endif 542 } else { 543 cpi->max_lun = (1 << 3) - 1; 544 } | 525 } else { 526 cpi->hba_misc = 0; 527 cpi->initiator_id = 528 ((sdparam *)isp->isp_param)->isp_initiator_id; 529 cpi->max_target = MAX_TARGETS-1; 530 if (ISP_FW_REVX(isp->isp_fwrev) >= 531 ISP_FW_REV(7, 55, 0)) { 532#if 0 533 /* 534 * Too much breakage. 535 */ 536 cpi->max_lun = (1 << 5) - 1; 537#else 538 cpi->max_lun = (1 << 3) - 1; 539#endif 540 } else { 541 cpi->max_lun = (1 << 3) - 1; 542 } |
543 cpi->base_transfer_speed = 3300; |
|
545 } 546 547 cpi->bus_id = cam_sim_bus(sim); 548 strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); 549 strncpy(cpi->hba_vid, "Qlogic", HBA_IDLEN); 550 strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); 551 cpi->unit_number = cam_sim_unit(sim); 552 cpi->ccb_h.status = CAM_REQ_CMP; --- 587 unchanged lines hidden --- | 544 } 545 546 cpi->bus_id = cam_sim_bus(sim); 547 strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); 548 strncpy(cpi->hba_vid, "Qlogic", HBA_IDLEN); 549 strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); 550 cpi->unit_number = cam_sim_unit(sim); 551 cpi->ccb_h.status = CAM_REQ_CMP; --- 587 unchanged lines hidden --- |