isp.c (290800) | isp.c (291498) |
---|---|
1/*- 2 * Copyright (c) 1997-2009 by Matthew Jacob 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 33 unchanged lines hidden (view full) --- 42 */ 43#ifdef __NetBSD__ 44#include <sys/cdefs.h> 45__KERNEL_RCSID(0, "$NetBSD$"); 46#include <dev/ic/isp_netbsd.h> 47#endif 48#ifdef __FreeBSD__ 49#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997-2009 by Matthew Jacob 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 33 unchanged lines hidden (view full) --- 42 */ 43#ifdef __NetBSD__ 44#include <sys/cdefs.h> 45__KERNEL_RCSID(0, "$NetBSD$"); 46#include <dev/ic/isp_netbsd.h> 47#endif 48#ifdef __FreeBSD__ 49#include <sys/cdefs.h> |
50__FBSDID("$FreeBSD: stable/10/sys/dev/isp/isp.c 290800 2015-11-13 19:59:22Z mav $"); | 50__FBSDID("$FreeBSD: stable/10/sys/dev/isp/isp.c 291498 2015-11-30 21:28:53Z mav $"); |
51#include <dev/isp/isp_freebsd.h> 52#endif 53#ifdef __OpenBSD__ 54#include <dev/ic/isp_openbsd.h> 55#endif 56#ifdef __linux__ 57#include "isp_linux.h" 58#endif --- 55 unchanged lines hidden (view full) --- 114static void isp_scsi_channel_init(ispsoftc_t *, int); 115static void isp_fibre_init(ispsoftc_t *); 116static void isp_fibre_init_2400(ispsoftc_t *); 117static void isp_mark_portdb(ispsoftc_t *, int, int); 118static int isp_plogx(ispsoftc_t *, int, uint16_t, uint32_t, int, int); 119static int isp_port_login(ispsoftc_t *, uint16_t, uint32_t); 120static int isp_port_logout(ispsoftc_t *, uint16_t, uint32_t); 121static int isp_getpdb(ispsoftc_t *, int, uint16_t, isp_pdb_t *, int); | 51#include <dev/isp/isp_freebsd.h> 52#endif 53#ifdef __OpenBSD__ 54#include <dev/ic/isp_openbsd.h> 55#endif 56#ifdef __linux__ 57#include "isp_linux.h" 58#endif --- 55 unchanged lines hidden (view full) --- 114static void isp_scsi_channel_init(ispsoftc_t *, int); 115static void isp_fibre_init(ispsoftc_t *); 116static void isp_fibre_init_2400(ispsoftc_t *); 117static void isp_mark_portdb(ispsoftc_t *, int, int); 118static int isp_plogx(ispsoftc_t *, int, uint16_t, uint32_t, int, int); 119static int isp_port_login(ispsoftc_t *, uint16_t, uint32_t); 120static int isp_port_logout(ispsoftc_t *, uint16_t, uint32_t); 121static int isp_getpdb(ispsoftc_t *, int, uint16_t, isp_pdb_t *, int); |
122static int isp_gethandles(ispsoftc_t *, int, uint16_t *, int *, int, int); |
|
122static void isp_dump_chip_portdb(ispsoftc_t *, int, int); 123static uint64_t isp_get_wwn(ispsoftc_t *, int, int, int); 124static int isp_fclink_test(ispsoftc_t *, int, int); 125static int isp_pdb_sync(ispsoftc_t *, int); 126static int isp_scan_loop(ispsoftc_t *, int); 127static int isp_gid_ft_sns(ispsoftc_t *, int); 128static int isp_gid_ft_ct_passthru(ispsoftc_t *, int); 129static int isp_scan_fabric(ispsoftc_t *, int); --- 2452 unchanged lines hidden (view full) --- 2582 } 2583 } 2584 MEMORYBARRIER(isp, SYNC_SFORDEV, 0, sizeof (un), chan); 2585 isp_mboxcmd(isp, &mbs); 2586 if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { 2587 if (dolock) { 2588 FC_SCRATCH_RELEASE(isp, chan); 2589 } | 123static void isp_dump_chip_portdb(ispsoftc_t *, int, int); 124static uint64_t isp_get_wwn(ispsoftc_t *, int, int, int); 125static int isp_fclink_test(ispsoftc_t *, int, int); 126static int isp_pdb_sync(ispsoftc_t *, int); 127static int isp_scan_loop(ispsoftc_t *, int); 128static int isp_gid_ft_sns(ispsoftc_t *, int); 129static int isp_gid_ft_ct_passthru(ispsoftc_t *, int); 130static int isp_scan_fabric(ispsoftc_t *, int); --- 2452 unchanged lines hidden (view full) --- 2583 } 2584 } 2585 MEMORYBARRIER(isp, SYNC_SFORDEV, 0, sizeof (un), chan); 2586 isp_mboxcmd(isp, &mbs); 2587 if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { 2588 if (dolock) { 2589 FC_SCRATCH_RELEASE(isp, chan); 2590 } |
2590 return (mbs.param[0]); | 2591 return (mbs.param[0] | (mbs.param[1] << 16)); |
2591 } 2592 if (IS_24XX(isp)) { 2593 isp_get_pdb_24xx(isp, fcp->isp_scratch, &un.bill); 2594 pdb->handle = un.bill.pdb_handle; 2595 pdb->prli_word3 = un.bill.pdb_prli_svc3; 2596 pdb->portid = BITS2WORD_24XX(un.bill.pdb_portid_bits); 2597 ISP_MEMCPY(pdb->portname, un.bill.pdb_portname, 8); 2598 ISP_MEMCPY(pdb->nodename, un.bill.pdb_nodename, 8); --- 14 unchanged lines hidden (view full) --- 2613 ISP_MEMCPY(pdb->nodename, un.fred.pdb_nodename, 8); 2614 } 2615 if (dolock) { 2616 FC_SCRATCH_RELEASE(isp, chan); 2617 } 2618 return (0); 2619} 2620 | 2592 } 2593 if (IS_24XX(isp)) { 2594 isp_get_pdb_24xx(isp, fcp->isp_scratch, &un.bill); 2595 pdb->handle = un.bill.pdb_handle; 2596 pdb->prli_word3 = un.bill.pdb_prli_svc3; 2597 pdb->portid = BITS2WORD_24XX(un.bill.pdb_portid_bits); 2598 ISP_MEMCPY(pdb->portname, un.bill.pdb_portname, 8); 2599 ISP_MEMCPY(pdb->nodename, un.bill.pdb_nodename, 8); --- 14 unchanged lines hidden (view full) --- 2614 ISP_MEMCPY(pdb->nodename, un.fred.pdb_nodename, 8); 2615 } 2616 if (dolock) { 2617 FC_SCRATCH_RELEASE(isp, chan); 2618 } 2619 return (0); 2620} 2621 |
2622static int 2623isp_gethandles(ispsoftc_t *isp, int chan, uint16_t *handles, int *num, 2624 int dolock, int loop) 2625{ 2626 fcparam *fcp = FCPARAM(isp, chan); 2627 mbreg_t mbs; 2628 isp_pnhle_21xx_t el1, *elp1; 2629 isp_pnhle_23xx_t el3, *elp3; 2630 isp_pnhle_24xx_t el4, *elp4; 2631 int i, j; 2632 uint32_t p; 2633 uint16_t h; 2634 2635 MBSINIT(&mbs, MBOX_GET_ID_LIST, MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR, 250000); 2636 if (IS_24XX(isp)) { 2637 mbs.param[2] = DMA_WD1(fcp->isp_scdma); 2638 mbs.param[3] = DMA_WD0(fcp->isp_scdma); 2639 mbs.param[6] = DMA_WD3(fcp->isp_scdma); 2640 mbs.param[7] = DMA_WD2(fcp->isp_scdma); 2641 mbs.param[8] = ISP_FC_SCRLEN; 2642 mbs.param[9] = chan; 2643 } else { 2644 mbs.ibits = (1 << 1)|(1 << 2)|(1 << 3)|(1 << 6); 2645 mbs.param[1] = DMA_WD1(fcp->isp_scdma); 2646 mbs.param[2] = DMA_WD0(fcp->isp_scdma); 2647 mbs.param[3] = DMA_WD3(fcp->isp_scdma); 2648 mbs.param[6] = DMA_WD2(fcp->isp_scdma); 2649 } 2650 if (dolock) { 2651 if (FC_SCRATCH_ACQUIRE(isp, chan)) { 2652 isp_prt(isp, ISP_LOGERR, sacq); 2653 return (-1); 2654 } 2655 } 2656 MEMORYBARRIER(isp, SYNC_SFORDEV, 0, ISP_FC_SCRLEN, chan); 2657 isp_mboxcmd(isp, &mbs); 2658 if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { 2659 if (dolock) { 2660 FC_SCRATCH_RELEASE(isp, chan); 2661 } 2662 return (mbs.param[0] | (mbs.param[1] << 16)); 2663 } 2664 elp1 = fcp->isp_scratch; 2665 elp3 = fcp->isp_scratch; 2666 elp4 = fcp->isp_scratch; 2667 for (i = 0, j = 0; i < mbs.param[1] && j < *num; i++) { 2668 if (IS_24XX(isp)) { 2669 isp_get_pnhle_24xx(isp, &elp4[i], &el4); 2670 p = el4.pnhle_port_id_lo | 2671 (el4.pnhle_port_id_hi << 16); 2672 h = el4.pnhle_handle; 2673 } else if (IS_23XX(isp)) { 2674 isp_get_pnhle_23xx(isp, &elp3[i], &el3); 2675 p = el3.pnhle_port_id_lo | 2676 (el3.pnhle_port_id_hi << 16); 2677 h = el3.pnhle_handle; 2678 } else { /* 21xx */ 2679 isp_get_pnhle_21xx(isp, &elp1[i], &el1); 2680 p = el1.pnhle_port_id_lo | 2681 ((el1.pnhle_port_id_hi_handle & 0xff) << 16); 2682 h = el1.pnhle_port_id_hi_handle >> 8; 2683 } 2684 if (loop && (p >> 8) != (fcp->isp_portid >> 8)) 2685 continue; 2686 handles[j++] = h; 2687 } 2688 *num = j; 2689 if (dolock) 2690 FC_SCRATCH_RELEASE(isp, chan); 2691 return (0); 2692} 2693 |
|
2621static void 2622isp_dump_chip_portdb(ispsoftc_t *isp, int chan, int dolock) 2623{ 2624 isp_pdb_t pdb; 2625 int lim, loopid; 2626 2627 isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGINFO, "Chan %d chip port dump", chan); 2628 if (ISP_CAP_2KLOGIN(isp)) { --- 472 unchanged lines hidden (view full) --- 3101/* 3102 * Scan local loop for devices. 3103 */ 3104static int 3105isp_scan_loop(ispsoftc_t *isp, int chan) 3106{ 3107 fcportdb_t *lp, tmp; 3108 fcparam *fcp = FCPARAM(isp, chan); | 2694static void 2695isp_dump_chip_portdb(ispsoftc_t *isp, int chan, int dolock) 2696{ 2697 isp_pdb_t pdb; 2698 int lim, loopid; 2699 2700 isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGINFO, "Chan %d chip port dump", chan); 2701 if (ISP_CAP_2KLOGIN(isp)) { --- 472 unchanged lines hidden (view full) --- 3174/* 3175 * Scan local loop for devices. 3176 */ 3177static int 3178isp_scan_loop(ispsoftc_t *isp, int chan) 3179{ 3180 fcportdb_t *lp, tmp; 3181 fcparam *fcp = FCPARAM(isp, chan); |
3109 int i; | 3182 int i, idx, lim, r; |
3110 isp_pdb_t pdb; | 3183 isp_pdb_t pdb; |
3111 uint16_t handle, lim = 0; | 3184 uint16_t handles[LOCAL_LOOP_LIM]; 3185 uint16_t handle; |
3112 3113 if (fcp->isp_fwstate < FW_READY || 3114 fcp->isp_loopstate < LOOP_PDB_RCVD) { 3115 return (-1); 3116 } | 3186 3187 if (fcp->isp_fwstate < FW_READY || 3188 fcp->isp_loopstate < LOOP_PDB_RCVD) { 3189 return (-1); 3190 } |
3117 | |
3118 if (fcp->isp_loopstate > LOOP_SCANNING_LOOP) { 3119 return (0); 3120 } | 3191 if (fcp->isp_loopstate > LOOP_SCANNING_LOOP) { 3192 return (0); 3193 } |
3121 3122 /* 3123 * Check our connection topology. 3124 * 3125 * If we're a public or private loop, we scan 0..125 as handle values. 3126 * The firmware has (typically) peformed a PLOGI for us. We skip this 3127 * step if we're a ISP_24XX in NP-IV mode. 3128 * 3129 * If we're a N-port connection, we treat this is a short loop (0..1). 3130 */ 3131 switch (fcp->isp_topo) { 3132 case TOPO_NL_PORT: 3133 lim = LOCAL_LOOP_LIM; 3134 break; 3135 case TOPO_FL_PORT: 3136 if (IS_24XX(isp) && isp->isp_nchan > 1) { 3137 isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Skipping Local Loop Scan", chan); 3138 fcp->isp_loopstate = LOOP_LSCAN_DONE; 3139 return (0); 3140 } 3141 lim = LOCAL_LOOP_LIM; 3142 break; 3143 case TOPO_N_PORT: 3144 lim = 2; 3145 break; 3146 default: 3147 isp_prt(isp, ISP_LOG_SANCFG, "Chan %d no loop topology to scan", chan); | 3194 if (fcp->isp_topo != TOPO_NL_PORT && fcp->isp_topo != TOPO_FL_PORT && 3195 fcp->isp_topo != TOPO_N_PORT) { 3196 isp_prt(isp, ISP_LOG_SANCFG, 3197 "Chan %d no loop topology to scan", chan); |
3148 fcp->isp_loopstate = LOOP_LSCAN_DONE; 3149 return (0); 3150 } 3151 3152 fcp->isp_loopstate = LOOP_SCANNING_LOOP; 3153 | 3198 fcp->isp_loopstate = LOOP_LSCAN_DONE; 3199 return (0); 3200 } 3201 3202 fcp->isp_loopstate = LOOP_SCANNING_LOOP; 3203 |
3154 isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop 0..%d", chan, lim-1); | 3204 lim = LOCAL_LOOP_LIM; 3205 r = isp_gethandles(isp, chan, handles, &lim, 1, 1); 3206 if (r != 0) { 3207 isp_prt(isp, ISP_LOG_SANCFG, 3208 "Chan %d getting list of handles failed with %x", chan, r); 3209fail: 3210 ISP_MARK_PORTDB(isp, chan, 1); 3211 isp_prt(isp, ISP_LOG_SANCFG, 3212 "Chan %d FC scan loop DONE (bad)", chan); 3213 return (-1); 3214 } |
3155 | 3215 |
3216 isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop -- %d ports", 3217 chan, lim); 3218 |
|
3156 /* 3157 * Run through the list and get the port database info for each one. 3158 */ | 3219 /* 3220 * Run through the list and get the port database info for each one. 3221 */ |
3159 for (handle = 0; handle < lim; handle++) { 3160 int r; | 3222 for (idx = 0; idx < lim; idx++) { 3223 handle = handles[idx]; 3224 |
3161 /* 3162 * Don't scan "special" ids. 3163 */ | 3225 /* 3226 * Don't scan "special" ids. 3227 */ |
3164 if (handle >= FL_ID && handle <= SNS_ID) { 3165 continue; 3166 } | |
3167 if (ISP_CAP_2KLOGIN(isp)) { | 3228 if (ISP_CAP_2KLOGIN(isp)) { |
3168 if (handle >= NPH_RESERVED && handle <= NPH_IP_BCST) { | 3229 if (handle >= NPH_RESERVED - isp->isp_nchan) |
3169 continue; | 3230 continue; |
3170 } | 3231 } else { 3232 if (handle >= FL_ID && handle <= SNS_ID) 3233 continue; |
3171 } | 3234 } |
3235 |
|
3172 /* 3173 * In older cards with older f/w GET_PORT_DATABASE has been 3174 * known to hang. This trick gets around that problem. 3175 */ 3176 if (IS_2100(isp) || IS_2200(isp)) { 3177 uint64_t node_wwn = isp_get_wwn(isp, chan, handle, 1); | 3236 /* 3237 * In older cards with older f/w GET_PORT_DATABASE has been 3238 * known to hang. This trick gets around that problem. 3239 */ 3240 if (IS_2100(isp) || IS_2200(isp)) { 3241 uint64_t node_wwn = isp_get_wwn(isp, chan, handle, 1); |
3178 if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { 3179 isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); 3180 return (-1); 3181 } | 3242 if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) 3243 goto fail; |
3182 if (node_wwn == INI_NONE) { 3183 continue; 3184 } 3185 } 3186 3187 /* 3188 * Get the port database entity for this index. 3189 */ 3190 r = isp_getpdb(isp, chan, handle, &pdb, 1); 3191 if (r != 0) { 3192 isp_prt(isp, ISP_LOGDEBUG1, 3193 "Chan %d FC scan loop handle %d returned %x", 3194 chan, handle, r); | 3244 if (node_wwn == INI_NONE) { 3245 continue; 3246 } 3247 } 3248 3249 /* 3250 * Get the port database entity for this index. 3251 */ 3252 r = isp_getpdb(isp, chan, handle, &pdb, 1); 3253 if (r != 0) { 3254 isp_prt(isp, ISP_LOGDEBUG1, 3255 "Chan %d FC scan loop handle %d returned %x", 3256 chan, handle, r); |
3195 if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { 3196 ISP_MARK_PORTDB(isp, chan, 1); 3197 isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); 3198 return (-1); 3199 } | 3257 if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) 3258 goto fail; |
3200 continue; 3201 } 3202 | 3259 continue; 3260 } 3261 |
3203 if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { 3204 ISP_MARK_PORTDB(isp, chan, 1); 3205 isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); 3206 return (-1); 3207 } | 3262 if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) 3263 goto fail; |
3208 3209 /* 3210 * On *very* old 2100 firmware we would end up sometimes 3211 * with the firmware returning the port database entry 3212 * for something else. We used to restart this, but 3213 * now we just punt. 3214 */ 3215 if (IS_2100(isp) && pdb.handle != handle) { 3216 isp_prt(isp, ISP_LOGWARN, | 3264 3265 /* 3266 * On *very* old 2100 firmware we would end up sometimes 3267 * with the firmware returning the port database entry 3268 * for something else. We used to restart this, but 3269 * now we just punt. 3270 */ 3271 if (IS_2100(isp) && pdb.handle != handle) { 3272 isp_prt(isp, ISP_LOGWARN, |
3217 "Chan %d cannot synchronize port database", chan); 3218 ISP_MARK_PORTDB(isp, chan, 1); 3219 isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); 3220 return (-1); | 3273 "Chan %d getpdb() returned wrong handle %x != %x", 3274 chan, pdb.handle, handle); 3275 goto fail; |
3221 } 3222 3223 /* 3224 * Save the pertinent info locally. 3225 */ 3226 MAKE_WWN_FROM_NODE_NAME(tmp.node_wwn, pdb.nodename); 3227 MAKE_WWN_FROM_NODE_NAME(tmp.port_wwn, pdb.portname); 3228 tmp.prli_word3 = pdb.prli_word3; --- 39 unchanged lines hidden (view full) --- 3268 */ 3269 if (lp->state != FC_PORTDB_STATE_PROBATIONAL && 3270 lp->state != FC_PORTDB_STATE_ZOMBIE && 3271 lp->state != FC_PORTDB_STATE_VALID) { 3272 isp_prt(isp, ISP_LOGERR, 3273 "Chan %d [%d] not probational/zombie (0x%x)", 3274 chan, FC_PORTDB_TGT(isp, chan, lp), lp->state); 3275 isp_dump_portdb(isp, chan); | 3276 } 3277 3278 /* 3279 * Save the pertinent info locally. 3280 */ 3281 MAKE_WWN_FROM_NODE_NAME(tmp.node_wwn, pdb.nodename); 3282 MAKE_WWN_FROM_NODE_NAME(tmp.port_wwn, pdb.portname); 3283 tmp.prli_word3 = pdb.prli_word3; --- 39 unchanged lines hidden (view full) --- 3323 */ 3324 if (lp->state != FC_PORTDB_STATE_PROBATIONAL && 3325 lp->state != FC_PORTDB_STATE_ZOMBIE && 3326 lp->state != FC_PORTDB_STATE_VALID) { 3327 isp_prt(isp, ISP_LOGERR, 3328 "Chan %d [%d] not probational/zombie (0x%x)", 3329 chan, FC_PORTDB_TGT(isp, chan, lp), lp->state); 3330 isp_dump_portdb(isp, chan); |
3276 ISP_MARK_PORTDB(isp, chan, 1); 3277 isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); 3278 return (-1); | 3331 goto fail; |
3279 } 3280 3281 /* 3282 * Mark the device as something the f/w logs into 3283 * automatically. 3284 */ 3285 lp->autologin = 1; 3286 lp->node_wwn = tmp.node_wwn; --- 269 unchanged lines hidden (view full) --- 3556 * Make sure we still are logged into the fabric controller. 3557 */ 3558 if (IS_24XX(isp)) { /* XXX SHOULDN'T THIS BE TRUE FOR 2K F/W? XXX */ 3559 loopid = NPH_FL_ID; 3560 } else { 3561 loopid = FL_ID; 3562 } 3563 r = isp_getpdb(isp, chan, loopid, &pdb, 0); | 3332 } 3333 3334 /* 3335 * Mark the device as something the f/w logs into 3336 * automatically. 3337 */ 3338 lp->autologin = 1; 3339 lp->node_wwn = tmp.node_wwn; --- 269 unchanged lines hidden (view full) --- 3609 * Make sure we still are logged into the fabric controller. 3610 */ 3611 if (IS_24XX(isp)) { /* XXX SHOULDN'T THIS BE TRUE FOR 2K F/W? XXX */ 3612 loopid = NPH_FL_ID; 3613 } else { 3614 loopid = FL_ID; 3615 } 3616 r = isp_getpdb(isp, chan, loopid, &pdb, 0); |
3564 if (r == MBOX_NOT_LOGGED_IN) { | 3617 if ((r & 0xffff) == MBOX_NOT_LOGGED_IN) { |
3565 isp_dump_chip_portdb(isp, chan, 0); 3566 } 3567 if (r) { 3568 fcp->isp_loopstate = LOOP_PDB_RCVD; 3569 FC_SCRATCH_RELEASE(isp, chan); 3570 ISP_MARK_PORTDB(isp, chan, 1); 3571 return (-1); 3572 } --- 3518 unchanged lines hidden (view full) --- 7091 ISP_FC_OPMAP(0x03, 0x03), /* 0x18: MBOX_BUS_RESET */ 7092 ISP_FC_OPMAP(0x07, 0x05), /* 0x19: MBOX_STOP_QUEUE */ 7093 ISP_FC_OPMAP(0x07, 0x05), /* 0x1a: MBOX_START_QUEUE */ 7094 ISP_FC_OPMAP(0x07, 0x05), /* 0x1b: MBOX_SINGLE_STEP_QUEUE */ 7095 ISP_FC_OPMAP(0x07, 0x05), /* 0x1c: MBOX_ABORT_QUEUE */ 7096 ISP_FC_OPMAP(0x07, 0x03), /* 0x1d: MBOX_GET_DEV_QUEUE_STATUS */ 7097 ISP_FC_OPMAP(0x00, 0x00), /* 0x1e: */ 7098 ISP_FC_OPMAP(0x01, 0x07), /* 0x1f: MBOX_GET_FIRMWARE_STATUS */ | 3618 isp_dump_chip_portdb(isp, chan, 0); 3619 } 3620 if (r) { 3621 fcp->isp_loopstate = LOOP_PDB_RCVD; 3622 FC_SCRATCH_RELEASE(isp, chan); 3623 ISP_MARK_PORTDB(isp, chan, 1); 3624 return (-1); 3625 } --- 3518 unchanged lines hidden (view full) --- 7144 ISP_FC_OPMAP(0x03, 0x03), /* 0x18: MBOX_BUS_RESET */ 7145 ISP_FC_OPMAP(0x07, 0x05), /* 0x19: MBOX_STOP_QUEUE */ 7146 ISP_FC_OPMAP(0x07, 0x05), /* 0x1a: MBOX_START_QUEUE */ 7147 ISP_FC_OPMAP(0x07, 0x05), /* 0x1b: MBOX_SINGLE_STEP_QUEUE */ 7148 ISP_FC_OPMAP(0x07, 0x05), /* 0x1c: MBOX_ABORT_QUEUE */ 7149 ISP_FC_OPMAP(0x07, 0x03), /* 0x1d: MBOX_GET_DEV_QUEUE_STATUS */ 7150 ISP_FC_OPMAP(0x00, 0x00), /* 0x1e: */ 7151 ISP_FC_OPMAP(0x01, 0x07), /* 0x1f: MBOX_GET_FIRMWARE_STATUS */ |
7099 ISP_FC_OPMAP_HALF(0x2, 0x01, 0x0, 0xcf), /* 0x20: MBOX_GET_LOOP_ID */ | 7152 ISP_FC_OPMAP_HALF(0x2, 0x01, 0x7e, 0xcf), /* 0x20: MBOX_GET_LOOP_ID */ |
7100 ISP_FC_OPMAP(0x00, 0x00), /* 0x21: */ 7101 ISP_FC_OPMAP(0x01, 0x07), /* 0x22: MBOX_GET_RETRY_COUNT */ 7102 ISP_FC_OPMAP(0x00, 0x00), /* 0x23: */ 7103 ISP_FC_OPMAP(0x00, 0x00), /* 0x24: */ 7104 ISP_FC_OPMAP(0x00, 0x00), /* 0x25: */ 7105 ISP_FC_OPMAP(0x00, 0x00), /* 0x26: */ 7106 ISP_FC_OPMAP(0x00, 0x00), /* 0x27: */ 7107 ISP_FC_OPMAP(0x01, 0x03), /* 0x28: MBOX_GET_FIRMWARE_OPTIONS */ --- 68 unchanged lines hidden (view full) --- 7176 ISP_FC_OPMAP(0x00, 0x00), /* 0x6d: */ 7177 ISP_FC_OPMAP(0xcf, 0x03), /* 0x6e: MBOX_SEND_SNS */ 7178 ISP_FC_OPMAP(0x0f, 0x07), /* 0x6f: MBOX_FABRIC_LOGIN */ 7179 ISP_FC_OPMAP(0x03, 0x01), /* 0x70: MBOX_SEND_CHANGE_REQUEST */ 7180 ISP_FC_OPMAP(0x03, 0x03), /* 0x71: MBOX_FABRIC_LOGOUT */ 7181 ISP_FC_OPMAP(0x0f, 0x0f), /* 0x72: MBOX_INIT_LIP_LOGIN */ 7182 ISP_FC_OPMAP(0x00, 0x00), /* 0x73: */ 7183 ISP_FC_OPMAP(0x07, 0x01), /* 0x74: LOGIN LOOP PORT */ | 7153 ISP_FC_OPMAP(0x00, 0x00), /* 0x21: */ 7154 ISP_FC_OPMAP(0x01, 0x07), /* 0x22: MBOX_GET_RETRY_COUNT */ 7155 ISP_FC_OPMAP(0x00, 0x00), /* 0x23: */ 7156 ISP_FC_OPMAP(0x00, 0x00), /* 0x24: */ 7157 ISP_FC_OPMAP(0x00, 0x00), /* 0x25: */ 7158 ISP_FC_OPMAP(0x00, 0x00), /* 0x26: */ 7159 ISP_FC_OPMAP(0x00, 0x00), /* 0x27: */ 7160 ISP_FC_OPMAP(0x01, 0x03), /* 0x28: MBOX_GET_FIRMWARE_OPTIONS */ --- 68 unchanged lines hidden (view full) --- 7229 ISP_FC_OPMAP(0x00, 0x00), /* 0x6d: */ 7230 ISP_FC_OPMAP(0xcf, 0x03), /* 0x6e: MBOX_SEND_SNS */ 7231 ISP_FC_OPMAP(0x0f, 0x07), /* 0x6f: MBOX_FABRIC_LOGIN */ 7232 ISP_FC_OPMAP(0x03, 0x01), /* 0x70: MBOX_SEND_CHANGE_REQUEST */ 7233 ISP_FC_OPMAP(0x03, 0x03), /* 0x71: MBOX_FABRIC_LOGOUT */ 7234 ISP_FC_OPMAP(0x0f, 0x0f), /* 0x72: MBOX_INIT_LIP_LOGIN */ 7235 ISP_FC_OPMAP(0x00, 0x00), /* 0x73: */ 7236 ISP_FC_OPMAP(0x07, 0x01), /* 0x74: LOGIN LOOP PORT */ |
7184 ISP_FC_OPMAP(0xcf, 0x03), /* 0x75: GET PORT/NODE NAME LIST */ | 7237 ISP_FC_OPMAP_HALF(0x03, 0xcf, 0x00, 0x07), /* 0x75: GET PORT/NODE NAME LIST */ |
7185 ISP_FC_OPMAP(0x4f, 0x01), /* 0x76: SET VENDOR ID */ 7186 ISP_FC_OPMAP(0xcd, 0x01), /* 0x77: INITIALIZE IP MAILBOX */ 7187 ISP_FC_OPMAP(0x00, 0x00), /* 0x78: */ 7188 ISP_FC_OPMAP(0x00, 0x00), /* 0x79: */ 7189 ISP_FC_OPMAP(0x00, 0x00), /* 0x7a: */ 7190 ISP_FC_OPMAP(0x00, 0x00), /* 0x7b: */ | 7238 ISP_FC_OPMAP(0x4f, 0x01), /* 0x76: SET VENDOR ID */ 7239 ISP_FC_OPMAP(0xcd, 0x01), /* 0x77: INITIALIZE IP MAILBOX */ 7240 ISP_FC_OPMAP(0x00, 0x00), /* 0x78: */ 7241 ISP_FC_OPMAP(0x00, 0x00), /* 0x79: */ 7242 ISP_FC_OPMAP(0x00, 0x00), /* 0x7a: */ 7243 ISP_FC_OPMAP(0x00, 0x00), /* 0x7b: */ |
7191 ISP_FC_OPMAP(0x4f, 0x03), /* 0x7c: Get ID List */ | 7244 ISP_FC_OPMAP_HALF(0x03, 0x4f, 0x00, 0x07), /* 0x7c: Get ID List */ |
7192 ISP_FC_OPMAP(0xcf, 0x01), /* 0x7d: SEND LFA */ 7193 ISP_FC_OPMAP(0x0f, 0x01) /* 0x7e: LUN RESET */ 7194}; 7195#define MAX_FC_OPCODE 0x7e 7196/* 7197 * Footnotes 7198 * 7199 * (1): this sets bits 21..16 in mailbox register #8, which we nominally --- 1354 unchanged lines hidden --- | 7245 ISP_FC_OPMAP(0xcf, 0x01), /* 0x7d: SEND LFA */ 7246 ISP_FC_OPMAP(0x0f, 0x01) /* 0x7e: LUN RESET */ 7247}; 7248#define MAX_FC_OPCODE 0x7e 7249/* 7250 * Footnotes 7251 * 7252 * (1): this sets bits 21..16 in mailbox register #8, which we nominally --- 1354 unchanged lines hidden --- |