ha 211 arch/powerpc/include/asm/ppc_asm.h 0: addis r2,r12,(.TOC.-0b)@ha; \ ha 311 arch/powerpc/include/asm/ppc_asm.h addis reg,reg,(name - 0b)@ha; \ ha 371 arch/powerpc/include/asm/ppc_asm.h lis reg,(expr)@ha; \ ha 376 arch/powerpc/include/asm/ppc_asm.h #define LOAD_REG_ADDRBASE(reg, name) lis reg,name@ha ha 56 arch/powerpc/kernel/head_32.h lis r10,STACK_FRAME_REGS_MARKER@ha /* exception frame marker */ ha 85 arch/powerpc/kernel/head_32.h lis r10,STACK_FRAME_REGS_MARKER@ha /* exception frame marker */ ha 110 arch/powerpc/kernel/head_32.h lis r11,global_dbcr0@ha ha 25 arch/powerpc/kernel/head_booke.h addis reg,reg,val@ha; \ ha 80 arch/powerpc/kernel/head_booke.h lis r10, STACK_FRAME_REGS_MARKER@ha;/* exception frame marker */ \ ha 121 arch/powerpc/kernel/head_booke.h lis r12, STACK_FRAME_REGS_MARKER@ha /* exception frame marker */ ha 144 arch/powerpc/kernel/head_booke.h lis r11,global_dbcr0@ha ha 211 arch/powerpc/kernel/head_booke.h addis r8,r8,level##_STACK_BASE@ha; \ ha 216 arch/powerpc/kernel/head_booke.h lis r8,level##_STACK_BASE@ha; \ ha 646 drivers/crypto/amcc/crypto4xx_alg.c unsigned char ha, ha 672 drivers/crypto/amcc/crypto4xx_alg.c SA_NO_HEADER_PROC, ha, SA_CIPHER_ALG_NULL, ha 2372 drivers/crypto/hifn_795x.c struct hifn_crypto_alg *ha = crypto_alg_to_hifn(alg); ha 2375 drivers/crypto/hifn_795x.c ctx->dev = ha->dev; ha 1916 drivers/edac/sb_edac.c static struct mem_ctl_info *get_mci_for_node_id(u8 node_id, u8 ha) ha 1921 drivers/edac/sb_edac.c if (sbridge_dev->node_id == node_id && sbridge_dev->dom == ha) ha 1929 drivers/edac/sb_edac.c u8 *socket, u8 *ha, ha 2074 drivers/edac/sb_edac.c *ha = sad_ha; ha 2243 drivers/edac/sb_edac.c u8 *ha, long *channel_mask, ha 2262 drivers/edac/sb_edac.c *ha = pvt->info.get_ha(m->bank); ha 2263 drivers/edac/sb_edac.c if (*ha != 0 && *ha != 1) { ha 2269 drivers/edac/sb_edac.c new_mci = get_mci_for_node_id(*socket, *ha); ha 2972 drivers/edac/sb_edac.c u8 rank = 0xff, socket, ha; ha 3060 drivers/edac/sb_edac.c rc = get_memory_error_data(mci, m->addr, &socket, &ha, ha 3064 drivers/edac/sb_edac.c rc = get_memory_error_data_from_mce(mci, m, &socket, &ha, ha 3070 drivers/edac/sb_edac.c new_mci = get_mci_for_node_id(socket, ha); ha 3104 drivers/edac/sb_edac.c socket, ha, ha 64 drivers/firewire/net.c static bool fwnet_hwaddr_is_multicast(u8 *ha) ha 66 drivers/firewire/net.c return !!(*ha & 1); ha 207 drivers/firewire/net.c static __u64 fwnet_hwaddr_fifo(union fwnet_hwaddr *ha) ha 209 drivers/firewire/net.c return (u64)get_unaligned_be16(&ha->uc.fifo_hi) << 32 ha 210 drivers/firewire/net.c | get_unaligned_be32(&ha->uc.fifo_lo); ha 252 drivers/firewire/net.c memcpy(h->h_dest, neigh->ha, net->addr_len); ha 1300 drivers/firewire/net.c union fwnet_hwaddr *ha = (union fwnet_hwaddr *)hdr_buf.h_dest; ha 1301 drivers/firewire/net.c __be64 guid = get_unaligned(&ha->uc.uniq_id); ha 1313 drivers/firewire/net.c ptask->fifo_addr = fwnet_hwaddr_fifo(ha); ha 1451 drivers/firewire/net.c union fwnet_hwaddr *ha; ha 1498 drivers/firewire/net.c ha = (union fwnet_hwaddr *)net->dev_addr; ha 1499 drivers/firewire/net.c put_unaligned_be64(card->guid, &ha->uc.uniq_id); ha 1500 drivers/firewire/net.c ha->uc.max_rec = dev->card->max_receive; ha 1501 drivers/firewire/net.c ha->uc.sspd = dev->card->link_speed; ha 1502 drivers/firewire/net.c put_unaligned_be16(dev->local_fifo >> 32, &ha->uc.fifo_hi); ha 1503 drivers/firewire/net.c put_unaligned_be32(dev->local_fifo & 0xffffffff, &ha->uc.fifo_lo); ha 105 drivers/gpu/drm/i915/gt/intel_hangcheck.c enum intel_engine_hangcheck_action ha; ha 108 drivers/gpu/drm/i915/gt/intel_hangcheck.c ha = head_stuck(engine, acthd); ha 109 drivers/gpu/drm/i915/gt/intel_hangcheck.c if (ha != ENGINE_DEAD) ha 110 drivers/gpu/drm/i915/gt/intel_hangcheck.c return ha; ha 2006 drivers/infiniband/hw/i40iw/i40iw_cm.c neigh->ha)) ha 2016 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_manage_arp_cache(iwdev, neigh->ha, &dst_ip, true, I40IW_ARP_ADD); ha 2088 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(&iwdev->sc_dev, I40IW_DEBUG_CM, "dst_neigh_lookup MAC=%pM\n", neigh->ha); ha 2093 drivers/infiniband/hw/i40iw/i40iw_cm.c neigh->ha)) { ha 2104 drivers/infiniband/hw/i40iw/i40iw_cm.c neigh->ha, ha 294 drivers/infiniband/hw/i40iw/i40iw_utils.c neigh->ha, ha 301 drivers/infiniband/hw/i40iw/i40iw_utils.c neigh->ha, ha 452 drivers/infiniband/hw/qedr/qedr_iw_cm.c ether_addr_copy(dst_mac, neigh->ha); ha 495 drivers/infiniband/hw/qedr/qedr_iw_cm.c ether_addr_copy(dst_mac, neigh->ha); ha 618 drivers/infiniband/ulp/ipoib/ipoib.h #define IPOIB_CM_SUPPORTED(ha) (ha[0] & (IPOIB_FLAGS_RC)) ha 843 drivers/infiniband/ulp/ipoib/ipoib.h #define IPOIB_QPN(ha) (be32_to_cpup((__be32 *) ha) & 0xffffff) ha 887 drivers/infiniband/ulp/ipoib/ipoib_multicast.c struct netdev_hw_addr *ha; ha 915 drivers/infiniband/ulp/ipoib/ipoib_multicast.c netdev_for_each_mc_addr(ha, dev) { ha 918 drivers/infiniband/ulp/ipoib/ipoib_multicast.c if (!ipoib_mcast_addr_is_valid(ha->addr, dev->broadcast)) ha 921 drivers/infiniband/ulp/ipoib/ipoib_multicast.c memcpy(mgid.raw, ha->addr + 4, sizeof(mgid)); ha 232 drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c struct netdev_hw_addr *ha; ha 251 drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c netdev_hw_addr_list_for_each(ha, hw_list) { ha 252 drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c crc = crc32_le(crc, ha->addr, ETH_ALEN); ha 318 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c struct netdev_hw_addr *ha; ha 322 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c netdev_for_each_mc_addr(ha, adapter->netdev) { ha 329 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c memcpy(entry, ha->addr, sizeof(*entry)); ha 350 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c struct netdev_hw_addr *ha; ha 355 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c for_each_dev_addr(adapter->netdev, ha) { ha 359 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c if (!memcmp(adapter->info.vport.base_mac_addr, ha->addr, ha 369 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c memcpy(entry, ha->addr, sizeof(*entry)); ha 374 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c netdev_for_each_uc_addr(ha, adapter->netdev) { ha 381 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c memcpy(entry, ha->addr, sizeof(*entry)); ha 1232 drivers/media/dvb-core/dvb_net.c struct netdev_hw_addr *ha; ha 1240 drivers/media/dvb-core/dvb_net.c netdev_for_each_mc_addr(ha, dev) ha 1241 drivers/media/dvb-core/dvb_net.c dvb_set_mc_filter(dev, ha->addr); ha 874 drivers/net/ethernet/3com/typhoon.c struct netdev_hw_addr *ha; ha 877 drivers/net/ethernet/3com/typhoon.c netdev_for_each_mc_addr(ha, dev) { ha 878 drivers/net/ethernet/3com/typhoon.c int bit = ether_crc(ETH_ALEN, ha->addr) & 0x3f; ha 1541 drivers/net/ethernet/8390/axnet_cs.c struct netdev_hw_addr *ha; ha 1544 drivers/net/ethernet/8390/axnet_cs.c netdev_for_each_mc_addr(ha, dev) { ha 1545 drivers/net/ethernet/8390/axnet_cs.c crc = ether_crc(ETH_ALEN, ha->addr); ha 877 drivers/net/ethernet/8390/lib8390.c struct netdev_hw_addr *ha; ha 879 drivers/net/ethernet/8390/lib8390.c netdev_for_each_mc_addr(ha, dev) { ha 880 drivers/net/ethernet/8390/lib8390.c u32 crc = ether_crc(ETH_ALEN, ha->addr); ha 1784 drivers/net/ethernet/adaptec/starfire.c struct netdev_hw_addr *ha; ha 1801 drivers/net/ethernet/adaptec/starfire.c netdev_for_each_mc_addr(ha, dev) { ha 1802 drivers/net/ethernet/adaptec/starfire.c eaddrs = (__be16 *) ha->addr; ha 1822 drivers/net/ethernet/adaptec/starfire.c netdev_for_each_mc_addr(ha, dev) { ha 1825 drivers/net/ethernet/adaptec/starfire.c int bit_nr = ether_crc_le(ETH_ALEN, ha->addr) >> 23; ha 1043 drivers/net/ethernet/aeroflex/greth.c struct netdev_hw_addr *ha; ha 1051 drivers/net/ethernet/aeroflex/greth.c netdev_for_each_mc_addr(ha, dev) { ha 1052 drivers/net/ethernet/aeroflex/greth.c bitnr = greth_hash_get_index(ha->addr); ha 3723 drivers/net/ethernet/agere/et131x.c struct netdev_hw_addr *ha; ha 3760 drivers/net/ethernet/agere/et131x.c netdev_for_each_mc_addr(ha, netdev) { ha 3763 drivers/net/ethernet/agere/et131x.c ether_addr_copy(adapter->multicast_list[i++], ha->addr); ha 1012 drivers/net/ethernet/altera/altera_tse_main.c struct netdev_hw_addr *ha; ha 1018 drivers/net/ethernet/altera/altera_tse_main.c netdev_for_each_mc_addr(ha, dev) { ha 1024 drivers/net/ethernet/altera/altera_tse_main.c unsigned char octet = ha->addr[mac_octet]; ha 603 drivers/net/ethernet/amd/7990.c struct netdev_hw_addr *ha; ha 617 drivers/net/ethernet/amd/7990.c netdev_for_each_mc_addr(ha, dev) { ha 618 drivers/net/ethernet/amd/7990.c crc = ether_crc_le(6, ha->addr); ha 589 drivers/net/ethernet/amd/a2065.c struct netdev_hw_addr *ha; ha 603 drivers/net/ethernet/amd/a2065.c netdev_for_each_mc_addr(ha, dev) { ha 604 drivers/net/ethernet/amd/a2065.c crc = ether_crc_le(6, ha->addr); ha 219 drivers/net/ethernet/amd/am79c961a.c struct netdev_hw_addr *ha; ha 223 drivers/net/ethernet/amd/am79c961a.c netdev_for_each_mc_addr(ha, dev) ha 224 drivers/net/ethernet/amd/am79c961a.c am79c961_mc_hash(ha->addr, hash); ha 1321 drivers/net/ethernet/amd/amd8111e.c struct netdev_hw_addr *ha; ha 1352 drivers/net/ethernet/amd/amd8111e.c netdev_for_each_mc_addr(ha, dev) { ha 1353 drivers/net/ethernet/amd/amd8111e.c bit_num = (ether_crc_le(ETH_ALEN, ha->addr) >> 26) & 0x3f; ha 1041 drivers/net/ethernet/amd/au1000_eth.c struct netdev_hw_addr *ha; ha 1045 drivers/net/ethernet/amd/au1000_eth.c netdev_for_each_mc_addr(ha, dev) ha 1046 drivers/net/ethernet/amd/au1000_eth.c set_bit(ether_crc(ETH_ALEN, ha->addr)>>26, ha 947 drivers/net/ethernet/amd/declance.c struct netdev_hw_addr *ha; ha 965 drivers/net/ethernet/amd/declance.c netdev_for_each_mc_addr(ha, dev) { ha 966 drivers/net/ethernet/amd/declance.c crc = ether_crc_le(ETH_ALEN, ha->addr); ha 1421 drivers/net/ethernet/amd/nmclan_cs.c struct netdev_hw_addr *ha; ha 1441 drivers/net/ethernet/amd/nmclan_cs.c netdev_for_each_mc_addr(ha, dev) { ha 1442 drivers/net/ethernet/amd/nmclan_cs.c memcpy(adr, ha->addr, ETH_ALEN); ha 2688 drivers/net/ethernet/amd/pcnet32.c struct netdev_hw_addr *ha; ha 2708 drivers/net/ethernet/amd/pcnet32.c netdev_for_each_mc_addr(ha, dev) { ha 2709 drivers/net/ethernet/amd/pcnet32.c crc = ether_crc_le(6, ha->addr); ha 1167 drivers/net/ethernet/amd/sunlance.c struct netdev_hw_addr *ha; ha 1191 drivers/net/ethernet/amd/sunlance.c netdev_for_each_mc_addr(ha, dev) { ha 1192 drivers/net/ethernet/amd/sunlance.c crc = ether_crc_le(6, ha->addr); ha 974 drivers/net/ethernet/amd/xgbe/xgbe-dev.c struct netdev_hw_addr *ha, unsigned int *mac_reg) ha 982 drivers/net/ethernet/amd/xgbe/xgbe-dev.c if (ha) { ha 984 drivers/net/ethernet/amd/xgbe/xgbe-dev.c mac_addr[0] = ha->addr[0]; ha 985 drivers/net/ethernet/amd/xgbe/xgbe-dev.c mac_addr[1] = ha->addr[1]; ha 986 drivers/net/ethernet/amd/xgbe/xgbe-dev.c mac_addr[2] = ha->addr[2]; ha 987 drivers/net/ethernet/amd/xgbe/xgbe-dev.c mac_addr[3] = ha->addr[3]; ha 989 drivers/net/ethernet/amd/xgbe/xgbe-dev.c mac_addr[0] = ha->addr[4]; ha 990 drivers/net/ethernet/amd/xgbe/xgbe-dev.c mac_addr[1] = ha->addr[5]; ha 994 drivers/net/ethernet/amd/xgbe/xgbe-dev.c ha->addr, *mac_reg); ha 1008 drivers/net/ethernet/amd/xgbe/xgbe-dev.c struct netdev_hw_addr *ha; ha 1018 drivers/net/ethernet/amd/xgbe/xgbe-dev.c netdev_for_each_uc_addr(ha, netdev) { ha 1019 drivers/net/ethernet/amd/xgbe/xgbe-dev.c xgbe_set_mac_reg(pdata, ha, &mac_reg); ha 1026 drivers/net/ethernet/amd/xgbe/xgbe-dev.c netdev_for_each_mc_addr(ha, netdev) { ha 1027 drivers/net/ethernet/amd/xgbe/xgbe-dev.c xgbe_set_mac_reg(pdata, ha, &mac_reg); ha 1041 drivers/net/ethernet/amd/xgbe/xgbe-dev.c struct netdev_hw_addr *ha; ha 1053 drivers/net/ethernet/amd/xgbe/xgbe-dev.c netdev_for_each_uc_addr(ha, netdev) { ha 1054 drivers/net/ethernet/amd/xgbe/xgbe-dev.c crc = bitrev32(~crc32_le(~0, ha->addr, ETH_ALEN)); ha 1059 drivers/net/ethernet/amd/xgbe/xgbe-dev.c netdev_for_each_mc_addr(ha, netdev) { ha 1060 drivers/net/ethernet/amd/xgbe/xgbe-dev.c crc = bitrev32(~crc32_le(~0, ha->addr, ETH_ALEN)); ha 969 drivers/net/ethernet/apple/bmac.c struct netdev_hw_addr *ha; ha 998 drivers/net/ethernet/apple/bmac.c netdev_for_each_mc_addr(ha, dev) ha 999 drivers/net/ethernet/apple/bmac.c bmac_addhash(bp, ha->addr); ha 1013 drivers/net/ethernet/apple/bmac.c struct netdev_hw_addr *ha; ha 1033 drivers/net/ethernet/apple/bmac.c netdev_for_each_mc_addr(ha, dev) { ha 1034 drivers/net/ethernet/apple/bmac.c crc = ether_crc_le(6, ha->addr); ha 598 drivers/net/ethernet/apple/mace.c struct netdev_hw_addr *ha; ha 606 drivers/net/ethernet/apple/mace.c netdev_for_each_mc_addr(ha, dev) { ha 607 drivers/net/ethernet/apple/mace.c crc = ether_crc_le(6, ha->addr); ha 496 drivers/net/ethernet/apple/macmace.c struct netdev_hw_addr *ha; ha 505 drivers/net/ethernet/apple/macmace.c netdev_for_each_mc_addr(ha, dev) { ha 506 drivers/net/ethernet/apple/macmace.c crc = ether_crc_le(6, ha->addr); ha 635 drivers/net/ethernet/aquantia/atlantic/aq_nic.c struct netdev_hw_addr *ha = NULL; ha 643 drivers/net/ethernet/aquantia/atlantic/aq_nic.c netdev_for_each_uc_addr(ha, ndev) { ha 644 drivers/net/ethernet/aquantia/atlantic/aq_nic.c ether_addr_copy(self->mc_list.ar[i++], ha->addr); ha 653 drivers/net/ethernet/aquantia/atlantic/aq_nic.c netdev_for_each_mc_addr(ha, ndev) { ha 655 drivers/net/ethernet/aquantia/atlantic/aq_nic.c ha->addr); ha 525 drivers/net/ethernet/arc/emac_main.c struct netdev_hw_addr *ha; ha 529 drivers/net/ethernet/arc/emac_main.c netdev_for_each_mc_addr(ha, ndev) { ha 530 drivers/net/ethernet/arc/emac_main.c bit = ether_crc_le(ETH_ALEN, ha->addr) >> 26; ha 573 drivers/net/ethernet/atheros/alx/main.c struct netdev_hw_addr *ha; ha 577 drivers/net/ethernet/atheros/alx/main.c netdev_for_each_mc_addr(ha, netdev) ha 578 drivers/net/ethernet/atheros/alx/main.c alx_add_mc_addr(hw, ha->addr, mc_hash); ha 375 drivers/net/ethernet/atheros/atl1c/atl1c_main.c struct netdev_hw_addr *ha; ha 398 drivers/net/ethernet/atheros/atl1c/atl1c_main.c netdev_for_each_mc_addr(ha, netdev) { ha 399 drivers/net/ethernet/atheros/atl1c/atl1c_main.c hash_value = atl1c_hash_mc_addr(hw, ha->addr); ha 275 drivers/net/ethernet/atheros/atl1e/atl1e_main.c struct netdev_hw_addr *ha; ha 298 drivers/net/ethernet/atheros/atl1e/atl1e_main.c netdev_for_each_mc_addr(ha, netdev) { ha 299 drivers/net/ethernet/atheros/atl1e/atl1e_main.c hash_value = atl1e_hash_mc_addr(hw, ha->addr); ha 125 drivers/net/ethernet/atheros/atlx/atl2.c struct netdev_hw_addr *ha; ha 147 drivers/net/ethernet/atheros/atlx/atl2.c netdev_for_each_mc_addr(ha, netdev) { ha 148 drivers/net/ethernet/atheros/atlx/atl2.c hash_value = atl2_hash_mc_addr(hw, ha->addr); ha 117 drivers/net/ethernet/atheros/atlx/atlx.c struct netdev_hw_addr *ha; ha 138 drivers/net/ethernet/atheros/atlx/atlx.c netdev_for_each_mc_addr(ha, netdev) { ha 139 drivers/net/ethernet/atheros/atlx/atlx.c hash_value = atlx_hash_mc_addr(hw, ha->addr); ha 724 drivers/net/ethernet/aurora/nb8800.c struct netdev_hw_addr *ha; ha 735 drivers/net/ethernet/aurora/nb8800.c netdev_for_each_mc_addr(ha, dev) { ha 737 drivers/net/ethernet/aurora/nb8800.c nb8800_writeb(priv, NB8800_MC_ADDR(i), ha->addr[i]); ha 1726 drivers/net/ethernet/broadcom/b44.c struct netdev_hw_addr *ha; ha 1731 drivers/net/ethernet/broadcom/b44.c netdev_for_each_mc_addr(ha, dev) { ha 1734 drivers/net/ethernet/broadcom/b44.c __b44_cam_write(bp, ha->addr, i++ + 1); ha 673 drivers/net/ethernet/broadcom/bcm63xx_enet.c struct netdev_hw_addr *ha; ha 701 drivers/net/ethernet/broadcom/bcm63xx_enet.c netdev_for_each_mc_addr(ha, dev) { ha 708 drivers/net/ethernet/broadcom/bcm63xx_enet.c dmi_addr = ha->addr; ha 3584 drivers/net/ethernet/broadcom/bnx2.c struct netdev_hw_addr *ha; ha 3620 drivers/net/ethernet/broadcom/bnx2.c netdev_for_each_mc_addr(ha, dev) { ha 3621 drivers/net/ethernet/broadcom/bnx2.c crc = ether_crc_le(ETH_ALEN, ha->addr); ha 3643 drivers/net/ethernet/broadcom/bnx2.c netdev_for_each_uc_addr(ha, dev) { ha 3644 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_addr(bp, ha->addr, ha 156 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_mc_addr(ha) ((ha)->addr) ha 157 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_uc_addr(ha) ((ha)->addr) ha 12657 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct netdev_hw_addr *ha; ha 12663 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_for_each_mc_addr(ha, bp->dev) { ha 12677 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mc_mac->mac = bnx2x_mc_addr(ha); ha 12698 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct netdev_hw_addr *ha; ha 12709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_for_each_uc_addr(ha, dev) { ha 12710 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_set_mac_one(bp, bnx2x_uc_addr(ha), mac_obj, true, ha 872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct netdev_hw_addr *ha; ha 895 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c netdev_for_each_mc_addr(ha, dev) { ha 897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_mc_addr(ha)); ha 898 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c memcpy(req->multicast[i], bnx2x_mc_addr(ha), ETH_ALEN); ha 9518 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct netdev_hw_addr *ha; ha 9524 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_for_each_mc_addr(ha, dev) { ha 9530 drivers/net/ethernet/broadcom/bnxt/bnxt.c haddr = ha->addr; ha 9552 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct netdev_hw_addr *ha; ha 9558 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_for_each_uc_addr(ha, dev) { ha 9559 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!ether_addr_equal(ha->addr, vnic->uc_list + off)) ha 9611 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct netdev_hw_addr *ha; ha 9642 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_for_each_uc_addr(ha, dev) { ha 9643 drivers/net/ethernet/broadcom/bnxt/bnxt.c memcpy(vnic->uc_list + off, ha->addr, ETH_ALEN); ha 404 drivers/net/ethernet/broadcom/cnic.c memcpy(csk->ha, path_resp->mac_addr, ETH_ALEN); ha 412 drivers/net/ethernet/broadcom/cnic.c if (is_valid_ether_addr(csk->ha)) { ha 2161 drivers/net/ethernet/broadcom/cnic.c conn_addr->remote_addr_0 = csk->ha[0]; ha 2162 drivers/net/ethernet/broadcom/cnic.c conn_addr->remote_addr_1 = csk->ha[1]; ha 2163 drivers/net/ethernet/broadcom/cnic.c conn_addr->remote_addr_2 = csk->ha[2]; ha 2164 drivers/net/ethernet/broadcom/cnic.c conn_addr->remote_addr_3 = csk->ha[3]; ha 2165 drivers/net/ethernet/broadcom/cnic.c conn_addr->remote_addr_4 = csk->ha[4]; ha 2166 drivers/net/ethernet/broadcom/cnic.c conn_addr->remote_addr_5 = csk->ha[5]; ha 3391 drivers/net/ethernet/broadcom/cnic.c l4kwqe->da0 = csk->ha[0]; ha 3392 drivers/net/ethernet/broadcom/cnic.c l4kwqe->da1 = csk->ha[1]; ha 3393 drivers/net/ethernet/broadcom/cnic.c l4kwqe->da2 = csk->ha[2]; ha 3394 drivers/net/ethernet/broadcom/cnic.c l4kwqe->da3 = csk->ha[3]; ha 3395 drivers/net/ethernet/broadcom/cnic.c l4kwqe->da4 = csk->ha[4]; ha 3396 drivers/net/ethernet/broadcom/cnic.c l4kwqe->da5 = csk->ha[5]; ha 3433 drivers/net/ethernet/broadcom/cnic.c l4kwqe->da0 = csk->ha[0]; ha 3434 drivers/net/ethernet/broadcom/cnic.c l4kwqe->da1 = csk->ha[1]; ha 3435 drivers/net/ethernet/broadcom/cnic.c l4kwqe->da2 = csk->ha[2]; ha 3436 drivers/net/ethernet/broadcom/cnic.c l4kwqe->da3 = csk->ha[3]; ha 3437 drivers/net/ethernet/broadcom/cnic.c l4kwqe->da4 = csk->ha[4]; ha 3438 drivers/net/ethernet/broadcom/cnic.c l4kwqe->da5 = csk->ha[5]; ha 269 drivers/net/ethernet/broadcom/cnic_if.h unsigned char ha[ETH_ALEN]; ha 3107 drivers/net/ethernet/broadcom/genet/bcmgenet.c struct netdev_hw_addr *ha; ha 3143 drivers/net/ethernet/broadcom/genet/bcmgenet.c netdev_for_each_uc_addr(ha, dev) ha 3144 drivers/net/ethernet/broadcom/genet/bcmgenet.c bcmgenet_set_mdf_addr(priv, ha->addr, &i); ha 3147 drivers/net/ethernet/broadcom/genet/bcmgenet.c netdev_for_each_mc_addr(ha, dev) ha 3148 drivers/net/ethernet/broadcom/genet/bcmgenet.c bcmgenet_set_mdf_addr(priv, ha->addr, &i); ha 2063 drivers/net/ethernet/broadcom/sb1250-mac.c struct netdev_hw_addr *ha; ha 2112 drivers/net/ethernet/broadcom/sb1250-mac.c netdev_for_each_mc_addr(ha, dev) { ha 2115 drivers/net/ethernet/broadcom/sb1250-mac.c reg = sbmac_addr2reg(ha->addr); ha 9775 drivers/net/ethernet/broadcom/tg3.c struct netdev_hw_addr *ha; ha 9781 drivers/net/ethernet/broadcom/tg3.c netdev_for_each_mc_addr(ha, dev) { ha 9782 drivers/net/ethernet/broadcom/tg3.c crc = calc_crc(ha->addr, ETH_ALEN); ha 9800 drivers/net/ethernet/broadcom/tg3.c struct netdev_hw_addr *ha; ha 9802 drivers/net/ethernet/broadcom/tg3.c netdev_for_each_uc_addr(ha, dev) { ha 9803 drivers/net/ethernet/broadcom/tg3.c __tg3_set_one_mac_addr(tp, ha->addr, ha 3125 drivers/net/ethernet/brocade/bna/bnad.c struct netdev_hw_addr *ha; ha 3141 drivers/net/ethernet/brocade/bna/bnad.c netdev_for_each_uc_addr(ha, netdev) { ha 3142 drivers/net/ethernet/brocade/bna/bnad.c ether_addr_copy(&mac_list[entry * ETH_ALEN], &ha->addr[0]); ha 2349 drivers/net/ethernet/cadence/macb_main.c struct netdev_hw_addr *ha; ha 2357 drivers/net/ethernet/cadence/macb_main.c netdev_for_each_mc_addr(ha, dev) { ha 2358 drivers/net/ethernet/cadence/macb_main.c bitnr = hash_get_index(ha->addr); ha 1277 drivers/net/ethernet/calxeda/xgmac.c struct netdev_hw_addr *ha; ha 1292 drivers/net/ethernet/calxeda/xgmac.c netdev_for_each_uc_addr(ha, dev) { ha 1294 drivers/net/ethernet/calxeda/xgmac.c u32 bit_nr = ~ether_crc(ETH_ALEN, ha->addr) >> 23; ha 1301 drivers/net/ethernet/calxeda/xgmac.c xgmac_set_mac_addr(ioaddr, ha->addr, reg); ha 1317 drivers/net/ethernet/calxeda/xgmac.c netdev_for_each_mc_addr(ha, dev) { ha 1319 drivers/net/ethernet/calxeda/xgmac.c u32 bit_nr = ~ether_crc(ETH_ALEN, ha->addr) >> 23; ha 1326 drivers/net/ethernet/calxeda/xgmac.c xgmac_set_mac_addr(ioaddr, ha->addr, reg); ha 1975 drivers/net/ethernet/cavium/liquidio/lio_main.c struct netdev_hw_addr *ha; ha 1994 drivers/net/ethernet/cavium/liquidio/lio_main.c netdev_for_each_mc_addr(ha, netdev) { ha 1996 drivers/net/ethernet/cavium/liquidio/lio_main.c memcpy(((u8 *)mc) + 2, ha->addr, ETH_ALEN); ha 1033 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c struct netdev_hw_addr *ha; ha 1056 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c netdev_for_each_uc_addr(ha, netdev) { ha 1057 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c ether_addr_copy(((u8 *)mac) + 2, ha->addr); ha 1074 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c struct netdev_hw_addr *ha; ha 1091 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c netdev_for_each_mc_addr(ha, netdev) { ha 1093 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c ether_addr_copy(((u8 *)mc) + 2, ha->addr); ha 567 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c struct netdev_hw_addr *ha; ha 593 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c netdev_for_each_uc_addr(ha, netdev) ha 594 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c octeon_mgmt_cam_state_add(&cam_state, ha->addr); ha 597 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c netdev_for_each_mc_addr(ha, netdev) ha 598 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c octeon_mgmt_cam_state_add(&cam_state, ha->addr); ha 2062 drivers/net/ethernet/cavium/thunder/nicvf_main.c struct netdev_hw_addr *ha; ha 2084 drivers/net/ethernet/cavium/thunder/nicvf_main.c netdev_hw_addr_list_for_each(ha, &netdev->mc) { ha 2086 drivers/net/ethernet/cavium/thunder/nicvf_main.c ether_addr_to_u64(ha->addr); ha 373 drivers/net/ethernet/chelsio/cxgb/pm3393.c struct netdev_hw_addr *ha; ha 377 drivers/net/ethernet/chelsio/cxgb/pm3393.c netdev_for_each_mc_addr(ha, t1_get_netdev(rm)) { ha 379 drivers/net/ethernet/chelsio/cxgb/pm3393.c bit = (ether_crc(ETH_ALEN, ha->addr) >> 23) & 0x3f; ha 105 drivers/net/ethernet/chelsio/cxgb3/l2t.c memcpy(e->dmac, e->neigh->ha, sizeof(e->dmac)); ha 292 drivers/net/ethernet/chelsio/cxgb3/l2t.c if (memcmp(e->dmac, neigh->ha, sizeof(e->dmac)) || ha 433 drivers/net/ethernet/chelsio/cxgb3/l2t.c if (!ether_addr_equal(e->dmac, neigh->ha)) ha 314 drivers/net/ethernet/chelsio/cxgb3/xgmac.c struct netdev_hw_addr *ha; ha 318 drivers/net/ethernet/chelsio/cxgb3/xgmac.c netdev_for_each_mc_addr(ha, dev) ha 321 drivers/net/ethernet/chelsio/cxgb3/xgmac.c ha->addr); ha 323 drivers/net/ethernet/chelsio/cxgb3/xgmac.c int hash = hash_hw_addr(ha->addr); ha 159 drivers/net/ethernet/chelsio/cxgb4/l2t.c memcpy(e->dmac, e->neigh->ha, sizeof(e->dmac)); ha 409 drivers/net/ethernet/chelsio/cxgb4/l2t.c if (memcmp(e->dmac, neigh->ha, sizeof(e->dmac)) || ha 572 drivers/net/ethernet/chelsio/cxgb4/l2t.c if (memcmp(e->dmac, neigh->ha, sizeof(e->dmac))) ha 1862 drivers/net/ethernet/cortina/gemini.c struct netdev_hw_addr *ha; ha 1878 drivers/net/ethernet/cortina/gemini.c netdev_for_each_mc_addr(ha, netdev) { ha 1879 drivers/net/ethernet/cortina/gemini.c bit_nr = ~crc32_le(~0, ha->addr, ETH_ALEN) & 0x3f; ha 843 drivers/net/ethernet/davicom/dm9000.c struct netdev_hw_addr *ha; ha 861 drivers/net/ethernet/davicom/dm9000.c netdev_for_each_mc_addr(ha, dev) { ha 862 drivers/net/ethernet/davicom/dm9000.c hash_val = ether_crc_le(6, ha->addr) & 0x3f; ha 666 drivers/net/ethernet/dec/tulip/de2104x.c struct netdev_hw_addr *ha; ha 673 drivers/net/ethernet/dec/tulip/de2104x.c netdev_for_each_mc_addr(ha, dev) { ha 674 drivers/net/ethernet/dec/tulip/de2104x.c int index = ether_crc_le(ETH_ALEN, ha->addr) & 0x1ff; ha 695 drivers/net/ethernet/dec/tulip/de2104x.c struct netdev_hw_addr *ha; ha 700 drivers/net/ethernet/dec/tulip/de2104x.c netdev_for_each_mc_addr(ha, dev) { ha 701 drivers/net/ethernet/dec/tulip/de2104x.c eaddrs = (u16 *) ha->addr; ha 1950 drivers/net/ethernet/dec/tulip/de4x5.c struct netdev_hw_addr *ha; ha 1965 drivers/net/ethernet/dec/tulip/de4x5.c netdev_for_each_mc_addr(ha, dev) { ha 1966 drivers/net/ethernet/dec/tulip/de4x5.c crc = ether_crc_le(ETH_ALEN, ha->addr); ha 1979 drivers/net/ethernet/dec/tulip/de4x5.c netdev_for_each_mc_addr(ha, dev) { ha 1980 drivers/net/ethernet/dec/tulip/de4x5.c addrs = ha->addr; ha 1448 drivers/net/ethernet/dec/tulip/dmfe.c struct netdev_hw_addr *ha; ha 1464 drivers/net/ethernet/dec/tulip/dmfe.c netdev_for_each_mc_addr(ha, dev) { ha 1465 drivers/net/ethernet/dec/tulip/dmfe.c u32 hash_val = cal_CRC((char *)ha->addr, 6, 0) & 0x3f; ha 1484 drivers/net/ethernet/dec/tulip/dmfe.c struct netdev_hw_addr *ha; ha 1507 drivers/net/ethernet/dec/tulip/dmfe.c netdev_for_each_mc_addr(ha, dev) { ha 1508 drivers/net/ethernet/dec/tulip/dmfe.c addrptr = (u16 *) ha->addr; ha 1013 drivers/net/ethernet/dec/tulip/tulip_core.c struct netdev_hw_addr *ha; ha 1020 drivers/net/ethernet/dec/tulip/tulip_core.c netdev_for_each_mc_addr(ha, dev) { ha 1021 drivers/net/ethernet/dec/tulip/tulip_core.c int index = ether_crc_le(ETH_ALEN, ha->addr) & 0x1ff; ha 1041 drivers/net/ethernet/dec/tulip/tulip_core.c struct netdev_hw_addr *ha; ha 1046 drivers/net/ethernet/dec/tulip/tulip_core.c netdev_for_each_mc_addr(ha, dev) { ha 1047 drivers/net/ethernet/dec/tulip/tulip_core.c eaddrs = (u16 *) ha->addr; ha 1084 drivers/net/ethernet/dec/tulip/tulip_core.c struct netdev_hw_addr *ha; ha 1092 drivers/net/ethernet/dec/tulip/tulip_core.c netdev_for_each_mc_addr(ha, dev) { ha 1095 drivers/net/ethernet/dec/tulip/tulip_core.c ha->addr); ha 1098 drivers/net/ethernet/dec/tulip/tulip_core.c ha->addr) >> 26; ha 1104 drivers/net/ethernet/dec/tulip/tulip_core.c ha->addr, ha 1105 drivers/net/ethernet/dec/tulip/tulip_core.c ether_crc(ETH_ALEN, ha->addr), ha 1382 drivers/net/ethernet/dec/tulip/uli526x.c struct netdev_hw_addr *ha; ha 1405 drivers/net/ethernet/dec/tulip/uli526x.c netdev_for_each_mc_addr(ha, dev) { ha 1406 drivers/net/ethernet/dec/tulip/uli526x.c addrptr = (u16 *) ha->addr; ha 1357 drivers/net/ethernet/dec/tulip/winbond-840.c struct netdev_hw_addr *ha; ha 1360 drivers/net/ethernet/dec/tulip/winbond-840.c netdev_for_each_mc_addr(ha, dev) { ha 1363 drivers/net/ethernet/dec/tulip/winbond-840.c filbit = (ether_crc(ETH_ALEN, ha->addr) >> 26) ^ 0x3F; ha 1214 drivers/net/ethernet/dlink/dl2k.c struct netdev_hw_addr *ha; ha 1219 drivers/net/ethernet/dlink/dl2k.c netdev_for_each_mc_addr(ha, dev) { ha 1221 drivers/net/ethernet/dlink/dl2k.c int crc = ether_crc_le(ETH_ALEN, ha->addr); ha 1583 drivers/net/ethernet/dlink/sundance.c struct netdev_hw_addr *ha; ha 1588 drivers/net/ethernet/dlink/sundance.c netdev_for_each_mc_addr(ha, dev) { ha 1589 drivers/net/ethernet/dlink/sundance.c crc = ether_crc_le(ETH_ALEN, ha->addr); ha 1687 drivers/net/ethernet/emulex/benet/be_main.c struct netdev_hw_addr *ha; ha 1714 drivers/net/ethernet/emulex/benet/be_main.c netdev_for_each_mc_addr(ha, netdev) { ha 1715 drivers/net/ethernet/emulex/benet/be_main.c ether_addr_copy(adapter->mc_list[i].mac, ha->addr); ha 1767 drivers/net/ethernet/emulex/benet/be_main.c struct netdev_hw_addr *ha; ha 1789 drivers/net/ethernet/emulex/benet/be_main.c netdev_for_each_uc_addr(ha, netdev) { ha 1790 drivers/net/ethernet/emulex/benet/be_main.c ether_addr_copy(adapter->uc_list[i].mac, ha->addr); ha 828 drivers/net/ethernet/ethoc.c struct netdev_hw_addr *ha; ha 856 drivers/net/ethernet/ethoc.c netdev_for_each_mc_addr(ha, dev) { ha 857 drivers/net/ethernet/ethoc.c u32 crc = ether_crc(ETH_ALEN, ha->addr); ha 348 drivers/net/ethernet/faraday/ftgmac100.c struct netdev_hw_addr *ha; ha 352 drivers/net/ethernet/faraday/ftgmac100.c netdev_for_each_mc_addr(ha, priv->netdev) { ha 353 drivers/net/ethernet/faraday/ftgmac100.c u32 crc_val = ether_crc_le(ETH_ALEN, ha->addr); ha 1787 drivers/net/ethernet/fealnx.c struct netdev_hw_addr *ha; ha 1790 drivers/net/ethernet/fealnx.c netdev_for_each_mc_addr(ha, dev) { ha 1792 drivers/net/ethernet/fealnx.c bit = (ether_crc(ETH_ALEN, ha->addr) >> 26) ^ 0x3F; ha 1484 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c struct netdev_hw_addr *ha; ha 1487 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c netdev_for_each_uc_addr(ha, net_dev) { ha 1489 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c ha->addr); ha 1493 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c ha->addr, err); ha 1503 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c struct netdev_hw_addr *ha; ha 1506 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c netdev_for_each_mc_addr(ha, net_dev) { ha 1508 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c ha->addr); ha 1512 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c ha->addr, err); ha 216 drivers/net/ethernet/freescale/enetc/enetc_pf.c struct netdev_hw_addr *ha; ha 242 drivers/net/ethernet/freescale/enetc/enetc_pf.c netdev_for_each_uc_addr(ha, ndev) { ha 244 drivers/net/ethernet/freescale/enetc/enetc_pf.c enetc_add_mac_addr_em_filter(filter, ha->addr); ha 248 drivers/net/ethernet/freescale/enetc/enetc_pf.c enetc_add_mac_addr_ht_filter(filter, ha->addr); ha 257 drivers/net/ethernet/freescale/enetc/enetc_pf.c netdev_for_each_mc_addr(ha, ndev) { ha 258 drivers/net/ethernet/freescale/enetc/enetc_pf.c if (!is_multicast_ether_addr(ha->addr)) ha 261 drivers/net/ethernet/freescale/enetc/enetc_pf.c enetc_add_mac_addr_ht_filter(filter, ha->addr); ha 3064 drivers/net/ethernet/freescale/fec_main.c struct netdev_hw_addr *ha; ha 3091 drivers/net/ethernet/freescale/fec_main.c netdev_for_each_mc_addr(ha, ndev) { ha 3093 drivers/net/ethernet/freescale/fec_main.c crc = ether_crc_le(ndev->addr_len, ha->addr); ha 568 drivers/net/ethernet/freescale/fec_mpc52xx.c struct netdev_hw_addr *ha; ha 572 drivers/net/ethernet/freescale/fec_mpc52xx.c netdev_for_each_mc_addr(ha, dev) { ha 573 drivers/net/ethernet/freescale/fec_mpc52xx.c crc = ether_crc_le(6, ha->addr) >> 26; ha 286 drivers/net/ethernet/freescale/fman/mac.c struct netdev_hw_addr *ha; ha 304 drivers/net/ethernet/freescale/fman/mac.c netdev_for_each_mc_addr(ha, net_dev) { ha 305 drivers/net/ethernet/freescale/fman/mac.c addr = (enet_addr_t *)ha->addr; ha 314 drivers/net/ethernet/freescale/fman/mac.c ether_addr_copy(tmp->addr, ha->addr); ha 233 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct netdev_hw_addr *ha; ha 237 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c netdev_for_each_mc_addr(ha, dev) ha 238 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c set_multicast_one(dev, ha->addr); ha 217 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct netdev_hw_addr *ha; ha 221 drivers/net/ethernet/freescale/fs_enet/mac-fec.c netdev_for_each_mc_addr(ha, dev) ha 222 drivers/net/ethernet/freescale/fs_enet/mac-fec.c set_multicast_one(dev, ha->addr); ha 218 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct netdev_hw_addr *ha; ha 222 drivers/net/ethernet/freescale/fs_enet/mac-scc.c netdev_for_each_mc_addr(ha, dev) ha 223 drivers/net/ethernet/freescale/fs_enet/mac-scc.c set_multicast_one(dev, ha->addr); ha 3068 drivers/net/ethernet/freescale/gianfar.c struct netdev_hw_addr *ha; ha 3142 drivers/net/ethernet/freescale/gianfar.c netdev_for_each_mc_addr(ha, dev) { ha 3144 drivers/net/ethernet/freescale/gianfar.c gfar_set_mac_for_addr(dev, idx, ha->addr); ha 3147 drivers/net/ethernet/freescale/gianfar.c gfar_set_hash_for_addr(dev, ha->addr); ha 2000 drivers/net/ethernet/freescale/ucc_geth.c struct netdev_hw_addr *ha; ha 2029 drivers/net/ethernet/freescale/ucc_geth.c netdev_for_each_mc_addr(ha, dev) { ha 2033 drivers/net/ethernet/freescale/ucc_geth.c hw_add_addr_in_hash(ugeth, ha->addr); ha 1155 drivers/net/ethernet/fujitsu/fmvj18x_cs.c struct netdev_hw_addr *ha; ha 1158 drivers/net/ethernet/fujitsu/fmvj18x_cs.c netdev_for_each_mc_addr(ha, dev) { ha 1159 drivers/net/ethernet/fujitsu/fmvj18x_cs.c unsigned int bit = ether_crc_le(ETH_ALEN, ha->addr) >> 26; ha 625 drivers/net/ethernet/hisilicon/hisi_femac.c struct netdev_hw_addr *ha; ha 630 drivers/net/ethernet/hisilicon/hisi_femac.c netdev_for_each_mc_addr(ha, dev) { ha 631 drivers/net/ethernet/hisilicon/hisi_femac.c hisi_femac_set_hw_addr_filter(priv, ha->addr, reg); ha 651 drivers/net/ethernet/hisilicon/hisi_femac.c struct netdev_hw_addr *ha; ha 656 drivers/net/ethernet/hisilicon/hisi_femac.c netdev_for_each_uc_addr(ha, dev) { ha 657 drivers/net/ethernet/hisilicon/hisi_femac.c hisi_femac_set_hw_addr_filter(priv, ha->addr, reg); ha 1858 drivers/net/ethernet/hisilicon/hns/hns_enet.c struct netdev_hw_addr *ha = NULL; ha 1870 drivers/net/ethernet/hisilicon/hns/hns_enet.c netdev_for_each_mc_addr(ha, ndev) ha 1871 drivers/net/ethernet/hisilicon/hns/hns_enet.c if (h->dev->ops->set_mc_addr(h, ha->addr)) ha 4039 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c struct netdev_hw_addr *ha, *tmp; ha 4045 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c list_for_each_entry_safe(ha, tmp, &list->list, list) { ha 4046 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c ret = hns3_nic_uc_sync(ndev, ha->addr); ha 4053 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c list_for_each_entry_safe(ha, tmp, &list->list, list) { ha 4054 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c ret = hns3_nic_mc_sync(ndev, ha->addr); ha 4067 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c struct netdev_hw_addr *ha, *tmp; ha 4074 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c list_for_each_entry_safe(ha, tmp, &list->list, list) ha 4075 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c hns3_nic_uc_unsync(netdev, ha->addr); ha 4079 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c list_for_each_entry_safe(ha, tmp, &list->list, list) ha 4080 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c if (ha->refcount > 1) ha 4081 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c hns3_nic_mc_unsync(netdev, ha->addr); ha 2081 drivers/net/ethernet/hp/hp100.c struct netdev_hw_addr *ha; ha 2088 drivers/net/ethernet/hp/hp100.c netdev_for_each_mc_addr(ha, dev) { ha 2089 drivers/net/ethernet/hp/hp100.c addrs = ha->addr; ha 1495 drivers/net/ethernet/i825xx/82596.c struct netdev_hw_addr *ha; ha 1505 drivers/net/ethernet/i825xx/82596.c netdev_for_each_mc_addr(ha, dev) { ha 1508 drivers/net/ethernet/i825xx/82596.c memcpy(cp, ha->addr, ETH_ALEN); ha 1388 drivers/net/ethernet/i825xx/lib82596.c struct netdev_hw_addr *ha; ha 1396 drivers/net/ethernet/i825xx/lib82596.c netdev_for_each_mc_addr(ha, dev) { ha 1399 drivers/net/ethernet/i825xx/lib82596.c memcpy(cp, ha->addr, ETH_ALEN); ha 413 drivers/net/ethernet/i825xx/sun3_82586.c struct netdev_hw_addr *ha; ha 537 drivers/net/ethernet/i825xx/sun3_82586.c netdev_for_each_mc_addr(ha, dev) ha 539 drivers/net/ethernet/i825xx/sun3_82586.c ha->addr, ETH_ALEN); ha 1919 drivers/net/ethernet/ibm/ehea/ehea_main.c struct netdev_hw_addr *ha; ha 1945 drivers/net/ethernet/ibm/ehea/ehea_main.c netdev_for_each_mc_addr(ha, dev) ha 1946 drivers/net/ethernet/ibm/ehea/ehea_main.c ehea_add_multicast_entry(port, ha->addr); ha 422 drivers/net/ethernet/ibm/emac/core.c struct netdev_hw_addr *ha; ha 429 drivers/net/ethernet/ibm/emac/core.c netdev_for_each_mc_addr(ha, dev->ndev) { ha 431 drivers/net/ethernet/ibm/emac/core.c DBG2(dev, "mc %pM" NL, ha->addr); ha 434 drivers/net/ethernet/ibm/emac/core.c ether_crc(ETH_ALEN, ha->addr)); ha 1428 drivers/net/ethernet/ibm/ibmveth.c struct netdev_hw_addr *ha; ha 1441 drivers/net/ethernet/ibm/ibmveth.c netdev_for_each_mc_addr(ha, netdev) { ha 1444 drivers/net/ethernet/ibm/ibmveth.c mcast_addr = ibmveth_encode_mac_addr(ha->addr); ha 1636 drivers/net/ethernet/ibm/ibmvnic.c struct netdev_hw_addr *ha; ha 1663 drivers/net/ethernet/ibm/ibmvnic.c netdev_for_each_mc_addr(ha, netdev) { ha 1669 drivers/net/ethernet/ibm/ibmvnic.c ha->addr); ha 1566 drivers/net/ethernet/intel/e100.c struct netdev_hw_addr *ha; ha 1572 drivers/net/ethernet/intel/e100.c netdev_for_each_mc_addr(ha, netdev) { ha 1575 drivers/net/ethernet/intel/e100.c memcpy(&cb->u.multi.addr[i++ * ETH_ALEN], &ha->addr, ha 2230 drivers/net/ethernet/intel/e1000/e1000_main.c struct netdev_hw_addr *ha; ha 2281 drivers/net/ethernet/intel/e1000/e1000_main.c netdev_for_each_uc_addr(ha, netdev) { ha 2284 drivers/net/ethernet/intel/e1000/e1000_main.c e1000_rar_set(hw, ha->addr, i++); ha 2287 drivers/net/ethernet/intel/e1000/e1000_main.c netdev_for_each_mc_addr(ha, netdev) { ha 2291 drivers/net/ethernet/intel/e1000/e1000_main.c hash_value = e1000_hash_mc_addr(hw, ha->addr); ha 2297 drivers/net/ethernet/intel/e1000/e1000_main.c e1000_rar_set(hw, ha->addr, i++); ha 3306 drivers/net/ethernet/intel/e1000e/netdev.c struct netdev_hw_addr *ha; ha 3322 drivers/net/ethernet/intel/e1000e/netdev.c netdev_for_each_mc_addr(ha, netdev) ha 3323 drivers/net/ethernet/intel/e1000e/netdev.c memcpy(mta_list + (i++ * ETH_ALEN), ha->addr, ETH_ALEN); ha 3361 drivers/net/ethernet/intel/e1000e/netdev.c struct netdev_hw_addr *ha; ha 3366 drivers/net/ethernet/intel/e1000e/netdev.c netdev_for_each_uc_addr(ha, netdev) { ha 3371 drivers/net/ethernet/intel/e1000e/netdev.c ret_val = hw->mac.ops.rar_set(hw, ha->addr, rar_entries--); ha 4822 drivers/net/ethernet/intel/igb/igb_main.c struct netdev_hw_addr *ha; ha 4839 drivers/net/ethernet/intel/igb/igb_main.c netdev_for_each_mc_addr(ha, netdev) ha 4840 drivers/net/ethernet/intel/igb/igb_main.c memcpy(mta_list + (i++ * ETH_ALEN), ha->addr, ETH_ALEN); ha 1412 drivers/net/ethernet/intel/igbvf/netdev.c struct netdev_hw_addr *ha; ha 1425 drivers/net/ethernet/intel/igbvf/netdev.c netdev_for_each_mc_addr(ha, netdev) ha 1426 drivers/net/ethernet/intel/igbvf/netdev.c memcpy(mta_list + (i++ * ETH_ALEN), ha->addr, ETH_ALEN); ha 1461 drivers/net/ethernet/intel/igbvf/netdev.c struct netdev_hw_addr *ha; ha 1464 drivers/net/ethernet/intel/igbvf/netdev.c netdev_for_each_uc_addr(ha, netdev) { ha 1468 drivers/net/ethernet/intel/igbvf/netdev.c ha->addr); ha 1059 drivers/net/ethernet/intel/ixgb/ixgb_main.c struct netdev_hw_addr *ha; ha 1097 drivers/net/ethernet/intel/ixgb/ixgb_main.c netdev_for_each_mc_addr(ha, netdev) { ha 1098 drivers/net/ethernet/intel/ixgb/ixgb_main.c memcpy(addr, ha->addr, ETH_ALEN); ha 2068 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c struct netdev_hw_addr *ha; ha 2083 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c netdev_for_each_mc_addr(ha, netdev) { ha 2085 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c ixgbe_set_mta(hw, ha->addr); ha 2085 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c struct netdev_hw_addr *ha; ha 2087 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c netdev_for_each_uc_addr(ha, netdev) { ha 2088 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c hw->mac.ops.set_uc_addr(hw, ++count, ha->addr); ha 481 drivers/net/ethernet/intel/ixgbevf/vf.c struct netdev_hw_addr *ha; ha 502 drivers/net/ethernet/intel/ixgbevf/vf.c netdev_for_each_mc_addr(ha, netdev) { ha 505 drivers/net/ethernet/intel/ixgbevf/vf.c if (is_link_local_ether_addr(ha->addr)) ha 508 drivers/net/ethernet/intel/ixgbevf/vf.c vector_list[i++] = ixgbevf_mta_vector(hw, ha->addr); ha 2306 drivers/net/ethernet/jme.c struct netdev_hw_addr *ha; ha 2310 drivers/net/ethernet/jme.c netdev_for_each_mc_addr(ha, netdev) { ha 2311 drivers/net/ethernet/jme.c bit_nr = ether_crc(ETH_ALEN, ha->addr) & 0x3F; ha 487 drivers/net/ethernet/korina.c struct netdev_hw_addr *ha; ha 503 drivers/net/ethernet/korina.c netdev_for_each_mc_addr(ha, dev) { ha 504 drivers/net/ethernet/korina.c crc = ether_crc_le(6, ha->addr); ha 1781 drivers/net/ethernet/marvell/mv643xx_eth.c struct netdev_hw_addr *ha; ha 1788 drivers/net/ethernet/marvell/mv643xx_eth.c netdev_for_each_uc_addr(ha, dev) { ha 1789 drivers/net/ethernet/marvell/mv643xx_eth.c if (memcmp(dev->dev_addr, ha->addr, 5)) ha 1791 drivers/net/ethernet/marvell/mv643xx_eth.c if ((dev->dev_addr[5] ^ ha->addr[5]) & 0xf0) ha 1794 drivers/net/ethernet/marvell/mv643xx_eth.c nibbles |= 1 << (ha->addr[5] & 0x0f); ha 1861 drivers/net/ethernet/marvell/mv643xx_eth.c struct netdev_hw_addr *ha; ha 1873 drivers/net/ethernet/marvell/mv643xx_eth.c netdev_for_each_mc_addr(ha, dev) { ha 1874 drivers/net/ethernet/marvell/mv643xx_eth.c u8 *a = ha->addr; ha 2704 drivers/net/ethernet/marvell/mvneta.c struct netdev_hw_addr *ha; ha 2728 drivers/net/ethernet/marvell/mvneta.c netdev_for_each_mc_addr(ha, dev) { ha 2729 drivers/net/ethernet/marvell/mvneta.c mvneta_mcast_addr_set(pp, ha->addr, ha 3763 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c struct netdev_hw_addr *ha; ha 3766 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c netdev_hw_addr_list_for_each(ha, list) { ha 3767 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c ret = mvpp2_prs_mac_da_accept(port, ha->addr, true); ha 564 drivers/net/ethernet/marvell/pxa168_eth.c struct netdev_hw_addr *ha; ha 581 drivers/net/ethernet/marvell/pxa168_eth.c netdev_for_each_mc_addr(ha, dev) ha 582 drivers/net/ethernet/marvell/pxa168_eth.c update_hash_table_mac_address(pep, NULL, ha->addr); ha 2934 drivers/net/ethernet/marvell/skge.c struct netdev_hw_addr *ha; ha 2954 drivers/net/ethernet/marvell/skge.c netdev_for_each_mc_addr(ha, dev) ha 2955 drivers/net/ethernet/marvell/skge.c genesis_add_filter(filter, ha->addr); ha 2973 drivers/net/ethernet/marvell/skge.c struct netdev_hw_addr *ha; ha 2996 drivers/net/ethernet/marvell/skge.c netdev_for_each_mc_addr(ha, dev) ha 2997 drivers/net/ethernet/marvell/skge.c yukon_add_filter(filter, ha->addr); ha 3846 drivers/net/ethernet/marvell/sky2.c struct netdev_hw_addr *ha; ha 3870 drivers/net/ethernet/marvell/sky2.c netdev_for_each_mc_addr(ha, dev) ha 3871 drivers/net/ethernet/marvell/sky2.c sky2_add_filter(filter, ha->addr); ha 818 drivers/net/ethernet/mellanox/mlx4/en_netdev.c struct netdev_hw_addr *ha; ha 822 drivers/net/ethernet/mellanox/mlx4/en_netdev.c netdev_for_each_mc_addr(ha, dev) { ha 828 drivers/net/ethernet/mellanox/mlx4/en_netdev.c memcpy(tmp->addr, ha->addr, ETH_ALEN); ha 1134 drivers/net/ethernet/mellanox/mlx4/en_netdev.c struct netdev_hw_addr *ha; ha 1154 drivers/net/ethernet/mellanox/mlx4/en_netdev.c netdev_for_each_uc_addr(ha, dev) { ha 1156 drivers/net/ethernet/mellanox/mlx4/en_netdev.c ha->addr)) { ha 1193 drivers/net/ethernet/mellanox/mlx4/en_netdev.c netdev_for_each_uc_addr(ha, dev) { ha 1195 drivers/net/ethernet/mellanox/mlx4/en_netdev.c bucket = &priv->mac_hash[ha->addr[MLX4_EN_MAC_HASH_IDX]]; ha 1197 drivers/net/ethernet/mellanox/mlx4/en_netdev.c if (ether_addr_equal_64bits(entry->mac, ha->addr)) { ha 1207 drivers/net/ethernet/mellanox/mlx4/en_netdev.c ha->addr, priv->port); ha 1211 drivers/net/ethernet/mellanox/mlx4/en_netdev.c mac = mlx4_mac_to_u64(ha->addr); ha 1212 drivers/net/ethernet/mellanox/mlx4/en_netdev.c memcpy(entry->mac, ha->addr, ETH_ALEN); ha 1216 drivers/net/ethernet/mellanox/mlx4/en_netdev.c ha->addr, priv->port, err); ha 1221 drivers/net/ethernet/mellanox/mlx4/en_netdev.c err = mlx4_en_uc_steer_add(priv, ha->addr, ha 1226 drivers/net/ethernet/mellanox/mlx4/en_netdev.c ha->addr, priv->port, err); ha 1234 drivers/net/ethernet/mellanox/mlx4/en_netdev.c ha->addr, priv->port); ha 1235 drivers/net/ethernet/mellanox/mlx4/en_netdev.c mac_hash = ha->addr[MLX4_EN_MAC_HASH_IDX]; ha 15 drivers/net/ethernet/mellanox/mlx5/core/diag/en_rep_tracepoint.h TP_PROTO(const struct mlx5e_neigh_hash_entry *nhe, const u8 *ha, ha 17 drivers/net/ethernet/mellanox/mlx5/core/diag/en_rep_tracepoint.h TP_ARGS(nhe, ha, neigh_connected), ha 19 drivers/net/ethernet/mellanox/mlx5/core/diag/en_rep_tracepoint.h __array(u8, ha, ETH_ALEN) ha 30 drivers/net/ethernet/mellanox/mlx5/core/diag/en_rep_tracepoint.h memcpy(__entry->ha, ha, ETH_ALEN); ha 42 drivers/net/ethernet/mellanox/mlx5/core/diag/en_rep_tracepoint.h __get_str(devname), __entry->ha, ha 272 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c ether_addr_copy(e->h_dest, n->ha); ha 391 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c ether_addr_copy(e->h_dest, n->ha); ha 462 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c struct netdev_hw_addr *ha; ha 469 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c netdev_for_each_uc_addr(ha, netdev) ha 470 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c mlx5e_add_l2_to_hash(priv->fs.l2.netdev_uc, ha->addr); ha 472 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c netdev_for_each_mc_addr(ha, netdev) ha 473 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c mlx5e_add_l2_to_hash(priv->fs.l2.netdev_mc, ha->addr); ha 600 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c unsigned char ha[ETH_ALEN]) ha 615 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c ether_addr_equal(e->h_dest, ha))) ha 621 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c (!neigh_connected || !ether_addr_equal(e->h_dest, ha))) ha 625 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c ether_addr_copy(e->h_dest, ha); ha 626 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c ether_addr_copy(eth->h_dest, ha); ha 645 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c unsigned char ha[ETH_ALEN]; ha 658 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c memcpy(ha, n->ha, ETH_ALEN); ha 665 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c trace_mlx5e_rep_neigh_update(nhe, ha, neigh_connected); ha 672 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c mlx5e_rep_update_flows(priv, e, neigh_connected, ha); ha 457 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c unsigned char *ha, void *dip) ha 478 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c ether_addr_copy(ha_value, ha); ha 486 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c unsigned char *ha; ha 489 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c ha = mlxsw_sp_neigh_entry_ha(neigh_entry); ha 491 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c __mlxsw_sp_dpipe_table_host_entry_fill(entry, rif, ha, &dip); ha 500 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c unsigned char *ha; ha 502 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c ha = mlxsw_sp_neigh_entry_ha(neigh_entry); ha 505 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c __mlxsw_sp_dpipe_table_host_entry_fill(entry, rif, ha, dip); ha 1034 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c u32 adj_hash_index, unsigned char *ha, ha 1054 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c ether_addr_copy(value->value, ha); ha 1068 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c unsigned char *ha = mlxsw_sp_nexthop_ha(nh); ha 1076 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c adj_hash_index, ha, rif); ha 1877 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c unsigned char ha[ETH_ALEN]; ha 1917 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return neigh_entry->ha; ha 2367 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_reg_rauht_pack4(rauht_pl, op, neigh_entry->rif, neigh_entry->ha, ha 2384 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_reg_rauht_pack6(rauht_pl, op, neigh_entry->rif, neigh_entry->ha, ha 2465 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c unsigned char ha[ETH_ALEN]; ha 2474 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c memcpy(ha, n->ha, ETH_ALEN); ha 2492 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c memcpy(neigh_entry->ha, ha, ETH_ALEN); ha 2783 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return nh->neigh_entry->ha; ha 3101 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_reg_ratr_eth_entry_pack(ratr_pl, neigh_entry->ha); ha 126 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c memcpy(dmac, neigh->ha, ETH_ALEN); ha 1001 drivers/net/ethernet/micrel/ks8851.c struct netdev_hw_addr *ha; ha 1006 drivers/net/ethernet/micrel/ks8851.c netdev_for_each_mc_addr(ha, dev) { ha 1007 drivers/net/ethernet/micrel/ks8851.c crc = ether_crc(ETH_ALEN, ha->addr); ha 887 drivers/net/ethernet/micrel/ks8851_mll.c struct netdev_hw_addr *ha; ha 904 drivers/net/ethernet/micrel/ks8851_mll.c netdev_for_each_mc_addr(ha, netdev) { ha 907 drivers/net/ethernet/micrel/ks8851_mll.c memcpy(ks->mcast_lst[i++], ha->addr, ETH_ALEN); ha 5741 drivers/net/ethernet/micrel/ksz884x.c struct netdev_hw_addr *ha; ha 5767 drivers/net/ethernet/micrel/ksz884x.c netdev_for_each_mc_addr(ha, dev) { ha 5770 drivers/net/ethernet/micrel/ksz884x.c memcpy(hw->multi_list[i++], ha->addr, ETH_ALEN); ha 1072 drivers/net/ethernet/microchip/lan743x_main.c struct netdev_hw_addr *ha; ha 1077 drivers/net/ethernet/microchip/lan743x_main.c netdev_for_each_mc_addr(ha, netdev) { ha 1082 drivers/net/ethernet/microchip/lan743x_main.c data = ha->addr[3]; ha 1083 drivers/net/ethernet/microchip/lan743x_main.c data = ha->addr[2] | (data << 8); ha 1084 drivers/net/ethernet/microchip/lan743x_main.c data = ha->addr[1] | (data << 8); ha 1085 drivers/net/ethernet/microchip/lan743x_main.c data = ha->addr[0] | (data << 8); ha 1088 drivers/net/ethernet/microchip/lan743x_main.c data = ha->addr[5]; ha 1089 drivers/net/ethernet/microchip/lan743x_main.c data = ha->addr[4] | (data << 8); ha 1094 drivers/net/ethernet/microchip/lan743x_main.c u32 bitnum = (ether_crc(ETH_ALEN, ha->addr) >> ha 407 drivers/net/ethernet/moxa/moxart_ether.c struct netdev_hw_addr *ha; ha 410 drivers/net/ethernet/moxa/moxart_ether.c netdev_for_each_mc_addr(ha, ndev) { ha 411 drivers/net/ethernet/moxa/moxart_ether.c crc_val = crc32_le(~0, ha->addr, ETH_ALEN); ha 2952 drivers/net/ethernet/myricom/myri10ge/myri10ge.c struct netdev_hw_addr *ha; ha 2989 drivers/net/ethernet/myricom/myri10ge/myri10ge.c netdev_for_each_mc_addr(ha, dev) { ha 2990 drivers/net/ethernet/myricom/myri10ge/myri10ge.c memcpy(data, &ha->addr, ETH_ALEN); ha 2998 drivers/net/ethernet/myricom/myri10ge/myri10ge.c err, ha->addr); ha 2511 drivers/net/ethernet/natsemi/natsemi.c struct netdev_hw_addr *ha; ha 2515 drivers/net/ethernet/natsemi/natsemi.c netdev_for_each_mc_addr(ha, dev) { ha 2516 drivers/net/ethernet/natsemi/natsemi.c int b = (ether_crc(ETH_ALEN, ha->addr) >> 23) & 0x1ff; ha 632 drivers/net/ethernet/natsemi/sonic.c struct netdev_hw_addr *ha; ha 652 drivers/net/ethernet/natsemi/sonic.c netdev_for_each_mc_addr(ha, dev) { ha 653 drivers/net/ethernet/natsemi/sonic.c addr = ha->addr; ha 4879 drivers/net/ethernet/neterion/s2io.c struct netdev_hw_addr *ha; ha 5008 drivers/net/ethernet/neterion/s2io.c netdev_for_each_mc_addr(ha, dev) { ha 5011 drivers/net/ethernet/neterion/s2io.c mac_addr |= ha->addr[j]; ha 1122 drivers/net/ethernet/neterion/vxge/vxge-main.c struct netdev_hw_addr *ha; ha 1215 drivers/net/ethernet/neterion/vxge/vxge-main.c netdev_for_each_mc_addr(ha, dev) { ha 1216 drivers/net/ethernet/neterion/vxge/vxge-main.c memcpy(mac_info.macaddr, ha->addr, ETH_ALEN); ha 3196 drivers/net/ethernet/nvidia/forcedeth.c struct netdev_hw_addr *ha; ha 3198 drivers/net/ethernet/nvidia/forcedeth.c netdev_for_each_mc_addr(ha, dev) { ha 3199 drivers/net/ethernet/nvidia/forcedeth.c unsigned char *hw_addr = ha->addr; ha 1101 drivers/net/ethernet/nxp/lpc_eth.c struct netdev_hw_addr *ha; ha 1129 drivers/net/ethernet/nxp/lpc_eth.c netdev_hw_addr_list_for_each(ha, mcptr) { ha 1130 drivers/net/ethernet/nxp/lpc_eth.c hash_val = (ether_crc(6, ha->addr) >> 23) & 0x3F; ha 2093 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c struct netdev_hw_addr *ha; ha 2126 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c netdev_for_each_mc_addr(ha, netdev) ha 2127 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c pch_gbe_mac_mar_set(hw, ha->addr, i++); ha 1778 drivers/net/ethernet/packetengines/hamachi.c struct netdev_hw_addr *ha; ha 1781 drivers/net/ethernet/packetengines/hamachi.c netdev_for_each_mc_addr(ha, dev) { ha 1782 drivers/net/ethernet/packetengines/hamachi.c writel(*(u32 *)(ha->addr), ioaddr + 0x100 + i*8); ha 1783 drivers/net/ethernet/packetengines/hamachi.c writel(0x20000 | (*(u16 *)&ha->addr[4]), ha 1292 drivers/net/ethernet/packetengines/yellowfin.c struct netdev_hw_addr *ha; ha 1297 drivers/net/ethernet/packetengines/yellowfin.c netdev_for_each_mc_addr(ha, dev) { ha 1303 drivers/net/ethernet/packetengines/yellowfin.c bit = (ether_crc_le(3, ha->addr) >> 3) & 0x3f; ha 1305 drivers/net/ethernet/packetengines/yellowfin.c bit = (ether_crc_le(4, ha->addr) >> 3) & 0x3f; ha 1307 drivers/net/ethernet/packetengines/yellowfin.c bit = (ether_crc_le(5, ha->addr) >> 3) & 0x3f; ha 1310 drivers/net/ethernet/packetengines/yellowfin.c bit = (ether_crc_le(6, ha->addr) >> 3) & 0x3f; ha 507 drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c struct netdev_hw_addr *ha; ha 541 drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c netdev_for_each_mc_addr(ha, netdev) ha 542 drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c netxen_nic_set_mcast_addr(adapter, i++, ha->addr); ha 650 drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c struct netdev_hw_addr *ha; ha 679 drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c netdev_for_each_mc_addr(ha, netdev) ha 680 drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c nx_p3_nic_add_mac(adapter, ha->addr, &del_list); ha 1208 drivers/net/ethernet/qlogic/qede/qede_filter.c struct netdev_hw_addr *ha; ha 1234 drivers/net/ethernet/qlogic/qede/qede_filter.c netdev_for_each_mc_addr(ha, ndev) { ha 1235 drivers/net/ethernet/qlogic/qede/qede_filter.c ether_addr_copy(temp, ha->addr); ha 1272 drivers/net/ethernet/qlogic/qede/qede_filter.c struct netdev_hw_addr *ha; ha 1289 drivers/net/ethernet/qlogic/qede/qede_filter.c netdev_for_each_uc_addr(ha, ndev) { ha 1290 drivers/net/ethernet/qlogic/qede/qede_filter.c ether_addr_copy(temp, ha->addr); ha 2503 drivers/net/ethernet/qlogic/qede/qede_main.c struct netdev_hw_addr *ha; ha 2517 drivers/net/ethernet/qlogic/qede/qede_main.c netdev_for_each_uc_addr(ha, edev->ndev) { ha 2518 drivers/net/ethernet/qlogic/qede/qede_main.c ether_addr_copy(data->mac[i++], ha->addr); ha 537 drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c struct netdev_hw_addr *ha; ha 558 drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c netdev_for_each_mc_addr(ha, netdev) ha 559 drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c qlcnic_nic_add_mac(adapter, ha->addr, vlan, ha 569 drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c netdev_for_each_uc_addr(ha, netdev) ha 570 drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c qlcnic_nic_add_mac(adapter, ha->addr, vlan, ha 1548 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c struct netdev_hw_addr *ha; ha 1564 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c netdev_for_each_mc_addr(ha, netdev) ha 1565 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c qlcnic_vf_add_mc_list(netdev, ha->addr, ha 1576 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c netdev_for_each_uc_addr(ha, netdev) ha 1577 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c qlcnic_vf_add_mc_list(netdev, ha->addr, ha 201 drivers/net/ethernet/qualcomm/emac/emac.c struct netdev_hw_addr *ha; ha 207 drivers/net/ethernet/qualcomm/emac/emac.c netdev_for_each_mc_addr(ha, netdev) ha 208 drivers/net/ethernet/qualcomm/emac/emac.c emac_mac_multicast_addr_set(adpt, ha->addr); ha 847 drivers/net/ethernet/rdc/r6040.c struct netdev_hw_addr *ha; ha 885 drivers/net/ethernet/rdc/r6040.c netdev_for_each_mc_addr(ha, dev) { ha 886 drivers/net/ethernet/rdc/r6040.c u16 *adrp = (u16 *) ha->addr; ha 912 drivers/net/ethernet/rdc/r6040.c netdev_for_each_mc_addr(ha, dev) { ha 913 drivers/net/ethernet/rdc/r6040.c u8 *addrs = ha->addr; ha 907 drivers/net/ethernet/realtek/8139cp.c struct netdev_hw_addr *ha; ha 910 drivers/net/ethernet/realtek/8139cp.c netdev_for_each_mc_addr(ha, dev) { ha 911 drivers/net/ethernet/realtek/8139cp.c int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 2572 drivers/net/ethernet/realtek/8139too.c struct netdev_hw_addr *ha; ha 2575 drivers/net/ethernet/realtek/8139too.c netdev_for_each_mc_addr(ha, dev) { ha 2576 drivers/net/ethernet/realtek/8139too.c int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 4325 drivers/net/ethernet/realtek/r8169_main.c struct netdev_hw_addr *ha; ha 4328 drivers/net/ethernet/realtek/r8169_main.c netdev_for_each_mc_addr(ha, dev) { ha 4329 drivers/net/ethernet/realtek/r8169_main.c u32 bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 2931 drivers/net/ethernet/renesas/sh_eth.c struct netdev_hw_addr *ha; ha 2932 drivers/net/ethernet/renesas/sh_eth.c netdev_for_each_mc_addr(ha, ndev) { ha 2933 drivers/net/ethernet/renesas/sh_eth.c if (mcast_all && is_multicast_ether_addr(ha->addr)) ha 2936 drivers/net/ethernet/renesas/sh_eth.c if (sh_eth_tsu_add_entry(ndev, ha->addr) < 0) { ha 1368 drivers/net/ethernet/rocker/rocker_ofdpa.c ip_addr, n->ha); ha 2696 drivers/net/ethernet/rocker/rocker_ofdpa.c return ofdpa_port_ipv4_neigh(ofdpa_port, flags, ip_addr, n->ha); ha 2706 drivers/net/ethernet/rocker/rocker_ofdpa.c return ofdpa_port_ipv4_neigh(ofdpa_port, flags, ip_addr, n->ha); ha 1843 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c struct netdev_hw_addr *ha; ha 1863 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c netdev_for_each_mc_addr(ha, dev) { ha 1867 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c int bit_nr = bitrev32(~crc32_le(~0, ha->addr, 6)) >> 26; ha 1886 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c netdev_for_each_uc_addr(ha, dev) { ha 1887 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c sxgbe_set_umac_addr(ioaddr, ha->addr, reg); ha 2859 drivers/net/ethernet/sfc/falcon/farch.c struct netdev_hw_addr *ha; ha 2876 drivers/net/ethernet/sfc/falcon/farch.c netdev_for_each_mc_addr(ha, net_dev) { ha 2877 drivers/net/ethernet/sfc/falcon/farch.c crc = ether_crc_le(ETH_ALEN, ha->addr); ha 2955 drivers/net/ethernet/sfc/farch.c struct netdev_hw_addr *ha; ha 2972 drivers/net/ethernet/sfc/farch.c netdev_for_each_mc_addr(ha, net_dev) { ha 2973 drivers/net/ethernet/sfc/farch.c crc = ether_crc_le(ETH_ALEN, ha->addr); ha 1627 drivers/net/ethernet/sgi/ioc3-eth.c struct netdev_hw_addr *ha; ha 1650 drivers/net/ethernet/sgi/ioc3-eth.c netdev_for_each_mc_addr(ha, dev) { ha 1651 drivers/net/ethernet/sgi/ioc3-eth.c ehar |= (1UL << ioc3_hash(ha->addr)); ha 794 drivers/net/ethernet/sgi/meth.c struct netdev_hw_addr *ha; ha 797 drivers/net/ethernet/sgi/meth.c netdev_for_each_mc_addr(ha, dev) ha 798 drivers/net/ethernet/sgi/meth.c set_bit((ether_crc(ETH_ALEN, ha->addr) >> 26), ha 427 drivers/net/ethernet/silan/sc92031.c struct netdev_hw_addr *ha; ha 429 drivers/net/ethernet/silan/sc92031.c netdev_for_each_mc_addr(ha, dev) { ha 433 drivers/net/ethernet/silan/sc92031.c crc = ~ether_crc(ETH_ALEN, ha->addr); ha 851 drivers/net/ethernet/sis/sis190.c struct netdev_hw_addr *ha; ha 855 drivers/net/ethernet/sis/sis190.c netdev_for_each_mc_addr(ha, dev) { ha 857 drivers/net/ethernet/sis/sis190.c ether_crc(ETH_ALEN, ha->addr) & 0x3f; ha 2397 drivers/net/ethernet/sis/sis900.c struct netdev_hw_addr *ha; ha 2400 drivers/net/ethernet/sis/sis900.c netdev_for_each_mc_addr(ha, net_dev) { ha 2403 drivers/net/ethernet/sis/sis900.c bit_nr = sis900_mcast_bitnr(ha->addr, ha 1360 drivers/net/ethernet/smsc/epic100.c struct netdev_hw_addr *ha; ha 1363 drivers/net/ethernet/smsc/epic100.c netdev_for_each_mc_addr(ha, dev) { ha 1365 drivers/net/ethernet/smsc/epic100.c ether_crc_le(ETH_ALEN, ha->addr) & 0x3f; ha 1326 drivers/net/ethernet/smsc/smc911x.c struct netdev_hw_addr *ha; ha 1334 drivers/net/ethernet/smsc/smc911x.c netdev_for_each_mc_addr(ha, dev) { ha 1338 drivers/net/ethernet/smsc/smc911x.c position = ether_crc(ETH_ALEN, ha->addr)>>26; ha 425 drivers/net/ethernet/smsc/smc9194.c struct netdev_hw_addr *ha; ha 432 drivers/net/ethernet/smsc/smc9194.c netdev_for_each_mc_addr(ha, dev) { ha 436 drivers/net/ethernet/smsc/smc9194.c position = ether_crc_le(6, ha->addr) & 0x3f; ha 1560 drivers/net/ethernet/smsc/smc91c92_cs.c struct netdev_hw_addr *ha; ha 1562 drivers/net/ethernet/smsc/smc91c92_cs.c netdev_for_each_mc_addr(ha, dev) { ha 1563 drivers/net/ethernet/smsc/smc91c92_cs.c u_int position = ether_crc(6, ha->addr); ha 1408 drivers/net/ethernet/smsc/smc91x.c struct netdev_hw_addr *ha; ha 1416 drivers/net/ethernet/smsc/smc91x.c netdev_for_each_mc_addr(ha, dev) { ha 1420 drivers/net/ethernet/smsc/smc91x.c position = crc32_le(~0, ha->addr, 6) & 0x3f; ha 1859 drivers/net/ethernet/smsc/smsc911x.c struct netdev_hw_addr *ha; ha 1864 drivers/net/ethernet/smsc/smsc911x.c netdev_for_each_mc_addr(ha, dev) { ha 1865 drivers/net/ethernet/smsc/smsc911x.c unsigned int bitnum = smsc911x_hash(ha->addr); ha 1010 drivers/net/ethernet/smsc/smsc9420.c struct netdev_hw_addr *ha; ha 1014 drivers/net/ethernet/smsc/smsc9420.c netdev_for_each_mc_addr(ha, dev) { ha 1015 drivers/net/ethernet/smsc/smsc9420.c u32 bit_num = smsc9420_hash(ha->addr); ha 631 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c struct netdev_hw_addr *ha; ha 642 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c netdev_for_each_mc_addr(ha, dev) { ha 643 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c sun8i_dwmac_set_umac_addr(hw, ha->addr, i); ha 648 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c netdev_for_each_uc_addr(ha, dev) { ha 649 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c sun8i_dwmac_set_umac_addr(hw, ha->addr, i); ha 170 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c struct netdev_hw_addr *ha; ha 175 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c netdev_for_each_mc_addr(ha, dev) { ha 181 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c int bit_nr = bitrev32(~crc32_le(~0, ha->addr, ha 203 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c struct netdev_hw_addr *ha; ha 205 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c netdev_for_each_uc_addr(ha, dev) { ha 206 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c stmmac_set_mac_addr(ioaddr, ha->addr, ha 107 drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c struct netdev_hw_addr *ha; ha 117 drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c netdev_for_each_mc_addr(ha, dev) { ha 121 drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 424 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c struct netdev_hw_addr *ha; ha 429 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c netdev_for_each_mc_addr(ha, dev) { ha 435 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c u32 bit_nr = bitrev32(~crc32_le(~0, ha->addr, ha 457 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c struct netdev_hw_addr *ha; ha 460 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c netdev_for_each_uc_addr(ha, dev) { ha 461 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c dwmac4_set_umac_addr(hw, ha->addr, reg); ha 462 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c struct netdev_hw_addr *ha; ha 466 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c netdev_for_each_mc_addr(ha, dev) { ha 467 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c u32 nr = (bitrev32(~crc32_le(~0, ha->addr, 6)) >> ha 479 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c struct netdev_hw_addr *ha; ha 482 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c netdev_for_each_uc_addr(ha, dev) { ha 483 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c dwxgmac2_set_umac_addr(hw, ha->addr, reg); ha 495 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c struct netdev_hw_addr *ha; ha 504 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c netdev_for_each_mc_addr(ha, priv->dev) { ha 505 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c u32 nr = bitrev32(~crc32_le(~0, ha->addr, ETH_ALEN)) >> mc_offset; ha 516 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c struct netdev_hw_addr *ha; ha 519 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c netdev_for_each_uc_addr(ha, priv->dev) { ha 520 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c if (!memcmp(ha->addr, addr, ETH_ALEN)) ha 2938 drivers/net/ethernet/sun/cassini.c struct netdev_hw_addr *ha; ha 2942 drivers/net/ethernet/sun/cassini.c netdev_for_each_mc_addr(ha, cp->dev) { ha 2947 drivers/net/ethernet/sun/cassini.c writel((ha->addr[4] << 8) | ha->addr[5], ha 2949 drivers/net/ethernet/sun/cassini.c writel((ha->addr[2] << 8) | ha->addr[3], ha 2951 drivers/net/ethernet/sun/cassini.c writel((ha->addr[0] << 8) | ha->addr[1], ha 2959 drivers/net/ethernet/sun/cassini.c crc = ether_crc_le(ETH_ALEN, ha->addr); ha 6316 drivers/net/ethernet/sun/niu.c struct netdev_hw_addr *ha; ha 6338 drivers/net/ethernet/sun/niu.c netdev_for_each_uc_addr(ha, dev) { ha 6339 drivers/net/ethernet/sun/niu.c err = niu_set_alt_mac(np, index, ha->addr); ha 6367 drivers/net/ethernet/sun/niu.c netdev_for_each_mc_addr(ha, dev) { ha 6368 drivers/net/ethernet/sun/niu.c u32 crc = ether_crc_le(ETH_ALEN, ha->addr); ha 997 drivers/net/ethernet/sun/sunbmac.c struct netdev_hw_addr *ha; ha 1021 drivers/net/ethernet/sun/sunbmac.c netdev_for_each_mc_addr(ha, dev) { ha 1022 drivers/net/ethernet/sun/sunbmac.c crc = ether_crc_le(6, ha->addr); ha 1803 drivers/net/ethernet/sun/sungem.c struct netdev_hw_addr *ha; ha 1807 drivers/net/ethernet/sun/sungem.c netdev_for_each_mc_addr(ha, gp->dev) { ha 1808 drivers/net/ethernet/sun/sungem.c crc = ether_crc_le(6, ha->addr); ha 1530 drivers/net/ethernet/sun/sunhme.c struct netdev_hw_addr *ha; ha 1534 drivers/net/ethernet/sun/sunhme.c netdev_for_each_mc_addr(ha, hp->dev) { ha 1535 drivers/net/ethernet/sun/sunhme.c crc = ether_crc_le(6, ha->addr); ha 2405 drivers/net/ethernet/sun/sunhme.c struct netdev_hw_addr *ha; ha 2422 drivers/net/ethernet/sun/sunhme.c netdev_for_each_mc_addr(ha, dev) { ha 2423 drivers/net/ethernet/sun/sunhme.c crc = ether_crc_le(6, ha->addr); ha 627 drivers/net/ethernet/sun/sunqe.c struct netdev_hw_addr *ha; ha 650 drivers/net/ethernet/sun/sunqe.c netdev_for_each_mc_addr(ha, dev) { ha 651 drivers/net/ethernet/sun/sunqe.c crc = ether_crc_le(6, ha->addr); ha 1579 drivers/net/ethernet/sun/sunvnet_common.c struct netdev_hw_addr *ha; ha 1581 drivers/net/ethernet/sun/sunvnet_common.c netdev_for_each_mc_addr(ha, dev) { ha 1584 drivers/net/ethernet/sun/sunvnet_common.c m = __vnet_mc_find(vp, ha->addr); ha 1594 drivers/net/ethernet/sun/sunvnet_common.c memcpy(m->addr, ha->addr, ETH_ALEN); ha 75 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c struct netdev_hw_addr *ha, ha 84 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c if (ha) { ha 86 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c mac_addr[0] = ha->addr[0]; ha 87 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c mac_addr[1] = ha->addr[1]; ha 88 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c mac_addr[2] = ha->addr[2]; ha 89 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c mac_addr[3] = ha->addr[3]; ha 91 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c mac_addr[0] = ha->addr[4]; ha 92 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c mac_addr[1] = ha->addr[5]; ha 96 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c ha->addr, *mac_reg); ha 298 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c struct netdev_hw_addr *ha; ha 308 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c netdev_for_each_uc_addr(ha, netdev) { ha 309 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c xlgmac_set_mac_reg(pdata, ha, &mac_reg); ha 316 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c netdev_for_each_mc_addr(ha, netdev) { ha 317 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c xlgmac_set_mac_reg(pdata, ha, &mac_reg); ha 333 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c struct netdev_hw_addr *ha; ha 343 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c netdev_for_each_uc_addr(ha, netdev) { ha 344 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c crc = bitrev32(~crc32_le(~0, ha->addr, ETH_ALEN)); ha 349 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c netdev_for_each_mc_addr(ha, netdev) { ha 350 drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c crc = bitrev32(~crc32_le(~0, ha->addr, ETH_ALEN)); ha 791 drivers/net/ethernet/tehuti/tehuti.c struct netdev_hw_addr *ha; ha 808 drivers/net/ethernet/tehuti/tehuti.c netdev_for_each_mc_addr(ha, ndev) { ha 811 drivers/net/ethernet/tehuti/tehuti.c hash ^= ha->addr[i]; ha 310 drivers/net/ethernet/ti/cpmac.c struct netdev_hw_addr *ha; ha 329 drivers/net/ethernet/ti/cpmac.c netdev_for_each_mc_addr(ha, dev) { ha 331 drivers/net/ethernet/ti/cpmac.c tmp = ha->addr[0]; ha 333 drivers/net/ethernet/ti/cpmac.c tmp = ha->addr[1]; ha 335 drivers/net/ethernet/ti/cpmac.c tmp = ha->addr[2]; ha 337 drivers/net/ethernet/ti/cpmac.c tmp = ha->addr[3]; ha 339 drivers/net/ethernet/ti/cpmac.c tmp = ha->addr[4]; ha 341 drivers/net/ethernet/ti/cpmac.c tmp = ha->addr[5]; ha 205 drivers/net/ethernet/ti/cpsw.c struct netdev_hw_addr *ha; ha 212 drivers/net/ethernet/ti/cpsw.c netdev_for_each_mc_addr(ha, vdev) { ha 213 drivers/net/ethernet/ti/cpsw.c if (ether_addr_equal(ha->addr, sync_ctx->addr)) { ha 214 drivers/net/ethernet/ti/cpsw.c found = ha->sync_cnt; ha 270 drivers/net/ethernet/ti/cpsw.c struct netdev_hw_addr *ha; ha 277 drivers/net/ethernet/ti/cpsw.c netdev_for_each_mc_addr(ha, vdev) { ha 278 drivers/net/ethernet/ti/cpsw.c if (ether_addr_equal(ha->addr, sync_ctx->addr)) { ha 279 drivers/net/ethernet/ti/cpsw.c found = ha->sync_cnt; ha 740 drivers/net/ethernet/ti/davinci_emac.c struct netdev_hw_addr *ha; ha 745 drivers/net/ethernet/ti/davinci_emac.c netdev_for_each_mc_addr(ha, ndev) { ha 747 drivers/net/ethernet/ti/davinci_emac.c (u8 *) ha->addr); ha 1282 drivers/net/ethernet/ti/tlan.c struct netdev_hw_addr *ha; ha 1306 drivers/net/ethernet/ti/tlan.c netdev_for_each_mc_addr(ha, dev) { ha 1309 drivers/net/ethernet/ti/tlan.c (char *) &ha->addr); ha 1312 drivers/net/ethernet/ti/tlan.c tlan_hash_func((u8 *)&ha->addr); ha 596 drivers/net/ethernet/toshiba/ps3_gelic_net.c struct netdev_hw_addr *ha; ha 630 drivers/net/ethernet/toshiba/ps3_gelic_net.c netdev_for_each_mc_addr(ha, netdev) { ha 632 drivers/net/ethernet/toshiba/ps3_gelic_net.c p = ha->addr; ha 588 drivers/net/ethernet/toshiba/spider_net.c struct netdev_hw_addr *ha; ha 608 drivers/net/ethernet/toshiba/spider_net.c netdev_for_each_mc_addr(ha, netdev) { ha 609 drivers/net/ethernet/toshiba/spider_net.c hash = spider_net_get_multicast_hash(netdev, ha->addr); ha 1923 drivers/net/ethernet/toshiba/tc35815.c struct netdev_hw_addr *ha; ha 1930 drivers/net/ethernet/toshiba/tc35815.c netdev_for_each_mc_addr(ha, dev) { ha 1932 drivers/net/ethernet/toshiba/tc35815.c tc35815_set_cam_entry(dev, i + 2, ha->addr); ha 1182 drivers/net/ethernet/tundra/tsi108_eth.c struct netdev_hw_addr *ha; ha 1187 drivers/net/ethernet/tundra/tsi108_eth.c netdev_for_each_mc_addr(ha, dev) { ha 1190 drivers/net/ethernet/tundra/tsi108_eth.c crc = ether_crc(6, ha->addr); ha 2250 drivers/net/ethernet/via/via-rhine.c struct netdev_hw_addr *ha; ha 2264 drivers/net/ethernet/via/via-rhine.c netdev_for_each_mc_addr(ha, dev) { ha 2267 drivers/net/ethernet/via/via-rhine.c rhine_set_cam(ioaddr, i, ha->addr); ha 2274 drivers/net/ethernet/via/via-rhine.c netdev_for_each_mc_addr(ha, dev) { ha 2275 drivers/net/ethernet/via/via-rhine.c int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 1124 drivers/net/ethernet/via/via-velocity.c struct netdev_hw_addr *ha; ha 1140 drivers/net/ethernet/via/via-velocity.c netdev_for_each_mc_addr(ha, dev) { ha 1141 drivers/net/ethernet/via/via-velocity.c mac_set_cam(regs, i + offset, ha->addr); ha 473 drivers/net/ethernet/xilinx/ll_temac_main.c struct netdev_hw_addr *ha; ha 475 drivers/net/ethernet/xilinx/ll_temac_main.c netdev_for_each_mc_addr(ha, ndev) { ha 478 drivers/net/ethernet/xilinx/ll_temac_main.c multi_addr_msw = ((ha->addr[3] << 24) | ha 479 drivers/net/ethernet/xilinx/ll_temac_main.c (ha->addr[2] << 16) | ha 480 drivers/net/ethernet/xilinx/ll_temac_main.c (ha->addr[1] << 8) | ha 481 drivers/net/ethernet/xilinx/ll_temac_main.c (ha->addr[0])); ha 484 drivers/net/ethernet/xilinx/ll_temac_main.c multi_addr_lsw = ((ha->addr[5] << 8) | ha 485 drivers/net/ethernet/xilinx/ll_temac_main.c (ha->addr[4]) | (i << 16)); ha 370 drivers/net/ethernet/xilinx/xilinx_axienet_main.c struct netdev_hw_addr *ha; ha 373 drivers/net/ethernet/xilinx/xilinx_axienet_main.c netdev_for_each_mc_addr(ha, ndev) { ha 377 drivers/net/ethernet/xilinx/xilinx_axienet_main.c af0reg = (ha->addr[0]); ha 378 drivers/net/ethernet/xilinx/xilinx_axienet_main.c af0reg |= (ha->addr[1] << 8); ha 379 drivers/net/ethernet/xilinx/xilinx_axienet_main.c af0reg |= (ha->addr[2] << 16); ha 380 drivers/net/ethernet/xilinx/xilinx_axienet_main.c af0reg |= (ha->addr[3] << 24); ha 382 drivers/net/ethernet/xilinx/xilinx_axienet_main.c af1reg = (ha->addr[4]); ha 383 drivers/net/ethernet/xilinx/xilinx_axienet_main.c af1reg |= (ha->addr[5] << 8); ha 1303 drivers/net/ethernet/xircom/xirc2ps_cs.c struct netdev_hw_addr *ha; ha 1318 drivers/net/ethernet/xircom/xirc2ps_cs.c netdev_for_each_mc_addr(ha, dev) { ha 1321 drivers/net/ethernet/xircom/xirc2ps_cs.c set_address(&sa_info, ha->addr); ha 920 drivers/net/ethernet/xscale/ixp4xx_eth.c struct netdev_hw_addr *ha; ha 944 drivers/net/ethernet/xscale/ixp4xx_eth.c netdev_for_each_mc_addr(ha, dev) { ha 946 drivers/net/ethernet/xscale/ixp4xx_eth.c addr = ha->addr; /* first MAC address */ ha 948 drivers/net/ethernet/xscale/ixp4xx_eth.c diffs[i] |= addr[i] ^ ha->addr[i]; ha 2264 drivers/net/fddi/defxx.c struct netdev_hw_addr *ha; ha 2310 drivers/net/fddi/defxx.c netdev_for_each_mc_addr(ha, dev) ha 2312 drivers/net/fddi/defxx.c ha->addr, FDDI_K_ALEN); ha 292 drivers/net/fddi/defza.c struct netdev_hw_addr *ha; ha 323 drivers/net/fddi/defza.c netdev_for_each_mc_addr(ha, dev) { ha 326 drivers/net/fddi/defza.c fza_writes(ha->addr, &buf->cam.hw_addr[i++], ha 849 drivers/net/fddi/skfp/skfddi.c struct netdev_hw_addr *ha; ha 873 drivers/net/fddi/skfp/skfddi.c netdev_for_each_mc_addr(ha, dev) { ha 875 drivers/net/fddi/skfp/skfddi.c (struct fddi_addr *)ha->addr, ha 879 drivers/net/fddi/skfp/skfddi.c ha->addr); ha 247 drivers/net/ipvlan/ipvlan_main.c struct netdev_hw_addr *ha; ha 251 drivers/net/ipvlan/ipvlan_main.c netdev_for_each_mc_addr(ha, dev) ha 252 drivers/net/ipvlan/ipvlan_main.c __set_bit(ipvlan_mac_hash(ha->addr), mc_filters); ha 778 drivers/net/macvlan.c struct netdev_hw_addr *ha; ha 782 drivers/net/macvlan.c netdev_for_each_mc_addr(ha, dev) { ha 783 drivers/net/macvlan.c __set_bit(mc_hash(vlan, ha->addr), filter); ha 545 drivers/net/usb/aqc111.c struct netdev_hw_addr *ha = NULL; ha 548 drivers/net/usb/aqc111.c netdev_for_each_mc_addr(ha, net) { ha 549 drivers/net/usb/aqc111.c crc_bits = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 423 drivers/net/usb/asix_common.c struct netdev_hw_addr *ha; ha 429 drivers/net/usb/asix_common.c netdev_for_each_mc_addr(ha, net) { ha 430 drivers/net/usb/asix_common.c crc_bits = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 150 drivers/net/usb/asix_devices.c struct netdev_hw_addr *ha; ha 156 drivers/net/usb/asix_devices.c netdev_for_each_mc_addr(ha, net) { ha 157 drivers/net/usb/asix_devices.c crc_bits = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 852 drivers/net/usb/ax88179_178a.c struct netdev_hw_addr *ha; ha 856 drivers/net/usb/ax88179_178a.c netdev_for_each_mc_addr(ha, net) { ha 857 drivers/net/usb/ax88179_178a.c crc_bits = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 629 drivers/net/usb/catc.c struct netdev_hw_addr *ha; ha 647 drivers/net/usb/catc.c netdev_for_each_mc_addr(ha, netdev) { ha 648 drivers/net/usb/catc.c u32 crc = ether_crc_le(6, ha->addr); ha 306 drivers/net/usb/dm9601.c struct netdev_hw_addr *ha; ha 308 drivers/net/usb/dm9601.c netdev_for_each_mc_addr(ha, net) { ha 309 drivers/net/usb/dm9601.c u32 crc = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 1098 drivers/net/usb/lan78xx.c struct netdev_hw_addr *ha; ha 1106 drivers/net/usb/lan78xx.c netdev_for_each_mc_addr(ha, netdev) { ha 1109 drivers/net/usb/lan78xx.c lan78xx_set_addr_filter(pdata, i, ha->addr); ha 1111 drivers/net/usb/lan78xx.c u32 bitnum = lan78xx_hash(ha->addr); ha 370 drivers/net/usb/mcs7830.c struct netdev_hw_addr *ha; ha 374 drivers/net/usb/mcs7830.c netdev_for_each_mc_addr(ha, net) { ha 375 drivers/net/usb/mcs7830.c crc_bits = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 2367 drivers/net/usb/r8152.c struct netdev_hw_addr *ha; ha 2371 drivers/net/usb/r8152.c netdev_for_each_mc_addr(ha, netdev) { ha 2372 drivers/net/usb/r8152.c int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 564 drivers/net/usb/smsc75xx.c struct netdev_hw_addr *ha; ha 570 drivers/net/usb/smsc75xx.c netdev_for_each_mc_addr(ha, netdev) { ha 571 drivers/net/usb/smsc75xx.c u32 bitnum = smsc75xx_hash(ha->addr); ha 476 drivers/net/usb/smsc95xx.c struct netdev_hw_addr *ha; ha 481 drivers/net/usb/smsc95xx.c netdev_for_each_mc_addr(ha, netdev) { ha 482 drivers/net/usb/smsc95xx.c u32 bitnum = smsc95xx_hash(ha->addr); ha 276 drivers/net/usb/sr9700.c struct netdev_hw_addr *ha; ha 278 drivers/net/usb/sr9700.c netdev_for_each_mc_addr(ha, netdev) { ha 279 drivers/net/usb/sr9700.c u32 crc = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 314 drivers/net/usb/sr9800.c struct netdev_hw_addr *ha; ha 320 drivers/net/usb/sr9800.c netdev_for_each_mc_addr(ha, net) { ha 321 drivers/net/usb/sr9800.c crc_bits = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 1823 drivers/net/virtio_net.c struct netdev_hw_addr *ha; ha 1864 drivers/net/virtio_net.c netdev_for_each_uc_addr(ha, dev) ha 1865 drivers/net/virtio_net.c memcpy(&mac_data->macs[i++][0], ha->addr, ETH_ALEN); ha 1875 drivers/net/virtio_net.c netdev_for_each_mc_addr(ha, dev) ha 1876 drivers/net/virtio_net.c memcpy(&mac_data->macs[i++][0], ha->addr, ETH_ALEN); ha 2295 drivers/net/vmxnet3/vmxnet3_drv.c struct netdev_hw_addr *ha; ha 2298 drivers/net/vmxnet3/vmxnet3_drv.c netdev_for_each_mc_addr(ha, netdev) ha 2299 drivers/net/vmxnet3/vmxnet3_drv.c memcpy(buf + i++ * ETH_ALEN, ha->addr, ha 1858 drivers/net/vxlan.c f = vxlan_find_mac(vxlan, n->ha, vni); ha 1866 drivers/net/vxlan.c n->ha, sha); ha 1939 drivers/net/vxlan.c ether_addr_copy(eth_hdr(reply)->h_source, n->ha); ha 1968 drivers/net/vxlan.c ether_addr_copy(&na->opt[2], n->ha); ha 2017 drivers/net/vxlan.c f = vxlan_find_mac(vxlan, n->ha, vni); ha 2109 drivers/net/vxlan.c diff = !ether_addr_equal(eth_hdr(skb)->h_dest, n->ha); ha 2113 drivers/net/vxlan.c memcpy(eth_hdr(skb)->h_dest, n->ha, dev->addr_len); ha 1334 drivers/net/wireless/admtek/adm8211.c struct netdev_hw_addr *ha; ha 1338 drivers/net/wireless/admtek/adm8211.c netdev_hw_addr_list_for_each(ha, mc_list) { ha 1339 drivers/net/wireless/admtek/adm8211.c bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 324 drivers/net/wireless/ath/ath5k/mac80211-ops.c struct netdev_hw_addr *ha; ha 329 drivers/net/wireless/ath/ath5k/mac80211-ops.c netdev_hw_addr_list_for_each(ha, mc_list) { ha 331 drivers/net/wireless/ath/ath5k/mac80211-ops.c val = get_unaligned_le32(ha->addr + 0); ha 333 drivers/net/wireless/ath/ath5k/mac80211-ops.c val = get_unaligned_le32(ha->addr + 3); ha 1156 drivers/net/wireless/ath/ath6kl/main.c struct netdev_hw_addr *ha; ha 1206 drivers/net/wireless/ath/ath6kl/main.c netdev_for_each_mc_addr(ha, ndev) { ha 1207 drivers/net/wireless/ath/ath6kl/main.c if (memcmp(ha->addr, mc_filter->hw_addr, ha 1238 drivers/net/wireless/ath/ath6kl/main.c netdev_for_each_mc_addr(ha, ndev) { ha 1241 drivers/net/wireless/ath/ath6kl/main.c if (memcmp(ha->addr, mc_filter->hw_addr, ha 1256 drivers/net/wireless/ath/ath6kl/main.c memcpy(mc_filter->hw_addr, ha->addr, ha 975 drivers/net/wireless/ath/carl9170/main.c struct netdev_hw_addr *ha; ha 981 drivers/net/wireless/ath/carl9170/main.c netdev_hw_addr_list_for_each(ha, mc_list) ha 982 drivers/net/wireless/ath/carl9170/main.c mchash |= 1ULL << (ha->addr[5] >> 2); ha 452 drivers/net/wireless/ath/wcn36xx/main.c struct netdev_hw_addr *ha; ha 465 drivers/net/wireless/ath/wcn36xx/main.c netdev_hw_addr_list_for_each(ha, mc_list) { ha 467 drivers/net/wireless/ath/wcn36xx/main.c ha->addr, ETH_ALEN); ha 137 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c struct netdev_hw_addr *ha; ha 163 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c netdev_for_each_mc_addr(ha, ndev) { ha 166 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c memcpy(bufp, ha->addr, ETH_ALEN); ha 1089 drivers/net/wireless/intersil/orinoco/hw.c struct netdev_hw_addr *ha; ha 1093 drivers/net/wireless/intersil/orinoco/hw.c netdev_for_each_mc_addr(ha, dev) { ha 1096 drivers/net/wireless/intersil/orinoco/hw.c memcpy(mclist.addr[i++], ha->addr, ETH_ALEN); ha 367 drivers/net/wireless/intersil/p54/main.c struct netdev_hw_addr *ha; ha 378 drivers/net/wireless/intersil/p54/main.c netdev_hw_addr_list_for_each(ha, mc_list) { ha 379 drivers/net/wireless/intersil/p54/main.c memcpy(&priv->mc_maclist[i], ha->addr, ETH_ALEN); ha 330 drivers/net/wireless/marvell/libertas/main.c struct netdev_hw_addr *ha; ha 338 drivers/net/wireless/marvell/libertas/main.c netdev_for_each_mc_addr(ha, dev) { ha 339 drivers/net/wireless/marvell/libertas/main.c if (mac_in_list(cmd->maclist, nr_addrs, ha->addr)) { ha 341 drivers/net/wireless/marvell/libertas/main.c ha->addr); ha 348 drivers/net/wireless/marvell/libertas/main.c memcpy(&cmd->maclist[6*i], ha->addr, ETH_ALEN); ha 350 drivers/net/wireless/marvell/libertas/main.c ha->addr); ha 359 drivers/net/wireless/marvell/libertas_tf/main.c struct netdev_hw_addr *ha; ha 367 drivers/net/wireless/marvell/libertas_tf/main.c netdev_hw_addr_list_for_each(ha, mc_list) ha 368 drivers/net/wireless/marvell/libertas_tf/main.c memcpy(&priv->multicastlist[i++], ha->addr, ETH_ALEN); ha 80 drivers/net/wireless/marvell/mwifiex/debugfs.c struct netdev_hw_addr *ha; ha 125 drivers/net/wireless/marvell/mwifiex/debugfs.c netdev_for_each_mc_addr(ha, netdev) ha 127 drivers/net/wireless/marvell/mwifiex/debugfs.c i++, ha->addr); ha 43 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c struct netdev_hw_addr *ha; ha 45 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c netdev_for_each_mc_addr(ha, dev) ha 46 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c memcpy(&mlist->mac_list[i++], ha->addr, ETH_ALEN); ha 2710 drivers/net/wireless/marvell/mwl8k.c struct netdev_hw_addr *ha; ha 2715 drivers/net/wireless/marvell/mwl8k.c netdev_hw_addr_list_for_each(ha, mc_list) { ha 2716 drivers/net/wireless/marvell/mwl8k.c memcpy(cmd->addr[i], ha->addr, ETH_ALEN); ha 1760 drivers/net/wireless/ray_cs.c struct netdev_hw_addr *ha; ha 1764 drivers/net/wireless/ray_cs.c netdev_for_each_mc_addr(ha, dev) { ha 1765 drivers/net/wireless/ray_cs.c memcpy_toio(p, ha->addr, ETH_ALEN); ha 1767 drivers/net/wireless/ray_cs.c ha->addr); ha 1581 drivers/net/wireless/rndis_wlan.c struct netdev_hw_addr *ha; ha 1617 drivers/net/wireless/rndis_wlan.c netdev_for_each_mc_addr(ha, usbdev->net) ha 1619 drivers/net/wireless/rndis_wlan.c ha->addr, ETH_ALEN); ha 542 drivers/net/wireless/st/cw1200/sta.c struct netdev_hw_addr *ha; ha 553 drivers/net/wireless/st/cw1200/sta.c netdev_hw_addr_list_for_each(ha, mc_list) { ha 554 drivers/net/wireless/st/cw1200/sta.c pr_debug("[STA] multicast: %pM\n", ha->addr); ha 556 drivers/net/wireless/st/cw1200/sta.c ha->addr, ETH_ALEN); ha 557 drivers/net/wireless/st/cw1200/sta.c if (!ether_addr_equal(ha->addr, broadcast_ipv4) && ha 558 drivers/net/wireless/st/cw1200/sta.c !ether_addr_equal(ha->addr, broadcast_ipv6)) ha 722 drivers/net/wireless/ti/wl1251/main.c struct netdev_hw_addr *ha; ha 740 drivers/net/wireless/ti/wl1251/main.c netdev_hw_addr_list_for_each(ha, mc_list) { ha 742 drivers/net/wireless/ti/wl1251/main.c ha->addr, ETH_ALEN); ha 3168 drivers/net/wireless/ti/wlcore/main.c struct netdev_hw_addr *ha; ha 3182 drivers/net/wireless/ti/wlcore/main.c netdev_hw_addr_list_for_each(ha, mc_list) { ha 3184 drivers/net/wireless/ti/wlcore/main.c ha->addr, ETH_ALEN); ha 875 drivers/net/wireless/zydas/zd1201.c struct netdev_hw_addr *ha; ha 883 drivers/net/wireless/zydas/zd1201.c netdev_for_each_mc_addr(ha, dev) ha 884 drivers/net/wireless/zydas/zd1201.c memcpy(reqbuf + i++ * ETH_ALEN, ha->addr, ETH_ALEN); ha 1206 drivers/net/wireless/zydas/zd1211rw/zd_mac.c struct netdev_hw_addr *ha; ha 1210 drivers/net/wireless/zydas/zd1211rw/zd_mac.c netdev_hw_addr_list_for_each(ha, mc_list) { ha 1211 drivers/net/wireless/zydas/zd1211rw/zd_mac.c dev_dbg_f(zd_mac_dev(mac), "mc addr %pM\n", ha->addr); ha 1212 drivers/net/wireless/zydas/zd1211rw/zd_mac.c zd_mc_add_addr(&hash, ha->addr); ha 1024 drivers/pcmcia/cistpl.c u_int len, ca, ha; ha 1037 drivers/pcmcia/cistpl.c len = ca = ha = 0; ha 1052 drivers/pcmcia/cistpl.c ha += *p << (j*8); ha 1056 drivers/pcmcia/cistpl.c mem->win[i].host_addr = ha << 8; ha 485 drivers/s390/net/qeth_l2_main.c static void qeth_l2_add_mac(struct qeth_card *card, struct netdev_hw_addr *ha) ha 487 drivers/s390/net/qeth_l2_main.c u32 mac_hash = get_unaligned((u32 *)(&ha->addr[2])); ha 491 drivers/s390/net/qeth_l2_main.c if (ether_addr_equal_64bits(ha->addr, mac->mac_addr)) { ha 501 drivers/s390/net/qeth_l2_main.c ether_addr_copy(mac->mac_addr, ha->addr); ha 512 drivers/s390/net/qeth_l2_main.c struct netdev_hw_addr *ha; ha 521 drivers/s390/net/qeth_l2_main.c netdev_for_each_mc_addr(ha, dev) ha 522 drivers/s390/net/qeth_l2_main.c qeth_l2_add_mac(card, ha); ha 523 drivers/s390/net/qeth_l2_main.c netdev_for_each_uc_addr(ha, dev) ha 524 drivers/s390/net/qeth_l2_main.c qeth_l2_add_mac(card, ha); ha 2099 drivers/s390/net/qeth_l3_main.c memcpy(n->ha, "FAKELL", 6); ha 3881 drivers/scsi/BusLogic.c struct blogic_adapter *ha, *next; ha 3883 drivers/scsi/BusLogic.c list_for_each_entry_safe(ha, next, &blogic_host_list, host_list) ha 3884 drivers/scsi/BusLogic.c blogic_deladapter(ha); ha 67 drivers/scsi/aic94xx/aic94xx_dev.c struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; ha 80 drivers/scsi/aic94xx/aic94xx_dev.c struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; ha 97 drivers/scsi/aic94xx/aic94xx_dev.c struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; ha 122 drivers/scsi/aic94xx/aic94xx_dev.c struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; ha 140 drivers/scsi/aic94xx/aic94xx_dev.c struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; ha 218 drivers/scsi/aic94xx/aic94xx_dev.c struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; ha 248 drivers/scsi/aic94xx/aic94xx_dev.c struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; ha 298 drivers/scsi/aic94xx/aic94xx_dev.c asd_free_ddb(dev->port->ha->lldd_ha, ha 308 drivers/scsi/aic94xx/aic94xx_dev.c struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; ha 333 drivers/scsi/aic94xx/aic94xx_dev.c struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; ha 71 drivers/scsi/aic94xx/aic94xx_hwi.c struct asd_ha_struct *asd_ha = phy->sas_phy.ha->lldd_ha; ha 127 drivers/scsi/aic94xx/aic94xx_hwi.c phy->sas_phy.ha = &asd_ha->sas_ha; ha 114 drivers/scsi/aic94xx/aic94xx_hwi.h struct asd_ha_struct *ha; ha 275 drivers/scsi/aic94xx/aic94xx_hwi.h ascb->ha = asd_ha; ha 322 drivers/scsi/aic94xx/aic94xx_hwi.h struct asd_ha_struct *asd_ha = ascb->ha; ha 326 drivers/scsi/aic94xx/aic94xx_hwi.h spin_lock_irqsave(&ascb->ha->seq.tc_index_lock, flags); ha 327 drivers/scsi/aic94xx/aic94xx_hwi.h asd_tc_index_release(&ascb->ha->seq, ascb->tc_index); ha 328 drivers/scsi/aic94xx/aic94xx_hwi.h spin_unlock_irqrestore(&ascb->ha->seq.tc_index_lock, flags); ha 70 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_ha_struct *asd_ha = ascb->ha; ha 140 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_ha_struct *asd_ha = phy->sas_phy.ha->lldd_ha; ha 223 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_dma_tok *edb = ascb->ha->seq.edb_arr[edb_el]; ha 224 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_phy *phy = &ascb->ha->phys[phy_id]; ha 225 drivers/scsi/aic94xx/aic94xx_scb.c struct sas_ha_struct *sas_ha = phy->sas_phy.ha; ha 236 drivers/scsi/aic94xx/aic94xx_scb.c asd_form_port(ascb->ha, phy); ha 244 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_ha_struct *asd_ha = ascb->ha; ha 277 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_ascb *cp = asd_ascb_alloc_list(ascb->ha, &num, ha 286 drivers/scsi/aic94xx/aic94xx_scb.c if (asd_post_ascb_list(ascb->ha, cp, 1) != 0) ha 298 drivers/scsi/aic94xx/aic94xx_scb.c struct sas_ha_struct *sas_ha = &ascb->ha->sas_ha; ha 300 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_ha_struct *asd_ha = ascb->ha; ha 366 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_seq_data *seq = &ascb->ha->seq; ha 391 drivers/scsi/aic94xx/aic94xx_scb.c i = asd_post_escb_list(ascb->ha, ascb, 1); ha 400 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_ha_struct *asd_ha = ascb->ha; ha 627 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_ha_struct *asd_ha = ascb->ha; ha 631 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_phy *phy = &ascb->ha->phys[phy_id]; ha 764 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_phy *phy = &ascb->ha->phys[phy_id]; ha 862 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_seq_data *seq = &ascb->ha->seq; ha 888 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_ha_struct *asd_ha = phy->ha->lldd_ha; ha 41 drivers/scsi/aic94xx/aic94xx_task.c struct asd_ha_struct *asd_ha = ascb->ha; ha 118 drivers/scsi/aic94xx/aic94xx_task.c struct asd_ha_struct *asd_ha = ascb->ha; ha 127 drivers/scsi/aic94xx/aic94xx_task.c dma_unmap_single(&ascb->ha->pcidev->dev, dma, ha 143 drivers/scsi/aic94xx/aic94xx_task.c struct asd_ha_struct *asd_ha = ascb->ha; ha 202 drivers/scsi/aic94xx/aic94xx_task.c asd_can_dequeue(ascb->ha, 1); ha 417 drivers/scsi/aic94xx/aic94xx_task.c struct asd_ha_struct *asd_ha = ascb->ha; ha 456 drivers/scsi/aic94xx/aic94xx_task.c dma_unmap_sg(&a->ha->pcidev->dev, &task->smp_task.smp_req, 1, ha 458 drivers/scsi/aic94xx/aic94xx_task.c dma_unmap_sg(&a->ha->pcidev->dev, &task->smp_task.smp_resp, 1, ha 482 drivers/scsi/aic94xx/aic94xx_task.c dev->port->ha->hashed_sas_addr, HASHED_SAS_ADDR_SIZE); ha 534 drivers/scsi/aic94xx/aic94xx_task.c struct asd_ha_struct *asd_ha = task->dev->port->ha->lldd_ha; ha 32 drivers/scsi/aic94xx/aic94xx_tmf.c res = asd_post_ascb_list(ascb->ha, ascb, 1); ha 126 drivers/scsi/aic94xx/aic94xx_tmf.c struct asd_ha_struct *asd_ha = port->ha->lldd_ha; ha 143 drivers/scsi/aic94xx/aic94xx_tmf.c struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; ha 203 drivers/scsi/aic94xx/aic94xx_tmf.c struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; ha 216 drivers/scsi/aic94xx/aic94xx_tmf.c struct asd_ha_struct *asd_ha = task->dev->port->ha->lldd_ha; ha 231 drivers/scsi/aic94xx/aic94xx_tmf.c struct asd_ha_struct *asd_ha = task->dev->port->ha->lldd_ha; ha 258 drivers/scsi/aic94xx/aic94xx_tmf.c struct asd_ha_struct *asd_ha = ascb->ha; ha 389 drivers/scsi/aic94xx/aic94xx_tmf.c struct asd_ha_struct *asd_ha = tascb->ha; ha 439 drivers/scsi/aic94xx/aic94xx_tmf.c task->dev->port->ha->hashed_sas_addr, ha 559 drivers/scsi/aic94xx/aic94xx_tmf.c struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; ha 589 drivers/scsi/aic94xx/aic94xx_tmf.c dev->port->ha->hashed_sas_addr, HASHED_SAS_ADDR_SIZE); ha 1240 drivers/scsi/bnx2fc/bnx2fc_fcoe.c struct netdev_hw_addr *ha; ha 1245 drivers/scsi/bnx2fc/bnx2fc_fcoe.c for_each_dev_addr(physdev, ha) { ha 1247 drivers/scsi/bnx2fc/bnx2fc_fcoe.c ha->type); ha 1248 drivers/scsi/bnx2fc/bnx2fc_fcoe.c printk(KERN_INFO "%2x:%2x:%2x:%2x:%2x:%2x\n", ha->addr[0], ha 1249 drivers/scsi/bnx2fc/bnx2fc_fcoe.c ha->addr[1], ha->addr[2], ha->addr[3], ha 1250 drivers/scsi/bnx2fc/bnx2fc_fcoe.c ha->addr[4], ha->addr[5]); ha 1252 drivers/scsi/bnx2fc/bnx2fc_fcoe.c if ((ha->type == NETDEV_HW_ADDR_T_SAN) && ha 1253 drivers/scsi/bnx2fc/bnx2fc_fcoe.c (is_valid_ether_addr(ha->addr))) { ha 1254 drivers/scsi/bnx2fc/bnx2fc_fcoe.c memcpy(ctlr->ctl_src_addr, ha->addr, ha 1010 drivers/scsi/esas2r/esas2r.h void esas2r_target_state_changed(struct esas2r_adapter *ha, u16 targ_id, ha 294 drivers/scsi/fcoe/fcoe.c struct netdev_hw_addr *ha; ha 320 drivers/scsi/fcoe/fcoe.c for_each_dev_addr(real_dev, ha) { ha 321 drivers/scsi/fcoe/fcoe.c if ((ha->type == NETDEV_HW_ADDR_T_SAN) && ha 322 drivers/scsi/fcoe/fcoe.c (is_valid_ether_addr(ha->addr))) { ha 323 drivers/scsi/fcoe/fcoe.c memcpy(fip->ctl_src_addr, ha->addr, ETH_ALEN); ha 119 drivers/scsi/gdth.c static irqreturn_t __gdth_interrupt(gdth_ha_str *ha, ha 121 drivers/scsi/gdth.c static int gdth_sync_event(gdth_ha_str *ha, int service, u8 index, ha 123 drivers/scsi/gdth.c static int gdth_async_event(gdth_ha_str *ha); ha 126 drivers/scsi/gdth.c static void gdth_putq(gdth_ha_str *ha, struct scsi_cmnd *scp, u8 priority); ha 127 drivers/scsi/gdth.c static void gdth_next(gdth_ha_str *ha); ha 128 drivers/scsi/gdth.c static int gdth_fill_raw_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp, u8 b); ha 129 drivers/scsi/gdth.c static int gdth_special_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp); ha 130 drivers/scsi/gdth.c static gdth_evt_str *gdth_store_event(gdth_ha_str *ha, u16 source, ha 132 drivers/scsi/gdth.c static int gdth_read_event(gdth_ha_str *ha, int handle, gdth_evt_str *estr); ha 133 drivers/scsi/gdth.c static void gdth_readapp_event(gdth_ha_str *ha, u8 application, ha 137 drivers/scsi/gdth.c static void gdth_copy_internal_data(gdth_ha_str *ha, struct scsi_cmnd *scp, ha 139 drivers/scsi/gdth.c static int gdth_internal_cache_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp); ha 140 drivers/scsi/gdth.c static int gdth_fill_cache_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp, ha 143 drivers/scsi/gdth.c static void gdth_enable_int(gdth_ha_str *ha); ha 144 drivers/scsi/gdth.c static int gdth_test_busy(gdth_ha_str *ha); ha 145 drivers/scsi/gdth.c static int gdth_get_cmd_index(gdth_ha_str *ha); ha 146 drivers/scsi/gdth.c static void gdth_release_event(gdth_ha_str *ha); ha 147 drivers/scsi/gdth.c static int gdth_wait(gdth_ha_str *ha, int index,u32 time); ha 148 drivers/scsi/gdth.c static int gdth_internal_cmd(gdth_ha_str *ha, u8 service, u16 opcode, ha 150 drivers/scsi/gdth.c static int gdth_search_drives(gdth_ha_str *ha); ha 151 drivers/scsi/gdth.c static int gdth_analyse_hdrive(gdth_ha_str *ha, u16 hdrive); ha 153 drivers/scsi/gdth.c static const char *gdth_ctr_name(gdth_ha_str *ha); ha 160 drivers/scsi/gdth.c static void gdth_flush(gdth_ha_str *ha); ha 162 drivers/scsi/gdth.c static int __gdth_queuecommand(gdth_ha_str *ha, struct scsi_cmnd *scp, ha 270 drivers/scsi/gdth.c gdth_ha_str *ha; ha 272 drivers/scsi/gdth.c list_for_each_entry(ha, &gdth_instances, list) ha 273 drivers/scsi/gdth.c if (hanum == ha->hanum) ha 274 drivers/scsi/gdth.c return ha; ha 279 drivers/scsi/gdth.c static struct gdth_cmndinfo *gdth_get_cmndinfo(gdth_ha_str *ha) ha 285 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 288 drivers/scsi/gdth.c if (ha->cmndinfo[i].index == 0) { ha 289 drivers/scsi/gdth.c priv = &ha->cmndinfo[i]; ha 296 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 335 drivers/scsi/gdth.c gdth_ha_str *ha = shost_priv(sdev->host); ha 363 drivers/scsi/gdth.c __gdth_queuecommand(ha, scp, &cmndinfo); ha 421 drivers/scsi/gdth.c static void gdth_remove_one(gdth_ha_str *ha); ha 443 drivers/scsi/gdth.c gdth_ha_str *ha = pci_get_drvdata(pdev); ha 445 drivers/scsi/gdth.c list_del(&ha->list); ha 446 drivers/scsi/gdth.c gdth_remove_one(ha); ha 459 drivers/scsi/gdth.c gdth_ha_str *ha = NULL; ha 500 drivers/scsi/gdth.c rc = gdth_pci_probe_one(&gdth_pcistr, &ha); ha 508 drivers/scsi/gdth.c gdth_ha_str *ha) ha 521 drivers/scsi/gdth.c ha->oem_id = OEM_ID_INTEL; ha 523 drivers/scsi/gdth.c ha->oem_id = OEM_ID_ICP; ha 524 drivers/scsi/gdth.c ha->brd_phys = (pdev->bus->number << 8) | (pdev->devfn & 0xf8); ha 525 drivers/scsi/gdth.c ha->stype = (u32)pdev->device; ha 526 drivers/scsi/gdth.c ha->irq = pdev->irq; ha 527 drivers/scsi/gdth.c ha->pdev = pdev; ha 529 drivers/scsi/gdth.c if (ha->pdev->device <= PCI_DEVICE_ID_VORTEX_GDT6000B) { /* GDT6000/B */ ha 530 drivers/scsi/gdth.c TRACE2(("init_pci() dpmem %lx irq %d\n",pcistr->dpmem,ha->irq)); ha 531 drivers/scsi/gdth.c ha->brd = ioremap(pcistr->dpmem, sizeof(gdt6_dpram_str)); ha 532 drivers/scsi/gdth.c if (ha->brd == NULL) { ha 537 drivers/scsi/gdth.c dp6_ptr = ha->brd; ha 544 drivers/scsi/gdth.c iounmap(ha->brd); ha 545 drivers/scsi/gdth.c ha->brd = ioremap(i, sizeof(u16)); ha 546 drivers/scsi/gdth.c if (ha->brd == NULL) { ha 550 drivers/scsi/gdth.c if (readw(ha->brd) != 0xffff) { ha 554 drivers/scsi/gdth.c iounmap(ha->brd); ha 556 drivers/scsi/gdth.c ha->brd = ioremap(i, sizeof(gdt6_dpram_str)); ha 557 drivers/scsi/gdth.c if (ha->brd == NULL) { ha 561 drivers/scsi/gdth.c dp6_ptr = ha->brd; ha 571 drivers/scsi/gdth.c iounmap(ha->brd); ha 578 drivers/scsi/gdth.c iounmap(ha->brd); ha 596 drivers/scsi/gdth.c iounmap(ha->brd); ha 606 drivers/scsi/gdth.c iounmap(ha->brd); ha 610 drivers/scsi/gdth.c ha->type = GDT_PCI; ha 611 drivers/scsi/gdth.c ha->ic_all_size = sizeof(dp6_ptr->u); ha 625 drivers/scsi/gdth.c iounmap(ha->brd); ha 633 drivers/scsi/gdth.c ha->dma64_support = 0; ha 635 drivers/scsi/gdth.c } else if (ha->pdev->device <= PCI_DEVICE_ID_VORTEX_GDT6555) { /* GDT6110, ... */ ha 636 drivers/scsi/gdth.c ha->plx = (gdt6c_plx_regs *)pcistr->io; ha 638 drivers/scsi/gdth.c pcistr->dpmem,ha->irq)); ha 639 drivers/scsi/gdth.c ha->brd = ioremap(pcistr->dpmem, sizeof(gdt6c_dpram_str)); ha 640 drivers/scsi/gdth.c if (ha->brd == NULL) { ha 642 drivers/scsi/gdth.c iounmap(ha->brd); ha 646 drivers/scsi/gdth.c dp6c_ptr = ha->brd; ha 653 drivers/scsi/gdth.c iounmap(ha->brd); ha 654 drivers/scsi/gdth.c ha->brd = ioremap(i, sizeof(u16)); ha 655 drivers/scsi/gdth.c if (ha->brd == NULL) { ha 659 drivers/scsi/gdth.c if (readw(ha->brd) != 0xffff) { ha 663 drivers/scsi/gdth.c iounmap(ha->brd); ha 665 drivers/scsi/gdth.c ha->brd = ioremap(i, sizeof(gdt6c_dpram_str)); ha 666 drivers/scsi/gdth.c if (ha->brd == NULL) { ha 670 drivers/scsi/gdth.c dp6c_ptr = ha->brd; ha 680 drivers/scsi/gdth.c iounmap(ha->brd); ha 687 drivers/scsi/gdth.c iounmap(ha->brd); ha 692 drivers/scsi/gdth.c outb(0x00,PTR2USHORT(&ha->plx->control1)); ha 693 drivers/scsi/gdth.c outb(0xff,PTR2USHORT(&ha->plx->edoor_reg)); ha 701 drivers/scsi/gdth.c outb(1,PTR2USHORT(&ha->plx->ldoor_reg)); ha 708 drivers/scsi/gdth.c iounmap(ha->brd); ha 717 drivers/scsi/gdth.c iounmap(ha->brd); ha 721 drivers/scsi/gdth.c ha->type = GDT_PCINEW; ha 722 drivers/scsi/gdth.c ha->ic_all_size = sizeof(dp6c_ptr->u); ha 731 drivers/scsi/gdth.c outb(1,PTR2USHORT(&ha->plx->ldoor_reg)); ha 738 drivers/scsi/gdth.c iounmap(ha->brd); ha 745 drivers/scsi/gdth.c ha->dma64_support = 0; ha 748 drivers/scsi/gdth.c TRACE2(("init_pci_mpr() dpmem %lx irq %d\n",pcistr->dpmem,ha->irq)); ha 749 drivers/scsi/gdth.c ha->brd = ioremap(pcistr->dpmem, sizeof(gdt6m_dpram_str)); ha 750 drivers/scsi/gdth.c if (ha->brd == NULL) { ha 761 drivers/scsi/gdth.c dp6m_ptr = ha->brd; ha 775 drivers/scsi/gdth.c iounmap(ha->brd); ha 776 drivers/scsi/gdth.c ha->brd = ioremap(i, sizeof(u16)); ha 777 drivers/scsi/gdth.c if (ha->brd == NULL) { ha 781 drivers/scsi/gdth.c if (readw(ha->brd) != 0xffff) { ha 785 drivers/scsi/gdth.c iounmap(ha->brd); ha 787 drivers/scsi/gdth.c ha->brd = ioremap(i, sizeof(gdt6m_dpram_str)); ha 788 drivers/scsi/gdth.c if (ha->brd == NULL) { ha 792 drivers/scsi/gdth.c dp6m_ptr = ha->brd; ha 802 drivers/scsi/gdth.c iounmap(ha->brd); ha 823 drivers/scsi/gdth.c iounmap(ha->brd); ha 832 drivers/scsi/gdth.c iounmap(ha->brd); ha 836 drivers/scsi/gdth.c ha->type = GDT_PCIMPR; ha 837 drivers/scsi/gdth.c ha->ic_all_size = sizeof(dp6m_ptr->u); ha 851 drivers/scsi/gdth.c iounmap(ha->brd); ha 866 drivers/scsi/gdth.c iounmap(ha->brd); ha 874 drivers/scsi/gdth.c ha->dma64_support = 0; ha 876 drivers/scsi/gdth.c ha->dma64_support = 1; ha 884 drivers/scsi/gdth.c static void gdth_enable_int(gdth_ha_str *ha) ha 890 drivers/scsi/gdth.c TRACE(("gdth_enable_int() hanum %d\n",ha->hanum)); ha 891 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 893 drivers/scsi/gdth.c if (ha->type == GDT_PCI) { ha 894 drivers/scsi/gdth.c dp6_ptr = ha->brd; ha 898 drivers/scsi/gdth.c } else if (ha->type == GDT_PCINEW) { ha 899 drivers/scsi/gdth.c outb(0xff, PTR2USHORT(&ha->plx->edoor_reg)); ha 900 drivers/scsi/gdth.c outb(0x03, PTR2USHORT(&ha->plx->control1)); ha 901 drivers/scsi/gdth.c } else if (ha->type == GDT_PCIMPR) { ha 902 drivers/scsi/gdth.c dp6m_ptr = ha->brd; ha 907 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 911 drivers/scsi/gdth.c static u8 gdth_get_status(gdth_ha_str *ha) ha 915 drivers/scsi/gdth.c TRACE(("gdth_get_status() irq %d ctr_count %d\n", ha->irq, gdth_ctr_count)); ha 917 drivers/scsi/gdth.c if (ha->type == GDT_PCI) ha 919 drivers/scsi/gdth.c readb(&((gdt6_dpram_str __iomem *)ha->brd)->u.ic.Cmd_Index); ha 920 drivers/scsi/gdth.c else if (ha->type == GDT_PCINEW) ha 921 drivers/scsi/gdth.c IStatus = inb(PTR2USHORT(&ha->plx->edoor_reg)); ha 922 drivers/scsi/gdth.c else if (ha->type == GDT_PCIMPR) ha 924 drivers/scsi/gdth.c readb(&((gdt6m_dpram_str __iomem *)ha->brd)->i960r.edoor_reg); ha 929 drivers/scsi/gdth.c static int gdth_test_busy(gdth_ha_str *ha) ha 933 drivers/scsi/gdth.c TRACE(("gdth_test_busy() hanum %d\n", ha->hanum)); ha 935 drivers/scsi/gdth.c if (ha->type == GDT_PCI) ha 936 drivers/scsi/gdth.c gdtsema0 = (int)readb(&((gdt6_dpram_str __iomem *)ha->brd)->u.ic.Sema0); ha 937 drivers/scsi/gdth.c else if (ha->type == GDT_PCINEW) ha 938 drivers/scsi/gdth.c gdtsema0 = (int)inb(PTR2USHORT(&ha->plx->sema0_reg)); ha 939 drivers/scsi/gdth.c else if (ha->type == GDT_PCIMPR) ha 941 drivers/scsi/gdth.c (int)readb(&((gdt6m_dpram_str __iomem *)ha->brd)->i960r.sema0_reg); ha 947 drivers/scsi/gdth.c static int gdth_get_cmd_index(gdth_ha_str *ha) ha 951 drivers/scsi/gdth.c TRACE(("gdth_get_cmd_index() hanum %d\n", ha->hanum)); ha 954 drivers/scsi/gdth.c if (ha->cmd_tab[i].cmnd == UNUSED_CMND) { ha 955 drivers/scsi/gdth.c ha->cmd_tab[i].cmnd = ha->pccb->RequestBuffer; ha 956 drivers/scsi/gdth.c ha->cmd_tab[i].service = ha->pccb->Service; ha 957 drivers/scsi/gdth.c ha->pccb->CommandIndex = (u32)i+2; ha 965 drivers/scsi/gdth.c static void gdth_set_sema0(gdth_ha_str *ha) ha 967 drivers/scsi/gdth.c TRACE(("gdth_set_sema0() hanum %d\n", ha->hanum)); ha 969 drivers/scsi/gdth.c if (ha->type == GDT_PCI) { ha 970 drivers/scsi/gdth.c writeb(1, &((gdt6_dpram_str __iomem *)ha->brd)->u.ic.Sema0); ha 971 drivers/scsi/gdth.c } else if (ha->type == GDT_PCINEW) { ha 972 drivers/scsi/gdth.c outb(1, PTR2USHORT(&ha->plx->sema0_reg)); ha 973 drivers/scsi/gdth.c } else if (ha->type == GDT_PCIMPR) { ha 974 drivers/scsi/gdth.c writeb(1, &((gdt6m_dpram_str __iomem *)ha->brd)->i960r.sema0_reg); ha 979 drivers/scsi/gdth.c static void gdth_copy_command(gdth_ha_str *ha) ha 987 drivers/scsi/gdth.c TRACE(("gdth_copy_command() hanum %d\n", ha->hanum)); ha 989 drivers/scsi/gdth.c cp_count = ha->cmd_len; ha 990 drivers/scsi/gdth.c dp_offset= ha->cmd_offs_dpmem; ha 991 drivers/scsi/gdth.c cmd_no = ha->cmd_cnt; ha 992 drivers/scsi/gdth.c cmd_ptr = ha->pccb; ha 994 drivers/scsi/gdth.c ++ha->cmd_cnt; ha 1000 drivers/scsi/gdth.c ha->cmd_offs_dpmem += cp_count; ha 1003 drivers/scsi/gdth.c if (ha->type == GDT_PCI) { ha 1004 drivers/scsi/gdth.c dp6_ptr = ha->brd; ha 1010 drivers/scsi/gdth.c } else if (ha->type == GDT_PCINEW) { ha 1011 drivers/scsi/gdth.c dp6c_ptr = ha->brd; ha 1017 drivers/scsi/gdth.c } else if (ha->type == GDT_PCIMPR) { ha 1018 drivers/scsi/gdth.c dp6m_ptr = ha->brd; ha 1028 drivers/scsi/gdth.c static void gdth_release_event(gdth_ha_str *ha) ha 1030 drivers/scsi/gdth.c TRACE(("gdth_release_event() hanum %d\n", ha->hanum)); ha 1036 drivers/scsi/gdth.c if (ha->cmd_tab[j].cmnd != UNUSED_CMND) ha 1046 drivers/scsi/gdth.c if (ha->pccb->OpCode == GDT_INIT) ha 1047 drivers/scsi/gdth.c ha->pccb->Service |= 0x80; ha 1049 drivers/scsi/gdth.c if (ha->type == GDT_PCI) { ha 1050 drivers/scsi/gdth.c writeb(0, &((gdt6_dpram_str __iomem *)ha->brd)->io.event); ha 1051 drivers/scsi/gdth.c } else if (ha->type == GDT_PCINEW) { ha 1052 drivers/scsi/gdth.c outb(1, PTR2USHORT(&ha->plx->ldoor_reg)); ha 1053 drivers/scsi/gdth.c } else if (ha->type == GDT_PCIMPR) { ha 1054 drivers/scsi/gdth.c writeb(1, &((gdt6m_dpram_str __iomem *)ha->brd)->i960r.ldoor_reg); ha 1058 drivers/scsi/gdth.c static int gdth_wait(gdth_ha_str *ha, int index, u32 time) ha 1063 drivers/scsi/gdth.c TRACE(("gdth_wait() hanum %d index %d time %d\n", ha->hanum, index, time)); ha 1069 drivers/scsi/gdth.c __gdth_interrupt(ha, true, &wait_index); ha 1077 drivers/scsi/gdth.c while (gdth_test_busy(ha)) ha 1084 drivers/scsi/gdth.c static int gdth_internal_cmd(gdth_ha_str *ha, u8 service, u16 opcode, ha 1092 drivers/scsi/gdth.c cmd_ptr = ha->pccb; ha 1099 drivers/scsi/gdth.c if (!(index=gdth_get_cmd_index(ha))) { ha 1103 drivers/scsi/gdth.c gdth_set_sema0(ha); ha 1111 drivers/scsi/gdth.c cmd_ptr->u.ioctl.p_param = ha->scratch_phys; ha 1113 drivers/scsi/gdth.c if (ha->cache_feat & GDT_64BIT) { ha 1122 drivers/scsi/gdth.c if (ha->raw_feat & GDT_64BIT) { ha 1140 drivers/scsi/gdth.c ha->cmd_len = sizeof(gdth_cmd_str); ha 1141 drivers/scsi/gdth.c ha->cmd_offs_dpmem = 0; ha 1142 drivers/scsi/gdth.c ha->cmd_cnt = 0; ha 1143 drivers/scsi/gdth.c gdth_copy_command(ha); ha 1144 drivers/scsi/gdth.c gdth_release_event(ha); ha 1146 drivers/scsi/gdth.c if (!gdth_wait(ha, index, INIT_TIMEOUT)) { ha 1150 drivers/scsi/gdth.c if (ha->status != S_BSY || --retries == 0) ha 1155 drivers/scsi/gdth.c return (ha->status != S_OK ? 0:1); ha 1161 drivers/scsi/gdth.c static int gdth_search_drives(gdth_ha_str *ha) ha 1174 drivers/scsi/gdth.c TRACE(("gdth_search_drives() hanum %d\n", ha->hanum)); ha 1178 drivers/scsi/gdth.c ha->screen_feat = 0; ha 1180 drivers/scsi/gdth.c ok = gdth_internal_cmd(ha, SCREENSERVICE, GDT_X_INIT_SCR, 0, 0, 0); ha 1182 drivers/scsi/gdth.c ha->screen_feat = GDT_64BIT; ha 1184 drivers/scsi/gdth.c if (force_dma32 || (!ok && ha->status == (u16)S_NOFUNC)) ha 1185 drivers/scsi/gdth.c ok = gdth_internal_cmd(ha, SCREENSERVICE, GDT_INIT, 0, 0, 0); ha 1188 drivers/scsi/gdth.c ha->hanum, ha->status); ha 1194 drivers/scsi/gdth.c gdth_internal_cmd(ha, CACHESERVICE, GDT_UNFREEZE_IO, 0, 0, 0); ha 1197 drivers/scsi/gdth.c ha->cache_feat = 0; ha 1199 drivers/scsi/gdth.c ok = gdth_internal_cmd(ha, CACHESERVICE, GDT_X_INIT_HOST, LINUX_OS, ha 1202 drivers/scsi/gdth.c ha->cache_feat = GDT_64BIT; ha 1204 drivers/scsi/gdth.c if (force_dma32 || (!ok && ha->status == (u16)S_NOFUNC)) ha 1205 drivers/scsi/gdth.c ok = gdth_internal_cmd(ha, CACHESERVICE, GDT_INIT, LINUX_OS, 0, 0); ha 1208 drivers/scsi/gdth.c ha->hanum, ha->status); ha 1212 drivers/scsi/gdth.c cdev_cnt = (u16)ha->info; ha 1213 drivers/scsi/gdth.c ha->fw_vers = ha->service; ha 1216 drivers/scsi/gdth.c iocr = (gdth_raw_iochan_str *)ha->pscratch; ha 1222 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, IOCHAN_RAW_DESC, ha 1225 drivers/scsi/gdth.c ha->bus_cnt = iocr->hdr.chan_count; ha 1226 drivers/scsi/gdth.c for (bus_no = 0; bus_no < ha->bus_cnt; ++bus_no) { ha 1228 drivers/scsi/gdth.c ha->bus_id[bus_no] = iocr->list[bus_no].proc_id; ha 1230 drivers/scsi/gdth.c ha->bus_id[bus_no] = 0xff; ha 1234 drivers/scsi/gdth.c chn = (gdth_getch_str *)ha->pscratch; ha 1237 drivers/scsi/gdth.c if (!gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, ha 1243 drivers/scsi/gdth.c ha->hanum, ha->status); ha 1249 drivers/scsi/gdth.c ha->bus_id[bus_no] = chn->siop_id; ha 1251 drivers/scsi/gdth.c ha->bus_id[bus_no] = 0xff; ha 1253 drivers/scsi/gdth.c ha->bus_cnt = (u8)bus_no; ha 1255 drivers/scsi/gdth.c TRACE2(("gdth_search_drives() %d channels\n",ha->bus_cnt)); ha 1258 drivers/scsi/gdth.c if (!gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, CACHE_INFO, ha 1261 drivers/scsi/gdth.c ha->hanum, ha->status); ha 1264 drivers/scsi/gdth.c ha->cpar = ((gdth_cinfo_str *)ha->pscratch)->cpar; ha 1266 drivers/scsi/gdth.c ha->cpar.version,ha->cpar.state,ha->cpar.strategy, ha 1267 drivers/scsi/gdth.c ha->cpar.write_back,ha->cpar.block_size)); ha 1270 drivers/scsi/gdth.c ha->more_proc = FALSE; ha 1271 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, BOARD_INFO, ha 1273 drivers/scsi/gdth.c memcpy(&ha->binfo, (gdth_binfo_str *)ha->pscratch, ha 1275 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, BOARD_FEATURES, ha 1278 drivers/scsi/gdth.c ha->bfeat = *(gdth_bfeat_str *)ha->pscratch; ha 1279 drivers/scsi/gdth.c ha->more_proc = TRUE; ha 1283 drivers/scsi/gdth.c strcpy(ha->binfo.type_string, gdth_ctr_name(ha)); ha 1285 drivers/scsi/gdth.c TRACE2(("Controller name: %s\n",ha->binfo.type_string)); ha 1288 drivers/scsi/gdth.c if (ha->more_proc) { ha 1290 drivers/scsi/gdth.c ioc = (gdth_iochan_str *)ha->pscratch; ha 1296 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, IOCHAN_DESC, ha 1298 drivers/scsi/gdth.c for (bus_no = 0; bus_no < ha->bus_cnt; ++bus_no) { ha 1299 drivers/scsi/gdth.c ha->raw[bus_no].address = ioc->list[bus_no].address; ha 1300 drivers/scsi/gdth.c ha->raw[bus_no].local_no = ioc->list[bus_no].local_no; ha 1303 drivers/scsi/gdth.c for (bus_no = 0; bus_no < ha->bus_cnt; ++bus_no) { ha 1304 drivers/scsi/gdth.c ha->raw[bus_no].address = IO_CHANNEL; ha 1305 drivers/scsi/gdth.c ha->raw[bus_no].local_no = bus_no; ha 1308 drivers/scsi/gdth.c for (bus_no = 0; bus_no < ha->bus_cnt; ++bus_no) { ha 1309 drivers/scsi/gdth.c chn = (gdth_getch_str *)ha->pscratch; ha 1310 drivers/scsi/gdth.c chn->channel_no = ha->raw[bus_no].local_no; ha 1311 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, ha 1313 drivers/scsi/gdth.c ha->raw[bus_no].address | INVALID_CHANNEL, ha 1315 drivers/scsi/gdth.c ha->raw[bus_no].pdev_cnt = chn->drive_cnt; ha 1319 drivers/scsi/gdth.c if (ha->raw[bus_no].pdev_cnt > 0) { ha 1320 drivers/scsi/gdth.c drl = (gdth_drlist_str *)ha->pscratch; ha 1321 drivers/scsi/gdth.c drl->sc_no = ha->raw[bus_no].local_no; ha 1322 drivers/scsi/gdth.c drl->sc_cnt = ha->raw[bus_no].pdev_cnt; ha 1323 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, ha 1325 drivers/scsi/gdth.c ha->raw[bus_no].address | INVALID_CHANNEL, ha 1327 drivers/scsi/gdth.c for (j = 0; j < ha->raw[bus_no].pdev_cnt; ++j) ha 1328 drivers/scsi/gdth.c ha->raw[bus_no].id_list[j] = drl->sc_list[j]; ha 1330 drivers/scsi/gdth.c ha->raw[bus_no].pdev_cnt = 0; ha 1336 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, CACHE_DRV_CNT, ha 1338 drivers/scsi/gdth.c drv_cnt = *(u32 *)ha->pscratch; ha 1339 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, CACHE_DRV_LIST, ha 1342 drivers/scsi/gdth.c drv_no = ((u32 *)ha->pscratch)[j]; ha 1344 drivers/scsi/gdth.c ha->hdr[drv_no].is_logdrv = TRUE; ha 1349 drivers/scsi/gdth.c alst = (gdth_arcdl_str *)ha->pscratch; ha 1353 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, ha 1358 drivers/scsi/gdth.c ha->hdr[j].is_arraydrv = alst->list[j].is_arrayd; ha 1359 drivers/scsi/gdth.c ha->hdr[j].is_master = alst->list[j].is_master; ha 1360 drivers/scsi/gdth.c ha->hdr[j].is_parity = alst->list[j].is_parity; ha 1361 drivers/scsi/gdth.c ha->hdr[j].is_hotfix = alst->list[j].is_hotfix; ha 1362 drivers/scsi/gdth.c ha->hdr[j].master_no = alst->list[j].cd_handle; ha 1364 drivers/scsi/gdth.c } else if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, ha 1368 drivers/scsi/gdth.c alst2 = &((gdth_alist_str *)ha->pscratch)[j]; ha 1369 drivers/scsi/gdth.c ha->hdr[j].is_arraydrv = alst2->is_arrayd; ha 1370 drivers/scsi/gdth.c ha->hdr[j].is_master = alst2->is_master; ha 1371 drivers/scsi/gdth.c ha->hdr[j].is_parity = alst2->is_parity; ha 1372 drivers/scsi/gdth.c ha->hdr[j].is_hotfix = alst2->is_hotfix; ha 1373 drivers/scsi/gdth.c ha->hdr[j].master_no = alst2->cd_handle; ha 1380 drivers/scsi/gdth.c ha->raw_feat = 0; ha 1382 drivers/scsi/gdth.c ok = gdth_internal_cmd(ha, SCSIRAWSERVICE, GDT_X_INIT_RAW, 0, 0, 0); ha 1384 drivers/scsi/gdth.c ha->raw_feat = GDT_64BIT; ha 1386 drivers/scsi/gdth.c if (force_dma32 || (!ok && ha->status == (u16)S_NOFUNC)) ha 1387 drivers/scsi/gdth.c ok = gdth_internal_cmd(ha, SCSIRAWSERVICE, GDT_INIT, 0, 0, 0); ha 1390 drivers/scsi/gdth.c ha->hanum, ha->status); ha 1396 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, SCSIRAWSERVICE, GDT_SET_FEAT, SCATTER_GATHER, ha 1399 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, SCSIRAWSERVICE, GDT_GET_FEAT, 0, 0, 0)) { ha 1401 drivers/scsi/gdth.c ha->info)); ha 1402 drivers/scsi/gdth.c ha->raw_feat |= (u16)ha->info; ha 1407 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_SET_FEAT, 0, ha 1410 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_GET_FEAT, 0, 0, 0)) { ha 1412 drivers/scsi/gdth.c ha->info)); ha 1413 drivers/scsi/gdth.c ha->cache_feat |= (u16)ha->info; ha 1419 drivers/scsi/gdth.c gdth_internal_cmd(ha, SCSIRAWSERVICE, GDT_RESERVE_ALL, ha 1422 drivers/scsi/gdth.c ha->status)); ha 1425 drivers/scsi/gdth.c if (reserve_list[i] == ha->hanum && reserve_list[i+1] < ha->bus_cnt && ha 1426 drivers/scsi/gdth.c reserve_list[i+2] < ha->tid_cnt && reserve_list[i+3] < MAXLUN) { ha 1430 drivers/scsi/gdth.c if (!gdth_internal_cmd(ha, SCSIRAWSERVICE, GDT_RESERVE, 0, ha 1434 drivers/scsi/gdth.c ha->hanum, ha->status); ha 1440 drivers/scsi/gdth.c oemstr = (gdth_oem_str_ioctl *)ha->pscratch; ha 1443 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_IOCTL, ha 1448 drivers/scsi/gdth.c ha->hanum, oemstr->text.oem_company_name, ha->binfo.type_string); ha 1450 drivers/scsi/gdth.c strlcpy(ha->oem_name,oemstr->text.scsi_host_drive_inquiry_vendor_id, ha 1451 drivers/scsi/gdth.c sizeof(ha->oem_name)); ha 1456 drivers/scsi/gdth.c ha->hanum, ha->binfo.type_string); ha 1457 drivers/scsi/gdth.c if (ha->oem_id == OEM_ID_INTEL) ha 1458 drivers/scsi/gdth.c strlcpy(ha->oem_name,"Intel ", sizeof(ha->oem_name)); ha 1460 drivers/scsi/gdth.c strlcpy(ha->oem_name,"ICP ", sizeof(ha->oem_name)); ha 1465 drivers/scsi/gdth.c gdth_analyse_hdrive(ha, i); ha 1471 drivers/scsi/gdth.c static int gdth_analyse_hdrive(gdth_ha_str *ha, u16 hdrive) ha 1476 drivers/scsi/gdth.c TRACE(("gdth_analyse_hdrive() hanum %d drive %d\n", ha->hanum, hdrive)); ha 1480 drivers/scsi/gdth.c if (!gdth_internal_cmd(ha, CACHESERVICE, GDT_INFO, hdrive, 0, 0)) ha 1482 drivers/scsi/gdth.c ha->hdr[hdrive].present = TRUE; ha 1483 drivers/scsi/gdth.c ha->hdr[hdrive].size = ha->info; ha 1486 drivers/scsi/gdth.c ha->hdr[hdrive].size &= ~SECS32; ha 1487 drivers/scsi/gdth.c if (ha->info2 == 0) { ha 1488 drivers/scsi/gdth.c gdth_eval_mapping(ha->hdr[hdrive].size,&drv_cyls,&drv_hds,&drv_secs); ha 1490 drivers/scsi/gdth.c drv_hds = ha->info2 & 0xff; ha 1491 drivers/scsi/gdth.c drv_secs = (ha->info2 >> 8) & 0xff; ha 1492 drivers/scsi/gdth.c drv_cyls = (u32)ha->hdr[hdrive].size / drv_hds / drv_secs; ha 1494 drivers/scsi/gdth.c ha->hdr[hdrive].heads = (u8)drv_hds; ha 1495 drivers/scsi/gdth.c ha->hdr[hdrive].secs = (u8)drv_secs; ha 1497 drivers/scsi/gdth.c ha->hdr[hdrive].size = drv_cyls * drv_hds * drv_secs; ha 1499 drivers/scsi/gdth.c if (ha->cache_feat & GDT_64BIT) { ha 1500 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_X_INFO, hdrive, 0, 0) ha 1501 drivers/scsi/gdth.c && ha->info2 != 0) { ha 1502 drivers/scsi/gdth.c ha->hdr[hdrive].size = ((u64)ha->info2 << 32) | ha->info; ha 1506 drivers/scsi/gdth.c hdrive,ha->hdr[hdrive].size,drv_hds,drv_secs)); ha 1509 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_DEVTYPE, hdrive, 0, 0)) { ha 1511 drivers/scsi/gdth.c hdrive,ha->info)); ha 1512 drivers/scsi/gdth.c ha->hdr[hdrive].devtype = (u16)ha->info; ha 1516 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_CLUST_INFO, hdrive, 0, 0)) { ha 1518 drivers/scsi/gdth.c hdrive,ha->info)); ha 1520 drivers/scsi/gdth.c ha->hdr[hdrive].cluster_type = (u8)ha->info; ha 1524 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, GDT_RW_ATTRIBS, hdrive, 0, 0)) { ha 1526 drivers/scsi/gdth.c hdrive,ha->info)); ha 1527 drivers/scsi/gdth.c ha->hdr[hdrive].rw_attribs = (u8)ha->info; ha 1536 drivers/scsi/gdth.c static void gdth_putq(gdth_ha_str *ha, struct scsi_cmnd *scp, u8 priority) ha 1544 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 1549 drivers/scsi/gdth.c if (ha->req_first==NULL) { ha 1550 drivers/scsi/gdth.c ha->req_first = scp; /* queue was empty */ ha 1553 drivers/scsi/gdth.c pscp = ha->req_first; ha 1563 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 1567 drivers/scsi/gdth.c for (nscp=ha->req_first; nscp; nscp=(struct scsi_cmnd*)nscp->SCp.ptr) ha 1576 drivers/scsi/gdth.c static void gdth_next(gdth_ha_str *ha) ha 1585 drivers/scsi/gdth.c TRACE(("gdth_next() hanum %d\n", ha->hanum)); ha 1587 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 1589 drivers/scsi/gdth.c ha->cmd_cnt = ha->cmd_offs_dpmem = 0; ha 1594 drivers/scsi/gdth.c for (nscp = pscp = ha->req_first; nscp; nscp = (struct scsi_cmnd *)nscp->SCp.ptr) { ha 1603 drivers/scsi/gdth.c if ((b != ha->virt_bus && ha->raw[BUS_L2P(ha,b)].lock) || ha 1604 drivers/scsi/gdth.c (b == ha->virt_bus && t < MAX_HDRIVES && ha->hdr[t].lock)) ha 1611 drivers/scsi/gdth.c if (gdth_test_busy(ha)) { /* controller busy ? */ ha 1612 drivers/scsi/gdth.c TRACE(("gdth_next() controller %d busy !\n", ha->hanum)); ha 1614 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 1617 drivers/scsi/gdth.c while (gdth_test_busy(ha)) ha 1630 drivers/scsi/gdth.c if ((ha->scan_mode & 0x0f) == 0) { ha 1632 drivers/scsi/gdth.c ha->scan_mode |= 1; ha 1633 drivers/scsi/gdth.c TRACE2(("Scan mode: 0x%x\n", ha->scan_mode)); ha 1635 drivers/scsi/gdth.c } else if ((ha->scan_mode & 0x0f) == 1) { ha 1639 drivers/scsi/gdth.c nscp_cmndinfo->phase = ((ha->scan_mode & 0x10 ? 1:0) << 8) ha 1641 drivers/scsi/gdth.c ha->scan_mode = 0x12; ha 1643 drivers/scsi/gdth.c ha->scan_mode)); ha 1645 drivers/scsi/gdth.c ha->scan_mode &= 0x10; ha 1646 drivers/scsi/gdth.c TRACE2(("Scan mode: 0x%x\n", ha->scan_mode)); ha 1648 drivers/scsi/gdth.c } else if (ha->scan_mode == 0x12) { ha 1649 drivers/scsi/gdth.c if (b == ha->bus_cnt && t == ha->tid_cnt-1) { ha 1652 drivers/scsi/gdth.c ha->scan_mode &= 0x10; ha 1654 drivers/scsi/gdth.c ha->scan_mode)); ha 1658 drivers/scsi/gdth.c if (b == ha->virt_bus && nscp->cmnd[0] != INQUIRY && ha 1660 drivers/scsi/gdth.c (ha->hdr[t].cluster_type & CLUSTER_DRIVE)) { ha 1669 drivers/scsi/gdth.c if (!(cmd_index=gdth_fill_cache_cmd(ha, nscp, t))) ha 1673 drivers/scsi/gdth.c if (!(cmd_index=gdth_fill_raw_cmd(ha, nscp, BUS_L2P(ha, b)))) ha 1687 drivers/scsi/gdth.c if (!(cmd_index=gdth_special_cmd(ha, nscp))) ha 1690 drivers/scsi/gdth.c } else if (b != ha->virt_bus) { ha 1691 drivers/scsi/gdth.c if (ha->raw[BUS_L2P(ha,b)].io_cnt[t] >= GDTH_MAX_RAW || ha 1692 drivers/scsi/gdth.c !(cmd_index=gdth_fill_raw_cmd(ha, nscp, BUS_L2P(ha, b)))) ha 1695 drivers/scsi/gdth.c ha->raw[BUS_L2P(ha,b)].io_cnt[t]++; ha 1696 drivers/scsi/gdth.c } else if (t >= MAX_HDRIVES || !ha->hdr[t].present || l != 0) { ha 1717 drivers/scsi/gdth.c if (ha->hdr[t].media_changed && nscp->cmnd[0] != INQUIRY) { ha 1721 drivers/scsi/gdth.c ha->hdr[t].media_changed = FALSE; ha 1730 drivers/scsi/gdth.c } else if (gdth_internal_cache_cmd(ha, nscp)) ha 1738 drivers/scsi/gdth.c if ( (nscp->cmnd[4]&1) && !(ha->hdr[t].devtype&1) ) { ha 1747 drivers/scsi/gdth.c nscp->cmnd[3] = (ha->hdr[t].devtype&1) ? 1:0; ha 1750 drivers/scsi/gdth.c if (!(cmd_index=gdth_fill_cache_cmd(ha, nscp, t))) ha 1759 drivers/scsi/gdth.c if (!(cmd_index=gdth_fill_cache_cmd(ha, nscp, t))) ha 1769 drivers/scsi/gdth.c if (ha->hdr[t].media_changed) { ha 1773 drivers/scsi/gdth.c ha->hdr[t].media_changed = FALSE; ha 1782 drivers/scsi/gdth.c } else if (!(cmd_index=gdth_fill_cache_cmd(ha, nscp, t))) ha 1791 drivers/scsi/gdth.c ha->hanum, nscp->cmnd[0]); ha 1803 drivers/scsi/gdth.c if (nscp == ha->req_first) ha 1804 drivers/scsi/gdth.c ha->req_first = pscp = (struct scsi_cmnd *)nscp->SCp.ptr; ha 1811 drivers/scsi/gdth.c if (ha->cmd_cnt > 0) { ha 1812 drivers/scsi/gdth.c gdth_release_event(ha); ha 1816 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 1818 drivers/scsi/gdth.c if (gdth_polling && ha->cmd_cnt > 0) { ha 1819 drivers/scsi/gdth.c if (!gdth_wait(ha, cmd_index, POLL_TIMEOUT)) ha 1821 drivers/scsi/gdth.c ha->hanum, cmd_index); ha 1829 drivers/scsi/gdth.c static void gdth_copy_internal_data(gdth_ha_str *ha, struct scsi_cmnd *scp, ha 1851 drivers/scsi/gdth.c ha->hanum); ha 1866 drivers/scsi/gdth.c ha->hanum); ha 1871 drivers/scsi/gdth.c static int gdth_internal_cache_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp) ha 1896 drivers/scsi/gdth.c t,ha->hdr[t].devtype)); ha 1897 drivers/scsi/gdth.c inq.type_qual = (ha->hdr[t].devtype&4) ? TYPE_ROM:TYPE_DISK; ha 1901 drivers/scsi/gdth.c if ((ha->hdr[t].devtype & 1) || ha 1902 drivers/scsi/gdth.c (ha->hdr[t].cluster_type & CLUSTER_DRIVE)) ha 1907 drivers/scsi/gdth.c strcpy(inq.vendor,ha->oem_name); ha 1910 drivers/scsi/gdth.c gdth_copy_internal_data(ha, scp, (char*)&inq, sizeof(gdth_inq_data)); ha 1920 drivers/scsi/gdth.c gdth_copy_internal_data(ha, scp, (char*)&sd, sizeof(gdth_sense_data)); ha 1927 drivers/scsi/gdth.c mpd.hd.dev_par = (ha->hdr[t].devtype&2) ? 0x80:0; ha 1932 drivers/scsi/gdth.c gdth_copy_internal_data(ha, scp, (char*)&mpd, sizeof(gdth_modep_data)); ha 1937 drivers/scsi/gdth.c if (ha->hdr[t].size > (u64)0xffffffff) ha 1940 drivers/scsi/gdth.c rdc.last_block_no = cpu_to_be32(ha->hdr[t].size-1); ha 1942 drivers/scsi/gdth.c gdth_copy_internal_data(ha, scp, (char*)&rdc, sizeof(gdth_rdcap_data)); ha 1947 drivers/scsi/gdth.c (ha->cache_feat & GDT_64BIT)) { ha 1951 drivers/scsi/gdth.c rdc16.last_block_no = cpu_to_be64(ha->hdr[t].size-1); ha 1953 drivers/scsi/gdth.c gdth_copy_internal_data(ha, scp, (char*)&rdc16, ha 1973 drivers/scsi/gdth.c static int gdth_fill_cache_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp, ha 1982 drivers/scsi/gdth.c cmdp = ha->pccb; ha 1986 drivers/scsi/gdth.c mode64 = (ha->cache_feat & GDT_64BIT) ? TRUE : FALSE; ha 1994 drivers/scsi/gdth.c if (!(cmd_index=gdth_get_cmd_index(ha))) { ha 1999 drivers/scsi/gdth.c if (ha->cmd_cnt == 0) ha 2000 drivers/scsi/gdth.c gdth_set_sema0(ha); ha 2021 drivers/scsi/gdth.c if (gdth_write_through || ((ha->hdr[hdrive].rw_attribs & 1) && ha 2022 drivers/scsi/gdth.c (ha->cache_feat & GDT_WR_THROUGH))) ha 2069 drivers/scsi/gdth.c sgcnt = dma_map_sg(&ha->pdev->dev, scsi_sglist(scp), ha 2108 drivers/scsi/gdth.c ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.cache64.sg_lst) + ha 2117 drivers/scsi/gdth.c ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.cache.sg_lst) + ha 2120 drivers/scsi/gdth.c if (ha->cmd_len & 3) ha 2121 drivers/scsi/gdth.c ha->cmd_len += (4 - (ha->cmd_len & 3)); ha 2123 drivers/scsi/gdth.c if (ha->cmd_cnt > 0) { ha 2124 drivers/scsi/gdth.c if ((ha->cmd_offs_dpmem + ha->cmd_len + DPMEM_COMMAND_OFFSET) > ha 2125 drivers/scsi/gdth.c ha->ic_all_size) { ha 2127 drivers/scsi/gdth.c ha->cmd_tab[cmd_index-2].cmnd = UNUSED_CMND; ha 2133 drivers/scsi/gdth.c gdth_copy_command(ha); ha 2137 drivers/scsi/gdth.c static int gdth_fill_raw_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp, u8 b) ha 2148 drivers/scsi/gdth.c cmdp = ha->pccb; ha 2152 drivers/scsi/gdth.c mode64 = (ha->raw_feat & GDT_64BIT) ? TRUE : FALSE; ha 2157 drivers/scsi/gdth.c if (!(cmd_index=gdth_get_cmd_index(ha))) { ha 2162 drivers/scsi/gdth.c if (ha->cmd_cnt == 0) ha 2163 drivers/scsi/gdth.c gdth_set_sema0(ha); ha 2175 drivers/scsi/gdth.c ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.raw64.sg_lst); ha 2181 drivers/scsi/gdth.c ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.raw.sg_lst); ha 2185 drivers/scsi/gdth.c sense_paddr = dma_map_single(&ha->pdev->dev, scp->sense_buffer, 16, ha 2228 drivers/scsi/gdth.c sgcnt = dma_map_sg(&ha->pdev->dev, scsi_sglist(scp), ha 2264 drivers/scsi/gdth.c ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.raw64.sg_lst) + ha 2272 drivers/scsi/gdth.c ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.raw.sg_lst) + ha 2277 drivers/scsi/gdth.c if (ha->cmd_len & 3) ha 2278 drivers/scsi/gdth.c ha->cmd_len += (4 - (ha->cmd_len & 3)); ha 2280 drivers/scsi/gdth.c if (ha->cmd_cnt > 0) { ha 2281 drivers/scsi/gdth.c if ((ha->cmd_offs_dpmem + ha->cmd_len + DPMEM_COMMAND_OFFSET) > ha 2282 drivers/scsi/gdth.c ha->ic_all_size) { ha 2284 drivers/scsi/gdth.c ha->cmd_tab[cmd_index-2].cmnd = UNUSED_CMND; ha 2290 drivers/scsi/gdth.c gdth_copy_command(ha); ha 2294 drivers/scsi/gdth.c static int gdth_special_cmd(gdth_ha_str *ha, struct scsi_cmnd *scp) ha 2300 drivers/scsi/gdth.c cmdp= ha->pccb; ha 2307 drivers/scsi/gdth.c if (!(cmd_index=gdth_get_cmd_index(ha))) { ha 2313 drivers/scsi/gdth.c if (ha->cmd_cnt == 0) ha 2314 drivers/scsi/gdth.c gdth_set_sema0(ha); ha 2319 drivers/scsi/gdth.c ha->cmd_len = ha 2323 drivers/scsi/gdth.c if (ha->cache_feat & GDT_64BIT) ha 2324 drivers/scsi/gdth.c ha->cmd_len = ha 2327 drivers/scsi/gdth.c ha->cmd_len = ha 2331 drivers/scsi/gdth.c if (ha->raw_feat & GDT_64BIT) ha 2332 drivers/scsi/gdth.c ha->cmd_len = ha 2335 drivers/scsi/gdth.c ha->cmd_len = ha 2339 drivers/scsi/gdth.c if (ha->cmd_len & 3) ha 2340 drivers/scsi/gdth.c ha->cmd_len += (4 - (ha->cmd_len & 3)); ha 2342 drivers/scsi/gdth.c if (ha->cmd_cnt > 0) { ha 2343 drivers/scsi/gdth.c if ((ha->cmd_offs_dpmem + ha->cmd_len + DPMEM_COMMAND_OFFSET) > ha 2344 drivers/scsi/gdth.c ha->ic_all_size) { ha 2346 drivers/scsi/gdth.c ha->cmd_tab[cmd_index-2].cmnd = UNUSED_CMND; ha 2352 drivers/scsi/gdth.c gdth_copy_command(ha); ha 2358 drivers/scsi/gdth.c static gdth_evt_str *gdth_store_event(gdth_ha_str *ha, u16 source, ha 2401 drivers/scsi/gdth.c static int gdth_read_event(gdth_ha_str *ha, int handle, gdth_evt_str *estr) ha 2408 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 2416 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 2429 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 2433 drivers/scsi/gdth.c static void gdth_readapp_event(gdth_ha_str *ha, ha 2442 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 2462 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 2476 drivers/scsi/gdth.c static irqreturn_t __gdth_interrupt(gdth_ha_str *ha, ha 2487 drivers/scsi/gdth.c TRACE(("gdth_interrupt() IRQ %d\n", ha->irq)); ha 2497 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 2500 drivers/scsi/gdth.c IStatus = gdth_get_status(ha); ha 2504 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 2512 drivers/scsi/gdth.c if (ha->type == GDT_PCI) { ha 2513 drivers/scsi/gdth.c dp6_ptr = ha->brd; ha 2516 drivers/scsi/gdth.c ha->status = readw(&dp6_ptr->u.ic.Status); ha 2517 drivers/scsi/gdth.c TRACE2(("gdth_interrupt() error %d/%d\n",IStatus,ha->status)); ha 2519 drivers/scsi/gdth.c ha->status = S_OK; ha 2520 drivers/scsi/gdth.c ha->info = readl(&dp6_ptr->u.ic.Info[0]); ha 2521 drivers/scsi/gdth.c ha->service = readw(&dp6_ptr->u.ic.Service); ha 2522 drivers/scsi/gdth.c ha->info2 = readl(&dp6_ptr->u.ic.Info[1]); ha 2527 drivers/scsi/gdth.c } else if (ha->type == GDT_PCINEW) { ha 2530 drivers/scsi/gdth.c ha->status = inw(PTR2USHORT(&ha->plx->status)); ha 2531 drivers/scsi/gdth.c TRACE2(("gdth_interrupt() error %d/%d\n",IStatus,ha->status)); ha 2533 drivers/scsi/gdth.c ha->status = S_OK; ha 2534 drivers/scsi/gdth.c ha->info = inl(PTR2USHORT(&ha->plx->info[0])); ha 2535 drivers/scsi/gdth.c ha->service = inw(PTR2USHORT(&ha->plx->service)); ha 2536 drivers/scsi/gdth.c ha->info2 = inl(PTR2USHORT(&ha->plx->info[1])); ha 2538 drivers/scsi/gdth.c outb(0xff, PTR2USHORT(&ha->plx->edoor_reg)); ha 2539 drivers/scsi/gdth.c outb(0x00, PTR2USHORT(&ha->plx->sema1_reg)); ha 2540 drivers/scsi/gdth.c } else if (ha->type == GDT_PCIMPR) { ha 2541 drivers/scsi/gdth.c dp6m_ptr = ha->brd; ha 2544 drivers/scsi/gdth.c ha->status = readw(&dp6m_ptr->i960r.status); ha 2545 drivers/scsi/gdth.c TRACE2(("gdth_interrupt() error %d/%d\n",IStatus,ha->status)); ha 2547 drivers/scsi/gdth.c ha->status = S_OK; ha 2549 drivers/scsi/gdth.c ha->info = readl(&dp6m_ptr->i960r.info[0]); ha 2550 drivers/scsi/gdth.c ha->service = readw(&dp6m_ptr->i960r.service); ha 2551 drivers/scsi/gdth.c ha->info2 = readl(&dp6m_ptr->i960r.info[1]); ha 2555 drivers/scsi/gdth.c if (ha->service != SCREENSERVICE && ha 2556 drivers/scsi/gdth.c (ha->fw_vers & 0xff) >= 0x1a) { ha 2557 drivers/scsi/gdth.c ha->dvr.severity = readb ha 2558 drivers/scsi/gdth.c (&((gdt6m_dpram_str __iomem *)ha->brd)->i960r.severity); ha 2560 drivers/scsi/gdth.c ha->dvr.event_string[i] = readb ha 2561 drivers/scsi/gdth.c (&((gdt6m_dpram_str __iomem *)ha->brd)->i960r.evt_str[i]); ha 2562 drivers/scsi/gdth.c if (ha->dvr.event_string[i] == 0) ha 2572 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 2577 drivers/scsi/gdth.c IStatus,ha->status,ha->info)); ha 2585 drivers/scsi/gdth.c gdth_async_event(ha); ha 2587 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 2588 drivers/scsi/gdth.c gdth_next(ha); ha 2594 drivers/scsi/gdth.c ha->dvr.size = sizeof(ha->dvr.eu.driver); ha 2595 drivers/scsi/gdth.c ha->dvr.eu.driver.ionode = ha->hanum; ha 2596 drivers/scsi/gdth.c gdth_store_event(ha, ES_DRIVER, 4, &ha->dvr); ha 2598 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 2601 drivers/scsi/gdth.c scp = ha->cmd_tab[IStatus-2].cmnd; ha 2602 drivers/scsi/gdth.c Service = ha->cmd_tab[IStatus-2].service; ha 2603 drivers/scsi/gdth.c ha->cmd_tab[IStatus-2].cmnd = UNUSED_CMND; ha 2606 drivers/scsi/gdth.c ha->dvr.size = sizeof(ha->dvr.eu.driver); ha 2607 drivers/scsi/gdth.c ha->dvr.eu.driver.ionode = ha->hanum; ha 2608 drivers/scsi/gdth.c ha->dvr.eu.driver.index = IStatus; ha 2609 drivers/scsi/gdth.c gdth_store_event(ha, ES_DRIVER, 1, &ha->dvr); ha 2611 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 2617 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 2622 drivers/scsi/gdth.c rval = gdth_sync_event(ha,Service,IStatus,scp); ha 2624 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 2626 drivers/scsi/gdth.c gdth_putq(ha, scp, gdth_cmnd_priv(scp)->priority); ha 2631 drivers/scsi/gdth.c gdth_next(ha); ha 2637 drivers/scsi/gdth.c gdth_ha_str *ha = dev_id; ha 2639 drivers/scsi/gdth.c return __gdth_interrupt(ha, false, NULL); ha 2642 drivers/scsi/gdth.c static int gdth_sync_event(gdth_ha_str *ha, int service, u8 index, ha 2650 drivers/scsi/gdth.c cmdp = ha->pccb; ha 2652 drivers/scsi/gdth.c service,ha->status)); ha 2655 drivers/scsi/gdth.c msg = ha->pmsg; ha 2667 drivers/scsi/gdth.c while (gdth_test_busy(ha)) ha 2671 drivers/scsi/gdth.c gdth_get_cmd_index(ha); ha 2672 drivers/scsi/gdth.c gdth_set_sema0(ha); ha 2677 drivers/scsi/gdth.c cmdp->u.screen.su.msg.msg_addr = ha->msg_phys; ha 2678 drivers/scsi/gdth.c ha->cmd_offs_dpmem = 0; ha 2679 drivers/scsi/gdth.c ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.screen.su.msg.msg_addr) ha 2681 drivers/scsi/gdth.c ha->cmd_cnt = 0; ha 2682 drivers/scsi/gdth.c gdth_copy_command(ha); ha 2683 drivers/scsi/gdth.c gdth_release_event(ha); ha 2701 drivers/scsi/gdth.c while (gdth_test_busy(ha)) ha 2705 drivers/scsi/gdth.c gdth_get_cmd_index(ha); ha 2706 drivers/scsi/gdth.c gdth_set_sema0(ha); ha 2711 drivers/scsi/gdth.c cmdp->u.screen.su.msg.msg_addr = ha->msg_phys; ha 2712 drivers/scsi/gdth.c ha->cmd_offs_dpmem = 0; ha 2713 drivers/scsi/gdth.c ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.screen.su.msg.msg_addr) ha 2715 drivers/scsi/gdth.c ha->cmd_cnt = 0; ha 2716 drivers/scsi/gdth.c gdth_copy_command(ha); ha 2717 drivers/scsi/gdth.c gdth_release_event(ha); ha 2725 drivers/scsi/gdth.c if (cmndinfo->OpCode == -1 && b != ha->virt_bus) { ha 2726 drivers/scsi/gdth.c ha->raw[BUS_L2P(ha,b)].io_cnt[t]--; ha 2729 drivers/scsi/gdth.c if (ha->status == S_BSY) { ha 2737 drivers/scsi/gdth.c dma_unmap_sg(&ha->pdev->dev, scsi_sglist(scp), scsi_sg_count(scp), ha 2741 drivers/scsi/gdth.c dma_unmap_page(&ha->pdev->dev, cmndinfo->sense_paddr, 16, ha 2744 drivers/scsi/gdth.c if (ha->status == S_OK) { ha 2746 drivers/scsi/gdth.c cmndinfo->info = ha->info; ha 2752 drivers/scsi/gdth.c ha->hdr[t].cluster_type = (u8)ha->info; ha 2753 drivers/scsi/gdth.c if (!(ha->hdr[t].cluster_type & ha 2757 drivers/scsi/gdth.c if (ha->hdr[t].cluster_type & ha 2767 drivers/scsi/gdth.c ha->hdr[t].cluster_type |= CLUSTER_MOUNTED; ha 2768 drivers/scsi/gdth.c ha->hdr[t].media_changed = TRUE; ha 2770 drivers/scsi/gdth.c ha->hdr[t].cluster_type &= ~CLUSTER_MOUNTED; ha 2771 drivers/scsi/gdth.c ha->hdr[t].media_changed = TRUE; ha 2781 drivers/scsi/gdth.c ha->hdr[t].cluster_type |= CLUSTER_RESERVED; ha 2783 drivers/scsi/gdth.c ha->hdr[t].cluster_type &= ~CLUSTER_RESERVED; ha 2789 drivers/scsi/gdth.c cmndinfo->status = ha->status; ha 2790 drivers/scsi/gdth.c cmndinfo->info = ha->info; ha 2794 drivers/scsi/gdth.c cmndinfo->OpCode, ha->status)); ha 2807 drivers/scsi/gdth.c if (ha->status == S_CACHE_UNKNOWN && ha 2808 drivers/scsi/gdth.c (ha->hdr[t].cluster_type & ha 2811 drivers/scsi/gdth.c ha->hdr[t].cluster_type &= ~CLUSTER_RESERVED; ha 2814 drivers/scsi/gdth.c if (ha->status == (u16)S_CACHE_RESERV) { ha 2822 drivers/scsi/gdth.c ha->dvr.size = sizeof(ha->dvr.eu.sync); ha 2823 drivers/scsi/gdth.c ha->dvr.eu.sync.ionode = ha->hanum; ha 2824 drivers/scsi/gdth.c ha->dvr.eu.sync.service = service; ha 2825 drivers/scsi/gdth.c ha->dvr.eu.sync.status = ha->status; ha 2826 drivers/scsi/gdth.c ha->dvr.eu.sync.info = ha->info; ha 2827 drivers/scsi/gdth.c ha->dvr.eu.sync.hostdrive = t; ha 2828 drivers/scsi/gdth.c if (ha->status >= 0x8000) ha 2829 drivers/scsi/gdth.c gdth_store_event(ha, ES_SYNC, 0, &ha->dvr); ha 2831 drivers/scsi/gdth.c gdth_store_event(ha, ES_SYNC, service, &ha->dvr); ha 2835 drivers/scsi/gdth.c if (ha->status != S_RAW_SCSI || ha->info >= 0x100) { ha 2838 drivers/scsi/gdth.c scp->result = (DID_OK << 16) | ha->info; ha 3007 drivers/scsi/gdth.c static int gdth_async_event(gdth_ha_str *ha) ha 3012 drivers/scsi/gdth.c cmdp= ha->pccb; ha 3014 drivers/scsi/gdth.c ha->hanum, ha->service)); ha 3016 drivers/scsi/gdth.c if (ha->service == SCREENSERVICE) { ha 3017 drivers/scsi/gdth.c if (ha->status == MSG_REQUEST) { ha 3018 drivers/scsi/gdth.c while (gdth_test_busy(ha)) ha 3022 drivers/scsi/gdth.c cmd_index = gdth_get_cmd_index(ha); ha 3023 drivers/scsi/gdth.c gdth_set_sema0(ha); ha 3028 drivers/scsi/gdth.c cmdp->u.screen.su.msg.msg_addr = ha->msg_phys; ha 3029 drivers/scsi/gdth.c ha->cmd_offs_dpmem = 0; ha 3030 drivers/scsi/gdth.c ha->cmd_len = GDTOFFSOF(gdth_cmd_str,u.screen.su.msg.msg_addr) ha 3032 drivers/scsi/gdth.c ha->cmd_cnt = 0; ha 3033 drivers/scsi/gdth.c gdth_copy_command(ha); ha 3034 drivers/scsi/gdth.c printk("[PCI %d/%d] ",(u16)(ha->brd_phys>>8), ha 3035 drivers/scsi/gdth.c (u16)((ha->brd_phys>>3)&0x1f)); ha 3036 drivers/scsi/gdth.c gdth_release_event(ha); ha 3040 drivers/scsi/gdth.c if (ha->type == GDT_PCIMPR && ha 3041 drivers/scsi/gdth.c (ha->fw_vers & 0xff) >= 0x1a) { ha 3042 drivers/scsi/gdth.c ha->dvr.size = 0; ha 3043 drivers/scsi/gdth.c ha->dvr.eu.async.ionode = ha->hanum; ha 3044 drivers/scsi/gdth.c ha->dvr.eu.async.status = ha->status; ha 3047 drivers/scsi/gdth.c ha->dvr.size = sizeof(ha->dvr.eu.async); ha 3048 drivers/scsi/gdth.c ha->dvr.eu.async.ionode = ha->hanum; ha 3049 drivers/scsi/gdth.c ha->dvr.eu.async.service = ha->service; ha 3050 drivers/scsi/gdth.c ha->dvr.eu.async.status = ha->status; ha 3051 drivers/scsi/gdth.c ha->dvr.eu.async.info = ha->info; ha 3052 drivers/scsi/gdth.c *(u32 *)ha->dvr.eu.async.scsi_coord = ha->info2; ha 3054 drivers/scsi/gdth.c gdth_store_event( ha, ES_ASYNC, ha->service, &ha->dvr ); ha 3055 drivers/scsi/gdth.c gdth_log_event( &ha->dvr, NULL ); ha 3058 drivers/scsi/gdth.c if (ha->service == CACHESERVICE && ha->status == 56) { ha 3060 drivers/scsi/gdth.c (u16)ha->info)); ha 3130 drivers/scsi/gdth.c gdth_ha_str *ha; ha 3138 drivers/scsi/gdth.c ha = list_first_entry(&gdth_instances, gdth_ha_str, list); ha 3139 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3142 drivers/scsi/gdth.c if (ha->cmd_tab[i].cmnd != UNUSED_CMND) ha 3146 drivers/scsi/gdth.c nscp=ha->req_first; nscp; nscp=(struct scsi_cmnd*)nscp->SCp.ptr) ha 3155 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3249 drivers/scsi/gdth.c static const char *gdth_ctr_name(gdth_ha_str *ha) ha 3253 drivers/scsi/gdth.c if (ha->type == GDT_PCI) { ha 3254 drivers/scsi/gdth.c switch (ha->pdev->device) { ha 3268 drivers/scsi/gdth.c gdth_ha_str *ha = shost_priv(shp); ha 3271 drivers/scsi/gdth.c return ((const char *)ha->binfo.type_string); ha 3276 drivers/scsi/gdth.c gdth_ha_str *ha = shost_priv(scp->device->host); ha 3295 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3296 drivers/scsi/gdth.c if ((b != ha->virt_bus && ha->raw[BUS_L2P(ha, b)].lock) || ha 3297 drivers/scsi/gdth.c (b == ha->virt_bus && t < MAX_HDRIVES && ha->hdr[t].lock)) { ha 3301 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3309 drivers/scsi/gdth.c gdth_ha_str *ha = shost_priv(scp->device->host); ha 3320 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3322 drivers/scsi/gdth.c cmnd = ha->cmd_tab[i].cmnd; ha 3324 drivers/scsi/gdth.c ha->cmd_tab[i].cmnd = UNUSED_CMND; ha 3326 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3328 drivers/scsi/gdth.c if (b == ha->virt_bus) { ha 3331 drivers/scsi/gdth.c if (ha->hdr[i].present) { ha 3332 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3334 drivers/scsi/gdth.c while (gdth_test_busy(ha)) ha 3336 drivers/scsi/gdth.c if (gdth_internal_cmd(ha, CACHESERVICE, ha 3338 drivers/scsi/gdth.c ha->hdr[i].cluster_type &= ~CLUSTER_RESERVED; ha 3340 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3345 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3347 drivers/scsi/gdth.c ha->raw[BUS_L2P(ha,b)].io_cnt[i] = 0; ha 3349 drivers/scsi/gdth.c while (gdth_test_busy(ha)) ha 3351 drivers/scsi/gdth.c gdth_internal_cmd(ha, SCSIRAWSERVICE, GDT_RESET_BUS, ha 3352 drivers/scsi/gdth.c BUS_L2P(ha,b), 0, 0); ha 3354 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3362 drivers/scsi/gdth.c gdth_ha_str *ha = shost_priv(sdev->host); ha 3370 drivers/scsi/gdth.c TRACE2(("gdth_bios_param() ha %d bus %d target %d\n", ha->hanum, b, t)); ha 3372 drivers/scsi/gdth.c if (b != ha->virt_bus || ha->hdr[t].heads == 0) { ha 3377 drivers/scsi/gdth.c ip[0] = ha->hdr[t].heads; ha 3378 drivers/scsi/gdth.c ip[1] = ha->hdr[t].secs; ha 3391 drivers/scsi/gdth.c gdth_ha_str *ha = shost_priv(scp->device->host); ha 3396 drivers/scsi/gdth.c cmndinfo = gdth_get_cmndinfo(ha); ha 3403 drivers/scsi/gdth.c return __gdth_queuecommand(ha, scp, cmndinfo); ha 3408 drivers/scsi/gdth.c static int __gdth_queuecommand(gdth_ha_str *ha, struct scsi_cmnd *scp, ha 3420 drivers/scsi/gdth.c gdth_putq(ha, scp, cmndinfo->priority); ha 3421 drivers/scsi/gdth.c gdth_next(ha); ha 3428 drivers/scsi/gdth.c gdth_ha_str *ha; ha 3431 drivers/scsi/gdth.c list_for_each_entry(ha, &gdth_instances, list) { ha 3432 drivers/scsi/gdth.c if (!ha->sdev) ha 3433 drivers/scsi/gdth.c ha->sdev = scsi_get_host_dev(ha->shost); ha 3450 drivers/scsi/gdth.c gdth_ha_str *ha; ha 3455 drivers/scsi/gdth.c ha = gdth_find_ha(evt.ionode); ha 3456 drivers/scsi/gdth.c if (!ha) ha 3468 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3469 drivers/scsi/gdth.c gdth_store_event(ha, evt.event.event_source, evt.event.event_idx, ha 3471 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3475 drivers/scsi/gdth.c evt.handle = gdth_read_event(ha, evt.handle, &evt.event); ha 3477 drivers/scsi/gdth.c gdth_readapp_event(ha, evt.erase, &evt.event); ha 3489 drivers/scsi/gdth.c gdth_ha_str *ha; ha 3493 drivers/scsi/gdth.c ha = gdth_find_ha(ldrv.ionode); ha 3494 drivers/scsi/gdth.c if (!ha) ha 3499 drivers/scsi/gdth.c if (j >= MAX_HDRIVES || !ha->hdr[j].present) ha 3502 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3503 drivers/scsi/gdth.c ha->hdr[j].lock = 1; ha 3504 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3505 drivers/scsi/gdth.c gdth_wait_completion(ha, ha->bus_cnt, j); ha 3507 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3508 drivers/scsi/gdth.c ha->hdr[j].lock = 0; ha 3509 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3510 drivers/scsi/gdth.c gdth_next(ha); ha 3520 drivers/scsi/gdth.c gdth_ha_str *ha; ha 3526 drivers/scsi/gdth.c ha = gdth_find_ha(res.ionode); ha 3527 drivers/scsi/gdth.c if (!ha) ha 3530 drivers/scsi/gdth.c if (!ha->hdr[res.number].present) ha 3535 drivers/scsi/gdth.c if (ha->cache_feat & GDT_64BIT) ha 3540 drivers/scsi/gdth.c rval = __gdth_execute(ha->sdev, &cmd, cmnd, 30, NULL); ha 3550 drivers/scsi/gdth.c static void gdth_ioc_cacheservice(gdth_ha_str *ha, gdth_ioctl_general *gen, ha 3553 drivers/scsi/gdth.c if (ha->cache_feat & GDT_64BIT) { ha 3559 drivers/scsi/gdth.c if (ha->cache_feat & SCATTER_GATHER) { ha 3570 drivers/scsi/gdth.c if (ha->cache_feat & SCATTER_GATHER) { ha 3583 drivers/scsi/gdth.c static void gdth_ioc_scsiraw(gdth_ha_str *ha, gdth_ioctl_general *gen, ha 3586 drivers/scsi/gdth.c if (ha->raw_feat & GDT_64BIT) { ha 3601 drivers/scsi/gdth.c if (ha->raw_feat & SCATTER_GATHER) { ha 3614 drivers/scsi/gdth.c if (ha->raw_feat & SCATTER_GATHER) { ha 3632 drivers/scsi/gdth.c gdth_ha_str *ha; ha 3639 drivers/scsi/gdth.c ha = gdth_find_ha(gen.ionode); ha 3640 drivers/scsi/gdth.c if (!ha) ha 3651 drivers/scsi/gdth.c buf = dma_alloc_coherent(&ha->pdev->dev, ha 3665 drivers/scsi/gdth.c gdth_ioc_cacheservice(ha, &gen, paddr); ha 3667 drivers/scsi/gdth.c gdth_ioc_scsiraw(ha, &gen, paddr); ha 3672 drivers/scsi/gdth.c rval = __gdth_execute(ha->sdev, &gen.command, cmnd, gen.timeout, ha 3689 drivers/scsi/gdth.c dma_free_coherent(&ha->pdev->dev, gen.data_len + gen.sense_len, ha 3698 drivers/scsi/gdth.c gdth_ha_str *ha; ha 3709 drivers/scsi/gdth.c (NULL == (ha = gdth_find_ha(rsc->ionode)))) { ha 3716 drivers/scsi/gdth.c if (!ha->hdr[i].present) { ha 3720 drivers/scsi/gdth.c rsc->hdr_list[i].bus = ha->virt_bus; ha 3723 drivers/scsi/gdth.c rsc->hdr_list[i].cluster_type = ha->hdr[i].cluster_type; ha 3724 drivers/scsi/gdth.c if (ha->hdr[i].cluster_type & CLUSTER_DRIVE) { ha 3727 drivers/scsi/gdth.c if (ha->cache_feat & GDT_64BIT) ha 3731 drivers/scsi/gdth.c if (__gdth_execute(ha->sdev, cmd, cmnd, 30, &cluster_type) == S_OK) ha 3756 drivers/scsi/gdth.c gdth_ha_str *ha; ha 3764 drivers/scsi/gdth.c (NULL == (ha = gdth_find_ha(rsc->ionode)))) { ha 3773 drivers/scsi/gdth.c if (ha->cache_feat & GDT_64BIT) { ha 3781 drivers/scsi/gdth.c status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); ha 3792 drivers/scsi/gdth.c if (ha->cache_feat & GDT_64BIT) ha 3797 drivers/scsi/gdth.c status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); ha 3799 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3800 drivers/scsi/gdth.c rsc->hdr_list[i].bus = ha->virt_bus; ha 3804 drivers/scsi/gdth.c ha->hdr[i].present = FALSE; ha 3806 drivers/scsi/gdth.c ha->hdr[i].present = TRUE; ha 3807 drivers/scsi/gdth.c ha->hdr[i].size = info; ha 3809 drivers/scsi/gdth.c ha->hdr[i].size &= ~SECS32; ha 3810 drivers/scsi/gdth.c gdth_eval_mapping(ha->hdr[i].size,&cyls,&hds,&secs); ha 3811 drivers/scsi/gdth.c ha->hdr[i].heads = hds; ha 3812 drivers/scsi/gdth.c ha->hdr[i].secs = secs; ha 3814 drivers/scsi/gdth.c ha->hdr[i].size = cyls * hds * secs; ha 3816 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3826 drivers/scsi/gdth.c if (ha->cache_feat & GDT_64BIT) ha 3831 drivers/scsi/gdth.c status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); ha 3833 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3834 drivers/scsi/gdth.c ha->hdr[i].devtype = (status == S_OK ? (u16)info : 0); ha 3835 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3839 drivers/scsi/gdth.c if (ha->cache_feat & GDT_64BIT) ha 3844 drivers/scsi/gdth.c status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); ha 3846 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3847 drivers/scsi/gdth.c ha->hdr[i].cluster_type = ha 3849 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3850 drivers/scsi/gdth.c rsc->hdr_list[i].cluster_type = ha->hdr[i].cluster_type; ha 3854 drivers/scsi/gdth.c if (ha->cache_feat & GDT_64BIT) ha 3859 drivers/scsi/gdth.c status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); ha 3861 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3862 drivers/scsi/gdth.c ha->hdr[i].rw_attribs = (status == S_OK ? (u16)info : 0); ha 3863 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3879 drivers/scsi/gdth.c gdth_ha_str *ha; ha 3923 drivers/scsi/gdth.c (NULL == (ha = gdth_find_ha(ctrt.ionode)))) ha 3926 drivers/scsi/gdth.c if (ha->type != GDT_PCIMPR) { ha 3927 drivers/scsi/gdth.c ctrt.type = (u8)((ha->stype<<4) + 6); ha 3929 drivers/scsi/gdth.c ctrt.type = (ha->oem_id == OEM_ID_INTEL ? 0xfd : 0xfe); ha 3930 drivers/scsi/gdth.c if (ha->stype >= 0x300) ha 3931 drivers/scsi/gdth.c ctrt.ext_type = 0x6000 | ha->pdev->subsystem_device; ha 3933 drivers/scsi/gdth.c ctrt.ext_type = 0x6000 | ha->stype; ha 3935 drivers/scsi/gdth.c ctrt.device_id = ha->pdev->device; ha 3936 drivers/scsi/gdth.c ctrt.sub_device_id = ha->pdev->subsystem_device; ha 3937 drivers/scsi/gdth.c ctrt.info = ha->brd_phys; ha 3938 drivers/scsi/gdth.c ctrt.oem_id = ha->oem_id; ha 3959 drivers/scsi/gdth.c (NULL == (ha = gdth_find_ha(lchn.ionode)))) ha 3963 drivers/scsi/gdth.c if (i < ha->bus_cnt) { ha 3965 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3966 drivers/scsi/gdth.c ha->raw[i].lock = 1; ha 3967 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3968 drivers/scsi/gdth.c for (j = 0; j < ha->tid_cnt; ++j) ha 3969 drivers/scsi/gdth.c gdth_wait_completion(ha, i, j); ha 3971 drivers/scsi/gdth.c spin_lock_irqsave(&ha->smp_lock, flags); ha 3972 drivers/scsi/gdth.c ha->raw[i].lock = 0; ha 3973 drivers/scsi/gdth.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 3974 drivers/scsi/gdth.c for (j = 0; j < ha->tid_cnt; ++j) ha 3975 drivers/scsi/gdth.c gdth_next(ha); ha 3993 drivers/scsi/gdth.c (NULL == (ha = gdth_find_ha(res.ionode)))) ha 3999 drivers/scsi/gdth.c scp->device = ha->sdev; ha 4033 drivers/scsi/gdth.c static void gdth_flush(gdth_ha_str *ha) ha 4040 drivers/scsi/gdth.c TRACE2(("gdth_flush() hanum %d\n", ha->hanum)); ha 4043 drivers/scsi/gdth.c if (ha->hdr[i].present) { ha 4047 drivers/scsi/gdth.c if (ha->cache_feat & GDT_64BIT) { ha 4056 drivers/scsi/gdth.c TRACE2(("gdth_flush(): flush ha %d drive %d\n", ha->hanum, i)); ha 4058 drivers/scsi/gdth.c gdth_execute(ha->shost, &gdtcmd, cmnd, 30, NULL); ha 4093 drivers/scsi/gdth.c gdth_ha_str *ha; ha 4103 drivers/scsi/gdth.c ha = shost_priv(shp); ha 4106 drivers/scsi/gdth.c if (!gdth_init_pci(pdev, pcistr, ha)) ha 4113 drivers/scsi/gdth.c ha->irq); ha 4115 drivers/scsi/gdth.c error = request_irq(ha->irq, gdth_interrupt, ha 4116 drivers/scsi/gdth.c IRQF_SHARED, "gdth", ha); ha 4123 drivers/scsi/gdth.c shp->irq = ha->irq; ha 4126 drivers/scsi/gdth.c ha->hanum = gdth_ctr_count++; ha 4127 drivers/scsi/gdth.c ha->shost = shp; ha 4129 drivers/scsi/gdth.c ha->pccb = &ha->cmdext; ha 4130 drivers/scsi/gdth.c ha->ccb_phys = 0L; ha 4134 drivers/scsi/gdth.c ha->pscratch = dma_alloc_coherent(&ha->pdev->dev, GDTH_SCRATCH, ha 4136 drivers/scsi/gdth.c if (!ha->pscratch) ha 4138 drivers/scsi/gdth.c ha->scratch_phys = scratch_dma_handle; ha 4140 drivers/scsi/gdth.c ha->pmsg = dma_alloc_coherent(&ha->pdev->dev, sizeof(gdth_msg_str), ha 4142 drivers/scsi/gdth.c if (!ha->pmsg) ha 4144 drivers/scsi/gdth.c ha->msg_phys = scratch_dma_handle; ha 4146 drivers/scsi/gdth.c ha->scratch_busy = FALSE; ha 4147 drivers/scsi/gdth.c ha->req_first = NULL; ha 4148 drivers/scsi/gdth.c ha->tid_cnt = pdev->device >= 0x200 ? MAXID : MAX_HDRIVES; ha 4149 drivers/scsi/gdth.c if (max_ids > 0 && max_ids < ha->tid_cnt) ha 4150 drivers/scsi/gdth.c ha->tid_cnt = max_ids; ha 4152 drivers/scsi/gdth.c ha->cmd_tab[i].cmnd = UNUSED_CMND; ha 4153 drivers/scsi/gdth.c ha->scan_mode = rescan ? 0x10 : 0; ha 4156 drivers/scsi/gdth.c if (!gdth_search_drives(ha)) { ha 4157 drivers/scsi/gdth.c printk("GDT-PCI %d: Error during device scan\n", ha->hanum); ha 4161 drivers/scsi/gdth.c if (hdr_channel < 0 || hdr_channel > ha->bus_cnt) ha 4162 drivers/scsi/gdth.c hdr_channel = ha->bus_cnt; ha 4163 drivers/scsi/gdth.c ha->virt_bus = hdr_channel; ha 4166 drivers/scsi/gdth.c if (!(ha->cache_feat & ha->raw_feat & ha->screen_feat & GDT_64BIT) || ha 4167 drivers/scsi/gdth.c !ha->dma64_support) { ha 4170 drivers/scsi/gdth.c "Unable to set 32-bit DMA\n", ha->hanum); ha 4176 drivers/scsi/gdth.c printk("GDT-PCI %d: 64-bit DMA enabled\n", ha->hanum); ha 4179 drivers/scsi/gdth.c "Unable to set 64/32-bit DMA\n", ha->hanum); ha 4184 drivers/scsi/gdth.c shp->max_id = ha->tid_cnt; ha 4186 drivers/scsi/gdth.c shp->max_channel = ha->bus_cnt; ha 4188 drivers/scsi/gdth.c spin_lock_init(&ha->smp_lock); ha 4189 drivers/scsi/gdth.c gdth_enable_int(ha); ha 4194 drivers/scsi/gdth.c list_add_tail(&ha->list, &gdth_instances); ha 4196 drivers/scsi/gdth.c pci_set_drvdata(ha->pdev, ha); ha 4201 drivers/scsi/gdth.c *ha_out = ha; ha 4206 drivers/scsi/gdth.c dma_free_coherent(&ha->pdev->dev, sizeof(gdth_msg_str), ha 4207 drivers/scsi/gdth.c ha->pmsg, ha->msg_phys); ha 4209 drivers/scsi/gdth.c dma_free_coherent(&ha->pdev->dev, GDTH_SCRATCH, ha 4210 drivers/scsi/gdth.c ha->pscratch, ha->scratch_phys); ha 4212 drivers/scsi/gdth.c free_irq(ha->irq, ha); ha 4219 drivers/scsi/gdth.c static void gdth_remove_one(gdth_ha_str *ha) ha 4221 drivers/scsi/gdth.c struct Scsi_Host *shp = ha->shost; ha 4227 drivers/scsi/gdth.c gdth_flush(ha); ha 4229 drivers/scsi/gdth.c if (ha->sdev) { ha 4230 drivers/scsi/gdth.c scsi_free_host_dev(ha->sdev); ha 4231 drivers/scsi/gdth.c ha->sdev = NULL; ha 4235 drivers/scsi/gdth.c free_irq(shp->irq,ha); ha 4237 drivers/scsi/gdth.c if (ha->pscratch) ha 4238 drivers/scsi/gdth.c dma_free_coherent(&ha->pdev->dev, GDTH_SCRATCH, ha 4239 drivers/scsi/gdth.c ha->pscratch, ha->scratch_phys); ha 4240 drivers/scsi/gdth.c if (ha->pmsg) ha 4241 drivers/scsi/gdth.c dma_free_coherent(&ha->pdev->dev, sizeof(gdth_msg_str), ha 4242 drivers/scsi/gdth.c ha->pmsg, ha->msg_phys); ha 4243 drivers/scsi/gdth.c if (ha->ccb_phys) ha 4244 drivers/scsi/gdth.c dma_unmap_single(&ha->pdev->dev, ha->ccb_phys, ha 4252 drivers/scsi/gdth.c gdth_ha_str *ha; ha 4258 drivers/scsi/gdth.c list_for_each_entry(ha, &gdth_instances, list) ha 4259 drivers/scsi/gdth.c gdth_flush(ha); ha 4286 drivers/scsi/gdth.c gdth_ha_str *ha; ha 4288 drivers/scsi/gdth.c list_for_each_entry(ha, &gdth_instances, list) ha 4289 drivers/scsi/gdth.c gdth_remove_one(ha); ha 4303 drivers/scsi/gdth.c gdth_ha_str *ha; ha 4314 drivers/scsi/gdth.c list_for_each_entry(ha, &gdth_instances, list) ha 4315 drivers/scsi/gdth.c gdth_remove_one(ha); ha 11 drivers/scsi/gdth_proc.c gdth_ha_str *ha = shost_priv(host); ha 14 drivers/scsi/gdth_proc.c TRACE2(("gdth_set_info() ha %d\n",ha->hanum,)); ha 20 drivers/scsi/gdth_proc.c ret_val = gdth_set_asc_info(host, buffer, length, ha); ha 28 drivers/scsi/gdth_proc.c int length, gdth_ha_str *ha) ha 39 drivers/scsi/gdth_proc.c TRACE2(("gdth_set_asc_info() ha %d\n",ha->hanum)); ha 60 drivers/scsi/gdth_proc.c if (ha->hdr[i].present) { ha 66 drivers/scsi/gdth_proc.c if (ha->cache_feat & GDT_64BIT) { ha 98 drivers/scsi/gdth_proc.c if (ha->cache_feat & GDT_WR_THROUGH) { ha 119 drivers/scsi/gdth_proc.c spin_lock_irqsave(&ha->smp_lock, flags); ha 120 drivers/scsi/gdth_proc.c if (ha->scratch_busy) { ha 121 drivers/scsi/gdth_proc.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 124 drivers/scsi/gdth_proc.c ha->scratch_busy = TRUE; ha 125 drivers/scsi/gdth_proc.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 127 drivers/scsi/gdth_proc.c pcpar = (gdth_cpar_str *)ha->pscratch; ha 128 drivers/scsi/gdth_proc.c memcpy( pcpar, &ha->cpar, sizeof(gdth_cpar_str) ); ha 131 drivers/scsi/gdth_proc.c gdtcmd.u.ioctl.p_param = ha->scratch_phys; ha 139 drivers/scsi/gdth_proc.c spin_lock_irqsave(&ha->smp_lock, flags); ha 140 drivers/scsi/gdth_proc.c ha->scratch_busy = FALSE; ha 141 drivers/scsi/gdth_proc.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 153 drivers/scsi/gdth_proc.c gdth_ha_str *ha = shost_priv(host); ha 182 drivers/scsi/gdth_proc.c TRACE2(("gdth_get_info() ha %d\n",ha->hanum)); ha 210 drivers/scsi/gdth_proc.c ha->hanum, ha->binfo.type_string); ha 215 drivers/scsi/gdth_proc.c if (ha->more_proc) ha 217 drivers/scsi/gdth_proc.c (u8)(ha->binfo.upd_fw_ver>>24), ha 218 drivers/scsi/gdth_proc.c (u8)(ha->binfo.upd_fw_ver>>16), ha 219 drivers/scsi/gdth_proc.c (u8)(ha->binfo.upd_fw_ver), ha 220 drivers/scsi/gdth_proc.c ha->bfeat.raid ? 'R':'N', ha 221 drivers/scsi/gdth_proc.c ha->binfo.upd_revision); ha 223 drivers/scsi/gdth_proc.c seq_printf(m, "%d.%02d\n", (u8)(ha->cpar.version>>8), ha 224 drivers/scsi/gdth_proc.c (u8)(ha->cpar.version)); ha 226 drivers/scsi/gdth_proc.c if (ha->more_proc) ha 230 drivers/scsi/gdth_proc.c ha->binfo.ser_no, ha->binfo.memsize / 1024); ha 232 drivers/scsi/gdth_proc.c if (ha->more_proc) { ha 239 drivers/scsi/gdth_proc.c buf = dma_alloc_coherent(&ha->pdev->dev, size, &paddr, GFP_KERNEL); ha 242 drivers/scsi/gdth_proc.c for (i = 0; i < ha->bus_cnt; ++i) { ha 251 drivers/scsi/gdth_proc.c gdtcmd->u.ioctl.channel = ha->raw[i].address | INVALID_CHANNEL; ha 252 drivers/scsi/gdth_proc.c pds->bid = ha->raw[i].local_no; ha 254 drivers/scsi/gdth_proc.c pds->entries = ha->raw[i].pdev_cnt; ha 264 drivers/scsi/gdth_proc.c for (j = 0; j < ha->raw[i].pdev_cnt; ++j) { ha 267 drivers/scsi/gdth_proc.c i, ha->raw[i].id_list[j])); ha 275 drivers/scsi/gdth_proc.c ha->raw[i].address | ha->raw[i].id_list[j]; ha 313 drivers/scsi/gdth_proc.c i, ha->raw[i].id_list[j])); ha 321 drivers/scsi/gdth_proc.c ha->raw[i].address | ha->raw[i].id_list[j]; ha 341 drivers/scsi/gdth_proc.c if (!ha->hdr[i].is_logdrv) ha 406 drivers/scsi/gdth_proc.c if (!ha->hdr[i].is_arraydrv) ha 409 drivers/scsi/gdth_proc.c sprintf(hrec, "%d", ha->hdr[i].master_no); ha 422 drivers/scsi/gdth_proc.c if (!(ha->hdr[i].is_arraydrv && ha->hdr[i].is_master)) ha 478 drivers/scsi/gdth_proc.c if (!ha->hdr[i].is_logdrv || ha 479 drivers/scsi/gdth_proc.c (ha->hdr[i].is_arraydrv && !ha->hdr[i].is_master)) ha 493 drivers/scsi/gdth_proc.c ha->hdr[i].ldr_no = i; ha 494 drivers/scsi/gdth_proc.c ha->hdr[i].rw_attribs = 0; ha 495 drivers/scsi/gdth_proc.c ha->hdr[i].start_sec = 0; ha 501 drivers/scsi/gdth_proc.c ha->hdr[k].ldr_no = phg->entry[j].log_drive; ha 502 drivers/scsi/gdth_proc.c ha->hdr[k].rw_attribs = phg->entry[j].rw_attribs; ha 503 drivers/scsi/gdth_proc.c ha->hdr[k].start_sec = phg->entry[j].start_sec; ha 507 drivers/scsi/gdth_proc.c dma_free_coherent(&ha->pdev->dev, size, buf, paddr); ha 510 drivers/scsi/gdth_proc.c if (!(ha->hdr[i].present)) ha 515 drivers/scsi/gdth_proc.c i, ha->hdr[i].ldr_no); ha 520 drivers/scsi/gdth_proc.c (u32)(ha->hdr[i].size/2048), ha->hdr[i].start_sec); ha 531 drivers/scsi/gdth_proc.c id = gdth_read_event(ha, id, estr); ha 534 drivers/scsi/gdth_proc.c if (estr->event_data.eu.driver.ionode == ha->hanum && ha 560 drivers/scsi/gdth_proc.c static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id) ha 568 drivers/scsi/gdth_proc.c spin_lock_irqsave(&ha->smp_lock, flags); ha 571 drivers/scsi/gdth_proc.c scp = ha->cmd_tab[i].cmnd; ha 579 drivers/scsi/gdth_proc.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 582 drivers/scsi/gdth_proc.c spin_lock_irqsave(&ha->smp_lock, flags); ha 585 drivers/scsi/gdth_proc.c spin_unlock_irqrestore(&ha->smp_lock, flags); ha 13 drivers/scsi/gdth_proc.h int length, gdth_ha_str *ha); ha 15 drivers/scsi/gdth_proc.h static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id); ha 139 drivers/scsi/hisi_sas/hisi_sas_main.c return device->port->ha->lldd_ha; ha 936 drivers/scsi/hisi_sas/hisi_sas_main.c sas_phy->ha = (struct sas_ha_struct *)hisi_hba->shost->hostdata; ha 973 drivers/scsi/hisi_sas/hisi_sas_main.c struct sas_ha_struct *sas_ha = sas_phy->ha; ha 1120 drivers/scsi/hisi_sas/hisi_sas_main.c struct sas_ha_struct *sas_ha = sas_phy->ha; ha 842 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = device->port->ha->lldd_ha; ha 2324 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct sas_ha_struct *ha; ha 2339 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c ha = device->port->ha; ha 2467 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (test_bit(SAS_HA_FROZEN, &ha->state)) { ha 2147 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct sas_ha_struct *ha; ha 2162 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c ha = device->port->ha; ha 2278 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (test_bit(SAS_HA_FROZEN, &ha->state)) { ha 275 drivers/scsi/ips.c static void ips_free_flash_copperhead(ips_ha_t * ha); ha 326 drivers/scsi/ips.c static int ips_abort_init(ips_ha_t * ha, int index); ha 332 drivers/scsi/ips.c static int ips_poll_for_flush_complete(ips_ha_t * ha); ha 333 drivers/scsi/ips.c static void ips_flush_and_reset(ips_ha_t *ha); ha 578 drivers/scsi/ips.c ips_setup_funclist(ips_ha_t * ha) ha 584 drivers/scsi/ips.c if (IPS_IS_MORPHEUS(ha) || IPS_IS_MARCO(ha)) { ha 586 drivers/scsi/ips.c ha->func.isintr = ips_isintr_morpheus; ha 587 drivers/scsi/ips.c ha->func.isinit = ips_isinit_morpheus; ha 588 drivers/scsi/ips.c ha->func.issue = ips_issue_i2o_memio; ha 589 drivers/scsi/ips.c ha->func.init = ips_init_morpheus; ha 590 drivers/scsi/ips.c ha->func.statupd = ips_statupd_morpheus; ha 591 drivers/scsi/ips.c ha->func.reset = ips_reset_morpheus; ha 592 drivers/scsi/ips.c ha->func.intr = ips_intr_morpheus; ha 593 drivers/scsi/ips.c ha->func.enableint = ips_enable_int_morpheus; ha 594 drivers/scsi/ips.c } else if (IPS_USE_MEMIO(ha)) { ha 596 drivers/scsi/ips.c ha->func.isintr = ips_isintr_copperhead_memio; ha 597 drivers/scsi/ips.c ha->func.isinit = ips_isinit_copperhead_memio; ha 598 drivers/scsi/ips.c ha->func.init = ips_init_copperhead_memio; ha 599 drivers/scsi/ips.c ha->func.statupd = ips_statupd_copperhead_memio; ha 600 drivers/scsi/ips.c ha->func.statinit = ips_statinit_memio; ha 601 drivers/scsi/ips.c ha->func.reset = ips_reset_copperhead_memio; ha 602 drivers/scsi/ips.c ha->func.intr = ips_intr_copperhead; ha 603 drivers/scsi/ips.c ha->func.erasebios = ips_erase_bios_memio; ha 604 drivers/scsi/ips.c ha->func.programbios = ips_program_bios_memio; ha 605 drivers/scsi/ips.c ha->func.verifybios = ips_verify_bios_memio; ha 606 drivers/scsi/ips.c ha->func.enableint = ips_enable_int_copperhead_memio; ha 607 drivers/scsi/ips.c if (IPS_USE_I2O_DELIVER(ha)) ha 608 drivers/scsi/ips.c ha->func.issue = ips_issue_i2o_memio; ha 610 drivers/scsi/ips.c ha->func.issue = ips_issue_copperhead_memio; ha 613 drivers/scsi/ips.c ha->func.isintr = ips_isintr_copperhead; ha 614 drivers/scsi/ips.c ha->func.isinit = ips_isinit_copperhead; ha 615 drivers/scsi/ips.c ha->func.init = ips_init_copperhead; ha 616 drivers/scsi/ips.c ha->func.statupd = ips_statupd_copperhead; ha 617 drivers/scsi/ips.c ha->func.statinit = ips_statinit; ha 618 drivers/scsi/ips.c ha->func.reset = ips_reset_copperhead; ha 619 drivers/scsi/ips.c ha->func.intr = ips_intr_copperhead; ha 620 drivers/scsi/ips.c ha->func.erasebios = ips_erase_bios; ha 621 drivers/scsi/ips.c ha->func.programbios = ips_program_bios; ha 622 drivers/scsi/ips.c ha->func.verifybios = ips_verify_bios; ha 623 drivers/scsi/ips.c ha->func.enableint = ips_enable_int_copperhead; ha 625 drivers/scsi/ips.c if (IPS_USE_I2O_DELIVER(ha)) ha 626 drivers/scsi/ips.c ha->func.issue = ips_issue_i2o; ha 628 drivers/scsi/ips.c ha->func.issue = ips_issue_copperhead; ha 645 drivers/scsi/ips.c ips_ha_t *ha; ha 661 drivers/scsi/ips.c ha = IPS_HA(sh); ha 663 drivers/scsi/ips.c if (!ha) ha 667 drivers/scsi/ips.c scb = &ha->scbs[ha->max_cmds - 1]; ha 669 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 675 drivers/scsi/ips.c scb->cmd.flush_cache.command_id = IPS_COMMAND_ID(ha, scb); ha 682 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, "Flushing Cache.\n"); ha 685 drivers/scsi/ips.c if (ips_send_wait(ha, scb, ips_cmd_timeout, IPS_INTR_ON) == IPS_FAILURE) ha 686 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, "Incomplete Flush.\n"); ha 688 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, "Flushing Complete.\n"); ha 694 drivers/scsi/ips.c ips_free(ha); ha 697 drivers/scsi/ips.c free_irq(ha->pcidev->irq, ha); ha 719 drivers/scsi/ips.c ips_ha_t *ha; ha 727 drivers/scsi/ips.c ha = (ips_ha_t *) ips_ha[i]; ha 729 drivers/scsi/ips.c if (!ha) ha 732 drivers/scsi/ips.c if (!ha->active) ha 736 drivers/scsi/ips.c scb = &ha->scbs[ha->max_cmds - 1]; ha 738 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 744 drivers/scsi/ips.c scb->cmd.flush_cache.command_id = IPS_COMMAND_ID(ha, scb); ha 751 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, "Flushing Cache.\n"); ha 754 drivers/scsi/ips.c if (ips_send_wait(ha, scb, ips_cmd_timeout, IPS_INTR_ON) == ha 756 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 759 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 777 drivers/scsi/ips.c ips_ha_t *ha; ha 788 drivers/scsi/ips.c ha = (ips_ha_t *) SC->device->host->hostdata; ha 790 drivers/scsi/ips.c if (!ha) ha 793 drivers/scsi/ips.c if (!ha->active) ha 799 drivers/scsi/ips.c item = ha->copp_waitlist.head; ha 805 drivers/scsi/ips.c ips_removeq_copp(&ha->copp_waitlist, item); ha 809 drivers/scsi/ips.c } else if (ips_removeq_wait(&ha->scb_waitlist, SC)) { ha 836 drivers/scsi/ips.c ips_ha_t *ha; ha 852 drivers/scsi/ips.c ha = (ips_ha_t *) SC->device->host->hostdata; ha 854 drivers/scsi/ips.c if (!ha) { ha 860 drivers/scsi/ips.c if (!ha->active) ha 864 drivers/scsi/ips.c item = ha->copp_waitlist.head; ha 870 drivers/scsi/ips.c ips_removeq_copp(&ha->copp_waitlist, item); ha 875 drivers/scsi/ips.c if (ips_removeq_wait(&ha->scb_waitlist, SC)) { ha 890 drivers/scsi/ips.c if (ha->ioctl_reset == 0) { /* IF Not an IOCTL Requested Reset */ ha 891 drivers/scsi/ips.c scb = &ha->scbs[ha->max_cmds - 1]; ha 893 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 899 drivers/scsi/ips.c scb->cmd.flush_cache.command_id = IPS_COMMAND_ID(ha, scb); ha 907 drivers/scsi/ips.c ret = ips_send_wait(ha, scb, ips_cmd_timeout, IPS_INTR_IORL); ha 909 drivers/scsi/ips.c IPS_PRINTK(KERN_NOTICE, ha->pcidev, ha 918 drivers/scsi/ips.c ha->ioctl_reset = 0; /* Reset the IOCTL Requested Reset Flag */ ha 924 drivers/scsi/ips.c IPS_PRINTK(KERN_NOTICE, ha->pcidev, "Resetting controller.\n"); ha 925 drivers/scsi/ips.c ret = (*ha->func.reset) (ha); ha 930 drivers/scsi/ips.c IPS_PRINTK(KERN_NOTICE, ha->pcidev, ha 935 drivers/scsi/ips.c ips_name, ha->host_num); ha 937 drivers/scsi/ips.c while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { ha 940 drivers/scsi/ips.c ips_freescb(ha, scb); ha 945 drivers/scsi/ips.c ips_name, ha->host_num); ha 947 drivers/scsi/ips.c while ((scsi_cmd = ips_removeq_wait_head(&ha->scb_waitlist))) { ha 952 drivers/scsi/ips.c ha->active = FALSE; ha 956 drivers/scsi/ips.c if (!ips_clear_adapter(ha, IPS_INTR_IORL)) { ha 959 drivers/scsi/ips.c IPS_PRINTK(KERN_NOTICE, ha->pcidev, ha 964 drivers/scsi/ips.c ips_name, ha->host_num); ha 966 drivers/scsi/ips.c while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { ha 969 drivers/scsi/ips.c ips_freescb(ha, scb); ha 974 drivers/scsi/ips.c ips_name, ha->host_num); ha 976 drivers/scsi/ips.c while ((scsi_cmd = ips_removeq_wait_head(&ha->scb_waitlist))) { ha 981 drivers/scsi/ips.c ha->active = FALSE; ha 986 drivers/scsi/ips.c if (le32_to_cpu(ha->subsys->param[3]) & 0x300000) { ha 987 drivers/scsi/ips.c ha->last_ffdc = ktime_get_real_seconds(); ha 988 drivers/scsi/ips.c ha->reset_count++; ha 989 drivers/scsi/ips.c ips_ffdc_reset(ha, IPS_INTR_IORL); ha 993 drivers/scsi/ips.c DEBUG_VAR(1, "(%s%d) Failing active commands", ips_name, ha->host_num); ha 995 drivers/scsi/ips.c while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { ha 998 drivers/scsi/ips.c ips_freescb(ha, scb); ha 1002 drivers/scsi/ips.c for (i = 1; i < ha->nbus; i++) ha 1003 drivers/scsi/ips.c ha->dcdb_active[i - 1] = 0; ha 1006 drivers/scsi/ips.c ha->num_ioctl = 0; ha 1008 drivers/scsi/ips.c ips_next(ha, IPS_INTR_IORL); ha 1040 drivers/scsi/ips.c ips_ha_t *ha; ha 1045 drivers/scsi/ips.c ha = (ips_ha_t *) SC->device->host->hostdata; ha 1047 drivers/scsi/ips.c if (!ha) ha 1050 drivers/scsi/ips.c if (!ha->active) ha 1054 drivers/scsi/ips.c if (ha->copp_waitlist.count == IPS_MAX_IOCTL_QUEUE) { ha 1060 drivers/scsi/ips.c } else if (ha->scb_waitlist.count == IPS_MAX_QUEUE) { ha 1071 drivers/scsi/ips.c ha->host_num, ha 1077 drivers/scsi/ips.c && (scmd_id(SC) == ha->ha_id[scmd_channel(SC)])) { ha 1094 drivers/scsi/ips.c if (ha->scb_activelist.count != 0) { ha 1099 drivers/scsi/ips.c ha->ioctl_reset = 1; /* This reset request is from an IOCTL */ ha 1119 drivers/scsi/ips.c ips_putq_copp_tail(&ha->copp_waitlist, scratch); ha 1121 drivers/scsi/ips.c ips_putq_wait_tail(&ha->scb_waitlist, SC); ha 1124 drivers/scsi/ips.c ips_next(ha, IPS_INTR_IORL); ha 1143 drivers/scsi/ips.c ips_ha_t *ha = (ips_ha_t *) sdev->host->hostdata; ha 1150 drivers/scsi/ips.c if (!ha) ha 1154 drivers/scsi/ips.c if (!ha->active) ha 1157 drivers/scsi/ips.c if (!ips_read_adapter_status(ha, IPS_INTR_ON)) ha 1161 drivers/scsi/ips.c if ((capacity > 0x400000) && ((ha->enq->ucMiscFlag & 0x8) == 0)) { ha 1193 drivers/scsi/ips.c ips_ha_t *ha; ha 1196 drivers/scsi/ips.c ha = IPS_HA(SDptr->host); ha 1198 drivers/scsi/ips.c min = ha->max_cmds / 2; ha 1199 drivers/scsi/ips.c if (ha->enq->ucLogDriveCount <= 2) ha 1200 drivers/scsi/ips.c min = ha->max_cmds - 1; ha 1221 drivers/scsi/ips.c ips_ha_t *ha; ha 1227 drivers/scsi/ips.c ha = (ips_ha_t *) dev_id; ha 1228 drivers/scsi/ips.c if (!ha) ha 1230 drivers/scsi/ips.c host = ips_sh[ha->host_num]; ha 1233 drivers/scsi/ips.c (*ha->func.intr) (ha); ha 1239 drivers/scsi/ips.c if (!ha->active) { ha 1244 drivers/scsi/ips.c irqstatus = (*ha->func.intr) (ha); ha 1249 drivers/scsi/ips.c ips_next(ha, IPS_INTR_ON); ha 1265 drivers/scsi/ips.c ips_intr_copperhead(ips_ha_t * ha) ha 1274 drivers/scsi/ips.c if (!ha) ha 1277 drivers/scsi/ips.c if (!ha->active) ha 1280 drivers/scsi/ips.c intrstatus = (*ha->func.isintr) (ha); ha 1291 drivers/scsi/ips.c sp = &ha->sp; ha 1293 drivers/scsi/ips.c intrstatus = (*ha->func.isintr) (ha); ha 1298 drivers/scsi/ips.c cstatus.value = (*ha->func.statupd) (ha); ha 1305 drivers/scsi/ips.c ips_chkstatus(ha, &cstatus); ha 1312 drivers/scsi/ips.c (*scb->callback) (ha, scb); ha 1329 drivers/scsi/ips.c ips_intr_morpheus(ips_ha_t * ha) ha 1338 drivers/scsi/ips.c if (!ha) ha 1341 drivers/scsi/ips.c if (!ha->active) ha 1344 drivers/scsi/ips.c intrstatus = (*ha->func.isintr) (ha); ha 1355 drivers/scsi/ips.c sp = &ha->sp; ha 1357 drivers/scsi/ips.c intrstatus = (*ha->func.isintr) (ha); ha 1362 drivers/scsi/ips.c cstatus.value = (*ha->func.statupd) (ha); ha 1369 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 1375 drivers/scsi/ips.c ips_chkstatus(ha, &cstatus); ha 1382 drivers/scsi/ips.c (*scb->callback) (ha, scb); ha 1401 drivers/scsi/ips.c ips_ha_t *ha; ha 1405 drivers/scsi/ips.c ha = IPS_HA(SH); ha 1407 drivers/scsi/ips.c if (!ha) ha 1416 drivers/scsi/ips.c if (ha->ad_type > 0 && ha->ad_type <= MAX_ADAPTER_NAME) { ha 1418 drivers/scsi/ips.c strcat(bp, ips_adapter_name[ha->ad_type - 1]); ha 1429 drivers/scsi/ips.c ips_ha_t *ha = NULL; ha 1435 drivers/scsi/ips.c ha = (ips_ha_t *) ips_sh[i]->hostdata; ha 1441 drivers/scsi/ips.c if (!ha) ha 1451 drivers/scsi/ips.c ips_ha_t *ha = NULL; ha 1457 drivers/scsi/ips.c ha = (ips_ha_t *) ips_sh[i]->hostdata; ha 1463 drivers/scsi/ips.c if (!ha) ha 1466 drivers/scsi/ips.c return ips_host_info(ha, m); ha 1523 drivers/scsi/ips.c ips_alloc_passthru_buffer(ips_ha_t * ha, int length) ha 1528 drivers/scsi/ips.c if (ha->ioctl_data && length <= ha->ioctl_len) ha 1531 drivers/scsi/ips.c bigger_buf = dma_alloc_coherent(&ha->pcidev->dev, length, &dma_busaddr, ha 1535 drivers/scsi/ips.c dma_free_coherent(&ha->pcidev->dev, ha->ioctl_len, ha 1536 drivers/scsi/ips.c ha->ioctl_data, ha->ioctl_busaddr); ha 1538 drivers/scsi/ips.c ha->ioctl_data = (char *) bigger_buf; ha 1539 drivers/scsi/ips.c ha->ioctl_len = length; ha 1540 drivers/scsi/ips.c ha->ioctl_busaddr = dma_busaddr; ha 1557 drivers/scsi/ips.c ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, ips_scb_t *scb, int intr) ha 1572 drivers/scsi/ips.c ips_name, ha->host_num); ha 1575 drivers/scsi/ips.c if (ips_alloc_passthru_buffer(ha, length)) { ha 1578 drivers/scsi/ips.c if (ha->ioctl_data) { ha 1579 drivers/scsi/ips.c pt = (ips_passthru_t *) ha->ioctl_data; ha 1587 drivers/scsi/ips.c ha->ioctl_datasize = length; ha 1589 drivers/scsi/ips.c ips_scmd_buf_read(SC, ha->ioctl_data, ha->ioctl_datasize); ha 1590 drivers/scsi/ips.c pt = (ips_passthru_t *) ha->ioctl_data; ha 1604 drivers/scsi/ips.c memcpy(ha->ioctl_data + sizeof (ips_passthru_t), ha 1606 drivers/scsi/ips.c ips_scmd_buf_write(SC, ha->ioctl_data, ha 1619 drivers/scsi/ips.c ips_name, ha->host_num); ha 1624 drivers/scsi/ips.c if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD && ha 1627 drivers/scsi/ips.c ret = ips_flash_copperhead(ha, pt, scb); ha 1628 drivers/scsi/ips.c ips_scmd_buf_write(SC, ha->ioctl_data, ha 1632 drivers/scsi/ips.c if (ips_usrcmd(ha, pt, scb)) ha 1651 drivers/scsi/ips.c ips_flash_copperhead(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) ha 1657 drivers/scsi/ips.c if (IPS_IS_TROMBONE(ha) && pt->CoppCP.cmd.flashfw.type == IPS_FW_IMAGE) { ha 1658 drivers/scsi/ips.c if (ips_usrcmd(ha, pt, scb)) ha 1671 drivers/scsi/ips.c return ips_flash_bios(ha, pt, scb); ha 1674 drivers/scsi/ips.c ha->flash_data = ips_FlashData; ha 1675 drivers/scsi/ips.c ha->flash_busaddr = ips_flashbusaddr; ha 1676 drivers/scsi/ips.c ha->flash_len = PAGE_SIZE << 7; ha 1677 drivers/scsi/ips.c ha->flash_datasize = 0; ha 1678 drivers/scsi/ips.c } else if (!ha->flash_data) { ha 1681 drivers/scsi/ips.c ha->flash_data = dma_alloc_coherent(&ha->pcidev->dev, ha 1682 drivers/scsi/ips.c datasize, &ha->flash_busaddr, GFP_KERNEL); ha 1683 drivers/scsi/ips.c if (!ha->flash_data){ ha 1687 drivers/scsi/ips.c ha->flash_datasize = 0; ha 1688 drivers/scsi/ips.c ha->flash_len = datasize; ha 1692 drivers/scsi/ips.c if (pt->CoppCP.cmd.flashfw.count + ha->flash_datasize > ha 1693 drivers/scsi/ips.c ha->flash_len) { ha 1694 drivers/scsi/ips.c ips_free_flash_copperhead(ha); ha 1695 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 1700 drivers/scsi/ips.c if (!ha->flash_data) ha 1703 drivers/scsi/ips.c memcpy(&ha->flash_data[ha->flash_datasize], pt + 1, ha 1705 drivers/scsi/ips.c ha->flash_datasize += pt->CoppCP.cmd.flashfw.count; ha 1709 drivers/scsi/ips.c return ips_flash_bios(ha, pt, scb); ha 1711 drivers/scsi/ips.c return ips_flash_firmware(ha, pt, scb); ha 1722 drivers/scsi/ips.c ips_flash_bios(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) ha 1727 drivers/scsi/ips.c if ((!ha->func.programbios) || (!ha->func.erasebios) || ha 1728 drivers/scsi/ips.c (!ha->func.verifybios)) ha 1730 drivers/scsi/ips.c if ((*ha->func.erasebios) (ha)) { ha 1733 drivers/scsi/ips.c ips_name, ha->host_num); ha 1736 drivers/scsi/ips.c if ((*ha->func.programbios) (ha, ha 1737 drivers/scsi/ips.c ha->flash_data + ha 1739 drivers/scsi/ips.c ha->flash_datasize - ha 1743 drivers/scsi/ips.c ips_name, ha->host_num); ha 1746 drivers/scsi/ips.c if ((*ha->func.verifybios) (ha, ha 1747 drivers/scsi/ips.c ha->flash_data + ha 1749 drivers/scsi/ips.c ha->flash_datasize - ha 1753 drivers/scsi/ips.c ips_name, ha->host_num); ha 1756 drivers/scsi/ips.c ips_free_flash_copperhead(ha); ha 1760 drivers/scsi/ips.c if (!ha->func.erasebios) ha 1762 drivers/scsi/ips.c if ((*ha->func.erasebios) (ha)) { ha 1765 drivers/scsi/ips.c ips_name, ha->host_num); ha 1773 drivers/scsi/ips.c ips_free_flash_copperhead(ha); ha 1786 drivers/scsi/ips.c ips_fill_scb_sg_single(ips_ha_t * ha, dma_addr_t busaddr, ha 1792 drivers/scsi/ips.c if ((scb->data_len + e_len) > ha->max_xfer) { ha 1793 drivers/scsi/ips.c e_len = ha->max_xfer - scb->data_len; ha 1801 drivers/scsi/ips.c if (IPS_USE_ENH_SGLIST(ha)) { ha 1824 drivers/scsi/ips.c ips_flash_firmware(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) ha 1833 drivers/scsi/ips.c pt->CoppCP.cmd.flashfw.count = cpu_to_le32(ha->flash_datasize); ha 1837 drivers/scsi/ips.c ips_free_flash_copperhead(ha); ha 1858 drivers/scsi/ips.c scb->data_len = ha->flash_datasize; ha 1860 drivers/scsi/ips.c dma_map_single(&ha->pcidev->dev, ha->flash_data, scb->data_len, ha 1863 drivers/scsi/ips.c scb->cmd.flashfw.command_id = IPS_COMMAND_ID(ha, scb); ha 1877 drivers/scsi/ips.c ips_free_flash_copperhead(ips_ha_t * ha) ha 1879 drivers/scsi/ips.c if (ha->flash_data == ips_FlashData) ha 1881 drivers/scsi/ips.c else if (ha->flash_data) ha 1882 drivers/scsi/ips.c dma_free_coherent(&ha->pcidev->dev, ha->flash_len, ha 1883 drivers/scsi/ips.c ha->flash_data, ha->flash_busaddr); ha 1884 drivers/scsi/ips.c ha->flash_data = NULL; ha 1897 drivers/scsi/ips.c ips_usrcmd(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) ha 1904 drivers/scsi/ips.c if ((!scb) || (!pt) || (!ha)) ha 1926 drivers/scsi/ips.c scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); ha 1936 drivers/scsi/ips.c scb->data_busaddr = ha->ioctl_busaddr + sizeof (ips_passthru_t); ha 1985 drivers/scsi/ips.c ips_cleanup_passthru(ips_ha_t * ha, ips_scb_t * scb) ha 1993 drivers/scsi/ips.c ips_name, ha->host_num); ha 1997 drivers/scsi/ips.c pt = (ips_passthru_t *) ha->ioctl_data; ha 2005 drivers/scsi/ips.c pt->AdapterType = ha->ad_type; ha 2007 drivers/scsi/ips.c if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD && ha 2010 drivers/scsi/ips.c ips_free_flash_copperhead(ha); ha 2012 drivers/scsi/ips.c ips_scmd_buf_write(scb->scsi_cmd, ha->ioctl_data, ha->ioctl_datasize); ha 2025 drivers/scsi/ips.c ips_host_info(ips_ha_t *ha, struct seq_file *m) ha 2031 drivers/scsi/ips.c if ((le32_to_cpu(ha->nvram->signature) == IPS_NVRAM_P5_SIG) && ha 2032 drivers/scsi/ips.c (le16_to_cpu(ha->nvram->adapter_type) != 0)) ha 2034 drivers/scsi/ips.c ips_adapter_name[ha->ad_type - 1]); ha 2038 drivers/scsi/ips.c if (ha->io_addr) ha 2041 drivers/scsi/ips.c ha->io_addr, ha->io_len); ha 2043 drivers/scsi/ips.c if (ha->mem_addr) { ha 2046 drivers/scsi/ips.c ha->mem_addr, ha->mem_len); ha 2049 drivers/scsi/ips.c (unsigned long)ha->mem_ptr); ha 2052 drivers/scsi/ips.c seq_printf(m, "\tIRQ number : %d\n", ha->pcidev->irq); ha 2057 drivers/scsi/ips.c if (le32_to_cpu(ha->nvram->signature) == IPS_NVRAM_P5_SIG) { ha 2058 drivers/scsi/ips.c if (ha->nvram->bios_low[3] == 0) { ha 2061 drivers/scsi/ips.c ha->nvram->bios_high[0], ha->nvram->bios_high[1], ha 2062 drivers/scsi/ips.c ha->nvram->bios_high[2], ha->nvram->bios_high[3], ha 2063 drivers/scsi/ips.c ha->nvram->bios_low[0], ha->nvram->bios_low[1], ha 2064 drivers/scsi/ips.c ha->nvram->bios_low[2]); ha 2069 drivers/scsi/ips.c ha->nvram->bios_high[0], ha->nvram->bios_high[1], ha 2070 drivers/scsi/ips.c ha->nvram->bios_high[2], ha->nvram->bios_high[3], ha 2071 drivers/scsi/ips.c ha->nvram->bios_low[0], ha->nvram->bios_low[1], ha 2072 drivers/scsi/ips.c ha->nvram->bios_low[2], ha->nvram->bios_low[3]); ha 2077 drivers/scsi/ips.c if (ha->enq->CodeBlkVersion[7] == 0) { ha 2080 drivers/scsi/ips.c ha->enq->CodeBlkVersion[0], ha->enq->CodeBlkVersion[1], ha 2081 drivers/scsi/ips.c ha->enq->CodeBlkVersion[2], ha->enq->CodeBlkVersion[3], ha 2082 drivers/scsi/ips.c ha->enq->CodeBlkVersion[4], ha->enq->CodeBlkVersion[5], ha 2083 drivers/scsi/ips.c ha->enq->CodeBlkVersion[6]); ha 2087 drivers/scsi/ips.c ha->enq->CodeBlkVersion[0], ha->enq->CodeBlkVersion[1], ha 2088 drivers/scsi/ips.c ha->enq->CodeBlkVersion[2], ha->enq->CodeBlkVersion[3], ha 2089 drivers/scsi/ips.c ha->enq->CodeBlkVersion[4], ha->enq->CodeBlkVersion[5], ha 2090 drivers/scsi/ips.c ha->enq->CodeBlkVersion[6], ha->enq->CodeBlkVersion[7]); ha 2093 drivers/scsi/ips.c if (ha->enq->BootBlkVersion[7] == 0) { ha 2096 drivers/scsi/ips.c ha->enq->BootBlkVersion[0], ha->enq->BootBlkVersion[1], ha 2097 drivers/scsi/ips.c ha->enq->BootBlkVersion[2], ha->enq->BootBlkVersion[3], ha 2098 drivers/scsi/ips.c ha->enq->BootBlkVersion[4], ha->enq->BootBlkVersion[5], ha 2099 drivers/scsi/ips.c ha->enq->BootBlkVersion[6]); ha 2103 drivers/scsi/ips.c ha->enq->BootBlkVersion[0], ha->enq->BootBlkVersion[1], ha 2104 drivers/scsi/ips.c ha->enq->BootBlkVersion[2], ha->enq->BootBlkVersion[3], ha 2105 drivers/scsi/ips.c ha->enq->BootBlkVersion[4], ha->enq->BootBlkVersion[5], ha 2106 drivers/scsi/ips.c ha->enq->BootBlkVersion[6], ha->enq->BootBlkVersion[7]); ha 2116 drivers/scsi/ips.c ha->enq->ucMaxPhysicalDevices); ha 2118 drivers/scsi/ips.c ha->max_cmds); ha 2120 drivers/scsi/ips.c ha->scb_waitlist.count); ha 2122 drivers/scsi/ips.c ha->scb_activelist.count - ha->num_ioctl); ha 2124 drivers/scsi/ips.c ha->copp_waitlist.count); ha 2126 drivers/scsi/ips.c ha->num_ioctl); ha 2143 drivers/scsi/ips.c ips_identify_controller(ips_ha_t * ha) ha 2147 drivers/scsi/ips.c switch (ha->pcidev->device) { ha 2149 drivers/scsi/ips.c if (ha->pcidev->revision <= IPS_REVID_SERVERAID) { ha 2150 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID; ha 2151 drivers/scsi/ips.c } else if (ha->pcidev->revision == IPS_REVID_SERVERAID2) { ha 2152 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID2; ha 2153 drivers/scsi/ips.c } else if (ha->pcidev->revision == IPS_REVID_NAVAJO) { ha 2154 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_NAVAJO; ha 2155 drivers/scsi/ips.c } else if ((ha->pcidev->revision == IPS_REVID_SERVERAID2) ha 2156 drivers/scsi/ips.c && (ha->slot_num == 0)) { ha 2157 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_KIOWA; ha 2158 drivers/scsi/ips.c } else if ((ha->pcidev->revision >= IPS_REVID_CLARINETP1) && ha 2159 drivers/scsi/ips.c (ha->pcidev->revision <= IPS_REVID_CLARINETP3)) { ha 2160 drivers/scsi/ips.c if (ha->enq->ucMaxPhysicalDevices == 15) ha 2161 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID3L; ha 2163 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID3; ha 2164 drivers/scsi/ips.c } else if ((ha->pcidev->revision >= IPS_REVID_TROMBONE32) && ha 2165 drivers/scsi/ips.c (ha->pcidev->revision <= IPS_REVID_TROMBONE64)) { ha 2166 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID4H; ha 2171 drivers/scsi/ips.c switch (ha->pcidev->subsystem_device) { ha 2173 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID4L; ha 2177 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID4M; ha 2181 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID4MX; ha 2185 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID4LX; ha 2189 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID5I2; ha 2193 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID5I1; ha 2200 drivers/scsi/ips.c switch (ha->pcidev->subsystem_device) { ha 2202 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID6M; ha 2205 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID6I; ha 2208 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID7k; ha 2211 drivers/scsi/ips.c ha->ad_type = IPS_ADTYPE_SERVERAID7M; ha 2228 drivers/scsi/ips.c ips_get_bios_version(ips_ha_t * ha, int intr) ha 2242 drivers/scsi/ips.c strncpy(ha->bios_version, " ?", 8); ha 2244 drivers/scsi/ips.c if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD) { ha 2245 drivers/scsi/ips.c if (IPS_USE_MEMIO(ha)) { ha 2249 drivers/scsi/ips.c writel(0, ha->mem_ptr + IPS_REG_FLAP); ha 2250 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 2253 drivers/scsi/ips.c if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0x55) ha 2256 drivers/scsi/ips.c writel(1, ha->mem_ptr + IPS_REG_FLAP); ha 2257 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 2260 drivers/scsi/ips.c if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0xAA) ha 2264 drivers/scsi/ips.c writel(0x1FF, ha->mem_ptr + IPS_REG_FLAP); ha 2265 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 2268 drivers/scsi/ips.c major = readb(ha->mem_ptr + IPS_REG_FLDP); ha 2271 drivers/scsi/ips.c writel(0x1FE, ha->mem_ptr + IPS_REG_FLAP); ha 2272 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 2274 drivers/scsi/ips.c minor = readb(ha->mem_ptr + IPS_REG_FLDP); ha 2277 drivers/scsi/ips.c writel(0x1FD, ha->mem_ptr + IPS_REG_FLAP); ha 2278 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 2280 drivers/scsi/ips.c subminor = readb(ha->mem_ptr + IPS_REG_FLDP); ha 2286 drivers/scsi/ips.c outl(0, ha->io_addr + IPS_REG_FLAP); ha 2287 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 2290 drivers/scsi/ips.c if (inb(ha->io_addr + IPS_REG_FLDP) != 0x55) ha 2293 drivers/scsi/ips.c outl(1, ha->io_addr + IPS_REG_FLAP); ha 2294 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 2297 drivers/scsi/ips.c if (inb(ha->io_addr + IPS_REG_FLDP) != 0xAA) ha 2301 drivers/scsi/ips.c outl(0x1FF, ha->io_addr + IPS_REG_FLAP); ha 2302 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 2305 drivers/scsi/ips.c major = inb(ha->io_addr + IPS_REG_FLDP); ha 2308 drivers/scsi/ips.c outl(0x1FE, ha->io_addr + IPS_REG_FLAP); ha 2309 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 2312 drivers/scsi/ips.c minor = inb(ha->io_addr + IPS_REG_FLDP); ha 2315 drivers/scsi/ips.c outl(0x1FD, ha->io_addr + IPS_REG_FLAP); ha 2316 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 2319 drivers/scsi/ips.c subminor = inb(ha->io_addr + IPS_REG_FLDP); ha 2325 drivers/scsi/ips.c buffer = ha->ioctl_data; ha 2329 drivers/scsi/ips.c scb = &ha->scbs[ha->max_cmds - 1]; ha 2331 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 2337 drivers/scsi/ips.c scb->cmd.flashfw.command_id = IPS_COMMAND_ID(ha, scb); ha 2344 drivers/scsi/ips.c scb->cmd.flashfw.buffer_addr = ha->ioctl_busaddr; ha 2348 drivers/scsi/ips.c ips_send_wait(ha, scb, ips_cmd_timeout, ha 2366 drivers/scsi/ips.c ha->bios_version[0] = hex_asc_upper_hi(major); ha 2367 drivers/scsi/ips.c ha->bios_version[1] = '.'; ha 2368 drivers/scsi/ips.c ha->bios_version[2] = hex_asc_upper_lo(major); ha 2369 drivers/scsi/ips.c ha->bios_version[3] = hex_asc_upper_lo(subminor); ha 2370 drivers/scsi/ips.c ha->bios_version[4] = '.'; ha 2371 drivers/scsi/ips.c ha->bios_version[5] = hex_asc_upper_hi(minor); ha 2372 drivers/scsi/ips.c ha->bios_version[6] = hex_asc_upper_lo(minor); ha 2373 drivers/scsi/ips.c ha->bios_version[7] = 0; ha 2388 drivers/scsi/ips.c ips_hainit(ips_ha_t * ha) ha 2394 drivers/scsi/ips.c if (!ha) ha 2397 drivers/scsi/ips.c if (ha->func.statinit) ha 2398 drivers/scsi/ips.c (*ha->func.statinit) (ha); ha 2400 drivers/scsi/ips.c if (ha->func.enableint) ha 2401 drivers/scsi/ips.c (*ha->func.enableint) (ha); ha 2404 drivers/scsi/ips.c ha->reset_count = 1; ha 2405 drivers/scsi/ips.c ha->last_ffdc = ktime_get_real_seconds(); ha 2406 drivers/scsi/ips.c ips_ffdc_reset(ha, IPS_INTR_IORL); ha 2408 drivers/scsi/ips.c if (!ips_read_config(ha, IPS_INTR_IORL)) { ha 2409 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 2415 drivers/scsi/ips.c if (!ips_read_adapter_status(ha, IPS_INTR_IORL)) { ha 2416 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 2423 drivers/scsi/ips.c ips_identify_controller(ha); ha 2425 drivers/scsi/ips.c if (!ips_read_subsystem_parameters(ha, IPS_INTR_IORL)) { ha 2426 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 2433 drivers/scsi/ips.c if (!ips_write_driver_status(ha, IPS_INTR_IORL)) { ha 2434 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 2441 drivers/scsi/ips.c if ((ha->conf->ucLogDriveCount > 0) && (ha->requires_esl == 1)) ha 2442 drivers/scsi/ips.c ips_clear_adapter(ha, IPS_INTR_IORL); ha 2445 drivers/scsi/ips.c ha->ntargets = IPS_MAX_TARGETS + 1; ha 2446 drivers/scsi/ips.c ha->nlun = 1; ha 2447 drivers/scsi/ips.c ha->nbus = (ha->enq->ucMaxPhysicalDevices / IPS_MAX_TARGETS) + 1; ha 2449 drivers/scsi/ips.c switch (ha->conf->logical_drive[0].ucStripeSize) { ha 2451 drivers/scsi/ips.c ha->max_xfer = 0x10000; ha 2455 drivers/scsi/ips.c ha->max_xfer = 0x20000; ha 2459 drivers/scsi/ips.c ha->max_xfer = 0x40000; ha 2464 drivers/scsi/ips.c ha->max_xfer = 0x80000; ha 2469 drivers/scsi/ips.c if (le32_to_cpu(ha->subsys->param[4]) & 0x1) { ha 2471 drivers/scsi/ips.c ha->max_cmds = ha->enq->ucConcurrentCmdCount; ha 2474 drivers/scsi/ips.c switch (ha->conf->logical_drive[0].ucStripeSize) { ha 2476 drivers/scsi/ips.c ha->max_cmds = 32; ha 2480 drivers/scsi/ips.c ha->max_cmds = 16; ha 2484 drivers/scsi/ips.c ha->max_cmds = 8; ha 2489 drivers/scsi/ips.c ha->max_cmds = 4; ha 2495 drivers/scsi/ips.c if ((ha->ad_type == IPS_ADTYPE_SERVERAID3L) || ha 2496 drivers/scsi/ips.c (ha->ad_type == IPS_ADTYPE_SERVERAID4L) || ha 2497 drivers/scsi/ips.c (ha->ad_type == IPS_ADTYPE_SERVERAID4LX)) { ha 2498 drivers/scsi/ips.c if ((ha->max_cmds > MaxLiteCmds) && (MaxLiteCmds)) ha 2499 drivers/scsi/ips.c ha->max_cmds = MaxLiteCmds; ha 2503 drivers/scsi/ips.c ha->ha_id[0] = IPS_ADAPTER_ID; ha 2504 drivers/scsi/ips.c for (i = 1; i < ha->nbus; i++) { ha 2505 drivers/scsi/ips.c ha->ha_id[i] = ha->conf->init_id[i - 1] & 0x1f; ha 2506 drivers/scsi/ips.c ha->dcdb_active[i - 1] = 0; ha 2522 drivers/scsi/ips.c ips_next(ips_ha_t * ha, int intr) ha 2533 drivers/scsi/ips.c if (!ha) ha 2535 drivers/scsi/ips.c host = ips_sh[ha->host_num]; ha 2543 drivers/scsi/ips.c if ((ha->subsys->param[3] & 0x300000) ha 2544 drivers/scsi/ips.c && (ha->scb_activelist.count == 0)) { ha 2546 drivers/scsi/ips.c if (now - ha->last_ffdc > IPS_SECS_8HOURS) { ha 2547 drivers/scsi/ips.c ha->last_ffdc = now; ha 2548 drivers/scsi/ips.c ips_ffdc_time(ha); ha 2559 drivers/scsi/ips.c while ((ha->num_ioctl < IPS_MAX_IOCTL) && ha 2560 drivers/scsi/ips.c (ha->copp_waitlist.head) && (scb = ips_getscb(ha))) { ha 2562 drivers/scsi/ips.c item = ips_removeq_copp_head(&ha->copp_waitlist); ha 2563 drivers/scsi/ips.c ha->num_ioctl++; ha 2569 drivers/scsi/ips.c ret = ips_make_passthru(ha, scb->scsi_cmd, scb, intr); ha 2580 drivers/scsi/ips.c ips_freescb(ha, scb); ha 2588 drivers/scsi/ips.c ips_freescb(ha, scb); ha 2595 drivers/scsi/ips.c ha->num_ioctl--; ha 2599 drivers/scsi/ips.c ret = ips_send_cmd(ha, scb); ha 2602 drivers/scsi/ips.c ips_putq_scb_head(&ha->scb_activelist, scb); ha 2604 drivers/scsi/ips.c ha->num_ioctl--; ha 2612 drivers/scsi/ips.c ips_freescb(ha, scb); ha 2615 drivers/scsi/ips.c ips_freescb(ha, scb); ha 2627 drivers/scsi/ips.c p = ha->scb_waitlist.head; ha 2628 drivers/scsi/ips.c while ((p) && (scb = ips_getscb(ha))) { ha 2630 drivers/scsi/ips.c && (ha-> ha 2633 drivers/scsi/ips.c ips_freescb(ha, scb); ha 2639 drivers/scsi/ips.c SC = ips_removeq_wait(&ha->scb_waitlist, q); ha 2670 drivers/scsi/ips.c (ha, sg_dma_address(sg), scb, i, ha 2701 drivers/scsi/ips.c ret = ips_send_cmd(ha, scb); ha 2705 drivers/scsi/ips.c ips_putq_scb_head(&ha->scb_activelist, scb); ha 2714 drivers/scsi/ips.c ha->dcdb_active[scb->bus - 1] &= ha 2717 drivers/scsi/ips.c ips_freescb(ha, scb); ha 2724 drivers/scsi/ips.c ha->dcdb_active[scb->bus - 1] &= ha 2727 drivers/scsi/ips.c ips_freescb(ha, scb); ha 3084 drivers/scsi/ips.c ipsintr_blocking(ips_ha_t * ha, ips_scb_t * scb) ha 3088 drivers/scsi/ips.c ips_freescb(ha, scb); ha 3089 drivers/scsi/ips.c if ((ha->waitflag == TRUE) && (ha->cmd_in_progress == scb->cdb[0])) { ha 3090 drivers/scsi/ips.c ha->waitflag = FALSE; ha 3106 drivers/scsi/ips.c ipsintr_done(ips_ha_t * ha, ips_scb_t * scb) ha 3111 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 3119 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 3125 drivers/scsi/ips.c ips_done(ha, scb); ha 3138 drivers/scsi/ips.c ips_done(ips_ha_t * ha, ips_scb_t * scb) ha 3148 drivers/scsi/ips.c ips_cleanup_passthru(ha, scb); ha 3149 drivers/scsi/ips.c ha->num_ioctl--; ha 3171 drivers/scsi/ips.c ips_fill_scb_sg_single(ha, ha 3179 drivers/scsi/ips.c (ha, ha 3198 drivers/scsi/ips.c ret = ips_send_cmd(ha, scb); ha 3207 drivers/scsi/ips.c ips_freescb(ha, scb); ha 3215 drivers/scsi/ips.c ips_freescb(ha, scb); ha 3226 drivers/scsi/ips.c ha->dcdb_active[scb->bus - 1] &= ~(1 << scb->target_id); ha 3231 drivers/scsi/ips.c ips_freescb(ha, scb); ha 3244 drivers/scsi/ips.c ips_map_status(ips_ha_t * ha, ips_scb_t * scb, ips_stat_t * sp) ha 3257 drivers/scsi/ips.c ips_name, ha->host_num, ha 3381 drivers/scsi/ips.c ips_send_wait(ips_ha_t * ha, ips_scb_t * scb, int timeout, int intr) ha 3388 drivers/scsi/ips.c ha->waitflag = TRUE; ha 3389 drivers/scsi/ips.c ha->cmd_in_progress = scb->cdb[0]; ha 3392 drivers/scsi/ips.c ret = ips_send_cmd(ha, scb); ha 3398 drivers/scsi/ips.c ret = ips_wait(ha, timeout, intr); ha 3447 drivers/scsi/ips.c ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb) ha 3465 drivers/scsi/ips.c if ((ha->waitflag == TRUE) && ha 3466 drivers/scsi/ips.c (ha->cmd_in_progress == scb->cdb[0])) { ha 3467 drivers/scsi/ips.c ha->waitflag = FALSE; ha 3533 drivers/scsi/ips.c scb->cmd.logical_info.command_id = IPS_COMMAND_ID(ha, scb); ha 3537 drivers/scsi/ips.c scb->data_busaddr = ha->logical_drive_info_dma_addr; ha 3546 drivers/scsi/ips.c ips_reqsen(ha, scb); ha 3565 drivers/scsi/ips.c IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; ha 3571 drivers/scsi/ips.c scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); ha 3611 drivers/scsi/ips.c IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; ha 3617 drivers/scsi/ips.c scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); ha 3656 drivers/scsi/ips.c scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); ha 3659 drivers/scsi/ips.c scb->data_len = sizeof (*ha->enq); ha 3660 drivers/scsi/ips.c scb->cmd.basic_io.sg_addr = ha->enq_busaddr; ha 3666 drivers/scsi/ips.c scb->cmd.logical_info.command_id = IPS_COMMAND_ID(ha, scb); ha 3671 drivers/scsi/ips.c scb->data_busaddr = ha->logical_drive_info_dma_addr; ha 3714 drivers/scsi/ips.c if (ha->conf->dev[scb->bus - 1][scb->target_id].ucState == 0) { ha 3719 drivers/scsi/ips.c ha->dcdb_active[scb->bus - 1] |= (1 << scb->target_id); ha 3720 drivers/scsi/ips.c scb->cmd.dcdb.command_id = IPS_COMMAND_ID(ha, scb); ha 3733 drivers/scsi/ips.c if (ha->subsys->param[4] & 0x00100000) { /* If NEW Tape DCDB is Supported */ ha 3740 drivers/scsi/ips.c IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; ha 3779 drivers/scsi/ips.c IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; ha 3817 drivers/scsi/ips.c return ((*ha->func.issue) (ha, scb)); ha 3830 drivers/scsi/ips.c ips_chkstatus(ips_ha_t * ha, IPS_STATUS * pstatus) ha 3841 drivers/scsi/ips.c scb = &ha->scbs[pstatus->fields.command_id]; ha 3846 drivers/scsi/ips.c sp = &ha->sp; ha 3851 drivers/scsi/ips.c ips_removeq_scb(&ha->scb_activelist, scb); ha 3859 drivers/scsi/ips.c ha->host_num, ha 3878 drivers/scsi/ips.c ips_name, ha->host_num, ha 3896 drivers/scsi/ips.c if (!ips_online(ha, scb)) { ha 3902 drivers/scsi/ips.c if (ips_online(ha, scb)) { ha 3903 drivers/scsi/ips.c ips_inquiry(ha, scb); ha 3910 drivers/scsi/ips.c ips_reqsen(ha, scb); ha 3922 drivers/scsi/ips.c if (!ips_online(ha, scb) ha 3923 drivers/scsi/ips.c || !ips_msense(ha, scb)) { ha 3929 drivers/scsi/ips.c if (ips_online(ha, scb)) ha 3930 drivers/scsi/ips.c ips_rdcap(ha, scb); ha 3969 drivers/scsi/ips.c ips_name, ha->host_num, ha 3974 drivers/scsi/ips.c ips_map_status(ha, scb, sp); ha 3988 drivers/scsi/ips.c ips_online(ips_ha_t * ha, ips_scb_t * scb) ha 3996 drivers/scsi/ips.c memset(ha->logical_drive_info, 0, sizeof (IPS_LD_INFO)); ha 4000 drivers/scsi/ips.c if (ha->logical_drive_info->drive_info[scb->target_id].state != ha 4002 drivers/scsi/ips.c && ha->logical_drive_info->drive_info[scb->target_id].state != ha 4004 drivers/scsi/ips.c && ha->logical_drive_info->drive_info[scb->target_id].state != ha 4006 drivers/scsi/ips.c && ha->logical_drive_info->drive_info[scb->target_id].state != ha 4023 drivers/scsi/ips.c ips_inquiry(ips_ha_t * ha, ips_scb_t * scb) ha 4058 drivers/scsi/ips.c ips_rdcap(ips_ha_t * ha, ips_scb_t * scb) ha 4069 drivers/scsi/ips.c (ha->logical_drive_info-> ha 4088 drivers/scsi/ips.c ips_msense(ips_ha_t * ha, ips_scb_t * scb) ha 4097 drivers/scsi/ips.c if (le32_to_cpu(ha->enq->ulDriveSize[scb->target_id]) > 0x400000 && ha 4098 drivers/scsi/ips.c (ha->enq->ucMiscFlag & 0x8) == 0) { ha 4107 drivers/scsi/ips.c (le32_to_cpu(ha->enq->ulDriveSize[scb->target_id]) - ha 4179 drivers/scsi/ips.c ips_reqsen(ips_ha_t * ha, ips_scb_t * scb) ha 4208 drivers/scsi/ips.c ips_free(ips_ha_t * ha) ha 4213 drivers/scsi/ips.c if (ha) { ha 4214 drivers/scsi/ips.c if (ha->enq) { ha 4215 drivers/scsi/ips.c dma_free_coherent(&ha->pcidev->dev, sizeof(IPS_ENQ), ha 4216 drivers/scsi/ips.c ha->enq, ha->enq_busaddr); ha 4217 drivers/scsi/ips.c ha->enq = NULL; ha 4220 drivers/scsi/ips.c kfree(ha->conf); ha 4221 drivers/scsi/ips.c ha->conf = NULL; ha 4223 drivers/scsi/ips.c if (ha->adapt) { ha 4224 drivers/scsi/ips.c dma_free_coherent(&ha->pcidev->dev, ha 4226 drivers/scsi/ips.c sizeof (IPS_IO_CMD), ha->adapt, ha 4227 drivers/scsi/ips.c ha->adapt->hw_status_start); ha 4228 drivers/scsi/ips.c ha->adapt = NULL; ha 4231 drivers/scsi/ips.c if (ha->logical_drive_info) { ha 4232 drivers/scsi/ips.c dma_free_coherent(&ha->pcidev->dev, ha 4234 drivers/scsi/ips.c ha->logical_drive_info, ha 4235 drivers/scsi/ips.c ha->logical_drive_info_dma_addr); ha 4236 drivers/scsi/ips.c ha->logical_drive_info = NULL; ha 4239 drivers/scsi/ips.c kfree(ha->nvram); ha 4240 drivers/scsi/ips.c ha->nvram = NULL; ha 4242 drivers/scsi/ips.c kfree(ha->subsys); ha 4243 drivers/scsi/ips.c ha->subsys = NULL; ha 4245 drivers/scsi/ips.c if (ha->ioctl_data) { ha 4246 drivers/scsi/ips.c dma_free_coherent(&ha->pcidev->dev, ha->ioctl_len, ha 4247 drivers/scsi/ips.c ha->ioctl_data, ha->ioctl_busaddr); ha 4248 drivers/scsi/ips.c ha->ioctl_data = NULL; ha 4249 drivers/scsi/ips.c ha->ioctl_datasize = 0; ha 4250 drivers/scsi/ips.c ha->ioctl_len = 0; ha 4252 drivers/scsi/ips.c ips_deallocatescbs(ha, ha->max_cmds); ha 4255 drivers/scsi/ips.c if (ha->mem_ptr) { ha 4256 drivers/scsi/ips.c iounmap(ha->ioremap_ptr); ha 4257 drivers/scsi/ips.c ha->ioremap_ptr = NULL; ha 4258 drivers/scsi/ips.c ha->mem_ptr = NULL; ha 4261 drivers/scsi/ips.c ha->mem_addr = 0; ha 4276 drivers/scsi/ips.c ips_deallocatescbs(ips_ha_t * ha, int cmds) ha 4278 drivers/scsi/ips.c if (ha->scbs) { ha 4279 drivers/scsi/ips.c dma_free_coherent(&ha->pcidev->dev, ha 4280 drivers/scsi/ips.c IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * cmds, ha 4281 drivers/scsi/ips.c ha->scbs->sg_list.list, ha 4282 drivers/scsi/ips.c ha->scbs->sg_busaddr); ha 4283 drivers/scsi/ips.c dma_free_coherent(&ha->pcidev->dev, sizeof (ips_scb_t) * cmds, ha 4284 drivers/scsi/ips.c ha->scbs, ha->scbs->scb_busaddr); ha 4285 drivers/scsi/ips.c ha->scbs = NULL; ha 4300 drivers/scsi/ips.c ips_allocatescbs(ips_ha_t * ha) ha 4310 drivers/scsi/ips.c ha->scbs = dma_alloc_coherent(&ha->pcidev->dev, ha 4311 drivers/scsi/ips.c ha->max_cmds * sizeof (ips_scb_t), ha 4313 drivers/scsi/ips.c if (ha->scbs == NULL) ha 4315 drivers/scsi/ips.c ips_sg.list = dma_alloc_coherent(&ha->pcidev->dev, ha 4316 drivers/scsi/ips.c IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * ha->max_cmds, ha 4319 drivers/scsi/ips.c dma_free_coherent(&ha->pcidev->dev, ha 4320 drivers/scsi/ips.c ha->max_cmds * sizeof (ips_scb_t), ha->scbs, ha 4325 drivers/scsi/ips.c memset(ha->scbs, 0, ha->max_cmds * sizeof (ips_scb_t)); ha 4327 drivers/scsi/ips.c for (i = 0; i < ha->max_cmds; i++) { ha 4328 drivers/scsi/ips.c scb_p = &ha->scbs[i]; ha 4331 drivers/scsi/ips.c if (IPS_USE_ENH_SGLIST(ha)) { ha 4335 drivers/scsi/ips.c sg_dma + IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * i; ha 4340 drivers/scsi/ips.c sg_dma + IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * i; ha 4344 drivers/scsi/ips.c if (i < ha->max_cmds - 1) { ha 4345 drivers/scsi/ips.c scb_p->q_next = ha->scb_freelist; ha 4346 drivers/scsi/ips.c ha->scb_freelist = scb_p; ha 4364 drivers/scsi/ips.c ips_init_scb(ips_ha_t * ha, ips_scb_t * scb) ha 4378 drivers/scsi/ips.c memset(ha->dummy, 0, sizeof (IPS_IO_CMD)); ha 4381 drivers/scsi/ips.c ha->dummy->op_code = 0xFF; ha 4382 drivers/scsi/ips.c ha->dummy->ccsar = cpu_to_le32(ha->adapt->hw_status_start ha 4384 drivers/scsi/ips.c ha->dummy->command_id = IPS_MAX_CMDS; ha 4393 drivers/scsi/ips.c scb->cmd.basic_io.ccsar = cpu_to_le32(ha->adapt->hw_status_start ha 4409 drivers/scsi/ips.c ips_getscb(ips_ha_t * ha) ha 4415 drivers/scsi/ips.c if ((scb = ha->scb_freelist) == NULL) { ha 4420 drivers/scsi/ips.c ha->scb_freelist = scb->q_next; ha 4424 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 4441 drivers/scsi/ips.c ips_freescb(ips_ha_t * ha, ips_scb_t * scb) ha 4448 drivers/scsi/ips.c dma_unmap_single(&ha->pcidev->dev, scb->data_busaddr, ha 4452 drivers/scsi/ips.c if (IPS_COMMAND_ID(ha, scb) < (ha->max_cmds - 1)) { ha 4453 drivers/scsi/ips.c scb->q_next = ha->scb_freelist; ha 4454 drivers/scsi/ips.c ha->scb_freelist = scb; ha 4468 drivers/scsi/ips.c ips_isinit_copperhead(ips_ha_t * ha) ha 4475 drivers/scsi/ips.c isr = inb(ha->io_addr + IPS_REG_HISR); ha 4476 drivers/scsi/ips.c scpr = inb(ha->io_addr + IPS_REG_SCPR); ha 4494 drivers/scsi/ips.c ips_isinit_copperhead_memio(ips_ha_t * ha) ha 4501 drivers/scsi/ips.c isr = readb(ha->mem_ptr + IPS_REG_HISR); ha 4502 drivers/scsi/ips.c scpr = readb(ha->mem_ptr + IPS_REG_SCPR); ha 4520 drivers/scsi/ips.c ips_isinit_morpheus(ips_ha_t * ha) ha 4527 drivers/scsi/ips.c if (ips_isintr_morpheus(ha)) ha 4528 drivers/scsi/ips.c ips_flush_and_reset(ha); ha 4530 drivers/scsi/ips.c post = readl(ha->mem_ptr + IPS_REG_I960_MSG0); ha 4531 drivers/scsi/ips.c bits = readl(ha->mem_ptr + IPS_REG_I2O_HIR); ha 4552 drivers/scsi/ips.c ips_flush_and_reset(ips_ha_t *ha) ha 4561 drivers/scsi/ips.c scb = dma_alloc_coherent(&ha->pcidev->dev, sizeof(ips_scb_t), ha 4565 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 4579 drivers/scsi/ips.c ret = ips_send_cmd(ha, scb); /* Send the Flush Command */ ha 4586 drivers/scsi/ips.c done = ips_poll_for_flush_complete(ha); ha 4595 drivers/scsi/ips.c (*ha->func.reset) (ha); ha 4597 drivers/scsi/ips.c dma_free_coherent(&ha->pcidev->dev, sizeof(ips_scb_t), scb, command_dma); ha 4612 drivers/scsi/ips.c ips_poll_for_flush_complete(ips_ha_t * ha) ha 4617 drivers/scsi/ips.c cstatus.value = (*ha->func.statupd) (ha); ha 4639 drivers/scsi/ips.c ips_enable_int_copperhead(ips_ha_t * ha) ha 4643 drivers/scsi/ips.c outb(ha->io_addr + IPS_REG_HISR, IPS_BIT_EI); ha 4644 drivers/scsi/ips.c inb(ha->io_addr + IPS_REG_HISR); /*Ensure PCI Posting Completes*/ ha 4656 drivers/scsi/ips.c ips_enable_int_copperhead_memio(ips_ha_t * ha) ha 4660 drivers/scsi/ips.c writeb(IPS_BIT_EI, ha->mem_ptr + IPS_REG_HISR); ha 4661 drivers/scsi/ips.c readb(ha->mem_ptr + IPS_REG_HISR); /*Ensure PCI Posting Completes*/ ha 4673 drivers/scsi/ips.c ips_enable_int_morpheus(ips_ha_t * ha) ha 4679 drivers/scsi/ips.c Oimr = readl(ha->mem_ptr + IPS_REG_I960_OIMR); ha 4681 drivers/scsi/ips.c writel(Oimr, ha->mem_ptr + IPS_REG_I960_OIMR); ha 4682 drivers/scsi/ips.c readl(ha->mem_ptr + IPS_REG_I960_OIMR); /*Ensure PCI Posting Completes*/ ha 4695 drivers/scsi/ips.c ips_init_copperhead(ips_ha_t * ha) ha 4707 drivers/scsi/ips.c Isr = inb(ha->io_addr + IPS_REG_HISR); ha 4719 drivers/scsi/ips.c PostByte[i] = inb(ha->io_addr + IPS_REG_ISPR); ha 4720 drivers/scsi/ips.c outb(Isr, ha->io_addr + IPS_REG_HISR); ha 4724 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 4733 drivers/scsi/ips.c Isr = inb(ha->io_addr + IPS_REG_HISR); ha 4745 drivers/scsi/ips.c ConfigByte[i] = inb(ha->io_addr + IPS_REG_ISPR); ha 4746 drivers/scsi/ips.c outb(Isr, ha->io_addr + IPS_REG_HISR); ha 4750 drivers/scsi/ips.c Cbsp = inb(ha->io_addr + IPS_REG_CBSP); ha 4764 drivers/scsi/ips.c outl(0x1010, ha->io_addr + IPS_REG_CCCR); ha 4767 drivers/scsi/ips.c outb(IPS_BIT_EBM, ha->io_addr + IPS_REG_SCPR); ha 4769 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 4771 drivers/scsi/ips.c outl(0, ha->io_addr + IPS_REG_NDAE); ha 4774 drivers/scsi/ips.c outb(IPS_BIT_EI, ha->io_addr + IPS_REG_HISR); ha 4789 drivers/scsi/ips.c ips_init_copperhead_memio(ips_ha_t * ha) ha 4801 drivers/scsi/ips.c Isr = readb(ha->mem_ptr + IPS_REG_HISR); ha 4813 drivers/scsi/ips.c PostByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); ha 4814 drivers/scsi/ips.c writeb(Isr, ha->mem_ptr + IPS_REG_HISR); ha 4818 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 4827 drivers/scsi/ips.c Isr = readb(ha->mem_ptr + IPS_REG_HISR); ha 4839 drivers/scsi/ips.c ConfigByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); ha 4840 drivers/scsi/ips.c writeb(Isr, ha->mem_ptr + IPS_REG_HISR); ha 4844 drivers/scsi/ips.c Cbsp = readb(ha->mem_ptr + IPS_REG_CBSP); ha 4858 drivers/scsi/ips.c writel(0x1010, ha->mem_ptr + IPS_REG_CCCR); ha 4861 drivers/scsi/ips.c writeb(IPS_BIT_EBM, ha->mem_ptr + IPS_REG_SCPR); ha 4863 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 4865 drivers/scsi/ips.c writel(0, ha->mem_ptr + IPS_REG_NDAE); ha 4868 drivers/scsi/ips.c writeb(IPS_BIT_EI, ha->mem_ptr + IPS_REG_HISR); ha 4884 drivers/scsi/ips.c ips_init_morpheus(ips_ha_t * ha) ha 4896 drivers/scsi/ips.c Isr = readl(ha->mem_ptr + IPS_REG_I2O_HIR); ha 4907 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 4913 drivers/scsi/ips.c Post = readl(ha->mem_ptr + IPS_REG_I960_MSG0); ha 4916 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 4921 drivers/scsi/ips.c writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR); ha 4924 drivers/scsi/ips.c Post = readl(ha->mem_ptr + IPS_REG_I960_MSG0); ha 4932 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 4941 drivers/scsi/ips.c writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR); ha 4944 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 4952 drivers/scsi/ips.c Isr = readl(ha->mem_ptr + IPS_REG_I2O_HIR); ha 4963 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 4969 drivers/scsi/ips.c Config = readl(ha->mem_ptr + IPS_REG_I960_MSG1); ha 4973 drivers/scsi/ips.c writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR); ha 4976 drivers/scsi/ips.c Oimr = readl(ha->mem_ptr + IPS_REG_I960_OIMR); ha 4978 drivers/scsi/ips.c writel(Oimr, ha->mem_ptr + IPS_REG_I960_OIMR); ha 4985 drivers/scsi/ips.c ha->requires_esl = 1; ha 5001 drivers/scsi/ips.c ips_reset_copperhead(ips_ha_t * ha) ha 5008 drivers/scsi/ips.c ips_name, ha->host_num, ha->io_addr, ha->pcidev->irq); ha 5015 drivers/scsi/ips.c outb(IPS_BIT_RST, ha->io_addr + IPS_REG_SCPR); ha 5020 drivers/scsi/ips.c outb(0, ha->io_addr + IPS_REG_SCPR); ha 5025 drivers/scsi/ips.c if ((*ha->func.init) (ha)) ha 5046 drivers/scsi/ips.c ips_reset_copperhead_memio(ips_ha_t * ha) ha 5053 drivers/scsi/ips.c ips_name, ha->host_num, ha->mem_addr, ha->pcidev->irq); ha 5060 drivers/scsi/ips.c writeb(IPS_BIT_RST, ha->mem_ptr + IPS_REG_SCPR); ha 5065 drivers/scsi/ips.c writeb(0, ha->mem_ptr + IPS_REG_SCPR); ha 5070 drivers/scsi/ips.c if ((*ha->func.init) (ha)) ha 5091 drivers/scsi/ips.c ips_reset_morpheus(ips_ha_t * ha) ha 5099 drivers/scsi/ips.c ips_name, ha->host_num, ha->mem_addr, ha->pcidev->irq); ha 5106 drivers/scsi/ips.c writel(0x80000000, ha->mem_ptr + IPS_REG_I960_IDR); ha 5112 drivers/scsi/ips.c pci_read_config_byte(ha->pcidev, 4, &junk); ha 5114 drivers/scsi/ips.c if ((*ha->func.init) (ha)) ha 5135 drivers/scsi/ips.c ips_statinit(ips_ha_t * ha) ha 5141 drivers/scsi/ips.c ha->adapt->p_status_start = ha->adapt->status; ha 5142 drivers/scsi/ips.c ha->adapt->p_status_end = ha->adapt->status + IPS_MAX_CMDS; ha 5143 drivers/scsi/ips.c ha->adapt->p_status_tail = ha->adapt->status; ha 5145 drivers/scsi/ips.c phys_status_start = ha->adapt->hw_status_start; ha 5146 drivers/scsi/ips.c outl(phys_status_start, ha->io_addr + IPS_REG_SQSR); ha 5148 drivers/scsi/ips.c ha->io_addr + IPS_REG_SQER); ha 5150 drivers/scsi/ips.c ha->io_addr + IPS_REG_SQHR); ha 5151 drivers/scsi/ips.c outl(phys_status_start, ha->io_addr + IPS_REG_SQTR); ha 5153 drivers/scsi/ips.c ha->adapt->hw_status_tail = phys_status_start; ha 5166 drivers/scsi/ips.c ips_statinit_memio(ips_ha_t * ha) ha 5172 drivers/scsi/ips.c ha->adapt->p_status_start = ha->adapt->status; ha 5173 drivers/scsi/ips.c ha->adapt->p_status_end = ha->adapt->status + IPS_MAX_CMDS; ha 5174 drivers/scsi/ips.c ha->adapt->p_status_tail = ha->adapt->status; ha 5176 drivers/scsi/ips.c phys_status_start = ha->adapt->hw_status_start; ha 5177 drivers/scsi/ips.c writel(phys_status_start, ha->mem_ptr + IPS_REG_SQSR); ha 5179 drivers/scsi/ips.c ha->mem_ptr + IPS_REG_SQER); ha 5180 drivers/scsi/ips.c writel(phys_status_start + IPS_STATUS_SIZE, ha->mem_ptr + IPS_REG_SQHR); ha 5181 drivers/scsi/ips.c writel(phys_status_start, ha->mem_ptr + IPS_REG_SQTR); ha 5183 drivers/scsi/ips.c ha->adapt->hw_status_tail = phys_status_start; ha 5196 drivers/scsi/ips.c ips_statupd_copperhead(ips_ha_t * ha) ha 5200 drivers/scsi/ips.c if (ha->adapt->p_status_tail != ha->adapt->p_status_end) { ha 5201 drivers/scsi/ips.c ha->adapt->p_status_tail++; ha 5202 drivers/scsi/ips.c ha->adapt->hw_status_tail += sizeof (IPS_STATUS); ha 5204 drivers/scsi/ips.c ha->adapt->p_status_tail = ha->adapt->p_status_start; ha 5205 drivers/scsi/ips.c ha->adapt->hw_status_tail = ha->adapt->hw_status_start; ha 5208 drivers/scsi/ips.c outl(ha->adapt->hw_status_tail, ha 5209 drivers/scsi/ips.c ha->io_addr + IPS_REG_SQTR); ha 5211 drivers/scsi/ips.c return (ha->adapt->p_status_tail->value); ha 5224 drivers/scsi/ips.c ips_statupd_copperhead_memio(ips_ha_t * ha) ha 5228 drivers/scsi/ips.c if (ha->adapt->p_status_tail != ha->adapt->p_status_end) { ha 5229 drivers/scsi/ips.c ha->adapt->p_status_tail++; ha 5230 drivers/scsi/ips.c ha->adapt->hw_status_tail += sizeof (IPS_STATUS); ha 5232 drivers/scsi/ips.c ha->adapt->p_status_tail = ha->adapt->p_status_start; ha 5233 drivers/scsi/ips.c ha->adapt->hw_status_tail = ha->adapt->hw_status_start; ha 5236 drivers/scsi/ips.c writel(ha->adapt->hw_status_tail, ha->mem_ptr + IPS_REG_SQTR); ha 5238 drivers/scsi/ips.c return (ha->adapt->p_status_tail->value); ha 5251 drivers/scsi/ips.c ips_statupd_morpheus(ips_ha_t * ha) ha 5257 drivers/scsi/ips.c val = readl(ha->mem_ptr + IPS_REG_I2O_OUTMSGQ); ha 5272 drivers/scsi/ips.c ips_issue_copperhead(ips_ha_t * ha, ips_scb_t * scb) ha 5282 drivers/scsi/ips.c ha->host_num, ha 5288 drivers/scsi/ips.c ips_name, ha->host_num, scb->cmd.basic_io.command_id); ha 5294 drivers/scsi/ips.c le32_to_cpu(inl(ha->io_addr + IPS_REG_CCCR))) & IPS_BIT_SEM) { ha 5301 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 5303 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 5310 drivers/scsi/ips.c outl(scb->scb_busaddr, ha->io_addr + IPS_REG_CCSAR); ha 5311 drivers/scsi/ips.c outw(IPS_BIT_START_CMD, ha->io_addr + IPS_REG_CCCR); ha 5326 drivers/scsi/ips.c ips_issue_copperhead_memio(ips_ha_t * ha, ips_scb_t * scb) ha 5336 drivers/scsi/ips.c ha->host_num, ha 5342 drivers/scsi/ips.c ips_name, ha->host_num, scb->cmd.basic_io.command_id); ha 5347 drivers/scsi/ips.c while ((val = readl(ha->mem_ptr + IPS_REG_CCCR)) & IPS_BIT_SEM) { ha 5354 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 5356 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 5363 drivers/scsi/ips.c writel(scb->scb_busaddr, ha->mem_ptr + IPS_REG_CCSAR); ha 5364 drivers/scsi/ips.c writel(IPS_BIT_START_CMD, ha->mem_ptr + IPS_REG_CCCR); ha 5379 drivers/scsi/ips.c ips_issue_i2o(ips_ha_t * ha, ips_scb_t * scb) ha 5387 drivers/scsi/ips.c ha->host_num, ha 5393 drivers/scsi/ips.c ips_name, ha->host_num, scb->cmd.basic_io.command_id); ha 5396 drivers/scsi/ips.c outl(scb->scb_busaddr, ha->io_addr + IPS_REG_I2O_INMSGQ); ha 5411 drivers/scsi/ips.c ips_issue_i2o_memio(ips_ha_t * ha, ips_scb_t * scb) ha 5419 drivers/scsi/ips.c ha->host_num, ha 5425 drivers/scsi/ips.c ips_name, ha->host_num, scb->cmd.basic_io.command_id); ha 5428 drivers/scsi/ips.c writel(scb->scb_busaddr, ha->mem_ptr + IPS_REG_I2O_INMSGQ); ha 5443 drivers/scsi/ips.c ips_isintr_copperhead(ips_ha_t * ha) ha 5449 drivers/scsi/ips.c Isr = inb(ha->io_addr + IPS_REG_HISR); ha 5460 drivers/scsi/ips.c outb(Isr, ha->io_addr + IPS_REG_HISR); ha 5476 drivers/scsi/ips.c ips_isintr_copperhead_memio(ips_ha_t * ha) ha 5482 drivers/scsi/ips.c Isr = readb(ha->mem_ptr + IPS_REG_HISR); ha 5493 drivers/scsi/ips.c writeb(Isr, ha->mem_ptr + IPS_REG_HISR); ha 5509 drivers/scsi/ips.c ips_isintr_morpheus(ips_ha_t * ha) ha 5515 drivers/scsi/ips.c Isr = readl(ha->mem_ptr + IPS_REG_I2O_HIR); ha 5533 drivers/scsi/ips.c ips_wait(ips_ha_t * ha, int time, int intr) ha 5547 drivers/scsi/ips.c if (ha->waitflag == FALSE) { ha 5553 drivers/scsi/ips.c if (ha->waitflag == FALSE) { ha 5570 drivers/scsi/ips.c (*ha->func.intr) (ha); ha 5591 drivers/scsi/ips.c ips_write_driver_status(ips_ha_t * ha, int intr) ha 5595 drivers/scsi/ips.c if (!ips_readwrite_page5(ha, FALSE, intr)) { ha 5596 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 5604 drivers/scsi/ips.c if (le32_to_cpu(ha->nvram->signature) != IPS_NVRAM_P5_SIG) { ha 5607 drivers/scsi/ips.c ips_name, ha->host_num, ha->nvram->signature); ha 5608 drivers/scsi/ips.c ha->nvram->signature = IPS_NVRAM_P5_SIG; ha 5613 drivers/scsi/ips.c ips_name, ha->host_num, le16_to_cpu(ha->nvram->adapter_type), ha 5614 drivers/scsi/ips.c ha->nvram->adapter_slot, ha->nvram->bios_high[0], ha 5615 drivers/scsi/ips.c ha->nvram->bios_high[1], ha->nvram->bios_high[2], ha 5616 drivers/scsi/ips.c ha->nvram->bios_high[3], ha->nvram->bios_low[0], ha 5617 drivers/scsi/ips.c ha->nvram->bios_low[1], ha->nvram->bios_low[2], ha 5618 drivers/scsi/ips.c ha->nvram->bios_low[3]); ha 5620 drivers/scsi/ips.c ips_get_bios_version(ha, intr); ha 5623 drivers/scsi/ips.c ha->nvram->operating_system = IPS_OS_LINUX; ha 5624 drivers/scsi/ips.c ha->nvram->adapter_type = ha->ad_type; ha 5625 drivers/scsi/ips.c strncpy((char *) ha->nvram->driver_high, IPS_VERSION_HIGH, 4); ha 5626 drivers/scsi/ips.c strncpy((char *) ha->nvram->driver_low, IPS_VERSION_LOW, 4); ha 5627 drivers/scsi/ips.c strncpy((char *) ha->nvram->bios_high, ha->bios_version, 4); ha 5628 drivers/scsi/ips.c strncpy((char *) ha->nvram->bios_low, ha->bios_version + 4, 4); ha 5630 drivers/scsi/ips.c ha->nvram->versioning = 0; /* Indicate the Driver Does Not Support Versioning */ ha 5633 drivers/scsi/ips.c if (!ips_readwrite_page5(ha, TRUE, intr)) { ha 5634 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 5641 drivers/scsi/ips.c ha->slot_num = ha->nvram->adapter_slot; ha 5656 drivers/scsi/ips.c ips_read_adapter_status(ips_ha_t * ha, int intr) ha 5663 drivers/scsi/ips.c scb = &ha->scbs[ha->max_cmds - 1]; ha 5665 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 5671 drivers/scsi/ips.c scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); ha 5676 drivers/scsi/ips.c scb->data_len = sizeof (*ha->enq); ha 5677 drivers/scsi/ips.c scb->cmd.basic_io.sg_addr = ha->enq_busaddr; ha 5681 drivers/scsi/ips.c ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) ha 5699 drivers/scsi/ips.c ips_read_subsystem_parameters(ips_ha_t * ha, int intr) ha 5706 drivers/scsi/ips.c scb = &ha->scbs[ha->max_cmds - 1]; ha 5708 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 5714 drivers/scsi/ips.c scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); ha 5719 drivers/scsi/ips.c scb->data_len = sizeof (*ha->subsys); ha 5720 drivers/scsi/ips.c scb->cmd.basic_io.sg_addr = ha->ioctl_busaddr; ha 5724 drivers/scsi/ips.c ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) ha 5729 drivers/scsi/ips.c memcpy(ha->subsys, ha->ioctl_data, sizeof(*ha->subsys)); ha 5743 drivers/scsi/ips.c ips_read_config(ips_ha_t * ha, int intr) ha 5753 drivers/scsi/ips.c ha->conf->init_id[i] = 7; ha 5755 drivers/scsi/ips.c scb = &ha->scbs[ha->max_cmds - 1]; ha 5757 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 5763 drivers/scsi/ips.c scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); ha 5764 drivers/scsi/ips.c scb->data_len = sizeof (*ha->conf); ha 5765 drivers/scsi/ips.c scb->cmd.basic_io.sg_addr = ha->ioctl_busaddr; ha 5769 drivers/scsi/ips.c ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) ha 5773 drivers/scsi/ips.c memset(ha->conf, 0, sizeof (IPS_CONF)); ha 5777 drivers/scsi/ips.c ha->conf->init_id[i] = 7; ha 5787 drivers/scsi/ips.c memcpy(ha->conf, ha->ioctl_data, sizeof(*ha->conf)); ha 5801 drivers/scsi/ips.c ips_readwrite_page5(ips_ha_t * ha, int write, int intr) ha 5808 drivers/scsi/ips.c scb = &ha->scbs[ha->max_cmds - 1]; ha 5810 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 5816 drivers/scsi/ips.c scb->cmd.nvram.command_id = IPS_COMMAND_ID(ha, scb); ha 5821 drivers/scsi/ips.c scb->data_len = sizeof (*ha->nvram); ha 5822 drivers/scsi/ips.c scb->cmd.nvram.buffer_addr = ha->ioctl_busaddr; ha 5824 drivers/scsi/ips.c memcpy(ha->ioctl_data, ha->nvram, sizeof(*ha->nvram)); ha 5828 drivers/scsi/ips.c ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) ha 5832 drivers/scsi/ips.c memset(ha->nvram, 0, sizeof (IPS_NVRAM_P5)); ha 5837 drivers/scsi/ips.c memcpy(ha->nvram, ha->ioctl_data, sizeof(*ha->nvram)); ha 5851 drivers/scsi/ips.c ips_clear_adapter(ips_ha_t * ha, int intr) ha 5858 drivers/scsi/ips.c scb = &ha->scbs[ha->max_cmds - 1]; ha 5860 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 5866 drivers/scsi/ips.c scb->cmd.config_sync.command_id = IPS_COMMAND_ID(ha, scb); ha 5875 drivers/scsi/ips.c ips_send_wait(ha, scb, ips_reset_timeout, intr)) == IPS_FAILURE) ha 5881 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 5887 drivers/scsi/ips.c scb->cmd.unlock_stripe.command_id = IPS_COMMAND_ID(ha, scb); ha 5896 drivers/scsi/ips.c ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) ha 5914 drivers/scsi/ips.c ips_ffdc_reset(ips_ha_t * ha, int intr) ha 5920 drivers/scsi/ips.c scb = &ha->scbs[ha->max_cmds - 1]; ha 5922 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 5927 drivers/scsi/ips.c scb->cmd.ffdc.command_id = IPS_COMMAND_ID(ha, scb); ha 5928 drivers/scsi/ips.c scb->cmd.ffdc.reset_count = ha->reset_count; ha 5932 drivers/scsi/ips.c ips_fix_ffdc_time(ha, scb, ha->last_ffdc); ha 5935 drivers/scsi/ips.c ips_send_wait(ha, scb, ips_cmd_timeout, intr); ha 5948 drivers/scsi/ips.c ips_ffdc_time(ips_ha_t * ha) ha 5954 drivers/scsi/ips.c DEBUG_VAR(1, "(%s%d) Sending time update.", ips_name, ha->host_num); ha 5956 drivers/scsi/ips.c scb = &ha->scbs[ha->max_cmds - 1]; ha 5958 drivers/scsi/ips.c ips_init_scb(ha, scb); ha 5963 drivers/scsi/ips.c scb->cmd.ffdc.command_id = IPS_COMMAND_ID(ha, scb); ha 5968 drivers/scsi/ips.c ips_fix_ffdc_time(ha, scb, ha->last_ffdc); ha 5971 drivers/scsi/ips.c ips_send_wait(ha, scb, ips_cmd_timeout, IPS_FFDC); ha 5983 drivers/scsi/ips.c ips_fix_ffdc_time(ips_ha_t * ha, ips_scb_t * scb, time64_t current_time) ha 6013 drivers/scsi/ips.c ips_erase_bios(ips_ha_t * ha) ha 6023 drivers/scsi/ips.c outl(0, ha->io_addr + IPS_REG_FLAP); ha 6024 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6027 drivers/scsi/ips.c outb(0x50, ha->io_addr + IPS_REG_FLDP); ha 6028 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6032 drivers/scsi/ips.c outb(0x20, ha->io_addr + IPS_REG_FLDP); ha 6033 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6037 drivers/scsi/ips.c outb(0xD0, ha->io_addr + IPS_REG_FLDP); ha 6038 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6042 drivers/scsi/ips.c outb(0x70, ha->io_addr + IPS_REG_FLDP); ha 6043 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6049 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { ha 6050 drivers/scsi/ips.c outl(0, ha->io_addr + IPS_REG_FLAP); ha 6054 drivers/scsi/ips.c status = inb(ha->io_addr + IPS_REG_FLDP); ha 6068 drivers/scsi/ips.c outb(0xB0, ha->io_addr + IPS_REG_FLDP); ha 6069 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6075 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { ha 6076 drivers/scsi/ips.c outl(0, ha->io_addr + IPS_REG_FLAP); ha 6080 drivers/scsi/ips.c status = inb(ha->io_addr + IPS_REG_FLDP); ha 6104 drivers/scsi/ips.c outb(0x50, ha->io_addr + IPS_REG_FLDP); ha 6105 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6109 drivers/scsi/ips.c outb(0xFF, ha->io_addr + IPS_REG_FLDP); ha 6110 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6125 drivers/scsi/ips.c ips_erase_bios_memio(ips_ha_t * ha) ha 6135 drivers/scsi/ips.c writel(0, ha->mem_ptr + IPS_REG_FLAP); ha 6136 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6139 drivers/scsi/ips.c writeb(0x50, ha->mem_ptr + IPS_REG_FLDP); ha 6140 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6144 drivers/scsi/ips.c writeb(0x20, ha->mem_ptr + IPS_REG_FLDP); ha 6145 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6149 drivers/scsi/ips.c writeb(0xD0, ha->mem_ptr + IPS_REG_FLDP); ha 6150 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6154 drivers/scsi/ips.c writeb(0x70, ha->mem_ptr + IPS_REG_FLDP); ha 6155 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6161 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { ha 6162 drivers/scsi/ips.c writel(0, ha->mem_ptr + IPS_REG_FLAP); ha 6166 drivers/scsi/ips.c status = readb(ha->mem_ptr + IPS_REG_FLDP); ha 6180 drivers/scsi/ips.c writeb(0xB0, ha->mem_ptr + IPS_REG_FLDP); ha 6181 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6187 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { ha 6188 drivers/scsi/ips.c writel(0, ha->mem_ptr + IPS_REG_FLAP); ha 6192 drivers/scsi/ips.c status = readb(ha->mem_ptr + IPS_REG_FLDP); ha 6216 drivers/scsi/ips.c writeb(0x50, ha->mem_ptr + IPS_REG_FLDP); ha 6217 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6221 drivers/scsi/ips.c writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); ha 6222 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6237 drivers/scsi/ips.c ips_program_bios(ips_ha_t * ha, char *buffer, uint32_t buffersize, ha 6250 drivers/scsi/ips.c outl(i + offset, ha->io_addr + IPS_REG_FLAP); ha 6251 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6254 drivers/scsi/ips.c outb(0x40, ha->io_addr + IPS_REG_FLDP); ha 6255 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6258 drivers/scsi/ips.c outb(buffer[i], ha->io_addr + IPS_REG_FLDP); ha 6259 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6265 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { ha 6266 drivers/scsi/ips.c outl(0, ha->io_addr + IPS_REG_FLAP); ha 6270 drivers/scsi/ips.c status = inb(ha->io_addr + IPS_REG_FLDP); ha 6281 drivers/scsi/ips.c outl(0, ha->io_addr + IPS_REG_FLAP); ha 6282 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6285 drivers/scsi/ips.c outb(0xFF, ha->io_addr + IPS_REG_FLDP); ha 6286 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6295 drivers/scsi/ips.c outl(0, ha->io_addr + IPS_REG_FLAP); ha 6296 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6299 drivers/scsi/ips.c outb(0xFF, ha->io_addr + IPS_REG_FLDP); ha 6300 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6308 drivers/scsi/ips.c outl(0, ha->io_addr + IPS_REG_FLAP); ha 6309 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6312 drivers/scsi/ips.c outb(0xFF, ha->io_addr + IPS_REG_FLDP); ha 6313 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6328 drivers/scsi/ips.c ips_program_bios_memio(ips_ha_t * ha, char *buffer, uint32_t buffersize, ha 6341 drivers/scsi/ips.c writel(i + offset, ha->mem_ptr + IPS_REG_FLAP); ha 6342 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6345 drivers/scsi/ips.c writeb(0x40, ha->mem_ptr + IPS_REG_FLDP); ha 6346 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6349 drivers/scsi/ips.c writeb(buffer[i], ha->mem_ptr + IPS_REG_FLDP); ha 6350 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6356 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { ha 6357 drivers/scsi/ips.c writel(0, ha->mem_ptr + IPS_REG_FLAP); ha 6361 drivers/scsi/ips.c status = readb(ha->mem_ptr + IPS_REG_FLDP); ha 6372 drivers/scsi/ips.c writel(0, ha->mem_ptr + IPS_REG_FLAP); ha 6373 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6376 drivers/scsi/ips.c writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); ha 6377 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6386 drivers/scsi/ips.c writel(0, ha->mem_ptr + IPS_REG_FLAP); ha 6387 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6390 drivers/scsi/ips.c writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); ha 6391 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6399 drivers/scsi/ips.c writel(0, ha->mem_ptr + IPS_REG_FLAP); ha 6400 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6403 drivers/scsi/ips.c writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); ha 6404 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6419 drivers/scsi/ips.c ips_verify_bios(ips_ha_t * ha, char *buffer, uint32_t buffersize, ha 6428 drivers/scsi/ips.c outl(0, ha->io_addr + IPS_REG_FLAP); ha 6429 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6432 drivers/scsi/ips.c if (inb(ha->io_addr + IPS_REG_FLDP) != 0x55) ha 6435 drivers/scsi/ips.c outl(1, ha->io_addr + IPS_REG_FLAP); ha 6436 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6438 drivers/scsi/ips.c if (inb(ha->io_addr + IPS_REG_FLDP) != 0xAA) ha 6444 drivers/scsi/ips.c outl(i + offset, ha->io_addr + IPS_REG_FLAP); ha 6445 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6448 drivers/scsi/ips.c checksum = (uint8_t) checksum + inb(ha->io_addr + IPS_REG_FLDP); ha 6468 drivers/scsi/ips.c ips_verify_bios_memio(ips_ha_t * ha, char *buffer, uint32_t buffersize, ha 6477 drivers/scsi/ips.c writel(0, ha->mem_ptr + IPS_REG_FLAP); ha 6478 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6481 drivers/scsi/ips.c if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0x55) ha 6484 drivers/scsi/ips.c writel(1, ha->mem_ptr + IPS_REG_FLAP); ha 6485 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6487 drivers/scsi/ips.c if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0xAA) ha 6493 drivers/scsi/ips.c writel(i + offset, ha->mem_ptr + IPS_REG_FLAP); ha 6494 drivers/scsi/ips.c if (ha->pcidev->revision == IPS_REVID_TROMBONE64) ha 6498 drivers/scsi/ips.c (uint8_t) checksum + readb(ha->mem_ptr + IPS_REG_FLDP); ha 6517 drivers/scsi/ips.c ips_abort_init(ips_ha_t * ha, int index) ha 6519 drivers/scsi/ips.c ha->active = 0; ha 6520 drivers/scsi/ips.c ips_free(ha); ha 6656 drivers/scsi/ips.c ips_ha_t *ha, *oldha = ips_ha[index]; ha 6663 drivers/scsi/ips.c ha = IPS_HA(sh); ha 6664 drivers/scsi/ips.c memcpy(ha, oldha, sizeof (ips_ha_t)); ha 6667 drivers/scsi/ips.c if (request_irq(ha->pcidev->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) { ha 6668 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 6676 drivers/scsi/ips.c sh->unique_id = (ha->io_addr) ? ha->io_addr : ha->mem_addr; ha 6682 drivers/scsi/ips.c sh->max_id = ha->ntargets; ha 6683 drivers/scsi/ips.c sh->max_lun = ha->nlun; ha 6684 drivers/scsi/ips.c sh->max_channel = ha->nbus - 1; ha 6685 drivers/scsi/ips.c sh->can_queue = ha->max_cmds - 1; ha 6687 drivers/scsi/ips.c if (scsi_add_host(sh, &ha->pcidev->dev)) ha 6691 drivers/scsi/ips.c ips_ha[index] = ha; ha 6698 drivers/scsi/ips.c free_irq(ha->pcidev->irq, ha); ha 6833 drivers/scsi/ips.c ips_ha_t *ha; ha 6899 drivers/scsi/ips.c ha = kzalloc(sizeof (ips_ha_t), GFP_KERNEL); ha 6900 drivers/scsi/ips.c if (ha == NULL) { ha 6907 drivers/scsi/ips.c ips_ha[index] = ha; ha 6908 drivers/scsi/ips.c ha->active = 1; ha 6911 drivers/scsi/ips.c ha->io_addr = io_addr; ha 6912 drivers/scsi/ips.c ha->io_len = io_len; ha 6913 drivers/scsi/ips.c ha->mem_addr = mem_addr; ha 6914 drivers/scsi/ips.c ha->mem_len = mem_len; ha 6915 drivers/scsi/ips.c ha->mem_ptr = mem_ptr; ha 6916 drivers/scsi/ips.c ha->ioremap_ptr = ioremap_ptr; ha 6917 drivers/scsi/ips.c ha->host_num = (uint32_t) index; ha 6918 drivers/scsi/ips.c ha->slot_num = PCI_SLOT(pci_dev->devfn); ha 6919 drivers/scsi/ips.c ha->pcidev = pci_dev; ha 6927 drivers/scsi/ips.c if (sizeof(dma_addr_t) > 4 && IPS_HAS_ENH_SGLIST(ha) && ha 6928 drivers/scsi/ips.c !dma_set_mask(&ha->pcidev->dev, DMA_BIT_MASK(64))) { ha 6929 drivers/scsi/ips.c (ha)->flags |= IPS_HA_ENH_SG; ha 6931 drivers/scsi/ips.c if (dma_set_mask(&ha->pcidev->dev, DMA_BIT_MASK(32)) != 0) { ha 6933 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 6941 drivers/scsi/ips.c ha->enq = dma_alloc_coherent(&pci_dev->dev, sizeof (IPS_ENQ), ha 6942 drivers/scsi/ips.c &ha->enq_busaddr, GFP_KERNEL); ha 6943 drivers/scsi/ips.c if (!ha->enq) { ha 6946 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 6949 drivers/scsi/ips.c ha->adapt = dma_alloc_coherent(&pci_dev->dev, ha 6952 drivers/scsi/ips.c if (!ha->adapt) { ha 6955 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 6957 drivers/scsi/ips.c ha->adapt->hw_status_start = dma_address; ha 6958 drivers/scsi/ips.c ha->dummy = (void *) (ha->adapt + 1); ha 6962 drivers/scsi/ips.c ha->logical_drive_info = dma_alloc_coherent(&pci_dev->dev, ha 6964 drivers/scsi/ips.c if (!ha->logical_drive_info) { ha 6967 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 6969 drivers/scsi/ips.c ha->logical_drive_info_dma_addr = dma_address; ha 6972 drivers/scsi/ips.c ha->conf = kmalloc(sizeof (IPS_CONF), GFP_KERNEL); ha 6974 drivers/scsi/ips.c if (!ha->conf) { ha 6977 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 6980 drivers/scsi/ips.c ha->nvram = kmalloc(sizeof (IPS_NVRAM_P5), GFP_KERNEL); ha 6982 drivers/scsi/ips.c if (!ha->nvram) { ha 6985 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 6988 drivers/scsi/ips.c ha->subsys = kmalloc(sizeof (IPS_SUBSYS), GFP_KERNEL); ha 6990 drivers/scsi/ips.c if (!ha->subsys) { ha 6993 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 7001 drivers/scsi/ips.c ha->ioctl_data = dma_alloc_coherent(&pci_dev->dev, ips_ioctlsize, ha 7002 drivers/scsi/ips.c &ha->ioctl_busaddr, GFP_KERNEL); ha 7003 drivers/scsi/ips.c ha->ioctl_len = ips_ioctlsize; ha 7004 drivers/scsi/ips.c if (!ha->ioctl_data) { ha 7007 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 7013 drivers/scsi/ips.c ips_setup_funclist(ha); ha 7015 drivers/scsi/ips.c if ((IPS_IS_MORPHEUS(ha)) || (IPS_IS_MARCO(ha))) { ha 7017 drivers/scsi/ips.c IsDead = readl(ha->mem_ptr + IPS_REG_I960_MSG1); ha 7019 drivers/scsi/ips.c ips_reset_morpheus(ha); ha 7027 drivers/scsi/ips.c if (!(*ha->func.isinit) (ha)) { ha 7028 drivers/scsi/ips.c if (!(*ha->func.init) (ha)) { ha 7034 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 7054 drivers/scsi/ips.c ips_ha_t *ha; ha 7056 drivers/scsi/ips.c ha = ips_ha[index]; ha 7059 drivers/scsi/ips.c if (!ha->active) { ha 7065 drivers/scsi/ips.c if (request_irq(ha->pcidev->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) { ha 7066 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 7068 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 7074 drivers/scsi/ips.c ha->max_cmds = 1; ha 7075 drivers/scsi/ips.c if (!ips_allocatescbs(ha)) { ha 7076 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 7078 drivers/scsi/ips.c free_irq(ha->pcidev->irq, ha); ha 7079 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 7082 drivers/scsi/ips.c if (!ips_hainit(ha)) { ha 7083 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 7085 drivers/scsi/ips.c free_irq(ha->pcidev->irq, ha); ha 7086 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 7089 drivers/scsi/ips.c ips_deallocatescbs(ha, 1); ha 7092 drivers/scsi/ips.c if (!ips_allocatescbs(ha)) { ha 7093 drivers/scsi/ips.c IPS_PRINTK(KERN_WARNING, ha->pcidev, ha 7095 drivers/scsi/ips.c free_irq(ha->pcidev->irq, ha); ha 7096 drivers/scsi/ips.c return ips_abort_init(ha, index); ha 61 drivers/scsi/ips.h #define IPS_COMMAND_ID(ha, scb) (int) (scb - ha->scbs) ha 62 drivers/scsi/ips.h #define IPS_IS_TROMBONE(ha) (((ha->pcidev->device == IPS_DEVICEID_COPPERHEAD) && \ ha 63 drivers/scsi/ips.h (ha->pcidev->revision >= IPS_REVID_TROMBONE32) && \ ha 64 drivers/scsi/ips.h (ha->pcidev->revision <= IPS_REVID_TROMBONE64)) ? 1 : 0) ha 65 drivers/scsi/ips.h #define IPS_IS_CLARINET(ha) (((ha->pcidev->device == IPS_DEVICEID_COPPERHEAD) && \ ha 66 drivers/scsi/ips.h (ha->pcidev->revision >= IPS_REVID_CLARINETP1) && \ ha 67 drivers/scsi/ips.h (ha->pcidev->revision <= IPS_REVID_CLARINETP3)) ? 1 : 0) ha 68 drivers/scsi/ips.h #define IPS_IS_MORPHEUS(ha) (ha->pcidev->device == IPS_DEVICEID_MORPHEUS) ha 69 drivers/scsi/ips.h #define IPS_IS_MARCO(ha) (ha->pcidev->device == IPS_DEVICEID_MARCO) ha 70 drivers/scsi/ips.h #define IPS_USE_I2O_DELIVER(ha) ((IPS_IS_MORPHEUS(ha) || \ ha 71 drivers/scsi/ips.h (IPS_IS_TROMBONE(ha) && \ ha 73 drivers/scsi/ips.h #define IPS_USE_MEMIO(ha) ((IPS_IS_MORPHEUS(ha) || \ ha 74 drivers/scsi/ips.h ((IPS_IS_TROMBONE(ha) || IPS_IS_CLARINET(ha)) && \ ha 77 drivers/scsi/ips.h #define IPS_HAS_ENH_SGLIST(ha) (IPS_IS_MORPHEUS(ha) || IPS_IS_MARCO(ha)) ha 78 drivers/scsi/ips.h #define IPS_USE_ENH_SGLIST(ha) ((ha)->flags & IPS_HA_ENH_SG) ha 79 drivers/scsi/ips.h #define IPS_SGLIST_SIZE(ha) (IPS_USE_ENH_SGLIST(ha) ? \ ha 656 drivers/scsi/isci/host.c struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); ha 657 drivers/scsi/isci/host.c struct isci_host *ihost = ha->lldd_ha; ha 662 drivers/scsi/isci/host.c sas_drain_work(ha); ha 338 drivers/scsi/isci/host.h return dev->port->ha->lldd_ha; ha 1408 drivers/scsi/isci/phy.c iphy->sas_phy.ha = &ihost->sas_ha; ha 1438 drivers/scsi/isci/phy.c struct isci_host *ihost = sas_phy->ha->lldd_ha; ha 1721 drivers/scsi/isci/port.c struct isci_host *ihost = phy->ha->lldd_ha; ha 1746 drivers/scsi/isci/port.c struct isci_host *ihost = phy->ha->lldd_ha; ha 464 drivers/scsi/isci/task.c int isci_task_clear_nexus_ha(struct sas_ha_struct *ha) ha 162 drivers/scsi/isci/task.h struct sas_ha_struct *ha); ha 87 drivers/scsi/libsas/sas_ata.c struct sas_ha_struct *sas_ha = dev->port->ha; ha 170 drivers/scsi/libsas/sas_ata.c struct sas_ha_struct *sas_ha = dev->port->ha; ha 249 drivers/scsi/libsas/sas_ata.c return to_sas_internal(dev->port->ha->core.shost->transportt); ha 487 drivers/scsi/libsas/sas_ata.c struct sas_ha_struct *ha = dev->port->ha; ha 490 drivers/scsi/libsas/sas_ata.c spin_lock_irqsave(&ha->lock, flags); ha 492 drivers/scsi/libsas/sas_ata.c ha->eh_active++; ha 494 drivers/scsi/libsas/sas_ata.c spin_unlock_irqrestore(&ha->lock, flags); ha 500 drivers/scsi/libsas/sas_ata.c struct sas_ha_struct *ha = dev->port->ha; ha 503 drivers/scsi/libsas/sas_ata.c spin_lock_irqsave(&ha->lock, flags); ha 505 drivers/scsi/libsas/sas_ata.c ha->eh_active--; ha 506 drivers/scsi/libsas/sas_ata.c spin_unlock_irqrestore(&ha->lock, flags); ha 537 drivers/scsi/libsas/sas_ata.c struct sas_ha_struct *ha = found_dev->port->ha; ha 538 drivers/scsi/libsas/sas_ata.c struct Scsi_Host *shost = ha->core.shost; ha 549 drivers/scsi/libsas/sas_ata.c ata_host_init(ata_host, ha->dev, &sas_sata_ops); ha 618 drivers/scsi/libsas/sas_ata.c mutex_lock(&port->ha->disco_mutex); ha 625 drivers/scsi/libsas/sas_ata.c mutex_unlock(&port->ha->disco_mutex); ha 662 drivers/scsi/libsas/sas_ata.c mutex_lock(&port->ha->disco_mutex); ha 675 drivers/scsi/libsas/sas_ata.c mutex_unlock(&port->ha->disco_mutex); ha 684 drivers/scsi/libsas/sas_ata.c mutex_lock(&port->ha->disco_mutex); ha 697 drivers/scsi/libsas/sas_ata.c mutex_unlock(&port->ha->disco_mutex); ha 731 drivers/scsi/libsas/sas_ata.c struct sas_ha_struct *ha = dev->port->ha; ha 734 drivers/scsi/libsas/sas_ata.c ata_scsi_port_error_handler(ha->core.shost, ap); ha 173 drivers/scsi/libsas/sas_discover.c struct sas_ha_struct *sas_ha = dev->port->ha; ha 194 drivers/scsi/libsas/sas_discover.c struct sas_ha_struct *sas_ha = dev->port->ha; ha 237 drivers/scsi/libsas/sas_discover.c struct Scsi_Host *shost = port->ha->core.shost; ha 321 drivers/scsi/libsas/sas_discover.c struct sas_ha_struct *ha = port->ha; ha 335 drivers/scsi/libsas/sas_discover.c spin_lock_irq(&ha->lock); ha 339 drivers/scsi/libsas/sas_discover.c ha->eh_active--; ha 341 drivers/scsi/libsas/sas_discover.c spin_unlock_irq(&ha->lock); ha 405 drivers/scsi/libsas/sas_discover.c struct sas_ha_struct *ha; ha 411 drivers/scsi/libsas/sas_discover.c ha = dev->port->ha; ha 415 drivers/scsi/libsas/sas_discover.c spin_lock_irq(&ha->phy_port_lock); ha 420 drivers/scsi/libsas/sas_discover.c spin_unlock_irq(&ha->phy_port_lock); ha 500 drivers/scsi/libsas/sas_discover.c struct sas_ha_struct *ha = port->ha; ha 504 drivers/scsi/libsas/sas_discover.c mutex_lock(&ha->disco_mutex); ha 505 drivers/scsi/libsas/sas_discover.c if (test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state)) { ha 522 drivers/scsi/libsas/sas_discover.c mutex_unlock(&ha->disco_mutex); ha 531 drivers/scsi/libsas/sas_discover.c static void sas_chain_work(struct sas_ha_struct *ha, struct sas_work *sw) ha 538 drivers/scsi/libsas/sas_discover.c queue_work(ha->disco_q, &sw->work); ha 543 drivers/scsi/libsas/sas_discover.c struct sas_ha_struct *ha) ha 548 drivers/scsi/libsas/sas_discover.c spin_lock_irqsave(&ha->lock, flags); ha 549 drivers/scsi/libsas/sas_discover.c sas_chain_work(ha, sw); ha 550 drivers/scsi/libsas/sas_discover.c spin_unlock_irqrestore(&ha->lock, flags); ha 564 drivers/scsi/libsas/sas_discover.c sas_chain_event(ev, &disc->pending, &disc->disc_work[ev].work, port->ha); ha 13 drivers/scsi/libsas/sas_event.c int sas_queue_work(struct sas_ha_struct *ha, struct sas_work *sw) ha 18 drivers/scsi/libsas/sas_event.c if (!test_bit(SAS_HA_REGISTERED, &ha->state)) ha 21 drivers/scsi/libsas/sas_event.c if (test_bit(SAS_HA_DRAINING, &ha->state)) { ha 24 drivers/scsi/libsas/sas_event.c list_add_tail(&sw->drain_node, &ha->defer_q); ha 26 drivers/scsi/libsas/sas_event.c rc = queue_work(ha->event_q, &sw->work); ha 32 drivers/scsi/libsas/sas_event.c struct sas_ha_struct *ha) ha 37 drivers/scsi/libsas/sas_event.c spin_lock_irqsave(&ha->lock, flags); ha 38 drivers/scsi/libsas/sas_event.c rc = sas_queue_work(ha, work); ha 39 drivers/scsi/libsas/sas_event.c spin_unlock_irqrestore(&ha->lock, flags); ha 45 drivers/scsi/libsas/sas_event.c void __sas_drain_work(struct sas_ha_struct *ha) ha 50 drivers/scsi/libsas/sas_event.c set_bit(SAS_HA_DRAINING, &ha->state); ha 52 drivers/scsi/libsas/sas_event.c spin_lock_irq(&ha->lock); ha 53 drivers/scsi/libsas/sas_event.c spin_unlock_irq(&ha->lock); ha 55 drivers/scsi/libsas/sas_event.c drain_workqueue(ha->event_q); ha 56 drivers/scsi/libsas/sas_event.c drain_workqueue(ha->disco_q); ha 58 drivers/scsi/libsas/sas_event.c spin_lock_irq(&ha->lock); ha 59 drivers/scsi/libsas/sas_event.c clear_bit(SAS_HA_DRAINING, &ha->state); ha 60 drivers/scsi/libsas/sas_event.c list_for_each_entry_safe(sw, _sw, &ha->defer_q, drain_node) { ha 62 drivers/scsi/libsas/sas_event.c ret = sas_queue_work(ha, sw); ha 67 drivers/scsi/libsas/sas_event.c spin_unlock_irq(&ha->lock); ha 70 drivers/scsi/libsas/sas_event.c int sas_drain_work(struct sas_ha_struct *ha) ha 74 drivers/scsi/libsas/sas_event.c err = mutex_lock_interruptible(&ha->drain_mutex); ha 77 drivers/scsi/libsas/sas_event.c if (test_bit(SAS_HA_REGISTERED, &ha->state)) ha 78 drivers/scsi/libsas/sas_event.c __sas_drain_work(ha); ha 79 drivers/scsi/libsas/sas_event.c mutex_unlock(&ha->drain_mutex); ha 85 drivers/scsi/libsas/sas_event.c void sas_disable_revalidation(struct sas_ha_struct *ha) ha 87 drivers/scsi/libsas/sas_event.c mutex_lock(&ha->disco_mutex); ha 88 drivers/scsi/libsas/sas_event.c set_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state); ha 89 drivers/scsi/libsas/sas_event.c mutex_unlock(&ha->disco_mutex); ha 92 drivers/scsi/libsas/sas_event.c void sas_enable_revalidation(struct sas_ha_struct *ha) ha 96 drivers/scsi/libsas/sas_event.c mutex_lock(&ha->disco_mutex); ha 97 drivers/scsi/libsas/sas_event.c clear_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state); ha 98 drivers/scsi/libsas/sas_event.c for (i = 0; i < ha->num_phys; i++) { ha 99 drivers/scsi/libsas/sas_event.c struct asd_sas_port *port = ha->sas_port[i]; ha 112 drivers/scsi/libsas/sas_event.c ha->notify_port_event(sas_phy, PORTE_BROADCAST_RCVD); ha 114 drivers/scsi/libsas/sas_event.c mutex_unlock(&ha->disco_mutex); ha 137 drivers/scsi/libsas/sas_event.c struct sas_ha_struct *ha = phy->ha; ha 148 drivers/scsi/libsas/sas_event.c ret = sas_queue_event(event, &ev->work, ha); ha 158 drivers/scsi/libsas/sas_event.c struct sas_ha_struct *ha = phy->ha; ha 169 drivers/scsi/libsas/sas_event.c ret = sas_queue_event(event, &ev->work, ha); ha 60 drivers/scsi/libsas/sas_expander.c to_sas_internal(dev->port->ha->core.shost->transportt); ha 202 drivers/scsi/libsas/sas_expander.c struct sas_ha_struct *ha = dev->port->ha; ha 210 drivers/scsi/libsas/sas_expander.c if (WARN_ON_ONCE(test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state))) ha 239 drivers/scsi/libsas/sas_expander.c if (!test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state)) { ha 247 drivers/scsi/libsas/sas_expander.c if (test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state)) ha 334 drivers/scsi/libsas/sas_expander.c if (test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state)) ha 338 drivers/scsi/libsas/sas_expander.c test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state) ? "ata: " : "", ha 362 drivers/scsi/libsas/sas_init.c void sas_prep_resume_ha(struct sas_ha_struct *ha) ha 366 drivers/scsi/libsas/sas_init.c set_bit(SAS_HA_REGISTERED, &ha->state); ha 369 drivers/scsi/libsas/sas_init.c for (i = 0; i < ha->num_phys; i++) { ha 370 drivers/scsi/libsas/sas_init.c struct asd_sas_phy *phy = ha->sas_phy[i]; ha 378 drivers/scsi/libsas/sas_init.c static int phys_suspended(struct sas_ha_struct *ha) ha 382 drivers/scsi/libsas/sas_init.c for (i = 0; i < ha->num_phys; i++) { ha 383 drivers/scsi/libsas/sas_init.c struct asd_sas_phy *phy = ha->sas_phy[i]; ha 392 drivers/scsi/libsas/sas_init.c void sas_resume_ha(struct sas_ha_struct *ha) ha 403 drivers/scsi/libsas/sas_init.c i = phys_suspended(ha); ha 405 drivers/scsi/libsas/sas_init.c dev_info(ha->dev, "waiting up to 25 seconds for %d phy%s to resume\n", ha 407 drivers/scsi/libsas/sas_init.c wait_event_timeout(ha->eh_wait_q, phys_suspended(ha) == 0, tmo); ha 408 drivers/scsi/libsas/sas_init.c for (i = 0; i < ha->num_phys; i++) { ha 409 drivers/scsi/libsas/sas_init.c struct asd_sas_phy *phy = ha->sas_phy[i]; ha 420 drivers/scsi/libsas/sas_init.c scsi_unblock_requests(ha->core.shost); ha 421 drivers/scsi/libsas/sas_init.c sas_drain_work(ha); ha 425 drivers/scsi/libsas/sas_init.c void sas_suspend_ha(struct sas_ha_struct *ha) ha 429 drivers/scsi/libsas/sas_init.c sas_disable_events(ha); ha 430 drivers/scsi/libsas/sas_init.c scsi_block_requests(ha->core.shost); ha 431 drivers/scsi/libsas/sas_init.c for (i = 0; i < ha->num_phys; i++) { ha 432 drivers/scsi/libsas/sas_init.c struct asd_sas_port *port = ha->sas_port[i]; ha 438 drivers/scsi/libsas/sas_init.c mutex_lock(&ha->drain_mutex); ha 439 drivers/scsi/libsas/sas_init.c __sas_drain_work(ha); ha 440 drivers/scsi/libsas/sas_init.c mutex_unlock(&ha->drain_mutex); ha 483 drivers/scsi/libsas/sas_init.c struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); ha 495 drivers/scsi/libsas/sas_init.c spin_lock_irq(&ha->lock); ha 496 drivers/scsi/libsas/sas_init.c sas_queue_work(ha, &d->reset_work); ha 497 drivers/scsi/libsas/sas_init.c spin_unlock_irq(&ha->lock); ha 499 drivers/scsi/libsas/sas_init.c rc = sas_drain_work(ha); ha 510 drivers/scsi/libsas/sas_init.c struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); ha 522 drivers/scsi/libsas/sas_init.c spin_lock_irq(&ha->lock); ha 523 drivers/scsi/libsas/sas_init.c sas_queue_work(ha, &d->enable_work); ha 524 drivers/scsi/libsas/sas_init.c spin_unlock_irq(&ha->lock); ha 526 drivers/scsi/libsas/sas_init.c rc = sas_drain_work(ha); ha 598 drivers/scsi/libsas/sas_init.c struct sas_ha_struct *sas_ha = phy->ha; ha 608 drivers/scsi/libsas/sas_init.c if (atomic_read(&phy->event_nr) > phy->ha->event_thres) { ha 58 drivers/scsi/libsas/sas_internal.h void sas_disable_revalidation(struct sas_ha_struct *ha); ha 59 drivers/scsi/libsas/sas_internal.h void sas_enable_revalidation(struct sas_ha_struct *ha); ha 60 drivers/scsi/libsas/sas_internal.h void __sas_drain_work(struct sas_ha_struct *ha); ha 69 drivers/scsi/libsas/sas_internal.h int sas_queue_work(struct sas_ha_struct *ha, struct sas_work *sw); ha 38 drivers/scsi/libsas/sas_phy.c struct sas_ha_struct *sas_ha = phy->ha; ha 67 drivers/scsi/libsas/sas_phy.c struct sas_ha_struct *sas_ha = phy->ha; ha 96 drivers/scsi/libsas/sas_phy.c struct sas_ha_struct *sas_ha = phy->ha; ha 129 drivers/scsi/libsas/sas_phy.c phy->ha = sas_ha; ha 17 drivers/scsi/libsas/sas_port.c struct sas_ha_struct *sas_ha = phy->ha; ha 30 drivers/scsi/libsas/sas_port.c struct sas_ha_struct *sas_ha = phy->ha; ha 80 drivers/scsi/libsas/sas_port.c struct sas_ha_struct *sas_ha = phy->ha; ha 201 drivers/scsi/libsas/sas_port.c struct sas_ha_struct *sas_ha = phy->ha; ha 287 drivers/scsi/libsas/sas_port.c flush_workqueue(phy->port->ha->disco_q); ha 327 drivers/scsi/libsas/sas_port.c port->ha = sas_ha; ha 80 drivers/scsi/libsas/sas_scsi_host.c task->dev->port->ha->sas_ha_name); ha 105 drivers/scsi/libsas/sas_scsi_host.c struct sas_ha_struct *ha = dev->port->ha; ha 109 drivers/scsi/libsas/sas_scsi_host.c if (test_bit(SAS_HA_FROZEN, &ha->state)) ha 283 drivers/scsi/libsas/sas_scsi_host.c to_sas_internal(task->dev->port->ha->core.shost->transportt); ha 329 drivers/scsi/libsas/sas_scsi_host.c to_sas_internal(dev->port->ha->core.shost->transportt); ha 357 drivers/scsi/libsas/sas_scsi_host.c to_sas_internal(dev->port->ha->core.shost->transportt); ha 371 drivers/scsi/libsas/sas_scsi_host.c struct sas_ha_struct *ha = dev->port->ha; ha 380 drivers/scsi/libsas/sas_scsi_host.c spin_lock_irqsave(&ha->phy_port_lock, flags); ha 383 drivers/scsi/libsas/sas_scsi_host.c spin_unlock_irqrestore(&ha->phy_port_lock, flags); ha 391 drivers/scsi/libsas/sas_scsi_host.c struct sas_ha_struct *ha = dev->port->ha; ha 399 drivers/scsi/libsas/sas_scsi_host.c spin_lock_irq(&ha->lock); ha 402 drivers/scsi/libsas/sas_scsi_host.c prepare_to_wait(&ha->eh_wait_q, &wait, TASK_UNINTERRUPTIBLE); ha 403 drivers/scsi/libsas/sas_scsi_host.c spin_unlock_irq(&ha->lock); ha 405 drivers/scsi/libsas/sas_scsi_host.c spin_lock_irq(&ha->lock); ha 407 drivers/scsi/libsas/sas_scsi_host.c finish_wait(&ha->eh_wait_q, &wait); ha 409 drivers/scsi/libsas/sas_scsi_host.c spin_unlock_irq(&ha->lock); ha 412 drivers/scsi/libsas/sas_scsi_host.c if (scsi_host_in_recovery(ha->core.shost)) { ha 421 drivers/scsi/libsas/sas_scsi_host.c struct sas_ha_struct *ha = dev->port->ha; ha 433 drivers/scsi/libsas/sas_scsi_host.c spin_lock_irq(&ha->lock); ha 437 drivers/scsi/libsas/sas_scsi_host.c ha->eh_active++; ha 438 drivers/scsi/libsas/sas_scsi_host.c list_add_tail(&dev->ssp_dev.eh_list_node, &ha->eh_dev_q); ha 442 drivers/scsi/libsas/sas_scsi_host.c scsi_schedule_eh(ha->core.shost); ha 444 drivers/scsi/libsas/sas_scsi_host.c spin_unlock_irq(&ha->lock); ha 563 drivers/scsi/libsas/sas_scsi_host.c struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); ha 658 drivers/scsi/libsas/sas_scsi_host.c res = i->dft->lldd_clear_nexus_ha(ha); ha 679 drivers/scsi/libsas/sas_scsi_host.c list_splice_tail_init(&ha->eh_ata_q, work_q); ha 691 drivers/scsi/libsas/sas_scsi_host.c struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); ha 695 drivers/scsi/libsas/sas_scsi_host.c spin_lock_irq(&ha->lock); ha 696 drivers/scsi/libsas/sas_scsi_host.c while (!list_empty(&ha->eh_dev_q)) { ha 700 drivers/scsi/libsas/sas_scsi_host.c ssp = list_entry(ha->eh_dev_q.next, typeof(*ssp), eh_list_node); ha 706 drivers/scsi/libsas/sas_scsi_host.c spin_unlock_irq(&ha->lock); ha 715 drivers/scsi/libsas/sas_scsi_host.c spin_lock_irq(&ha->lock); ha 717 drivers/scsi/libsas/sas_scsi_host.c ha->eh_active--; ha 719 drivers/scsi/libsas/sas_scsi_host.c spin_unlock_irq(&ha->lock); ha 725 drivers/scsi/libsas/sas_scsi_host.c struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); ha 744 drivers/scsi/libsas/sas_scsi_host.c set_bit(SAS_HA_FROZEN, &ha->state); ha 746 drivers/scsi/libsas/sas_scsi_host.c clear_bit(SAS_HA_FROZEN, &ha->state); ha 756 drivers/scsi/libsas/sas_scsi_host.c sas_ata_eh(shost, &eh_work_q, &ha->eh_done_q); ha 757 drivers/scsi/libsas/sas_scsi_host.c if (!scsi_eh_get_sense(&eh_work_q, &ha->eh_done_q)) ha 758 drivers/scsi/libsas/sas_scsi_host.c scsi_eh_ready_devs(shost, &eh_work_q, &ha->eh_done_q); ha 766 drivers/scsi/libsas/sas_scsi_host.c scsi_eh_flush_done_q(&ha->eh_done_q); ha 769 drivers/scsi/libsas/sas_scsi_host.c spin_lock_irq(&ha->lock); ha 770 drivers/scsi/libsas/sas_scsi_host.c if (ha->eh_active == 0) { ha 774 drivers/scsi/libsas/sas_scsi_host.c spin_unlock_irq(&ha->lock); ha 797 drivers/scsi/libsas/sas_scsi_host.c struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); ha 802 drivers/scsi/libsas/sas_scsi_host.c spin_lock_irqsave(&ha->phy_port_lock, flags); ha 803 drivers/scsi/libsas/sas_scsi_host.c for (i = 0; i < ha->num_phys; i++) { ha 804 drivers/scsi/libsas/sas_scsi_host.c struct asd_sas_port *port = ha->sas_port[i]; ha 818 drivers/scsi/libsas/sas_scsi_host.c spin_unlock_irqrestore(&ha->phy_port_lock, flags); ha 185 drivers/scsi/megaraid/mega_common.h uint8_t ha; ha 790 drivers/scsi/megaraid/megaraid_mbox.c adapter->ha = 0; ha 793 drivers/scsi/megaraid/megaraid_mbox.c adapter->ha = 1; ha 1512 drivers/scsi/megaraid/megaraid_mbox.c if (!adapter->ha) { ha 1735 drivers/scsi/megaraid/megaraid_mbox.c if (!adapter->ha) { ha 2632 drivers/scsi/megaraid/megaraid_mbox.c if (!adapter->ha) { ha 94 drivers/scsi/mvsas/mv_init.c sas_phy->ha = (struct sas_ha_struct *)mvi->shost->hostdata; ha 64 drivers/scsi/mvsas/mv_sas.c struct sas_ha_struct *sha = dev->port->ha; ha 94 drivers/scsi/mvsas/mv_sas.c struct sas_ha_struct *sha = dev->port->ha; ha 168 drivers/scsi/mvsas/mv_sas.c struct sas_ha_struct *sha = sas_phy->ha; ha 1077 drivers/scsi/mvsas/mv_sas.c struct sas_ha_struct *sas_ha = sas_phy->ha; ha 3321 drivers/scsi/pm8001/pm8001_hwi.c struct pm8001_hba_info *pm8001_ha = phy->sas_phy.ha->lldd_ha; ha 136 drivers/scsi/pm8001/pm8001_init.c sas_phy->ha = (struct sas_ha_struct *)pm8001_ha->shost->hostdata; ha 140 drivers/scsi/pm8001/pm8001_sas.c struct sas_ha_struct *sha = dev->port->ha; ha 164 drivers/scsi/pm8001/pm8001_sas.c pm8001_ha = sas_phy->ha->lldd_ha; ha 278 drivers/scsi/pm8001/pm8001_sas.c struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); ha 285 drivers/scsi/pm8001/pm8001_sas.c sas_drain_work(ha); ha 379 drivers/scsi/qla1280.c #define IS_ISP1040(ha) (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1020) ha 380 drivers/scsi/qla1280.c #define IS_ISP1x40(ha) (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1020 || \ ha 381 drivers/scsi/qla1280.c ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1240) ha 382 drivers/scsi/qla1280.c #define IS_ISP1x160(ha) (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160 || \ ha 383 drivers/scsi/qla1280.c ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160) ha 578 drivers/scsi/qla1280.c static int qla1280_read_nvram(struct scsi_qla_host *ha) ha 590 drivers/scsi/qla1280.c printk(KERN_INFO "scsi(%ld): Reading NVRAM\n", ha->host_no); ha 592 drivers/scsi/qla1280.c wptr = (uint16_t *)&ha->nvram; ha 593 drivers/scsi/qla1280.c nv = &ha->nvram; ha 596 drivers/scsi/qla1280.c *wptr = qla1280_get_nvram_word(ha, cnt); ha 608 drivers/scsi/qla1280.c *wptr = qla1280_get_nvram_word(ha, cnt); ha 624 drivers/scsi/qla1280.c "settings\n", ha->host_no); ha 625 drivers/scsi/qla1280.c ha->nvram_valid = 0; ha 627 drivers/scsi/qla1280.c ha->nvram_valid = 1; ha 666 drivers/scsi/qla1280.c struct scsi_qla_host *ha; ha 670 drivers/scsi/qla1280.c ha = (struct scsi_qla_host *)host->hostdata; ha 671 drivers/scsi/qla1280.c bdp = &ql1280_board_tbl[ha->devnum]; ha 677 drivers/scsi/qla1280.c &bdp->name[0], ha->fwver1, ha->fwver2, ha->fwver3, ha 697 drivers/scsi/qla1280.c struct scsi_qla_host *ha = (struct scsi_qla_host *)host->hostdata; ha 716 drivers/scsi/qla1280.c status = qla1280_64bit_start_scsi(ha, sp); ha 718 drivers/scsi/qla1280.c status = qla1280_32bit_start_scsi(ha, sp); ha 735 drivers/scsi/qla1280.c struct scsi_qla_host *ha = from_timer(ha, t, mailbox_timer); ha 737 drivers/scsi/qla1280.c reg = ha->iobase; ha 739 drivers/scsi/qla1280.c ha->mailbox_out[0] = RD_REG_WORD(®->mailbox0); ha 741 drivers/scsi/qla1280.c "ictrl %04x, istatus %04x\n", ha->host_no, ha->mailbox_out[0], ha 743 drivers/scsi/qla1280.c complete(ha->mailbox_wait); ha 747 drivers/scsi/qla1280.c _qla1280_wait_for_single_command(struct scsi_qla_host *ha, struct srb *sp, ha 753 drivers/scsi/qla1280.c spin_unlock_irq(ha->host->host_lock); ha 755 drivers/scsi/qla1280.c spin_lock_irq(ha->host->host_lock); ha 765 drivers/scsi/qla1280.c qla1280_wait_for_single_command(struct scsi_qla_host *ha, struct srb *sp) ha 770 drivers/scsi/qla1280.c return _qla1280_wait_for_single_command(ha, sp, &wait); ha 774 drivers/scsi/qla1280.c qla1280_wait_for_pending_commands(struct scsi_qla_host *ha, int bus, int target) ha 788 drivers/scsi/qla1280.c sp = ha->outstanding_cmds[cnt]; ha 797 drivers/scsi/qla1280.c status = qla1280_wait_for_single_command(ha, sp); ha 822 drivers/scsi/qla1280.c struct scsi_qla_host *ha; ha 833 drivers/scsi/qla1280.c ha = (struct scsi_qla_host *)(CMD_HOST(cmd)->hostdata); ha 840 drivers/scsi/qla1280.c RD_REG_WORD(&ha->iobase->istatus)); ha 843 drivers/scsi/qla1280.c RD_REG_WORD(&ha->iobase->host_cmd), ha 844 drivers/scsi/qla1280.c RD_REG_WORD(&ha->iobase->ictrl), jiffies); ha 849 drivers/scsi/qla1280.c ha->host_no, cmd, CMD_HANDLE(cmd), action); ha 859 drivers/scsi/qla1280.c if (sp == ha->outstanding_cmds[i]) { ha 871 drivers/scsi/qla1280.c "already completed.\n", ha->host_no, bus, ha 886 drivers/scsi/qla1280.c qla1280_abort_command(ha, sp, found); ha 893 drivers/scsi/qla1280.c "command.\n", ha->host_no, bus, target, lun); ha 894 drivers/scsi/qla1280.c if (qla1280_device_reset(ha, bus, target) == 0) { ha 904 drivers/scsi/qla1280.c "reset.\n", ha->host_no, bus); ha 905 drivers/scsi/qla1280.c if (qla1280_bus_reset(ha, bus) == 0) { ha 916 drivers/scsi/qla1280.c ha->host_no); ha 918 drivers/scsi/qla1280.c "continue automatically\n", ha->host_no); ha 920 drivers/scsi/qla1280.c ha->flags.reset_active = 1; ha 922 drivers/scsi/qla1280.c if (qla1280_abort_isp(ha) != 0) { /* it's dead */ ha 926 drivers/scsi/qla1280.c ha->flags.reset_active = 0; ha 939 drivers/scsi/qla1280.c result = _qla1280_wait_for_single_command(ha, sp, &wait); ha 945 drivers/scsi/qla1280.c ha->host_no, bus, target, lun); ha 959 drivers/scsi/qla1280.c result = qla1280_wait_for_pending_commands(ha, ha 1060 drivers/scsi/qla1280.c qla1280_disable_intrs(struct scsi_qla_host *ha) ha 1062 drivers/scsi/qla1280.c WRT_REG_WORD(&ha->iobase->ictrl, 0); ha 1063 drivers/scsi/qla1280.c RD_REG_WORD(&ha->iobase->ictrl); /* PCI Posted Write flush */ ha 1068 drivers/scsi/qla1280.c qla1280_enable_intrs(struct scsi_qla_host *ha) ha 1070 drivers/scsi/qla1280.c WRT_REG_WORD(&ha->iobase->ictrl, (ISP_EN_INT | ISP_EN_RISC)); ha 1071 drivers/scsi/qla1280.c RD_REG_WORD(&ha->iobase->ictrl); /* PCI Posted Write flush */ ha 1081 drivers/scsi/qla1280.c struct scsi_qla_host *ha; ha 1087 drivers/scsi/qla1280.c ha = (struct scsi_qla_host *)dev_id; ha 1089 drivers/scsi/qla1280.c spin_lock(ha->host->host_lock); ha 1091 drivers/scsi/qla1280.c ha->isr_count++; ha 1092 drivers/scsi/qla1280.c reg = ha->iobase; ha 1094 drivers/scsi/qla1280.c qla1280_disable_intrs(ha); ha 1099 drivers/scsi/qla1280.c qla1280_isr(ha, &ha->done_q); ha 1102 drivers/scsi/qla1280.c if (!list_empty(&ha->done_q)) ha 1103 drivers/scsi/qla1280.c qla1280_done(ha); ha 1105 drivers/scsi/qla1280.c spin_unlock(ha->host->host_lock); ha 1107 drivers/scsi/qla1280.c qla1280_enable_intrs(ha); ha 1115 drivers/scsi/qla1280.c qla1280_set_target_parameters(struct scsi_qla_host *ha, int bus, int target) ha 1122 drivers/scsi/qla1280.c nv = &ha->nvram; ha 1138 drivers/scsi/qla1280.c if (IS_ISP1x160(ha)) { ha 1149 drivers/scsi/qla1280.c status = qla1280_mailbox_command(ha, mr, mb); ha 1158 drivers/scsi/qla1280.c status |= qla1280_mailbox_command(ha, 0x0f, mb); ha 1164 drivers/scsi/qla1280.c ha->host_no, bus, target); ha 1183 drivers/scsi/qla1280.c struct scsi_qla_host *ha; ha 1191 drivers/scsi/qla1280.c ha = (struct scsi_qla_host *)device->host->hostdata; ha 1192 drivers/scsi/qla1280.c nv = &ha->nvram; ha 1194 drivers/scsi/qla1280.c if (qla1280_check_for_dead_scsi_bus(ha, bus)) ha 1198 drivers/scsi/qla1280.c (ha->bus_settings[bus].qtag_enables & (BIT_0 << target))) { ha 1199 drivers/scsi/qla1280.c scsi_change_queue_depth(device, ha->bus_settings[bus].hiwat); ha 1216 drivers/scsi/qla1280.c if (IS_ISP1x160(ha)) { ha 1223 drivers/scsi/qla1280.c spin_lock_irqsave(ha->host->host_lock, flags); ha 1225 drivers/scsi/qla1280.c status = qla1280_set_target_parameters(ha, bus, target); ha 1226 drivers/scsi/qla1280.c qla1280_get_target_parameters(ha, device); ha 1227 drivers/scsi/qla1280.c spin_unlock_irqrestore(ha->host->host_lock, flags); ha 1240 drivers/scsi/qla1280.c qla1280_done(struct scsi_qla_host *ha) ha 1249 drivers/scsi/qla1280.c done_q = &ha->done_q; ha 1264 drivers/scsi/qla1280.c if (!ha->flags.abort_isp_active) ha 1265 drivers/scsi/qla1280.c qla1280_marker(ha, bus, target, 0, MK_SYNC_ID); ha 1279 drivers/scsi/qla1280.c ha->actthreads--; ha 1406 drivers/scsi/qla1280.c qla1280_initialize_adapter(struct scsi_qla_host *ha) ha 1416 drivers/scsi/qla1280.c ha->flags.online = 0; ha 1417 drivers/scsi/qla1280.c ha->flags.disable_host_adapter = 0; ha 1418 drivers/scsi/qla1280.c ha->flags.reset_active = 0; ha 1419 drivers/scsi/qla1280.c ha->flags.abort_isp_active = 0; ha 1422 drivers/scsi/qla1280.c if (IS_ISP1040(ha)) ha 1427 drivers/scsi/qla1280.c reg = ha->iobase; ha 1435 drivers/scsi/qla1280.c if (qla1280_read_nvram(ha)) { ha 1445 drivers/scsi/qla1280.c spin_lock_irqsave(ha->host->host_lock, flags); ha 1447 drivers/scsi/qla1280.c status = qla1280_load_firmware(ha); ha 1450 drivers/scsi/qla1280.c ha->host_no); ha 1455 drivers/scsi/qla1280.c dprintk(1, "scsi(%ld): Configure NVRAM parameters\n", ha->host_no); ha 1456 drivers/scsi/qla1280.c qla1280_nvram_config(ha); ha 1458 drivers/scsi/qla1280.c if (ha->flags.disable_host_adapter) { ha 1463 drivers/scsi/qla1280.c status = qla1280_init_rings(ha); ha 1468 drivers/scsi/qla1280.c for (bus = 0; bus < ha->ports; bus++) { ha 1469 drivers/scsi/qla1280.c if (!ha->bus_settings[bus].disable_scsi_reset && ha 1470 drivers/scsi/qla1280.c qla1280_bus_reset(ha, bus) && ha 1471 drivers/scsi/qla1280.c qla1280_bus_reset(ha, bus)) ha 1472 drivers/scsi/qla1280.c ha->bus_settings[bus].scsi_bus_dead = 1; ha 1475 drivers/scsi/qla1280.c ha->flags.online = 1; ha 1477 drivers/scsi/qla1280.c spin_unlock_irqrestore(ha->host->host_lock, flags); ha 1499 drivers/scsi/qla1280.c qla1280_request_firmware(struct scsi_qla_host *ha) ha 1506 drivers/scsi/qla1280.c spin_unlock_irq(ha->host->host_lock); ha 1509 drivers/scsi/qla1280.c index = ql1280_board_tbl[ha->devnum].fw_index; ha 1515 drivers/scsi/qla1280.c err = request_firmware(&fw, fwname, &ha->pdev->dev); ha 1534 drivers/scsi/qla1280.c ha->fwver1 = fw->data[0]; ha 1535 drivers/scsi/qla1280.c ha->fwver2 = fw->data[1]; ha 1536 drivers/scsi/qla1280.c ha->fwver3 = fw->data[2]; ha 1539 drivers/scsi/qla1280.c spin_lock_irq(ha->host->host_lock); ha 1554 drivers/scsi/qla1280.c qla1280_chip_diag(struct scsi_qla_host *ha) ha 1557 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 1563 drivers/scsi/qla1280.c dprintk(1, "scsi(%ld): Verifying chip\n", ha->host_no); ha 1632 drivers/scsi/qla1280.c qla1280_enable_intrs(ha); ha 1645 drivers/scsi/qla1280.c status = qla1280_mailbox_command(ha, 0xff, mb); ha 1664 drivers/scsi/qla1280.c qla1280_load_firmware_pio(struct scsi_qla_host *ha) ha 1674 drivers/scsi/qla1280.c fw = qla1280_request_firmware(ha); ha 1679 drivers/scsi/qla1280.c ha->fwstart = __le16_to_cpu(fw_data[2]); ha 1682 drivers/scsi/qla1280.c risc_address = ha->fwstart; ha 1691 drivers/scsi/qla1280.c err = qla1280_mailbox_command(ha, BIT_0 | BIT_1 | BIT_2, mb); ha 1694 drivers/scsi/qla1280.c ha->host_no); ha 1704 drivers/scsi/qla1280.c qla1280_load_firmware_dma(struct scsi_qla_host *ha) ha 1716 drivers/scsi/qla1280.c tbuf = dma_alloc_coherent(&ha->pdev->dev, 8000, &p_tbuf, GFP_KERNEL); ha 1721 drivers/scsi/qla1280.c fw = qla1280_request_firmware(ha); ha 1726 drivers/scsi/qla1280.c ha->fwstart = __le16_to_cpu(fw_data[2]); ha 1729 drivers/scsi/qla1280.c risc_address = ha->fwstart; ha 1749 drivers/scsi/qla1280.c ((__le16 *)ha->request_ring)[i] = fw_data[i]; ha 1754 drivers/scsi/qla1280.c mb[3] = ha->request_dma & 0xffff; ha 1755 drivers/scsi/qla1280.c mb[2] = (ha->request_dma >> 16) & 0xffff; ha 1756 drivers/scsi/qla1280.c mb[7] = upper_32_bits(ha->request_dma) & 0xffff; ha 1757 drivers/scsi/qla1280.c mb[6] = upper_32_bits(ha->request_dma) >> 16; ha 1760 drivers/scsi/qla1280.c (void *)(long)ha->request_dma, ha 1762 drivers/scsi/qla1280.c err = qla1280_mailbox_command(ha, BIT_4 | BIT_3 | BIT_2 | ha 1766 drivers/scsi/qla1280.c "segment of f\n", ha->host_no); ha 1779 drivers/scsi/qla1280.c err = qla1280_mailbox_command(ha, BIT_4 | BIT_3 | BIT_2 | ha 1786 drivers/scsi/qla1280.c sp = (uint8_t *)ha->request_ring; ha 1807 drivers/scsi/qla1280.c dma_free_coherent(&ha->pdev->dev, 8000, tbuf, p_tbuf); ha 1813 drivers/scsi/qla1280.c qla1280_start_firmware(struct scsi_qla_host *ha) ha 1824 drivers/scsi/qla1280.c mb[1] = ha->fwstart; ha 1825 drivers/scsi/qla1280.c err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); ha 1827 drivers/scsi/qla1280.c printk(KERN_ERR "scsi(%li): RISC checksum failed.\n", ha->host_no); ha 1834 drivers/scsi/qla1280.c mb[1] = ha->fwstart; ha 1835 drivers/scsi/qla1280.c err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); ha 1838 drivers/scsi/qla1280.c ha->host_no); ha 1845 drivers/scsi/qla1280.c qla1280_load_firmware(struct scsi_qla_host *ha) ha 1850 drivers/scsi/qla1280.c err = qla1280_chip_diag(ha); ha 1853 drivers/scsi/qla1280.c if (IS_ISP1040(ha)) ha 1854 drivers/scsi/qla1280.c err = qla1280_load_firmware_pio(ha); ha 1856 drivers/scsi/qla1280.c err = qla1280_load_firmware_dma(ha); ha 1859 drivers/scsi/qla1280.c err = qla1280_start_firmware(ha); ha 1878 drivers/scsi/qla1280.c qla1280_init_rings(struct scsi_qla_host *ha) ha 1886 drivers/scsi/qla1280.c memset(ha->outstanding_cmds, 0, ha 1890 drivers/scsi/qla1280.c ha->request_ring_ptr = ha->request_ring; ha 1891 drivers/scsi/qla1280.c ha->req_ring_index = 0; ha 1892 drivers/scsi/qla1280.c ha->req_q_cnt = REQUEST_ENTRY_CNT; ha 1896 drivers/scsi/qla1280.c mb[3] = ha->request_dma & 0xffff; ha 1897 drivers/scsi/qla1280.c mb[2] = (ha->request_dma >> 16) & 0xffff; ha 1899 drivers/scsi/qla1280.c mb[7] = upper_32_bits(ha->request_dma) & 0xffff; ha 1900 drivers/scsi/qla1280.c mb[6] = upper_32_bits(ha->request_dma) >> 16; ha 1901 drivers/scsi/qla1280.c if (!(status = qla1280_mailbox_command(ha, BIT_7 | BIT_6 | BIT_4 | ha 1905 drivers/scsi/qla1280.c ha->response_ring_ptr = ha->response_ring; ha 1906 drivers/scsi/qla1280.c ha->rsp_ring_index = 0; ha 1910 drivers/scsi/qla1280.c mb[3] = ha->response_dma & 0xffff; ha 1911 drivers/scsi/qla1280.c mb[2] = (ha->response_dma >> 16) & 0xffff; ha 1913 drivers/scsi/qla1280.c mb[7] = upper_32_bits(ha->response_dma) & 0xffff; ha 1914 drivers/scsi/qla1280.c mb[6] = upper_32_bits(ha->response_dma) >> 16; ha 1915 drivers/scsi/qla1280.c status = qla1280_mailbox_command(ha, BIT_7 | BIT_6 | BIT_5 | ha 1978 drivers/scsi/qla1280.c qla1280_set_target_defaults(struct scsi_qla_host *ha, int bus, int target) ha 1980 drivers/scsi/qla1280.c struct nvram *nv = &ha->nvram; ha 1994 drivers/scsi/qla1280.c if (IS_ISP1x160(ha)) { ha 2009 drivers/scsi/qla1280.c qla1280_set_defaults(struct scsi_qla_host *ha) ha 2011 drivers/scsi/qla1280.c struct nvram *nv = &ha->nvram; ha 2033 drivers/scsi/qla1280.c if (IS_ISP1040(ha)) ha 2038 drivers/scsi/qla1280.c if (IS_ISP1x160(ha)) ha 2048 drivers/scsi/qla1280.c if (IS_ISP1040(ha)) { ha 2058 drivers/scsi/qla1280.c qla1280_set_target_defaults(ha, bus, target); ha 2063 drivers/scsi/qla1280.c qla1280_config_target(struct scsi_qla_host *ha, int bus, int target) ha 2065 drivers/scsi/qla1280.c struct nvram *nv = &ha->nvram; ha 2082 drivers/scsi/qla1280.c if (IS_ISP1x160(ha)) ha 2087 drivers/scsi/qla1280.c status = qla1280_mailbox_command(ha, 0x0f, mb); ha 2092 drivers/scsi/qla1280.c ha->bus_settings[bus].qtag_enables |= flag; ha 2095 drivers/scsi/qla1280.c if (IS_ISP1x160(ha)) { ha 2097 drivers/scsi/qla1280.c ha->bus_settings[bus].device_enables |= flag; ha 2098 drivers/scsi/qla1280.c ha->bus_settings[bus].lun_disables |= 0; ha 2101 drivers/scsi/qla1280.c ha->bus_settings[bus].device_enables |= flag; ha 2104 drivers/scsi/qla1280.c ha->bus_settings[bus].lun_disables |= flag; ha 2114 drivers/scsi/qla1280.c status |= qla1280_mailbox_command(ha, 0x0f, mb); ha 2121 drivers/scsi/qla1280.c qla1280_config_bus(struct scsi_qla_host *ha, int bus) ha 2123 drivers/scsi/qla1280.c struct nvram *nv = &ha->nvram; ha 2128 drivers/scsi/qla1280.c ha->bus_settings[bus].disable_scsi_reset = ha 2132 drivers/scsi/qla1280.c ha->bus_settings[bus].id = nv->bus[bus].config_1.initiator_id; ha 2134 drivers/scsi/qla1280.c mb[1] = bus ? ha->bus_settings[bus].id | BIT_7 : ha 2135 drivers/scsi/qla1280.c ha->bus_settings[bus].id; ha 2136 drivers/scsi/qla1280.c status = qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); ha 2139 drivers/scsi/qla1280.c ha->bus_settings[bus].bus_reset_delay = ha 2143 drivers/scsi/qla1280.c ha->bus_settings[bus].hiwat = nv->bus[bus].max_queue_depth - 1; ha 2147 drivers/scsi/qla1280.c status |= qla1280_config_target(ha, bus, target); ha 2153 drivers/scsi/qla1280.c qla1280_nvram_config(struct scsi_qla_host *ha) ha 2155 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 2156 drivers/scsi/qla1280.c struct nvram *nv = &ha->nvram; ha 2162 drivers/scsi/qla1280.c if (ha->nvram_valid) { ha 2170 drivers/scsi/qla1280.c qla1280_set_defaults(ha); ha 2176 drivers/scsi/qla1280.c ha->flags.disable_risc_code_load = ha 2179 drivers/scsi/qla1280.c if (IS_ISP1040(ha)) { ha 2204 drivers/scsi/qla1280.c if (ha->ports > 1) ha 2222 drivers/scsi/qla1280.c status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); ha 2224 drivers/scsi/qla1280.c if (IS_ISP1x40(ha)) { ha 2228 drivers/scsi/qla1280.c status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); ha 2236 drivers/scsi/qla1280.c status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); ha 2244 drivers/scsi/qla1280.c status |= qla1280_mailbox_command(ha, BIT_7 | BIT_6 | BIT_2 | ha 2251 drivers/scsi/qla1280.c status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]); ha 2265 drivers/scsi/qla1280.c status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, mb); ha 2269 drivers/scsi/qla1280.c status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); ha 2275 drivers/scsi/qla1280.c status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, mb); ha 2279 drivers/scsi/qla1280.c status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); ha 2285 drivers/scsi/qla1280.c status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, mb); ha 2287 drivers/scsi/qla1280.c for (bus = 0; bus < ha->ports; bus++) ha 2288 drivers/scsi/qla1280.c status |= qla1280_config_bus(ha, bus); ha 2310 drivers/scsi/qla1280.c qla1280_get_nvram_word(struct scsi_qla_host *ha, uint32_t address) ha 2318 drivers/scsi/qla1280.c data = le16_to_cpu(qla1280_nvram_request(ha, nv_cmd)); ha 2341 drivers/scsi/qla1280.c qla1280_nvram_request(struct scsi_qla_host *ha, uint32_t nv_cmd) ha 2343 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 2353 drivers/scsi/qla1280.c qla1280_nv_write(ha, NV_DATA_OUT); ha 2355 drivers/scsi/qla1280.c qla1280_nv_write(ha, 0); ha 2384 drivers/scsi/qla1280.c qla1280_nv_write(struct scsi_qla_host *ha, uint16_t data) ha 2386 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 2415 drivers/scsi/qla1280.c qla1280_mailbox_command(struct scsi_qla_host *ha, uint8_t mr, uint16_t *mb) ha 2417 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 2427 drivers/scsi/qla1280.c if (ha->mailbox_wait) { ha 2430 drivers/scsi/qla1280.c ha->mailbox_wait = &wait; ha 2452 drivers/scsi/qla1280.c timer_setup(&ha->mailbox_timer, qla1280_mailbox_timeout, 0); ha 2453 drivers/scsi/qla1280.c mod_timer(&ha->mailbox_timer, jiffies + 20 * HZ); ha 2455 drivers/scsi/qla1280.c spin_unlock_irq(ha->host->host_lock); ha 2460 drivers/scsi/qla1280.c del_timer_sync(&ha->mailbox_timer); ha 2462 drivers/scsi/qla1280.c spin_lock_irq(ha->host->host_lock); ha 2464 drivers/scsi/qla1280.c ha->mailbox_wait = NULL; ha 2467 drivers/scsi/qla1280.c if (ha->mailbox_out[0] != MBS_CMD_CMP) { ha 2471 drivers/scsi/qla1280.c mb[0], ha->mailbox_out[0], RD_REG_WORD(®->istatus)); ha 2483 drivers/scsi/qla1280.c iptr = (uint16_t *) &ha->mailbox_out[0]; ha 2487 drivers/scsi/qla1280.c if (ha->flags.reset_marker) ha 2488 drivers/scsi/qla1280.c qla1280_rst_aen(ha); ha 2506 drivers/scsi/qla1280.c qla1280_poll(struct scsi_qla_host *ha) ha 2508 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 2517 drivers/scsi/qla1280.c qla1280_isr(ha, &done_q); ha 2519 drivers/scsi/qla1280.c if (!ha->mailbox_wait) { ha 2520 drivers/scsi/qla1280.c if (ha->flags.reset_marker) ha 2521 drivers/scsi/qla1280.c qla1280_rst_aen(ha); ha 2525 drivers/scsi/qla1280.c qla1280_done(ha); ha 2542 drivers/scsi/qla1280.c qla1280_bus_reset(struct scsi_qla_host *ha, int bus) ha 2552 drivers/scsi/qla1280.c ha->host_no, bus); ha 2554 drivers/scsi/qla1280.c reset_delay = ha->bus_settings[bus].bus_reset_delay; ha 2558 drivers/scsi/qla1280.c status = qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]); ha 2561 drivers/scsi/qla1280.c if (ha->bus_settings[bus].failed_reset_count > 2) ha 2562 drivers/scsi/qla1280.c ha->bus_settings[bus].scsi_bus_dead = 1; ha 2563 drivers/scsi/qla1280.c ha->bus_settings[bus].failed_reset_count++; ha 2565 drivers/scsi/qla1280.c spin_unlock_irq(ha->host->host_lock); ha 2567 drivers/scsi/qla1280.c spin_lock_irq(ha->host->host_lock); ha 2569 drivers/scsi/qla1280.c ha->bus_settings[bus].scsi_bus_dead = 0; ha 2570 drivers/scsi/qla1280.c ha->bus_settings[bus].failed_reset_count = 0; ha 2571 drivers/scsi/qla1280.c ha->bus_settings[bus].reset_marker = 0; ha 2573 drivers/scsi/qla1280.c qla1280_marker(ha, bus, 0, 0, MK_SYNC_ALL); ha 2602 drivers/scsi/qla1280.c qla1280_device_reset(struct scsi_qla_host *ha, int bus, int target) ha 2612 drivers/scsi/qla1280.c status = qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]); ha 2615 drivers/scsi/qla1280.c qla1280_marker(ha, bus, target, 0, MK_SYNC_ID); ha 2636 drivers/scsi/qla1280.c qla1280_abort_command(struct scsi_qla_host *ha, struct srb * sp, int handle) ha 2654 drivers/scsi/qla1280.c status = qla1280_mailbox_command(ha, 0x0f, &mb[0]); ha 2674 drivers/scsi/qla1280.c qla1280_reset_adapter(struct scsi_qla_host *ha) ha 2676 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 2681 drivers/scsi/qla1280.c ha->flags.online = 0; ha 2702 drivers/scsi/qla1280.c qla1280_marker(struct scsi_qla_host *ha, int bus, int id, int lun, u8 type) ha 2709 drivers/scsi/qla1280.c if ((pkt = (struct mrk_entry *) qla1280_req_pkt(ha))) { ha 2717 drivers/scsi/qla1280.c qla1280_isp_cmd(ha); ha 2738 drivers/scsi/qla1280.c qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) ha 2740 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 2767 drivers/scsi/qla1280.c if ((req_cnt + 2) >= ha->req_q_cnt) { ha 2770 drivers/scsi/qla1280.c if (ha->req_ring_index < cnt) ha 2771 drivers/scsi/qla1280.c ha->req_q_cnt = cnt - ha->req_ring_index; ha 2773 drivers/scsi/qla1280.c ha->req_q_cnt = ha 2774 drivers/scsi/qla1280.c REQUEST_ENTRY_CNT - (ha->req_ring_index - cnt); ha 2778 drivers/scsi/qla1280.c ha->req_q_cnt, seg_cnt); ha 2781 drivers/scsi/qla1280.c if ((req_cnt + 2) >= ha->req_q_cnt) { ha 2784 drivers/scsi/qla1280.c "0x%xreq_cnt=0x%x", ha->req_ring_index, ha->req_q_cnt, ha 2791 drivers/scsi/qla1280.c ha->outstanding_cmds[cnt] != NULL; cnt++); ha 2796 drivers/scsi/qla1280.c "OUTSTANDING ARRAY, req_q_cnt=0x%x", ha->req_q_cnt); ha 2800 drivers/scsi/qla1280.c ha->outstanding_cmds[cnt] = sp; ha 2801 drivers/scsi/qla1280.c ha->req_q_cnt -= req_cnt; ha 2813 drivers/scsi/qla1280.c pkt = (cmd_a64_entry_t *) ha->request_ring_ptr; ha 2817 drivers/scsi/qla1280.c pkt->sys_define = (uint8_t) ha->req_ring_index; ha 2894 drivers/scsi/qla1280.c ha->req_ring_index++; ha 2895 drivers/scsi/qla1280.c if (ha->req_ring_index == REQUEST_ENTRY_CNT) { ha 2896 drivers/scsi/qla1280.c ha->req_ring_index = 0; ha 2897 drivers/scsi/qla1280.c ha->request_ring_ptr = ha 2898 drivers/scsi/qla1280.c ha->request_ring; ha 2900 drivers/scsi/qla1280.c ha->request_ring_ptr++; ha 2902 drivers/scsi/qla1280.c pkt = (cmd_a64_entry_t *)ha->request_ring_ptr; ha 2912 drivers/scsi/qla1280.c (uint8_t)ha->req_ring_index; ha 2948 drivers/scsi/qla1280.c ha->req_ring_index++; ha 2949 drivers/scsi/qla1280.c if (ha->req_ring_index == REQUEST_ENTRY_CNT) { ha 2950 drivers/scsi/qla1280.c ha->req_ring_index = 0; ha 2951 drivers/scsi/qla1280.c ha->request_ring_ptr = ha->request_ring; ha 2953 drivers/scsi/qla1280.c ha->request_ring_ptr++; ha 2959 drivers/scsi/qla1280.c ha->actthreads++; ha 2960 drivers/scsi/qla1280.c WRT_REG_WORD(®->mailbox4, ha->req_ring_index); ha 2992 drivers/scsi/qla1280.c qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) ha 2994 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 3029 drivers/scsi/qla1280.c if ((req_cnt + 2) >= ha->req_q_cnt) { ha 3032 drivers/scsi/qla1280.c if (ha->req_ring_index < cnt) ha 3033 drivers/scsi/qla1280.c ha->req_q_cnt = cnt - ha->req_ring_index; ha 3035 drivers/scsi/qla1280.c ha->req_q_cnt = ha 3036 drivers/scsi/qla1280.c REQUEST_ENTRY_CNT - (ha->req_ring_index - cnt); ha 3040 drivers/scsi/qla1280.c ha->req_q_cnt, seg_cnt); ha 3042 drivers/scsi/qla1280.c if ((req_cnt + 2) >= ha->req_q_cnt) { ha 3045 drivers/scsi/qla1280.c "req_q_cnt=0x%x, req_cnt=0x%x", ha->req_ring_index, ha 3046 drivers/scsi/qla1280.c ha->req_q_cnt, req_cnt); ha 3052 drivers/scsi/qla1280.c (ha->outstanding_cmds[cnt] != 0); cnt++) ; ha 3057 drivers/scsi/qla1280.c "ARRAY, req_q_cnt=0x%x\n", ha->req_q_cnt); ha 3062 drivers/scsi/qla1280.c ha->outstanding_cmds[cnt] = sp; ha 3063 drivers/scsi/qla1280.c ha->req_q_cnt -= req_cnt; ha 3068 drivers/scsi/qla1280.c pkt = (struct cmd_entry *) ha->request_ring_ptr; ha 3072 drivers/scsi/qla1280.c pkt->sys_define = (uint8_t) ha->req_ring_index; ha 3139 drivers/scsi/qla1280.c ha->req_ring_index++; ha 3140 drivers/scsi/qla1280.c if (ha->req_ring_index == REQUEST_ENTRY_CNT) { ha 3141 drivers/scsi/qla1280.c ha->req_ring_index = 0; ha 3142 drivers/scsi/qla1280.c ha->request_ring_ptr = ha 3143 drivers/scsi/qla1280.c ha->request_ring; ha 3145 drivers/scsi/qla1280.c ha->request_ring_ptr++; ha 3147 drivers/scsi/qla1280.c pkt = (struct cmd_entry *)ha->request_ring_ptr; ha 3158 drivers/scsi/qla1280.c (uint8_t) ha->req_ring_index; ha 3192 drivers/scsi/qla1280.c qla1280_dump_buffer(5, (char *)ha->request_ring_ptr, ha 3196 drivers/scsi/qla1280.c ha->req_ring_index++; ha 3197 drivers/scsi/qla1280.c if (ha->req_ring_index == REQUEST_ENTRY_CNT) { ha 3198 drivers/scsi/qla1280.c ha->req_ring_index = 0; ha 3199 drivers/scsi/qla1280.c ha->request_ring_ptr = ha->request_ring; ha 3201 drivers/scsi/qla1280.c ha->request_ring_ptr++; ha 3207 drivers/scsi/qla1280.c ha->actthreads++; ha 3208 drivers/scsi/qla1280.c WRT_REG_WORD(®->mailbox4, ha->req_ring_index); ha 3232 drivers/scsi/qla1280.c qla1280_req_pkt(struct scsi_qla_host *ha) ha 3234 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 3246 drivers/scsi/qla1280.c if (ha->req_q_cnt > 0) { ha 3249 drivers/scsi/qla1280.c if (ha->req_ring_index < cnt) ha 3250 drivers/scsi/qla1280.c ha->req_q_cnt = cnt - ha->req_ring_index; ha 3252 drivers/scsi/qla1280.c ha->req_q_cnt = ha 3253 drivers/scsi/qla1280.c REQUEST_ENTRY_CNT - (ha->req_ring_index - cnt); ha 3257 drivers/scsi/qla1280.c if (ha->req_q_cnt > 0) { ha 3258 drivers/scsi/qla1280.c ha->req_q_cnt--; ha 3259 drivers/scsi/qla1280.c pkt = ha->request_ring_ptr; ha 3269 drivers/scsi/qla1280.c pkt->sys_define = (uint8_t) ha->req_ring_index; ha 3280 drivers/scsi/qla1280.c qla1280_poll(ha); ha 3300 drivers/scsi/qla1280.c qla1280_isp_cmd(struct scsi_qla_host *ha) ha 3302 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 3307 drivers/scsi/qla1280.c qla1280_dump_buffer(5, (char *)ha->request_ring_ptr, ha 3311 drivers/scsi/qla1280.c ha->req_ring_index++; ha 3312 drivers/scsi/qla1280.c if (ha->req_ring_index == REQUEST_ENTRY_CNT) { ha 3313 drivers/scsi/qla1280.c ha->req_ring_index = 0; ha 3314 drivers/scsi/qla1280.c ha->request_ring_ptr = ha->request_ring; ha 3316 drivers/scsi/qla1280.c ha->request_ring_ptr++; ha 3321 drivers/scsi/qla1280.c WRT_REG_WORD(®->mailbox4, ha->req_ring_index); ha 3339 drivers/scsi/qla1280.c qla1280_isr(struct scsi_qla_host *ha, struct list_head *done_q) ha 3341 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 3393 drivers/scsi/qla1280.c if (ha->flags.online) { ha 3399 drivers/scsi/qla1280.c sp = ha->outstanding_cmds[index]; ha 3405 drivers/scsi/qla1280.c ha->outstanding_cmds[index] = NULL; ha 3424 drivers/scsi/qla1280.c ha->flags.reset_marker = 1; ha 3426 drivers/scsi/qla1280.c ha->bus_settings[index].reset_marker = 1; ha 3462 drivers/scsi/qla1280.c ha->flags.reset_marker = 1; ha 3464 drivers/scsi/qla1280.c ha->bus_settings[index].reset_marker = 1; ha 3476 drivers/scsi/qla1280.c memcpy((uint16_t *) ha->mailbox_out, wptr, ha 3480 drivers/scsi/qla1280.c if(ha->mailbox_wait != NULL) ha 3481 drivers/scsi/qla1280.c complete(ha->mailbox_wait); ha 3493 drivers/scsi/qla1280.c if (!(ha->flags.online && !ha->mailbox_wait)) { ha 3501 drivers/scsi/qla1280.c while (ha->rsp_ring_index != mailbox[5]) { ha 3502 drivers/scsi/qla1280.c pkt = ha->response_ring_ptr; ha 3505 drivers/scsi/qla1280.c " = 0x%x\n", ha->rsp_ring_index, mailbox[5]); ha 3515 drivers/scsi/qla1280.c ha->rsp_ring_index, mailbox[5], ha 3522 drivers/scsi/qla1280.c ha->rsp_ring_index, mailbox[5]); ha 3530 drivers/scsi/qla1280.c ha->outstanding_cmds[pkt->handle]->cmd, ha 3533 drivers/scsi/qla1280.c qla1280_status_entry(ha, pkt, done_q); ha 3535 drivers/scsi/qla1280.c qla1280_error_entry(ha, pkt, done_q); ha 3537 drivers/scsi/qla1280.c ha->rsp_ring_index++; ha 3538 drivers/scsi/qla1280.c if (ha->rsp_ring_index == RESPONSE_ENTRY_CNT) { ha 3539 drivers/scsi/qla1280.c ha->rsp_ring_index = 0; ha 3540 drivers/scsi/qla1280.c ha->response_ring_ptr = ha->response_ring; ha 3542 drivers/scsi/qla1280.c ha->response_ring_ptr++; ha 3543 drivers/scsi/qla1280.c WRT_REG_WORD(®->mailbox5, ha->rsp_ring_index); ha 3559 drivers/scsi/qla1280.c qla1280_rst_aen(struct scsi_qla_host *ha) ha 3565 drivers/scsi/qla1280.c if (ha->flags.online && !ha->flags.reset_active && ha 3566 drivers/scsi/qla1280.c !ha->flags.abort_isp_active) { ha 3567 drivers/scsi/qla1280.c ha->flags.reset_active = 1; ha 3568 drivers/scsi/qla1280.c while (ha->flags.reset_marker) { ha 3570 drivers/scsi/qla1280.c ha->flags.reset_marker = 0; ha 3571 drivers/scsi/qla1280.c for (bus = 0; bus < ha->ports && ha 3572 drivers/scsi/qla1280.c !ha->flags.reset_marker; bus++) { ha 3573 drivers/scsi/qla1280.c if (ha->bus_settings[bus].reset_marker) { ha 3574 drivers/scsi/qla1280.c ha->bus_settings[bus].reset_marker = 0; ha 3575 drivers/scsi/qla1280.c qla1280_marker(ha, bus, 0, 0, ha 3596 drivers/scsi/qla1280.c qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt, ha 3611 drivers/scsi/qla1280.c sp = ha->outstanding_cmds[handle]; ha 3621 drivers/scsi/qla1280.c ha->outstanding_cmds[handle] = NULL; ha 3694 drivers/scsi/qla1280.c qla1280_error_entry(struct scsi_qla_host *ha, struct response *pkt, ha 3713 drivers/scsi/qla1280.c sp = ha->outstanding_cmds[handle]; ha 3719 drivers/scsi/qla1280.c ha->outstanding_cmds[handle] = NULL; ha 3758 drivers/scsi/qla1280.c qla1280_abort_isp(struct scsi_qla_host *ha) ha 3760 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 3768 drivers/scsi/qla1280.c if (ha->flags.abort_isp_active || !ha->flags.online) ha 3771 drivers/scsi/qla1280.c ha->flags.abort_isp_active = 1; ha 3774 drivers/scsi/qla1280.c qla1280_disable_intrs(ha); ha 3779 drivers/scsi/qla1280.c ha->host_no); ha 3783 drivers/scsi/qla1280.c sp = ha->outstanding_cmds[cnt]; ha 3788 drivers/scsi/qla1280.c ha->outstanding_cmds[cnt] = NULL; ha 3789 drivers/scsi/qla1280.c list_add_tail(&sp->list, &ha->done_q); ha 3793 drivers/scsi/qla1280.c qla1280_done(ha); ha 3795 drivers/scsi/qla1280.c status = qla1280_load_firmware(ha); ha 3800 drivers/scsi/qla1280.c qla1280_nvram_config (ha); ha 3802 drivers/scsi/qla1280.c status = qla1280_init_rings(ha); ha 3807 drivers/scsi/qla1280.c for (bus = 0; bus < ha->ports; bus++) ha 3808 drivers/scsi/qla1280.c qla1280_bus_reset(ha, bus); ha 3810 drivers/scsi/qla1280.c ha->flags.abort_isp_active = 0; ha 3815 drivers/scsi/qla1280.c qla1280_reset_adapter(ha); ha 3864 drivers/scsi/qla1280.c qla1280_check_for_dead_scsi_bus(struct scsi_qla_host *ha, unsigned int bus) ha 3867 drivers/scsi/qla1280.c struct device_reg __iomem *reg = ha->iobase; ha 3869 drivers/scsi/qla1280.c if (ha->bus_settings[bus].scsi_bus_dead) { ha 3878 drivers/scsi/qla1280.c ha->bus_settings[bus].scsi_bus_dead = 1; ha 3881 drivers/scsi/qla1280.c ha->bus_settings[bus].scsi_bus_dead = 0; ha 3882 drivers/scsi/qla1280.c ha->bus_settings[bus].failed_reset_count = 0; ha 3889 drivers/scsi/qla1280.c qla1280_get_target_parameters(struct scsi_qla_host *ha, ha 3903 drivers/scsi/qla1280.c qla1280_mailbox_command(ha, BIT_6 | BIT_3 | BIT_2 | BIT_1 | BIT_0, ha 3906 drivers/scsi/qla1280.c printk(KERN_INFO "scsi(%li:%d:%d:%d):", ha->host_no, bus, target, lun); ha 3957 drivers/scsi/qla1280.c struct scsi_qla_host *ha; ha 3963 drivers/scsi/qla1280.c ha = (struct scsi_qla_host *)host->hostdata; ha 3995 drivers/scsi/qla1280.c ql1280_dump_device(struct scsi_qla_host *ha) ha 4005 drivers/scsi/qla1280.c if ((sp = ha->outstanding_cmds[i]) == NULL) ha 4154 drivers/scsi/qla1280.c struct scsi_qla_host *ha; ha 4176 drivers/scsi/qla1280.c host = scsi_host_alloc(&qla1280_driver_template, sizeof(*ha)); ha 4183 drivers/scsi/qla1280.c ha = (struct scsi_qla_host *)host->hostdata; ha 4184 drivers/scsi/qla1280.c memset(ha, 0, sizeof(struct scsi_qla_host)); ha 4186 drivers/scsi/qla1280.c ha->pdev = pdev; ha 4187 drivers/scsi/qla1280.c ha->devnum = devnum; /* specifies microcode load address */ ha 4190 drivers/scsi/qla1280.c if (dma_set_mask_and_coherent(&ha->pdev->dev, DMA_BIT_MASK(64))) { ha 4191 drivers/scsi/qla1280.c if (dma_set_mask(&ha->pdev->dev, DMA_BIT_MASK(32))) { ha 4193 drivers/scsi/qla1280.c "suitable DMA mask - aborting\n", ha->host_no); ha 4199 drivers/scsi/qla1280.c ha->host_no); ha 4201 drivers/scsi/qla1280.c if (dma_set_mask(&ha->pdev->dev, DMA_BIT_MASK(32))) { ha 4203 drivers/scsi/qla1280.c "suitable DMA mask - aborting\n", ha->host_no); ha 4209 drivers/scsi/qla1280.c ha->request_ring = dma_alloc_coherent(&ha->pdev->dev, ha 4211 drivers/scsi/qla1280.c &ha->request_dma, GFP_KERNEL); ha 4212 drivers/scsi/qla1280.c if (!ha->request_ring) { ha 4217 drivers/scsi/qla1280.c ha->response_ring = dma_alloc_coherent(&ha->pdev->dev, ha 4219 drivers/scsi/qla1280.c &ha->response_dma, GFP_KERNEL); ha 4220 drivers/scsi/qla1280.c if (!ha->response_ring) { ha 4225 drivers/scsi/qla1280.c ha->ports = bdp->numPorts; ha 4227 drivers/scsi/qla1280.c ha->host = host; ha 4228 drivers/scsi/qla1280.c ha->host_no = host->host_no; ha 4240 drivers/scsi/qla1280.c ha->mmpbase = pci_ioremap_bar(ha->pdev, 1); ha 4241 drivers/scsi/qla1280.c if (!ha->mmpbase) { ha 4246 drivers/scsi/qla1280.c host->base = (unsigned long)ha->mmpbase; ha 4247 drivers/scsi/qla1280.c ha->iobase = (struct device_reg __iomem *)ha->mmpbase; ha 4249 drivers/scsi/qla1280.c host->io_port = pci_resource_start(ha->pdev, 0); ha 4257 drivers/scsi/qla1280.c ha->iobase = (struct device_reg *)host->io_port; ha 4260 drivers/scsi/qla1280.c INIT_LIST_HEAD(&ha->done_q); ha 4263 drivers/scsi/qla1280.c qla1280_disable_intrs(ha); ha 4266 drivers/scsi/qla1280.c "qla1280", ha)) { ha 4273 drivers/scsi/qla1280.c if (qla1280_initialize_adapter(ha)) { ha 4279 drivers/scsi/qla1280.c host->this_id = ha->bus_settings[0].id; ha 4291 drivers/scsi/qla1280.c qla1280_disable_intrs(ha); ha 4293 drivers/scsi/qla1280.c free_irq(pdev->irq, ha); ha 4296 drivers/scsi/qla1280.c iounmap(ha->mmpbase); ha 4301 drivers/scsi/qla1280.c dma_free_coherent(&ha->pdev->dev, ha 4303 drivers/scsi/qla1280.c ha->response_ring, ha->response_dma); ha 4305 drivers/scsi/qla1280.c dma_free_coherent(&ha->pdev->dev, ha 4307 drivers/scsi/qla1280.c ha->request_ring, ha->request_dma); ha 4321 drivers/scsi/qla1280.c struct scsi_qla_host *ha = (struct scsi_qla_host *)host->hostdata; ha 4325 drivers/scsi/qla1280.c qla1280_disable_intrs(ha); ha 4327 drivers/scsi/qla1280.c free_irq(pdev->irq, ha); ha 4330 drivers/scsi/qla1280.c iounmap(ha->mmpbase); ha 4335 drivers/scsi/qla1280.c dma_free_coherent(&ha->pdev->dev, ha 4337 drivers/scsi/qla1280.c ha->request_ring, ha->request_dma); ha 4338 drivers/scsi/qla1280.c dma_free_coherent(&ha->pdev->dev, ha 4340 drivers/scsi/qla1280.c ha->response_ring, ha->response_dma); ha 26 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 29 drivers/scsi/qla2xxx/qla_attr.c if (!(ha->fw_dump_reading || ha->mctp_dump_reading)) ha 32 drivers/scsi/qla2xxx/qla_attr.c mutex_lock(&ha->optrom_mutex); ha 33 drivers/scsi/qla2xxx/qla_attr.c if (IS_P3P_TYPE(ha)) { ha 34 drivers/scsi/qla2xxx/qla_attr.c if (off < ha->md_template_size) { ha 36 drivers/scsi/qla2xxx/qla_attr.c &off, ha->md_tmplt_hdr, ha->md_template_size); ha 38 drivers/scsi/qla2xxx/qla_attr.c off -= ha->md_template_size; ha 40 drivers/scsi/qla2xxx/qla_attr.c &off, ha->md_dump, ha->md_dump_size); ha 42 drivers/scsi/qla2xxx/qla_attr.c } else if (ha->mctp_dumped && ha->mctp_dump_reading) { ha 43 drivers/scsi/qla2xxx/qla_attr.c rval = memory_read_from_buffer(buf, count, &off, ha->mctp_dump, ha 45 drivers/scsi/qla2xxx/qla_attr.c } else if (ha->fw_dump_reading) { ha 46 drivers/scsi/qla2xxx/qla_attr.c rval = memory_read_from_buffer(buf, count, &off, ha->fw_dump, ha 47 drivers/scsi/qla2xxx/qla_attr.c ha->fw_dump_len); ha 51 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 62 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 71 drivers/scsi/qla2xxx/qla_attr.c if (!ha->fw_dump_reading) ha 77 drivers/scsi/qla2xxx/qla_attr.c if (IS_P3P_TYPE(ha)) { ha 81 drivers/scsi/qla2xxx/qla_attr.c ha->fw_dump_reading = 0; ha 82 drivers/scsi/qla2xxx/qla_attr.c ha->fw_dumped = 0; ha 85 drivers/scsi/qla2xxx/qla_attr.c if (ha->fw_dumped && !ha->fw_dump_reading) { ha 86 drivers/scsi/qla2xxx/qla_attr.c ha->fw_dump_reading = 1; ha 97 drivers/scsi/qla2xxx/qla_attr.c if (IS_QLA82XX(ha)) { ha 98 drivers/scsi/qla2xxx/qla_attr.c qla82xx_idc_lock(ha); ha 100 drivers/scsi/qla2xxx/qla_attr.c qla82xx_idc_unlock(ha); ha 101 drivers/scsi/qla2xxx/qla_attr.c } else if (IS_QLA8044(ha)) { ha 102 drivers/scsi/qla2xxx/qla_attr.c qla8044_idc_lock(ha); ha 104 drivers/scsi/qla2xxx/qla_attr.c qla8044_idc_unlock(ha); ha 109 drivers/scsi/qla2xxx/qla_attr.c if (IS_P3P_TYPE(ha)) { ha 110 drivers/scsi/qla2xxx/qla_attr.c if (ha->md_tmplt_hdr) ha 119 drivers/scsi/qla2xxx/qla_attr.c if (IS_P3P_TYPE(ha)) ha 123 drivers/scsi/qla2xxx/qla_attr.c if (!ha->mctp_dump_reading) ha 127 drivers/scsi/qla2xxx/qla_attr.c ha->mctp_dump_reading = 0; ha 128 drivers/scsi/qla2xxx/qla_attr.c ha->mctp_dumped = 0; ha 131 drivers/scsi/qla2xxx/qla_attr.c if (ha->mctp_dumped && !ha->mctp_dump_reading) { ha 132 drivers/scsi/qla2xxx/qla_attr.c ha->mctp_dump_reading = 1; ha 159 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 166 drivers/scsi/qla2xxx/qla_attr.c mutex_lock(&ha->optrom_mutex); ha 168 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 172 drivers/scsi/qla2xxx/qla_attr.c if (!IS_NOCACHE_VPD_TYPE(ha)) { ha 173 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 177 drivers/scsi/qla2xxx/qla_attr.c faddr = ha->flt_region_nvram; ha 178 drivers/scsi/qla2xxx/qla_attr.c if (IS_QLA28XX(ha)) { ha 181 drivers/scsi/qla2xxx/qla_attr.c faddr = ha->flt_region_nvram_sec; ha 183 drivers/scsi/qla2xxx/qla_attr.c ha->isp_ops->read_optrom(vha, ha->nvram, faddr << 2, ha->nvram_size); ha 185 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 188 drivers/scsi/qla2xxx/qla_attr.c return memory_read_from_buffer(buf, count, &off, ha->nvram, ha 189 drivers/scsi/qla2xxx/qla_attr.c ha->nvram_size); ha 199 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 202 drivers/scsi/qla2xxx/qla_attr.c if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->nvram_size || ha 203 drivers/scsi/qla2xxx/qla_attr.c !ha->isp_ops->write_nvram) ha 207 drivers/scsi/qla2xxx/qla_attr.c if (IS_FWI2_CAPABLE(ha)) { ha 235 drivers/scsi/qla2xxx/qla_attr.c mutex_lock(&ha->optrom_mutex); ha 237 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 242 drivers/scsi/qla2xxx/qla_attr.c ha->isp_ops->write_nvram(vha, buf, ha->nvram_base, count); ha 243 drivers/scsi/qla2xxx/qla_attr.c ha->isp_ops->read_nvram(vha, ha->nvram, ha->nvram_base, ha 245 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 274 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 277 drivers/scsi/qla2xxx/qla_attr.c mutex_lock(&ha->optrom_mutex); ha 279 drivers/scsi/qla2xxx/qla_attr.c if (ha->optrom_state != QLA_SREADING) ha 282 drivers/scsi/qla2xxx/qla_attr.c rval = memory_read_from_buffer(buf, count, &off, ha->optrom_buffer, ha 283 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_region_size); ha 286 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 298 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 300 drivers/scsi/qla2xxx/qla_attr.c mutex_lock(&ha->optrom_mutex); ha 302 drivers/scsi/qla2xxx/qla_attr.c if (ha->optrom_state != QLA_SWRITING) { ha 303 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 306 drivers/scsi/qla2xxx/qla_attr.c if (off > ha->optrom_region_size) { ha 307 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 310 drivers/scsi/qla2xxx/qla_attr.c if (off + count > ha->optrom_region_size) ha 311 drivers/scsi/qla2xxx/qla_attr.c count = ha->optrom_region_size - off; ha 313 drivers/scsi/qla2xxx/qla_attr.c memcpy(&ha->optrom_buffer[off], buf, count); ha 314 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 336 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 338 drivers/scsi/qla2xxx/qla_attr.c uint32_t size = ha->optrom_size; ha 345 drivers/scsi/qla2xxx/qla_attr.c if (unlikely(pci_channel_offline(ha->pdev))) ha 350 drivers/scsi/qla2xxx/qla_attr.c if (start > ha->optrom_size) ha 352 drivers/scsi/qla2xxx/qla_attr.c if (size > ha->optrom_size - start) ha 353 drivers/scsi/qla2xxx/qla_attr.c size = ha->optrom_size - start; ha 355 drivers/scsi/qla2xxx/qla_attr.c mutex_lock(&ha->optrom_mutex); ha 357 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 362 drivers/scsi/qla2xxx/qla_attr.c if (ha->optrom_state != QLA_SREADING && ha 363 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_state != QLA_SWRITING) { ha 367 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_state = QLA_SWAITING; ha 371 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_region_size); ha 373 drivers/scsi/qla2xxx/qla_attr.c vfree(ha->optrom_buffer); ha 374 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_buffer = NULL; ha 377 drivers/scsi/qla2xxx/qla_attr.c if (ha->optrom_state != QLA_SWAITING) { ha 382 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_region_start = start; ha 383 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_region_size = size; ha 385 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_state = QLA_SREADING; ha 386 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_buffer = vzalloc(ha->optrom_region_size); ha 387 drivers/scsi/qla2xxx/qla_attr.c if (ha->optrom_buffer == NULL) { ha 390 drivers/scsi/qla2xxx/qla_attr.c "(%x).\n", ha->optrom_region_size); ha 392 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_state = QLA_SWAITING; ha 406 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_region_start, ha->optrom_region_size); ha 408 drivers/scsi/qla2xxx/qla_attr.c ha->isp_ops->read_optrom(vha, ha->optrom_buffer, ha 409 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_region_start, ha->optrom_region_size); ha 412 drivers/scsi/qla2xxx/qla_attr.c if (ha->optrom_state != QLA_SWAITING) { ha 442 drivers/scsi/qla2xxx/qla_attr.c if (ha->optrom_size == OPTROM_SIZE_2300 && start == 0) ha 444 drivers/scsi/qla2xxx/qla_attr.c else if (IS_QLA24XX_TYPE(ha) || IS_QLA25XX(ha)) ha 453 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_region_start = start; ha 454 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_region_size = size; ha 456 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_state = QLA_SWRITING; ha 457 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_buffer = vzalloc(ha->optrom_region_size); ha 458 drivers/scsi/qla2xxx/qla_attr.c if (ha->optrom_buffer == NULL) { ha 461 drivers/scsi/qla2xxx/qla_attr.c "(%x)\n", ha->optrom_region_size); ha 463 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_state = QLA_SWAITING; ha 470 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_region_start, ha->optrom_region_size); ha 474 drivers/scsi/qla2xxx/qla_attr.c if (ha->optrom_state != QLA_SWRITING) { ha 488 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_region_start, ha->optrom_region_size); ha 490 drivers/scsi/qla2xxx/qla_attr.c rval = ha->isp_ops->write_optrom(vha, ha->optrom_buffer, ha 491 drivers/scsi/qla2xxx/qla_attr.c ha->optrom_region_start, ha->optrom_region_size); ha 500 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 520 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 524 drivers/scsi/qla2xxx/qla_attr.c if (unlikely(pci_channel_offline(ha->pdev))) ha 530 drivers/scsi/qla2xxx/qla_attr.c if (IS_NOCACHE_VPD_TYPE(ha)) ha 533 drivers/scsi/qla2xxx/qla_attr.c faddr = ha->flt_region_vpd << 2; ha 535 drivers/scsi/qla2xxx/qla_attr.c if (IS_QLA28XX(ha)) { ha 538 drivers/scsi/qla2xxx/qla_attr.c faddr = ha->flt_region_vpd_sec << 2; ha 546 drivers/scsi/qla2xxx/qla_attr.c mutex_lock(&ha->optrom_mutex); ha 548 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 552 drivers/scsi/qla2xxx/qla_attr.c ha->isp_ops->read_optrom(vha, ha->vpd, faddr, ha->vpd_size); ha 553 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 555 drivers/scsi/qla2xxx/qla_attr.c ha->isp_ops->read_optrom(vha, ha->vpd, faddr, ha->vpd_size); ha 557 drivers/scsi/qla2xxx/qla_attr.c return memory_read_from_buffer(buf, count, &off, ha->vpd, ha->vpd_size); ha 567 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 570 drivers/scsi/qla2xxx/qla_attr.c if (unlikely(pci_channel_offline(ha->pdev))) ha 576 drivers/scsi/qla2xxx/qla_attr.c if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->vpd_size || ha 577 drivers/scsi/qla2xxx/qla_attr.c !ha->isp_ops->write_nvram) ha 586 drivers/scsi/qla2xxx/qla_attr.c mutex_lock(&ha->optrom_mutex); ha 588 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 593 drivers/scsi/qla2xxx/qla_attr.c ha->isp_ops->write_nvram(vha, buf, ha->vpd_base, count); ha 594 drivers/scsi/qla2xxx/qla_attr.c ha->isp_ops->read_nvram(vha, ha->vpd, ha->vpd_base, count); ha 597 drivers/scsi/qla2xxx/qla_attr.c if (!IS_FWI2_CAPABLE(ha)) { ha 598 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 604 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 609 drivers/scsi/qla2xxx/qla_attr.c ha->isp_ops->get_flash_version(vha, tmp_data); ha 612 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->optrom_mutex); ha 670 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 671 drivers/scsi/qla2xxx/qla_attr.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 686 drivers/scsi/qla2xxx/qla_attr.c if (IS_QLA82XX(ha)) { ha 687 drivers/scsi/qla2xxx/qla_attr.c ha->flags.isp82xx_no_md_cap = 1; ha 688 drivers/scsi/qla2xxx/qla_attr.c qla82xx_idc_lock(ha); ha 690 drivers/scsi/qla2xxx/qla_attr.c qla82xx_idc_unlock(ha); ha 691 drivers/scsi/qla2xxx/qla_attr.c } else if (IS_QLA8044(ha)) { ha 692 drivers/scsi/qla2xxx/qla_attr.c qla8044_idc_lock(ha); ha 693 drivers/scsi/qla2xxx/qla_attr.c idc_control = qla8044_rd_reg(ha, ha 695 drivers/scsi/qla2xxx/qla_attr.c qla8044_wr_reg(ha, QLA8044_IDC_DRV_CTRL, ha 698 drivers/scsi/qla2xxx/qla_attr.c qla8044_idc_unlock(ha); ha 707 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA81XX(ha) && !IS_QLA83XX(ha)) ha 713 drivers/scsi/qla2xxx/qla_attr.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 739 drivers/scsi/qla2xxx/qla_attr.c if (!IS_P3P_TYPE(ha) || vha != base_vha) { ha 752 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA8031(ha)) ha 763 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA8031(ha)) ha 783 drivers/scsi/qla2xxx/qla_attr.c ha->isp_ops->get_flash_version(vha, tmp_data); ha 849 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 856 drivers/scsi/qla2xxx/qla_attr.c if (unlikely(pci_channel_offline(ha->pdev))) ha 864 drivers/scsi/qla2xxx/qla_attr.c if (ha->xgmac_data) ha 867 drivers/scsi/qla2xxx/qla_attr.c ha->xgmac_data = dma_alloc_coherent(&ha->pdev->dev, XGMAC_DATA_SIZE, ha 868 drivers/scsi/qla2xxx/qla_attr.c &ha->xgmac_data_dma, GFP_KERNEL); ha 869 drivers/scsi/qla2xxx/qla_attr.c if (!ha->xgmac_data) { ha 878 drivers/scsi/qla2xxx/qla_attr.c memset(ha->xgmac_data, 0, XGMAC_DATA_SIZE); ha 880 drivers/scsi/qla2xxx/qla_attr.c rval = qla2x00_get_xgmac_stats(vha, ha->xgmac_data_dma, ha 891 drivers/scsi/qla2xxx/qla_attr.c memcpy(buf, ha->xgmac_data, count); ha 912 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 918 drivers/scsi/qla2xxx/qla_attr.c if (ha->dcbx_tlv) ha 926 drivers/scsi/qla2xxx/qla_attr.c ha->dcbx_tlv = dma_alloc_coherent(&ha->pdev->dev, DCBX_TLV_DATA_SIZE, ha 927 drivers/scsi/qla2xxx/qla_attr.c &ha->dcbx_tlv_dma, GFP_KERNEL); ha 928 drivers/scsi/qla2xxx/qla_attr.c if (!ha->dcbx_tlv) { ha 936 drivers/scsi/qla2xxx/qla_attr.c memset(ha->dcbx_tlv, 0, DCBX_TLV_DATA_SIZE); ha 938 drivers/scsi/qla2xxx/qla_attr.c rval = qla2x00_get_dcbx_params(vha, ha->dcbx_tlv_dma, ha 949 drivers/scsi/qla2xxx/qla_attr.c memcpy(buf, ha->dcbx_tlv, count); ha 1014 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1017 drivers/scsi/qla2xxx/qla_attr.c if (iter->type && !IS_FWI2_CAPABLE(ha)) ha 1019 drivers/scsi/qla2xxx/qla_attr.c if (iter->type == 2 && !IS_QLA25XX(ha)) ha 1021 drivers/scsi/qla2xxx/qla_attr.c if (iter->type == 3 && !(IS_CNA_CAPABLE(ha))) ha 1024 drivers/scsi/qla2xxx/qla_attr.c (!IS_QLA27XX(ha) || !IS_QLA28XX(ha))) ha 1031 drivers/scsi/qla2xxx/qla_attr.c if (stop_beacon && ha->beacon_blink_led == 1) ha 1032 drivers/scsi/qla2xxx/qla_attr.c ha->isp_ops->beacon_off(vha); ha 1049 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1053 drivers/scsi/qla2xxx/qla_attr.c ha->isp_ops->fw_version_str(vha, fw_str, sizeof(fw_str))); ha 1061 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1067 drivers/scsi/qla2xxx/qla_attr.c } else if (IS_FWI2_CAPABLE(ha)) { ha 1072 drivers/scsi/qla2xxx/qla_attr.c sn = ((ha->serial0 & 0x1f) << 16) | (ha->serial2 << 8) | ha->serial1; ha 1091 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1098 drivers/scsi/qla2xxx/qla_attr.c ha->product_id[0], ha->product_id[1], ha->product_id[2], ha 1099 drivers/scsi/qla2xxx/qla_attr.c ha->product_id[3]); ha 1137 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1150 drivers/scsi/qla2xxx/qla_attr.c switch (ha->current_topology) { ha 1195 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1199 drivers/scsi/qla2xxx/qla_attr.c if (!IS_ZIO_SUPPORTED(ha)) ha 1211 drivers/scsi/qla2xxx/qla_attr.c if (zio_mode != QLA_ZIO_DISABLED || ha->zio_mode != QLA_ZIO_DISABLED) { ha 1212 drivers/scsi/qla2xxx/qla_attr.c ha->zio_mode = zio_mode; ha 1293 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1297 drivers/scsi/qla2xxx/qla_attr.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) ha 1312 drivers/scsi/qla2xxx/qla_attr.c rval = ha->isp_ops->beacon_on(vha); ha 1314 drivers/scsi/qla2xxx/qla_attr.c rval = ha->isp_ops->beacon_off(vha); ha 1329 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1331 drivers/scsi/qla2xxx/qla_attr.c return scnprintf(buf, PAGE_SIZE, "%d.%02d\n", ha->bios_revision[1], ha 1332 drivers/scsi/qla2xxx/qla_attr.c ha->bios_revision[0]); ha 1340 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1342 drivers/scsi/qla2xxx/qla_attr.c return scnprintf(buf, PAGE_SIZE, "%d.%02d\n", ha->efi_revision[1], ha 1343 drivers/scsi/qla2xxx/qla_attr.c ha->efi_revision[0]); ha 1351 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1353 drivers/scsi/qla2xxx/qla_attr.c return scnprintf(buf, PAGE_SIZE, "%d.%02d\n", ha->fcode_revision[1], ha 1354 drivers/scsi/qla2xxx/qla_attr.c ha->fcode_revision[0]); ha 1362 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1365 drivers/scsi/qla2xxx/qla_attr.c ha->fw_revision[0], ha->fw_revision[1], ha->fw_revision[2], ha 1366 drivers/scsi/qla2xxx/qla_attr.c ha->fw_revision[3]); ha 1374 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1376 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA81XX(ha) && !IS_QLA83XX(ha) && ha 1377 drivers/scsi/qla2xxx/qla_attr.c !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 1381 drivers/scsi/qla2xxx/qla_attr.c ha->gold_fw_version[0], ha->gold_fw_version[1], ha 1382 drivers/scsi/qla2xxx/qla_attr.c ha->gold_fw_version[2], ha->gold_fw_version[3]); ha 1402 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1404 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA84XX(ha)) ha 1407 drivers/scsi/qla2xxx/qla_attr.c if (!ha->cs84xx->op_fw_version) { ha 1412 drivers/scsi/qla2xxx/qla_attr.c (uint32_t)ha->cs84xx->op_fw_version); ha 1423 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1425 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 1429 drivers/scsi/qla2xxx/qla_attr.c ha->serdes_version[0], ha->serdes_version[1], ha 1430 drivers/scsi/qla2xxx/qla_attr.c ha->serdes_version[2]); ha 1438 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1440 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA81XX(ha) && !IS_QLA8031(ha) && !IS_QLA8044(ha) && ha 1441 drivers/scsi/qla2xxx/qla_attr.c !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 1445 drivers/scsi/qla2xxx/qla_attr.c ha->mpi_version[0], ha->mpi_version[1], ha->mpi_version[2], ha 1446 drivers/scsi/qla2xxx/qla_attr.c ha->mpi_capabilities); ha 1454 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1456 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA81XX(ha) && !IS_QLA8031(ha)) ha 1460 drivers/scsi/qla2xxx/qla_attr.c ha->phy_version[0], ha->phy_version[1], ha->phy_version[2]); ha 1468 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1470 drivers/scsi/qla2xxx/qla_attr.c return scnprintf(buf, PAGE_SIZE, "0x%x\n", ha->fdt_block_size); ha 1603 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1606 drivers/scsi/qla2xxx/qla_attr.c if (!ha->fw_dumped) ha 1608 drivers/scsi/qla2xxx/qla_attr.c else if (IS_P3P_TYPE(ha)) ha 1609 drivers/scsi/qla2xxx/qla_attr.c size = ha->md_template_size + ha->md_dump_size; ha 1611 drivers/scsi/qla2xxx/qla_attr.c size = ha->fw_dump_len; ha 1652 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1654 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 1658 drivers/scsi/qla2xxx/qla_attr.c ha->pep_version[0], ha->pep_version[1], ha->pep_version[2]); ha 1666 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1668 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 1672 drivers/scsi/qla2xxx/qla_attr.c ha->min_supported_speed == 6 ? "64Gps" : ha 1673 drivers/scsi/qla2xxx/qla_attr.c ha->min_supported_speed == 5 ? "32Gps" : ha 1674 drivers/scsi/qla2xxx/qla_attr.c ha->min_supported_speed == 4 ? "16Gps" : ha 1675 drivers/scsi/qla2xxx/qla_attr.c ha->min_supported_speed == 3 ? "8Gps" : ha 1676 drivers/scsi/qla2xxx/qla_attr.c ha->min_supported_speed == 2 ? "4Gps" : ha 1677 drivers/scsi/qla2xxx/qla_attr.c ha->min_supported_speed != 0 ? "unknown" : ""); ha 1685 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1687 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 1691 drivers/scsi/qla2xxx/qla_attr.c ha->max_supported_speed == 2 ? "64Gps" : ha 1692 drivers/scsi/qla2xxx/qla_attr.c ha->max_supported_speed == 1 ? "32Gps" : ha 1693 drivers/scsi/qla2xxx/qla_attr.c ha->max_supported_speed == 0 ? "16Gps" : "unknown"); ha 1704 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1706 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) { ha 1724 drivers/scsi/qla2xxx/qla_attr.c oldspeed = ha->set_data_rate; ha 1728 drivers/scsi/qla2xxx/qla_attr.c ha->set_data_rate = PORT_SPEED_AUTO; ha 1731 drivers/scsi/qla2xxx/qla_attr.c ha->set_data_rate = PORT_SPEED_4GB; ha 1734 drivers/scsi/qla2xxx/qla_attr.c ha->set_data_rate = PORT_SPEED_8GB; ha 1737 drivers/scsi/qla2xxx/qla_attr.c ha->set_data_rate = PORT_SPEED_16GB; ha 1740 drivers/scsi/qla2xxx/qla_attr.c ha->set_data_rate = PORT_SPEED_32GB; ha 1746 drivers/scsi/qla2xxx/qla_attr.c ha->set_data_rate = PORT_SPEED_AUTO; ha 1749 drivers/scsi/qla2xxx/qla_attr.c if (qla2x00_chip_is_down(vha) || (oldspeed == ha->set_data_rate)) ha 1767 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 1778 drivers/scsi/qla2xxx/qla_attr.c return scnprintf(buf, PAGE_SIZE, "%s\n", spd[ha->link_data_rate]); ha 2213 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 2217 drivers/scsi/qla2xxx/qla_attr.c ha->dif_bundle_crossed_pages, ha->dif_bundle_reads, ha 2218 drivers/scsi/qla2xxx/qla_attr.c ha->dif_bundle_writes, ha->dif_bundle_kallocs, ha 2219 drivers/scsi/qla2xxx/qla_attr.c ha->dif_bundle_dma_allocs, ha->pool.unusable.count); ha 2227 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 2229 drivers/scsi/qla2xxx/qla_attr.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 2233 drivers/scsi/qla2xxx/qla_attr.c (uint64_t)ha->fw_attributes_ext[1] << 48 | ha 2234 drivers/scsi/qla2xxx/qla_attr.c (uint64_t)ha->fw_attributes_ext[0] << 32 | ha 2235 drivers/scsi/qla2xxx/qla_attr.c (uint64_t)ha->fw_attributes_h << 16 | ha 2236 drivers/scsi/qla2xxx/qla_attr.c (uint64_t)ha->fw_attributes); ha 2604 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 2605 drivers/scsi/qla2xxx/qla_attr.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 2619 drivers/scsi/qla2xxx/qla_attr.c if (unlikely(pci_channel_offline(ha->pdev))) ha 2625 drivers/scsi/qla2xxx/qla_attr.c stats = dma_alloc_coherent(&ha->pdev->dev, sizeof(*stats), &stats_dma, ha 2634 drivers/scsi/qla2xxx/qla_attr.c if (IS_FWI2_CAPABLE(ha)) { ha 2637 drivers/scsi/qla2xxx/qla_attr.c !ha->dpc_active) { ha 2652 drivers/scsi/qla2xxx/qla_attr.c if (IS_FWI2_CAPABLE(ha)) { ha 2673 drivers/scsi/qla2xxx/qla_attr.c dma_free_coherent(&ha->pdev->dev, sizeof(struct link_statistics), ha 2683 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 2684 drivers/scsi/qla2xxx/qla_attr.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 2693 drivers/scsi/qla2xxx/qla_attr.c if (IS_FWI2_CAPABLE(ha)) { ha 2694 drivers/scsi/qla2xxx/qla_attr.c stats = dma_alloc_coherent(&ha->pdev->dev, ha 2705 drivers/scsi/qla2xxx/qla_attr.c dma_free_coherent(&ha->pdev->dev, sizeof(*stats), ha 2782 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = base_vha->hw; ha 2784 drivers/scsi/qla2xxx/qla_attr.c struct req_que *req = ha->req_q_map[0]; ha 2824 drivers/scsi/qla2xxx/qla_attr.c if (IS_T10_PI_CAPABLE(ha) && ql2xenabledif) { ha 2825 drivers/scsi/qla2xxx/qla_attr.c if (ha->fw_attributes & BIT_4) { ha 2843 drivers/scsi/qla2xxx/qla_attr.c if (IS_PI_IPGUARD_CAPABLE(ha) && ha 2844 drivers/scsi/qla2xxx/qla_attr.c (ql2xenabledif > 1 || IS_PI_DIFB_DIX0_CAPABLE(ha))) ha 2853 drivers/scsi/qla2xxx/qla_attr.c &ha->pdev->dev)) { ha 2860 drivers/scsi/qla2xxx/qla_attr.c fc_host_dev_loss_tmo(vha->host) = ha->port_down_retry_count; ha 2868 drivers/scsi/qla2xxx/qla_attr.c qlt_vport_create(vha, ha); ha 2871 drivers/scsi/qla2xxx/qla_attr.c if (!ql2xmqsupport || !ha->npiv_info) ha 2875 drivers/scsi/qla2xxx/qla_attr.c for (cnt = 0; cnt < ha->nvram_npiv_size; cnt++) { ha 2876 drivers/scsi/qla2xxx/qla_attr.c if (memcmp(ha->npiv_info[cnt].port_name, vha->port_name, 8) == 0 ha 2877 drivers/scsi/qla2xxx/qla_attr.c && memcmp(ha->npiv_info[cnt].node_name, vha->node_name, ha 2879 drivers/scsi/qla2xxx/qla_attr.c qos = ha->npiv_info[cnt].q_qos; ha 2917 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 2933 drivers/scsi/qla2xxx/qla_attr.c qlt_remove_target(ha, vha); ha 2950 drivers/scsi/qla2xxx/qla_attr.c mutex_lock(&ha->vport_lock); ha 2951 drivers/scsi/qla2xxx/qla_attr.c ha->cur_vport_count--; ha 2952 drivers/scsi/qla2xxx/qla_attr.c clear_bit(vha->vp_idx, ha->vp_idx_map); ha 2953 drivers/scsi/qla2xxx/qla_attr.c mutex_unlock(&ha->vport_lock); ha 2955 drivers/scsi/qla2xxx/qla_attr.c dma_free_coherent(&ha->pdev->dev, vha->gnl.size, vha->gnl.l, ha 3081 drivers/scsi/qla2xxx/qla_attr.c struct qla_hw_data *ha = vha->hw; ha 3084 drivers/scsi/qla2xxx/qla_attr.c fc_host_dev_loss_tmo(vha->host) = ha->port_down_retry_count; ha 3087 drivers/scsi/qla2xxx/qla_attr.c fc_host_supported_classes(vha->host) = ha->base_qpair->enable_class_2 ? ha 3089 drivers/scsi/qla2xxx/qla_attr.c fc_host_max_npiv_vports(vha->host) = ha->max_npiv_vports; ha 3090 drivers/scsi/qla2xxx/qla_attr.c fc_host_npiv_vports_inuse(vha->host) = ha->cur_vport_count; ha 3092 drivers/scsi/qla2xxx/qla_attr.c if (IS_CNA_CAPABLE(ha)) ha 3094 drivers/scsi/qla2xxx/qla_attr.c else if (IS_QLA28XX(ha) || IS_QLA27XX(ha)) { ha 3095 drivers/scsi/qla2xxx/qla_attr.c if (ha->max_supported_speed == 2) { ha 3096 drivers/scsi/qla2xxx/qla_attr.c if (ha->min_supported_speed <= 6) ha 3099 drivers/scsi/qla2xxx/qla_attr.c if (ha->max_supported_speed == 2 || ha 3100 drivers/scsi/qla2xxx/qla_attr.c ha->max_supported_speed == 1) { ha 3101 drivers/scsi/qla2xxx/qla_attr.c if (ha->min_supported_speed <= 5) ha 3104 drivers/scsi/qla2xxx/qla_attr.c if (ha->max_supported_speed == 2 || ha 3105 drivers/scsi/qla2xxx/qla_attr.c ha->max_supported_speed == 1 || ha 3106 drivers/scsi/qla2xxx/qla_attr.c ha->max_supported_speed == 0) { ha 3107 drivers/scsi/qla2xxx/qla_attr.c if (ha->min_supported_speed <= 4) ha 3110 drivers/scsi/qla2xxx/qla_attr.c if (ha->max_supported_speed == 1 || ha 3111 drivers/scsi/qla2xxx/qla_attr.c ha->max_supported_speed == 0) { ha 3112 drivers/scsi/qla2xxx/qla_attr.c if (ha->min_supported_speed <= 3) ha 3115 drivers/scsi/qla2xxx/qla_attr.c if (ha->max_supported_speed == 0) { ha 3116 drivers/scsi/qla2xxx/qla_attr.c if (ha->min_supported_speed <= 2) ha 3119 drivers/scsi/qla2xxx/qla_attr.c } else if (IS_QLA2031(ha)) ha 3122 drivers/scsi/qla2xxx/qla_attr.c else if (IS_QLA25XX(ha) || IS_QLAFX00(ha)) ha 3125 drivers/scsi/qla2xxx/qla_attr.c else if (IS_QLA24XX_TYPE(ha)) ha 3128 drivers/scsi/qla2xxx/qla_attr.c else if (IS_QLA23XX(ha)) ha 28 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = sp->vha->hw; ha 38 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, ha 43 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, ha 47 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, ha 50 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, ha 122 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 127 drivers/scsi/qla2xxx/qla_bsg.c if (!(IS_QLA24XX_TYPE(ha) || IS_QLA25XX(ha) || IS_P3P_TYPE(ha))) { ha 136 drivers/scsi/qla2xxx/qla_bsg.c if (!ha->fcp_prio_cfg && (oper != QLFC_FCP_PRIO_SET_CONFIG)) { ha 142 drivers/scsi/qla2xxx/qla_bsg.c if (ha->flags.fcp_prio_enabled) { ha 143 drivers/scsi/qla2xxx/qla_bsg.c ha->flags.fcp_prio_enabled = 0; ha 144 drivers/scsi/qla2xxx/qla_bsg.c ha->fcp_prio_cfg->attributes &= ha 156 drivers/scsi/qla2xxx/qla_bsg.c if (!ha->flags.fcp_prio_enabled) { ha 157 drivers/scsi/qla2xxx/qla_bsg.c if (ha->fcp_prio_cfg) { ha 158 drivers/scsi/qla2xxx/qla_bsg.c ha->flags.fcp_prio_enabled = 1; ha 159 drivers/scsi/qla2xxx/qla_bsg.c ha->fcp_prio_cfg->attributes |= ha 183 drivers/scsi/qla2xxx/qla_bsg.c bsg_job->reply_payload.sg_cnt, ha->fcp_prio_cfg, ha 196 drivers/scsi/qla2xxx/qla_bsg.c if (!ha->fcp_prio_cfg) { ha 197 drivers/scsi/qla2xxx/qla_bsg.c ha->fcp_prio_cfg = vmalloc(FCP_PRIO_CFG_SIZE); ha 198 drivers/scsi/qla2xxx/qla_bsg.c if (!ha->fcp_prio_cfg) { ha 208 drivers/scsi/qla2xxx/qla_bsg.c memset(ha->fcp_prio_cfg, 0, FCP_PRIO_CFG_SIZE); ha 210 drivers/scsi/qla2xxx/qla_bsg.c bsg_job->request_payload.sg_cnt, ha->fcp_prio_cfg, ha 216 drivers/scsi/qla2xxx/qla_bsg.c (struct qla_fcp_prio_cfg *) ha->fcp_prio_cfg, 1)) { ha 222 drivers/scsi/qla2xxx/qla_bsg.c vfree(ha->fcp_prio_cfg); ha 223 drivers/scsi/qla2xxx/qla_bsg.c ha->fcp_prio_cfg = NULL; ha 227 drivers/scsi/qla2xxx/qla_bsg.c ha->flags.fcp_prio_enabled = 0; ha 228 drivers/scsi/qla2xxx/qla_bsg.c if (ha->fcp_prio_cfg->attributes & FCP_PRIO_ATTR_ENABLE) ha 229 drivers/scsi/qla2xxx/qla_bsg.c ha->flags.fcp_prio_enabled = 1; ha 252 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha; ha 264 drivers/scsi/qla2xxx/qla_bsg.c ha = vha->hw; ha 269 drivers/scsi/qla2xxx/qla_bsg.c ha = vha->hw; ha 280 drivers/scsi/qla2xxx/qla_bsg.c if (!IS_FWI2_CAPABLE(ha)) { ha 337 drivers/scsi/qla2xxx/qla_bsg.c dma_map_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, ha 340 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, ha 346 drivers/scsi/qla2xxx/qla_bsg.c rsp_sg_cnt = dma_map_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, ha 349 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, ha 400 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, ha 402 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, ha 434 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 442 drivers/scsi/qla2xxx/qla_bsg.c dma_map_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, ha 451 drivers/scsi/qla2xxx/qla_bsg.c rsp_sg_cnt = dma_map_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, ha 550 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, ha 552 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, ha 566 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 568 drivers/scsi/qla2xxx/qla_bsg.c if (!IS_QLA81XX(ha) && !IS_QLA8031(ha) && !IS_QLA8044(ha)) ha 581 drivers/scsi/qla2xxx/qla_bsg.c ha->notify_dcbx_comp = wait; ha 582 drivers/scsi/qla2xxx/qla_bsg.c ha->notify_lb_portup_comp = wait2; ha 588 drivers/scsi/qla2xxx/qla_bsg.c ha->notify_dcbx_comp = 0; ha 589 drivers/scsi/qla2xxx/qla_bsg.c ha->notify_lb_portup_comp = 0; ha 595 drivers/scsi/qla2xxx/qla_bsg.c if (wait && !wait_for_completion_timeout(&ha->dcbx_comp, ha 599 drivers/scsi/qla2xxx/qla_bsg.c ha->notify_dcbx_comp = 0; ha 600 drivers/scsi/qla2xxx/qla_bsg.c ha->notify_lb_portup_comp = 0; ha 608 drivers/scsi/qla2xxx/qla_bsg.c !wait_for_completion_timeout(&ha->lb_portup_comp, ha 612 drivers/scsi/qla2xxx/qla_bsg.c ha->notify_lb_portup_comp = 0; ha 619 drivers/scsi/qla2xxx/qla_bsg.c ha->notify_dcbx_comp = 0; ha 620 drivers/scsi/qla2xxx/qla_bsg.c ha->notify_lb_portup_comp = 0; ha 637 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 639 drivers/scsi/qla2xxx/qla_bsg.c if (!IS_QLA81XX(ha) && !IS_QLA8031(ha) && !IS_QLA8044(ha)) ha 651 drivers/scsi/qla2xxx/qla_bsg.c ha->notify_dcbx_comp = 1; ha 656 drivers/scsi/qla2xxx/qla_bsg.c ha->notify_dcbx_comp = 0; ha 664 drivers/scsi/qla2xxx/qla_bsg.c rem_tmo = wait_for_completion_timeout(&ha->dcbx_comp, ha 666 drivers/scsi/qla2xxx/qla_bsg.c if (!ha->idc_extend_tmo || rem_tmo) { ha 667 drivers/scsi/qla2xxx/qla_bsg.c ha->idc_extend_tmo = 0; ha 670 drivers/scsi/qla2xxx/qla_bsg.c current_tmo = ha->idc_extend_tmo * HZ; ha 671 drivers/scsi/qla2xxx/qla_bsg.c ha->idc_extend_tmo = 0; ha 683 drivers/scsi/qla2xxx/qla_bsg.c ha->isp_ops->fw_dump(vha, 0); ha 688 drivers/scsi/qla2xxx/qla_bsg.c if (ha->flags.idc_compl_status) { ha 692 drivers/scsi/qla2xxx/qla_bsg.c ha->flags.idc_compl_status = 0; ha 698 drivers/scsi/qla2xxx/qla_bsg.c ha->notify_dcbx_comp = 0; ha 699 drivers/scsi/qla2xxx/qla_bsg.c ha->idc_extend_tmo = 0; ha 712 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 734 drivers/scsi/qla2xxx/qla_bsg.c elreq.req_sg_cnt = dma_map_sg(&ha->pdev->dev, ha 744 drivers/scsi/qla2xxx/qla_bsg.c elreq.rsp_sg_cnt = dma_map_sg(&ha->pdev->dev, ha 767 drivers/scsi/qla2xxx/qla_bsg.c req_data = dma_alloc_coherent(&ha->pdev->dev, req_data_len, ha 776 drivers/scsi/qla2xxx/qla_bsg.c rsp_data = dma_alloc_coherent(&ha->pdev->dev, rsp_data_len, ha 798 drivers/scsi/qla2xxx/qla_bsg.c (ha->current_topology == ISP_CFG_F || ha 808 drivers/scsi/qla2xxx/qla_bsg.c if (IS_QLA81XX(ha) || IS_QLA8031(ha) || IS_QLA8044(ha)) { ha 831 drivers/scsi/qla2xxx/qla_bsg.c if (IS_QLA8031(ha) || IS_QLA8044(ha)) ha 861 drivers/scsi/qla2xxx/qla_bsg.c if (IS_QLA81XX(ha)) { ha 887 drivers/scsi/qla2xxx/qla_bsg.c ha->isp_ops->fw_dump(vha, 0); ha 928 drivers/scsi/qla2xxx/qla_bsg.c dma_free_coherent(&ha->pdev->dev, rsp_data_len, ha 931 drivers/scsi/qla2xxx/qla_bsg.c dma_free_coherent(&ha->pdev->dev, req_data_len, ha 934 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, ha 938 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, ha 954 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 958 drivers/scsi/qla2xxx/qla_bsg.c if (!IS_QLA84XX(ha)) { ha 990 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 1001 drivers/scsi/qla2xxx/qla_bsg.c if (!IS_QLA84XX(ha)) { ha 1007 drivers/scsi/qla2xxx/qla_bsg.c sg_cnt = dma_map_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, ha 1025 drivers/scsi/qla2xxx/qla_bsg.c fw_buf = dma_alloc_coherent(&ha->pdev->dev, data_len, ha 1037 drivers/scsi/qla2xxx/qla_bsg.c mn = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &mn_dma); ha 1078 drivers/scsi/qla2xxx/qla_bsg.c dma_pool_free(ha->s_dma_pool, mn, mn_dma); ha 1081 drivers/scsi/qla2xxx/qla_bsg.c dma_free_coherent(&ha->pdev->dev, data_len, fw_buf, fw_dma); ha 1084 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, ha 1100 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 1110 drivers/scsi/qla2xxx/qla_bsg.c if (!IS_QLA84XX(ha)) { ha 1116 drivers/scsi/qla2xxx/qla_bsg.c mn = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &mn_dma); ha 1129 drivers/scsi/qla2xxx/qla_bsg.c sg_cnt = dma_map_sg(&ha->pdev->dev, ha 1152 drivers/scsi/qla2xxx/qla_bsg.c mgmt_b = dma_alloc_coherent(&ha->pdev->dev, data_len, ha 1179 drivers/scsi/qla2xxx/qla_bsg.c sg_cnt = dma_map_sg(&ha->pdev->dev, ha 1202 drivers/scsi/qla2xxx/qla_bsg.c mgmt_b = dma_alloc_coherent(&ha->pdev->dev, data_len, ha 1271 drivers/scsi/qla2xxx/qla_bsg.c dma_free_coherent(&ha->pdev->dev, data_len, mgmt_b, mgmt_dma); ha 1274 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, bsg_job->request_payload.sg_list, ha 1277 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list, ha 1281 drivers/scsi/qla2xxx/qla_bsg.c dma_pool_free(ha->s_dma_pool, mn, mn_dma); ha 1385 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 1387 drivers/scsi/qla2xxx/qla_bsg.c if (unlikely(pci_channel_offline(ha->pdev))) ha 1391 drivers/scsi/qla2xxx/qla_bsg.c if (start > ha->optrom_size) { ha 1393 drivers/scsi/qla2xxx/qla_bsg.c "start %d > optrom_size %d.\n", start, ha->optrom_size); ha 1397 drivers/scsi/qla2xxx/qla_bsg.c if (ha->optrom_state != QLA_SWAITING) { ha 1399 drivers/scsi/qla2xxx/qla_bsg.c "optrom_state %d.\n", ha->optrom_state); ha 1403 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_region_start = start; ha 1406 drivers/scsi/qla2xxx/qla_bsg.c if (ha->optrom_size == OPTROM_SIZE_2300 && start == 0) ha 1408 drivers/scsi/qla2xxx/qla_bsg.c else if (start == (ha->flt_region_boot * 4) || ha 1409 drivers/scsi/qla2xxx/qla_bsg.c start == (ha->flt_region_fw * 4)) ha 1411 drivers/scsi/qla2xxx/qla_bsg.c else if (IS_QLA24XX_TYPE(ha) || IS_QLA25XX(ha) || ha 1412 drivers/scsi/qla2xxx/qla_bsg.c IS_CNA_CAPABLE(ha) || IS_QLA2031(ha) || IS_QLA27XX(ha) || ha 1413 drivers/scsi/qla2xxx/qla_bsg.c IS_QLA28XX(ha)) ha 1422 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_region_size = start + ha 1423 drivers/scsi/qla2xxx/qla_bsg.c bsg_job->request_payload.payload_len > ha->optrom_size ? ha 1424 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_size - start : ha 1426 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_state = QLA_SWRITING; ha 1428 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_region_size = start + ha 1429 drivers/scsi/qla2xxx/qla_bsg.c bsg_job->reply_payload.payload_len > ha->optrom_size ? ha 1430 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_size - start : ha 1432 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_state = QLA_SREADING; ha 1435 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_buffer = vzalloc(ha->optrom_region_size); ha 1436 drivers/scsi/qla2xxx/qla_bsg.c if (!ha->optrom_buffer) { ha 1439 drivers/scsi/qla2xxx/qla_bsg.c "(%x)\n", ha->optrom_region_size); ha 1441 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_state = QLA_SWAITING; ha 1454 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 1457 drivers/scsi/qla2xxx/qla_bsg.c if (ha->flags.nic_core_reset_hdlr_active) ha 1460 drivers/scsi/qla2xxx/qla_bsg.c mutex_lock(&ha->optrom_mutex); ha 1463 drivers/scsi/qla2xxx/qla_bsg.c mutex_unlock(&ha->optrom_mutex); ha 1467 drivers/scsi/qla2xxx/qla_bsg.c ha->isp_ops->read_optrom(vha, ha->optrom_buffer, ha 1468 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_region_start, ha->optrom_region_size); ha 1471 drivers/scsi/qla2xxx/qla_bsg.c bsg_job->reply_payload.sg_cnt, ha->optrom_buffer, ha 1472 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_region_size); ha 1474 drivers/scsi/qla2xxx/qla_bsg.c bsg_reply->reply_payload_rcv_len = ha->optrom_region_size; ha 1476 drivers/scsi/qla2xxx/qla_bsg.c vfree(ha->optrom_buffer); ha 1477 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_buffer = NULL; ha 1478 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_state = QLA_SWAITING; ha 1479 drivers/scsi/qla2xxx/qla_bsg.c mutex_unlock(&ha->optrom_mutex); ha 1491 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 1494 drivers/scsi/qla2xxx/qla_bsg.c mutex_lock(&ha->optrom_mutex); ha 1497 drivers/scsi/qla2xxx/qla_bsg.c mutex_unlock(&ha->optrom_mutex); ha 1502 drivers/scsi/qla2xxx/qla_bsg.c ha->flags.isp82xx_no_md_cap = 1; ha 1505 drivers/scsi/qla2xxx/qla_bsg.c bsg_job->request_payload.sg_cnt, ha->optrom_buffer, ha 1506 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_region_size); ha 1508 drivers/scsi/qla2xxx/qla_bsg.c ha->isp_ops->write_optrom(vha, ha->optrom_buffer, ha 1509 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_region_start, ha->optrom_region_size); ha 1512 drivers/scsi/qla2xxx/qla_bsg.c vfree(ha->optrom_buffer); ha 1513 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_buffer = NULL; ha 1514 drivers/scsi/qla2xxx/qla_bsg.c ha->optrom_state = QLA_SWAITING; ha 1515 drivers/scsi/qla2xxx/qla_bsg.c mutex_unlock(&ha->optrom_mutex); ha 1527 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 1534 drivers/scsi/qla2xxx/qla_bsg.c void *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma); ha 1563 drivers/scsi/qla2xxx/qla_bsg.c dma_pool_free(ha->s_dma_pool, sfp, sfp_dma); ha 1580 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 1585 drivers/scsi/qla2xxx/qla_bsg.c uint8_t *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma); ha 1613 drivers/scsi/qla2xxx/qla_bsg.c dma_pool_free(ha->s_dma_pool, sfp, sfp_dma); ha 1631 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 1636 drivers/scsi/qla2xxx/qla_bsg.c uint8_t *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma); ha 1661 drivers/scsi/qla2xxx/qla_bsg.c dma_pool_free(ha->s_dma_pool, sfp, sfp_dma); ha 1678 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 1683 drivers/scsi/qla2xxx/qla_bsg.c uint8_t *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma); ha 1707 drivers/scsi/qla2xxx/qla_bsg.c dma_pool_free(ha->s_dma_pool, sfp, sfp_dma); ha 1724 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 1729 drivers/scsi/qla2xxx/qla_bsg.c uint8_t *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma); ha 1756 drivers/scsi/qla2xxx/qla_bsg.c dma_pool_free(ha->s_dma_pool, sfp, sfp_dma); ha 1774 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 1785 drivers/scsi/qla2xxx/qla_bsg.c if (!IS_BIDI_CAPABLE(ha)) { ha 1816 drivers/scsi/qla2xxx/qla_bsg.c if (ha->current_topology != ISP_CFG_F) { ha 1824 drivers/scsi/qla2xxx/qla_bsg.c if (ha->operating_mode != P2P) { ha 1831 drivers/scsi/qla2xxx/qla_bsg.c mutex_lock(&ha->selflogin_lock); ha 1844 drivers/scsi/qla2xxx/qla_bsg.c mutex_unlock(&ha->selflogin_lock); ha 1852 drivers/scsi/qla2xxx/qla_bsg.c mutex_unlock(&ha->selflogin_lock); ha 1856 drivers/scsi/qla2xxx/qla_bsg.c req_sg_cnt = dma_map_sg(&ha->pdev->dev, ha 1866 drivers/scsi/qla2xxx/qla_bsg.c rsp_sg_cnt = dma_map_sg(&ha->pdev->dev, ha 1922 drivers/scsi/qla2xxx/qla_bsg.c mempool_free(sp, ha->srb_mempool); ha 1924 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, ha 1928 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, ha 1952 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 1976 drivers/scsi/qla2xxx/qla_bsg.c req_sg_cnt = dma_map_sg(&ha->pdev->dev, ha 1988 drivers/scsi/qla2xxx/qla_bsg.c rsp_sg_cnt = dma_map_sg(&ha->pdev->dev, ha 2045 drivers/scsi/qla2xxx/qla_bsg.c mempool_free(sp, ha->srb_mempool); ha 2056 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, ha 2061 drivers/scsi/qla2xxx/qla_bsg.c dma_unmap_sg(&ha->pdev->dev, ha 2159 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 2162 drivers/scsi/qla2xxx/qla_bsg.c if (!(IS_QLA27XX(ha)) && !IS_QLA28XX(ha)) ha 2166 drivers/scsi/qla2xxx/qla_bsg.c cap.capabilities = (uint64_t)ha->fw_attributes_ext[1] << 48 | ha 2167 drivers/scsi/qla2xxx/qla_bsg.c (uint64_t)ha->fw_attributes_ext[0] << 32 | ha 2168 drivers/scsi/qla2xxx/qla_bsg.c (uint64_t)ha->fw_attributes_h << 16 | ha 2169 drivers/scsi/qla2xxx/qla_bsg.c (uint64_t)ha->fw_attributes; ha 2191 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 2195 drivers/scsi/qla2xxx/qla_bsg.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 2202 drivers/scsi/qla2xxx/qla_bsg.c online_fw_attr = (uint64_t)ha->fw_attributes_ext[1] << 48 | ha 2203 drivers/scsi/qla2xxx/qla_bsg.c (uint64_t)ha->fw_attributes_ext[0] << 32 | ha 2204 drivers/scsi/qla2xxx/qla_bsg.c (uint64_t)ha->fw_attributes_h << 16 | ha 2205 drivers/scsi/qla2xxx/qla_bsg.c (uint64_t)ha->fw_attributes; ha 2237 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 2243 drivers/scsi/qla2xxx/qla_bsg.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 2297 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 2298 drivers/scsi/qla2xxx/qla_bsg.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 2308 drivers/scsi/qla2xxx/qla_bsg.c if (unlikely(pci_channel_offline(ha->pdev))) ha 2314 drivers/scsi/qla2xxx/qla_bsg.c if (!IS_FWI2_CAPABLE(ha)) ha 2317 drivers/scsi/qla2xxx/qla_bsg.c stats = dma_alloc_coherent(&ha->pdev->dev, sizeof(*stats), &stats_dma, ha 2343 drivers/scsi/qla2xxx/qla_bsg.c dma_free_coherent(&ha->pdev->dev, sizeof(*stats), ha 2398 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 2405 drivers/scsi/qla2xxx/qla_bsg.c if (IS_QLA28XX(ha)) { ha 2571 drivers/scsi/qla2xxx/qla_bsg.c struct qla_hw_data *ha = vha->hw; ha 2578 drivers/scsi/qla2xxx/qla_bsg.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2579 drivers/scsi/qla2xxx/qla_bsg.c for (que = 0; que < ha->max_req_queues; que++) { ha 2580 drivers/scsi/qla2xxx/qla_bsg.c req = ha->req_q_map[que]; ha 2592 drivers/scsi/qla2xxx/qla_bsg.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2593 drivers/scsi/qla2xxx/qla_bsg.c if (ha->isp_ops->abort_command(sp)) { ha 2604 drivers/scsi/qla2xxx/qla_bsg.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2610 drivers/scsi/qla2xxx/qla_bsg.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2616 drivers/scsi/qla2xxx/qla_bsg.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 80 drivers/scsi/qla2xxx/qla_dbg.c qla2xxx_prep_dump(struct qla_hw_data *ha, struct qla2xxx_fw_dump *fw_dump) ha 82 drivers/scsi/qla2xxx/qla_dbg.c fw_dump->fw_major_version = htonl(ha->fw_major_version); ha 83 drivers/scsi/qla2xxx/qla_dbg.c fw_dump->fw_minor_version = htonl(ha->fw_minor_version); ha 84 drivers/scsi/qla2xxx/qla_dbg.c fw_dump->fw_subminor_version = htonl(ha->fw_subminor_version); ha 85 drivers/scsi/qla2xxx/qla_dbg.c fw_dump->fw_attributes = htonl(ha->fw_attributes); ha 87 drivers/scsi/qla2xxx/qla_dbg.c fw_dump->vendor = htonl(ha->pdev->vendor); ha 88 drivers/scsi/qla2xxx/qla_dbg.c fw_dump->device = htonl(ha->pdev->device); ha 89 drivers/scsi/qla2xxx/qla_dbg.c fw_dump->subsystem_vendor = htonl(ha->pdev->subsystem_vendor); ha 90 drivers/scsi/qla2xxx/qla_dbg.c fw_dump->subsystem_device = htonl(ha->pdev->subsystem_device); ha 94 drivers/scsi/qla2xxx/qla_dbg.c qla2xxx_copy_queues(struct qla_hw_data *ha, void *ptr) ha 96 drivers/scsi/qla2xxx/qla_dbg.c struct req_que *req = ha->req_q_map[0]; ha 97 drivers/scsi/qla2xxx/qla_dbg.c struct rsp_que *rsp = ha->rsp_q_map[0]; ha 111 drivers/scsi/qla2xxx/qla_dbg.c qla27xx_dump_mpi_ram(struct qla_hw_data *ha, uint32_t addr, uint32_t *ram, ha 114 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 115 drivers/scsi/qla2xxx/qla_dbg.c dma_addr_t dump_dma = ha->gid_list_dma; ha 116 drivers/scsi/qla2xxx/qla_dbg.c uint32_t *chunk = (void *)ha->gid_list; ha 117 drivers/scsi/qla2xxx/qla_dbg.c uint32_t dwords = qla2x00_gid_list_size(ha) / 4; ha 122 drivers/scsi/qla2xxx/qla_dbg.c clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); ha 142 drivers/scsi/qla2xxx/qla_dbg.c ha->flags.mbox_int = 0; ha 161 drivers/scsi/qla2xxx/qla_dbg.c set_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); ha 167 drivers/scsi/qla2xxx/qla_dbg.c ha->flags.mbox_int = 1; ha 170 drivers/scsi/qla2xxx/qla_dbg.c if (!test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { ha 180 drivers/scsi/qla2xxx/qla_dbg.c (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ? ha 190 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_dump_ram(struct qla_hw_data *ha, uint32_t addr, uint32_t *ram, ha 194 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 195 drivers/scsi/qla2xxx/qla_dbg.c dma_addr_t dump_dma = ha->gid_list_dma; ha 196 drivers/scsi/qla2xxx/qla_dbg.c uint32_t *chunk = (void *)ha->gid_list; ha 197 drivers/scsi/qla2xxx/qla_dbg.c uint32_t dwords = qla2x00_gid_list_size(ha) / 4; ha 201 drivers/scsi/qla2xxx/qla_dbg.c clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); ha 220 drivers/scsi/qla2xxx/qla_dbg.c ha->flags.mbox_int = 0; ha 237 drivers/scsi/qla2xxx/qla_dbg.c set_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); ha 243 drivers/scsi/qla2xxx/qla_dbg.c ha->flags.mbox_int = 1; ha 246 drivers/scsi/qla2xxx/qla_dbg.c if (!test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { ha 256 drivers/scsi/qla2xxx/qla_dbg.c (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ? ha 266 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_dump_memory(struct qla_hw_data *ha, uint32_t *code_ram, ha 272 drivers/scsi/qla2xxx/qla_dbg.c rval = qla24xx_dump_ram(ha, 0x20000, code_ram, cram_size / 4, nxt); ha 276 drivers/scsi/qla2xxx/qla_dbg.c set_bit(RISC_SRAM_DUMP_CMPL, &ha->fw_dump_cap_flags); ha 279 drivers/scsi/qla2xxx/qla_dbg.c rval = qla24xx_dump_ram(ha, 0x100000, *nxt, ha 280 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_memory_size - 0x100000 + 1, nxt); ha 282 drivers/scsi/qla2xxx/qla_dbg.c set_bit(RISC_EXT_MEM_DUMP_CMPL, &ha->fw_dump_cap_flags); ha 302 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_pause_risc(struct device_reg_24xx __iomem *reg, struct qla_hw_data *ha) ha 309 drivers/scsi/qla2xxx/qla_dbg.c set_bit(RISC_PAUSE_CMPL, &ha->fw_dump_cap_flags); ha 313 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_soft_reset(struct qla_hw_data *ha) ha 318 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 333 drivers/scsi/qla2xxx/qla_dbg.c set_bit(DMA_SHUTDOWN_CMPL, &ha->fw_dump_cap_flags); ha 337 drivers/scsi/qla2xxx/qla_dbg.c pci_read_config_word(ha->pdev, PCI_COMMAND, &wd); ha 350 drivers/scsi/qla2xxx/qla_dbg.c set_bit(ISP_RESET_CMPL, &ha->fw_dump_cap_flags); ha 363 drivers/scsi/qla2xxx/qla_dbg.c set_bit(RISC_RDY_AFT_RESET, &ha->fw_dump_cap_flags); ha 369 drivers/scsi/qla2xxx/qla_dbg.c qla2xxx_dump_ram(struct qla_hw_data *ha, uint32_t addr, uint16_t *ram, ha 375 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 376 drivers/scsi/qla2xxx/qla_dbg.c dma_addr_t dump_dma = ha->gid_list_dma; ha 377 drivers/scsi/qla2xxx/qla_dbg.c uint16_t *dump = (uint16_t *)ha->gid_list; ha 382 drivers/scsi/qla2xxx/qla_dbg.c WRT_MAILBOX_REG(ha, reg, 0, MBC_DUMP_RISC_RAM_EXTENDED); ha 383 drivers/scsi/qla2xxx/qla_dbg.c clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); ha 385 drivers/scsi/qla2xxx/qla_dbg.c words = qla2x00_gid_list_size(ha) / 2; ha 391 drivers/scsi/qla2xxx/qla_dbg.c WRT_MAILBOX_REG(ha, reg, 1, LSW(addr)); ha 392 drivers/scsi/qla2xxx/qla_dbg.c WRT_MAILBOX_REG(ha, reg, 8, MSW(addr)); ha 394 drivers/scsi/qla2xxx/qla_dbg.c WRT_MAILBOX_REG(ha, reg, 2, MSW(dump_dma)); ha 395 drivers/scsi/qla2xxx/qla_dbg.c WRT_MAILBOX_REG(ha, reg, 3, LSW(dump_dma)); ha 396 drivers/scsi/qla2xxx/qla_dbg.c WRT_MAILBOX_REG(ha, reg, 6, MSW(MSD(dump_dma))); ha 397 drivers/scsi/qla2xxx/qla_dbg.c WRT_MAILBOX_REG(ha, reg, 7, LSW(MSD(dump_dma))); ha 399 drivers/scsi/qla2xxx/qla_dbg.c WRT_MAILBOX_REG(ha, reg, 4, words); ha 410 drivers/scsi/qla2xxx/qla_dbg.c &ha->mbx_cmd_flags); ha 412 drivers/scsi/qla2xxx/qla_dbg.c mb0 = RD_MAILBOX_REG(ha, reg, 0); ha 422 drivers/scsi/qla2xxx/qla_dbg.c &ha->mbx_cmd_flags); ha 424 drivers/scsi/qla2xxx/qla_dbg.c mb0 = RD_MAILBOX_REG(ha, reg, 0); ha 439 drivers/scsi/qla2xxx/qla_dbg.c if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { ha 463 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_copy_eft(struct qla_hw_data *ha, void *ptr) ha 465 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->eft) ha 468 drivers/scsi/qla2xxx/qla_dbg.c memcpy(ptr, ha->eft, ntohl(ha->fw_dump->eft_size)); ha 469 drivers/scsi/qla2xxx/qla_dbg.c return ptr + ntohl(ha->fw_dump->eft_size); ha 473 drivers/scsi/qla2xxx/qla_dbg.c qla25xx_copy_fce(struct qla_hw_data *ha, void *ptr, uint32_t **last_chain) ha 479 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->fce) ha 485 drivers/scsi/qla2xxx/qla_dbg.c fce_calc_size(ha->fce_bufs)); ha 486 drivers/scsi/qla2xxx/qla_dbg.c fcec->size = htonl(fce_calc_size(ha->fce_bufs)); ha 487 drivers/scsi/qla2xxx/qla_dbg.c fcec->addr_l = htonl(LSD(ha->fce_dma)); ha 488 drivers/scsi/qla2xxx/qla_dbg.c fcec->addr_h = htonl(MSD(ha->fce_dma)); ha 492 drivers/scsi/qla2xxx/qla_dbg.c *iter_reg++ = htonl(ha->fce_mb[cnt]); ha 494 drivers/scsi/qla2xxx/qla_dbg.c memcpy(iter_reg, ha->fce, ntohl(fcec->size)); ha 500 drivers/scsi/qla2xxx/qla_dbg.c qla25xx_copy_exlogin(struct qla_hw_data *ha, void *ptr, uint32_t **last_chain) ha 504 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->exlogin_buf) ha 511 drivers/scsi/qla2xxx/qla_dbg.c ha->exlogin_size); ha 512 drivers/scsi/qla2xxx/qla_dbg.c c->size = cpu_to_be32(ha->exlogin_size); ha 513 drivers/scsi/qla2xxx/qla_dbg.c c->addr = cpu_to_be64(ha->exlogin_buf_dma); ha 516 drivers/scsi/qla2xxx/qla_dbg.c memcpy(ptr, ha->exlogin_buf, ha->exlogin_size); ha 522 drivers/scsi/qla2xxx/qla_dbg.c qla81xx_copy_exchoffld(struct qla_hw_data *ha, void *ptr, uint32_t **last_chain) ha 526 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->exchoffld_buf) ha 533 drivers/scsi/qla2xxx/qla_dbg.c ha->exchoffld_size); ha 534 drivers/scsi/qla2xxx/qla_dbg.c c->size = cpu_to_be32(ha->exchoffld_size); ha 535 drivers/scsi/qla2xxx/qla_dbg.c c->addr = cpu_to_be64(ha->exchoffld_buf_dma); ha 538 drivers/scsi/qla2xxx/qla_dbg.c memcpy(ptr, ha->exchoffld_buf, ha->exchoffld_size); ha 544 drivers/scsi/qla2xxx/qla_dbg.c qla2xxx_copy_atioqueues(struct qla_hw_data *ha, void *ptr, ha 556 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->tgt.atio_ring) ha 561 drivers/scsi/qla2xxx/qla_dbg.c aqp->length = ha->tgt.atio_q_length; ha 562 drivers/scsi/qla2xxx/qla_dbg.c aqp->ring = ha->tgt.atio_ring; ha 592 drivers/scsi/qla2xxx/qla_dbg.c qla25xx_copy_mqueues(struct qla_hw_data *ha, void *ptr, uint32_t **last_chain) ha 600 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->mqenable) ha 604 drivers/scsi/qla2xxx/qla_dbg.c for (que = 1; que < ha->max_req_queues; que++) { ha 605 drivers/scsi/qla2xxx/qla_dbg.c req = ha->req_q_map[que]; ha 632 drivers/scsi/qla2xxx/qla_dbg.c for (que = 1; que < ha->max_rsp_queues; que++) { ha 633 drivers/scsi/qla2xxx/qla_dbg.c rsp = ha->rsp_q_map[que]; ha 663 drivers/scsi/qla2xxx/qla_dbg.c qla25xx_copy_mq(struct qla_hw_data *ha, void *ptr, uint32_t **last_chain) ha 670 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->mqenable || IS_QLA83XX(ha) || IS_QLA27XX(ha) || ha 671 drivers/scsi/qla2xxx/qla_dbg.c IS_QLA28XX(ha)) ha 679 drivers/scsi/qla2xxx/qla_dbg.c que_cnt = ha->max_req_queues > ha->max_rsp_queues ? ha 680 drivers/scsi/qla2xxx/qla_dbg.c ha->max_req_queues : ha->max_rsp_queues; ha 683 drivers/scsi/qla2xxx/qla_dbg.c reg = ISP_QUE_REG(ha, cnt); ha 701 drivers/scsi/qla2xxx/qla_dbg.c struct qla_hw_data *ha = vha->hw; ha 706 drivers/scsi/qla2xxx/qla_dbg.c rval, ha->fw_dump_cap_flags); ha 707 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dumped = 0; ha 711 drivers/scsi/qla2xxx/qla_dbg.c vha->host_no, ha->fw_dump, ha->fw_dump_cap_flags); ha 712 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dumped = 1; ha 727 drivers/scsi/qla2xxx/qla_dbg.c struct qla_hw_data *ha = vha->hw; ha 728 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 733 drivers/scsi/qla2xxx/qla_dbg.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 739 drivers/scsi/qla2xxx/qla_dbg.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 742 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->fw_dump) { ha 748 drivers/scsi/qla2xxx/qla_dbg.c if (ha->fw_dumped) { ha 752 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump); ha 755 drivers/scsi/qla2xxx/qla_dbg.c fw = &ha->fw_dump->isp.isp23; ha 756 drivers/scsi/qla2xxx/qla_dbg.c qla2xxx_prep_dump(ha, ha->fw_dump); ha 763 drivers/scsi/qla2xxx/qla_dbg.c if (IS_QLA2300(ha)) { ha 848 drivers/scsi/qla2xxx/qla_dbg.c if (!IS_QLA2300(ha)) { ha 849 drivers/scsi/qla2xxx/qla_dbg.c for (cnt = 30000; RD_MAILBOX_REG(ha, reg, 0) != 0 && ha 860 drivers/scsi/qla2xxx/qla_dbg.c rval = qla2xxx_dump_ram(ha, 0x800, fw->risc_ram, ha 865 drivers/scsi/qla2xxx/qla_dbg.c rval = qla2xxx_dump_ram(ha, 0x10000, fw->stack_ram, ha 870 drivers/scsi/qla2xxx/qla_dbg.c rval = qla2xxx_dump_ram(ha, 0x11000, fw->data_ram, ha 871 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_memory_size - 0x11000 + 1, &nxt); ha 874 drivers/scsi/qla2xxx/qla_dbg.c qla2xxx_copy_queues(ha, nxt); ha 881 drivers/scsi/qla2xxx/qla_dbg.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 899 drivers/scsi/qla2xxx/qla_dbg.c struct qla_hw_data *ha = vha->hw; ha 900 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 904 drivers/scsi/qla2xxx/qla_dbg.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 912 drivers/scsi/qla2xxx/qla_dbg.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 915 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->fw_dump) { ha 921 drivers/scsi/qla2xxx/qla_dbg.c if (ha->fw_dumped) { ha 925 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump); ha 928 drivers/scsi/qla2xxx/qla_dbg.c fw = &ha->fw_dump->isp.isp21; ha 929 drivers/scsi/qla2xxx/qla_dbg.c qla2xxx_prep_dump(ha, ha->fw_dump); ha 949 drivers/scsi/qla2xxx/qla_dbg.c for (cnt = 0; cnt < ha->mbx_count; cnt++, dmp_reg++) { ha 1002 drivers/scsi/qla2xxx/qla_dbg.c for (cnt = 30000; RD_MAILBOX_REG(ha, reg, 0) != 0 && ha 1011 drivers/scsi/qla2xxx/qla_dbg.c if (rval == QLA_SUCCESS && (IS_QLA2200(ha) || (IS_QLA2100(ha) && ha 1025 drivers/scsi/qla2xxx/qla_dbg.c if (IS_QLA2100(ha)) ha 1039 drivers/scsi/qla2xxx/qla_dbg.c WRT_MAILBOX_REG(ha, reg, 0, MBC_READ_RAM_WORD); ha 1040 drivers/scsi/qla2xxx/qla_dbg.c clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); ha 1044 drivers/scsi/qla2xxx/qla_dbg.c WRT_MAILBOX_REG(ha, reg, 1, risc_address); ha 1052 drivers/scsi/qla2xxx/qla_dbg.c &ha->mbx_cmd_flags); ha 1054 drivers/scsi/qla2xxx/qla_dbg.c mb0 = RD_MAILBOX_REG(ha, reg, 0); ha 1055 drivers/scsi/qla2xxx/qla_dbg.c mb2 = RD_MAILBOX_REG(ha, reg, 2); ha 1069 drivers/scsi/qla2xxx/qla_dbg.c if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { ha 1078 drivers/scsi/qla2xxx/qla_dbg.c qla2xxx_copy_queues(ha, &fw->risc_ram[cnt]); ha 1085 drivers/scsi/qla2xxx/qla_dbg.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1096 drivers/scsi/qla2xxx/qla_dbg.c struct qla_hw_data *ha = vha->hw; ha 1097 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 1106 drivers/scsi/qla2xxx/qla_dbg.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 1108 drivers/scsi/qla2xxx/qla_dbg.c if (IS_P3P_TYPE(ha)) ha 1112 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump_cap_flags = 0; ha 1116 drivers/scsi/qla2xxx/qla_dbg.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1119 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->fw_dump) { ha 1125 drivers/scsi/qla2xxx/qla_dbg.c if (ha->fw_dumped) { ha 1129 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump); ha 1132 drivers/scsi/qla2xxx/qla_dbg.c QLA_FW_STOPPED(ha); ha 1133 drivers/scsi/qla2xxx/qla_dbg.c fw = &ha->fw_dump->isp.isp24; ha 1134 drivers/scsi/qla2xxx/qla_dbg.c qla2xxx_prep_dump(ha, ha->fw_dump); ha 1142 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_pause_risc(reg, ha); ha 1315 drivers/scsi/qla2xxx/qla_dbg.c rval = qla24xx_soft_reset(ha); ha 1319 drivers/scsi/qla2xxx/qla_dbg.c rval = qla24xx_dump_memory(ha, fw->code_ram, sizeof(fw->code_ram), ha 1324 drivers/scsi/qla2xxx/qla_dbg.c nxt = qla2xxx_copy_queues(ha, nxt); ha 1326 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_copy_eft(ha, nxt); ha 1328 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = (void *)ha->fw_dump + ha->chain_offset; ha 1329 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla2xxx_copy_atioqueues(ha, nxt_chain, &last_chain); ha 1331 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump->version |= htonl(DUMP_CHAIN_VARIANT); ha 1336 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump_len = (nxt_chain - (void *)ha->fw_dump); ha 1344 drivers/scsi/qla2xxx/qla_dbg.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1355 drivers/scsi/qla2xxx/qla_dbg.c struct qla_hw_data *ha = vha->hw; ha 1356 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 1364 drivers/scsi/qla2xxx/qla_dbg.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 1367 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump_cap_flags = 0; ha 1371 drivers/scsi/qla2xxx/qla_dbg.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1374 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->fw_dump) { ha 1380 drivers/scsi/qla2xxx/qla_dbg.c if (ha->fw_dumped) { ha 1384 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump); ha 1387 drivers/scsi/qla2xxx/qla_dbg.c QLA_FW_STOPPED(ha); ha 1388 drivers/scsi/qla2xxx/qla_dbg.c fw = &ha->fw_dump->isp.isp25; ha 1389 drivers/scsi/qla2xxx/qla_dbg.c qla2xxx_prep_dump(ha, ha->fw_dump); ha 1390 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump->version = htonl(2); ha 1398 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_pause_risc(reg, ha); ha 1635 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla25xx_copy_mq(ha, (void *)ha->fw_dump + ha->chain_offset, ha 1638 drivers/scsi/qla2xxx/qla_dbg.c rval = qla24xx_soft_reset(ha); ha 1642 drivers/scsi/qla2xxx/qla_dbg.c rval = qla24xx_dump_memory(ha, fw->code_ram, sizeof(fw->code_ram), ha 1647 drivers/scsi/qla2xxx/qla_dbg.c nxt = qla2xxx_copy_queues(ha, nxt); ha 1649 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_copy_eft(ha, nxt); ha 1652 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla25xx_copy_fce(ha, nxt_chain, &last_chain); ha 1653 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla25xx_copy_mqueues(ha, nxt_chain, &last_chain); ha 1654 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla2xxx_copy_atioqueues(ha, nxt_chain, &last_chain); ha 1655 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla25xx_copy_exlogin(ha, nxt_chain, &last_chain); ha 1657 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump->version |= htonl(DUMP_CHAIN_VARIANT); ha 1662 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump_len = (nxt_chain - (void *)ha->fw_dump); ha 1670 drivers/scsi/qla2xxx/qla_dbg.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1681 drivers/scsi/qla2xxx/qla_dbg.c struct qla_hw_data *ha = vha->hw; ha 1682 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 1690 drivers/scsi/qla2xxx/qla_dbg.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 1693 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump_cap_flags = 0; ha 1697 drivers/scsi/qla2xxx/qla_dbg.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1700 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->fw_dump) { ha 1706 drivers/scsi/qla2xxx/qla_dbg.c if (ha->fw_dumped) { ha 1710 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump); ha 1713 drivers/scsi/qla2xxx/qla_dbg.c fw = &ha->fw_dump->isp.isp81; ha 1714 drivers/scsi/qla2xxx/qla_dbg.c qla2xxx_prep_dump(ha, ha->fw_dump); ha 1722 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_pause_risc(reg, ha); ha 1962 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla25xx_copy_mq(ha, (void *)ha->fw_dump + ha->chain_offset, ha 1965 drivers/scsi/qla2xxx/qla_dbg.c rval = qla24xx_soft_reset(ha); ha 1969 drivers/scsi/qla2xxx/qla_dbg.c rval = qla24xx_dump_memory(ha, fw->code_ram, sizeof(fw->code_ram), ha 1974 drivers/scsi/qla2xxx/qla_dbg.c nxt = qla2xxx_copy_queues(ha, nxt); ha 1976 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_copy_eft(ha, nxt); ha 1979 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla25xx_copy_fce(ha, nxt_chain, &last_chain); ha 1980 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla25xx_copy_mqueues(ha, nxt_chain, &last_chain); ha 1981 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla2xxx_copy_atioqueues(ha, nxt_chain, &last_chain); ha 1982 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla25xx_copy_exlogin(ha, nxt_chain, &last_chain); ha 1983 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla81xx_copy_exchoffld(ha, nxt_chain, &last_chain); ha 1985 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump->version |= htonl(DUMP_CHAIN_VARIANT); ha 1990 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump_len = (nxt_chain - (void *)ha->fw_dump); ha 1998 drivers/scsi/qla2xxx/qla_dbg.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2009 drivers/scsi/qla2xxx/qla_dbg.c struct qla_hw_data *ha = vha->hw; ha 2010 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 2018 drivers/scsi/qla2xxx/qla_dbg.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 2021 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump_cap_flags = 0; ha 2025 drivers/scsi/qla2xxx/qla_dbg.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2028 drivers/scsi/qla2xxx/qla_dbg.c if (!ha->fw_dump) { ha 2034 drivers/scsi/qla2xxx/qla_dbg.c if (ha->fw_dumped) { ha 2037 drivers/scsi/qla2xxx/qla_dbg.c "request...\n", ha->fw_dump); ha 2040 drivers/scsi/qla2xxx/qla_dbg.c QLA_FW_STOPPED(ha); ha 2041 drivers/scsi/qla2xxx/qla_dbg.c fw = &ha->fw_dump->isp.isp83; ha 2042 drivers/scsi/qla2xxx/qla_dbg.c qla2xxx_prep_dump(ha, ha->fw_dump); ha 2050 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_pause_risc(reg, ha); ha 2447 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla25xx_copy_mq(ha, (void *)ha->fw_dump + ha->chain_offset, ha 2450 drivers/scsi/qla2xxx/qla_dbg.c rval = qla24xx_soft_reset(ha); ha 2473 drivers/scsi/qla2xxx/qla_dbg.c nxt += (ha->fw_memory_size - 0x100000 + 1); ha 2476 drivers/scsi/qla2xxx/qla_dbg.c set_bit(RISC_RDY_AFT_RESET, &ha->fw_dump_cap_flags); ha 2482 drivers/scsi/qla2xxx/qla_dbg.c rval = qla24xx_dump_memory(ha, fw->code_ram, sizeof(fw->code_ram), ha 2488 drivers/scsi/qla2xxx/qla_dbg.c nxt = qla2xxx_copy_queues(ha, nxt); ha 2490 drivers/scsi/qla2xxx/qla_dbg.c qla24xx_copy_eft(ha, nxt); ha 2493 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla25xx_copy_fce(ha, nxt_chain, &last_chain); ha 2494 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla25xx_copy_mqueues(ha, nxt_chain, &last_chain); ha 2495 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla2xxx_copy_atioqueues(ha, nxt_chain, &last_chain); ha 2496 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla25xx_copy_exlogin(ha, nxt_chain, &last_chain); ha 2497 drivers/scsi/qla2xxx/qla_dbg.c nxt_chain = qla81xx_copy_exchoffld(ha, nxt_chain, &last_chain); ha 2499 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump->version |= htonl(DUMP_CHAIN_VARIANT); ha 2504 drivers/scsi/qla2xxx/qla_dbg.c ha->fw_dump_len = (nxt_chain - (void *)ha->fw_dump); ha 2512 drivers/scsi/qla2xxx/qla_dbg.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2716 drivers/scsi/qla2xxx/qla_dbg.c struct qla_hw_data *ha = vha->hw; ha 2717 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2718 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24; ha 2719 drivers/scsi/qla2xxx/qla_dbg.c struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82; ha 2725 drivers/scsi/qla2xxx/qla_dbg.c if (IS_P3P_TYPE(ha)) ha 2727 drivers/scsi/qla2xxx/qla_dbg.c else if (IS_FWI2_CAPABLE(ha)) ha 2730 drivers/scsi/qla2xxx/qla_dbg.c mbx_reg = MAILBOX_REG(ha, reg, 0); ha 234 drivers/scsi/qla2xxx/qla_def.h #define LOOPID_MAP_SIZE (ha->max_fibre_devices) ha 271 drivers/scsi/qla2xxx/qla_def.h #define NPH_SNS_LID(ha) (IS_FWI2_CAPABLE(ha) ? NPH_SNS : SIMPLE_NAME_SERVER) ha 897 drivers/scsi/qla2xxx/qla_def.h #define ISP_REQ_Q_IN(ha, reg) \ ha 898 drivers/scsi/qla2xxx/qla_def.h (IS_QLA2100(ha) || IS_QLA2200(ha) ? \ ha 901 drivers/scsi/qla2xxx/qla_def.h #define ISP_REQ_Q_OUT(ha, reg) \ ha 902 drivers/scsi/qla2xxx/qla_def.h (IS_QLA2100(ha) || IS_QLA2200(ha) ? \ ha 905 drivers/scsi/qla2xxx/qla_def.h #define ISP_RSP_Q_IN(ha, reg) \ ha 906 drivers/scsi/qla2xxx/qla_def.h (IS_QLA2100(ha) || IS_QLA2200(ha) ? \ ha 909 drivers/scsi/qla2xxx/qla_def.h #define ISP_RSP_Q_OUT(ha, reg) \ ha 910 drivers/scsi/qla2xxx/qla_def.h (IS_QLA2100(ha) || IS_QLA2200(ha) ? \ ha 917 drivers/scsi/qla2xxx/qla_def.h #define MAILBOX_REG(ha, reg, num) \ ha 918 drivers/scsi/qla2xxx/qla_def.h (IS_QLA2100(ha) || IS_QLA2200(ha) ? \ ha 923 drivers/scsi/qla2xxx/qla_def.h #define RD_MAILBOX_REG(ha, reg, num) \ ha 924 drivers/scsi/qla2xxx/qla_def.h RD_REG_WORD(MAILBOX_REG(ha, reg, num)) ha 925 drivers/scsi/qla2xxx/qla_def.h #define WRT_MAILBOX_REG(ha, reg, num, data) \ ha 926 drivers/scsi/qla2xxx/qla_def.h WRT_REG_WORD(MAILBOX_REG(ha, reg, num), data) ha 928 drivers/scsi/qla2xxx/qla_def.h #define FB_CMD_REG(ha, reg) \ ha 929 drivers/scsi/qla2xxx/qla_def.h (IS_QLA2100(ha) || IS_QLA2200(ha) ? \ ha 932 drivers/scsi/qla2xxx/qla_def.h #define RD_FB_CMD_REG(ha, reg) \ ha 933 drivers/scsi/qla2xxx/qla_def.h RD_REG_WORD(FB_CMD_REG(ha, reg)) ha 934 drivers/scsi/qla2xxx/qla_def.h #define WRT_FB_CMD_REG(ha, reg, data) \ ha 935 drivers/scsi/qla2xxx/qla_def.h WRT_REG_WORD(FB_CMD_REG(ha, reg), data) ha 1808 drivers/scsi/qla2xxx/qla_def.h #define SET_TARGET_ID(ha, to, from) \ ha 1810 drivers/scsi/qla2xxx/qla_def.h if (HAS_EXTENDED_IDS(ha)) \ ha 3408 drivers/scsi/qla2xxx/qla_def.h #define ISP_QUE_REG(ha, id) \ ha 3409 drivers/scsi/qla2xxx/qla_def.h ((ha->mqenable || IS_QLA83XX(ha) || \ ha 3410 drivers/scsi/qla2xxx/qla_def.h IS_QLA27XX(ha) || IS_QLA28XX(ha)) ? \ ha 3411 drivers/scsi/qla2xxx/qla_def.h ((void __iomem *)ha->mqiobase + (QLA_QUE_PAGE * id)) :\ ha 3412 drivers/scsi/qla2xxx/qla_def.h ((void __iomem *)ha->iobase)) ha 3598 drivers/scsi/qla2xxx/qla_def.h #define Q_FULL_THRESH_HOLD(ha) \ ha 3599 drivers/scsi/qla2xxx/qla_def.h ((ha->cur_fw_xcb_count/100) * Q_FULL_THRESH_HOLD_PERCENT) ha 3819 drivers/scsi/qla2xxx/qla_def.h #define DT_MASK(ha) ((ha)->isp_type & (DT_ISP_LAST - 1)) ha 3820 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2100(ha) (DT_MASK(ha) & DT_ISP2100) ha 3821 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2200(ha) (DT_MASK(ha) & DT_ISP2200) ha 3822 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2300(ha) (DT_MASK(ha) & DT_ISP2300) ha 3823 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2312(ha) (DT_MASK(ha) & DT_ISP2312) ha 3824 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2322(ha) (DT_MASK(ha) & DT_ISP2322) ha 3825 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA6312(ha) (DT_MASK(ha) & DT_ISP6312) ha 3826 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA6322(ha) (DT_MASK(ha) & DT_ISP6322) ha 3827 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2422(ha) (DT_MASK(ha) & DT_ISP2422) ha 3828 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2432(ha) (DT_MASK(ha) & DT_ISP2432) ha 3829 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA5422(ha) (DT_MASK(ha) & DT_ISP5422) ha 3830 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA5432(ha) (DT_MASK(ha) & DT_ISP5432) ha 3831 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2532(ha) (DT_MASK(ha) & DT_ISP2532) ha 3832 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA8432(ha) (DT_MASK(ha) & DT_ISP8432) ha 3833 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA8001(ha) (DT_MASK(ha) & DT_ISP8001) ha 3834 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA81XX(ha) (IS_QLA8001(ha)) ha 3835 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA82XX(ha) (DT_MASK(ha) & DT_ISP8021) ha 3836 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA8044(ha) (DT_MASK(ha) & DT_ISP8044) ha 3837 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2031(ha) (DT_MASK(ha) & DT_ISP2031) ha 3838 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA8031(ha) (DT_MASK(ha) & DT_ISP8031) ha 3839 drivers/scsi/qla2xxx/qla_def.h #define IS_QLAFX00(ha) (DT_MASK(ha) & DT_ISPFX00) ha 3840 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2071(ha) (DT_MASK(ha) & DT_ISP2071) ha 3841 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2271(ha) (DT_MASK(ha) & DT_ISP2271) ha 3842 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2261(ha) (DT_MASK(ha) & DT_ISP2261) ha 3843 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2081(ha) (DT_MASK(ha) & DT_ISP2081) ha 3844 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2281(ha) (DT_MASK(ha) & DT_ISP2281) ha 3846 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA23XX(ha) (IS_QLA2300(ha) || IS_QLA2312(ha) || IS_QLA2322(ha) || \ ha 3847 drivers/scsi/qla2xxx/qla_def.h IS_QLA6312(ha) || IS_QLA6322(ha)) ha 3848 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA24XX(ha) (IS_QLA2422(ha) || IS_QLA2432(ha)) ha 3849 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA54XX(ha) (IS_QLA5422(ha) || IS_QLA5432(ha)) ha 3850 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA25XX(ha) (IS_QLA2532(ha)) ha 3851 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA83XX(ha) (IS_QLA2031(ha) || IS_QLA8031(ha)) ha 3852 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA84XX(ha) (IS_QLA8432(ha)) ha 3853 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA27XX(ha) (IS_QLA2071(ha) || IS_QLA2271(ha) || IS_QLA2261(ha)) ha 3854 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA28XX(ha) (IS_QLA2081(ha) || IS_QLA2281(ha)) ha 3855 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA24XX_TYPE(ha) (IS_QLA24XX(ha) || IS_QLA54XX(ha) || \ ha 3856 drivers/scsi/qla2xxx/qla_def.h IS_QLA84XX(ha)) ha 3857 drivers/scsi/qla2xxx/qla_def.h #define IS_CNA_CAPABLE(ha) (IS_QLA81XX(ha) || IS_QLA82XX(ha) || \ ha 3858 drivers/scsi/qla2xxx/qla_def.h IS_QLA8031(ha) || IS_QLA8044(ha)) ha 3859 drivers/scsi/qla2xxx/qla_def.h #define IS_P3P_TYPE(ha) (IS_QLA82XX(ha) || IS_QLA8044(ha)) ha 3860 drivers/scsi/qla2xxx/qla_def.h #define IS_QLA2XXX_MIDTYPE(ha) (IS_QLA24XX(ha) || IS_QLA84XX(ha) || \ ha 3861 drivers/scsi/qla2xxx/qla_def.h IS_QLA25XX(ha) || IS_QLA81XX(ha) || \ ha 3862 drivers/scsi/qla2xxx/qla_def.h IS_QLA82XX(ha) || IS_QLA83XX(ha) || \ ha 3863 drivers/scsi/qla2xxx/qla_def.h IS_QLA8044(ha) || IS_QLA27XX(ha) || \ ha 3864 drivers/scsi/qla2xxx/qla_def.h IS_QLA28XX(ha)) ha 3865 drivers/scsi/qla2xxx/qla_def.h #define IS_MSIX_NACK_CAPABLE(ha) (IS_QLA81XX(ha) || IS_QLA83XX(ha) || \ ha 3866 drivers/scsi/qla2xxx/qla_def.h IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 3867 drivers/scsi/qla2xxx/qla_def.h #define IS_NOPOLLING_TYPE(ha) (IS_QLA81XX(ha) && (ha)->flags.msix_enabled) ha 3868 drivers/scsi/qla2xxx/qla_def.h #define IS_FAC_REQUIRED(ha) (IS_QLA81XX(ha) || IS_QLA83XX(ha) || \ ha 3869 drivers/scsi/qla2xxx/qla_def.h IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 3870 drivers/scsi/qla2xxx/qla_def.h #define IS_NOCACHE_VPD_TYPE(ha) (IS_QLA81XX(ha) || IS_QLA83XX(ha) || \ ha 3871 drivers/scsi/qla2xxx/qla_def.h IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 3872 drivers/scsi/qla2xxx/qla_def.h #define IS_ALOGIO_CAPABLE(ha) (IS_QLA23XX(ha) || IS_FWI2_CAPABLE(ha)) ha 3874 drivers/scsi/qla2xxx/qla_def.h #define IS_T10_PI_CAPABLE(ha) ((ha)->device_type & DT_T10_PI) ha 3875 drivers/scsi/qla2xxx/qla_def.h #define IS_IIDMA_CAPABLE(ha) ((ha)->device_type & DT_IIDMA) ha 3876 drivers/scsi/qla2xxx/qla_def.h #define IS_FWI2_CAPABLE(ha) ((ha)->device_type & DT_FWI2) ha 3877 drivers/scsi/qla2xxx/qla_def.h #define IS_ZIO_SUPPORTED(ha) ((ha)->device_type & DT_ZIO_SUPPORTED) ha 3878 drivers/scsi/qla2xxx/qla_def.h #define IS_OEM_001(ha) ((ha)->device_type & DT_OEM_001) ha 3879 drivers/scsi/qla2xxx/qla_def.h #define HAS_EXTENDED_IDS(ha) ((ha)->device_type & DT_EXTENDED_IDS) ha 3880 drivers/scsi/qla2xxx/qla_def.h #define IS_CT6_SUPPORTED(ha) ((ha)->device_type & DT_CT6_SUPPORTED) ha 3881 drivers/scsi/qla2xxx/qla_def.h #define IS_MQUE_CAPABLE(ha) ((ha)->mqenable || IS_QLA83XX(ha) || \ ha 3882 drivers/scsi/qla2xxx/qla_def.h IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 3883 drivers/scsi/qla2xxx/qla_def.h #define IS_BIDI_CAPABLE(ha) \ ha 3884 drivers/scsi/qla2xxx/qla_def.h (IS_QLA25XX(ha) || IS_QLA2031(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 3886 drivers/scsi/qla2xxx/qla_def.h #define IS_MCTP_CAPABLE(ha) (IS_QLA2031(ha) && \ ha 3887 drivers/scsi/qla2xxx/qla_def.h ((ha)->fw_attributes_ext[0] & BIT_0)) ha 3888 drivers/scsi/qla2xxx/qla_def.h #define IS_PI_UNINIT_CAPABLE(ha) (IS_QLA83XX(ha) || IS_QLA27XX(ha)) ha 3889 drivers/scsi/qla2xxx/qla_def.h #define IS_PI_IPGUARD_CAPABLE(ha) (IS_QLA83XX(ha) || IS_QLA27XX(ha)) ha 3890 drivers/scsi/qla2xxx/qla_def.h #define IS_PI_DIFB_DIX0_CAPABLE(ha) (0) ha 3891 drivers/scsi/qla2xxx/qla_def.h #define IS_PI_SPLIT_DET_CAPABLE_HBA(ha) (IS_QLA83XX(ha) || IS_QLA27XX(ha) || \ ha 3892 drivers/scsi/qla2xxx/qla_def.h IS_QLA28XX(ha)) ha 3893 drivers/scsi/qla2xxx/qla_def.h #define IS_PI_SPLIT_DET_CAPABLE(ha) (IS_PI_SPLIT_DET_CAPABLE_HBA(ha) && \ ha 3894 drivers/scsi/qla2xxx/qla_def.h (((ha)->fw_attributes_h << 16 | (ha)->fw_attributes) & BIT_22)) ha 3895 drivers/scsi/qla2xxx/qla_def.h #define IS_ATIO_MSIX_CAPABLE(ha) (IS_QLA83XX(ha) || IS_QLA27XX(ha) || \ ha 3896 drivers/scsi/qla2xxx/qla_def.h IS_QLA28XX(ha)) ha 3897 drivers/scsi/qla2xxx/qla_def.h #define IS_TGT_MODE_CAPABLE(ha) (ha->tgt.atio_q_length) ha 3898 drivers/scsi/qla2xxx/qla_def.h #define IS_SHADOW_REG_CAPABLE(ha) (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 3899 drivers/scsi/qla2xxx/qla_def.h #define IS_DPORT_CAPABLE(ha) (IS_QLA83XX(ha) || IS_QLA27XX(ha) || \ ha 3900 drivers/scsi/qla2xxx/qla_def.h IS_QLA28XX(ha)) ha 3901 drivers/scsi/qla2xxx/qla_def.h #define IS_FAWWN_CAPABLE(ha) (IS_QLA83XX(ha) || IS_QLA27XX(ha) || \ ha 3902 drivers/scsi/qla2xxx/qla_def.h IS_QLA28XX(ha)) ha 3903 drivers/scsi/qla2xxx/qla_def.h #define IS_EXCHG_OFFLD_CAPABLE(ha) \ ha 3904 drivers/scsi/qla2xxx/qla_def.h (IS_QLA81XX(ha) || IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 3905 drivers/scsi/qla2xxx/qla_def.h #define IS_EXLOGIN_OFFLD_CAPABLE(ha) \ ha 3906 drivers/scsi/qla2xxx/qla_def.h (IS_QLA25XX(ha) || IS_QLA81XX(ha) || IS_QLA83XX(ha) || \ ha 3907 drivers/scsi/qla2xxx/qla_def.h IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 3908 drivers/scsi/qla2xxx/qla_def.h #define USE_ASYNC_SCAN(ha) (IS_QLA25XX(ha) || IS_QLA81XX(ha) ||\ ha 3909 drivers/scsi/qla2xxx/qla_def.h IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 4320 drivers/scsi/qla2xxx/qla_def.h #define FW_ABILITY_MAX_SPEED(ha) \ ha 4321 drivers/scsi/qla2xxx/qla_def.h (ha->fw_ability_mask & FW_ABILITY_MAX_SPEED_MASK) ha 4613 drivers/scsi/qla2xxx/qla_def.h #define LOOP_TRANSITION(ha) \ ha 4614 drivers/scsi/qla2xxx/qla_def.h (test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || \ ha 4615 drivers/scsi/qla2xxx/qla_def.h test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \ ha 4616 drivers/scsi/qla2xxx/qla_def.h atomic_read(&ha->loop_state) == LOOP_DOWN) ha 4618 drivers/scsi/qla2xxx/qla_def.h #define STATE_TRANSITION(ha) \ ha 4619 drivers/scsi/qla2xxx/qla_def.h (test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || \ ha 4620 drivers/scsi/qla2xxx/qla_def.h test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) ha 4821 drivers/scsi/qla2xxx/qla_def.h #define N2N_TOPO(ha) \ ha 4822 drivers/scsi/qla2xxx/qla_def.h ((ha->prev_topology == ISP_CFG_N && !ha->current_topology) || \ ha 4823 drivers/scsi/qla2xxx/qla_def.h ha->current_topology == ISP_CFG_N || \ ha 4824 drivers/scsi/qla2xxx/qla_def.h !ha->current_topology) ha 19 drivers/scsi/qla2xxx/qla_dfs.c struct qla_hw_data *ha = vha->hw; ha 28 drivers/scsi/qla2xxx/qla_dfs.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 34 drivers/scsi/qla2xxx/qla_dfs.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 59 drivers/scsi/qla2xxx/qla_dfs.c struct qla_hw_data *ha = vha->hw; ha 69 drivers/scsi/qla2xxx/qla_dfs.c gid_list = dma_alloc_coherent(&ha->pdev->dev, ha 70 drivers/scsi/qla2xxx/qla_dfs.c qla2x00_gid_list_size(ha), ha 75 drivers/scsi/qla2xxx/qla_dfs.c qla2x00_gid_list_size(ha)); ha 99 drivers/scsi/qla2xxx/qla_dfs.c gid = (void *)gid + ha->gid_list_info_size; ha 102 drivers/scsi/qla2xxx/qla_dfs.c dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha), ha 270 drivers/scsi/qla2xxx/qla_dfs.c struct qla_hw_data *ha = vha->hw; ha 272 drivers/scsi/qla2xxx/qla_dfs.c mutex_lock(&ha->fce_mutex); ha 275 drivers/scsi/qla2xxx/qla_dfs.c seq_printf(s, "In Pointer = %llx\n\n", (unsigned long long)ha->fce_wr); ha 276 drivers/scsi/qla2xxx/qla_dfs.c seq_printf(s, "Base = %llx\n\n", (unsigned long long) ha->fce_dma); ha 279 drivers/scsi/qla2xxx/qla_dfs.c ha->fce_mb[0], ha->fce_mb[2], ha->fce_mb[3], ha->fce_mb[4], ha 280 drivers/scsi/qla2xxx/qla_dfs.c ha->fce_mb[5], ha->fce_mb[6]); ha 282 drivers/scsi/qla2xxx/qla_dfs.c fce = (uint32_t *) ha->fce; ha 283 drivers/scsi/qla2xxx/qla_dfs.c fce_start = (unsigned long long) ha->fce_dma; ha 284 drivers/scsi/qla2xxx/qla_dfs.c for (cnt = 0; cnt < fce_calc_size(ha->fce_bufs) / 4; cnt++) { ha 295 drivers/scsi/qla2xxx/qla_dfs.c mutex_unlock(&ha->fce_mutex); ha 304 drivers/scsi/qla2xxx/qla_dfs.c struct qla_hw_data *ha = vha->hw; ha 307 drivers/scsi/qla2xxx/qla_dfs.c if (!ha->flags.fce_enabled) ha 310 drivers/scsi/qla2xxx/qla_dfs.c mutex_lock(&ha->fce_mutex); ha 313 drivers/scsi/qla2xxx/qla_dfs.c rval = qla2x00_disable_fce_trace(vha, &ha->fce_wr, &ha->fce_rd); ha 318 drivers/scsi/qla2xxx/qla_dfs.c ha->flags.fce_enabled = 0; ha 320 drivers/scsi/qla2xxx/qla_dfs.c mutex_unlock(&ha->fce_mutex); ha 329 drivers/scsi/qla2xxx/qla_dfs.c struct qla_hw_data *ha = vha->hw; ha 332 drivers/scsi/qla2xxx/qla_dfs.c if (ha->flags.fce_enabled) ha 335 drivers/scsi/qla2xxx/qla_dfs.c mutex_lock(&ha->fce_mutex); ha 338 drivers/scsi/qla2xxx/qla_dfs.c ha->flags.fce_enabled = 1; ha 339 drivers/scsi/qla2xxx/qla_dfs.c memset(ha->fce, 0, fce_calc_size(ha->fce_bufs)); ha 340 drivers/scsi/qla2xxx/qla_dfs.c rval = qla2x00_enable_fce_trace(vha, ha->fce_dma, ha->fce_bufs, ha 341 drivers/scsi/qla2xxx/qla_dfs.c ha->fce_mb, &ha->fce_bufs); ha 345 drivers/scsi/qla2xxx/qla_dfs.c ha->flags.fce_enabled = 0; ha 348 drivers/scsi/qla2xxx/qla_dfs.c mutex_unlock(&ha->fce_mutex); ha 364 drivers/scsi/qla2xxx/qla_dfs.c struct qla_hw_data *ha = vha->hw; ha 366 drivers/scsi/qla2xxx/qla_dfs.c seq_printf(s, "%d\n", ha->tgt.num_act_qpairs); ha 384 drivers/scsi/qla2xxx/qla_dfs.c struct qla_hw_data *ha = vha->hw; ha 389 drivers/scsi/qla2xxx/qla_dfs.c if (!(IS_QLA27XX(ha) || IS_QLA83XX(ha) || IS_QLA28XX(ha))) { ha 416 drivers/scsi/qla2xxx/qla_dfs.c if (num_act_qp != ha->tgt.num_act_qpairs) { ha 417 drivers/scsi/qla2xxx/qla_dfs.c ha->tgt.num_act_qpairs = num_act_qp; ha 438 drivers/scsi/qla2xxx/qla_dfs.c struct qla_hw_data *ha = vha->hw; ha 440 drivers/scsi/qla2xxx/qla_dfs.c if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha) && ha 441 drivers/scsi/qla2xxx/qla_dfs.c !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 443 drivers/scsi/qla2xxx/qla_dfs.c if (!ha->fce) ha 453 drivers/scsi/qla2xxx/qla_dfs.c if (ha->dfs_dir) ha 456 drivers/scsi/qla2xxx/qla_dfs.c mutex_init(&ha->fce_mutex); ha 457 drivers/scsi/qla2xxx/qla_dfs.c ha->dfs_dir = debugfs_create_dir(vha->host_str, qla2x00_dfs_root); ha 462 drivers/scsi/qla2xxx/qla_dfs.c ha->dfs_fw_resource_cnt = debugfs_create_file("fw_resource_count", ha 463 drivers/scsi/qla2xxx/qla_dfs.c S_IRUSR, ha->dfs_dir, vha, &dfs_fw_resource_cnt_ops); ha 465 drivers/scsi/qla2xxx/qla_dfs.c ha->dfs_tgt_counters = debugfs_create_file("tgt_counters", S_IRUSR, ha 466 drivers/scsi/qla2xxx/qla_dfs.c ha->dfs_dir, vha, &dfs_tgt_counters_ops); ha 468 drivers/scsi/qla2xxx/qla_dfs.c ha->tgt.dfs_tgt_port_database = debugfs_create_file("tgt_port_database", ha 469 drivers/scsi/qla2xxx/qla_dfs.c S_IRUSR, ha->dfs_dir, vha, &dfs_tgt_port_database_ops); ha 471 drivers/scsi/qla2xxx/qla_dfs.c ha->dfs_fce = debugfs_create_file("fce", S_IRUSR, ha->dfs_dir, vha, ha 474 drivers/scsi/qla2xxx/qla_dfs.c ha->tgt.dfs_tgt_sess = debugfs_create_file("tgt_sess", ha 475 drivers/scsi/qla2xxx/qla_dfs.c S_IRUSR, ha->dfs_dir, vha, &dfs_tgt_sess_ops); ha 477 drivers/scsi/qla2xxx/qla_dfs.c if (IS_QLA27XX(ha) || IS_QLA83XX(ha) || IS_QLA28XX(ha)) ha 478 drivers/scsi/qla2xxx/qla_dfs.c ha->tgt.dfs_naqp = debugfs_create_file("naqp", ha 479 drivers/scsi/qla2xxx/qla_dfs.c 0400, ha->dfs_dir, vha, &dfs_naqp_ops); ha 487 drivers/scsi/qla2xxx/qla_dfs.c struct qla_hw_data *ha = vha->hw; ha 489 drivers/scsi/qla2xxx/qla_dfs.c if (ha->tgt.dfs_naqp) { ha 490 drivers/scsi/qla2xxx/qla_dfs.c debugfs_remove(ha->tgt.dfs_naqp); ha 491 drivers/scsi/qla2xxx/qla_dfs.c ha->tgt.dfs_naqp = NULL; ha 494 drivers/scsi/qla2xxx/qla_dfs.c if (ha->tgt.dfs_tgt_sess) { ha 495 drivers/scsi/qla2xxx/qla_dfs.c debugfs_remove(ha->tgt.dfs_tgt_sess); ha 496 drivers/scsi/qla2xxx/qla_dfs.c ha->tgt.dfs_tgt_sess = NULL; ha 499 drivers/scsi/qla2xxx/qla_dfs.c if (ha->tgt.dfs_tgt_port_database) { ha 500 drivers/scsi/qla2xxx/qla_dfs.c debugfs_remove(ha->tgt.dfs_tgt_port_database); ha 501 drivers/scsi/qla2xxx/qla_dfs.c ha->tgt.dfs_tgt_port_database = NULL; ha 504 drivers/scsi/qla2xxx/qla_dfs.c if (ha->dfs_fw_resource_cnt) { ha 505 drivers/scsi/qla2xxx/qla_dfs.c debugfs_remove(ha->dfs_fw_resource_cnt); ha 506 drivers/scsi/qla2xxx/qla_dfs.c ha->dfs_fw_resource_cnt = NULL; ha 509 drivers/scsi/qla2xxx/qla_dfs.c if (ha->dfs_tgt_counters) { ha 510 drivers/scsi/qla2xxx/qla_dfs.c debugfs_remove(ha->dfs_tgt_counters); ha 511 drivers/scsi/qla2xxx/qla_dfs.c ha->dfs_tgt_counters = NULL; ha 514 drivers/scsi/qla2xxx/qla_dfs.c if (ha->dfs_fce) { ha 515 drivers/scsi/qla2xxx/qla_dfs.c debugfs_remove(ha->dfs_fce); ha 516 drivers/scsi/qla2xxx/qla_dfs.c ha->dfs_fce = NULL; ha 519 drivers/scsi/qla2xxx/qla_dfs.c if (ha->dfs_dir) { ha 520 drivers/scsi/qla2xxx/qla_dfs.c debugfs_remove(ha->dfs_dir); ha 521 drivers/scsi/qla2xxx/qla_dfs.c ha->dfs_dir = NULL; ha 390 drivers/scsi/qla2xxx/qla_gbl.h qla2x00_full_login_lip(scsi_qla_host_t *ha); ha 399 drivers/scsi/qla2xxx/qla_gbl.h qla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map); ha 872 drivers/scsi/qla2xxx/qla_gbl.h extern int qla8044_idc_lock(struct qla_hw_data *ha); ha 873 drivers/scsi/qla2xxx/qla_gbl.h extern void qla8044_idc_unlock(struct qla_hw_data *ha); ha 874 drivers/scsi/qla2xxx/qla_gbl.h extern uint32_t qla8044_rd_reg(struct qla_hw_data *ha, ulong addr); ha 875 drivers/scsi/qla2xxx/qla_gbl.h extern void qla8044_wr_reg(struct qla_hw_data *ha, ulong addr, uint32_t val); ha 876 drivers/scsi/qla2xxx/qla_gbl.h extern void qla8044_read_reset_template(struct scsi_qla_host *ha); ha 877 drivers/scsi/qla2xxx/qla_gbl.h extern void qla8044_set_idc_dontreset(struct scsi_qla_host *ha); ha 32 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 40 drivers/scsi/qla2xxx/qla_gs.c SET_TARGET_ID(ha, ms_pkt->loop_id, SIMPLE_NAME_SERVER); ha 42 drivers/scsi/qla2xxx/qla_gs.c ms_pkt->timeout = cpu_to_le16(ha->r_a_tov / 10 * 2); ha 69 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 78 drivers/scsi/qla2xxx/qla_gs.c ct_pkt->timeout = cpu_to_le16(ha->r_a_tov / 10 * 2); ha 124 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 134 drivers/scsi/qla2xxx/qla_gs.c if (IS_FWI2_CAPABLE(ha)) ha 158 drivers/scsi/qla2xxx/qla_gs.c if (IS_FWI2_CAPABLE(ha)) { ha 206 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 209 drivers/scsi/qla2xxx/qla_gs.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) ha 212 drivers/scsi/qla2xxx/qla_gs.c arg.iocb = ha->ms_iocb; ha 213 drivers/scsi/qla2xxx/qla_gs.c arg.req_dma = ha->ct_sns_dma; ha 214 drivers/scsi/qla2xxx/qla_gs.c arg.rsp_dma = ha->ct_sns_dma; ha 221 drivers/scsi/qla2xxx/qla_gs.c ms_pkt = ha->isp_ops->prep_ms_iocb(vha, &arg); ha 224 drivers/scsi/qla2xxx/qla_gs.c ct_req = qla2x00_prep_ct_req(ha->ct_sns, GA_NXT_CMD, ha 226 drivers/scsi/qla2xxx/qla_gs.c ct_rsp = &ha->ct_sns->p.rsp; ha 232 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, ha 294 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 298 drivers/scsi/qla2xxx/qla_gs.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) ha 304 drivers/scsi/qla2xxx/qla_gs.c arg.iocb = ha->ms_iocb; ha 305 drivers/scsi/qla2xxx/qla_gs.c arg.req_dma = ha->ct_sns_dma; ha 306 drivers/scsi/qla2xxx/qla_gs.c arg.rsp_dma = ha->ct_sns_dma; ha 313 drivers/scsi/qla2xxx/qla_gs.c ms_pkt = ha->isp_ops->prep_ms_iocb(vha, &arg); ha 316 drivers/scsi/qla2xxx/qla_gs.c ct_req = qla2x00_prep_ct_req(ha->ct_sns, GID_PT_CMD, gid_pt_rsp_size); ha 317 drivers/scsi/qla2xxx/qla_gs.c ct_rsp = &ha->ct_sns->p.rsp; ha 323 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, ha 334 drivers/scsi/qla2xxx/qla_gs.c for (i = 0; i < ha->max_fibre_devices; i++) { ha 353 drivers/scsi/qla2xxx/qla_gs.c if (i == ha->max_fibre_devices) ha 376 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 379 drivers/scsi/qla2xxx/qla_gs.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) ha 382 drivers/scsi/qla2xxx/qla_gs.c arg.iocb = ha->ms_iocb; ha 383 drivers/scsi/qla2xxx/qla_gs.c arg.req_dma = ha->ct_sns_dma; ha 384 drivers/scsi/qla2xxx/qla_gs.c arg.rsp_dma = ha->ct_sns_dma; ha 389 drivers/scsi/qla2xxx/qla_gs.c for (i = 0; i < ha->max_fibre_devices; i++) { ha 392 drivers/scsi/qla2xxx/qla_gs.c ms_pkt = ha->isp_ops->prep_ms_iocb(vha, &arg); ha 395 drivers/scsi/qla2xxx/qla_gs.c ct_req = qla2x00_prep_ct_req(ha->ct_sns, GPN_ID_CMD, ha 397 drivers/scsi/qla2xxx/qla_gs.c ct_rsp = &ha->ct_sns->p.rsp; ha 403 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, ha 440 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 446 drivers/scsi/qla2xxx/qla_gs.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) ha 449 drivers/scsi/qla2xxx/qla_gs.c arg.iocb = ha->ms_iocb; ha 450 drivers/scsi/qla2xxx/qla_gs.c arg.req_dma = ha->ct_sns_dma; ha 451 drivers/scsi/qla2xxx/qla_gs.c arg.rsp_dma = ha->ct_sns_dma; ha 456 drivers/scsi/qla2xxx/qla_gs.c for (i = 0; i < ha->max_fibre_devices; i++) { ha 459 drivers/scsi/qla2xxx/qla_gs.c ms_pkt = ha->isp_ops->prep_ms_iocb(vha, &arg); ha 462 drivers/scsi/qla2xxx/qla_gs.c ct_req = qla2x00_prep_ct_req(ha->ct_sns, GNN_ID_CMD, ha 464 drivers/scsi/qla2xxx/qla_gs.c ct_rsp = &ha->ct_sns->p.rsp; ha 470 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, ha 576 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 578 drivers/scsi/qla2xxx/qla_gs.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) ha 670 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 672 drivers/scsi/qla2xxx/qla_gs.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) { ha 765 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 767 drivers/scsi/qla2xxx/qla_gs.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) ha 850 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 852 drivers/scsi/qla2xxx/qla_gs.c if (IS_QLAFX00(ha)) ha 853 drivers/scsi/qla2xxx/qla_gs.c snprintf(snn, size, "%s FW:v%s DVR:v%s", ha->model_number, ha 854 drivers/scsi/qla2xxx/qla_gs.c ha->mr.fw_version, qla2x00_version_str); ha 857 drivers/scsi/qla2xxx/qla_gs.c "%s FW:v%d.%02d.%02d DVR:v%s", ha->model_number, ha 858 drivers/scsi/qla2xxx/qla_gs.c ha->fw_major_version, ha->fw_minor_version, ha 859 drivers/scsi/qla2xxx/qla_gs.c ha->fw_subminor_version, qla2x00_version_str); ha 871 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 873 drivers/scsi/qla2xxx/qla_gs.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) { ha 976 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 978 drivers/scsi/qla2xxx/qla_gs.c sns_cmd = ha->sns_cmd; ha 982 drivers/scsi/qla2xxx/qla_gs.c put_unaligned_le64(ha->sns_cmd_dma, &sns_cmd->p.cmd.buffer_address); ha 1006 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1020 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_send_sns(vha, ha->sns_cmd_dma, GA_NXT_SNS_CMD_SIZE / 2, ha 1072 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1089 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_send_sns(vha, ha->sns_cmd_dma, GID_PT_SNS_CMD_SIZE / 2, ha 1104 drivers/scsi/qla2xxx/qla_gs.c for (i = 0; i < ha->max_fibre_devices; i++) { ha 1123 drivers/scsi/qla2xxx/qla_gs.c if (i == ha->max_fibre_devices) ha 1143 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1147 drivers/scsi/qla2xxx/qla_gs.c for (i = 0; i < ha->max_fibre_devices; i++) { ha 1159 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_send_sns(vha, ha->sns_cmd_dma, ha 1199 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1203 drivers/scsi/qla2xxx/qla_gs.c for (i = 0; i < ha->max_fibre_devices; i++) { ha 1215 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_send_sns(vha, ha->sns_cmd_dma, ha 1261 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1277 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_send_sns(vha, ha->sns_cmd_dma, RFT_ID_SNS_CMD_SIZE / 2, ha 1310 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1333 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_send_sns(vha, ha->sns_cmd_dma, RNN_ID_SNS_CMD_SIZE / 2, ha 1365 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1371 drivers/scsi/qla2xxx/qla_gs.c rval = ha->isp_ops->fabric_login(vha, vha->mgmt_svr_loop_id, 0xff, 0xff, ha 1404 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1406 drivers/scsi/qla2xxx/qla_gs.c ms_pkt = ha->ms_iocb; ha 1411 drivers/scsi/qla2xxx/qla_gs.c SET_TARGET_ID(ha, ms_pkt->loop_id, vha->mgmt_svr_loop_id); ha 1413 drivers/scsi/qla2xxx/qla_gs.c ms_pkt->timeout = cpu_to_le16(ha->r_a_tov / 10 * 2); ha 1419 drivers/scsi/qla2xxx/qla_gs.c put_unaligned_le64(ha->ct_sns_dma, &ms_pkt->req_dsd.address); ha 1422 drivers/scsi/qla2xxx/qla_gs.c put_unaligned_le64(ha->ct_sns_dma, &ms_pkt->rsp_dsd.address); ha 1441 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1443 drivers/scsi/qla2xxx/qla_gs.c ct_pkt = (struct ct_entry_24xx *)ha->ms_iocb; ha 1449 drivers/scsi/qla2xxx/qla_gs.c ct_pkt->timeout = cpu_to_le16(ha->r_a_tov / 10 * 2); ha 1455 drivers/scsi/qla2xxx/qla_gs.c put_unaligned_le64(ha->ct_sns_dma, &ct_pkt->dsd[0].address); ha 1458 drivers/scsi/qla2xxx/qla_gs.c put_unaligned_le64(ha->ct_sns_dma, &ct_pkt->dsd[1].address); ha 1468 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1469 drivers/scsi/qla2xxx/qla_gs.c ms_iocb_entry_t *ms_pkt = ha->ms_iocb; ha 1470 drivers/scsi/qla2xxx/qla_gs.c struct ct_entry_24xx *ct_pkt = (struct ct_entry_24xx *)ha->ms_iocb; ha 1472 drivers/scsi/qla2xxx/qla_gs.c if (IS_FWI2_CAPABLE(ha)) { ha 1521 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1526 drivers/scsi/qla2xxx/qla_gs.c ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(vha, 0, RHBA_RSP_SIZE); ha 1529 drivers/scsi/qla2xxx/qla_gs.c ct_req = qla2x00_prep_ct_fdmi_req(ha->ct_sns, RHBA_CMD, RHBA_RSP_SIZE); ha 1530 drivers/scsi/qla2xxx/qla_gs.c ct_rsp = &ha->ct_sns->p.rsp; ha 1569 drivers/scsi/qla2xxx/qla_gs.c if (IS_FWI2_CAPABLE(ha)) ha 1573 drivers/scsi/qla2xxx/qla_gs.c sn = ((ha->serial0 & 0x1f) << 16) | ha 1574 drivers/scsi/qla2xxx/qla_gs.c (ha->serial2 << 8) | ha->serial1; ha 1590 drivers/scsi/qla2xxx/qla_gs.c "%s", ha->model_number); ha 1603 drivers/scsi/qla2xxx/qla_gs.c "%s", ha->model_desc); ha 1615 drivers/scsi/qla2xxx/qla_gs.c if (!IS_FWI2_CAPABLE(ha)) { ha 1617 drivers/scsi/qla2xxx/qla_gs.c "HW:%s", ha->adapter_id); ha 1626 drivers/scsi/qla2xxx/qla_gs.c "HW:%s", ha->adapter_id); ha 1653 drivers/scsi/qla2xxx/qla_gs.c "%d.%02d", ha->bios_revision[1], ha->bios_revision[0]); ha 1665 drivers/scsi/qla2xxx/qla_gs.c ha->isp_ops->fw_version_str(vha, eiter->a.fw_version, ha 1685 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, ha 1725 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1731 drivers/scsi/qla2xxx/qla_gs.c struct init_cb_24xx *icb24 = (struct init_cb_24xx *)ha->init_cb; ha 1737 drivers/scsi/qla2xxx/qla_gs.c ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(vha, 0, RPA_RSP_SIZE); ha 1740 drivers/scsi/qla2xxx/qla_gs.c ct_req = qla2x00_prep_ct_fdmi_req(ha->ct_sns, RPA_CMD, ha 1742 drivers/scsi/qla2xxx/qla_gs.c ct_rsp = &ha->ct_sns->p.rsp; ha 1768 drivers/scsi/qla2xxx/qla_gs.c if (IS_CNA_CAPABLE(ha)) ha 1771 drivers/scsi/qla2xxx/qla_gs.c else if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 1776 drivers/scsi/qla2xxx/qla_gs.c else if (IS_QLA2031(ha)) ha 1781 drivers/scsi/qla2xxx/qla_gs.c else if (IS_QLA25XX(ha)) ha 1787 drivers/scsi/qla2xxx/qla_gs.c else if (IS_QLA24XX_TYPE(ha)) ha 1792 drivers/scsi/qla2xxx/qla_gs.c else if (IS_QLA23XX(ha)) ha 1808 drivers/scsi/qla2xxx/qla_gs.c switch (ha->link_data_rate) { ha 1851 drivers/scsi/qla2xxx/qla_gs.c eiter->a.max_frame_size = IS_FWI2_CAPABLE(ha) ? ha 1853 drivers/scsi/qla2xxx/qla_gs.c le16_to_cpu(ha->init_cb->frame_payload_size); ha 1901 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, ha 1942 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 1948 drivers/scsi/qla2xxx/qla_gs.c ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(vha, 0, RHBA_RSP_SIZE); ha 1951 drivers/scsi/qla2xxx/qla_gs.c ct_req = qla2x00_prep_ct_fdmi_req(ha->ct_sns, RHBA_CMD, ha 1953 drivers/scsi/qla2xxx/qla_gs.c ct_rsp = &ha->ct_sns->p.rsp; ha 1992 drivers/scsi/qla2xxx/qla_gs.c if (IS_FWI2_CAPABLE(ha)) ha 1996 drivers/scsi/qla2xxx/qla_gs.c sn = ((ha->serial0 & 0x1f) << 16) | ha 1997 drivers/scsi/qla2xxx/qla_gs.c (ha->serial2 << 8) | ha->serial1; ha 2013 drivers/scsi/qla2xxx/qla_gs.c "%s", ha->model_number); ha 2026 drivers/scsi/qla2xxx/qla_gs.c "%s", ha->model_desc); ha 2038 drivers/scsi/qla2xxx/qla_gs.c if (!IS_FWI2_CAPABLE(ha)) { ha 2040 drivers/scsi/qla2xxx/qla_gs.c "HW:%s", ha->adapter_id); ha 2049 drivers/scsi/qla2xxx/qla_gs.c "HW:%s", ha->adapter_id); ha 2076 drivers/scsi/qla2xxx/qla_gs.c "%d.%02d", ha->bios_revision[1], ha->bios_revision[0]); ha 2089 drivers/scsi/qla2xxx/qla_gs.c ha->isp_ops->fw_version_str(vha, eiter->a.fw_version, ha 2122 drivers/scsi/qla2xxx/qla_gs.c eiter->a.max_ct_len = cpu_to_be32(ha->frame_payload_size); ha 2177 drivers/scsi/qla2xxx/qla_gs.c "BIOS %d.%02d", ha->bios_revision[1], ha->bios_revision[0]); ha 2209 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, ha 2249 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 2256 drivers/scsi/qla2xxx/qla_gs.c ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(vha, DHBA_REQ_SIZE, ha 2260 drivers/scsi/qla2xxx/qla_gs.c ct_req = qla2x00_prep_ct_fdmi_req(ha->ct_sns, DHBA_CMD, DHBA_RSP_SIZE); ha 2261 drivers/scsi/qla2xxx/qla_gs.c ct_rsp = &ha->ct_sns->p.rsp; ha 2270 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, ha 2298 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 2304 drivers/scsi/qla2xxx/qla_gs.c struct init_cb_24xx *icb24 = (struct init_cb_24xx *)ha->init_cb; ha 2310 drivers/scsi/qla2xxx/qla_gs.c ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(vha, 0, RPA_RSP_SIZE); ha 2313 drivers/scsi/qla2xxx/qla_gs.c ct_req = qla2x00_prep_ct_fdmi_req(ha->ct_sns, RPA_CMD, RPA_RSP_SIZE); ha 2314 drivers/scsi/qla2xxx/qla_gs.c ct_rsp = &ha->ct_sns->p.rsp; ha 2347 drivers/scsi/qla2xxx/qla_gs.c if (IS_CNA_CAPABLE(ha)) ha 2350 drivers/scsi/qla2xxx/qla_gs.c else if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 2355 drivers/scsi/qla2xxx/qla_gs.c else if (IS_QLA2031(ha)) ha 2360 drivers/scsi/qla2xxx/qla_gs.c else if (IS_QLA25XX(ha)) ha 2366 drivers/scsi/qla2xxx/qla_gs.c else if (IS_QLA24XX_TYPE(ha)) ha 2371 drivers/scsi/qla2xxx/qla_gs.c else if (IS_QLA23XX(ha)) ha 2387 drivers/scsi/qla2xxx/qla_gs.c switch (ha->link_data_rate) { ha 2422 drivers/scsi/qla2xxx/qla_gs.c eiter->a.max_frame_size = IS_FWI2_CAPABLE(ha) ? ha 2424 drivers/scsi/qla2xxx/qla_gs.c le16_to_cpu(ha->init_cb->frame_payload_size); ha 2588 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, ha 2627 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 2629 drivers/scsi/qla2xxx/qla_gs.c if (IS_QLA2100(ha) || IS_QLA2200(ha) || ha 2630 drivers/scsi/qla2xxx/qla_gs.c IS_QLAFX00(ha)) ha 2687 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 2693 drivers/scsi/qla2xxx/qla_gs.c if (!IS_IIDMA_CAPABLE(ha)) ha 2696 drivers/scsi/qla2xxx/qla_gs.c arg.iocb = ha->ms_iocb; ha 2697 drivers/scsi/qla2xxx/qla_gs.c arg.req_dma = ha->ct_sns_dma; ha 2698 drivers/scsi/qla2xxx/qla_gs.c arg.rsp_dma = ha->ct_sns_dma; ha 2703 drivers/scsi/qla2xxx/qla_gs.c for (i = 0; i < ha->max_fibre_devices; i++) { ha 2706 drivers/scsi/qla2xxx/qla_gs.c ms_pkt = ha->isp_ops->prep_ms_iocb(vha, &arg); ha 2709 drivers/scsi/qla2xxx/qla_gs.c ct_req = qla2x00_prep_ct_req(ha->ct_sns, GFPN_ID_CMD, ha 2711 drivers/scsi/qla2xxx/qla_gs.c ct_rsp = &ha->ct_sns->p.rsp; ha 2717 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, ha 2795 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 2801 drivers/scsi/qla2xxx/qla_gs.c if (!IS_IIDMA_CAPABLE(ha)) ha 2803 drivers/scsi/qla2xxx/qla_gs.c if (!ha->flags.gpsc_supported) ha 2810 drivers/scsi/qla2xxx/qla_gs.c arg.iocb = ha->ms_iocb; ha 2811 drivers/scsi/qla2xxx/qla_gs.c arg.req_dma = ha->ct_sns_dma; ha 2812 drivers/scsi/qla2xxx/qla_gs.c arg.rsp_dma = ha->ct_sns_dma; ha 2817 drivers/scsi/qla2xxx/qla_gs.c for (i = 0; i < ha->max_fibre_devices; i++) { ha 2823 drivers/scsi/qla2xxx/qla_gs.c ct_req = qla24xx_prep_ct_fm_req(ha->ct_sns, GPSC_CMD, ha 2825 drivers/scsi/qla2xxx/qla_gs.c ct_rsp = &ha->ct_sns->p.rsp; ha 2832 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, ha 2849 drivers/scsi/qla2xxx/qla_gs.c ha->flags.gpsc_supported = 0; ha 2889 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 2893 drivers/scsi/qla2xxx/qla_gs.c for (i = 0; i < ha->max_fibre_devices; i++) { ha 2899 drivers/scsi/qla2xxx/qla_gs.c if (!IS_FWI2_CAPABLE(ha)) ha 2902 drivers/scsi/qla2xxx/qla_gs.c arg.iocb = ha->ms_iocb; ha 2903 drivers/scsi/qla2xxx/qla_gs.c arg.req_dma = ha->ct_sns_dma; ha 2904 drivers/scsi/qla2xxx/qla_gs.c arg.rsp_dma = ha->ct_sns_dma; ha 2910 drivers/scsi/qla2xxx/qla_gs.c ms_pkt = ha->isp_ops->prep_ms_iocb(vha, &arg); ha 2913 drivers/scsi/qla2xxx/qla_gs.c ct_req = qla2x00_prep_ct_req(ha->ct_sns, GFF_ID_CMD, ha 2915 drivers/scsi/qla2xxx/qla_gs.c ct_rsp = &ha->ct_sns->p.rsp; ha 2921 drivers/scsi/qla2xxx/qla_gs.c rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, ha 2994 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 3020 drivers/scsi/qla2xxx/qla_gs.c ha->flags.gpsc_supported = 0; ha 3534 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 3540 drivers/scsi/qla2xxx/qla_gs.c if (!ha->num_vhosts) ha 3543 drivers/scsi/qla2xxx/qla_gs.c spin_lock_irqsave(&ha->vport_slock, flags); ha 3544 drivers/scsi/qla2xxx/qla_gs.c list_for_each_entry(vp, &ha->vp_list, list) { ha 3551 drivers/scsi/qla2xxx/qla_gs.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 3764 drivers/scsi/qla2xxx/qla_gs.c struct qla_hw_data *ha = vha->hw; ha 3765 drivers/scsi/qla2xxx/qla_gs.c int num_fibre_dev = ha->max_fibre_devices; ha 55 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = sp->vha->hw; ha 58 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 62 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 80 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 83 drivers/scsi/qla2xxx/qla_init.c tmo = ha->r_a_tov / 10 * 2; ha 84 drivers/scsi/qla2xxx/qla_init.c if (IS_QLAFX00(ha)) { ha 86 drivers/scsi/qla2xxx/qla_init.c } else if (!IS_FWI2_CAPABLE(ha)) { ha 91 drivers/scsi/qla2xxx/qla_init.c tmo = ha->login_timeout; ha 616 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 618 drivers/scsi/qla2xxx/qla_init.c if (IS_FWI2_CAPABLE(ha)) ha 621 drivers/scsi/qla2xxx/qla_init.c return (loop_id > ha->max_loop_id && loop_id < SNS_FIRST_LOOP_ID) || ha 639 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 644 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->vport_slock, flags); ha 646 drivers/scsi/qla2xxx/qla_init.c dev->loop_id = find_first_zero_bit(ha->loop_id_map, LOOPID_MAP_SIZE); ha 652 drivers/scsi/qla2xxx/qla_init.c set_bit(dev->loop_id, ha->loop_id_map); ha 654 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 670 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = fcport->vha->hw; ha 676 drivers/scsi/qla2xxx/qla_init.c clear_bit(fcport->loop_id, ha->loop_id_map); ha 1155 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 1176 drivers/scsi/qla2xxx/qla_init.c dma_pool_free(ha->s_dma_pool, sp->u.iocb_cmd.u.mbx.in, ha 1305 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 1331 drivers/scsi/qla2xxx/qla_init.c pd = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &pd_dma); ha 1364 drivers/scsi/qla2xxx/qla_init.c dma_pool_free(ha->s_dma_pool, pd, pd_dma); ha 2094 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 2103 drivers/scsi/qla2xxx/qla_init.c ha->fcoe_dev_init_timeout = QLA83XX_IDC_INITIALIZATION_TIMEOUT; ha 2104 drivers/scsi/qla2xxx/qla_init.c ha->fcoe_reset_timeout = QLA83XX_IDC_RESET_ACK_TIMEOUT; ha 2124 drivers/scsi/qla2xxx/qla_init.c if (ha->flags.nic_core_reset_owner) { ha 2145 drivers/scsi/qla2xxx/qla_init.c idc_minor_ver |= (QLA83XX_SUPP_IDC_MINOR_VERSION << (ha->portnum * 2)); ha 2148 drivers/scsi/qla2xxx/qla_init.c if (ha->flags.nic_core_reset_owner) { ha 2177 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 2178 drivers/scsi/qla2xxx/qla_init.c struct req_que *req = ha->req_q_map[0]; ha 2179 drivers/scsi/qla2xxx/qla_init.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 2186 drivers/scsi/qla2xxx/qla_init.c ha->flags.chip_reset_done = 0; ha 2188 drivers/scsi/qla2xxx/qla_init.c ha->flags.pci_channel_io_perm_failure = 0; ha 2189 drivers/scsi/qla2xxx/qla_init.c ha->flags.eeh_busy = 0; ha 2197 drivers/scsi/qla2xxx/qla_init.c ha->isp_abort_cnt = 0; ha 2198 drivers/scsi/qla2xxx/qla_init.c ha->beacon_blink_led = 0; ha 2200 drivers/scsi/qla2xxx/qla_init.c set_bit(0, ha->req_qid_map); ha 2201 drivers/scsi/qla2xxx/qla_init.c set_bit(0, ha->rsp_qid_map); ha 2205 drivers/scsi/qla2xxx/qla_init.c rval = ha->isp_ops->pci_config(vha); ha 2212 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->reset_chip(vha); ha 2215 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA28XX(ha)) { ha 2218 drivers/scsi/qla2xxx/qla_init.c ha->flags.secure_adapter = 1; ha 2230 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA8044(ha)) { ha 2241 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->get_flash_version(vha, req->ring); ha 2245 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->nvram_config(vha); ha 2247 drivers/scsi/qla2xxx/qla_init.c if (ha->flags.disable_serdes) { ha 2258 drivers/scsi/qla2xxx/qla_init.c rval = ha->isp_ops->chip_diag(vha); ha 2266 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA84XX(ha)) { ha 2267 drivers/scsi/qla2xxx/qla_init.c ha->cs84xx = qla84xx_get_chip(vha); ha 2268 drivers/scsi/qla2xxx/qla_init.c if (!ha->cs84xx) { ha 2282 drivers/scsi/qla2xxx/qla_init.c ha->flags.chip_reset_done = 1; ha 2284 drivers/scsi/qla2xxx/qla_init.c if (rval == QLA_SUCCESS && IS_QLA84XX(ha)) { ha 2295 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA8031(ha)) { ha 2302 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA24XX_TYPE(ha) || IS_QLA25XX(ha)) ha 2305 drivers/scsi/qla2xxx/qla_init.c if (IS_P3P_TYPE(ha)) ha 2324 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 2325 drivers/scsi/qla2xxx/qla_init.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2327 drivers/scsi/qla2xxx/qla_init.c pci_set_master(ha->pdev); ha 2328 drivers/scsi/qla2xxx/qla_init.c pci_try_set_mwi(ha->pdev); ha 2330 drivers/scsi/qla2xxx/qla_init.c pci_read_config_word(ha->pdev, PCI_COMMAND, &w); ha 2332 drivers/scsi/qla2xxx/qla_init.c pci_write_config_word(ha->pdev, PCI_COMMAND, w); ha 2334 drivers/scsi/qla2xxx/qla_init.c pci_disable_rom(ha->pdev); ha 2337 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2338 drivers/scsi/qla2xxx/qla_init.c ha->pci_attr = RD_REG_WORD(®->ctrl_status); ha 2339 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2356 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 2357 drivers/scsi/qla2xxx/qla_init.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2359 drivers/scsi/qla2xxx/qla_init.c pci_set_master(ha->pdev); ha 2360 drivers/scsi/qla2xxx/qla_init.c pci_try_set_mwi(ha->pdev); ha 2362 drivers/scsi/qla2xxx/qla_init.c pci_read_config_word(ha->pdev, PCI_COMMAND, &w); ha 2365 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2322(ha) || IS_QLA6322(ha)) ha 2367 drivers/scsi/qla2xxx/qla_init.c pci_write_config_word(ha->pdev, PCI_COMMAND, w); ha 2376 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2300(ha)) { ha 2377 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2393 drivers/scsi/qla2xxx/qla_init.c ha->fb_rev = RD_FB_CMD_REG(ha, reg); ha 2395 drivers/scsi/qla2xxx/qla_init.c if (ha->fb_rev == FPM_2300) ha 2396 drivers/scsi/qla2xxx/qla_init.c pci_clear_mwi(ha->pdev); ha 2411 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2414 drivers/scsi/qla2xxx/qla_init.c pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); ha 2416 drivers/scsi/qla2xxx/qla_init.c pci_disable_rom(ha->pdev); ha 2419 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2420 drivers/scsi/qla2xxx/qla_init.c ha->pci_attr = RD_REG_WORD(®->ctrl_status); ha 2421 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2437 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 2438 drivers/scsi/qla2xxx/qla_init.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 2440 drivers/scsi/qla2xxx/qla_init.c pci_set_master(ha->pdev); ha 2441 drivers/scsi/qla2xxx/qla_init.c pci_try_set_mwi(ha->pdev); ha 2443 drivers/scsi/qla2xxx/qla_init.c pci_read_config_word(ha->pdev, PCI_COMMAND, &w); ha 2446 drivers/scsi/qla2xxx/qla_init.c pci_write_config_word(ha->pdev, PCI_COMMAND, w); ha 2448 drivers/scsi/qla2xxx/qla_init.c pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); ha 2451 drivers/scsi/qla2xxx/qla_init.c if (pci_find_capability(ha->pdev, PCI_CAP_ID_PCIX)) ha 2452 drivers/scsi/qla2xxx/qla_init.c pcix_set_mmrbc(ha->pdev, 2048); ha 2455 drivers/scsi/qla2xxx/qla_init.c if (pci_is_pcie(ha->pdev)) ha 2456 drivers/scsi/qla2xxx/qla_init.c pcie_set_readrq(ha->pdev, 4096); ha 2458 drivers/scsi/qla2xxx/qla_init.c pci_disable_rom(ha->pdev); ha 2460 drivers/scsi/qla2xxx/qla_init.c ha->chip_revision = ha->pdev->revision; ha 2463 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2464 drivers/scsi/qla2xxx/qla_init.c ha->pci_attr = RD_REG_DWORD(®->ctrl_status); ha 2465 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2480 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 2482 drivers/scsi/qla2xxx/qla_init.c pci_set_master(ha->pdev); ha 2483 drivers/scsi/qla2xxx/qla_init.c pci_try_set_mwi(ha->pdev); ha 2485 drivers/scsi/qla2xxx/qla_init.c pci_read_config_word(ha->pdev, PCI_COMMAND, &w); ha 2488 drivers/scsi/qla2xxx/qla_init.c pci_write_config_word(ha->pdev, PCI_COMMAND, w); ha 2491 drivers/scsi/qla2xxx/qla_init.c if (pci_is_pcie(ha->pdev)) ha 2492 drivers/scsi/qla2xxx/qla_init.c pcie_set_readrq(ha->pdev, 4096); ha 2494 drivers/scsi/qla2xxx/qla_init.c pci_disable_rom(ha->pdev); ha 2496 drivers/scsi/qla2xxx/qla_init.c ha->chip_revision = ha->pdev->revision; ha 2513 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 2518 drivers/scsi/qla2xxx/qla_init.c if (ha->flags.disable_risc_code_load) { ha 2522 drivers/scsi/qla2xxx/qla_init.c rval = qla2x00_verify_checksum(vha, ha->fw_srisc_address); ha 2547 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 2548 drivers/scsi/qla2xxx/qla_init.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2553 drivers/scsi/qla2xxx/qla_init.c if (unlikely(pci_channel_offline(ha->pdev))) ha 2556 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->disable_intrs(ha); ha 2558 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2562 drivers/scsi/qla2xxx/qla_init.c pci_read_config_word(ha->pdev, PCI_COMMAND, &cmd); ha 2564 drivers/scsi/qla2xxx/qla_init.c pci_write_config_word(ha->pdev, PCI_COMMAND, cmd); ha 2566 drivers/scsi/qla2xxx/qla_init.c if (!IS_QLA2100(ha)) { ha 2569 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2200(ha) || IS_QLA2300(ha)) { ha 2590 drivers/scsi/qla2xxx/qla_init.c if (!IS_QLA2200(ha)) { ha 2600 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2200(ha)) { ha 2601 drivers/scsi/qla2xxx/qla_init.c WRT_FB_CMD_REG(ha, reg, 0xa000); ha 2602 drivers/scsi/qla2xxx/qla_init.c RD_FB_CMD_REG(ha, reg); /* PCI Posting. */ ha 2604 drivers/scsi/qla2xxx/qla_init.c WRT_FB_CMD_REG(ha, reg, 0x00fc); ha 2608 drivers/scsi/qla2xxx/qla_init.c if ((RD_FB_CMD_REG(ha, reg) & 0xff) == 0) ha 2634 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2100(ha) || IS_QLA2200(ha) || IS_QLA2300(ha)) { ha 2659 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2100(ha) || IS_QLA2200(ha) || IS_QLA2300(ha)) { ha 2661 drivers/scsi/qla2xxx/qla_init.c if (RD_MAILBOX_REG(ha, reg, 0) != MBS_BUSY) ha 2671 drivers/scsi/qla2xxx/qla_init.c pci_write_config_word(ha->pdev, PCI_COMMAND, cmd); ha 2674 drivers/scsi/qla2xxx/qla_init.c if (!IS_QLA2100(ha)) { ha 2679 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2711 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 2712 drivers/scsi/qla2xxx/qla_init.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 2718 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2730 drivers/scsi/qla2xxx/qla_init.c set_bit(DMA_SHUTDOWN_CMPL, &ha->fw_dump_cap_flags); ha 2740 drivers/scsi/qla2xxx/qla_init.c pci_read_config_word(ha->pdev, PCI_COMMAND, &wd); ha 2756 drivers/scsi/qla2xxx/qla_init.c set_bit(ISP_MBX_RDY, &ha->fw_dump_cap_flags); ha 2774 drivers/scsi/qla2xxx/qla_init.c set_bit(ISP_SOFT_RESET_CMPL, &ha->fw_dump_cap_flags); ha 2817 drivers/scsi/qla2xxx/qla_init.c set_bit(RISC_RDY_AFT_RESET, &ha->fw_dump_cap_flags); ha 2824 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2828 drivers/scsi/qla2xxx/qla_init.c IS_NOPOLLING_TYPE(ha) ? "Interrupt" : "Polling"); ha 2830 drivers/scsi/qla2xxx/qla_init.c if (IS_NOPOLLING_TYPE(ha)) ha 2831 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->enable_intrs(ha); ha 2925 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 2928 drivers/scsi/qla2xxx/qla_init.c if (pci_channel_offline(ha->pdev) && ha 2929 drivers/scsi/qla2xxx/qla_init.c ha->flags.pci_channel_io_perm_failure) { ha 2933 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->disable_intrs(ha); ha 2953 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 2954 drivers/scsi/qla2xxx/qla_init.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2959 drivers/scsi/qla2xxx/qla_init.c struct req_que *req = ha->req_q_map[0]; ha 2967 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2995 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2100(ha) || IS_QLA2200(ha) || IS_QLA2300(ha)) { ha 2996 drivers/scsi/qla2xxx/qla_init.c data = qla2x00_debounce_register(MAILBOX_REG(ha, reg, 0)); ha 2999 drivers/scsi/qla2xxx/qla_init.c data = RD_MAILBOX_REG(ha, reg, 0); ha 3011 drivers/scsi/qla2xxx/qla_init.c mb[1] = RD_MAILBOX_REG(ha, reg, 1); ha 3012 drivers/scsi/qla2xxx/qla_init.c mb[2] = RD_MAILBOX_REG(ha, reg, 2); ha 3013 drivers/scsi/qla2xxx/qla_init.c mb[3] = RD_MAILBOX_REG(ha, reg, 3); ha 3014 drivers/scsi/qla2xxx/qla_init.c mb[4] = qla2x00_debounce_register(MAILBOX_REG(ha, reg, 4)); ha 3023 drivers/scsi/qla2xxx/qla_init.c ha->product_id[0] = mb[1]; ha 3024 drivers/scsi/qla2xxx/qla_init.c ha->product_id[1] = mb[2]; ha 3025 drivers/scsi/qla2xxx/qla_init.c ha->product_id[2] = mb[3]; ha 3026 drivers/scsi/qla2xxx/qla_init.c ha->product_id[3] = mb[4]; ha 3030 drivers/scsi/qla2xxx/qla_init.c ha->fw_transfer_size = REQUEST_ENTRY_SIZE * 1024; ha 3032 drivers/scsi/qla2xxx/qla_init.c ha->fw_transfer_size = REQUEST_ENTRY_SIZE * ha 3035 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2200(ha) && ha 3036 drivers/scsi/qla2xxx/qla_init.c RD_MAILBOX_REG(ha, reg, 7) == QLA2200A_RISC_ROM_VER) { ha 3040 drivers/scsi/qla2xxx/qla_init.c ha->device_type |= DT_ISP2200A; ha 3041 drivers/scsi/qla2xxx/qla_init.c ha->fw_transfer_size = 128; ha 3045 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3055 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3062 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3077 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 3078 drivers/scsi/qla2xxx/qla_init.c struct req_que *req = ha->req_q_map[0]; ha 3080 drivers/scsi/qla2xxx/qla_init.c if (IS_P3P_TYPE(ha)) ha 3083 drivers/scsi/qla2xxx/qla_init.c ha->fw_transfer_size = REQUEST_ENTRY_SIZE * req->length; ha 3103 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 3105 drivers/scsi/qla2xxx/qla_init.c if (!IS_FWI2_CAPABLE(ha)) ha 3108 drivers/scsi/qla2xxx/qla_init.c if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha) && ha 3109 drivers/scsi/qla2xxx/qla_init.c !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 3112 drivers/scsi/qla2xxx/qla_init.c if (ha->fce) { ha 3120 drivers/scsi/qla2xxx/qla_init.c tc = dma_alloc_coherent(&ha->pdev->dev, FCE_SIZE, &tc_dma, ha 3130 drivers/scsi/qla2xxx/qla_init.c ha->fce_mb, &ha->fce_bufs); ha 3134 drivers/scsi/qla2xxx/qla_init.c dma_free_coherent(&ha->pdev->dev, FCE_SIZE, tc, tc_dma); ha 3141 drivers/scsi/qla2xxx/qla_init.c ha->flags.fce_enabled = 1; ha 3142 drivers/scsi/qla2xxx/qla_init.c ha->fce_dma = tc_dma; ha 3143 drivers/scsi/qla2xxx/qla_init.c ha->fce = tc; ha 3152 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 3154 drivers/scsi/qla2xxx/qla_init.c if (!IS_FWI2_CAPABLE(ha)) ha 3157 drivers/scsi/qla2xxx/qla_init.c if (ha->eft) { ha 3165 drivers/scsi/qla2xxx/qla_init.c tc = dma_alloc_coherent(&ha->pdev->dev, EFT_SIZE, &tc_dma, ha 3178 drivers/scsi/qla2xxx/qla_init.c dma_free_coherent(&ha->pdev->dev, EFT_SIZE, tc, tc_dma); ha 3185 drivers/scsi/qla2xxx/qla_init.c ha->eft_dma = tc_dma; ha 3186 drivers/scsi/qla2xxx/qla_init.c ha->eft = tc; ha 3201 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 3202 drivers/scsi/qla2xxx/qla_init.c struct req_que *req = ha->req_q_map[0]; ha 3203 drivers/scsi/qla2xxx/qla_init.c struct rsp_que *rsp = ha->rsp_q_map[0]; ha 3209 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) { ha 3211 drivers/scsi/qla2xxx/qla_init.c } else if (IS_QLA23XX(ha)) { ha 3213 drivers/scsi/qla2xxx/qla_init.c mem_size = (ha->fw_memory_size - 0x11000 + 1) * ha 3215 drivers/scsi/qla2xxx/qla_init.c } else if (IS_FWI2_CAPABLE(ha)) { ha 3216 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 3218 drivers/scsi/qla2xxx/qla_init.c else if (IS_QLA81XX(ha)) ha 3220 drivers/scsi/qla2xxx/qla_init.c else if (IS_QLA25XX(ha)) ha 3225 drivers/scsi/qla2xxx/qla_init.c mem_size = (ha->fw_memory_size - 0x100000 + 1) * ha 3227 drivers/scsi/qla2xxx/qla_init.c if (ha->mqenable) { ha 3228 drivers/scsi/qla2xxx/qla_init.c if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha) && ha 3229 drivers/scsi/qla2xxx/qla_init.c !IS_QLA28XX(ha)) ha 3235 drivers/scsi/qla2xxx/qla_init.c mq_size += (ha->max_req_queues - 1) * ha 3237 drivers/scsi/qla2xxx/qla_init.c mq_size += (ha->max_rsp_queues - 1) * ha 3240 drivers/scsi/qla2xxx/qla_init.c if (ha->tgt.atio_ring) ha 3241 drivers/scsi/qla2xxx/qla_init.c mq_size += ha->tgt.atio_q_length * sizeof(request_t); ha 3244 drivers/scsi/qla2xxx/qla_init.c if (ha->fce) ha 3247 drivers/scsi/qla2xxx/qla_init.c if (ha->eft) ha 3251 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 3252 drivers/scsi/qla2xxx/qla_init.c struct fwdt *fwdt = ha->fwdt; ha 3276 drivers/scsi/qla2xxx/qla_init.c ha->chain_offset = dump_size; ha 3278 drivers/scsi/qla2xxx/qla_init.c if (ha->exchoffld_buf) ha 3280 drivers/scsi/qla2xxx/qla_init.c ha->exchoffld_size; ha 3281 drivers/scsi/qla2xxx/qla_init.c if (ha->exlogin_buf) ha 3283 drivers/scsi/qla2xxx/qla_init.c ha->exlogin_size; ha 3286 drivers/scsi/qla2xxx/qla_init.c if (!ha->fw_dump_len || dump_size > ha->fw_dump_alloc_len) { ha 3290 drivers/scsi/qla2xxx/qla_init.c __func__, dump_size, ha->fw_dump_len, ha 3291 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump_alloc_len); ha 3299 drivers/scsi/qla2xxx/qla_init.c mutex_lock(&ha->optrom_mutex); ha 3300 drivers/scsi/qla2xxx/qla_init.c if (ha->fw_dumped) { ha 3301 drivers/scsi/qla2xxx/qla_init.c memcpy(fw_dump, ha->fw_dump, ha->fw_dump_len); ha 3302 drivers/scsi/qla2xxx/qla_init.c vfree(ha->fw_dump); ha 3303 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump = fw_dump; ha 3304 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump_alloc_len = dump_size; ha 3309 drivers/scsi/qla2xxx/qla_init.c if (ha->fw_dump) ha 3310 drivers/scsi/qla2xxx/qla_init.c vfree(ha->fw_dump); ha 3311 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump = fw_dump; ha 3313 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump_len = ha->fw_dump_alloc_len = ha 3319 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 3320 drivers/scsi/qla2xxx/qla_init.c mutex_unlock(&ha->optrom_mutex); ha 3324 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->signature[0] = 'Q'; ha 3325 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->signature[1] = 'L'; ha 3326 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->signature[2] = 'G'; ha 3327 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->signature[3] = 'C'; ha 3328 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->version = htonl(1); ha 3330 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->fixed_size = htonl(fixed_size); ha 3331 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->mem_size = htonl(mem_size); ha 3332 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->req_q_size = htonl(req_q_size); ha 3333 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->rsp_q_size = htonl(rsp_q_size); ha 3335 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->eft_size = htonl(eft_size); ha 3336 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->eft_addr_l = ha 3337 drivers/scsi/qla2xxx/qla_init.c htonl(LSD(ha->eft_dma)); ha 3338 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->eft_addr_h = ha 3339 drivers/scsi/qla2xxx/qla_init.c htonl(MSD(ha->eft_dma)); ha 3341 drivers/scsi/qla2xxx/qla_init.c ha->fw_dump->header_size = ha 3345 drivers/scsi/qla2xxx/qla_init.c mutex_unlock(&ha->optrom_mutex); ha 3398 drivers/scsi/qla2xxx/qla_init.c qla2x00_alloc_outstanding_cmds(struct qla_hw_data *ha, struct req_que *req) ha 3404 drivers/scsi/qla2xxx/qla_init.c if (!IS_FWI2_CAPABLE(ha)) ha 3407 drivers/scsi/qla2xxx/qla_init.c if (ha->cur_fw_xcb_count <= ha->cur_fw_iocb_count) ha 3408 drivers/scsi/qla2xxx/qla_init.c req->num_outstanding_cmds = ha->cur_fw_xcb_count; ha 3410 drivers/scsi/qla2xxx/qla_init.c req->num_outstanding_cmds = ha->cur_fw_iocb_count; ha 3542 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 3556 drivers/scsi/qla2xxx/qla_init.c ha->flags.detected_lr_sfp = 1; ha 3559 drivers/scsi/qla2xxx/qla_init.c ha->long_range_distance = LR_DISTANCE_10K; ha 3561 drivers/scsi/qla2xxx/qla_init.c ha->long_range_distance = LR_DISTANCE_5K; ha 3563 drivers/scsi/qla2xxx/qla_init.c if (ha->flags.detected_lr_sfp != ha->flags.using_lr_setting) ha 3568 drivers/scsi/qla2xxx/qla_init.c ha->flags.detected_lr_sfp = 0; ha 3569 drivers/scsi/qla2xxx/qla_init.c if (ha->flags.using_lr_setting) ha 3591 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 3592 drivers/scsi/qla2xxx/qla_init.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 3596 drivers/scsi/qla2xxx/qla_init.c if (IS_P3P_TYPE(ha)) { ha 3597 drivers/scsi/qla2xxx/qla_init.c rval = ha->isp_ops->load_risc(vha, &srisc_address); ha 3605 drivers/scsi/qla2xxx/qla_init.c if (!IS_FWI2_CAPABLE(ha) && !IS_QLA2100(ha) && !IS_QLA2200(ha)) { ha 3607 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3610 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3616 drivers/scsi/qla2xxx/qla_init.c rval = ha->isp_ops->load_risc(vha, &srisc_address); ha 3628 drivers/scsi/qla2xxx/qla_init.c ha->flags.exlogins_enabled = 1; ha 3631 drivers/scsi/qla2xxx/qla_init.c ha->flags.exchoffld_enabled = 1; ha 3638 drivers/scsi/qla2xxx/qla_init.c if ((IS_QLA83XX(ha) || IS_QLA27XX(ha) || ha 3639 drivers/scsi/qla2xxx/qla_init.c IS_QLA28XX(ha)) && ha 3640 drivers/scsi/qla2xxx/qla_init.c (ha->zio_mode == QLA_ZIO_MODE_6)) ha 3642 drivers/scsi/qla2xxx/qla_init.c ha->last_zio_threshold); ha 3653 drivers/scsi/qla2xxx/qla_init.c fw_major_version = ha->fw_major_version; ha 3654 drivers/scsi/qla2xxx/qla_init.c if (IS_P3P_TYPE(ha)) ha 3660 drivers/scsi/qla2xxx/qla_init.c ha->flags.npiv_supported = 0; ha 3661 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2XXX_MIDTYPE(ha) && ha 3662 drivers/scsi/qla2xxx/qla_init.c (ha->fw_attributes & BIT_2)) { ha 3663 drivers/scsi/qla2xxx/qla_init.c ha->flags.npiv_supported = 1; ha 3664 drivers/scsi/qla2xxx/qla_init.c if ((!ha->max_npiv_vports) || ha 3665 drivers/scsi/qla2xxx/qla_init.c ((ha->max_npiv_vports + 1) % ha 3667 drivers/scsi/qla2xxx/qla_init.c ha->max_npiv_vports = ha 3676 drivers/scsi/qla2xxx/qla_init.c rval = qla2x00_alloc_outstanding_cmds(ha, ha 3681 drivers/scsi/qla2xxx/qla_init.c if (!fw_major_version && !(IS_P3P_TYPE(ha))) ha 3684 drivers/scsi/qla2xxx/qla_init.c if (ql2xallocfwdump && !(IS_P3P_TYPE(ha))) ha 3698 drivers/scsi/qla2xxx/qla_init.c if (!IS_FWI2_CAPABLE(ha) && !IS_QLA2100(ha) && !IS_QLA2200(ha)) { ha 3700 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3701 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2300(ha)) ha 3708 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3711 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 3712 drivers/scsi/qla2xxx/qla_init.c ha->flags.fac_supported = 1; ha 3713 drivers/scsi/qla2xxx/qla_init.c else if (rval == QLA_SUCCESS && IS_FAC_REQUIRED(ha)) { ha 3718 drivers/scsi/qla2xxx/qla_init.c ha->flags.fac_supported = 1; ha 3719 drivers/scsi/qla2xxx/qla_init.c ha->fdt_block_size = size << 2; ha 3723 drivers/scsi/qla2xxx/qla_init.c ha->fw_major_version, ha->fw_minor_version, ha 3724 drivers/scsi/qla2xxx/qla_init.c ha->fw_subminor_version); ha 3726 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || ha 3727 drivers/scsi/qla2xxx/qla_init.c IS_QLA28XX(ha)) { ha 3728 drivers/scsi/qla2xxx/qla_init.c ha->flags.fac_supported = 0; ha 3777 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 3779 drivers/scsi/qla2xxx/qla_init.c memset(ha->fw_options, 0, sizeof(ha->fw_options)); ha 3780 drivers/scsi/qla2xxx/qla_init.c qla2x00_get_fw_options(vha, ha->fw_options); ha 3782 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) ha 3789 drivers/scsi/qla2xxx/qla_init.c ha->fw_seriallink_options, sizeof(ha->fw_seriallink_options)); ha 3791 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[1] &= ~FO1_SET_EMPHASIS_SWING; ha 3792 drivers/scsi/qla2xxx/qla_init.c if (ha->fw_seriallink_options[3] & BIT_2) { ha 3793 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[1] |= FO1_SET_EMPHASIS_SWING; ha 3796 drivers/scsi/qla2xxx/qla_init.c swing = ha->fw_seriallink_options[2] & (BIT_2 | BIT_1 | BIT_0); ha 3797 drivers/scsi/qla2xxx/qla_init.c emphasis = (ha->fw_seriallink_options[2] & ha 3799 drivers/scsi/qla2xxx/qla_init.c tx_sens = ha->fw_seriallink_options[0] & ha 3801 drivers/scsi/qla2xxx/qla_init.c rx_sens = (ha->fw_seriallink_options[0] & ha 3803 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[10] = (emphasis << 14) | (swing << 8); ha 3804 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2300(ha) || IS_QLA2312(ha) || IS_QLA6312(ha)) { ha 3807 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[10] |= (tx_sens << 4) | rx_sens; ha 3808 drivers/scsi/qla2xxx/qla_init.c } else if (IS_QLA2322(ha) || IS_QLA6322(ha)) ha 3809 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[10] |= BIT_5 | ha 3814 drivers/scsi/qla2xxx/qla_init.c swing = (ha->fw_seriallink_options[2] & ha 3816 drivers/scsi/qla2xxx/qla_init.c emphasis = ha->fw_seriallink_options[3] & (BIT_1 | BIT_0); ha 3817 drivers/scsi/qla2xxx/qla_init.c tx_sens = ha->fw_seriallink_options[1] & ha 3819 drivers/scsi/qla2xxx/qla_init.c rx_sens = (ha->fw_seriallink_options[1] & ha 3821 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[11] = (emphasis << 14) | (swing << 8); ha 3822 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2300(ha) || IS_QLA2312(ha) || IS_QLA6312(ha)) { ha 3825 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[11] |= (tx_sens << 4) | rx_sens; ha 3826 drivers/scsi/qla2xxx/qla_init.c } else if (IS_QLA2322(ha) || IS_QLA6322(ha)) ha 3827 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[11] |= BIT_5 | ha 3834 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[3] |= BIT_13; ha 3837 drivers/scsi/qla2xxx/qla_init.c if (ha->flags.enable_led_scheme) ha 3838 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] |= BIT_12; ha 3841 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA6312(ha)) ha 3842 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] |= BIT_13; ha 3845 drivers/scsi/qla2xxx/qla_init.c if (ha->operating_mode == P2P) { ha 3846 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] |= BIT_3; ha 3849 drivers/scsi/qla2xxx/qla_init.c __func__, ha->fw_options[2]); ha 3853 drivers/scsi/qla2xxx/qla_init.c qla2x00_set_fw_options(vha, ha->fw_options); ha 3860 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 3862 drivers/scsi/qla2xxx/qla_init.c if (IS_P3P_TYPE(ha)) ha 3867 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[3] |= BIT_12; ha 3870 drivers/scsi/qla2xxx/qla_init.c if (ha->operating_mode == P2P) { ha 3871 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] |= BIT_3; ha 3874 drivers/scsi/qla2xxx/qla_init.c __func__, ha->fw_options[2]); ha 3879 drivers/scsi/qla2xxx/qla_init.c (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha))) { ha 3882 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] |= BIT_11; ha 3884 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] &= ~BIT_11; ha 3887 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA25XX(ha) || IS_QLA83XX(ha) || IS_QLA27XX(ha) || ha 3888 drivers/scsi/qla2xxx/qla_init.c IS_QLA28XX(ha)) { ha 3895 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] |= BIT_4; ha 3897 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] &= ~BIT_4; ha 3901 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] |= BIT_8; ha 3903 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] &= ~BIT_8; ha 3908 drivers/scsi/qla2xxx/qla_init.c __func__, ha->fw_options[1], ha->fw_options[2], ha 3909 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[3], vha->host->active_mode); ha 3911 drivers/scsi/qla2xxx/qla_init.c if (ha->fw_options[1] || ha->fw_options[2] || ha->fw_options[3]) ha 3912 drivers/scsi/qla2xxx/qla_init.c qla2x00_set_fw_options(vha, ha->fw_options); ha 3915 drivers/scsi/qla2xxx/qla_init.c if ((le16_to_cpu(ha->fw_seriallink_options24[0]) & BIT_0) == 0) ha 3919 drivers/scsi/qla2xxx/qla_init.c le16_to_cpu(ha->fw_seriallink_options24[1]), ha 3920 drivers/scsi/qla2xxx/qla_init.c le16_to_cpu(ha->fw_seriallink_options24[2]), ha 3921 drivers/scsi/qla2xxx/qla_init.c le16_to_cpu(ha->fw_seriallink_options24[3])); ha 3931 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 3932 drivers/scsi/qla2xxx/qla_init.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 3933 drivers/scsi/qla2xxx/qla_init.c struct req_que *req = ha->req_q_map[0]; ha 3934 drivers/scsi/qla2xxx/qla_init.c struct rsp_que *rsp = ha->rsp_q_map[0]; ha 3937 drivers/scsi/qla2xxx/qla_init.c ha->init_cb->request_q_outpointer = cpu_to_le16(0); ha 3938 drivers/scsi/qla2xxx/qla_init.c ha->init_cb->response_q_inpointer = cpu_to_le16(0); ha 3939 drivers/scsi/qla2xxx/qla_init.c ha->init_cb->request_q_length = cpu_to_le16(req->length); ha 3940 drivers/scsi/qla2xxx/qla_init.c ha->init_cb->response_q_length = cpu_to_le16(rsp->length); ha 3941 drivers/scsi/qla2xxx/qla_init.c put_unaligned_le64(req->dma, &ha->init_cb->request_q_address); ha 3942 drivers/scsi/qla2xxx/qla_init.c put_unaligned_le64(rsp->dma, &ha->init_cb->response_q_address); ha 3944 drivers/scsi/qla2xxx/qla_init.c WRT_REG_WORD(ISP_REQ_Q_IN(ha, reg), 0); ha 3945 drivers/scsi/qla2xxx/qla_init.c WRT_REG_WORD(ISP_REQ_Q_OUT(ha, reg), 0); ha 3946 drivers/scsi/qla2xxx/qla_init.c WRT_REG_WORD(ISP_RSP_Q_IN(ha, reg), 0); ha 3947 drivers/scsi/qla2xxx/qla_init.c WRT_REG_WORD(ISP_RSP_Q_OUT(ha, reg), 0); ha 3948 drivers/scsi/qla2xxx/qla_init.c RD_REG_WORD(ISP_RSP_Q_OUT(ha, reg)); /* PCI Posting. */ ha 3954 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 3955 drivers/scsi/qla2xxx/qla_init.c device_reg_t *reg = ISP_QUE_REG(ha, 0); ha 3956 drivers/scsi/qla2xxx/qla_init.c struct device_reg_2xxx __iomem *ioreg = &ha->iobase->isp; ha 3960 drivers/scsi/qla2xxx/qla_init.c struct req_que *req = ha->req_q_map[0]; ha 3961 drivers/scsi/qla2xxx/qla_init.c struct rsp_que *rsp = ha->rsp_q_map[0]; ha 3964 drivers/scsi/qla2xxx/qla_init.c icb = (struct init_cb_24xx *)ha->init_cb; ha 3974 drivers/scsi/qla2xxx/qla_init.c icb->atio_q_length = cpu_to_le16(ha->tgt.atio_q_length); ha 3975 drivers/scsi/qla2xxx/qla_init.c put_unaligned_le64(ha->tgt.atio_dma, &icb->atio_q_address); ha 3977 drivers/scsi/qla2xxx/qla_init.c if (IS_SHADOW_REG_CAPABLE(ha)) ha 3980 drivers/scsi/qla2xxx/qla_init.c if (ha->mqenable || IS_QLA83XX(ha) || IS_QLA27XX(ha) || ha 3981 drivers/scsi/qla2xxx/qla_init.c IS_QLA28XX(ha)) { ha 3984 drivers/scsi/qla2xxx/qla_init.c if (ha->flags.msix_enabled) { ha 3985 drivers/scsi/qla2xxx/qla_init.c msix = &ha->msix_entries[1]; ha 3999 drivers/scsi/qla2xxx/qla_init.c if ((ha->fw_attributes & BIT_6) && (IS_MSIX_NACK_CAPABLE(ha)) && ha 4000 drivers/scsi/qla2xxx/qla_init.c (ha->flags.msix_enabled)) { ha 4002 drivers/scsi/qla2xxx/qla_init.c ha->flags.disable_msix_handshake = 1; ha 4024 drivers/scsi/qla2xxx/qla_init.c if (ha->set_data_rate) { ha 4027 drivers/scsi/qla2xxx/qla_init.c qla2x00_get_link_speed_str(ha, ha->set_data_rate)); ha 4028 drivers/scsi/qla2xxx/qla_init.c icb->firmware_options_3 = (ha->set_data_rate << 13); ha 4050 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 4054 drivers/scsi/qla2xxx/qla_init.c (struct mid_init_cb_24xx *) ha->init_cb; ha 4056 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4059 drivers/scsi/qla2xxx/qla_init.c for (que = 0; que < ha->max_req_queues; que++) { ha 4060 drivers/scsi/qla2xxx/qla_init.c req = ha->req_q_map[que]; ha 4061 drivers/scsi/qla2xxx/qla_init.c if (!req || !test_bit(que, ha->req_qid_map)) ha 4076 drivers/scsi/qla2xxx/qla_init.c for (que = 0; que < ha->max_rsp_queues; que++) { ha 4077 drivers/scsi/qla2xxx/qla_init.c rsp = ha->rsp_q_map[que]; ha 4078 drivers/scsi/qla2xxx/qla_init.c if (!rsp || !test_bit(que, ha->rsp_qid_map)) ha 4083 drivers/scsi/qla2xxx/qla_init.c if (IS_QLAFX00(ha)) ha 4089 drivers/scsi/qla2xxx/qla_init.c ha->tgt.atio_ring_ptr = ha->tgt.atio_ring; ha 4090 drivers/scsi/qla2xxx/qla_init.c ha->tgt.atio_ring_index = 0; ha 4094 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->config_rings(vha); ha 4096 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4100 drivers/scsi/qla2xxx/qla_init.c if (IS_QLAFX00(ha)) { ha 4101 drivers/scsi/qla2xxx/qla_init.c rval = qlafx00_init_firmware(vha, ha->init_cb_size); ha 4106 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->update_fw_options(vha); ha 4108 drivers/scsi/qla2xxx/qla_init.c if (ha->flags.npiv_supported) { ha 4109 drivers/scsi/qla2xxx/qla_init.c if (ha->operating_mode == LOOP && !IS_CNA_CAPABLE(ha)) ha 4110 drivers/scsi/qla2xxx/qla_init.c ha->max_npiv_vports = MIN_MULTI_ID_FABRIC - 1; ha 4111 drivers/scsi/qla2xxx/qla_init.c mid_init_cb->count = cpu_to_le16(ha->max_npiv_vports); ha 4114 drivers/scsi/qla2xxx/qla_init.c if (IS_FWI2_CAPABLE(ha)) { ha 4117 drivers/scsi/qla2xxx/qla_init.c cpu_to_le16(ha->cur_fw_xcb_count); ha 4118 drivers/scsi/qla2xxx/qla_init.c ha->flags.dport_enabled = ha 4121 drivers/scsi/qla2xxx/qla_init.c (ha->flags.dport_enabled) ? "enabled" : "disabled"); ha 4123 drivers/scsi/qla2xxx/qla_init.c ha->flags.fawwpn_enabled = ha 4126 drivers/scsi/qla2xxx/qla_init.c (ha->flags.fawwpn_enabled) ? "enabled" : "disabled"); ha 4129 drivers/scsi/qla2xxx/qla_init.c rval = qla2x00_init_firmware(vha, ha->init_cb_size); ha 4137 drivers/scsi/qla2xxx/qla_init.c QLA_FW_STARTED(ha); ha 4158 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 4166 drivers/scsi/qla2xxx/qla_init.c if (IS_P3P_TYPE(ha)) ha 4175 drivers/scsi/qla2xxx/qla_init.c if ((wait_time = (ha->retry_count*ha->login_timeout) + 5) < min_wait) { ha 4197 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA84XX(ha) && state[0] != FSTATE_READY) { ha 4228 drivers/scsi/qla2xxx/qla_init.c qla2x00_get_retry_cnt(vha, &ha->retry_count, ha 4229 drivers/scsi/qla2xxx/qla_init.c &ha->login_timeout, &ha->r_a_tov); ha 4253 drivers/scsi/qla2xxx/qla_init.c ha->flags.isp82xx_fw_hung) ha 4300 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 4301 drivers/scsi/qla2xxx/qla_init.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 4309 drivers/scsi/qla2xxx/qla_init.c if (LOOP_TRANSITION(vha) || atomic_read(&ha->loop_down_timer) || ha 4310 drivers/scsi/qla2xxx/qla_init.c IS_CNA_CAPABLE(ha) || ha 4317 drivers/scsi/qla2xxx/qla_init.c if (IS_FWI2_CAPABLE(ha) && (vha == base_vha) && ha 4338 drivers/scsi/qla2xxx/qla_init.c ha->min_external_loopid = SNS_FIRST_LOOP_ID; ha 4339 drivers/scsi/qla2xxx/qla_init.c ha->operating_mode = LOOP; ha 4340 drivers/scsi/qla2xxx/qla_init.c ha->switch_cap = 0; ha 4345 drivers/scsi/qla2xxx/qla_init.c ha->current_topology = ISP_CFG_NL; ha 4351 drivers/scsi/qla2xxx/qla_init.c ha->switch_cap = sw_cap; ha 4352 drivers/scsi/qla2xxx/qla_init.c ha->current_topology = ISP_CFG_FL; ha 4358 drivers/scsi/qla2xxx/qla_init.c ha->operating_mode = P2P; ha 4359 drivers/scsi/qla2xxx/qla_init.c ha->current_topology = ISP_CFG_N; ha 4365 drivers/scsi/qla2xxx/qla_init.c ha->switch_cap = sw_cap; ha 4366 drivers/scsi/qla2xxx/qla_init.c ha->operating_mode = P2P; ha 4367 drivers/scsi/qla2xxx/qla_init.c ha->current_topology = ISP_CFG_F; ha 4374 drivers/scsi/qla2xxx/qla_init.c ha->current_topology = ISP_CFG_NL; ha 4385 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4386 drivers/scsi/qla2xxx/qla_init.c if (!(topo == 2 && ha->flags.n2n_bigger)) ha 4388 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4405 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 4406 drivers/scsi/qla2xxx/qla_init.c int use_tbl = !IS_QLA24XX_TYPE(ha) && !IS_QLA25XX(ha) && ha 4407 drivers/scsi/qla2xxx/qla_init.c !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha); ha 4412 drivers/scsi/qla2xxx/qla_init.c memcpy(ha->model_number, model, len); ha 4413 drivers/scsi/qla2xxx/qla_init.c st = en = ha->model_number; ha 4421 drivers/scsi/qla2xxx/qla_init.c index = (ha->pdev->subsystem_device & 0xff); ha 4423 drivers/scsi/qla2xxx/qla_init.c ha->pdev->subsystem_vendor == PCI_VENDOR_ID_QLOGIC && ha 4425 drivers/scsi/qla2xxx/qla_init.c strlcpy(ha->model_desc, ha 4427 drivers/scsi/qla2xxx/qla_init.c sizeof(ha->model_desc)); ha 4429 drivers/scsi/qla2xxx/qla_init.c index = (ha->pdev->subsystem_device & 0xff); ha 4431 drivers/scsi/qla2xxx/qla_init.c ha->pdev->subsystem_vendor == PCI_VENDOR_ID_QLOGIC && ha 4433 drivers/scsi/qla2xxx/qla_init.c strlcpy(ha->model_number, ha 4435 drivers/scsi/qla2xxx/qla_init.c sizeof(ha->model_number)); ha 4436 drivers/scsi/qla2xxx/qla_init.c strlcpy(ha->model_desc, ha 4438 drivers/scsi/qla2xxx/qla_init.c sizeof(ha->model_desc)); ha 4440 drivers/scsi/qla2xxx/qla_init.c strlcpy(ha->model_number, def, ha 4441 drivers/scsi/qla2xxx/qla_init.c sizeof(ha->model_number)); ha 4444 drivers/scsi/qla2xxx/qla_init.c if (IS_FWI2_CAPABLE(ha)) ha 4445 drivers/scsi/qla2xxx/qla_init.c qla2xxx_get_vpd_field(vha, "\x82", ha->model_desc, ha 4446 drivers/scsi/qla2xxx/qla_init.c sizeof(ha->model_desc)); ha 4455 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 4456 drivers/scsi/qla2xxx/qla_init.c struct pci_dev *pdev = ha->pdev; ha 4491 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 4492 drivers/scsi/qla2xxx/qla_init.c init_cb_t *icb = ha->init_cb; ha 4493 drivers/scsi/qla2xxx/qla_init.c nvram_t *nv = ha->nvram; ha 4494 drivers/scsi/qla2xxx/qla_init.c uint8_t *ptr = ha->nvram; ha 4495 drivers/scsi/qla2xxx/qla_init.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 4500 drivers/scsi/qla2xxx/qla_init.c ha->nvram_size = sizeof(*nv); ha 4501 drivers/scsi/qla2xxx/qla_init.c ha->nvram_base = 0; ha 4502 drivers/scsi/qla2xxx/qla_init.c if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA2300(ha)) ha 4504 drivers/scsi/qla2xxx/qla_init.c ha->nvram_base = 0x80; ha 4507 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->read_nvram(vha, ptr, ha->nvram_base, ha->nvram_size); ha 4508 drivers/scsi/qla2xxx/qla_init.c for (cnt = 0, chksum = 0; cnt < ha->nvram_size; cnt++) ha 4514 drivers/scsi/qla2xxx/qla_init.c nv, ha->nvram_size); ha 4530 drivers/scsi/qla2xxx/qla_init.c memset(nv, 0, ha->nvram_size); ha 4533 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA23XX(ha)) { ha 4540 drivers/scsi/qla2xxx/qla_init.c } else if (IS_QLA2200(ha)) { ha 4546 drivers/scsi/qla2xxx/qla_init.c } else if (IS_QLA2100(ha)) { ha 4578 drivers/scsi/qla2xxx/qla_init.c memset(icb, 0, ha->init_cb_size); ha 4588 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA23XX(ha)) { ha 4594 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2300(ha)) { ha 4595 drivers/scsi/qla2xxx/qla_init.c if (ha->fb_rev == FPM_2310) { ha 4596 drivers/scsi/qla2xxx/qla_init.c strcpy(ha->model_number, "QLA2310"); ha 4598 drivers/scsi/qla2xxx/qla_init.c strcpy(ha->model_number, "QLA2300"); ha 4604 drivers/scsi/qla2xxx/qla_init.c } else if (IS_QLA2200(ha)) { ha 4616 drivers/scsi/qla2xxx/qla_init.c strcpy(ha->model_number, "QLA22xx"); ha 4618 drivers/scsi/qla2xxx/qla_init.c strcpy(ha->model_number, "QLA2100"); ha 4635 drivers/scsi/qla2xxx/qla_init.c ha->frame_payload_size = le16_to_cpu(icb->frame_payload_size); ha 4662 drivers/scsi/qla2xxx/qla_init.c ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); ha 4664 drivers/scsi/qla2xxx/qla_init.c if (!IS_QLA2100(ha) && !IS_QLA2200(ha)) ha 4665 drivers/scsi/qla2xxx/qla_init.c ha->flags.disable_risc_code_load = 0; ha 4666 drivers/scsi/qla2xxx/qla_init.c ha->flags.enable_lip_reset = ((nv->host_p[1] & BIT_1) ? 1 : 0); ha 4667 drivers/scsi/qla2xxx/qla_init.c ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0); ha 4668 drivers/scsi/qla2xxx/qla_init.c ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0); ha 4669 drivers/scsi/qla2xxx/qla_init.c ha->flags.enable_led_scheme = (nv->special_options[1] & BIT_4) ? 1 : 0; ha 4670 drivers/scsi/qla2xxx/qla_init.c ha->flags.disable_serdes = 0; ha 4672 drivers/scsi/qla2xxx/qla_init.c ha->operating_mode = ha 4675 drivers/scsi/qla2xxx/qla_init.c memcpy(ha->fw_seriallink_options, nv->seriallink_options, ha 4676 drivers/scsi/qla2xxx/qla_init.c sizeof(ha->fw_seriallink_options)); ha 4679 drivers/scsi/qla2xxx/qla_init.c ha->serial0 = icb->port_name[5]; ha 4680 drivers/scsi/qla2xxx/qla_init.c ha->serial1 = icb->port_name[6]; ha 4681 drivers/scsi/qla2xxx/qla_init.c ha->serial2 = icb->port_name[7]; ha 4687 drivers/scsi/qla2xxx/qla_init.c ha->retry_count = nv->retry_count; ha 4694 drivers/scsi/qla2xxx/qla_init.c ha->login_timeout = nv->login_timeout; ha 4697 drivers/scsi/qla2xxx/qla_init.c ha->r_a_tov = 100; ha 4699 drivers/scsi/qla2xxx/qla_init.c ha->loop_reset_delay = nv->reset_delay; ha 4712 drivers/scsi/qla2xxx/qla_init.c ha->loop_down_abort_time = ha 4715 drivers/scsi/qla2xxx/qla_init.c ha->link_down_timeout = nv->link_down_timeout; ha 4716 drivers/scsi/qla2xxx/qla_init.c ha->loop_down_abort_time = ha 4717 drivers/scsi/qla2xxx/qla_init.c (LOOP_DOWN_TIME - ha->link_down_timeout); ha 4723 drivers/scsi/qla2xxx/qla_init.c ha->port_down_retry_count = nv->port_down_retry_count; ha 4725 drivers/scsi/qla2xxx/qla_init.c ha->port_down_retry_count = qlport_down_retry; ha 4727 drivers/scsi/qla2xxx/qla_init.c ha->login_retry_count = nv->retry_count; ha 4728 drivers/scsi/qla2xxx/qla_init.c if (ha->port_down_retry_count == nv->port_down_retry_count && ha 4729 drivers/scsi/qla2xxx/qla_init.c ha->port_down_retry_count > 3) ha 4730 drivers/scsi/qla2xxx/qla_init.c ha->login_retry_count = ha->port_down_retry_count; ha 4731 drivers/scsi/qla2xxx/qla_init.c else if (ha->port_down_retry_count > (int)ha->login_retry_count) ha 4732 drivers/scsi/qla2xxx/qla_init.c ha->login_retry_count = ha->port_down_retry_count; ha 4734 drivers/scsi/qla2xxx/qla_init.c ha->login_retry_count = ql2xloginretrycount; ha 4741 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) { ha 4754 drivers/scsi/qla2xxx/qla_init.c ha->zio_mode = icb->add_firmware_options[0] & ha 4756 drivers/scsi/qla2xxx/qla_init.c ha->zio_timer = icb->interrupt_delay_timer ? ha 4762 drivers/scsi/qla2xxx/qla_init.c if (ha->zio_mode != QLA_ZIO_DISABLED) { ha 4763 drivers/scsi/qla2xxx/qla_init.c ha->zio_mode = QLA_ZIO_MODE_6; ha 4767 drivers/scsi/qla2xxx/qla_init.c ha->zio_mode, ha->zio_timer * 100); ha 4769 drivers/scsi/qla2xxx/qla_init.c icb->add_firmware_options[0] |= (uint8_t)ha->zio_mode; ha 4770 drivers/scsi/qla2xxx/qla_init.c icb->interrupt_delay_timer = (uint8_t)ha->zio_timer; ha 4909 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 4937 drivers/scsi/qla2xxx/qla_init.c if (ha->current_topology == ISP_CFG_FL && ha 4942 drivers/scsi/qla2xxx/qla_init.c } else if (ha->current_topology == ISP_CFG_F && ha 4948 drivers/scsi/qla2xxx/qla_init.c } else if (ha->current_topology == ISP_CFG_NL || ha 4949 drivers/scsi/qla2xxx/qla_init.c ha->current_topology == ISP_CFG_N) { ha 4985 drivers/scsi/qla2xxx/qla_init.c ha->flags.fw_init_done = 1; ha 4993 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->tgt.atio_lock, flags); ha 4995 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->tgt.atio_lock, ha 5044 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 5048 drivers/scsi/qla2xxx/qla_init.c if (N2N_TOPO(ha)) { ha 5053 drivers/scsi/qla2xxx/qla_init.c memset(ha->init_cb, 0, ha->init_cb_size); ha 5055 drivers/scsi/qla2xxx/qla_init.c ha->init_cb_size); ha 5057 drivers/scsi/qla2xxx/qla_init.c ha->init_cb_dma, (void *)ha->init_cb, sz); ha 5059 drivers/scsi/qla2xxx/qla_init.c bp = (uint32_t *)ha->init_cb; ha 5063 drivers/scsi/qla2xxx/qla_init.c memcpy(&ha->plogi_els_payld.data, ha 5064 drivers/scsi/qla2xxx/qla_init.c (void *)ha->init_cb, ha 5065 drivers/scsi/qla2xxx/qla_init.c sizeof(ha->plogi_els_payld.data)); ha 5095 drivers/scsi/qla2xxx/qla_init.c memset(ha->gid_list, 0, qla2x00_gid_list_size(ha)); ha 5096 drivers/scsi/qla2xxx/qla_init.c rval = qla2x00_get_id_list(vha, ha->gid_list, ha->gid_list_dma, ha 5104 drivers/scsi/qla2xxx/qla_init.c ha->gid_list, entries * sizeof(*ha->gid_list)); ha 5134 drivers/scsi/qla2xxx/qla_init.c gid = ha->gid_list; ha 5139 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) ha 5143 drivers/scsi/qla2xxx/qla_init.c gid = (void *)gid + ha->gid_list_info_size; ha 5152 drivers/scsi/qla2xxx/qla_init.c (ha->current_topology == ISP_CFG_NL)) ha 5176 drivers/scsi/qla2xxx/qla_init.c if (ha->current_topology != ISP_CFG_N) { ha 5228 drivers/scsi/qla2xxx/qla_init.c fcport->fp_speed = ha->link_data_rate; ha 5278 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 5280 drivers/scsi/qla2xxx/qla_init.c if (!IS_IIDMA_CAPABLE(ha)) ha 5287 drivers/scsi/qla2xxx/qla_init.c fcport->fp_speed > ha->link_data_rate || ha 5288 drivers/scsi/qla2xxx/qla_init.c !ha->flags.gpsc_supported) ha 5300 drivers/scsi/qla2xxx/qla_init.c qla2x00_get_link_speed_str(ha, fcport->fp_speed), ha 5512 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 5516 drivers/scsi/qla2xxx/qla_init.c if (IS_FWI2_CAPABLE(ha)) ha 5549 drivers/scsi/qla2xxx/qla_init.c loop_id = NPH_SNS_LID(ha); ha 5550 drivers/scsi/qla2xxx/qla_init.c rval = ha->isp_ops->fabric_login(vha, loop_id, 0xff, 0xff, ha 5607 drivers/scsi/qla2xxx/qla_init.c if (USE_ASYNC_SCAN(ha)) { ha 5657 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 5658 drivers/scsi/qla2xxx/qla_init.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 5664 drivers/scsi/qla2xxx/qla_init.c if (!ha->swl) ha 5665 drivers/scsi/qla2xxx/qla_init.c ha->swl = kcalloc(ha->max_fibre_devices, sizeof(sw_info_t), ha 5667 drivers/scsi/qla2xxx/qla_init.c swl = ha->swl; ha 5673 drivers/scsi/qla2xxx/qla_init.c memset(swl, 0, ha->max_fibre_devices * sizeof(sw_info_t)); ha 5714 drivers/scsi/qla2xxx/qla_init.c loop_id = ha->min_external_loopid; ha 5715 drivers/scsi/qla2xxx/qla_init.c for (; loop_id <= ha->max_loop_id; loop_id++) { ha 5719 drivers/scsi/qla2xxx/qla_init.c if (ha->current_topology == ISP_CFG_FL && ha 5793 drivers/scsi/qla2xxx/qla_init.c (vha->d_id.b24 & 0xffff00)) && ha->current_topology == ha 5949 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 5952 drivers/scsi/qla2xxx/qla_init.c set_bit(NPH_MGMT_SERVER, ha->loop_id_map); ha 5957 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->vport_slock, flags); ha 5965 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 5992 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6005 drivers/scsi/qla2xxx/qla_init.c rval = ha->isp_ops->fabric_login(vha, fcport->loop_id, ha 6058 drivers/scsi/qla2xxx/qla_init.c if (IS_FWI2_CAPABLE(ha)) { ha 6083 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->fabric_logout(vha, fcport->loop_id, ha 6101 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->fabric_logout(vha, fcport->loop_id, ha 6214 drivers/scsi/qla2xxx/qla_init.c int qla2x00_perform_loop_resync(scsi_qla_host_t *ha) ha 6218 drivers/scsi/qla2xxx/qla_init.c if (!test_and_set_bit(LOOP_RESYNC_ACTIVE, &ha->dpc_flags)) { ha 6220 drivers/scsi/qla2xxx/qla_init.c atomic_set(&ha->loop_down_timer, 0); ha 6221 drivers/scsi/qla2xxx/qla_init.c if (!(ha->device_flags & DFLG_NO_CABLE)) { ha 6222 drivers/scsi/qla2xxx/qla_init.c atomic_set(&ha->loop_state, LOOP_UP); ha 6223 drivers/scsi/qla2xxx/qla_init.c set_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags); ha 6224 drivers/scsi/qla2xxx/qla_init.c set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); ha 6225 drivers/scsi/qla2xxx/qla_init.c set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); ha 6227 drivers/scsi/qla2xxx/qla_init.c rval = qla2x00_loop_resync(ha); ha 6229 drivers/scsi/qla2xxx/qla_init.c atomic_set(&ha->loop_state, LOOP_DEAD); ha 6231 drivers/scsi/qla2xxx/qla_init.c clear_bit(LOOP_RESYNC_ACTIVE, &ha->dpc_flags); ha 6242 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = base_vha->hw; ha 6245 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->vport_slock, flags); ha 6252 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 6255 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->vport_slock, flags); ha 6261 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 6268 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6274 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA8044(ha)) { ha 6289 drivers/scsi/qla2xxx/qla_init.c (i != ha->portnum)) { ha 6299 drivers/scsi/qla2xxx/qla_init.c ((i + 8) != ha->portnum)) { ha 6309 drivers/scsi/qla2xxx/qla_init.c drv_presence_mask = ~((1 << (ha->portnum)) | ha 6317 drivers/scsi/qla2xxx/qla_init.c (ha->portnum < fcoe_other_function)) { ha 6320 drivers/scsi/qla2xxx/qla_init.c ha->flags.nic_core_reset_owner = 1; ha 6328 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6333 drivers/scsi/qla2xxx/qla_init.c drv_ack |= (1 << ha->portnum); ha 6344 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6349 drivers/scsi/qla2xxx/qla_init.c drv_ack &= ~(1 << ha->portnum); ha 6383 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6388 drivers/scsi/qla2xxx/qla_init.c ha->idc_audit_ts = (jiffies_to_msecs(jiffies) / 1000); ha 6389 drivers/scsi/qla2xxx/qla_init.c idc_audit_reg = (ha->portnum) | ha 6390 drivers/scsi/qla2xxx/qla_init.c (IDC_AUDIT_TIMESTAMP << 7) | (ha->idc_audit_ts << 8); ha 6396 drivers/scsi/qla2xxx/qla_init.c jiffies_to_msecs(ha->idc_audit_ts)) / 1000); ha 6397 drivers/scsi/qla2xxx/qla_init.c idc_audit_reg = (ha->portnum) | ha 6413 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6426 drivers/scsi/qla2xxx/qla_init.c if (ha->flags.nic_core_reset_owner && dev_state == QLA8XXX_DEV_READY) { ha 6468 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6471 drivers/scsi/qla2xxx/qla_init.c if (drv_presence & (1 << ha->portnum)) ha 6481 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6497 drivers/scsi/qla2xxx/qla_init.c ha->portnum); ha 6514 drivers/scsi/qla2xxx/qla_init.c ha->flags.nic_core_hung = 0; ha 6529 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6532 drivers/scsi/qla2xxx/qla_init.c if (!IS_MCTP_CAPABLE(ha)) { ha 6539 drivers/scsi/qla2xxx/qla_init.c if (!ha->mctp_dump) { ha 6540 drivers/scsi/qla2xxx/qla_init.c ha->mctp_dump = dma_alloc_coherent(&ha->pdev->dev, ha 6541 drivers/scsi/qla2xxx/qla_init.c MCTP_DUMP_SIZE, &ha->mctp_dump_dma, GFP_KERNEL); ha 6543 drivers/scsi/qla2xxx/qla_init.c if (!ha->mctp_dump) { ha 6551 drivers/scsi/qla2xxx/qla_init.c rval = qla2x00_dump_mctp_data(vha, ha->mctp_dump_dma, ha 6559 drivers/scsi/qla2xxx/qla_init.c vha->host_no, ha->mctp_dump); ha 6560 drivers/scsi/qla2xxx/qla_init.c ha->mctp_dumped = 1; ha 6563 drivers/scsi/qla2xxx/qla_init.c if (!ha->flags.nic_core_reset_hdlr_active && !ha->portnum) { ha 6564 drivers/scsi/qla2xxx/qla_init.c ha->flags.nic_core_reset_hdlr_active = 1; ha 6573 drivers/scsi/qla2xxx/qla_init.c ha->flags.nic_core_reset_hdlr_active = 0; ha 6591 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6595 drivers/scsi/qla2xxx/qla_init.c "Quiescing I/O - ha=%p.\n", ha); ha 6597 drivers/scsi/qla2xxx/qla_init.c atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); ha 6601 drivers/scsi/qla2xxx/qla_init.c list_for_each_entry(vp, &ha->vp_list, list) ha 6616 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6625 drivers/scsi/qla2xxx/qla_init.c if (!(IS_P3P_TYPE(ha))) ha 6627 drivers/scsi/qla2xxx/qla_init.c ha->flags.chip_reset_done = 0; ha 6632 drivers/scsi/qla2xxx/qla_init.c "Performing ISP error recovery - ha=%p.\n", ha); ha 6634 drivers/scsi/qla2xxx/qla_init.c ha->flags.purge_mbox = 1; ha 6639 drivers/scsi/qla2xxx/qla_init.c if (!(IS_P3P_TYPE(ha))) ha 6640 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->reset_chip(vha); ha 6642 drivers/scsi/qla2xxx/qla_init.c ha->link_data_rate = PORT_SPEED_UNKNOWN; ha 6643 drivers/scsi/qla2xxx/qla_init.c SAVE_TOPO(ha); ha 6644 drivers/scsi/qla2xxx/qla_init.c ha->flags.rida_fmt2 = 0; ha 6645 drivers/scsi/qla2xxx/qla_init.c ha->flags.n2n_ae = 0; ha 6646 drivers/scsi/qla2xxx/qla_init.c ha->flags.lip_ae = 0; ha 6647 drivers/scsi/qla2xxx/qla_init.c ha->current_topology = 0; ha 6648 drivers/scsi/qla2xxx/qla_init.c ha->flags.fw_started = 0; ha 6649 drivers/scsi/qla2xxx/qla_init.c ha->flags.fw_init_done = 0; ha 6650 drivers/scsi/qla2xxx/qla_init.c ha->chip_reset++; ha 6651 drivers/scsi/qla2xxx/qla_init.c ha->base_qpair->chip_reset = ha->chip_reset; ha 6652 drivers/scsi/qla2xxx/qla_init.c for (i = 0; i < ha->max_qpairs; i++) { ha 6653 drivers/scsi/qla2xxx/qla_init.c if (ha->queue_pair_map[i]) ha 6654 drivers/scsi/qla2xxx/qla_init.c ha->queue_pair_map[i]->chip_reset = ha 6655 drivers/scsi/qla2xxx/qla_init.c ha->base_qpair->chip_reset; ha 6659 drivers/scsi/qla2xxx/qla_init.c if (atomic_read(&ha->num_pend_mbx_stage3)) { ha 6660 drivers/scsi/qla2xxx/qla_init.c clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); ha 6661 drivers/scsi/qla2xxx/qla_init.c complete(&ha->mbx_intr_comp); ha 6665 drivers/scsi/qla2xxx/qla_init.c while (atomic_read(&ha->num_pend_mbx_stage3) || ha 6666 drivers/scsi/qla2xxx/qla_init.c atomic_read(&ha->num_pend_mbx_stage2) || ha 6667 drivers/scsi/qla2xxx/qla_init.c atomic_read(&ha->num_pend_mbx_stage1)) { ha 6673 drivers/scsi/qla2xxx/qla_init.c ha->flags.purge_mbox = 0; ha 6680 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->vport_slock, flags); ha 6681 drivers/scsi/qla2xxx/qla_init.c list_for_each_entry(vp, &ha->vp_list, list) { ha 6683 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 6687 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->vport_slock, flags); ha 6690 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 6702 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->vport_slock, flags); ha 6703 drivers/scsi/qla2xxx/qla_init.c list_for_each_entry(vp, &ha->vp_list, list) { ha 6705 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 6710 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->vport_slock, flags); ha 6713 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 6715 drivers/scsi/qla2xxx/qla_init.c if (!ha->flags.eeh_busy) { ha 6717 drivers/scsi/qla2xxx/qla_init.c if (IS_P3P_TYPE(ha)) { ha 6750 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6752 drivers/scsi/qla2xxx/qla_init.c struct req_que *req = ha->req_q_map[0]; ha 6759 drivers/scsi/qla2xxx/qla_init.c ha->flags.chip_reset_done = 1; ha 6766 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA8031(ha)) { ha 6774 drivers/scsi/qla2xxx/qla_init.c if (unlikely(pci_channel_offline(ha->pdev) && ha 6775 drivers/scsi/qla2xxx/qla_init.c ha->flags.pci_channel_io_perm_failure)) { ha 6795 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->get_flash_version(vha, req->ring); ha 6797 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->nvram_config(vha); ha 6812 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->enable_intrs(ha); ha 6814 drivers/scsi/qla2xxx/qla_init.c ha->isp_abort_cnt = 0; ha 6817 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA81XX(ha) || IS_QLA8031(ha)) ha 6819 drivers/scsi/qla2xxx/qla_init.c if (ha->fce) { ha 6820 drivers/scsi/qla2xxx/qla_init.c ha->flags.fce_enabled = 1; ha 6821 drivers/scsi/qla2xxx/qla_init.c memset(ha->fce, 0, ha 6822 drivers/scsi/qla2xxx/qla_init.c fce_calc_size(ha->fce_bufs)); ha 6824 drivers/scsi/qla2xxx/qla_init.c ha->fce_dma, ha->fce_bufs, ha->fce_mb, ha 6825 drivers/scsi/qla2xxx/qla_init.c &ha->fce_bufs); ha 6830 drivers/scsi/qla2xxx/qla_init.c ha->flags.fce_enabled = 0; ha 6834 drivers/scsi/qla2xxx/qla_init.c if (ha->eft) { ha 6835 drivers/scsi/qla2xxx/qla_init.c memset(ha->eft, 0, EFT_SIZE); ha 6837 drivers/scsi/qla2xxx/qla_init.c ha->eft_dma, EFT_NUM_BUFFERS); ha 6847 drivers/scsi/qla2xxx/qla_init.c if (ha->isp_abort_cnt == 0) { ha 6861 drivers/scsi/qla2xxx/qla_init.c ha->isp_abort_cnt--; ha 6864 drivers/scsi/qla2xxx/qla_init.c ha->isp_abort_cnt); ha 6868 drivers/scsi/qla2xxx/qla_init.c ha->isp_abort_cnt = MAX_RETRIES_OF_ISP_ABORT; ha 6871 drivers/scsi/qla2xxx/qla_init.c "more times.\n", ha->isp_abort_cnt); ha 6882 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->vport_slock, flags); ha 6883 drivers/scsi/qla2xxx/qla_init.c list_for_each_entry(vp, &ha->vp_list, list) { ha 6886 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 6890 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->vport_slock, flags); ha 6894 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 6896 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA8031(ha)) { ha 6925 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 6930 drivers/scsi/qla2xxx/qla_init.c status = ha->isp_ops->chip_diag(vha); ha 6937 drivers/scsi/qla2xxx/qla_init.c ha->flags.chip_reset_done = 1; ha 6940 drivers/scsi/qla2xxx/qla_init.c qla25xx_init_queues(ha); ha 6945 drivers/scsi/qla2xxx/qla_init.c qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL); ha 6957 drivers/scsi/qla2xxx/qla_init.c qla25xx_init_queues(struct qla_hw_data *ha) ha 6961 drivers/scsi/qla2xxx/qla_init.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 6965 drivers/scsi/qla2xxx/qla_init.c for (i = 1; i < ha->max_rsp_queues; i++) { ha 6966 drivers/scsi/qla2xxx/qla_init.c rsp = ha->rsp_q_map[i]; ha 6967 drivers/scsi/qla2xxx/qla_init.c if (rsp && test_bit(i, ha->rsp_qid_map)) { ha 6980 drivers/scsi/qla2xxx/qla_init.c for (i = 1; i < ha->max_req_queues; i++) { ha 6981 drivers/scsi/qla2xxx/qla_init.c req = ha->req_q_map[i]; ha 6982 drivers/scsi/qla2xxx/qla_init.c if (req && test_bit(i, ha->req_qid_map)) { ha 7010 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 7011 drivers/scsi/qla2xxx/qla_init.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 7014 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->disable_intrs(ha); ha 7016 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 7021 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 7030 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 7031 drivers/scsi/qla2xxx/qla_init.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 7034 drivers/scsi/qla2xxx/qla_init.c if (IS_P3P_TYPE(ha)) ha 7038 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->disable_intrs(ha); ha 7040 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 7045 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 7047 drivers/scsi/qla2xxx/qla_init.c if (IS_NOPOLLING_TYPE(ha)) ha 7048 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->enable_intrs(ha); ha 7060 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 7061 drivers/scsi/qla2xxx/qla_init.c struct pci_dev *pdev = ha->pdev; ha 7086 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 7089 drivers/scsi/qla2xxx/qla_init.c icb = (struct init_cb_24xx *)ha->init_cb; ha 7090 drivers/scsi/qla2xxx/qla_init.c nv = ha->nvram; ha 7093 drivers/scsi/qla2xxx/qla_init.c if (ha->port_no == 0) { ha 7094 drivers/scsi/qla2xxx/qla_init.c ha->nvram_base = FA_NVRAM_FUNC0_ADDR; ha 7095 drivers/scsi/qla2xxx/qla_init.c ha->vpd_base = FA_NVRAM_VPD0_ADDR; ha 7097 drivers/scsi/qla2xxx/qla_init.c ha->nvram_base = FA_NVRAM_FUNC1_ADDR; ha 7098 drivers/scsi/qla2xxx/qla_init.c ha->vpd_base = FA_NVRAM_VPD1_ADDR; ha 7101 drivers/scsi/qla2xxx/qla_init.c ha->nvram_size = sizeof(*nv); ha 7102 drivers/scsi/qla2xxx/qla_init.c ha->vpd_size = FA_NVRAM_VPD_SIZE; ha 7105 drivers/scsi/qla2xxx/qla_init.c ha->vpd = ha->nvram + VPD_OFFSET; ha 7106 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->read_nvram(vha, ha->vpd, ha 7107 drivers/scsi/qla2xxx/qla_init.c ha->nvram_base - FA_NVRAM_FUNC0_ADDR, FA_NVRAM_VPD_SIZE * 4); ha 7111 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->read_nvram(vha, dptr, ha->nvram_base, ha->nvram_size); ha 7112 drivers/scsi/qla2xxx/qla_init.c for (cnt = 0, chksum = 0; cnt < ha->nvram_size >> 2; cnt++, dptr++) ha 7118 drivers/scsi/qla2xxx/qla_init.c nv, ha->nvram_size); ha 7135 drivers/scsi/qla2xxx/qla_init.c memset(nv, 0, ha->nvram_size); ha 7143 drivers/scsi/qla2xxx/qla_init.c nv->port_name[1] = 0x00 + ha->port_no + 1; ha 7187 drivers/scsi/qla2xxx/qla_init.c memset(icb, 0, ha->init_cb_size); ha 7206 drivers/scsi/qla2xxx/qla_init.c ha->frame_payload_size = le16_to_cpu(icb->frame_payload_size); ha 7232 drivers/scsi/qla2xxx/qla_init.c ha->flags.disable_risc_code_load = 0; ha 7233 drivers/scsi/qla2xxx/qla_init.c ha->flags.enable_lip_reset = 0; ha 7234 drivers/scsi/qla2xxx/qla_init.c ha->flags.enable_lip_full_login = ha 7236 drivers/scsi/qla2xxx/qla_init.c ha->flags.enable_target_reset = ha 7238 drivers/scsi/qla2xxx/qla_init.c ha->flags.enable_led_scheme = 0; ha 7239 drivers/scsi/qla2xxx/qla_init.c ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0; ha 7241 drivers/scsi/qla2xxx/qla_init.c ha->operating_mode = (le32_to_cpu(icb->firmware_options_2) & ha 7244 drivers/scsi/qla2xxx/qla_init.c memcpy(ha->fw_seriallink_options24, nv->seriallink_options, ha 7245 drivers/scsi/qla2xxx/qla_init.c sizeof(ha->fw_seriallink_options24)); ha 7248 drivers/scsi/qla2xxx/qla_init.c ha->serial0 = icb->port_name[5]; ha 7249 drivers/scsi/qla2xxx/qla_init.c ha->serial1 = icb->port_name[6]; ha 7250 drivers/scsi/qla2xxx/qla_init.c ha->serial2 = icb->port_name[7]; ha 7256 drivers/scsi/qla2xxx/qla_init.c ha->retry_count = le16_to_cpu(nv->login_retry_count); ha 7263 drivers/scsi/qla2xxx/qla_init.c ha->login_timeout = le16_to_cpu(nv->login_timeout); ha 7266 drivers/scsi/qla2xxx/qla_init.c ha->r_a_tov = 100; ha 7268 drivers/scsi/qla2xxx/qla_init.c ha->loop_reset_delay = nv->reset_delay; ha 7281 drivers/scsi/qla2xxx/qla_init.c ha->loop_down_abort_time = ha 7284 drivers/scsi/qla2xxx/qla_init.c ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout); ha 7285 drivers/scsi/qla2xxx/qla_init.c ha->loop_down_abort_time = ha 7286 drivers/scsi/qla2xxx/qla_init.c (LOOP_DOWN_TIME - ha->link_down_timeout); ha 7290 drivers/scsi/qla2xxx/qla_init.c ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count); ha 7292 drivers/scsi/qla2xxx/qla_init.c ha->port_down_retry_count = qlport_down_retry; ha 7295 drivers/scsi/qla2xxx/qla_init.c ha->login_retry_count = le16_to_cpu(nv->login_retry_count); ha 7296 drivers/scsi/qla2xxx/qla_init.c if (ha->port_down_retry_count == ha 7298 drivers/scsi/qla2xxx/qla_init.c ha->port_down_retry_count > 3) ha 7299 drivers/scsi/qla2xxx/qla_init.c ha->login_retry_count = ha->port_down_retry_count; ha 7300 drivers/scsi/qla2xxx/qla_init.c else if (ha->port_down_retry_count > (int)ha->login_retry_count) ha 7301 drivers/scsi/qla2xxx/qla_init.c ha->login_retry_count = ha->port_down_retry_count; ha 7303 drivers/scsi/qla2xxx/qla_init.c ha->login_retry_count = ql2xloginretrycount; ha 7310 drivers/scsi/qla2xxx/qla_init.c ha->zio_mode = le32_to_cpu(icb->firmware_options_2) & ha 7312 drivers/scsi/qla2xxx/qla_init.c ha->zio_timer = le16_to_cpu(icb->interrupt_delay_timer) ? ha 7317 drivers/scsi/qla2xxx/qla_init.c if (ha->zio_mode != QLA_ZIO_DISABLED) { ha 7318 drivers/scsi/qla2xxx/qla_init.c ha->zio_mode = QLA_ZIO_MODE_6; ha 7322 drivers/scsi/qla2xxx/qla_init.c ha->zio_mode, ha->zio_timer * 100); ha 7325 drivers/scsi/qla2xxx/qla_init.c (uint32_t)ha->zio_mode); ha 7326 drivers/scsi/qla2xxx/qla_init.c icb->interrupt_delay_timer = cpu_to_le16(ha->zio_timer); ha 7427 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 7432 drivers/scsi/qla2xxx/qla_init.c if (!ha->flt_region_aux_img_status_pri) { ha 7438 drivers/scsi/qla2xxx/qla_init.c ha->flt_region_aux_img_status_pri, ha 7464 drivers/scsi/qla2xxx/qla_init.c if (!ha->flt_region_aux_img_status_sec) { ha 7471 drivers/scsi/qla2xxx/qla_init.c ha->flt_region_aux_img_status_sec, ha 7525 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 7530 drivers/scsi/qla2xxx/qla_init.c if (!ha->flt_region_img_status_pri) { ha 7536 drivers/scsi/qla2xxx/qla_init.c ha->flt_region_img_status_pri, sizeof(pri_image_status) >> 2) != ha 7565 drivers/scsi/qla2xxx/qla_init.c if (!ha->flt_region_img_status_sec) { ha 7571 drivers/scsi/qla2xxx/qla_init.c ha->flt_region_img_status_sec, sizeof(sec_image_status) >> 2); ha 7635 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 7636 drivers/scsi/qla2xxx/qla_init.c struct req_que *req = ha->req_q_map[0]; ha 7637 drivers/scsi/qla2xxx/qla_init.c struct fwdt *fwdt = ha->fwdt; ha 7669 drivers/scsi/qla2xxx/qla_init.c dlen = ha->fw_transfer_size >> 2; ha 7695 drivers/scsi/qla2xxx/qla_init.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 7780 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 7781 drivers/scsi/qla2xxx/qla_init.c struct req_que *req = ha->req_q_map[0]; ha 7837 drivers/scsi/qla2xxx/qla_init.c wlen = (uint16_t)(ha->fw_transfer_size >> 1); ha 7883 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 7884 drivers/scsi/qla2xxx/qla_init.c struct req_que *req = ha->req_q_map[0]; ha 7885 drivers/scsi/qla2xxx/qla_init.c struct fwdt *fwdt = ha->fwdt; ha 7924 drivers/scsi/qla2xxx/qla_init.c dlen = ha->fw_transfer_size >> 2; ha 7952 drivers/scsi/qla2xxx/qla_init.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 8052 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 8064 drivers/scsi/qla2xxx/qla_init.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 8074 drivers/scsi/qla2xxx/qla_init.c rval = qla24xx_load_risc_flash(vha, srisc_addr, ha->flt_region_fw_sec); ha 8081 drivers/scsi/qla2xxx/qla_init.c rval = qla24xx_load_risc_flash(vha, srisc_addr, ha->flt_region_fw); ha 8087 drivers/scsi/qla2xxx/qla_init.c if (!rval || !ha->flt_region_gold_fw) ha 8092 drivers/scsi/qla2xxx/qla_init.c rval = qla24xx_load_risc_flash(vha, srisc_addr, ha->flt_region_gold_fw); ha 8097 drivers/scsi/qla2xxx/qla_init.c ha->flags.running_gold_fw = 1; ha 8105 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 8107 drivers/scsi/qla2xxx/qla_init.c if (ha->flags.pci_channel_io_perm_failure) ha 8109 drivers/scsi/qla2xxx/qla_init.c if (!IS_FWI2_CAPABLE(ha)) ha 8111 drivers/scsi/qla2xxx/qla_init.c if (!ha->fw_major_version) ha 8113 drivers/scsi/qla2xxx/qla_init.c if (!ha->flags.fw_started) ha 8119 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->reset_chip(vha); ha 8120 drivers/scsi/qla2xxx/qla_init.c if (ha->isp_ops->chip_diag(vha) != QLA_SUCCESS) ha 8129 drivers/scsi/qla2xxx/qla_init.c QLA_FW_STOPPED(ha); ha 8130 drivers/scsi/qla2xxx/qla_init.c ha->flags.fw_init_done = 0; ha 8139 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 8140 drivers/scsi/qla2xxx/qla_init.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 8149 drivers/scsi/qla2xxx/qla_init.c qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL); ha 8155 drivers/scsi/qla2xxx/qla_init.c rval2 = ha->isp_ops->fabric_login(vha, NPH_SNS, 0xff, 0xff, 0xfc, mb, ha 8188 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 8194 drivers/scsi/qla2xxx/qla_init.c if (cs84xx->bus == ha->pdev->bus) { ha 8207 drivers/scsi/qla2xxx/qla_init.c cs84xx->bus = ha->pdev->bus; ha 8230 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 8232 drivers/scsi/qla2xxx/qla_init.c if (ha->cs84xx) ha 8233 drivers/scsi/qla2xxx/qla_init.c kref_put(&ha->cs84xx->kref, __qla84xx_chip_release); ha 8241 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 8243 drivers/scsi/qla2xxx/qla_init.c mutex_lock(&ha->cs84xx->fw_update_mutex); ha 8247 drivers/scsi/qla2xxx/qla_init.c mutex_unlock(&ha->cs84xx->fw_update_mutex); ha 8265 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 8270 drivers/scsi/qla2xxx/qla_init.c icb = (struct init_cb_81xx *)ha->init_cb; ha 8271 drivers/scsi/qla2xxx/qla_init.c nv = ha->nvram; ha 8274 drivers/scsi/qla2xxx/qla_init.c ha->nvram_size = sizeof(*nv); ha 8275 drivers/scsi/qla2xxx/qla_init.c ha->vpd_size = FA_NVRAM_VPD_SIZE; ha 8276 drivers/scsi/qla2xxx/qla_init.c if (IS_P3P_TYPE(ha) || IS_QLA8031(ha)) ha 8277 drivers/scsi/qla2xxx/qla_init.c ha->vpd_size = FA_VPD_SIZE_82XX; ha 8279 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA28XX(ha) || IS_QLA27XX(ha)) ha 8283 drivers/scsi/qla2xxx/qla_init.c ha->vpd = ha->nvram + VPD_OFFSET; ha 8285 drivers/scsi/qla2xxx/qla_init.c faddr = ha->flt_region_vpd; ha 8286 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA28XX(ha)) { ha 8288 drivers/scsi/qla2xxx/qla_init.c faddr = ha->flt_region_vpd_sec; ha 8294 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->read_optrom(vha, ha->vpd, faddr << 2, ha->vpd_size); ha 8297 drivers/scsi/qla2xxx/qla_init.c faddr = ha->flt_region_nvram; ha 8298 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA28XX(ha)) { ha 8300 drivers/scsi/qla2xxx/qla_init.c faddr = ha->flt_region_nvram_sec; ha 8306 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->read_optrom(vha, ha->nvram, faddr << 2, ha->nvram_size); ha 8309 drivers/scsi/qla2xxx/qla_init.c for (cnt = 0, chksum = 0; cnt < ha->nvram_size >> 2; cnt++, dptr++) ha 8315 drivers/scsi/qla2xxx/qla_init.c nv, ha->nvram_size); ha 8332 drivers/scsi/qla2xxx/qla_init.c memset(nv, 0, ha->nvram_size); ha 8339 drivers/scsi/qla2xxx/qla_init.c nv->port_name[1] = 0x00 + ha->port_no + 1; ha 8373 drivers/scsi/qla2xxx/qla_init.c nv->enode_mac[5] = 0x06 + ha->port_no + 1; ha 8378 drivers/scsi/qla2xxx/qla_init.c if (IS_T10_PI_CAPABLE(ha)) ha 8384 drivers/scsi/qla2xxx/qla_init.c memset(icb, 0, ha->init_cb_size); ha 8411 drivers/scsi/qla2xxx/qla_init.c icb->enode_mac[5] = 0x06 + ha->port_no + 1; ha 8415 drivers/scsi/qla2xxx/qla_init.c memcpy(ha->ex_init_cb, &nv->ex_version, sizeof(*ha->ex_init_cb)); ha 8416 drivers/scsi/qla2xxx/qla_init.c ha->frame_payload_size = le16_to_cpu(icb->frame_payload_size); ha 8442 drivers/scsi/qla2xxx/qla_init.c ha->flags.disable_risc_code_load = 0; ha 8443 drivers/scsi/qla2xxx/qla_init.c ha->flags.enable_lip_reset = 0; ha 8444 drivers/scsi/qla2xxx/qla_init.c ha->flags.enable_lip_full_login = ha 8446 drivers/scsi/qla2xxx/qla_init.c ha->flags.enable_target_reset = ha 8448 drivers/scsi/qla2xxx/qla_init.c ha->flags.enable_led_scheme = 0; ha 8449 drivers/scsi/qla2xxx/qla_init.c ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0; ha 8451 drivers/scsi/qla2xxx/qla_init.c ha->operating_mode = (le32_to_cpu(icb->firmware_options_2) & ha 8455 drivers/scsi/qla2xxx/qla_init.c ha->serial0 = icb->port_name[5]; ha 8456 drivers/scsi/qla2xxx/qla_init.c ha->serial1 = icb->port_name[6]; ha 8457 drivers/scsi/qla2xxx/qla_init.c ha->serial2 = icb->port_name[7]; ha 8463 drivers/scsi/qla2xxx/qla_init.c ha->retry_count = le16_to_cpu(nv->login_retry_count); ha 8470 drivers/scsi/qla2xxx/qla_init.c ha->login_timeout = le16_to_cpu(nv->login_timeout); ha 8473 drivers/scsi/qla2xxx/qla_init.c ha->r_a_tov = 100; ha 8475 drivers/scsi/qla2xxx/qla_init.c ha->loop_reset_delay = nv->reset_delay; ha 8488 drivers/scsi/qla2xxx/qla_init.c ha->loop_down_abort_time = ha 8491 drivers/scsi/qla2xxx/qla_init.c ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout); ha 8492 drivers/scsi/qla2xxx/qla_init.c ha->loop_down_abort_time = ha 8493 drivers/scsi/qla2xxx/qla_init.c (LOOP_DOWN_TIME - ha->link_down_timeout); ha 8497 drivers/scsi/qla2xxx/qla_init.c ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count); ha 8499 drivers/scsi/qla2xxx/qla_init.c ha->port_down_retry_count = qlport_down_retry; ha 8502 drivers/scsi/qla2xxx/qla_init.c ha->login_retry_count = le16_to_cpu(nv->login_retry_count); ha 8503 drivers/scsi/qla2xxx/qla_init.c if (ha->port_down_retry_count == ha 8505 drivers/scsi/qla2xxx/qla_init.c ha->port_down_retry_count > 3) ha 8506 drivers/scsi/qla2xxx/qla_init.c ha->login_retry_count = ha->port_down_retry_count; ha 8507 drivers/scsi/qla2xxx/qla_init.c else if (ha->port_down_retry_count > (int)ha->login_retry_count) ha 8508 drivers/scsi/qla2xxx/qla_init.c ha->login_retry_count = ha->port_down_retry_count; ha 8510 drivers/scsi/qla2xxx/qla_init.c ha->login_retry_count = ql2xloginretrycount; ha 8514 drivers/scsi/qla2xxx/qla_init.c (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha))) ha 8519 drivers/scsi/qla2xxx/qla_init.c ha->zio_mode = le32_to_cpu(icb->firmware_options_2) & ha 8521 drivers/scsi/qla2xxx/qla_init.c ha->zio_timer = le16_to_cpu(icb->interrupt_delay_timer) ? ha 8527 drivers/scsi/qla2xxx/qla_init.c if (ha->zio_mode != QLA_ZIO_DISABLED) { ha 8528 drivers/scsi/qla2xxx/qla_init.c ha->zio_mode = QLA_ZIO_MODE_6; ha 8532 drivers/scsi/qla2xxx/qla_init.c ha->zio_mode, ha 8533 drivers/scsi/qla2xxx/qla_init.c ha->zio_timer * 100); ha 8536 drivers/scsi/qla2xxx/qla_init.c (uint32_t)ha->zio_mode); ha 8537 drivers/scsi/qla2xxx/qla_init.c icb->interrupt_delay_timer = cpu_to_le16(ha->zio_timer); ha 8558 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 8565 drivers/scsi/qla2xxx/qla_init.c ha->flags.chip_reset_done = 1; ha 8570 drivers/scsi/qla2xxx/qla_init.c qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL); ha 8591 drivers/scsi/qla2xxx/qla_init.c ha->isp_ops->enable_intrs(ha); ha 8593 drivers/scsi/qla2xxx/qla_init.c ha->isp_abort_cnt = 0; ha 8599 drivers/scsi/qla2xxx/qla_init.c if (ha->fce) { ha 8600 drivers/scsi/qla2xxx/qla_init.c ha->flags.fce_enabled = 1; ha 8601 drivers/scsi/qla2xxx/qla_init.c memset(ha->fce, 0, ha 8602 drivers/scsi/qla2xxx/qla_init.c fce_calc_size(ha->fce_bufs)); ha 8604 drivers/scsi/qla2xxx/qla_init.c ha->fce_dma, ha->fce_bufs, ha->fce_mb, ha 8605 drivers/scsi/qla2xxx/qla_init.c &ha->fce_bufs); ha 8610 drivers/scsi/qla2xxx/qla_init.c ha->flags.fce_enabled = 0; ha 8614 drivers/scsi/qla2xxx/qla_init.c if (ha->eft) { ha 8615 drivers/scsi/qla2xxx/qla_init.c memset(ha->eft, 0, EFT_SIZE); ha 8617 drivers/scsi/qla2xxx/qla_init.c ha->eft_dma, EFT_NUM_BUFFERS); ha 8630 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->vport_slock, flags); ha 8631 drivers/scsi/qla2xxx/qla_init.c list_for_each_entry(vp, &ha->vp_list, list) { ha 8634 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 8638 drivers/scsi/qla2xxx/qla_init.c spin_lock_irqsave(&ha->vport_slock, flags); ha 8642 drivers/scsi/qla2xxx/qla_init.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 8655 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 8659 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[3] |= BIT_12; ha 8662 drivers/scsi/qla2xxx/qla_init.c if (ha->operating_mode == P2P) { ha 8663 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] |= BIT_3; ha 8666 drivers/scsi/qla2xxx/qla_init.c __func__, ha->fw_options[2]); ha 8673 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] |= BIT_11; ha 8675 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] &= ~BIT_11; ha 8681 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[1] |= BIT_8; ha 8682 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[10] |= (u16)SAM_STAT_BUSY << 8; ha 8685 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] |= BIT_4; ha 8687 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[1] &= ~BIT_8; ha 8688 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[10] &= 0x00ff; ha 8690 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] &= ~BIT_4; ha 8695 drivers/scsi/qla2xxx/qla_init.c memset(ha->fw_options, 0, sizeof(ha->fw_options)); ha 8696 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[2] |= BIT_9; ha 8701 drivers/scsi/qla2xxx/qla_init.c __func__, ha->fw_options[1], ha->fw_options[2], ha 8702 drivers/scsi/qla2xxx/qla_init.c ha->fw_options[3], vha->host->active_mode); ha 8704 drivers/scsi/qla2xxx/qla_init.c qla2x00_set_fw_options(vha, ha->fw_options); ha 8734 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 8736 drivers/scsi/qla2xxx/qla_init.c if (!ha->fcp_prio_cfg || !ha->flags.fcp_prio_enabled) ha 8740 drivers/scsi/qla2xxx/qla_init.c entries = ha->fcp_prio_cfg->num_entries; ha 8741 drivers/scsi/qla2xxx/qla_init.c pri_entry = &ha->fcp_prio_cfg->entry[0]; ha 8889 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = vha->hw; ha 8894 drivers/scsi/qla2xxx/qla_init.c if (!(ha->fw_attributes & BIT_6) || !ha->flags.msix_enabled) { ha 8912 drivers/scsi/qla2xxx/qla_init.c qpair->use_shadow_reg = IS_SHADOW_REG_CAPABLE(ha) ? 1 : 0; ha 8915 drivers/scsi/qla2xxx/qla_init.c mutex_lock(&ha->mq_lock); ha 8916 drivers/scsi/qla2xxx/qla_init.c qpair_id = find_first_zero_bit(ha->qpair_qid_map, ha->max_qpairs); ha 8917 drivers/scsi/qla2xxx/qla_init.c if (ha->num_qpairs >= ha->max_qpairs) { ha 8918 drivers/scsi/qla2xxx/qla_init.c mutex_unlock(&ha->mq_lock); ha 8923 drivers/scsi/qla2xxx/qla_init.c ha->num_qpairs++; ha 8924 drivers/scsi/qla2xxx/qla_init.c set_bit(qpair_id, ha->qpair_qid_map); ha 8925 drivers/scsi/qla2xxx/qla_init.c ha->queue_pair_map[qpair_id] = qpair; ha 8928 drivers/scsi/qla2xxx/qla_init.c qpair->fw_started = ha->flags.fw_started; ha 8930 drivers/scsi/qla2xxx/qla_init.c qpair->chip_reset = ha->base_qpair->chip_reset; ha 8931 drivers/scsi/qla2xxx/qla_init.c qpair->enable_class_2 = ha->base_qpair->enable_class_2; ha 8933 drivers/scsi/qla2xxx/qla_init.c ha->base_qpair->enable_explicit_conf; ha 8935 drivers/scsi/qla2xxx/qla_init.c for (i = 0; i < ha->msix_count; i++) { ha 8936 drivers/scsi/qla2xxx/qla_init.c msix = &ha->msix_entries[i]; ha 8952 drivers/scsi/qla2xxx/qla_init.c qpair->pdev = ha->pdev; ha 8953 drivers/scsi/qla2xxx/qla_init.c if (IS_QLA27XX(ha) || IS_QLA83XX(ha) || IS_QLA28XX(ha)) ha 8956 drivers/scsi/qla2xxx/qla_init.c mutex_unlock(&ha->mq_lock); ha 8959 drivers/scsi/qla2xxx/qla_init.c rsp_id = qla25xx_create_rsp_que(ha, 0, 0, 0, qpair, startqp); ha 8966 drivers/scsi/qla2xxx/qla_init.c qpair->rsp = ha->rsp_q_map[rsp_id]; ha 8969 drivers/scsi/qla2xxx/qla_init.c req_id = qla25xx_create_req_que(ha, 0, vp_idx, 0, rsp_id, qos, ha 8977 drivers/scsi/qla2xxx/qla_init.c qpair->req = ha->req_q_map[req_id]; ha 8983 drivers/scsi/qla2xxx/qla_init.c if (IS_T10_PI_CAPABLE(ha) && ql2xenabledif) { ha 8984 drivers/scsi/qla2xxx/qla_init.c if (ha->fw_attributes & BIT_4) ha 9015 drivers/scsi/qla2xxx/qla_init.c mutex_lock(&ha->mq_lock); ha 9021 drivers/scsi/qla2xxx/qla_init.c ha->queue_pair_map[qpair_id] = NULL; ha 9022 drivers/scsi/qla2xxx/qla_init.c clear_bit(qpair_id, ha->qpair_qid_map); ha 9023 drivers/scsi/qla2xxx/qla_init.c ha->num_qpairs--; ha 9024 drivers/scsi/qla2xxx/qla_init.c mutex_unlock(&ha->mq_lock); ha 9033 drivers/scsi/qla2xxx/qla_init.c struct qla_hw_data *ha = qpair->hw; ha 9045 drivers/scsi/qla2xxx/qla_init.c mutex_lock(&ha->mq_lock); ha 9046 drivers/scsi/qla2xxx/qla_init.c ha->queue_pair_map[qpair->id] = NULL; ha 9047 drivers/scsi/qla2xxx/qla_init.c clear_bit(qpair->id, ha->qpair_qid_map); ha 9048 drivers/scsi/qla2xxx/qla_init.c ha->num_qpairs--; ha 9057 drivers/scsi/qla2xxx/qla_init.c mutex_unlock(&ha->mq_lock); ha 61 drivers/scsi/qla2xxx/qla_inline.h struct qla_hw_data *ha = rsp->hw; ha 63 drivers/scsi/qla2xxx/qla_inline.h if (IS_P3P_TYPE(ha)) ha 66 drivers/scsi/qla2xxx/qla_inline.h ha->isp_ops->intr_handler(0, rsp); ha 94 drivers/scsi/qla2xxx/qla_inline.h qla2x00_clean_dsd_pool(struct qla_hw_data *ha, struct crc_context *ctx) ha 100 drivers/scsi/qla2xxx/qla_inline.h dma_pool_free(ha->dl_dma_pool, dsd->dsd_addr, ha 225 drivers/scsi/qla2xxx/qla_inline.h qla2x00_gid_list_size(struct qla_hw_data *ha) ha 227 drivers/scsi/qla2xxx/qla_inline.h if (IS_QLAFX00(ha)) ha 230 drivers/scsi/qla2xxx/qla_inline.h return sizeof(struct gid_list_info) * ha->max_fibre_devices; ha 234 drivers/scsi/qla2xxx/qla_inline.h qla2x00_handle_mbx_completion(struct qla_hw_data *ha, int status) ha 236 drivers/scsi/qla2xxx/qla_inline.h if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) && ha 237 drivers/scsi/qla2xxx/qla_inline.h (status & MBX_INTERRUPT) && ha->flags.mbox_int) { ha 238 drivers/scsi/qla2xxx/qla_inline.h set_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); ha 239 drivers/scsi/qla2xxx/qla_inline.h clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); ha 240 drivers/scsi/qla2xxx/qla_inline.h complete(&ha->mbx_intr_comp); ha 287 drivers/scsi/qla2xxx/qla_inline.h for (i = 0; i < tgt->ha->max_qpairs + 1; i++) { ha 335 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha; ha 341 drivers/scsi/qla2xxx/qla_iocb.c ha = vha->hw; ha 342 drivers/scsi/qla2xxx/qla_iocb.c reg = &ha->iobase->isp; ha 344 drivers/scsi/qla2xxx/qla_iocb.c req = ha->req_q_map[0]; ha 345 drivers/scsi/qla2xxx/qla_iocb.c rsp = ha->rsp_q_map[0]; ha 351 drivers/scsi/qla2xxx/qla_iocb.c if (qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL) != ha 359 drivers/scsi/qla2xxx/qla_iocb.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 367 drivers/scsi/qla2xxx/qla_iocb.c nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), ha 377 drivers/scsi/qla2xxx/qla_iocb.c req_cnt = ha->isp_ops->calc_req_entries(tot_dsds); ha 379 drivers/scsi/qla2xxx/qla_iocb.c cnt = RD_REG_WORD_RELAXED(ISP_REQ_Q_OUT(ha, reg)); ha 405 drivers/scsi/qla2xxx/qla_iocb.c SET_TARGET_ID(ha, cmd_pkt->target, sp->fcport->loop_id); ha 414 drivers/scsi/qla2xxx/qla_iocb.c ha->isp_ops->build_iocbs(sp, cmd_pkt, tot_dsds); ha 431 drivers/scsi/qla2xxx/qla_iocb.c WRT_REG_WORD(ISP_REQ_Q_IN(ha, reg), req->ring_index); ha 432 drivers/scsi/qla2xxx/qla_iocb.c RD_REG_WORD_RELAXED(ISP_REQ_Q_IN(ha, reg)); /* PCI Posting. */ ha 439 drivers/scsi/qla2xxx/qla_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 446 drivers/scsi/qla2xxx/qla_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 459 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 460 drivers/scsi/qla2xxx/qla_iocb.c device_reg_t *reg = ISP_QUE_REG(ha, req->id); ha 462 drivers/scsi/qla2xxx/qla_iocb.c if (IS_P3P_TYPE(ha)) { ha 474 drivers/scsi/qla2xxx/qla_iocb.c if (ha->mqenable || IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 476 drivers/scsi/qla2xxx/qla_iocb.c } else if (IS_QLA83XX(ha)) { ha 478 drivers/scsi/qla2xxx/qla_iocb.c RD_REG_DWORD_RELAXED(&ha->iobase->isp24.hccr); ha 479 drivers/scsi/qla2xxx/qla_iocb.c } else if (IS_QLAFX00(ha)) { ha 482 drivers/scsi/qla2xxx/qla_iocb.c QLAFX00_SET_HST_INTR(ha, ha->rqstq_intr_code); ha 483 drivers/scsi/qla2xxx/qla_iocb.c } else if (IS_FWI2_CAPABLE(ha)) { ha 487 drivers/scsi/qla2xxx/qla_iocb.c WRT_REG_WORD(ISP_REQ_Q_IN(ha, ®->isp), ha 489 drivers/scsi/qla2xxx/qla_iocb.c RD_REG_WORD_RELAXED(ISP_REQ_Q_IN(ha, ®->isp)); ha 513 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 514 drivers/scsi/qla2xxx/qla_iocb.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 527 drivers/scsi/qla2xxx/qla_iocb.c if (IS_FWI2_CAPABLE(ha)) { ha 535 drivers/scsi/qla2xxx/qla_iocb.c SET_TARGET_ID(ha, mrk->target, loop_id); ha 589 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha; ha 610 drivers/scsi/qla2xxx/qla_iocb.c ha = vha->hw; ha 632 drivers/scsi/qla2xxx/qla_iocb.c dsd_ptr = list_first_entry(&ha->gbl_dsd_list, ha 636 drivers/scsi/qla2xxx/qla_iocb.c ha->gbl_dsd_avail--; ha 639 drivers/scsi/qla2xxx/qla_iocb.c ha->gbl_dsd_inuse++; ha 887 drivers/scsi/qla2xxx/qla_iocb.c qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *ha, srb_t *sp, ha 943 drivers/scsi/qla2xxx/qla_iocb.c dma_pool_alloc(ha->dl_dma_pool, GFP_ATOMIC, ha 1001 drivers/scsi/qla2xxx/qla_iocb.c qla24xx_walk_and_build_sglist(struct qla_hw_data *ha, srb_t *sp, ha 1040 drivers/scsi/qla2xxx/qla_iocb.c dma_pool_alloc(ha->dl_dma_pool, GFP_ATOMIC, ha 1081 drivers/scsi/qla2xxx/qla_iocb.c qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *ha, srb_t *sp, ha 1130 drivers/scsi/qla2xxx/qla_iocb.c ha->dif_bundle_crossed_pages++; ha 1141 drivers/scsi/qla2xxx/qla_iocb.c ha->dif_bundle_writes++; ha 1143 drivers/scsi/qla2xxx/qla_iocb.c ha->dif_bundle_reads++; ha 1186 drivers/scsi/qla2xxx/qla_iocb.c ha->dif_bundle_kallocs++; ha 1190 drivers/scsi/qla2xxx/qla_iocb.c (ha->dif_bundl_pool, GFP_ATOMIC, ha 1202 drivers/scsi/qla2xxx/qla_iocb.c ha->dif_bundle_kallocs--; ha 1205 drivers/scsi/qla2xxx/qla_iocb.c ha->dif_bundle_dma_allocs++; ha 1271 drivers/scsi/qla2xxx/qla_iocb.c ha->dif_bundle_kallocs++; ha 1276 drivers/scsi/qla2xxx/qla_iocb.c dma_pool_alloc(ha->dl_dma_pool, GFP_ATOMIC, ha 1287 drivers/scsi/qla2xxx/qla_iocb.c ha->dif_bundle_kallocs--; ha 1290 drivers/scsi/qla2xxx/qla_iocb.c ha->dif_bundle_dma_allocs++; ha 1341 drivers/scsi/qla2xxx/qla_iocb.c dma_pool_alloc(ha->dl_dma_pool, GFP_ATOMIC, ha 1401 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha; ha 1413 drivers/scsi/qla2xxx/qla_iocb.c ha = vha->hw; ha 1441 drivers/scsi/qla2xxx/qla_iocb.c dma_pool_zalloc(ha->dl_dma_pool, GFP_ATOMIC, &crc_ctx_dma); ha 1517 drivers/scsi/qla2xxx/qla_iocb.c else if (IS_PI_UNINIT_CAPABLE(ha)) { ha 1561 drivers/scsi/qla2xxx/qla_iocb.c if (qla24xx_walk_and_build_sglist_no_difb(ha, sp, ha 1564 drivers/scsi/qla2xxx/qla_iocb.c } else if (qla24xx_walk_and_build_sglist(ha, sp, cur_dsd, ha 1572 drivers/scsi/qla2xxx/qla_iocb.c if (qla24xx_walk_and_build_prot_sglist(ha, sp, cur_dsd, ha 1604 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 1614 drivers/scsi/qla2xxx/qla_iocb.c if (qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL) != ha 1621 drivers/scsi/qla2xxx/qla_iocb.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1629 drivers/scsi/qla2xxx/qla_iocb.c nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), ha 1639 drivers/scsi/qla2xxx/qla_iocb.c cnt = IS_SHADOW_REG_CAPABLE(ha) ? *req->out_ptr : ha 1703 drivers/scsi/qla2xxx/qla_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1710 drivers/scsi/qla2xxx/qla_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1737 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 1758 drivers/scsi/qla2xxx/qla_iocb.c if (qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL) != ha 1765 drivers/scsi/qla2xxx/qla_iocb.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1774 drivers/scsi/qla2xxx/qla_iocb.c nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), ha 1804 drivers/scsi/qla2xxx/qla_iocb.c nseg = dma_map_sg(&ha->pdev->dev, scsi_prot_sglist(cmd), ha 1824 drivers/scsi/qla2xxx/qla_iocb.c cnt = IS_SHADOW_REG_CAPABLE(ha) ? *req->out_ptr : ha 1886 drivers/scsi/qla2xxx/qla_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1897 drivers/scsi/qla2xxx/qla_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1921 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 1949 drivers/scsi/qla2xxx/qla_iocb.c nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), ha 1959 drivers/scsi/qla2xxx/qla_iocb.c cnt = IS_SHADOW_REG_CAPABLE(ha) ? *req->out_ptr : ha 2058 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 2109 drivers/scsi/qla2xxx/qla_iocb.c nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), ha 2139 drivers/scsi/qla2xxx/qla_iocb.c nseg = dma_map_sg(&ha->pdev->dev, scsi_prot_sglist(cmd), ha 2159 drivers/scsi/qla2xxx/qla_iocb.c cnt = IS_SHADOW_REG_CAPABLE(ha) ? *req->out_ptr : ha 2247 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 2249 drivers/scsi/qla2xxx/qla_iocb.c device_reg_t *reg = ISP_QUE_REG(ha, req->id); ha 2267 drivers/scsi/qla2xxx/qla_iocb.c else if (ha->mqenable || IS_QLA83XX(ha) || IS_QLA27XX(ha) || ha 2268 drivers/scsi/qla2xxx/qla_iocb.c IS_QLA28XX(ha)) ha 2270 drivers/scsi/qla2xxx/qla_iocb.c else if (IS_P3P_TYPE(ha)) ha 2272 drivers/scsi/qla2xxx/qla_iocb.c else if (IS_FWI2_CAPABLE(ha)) ha 2274 drivers/scsi/qla2xxx/qla_iocb.c else if (IS_QLAFX00(ha)) ha 2278 drivers/scsi/qla2xxx/qla_iocb.c ISP_REQ_Q_OUT(ha, ®->isp)); ha 2307 drivers/scsi/qla2xxx/qla_iocb.c if (IS_QLAFX00(ha)) { ha 2384 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = sp->vha->hw; ha 2389 drivers/scsi/qla2xxx/qla_iocb.c SET_TARGET_ID(ha, mbx->loop_id, sp->fcport->loop_id); ha 2393 drivers/scsi/qla2xxx/qla_iocb.c if (HAS_EXTENDED_IDS(ha)) { ha 2431 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = sp->vha->hw; ha 2434 drivers/scsi/qla2xxx/qla_iocb.c SET_TARGET_ID(ha, mbx->loop_id, sp->fcport->loop_id); ha 2436 drivers/scsi/qla2xxx/qla_iocb.c mbx->mb1 = HAS_EXTENDED_IDS(ha) ? ha 2458 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = sp->vha->hw; ha 2461 drivers/scsi/qla2xxx/qla_iocb.c SET_TARGET_ID(ha, mbx->loop_id, sp->fcport->loop_id); ha 2463 drivers/scsi/qla2xxx/qla_iocb.c if (HAS_EXTENDED_IDS(ha)) { ha 2469 drivers/scsi/qla2xxx/qla_iocb.c mbx->mb2 = cpu_to_le16(MSW(ha->async_pd_dma)); ha 2470 drivers/scsi/qla2xxx/qla_iocb.c mbx->mb3 = cpu_to_le16(LSW(ha->async_pd_dma)); ha 2471 drivers/scsi/qla2xxx/qla_iocb.c mbx->mb6 = cpu_to_le16(MSW(MSD(ha->async_pd_dma))); ha 2472 drivers/scsi/qla2xxx/qla_iocb.c mbx->mb7 = cpu_to_le16(LSW(MSD(ha->async_pd_dma))); ha 2483 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 2494 drivers/scsi/qla2xxx/qla_iocb.c tsk->timeout = cpu_to_le16(ha->r_a_tov / 10 * 2); ha 2570 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 2607 drivers/scsi/qla2xxx/qla_iocb.c elsio->u.els_logo.els_logo_pyld = dma_alloc_coherent(&ha->pdev->dev, ha 2711 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 2720 drivers/scsi/qla2xxx/qla_iocb.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2721 drivers/scsi/qla2xxx/qla_iocb.c res = ha->isp_ops->abort_command(sp); ha 2725 drivers/scsi/qla2xxx/qla_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2792 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 2824 drivers/scsi/qla2xxx/qla_iocb.c dma_alloc_coherent(&ha->pdev->dev, DMA_POOL_SIZE, ha 2833 drivers/scsi/qla2xxx/qla_iocb.c dma_alloc_coherent(&ha->pdev->dev, DMA_POOL_SIZE, ha 2846 drivers/scsi/qla2xxx/qla_iocb.c &ha->plogi_els_payld.data, ha 2936 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 2944 drivers/scsi/qla2xxx/qla_iocb.c SET_TARGET_ID(ha, ct_iocb->loop_id, sp->fcport->loop_id); ha 3003 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 3038 drivers/scsi/qla2xxx/qla_iocb.c vha, ha->req_q_map[0]); ha 3058 drivers/scsi/qla2xxx/qla_iocb.c ha->req_q_map[0]); ha 3093 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 3098 drivers/scsi/qla2xxx/qla_iocb.c reg = &ha->iobase->isp82; ha 3101 drivers/scsi/qla2xxx/qla_iocb.c rsp = ha->rsp_q_map[0]; ha 3106 drivers/scsi/qla2xxx/qla_iocb.c dbval = 0x04 | (ha->portnum << 5); ha 3110 drivers/scsi/qla2xxx/qla_iocb.c if (qla2x00_marker(vha, ha->base_qpair, ha 3120 drivers/scsi/qla2xxx/qla_iocb.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3128 drivers/scsi/qla2xxx/qla_iocb.c nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), ha 3144 drivers/scsi/qla2xxx/qla_iocb.c if ((more_dsd_lists + ha->gbl_dsd_inuse) >= NUM_DSD_CHAIN) { ha 3147 drivers/scsi/qla2xxx/qla_iocb.c more_dsd_lists + ha->gbl_dsd_inuse, NUM_DSD_CHAIN, ha 3152 drivers/scsi/qla2xxx/qla_iocb.c if (more_dsd_lists <= ha->gbl_dsd_avail) ha 3155 drivers/scsi/qla2xxx/qla_iocb.c more_dsd_lists -= ha->gbl_dsd_avail; ha 3166 drivers/scsi/qla2xxx/qla_iocb.c dsd_ptr->dsd_addr = dma_pool_alloc(ha->dl_dma_pool, ha 3175 drivers/scsi/qla2xxx/qla_iocb.c list_add_tail(&dsd_ptr->list, &ha->gbl_dsd_list); ha 3176 drivers/scsi/qla2xxx/qla_iocb.c ha->gbl_dsd_avail++; ha 3195 drivers/scsi/qla2xxx/qla_iocb.c mempool_alloc(ha->ctx_mempool, GFP_ATOMIC); ha 3203 drivers/scsi/qla2xxx/qla_iocb.c ctx->fcp_cmnd = dma_pool_zalloc(ha->fcp_cmnd_dma_pool, ha 3265 drivers/scsi/qla2xxx/qla_iocb.c if (ha->flags.fcp_prio_enabled) ha 3324 drivers/scsi/qla2xxx/qla_iocb.c if (ha->flags.fcp_prio_enabled) ha 3366 drivers/scsi/qla2xxx/qla_iocb.c qla82xx_wr_32(ha, (uintptr_t __force)ha->nxdb_wr_ptr, dbval); ha 3368 drivers/scsi/qla2xxx/qla_iocb.c WRT_REG_DWORD(ha->nxdb_wr_ptr, dbval); ha 3370 drivers/scsi/qla2xxx/qla_iocb.c while (RD_REG_DWORD(ha->nxdb_rd_ptr) != dbval) { ha 3371 drivers/scsi/qla2xxx/qla_iocb.c WRT_REG_DWORD(ha->nxdb_wr_ptr, dbval); ha 3381 drivers/scsi/qla2xxx/qla_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3385 drivers/scsi/qla2xxx/qla_iocb.c dma_pool_free(ha->fcp_cmnd_dma_pool, ctx->fcp_cmnd, ctx->fcp_cmnd_dma); ha 3391 drivers/scsi/qla2xxx/qla_iocb.c mempool_free(sp->u.scmd.crc_ctx, ha->ctx_mempool); ha 3394 drivers/scsi/qla2xxx/qla_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3544 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 3560 drivers/scsi/qla2xxx/qla_iocb.c IS_FWI2_CAPABLE(ha) ? ha 3568 drivers/scsi/qla2xxx/qla_iocb.c IS_FWI2_CAPABLE(ha) ? ha 3577 drivers/scsi/qla2xxx/qla_iocb.c IS_FWI2_CAPABLE(ha) ? ha 3582 drivers/scsi/qla2xxx/qla_iocb.c IS_FWI2_CAPABLE(ha) ? ha 3587 drivers/scsi/qla2xxx/qla_iocb.c IS_QLAFX00(ha) ? ha 3599 drivers/scsi/qla2xxx/qla_iocb.c IS_QLAFX00(ha) ? ha 3728 drivers/scsi/qla2xxx/qla_iocb.c struct qla_hw_data *ha = vha->hw; ha 3741 drivers/scsi/qla2xxx/qla_iocb.c rsp = ha->rsp_q_map[0]; ha 3746 drivers/scsi/qla2xxx/qla_iocb.c if (qla2x00_marker(vha, ha->base_qpair, ha 3753 drivers/scsi/qla2xxx/qla_iocb.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3766 drivers/scsi/qla2xxx/qla_iocb.c cnt = IS_SHADOW_REG_CAPABLE(ha) ? *req->out_ptr : ha 3805 drivers/scsi/qla2xxx/qla_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 47 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha; ha 63 drivers/scsi/qla2xxx/qla_isr.c ha = rsp->hw; ha 64 drivers/scsi/qla2xxx/qla_isr.c reg = &ha->iobase->isp; ha 67 drivers/scsi/qla2xxx/qla_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 68 drivers/scsi/qla2xxx/qla_isr.c vha = pci_get_drvdata(ha->pdev); ha 74 drivers/scsi/qla2xxx/qla_isr.c if (pci_channel_offline(ha->pdev)) ha 85 drivers/scsi/qla2xxx/qla_isr.c ha->isp_ops->fw_dump(vha, 1); ha 96 drivers/scsi/qla2xxx/qla_isr.c mb[0] = RD_MAILBOX_REG(ha, reg, 0); ha 101 drivers/scsi/qla2xxx/qla_isr.c mb[1] = RD_MAILBOX_REG(ha, reg, 1); ha 102 drivers/scsi/qla2xxx/qla_isr.c mb[2] = RD_MAILBOX_REG(ha, reg, 2); ha 103 drivers/scsi/qla2xxx/qla_isr.c mb[3] = RD_MAILBOX_REG(ha, reg, 3); ha 121 drivers/scsi/qla2xxx/qla_isr.c qla2x00_handle_mbx_completion(ha, status); ha 122 drivers/scsi/qla2xxx/qla_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 173 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha; ha 183 drivers/scsi/qla2xxx/qla_isr.c ha = rsp->hw; ha 184 drivers/scsi/qla2xxx/qla_isr.c reg = &ha->iobase->isp; ha 187 drivers/scsi/qla2xxx/qla_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 188 drivers/scsi/qla2xxx/qla_isr.c vha = pci_get_drvdata(ha->pdev); ha 194 drivers/scsi/qla2xxx/qla_isr.c if (unlikely(pci_channel_offline(ha->pdev))) ha 216 drivers/scsi/qla2xxx/qla_isr.c ha->isp_ops->fw_dump(vha, 1); ha 235 drivers/scsi/qla2xxx/qla_isr.c mb[1] = RD_MAILBOX_REG(ha, reg, 1); ha 236 drivers/scsi/qla2xxx/qla_isr.c mb[2] = RD_MAILBOX_REG(ha, reg, 2); ha 237 drivers/scsi/qla2xxx/qla_isr.c mb[3] = RD_MAILBOX_REG(ha, reg, 3); ha 251 drivers/scsi/qla2xxx/qla_isr.c mb[2] = RD_MAILBOX_REG(ha, reg, 2); ha 262 drivers/scsi/qla2xxx/qla_isr.c qla2x00_handle_mbx_completion(ha, status); ha 263 drivers/scsi/qla2xxx/qla_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 279 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 280 drivers/scsi/qla2xxx/qla_isr.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 283 drivers/scsi/qla2xxx/qla_isr.c WARN_ON_ONCE(ha->mbx_count > 32); ha 284 drivers/scsi/qla2xxx/qla_isr.c mboxes = (1ULL << ha->mbx_count) - 1; ha 285 drivers/scsi/qla2xxx/qla_isr.c if (!ha->mcp) ha 288 drivers/scsi/qla2xxx/qla_isr.c mboxes = ha->mcp->in_mb; ha 291 drivers/scsi/qla2xxx/qla_isr.c ha->flags.mbox_int = 1; ha 292 drivers/scsi/qla2xxx/qla_isr.c ha->mailbox_out[0] = mb0; ha 294 drivers/scsi/qla2xxx/qla_isr.c wptr = (uint16_t __iomem *)MAILBOX_REG(ha, reg, 1); ha 296 drivers/scsi/qla2xxx/qla_isr.c for (cnt = 1; cnt < ha->mbx_count; cnt++) { ha 297 drivers/scsi/qla2xxx/qla_isr.c if (IS_QLA2200(ha) && cnt == 8) ha 298 drivers/scsi/qla2xxx/qla_isr.c wptr = (uint16_t __iomem *)MAILBOX_REG(ha, reg, 8); ha 300 drivers/scsi/qla2xxx/qla_isr.c ha->mailbox_out[cnt] = qla2x00_debounce_register(wptr); ha 302 drivers/scsi/qla2xxx/qla_isr.c ha->mailbox_out[cnt] = RD_REG_WORD(wptr); ha 372 drivers/scsi/qla2xxx/qla_isr.c qla2x00_get_link_speed_str(struct qla_hw_data *ha, uint16_t speed) ha 379 drivers/scsi/qla2xxx/qla_isr.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) ha 392 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 414 drivers/scsi/qla2xxx/qla_isr.c ha->flags.nic_core_hung = 1; ha 544 drivers/scsi/qla2xxx/qla_isr.c if (ha->flags.nic_core_reset_owner) ha 553 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 559 drivers/scsi/qla2xxx/qla_isr.c if (!ha->num_vhosts) ha 562 drivers/scsi/qla2xxx/qla_isr.c spin_lock_irqsave(&ha->vport_slock, flags); ha 563 drivers/scsi/qla2xxx/qla_isr.c list_for_each_entry(vp, &ha->vp_list, list) { ha 570 drivers/scsi/qla2xxx/qla_isr.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 634 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 635 drivers/scsi/qla2xxx/qla_isr.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 636 drivers/scsi/qla2xxx/qla_isr.c struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24; ha 637 drivers/scsi/qla2xxx/qla_isr.c struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82; ha 647 drivers/scsi/qla2xxx/qla_isr.c if (IS_CNA_CAPABLE(ha)) ha 676 drivers/scsi/qla2xxx/qla_isr.c handles[3] = (uint32_t)RD_MAILBOX_REG(ha, reg, 6); ha 684 drivers/scsi/qla2xxx/qla_isr.c handles[3] = (uint32_t)RD_MAILBOX_REG(ha, reg, 6); ha 685 drivers/scsi/qla2xxx/qla_isr.c handles[4] = (uint32_t)RD_MAILBOX_REG(ha, reg, 7); ha 692 drivers/scsi/qla2xxx/qla_isr.c ((uint32_t)(RD_MAILBOX_REG(ha, reg, 7) << 16)) | ha 693 drivers/scsi/qla2xxx/qla_isr.c RD_MAILBOX_REG(ha, reg, 6)); ha 719 drivers/scsi/qla2xxx/qla_isr.c mbx = (IS_QLA81XX(ha) || IS_QLA83XX(ha) || IS_QLA27XX(ha) || ha 720 drivers/scsi/qla2xxx/qla_isr.c IS_QLA28XX(ha)) ? ha 725 drivers/scsi/qla2xxx/qla_isr.c ha->fw_dump_mpi = ha 726 drivers/scsi/qla2xxx/qla_isr.c (IS_QLA27XX(ha) || IS_QLA28XX(ha)) && ha 728 drivers/scsi/qla2xxx/qla_isr.c ha->isp_ops->fw_dump(vha, 1); ha 729 drivers/scsi/qla2xxx/qla_isr.c ha->flags.fw_init_done = 0; ha 730 drivers/scsi/qla2xxx/qla_isr.c QLA_FW_STOPPED(ha); ha 732 drivers/scsi/qla2xxx/qla_isr.c if (IS_FWI2_CAPABLE(ha)) { ha 741 drivers/scsi/qla2xxx/qla_isr.c if ((mbx & MBX_3) && (ha->port_no == 0)) ha 783 drivers/scsi/qla2xxx/qla_isr.c ha->flags.lip_ae = 1; ha 807 drivers/scsi/qla2xxx/qla_isr.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) ha 808 drivers/scsi/qla2xxx/qla_isr.c ha->link_data_rate = PORT_SPEED_1GB; ha 810 drivers/scsi/qla2xxx/qla_isr.c ha->link_data_rate = mb[1]; ha 814 drivers/scsi/qla2xxx/qla_isr.c qla2x00_get_link_speed_str(ha, ha->link_data_rate)); ha 817 drivers/scsi/qla2xxx/qla_isr.c qla2x00_post_aen_work(vha, FCH_EVT_LINKUP, ha->link_data_rate); ha 826 drivers/scsi/qla2xxx/qla_isr.c SAVE_TOPO(ha); ha 827 drivers/scsi/qla2xxx/qla_isr.c ha->flags.lip_ae = 0; ha 828 drivers/scsi/qla2xxx/qla_isr.c ha->current_topology = 0; ha 830 drivers/scsi/qla2xxx/qla_isr.c mbx = (IS_QLA81XX(ha) || IS_QLA8031(ha)) ha 832 drivers/scsi/qla2xxx/qla_isr.c mbx = (IS_P3P_TYPE(ha)) ? RD_REG_WORD(®82->mailbox_out[4]) ha 847 drivers/scsi/qla2xxx/qla_isr.c if (ha->flags.fawwpn_enabled && ha 848 drivers/scsi/qla2xxx/qla_isr.c (ha->current_topology == ISP_CFG_F)) { ha 849 drivers/scsi/qla2xxx/qla_isr.c void *wwpn = ha->init_cb->port_name; ha 873 drivers/scsi/qla2xxx/qla_isr.c ha->link_data_rate = PORT_SPEED_UNKNOWN; ha 894 drivers/scsi/qla2xxx/qla_isr.c ha->operating_mode = LOOP; ha 901 drivers/scsi/qla2xxx/qla_isr.c ha->flags.lip_ae = 0; ha 903 drivers/scsi/qla2xxx/qla_isr.c if (IS_QLA2100(ha)) ha 906 drivers/scsi/qla2xxx/qla_isr.c if (IS_CNA_CAPABLE(ha)) { ha 910 drivers/scsi/qla2xxx/qla_isr.c if (ha->notify_dcbx_comp && !vha->vp_idx) ha 911 drivers/scsi/qla2xxx/qla_isr.c complete(&ha->dcbx_comp); ha 926 drivers/scsi/qla2xxx/qla_isr.c if (!N2N_TOPO(ha)) ha 945 drivers/scsi/qla2xxx/qla_isr.c if (IS_QLA2100(ha)) ha 984 drivers/scsi/qla2xxx/qla_isr.c if (IS_QLA2XXX_MIDTYPE(ha) && ha 998 drivers/scsi/qla2xxx/qla_isr.c if (mb[1] == NPH_SNS_LID(ha)) { ha 1005 drivers/scsi/qla2xxx/qla_isr.c if (IS_FWI2_CAPABLE(ha)) ha 1048 drivers/scsi/qla2xxx/qla_isr.c ha->link_data_rate = PORT_SPEED_UNKNOWN; ha 1059 drivers/scsi/qla2xxx/qla_isr.c !ha->flags.n2n_ae && ha 1087 drivers/scsi/qla2xxx/qla_isr.c if (ha->flags.npiv_supported && vha->vp_idx != (mb[3] & 0xff)) ha 1128 drivers/scsi/qla2xxx/qla_isr.c if (IS_FWI2_CAPABLE(ha)) ha 1150 drivers/scsi/qla2xxx/qla_isr.c spin_lock_irqsave(&ha->cs84xx->access_lock, flags); ha 1158 drivers/scsi/qla2xxx/qla_isr.c ha->cs84xx->op_fw_version = mb[3] << 16 | mb[2]; ha 1161 drivers/scsi/qla2xxx/qla_isr.c ha->cs84xx->op_fw_version); ha 1164 drivers/scsi/qla2xxx/qla_isr.c ha->cs84xx->diag_fw_version = mb[3] << 16 | mb[2]; ha 1167 drivers/scsi/qla2xxx/qla_isr.c ha->cs84xx->diag_fw_version); ha 1170 drivers/scsi/qla2xxx/qla_isr.c ha->cs84xx->diag_fw_version = mb[3] << 16 | mb[2]; ha 1171 drivers/scsi/qla2xxx/qla_isr.c ha->cs84xx->fw_update = 1; ha 1174 drivers/scsi/qla2xxx/qla_isr.c ha->cs84xx->gold_fw_version); ha 1181 drivers/scsi/qla2xxx/qla_isr.c spin_unlock_irqrestore(&ha->cs84xx->access_lock, flags); ha 1199 drivers/scsi/qla2xxx/qla_isr.c if (IS_QLA8031(vha->hw) || IS_QLA8044(ha)) { ha 1216 drivers/scsi/qla2xxx/qla_isr.c if (ha->notify_lb_portup_comp && !vha->vp_idx) ha 1217 drivers/scsi/qla2xxx/qla_isr.c complete(&ha->lb_portup_comp); ha 1221 drivers/scsi/qla2xxx/qla_isr.c IS_QLA8044(ha)) ha 1246 drivers/scsi/qla2xxx/qla_isr.c schedule_work(&ha->board_disable); ha 1262 drivers/scsi/qla2xxx/qla_isr.c if (!vha->vp_idx && ha->num_vhosts) ha 1277 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 1284 drivers/scsi/qla2xxx/qla_isr.c if (IS_P3P_TYPE(ha)) ha 1301 drivers/scsi/qla2xxx/qla_isr.c if (IS_P3P_TYPE(ha)) ha 1312 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 1322 drivers/scsi/qla2xxx/qla_isr.c if (IS_P3P_TYPE(ha)) ha 2044 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = rsp->hw; ha 2045 drivers/scsi/qla2xxx/qla_isr.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2048 drivers/scsi/qla2xxx/qla_isr.c vha = pci_get_drvdata(ha->pdev); ha 2077 drivers/scsi/qla2xxx/qla_isr.c WRT_REG_WORD(ISP_RSP_Q_OUT(ha, reg), rsp->ring_index); ha 2257 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 2293 drivers/scsi/qla2xxx/qla_isr.c if (IS_FWI2_CAPABLE(ha)) { ha 2423 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 2432 drivers/scsi/qla2xxx/qla_isr.c if (IS_FWI2_CAPABLE(ha)) { ha 2442 drivers/scsi/qla2xxx/qla_isr.c req = ha->req_q_map[que]; ha 2446 drivers/scsi/qla2xxx/qla_isr.c que >= find_first_zero_bit(ha->req_qid_map, ha->max_req_queues)) { ha 2468 drivers/scsi/qla2xxx/qla_isr.c if (IS_P3P_TYPE(ha)) ha 2532 drivers/scsi/qla2xxx/qla_isr.c if (IS_FWI2_CAPABLE(ha)) { ha 2567 drivers/scsi/qla2xxx/qla_isr.c if (IS_FWI2_CAPABLE(ha)) { ha 2582 drivers/scsi/qla2xxx/qla_isr.c if (IS_FWI2_CAPABLE(ha) && comp_status == CS_COMPLETE && ha 2640 drivers/scsi/qla2xxx/qla_isr.c resid = IS_FWI2_CAPABLE(ha) ? fw_resid_len : resid_len; ha 2643 drivers/scsi/qla2xxx/qla_isr.c if (IS_FWI2_CAPABLE(ha) && fw_resid_len != resid_len) { ha 2724 drivers/scsi/qla2xxx/qla_isr.c if (IS_FWI2_CAPABLE(ha)) ha 2757 drivers/scsi/qla2xxx/qla_isr.c if (!IS_PI_SPLIT_DET_CAPABLE(ha)) ha 2809 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = rsp->hw; ha 2810 drivers/scsi/qla2xxx/qla_isr.c struct scsi_qla_host *vha = pci_get_drvdata(ha->pdev); ha 2837 drivers/scsi/qla2xxx/qla_isr.c if (IS_FWI2_CAPABLE(ha)) ha 2867 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 2877 drivers/scsi/qla2xxx/qla_isr.c if (que >= ha->max_req_queues || !ha->req_q_map[que]) ha 2880 drivers/scsi/qla2xxx/qla_isr.c req = ha->req_q_map[que]; ha 2927 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 2928 drivers/scsi/qla2xxx/qla_isr.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 2931 drivers/scsi/qla2xxx/qla_isr.c WARN_ON_ONCE(ha->mbx_count > 32); ha 2932 drivers/scsi/qla2xxx/qla_isr.c mboxes = (1ULL << ha->mbx_count) - 1; ha 2933 drivers/scsi/qla2xxx/qla_isr.c if (!ha->mcp) ha 2936 drivers/scsi/qla2xxx/qla_isr.c mboxes = ha->mcp->in_mb; ha 2939 drivers/scsi/qla2xxx/qla_isr.c ha->flags.mbox_int = 1; ha 2940 drivers/scsi/qla2xxx/qla_isr.c ha->mailbox_out[0] = mb0; ha 2944 drivers/scsi/qla2xxx/qla_isr.c for (cnt = 1; cnt < ha->mbx_count; cnt++) { ha 2946 drivers/scsi/qla2xxx/qla_isr.c ha->mailbox_out[cnt] = RD_REG_WORD(wptr); ha 2994 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 2996 drivers/scsi/qla2xxx/qla_isr.c if (!ha->flags.fw_started) ha 3045 drivers/scsi/qla2xxx/qla_isr.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || ha 3046 drivers/scsi/qla2xxx/qla_isr.c IS_QLA28XX(ha)) { ha 3102 drivers/scsi/qla2xxx/qla_isr.c if (IS_P3P_TYPE(ha)) { ha 3103 drivers/scsi/qla2xxx/qla_isr.c struct device_reg_82xx __iomem *reg = &ha->iobase->isp82; ha 3116 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 3117 drivers/scsi/qla2xxx/qla_isr.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 3119 drivers/scsi/qla2xxx/qla_isr.c if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha) && ha 3120 drivers/scsi/qla2xxx/qla_isr.c !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 3174 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha; ha 3192 drivers/scsi/qla2xxx/qla_isr.c ha = rsp->hw; ha 3193 drivers/scsi/qla2xxx/qla_isr.c reg = &ha->iobase->isp24; ha 3196 drivers/scsi/qla2xxx/qla_isr.c if (unlikely(pci_channel_offline(ha->pdev))) ha 3199 drivers/scsi/qla2xxx/qla_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3200 drivers/scsi/qla2xxx/qla_isr.c vha = pci_get_drvdata(ha->pdev); ha 3206 drivers/scsi/qla2xxx/qla_isr.c if (unlikely(pci_channel_offline(ha->pdev))) ha 3217 drivers/scsi/qla2xxx/qla_isr.c ha->isp_ops->fw_dump(vha, 1); ha 3258 drivers/scsi/qla2xxx/qla_isr.c if (unlikely(IS_QLA83XX(ha) && (ha->pdev->revision == 1))) ha 3261 drivers/scsi/qla2xxx/qla_isr.c qla2x00_handle_mbx_completion(ha, status); ha 3262 drivers/scsi/qla2xxx/qla_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3265 drivers/scsi/qla2xxx/qla_isr.c spin_lock_irqsave(&ha->tgt.atio_lock, flags); ha 3267 drivers/scsi/qla2xxx/qla_isr.c spin_unlock_irqrestore(&ha->tgt.atio_lock, flags); ha 3276 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha; ha 3288 drivers/scsi/qla2xxx/qla_isr.c ha = rsp->hw; ha 3289 drivers/scsi/qla2xxx/qla_isr.c reg = &ha->iobase->isp24; ha 3291 drivers/scsi/qla2xxx/qla_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3293 drivers/scsi/qla2xxx/qla_isr.c vha = pci_get_drvdata(ha->pdev); ha 3295 drivers/scsi/qla2xxx/qla_isr.c if (!ha->flags.disable_msix_handshake) { ha 3299 drivers/scsi/qla2xxx/qla_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3308 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha; ha 3324 drivers/scsi/qla2xxx/qla_isr.c ha = rsp->hw; ha 3325 drivers/scsi/qla2xxx/qla_isr.c reg = &ha->iobase->isp24; ha 3328 drivers/scsi/qla2xxx/qla_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3329 drivers/scsi/qla2xxx/qla_isr.c vha = pci_get_drvdata(ha->pdev); ha 3335 drivers/scsi/qla2xxx/qla_isr.c if (unlikely(pci_channel_offline(ha->pdev))) ha 3346 drivers/scsi/qla2xxx/qla_isr.c ha->isp_ops->fw_dump(vha, 1); ha 3387 drivers/scsi/qla2xxx/qla_isr.c qla2x00_handle_mbx_completion(ha, status); ha 3388 drivers/scsi/qla2xxx/qla_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3391 drivers/scsi/qla2xxx/qla_isr.c spin_lock_irqsave(&ha->tgt.atio_lock, flags); ha 3393 drivers/scsi/qla2xxx/qla_isr.c spin_unlock_irqrestore(&ha->tgt.atio_lock, flags); ha 3402 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha; ha 3413 drivers/scsi/qla2xxx/qla_isr.c ha = qpair->hw; ha 3416 drivers/scsi/qla2xxx/qla_isr.c if (unlikely(!ha->flags.disable_msix_handshake)) { ha 3417 drivers/scsi/qla2xxx/qla_isr.c reg = &ha->iobase->isp24; ha 3418 drivers/scsi/qla2xxx/qla_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3420 drivers/scsi/qla2xxx/qla_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3423 drivers/scsi/qla2xxx/qla_isr.c queue_work(ha->wq, &qpair->q_work); ha 3448 drivers/scsi/qla2xxx/qla_isr.c qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp) ha 3452 drivers/scsi/qla2xxx/qla_isr.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 3459 drivers/scsi/qla2xxx/qla_isr.c IS_ATIO_MSIX_CAPABLE(ha)) { ha 3464 drivers/scsi/qla2xxx/qla_isr.c if (USER_CTRL_IRQ(ha) || !ha->mqiobase) { ha 3466 drivers/scsi/qla2xxx/qla_isr.c ret = pci_alloc_irq_vectors(ha->pdev, min_vecs, ha 3467 drivers/scsi/qla2xxx/qla_isr.c ha->msix_count, PCI_IRQ_MSIX); ha 3469 drivers/scsi/qla2xxx/qla_isr.c ret = pci_alloc_irq_vectors_affinity(ha->pdev, min_vecs, ha 3470 drivers/scsi/qla2xxx/qla_isr.c ha->msix_count, PCI_IRQ_MSIX | PCI_IRQ_AFFINITY, ha 3477 drivers/scsi/qla2xxx/qla_isr.c ha->msix_count, ret); ha 3479 drivers/scsi/qla2xxx/qla_isr.c } else if (ret < ha->msix_count) { ha 3482 drivers/scsi/qla2xxx/qla_isr.c ha->msix_count = ret; ha 3484 drivers/scsi/qla2xxx/qla_isr.c if (ha->mqiobase && (ql2xmqsupport || ql2xnvmeenable)) { ha 3485 drivers/scsi/qla2xxx/qla_isr.c ha->max_req_queues = ha->msix_count - 1; ha 3489 drivers/scsi/qla2xxx/qla_isr.c ha->max_req_queues--; ha 3491 drivers/scsi/qla2xxx/qla_isr.c ha->max_rsp_queues = ha->max_req_queues; ha 3493 drivers/scsi/qla2xxx/qla_isr.c ha->max_qpairs = ha->max_req_queues - 1; ha 3494 drivers/scsi/qla2xxx/qla_isr.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0190, ha 3495 drivers/scsi/qla2xxx/qla_isr.c "Adjusted Max no of queues pairs: %d.\n", ha->max_qpairs); ha 3499 drivers/scsi/qla2xxx/qla_isr.c ha->msix_entries = kcalloc(ha->msix_count, ha 3502 drivers/scsi/qla2xxx/qla_isr.c if (!ha->msix_entries) { ha 3508 drivers/scsi/qla2xxx/qla_isr.c ha->flags.msix_enabled = 1; ha 3510 drivers/scsi/qla2xxx/qla_isr.c for (i = 0; i < ha->msix_count; i++) { ha 3511 drivers/scsi/qla2xxx/qla_isr.c qentry = &ha->msix_entries[i]; ha 3512 drivers/scsi/qla2xxx/qla_isr.c qentry->vector = pci_irq_vector(ha->pdev, i); ha 3521 drivers/scsi/qla2xxx/qla_isr.c qentry = &ha->msix_entries[i]; ha 3526 drivers/scsi/qla2xxx/qla_isr.c if (IS_P3P_TYPE(ha)) ha 3545 drivers/scsi/qla2xxx/qla_isr.c IS_ATIO_MSIX_CAPABLE(ha)) { ha 3546 drivers/scsi/qla2xxx/qla_isr.c qentry = &ha->msix_entries[QLA_ATIO_VECTOR]; ha 3565 drivers/scsi/qla2xxx/qla_isr.c ha->mqenable = 0; ha 3570 drivers/scsi/qla2xxx/qla_isr.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 3571 drivers/scsi/qla2xxx/qla_isr.c if (ha->msixbase && ha->mqiobase && ha 3572 drivers/scsi/qla2xxx/qla_isr.c (ha->max_rsp_queues > 1 || ha->max_req_queues > 1 || ha 3574 drivers/scsi/qla2xxx/qla_isr.c ha->mqenable = 1; ha 3576 drivers/scsi/qla2xxx/qla_isr.c if (ha->mqiobase && ha 3577 drivers/scsi/qla2xxx/qla_isr.c (ha->max_rsp_queues > 1 || ha->max_req_queues > 1 || ha 3579 drivers/scsi/qla2xxx/qla_isr.c ha->mqenable = 1; ha 3582 drivers/scsi/qla2xxx/qla_isr.c ha->mqiobase, ha->max_rsp_queues, ha->max_req_queues); ha 3585 drivers/scsi/qla2xxx/qla_isr.c ha->mqiobase, ha->max_rsp_queues, ha->max_req_queues); ha 3591 drivers/scsi/qla2xxx/qla_isr.c pci_free_irq_vectors(ha->pdev); ha 3596 drivers/scsi/qla2xxx/qla_isr.c qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp) ha 3599 drivers/scsi/qla2xxx/qla_isr.c device_reg_t *reg = ha->iobase; ha 3600 drivers/scsi/qla2xxx/qla_isr.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 3603 drivers/scsi/qla2xxx/qla_isr.c if (ql2xenablemsix == 0 || (!IS_QLA2432(ha) && !IS_QLA2532(ha) && ha 3604 drivers/scsi/qla2xxx/qla_isr.c !IS_QLA8432(ha) && !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha) && ha 3605 drivers/scsi/qla2xxx/qla_isr.c !IS_QLAFX00(ha) && !IS_QLA27XX(ha) && !IS_QLA28XX(ha))) ha 3611 drivers/scsi/qla2xxx/qla_isr.c if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP && ha 3612 drivers/scsi/qla2xxx/qla_isr.c (ha->pdev->subsystem_device == 0x7040 || ha 3613 drivers/scsi/qla2xxx/qla_isr.c ha->pdev->subsystem_device == 0x7041 || ha 3614 drivers/scsi/qla2xxx/qla_isr.c ha->pdev->subsystem_device == 0x1705)) { ha 3617 drivers/scsi/qla2xxx/qla_isr.c ha->pdev->subsystem_vendor, ha 3618 drivers/scsi/qla2xxx/qla_isr.c ha->pdev->subsystem_device); ha 3622 drivers/scsi/qla2xxx/qla_isr.c if (IS_QLA2432(ha) && (ha->pdev->revision < QLA_MSIX_CHIP_REV_24XX)) { ha 3625 drivers/scsi/qla2xxx/qla_isr.c ha->pdev->revision, QLA_MSIX_CHIP_REV_24XX); ha 3629 drivers/scsi/qla2xxx/qla_isr.c ret = qla24xx_enable_msix(ha, rsp); ha 3633 drivers/scsi/qla2xxx/qla_isr.c ha->chip_revision, ha->fw_attributes); ha 3642 drivers/scsi/qla2xxx/qla_isr.c if (!IS_QLA24XX(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha) && ha 3643 drivers/scsi/qla2xxx/qla_isr.c !IS_QLA8001(ha) && !IS_P3P_TYPE(ha) && !IS_QLAFX00(ha) && ha 3644 drivers/scsi/qla2xxx/qla_isr.c !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 3647 drivers/scsi/qla2xxx/qla_isr.c ret = pci_alloc_irq_vectors(ha->pdev, 1, 1, PCI_IRQ_MSI); ha 3651 drivers/scsi/qla2xxx/qla_isr.c ha->flags.msi_enabled = 1; ha 3658 drivers/scsi/qla2xxx/qla_isr.c if (!ha->flags.msi_enabled && IS_QLA82XX(ha)) ha 3661 drivers/scsi/qla2xxx/qla_isr.c ret = request_irq(ha->pdev->irq, ha->isp_ops->intr_handler, ha 3662 drivers/scsi/qla2xxx/qla_isr.c ha->flags.msi_enabled ? 0 : IRQF_SHARED, ha 3667 drivers/scsi/qla2xxx/qla_isr.c ha->pdev->irq); ha 3669 drivers/scsi/qla2xxx/qla_isr.c } else if (!ha->flags.msi_enabled) { ha 3672 drivers/scsi/qla2xxx/qla_isr.c ha->flags.mr_intr_valid = 1; ha 3676 drivers/scsi/qla2xxx/qla_isr.c if (IS_FWI2_CAPABLE(ha) || IS_QLAFX00(ha)) ha 3679 drivers/scsi/qla2xxx/qla_isr.c spin_lock_irq(&ha->hardware_lock); ha 3681 drivers/scsi/qla2xxx/qla_isr.c spin_unlock_irq(&ha->hardware_lock); ha 3690 drivers/scsi/qla2xxx/qla_isr.c struct qla_hw_data *ha = vha->hw; ha 3699 drivers/scsi/qla2xxx/qla_isr.c if (!ha->rsp_q_map || !ha->rsp_q_map[0]) ha 3701 drivers/scsi/qla2xxx/qla_isr.c rsp = ha->rsp_q_map[0]; ha 3703 drivers/scsi/qla2xxx/qla_isr.c if (ha->flags.msix_enabled) { ha 3704 drivers/scsi/qla2xxx/qla_isr.c for (i = 0; i < ha->msix_count; i++) { ha 3705 drivers/scsi/qla2xxx/qla_isr.c qentry = &ha->msix_entries[i]; ha 3708 drivers/scsi/qla2xxx/qla_isr.c free_irq(pci_irq_vector(ha->pdev, i), qentry->handle); ha 3711 drivers/scsi/qla2xxx/qla_isr.c kfree(ha->msix_entries); ha 3712 drivers/scsi/qla2xxx/qla_isr.c ha->msix_entries = NULL; ha 3713 drivers/scsi/qla2xxx/qla_isr.c ha->flags.msix_enabled = 0; ha 3717 drivers/scsi/qla2xxx/qla_isr.c free_irq(pci_irq_vector(ha->pdev, 0), rsp); ha 3721 drivers/scsi/qla2xxx/qla_isr.c pci_free_irq_vectors(ha->pdev); ha 3724 drivers/scsi/qla2xxx/qla_isr.c int qla25xx_request_irq(struct qla_hw_data *ha, struct qla_qpair *qpair, ha 3728 drivers/scsi/qla2xxx/qla_isr.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 113 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 114 drivers/scsi/qla2xxx/qla_mbx.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 120 drivers/scsi/qla2xxx/qla_mbx.c if (ha->pdev->error_state > pci_channel_io_frozen) { ha 141 drivers/scsi/qla2xxx/qla_mbx.c reg = ha->iobase; ha 146 drivers/scsi/qla2xxx/qla_mbx.c chip_reset = ha->chip_reset; ha 148 drivers/scsi/qla2xxx/qla_mbx.c if (ha->flags.pci_channel_io_perm_failure) { ha 154 drivers/scsi/qla2xxx/qla_mbx.c if (IS_P3P_TYPE(ha) && ha->flags.isp82xx_fw_hung) { ha 158 drivers/scsi/qla2xxx/qla_mbx.c "FW hung = %d.\n", ha->flags.isp82xx_fw_hung); ha 173 drivers/scsi/qla2xxx/qla_mbx.c atomic_inc(&ha->num_pend_mbx_stage1); ha 179 drivers/scsi/qla2xxx/qla_mbx.c if (!wait_for_completion_timeout(&ha->mbx_cmd_comp, mcp->tov * HZ)) { ha 184 drivers/scsi/qla2xxx/qla_mbx.c atomic_dec(&ha->num_pend_mbx_stage1); ha 187 drivers/scsi/qla2xxx/qla_mbx.c atomic_dec(&ha->num_pend_mbx_stage1); ha 188 drivers/scsi/qla2xxx/qla_mbx.c if (ha->flags.purge_mbox || chip_reset != ha->chip_reset) { ha 195 drivers/scsi/qla2xxx/qla_mbx.c ha->mcp = mcp; ha 200 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 202 drivers/scsi/qla2xxx/qla_mbx.c if (ha->flags.purge_mbox || chip_reset != ha->chip_reset || ha 203 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.mbox_busy) { ha 205 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 208 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.mbox_busy = 1; ha 211 drivers/scsi/qla2xxx/qla_mbx.c if (IS_P3P_TYPE(ha)) ha 213 drivers/scsi/qla2xxx/qla_mbx.c else if (IS_FWI2_CAPABLE(ha) && !(IS_P3P_TYPE(ha))) ha 216 drivers/scsi/qla2xxx/qla_mbx.c optr = (uint16_t __iomem *)MAILBOX_REG(ha, ®->isp, 0); ha 224 drivers/scsi/qla2xxx/qla_mbx.c for (cnt = 0; cnt < ha->mbx_count; cnt++) { ha 225 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA2200(ha) && cnt == 8) ha 227 drivers/scsi/qla2xxx/qla_mbx.c (uint16_t __iomem *)MAILBOX_REG(ha, ®->isp, 8); ha 243 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.mbox_int = 0; ha 244 drivers/scsi/qla2xxx/qla_mbx.c clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); ha 252 drivers/scsi/qla2xxx/qla_mbx.c atomic_inc(&ha->num_pend_mbx_stage2); ha 253 drivers/scsi/qla2xxx/qla_mbx.c if ((!abort_active && io_lock_on) || IS_NOPOLLING_TYPE(ha)) { ha 254 drivers/scsi/qla2xxx/qla_mbx.c set_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); ha 256 drivers/scsi/qla2xxx/qla_mbx.c if (IS_P3P_TYPE(ha)) ha 258 drivers/scsi/qla2xxx/qla_mbx.c else if (IS_FWI2_CAPABLE(ha)) ha 262 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 265 drivers/scsi/qla2xxx/qla_mbx.c atomic_inc(&ha->num_pend_mbx_stage3); ha 266 drivers/scsi/qla2xxx/qla_mbx.c if (!wait_for_completion_timeout(&ha->mbx_intr_comp, ha 268 drivers/scsi/qla2xxx/qla_mbx.c if (chip_reset != ha->chip_reset) { ha 269 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 270 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.mbox_busy = 0; ha 271 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, ha 273 drivers/scsi/qla2xxx/qla_mbx.c atomic_dec(&ha->num_pend_mbx_stage2); ha 274 drivers/scsi/qla2xxx/qla_mbx.c atomic_dec(&ha->num_pend_mbx_stage3); ha 280 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 281 drivers/scsi/qla2xxx/qla_mbx.c clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); ha 282 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 284 drivers/scsi/qla2xxx/qla_mbx.c } else if (ha->flags.purge_mbox || ha 285 drivers/scsi/qla2xxx/qla_mbx.c chip_reset != ha->chip_reset) { ha 286 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 287 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.mbox_busy = 0; ha 288 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 289 drivers/scsi/qla2xxx/qla_mbx.c atomic_dec(&ha->num_pend_mbx_stage2); ha 290 drivers/scsi/qla2xxx/qla_mbx.c atomic_dec(&ha->num_pend_mbx_stage3); ha 294 drivers/scsi/qla2xxx/qla_mbx.c atomic_dec(&ha->num_pend_mbx_stage3); ha 303 drivers/scsi/qla2xxx/qla_mbx.c if (IS_P3P_TYPE(ha)) { ha 306 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.mbox_busy = 0; ha 307 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, ha 309 drivers/scsi/qla2xxx/qla_mbx.c atomic_dec(&ha->num_pend_mbx_stage2); ha 316 drivers/scsi/qla2xxx/qla_mbx.c } else if (IS_FWI2_CAPABLE(ha)) ha 320 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 323 drivers/scsi/qla2xxx/qla_mbx.c while (!ha->flags.mbox_int) { ha 324 drivers/scsi/qla2xxx/qla_mbx.c if (ha->flags.purge_mbox || ha 325 drivers/scsi/qla2xxx/qla_mbx.c chip_reset != ha->chip_reset) { ha 326 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 327 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.mbox_busy = 0; ha 328 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, ha 330 drivers/scsi/qla2xxx/qla_mbx.c atomic_dec(&ha->num_pend_mbx_stage2); ha 347 drivers/scsi/qla2xxx/qla_mbx.c qla2x00_poll(ha->rsp_q_map[0]); ha 349 drivers/scsi/qla2xxx/qla_mbx.c if (!ha->flags.mbox_int && ha 350 drivers/scsi/qla2xxx/qla_mbx.c !(IS_QLA2200(ha) && ha 358 drivers/scsi/qla2xxx/qla_mbx.c atomic_dec(&ha->num_pend_mbx_stage2); ha 361 drivers/scsi/qla2xxx/qla_mbx.c if (ha->flags.mbox_int) { ha 368 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.mbox_int = 0; ha 369 drivers/scsi/qla2xxx/qla_mbx.c clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); ha 371 drivers/scsi/qla2xxx/qla_mbx.c if (IS_P3P_TYPE(ha) && ha->flags.isp82xx_fw_hung) { ha 372 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 373 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.mbox_busy = 0; ha 374 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 378 drivers/scsi/qla2xxx/qla_mbx.c ha->mcp = NULL; ha 381 drivers/scsi/qla2xxx/qla_mbx.c "FW hung = %d.\n", ha->flags.isp82xx_fw_hung); ha 385 drivers/scsi/qla2xxx/qla_mbx.c if (ha->mailbox_out[0] != MBS_COMMAND_COMPLETE) { ha 387 drivers/scsi/qla2xxx/qla_mbx.c "mb_out[0] = %#x <> %#x\n", ha->mailbox_out[0], ha 394 drivers/scsi/qla2xxx/qla_mbx.c iptr = (uint16_t *)&ha->mailbox_out[0]; ha 399 drivers/scsi/qla2xxx/qla_mbx.c for (cnt = 0; cnt < ha->mbx_count; cnt++) { ha 416 drivers/scsi/qla2xxx/qla_mbx.c if (IS_FWI2_CAPABLE(ha)) { ha 433 drivers/scsi/qla2xxx/qla_mbx.c mb[0] = RD_MAILBOX_REG(ha, ®->isp, 0); ha 443 drivers/scsi/qla2xxx/qla_mbx.c pci_read_config_word(ha->pdev, PCI_VENDOR_ID, &w); ha 445 drivers/scsi/qla2xxx/qla_mbx.c (chip_reset != ha->chip_reset)) { ha 452 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 453 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.mbox_busy = 0; ha 454 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, ha 466 drivers/scsi/qla2xxx/qla_mbx.c ha->isp_ops->fw_dump(vha, 0); ha 470 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 471 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.mbox_busy = 0; ha 472 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 475 drivers/scsi/qla2xxx/qla_mbx.c ha->mcp = NULL; ha 477 drivers/scsi/qla2xxx/qla_mbx.c if ((abort_active || !io_lock_on) && !IS_NOPOLLING_TYPE(ha)) { ha 482 drivers/scsi/qla2xxx/qla_mbx.c qla2x00_poll(ha->rsp_q_map[0]); ha 488 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.eeh_busy) { ha 496 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA82XX(ha)) { ha 500 drivers/scsi/qla2xxx/qla_mbx.c qla82xx_wr_32(ha, ha 509 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.eeh_busy); ha 513 drivers/scsi/qla2xxx/qla_mbx.c } else if (current == ha->dpc_thread) { ha 521 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA82XX(ha)) { ha 525 drivers/scsi/qla2xxx/qla_mbx.c qla82xx_wr_32(ha, ha 537 drivers/scsi/qla2xxx/qla_mbx.c complete(&ha->mbx_cmd_comp); ha 538 drivers/scsi/qla2xxx/qla_mbx.c if (ha->isp_ops->abort_isp(vha)) { ha 553 drivers/scsi/qla2xxx/qla_mbx.c complete(&ha->mbx_cmd_comp); ha 563 drivers/scsi/qla2xxx/qla_mbx.c dev_name(&ha->pdev->dev), 0x1020+0x800, ha 567 drivers/scsi/qla2xxx/qla_mbx.c for (i = 0; i < ha->mbx_count && cnt; i++, mboxes >>= 1) ha 574 drivers/scsi/qla2xxx/qla_mbx.c if (IS_FWI2_CAPABLE(ha) && !(IS_P3P_TYPE(ha))) { ha 599 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 606 drivers/scsi/qla2xxx/qla_mbx.c if (MSW(risc_addr) || IS_FWI2_CAPABLE(ha)) { ha 620 drivers/scsi/qla2xxx/qla_mbx.c if (IS_FWI2_CAPABLE(ha)) { ha 648 drivers/scsi/qla2xxx/qla_mbx.c static inline uint16_t qla25xx_set_sfp_lr_dist(struct qla_hw_data *ha) ha 652 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 653 drivers/scsi/qla2xxx/qla_mbx.c mb4 |= ha->long_range_distance << LR_DIST_FW_POS; ha 658 drivers/scsi/qla2xxx/qla_mbx.c static inline uint16_t qla25xx_set_nvr_lr_dist(struct qla_hw_data *ha) ha 662 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 663 drivers/scsi/qla2xxx/qla_mbx.c struct nvram_81xx *nv = ha->nvram; ha 690 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 700 drivers/scsi/qla2xxx/qla_mbx.c if (IS_FWI2_CAPABLE(ha)) { ha 706 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.using_lr_setting = 0; ha 707 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA25XX(ha) || IS_QLA81XX(ha) || IS_QLA83XX(ha) || ha 708 drivers/scsi/qla2xxx/qla_mbx.c IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 710 drivers/scsi/qla2xxx/qla_mbx.c if (ha->flags.detected_lr_sfp) { ha 712 drivers/scsi/qla2xxx/qla_mbx.c qla25xx_set_sfp_lr_dist(ha); ha 713 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.using_lr_setting = 1; ha 716 drivers/scsi/qla2xxx/qla_mbx.c struct nvram_81xx *nv = ha->nvram; ha 721 drivers/scsi/qla2xxx/qla_mbx.c qla25xx_set_nvr_lr_dist(ha); ha 722 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.using_lr_setting = 1; ha 727 drivers/scsi/qla2xxx/qla_mbx.c if (ql2xnvmeenable && (IS_QLA27XX(ha) || IS_QLA28XX(ha))) ha 730 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 731 drivers/scsi/qla2xxx/qla_mbx.c struct nvram_81xx *nv = ha->nvram; ha 744 drivers/scsi/qla2xxx/qla_mbx.c if (ha->flags.exlogins_enabled) ha 747 drivers/scsi/qla2xxx/qla_mbx.c if (ha->flags.exchoffld_enabled) ha 755 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA2322(ha) || IS_QLA6322(ha)) { ha 771 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_FWI2_CAPABLE(ha)) ha 774 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_ability_mask = mcp->mb[3] << 16 | mcp->mb[2]; ha 776 drivers/scsi/qla2xxx/qla_mbx.c "fw_ability_mask=%x.\n", ha->fw_ability_mask); ha 778 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 779 drivers/scsi/qla2xxx/qla_mbx.c ha->max_supported_speed = mcp->mb[2] & (BIT_0|BIT_1); ha 781 drivers/scsi/qla2xxx/qla_mbx.c ha->max_supported_speed == 0 ? "16Gps" : ha 782 drivers/scsi/qla2xxx/qla_mbx.c ha->max_supported_speed == 1 ? "32Gps" : ha 783 drivers/scsi/qla2xxx/qla_mbx.c ha->max_supported_speed == 2 ? "64Gps" : "unknown"); ha 785 drivers/scsi/qla2xxx/qla_mbx.c ha->min_supported_speed = mcp->mb[5] & ha 789 drivers/scsi/qla2xxx/qla_mbx.c ha->min_supported_speed == 6 ? "64Gps" : ha 790 drivers/scsi/qla2xxx/qla_mbx.c ha->min_supported_speed == 5 ? "32Gps" : ha 791 drivers/scsi/qla2xxx/qla_mbx.c ha->min_supported_speed == 4 ? "16Gps" : ha 792 drivers/scsi/qla2xxx/qla_mbx.c ha->min_supported_speed == 3 ? "8Gps" : ha 793 drivers/scsi/qla2xxx/qla_mbx.c ha->min_supported_speed == 2 ? "4Gps" : "unknown"); ha 883 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 895 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[8] = MSW(ha->exlogin_size); ha 896 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[9] = LSW(ha->exlogin_size); ha 992 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 1000 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[2] = MSW(ha->exchoffld_buf_dma); ha 1001 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[3] = LSW(ha->exchoffld_buf_dma); ha 1002 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[6] = MSW(MSD(ha->exchoffld_buf_dma)); ha 1003 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[7] = LSW(MSD(ha->exchoffld_buf_dma)); ha 1004 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[8] = MSW(ha->exchoffld_size); ha 1005 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[9] = LSW(ha->exchoffld_size); ha 1044 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 1052 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA81XX(vha->hw) || IS_QLA8031(ha) || IS_QLA8044(ha)) ha 1054 drivers/scsi/qla2xxx/qla_mbx.c if (IS_FWI2_CAPABLE(ha)) ha 1056 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 1068 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_major_version = mcp->mb[1]; ha 1069 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_minor_version = mcp->mb[2]; ha 1070 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_subminor_version = mcp->mb[3]; ha 1071 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_attributes = mcp->mb[6]; ha 1073 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_memory_size = 0x1FFFF; /* Defaults to 128KB. */ ha 1075 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_memory_size = (mcp->mb[5] << 16) | mcp->mb[4]; ha 1077 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA81XX(vha->hw) || IS_QLA8031(vha->hw) || IS_QLA8044(ha)) { ha 1078 drivers/scsi/qla2xxx/qla_mbx.c ha->mpi_version[0] = mcp->mb[10] & 0xff; ha 1079 drivers/scsi/qla2xxx/qla_mbx.c ha->mpi_version[1] = mcp->mb[11] >> 8; ha 1080 drivers/scsi/qla2xxx/qla_mbx.c ha->mpi_version[2] = mcp->mb[11] & 0xff; ha 1081 drivers/scsi/qla2xxx/qla_mbx.c ha->mpi_capabilities = (mcp->mb[12] << 16) | mcp->mb[13]; ha 1082 drivers/scsi/qla2xxx/qla_mbx.c ha->phy_version[0] = mcp->mb[8] & 0xff; ha 1083 drivers/scsi/qla2xxx/qla_mbx.c ha->phy_version[1] = mcp->mb[9] >> 8; ha 1084 drivers/scsi/qla2xxx/qla_mbx.c ha->phy_version[2] = mcp->mb[9] & 0xff; ha 1087 drivers/scsi/qla2xxx/qla_mbx.c if (IS_FWI2_CAPABLE(ha)) { ha 1088 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_attributes_h = mcp->mb[15]; ha 1089 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_attributes_ext[0] = mcp->mb[16]; ha 1090 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_attributes_ext[1] = mcp->mb[17]; ha 1098 drivers/scsi/qla2xxx/qla_mbx.c if (ha->fw_attributes_h & 0x4) ha 1101 drivers/scsi/qla2xxx/qla_mbx.c __func__, ha->fw_attributes_h); ha 1103 drivers/scsi/qla2xxx/qla_mbx.c if (ha->fw_attributes_h & 0x8) ha 1106 drivers/scsi/qla2xxx/qla_mbx.c __func__, ha->fw_attributes_h); ha 1112 drivers/scsi/qla2xxx/qla_mbx.c if ((ha->fw_attributes_h & ha 1115 drivers/scsi/qla2xxx/qla_mbx.c if (ha->fw_attributes_h & FW_ATTR_H_NVME_FBURST) ha 1121 drivers/scsi/qla2xxx/qla_mbx.c __func__, ha->fw_attributes_h); ha 1125 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 1126 drivers/scsi/qla2xxx/qla_mbx.c ha->serdes_version[0] = mcp->mb[7] & 0xff; ha 1127 drivers/scsi/qla2xxx/qla_mbx.c ha->serdes_version[1] = mcp->mb[8] >> 8; ha 1128 drivers/scsi/qla2xxx/qla_mbx.c ha->serdes_version[2] = mcp->mb[8] & 0xff; ha 1129 drivers/scsi/qla2xxx/qla_mbx.c ha->mpi_version[0] = mcp->mb[10] & 0xff; ha 1130 drivers/scsi/qla2xxx/qla_mbx.c ha->mpi_version[1] = mcp->mb[11] >> 8; ha 1131 drivers/scsi/qla2xxx/qla_mbx.c ha->mpi_version[2] = mcp->mb[11] & 0xff; ha 1132 drivers/scsi/qla2xxx/qla_mbx.c ha->pep_version[0] = mcp->mb[13] & 0xff; ha 1133 drivers/scsi/qla2xxx/qla_mbx.c ha->pep_version[1] = mcp->mb[14] >> 8; ha 1134 drivers/scsi/qla2xxx/qla_mbx.c ha->pep_version[2] = mcp->mb[14] & 0xff; ha 1135 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_shared_ram_start = (mcp->mb[19] << 16) | mcp->mb[18]; ha 1136 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_shared_ram_end = (mcp->mb[21] << 16) | mcp->mb[20]; ha 1137 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_ddr_ram_start = (mcp->mb[23] << 16) | mcp->mb[22]; ha 1138 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_ddr_ram_end = (mcp->mb[25] << 16) | mcp->mb[24]; ha 1139 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA28XX(ha)) { ha 1143 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.secure_fw = 1; ha 1471 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 1483 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1488 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1496 drivers/scsi/qla2xxx/qla_mbx.c if (HAS_EXTENDED_IDS(ha)) ha 1790 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 1795 drivers/scsi/qla2xxx/qla_mbx.c if (IS_P3P_TYPE(ha) && ql2xdbwr) ha 1796 drivers/scsi/qla2xxx/qla_mbx.c qla82xx_wr_32(ha, (uintptr_t __force)ha->nxdb_wr_ptr, ha 1797 drivers/scsi/qla2xxx/qla_mbx.c (0x04 | (ha->portnum << 5) | (0 << 8) | (0 << 16))); ha 1799 drivers/scsi/qla2xxx/qla_mbx.c if (ha->flags.npiv_supported) ha 1805 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[2] = MSW(ha->init_cb_dma); ha 1806 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[3] = LSW(ha->init_cb_dma); ha 1807 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[6] = MSW(MSD(ha->init_cb_dma)); ha 1808 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[7] = LSW(MSD(ha->init_cb_dma)); ha 1810 drivers/scsi/qla2xxx/qla_mbx.c if (ha->ex_init_cb && ha->ex_init_cb->ex_version) { ha 1812 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[10] = MSW(ha->ex_init_cb_dma); ha 1813 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[11] = LSW(ha->ex_init_cb_dma); ha 1814 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[12] = MSW(MSD(ha->ex_init_cb_dma)); ha 1815 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[13] = LSW(MSD(ha->ex_init_cb_dma)); ha 1816 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[14] = sizeof(*ha->ex_init_cb); ha 1821 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 1834 drivers/scsi/qla2xxx/qla_mbx.c if (ha->init_cb) { ha 1837 drivers/scsi/qla2xxx/qla_mbx.c 0x0104d, ha->init_cb, sizeof(*ha->init_cb)); ha 1839 drivers/scsi/qla2xxx/qla_mbx.c if (ha->ex_init_cb && ha->ex_init_cb->ex_version) { ha 1842 drivers/scsi/qla2xxx/qla_mbx.c 0x0104d, ha->ex_init_cb, sizeof(*ha->ex_init_cb)); ha 1845 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 1883 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 1889 drivers/scsi/qla2xxx/qla_mbx.c pd = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &pd_dma); ha 1898 drivers/scsi/qla2xxx/qla_mbx.c if (opt != 0 && !IS_FWI2_CAPABLE(ha)) ha 1907 drivers/scsi/qla2xxx/qla_mbx.c if (IS_FWI2_CAPABLE(ha)) { ha 1912 drivers/scsi/qla2xxx/qla_mbx.c } else if (HAS_EXTENDED_IDS(ha)) { ha 1920 drivers/scsi/qla2xxx/qla_mbx.c mcp->buf_size = IS_FWI2_CAPABLE(ha) ? ha 1923 drivers/scsi/qla2xxx/qla_mbx.c mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2); ha 1928 drivers/scsi/qla2xxx/qla_mbx.c if (IS_FWI2_CAPABLE(ha)) { ha 2033 drivers/scsi/qla2xxx/qla_mbx.c dma_pool_free(ha->s_dma_pool, pd, pd_dma); ha 2070 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 2099 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 2367 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 2376 drivers/scsi/qla2xxx/qla_mbx.c req = ha->req_q_map[0]; ha 2378 drivers/scsi/qla2xxx/qla_mbx.c lg = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma); ha 2399 drivers/scsi/qla2xxx/qla_mbx.c (ha->r_a_tov / 10 * 2) + 2); ha 2468 drivers/scsi/qla2xxx/qla_mbx.c dma_pool_free(ha->s_dma_pool, lg, lg_dma); ha 2501 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 2508 drivers/scsi/qla2xxx/qla_mbx.c if (HAS_EXTENDED_IDS(ha)) { ha 2519 drivers/scsi/qla2xxx/qla_mbx.c mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2); ha 2582 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 2587 drivers/scsi/qla2xxx/qla_mbx.c if (IS_FWI2_CAPABLE(ha)) ha 2593 drivers/scsi/qla2xxx/qla_mbx.c if (HAS_EXTENDED_IDS(ha)) ha 2600 drivers/scsi/qla2xxx/qla_mbx.c mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2); ha 2641 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 2647 drivers/scsi/qla2xxx/qla_mbx.c lg = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma); ha 2667 drivers/scsi/qla2xxx/qla_mbx.c (ha->r_a_tov / 10 * 2) + 2); ha 2688 drivers/scsi/qla2xxx/qla_mbx.c dma_pool_free(ha->s_dma_pool, lg, lg_dma); ha 2871 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 2882 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA81XX(ha) || IS_QLA83XX(ha) || ha 2883 drivers/scsi/qla2xxx/qla_mbx.c IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 2900 drivers/scsi/qla2xxx/qla_mbx.c ha->orig_fw_tgt_xcb_count = mcp->mb[1]; ha 2901 drivers/scsi/qla2xxx/qla_mbx.c ha->cur_fw_tgt_xcb_count = mcp->mb[2]; ha 2902 drivers/scsi/qla2xxx/qla_mbx.c ha->cur_fw_xcb_count = mcp->mb[3]; ha 2903 drivers/scsi/qla2xxx/qla_mbx.c ha->orig_fw_xcb_count = mcp->mb[6]; ha 2904 drivers/scsi/qla2xxx/qla_mbx.c ha->cur_fw_iocb_count = mcp->mb[7]; ha 2905 drivers/scsi/qla2xxx/qla_mbx.c ha->orig_fw_iocb_count = mcp->mb[10]; ha 2906 drivers/scsi/qla2xxx/qla_mbx.c if (ha->flags.npiv_supported) ha 2907 drivers/scsi/qla2xxx/qla_mbx.c ha->max_npiv_vports = mcp->mb[11]; ha 2908 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA81XX(ha) || IS_QLA83XX(ha) || IS_QLA27XX(ha) || ha 2909 drivers/scsi/qla2xxx/qla_mbx.c IS_QLA28XX(ha)) ha 2910 drivers/scsi/qla2xxx/qla_mbx.c ha->fw_max_fcf_count = mcp->mb[12]; ha 2938 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 2943 drivers/scsi/qla2xxx/qla_mbx.c pmap = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &pmap_dma); ha 2959 drivers/scsi/qla2xxx/qla_mbx.c mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2); ha 2972 drivers/scsi/qla2xxx/qla_mbx.c dma_pool_free(ha->s_dma_pool, pmap, pmap_dma); ha 3006 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 3018 drivers/scsi/qla2xxx/qla_mbx.c if (IS_FWI2_CAPABLE(ha)) { ha 3024 drivers/scsi/qla2xxx/qla_mbx.c } else if (HAS_EXTENDED_IDS(ha)) { ha 3113 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 3139 drivers/scsi/qla2xxx/qla_mbx.c abt = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &abt_dma); ha 3180 drivers/scsi/qla2xxx/qla_mbx.c dma_pool_free(ha->s_dma_pool, abt, abt_dma); ha 3201 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha; ha 3206 drivers/scsi/qla2xxx/qla_mbx.c ha = vha->hw; ha 3218 drivers/scsi/qla2xxx/qla_mbx.c tsk = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &tsk_dma); ha 3229 drivers/scsi/qla2xxx/qla_mbx.c tsk->p.tsk.timeout = cpu_to_le16(ha->r_a_tov / 10 * 2); ha 3272 drivers/scsi/qla2xxx/qla_mbx.c rval2 = qla2x00_marker(vha, ha->base_qpair, fcport->loop_id, l, ha 3282 drivers/scsi/qla2xxx/qla_mbx.c dma_pool_free(ha->s_dma_pool, tsk, tsk_dma); ha 3290 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = fcport->vha->hw; ha 3292 drivers/scsi/qla2xxx/qla_mbx.c if ((ql2xasynctmfenable) && IS_FWI2_CAPABLE(ha)) ha 3301 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = fcport->vha->hw; ha 3303 drivers/scsi/qla2xxx/qla_mbx.c if ((ql2xasynctmfenable) && IS_FWI2_CAPABLE(ha)) ha 3315 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 3317 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_QLA23XX(ha) && !IS_FWI2_CAPABLE(ha)) ha 3835 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 3852 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.n2n_ae = 0; ha 3864 drivers/scsi/qla2xxx/qla_mbx.c ha->current_topology = ISP_CFG_NL; ha 3885 drivers/scsi/qla2xxx/qla_mbx.c ha->current_topology = ISP_CFG_N; ha 3922 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.n2n_bigger = 1; ha 3923 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.n2n_ae = 0; ha 3933 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.n2n_bigger = 0; ha 3934 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.n2n_ae = 1; ha 3949 drivers/scsi/qla2xxx/qla_mbx.c ha->current_topology = ISP_CFG_FL; ha 3952 drivers/scsi/qla2xxx/qla_mbx.c ha->current_topology = ISP_CFG_F; ha 3958 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.gpsc_supported = 1; ha 3959 drivers/scsi/qla2xxx/qla_mbx.c ha->current_topology = ISP_CFG_F; ha 3967 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.fawwpn_enabled && ha 3990 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->vport_slock, flags); ha 3991 drivers/scsi/qla2xxx/qla_mbx.c list_for_each_entry(vp, &ha->vp_list, list) { ha 3997 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 4025 drivers/scsi/qla2xxx/qla_mbx.c ha->current_topology = ISP_CFG_N; ha 4026 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.rida_fmt2 = 1; ha 4031 drivers/scsi/qla2xxx/qla_mbx.c ha->flags.n2n_ae = 1; ha 4032 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->vport_slock, flags); ha 4034 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 4079 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 4080 drivers/scsi/qla2xxx/qla_mbx.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 4087 drivers/scsi/qla2xxx/qla_mbx.c vpmod = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &vpmod_dma); ha 4127 drivers/scsi/qla2xxx/qla_mbx.c dma_pool_free(ha->s_dma_pool, vpmod, vpmod_dma); ha 4249 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 4254 drivers/scsi/qla2xxx/qla_mbx.c mn = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &mn_dma); ha 4260 drivers/scsi/qla2xxx/qla_mbx.c options = ha->cs84xx->fw_update ? VCO_FORCE_UPDATE : 0; ha 4312 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->cs84xx->access_lock, flags); ha 4313 drivers/scsi/qla2xxx/qla_mbx.c ha->cs84xx->op_fw_version = ha 4315 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->cs84xx->access_lock, ha 4321 drivers/scsi/qla2xxx/qla_mbx.c dma_pool_free(ha->s_dma_pool, mn, mn_dma); ha 4341 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 4343 drivers/scsi/qla2xxx/qla_mbx.c if (!ha->flags.fw_started) ha 4349 drivers/scsi/qla2xxx/qla_mbx.c if (IS_SHADOW_REG_CAPABLE(ha)) ha 4364 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 4378 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA81XX(ha) || IS_QLA83XX(ha) || IS_QLA27XX(ha) || ha 4379 drivers/scsi/qla2xxx/qla_mbx.c IS_QLA28XX(ha)) ha 4381 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 4387 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4390 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 4393 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4414 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 4416 drivers/scsi/qla2xxx/qla_mbx.c if (!ha->flags.fw_started) ha 4422 drivers/scsi/qla2xxx/qla_mbx.c if (IS_SHADOW_REG_CAPABLE(ha)) ha 4434 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 4448 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA81XX(ha)) { ha 4451 drivers/scsi/qla2xxx/qla_mbx.c } else if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 4458 drivers/scsi/qla2xxx/qla_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4461 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 4465 drivers/scsi/qla2xxx/qla_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4622 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 4624 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_QLA81XX(ha) && !IS_QLA83XX(ha) && ha 4625 drivers/scsi/qla2xxx/qla_mbx.c !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 4690 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 4692 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_P3P_TYPE(ha)) ha 4738 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 4740 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_FWI2_CAPABLE(ha) || IS_QLA24XX_TYPE(ha) || IS_QLA81XX(ha) || ha 4741 drivers/scsi/qla2xxx/qla_mbx.c IS_P3P_TYPE(ha)) ha 4747 drivers/scsi/qla2xxx/qla_mbx.c str = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &str_dma); ha 4782 drivers/scsi/qla2xxx/qla_mbx.c dma_pool_free(ha->s_dma_pool, str, str_dma); ha 4869 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 4874 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_FWI2_CAPABLE(ha)) ha 4920 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 4925 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_FWI2_CAPABLE(ha)) ha 5142 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5151 drivers/scsi/qla2xxx/qla_mbx.c if (IS_CNA_CAPABLE(ha)) { ha 5168 drivers/scsi/qla2xxx/qla_mbx.c if (IS_CNA_CAPABLE(ha)) ha 5172 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA24XX_TYPE(ha) || IS_QLA25XX(ha) || ha 5173 drivers/scsi/qla2xxx/qla_mbx.c IS_CNA_CAPABLE(ha) || IS_QLA2031(ha)) ha 5175 drivers/scsi/qla2xxx/qla_mbx.c if (IS_CNA_CAPABLE(ha) || IS_QLA2031(ha)) ha 5266 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5267 drivers/scsi/qla2xxx/qla_mbx.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 5274 drivers/scsi/qla2xxx/qla_mbx.c clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); ha 5295 drivers/scsi/qla2xxx/qla_mbx.c &ha->mbx_cmd_flags); ha 5306 drivers/scsi/qla2xxx/qla_mbx.c if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) ha 5329 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5333 drivers/scsi/qla2xxx/qla_mbx.c "Entered %s speed:0x%x mode:0x%x.\n", __func__, ha->set_data_rate, ha 5336 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_FWI2_CAPABLE(ha)) ha 5340 drivers/scsi/qla2xxx/qla_mbx.c switch (ha->set_data_rate) { ha 5346 drivers/scsi/qla2xxx/qla_mbx.c val = ha->set_data_rate; ha 5351 drivers/scsi/qla2xxx/qla_mbx.c ha->set_data_rate); ha 5352 drivers/scsi/qla2xxx/qla_mbx.c val = ha->set_data_rate = PORT_SPEED_AUTO; ha 5362 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 5388 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5393 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_FWI2_CAPABLE(ha)) ha 5400 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 5412 drivers/scsi/qla2xxx/qla_mbx.c ha->link_data_rate = mcp->mb[1]; ha 5424 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5429 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_QLA81XX(ha) && !IS_QLA83XX(ha) && !IS_QLA8044(ha) && ha 5430 drivers/scsi/qla2xxx/qla_mbx.c !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 5490 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5495 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_QLA24XX_TYPE(ha) && !IS_QLA25XX(ha)) ha 5500 drivers/scsi/qla2xxx/qla_mbx.c if (ha->flags.fcp_prio_enabled) ha 5532 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5535 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_FWI2_CAPABLE(ha) || IS_QLA24XX_TYPE(ha) || IS_QLA81XX(ha)) { ha 5541 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA25XX(ha)) { ha 5542 drivers/scsi/qla2xxx/qla_mbx.c if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_QLOGIC && ha 5543 drivers/scsi/qla2xxx/qla_mbx.c ha->pdev->subsystem_device == 0x0175) { ha 5549 drivers/scsi/qla2xxx/qla_mbx.c if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP && ha 5550 drivers/scsi/qla2xxx/qla_mbx.c ha->pdev->subsystem_device == 0x338e) { ha 5561 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA82XX(ha)) { ha 5565 drivers/scsi/qla2xxx/qla_mbx.c } else if (IS_QLA8044(ha)) { ha 5579 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5586 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_FWI2_CAPABLE(ha)) ha 5614 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5621 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_P3P_TYPE(ha)) ha 5648 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5679 drivers/scsi/qla2xxx/qla_mbx.c ha->md_template_size = ((mcp->mb[3] << 16) | mcp->mb[2]); ha 5680 drivers/scsi/qla2xxx/qla_mbx.c if (!ha->md_template_size) { ha 5692 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5700 drivers/scsi/qla2xxx/qla_mbx.c ha->md_tmplt_hdr = dma_alloc_coherent(&ha->pdev->dev, ha 5701 drivers/scsi/qla2xxx/qla_mbx.c ha->md_template_size, &ha->md_tmplt_hdr_dma, GFP_KERNEL); ha 5702 drivers/scsi/qla2xxx/qla_mbx.c if (!ha->md_tmplt_hdr) { ha 5713 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[4] = LSW(LSD(ha->md_tmplt_hdr_dma)); ha 5714 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[5] = MSW(LSD(ha->md_tmplt_hdr_dma)); ha 5715 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[6] = LSW(MSD(ha->md_tmplt_hdr_dma)); ha 5716 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[7] = MSW(MSD(ha->md_tmplt_hdr_dma)); ha 5717 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[8] = LSW(ha->md_template_size); ha 5718 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[9] = MSW(ha->md_template_size); ha 5741 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5750 drivers/scsi/qla2xxx/qla_mbx.c ha->md_tmplt_hdr = dma_alloc_coherent(&ha->pdev->dev, ha 5751 drivers/scsi/qla2xxx/qla_mbx.c ha->md_template_size, &ha->md_tmplt_hdr_dma, GFP_KERNEL); ha 5752 drivers/scsi/qla2xxx/qla_mbx.c if (!ha->md_tmplt_hdr) { ha 5759 drivers/scsi/qla2xxx/qla_mbx.c while (offset < ha->md_template_size) { ha 5764 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[4] = LSW(LSD(ha->md_tmplt_hdr_dma + offset)); ha 5765 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[5] = MSW(LSD(ha->md_tmplt_hdr_dma + offset)); ha 5766 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[6] = LSW(MSD(ha->md_tmplt_hdr_dma + offset)); ha 5767 drivers/scsi/qla2xxx/qla_mbx.c mcp->mb[7] = MSW(MSD(ha->md_tmplt_hdr_dma + offset)); ha 5797 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5801 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_QLA81XX(ha) && !IS_QLA8031(ha)) ha 5811 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA8031(ha)) { ha 5819 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA8031(ha)) ha 5841 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5845 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_QLA81XX(ha) && !IS_QLA8031(ha)) ha 5856 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA8031(ha)) ha 5868 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA8031(ha)) { ha 5885 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5889 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_P3P_TYPE(ha)) ha 5923 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5927 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 5960 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 5964 drivers/scsi/qla2xxx/qla_mbx.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) { ha 5999 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 6002 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 6050 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 6052 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_QLA83XX(ha)) ha 6068 drivers/scsi/qla2xxx/qla_mbx.c ha->isp_ops->fw_dump(vha, 0); ha 6084 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 6086 drivers/scsi/qla2xxx/qla_mbx.c if (!IS_QLA8031(ha)) ha 6113 drivers/scsi/qla2xxx/qla_mbx.c ha->isp_ops->fw_dump(vha, 0); ha 6312 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 6318 drivers/scsi/qla2xxx/qla_mbx.c pd = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &pd_dma); ha 6349 drivers/scsi/qla2xxx/qla_mbx.c dma_pool_free(ha->s_dma_pool, pd, pd_dma); ha 6515 drivers/scsi/qla2xxx/qla_mbx.c struct qla_hw_data *ha = vha->hw; ha 6521 drivers/scsi/qla2xxx/qla_mbx.c memset(ha->sfp_data, 0, SFP_DEV_SIZE); ha 6523 drivers/scsi/qla2xxx/qla_mbx.c phys_addr = ha->sfp_data_dma; ha 6524 drivers/scsi/qla2xxx/qla_mbx.c sfp_data = ha->sfp_data; ha 33 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = vha->hw; ha 37 drivers/scsi/qla2xxx/qla_mid.c mutex_lock(&ha->vport_lock); ha 38 drivers/scsi/qla2xxx/qla_mid.c vp_id = find_first_zero_bit(ha->vp_idx_map, ha->max_npiv_vports + 1); ha 39 drivers/scsi/qla2xxx/qla_mid.c if (vp_id > ha->max_npiv_vports) { ha 42 drivers/scsi/qla2xxx/qla_mid.c vp_id, ha->max_npiv_vports); ha 43 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->vport_lock); ha 47 drivers/scsi/qla2xxx/qla_mid.c set_bit(vp_id, ha->vp_idx_map); ha 48 drivers/scsi/qla2xxx/qla_mid.c ha->num_vhosts++; ha 51 drivers/scsi/qla2xxx/qla_mid.c spin_lock_irqsave(&ha->vport_slock, flags); ha 52 drivers/scsi/qla2xxx/qla_mid.c list_add_tail(&vha->list, &ha->vp_list); ha 53 drivers/scsi/qla2xxx/qla_mid.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 55 drivers/scsi/qla2xxx/qla_mid.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 57 drivers/scsi/qla2xxx/qla_mid.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 59 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->vport_lock); ha 67 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = vha->hw; ha 71 drivers/scsi/qla2xxx/qla_mid.c mutex_lock(&ha->vport_lock); ha 85 drivers/scsi/qla2xxx/qla_mid.c spin_lock_irqsave(&ha->vport_slock, flags); ha 93 drivers/scsi/qla2xxx/qla_mid.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 96 drivers/scsi/qla2xxx/qla_mid.c ha->num_vhosts--; ha 97 drivers/scsi/qla2xxx/qla_mid.c clear_bit(vp_id, ha->vp_idx_map); ha 99 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->vport_lock); ha 103 drivers/scsi/qla2xxx/qla_mid.c qla24xx_find_vhost_by_name(struct qla_hw_data *ha, uint8_t *port_name) ha 109 drivers/scsi/qla2xxx/qla_mid.c spin_lock_irqsave(&ha->vport_slock, flags); ha 111 drivers/scsi/qla2xxx/qla_mid.c list_for_each_entry_safe(vha, tvha, &ha->vp_list, list) { ha 113 drivers/scsi/qla2xxx/qla_mid.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 117 drivers/scsi/qla2xxx/qla_mid.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 193 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = vha->hw; ha 194 drivers/scsi/qla2xxx/qla_mid.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 199 drivers/scsi/qla2xxx/qla_mid.c !(ha->current_topology & ISP_CFG_F)) { ha 205 drivers/scsi/qla2xxx/qla_mid.c ha->current_topology); ha 211 drivers/scsi/qla2xxx/qla_mid.c mutex_lock(&ha->vport_lock); ha 213 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->vport_lock); ha 262 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = rsp->hw; ha 266 drivers/scsi/qla2xxx/qla_mid.c spin_lock_irqsave(&ha->vport_slock, flags); ha 267 drivers/scsi/qla2xxx/qla_mid.c list_for_each_entry(vha, &ha->vp_list, list) { ha 273 drivers/scsi/qla2xxx/qla_mid.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 298 drivers/scsi/qla2xxx/qla_mid.c spin_lock_irqsave(&ha->vport_slock, flags); ha 304 drivers/scsi/qla2xxx/qla_mid.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 345 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = vha->hw; ha 346 drivers/scsi/qla2xxx/qla_mid.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 412 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = vha->hw; ha 418 drivers/scsi/qla2xxx/qla_mid.c if (list_empty(&ha->vp_list)) ha 423 drivers/scsi/qla2xxx/qla_mid.c if (!(ha->current_topology & ISP_CFG_F)) ha 426 drivers/scsi/qla2xxx/qla_mid.c spin_lock_irqsave(&ha->vport_slock, flags); ha 427 drivers/scsi/qla2xxx/qla_mid.c list_for_each_entry(vp, &ha->vp_list, list) { ha 430 drivers/scsi/qla2xxx/qla_mid.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 434 drivers/scsi/qla2xxx/qla_mid.c spin_lock_irqsave(&ha->vport_slock, flags); ha 438 drivers/scsi/qla2xxx/qla_mid.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 445 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = base_vha->hw; ha 453 drivers/scsi/qla2xxx/qla_mid.c if (!ha->flags.npiv_supported) ha 457 drivers/scsi/qla2xxx/qla_mid.c if (!(ha->switch_cap & FLOGI_MID_SUPPORT)) ha 464 drivers/scsi/qla2xxx/qla_mid.c vha = qla24xx_find_vhost_by_name(ha, port_name); ha 469 drivers/scsi/qla2xxx/qla_mid.c if (ha->num_vhosts > ha->max_npiv_vports) { ha 473 drivers/scsi/qla2xxx/qla_mid.c ha->num_vhosts, ha->max_npiv_vports); ha 483 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = base_vha->hw; ha 488 drivers/scsi/qla2xxx/qla_mid.c vha = qla2x00_create_host(sht, ha); ha 504 drivers/scsi/qla2xxx/qla_mid.c if (vha->vp_idx > ha->max_npiv_vports) { ha 527 drivers/scsi/qla2xxx/qla_mid.c if (IS_T10_PI_CAPABLE(ha) && ql2xenabledif) ha 534 drivers/scsi/qla2xxx/qla_mid.c host->max_id = ha->max_fibre_devices; ha 543 drivers/scsi/qla2xxx/qla_mid.c mutex_lock(&ha->vport_lock); ha 544 drivers/scsi/qla2xxx/qla_mid.c set_bit(vha->vp_idx, ha->vp_idx_map); ha 545 drivers/scsi/qla2xxx/qla_mid.c ha->cur_vport_count++; ha 546 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->vport_lock); ha 557 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = vha->hw; ha 560 drivers/scsi/qla2xxx/qla_mid.c dma_free_coherent(&ha->pdev->dev, (req->length + 1) * ha 565 drivers/scsi/qla2xxx/qla_mid.c ha->req_q_map[que_id] = NULL; ha 566 drivers/scsi/qla2xxx/qla_mid.c mutex_lock(&ha->vport_lock); ha 567 drivers/scsi/qla2xxx/qla_mid.c clear_bit(que_id, ha->req_qid_map); ha 568 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->vport_lock); ha 578 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = vha->hw; ha 587 drivers/scsi/qla2xxx/qla_mid.c dma_free_coherent(&ha->pdev->dev, (rsp->length + 1) * ha 592 drivers/scsi/qla2xxx/qla_mid.c ha->rsp_q_map[que_id] = NULL; ha 593 drivers/scsi/qla2xxx/qla_mid.c mutex_lock(&ha->vport_lock); ha 594 drivers/scsi/qla2xxx/qla_mid.c clear_bit(que_id, ha->rsp_qid_map); ha 595 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->vport_lock); ha 642 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = vha->hw; ha 651 drivers/scsi/qla2xxx/qla_mid.c for (cnt = 1; cnt < ha->max_req_queues; cnt++) { ha 652 drivers/scsi/qla2xxx/qla_mid.c req = ha->req_q_map[cnt]; ha 653 drivers/scsi/qla2xxx/qla_mid.c if (req && test_bit(cnt, ha->req_qid_map)) { ha 665 drivers/scsi/qla2xxx/qla_mid.c for (cnt = 1; cnt < ha->max_rsp_queues; cnt++) { ha 666 drivers/scsi/qla2xxx/qla_mid.c rsp = ha->rsp_q_map[cnt]; ha 667 drivers/scsi/qla2xxx/qla_mid.c if (rsp && test_bit(cnt, ha->rsp_qid_map)) { ha 683 drivers/scsi/qla2xxx/qla_mid.c qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, ha 688 drivers/scsi/qla2xxx/qla_mid.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 689 drivers/scsi/qla2xxx/qla_mid.c struct scsi_qla_host *vha = pci_get_drvdata(ha->pdev); ha 702 drivers/scsi/qla2xxx/qla_mid.c req->ring = dma_alloc_coherent(&ha->pdev->dev, ha 711 drivers/scsi/qla2xxx/qla_mid.c ret = qla2x00_alloc_outstanding_cmds(ha, req); ha 715 drivers/scsi/qla2xxx/qla_mid.c mutex_lock(&ha->mq_lock); ha 716 drivers/scsi/qla2xxx/qla_mid.c que_id = find_first_zero_bit(ha->req_qid_map, ha->max_req_queues); ha 717 drivers/scsi/qla2xxx/qla_mid.c if (que_id >= ha->max_req_queues) { ha 718 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->mq_lock); ha 723 drivers/scsi/qla2xxx/qla_mid.c set_bit(que_id, ha->req_qid_map); ha 724 drivers/scsi/qla2xxx/qla_mid.c ha->req_q_map[que_id] = req; ha 738 drivers/scsi/qla2xxx/qla_mid.c req->rsp = ha->rsp_q_map[rsp_que]; ha 759 drivers/scsi/qla2xxx/qla_mid.c reg = ISP_QUE_REG(ha, que_id); ha 762 drivers/scsi/qla2xxx/qla_mid.c req->max_q_depth = ha->req_q_map[0]->max_q_depth; ha 764 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->mq_lock); ha 781 drivers/scsi/qla2xxx/qla_mid.c mutex_lock(&ha->mq_lock); ha 782 drivers/scsi/qla2xxx/qla_mid.c clear_bit(que_id, ha->req_qid_map); ha 783 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->mq_lock); ha 802 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = qpair->hw; ha 805 drivers/scsi/qla2xxx/qla_mid.c vha = pci_get_drvdata(ha->pdev); ha 813 drivers/scsi/qla2xxx/qla_mid.c qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, ha 818 drivers/scsi/qla2xxx/qla_mid.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 819 drivers/scsi/qla2xxx/qla_mid.c struct scsi_qla_host *vha = pci_get_drvdata(ha->pdev); ha 831 drivers/scsi/qla2xxx/qla_mid.c rsp->ring = dma_alloc_coherent(&ha->pdev->dev, ha 840 drivers/scsi/qla2xxx/qla_mid.c mutex_lock(&ha->mq_lock); ha 841 drivers/scsi/qla2xxx/qla_mid.c que_id = find_first_zero_bit(ha->rsp_qid_map, ha->max_rsp_queues); ha 842 drivers/scsi/qla2xxx/qla_mid.c if (que_id >= ha->max_rsp_queues) { ha 843 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->mq_lock); ha 848 drivers/scsi/qla2xxx/qla_mid.c set_bit(que_id, ha->rsp_qid_map); ha 852 drivers/scsi/qla2xxx/qla_mid.c ha->rsp_q_map[que_id] = rsp; ha 855 drivers/scsi/qla2xxx/qla_mid.c rsp->hw = ha; ha 866 drivers/scsi/qla2xxx/qla_mid.c if (!IS_MSIX_NACK_CAPABLE(ha)) ha 874 drivers/scsi/qla2xxx/qla_mid.c reg = ISP_QUE_REG(ha, que_id); ha 878 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->mq_lock); ha 888 drivers/scsi/qla2xxx/qla_mid.c ret = qla25xx_request_irq(ha, qpair, qpair->msix, ha 898 drivers/scsi/qla2xxx/qla_mid.c mutex_lock(&ha->mq_lock); ha 899 drivers/scsi/qla2xxx/qla_mid.c clear_bit(que_id, ha->rsp_qid_map); ha 900 drivers/scsi/qla2xxx/qla_mid.c mutex_unlock(&ha->mq_lock); ha 935 drivers/scsi/qla2xxx/qla_mid.c struct qla_hw_data *ha = vha->hw; ha 937 drivers/scsi/qla2xxx/qla_mid.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 944 drivers/scsi/qla2xxx/qla_mid.c if (vp_index == 0 || vp_index >= ha->max_npiv_vports) ha 53 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 54 drivers/scsi/qla2xxx/qla_mr.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 56 drivers/scsi/qla2xxx/qla_mr.c if (ha->pdev->error_state > pci_channel_io_frozen) { ha 69 drivers/scsi/qla2xxx/qla_mr.c reg = ha->iobase; ha 75 drivers/scsi/qla2xxx/qla_mr.c if (ha->flags.pci_channel_io_perm_failure) { ha 81 drivers/scsi/qla2xxx/qla_mr.c if (ha->flags.isp82xx_fw_hung) { ha 85 drivers/scsi/qla2xxx/qla_mr.c "FW hung = %d.\n", ha->flags.isp82xx_fw_hung); ha 95 drivers/scsi/qla2xxx/qla_mr.c if (!wait_for_completion_timeout(&ha->mbx_cmd_comp, mcp->tov * HZ)) { ha 103 drivers/scsi/qla2xxx/qla_mr.c ha->flags.mbox_busy = 1; ha 105 drivers/scsi/qla2xxx/qla_mr.c ha->mcp32 = mcp; ha 110 drivers/scsi/qla2xxx/qla_mr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 119 drivers/scsi/qla2xxx/qla_mr.c for (cnt = 0; cnt < ha->mbx_count; cnt++) { ha 129 drivers/scsi/qla2xxx/qla_mr.c ha->flags.mbox_int = 0; ha 130 drivers/scsi/qla2xxx/qla_mr.c clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); ha 145 drivers/scsi/qla2xxx/qla_mr.c if ((!abort_active && io_lock_on) || IS_NOPOLLING_TYPE(ha)) { ha 146 drivers/scsi/qla2xxx/qla_mr.c set_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); ha 148 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HST_INTR(ha, ha->mbx_intr_code); ha 149 drivers/scsi/qla2xxx/qla_mr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 151 drivers/scsi/qla2xxx/qla_mr.c WARN_ON_ONCE(wait_for_completion_timeout(&ha->mbx_intr_comp, ha 157 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HST_INTR(ha, ha->mbx_intr_code); ha 158 drivers/scsi/qla2xxx/qla_mr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 161 drivers/scsi/qla2xxx/qla_mr.c while (!ha->flags.mbox_int) { ha 166 drivers/scsi/qla2xxx/qla_mr.c qla2x00_poll(ha->rsp_q_map[0]); ha 168 drivers/scsi/qla2xxx/qla_mr.c if (!ha->flags.mbox_int && ha 169 drivers/scsi/qla2xxx/qla_mr.c !(IS_QLA2200(ha) && ha 179 drivers/scsi/qla2xxx/qla_mr.c if (ha->flags.mbox_int) { ha 186 drivers/scsi/qla2xxx/qla_mr.c ha->flags.mbox_int = 0; ha 187 drivers/scsi/qla2xxx/qla_mr.c clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); ha 189 drivers/scsi/qla2xxx/qla_mr.c if (ha->mailbox_out32[0] != MBS_COMMAND_COMPLETE) ha 194 drivers/scsi/qla2xxx/qla_mr.c iptr = (uint32_t *)&ha->mailbox_out32[0]; ha 196 drivers/scsi/qla2xxx/qla_mr.c for (cnt = 0; cnt < ha->mbx_count; cnt++) { ha 209 drivers/scsi/qla2xxx/qla_mr.c ha->flags.mbox_busy = 0; ha 212 drivers/scsi/qla2xxx/qla_mr.c ha->mcp32 = NULL; ha 214 drivers/scsi/qla2xxx/qla_mr.c if ((abort_active || !io_lock_on) && !IS_NOPOLLING_TYPE(ha)) { ha 219 drivers/scsi/qla2xxx/qla_mr.c qla2x00_poll(ha->rsp_q_map[0]); ha 225 drivers/scsi/qla2xxx/qla_mr.c ha->flags.eeh_busy) { ha 238 drivers/scsi/qla2xxx/qla_mr.c ha->flags.eeh_busy); ha 258 drivers/scsi/qla2xxx/qla_mr.c if (ha->isp_ops->abort_isp(vha)) { ha 272 drivers/scsi/qla2xxx/qla_mr.c complete(&ha->mbx_cmd_comp); ha 398 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 406 drivers/scsi/qla2xxx/qla_mr.c mcp->mb[2] = MSD(ha->init_cb_dma); ha 407 drivers/scsi/qla2xxx/qla_mr.c mcp->mb[3] = LSD(ha->init_cb_dma); ha 501 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 503 drivers/scsi/qla2xxx/qla_mr.c pci_set_master(ha->pdev); ha 504 drivers/scsi/qla2xxx/qla_mr.c pci_try_set_mwi(ha->pdev); ha 506 drivers/scsi/qla2xxx/qla_mr.c pci_read_config_word(ha->pdev, PCI_COMMAND, &w); ha 509 drivers/scsi/qla2xxx/qla_mr.c pci_write_config_word(ha->pdev, PCI_COMMAND, w); ha 512 drivers/scsi/qla2xxx/qla_mr.c if (pci_is_pcie(ha->pdev)) ha 513 drivers/scsi/qla2xxx/qla_mr.c pcie_set_readrq(ha->pdev, 2048); ha 515 drivers/scsi/qla2xxx/qla_mr.c ha->chip_revision = ha->pdev->revision; ha 529 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 534 drivers/scsi/qla2xxx/qla_mr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 536 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, 0x80004, 0); ha 537 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, 0x82004, 0); ha 540 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, 0x60920, 0x02); ha 541 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, 0x60924, 0x02); ha 542 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, 0xf0920, 0x02); ha 543 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, 0xf0924, 0x02); ha 546 drivers/scsi/qla2xxx/qla_mr.c reg_val = QLAFX00_GET_HBA_SOC_REG(ha, 0x60840); ha 548 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, 0x60840, reg_val); ha 550 drivers/scsi/qla2xxx/qla_mr.c reg_val = QLAFX00_GET_HBA_SOC_REG(ha, 0x60844); ha 552 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, 0x60844, reg_val); ha 554 drivers/scsi/qla2xxx/qla_mr.c reg_val = QLAFX00_GET_HBA_SOC_REG(ha, 0x60848); ha 556 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, 0x60848, reg_val); ha 558 drivers/scsi/qla2xxx/qla_mr.c reg_val = QLAFX00_GET_HBA_SOC_REG(ha, 0x6084C); ha 560 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, 0x6084C, reg_val); ha 563 drivers/scsi/qla2xxx/qla_mr.c if ((QLAFX00_GET_HBA_SOC_REG(ha, 0xd0000) & 0x10000000) == 0 && ha 564 drivers/scsi/qla2xxx/qla_mr.c (QLAFX00_GET_HBA_SOC_REG(ha, 0x10600) & 0x1) == 0) ha 571 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, ha 573 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, ha 578 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, SOC_FABRIC_RST_CONTROL_REG, (0x011f0101)); ha 581 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, 0x10610, 1); ha 582 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, 0x10600, 0); ha 586 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, ha 592 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, ha 599 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, ha 604 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, ha 608 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, SOC_FABRIC_CONTROL_REG, (0x2)); ha 609 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, SOC_FABRIC_CONFIG_REG, (0x3)); ha 612 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, SOC_FABRIC_RST_CONTROL_REG, (0x0)); ha 615 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HBA_SOC_REG(ha, SOC_SW_RST_CONTROL_REG_CORE0, (0xF00)); ha 617 drivers/scsi/qla2xxx/qla_mr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 635 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 638 drivers/scsi/qla2xxx/qla_mr.c if (unlikely(pci_channel_offline(ha->pdev) && ha 639 drivers/scsi/qla2xxx/qla_mr.c ha->flags.pci_channel_io_perm_failure)) ha 642 drivers/scsi/qla2xxx/qla_mr.c ha->isp_ops->disable_intrs(ha); ha 658 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 659 drivers/scsi/qla2xxx/qla_mr.c struct req_que *req = ha->req_q_map[0]; ha 661 drivers/scsi/qla2xxx/qla_mr.c ha->fw_transfer_size = REQUEST_ENTRY_SIZE * req->length; ha 677 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 678 drivers/scsi/qla2xxx/qla_mr.c struct device_reg_fx00 __iomem *reg = &ha->iobase->ispfx00; ha 693 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 695 drivers/scsi/qla2xxx/qla_mr.c if (pci_is_pcie(ha->pdev)) ha 703 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 705 drivers/scsi/qla2xxx/qla_mr.c snprintf(str, size, "%s", ha->mr.fw_version); ha 710 drivers/scsi/qla2xxx/qla_mr.c qlafx00_enable_intrs(struct qla_hw_data *ha) ha 714 drivers/scsi/qla2xxx/qla_mr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 715 drivers/scsi/qla2xxx/qla_mr.c ha->interrupts_on = 1; ha 716 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_ENABLE_ICNTRL_REG(ha); ha 717 drivers/scsi/qla2xxx/qla_mr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 721 drivers/scsi/qla2xxx/qla_mr.c qlafx00_disable_intrs(struct qla_hw_data *ha) ha 725 drivers/scsi/qla2xxx/qla_mr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 726 drivers/scsi/qla2xxx/qla_mr.c ha->interrupts_on = 0; ha 727 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_DISABLE_ICNTRL_REG(ha); ha 728 drivers/scsi/qla2xxx/qla_mr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 748 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 755 drivers/scsi/qla2xxx/qla_mr.c ret = ha->isp_ops->target_reset(fcport, 0, 0); ha 767 drivers/scsi/qla2xxx/qla_mr.c qlafx00_iospace_config(struct qla_hw_data *ha) ha 769 drivers/scsi/qla2xxx/qla_mr.c if (pci_request_selected_regions(ha->pdev, ha->bars, ha 771 drivers/scsi/qla2xxx/qla_mr.c ql_log_pci(ql_log_fatal, ha->pdev, 0x014e, ha 773 drivers/scsi/qla2xxx/qla_mr.c pci_name(ha->pdev)); ha 778 drivers/scsi/qla2xxx/qla_mr.c if (!(pci_resource_flags(ha->pdev, 0) & IORESOURCE_MEM)) { ha 779 drivers/scsi/qla2xxx/qla_mr.c ql_log_pci(ql_log_warn, ha->pdev, 0x014f, ha 781 drivers/scsi/qla2xxx/qla_mr.c pci_name(ha->pdev)); ha 784 drivers/scsi/qla2xxx/qla_mr.c if (pci_resource_len(ha->pdev, 0) < BAR0_LEN_FX00) { ha 785 drivers/scsi/qla2xxx/qla_mr.c ql_log_pci(ql_log_warn, ha->pdev, 0x0127, ha 787 drivers/scsi/qla2xxx/qla_mr.c pci_name(ha->pdev)); ha 791 drivers/scsi/qla2xxx/qla_mr.c ha->cregbase = ha 792 drivers/scsi/qla2xxx/qla_mr.c ioremap_nocache(pci_resource_start(ha->pdev, 0), BAR0_LEN_FX00); ha 793 drivers/scsi/qla2xxx/qla_mr.c if (!ha->cregbase) { ha 794 drivers/scsi/qla2xxx/qla_mr.c ql_log_pci(ql_log_fatal, ha->pdev, 0x0128, ha 795 drivers/scsi/qla2xxx/qla_mr.c "cannot remap MMIO (%s), aborting\n", pci_name(ha->pdev)); ha 799 drivers/scsi/qla2xxx/qla_mr.c if (!(pci_resource_flags(ha->pdev, 2) & IORESOURCE_MEM)) { ha 800 drivers/scsi/qla2xxx/qla_mr.c ql_log_pci(ql_log_warn, ha->pdev, 0x0129, ha 802 drivers/scsi/qla2xxx/qla_mr.c pci_name(ha->pdev)); ha 805 drivers/scsi/qla2xxx/qla_mr.c if (pci_resource_len(ha->pdev, 2) < BAR2_LEN_FX00) { ha 806 drivers/scsi/qla2xxx/qla_mr.c ql_log_pci(ql_log_warn, ha->pdev, 0x012a, ha 808 drivers/scsi/qla2xxx/qla_mr.c pci_name(ha->pdev)); ha 812 drivers/scsi/qla2xxx/qla_mr.c ha->iobase = ha 813 drivers/scsi/qla2xxx/qla_mr.c ioremap_nocache(pci_resource_start(ha->pdev, 2), BAR2_LEN_FX00); ha 814 drivers/scsi/qla2xxx/qla_mr.c if (!ha->iobase) { ha 815 drivers/scsi/qla2xxx/qla_mr.c ql_log_pci(ql_log_fatal, ha->pdev, 0x012b, ha 816 drivers/scsi/qla2xxx/qla_mr.c "cannot remap MMIO (%s), aborting\n", pci_name(ha->pdev)); ha 821 drivers/scsi/qla2xxx/qla_mr.c ha->max_req_queues = ha->max_rsp_queues = 1; ha 823 drivers/scsi/qla2xxx/qla_mr.c ql_log_pci(ql_log_info, ha->pdev, 0x012c, ha 825 drivers/scsi/qla2xxx/qla_mr.c ha->bars, ha->cregbase, ha->iobase); ha 836 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 837 drivers/scsi/qla2xxx/qla_mr.c struct req_que *req = ha->req_q_map[0]; ha 838 drivers/scsi/qla2xxx/qla_mr.c struct rsp_que *rsp = ha->rsp_q_map[0]; ha 862 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 863 drivers/scsi/qla2xxx/qla_mr.c struct req_que *req = ha->req_q_map[0]; ha 864 drivers/scsi/qla2xxx/qla_mr.c struct rsp_que *rsp = ha->rsp_q_map[0]; ha 865 drivers/scsi/qla2xxx/qla_mr.c dma_addr_t bar2_hdl = pci_resource_start(ha->pdev, 2); ha 867 drivers/scsi/qla2xxx/qla_mr.c req->length = ha->req_que_len; ha 868 drivers/scsi/qla2xxx/qla_mr.c req->ring = (void __force *)ha->iobase + ha->req_que_off; ha 869 drivers/scsi/qla2xxx/qla_mr.c req->dma = bar2_hdl + ha->req_que_off; ha 871 drivers/scsi/qla2xxx/qla_mr.c ql_log_pci(ql_log_info, ha->pdev, 0x012f, ha 880 drivers/scsi/qla2xxx/qla_mr.c ha->req_que_off, (u64)req->dma); ha 882 drivers/scsi/qla2xxx/qla_mr.c rsp->length = ha->rsp_que_len; ha 883 drivers/scsi/qla2xxx/qla_mr.c rsp->ring = (void __force *)ha->iobase + ha->rsp_que_off; ha 884 drivers/scsi/qla2xxx/qla_mr.c rsp->dma = bar2_hdl + ha->rsp_que_off; ha 886 drivers/scsi/qla2xxx/qla_mr.c ql_log_pci(ql_log_info, ha->pdev, 0x0131, ha 895 drivers/scsi/qla2xxx/qla_mr.c ha->rsp_que_off, (u64)rsp->dma); ha 906 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 907 drivers/scsi/qla2xxx/qla_mr.c struct device_reg_fx00 __iomem *reg = &ha->iobase->ispfx00; ha 919 drivers/scsi/qla2xxx/qla_mr.c ha->mbx_intr_code = MSW(aenmbx7); ha 920 drivers/scsi/qla2xxx/qla_mr.c ha->rqstq_intr_code = LSW(aenmbx7); ha 949 drivers/scsi/qla2xxx/qla_mr.c ha->mbx_intr_code = MSW(aenmbx7); ha 950 drivers/scsi/qla2xxx/qla_mr.c ha->rqstq_intr_code = LSW(aenmbx7); ha 951 drivers/scsi/qla2xxx/qla_mr.c ha->req_que_off = RD_REG_DWORD(®->aenmailbox1); ha 952 drivers/scsi/qla2xxx/qla_mr.c ha->rsp_que_off = RD_REG_DWORD(®->aenmailbox3); ha 953 drivers/scsi/qla2xxx/qla_mr.c ha->req_que_len = RD_REG_DWORD(®->aenmailbox5); ha 954 drivers/scsi/qla2xxx/qla_mr.c ha->rsp_que_len = RD_REG_DWORD(®->aenmailbox6); ha 960 drivers/scsi/qla2xxx/qla_mr.c ha->mbx_intr_code, ha->rqstq_intr_code); ha 961 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_CLR_INTR_REG(ha, QLAFX00_HST_INT_STS_BITS); ha 987 drivers/scsi/qla2xxx/qla_mr.c ha->mbx_intr_code = MSW(aenmbx7); ha 988 drivers/scsi/qla2xxx/qla_mr.c ha->rqstq_intr_code = LSW(aenmbx7); ha 989 drivers/scsi/qla2xxx/qla_mr.c ha->req_que_off = RD_REG_DWORD(®->initval1); ha 990 drivers/scsi/qla2xxx/qla_mr.c ha->rsp_que_off = RD_REG_DWORD(®->initval3); ha 991 drivers/scsi/qla2xxx/qla_mr.c ha->req_que_len = RD_REG_DWORD(®->initval5); ha 992 drivers/scsi/qla2xxx/qla_mr.c ha->rsp_que_len = RD_REG_DWORD(®->initval6); ha 996 drivers/scsi/qla2xxx/qla_mr.c ha->mbx_intr_code, ha->rqstq_intr_code); ha 997 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_CLR_INTR_REG(ha, QLAFX00_HST_INT_STS_BITS); ha 1126 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 1143 drivers/scsi/qla2xxx/qla_mr.c ha->gid_list, 32); ha 1150 drivers/scsi/qla2xxx/qla_mr.c for_each_set_bit(tgt_id, (void *)ha->gid_list, ha 1357 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 1361 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_hbt_en = 0; ha 1364 drivers/scsi/qla2xxx/qla_mr.c ha->flags.chip_reset_done = 0; ha 1368 drivers/scsi/qla2xxx/qla_mr.c "Performing ISP error recovery - ha = %p.\n", ha); ha 1369 drivers/scsi/qla2xxx/qla_mr.c ha->isp_ops->reset_chip(vha); ha 1389 drivers/scsi/qla2xxx/qla_mr.c if (!ha->flags.eeh_busy) { ha 1405 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_CLR_INTR_REG(ha, QLAFX00_HST_INT_STS_BITS); ha 1408 drivers/scsi/qla2xxx/qla_mr.c "%s Done done - ha=%p.\n", __func__, ha); ha 1442 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 1443 drivers/scsi/qla2xxx/qla_mr.c struct device_reg_fx00 __iomem *reg = &ha->iobase->ispfx00; ha 1446 drivers/scsi/qla2xxx/qla_mr.c qla2x00_request_irqs(ha, ha->rsp_q_map[0]); ha 1449 drivers/scsi/qla2xxx/qla_mr.c ha->mbx_intr_code = MSW(aenmbx7); ha 1450 drivers/scsi/qla2xxx/qla_mr.c ha->rqstq_intr_code = LSW(aenmbx7); ha 1451 drivers/scsi/qla2xxx/qla_mr.c ha->req_que_off = RD_REG_DWORD(®->aenmailbox1); ha 1452 drivers/scsi/qla2xxx/qla_mr.c ha->rsp_que_off = RD_REG_DWORD(®->aenmailbox3); ha 1453 drivers/scsi/qla2xxx/qla_mr.c ha->req_que_len = RD_REG_DWORD(®->aenmailbox5); ha 1454 drivers/scsi/qla2xxx/qla_mr.c ha->rsp_que_len = RD_REG_DWORD(®->aenmailbox6); ha 1459 drivers/scsi/qla2xxx/qla_mr.c ha->mbx_intr_code, ha->rqstq_intr_code, ha 1460 drivers/scsi/qla2xxx/qla_mr.c ha->req_que_off, ha->rsp_que_len); ha 1463 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_CLR_INTR_REG(ha, QLAFX00_HST_INT_STS_BITS); ha 1485 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 1488 drivers/scsi/qla2xxx/qla_mr.c struct device_reg_fx00 __iomem *reg = &ha->iobase->ispfx00; ha 1492 drivers/scsi/qla2xxx/qla_mr.c if (ha->mr.fw_hbt_cnt) ha 1493 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_hbt_cnt--; ha 1495 drivers/scsi/qla2xxx/qla_mr.c if ((!ha->flags.mr_reset_hdlr_active) && ha 1498 drivers/scsi/qla2xxx/qla_mr.c (ha->mr.fw_hbt_en)) { ha 1500 drivers/scsi/qla2xxx/qla_mr.c if (fw_heart_beat != ha->mr.old_fw_hbt_cnt) { ha 1501 drivers/scsi/qla2xxx/qla_mr.c ha->mr.old_fw_hbt_cnt = fw_heart_beat; ha 1502 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_hbt_miss_cnt = 0; ha 1504 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_hbt_miss_cnt++; ha 1505 drivers/scsi/qla2xxx/qla_mr.c if (ha->mr.fw_hbt_miss_cnt == ha 1510 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_hbt_miss_cnt = 0; ha 1514 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_hbt_cnt = QLAFX00_HEARTBEAT_INTERVAL; ha 1520 drivers/scsi/qla2xxx/qla_mr.c if (ha->mr.fw_reset_timer_exp) { ha 1523 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_reset_timer_exp = 0; ha 1529 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_reset_timer_tick = QLAFX00_RESET_INTERVAL; ha 1531 drivers/scsi/qla2xxx/qla_mr.c (!ha->mr.fw_hbt_en)) { ha 1532 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_hbt_en = 1; ha 1533 drivers/scsi/qla2xxx/qla_mr.c } else if (!ha->mr.fw_reset_timer_tick) { ha 1534 drivers/scsi/qla2xxx/qla_mr.c if (aenmbx0 == ha->mr.old_aenmbx0_state) ha 1535 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_reset_timer_exp = 1; ha 1536 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_reset_timer_tick = QLAFX00_RESET_INTERVAL; ha 1540 drivers/scsi/qla2xxx/qla_mr.c data0 = QLAFX00_RD_REG(ha, ha 1542 drivers/scsi/qla2xxx/qla_mr.c data1 = QLAFX00_RD_REG(ha, ha 1548 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_WR_REG(ha, ha 1552 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_reset_timer_tick = ha 1555 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_reset_timer_tick = ha 1558 drivers/scsi/qla2xxx/qla_mr.c if (ha->mr.old_aenmbx0_state != aenmbx0) { ha 1559 drivers/scsi/qla2xxx/qla_mr.c ha->mr.old_aenmbx0_state = aenmbx0; ha 1560 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_reset_timer_tick = QLAFX00_RESET_INTERVAL; ha 1562 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_reset_timer_tick--; ha 1569 drivers/scsi/qla2xxx/qla_mr.c if (ha->mr.fw_critemp_timer_tick == 0) { ha 1570 drivers/scsi/qla2xxx/qla_mr.c tempc = QLAFX00_GET_TEMPERATURE(ha); ha 1575 drivers/scsi/qla2xxx/qla_mr.c if (tempc < ha->mr.critical_temperature) { ha 1581 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_critemp_timer_tick = ha 1584 drivers/scsi/qla2xxx/qla_mr.c ha->mr.fw_critemp_timer_tick--; ha 1587 drivers/scsi/qla2xxx/qla_mr.c if (ha->mr.host_info_resend) { ha 1592 drivers/scsi/qla2xxx/qla_mr.c if (ha->mr.hinfo_resend_timer_tick == 0) { ha 1593 drivers/scsi/qla2xxx/qla_mr.c ha->mr.host_info_resend = false; ha 1595 drivers/scsi/qla2xxx/qla_mr.c ha->mr.hinfo_resend_timer_tick = ha 1599 drivers/scsi/qla2xxx/qla_mr.c ha->mr.hinfo_resend_timer_tick--; ha 1618 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 1626 drivers/scsi/qla2xxx/qla_mr.c ha->flags.mr_reset_hdlr_active = 1; ha 1635 drivers/scsi/qla2xxx/qla_mr.c ha->flags.mr_reset_hdlr_active = 0; ha 1652 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 1655 drivers/scsi/qla2xxx/qla_mr.c if (unlikely(pci_channel_offline(ha->pdev) && ha 1656 drivers/scsi/qla2xxx/qla_mr.c ha->flags.pci_channel_io_perm_failure)) { ha 1667 drivers/scsi/qla2xxx/qla_mr.c ha->isp_ops->reset_chip(vha); ha 1670 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_CLR_INTR_REG(ha, QLAFX00_HST_INT_STS_BITS); ha 1813 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 1868 drivers/scsi/qla2xxx/qla_mr.c fdisc->u.fxiocb.req_addr = dma_alloc_coherent(&ha->pdev->dev, ha 1885 drivers/scsi/qla2xxx/qla_mr.c ha->mr.host_info_resend = true; ha 1899 drivers/scsi/qla2xxx/qla_mr.c ha->pdev->device); ha 1921 drivers/scsi/qla2xxx/qla_mr.c fdisc->u.fxiocb.rsp_addr = dma_alloc_coherent(&ha->pdev->dev, ha 1960 drivers/scsi/qla2xxx/qla_mr.c ha->mr.extended_io_enabled = (pinfo->enabled_capabilities & ha 1997 drivers/scsi/qla2xxx/qla_mr.c dma_free_coherent(&ha->pdev->dev, fdisc->u.fxiocb.rsp_len, ha 2002 drivers/scsi/qla2xxx/qla_mr.c dma_free_coherent(&ha->pdev->dev, fdisc->u.fxiocb.req_len, ha 2024 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 2029 drivers/scsi/qla2xxx/qla_mr.c ha->flags.chip_reset_done = 0; ha 2031 drivers/scsi/qla2xxx/qla_mr.c ha->flags.pci_channel_io_perm_failure = 0; ha 2032 drivers/scsi/qla2xxx/qla_mr.c ha->flags.eeh_busy = 0; ha 2038 drivers/scsi/qla2xxx/qla_mr.c ha->isp_abort_cnt = 0; ha 2039 drivers/scsi/qla2xxx/qla_mr.c ha->beacon_blink_led = 0; ha 2041 drivers/scsi/qla2xxx/qla_mr.c set_bit(0, ha->req_qid_map); ha 2042 drivers/scsi/qla2xxx/qla_mr.c set_bit(0, ha->rsp_qid_map); ha 2047 drivers/scsi/qla2xxx/qla_mr.c rval = ha->isp_ops->pci_config(vha); ha 2068 drivers/scsi/qla2xxx/qla_mr.c rval = qla2x00_alloc_outstanding_cmds(ha, vha->req); ha 2073 drivers/scsi/qla2xxx/qla_mr.c ha->flags.chip_reset_done = 1; ha 2075 drivers/scsi/qla2xxx/qla_mr.c tempc = QLAFX00_GET_TEMPERATURE(ha); ha 2106 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = ((struct scsi_qla_host *) ha 2110 drivers/scsi/qla2xxx/qla_mr.c switch (ha->link_data_rate) { ha 2290 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 2305 drivers/scsi/qla2xxx/qla_mr.c req = ha->req_q_map[que]; ha 2415 drivers/scsi/qla2xxx/qla_mr.c if (IS_FWI2_CAPABLE(ha) || IS_QLAFX00(ha)) ha 2421 drivers/scsi/qla2xxx/qla_mr.c if ((IS_FWI2_CAPABLE(ha) || IS_QLAFX00(ha)) ha 2557 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = rsp->hw; ha 2558 drivers/scsi/qla2xxx/qla_mr.c struct scsi_qla_host *vha = pci_get_drvdata(ha->pdev); ha 2638 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 2662 drivers/scsi/qla2xxx/qla_mr.c req = ha->req_q_map[que]; ha 2693 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 2699 drivers/scsi/qla2xxx/qla_mr.c req = ha->req_q_map[que]; ha 2797 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 2801 drivers/scsi/qla2xxx/qla_mr.c reg = &ha->iobase->ispfx00; ha 2803 drivers/scsi/qla2xxx/qla_mr.c switch (ha->aenmb[0]) { ha 2806 drivers/scsi/qla2xxx/qla_mr.c "ISP System Error - mbx1=%x\n", ha->aenmb[0]); ha 2818 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[1] = RD_REG_DWORD(®->aenmailbox1); ha 2819 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[2] = RD_REG_DWORD(®->aenmailbox2); ha 2820 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[3] = RD_REG_DWORD(®->aenmailbox3); ha 2824 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[0], ha->aenmb[1], ha->aenmb[2], ha->aenmb[3]); ha 2832 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[0]); ha 2839 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[0]); ha 2846 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[0]); ha 2850 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[1] = RD_REG_WORD(®->aenmailbox1); ha 2851 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[2] = RD_REG_WORD(®->aenmailbox2); ha 2852 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[3] = RD_REG_WORD(®->aenmailbox3); ha 2853 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[4] = RD_REG_WORD(®->aenmailbox4); ha 2854 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[5] = RD_REG_WORD(®->aenmailbox5); ha 2855 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[6] = RD_REG_WORD(®->aenmailbox6); ha 2856 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[7] = RD_REG_WORD(®->aenmailbox7); ha 2859 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[0], ha->aenmb[1], ha->aenmb[2], ha->aenmb[3], ha 2860 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[4], ha->aenmb[5], ha->aenmb[6], ha->aenmb[7]); ha 2863 drivers/scsi/qla2xxx/qla_mr.c qlafx00_post_aenfx_work(vha, ha->aenmb[0], ha 2864 drivers/scsi/qla2xxx/qla_mr.c (uint32_t *)ha->aenmb, data_size); ha 2877 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 2878 drivers/scsi/qla2xxx/qla_mr.c struct device_reg_fx00 __iomem *reg = &ha->iobase->ispfx00; ha 2880 drivers/scsi/qla2xxx/qla_mr.c if (!ha->mcp32) ha 2884 drivers/scsi/qla2xxx/qla_mr.c ha->flags.mbox_int = 1; ha 2885 drivers/scsi/qla2xxx/qla_mr.c ha->mailbox_out32[0] = mb0; ha 2888 drivers/scsi/qla2xxx/qla_mr.c for (cnt = 1; cnt < ha->mbx_count; cnt++) { ha 2889 drivers/scsi/qla2xxx/qla_mr.c ha->mailbox_out32[cnt] = RD_REG_DWORD(wptr); ha 2907 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha; ha 2925 drivers/scsi/qla2xxx/qla_mr.c ha = rsp->hw; ha 2926 drivers/scsi/qla2xxx/qla_mr.c reg = &ha->iobase->ispfx00; ha 2929 drivers/scsi/qla2xxx/qla_mr.c if (unlikely(pci_channel_offline(ha->pdev))) ha 2932 drivers/scsi/qla2xxx/qla_mr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2933 drivers/scsi/qla2xxx/qla_mr.c vha = pci_get_drvdata(ha->pdev); ha 2935 drivers/scsi/qla2xxx/qla_mr.c stat = QLAFX00_RD_INTR_REG(ha); ha 2949 drivers/scsi/qla2xxx/qla_mr.c ha->aenmb[0] = RD_REG_WORD(®->aenmailbox0); ha 2958 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_CLR_INTR_REG(ha, clr_intr); ha 2959 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_RD_INTR_REG(ha); ha 2962 drivers/scsi/qla2xxx/qla_mr.c qla2x00_handle_mbx_completion(ha, status); ha 2963 drivers/scsi/qla2xxx/qla_mr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3086 drivers/scsi/qla2xxx/qla_mr.c struct qla_hw_data *ha = vha->hw; ha 3092 drivers/scsi/qla2xxx/qla_mr.c rsp = ha->rsp_q_map[0]; ha 3099 drivers/scsi/qla2xxx/qla_mr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3107 drivers/scsi/qla2xxx/qla_mr.c nseg = dma_map_sg(&ha->pdev->dev, scsi_sglist(cmd), ha 3183 drivers/scsi/qla2xxx/qla_mr.c QLAFX00_SET_HST_INTR(ha, ha->rqstq_intr_code); ha 3185 drivers/scsi/qla2xxx/qla_mr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3192 drivers/scsi/qla2xxx/qla_mr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 361 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_SET_HST_INTR(ha, value) \ ha 362 drivers/scsi/qla2xxx/qla_mr.h WRT_REG_DWORD((ha)->cregbase + QLAFX00_HST_TO_HBA_REG, \ ha 365 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_CLR_HST_INTR(ha, value) \ ha 366 drivers/scsi/qla2xxx/qla_mr.h WRT_REG_DWORD((ha)->cregbase + QLAFX00_HBA_TO_HOST_REG, \ ha 369 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_RD_INTR_REG(ha) \ ha 370 drivers/scsi/qla2xxx/qla_mr.h RD_REG_DWORD((ha)->cregbase + QLAFX00_HBA_TO_HOST_REG) ha 372 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_CLR_INTR_REG(ha, value) \ ha 373 drivers/scsi/qla2xxx/qla_mr.h WRT_REG_DWORD((ha)->cregbase + QLAFX00_HBA_TO_HOST_REG, \ ha 376 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_SET_HBA_SOC_REG(ha, off, val)\ ha 377 drivers/scsi/qla2xxx/qla_mr.h WRT_REG_DWORD((ha)->cregbase + off, val) ha 379 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_GET_HBA_SOC_REG(ha, off)\ ha 380 drivers/scsi/qla2xxx/qla_mr.h RD_REG_DWORD((ha)->cregbase + off) ha 382 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_HBA_RST_REG(ha, val)\ ha 383 drivers/scsi/qla2xxx/qla_mr.h WRT_REG_DWORD((ha)->cregbase + QLAFX00_HST_RST_REG, val) ha 385 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_RD_ICNTRL_REG(ha) \ ha 386 drivers/scsi/qla2xxx/qla_mr.h RD_REG_DWORD((ha)->cregbase + QLAFX00_HBA_ICNTRL_REG) ha 388 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_ENABLE_ICNTRL_REG(ha) \ ha 389 drivers/scsi/qla2xxx/qla_mr.h WRT_REG_DWORD((ha)->cregbase + QLAFX00_HBA_ICNTRL_REG, \ ha 390 drivers/scsi/qla2xxx/qla_mr.h (QLAFX00_GET_HBA_SOC_REG(ha, QLAFX00_HBA_ICNTRL_REG) | \ ha 393 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_DISABLE_ICNTRL_REG(ha) \ ha 394 drivers/scsi/qla2xxx/qla_mr.h WRT_REG_DWORD((ha)->cregbase + QLAFX00_HBA_ICNTRL_REG, \ ha 395 drivers/scsi/qla2xxx/qla_mr.h (QLAFX00_GET_HBA_SOC_REG(ha, QLAFX00_HBA_ICNTRL_REG) & \ ha 398 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_RD_REG(ha, off) \ ha 399 drivers/scsi/qla2xxx/qla_mr.h RD_REG_DWORD((ha)->cregbase + off) ha 401 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_WR_REG(ha, off, val) \ ha 402 drivers/scsi/qla2xxx/qla_mr.h WRT_REG_DWORD((ha)->cregbase + off, val) ha 506 drivers/scsi/qla2xxx/qla_mr.h #define QLAFX00_GET_TEMPERATURE(ha) ((3153000 - (10000 * \ ha 507 drivers/scsi/qla2xxx/qla_mr.h ((QLAFX00_RD_REG(ha, QLAFX00_SOC_TEMP_REG) & 0x3FE) >> 1))) / 13825) ha 84 drivers/scsi/qla2xxx/qla_nvme.c struct qla_hw_data *ha; ha 91 drivers/scsi/qla2xxx/qla_nvme.c ha = vha->hw; ha 104 drivers/scsi/qla2xxx/qla_nvme.c if (ha->queue_pair_map[qidx]) { ha 105 drivers/scsi/qla2xxx/qla_nvme.c *handle = ha->queue_pair_map[qidx]; ha 215 drivers/scsi/qla2xxx/qla_nvme.c struct qla_hw_data *ha = fcport->vha->hw; ha 222 drivers/scsi/qla2xxx/qla_nvme.c if (!ha->flags.fw_started && fcport->deleted) ha 225 drivers/scsi/qla2xxx/qla_nvme.c if (ha->flags.host_shutting_down) { ha 233 drivers/scsi/qla2xxx/qla_nvme.c rval = ha->isp_ops->abort_command(sp); ha 276 drivers/scsi/qla2xxx/qla_nvme.c struct qla_hw_data *ha; ha 284 drivers/scsi/qla2xxx/qla_nvme.c ha = vha->hw; ha 286 drivers/scsi/qla2xxx/qla_nvme.c if (!ha->flags.fw_started) ha 311 drivers/scsi/qla2xxx/qla_nvme.c nvme->u.nvme.cmd_dma = dma_map_single(&ha->pdev->dev, fd->rqstaddr, ha 313 drivers/scsi/qla2xxx/qla_nvme.c dma_sync_single_for_device(&ha->pdev->dev, nvme->u.nvme.cmd_dma, ha 365 drivers/scsi/qla2xxx/qla_nvme.c struct qla_hw_data *ha = vha->hw; ha 386 drivers/scsi/qla2xxx/qla_nvme.c cnt = IS_SHADOW_REG_CAPABLE(ha) ? *req->out_ptr : ha 405 drivers/scsi/qla2xxx/qla_nvme.c atomic_inc(&ha->nvme_active_aen_cnt); ha 678 drivers/scsi/qla2xxx/qla_nvme.c struct qla_hw_data *ha; ha 685 drivers/scsi/qla2xxx/qla_nvme.c ha = vha->hw; ha 689 drivers/scsi/qla2xxx/qla_nvme.c WARN_ON(ha->max_req_queues < 3); ha 693 drivers/scsi/qla2xxx/qla_nvme.c (uint8_t)(ha->max_req_queues - 2)); ha 706 drivers/scsi/qla2xxx/qla_nvme.c get_device(&ha->pdev->dev), &vha->nvme_local_port); ha 361 drivers/scsi/qla2xxx/qla_nx.c qla82xx_pci_set_crbwindow_2M(struct qla_hw_data *ha, ulong off_in, ha 365 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 367 drivers/scsi/qla2xxx/qla_nx.c ha->crb_win = CRB_HI(off_in); ha 368 drivers/scsi/qla2xxx/qla_nx.c writel(ha->crb_win, CRB_WINDOW_2M + ha->nx_pcibase); ha 373 drivers/scsi/qla2xxx/qla_nx.c win_read = RD_REG_DWORD(CRB_WINDOW_2M + ha->nx_pcibase); ha 374 drivers/scsi/qla2xxx/qla_nx.c if (win_read != ha->crb_win) { ha 378 drivers/scsi/qla2xxx/qla_nx.c __func__, ha->crb_win, win_read, off_in); ha 380 drivers/scsi/qla2xxx/qla_nx.c *off_out = (off_in & MASK(16)) + CRB_INDIRECT_2M + ha->nx_pcibase; ha 384 drivers/scsi/qla2xxx/qla_nx.c qla82xx_pci_set_crbwindow(struct qla_hw_data *ha, u64 off) ha 386 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 397 drivers/scsi/qla2xxx/qla_nx.c if (ha->curr_window != 0) ha 406 drivers/scsi/qla2xxx/qla_nx.c if (ha->curr_window != 1) ha 425 drivers/scsi/qla2xxx/qla_nx.c qla82xx_pci_get_crb_addr_2M(struct qla_hw_data *ha, ulong off_in, ha 435 drivers/scsi/qla2xxx/qla_nx.c QLA82XX_PCI_CAMQM_2M_BASE + ha->nx_pcibase; ha 448 drivers/scsi/qla2xxx/qla_nx.c *off_out = off_in + m->start_2M - m->start_128M + ha->nx_pcibase; ha 457 drivers/scsi/qla2xxx/qla_nx.c static int qla82xx_crb_win_lock(struct qla_hw_data *ha) ha 463 drivers/scsi/qla2xxx/qla_nx.c done = qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM7_LOCK)); ha 470 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_WIN_LOCK_ID, ha->portnum); ha 475 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(struct qla_hw_data *ha, ulong off_in, u32 data) ha 481 drivers/scsi/qla2xxx/qla_nx.c rv = qla82xx_pci_get_crb_addr_2M(ha, off_in, &off); ha 487 drivers/scsi/qla2xxx/qla_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 489 drivers/scsi/qla2xxx/qla_nx.c qla82xx_crb_win_lock(ha); ha 490 drivers/scsi/qla2xxx/qla_nx.c qla82xx_pci_set_crbwindow_2M(ha, off_in, &off); ha 496 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM7_UNLOCK)); ha 498 drivers/scsi/qla2xxx/qla_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 505 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(struct qla_hw_data *ha, ulong off_in) ha 512 drivers/scsi/qla2xxx/qla_nx.c rv = qla82xx_pci_get_crb_addr_2M(ha, off_in, &off); ha 518 drivers/scsi/qla2xxx/qla_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 520 drivers/scsi/qla2xxx/qla_nx.c qla82xx_crb_win_lock(ha); ha 521 drivers/scsi/qla2xxx/qla_nx.c qla82xx_pci_set_crbwindow_2M(ha, off_in, &off); ha 526 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM7_UNLOCK)); ha 528 drivers/scsi/qla2xxx/qla_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 535 drivers/scsi/qla2xxx/qla_nx.c int qla82xx_idc_lock(struct qla_hw_data *ha) ha 542 drivers/scsi/qla2xxx/qla_nx.c done = qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM5_LOCK)); ha 562 drivers/scsi/qla2xxx/qla_nx.c void qla82xx_idc_unlock(struct qla_hw_data *ha) ha 564 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM5_UNLOCK)); ha 572 drivers/scsi/qla2xxx/qla_nx.c qla82xx_pci_mem_bound_check(struct qla_hw_data *ha, ha 588 drivers/scsi/qla2xxx/qla_nx.c qla82xx_pci_set_window(struct qla_hw_data *ha, unsigned long long addr) ha 592 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 598 drivers/scsi/qla2xxx/qla_nx.c ha->ddr_mn_window = window; ha 599 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, ha 600 drivers/scsi/qla2xxx/qla_nx.c ha->mn_win_crb | QLA82XX_PCI_CRBSPACE, window); ha 601 drivers/scsi/qla2xxx/qla_nx.c win_read = qla82xx_rd_32(ha, ha 602 drivers/scsi/qla2xxx/qla_nx.c ha->mn_win_crb | QLA82XX_PCI_CRBSPACE); ha 619 drivers/scsi/qla2xxx/qla_nx.c ha->ddr_mn_window = window; ha 620 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, ha 621 drivers/scsi/qla2xxx/qla_nx.c ha->mn_win_crb | QLA82XX_PCI_CRBSPACE, window); ha 622 drivers/scsi/qla2xxx/qla_nx.c win_read = qla82xx_rd_32(ha, ha 623 drivers/scsi/qla2xxx/qla_nx.c ha->mn_win_crb | QLA82XX_PCI_CRBSPACE); ha 637 drivers/scsi/qla2xxx/qla_nx.c ha->qdr_sn_window = window; ha 638 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, ha 639 drivers/scsi/qla2xxx/qla_nx.c ha->ms_win_crb | QLA82XX_PCI_CRBSPACE, window); ha 640 drivers/scsi/qla2xxx/qla_nx.c win_read = qla82xx_rd_32(ha, ha 641 drivers/scsi/qla2xxx/qla_nx.c ha->ms_win_crb | QLA82XX_PCI_CRBSPACE); ha 665 drivers/scsi/qla2xxx/qla_nx.c static int qla82xx_pci_is_same_window(struct qla_hw_data *ha, ha 686 drivers/scsi/qla2xxx/qla_nx.c if (ha->qdr_sn_window == window) ha 692 drivers/scsi/qla2xxx/qla_nx.c static int qla82xx_pci_mem_read_direct(struct qla_hw_data *ha, ha 702 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 704 drivers/scsi/qla2xxx/qla_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 710 drivers/scsi/qla2xxx/qla_nx.c start = qla82xx_pci_set_window(ha, off); ha 712 drivers/scsi/qla2xxx/qla_nx.c (qla82xx_pci_is_same_window(ha, off + size - 1) == 0)) { ha 713 drivers/scsi/qla2xxx/qla_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 721 drivers/scsi/qla2xxx/qla_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 722 drivers/scsi/qla2xxx/qla_nx.c mem_base = pci_resource_start(ha->pdev, 0); ha 737 drivers/scsi/qla2xxx/qla_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 756 drivers/scsi/qla2xxx/qla_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 764 drivers/scsi/qla2xxx/qla_nx.c qla82xx_pci_mem_write_direct(struct qla_hw_data *ha, ha 774 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 776 drivers/scsi/qla2xxx/qla_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 782 drivers/scsi/qla2xxx/qla_nx.c start = qla82xx_pci_set_window(ha, off); ha 784 drivers/scsi/qla2xxx/qla_nx.c (qla82xx_pci_is_same_window(ha, off + size - 1) == 0)) { ha 785 drivers/scsi/qla2xxx/qla_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 793 drivers/scsi/qla2xxx/qla_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 794 drivers/scsi/qla2xxx/qla_nx.c mem_base = pci_resource_start(ha->pdev, 0); ha 808 drivers/scsi/qla2xxx/qla_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 827 drivers/scsi/qla2xxx/qla_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 862 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_lock(struct qla_hw_data *ha) ha 866 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 870 drivers/scsi/qla2xxx/qla_nx.c done = qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM2_LOCK)); ha 874 drivers/scsi/qla2xxx/qla_nx.c lock_owner = qla82xx_rd_32(ha, QLA82XX_ROM_LOCK_ID); ha 877 drivers/scsi/qla2xxx/qla_nx.c __func__, ha->portnum, lock_owner); ha 882 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROM_LOCK_ID, ha->portnum); ha 887 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_unlock(struct qla_hw_data *ha) ha 889 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROM_LOCK_ID, 0xffffffff); ha 890 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM2_UNLOCK)); ha 894 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wait_rom_busy(struct qla_hw_data *ha) ha 898 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 901 drivers/scsi/qla2xxx/qla_nx.c done = qla82xx_rd_32(ha, QLA82XX_ROMUSB_GLB_STATUS); ha 915 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wait_rom_done(struct qla_hw_data *ha) ha 919 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 922 drivers/scsi/qla2xxx/qla_nx.c done = qla82xx_rd_32(ha, QLA82XX_ROMUSB_GLB_STATUS); ha 936 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(struct qla_hw_data *ha, uint32_t off, u32 data, uint8_t flag) ha 940 drivers/scsi/qla2xxx/qla_nx.c WRT_REG_DWORD(CRB_WINDOW_2M + ha->nx_pcibase, off & 0xFFFF0000); ha 943 drivers/scsi/qla2xxx/qla_nx.c RD_REG_DWORD(CRB_WINDOW_2M + ha->nx_pcibase); ha 947 drivers/scsi/qla2xxx/qla_nx.c WRT_REG_DWORD(off_value + CRB_INDIRECT_2M + ha->nx_pcibase, ha 951 drivers/scsi/qla2xxx/qla_nx.c ha->nx_pcibase); ha 957 drivers/scsi/qla2xxx/qla_nx.c qla82xx_do_rom_fast_read(struct qla_hw_data *ha, int addr, int *valp) ha 960 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, MD_DIRECT_ROM_WINDOW, (addr & 0xFFFF0000), 1); ha 961 drivers/scsi/qla2xxx/qla_nx.c *valp = qla82xx_md_rw_32(ha, MD_DIRECT_ROM_READ_BASE + ha 968 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_fast_read(struct qla_hw_data *ha, int addr, int *valp) ha 972 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 974 drivers/scsi/qla2xxx/qla_nx.c while ((qla82xx_rom_lock(ha) != 0) && (loops < 50000)) { ha 980 drivers/scsi/qla2xxx/qla_nx.c lock_owner = qla82xx_rd_32(ha, QLA82XX_ROM_LOCK_ID); ha 986 drivers/scsi/qla2xxx/qla_nx.c ret = qla82xx_do_rom_fast_read(ha, addr, valp); ha 987 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_unlock(ha); ha 992 drivers/scsi/qla2xxx/qla_nx.c qla82xx_read_status_reg(struct qla_hw_data *ha, uint32_t *val) ha 994 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 996 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_INSTR_OPCODE, M25P_INSTR_RDSR); ha 997 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wait_rom_busy(ha); ha 998 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_wait_rom_done(ha)) { ha 1003 drivers/scsi/qla2xxx/qla_nx.c *val = qla82xx_rd_32(ha, QLA82XX_ROMUSB_ROM_RDATA); ha 1008 drivers/scsi/qla2xxx/qla_nx.c qla82xx_flash_wait_write_finish(struct qla_hw_data *ha) ha 1014 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 1016 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_ABYTE_CNT, 0); ha 1018 drivers/scsi/qla2xxx/qla_nx.c ret = qla82xx_read_status_reg(ha, &val); ha 1033 drivers/scsi/qla2xxx/qla_nx.c qla82xx_flash_set_write_enable(struct qla_hw_data *ha) ha 1037 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wait_rom_busy(ha); ha 1038 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_ABYTE_CNT, 0); ha 1039 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_INSTR_OPCODE, M25P_INSTR_WREN); ha 1040 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wait_rom_busy(ha); ha 1041 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_wait_rom_done(ha)) ha 1043 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_read_status_reg(ha, &val) != 0) ha 1051 drivers/scsi/qla2xxx/qla_nx.c qla82xx_write_status_reg(struct qla_hw_data *ha, uint32_t val) ha 1053 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 1055 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_flash_set_write_enable(ha)) ha 1057 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_WDATA, val); ha 1058 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_INSTR_OPCODE, 0x1); ha 1059 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_wait_rom_done(ha)) { ha 1064 drivers/scsi/qla2xxx/qla_nx.c return qla82xx_flash_wait_write_finish(ha); ha 1068 drivers/scsi/qla2xxx/qla_nx.c qla82xx_write_disable_flash(struct qla_hw_data *ha) ha 1070 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 1072 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_INSTR_OPCODE, M25P_INSTR_WRDI); ha 1073 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_wait_rom_done(ha)) { ha 1082 drivers/scsi/qla2xxx/qla_nx.c ql82xx_rom_lock_d(struct qla_hw_data *ha) ha 1086 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 1088 drivers/scsi/qla2xxx/qla_nx.c while ((qla82xx_rom_lock(ha) != 0) && (loops < 50000)) { ha 1094 drivers/scsi/qla2xxx/qla_nx.c lock_owner = qla82xx_rd_32(ha, QLA82XX_ROM_LOCK_ID); ha 1103 drivers/scsi/qla2xxx/qla_nx.c qla82xx_write_flash_dword(struct qla_hw_data *ha, uint32_t flashaddr, ha 1107 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 1109 drivers/scsi/qla2xxx/qla_nx.c ret = ql82xx_rom_lock_d(ha); ha 1116 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_flash_set_write_enable(ha)) ha 1119 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_WDATA, data); ha 1120 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_ADDRESS, flashaddr); ha 1121 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_ABYTE_CNT, 3); ha 1122 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_INSTR_OPCODE, M25P_INSTR_PP); ha 1123 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wait_rom_busy(ha); ha 1124 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_wait_rom_done(ha)) { ha 1131 drivers/scsi/qla2xxx/qla_nx.c ret = qla82xx_flash_wait_write_finish(ha); ha 1134 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_unlock(ha); ha 1149 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 1157 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_lock(ha); ha 1160 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_I2Q + 0x10, 0x0); ha 1161 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_I2Q + 0x14, 0x0); ha 1162 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_I2Q + 0x18, 0x0); ha 1163 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_I2Q + 0x1c, 0x0); ha 1164 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_I2Q + 0x20, 0x0); ha 1165 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_I2Q + 0x24, 0x0); ha 1168 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x40, 0xff); ha 1170 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x70000, 0x00); ha 1172 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x80000, 0x00); ha 1174 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x90000, 0x00); ha 1176 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_NIU + 0xa0000, 0x00); ha 1178 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_NIU + 0xb0000, 0x00); ha 1181 drivers/scsi/qla2xxx/qla_nx.c val = qla82xx_rd_32(ha, QLA82XX_CRB_SRE + 0x1000); ha 1182 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_SRE + 0x1000, val & (~(0x1))); ha 1185 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_EPG + 0x1300, 0x1); ha 1188 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x0, 0x0); ha 1189 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x8, 0x0); ha 1190 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x10, 0x0); ha 1191 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x18, 0x0); ha 1192 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x100, 0x0); ha 1193 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x200, 0x0); ha 1196 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_0 + 0x3c, 1); ha 1197 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_1 + 0x3c, 1); ha 1198 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_2 + 0x3c, 1); ha 1199 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_3 + 0x3c, 1); ha 1200 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_4 + 0x3c, 1); ha 1206 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xfeffffff); ha 1208 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xffffffff); ha 1209 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_unlock(ha); ha 1216 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_rom_fast_read(ha, 0, &n) != 0 || n != 0xcafecafeUL || ha 1217 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_fast_read(ha, 4, &n) != 0) { ha 1247 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_rom_fast_read(ha, 8*i + 4*offset, &val) != 0 || ha 1248 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_fast_read(ha, 8*i + 4*offset + 4, &addr) != 0) { ha 1298 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, off, buf[i].data); ha 1315 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_D+0xec, 0x1e); ha 1316 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_D+0x4c, 8); ha 1317 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_I+0x4c, 8); ha 1320 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_0+0x8, 0); ha 1321 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_0+0xc, 0); ha 1322 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_1+0x8, 0); ha 1323 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_1+0xc, 0); ha 1324 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_2+0x8, 0); ha 1325 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_2+0xc, 0); ha 1326 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_3+0x8, 0); ha 1327 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_3+0xc, 0); ha 1332 drivers/scsi/qla2xxx/qla_nx.c qla82xx_pci_mem_write_2M(struct qla_hw_data *ha, ha 1347 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_pci_mem_bound_check(ha, off, size) == 0) ha 1348 drivers/scsi/qla2xxx/qla_nx.c return qla82xx_pci_mem_write_direct(ha, ha 1363 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_pci_mem_read_2M(ha, off8 + ha 1398 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, mem_crb+MIU_TEST_AGT_ADDR_LO, temp); ha 1400 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, mem_crb+MIU_TEST_AGT_ADDR_HI, temp); ha 1402 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, mem_crb+MIU_TEST_AGT_WRDATA_LO, temp); ha 1404 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, mem_crb+MIU_TEST_AGT_WRDATA_HI, temp); ha 1406 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, mem_crb + ha 1409 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, mem_crb + ha 1413 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, mem_crb + MIU_TEST_AGT_CTRL, temp); ha 1415 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, mem_crb + MIU_TEST_AGT_CTRL, temp); ha 1418 drivers/scsi/qla2xxx/qla_nx.c temp = qla82xx_rd_32(ha, mem_crb + MIU_TEST_AGT_CTRL); ha 1425 drivers/scsi/qla2xxx/qla_nx.c dev_err(&ha->pdev->dev, ha 1436 drivers/scsi/qla2xxx/qla_nx.c qla82xx_fw_load_from_flash(struct qla_hw_data *ha) ha 1440 drivers/scsi/qla2xxx/qla_nx.c long flashaddr = ha->flt_region_bootload << 2; ha 1448 drivers/scsi/qla2xxx/qla_nx.c if ((qla82xx_rom_fast_read(ha, flashaddr, (int *)&low)) || ha 1449 drivers/scsi/qla2xxx/qla_nx.c (qla82xx_rom_fast_read(ha, flashaddr + 4, (int *)&high))) { ha 1453 drivers/scsi/qla2xxx/qla_nx.c qla82xx_pci_mem_write_2M(ha, memaddr, &data, 8); ha 1461 drivers/scsi/qla2xxx/qla_nx.c read_lock(&ha->hw_lock); ha 1462 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_0 + 0x18, 0x1020); ha 1463 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0x80001e); ha 1464 drivers/scsi/qla2xxx/qla_nx.c read_unlock(&ha->hw_lock); ha 1469 drivers/scsi/qla2xxx/qla_nx.c qla82xx_pci_mem_read_2M(struct qla_hw_data *ha, ha 1485 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_pci_mem_bound_check(ha, off, size) == 0) ha 1486 drivers/scsi/qla2xxx/qla_nx.c return qla82xx_pci_mem_read_direct(ha, ha 1500 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, mem_crb + MIU_TEST_AGT_ADDR_LO, temp); ha 1502 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, mem_crb + MIU_TEST_AGT_ADDR_HI, temp); ha 1504 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, mem_crb + MIU_TEST_AGT_CTRL, temp); ha 1506 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, mem_crb + MIU_TEST_AGT_CTRL, temp); ha 1509 drivers/scsi/qla2xxx/qla_nx.c temp = qla82xx_rd_32(ha, mem_crb + MIU_TEST_AGT_CTRL); ha 1516 drivers/scsi/qla2xxx/qla_nx.c dev_err(&ha->pdev->dev, ha 1524 drivers/scsi/qla2xxx/qla_nx.c temp = qla82xx_rd_32(ha, ha 1581 drivers/scsi/qla2xxx/qla_nx.c qla82xx_get_data_desc(struct qla_hw_data *ha, ha 1584 drivers/scsi/qla2xxx/qla_nx.c const u8 *unirom = ha->hablob->fw->data; ha 1585 drivers/scsi/qla2xxx/qla_nx.c int idx = cpu_to_le32(*((int *)&unirom[ha->file_prd_off] + idx_offset)); ha 1600 drivers/scsi/qla2xxx/qla_nx.c qla82xx_get_bootld_offset(struct qla_hw_data *ha) ha 1605 drivers/scsi/qla2xxx/qla_nx.c if (ha->fw_type == QLA82XX_UNIFIED_ROMIMAGE) { ha 1606 drivers/scsi/qla2xxx/qla_nx.c uri_desc = qla82xx_get_data_desc(ha, ha 1612 drivers/scsi/qla2xxx/qla_nx.c return (u8 *)&ha->hablob->fw->data[offset]; ha 1615 drivers/scsi/qla2xxx/qla_nx.c static u32 qla82xx_get_fw_size(struct qla_hw_data *ha) ha 1619 drivers/scsi/qla2xxx/qla_nx.c if (ha->fw_type == QLA82XX_UNIFIED_ROMIMAGE) { ha 1620 drivers/scsi/qla2xxx/qla_nx.c uri_desc = qla82xx_get_data_desc(ha, QLA82XX_URI_DIR_SECT_FW, ha 1626 drivers/scsi/qla2xxx/qla_nx.c return get_unaligned_le32(&ha->hablob->fw->data[FW_SIZE_OFFSET]); ha 1630 drivers/scsi/qla2xxx/qla_nx.c qla82xx_get_fw_offs(struct qla_hw_data *ha) ha 1635 drivers/scsi/qla2xxx/qla_nx.c if (ha->fw_type == QLA82XX_UNIFIED_ROMIMAGE) { ha 1636 drivers/scsi/qla2xxx/qla_nx.c uri_desc = qla82xx_get_data_desc(ha, QLA82XX_URI_DIR_SECT_FW, ha 1642 drivers/scsi/qla2xxx/qla_nx.c return (u8 *)&ha->hablob->fw->data[offset]; ha 1665 drivers/scsi/qla2xxx/qla_nx.c qla82xx_iospace_config(struct qla_hw_data *ha) ha 1669 drivers/scsi/qla2xxx/qla_nx.c if (pci_request_regions(ha->pdev, QLA2XXX_DRIVER_NAME)) { ha 1670 drivers/scsi/qla2xxx/qla_nx.c ql_log_pci(ql_log_fatal, ha->pdev, 0x000c, ha 1676 drivers/scsi/qla2xxx/qla_nx.c if (!(pci_resource_flags(ha->pdev, 0) & IORESOURCE_MEM)) { ha 1677 drivers/scsi/qla2xxx/qla_nx.c ql_log_pci(ql_log_fatal, ha->pdev, 0x000d, ha 1682 drivers/scsi/qla2xxx/qla_nx.c len = pci_resource_len(ha->pdev, 0); ha 1683 drivers/scsi/qla2xxx/qla_nx.c ha->nx_pcibase = ioremap(pci_resource_start(ha->pdev, 0), len); ha 1684 drivers/scsi/qla2xxx/qla_nx.c if (!ha->nx_pcibase) { ha 1685 drivers/scsi/qla2xxx/qla_nx.c ql_log_pci(ql_log_fatal, ha->pdev, 0x000e, ha 1691 drivers/scsi/qla2xxx/qla_nx.c if (IS_QLA8044(ha)) { ha 1692 drivers/scsi/qla2xxx/qla_nx.c ha->iobase = ha->nx_pcibase; ha 1693 drivers/scsi/qla2xxx/qla_nx.c } else if (IS_QLA82XX(ha)) { ha 1694 drivers/scsi/qla2xxx/qla_nx.c ha->iobase = ha->nx_pcibase + 0xbc000 + (ha->pdev->devfn << 11); ha 1698 drivers/scsi/qla2xxx/qla_nx.c ha->nxdb_wr_ptr = ioremap((pci_resource_start(ha->pdev, 4) + ha 1699 drivers/scsi/qla2xxx/qla_nx.c (ha->pdev->devfn << 12)), 4); ha 1700 drivers/scsi/qla2xxx/qla_nx.c if (!ha->nxdb_wr_ptr) { ha 1701 drivers/scsi/qla2xxx/qla_nx.c ql_log_pci(ql_log_fatal, ha->pdev, 0x000f, ha 1709 drivers/scsi/qla2xxx/qla_nx.c ha->nxdb_rd_ptr = ha->nx_pcibase + (512 * 1024) + ha 1710 drivers/scsi/qla2xxx/qla_nx.c (ha->pdev->devfn * 8); ha 1712 drivers/scsi/qla2xxx/qla_nx.c ha->nxdb_wr_ptr = (void __iomem *)(ha->pdev->devfn == 6 ? ha 1717 drivers/scsi/qla2xxx/qla_nx.c ha->max_req_queues = ha->max_rsp_queues = 1; ha 1718 drivers/scsi/qla2xxx/qla_nx.c ha->msix_count = ha->max_rsp_queues + 1; ha 1719 drivers/scsi/qla2xxx/qla_nx.c ql_dbg_pci(ql_dbg_multiq, ha->pdev, 0xc006, ha 1722 drivers/scsi/qla2xxx/qla_nx.c ha->nx_pcibase, ha->iobase, ha 1723 drivers/scsi/qla2xxx/qla_nx.c ha->max_req_queues, ha->msix_count); ha 1724 drivers/scsi/qla2xxx/qla_nx.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0010, ha 1727 drivers/scsi/qla2xxx/qla_nx.c ha->nx_pcibase, ha->iobase, ha 1728 drivers/scsi/qla2xxx/qla_nx.c ha->max_req_queues, ha->msix_count); ha 1748 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 1751 drivers/scsi/qla2xxx/qla_nx.c pci_set_master(ha->pdev); ha 1752 drivers/scsi/qla2xxx/qla_nx.c ret = pci_set_mwi(ha->pdev); ha 1753 drivers/scsi/qla2xxx/qla_nx.c ha->chip_revision = ha->pdev->revision; ha 1756 drivers/scsi/qla2xxx/qla_nx.c ha->chip_revision, ret); ha 1769 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 1771 drivers/scsi/qla2xxx/qla_nx.c ha->isp_ops->disable_intrs(ha); ha 1778 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 1779 drivers/scsi/qla2xxx/qla_nx.c struct device_reg_82xx __iomem *reg = &ha->iobase->isp82; ha 1781 drivers/scsi/qla2xxx/qla_nx.c struct req_que *req = ha->req_q_map[0]; ha 1782 drivers/scsi/qla2xxx/qla_nx.c struct rsp_que *rsp = ha->rsp_q_map[0]; ha 1785 drivers/scsi/qla2xxx/qla_nx.c icb = (struct init_cb_81xx *)ha->init_cb; ha 1799 drivers/scsi/qla2xxx/qla_nx.c qla82xx_fw_load_from_blob(struct qla_hw_data *ha) ha 1807 drivers/scsi/qla2xxx/qla_nx.c ptr64 = (u64 *)qla82xx_get_bootld_offset(ha); ha 1812 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_pci_mem_write_2M(ha, flashaddr, &data, 8)) ha 1818 drivers/scsi/qla2xxx/qla_nx.c size = qla82xx_get_fw_size(ha) / 8; ha 1819 drivers/scsi/qla2xxx/qla_nx.c ptr64 = (u64 *)qla82xx_get_fw_offs(ha); ha 1824 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_pci_mem_write_2M(ha, flashaddr, &data, 8)) ha 1835 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CAM_RAM(0x1fc), QLA82XX_BDINFO_MAGIC); ha 1837 drivers/scsi/qla2xxx/qla_nx.c read_lock(&ha->hw_lock); ha 1838 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_0 + 0x18, 0x1020); ha 1839 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0x80001e); ha 1840 drivers/scsi/qla2xxx/qla_nx.c read_unlock(&ha->hw_lock); ha 1845 drivers/scsi/qla2xxx/qla_nx.c qla82xx_set_product_offset(struct qla_hw_data *ha) ha 1848 drivers/scsi/qla2xxx/qla_nx.c const uint8_t *unirom = ha->hablob->fw->data; ha 1852 drivers/scsi/qla2xxx/qla_nx.c uint8_t chiprev = ha->chip_revision; ha 1875 drivers/scsi/qla2xxx/qla_nx.c ha->file_prd_off = offset; ha 1887 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 1888 drivers/scsi/qla2xxx/qla_nx.c const struct firmware *fw = ha->hablob->fw; ha 1890 drivers/scsi/qla2xxx/qla_nx.c ha->fw_type = fw_type; ha 1893 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_set_product_offset(ha)) ha 1911 drivers/scsi/qla2xxx/qla_nx.c qla82xx_check_cmdpeg_state(struct qla_hw_data *ha) ha 1915 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 1918 drivers/scsi/qla2xxx/qla_nx.c read_lock(&ha->hw_lock); ha 1919 drivers/scsi/qla2xxx/qla_nx.c val = qla82xx_rd_32(ha, CRB_CMDPEG_STATE); ha 1920 drivers/scsi/qla2xxx/qla_nx.c read_unlock(&ha->hw_lock); ha 1942 drivers/scsi/qla2xxx/qla_nx.c val = qla82xx_rd_32(ha, QLA82XX_ROMUSB_GLB_PEGTUNE_DONE); ha 1943 drivers/scsi/qla2xxx/qla_nx.c read_lock(&ha->hw_lock); ha 1944 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, CRB_CMDPEG_STATE, PHAN_INITIALIZE_FAILED); ha 1945 drivers/scsi/qla2xxx/qla_nx.c read_unlock(&ha->hw_lock); ha 1950 drivers/scsi/qla2xxx/qla_nx.c qla82xx_check_rcvpeg_state(struct qla_hw_data *ha) ha 1954 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 1957 drivers/scsi/qla2xxx/qla_nx.c read_lock(&ha->hw_lock); ha 1958 drivers/scsi/qla2xxx/qla_nx.c val = qla82xx_rd_32(ha, CRB_RCVPEG_STATE); ha 1959 drivers/scsi/qla2xxx/qla_nx.c read_unlock(&ha->hw_lock); ha 1980 drivers/scsi/qla2xxx/qla_nx.c read_lock(&ha->hw_lock); ha 1981 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, CRB_RCVPEG_STATE, PHAN_INITIALIZE_FAILED); ha 1982 drivers/scsi/qla2xxx/qla_nx.c read_unlock(&ha->hw_lock); ha 2000 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 2001 drivers/scsi/qla2xxx/qla_nx.c struct device_reg_82xx __iomem *reg = &ha->iobase->isp82; ha 2006 drivers/scsi/qla2xxx/qla_nx.c ha->flags.mbox_int = 1; ha 2007 drivers/scsi/qla2xxx/qla_nx.c ha->mailbox_out[0] = mb0; ha 2009 drivers/scsi/qla2xxx/qla_nx.c for (cnt = 1; cnt < ha->mbx_count; cnt++) { ha 2010 drivers/scsi/qla2xxx/qla_nx.c ha->mailbox_out[cnt] = RD_REG_WORD(wptr); ha 2014 drivers/scsi/qla2xxx/qla_nx.c if (!ha->mcp) ha 2032 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha; ha 2047 drivers/scsi/qla2xxx/qla_nx.c ha = rsp->hw; ha 2049 drivers/scsi/qla2xxx/qla_nx.c if (!ha->flags.msi_enabled) { ha 2050 drivers/scsi/qla2xxx/qla_nx.c status = qla82xx_rd_32(ha, ISR_INT_VECTOR); ha 2051 drivers/scsi/qla2xxx/qla_nx.c if (!(status & ha->nx_legacy_intr.int_vec_bit)) ha 2054 drivers/scsi/qla2xxx/qla_nx.c status1 = qla82xx_rd_32(ha, ISR_INT_STATE_REG); ha 2060 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, ha->nx_legacy_intr.tgt_status_reg, 0xffffffff); ha 2063 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(ha, ISR_INT_VECTOR); ha 2064 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(ha, ISR_INT_VECTOR); ha 2066 drivers/scsi/qla2xxx/qla_nx.c reg = &ha->iobase->isp82; ha 2068 drivers/scsi/qla2xxx/qla_nx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2069 drivers/scsi/qla2xxx/qla_nx.c vha = pci_get_drvdata(ha->pdev); ha 2103 drivers/scsi/qla2xxx/qla_nx.c qla2x00_handle_mbx_completion(ha, status); ha 2104 drivers/scsi/qla2xxx/qla_nx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2106 drivers/scsi/qla2xxx/qla_nx.c if (!ha->flags.msi_enabled) ha 2107 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, ha->nx_legacy_intr.tgt_mask_reg, 0xfbff); ha 2116 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha; ha 2131 drivers/scsi/qla2xxx/qla_nx.c ha = rsp->hw; ha 2133 drivers/scsi/qla2xxx/qla_nx.c reg = &ha->iobase->isp82; ha 2135 drivers/scsi/qla2xxx/qla_nx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2136 drivers/scsi/qla2xxx/qla_nx.c vha = pci_get_drvdata(ha->pdev); ha 2172 drivers/scsi/qla2xxx/qla_nx.c qla2x00_handle_mbx_completion(ha, status); ha 2173 drivers/scsi/qla2xxx/qla_nx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2182 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha; ha 2195 drivers/scsi/qla2xxx/qla_nx.c ha = rsp->hw; ha 2196 drivers/scsi/qla2xxx/qla_nx.c reg = &ha->iobase->isp82; ha 2197 drivers/scsi/qla2xxx/qla_nx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2198 drivers/scsi/qla2xxx/qla_nx.c vha = pci_get_drvdata(ha->pdev); ha 2205 drivers/scsi/qla2xxx/qla_nx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2213 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha; ha 2228 drivers/scsi/qla2xxx/qla_nx.c ha = rsp->hw; ha 2230 drivers/scsi/qla2xxx/qla_nx.c reg = &ha->iobase->isp82; ha 2231 drivers/scsi/qla2xxx/qla_nx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2232 drivers/scsi/qla2xxx/qla_nx.c vha = pci_get_drvdata(ha->pdev); ha 2266 drivers/scsi/qla2xxx/qla_nx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2270 drivers/scsi/qla2xxx/qla_nx.c qla82xx_enable_intrs(struct qla_hw_data *ha) ha 2272 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 2275 drivers/scsi/qla2xxx/qla_nx.c spin_lock_irq(&ha->hardware_lock); ha 2276 drivers/scsi/qla2xxx/qla_nx.c if (IS_QLA8044(ha)) ha 2277 drivers/scsi/qla2xxx/qla_nx.c qla8044_wr_reg(ha, LEG_INTR_MASK_OFFSET, 0); ha 2279 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, ha->nx_legacy_intr.tgt_mask_reg, 0xfbff); ha 2280 drivers/scsi/qla2xxx/qla_nx.c spin_unlock_irq(&ha->hardware_lock); ha 2281 drivers/scsi/qla2xxx/qla_nx.c ha->interrupts_on = 1; ha 2285 drivers/scsi/qla2xxx/qla_nx.c qla82xx_disable_intrs(struct qla_hw_data *ha) ha 2287 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 2289 drivers/scsi/qla2xxx/qla_nx.c if (ha->interrupts_on) ha 2292 drivers/scsi/qla2xxx/qla_nx.c spin_lock_irq(&ha->hardware_lock); ha 2293 drivers/scsi/qla2xxx/qla_nx.c if (IS_QLA8044(ha)) ha 2294 drivers/scsi/qla2xxx/qla_nx.c qla8044_wr_reg(ha, LEG_INTR_MASK_OFFSET, 1); ha 2296 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, ha->nx_legacy_intr.tgt_mask_reg, 0x0400); ha 2297 drivers/scsi/qla2xxx/qla_nx.c spin_unlock_irq(&ha->hardware_lock); ha 2298 drivers/scsi/qla2xxx/qla_nx.c ha->interrupts_on = 0; ha 2301 drivers/scsi/qla2xxx/qla_nx.c void qla82xx_init_flags(struct qla_hw_data *ha) ha 2306 drivers/scsi/qla2xxx/qla_nx.c rwlock_init(&ha->hw_lock); ha 2307 drivers/scsi/qla2xxx/qla_nx.c ha->qdr_sn_window = -1; ha 2308 drivers/scsi/qla2xxx/qla_nx.c ha->ddr_mn_window = -1; ha 2309 drivers/scsi/qla2xxx/qla_nx.c ha->curr_window = 255; ha 2310 drivers/scsi/qla2xxx/qla_nx.c ha->portnum = PCI_FUNC(ha->pdev->devfn); ha 2311 drivers/scsi/qla2xxx/qla_nx.c nx_legacy_intr = &legacy_intr[ha->portnum]; ha 2312 drivers/scsi/qla2xxx/qla_nx.c ha->nx_legacy_intr.int_vec_bit = nx_legacy_intr->int_vec_bit; ha 2313 drivers/scsi/qla2xxx/qla_nx.c ha->nx_legacy_intr.tgt_status_reg = nx_legacy_intr->tgt_status_reg; ha 2314 drivers/scsi/qla2xxx/qla_nx.c ha->nx_legacy_intr.tgt_mask_reg = nx_legacy_intr->tgt_mask_reg; ha 2315 drivers/scsi/qla2xxx/qla_nx.c ha->nx_legacy_intr.pci_int_reg = nx_legacy_intr->pci_int_reg; ha 2323 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 2325 drivers/scsi/qla2xxx/qla_nx.c drv_active = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE); ha 2326 drivers/scsi/qla2xxx/qla_nx.c if (drv_active == (QLA82XX_DRV_ACTIVE << (ha->portnum * 4))) { ha 2327 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DRV_IDC_VERSION, ha 2332 drivers/scsi/qla2xxx/qla_nx.c idc_ver = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_IDC_VERSION); ha 2345 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 2347 drivers/scsi/qla2xxx/qla_nx.c drv_active = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE); ha 2351 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DRV_ACTIVE, ha 2353 drivers/scsi/qla2xxx/qla_nx.c drv_active = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE); ha 2355 drivers/scsi/qla2xxx/qla_nx.c drv_active |= (QLA82XX_DRV_ACTIVE << (ha->portnum * 4)); ha 2356 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DRV_ACTIVE, drv_active); ha 2360 drivers/scsi/qla2xxx/qla_nx.c qla82xx_clear_drv_active(struct qla_hw_data *ha) ha 2364 drivers/scsi/qla2xxx/qla_nx.c drv_active = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE); ha 2365 drivers/scsi/qla2xxx/qla_nx.c drv_active &= ~(QLA82XX_DRV_ACTIVE << (ha->portnum * 4)); ha 2366 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DRV_ACTIVE, drv_active); ha 2370 drivers/scsi/qla2xxx/qla_nx.c qla82xx_need_reset(struct qla_hw_data *ha) ha 2375 drivers/scsi/qla2xxx/qla_nx.c if (ha->flags.nic_core_reset_owner) ha 2378 drivers/scsi/qla2xxx/qla_nx.c drv_state = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_STATE); ha 2379 drivers/scsi/qla2xxx/qla_nx.c rval = drv_state & (QLA82XX_DRVST_RST_RDY << (ha->portnum * 4)); ha 2385 drivers/scsi/qla2xxx/qla_nx.c qla82xx_set_rst_ready(struct qla_hw_data *ha) ha 2388 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 2390 drivers/scsi/qla2xxx/qla_nx.c drv_state = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_STATE); ha 2394 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DRV_STATE, QLA82XX_DRVST_NOT_RDY); ha 2395 drivers/scsi/qla2xxx/qla_nx.c drv_state = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_STATE); ha 2397 drivers/scsi/qla2xxx/qla_nx.c drv_state |= (QLA82XX_DRVST_RST_RDY << (ha->portnum * 4)); ha 2400 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DRV_STATE, drv_state); ha 2404 drivers/scsi/qla2xxx/qla_nx.c qla82xx_clear_rst_ready(struct qla_hw_data *ha) ha 2408 drivers/scsi/qla2xxx/qla_nx.c drv_state = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_STATE); ha 2409 drivers/scsi/qla2xxx/qla_nx.c drv_state &= ~(QLA82XX_DRVST_RST_RDY << (ha->portnum * 4)); ha 2410 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DRV_STATE, drv_state); ha 2414 drivers/scsi/qla2xxx/qla_nx.c qla82xx_set_qsnt_ready(struct qla_hw_data *ha) ha 2418 drivers/scsi/qla2xxx/qla_nx.c qsnt_state = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_STATE); ha 2419 drivers/scsi/qla2xxx/qla_nx.c qsnt_state |= (QLA82XX_DRVST_QSNT_RDY << (ha->portnum * 4)); ha 2420 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DRV_STATE, qsnt_state); ha 2426 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 2429 drivers/scsi/qla2xxx/qla_nx.c qsnt_state = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_STATE); ha 2430 drivers/scsi/qla2xxx/qla_nx.c qsnt_state &= ~(QLA82XX_DRVST_QSNT_RDY << (ha->portnum * 4)); ha 2431 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DRV_STATE, qsnt_state); ha 2439 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 2449 drivers/scsi/qla2xxx/qla_nx.c rst = qla82xx_rd_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET); ha 2451 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, rst); ha 2464 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_fw_load_from_flash(ha) == QLA_SUCCESS) { ha 2478 drivers/scsi/qla2xxx/qla_nx.c blob = ha->hablob = qla2x00_request_firmware(vha); ha 2497 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_fw_load_from_blob(ha) == QLA_SUCCESS) { ha 2516 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 2519 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, CRB_DMA_SHIFT, QLA82XX_DMA_SHIFT_VALUE); ha 2524 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, CRB_CMDPEG_STATE, 0); ha 2525 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, CRB_RCVPEG_STATE, 0); ha 2528 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_PEG_HALT_STATUS1, 0); ha 2529 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_PEG_HALT_STATUS2, 0); ha 2538 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_check_cmdpeg_state(ha) != QLA_SUCCESS) { ha 2545 drivers/scsi/qla2xxx/qla_nx.c pcie_capability_read_word(ha->pdev, PCI_EXP_LNKSTA, &lnk); ha 2546 drivers/scsi/qla2xxx/qla_nx.c ha->link_width = (lnk >> 4) & 0x3f; ha 2549 drivers/scsi/qla2xxx/qla_nx.c return qla82xx_check_rcvpeg_state(ha); ha 2558 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 2562 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_rom_fast_read(ha, faddr, &val)) { ha 2574 drivers/scsi/qla2xxx/qla_nx.c qla82xx_unprotect_flash(struct qla_hw_data *ha) ha 2578 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 2580 drivers/scsi/qla2xxx/qla_nx.c ret = ql82xx_rom_lock_d(ha); ha 2587 drivers/scsi/qla2xxx/qla_nx.c ret = qla82xx_read_status_reg(ha, &val); ha 2592 drivers/scsi/qla2xxx/qla_nx.c ret = qla82xx_write_status_reg(ha, val); ha 2595 drivers/scsi/qla2xxx/qla_nx.c qla82xx_write_status_reg(ha, val); ha 2598 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_write_disable_flash(ha) != 0) ha 2603 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_unlock(ha); ha 2608 drivers/scsi/qla2xxx/qla_nx.c qla82xx_protect_flash(struct qla_hw_data *ha) ha 2612 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 2614 drivers/scsi/qla2xxx/qla_nx.c ret = ql82xx_rom_lock_d(ha); ha 2621 drivers/scsi/qla2xxx/qla_nx.c ret = qla82xx_read_status_reg(ha, &val); ha 2627 drivers/scsi/qla2xxx/qla_nx.c ret = qla82xx_write_status_reg(ha, val); ha 2632 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_write_disable_flash(ha) != 0) ha 2636 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_unlock(ha); ha 2641 drivers/scsi/qla2xxx/qla_nx.c qla82xx_erase_sector(struct qla_hw_data *ha, int addr) ha 2644 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 2646 drivers/scsi/qla2xxx/qla_nx.c ret = ql82xx_rom_lock_d(ha); ha 2653 drivers/scsi/qla2xxx/qla_nx.c qla82xx_flash_set_write_enable(ha); ha 2654 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_ADDRESS, addr); ha 2655 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_ABYTE_CNT, 3); ha 2656 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_INSTR_OPCODE, M25P_INSTR_SE); ha 2658 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_wait_rom_done(ha)) { ha 2664 drivers/scsi/qla2xxx/qla_nx.c ret = qla82xx_flash_wait_write_finish(ha); ha 2666 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_unlock(ha); ha 2693 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 2700 drivers/scsi/qla2xxx/qla_nx.c optrom = dma_alloc_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE, ha 2710 drivers/scsi/qla2xxx/qla_nx.c rest_addr = ha->fdt_block_size - 1; ha 2712 drivers/scsi/qla2xxx/qla_nx.c ret = qla82xx_unprotect_flash(ha); ha 2723 drivers/scsi/qla2xxx/qla_nx.c ret = qla82xx_erase_sector(ha, faddr); ha 2738 drivers/scsi/qla2xxx/qla_nx.c (ha->flash_data_off | faddr), ha 2744 drivers/scsi/qla2xxx/qla_nx.c (ha->flash_data_off | faddr), ha 2749 drivers/scsi/qla2xxx/qla_nx.c dma_free_coherent(&ha->pdev->dev, ha 2760 drivers/scsi/qla2xxx/qla_nx.c ret = qla82xx_write_flash_dword(ha, faddr, ha 2770 drivers/scsi/qla2xxx/qla_nx.c ret = qla82xx_protect_flash(ha); ha 2776 drivers/scsi/qla2xxx/qla_nx.c dma_free_coherent(&ha->pdev->dev, ha 2803 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 2804 drivers/scsi/qla2xxx/qla_nx.c struct req_que *req = ha->req_q_map[0]; ha 2815 drivers/scsi/qla2xxx/qla_nx.c dbval = 0x04 | (ha->portnum << 5); ha 2819 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, (unsigned long)ha->nxdb_wr_ptr, dbval); ha 2821 drivers/scsi/qla2xxx/qla_nx.c WRT_REG_DWORD(ha->nxdb_wr_ptr, dbval); ha 2823 drivers/scsi/qla2xxx/qla_nx.c while (RD_REG_DWORD(ha->nxdb_rd_ptr) != dbval) { ha 2824 drivers/scsi/qla2xxx/qla_nx.c WRT_REG_DWORD(ha->nxdb_wr_ptr, dbval); ha 2831 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_lock_recovery(struct qla_hw_data *ha) ha 2833 drivers/scsi/qla2xxx/qla_nx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 2836 drivers/scsi/qla2xxx/qla_nx.c if (qla82xx_rom_lock(ha)) { ha 2837 drivers/scsi/qla2xxx/qla_nx.c lock_owner = qla82xx_rd_32(ha, QLA82XX_ROM_LOCK_ID); ha 2847 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_unlock(ha); ha 2867 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 2870 drivers/scsi/qla2xxx/qla_nx.c need_reset = qla82xx_need_reset(ha); ha 2874 drivers/scsi/qla2xxx/qla_nx.c if (ha->flags.isp82xx_fw_hung) ha 2875 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_lock_recovery(ha); ha 2877 drivers/scsi/qla2xxx/qla_nx.c old_count = qla82xx_rd_32(ha, QLA82XX_PEG_ALIVE_COUNTER); ha 2880 drivers/scsi/qla2xxx/qla_nx.c count = qla82xx_rd_32(ha, QLA82XX_PEG_ALIVE_COUNTER); ha 2886 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rom_lock_recovery(ha); ha 2892 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, QLA8XXX_DEV_INITIALIZING); ha 2894 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 2896 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 2901 drivers/scsi/qla2xxx/qla_nx.c qla82xx_clear_drv_active(ha); ha 2902 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, QLA8XXX_DEV_FAILED); ha 2909 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, QLA8XXX_DEV_READY); ha 2927 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 2937 drivers/scsi/qla2xxx/qla_nx.c qla82xx_set_qsnt_ready(ha); ha 2942 drivers/scsi/qla2xxx/qla_nx.c drv_state = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_STATE); ha 2943 drivers/scsi/qla2xxx/qla_nx.c drv_active = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE); ha 2957 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, ha 2961 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 2963 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 2969 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 2971 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 2973 drivers/scsi/qla2xxx/qla_nx.c drv_state = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_STATE); ha 2974 drivers/scsi/qla2xxx/qla_nx.c drv_active = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE); ha 2977 drivers/scsi/qla2xxx/qla_nx.c dev_state = qla82xx_rd_32(ha, QLA82XX_CRB_DEV_STATE); ha 2982 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, QLA8XXX_DEV_QUIESCENT); ha 2999 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3004 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 3005 drivers/scsi/qla2xxx/qla_nx.c dev_state = qla82xx_rd_32(ha, QLA82XX_CRB_DEV_STATE); ha 3006 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 3015 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3021 drivers/scsi/qla2xxx/qla_nx.c if (IS_QLA82XX(ha)) { ha 3022 drivers/scsi/qla2xxx/qla_nx.c qla82xx_clear_drv_active(ha); ha 3023 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 3024 drivers/scsi/qla2xxx/qla_nx.c } else if (IS_QLA8044(ha)) { ha 3025 drivers/scsi/qla2xxx/qla_nx.c qla8044_clear_drv_active(ha); ha 3026 drivers/scsi/qla2xxx/qla_nx.c qla8044_idc_unlock(ha); ha 3054 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3055 drivers/scsi/qla2xxx/qla_nx.c struct req_que *req = ha->req_q_map[0]; ha 3058 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 3060 drivers/scsi/qla2xxx/qla_nx.c ha->isp_ops->get_flash_version(vha, req->ring); ha 3061 drivers/scsi/qla2xxx/qla_nx.c ha->isp_ops->nvram_config(vha); ha 3062 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 3065 drivers/scsi/qla2xxx/qla_nx.c drv_active = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE); ha 3066 drivers/scsi/qla2xxx/qla_nx.c if (!ha->flags.nic_core_reset_owner) { ha 3068 drivers/scsi/qla2xxx/qla_nx.c "reset_acknowledged by 0x%x\n", ha->portnum); ha 3069 drivers/scsi/qla2xxx/qla_nx.c qla82xx_set_rst_ready(ha); ha 3071 drivers/scsi/qla2xxx/qla_nx.c active_mask = ~(QLA82XX_DRV_ACTIVE << (ha->portnum * 4)); ha 3078 drivers/scsi/qla2xxx/qla_nx.c reset_timeout = jiffies + (ha->fcoe_reset_timeout * HZ); ha 3080 drivers/scsi/qla2xxx/qla_nx.c drv_state = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_STATE); ha 3081 drivers/scsi/qla2xxx/qla_nx.c drv_active = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE); ha 3082 drivers/scsi/qla2xxx/qla_nx.c dev_state = qla82xx_rd_32(ha, QLA82XX_CRB_DEV_STATE); ha 3096 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 3098 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 3099 drivers/scsi/qla2xxx/qla_nx.c drv_state = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_STATE); ha 3100 drivers/scsi/qla2xxx/qla_nx.c drv_active = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE); ha 3101 drivers/scsi/qla2xxx/qla_nx.c if (ha->flags.nic_core_reset_owner) ha 3103 drivers/scsi/qla2xxx/qla_nx.c dev_state = qla82xx_rd_32(ha, QLA82XX_CRB_DEV_STATE); ha 3121 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, QLA8XXX_DEV_COLD); ha 3122 drivers/scsi/qla2xxx/qla_nx.c qla82xx_set_rst_ready(ha); ha 3136 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3140 drivers/scsi/qla2xxx/qla_nx.c fw_major_version = ha->fw_major_version; ha 3141 drivers/scsi/qla2xxx/qla_nx.c fw_minor_version = ha->fw_minor_version; ha 3142 drivers/scsi/qla2xxx/qla_nx.c fw_subminor_version = ha->fw_subminor_version; ha 3149 drivers/scsi/qla2xxx/qla_nx.c if (!ha->fw_dumped) { ha 3150 drivers/scsi/qla2xxx/qla_nx.c if ((fw_major_version != ha->fw_major_version || ha 3151 drivers/scsi/qla2xxx/qla_nx.c fw_minor_version != ha->fw_minor_version || ha 3152 drivers/scsi/qla2xxx/qla_nx.c fw_subminor_version != ha->fw_subminor_version) || ha 3153 drivers/scsi/qla2xxx/qla_nx.c (ha->prev_minidump_failed)) { ha 3158 drivers/scsi/qla2xxx/qla_nx.c ha->fw_major_version, ha 3159 drivers/scsi/qla2xxx/qla_nx.c ha->fw_minor_version, ha 3160 drivers/scsi/qla2xxx/qla_nx.c ha->fw_subminor_version, ha 3161 drivers/scsi/qla2xxx/qla_nx.c ha->prev_minidump_failed); ha 3224 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3227 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 3233 drivers/scsi/qla2xxx/qla_nx.c dev_state = qla82xx_rd_32(ha, QLA82XX_CRB_DEV_STATE); ha 3241 drivers/scsi/qla2xxx/qla_nx.c dev_init_timeout = jiffies + (ha->fcoe_dev_init_timeout * HZ); ha 3251 drivers/scsi/qla2xxx/qla_nx.c dev_state = qla82xx_rd_32(ha, QLA82XX_CRB_DEV_STATE); ha 3266 drivers/scsi/qla2xxx/qla_nx.c ha->flags.nic_core_reset_owner = 0; ha 3272 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 3274 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 3280 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 3282 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 3285 drivers/scsi/qla2xxx/qla_nx.c (ha->fcoe_dev_init_timeout * HZ); ha 3290 drivers/scsi/qla2xxx/qla_nx.c dev_init_timeout = jiffies + (ha->fcoe_dev_init_timeout ha 3297 drivers/scsi/qla2xxx/qla_nx.c if (ha->flags.quiesce_owner) ha 3300 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 3302 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 3305 drivers/scsi/qla2xxx/qla_nx.c dev_init_timeout = jiffies + (ha->fcoe_dev_init_timeout ha 3313 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 3315 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 3320 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 3328 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3330 drivers/scsi/qla2xxx/qla_nx.c temp = qla82xx_rd_32(ha, CRB_TEMP_STATE); ha 3359 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3361 drivers/scsi/qla2xxx/qla_nx.c if (ha->flags.mbox_busy) { ha 3362 drivers/scsi/qla2xxx/qla_nx.c ha->flags.mbox_int = 1; ha 3363 drivers/scsi/qla2xxx/qla_nx.c ha->flags.mbox_busy = 0; ha 3366 drivers/scsi/qla2xxx/qla_nx.c if (test_and_clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags)) ha 3367 drivers/scsi/qla2xxx/qla_nx.c complete(&ha->mbx_intr_comp); ha 3374 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3377 drivers/scsi/qla2xxx/qla_nx.c if (!ha->flags.nic_core_reset_hdlr_active) { ha 3378 drivers/scsi/qla2xxx/qla_nx.c dev_state = qla82xx_rd_32(ha, QLA82XX_CRB_DEV_STATE); ha 3381 drivers/scsi/qla2xxx/qla_nx.c ha->flags.isp82xx_fw_hung = 1; ha 3399 drivers/scsi/qla2xxx/qla_nx.c ha->flags.isp82xx_fw_hung = 1; ha 3405 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x98, ha 3407 drivers/scsi/qla2xxx/qla_nx.c halt_status = qla82xx_rd_32(ha, ha 3415 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(ha, QLA82XX_PEG_HALT_STATUS2), ha 3416 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(ha, ha 3418 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(ha, ha 3420 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(ha, ha 3422 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(ha, ha 3424 drivers/scsi/qla2xxx/qla_nx.c qla82xx_rd_32(ha, ha 3440 drivers/scsi/qla2xxx/qla_nx.c ha->flags.isp82xx_fw_hung = 1; ha 3451 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3453 drivers/scsi/qla2xxx/qla_nx.c if (IS_QLA82XX(ha)) ha 3455 drivers/scsi/qla2xxx/qla_nx.c else if (IS_QLA8044(ha)) { ha 3456 drivers/scsi/qla2xxx/qla_nx.c qla8044_idc_lock(ha); ha 3459 drivers/scsi/qla2xxx/qla_nx.c qla8044_idc_unlock(ha); ha 3468 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3471 drivers/scsi/qla2xxx/qla_nx.c if (IS_QLA82XX(ha)) ha 3472 drivers/scsi/qla2xxx/qla_nx.c dev_state = qla82xx_rd_32(ha, QLA82XX_CRB_DEV_STATE); ha 3473 drivers/scsi/qla2xxx/qla_nx.c else if (IS_QLA8044(ha)) ha 3479 drivers/scsi/qla2xxx/qla_nx.c if (IS_QLA82XX(ha)) { ha 3480 drivers/scsi/qla2xxx/qla_nx.c qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, ha 3482 drivers/scsi/qla2xxx/qla_nx.c ha->flags.nic_core_reset_owner = 1; ha 3484 drivers/scsi/qla2xxx/qla_nx.c "reset_owner is 0x%x\n", ha->portnum); ha 3485 drivers/scsi/qla2xxx/qla_nx.c } else if (IS_QLA8044(ha)) ha 3509 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3516 drivers/scsi/qla2xxx/qla_nx.c ha->flags.nic_core_reset_hdlr_active = 1; ha 3518 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 3520 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 3522 drivers/scsi/qla2xxx/qla_nx.c if (IS_QLA82XX(ha)) ha 3524 drivers/scsi/qla2xxx/qla_nx.c else if (IS_QLA8044(ha)) { ha 3525 drivers/scsi/qla2xxx/qla_nx.c qla8044_idc_lock(ha); ha 3528 drivers/scsi/qla2xxx/qla_nx.c qla8044_idc_unlock(ha); ha 3532 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 3533 drivers/scsi/qla2xxx/qla_nx.c qla82xx_clear_rst_ready(ha); ha 3534 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 3537 drivers/scsi/qla2xxx/qla_nx.c ha->flags.isp82xx_fw_hung = 0; ha 3538 drivers/scsi/qla2xxx/qla_nx.c ha->flags.nic_core_reset_hdlr_active = 0; ha 3545 drivers/scsi/qla2xxx/qla_nx.c if (ha->isp_abort_cnt == 0) { ha 3553 drivers/scsi/qla2xxx/qla_nx.c ha->isp_ops->reset_adapter(vha); ha 3559 drivers/scsi/qla2xxx/qla_nx.c ha->isp_abort_cnt--; ha 3562 drivers/scsi/qla2xxx/qla_nx.c ha->isp_abort_cnt); ha 3566 drivers/scsi/qla2xxx/qla_nx.c ha->isp_abort_cnt = MAX_RETRIES_OF_ISP_ABORT; ha 3569 drivers/scsi/qla2xxx/qla_nx.c ha->isp_abort_cnt); ha 3652 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3658 drivers/scsi/qla2xxx/qla_nx.c if (!ha->flags.isp82xx_fw_hung) { ha 3661 drivers/scsi/qla2xxx/qla_nx.c if (IS_QLA82XX(ha)) ha 3663 drivers/scsi/qla2xxx/qla_nx.c else if (IS_QLA8044(ha)) ha 3666 drivers/scsi/qla2xxx/qla_nx.c ha->flags.isp82xx_fw_hung = 1; ha 3674 drivers/scsi/qla2xxx/qla_nx.c __func__, ha->flags.isp82xx_fw_hung); ha 3677 drivers/scsi/qla2xxx/qla_nx.c if (!ha->flags.isp82xx_fw_hung) { ha 3682 drivers/scsi/qla2xxx/qla_nx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3683 drivers/scsi/qla2xxx/qla_nx.c for (que = 0; que < ha->max_req_queues; que++) { ha 3684 drivers/scsi/qla2xxx/qla_nx.c req = ha->req_q_map[que]; ha 3693 drivers/scsi/qla2xxx/qla_nx.c !ha->flags.isp82xx_fw_hung) { ha 3695 drivers/scsi/qla2xxx/qla_nx.c &ha->hardware_lock, flags); ha 3696 drivers/scsi/qla2xxx/qla_nx.c if (ha->isp_ops->abort_command(sp)) { ha 3705 drivers/scsi/qla2xxx/qla_nx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3710 drivers/scsi/qla2xxx/qla_nx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3729 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3738 drivers/scsi/qla2xxx/qla_nx.c tmplt_hdr = (struct qla82xx_md_template_hdr *)ha->md_tmplt_hdr; ha 3745 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, crb_addr, ha 3751 drivers/scsi/qla2xxx/qla_nx.c read_value = qla82xx_md_rw_32(ha, crb_addr, 0, 0); ha 3752 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, crb_addr, read_value, 1); ha 3757 drivers/scsi/qla2xxx/qla_nx.c read_value = qla82xx_md_rw_32(ha, crb_addr, 0, 0); ha 3764 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, crb_addr, read_value, 1); ha 3768 drivers/scsi/qla2xxx/qla_nx.c read_value = qla82xx_md_rw_32(ha, crb_addr, 0, 0); ha 3770 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, crb_addr, read_value, 1); ha 3777 drivers/scsi/qla2xxx/qla_nx.c read_value = qla82xx_md_rw_32(ha, crb_addr, 0, 0); ha 3788 drivers/scsi/qla2xxx/qla_nx.c read_value = qla82xx_md_rw_32(ha, ha 3801 drivers/scsi/qla2xxx/qla_nx.c read_value = qla82xx_md_rw_32(ha, addr, 0, 0); ha 3821 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, addr, read_value, 1); ha 3846 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3857 drivers/scsi/qla2xxx/qla_nx.c r_value = RD_REG_DWORD(r_addr + ha->nx_pcibase); ha 3868 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3881 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, s_addr, s_value, 1); ha 3882 drivers/scsi/qla2xxx/qla_nx.c r_value = qla82xx_md_rw_32(ha, r_addr, 0, 0); ha 3894 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3905 drivers/scsi/qla2xxx/qla_nx.c r_value = qla82xx_md_rw_32(ha, r_addr, 0, 0); ha 3917 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3939 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, t_r_addr, t_value, 1); ha 3941 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, c_addr, c_value_w, 1); ha 3946 drivers/scsi/qla2xxx/qla_nx.c c_value_r = qla82xx_md_rw_32(ha, c_addr, 0, 0); ha 3962 drivers/scsi/qla2xxx/qla_nx.c r_value = qla82xx_md_rw_32(ha, addr, 0, 0); ha 3976 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 3994 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, t_r_addr, t_value, 1); ha 3995 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, c_addr, c_value_w, 1); ha 3998 drivers/scsi/qla2xxx/qla_nx.c r_value = qla82xx_md_rw_32(ha, addr, 0, 0); ha 4011 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 4025 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, s_addr, qid, 1); ha 4028 drivers/scsi/qla2xxx/qla_nx.c r_value = qla82xx_md_rw_32(ha, r_addr, 0, 0); ha 4041 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 4052 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, MD_DIRECT_ROM_WINDOW, ha 4054 drivers/scsi/qla2xxx/qla_nx.c r_value = qla82xx_md_rw_32(ha, ha 4067 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 4096 drivers/scsi/qla2xxx/qla_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 4098 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, MD_MIU_TEST_AGT_ADDR_LO, r_addr, 1); ha 4100 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, MD_MIU_TEST_AGT_ADDR_HI, r_value, 1); ha 4102 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, MD_MIU_TEST_AGT_CTRL, r_value, 1); ha 4104 drivers/scsi/qla2xxx/qla_nx.c qla82xx_md_rw_32(ha, MD_MIU_TEST_AGT_CTRL, r_value, 1); ha 4107 drivers/scsi/qla2xxx/qla_nx.c r_value = qla82xx_md_rw_32(ha, ha 4116 drivers/scsi/qla2xxx/qla_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 4121 drivers/scsi/qla2xxx/qla_nx.c r_data = qla82xx_md_rw_32(ha, ha 4127 drivers/scsi/qla2xxx/qla_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 4135 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 4137 drivers/scsi/qla2xxx/qla_nx.c uint32_t *d_ptr = (uint32_t *)ha->md_tmplt_hdr; ha 4138 drivers/scsi/qla2xxx/qla_nx.c int count = ha->md_template_size/sizeof(uint32_t); ha 4162 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 4170 drivers/scsi/qla2xxx/qla_nx.c tmplt_hdr = (struct qla82xx_md_template_hdr *)ha->md_tmplt_hdr; ha 4171 drivers/scsi/qla2xxx/qla_nx.c data_ptr = (uint32_t *)ha->md_dump; ha 4173 drivers/scsi/qla2xxx/qla_nx.c if (ha->fw_dumped) { ha 4176 drivers/scsi/qla2xxx/qla_nx.c "-- ignoring request.\n", ha->fw_dump); ha 4180 drivers/scsi/qla2xxx/qla_nx.c ha->fw_dumped = 0; ha 4182 drivers/scsi/qla2xxx/qla_nx.c if (!ha->md_tmplt_hdr || !ha->md_dump) { ha 4188 drivers/scsi/qla2xxx/qla_nx.c if (ha->flags.isp82xx_no_md_cap) { ha 4192 drivers/scsi/qla2xxx/qla_nx.c ha->flags.isp82xx_no_md_cap = 0; ha 4225 drivers/scsi/qla2xxx/qla_nx.c total_data_size = ha->md_dump_size; ha 4239 drivers/scsi/qla2xxx/qla_nx.c (((uint8_t *)ha->md_tmplt_hdr) + tmplt_hdr->first_entry_offset); ha 4272 drivers/scsi/qla2xxx/qla_nx.c data_collected, (ha->md_dump_size - data_collected)); ha 4343 drivers/scsi/qla2xxx/qla_nx.c (uint8_t *)ha->md_dump; ha 4359 drivers/scsi/qla2xxx/qla_nx.c vha->host_no, ha->md_tmplt_hdr, vha->host_no, ha->md_dump); ha 4360 drivers/scsi/qla2xxx/qla_nx.c ha->fw_dumped = 1; ha 4370 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 4374 drivers/scsi/qla2xxx/qla_nx.c tmplt_hdr = (struct qla82xx_md_template_hdr *)ha->md_tmplt_hdr; ha 4385 drivers/scsi/qla2xxx/qla_nx.c ha->md_dump_size += tmplt_hdr->capture_size_array[k]; ha 4388 drivers/scsi/qla2xxx/qla_nx.c if (ha->md_dump) { ha 4394 drivers/scsi/qla2xxx/qla_nx.c ha->md_dump = vmalloc(ha->md_dump_size); ha 4395 drivers/scsi/qla2xxx/qla_nx.c if (ha->md_dump == NULL) { ha 4398 drivers/scsi/qla2xxx/qla_nx.c "(0x%x).\n", ha->md_dump_size); ha 4407 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 4410 drivers/scsi/qla2xxx/qla_nx.c if (ha->md_tmplt_hdr) { ha 4413 drivers/scsi/qla2xxx/qla_nx.c ha->md_tmplt_hdr, ha->md_template_size / 1024); ha 4414 drivers/scsi/qla2xxx/qla_nx.c dma_free_coherent(&ha->pdev->dev, ha->md_template_size, ha 4415 drivers/scsi/qla2xxx/qla_nx.c ha->md_tmplt_hdr, ha->md_tmplt_hdr_dma); ha 4416 drivers/scsi/qla2xxx/qla_nx.c ha->md_tmplt_hdr = NULL; ha 4420 drivers/scsi/qla2xxx/qla_nx.c if (ha->md_dump) { ha 4423 drivers/scsi/qla2xxx/qla_nx.c ha->md_dump, ha->md_dump_size / 1024); ha 4424 drivers/scsi/qla2xxx/qla_nx.c vfree(ha->md_dump); ha 4425 drivers/scsi/qla2xxx/qla_nx.c ha->md_dump_size = 0; ha 4426 drivers/scsi/qla2xxx/qla_nx.c ha->md_dump = NULL; ha 4433 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 4441 drivers/scsi/qla2xxx/qla_nx.c ha->md_template_size / 1024); ha 4444 drivers/scsi/qla2xxx/qla_nx.c if (IS_QLA8044(ha)) ha 4458 drivers/scsi/qla2xxx/qla_nx.c ha->md_dump_size / 1024); ha 4462 drivers/scsi/qla2xxx/qla_nx.c ha->md_tmplt_hdr, ha 4463 drivers/scsi/qla2xxx/qla_nx.c ha->md_template_size / 1024); ha 4464 drivers/scsi/qla2xxx/qla_nx.c dma_free_coherent(&ha->pdev->dev, ha 4465 drivers/scsi/qla2xxx/qla_nx.c ha->md_template_size, ha 4466 drivers/scsi/qla2xxx/qla_nx.c ha->md_tmplt_hdr, ha->md_tmplt_hdr_dma); ha 4467 drivers/scsi/qla2xxx/qla_nx.c ha->md_tmplt_hdr = NULL; ha 4479 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 4481 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 4489 drivers/scsi/qla2xxx/qla_nx.c ha->beacon_blink_led = 1; ha 4491 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 4500 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 4502 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 4510 drivers/scsi/qla2xxx/qla_nx.c ha->beacon_blink_led = 0; ha 4512 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 4519 drivers/scsi/qla2xxx/qla_nx.c struct qla_hw_data *ha = vha->hw; ha 4521 drivers/scsi/qla2xxx/qla_nx.c if (!ha->allow_cna_fw_dump) ha 4525 drivers/scsi/qla2xxx/qla_nx.c ha->flags.isp82xx_no_md_cap = 1; ha 4526 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_lock(ha); ha 4528 drivers/scsi/qla2xxx/qla_nx.c qla82xx_idc_unlock(ha); ha 35 drivers/scsi/qla2xxx/qla_nx2.c qla8044_rd_reg(struct qla_hw_data *ha, ulong addr) ha 37 drivers/scsi/qla2xxx/qla_nx2.c return readl((void __iomem *) (ha->nx_pcibase + addr)); ha 41 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(struct qla_hw_data *ha, ulong addr, uint32_t val) ha 43 drivers/scsi/qla2xxx/qla_nx2.c writel(val, (void __iomem *)((ha)->nx_pcibase + addr)); ha 50 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 53 drivers/scsi/qla2xxx/qla_nx2.c return qla8044_rd_reg(ha, qla8044_reg_tbl[crb_reg]); ha 63 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 66 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, qla8044_reg_tbl[crb_reg], value); ha 74 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 76 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_CRB_WIN_FUNC(ha->portnum), addr); ha 77 drivers/scsi/qla2xxx/qla_nx2.c val = qla8044_rd_reg(ha, QLA8044_CRB_WIN_FUNC(ha->portnum)); ha 93 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 97 drivers/scsi/qla2xxx/qla_nx2.c *data = qla8044_rd_reg(ha, QLA8044_WILDCARD); ha 108 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 112 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_WILDCARD, data); ha 260 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 263 drivers/scsi/qla2xxx/qla_nx2.c qsnt_state |= (1 << ha->portnum); ha 273 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 276 drivers/scsi/qla2xxx/qla_nx2.c qsnt_state &= ~(1 << ha->portnum); ha 311 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 313 drivers/scsi/qla2xxx/qla_nx2.c lockid = qla8044_rd_reg(ha, QLA8044_DRV_LOCKRECOVERY); ha 320 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_DRV_LOCKRECOVERY, ha 321 drivers/scsi/qla2xxx/qla_nx2.c (ha->portnum << ha 326 drivers/scsi/qla2xxx/qla_nx2.c lockid = qla8044_rd_reg(ha, QLA8044_DRV_LOCKRECOVERY); ha 327 drivers/scsi/qla2xxx/qla_nx2.c if ((lockid & IDC_LOCK_RECOVERY_OWNER_MASK) != (ha->portnum << ha 332 drivers/scsi/qla2xxx/qla_nx2.c , __func__, ha->portnum); ha 335 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_DRV_LOCKRECOVERY, ha 336 drivers/scsi/qla2xxx/qla_nx2.c (ha->portnum << IDC_LOCK_RECOVERY_STATE_SHIFT_BITS) | ha 340 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_DRV_LOCK_ID, 0xFF); ha 341 drivers/scsi/qla2xxx/qla_nx2.c qla8044_rd_reg(ha, QLA8044_DRV_UNLOCK); ha 344 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_DRV_LOCKRECOVERY, 0); ha 347 drivers/scsi/qla2xxx/qla_nx2.c lock = qla8044_rd_reg(ha, QLA8044_DRV_LOCK); ha 349 drivers/scsi/qla2xxx/qla_nx2.c lockid = qla8044_rd_reg(ha, QLA8044_DRV_LOCK_ID); ha 350 drivers/scsi/qla2xxx/qla_nx2.c lockid = ((lockid + (1 << 8)) & ~0xFF) | ha->portnum; ha 351 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_DRV_LOCK_ID, lockid); ha 358 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(struct qla_hw_data *ha) ha 362 drivers/scsi/qla2xxx/qla_nx2.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 366 drivers/scsi/qla2xxx/qla_nx2.c status = qla8044_rd_reg(ha, QLA8044_DRV_LOCK); ha 371 drivers/scsi/qla2xxx/qla_nx2.c lock_id = qla8044_rd_reg(ha, QLA8044_DRV_LOCK_ID); ha 372 drivers/scsi/qla2xxx/qla_nx2.c lock_id = ((lock_id + (1 << 8)) & ~0xFF) | ha->portnum; ha 373 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_DRV_LOCK_ID, lock_id); ha 378 drivers/scsi/qla2xxx/qla_nx2.c first_owner = qla8044_rd_reg(ha, QLA8044_DRV_LOCK_ID); ha 382 drivers/scsi/qla2xxx/qla_nx2.c tmo_owner = qla8044_rd_reg(ha, QLA8044_DRV_LOCK_ID); ha 388 drivers/scsi/qla2xxx/qla_nx2.c __func__, ha->portnum, func_num, lock_cnt, ha 397 drivers/scsi/qla2xxx/qla_nx2.c __func__, ha->portnum); ha 408 drivers/scsi/qla2xxx/qla_nx2.c ha->portnum); ha 417 drivers/scsi/qla2xxx/qla_nx2.c ha->portnum); ha 427 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(struct qla_hw_data *ha) ha 430 drivers/scsi/qla2xxx/qla_nx2.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 432 drivers/scsi/qla2xxx/qla_nx2.c id = qla8044_rd_reg(ha, QLA8044_DRV_LOCK_ID); ha 434 drivers/scsi/qla2xxx/qla_nx2.c if ((id & 0xFF) != ha->portnum) { ha 437 drivers/scsi/qla2xxx/qla_nx2.c __func__, ha->portnum, (id & 0xFF)); ha 442 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_DRV_LOCK_ID, (id | 0xFF)); ha 443 drivers/scsi/qla2xxx/qla_nx2.c qla8044_rd_reg(ha, QLA8044_DRV_UNLOCK); ha 454 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 457 drivers/scsi/qla2xxx/qla_nx2.c lock_status = qla8044_rd_reg(ha, QLA8044_FLASH_LOCK); ha 462 drivers/scsi/qla2xxx/qla_nx2.c lock_owner = qla8044_rd_reg(ha, ha 466 drivers/scsi/qla2xxx/qla_nx2.c __func__, ha->portnum, lock_owner); ha 472 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_FLASH_LOCK_ID, ha->portnum); ha 479 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 482 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_FLASH_LOCK_ID, 0xFF); ha 483 drivers/scsi/qla2xxx/qla_nx2.c qla8044_rd_reg(ha, QLA8044_FLASH_UNLOCK); ha 582 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 587 drivers/scsi/qla2xxx/qla_nx2.c rval = drv_state & (1 << ha->portnum); ha 589 drivers/scsi/qla2xxx/qla_nx2.c if (ha->flags.eeh_busy && drv_active) ha 1128 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1135 drivers/scsi/qla2xxx/qla_nx2.c write_lock_irqsave(&ha->hw_lock, flags); ha 1208 drivers/scsi/qla2xxx/qla_nx2.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 1221 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1224 drivers/scsi/qla2xxx/qla_nx2.c dest = qla8044_rd_reg(ha, QLA8044_BOOTLOADER_ADDR); ha 1225 drivers/scsi/qla2xxx/qla_nx2.c size = qla8044_rd_reg(ha, QLA8044_BOOTLOADER_SIZE); ha 1276 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1300 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_FW_IMAGE_VALID, QLA8044_BOOT_FROM_FLASH); ha 1321 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1324 drivers/scsi/qla2xxx/qla_nx2.c val = qla8044_rd_reg(ha, QLA8044_CMDPEG_STATE); ha 1365 drivers/scsi/qla2xxx/qla_nx2.c qla8044_clear_drv_active(struct qla_hw_data *ha) ha 1368 drivers/scsi/qla2xxx/qla_nx2.c struct scsi_qla_host *vha = pci_get_drvdata(ha->pdev); ha 1371 drivers/scsi/qla2xxx/qla_nx2.c drv_active &= ~(1 << (ha->portnum)); ha 1394 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1415 drivers/scsi/qla2xxx/qla_nx2.c if (ha->flags.isp82xx_fw_hung) ha 1425 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 1427 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 1432 drivers/scsi/qla2xxx/qla_nx2.c qla8044_clear_drv_active(ha); ha 1440 drivers/scsi/qla2xxx/qla_nx2.c idc_ctrl = qla8044_rd_reg(ha, QLA8044_IDC_DRV_CTRL); ha 1442 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_IDC_DRV_CTRL, ha 1444 drivers/scsi/qla2xxx/qla_nx2.c ha->fw_dumped = 0; ha 1612 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1614 drivers/scsi/qla2xxx/qla_nx2.c idc_ctrl = qla8044_rd_reg(ha, QLA8044_IDC_DRV_CTRL); ha 1618 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_IDC_DRV_CTRL, idc_ctrl); ha 1625 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1631 drivers/scsi/qla2xxx/qla_nx2.c drv_state |= (1 << ha->portnum); ha 1650 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1656 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 1658 drivers/scsi/qla2xxx/qla_nx2.c ha->isp_ops->get_flash_version(vha, vha->req->ring); ha 1659 drivers/scsi/qla2xxx/qla_nx2.c ha->isp_ops->nvram_config(vha); ha 1660 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 1677 drivers/scsi/qla2xxx/qla_nx2.c reset_timeout = jiffies + (ha->fcoe_reset_timeout * HZ); ha 1683 drivers/scsi/qla2xxx/qla_nx2.c __func__, ha->portnum, drv_state, drv_active); ha 1687 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 1689 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 1704 drivers/scsi/qla2xxx/qla_nx2.c __func__, vha->host_no, ha->portnum, ha 1714 drivers/scsi/qla2xxx/qla_nx2.c if ((ha->flags.nic_core_reset_owner) && ha 1716 drivers/scsi/qla2xxx/qla_nx2.c ha->flags.nic_core_reset_owner = 0; ha 1723 drivers/scsi/qla2xxx/qla_nx2.c if (!(drv_active & (1 << ha->portnum))) { ha 1724 drivers/scsi/qla2xxx/qla_nx2.c ha->flags.nic_core_reset_owner = 0; ha 1732 drivers/scsi/qla2xxx/qla_nx2.c if (ha->flags.nic_core_reset_owner || ha 1734 drivers/scsi/qla2xxx/qla_nx2.c ha->flags.nic_core_reset_owner = 0; ha 1743 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1749 drivers/scsi/qla2xxx/qla_nx2.c drv_active |= (1 << ha->portnum); ha 1761 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1764 drivers/scsi/qla2xxx/qla_nx2.c if (drv_active & (1 << ha->portnum)) ha 1774 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1776 drivers/scsi/qla2xxx/qla_nx2.c idc_ctrl = qla8044_rd_reg(ha, QLA8044_IDC_DRV_CTRL); ha 1781 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_IDC_DRV_CTRL, idc_ctrl); ha 1790 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1793 drivers/scsi/qla2xxx/qla_nx2.c if (drv_active == (1 << ha->portnum)) { ha 1820 drivers/scsi/qla2xxx/qla_nx2.c idc_ver = qla8044_rd_reg(ha, QLA8044_CRB_IDC_VER_MINOR); ha 1821 drivers/scsi/qla2xxx/qla_nx2.c idc_ver &= ~(0x03 << (ha->portnum * 2)); ha 1822 drivers/scsi/qla2xxx/qla_nx2.c idc_ver |= (QLA8044_IDC_VER_MIN_VALUE << (ha->portnum * 2)); ha 1823 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_CRB_IDC_VER_MINOR, idc_ver); ha 1834 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1839 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 1847 drivers/scsi/qla2xxx/qla_nx2.c if ((drv_active == (1 << ha->portnum)) && !ql2xdontresethba) ha 1852 drivers/scsi/qla2xxx/qla_nx2.c qla8044_clear_drv_active(ha); ha 1853 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 1868 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1899 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 1901 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 1933 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 1946 drivers/scsi/qla2xxx/qla_nx2.c dev_init_timeout = jiffies + (ha->fcoe_dev_init_timeout * HZ); ha 1948 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 1973 drivers/scsi/qla2xxx/qla_nx2.c ha->flags.nic_core_reset_owner = 0; ha 1979 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 1981 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 1995 drivers/scsi/qla2xxx/qla_nx2.c (ha->fcoe_reset_timeout * HZ); ha 2001 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 2003 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 2007 drivers/scsi/qla2xxx/qla_nx2.c (ha->fcoe_reset_timeout * HZ); ha 2010 drivers/scsi/qla2xxx/qla_nx2.c ha->flags.nic_core_reset_owner = 0; ha 2011 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 2014 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 2017 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 2020 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 2025 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 2127 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 2135 drivers/scsi/qla2xxx/qla_nx2.c ha->flags.isp82xx_fw_hung = 1; ha 2143 drivers/scsi/qla2xxx/qla_nx2.c ha->flags.isp82xx_fw_hung = 1; ha 2161 drivers/scsi/qla2xxx/qla_nx2.c if (ha->flags.isp82xx_fw_hung) { ha 2216 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 2220 drivers/scsi/qla2xxx/qla_nx2.c ha->md_tmplt_hdr; ha 2359 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 2388 drivers/scsi/qla2xxx/qla_nx2.c write_lock_irqsave(&ha->hw_lock, flags); ha 2406 drivers/scsi/qla2xxx/qla_nx2.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 2418 drivers/scsi/qla2xxx/qla_nx2.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 2569 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 2583 drivers/scsi/qla2xxx/qla_nx2.c r_value = readl((void __iomem *)(r_addr + ha->nx_pcibase)); ha 2824 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 2830 drivers/scsi/qla2xxx/qla_nx2.c tmplt_hdr = ha->md_tmplt_hdr; ha 2854 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 2860 drivers/scsi/qla2xxx/qla_nx2.c tmplt_hdr = ha->md_tmplt_hdr; ha 2911 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 2929 drivers/scsi/qla2xxx/qla_nx2.c rdmem_buffer = dma_alloc_coherent(&ha->pdev->dev, ha 2947 drivers/scsi/qla2xxx/qla_nx2.c ((PCI_FUNC(ha->pdev->devfn) & 0xf) << 0x4); ha 2994 drivers/scsi/qla2xxx/qla_nx2.c dma_free_coherent(&ha->pdev->dev, ISP8044_PEX_DMA_READ_SIZE, ha 3236 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 3238 drivers/scsi/qla2xxx/qla_nx2.c if (!ha->md_dump) { ha 3245 drivers/scsi/qla2xxx/qla_nx2.c if (ha->fw_dumped) { ha 3248 drivers/scsi/qla2xxx/qla_nx2.c "-- ignoring request.\n", ha->fw_dump); ha 3252 drivers/scsi/qla2xxx/qla_nx2.c ha->fw_dumped = 0; ha 3254 drivers/scsi/qla2xxx/qla_nx2.c if (!ha->md_tmplt_hdr || !ha->md_dump) { ha 3260 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 3261 drivers/scsi/qla2xxx/qla_nx2.c idc_control = qla8044_rd_reg(ha, QLA8044_IDC_DRV_CTRL); ha 3266 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, QLA8044_IDC_DRV_CTRL, ha 3268 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 3272 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 3281 drivers/scsi/qla2xxx/qla_nx2.c ha->md_tmplt_hdr; ha 3282 drivers/scsi/qla2xxx/qla_nx2.c data_ptr = (uint32_t *)((uint8_t *)ha->md_dump); ha 3306 drivers/scsi/qla2xxx/qla_nx2.c __func__, ha->md_dump_size, ha->md_dump_size); ha 3314 drivers/scsi/qla2xxx/qla_nx2.c (((uint8_t *)ha->md_tmplt_hdr) + tmplt_hdr->first_entry_offset); ha 3316 drivers/scsi/qla2xxx/qla_nx2.c tmplt_hdr->ocm_window_reg[ha->portnum]; ha 3320 drivers/scsi/qla2xxx/qla_nx2.c if (data_collected > ha->md_dump_size) { ha 3324 drivers/scsi/qla2xxx/qla_nx2.c data_collected, ha->md_dump_size); ha 3338 drivers/scsi/qla2xxx/qla_nx2.c (ha->md_dump_size - data_collected)); ha 3452 drivers/scsi/qla2xxx/qla_nx2.c (uint8_t *)((uint8_t *)ha->md_dump); ha 3461 drivers/scsi/qla2xxx/qla_nx2.c if (data_collected != ha->md_dump_size) { ha 3465 drivers/scsi/qla2xxx/qla_nx2.c data_collected, ha->md_dump_size); ha 3472 drivers/scsi/qla2xxx/qla_nx2.c vha->host_no, ha->md_tmplt_hdr, vha->host_no, ha->md_dump); ha 3473 drivers/scsi/qla2xxx/qla_nx2.c ha->fw_dumped = 1; ha 3487 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 3490 drivers/scsi/qla2xxx/qla_nx2.c ha->fw_dumped = 1; ha 3491 drivers/scsi/qla2xxx/qla_nx2.c ha->prev_minidump_failed = 0; ha 3496 drivers/scsi/qla2xxx/qla_nx2.c ha->prev_minidump_failed = 1; ha 3576 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 3578 drivers/scsi/qla2xxx/qla_nx2.c ret_val = qla8044_write_flash_status_reg(vha, ha->fdt_wrt_enable); ha 3593 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 3595 drivers/scsi/qla2xxx/qla_nx2.c ret_val = qla8044_write_flash_status_reg(vha, ha->fdt_wrt_disable); ha 3891 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha; ha 3907 drivers/scsi/qla2xxx/qla_nx2.c ha = rsp->hw; ha 3908 drivers/scsi/qla2xxx/qla_nx2.c vha = pci_get_drvdata(ha->pdev); ha 3910 drivers/scsi/qla2xxx/qla_nx2.c if (unlikely(pci_channel_offline(ha->pdev))) ha 3913 drivers/scsi/qla2xxx/qla_nx2.c leg_int_ptr = qla8044_rd_reg(ha, LEG_INTR_PTR_OFFSET); ha 3923 drivers/scsi/qla2xxx/qla_nx2.c pf_bit = ha->portnum << 16; ha 3938 drivers/scsi/qla2xxx/qla_nx2.c qla8044_wr_reg(ha, LEG_INTR_TRIG_OFFSET, 0); ha 3940 drivers/scsi/qla2xxx/qla_nx2.c leg_int_ptr = qla8044_rd_reg(ha, LEG_INTR_PTR_OFFSET); ha 3945 drivers/scsi/qla2xxx/qla_nx2.c reg = &ha->iobase->isp82; ha 3946 drivers/scsi/qla2xxx/qla_nx2.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3982 drivers/scsi/qla2xxx/qla_nx2.c qla2x00_handle_mbx_completion(ha, status); ha 3983 drivers/scsi/qla2xxx/qla_nx2.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3989 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_dontreset(struct qla_hw_data *ha) ha 3993 drivers/scsi/qla2xxx/qla_nx2.c idc_ctrl = qla8044_rd_reg(ha, QLA8044_IDC_DRV_CTRL); ha 4021 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 4023 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 4038 drivers/scsi/qla2xxx/qla_nx2.c if (qla8044_idc_dontreset(ha) == DONTRESET_BIT0) { ha 4056 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 4058 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 4062 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 4064 drivers/scsi/qla2xxx/qla_nx2.c ha->flags.isp82xx_fw_hung = 0; ha 4065 drivers/scsi/qla2xxx/qla_nx2.c ha->flags.nic_core_reset_hdlr_active = 0; ha 4075 drivers/scsi/qla2xxx/qla_nx2.c struct qla_hw_data *ha = vha->hw; ha 4077 drivers/scsi/qla2xxx/qla_nx2.c if (!ha->allow_cna_fw_dump) ha 4081 drivers/scsi/qla2xxx/qla_nx2.c ha->flags.isp82xx_no_md_cap = 1; ha 4082 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_lock(ha); ha 4084 drivers/scsi/qla2xxx/qla_nx2.c qla8044_idc_unlock(ha); ha 367 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 369 drivers/scsi/qla2xxx/qla_os.c rsp->qpair = ha->base_qpair; ha 371 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->hw = ha; ha 372 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->req = req; ha 373 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->rsp = rsp; ha 374 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->vha = vha; ha 375 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->qp_lock_ptr = &ha->hardware_lock; ha 376 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->use_shadow_reg = IS_SHADOW_REG_CAPABLE(ha) ? 1 : 0; ha 377 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->msix = &ha->msix_entries[QLA_MSIX_RSP_Q]; ha 378 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->srb_mempool = ha->srb_mempool; ha 379 drivers/scsi/qla2xxx/qla_os.c INIT_LIST_HEAD(&ha->base_qpair->hints_list); ha 380 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->enable_class_2 = ql2xenableclass2; ha 383 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->pdev = ha->pdev; ha 385 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA27XX(ha) || IS_QLA83XX(ha) || IS_QLA28XX(ha)) ha 386 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->reqq_start_iocbs = qla_83xx_start_iocbs; ha 389 drivers/scsi/qla2xxx/qla_os.c static int qla2x00_alloc_queues(struct qla_hw_data *ha, struct req_que *req, ha 392 drivers/scsi/qla2xxx/qla_os.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 394 drivers/scsi/qla2xxx/qla_os.c ha->req_q_map = kcalloc(ha->max_req_queues, sizeof(struct req_que *), ha 396 drivers/scsi/qla2xxx/qla_os.c if (!ha->req_q_map) { ha 402 drivers/scsi/qla2xxx/qla_os.c ha->rsp_q_map = kcalloc(ha->max_rsp_queues, sizeof(struct rsp_que *), ha 404 drivers/scsi/qla2xxx/qla_os.c if (!ha->rsp_q_map) { ha 410 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair = kzalloc(sizeof(struct qla_qpair), GFP_KERNEL); ha 411 drivers/scsi/qla2xxx/qla_os.c if (ha->base_qpair == NULL) { ha 419 drivers/scsi/qla2xxx/qla_os.c if ((ql2xmqsupport || ql2xnvmeenable) && ha->max_qpairs) { ha 420 drivers/scsi/qla2xxx/qla_os.c ha->queue_pair_map = kcalloc(ha->max_qpairs, sizeof(struct qla_qpair *), ha 422 drivers/scsi/qla2xxx/qla_os.c if (!ha->queue_pair_map) { ha 433 drivers/scsi/qla2xxx/qla_os.c ha->rsp_q_map[0] = rsp; ha 434 drivers/scsi/qla2xxx/qla_os.c ha->req_q_map[0] = req; ha 435 drivers/scsi/qla2xxx/qla_os.c set_bit(0, ha->rsp_qid_map); ha 436 drivers/scsi/qla2xxx/qla_os.c set_bit(0, ha->req_qid_map); ha 440 drivers/scsi/qla2xxx/qla_os.c kfree(ha->base_qpair); ha 441 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair = NULL; ha 443 drivers/scsi/qla2xxx/qla_os.c kfree(ha->rsp_q_map); ha 444 drivers/scsi/qla2xxx/qla_os.c ha->rsp_q_map = NULL; ha 446 drivers/scsi/qla2xxx/qla_os.c kfree(ha->req_q_map); ha 447 drivers/scsi/qla2xxx/qla_os.c ha->req_q_map = NULL; ha 452 drivers/scsi/qla2xxx/qla_os.c static void qla2x00_free_req_que(struct qla_hw_data *ha, struct req_que *req) ha 454 drivers/scsi/qla2xxx/qla_os.c if (IS_QLAFX00(ha)) { ha 456 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ha 460 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ha 470 drivers/scsi/qla2xxx/qla_os.c static void qla2x00_free_rsp_que(struct qla_hw_data *ha, struct rsp_que *rsp) ha 472 drivers/scsi/qla2xxx/qla_os.c if (IS_QLAFX00(ha)) { ha 474 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ha 478 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ha 485 drivers/scsi/qla2xxx/qla_os.c static void qla2x00_free_queues(struct qla_hw_data *ha) ha 492 drivers/scsi/qla2xxx/qla_os.c if (ha->queue_pair_map) { ha 493 drivers/scsi/qla2xxx/qla_os.c kfree(ha->queue_pair_map); ha 494 drivers/scsi/qla2xxx/qla_os.c ha->queue_pair_map = NULL; ha 496 drivers/scsi/qla2xxx/qla_os.c if (ha->base_qpair) { ha 497 drivers/scsi/qla2xxx/qla_os.c kfree(ha->base_qpair); ha 498 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair = NULL; ha 501 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 502 drivers/scsi/qla2xxx/qla_os.c for (cnt = 0; cnt < ha->max_req_queues; cnt++) { ha 503 drivers/scsi/qla2xxx/qla_os.c if (!test_bit(cnt, ha->req_qid_map)) ha 506 drivers/scsi/qla2xxx/qla_os.c req = ha->req_q_map[cnt]; ha 507 drivers/scsi/qla2xxx/qla_os.c clear_bit(cnt, ha->req_qid_map); ha 508 drivers/scsi/qla2xxx/qla_os.c ha->req_q_map[cnt] = NULL; ha 510 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 511 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_req_que(ha, req); ha 512 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 514 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 516 drivers/scsi/qla2xxx/qla_os.c kfree(ha->req_q_map); ha 517 drivers/scsi/qla2xxx/qla_os.c ha->req_q_map = NULL; ha 520 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 521 drivers/scsi/qla2xxx/qla_os.c for (cnt = 0; cnt < ha->max_rsp_queues; cnt++) { ha 522 drivers/scsi/qla2xxx/qla_os.c if (!test_bit(cnt, ha->rsp_qid_map)) ha 525 drivers/scsi/qla2xxx/qla_os.c rsp = ha->rsp_q_map[cnt]; ha 526 drivers/scsi/qla2xxx/qla_os.c clear_bit(cnt, ha->rsp_qid_map); ha 527 drivers/scsi/qla2xxx/qla_os.c ha->rsp_q_map[cnt] = NULL; ha 528 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 529 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_rsp_que(ha, rsp); ha 530 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 532 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 534 drivers/scsi/qla2xxx/qla_os.c kfree(ha->rsp_q_map); ha 535 drivers/scsi/qla2xxx/qla_os.c ha->rsp_q_map = NULL; ha 541 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 547 drivers/scsi/qla2xxx/qla_os.c pci_bus = (ha->pci_attr & (BIT_9 | BIT_10)) >> 9; ha 552 drivers/scsi/qla2xxx/qla_os.c pci_bus = (ha->pci_attr & BIT_8) >> 8; ha 565 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 568 drivers/scsi/qla2xxx/qla_os.c if (pci_is_pcie(ha->pdev)) { ha 572 drivers/scsi/qla2xxx/qla_os.c pcie_capability_read_dword(ha->pdev, PCI_EXP_LNKCAP, &lstat); ha 595 drivers/scsi/qla2xxx/qla_os.c pci_bus = (ha->pci_attr & CSRX_PCIX_BUS_MODE_MASK) >> 8; ha 611 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 613 drivers/scsi/qla2xxx/qla_os.c snprintf(str, size, "%d.%02d.%02d ", ha->fw_major_version, ha 614 drivers/scsi/qla2xxx/qla_os.c ha->fw_minor_version, ha->fw_subminor_version); ha 616 drivers/scsi/qla2xxx/qla_os.c if (ha->fw_attributes & BIT_9) { ha 621 drivers/scsi/qla2xxx/qla_os.c switch (ha->fw_attributes & 0xFF) { ha 635 drivers/scsi/qla2xxx/qla_os.c sprintf(un_str, "(%x)", ha->fw_attributes); ha 639 drivers/scsi/qla2xxx/qla_os.c if (ha->fw_attributes & 0x100) ha 648 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 650 drivers/scsi/qla2xxx/qla_os.c snprintf(str, size, "%d.%02d.%02d (%x)", ha->fw_major_version, ha 651 drivers/scsi/qla2xxx/qla_os.c ha->fw_minor_version, ha->fw_subminor_version, ha->fw_attributes); ha 657 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = sp->vha->hw; ha 666 drivers/scsi/qla2xxx/qla_os.c dma_unmap_sg(&ha->pdev->dev, scsi_prot_sglist(cmd), ha 673 drivers/scsi/qla2xxx/qla_os.c qla2x00_clean_dsd_pool(ha, sp->u.scmd.crc_ctx); ha 680 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->dl_dma_pool, ctx0, ctx0->crc_ctx_dma); ha 687 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->fcp_cmnd_dma_pool, ctx1->fcp_cmnd, ha 689 drivers/scsi/qla2xxx/qla_os.c list_splice(&ctx1->dsd_list, &ha->gbl_dsd_list); ha 690 drivers/scsi/qla2xxx/qla_os.c ha->gbl_dsd_inuse -= ctx1->dsd_use_cnt; ha 691 drivers/scsi/qla2xxx/qla_os.c ha->gbl_dsd_avail += ctx1->dsd_use_cnt; ha 692 drivers/scsi/qla2xxx/qla_os.c mempool_free(ctx1, ha->ctx_mempool); ha 712 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = sp->fcport->vha->hw; ha 720 drivers/scsi/qla2xxx/qla_os.c dma_unmap_sg(&ha->pdev->dev, scsi_prot_sglist(cmd), ha 727 drivers/scsi/qla2xxx/qla_os.c qla2x00_clean_dsd_pool(ha, sp->u.scmd.crc_ctx); ha 738 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->dif_bundl_pool, dif_dsd->dsd_addr, ha 747 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->dl_dma_pool, dif_dsd->dsd_addr, ha 770 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->fcp_cmnd_dma_pool, ctx1->fcp_cmnd, ha 772 drivers/scsi/qla2xxx/qla_os.c list_splice(&ctx1->dsd_list, &ha->gbl_dsd_list); ha 773 drivers/scsi/qla2xxx/qla_os.c ha->gbl_dsd_inuse -= ctx1->dsd_use_cnt; ha 774 drivers/scsi/qla2xxx/qla_os.c ha->gbl_dsd_avail += ctx1->dsd_use_cnt; ha 775 drivers/scsi/qla2xxx/qla_os.c mempool_free(ctx1, ha->ctx_mempool); ha 782 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->dl_dma_pool, ctx0, ctx0->crc_ctx_dma); ha 806 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 807 drivers/scsi/qla2xxx/qla_os.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 817 drivers/scsi/qla2xxx/qla_os.c if (ha->mqenable) { ha 824 drivers/scsi/qla2xxx/qla_os.c qpair = ha->queue_pair_map[hwq]; ha 830 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.eeh_busy) { ha 831 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.pci_channel_io_perm_failure) { ha 901 drivers/scsi/qla2xxx/qla_os.c rval = ha->isp_ops->start_scsi(sp); ha 930 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 931 drivers/scsi/qla2xxx/qla_os.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 982 drivers/scsi/qla2xxx/qla_os.c rval = ha->isp_ops->start_scsi_mq(sp); ha 1029 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1032 drivers/scsi/qla2xxx/qla_os.c if (unlikely(pci_channel_offline(ha->pdev)) || ha->flags.eeh_busy) { ha 1069 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1070 drivers/scsi/qla2xxx/qla_os.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 1076 drivers/scsi/qla2xxx/qla_os.c ha->dpc_active) && time_before(jiffies, wait_online)) { ha 1090 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1094 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 1099 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 1139 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1140 drivers/scsi/qla2xxx/qla_os.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 1142 drivers/scsi/qla2xxx/qla_os.c while ((qla2x00_reset_active(vha) || ha->dpc_active || ha 1143 drivers/scsi/qla2xxx/qla_os.c ha->flags.mbox_busy) || ha 1157 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1158 drivers/scsi/qla2xxx/qla_os.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 1164 drivers/scsi/qla2xxx/qla_os.c ha->dpc_active) && time_before(jiffies, wait_reset)) { ha 1169 drivers/scsi/qla2xxx/qla_os.c ha->flags.chip_reset_done) ha 1172 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.chip_reset_done) ha 1197 drivers/scsi/qla2xxx/qla_os.c uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha) ha 1199 drivers/scsi/qla2xxx/qla_os.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 1200 drivers/scsi/qla2xxx/qla_os.c struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82; ha 1202 drivers/scsi/qla2xxx/qla_os.c if (IS_P3P_TYPE(ha)) ha 1234 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1239 drivers/scsi/qla2xxx/qla_os.c if (qla2x00_isp_reg_stat(ha)) { ha 1283 drivers/scsi/qla2xxx/qla_os.c rval = ha->isp_ops->abort_command(sp); ha 1289 drivers/scsi/qla2xxx/qla_os.c ratov_j = ha->r_a_tov/10 * 4 * 1000; ha 1296 drivers/scsi/qla2xxx/qla_os.c __func__, ha->r_a_tov/10); ha 1325 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1332 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1360 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1362 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1364 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1438 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1440 drivers/scsi/qla2xxx/qla_os.c if (qla2x00_isp_reg_stat(ha)) { ha 1447 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops->lun_reset); ha 1454 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1456 drivers/scsi/qla2xxx/qla_os.c if (qla2x00_isp_reg_stat(ha)) { ha 1463 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops->target_reset); ha 1489 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1491 drivers/scsi/qla2xxx/qla_os.c if (qla2x00_isp_reg_stat(ha)) { ha 1562 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1566 drivers/scsi/qla2xxx/qla_os.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 1568 drivers/scsi/qla2xxx/qla_os.c if (qla2x00_isp_reg_stat(ha)) { ha 1571 drivers/scsi/qla2xxx/qla_os.c schedule_work(&ha->board_disable); ha 1585 drivers/scsi/qla2xxx/qla_os.c if (qla2x00_reset_active(vha) || ha->optrom_state != QLA_SWAITING) ha 1600 drivers/scsi/qla2xxx/qla_os.c if (ha->wq) ha 1601 drivers/scsi/qla2xxx/qla_os.c flush_workqueue(ha->wq); ha 1604 drivers/scsi/qla2xxx/qla_os.c if (ha->isp_ops->abort_isp(base_vha)) { ha 1646 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1648 drivers/scsi/qla2xxx/qla_os.c if (IS_QLAFX00(ha)) { ha 1652 drivers/scsi/qla2xxx/qla_os.c if (ql2xtargetreset == 1 && ha->flags.enable_target_reset) { ha 1657 drivers/scsi/qla2xxx/qla_os.c ret = ha->isp_ops->target_reset(fcport, 0, 0); ha 1667 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.enable_lip_full_login && !IS_CNA_CAPABLE(ha)) { ha 1678 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.enable_lip_reset) { ha 1698 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1709 drivers/scsi/qla2xxx/qla_os.c (sp->type == SRB_SCSI_CMD && !ha->flags.eeh_busy && ha 1711 drivers/scsi/qla2xxx/qla_os.c !qla2x00_isp_reg_stat(ha))) { ha 1721 drivers/scsi/qla2xxx/qla_os.c rval = ha->isp_ops->abort_command(sp); ha 1724 drivers/scsi/qla2xxx/qla_os.c ratov_j = ha->r_a_tov/10 * 4 * 1000; ha 1731 drivers/scsi/qla2xxx/qla_os.c __func__, ha->r_a_tov/10); ha 1756 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1761 drivers/scsi/qla2xxx/qla_os.c if (!ha->req_q_map) ha 1799 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 1802 drivers/scsi/qla2xxx/qla_os.c if (!ha->base_qpair) ha 1804 drivers/scsi/qla2xxx/qla_os.c __qla2x00_abort_all_cmds(ha->base_qpair, res); ha 1806 drivers/scsi/qla2xxx/qla_os.c if (!ha->queue_pair_map) ha 1808 drivers/scsi/qla2xxx/qla_os.c for (que = 0; que < ha->max_qpairs; que++) { ha 1809 drivers/scsi/qla2xxx/qla_os.c if (!ha->queue_pair_map[que]) ha 1812 drivers/scsi/qla2xxx/qla_os.c __qla2x00_abort_all_cmds(ha->queue_pair_map[que], res); ha 1856 drivers/scsi/qla2xxx/qla_os.c qla2x00_config_dma_addressing(struct qla_hw_data *ha) ha 1859 drivers/scsi/qla2xxx/qla_os.c ha->flags.enable_64bit_addressing = 0; ha 1861 drivers/scsi/qla2xxx/qla_os.c if (!dma_set_mask(&ha->pdev->dev, DMA_BIT_MASK(64))) { ha 1863 drivers/scsi/qla2xxx/qla_os.c if (MSD(dma_get_required_mask(&ha->pdev->dev)) && ha 1864 drivers/scsi/qla2xxx/qla_os.c !pci_set_consistent_dma_mask(ha->pdev, DMA_BIT_MASK(64))) { ha 1866 drivers/scsi/qla2xxx/qla_os.c ha->flags.enable_64bit_addressing = 1; ha 1867 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops->calc_req_entries = qla2x00_calc_iocbs_64; ha 1868 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops->build_iocbs = qla2x00_build_scsi_iocbs_64; ha 1873 drivers/scsi/qla2xxx/qla_os.c dma_set_mask(&ha->pdev->dev, DMA_BIT_MASK(32)); ha 1874 drivers/scsi/qla2xxx/qla_os.c pci_set_consistent_dma_mask(ha->pdev, DMA_BIT_MASK(32)); ha 1878 drivers/scsi/qla2xxx/qla_os.c qla2x00_enable_intrs(struct qla_hw_data *ha) ha 1881 drivers/scsi/qla2xxx/qla_os.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 1883 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1884 drivers/scsi/qla2xxx/qla_os.c ha->interrupts_on = 1; ha 1888 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1893 drivers/scsi/qla2xxx/qla_os.c qla2x00_disable_intrs(struct qla_hw_data *ha) ha 1896 drivers/scsi/qla2xxx/qla_os.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 1898 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1899 drivers/scsi/qla2xxx/qla_os.c ha->interrupts_on = 0; ha 1903 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1907 drivers/scsi/qla2xxx/qla_os.c qla24xx_enable_intrs(struct qla_hw_data *ha) ha 1910 drivers/scsi/qla2xxx/qla_os.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 1912 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1913 drivers/scsi/qla2xxx/qla_os.c ha->interrupts_on = 1; ha 1916 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1920 drivers/scsi/qla2xxx/qla_os.c qla24xx_disable_intrs(struct qla_hw_data *ha) ha 1923 drivers/scsi/qla2xxx/qla_os.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 1925 drivers/scsi/qla2xxx/qla_os.c if (IS_NOPOLLING_TYPE(ha)) ha 1927 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1928 drivers/scsi/qla2xxx/qla_os.c ha->interrupts_on = 0; ha 1931 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1935 drivers/scsi/qla2xxx/qla_os.c qla2x00_iospace_config(struct qla_hw_data *ha) ha 1940 drivers/scsi/qla2xxx/qla_os.c if (pci_request_selected_regions(ha->pdev, ha->bars, ha 1942 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x0011, ha 1944 drivers/scsi/qla2xxx/qla_os.c pci_name(ha->pdev)); ha 1947 drivers/scsi/qla2xxx/qla_os.c if (!(ha->bars & 1)) ha 1951 drivers/scsi/qla2xxx/qla_os.c pio = pci_resource_start(ha->pdev, 0); ha 1952 drivers/scsi/qla2xxx/qla_os.c if (pci_resource_flags(ha->pdev, 0) & IORESOURCE_IO) { ha 1953 drivers/scsi/qla2xxx/qla_os.c if (pci_resource_len(ha->pdev, 0) < MIN_IOBASE_LEN) { ha 1954 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_warn, ha->pdev, 0x0012, ha 1956 drivers/scsi/qla2xxx/qla_os.c pci_name(ha->pdev)); ha 1960 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_warn, ha->pdev, 0x0013, ha 1962 drivers/scsi/qla2xxx/qla_os.c pci_name(ha->pdev)); ha 1965 drivers/scsi/qla2xxx/qla_os.c ha->pio_address = pio; ha 1966 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0014, ha 1968 drivers/scsi/qla2xxx/qla_os.c (unsigned long long)ha->pio_address); ha 1972 drivers/scsi/qla2xxx/qla_os.c if (!(pci_resource_flags(ha->pdev, 1) & IORESOURCE_MEM)) { ha 1973 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x0015, ha 1975 drivers/scsi/qla2xxx/qla_os.c pci_name(ha->pdev)); ha 1978 drivers/scsi/qla2xxx/qla_os.c if (pci_resource_len(ha->pdev, 1) < MIN_IOBASE_LEN) { ha 1979 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x0016, ha 1981 drivers/scsi/qla2xxx/qla_os.c pci_name(ha->pdev)); ha 1985 drivers/scsi/qla2xxx/qla_os.c ha->iobase = ioremap(pci_resource_start(ha->pdev, 1), MIN_IOBASE_LEN); ha 1986 drivers/scsi/qla2xxx/qla_os.c if (!ha->iobase) { ha 1987 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x0017, ha 1989 drivers/scsi/qla2xxx/qla_os.c pci_name(ha->pdev)); ha 1994 drivers/scsi/qla2xxx/qla_os.c ha->max_req_queues = ha->max_rsp_queues = 1; ha 1995 drivers/scsi/qla2xxx/qla_os.c ha->msix_count = QLA_BASE_VECTORS; ha 1997 drivers/scsi/qla2xxx/qla_os.c (!IS_QLA25XX(ha) && !IS_QLA81XX(ha))) ha 2000 drivers/scsi/qla2xxx/qla_os.c ha->mqiobase = ioremap(pci_resource_start(ha->pdev, 3), ha 2001 drivers/scsi/qla2xxx/qla_os.c pci_resource_len(ha->pdev, 3)); ha 2002 drivers/scsi/qla2xxx/qla_os.c if (ha->mqiobase) { ha 2003 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0018, ha 2004 drivers/scsi/qla2xxx/qla_os.c "MQIO Base=%p.\n", ha->mqiobase); ha 2006 drivers/scsi/qla2xxx/qla_os.c pci_read_config_word(ha->pdev, QLA_PCI_MSIX_CONTROL, &msix); ha 2007 drivers/scsi/qla2xxx/qla_os.c ha->msix_count = msix + 1; ha 2010 drivers/scsi/qla2xxx/qla_os.c ha->max_req_queues = ha->msix_count - 1; ha 2011 drivers/scsi/qla2xxx/qla_os.c ha->max_rsp_queues = ha->max_req_queues; ha 2013 drivers/scsi/qla2xxx/qla_os.c ha->max_qpairs = ha->max_rsp_queues - 1; ha 2014 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0188, ha 2015 drivers/scsi/qla2xxx/qla_os.c "Max no of queues pairs: %d.\n", ha->max_qpairs); ha 2017 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_info, ha->pdev, 0x001a, ha 2018 drivers/scsi/qla2xxx/qla_os.c "MSI-X vector count: %d.\n", ha->msix_count); ha 2020 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_info, ha->pdev, 0x001b, ha 2024 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x001c, ha 2025 drivers/scsi/qla2xxx/qla_os.c "MSIX Count: %d.\n", ha->msix_count); ha 2034 drivers/scsi/qla2xxx/qla_os.c qla83xx_iospace_config(struct qla_hw_data *ha) ha 2038 drivers/scsi/qla2xxx/qla_os.c if (pci_request_selected_regions(ha->pdev, ha->bars, ha 2040 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x0117, ha 2042 drivers/scsi/qla2xxx/qla_os.c pci_name(ha->pdev)); ha 2048 drivers/scsi/qla2xxx/qla_os.c if (!(pci_resource_flags(ha->pdev, 0) & IORESOURCE_MEM)) { ha 2049 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_warn, ha->pdev, 0x0118, ha 2051 drivers/scsi/qla2xxx/qla_os.c pci_name(ha->pdev)); ha 2054 drivers/scsi/qla2xxx/qla_os.c if (pci_resource_len(ha->pdev, 0) < MIN_IOBASE_LEN) { ha 2055 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_warn, ha->pdev, 0x0119, ha 2057 drivers/scsi/qla2xxx/qla_os.c pci_name(ha->pdev)); ha 2061 drivers/scsi/qla2xxx/qla_os.c ha->iobase = ioremap(pci_resource_start(ha->pdev, 0), MIN_IOBASE_LEN); ha 2062 drivers/scsi/qla2xxx/qla_os.c if (!ha->iobase) { ha 2063 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x011a, ha 2065 drivers/scsi/qla2xxx/qla_os.c pci_name(ha->pdev)); ha 2072 drivers/scsi/qla2xxx/qla_os.c ha->max_req_queues = ha->max_rsp_queues = 1; ha 2073 drivers/scsi/qla2xxx/qla_os.c ha->msix_count = QLA_BASE_VECTORS; ha 2074 drivers/scsi/qla2xxx/qla_os.c ha->mqiobase = ioremap(pci_resource_start(ha->pdev, 4), ha 2075 drivers/scsi/qla2xxx/qla_os.c pci_resource_len(ha->pdev, 4)); ha 2077 drivers/scsi/qla2xxx/qla_os.c if (!ha->mqiobase) { ha 2078 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x011d, ha 2083 drivers/scsi/qla2xxx/qla_os.c ha->msixbase = ioremap(pci_resource_start(ha->pdev, 2), ha 2084 drivers/scsi/qla2xxx/qla_os.c pci_resource_len(ha->pdev, 2)); ha 2085 drivers/scsi/qla2xxx/qla_os.c if (ha->msixbase) { ha 2087 drivers/scsi/qla2xxx/qla_os.c pci_read_config_word(ha->pdev, ha 2089 drivers/scsi/qla2xxx/qla_os.c ha->msix_count = (msix & PCI_MSIX_FLAGS_QSIZE) + 1; ha 2096 drivers/scsi/qla2xxx/qla_os.c ha->max_req_queues = ha->msix_count - 1; ha 2100 drivers/scsi/qla2xxx/qla_os.c ha->max_req_queues--; ha 2102 drivers/scsi/qla2xxx/qla_os.c ha->max_rsp_queues = ha->max_req_queues; ha 2106 drivers/scsi/qla2xxx/qla_os.c ha->max_qpairs = ha->max_req_queues - 1; ha 2107 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x00e3, ha 2108 drivers/scsi/qla2xxx/qla_os.c "Max no of queues pairs: %d.\n", ha->max_qpairs); ha 2110 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_info, ha->pdev, 0x011c, ha 2111 drivers/scsi/qla2xxx/qla_os.c "MSI-X vector count: %d.\n", ha->msix_count); ha 2113 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_info, ha->pdev, 0x011e, ha 2117 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x011f, ha 2118 drivers/scsi/qla2xxx/qla_os.c "MSIX Count: %d.\n", ha->msix_count); ha 2516 drivers/scsi/qla2xxx/qla_os.c qla2x00_set_isp_flags(struct qla_hw_data *ha) ha 2518 drivers/scsi/qla2xxx/qla_os.c ha->device_type = DT_EXTENDED_IDS; ha 2519 drivers/scsi/qla2xxx/qla_os.c switch (ha->pdev->device) { ha 2521 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2100; ha 2522 drivers/scsi/qla2xxx/qla_os.c ha->device_type &= ~DT_EXTENDED_IDS; ha 2523 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2100; ha 2526 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2200; ha 2527 drivers/scsi/qla2xxx/qla_os.c ha->device_type &= ~DT_EXTENDED_IDS; ha 2528 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2100; ha 2531 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2300; ha 2532 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2533 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2300; ha 2536 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2312; ha 2537 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2538 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2300; ha 2541 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2322; ha 2542 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2543 drivers/scsi/qla2xxx/qla_os.c if (ha->pdev->subsystem_vendor == 0x1028 && ha 2544 drivers/scsi/qla2xxx/qla_os.c ha->pdev->subsystem_device == 0x0170) ha 2545 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_OEM_001; ha 2546 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2300; ha 2549 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP6312; ha 2550 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2300; ha 2553 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP6322; ha 2554 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2300; ha 2557 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2422; ha 2558 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2559 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2560 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_IIDMA; ha 2561 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2564 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2432; ha 2565 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2566 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2567 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_IIDMA; ha 2568 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2571 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP8432; ha 2572 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2573 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2574 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_IIDMA; ha 2575 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2578 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP5422; ha 2579 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2580 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2583 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP5432; ha 2584 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2585 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2588 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2532; ha 2589 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2590 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2591 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_IIDMA; ha 2592 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2595 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP8001; ha 2596 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2597 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2598 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_IIDMA; ha 2599 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2602 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP8021; ha 2603 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2604 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2605 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2607 drivers/scsi/qla2xxx/qla_os.c qla82xx_init_flags(ha); ha 2610 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP8044; ha 2611 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2612 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2613 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2615 drivers/scsi/qla2xxx/qla_os.c qla82xx_init_flags(ha); ha 2618 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2031; ha 2619 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2620 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2621 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_IIDMA; ha 2622 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_T10_PI; ha 2623 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2626 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP8031; ha 2627 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2628 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2629 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_IIDMA; ha 2630 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_T10_PI; ha 2631 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2634 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISPFX00; ha 2637 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2071; ha 2638 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2639 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2640 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_IIDMA; ha 2641 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_T10_PI; ha 2642 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2645 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2271; ha 2646 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2647 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2648 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_IIDMA; ha 2649 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_T10_PI; ha 2650 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2653 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2261; ha 2654 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2655 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2656 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_IIDMA; ha 2657 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_T10_PI; ha 2658 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2662 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2081; ha 2663 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2664 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2665 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_IIDMA; ha 2666 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_T10_PI; ha 2667 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2671 drivers/scsi/qla2xxx/qla_os.c ha->isp_type |= DT_ISP2281; ha 2672 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_ZIO_SUPPORTED; ha 2673 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_FWI2; ha 2674 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_IIDMA; ha 2675 drivers/scsi/qla2xxx/qla_os.c ha->device_type |= DT_T10_PI; ha 2676 drivers/scsi/qla2xxx/qla_os.c ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha 2680 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA82XX(ha)) ha 2681 drivers/scsi/qla2xxx/qla_os.c ha->port_no = ha->portnum & 1; ha 2684 drivers/scsi/qla2xxx/qla_os.c pci_read_config_byte(ha->pdev, PCI_INTERRUPT_PIN, &ha->port_no); ha 2685 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA25XX(ha) || IS_QLA2031(ha) || ha 2686 drivers/scsi/qla2xxx/qla_os.c IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 2687 drivers/scsi/qla2xxx/qla_os.c ha->port_no--; ha 2689 drivers/scsi/qla2xxx/qla_os.c ha->port_no = !(ha->port_no & 1); ha 2692 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x000b, ha 2694 drivers/scsi/qla2xxx/qla_os.c ha->device_type, ha->port_no, ha->fw_srisc_address); ha 2730 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 2731 drivers/scsi/qla2xxx/qla_os.c struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); ha 2757 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha; ha 2811 drivers/scsi/qla2xxx/qla_os.c ha = kzalloc(sizeof(struct qla_hw_data), GFP_KERNEL); ha 2812 drivers/scsi/qla2xxx/qla_os.c if (!ha) { ha 2818 drivers/scsi/qla2xxx/qla_os.c "Memory allocated for ha=%p.\n", ha); ha 2819 drivers/scsi/qla2xxx/qla_os.c ha->pdev = pdev; ha 2820 drivers/scsi/qla2xxx/qla_os.c INIT_LIST_HEAD(&ha->tgt.q_full_list); ha 2821 drivers/scsi/qla2xxx/qla_os.c spin_lock_init(&ha->tgt.q_full_lock); ha 2822 drivers/scsi/qla2xxx/qla_os.c spin_lock_init(&ha->tgt.sess_lock); ha 2823 drivers/scsi/qla2xxx/qla_os.c spin_lock_init(&ha->tgt.atio_lock); ha 2825 drivers/scsi/qla2xxx/qla_os.c atomic_set(&ha->nvme_active_aen_cnt, 0); ha 2828 drivers/scsi/qla2xxx/qla_os.c ha->bars = bars; ha 2829 drivers/scsi/qla2xxx/qla_os.c ha->mem_only = mem_only; ha 2830 drivers/scsi/qla2xxx/qla_os.c spin_lock_init(&ha->hardware_lock); ha 2831 drivers/scsi/qla2xxx/qla_os.c spin_lock_init(&ha->vport_slock); ha 2832 drivers/scsi/qla2xxx/qla_os.c mutex_init(&ha->selflogin_lock); ha 2833 drivers/scsi/qla2xxx/qla_os.c mutex_init(&ha->optrom_mutex); ha 2836 drivers/scsi/qla2xxx/qla_os.c qla2x00_set_isp_flags(ha); ha 2839 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA24XX(ha) || IS_QLA25XX(ha) || IS_QLA81XX(ha) || ha 2840 drivers/scsi/qla2xxx/qla_os.c IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 2843 drivers/scsi/qla2xxx/qla_os.c ha->prev_topology = 0; ha 2844 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_size = sizeof(init_cb_t); ha 2845 drivers/scsi/qla2xxx/qla_os.c ha->link_data_rate = PORT_SPEED_UNKNOWN; ha 2846 drivers/scsi/qla2xxx/qla_os.c ha->optrom_size = OPTROM_SIZE_2300; ha 2847 drivers/scsi/qla2xxx/qla_os.c ha->max_exchg = FW_MAX_EXCHANGES_CNT; ha 2848 drivers/scsi/qla2xxx/qla_os.c atomic_set(&ha->num_pend_mbx_stage1, 0); ha 2849 drivers/scsi/qla2xxx/qla_os.c atomic_set(&ha->num_pend_mbx_stage2, 0); ha 2850 drivers/scsi/qla2xxx/qla_os.c atomic_set(&ha->num_pend_mbx_stage3, 0); ha 2851 drivers/scsi/qla2xxx/qla_os.c atomic_set(&ha->zio_threshold, DEFAULT_ZIO_THRESHOLD); ha 2852 drivers/scsi/qla2xxx/qla_os.c ha->last_zio_threshold = DEFAULT_ZIO_THRESHOLD; ha 2855 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA2100(ha)) { ha 2856 drivers/scsi/qla2xxx/qla_os.c ha->max_fibre_devices = MAX_FIBRE_DEVICES_2100; ha 2857 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count = MAILBOX_REGISTER_COUNT_2100; ha 2860 drivers/scsi/qla2xxx/qla_os.c ha->max_loop_id = SNS_LAST_LOOP_ID_2100; ha 2861 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_info_size = 4; ha 2862 drivers/scsi/qla2xxx/qla_os.c ha->flash_conf_off = ~0; ha 2863 drivers/scsi/qla2xxx/qla_os.c ha->flash_data_off = ~0; ha 2864 drivers/scsi/qla2xxx/qla_os.c ha->nvram_conf_off = ~0; ha 2865 drivers/scsi/qla2xxx/qla_os.c ha->nvram_data_off = ~0; ha 2866 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops = &qla2100_isp_ops; ha 2867 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA2200(ha)) { ha 2868 drivers/scsi/qla2xxx/qla_os.c ha->max_fibre_devices = MAX_FIBRE_DEVICES_2100; ha 2869 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count = MAILBOX_REGISTER_COUNT_2200; ha 2872 drivers/scsi/qla2xxx/qla_os.c ha->max_loop_id = SNS_LAST_LOOP_ID_2100; ha 2873 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_info_size = 4; ha 2874 drivers/scsi/qla2xxx/qla_os.c ha->flash_conf_off = ~0; ha 2875 drivers/scsi/qla2xxx/qla_os.c ha->flash_data_off = ~0; ha 2876 drivers/scsi/qla2xxx/qla_os.c ha->nvram_conf_off = ~0; ha 2877 drivers/scsi/qla2xxx/qla_os.c ha->nvram_data_off = ~0; ha 2878 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops = &qla2100_isp_ops; ha 2879 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA23XX(ha)) { ha 2880 drivers/scsi/qla2xxx/qla_os.c ha->max_fibre_devices = MAX_FIBRE_DEVICES_2100; ha 2881 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count = MAILBOX_REGISTER_COUNT; ha 2884 drivers/scsi/qla2xxx/qla_os.c ha->max_loop_id = SNS_LAST_LOOP_ID_2300; ha 2885 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_info_size = 6; ha 2886 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA2322(ha) || IS_QLA6322(ha)) ha 2887 drivers/scsi/qla2xxx/qla_os.c ha->optrom_size = OPTROM_SIZE_2322; ha 2888 drivers/scsi/qla2xxx/qla_os.c ha->flash_conf_off = ~0; ha 2889 drivers/scsi/qla2xxx/qla_os.c ha->flash_data_off = ~0; ha 2890 drivers/scsi/qla2xxx/qla_os.c ha->nvram_conf_off = ~0; ha 2891 drivers/scsi/qla2xxx/qla_os.c ha->nvram_data_off = ~0; ha 2892 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops = &qla2300_isp_ops; ha 2893 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA24XX_TYPE(ha)) { ha 2894 drivers/scsi/qla2xxx/qla_os.c ha->max_fibre_devices = MAX_FIBRE_DEVICES_2400; ha 2895 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count = MAILBOX_REGISTER_COUNT; ha 2898 drivers/scsi/qla2xxx/qla_os.c ha->tgt.atio_q_length = ATIO_ENTRY_CNT_24XX; ha 2899 drivers/scsi/qla2xxx/qla_os.c ha->max_loop_id = SNS_LAST_LOOP_ID_2300; ha 2900 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_size = sizeof(struct mid_init_cb_24xx); ha 2901 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_info_size = 8; ha 2902 drivers/scsi/qla2xxx/qla_os.c ha->optrom_size = OPTROM_SIZE_24XX; ha 2903 drivers/scsi/qla2xxx/qla_os.c ha->nvram_npiv_size = QLA_MAX_VPORTS_QLA24XX; ha 2904 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops = &qla24xx_isp_ops; ha 2905 drivers/scsi/qla2xxx/qla_os.c ha->flash_conf_off = FARX_ACCESS_FLASH_CONF; ha 2906 drivers/scsi/qla2xxx/qla_os.c ha->flash_data_off = FARX_ACCESS_FLASH_DATA; ha 2907 drivers/scsi/qla2xxx/qla_os.c ha->nvram_conf_off = FARX_ACCESS_NVRAM_CONF; ha 2908 drivers/scsi/qla2xxx/qla_os.c ha->nvram_data_off = FARX_ACCESS_NVRAM_DATA; ha 2909 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA25XX(ha)) { ha 2910 drivers/scsi/qla2xxx/qla_os.c ha->max_fibre_devices = MAX_FIBRE_DEVICES_2400; ha 2911 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count = MAILBOX_REGISTER_COUNT; ha 2914 drivers/scsi/qla2xxx/qla_os.c ha->tgt.atio_q_length = ATIO_ENTRY_CNT_24XX; ha 2915 drivers/scsi/qla2xxx/qla_os.c ha->max_loop_id = SNS_LAST_LOOP_ID_2300; ha 2916 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_size = sizeof(struct mid_init_cb_24xx); ha 2917 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_info_size = 8; ha 2918 drivers/scsi/qla2xxx/qla_os.c ha->optrom_size = OPTROM_SIZE_25XX; ha 2919 drivers/scsi/qla2xxx/qla_os.c ha->nvram_npiv_size = QLA_MAX_VPORTS_QLA25XX; ha 2920 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops = &qla25xx_isp_ops; ha 2921 drivers/scsi/qla2xxx/qla_os.c ha->flash_conf_off = FARX_ACCESS_FLASH_CONF; ha 2922 drivers/scsi/qla2xxx/qla_os.c ha->flash_data_off = FARX_ACCESS_FLASH_DATA; ha 2923 drivers/scsi/qla2xxx/qla_os.c ha->nvram_conf_off = FARX_ACCESS_NVRAM_CONF; ha 2924 drivers/scsi/qla2xxx/qla_os.c ha->nvram_data_off = FARX_ACCESS_NVRAM_DATA; ha 2925 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA81XX(ha)) { ha 2926 drivers/scsi/qla2xxx/qla_os.c ha->max_fibre_devices = MAX_FIBRE_DEVICES_2400; ha 2927 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count = MAILBOX_REGISTER_COUNT; ha 2930 drivers/scsi/qla2xxx/qla_os.c ha->tgt.atio_q_length = ATIO_ENTRY_CNT_24XX; ha 2931 drivers/scsi/qla2xxx/qla_os.c ha->max_loop_id = SNS_LAST_LOOP_ID_2300; ha 2932 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_size = sizeof(struct mid_init_cb_81xx); ha 2933 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_info_size = 8; ha 2934 drivers/scsi/qla2xxx/qla_os.c ha->optrom_size = OPTROM_SIZE_81XX; ha 2935 drivers/scsi/qla2xxx/qla_os.c ha->nvram_npiv_size = QLA_MAX_VPORTS_QLA25XX; ha 2936 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops = &qla81xx_isp_ops; ha 2937 drivers/scsi/qla2xxx/qla_os.c ha->flash_conf_off = FARX_ACCESS_FLASH_CONF_81XX; ha 2938 drivers/scsi/qla2xxx/qla_os.c ha->flash_data_off = FARX_ACCESS_FLASH_DATA_81XX; ha 2939 drivers/scsi/qla2xxx/qla_os.c ha->nvram_conf_off = ~0; ha 2940 drivers/scsi/qla2xxx/qla_os.c ha->nvram_data_off = ~0; ha 2941 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA82XX(ha)) { ha 2942 drivers/scsi/qla2xxx/qla_os.c ha->max_fibre_devices = MAX_FIBRE_DEVICES_2400; ha 2943 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count = MAILBOX_REGISTER_COUNT; ha 2946 drivers/scsi/qla2xxx/qla_os.c ha->max_loop_id = SNS_LAST_LOOP_ID_2300; ha 2947 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_size = sizeof(struct mid_init_cb_81xx); ha 2948 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_info_size = 8; ha 2949 drivers/scsi/qla2xxx/qla_os.c ha->optrom_size = OPTROM_SIZE_82XX; ha 2950 drivers/scsi/qla2xxx/qla_os.c ha->nvram_npiv_size = QLA_MAX_VPORTS_QLA25XX; ha 2951 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops = &qla82xx_isp_ops; ha 2952 drivers/scsi/qla2xxx/qla_os.c ha->flash_conf_off = FARX_ACCESS_FLASH_CONF; ha 2953 drivers/scsi/qla2xxx/qla_os.c ha->flash_data_off = FARX_ACCESS_FLASH_DATA; ha 2954 drivers/scsi/qla2xxx/qla_os.c ha->nvram_conf_off = FARX_ACCESS_NVRAM_CONF; ha 2955 drivers/scsi/qla2xxx/qla_os.c ha->nvram_data_off = FARX_ACCESS_NVRAM_DATA; ha 2956 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA8044(ha)) { ha 2957 drivers/scsi/qla2xxx/qla_os.c ha->max_fibre_devices = MAX_FIBRE_DEVICES_2400; ha 2958 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count = MAILBOX_REGISTER_COUNT; ha 2961 drivers/scsi/qla2xxx/qla_os.c ha->max_loop_id = SNS_LAST_LOOP_ID_2300; ha 2962 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_size = sizeof(struct mid_init_cb_81xx); ha 2963 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_info_size = 8; ha 2964 drivers/scsi/qla2xxx/qla_os.c ha->optrom_size = OPTROM_SIZE_83XX; ha 2965 drivers/scsi/qla2xxx/qla_os.c ha->nvram_npiv_size = QLA_MAX_VPORTS_QLA25XX; ha 2966 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops = &qla8044_isp_ops; ha 2967 drivers/scsi/qla2xxx/qla_os.c ha->flash_conf_off = FARX_ACCESS_FLASH_CONF; ha 2968 drivers/scsi/qla2xxx/qla_os.c ha->flash_data_off = FARX_ACCESS_FLASH_DATA; ha 2969 drivers/scsi/qla2xxx/qla_os.c ha->nvram_conf_off = FARX_ACCESS_NVRAM_CONF; ha 2970 drivers/scsi/qla2xxx/qla_os.c ha->nvram_data_off = FARX_ACCESS_NVRAM_DATA; ha 2971 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA83XX(ha)) { ha 2972 drivers/scsi/qla2xxx/qla_os.c ha->portnum = PCI_FUNC(ha->pdev->devfn); ha 2973 drivers/scsi/qla2xxx/qla_os.c ha->max_fibre_devices = MAX_FIBRE_DEVICES_2400; ha 2974 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count = MAILBOX_REGISTER_COUNT; ha 2977 drivers/scsi/qla2xxx/qla_os.c ha->tgt.atio_q_length = ATIO_ENTRY_CNT_24XX; ha 2978 drivers/scsi/qla2xxx/qla_os.c ha->max_loop_id = SNS_LAST_LOOP_ID_2300; ha 2979 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_size = sizeof(struct mid_init_cb_81xx); ha 2980 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_info_size = 8; ha 2981 drivers/scsi/qla2xxx/qla_os.c ha->optrom_size = OPTROM_SIZE_83XX; ha 2982 drivers/scsi/qla2xxx/qla_os.c ha->nvram_npiv_size = QLA_MAX_VPORTS_QLA25XX; ha 2983 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops = &qla83xx_isp_ops; ha 2984 drivers/scsi/qla2xxx/qla_os.c ha->flash_conf_off = FARX_ACCESS_FLASH_CONF_81XX; ha 2985 drivers/scsi/qla2xxx/qla_os.c ha->flash_data_off = FARX_ACCESS_FLASH_DATA_81XX; ha 2986 drivers/scsi/qla2xxx/qla_os.c ha->nvram_conf_off = ~0; ha 2987 drivers/scsi/qla2xxx/qla_os.c ha->nvram_data_off = ~0; ha 2988 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLAFX00(ha)) { ha 2989 drivers/scsi/qla2xxx/qla_os.c ha->max_fibre_devices = MAX_FIBRE_DEVICES_FX00; ha 2990 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count = MAILBOX_REGISTER_COUNT_FX00; ha 2991 drivers/scsi/qla2xxx/qla_os.c ha->aen_mbx_count = AEN_MAILBOX_REGISTER_COUNT_FX00; ha 2994 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops = &qlafx00_isp_ops; ha 2995 drivers/scsi/qla2xxx/qla_os.c ha->port_down_retry_count = 30; /* default value */ ha 2996 drivers/scsi/qla2xxx/qla_os.c ha->mr.fw_hbt_cnt = QLAFX00_HEARTBEAT_INTERVAL; ha 2997 drivers/scsi/qla2xxx/qla_os.c ha->mr.fw_reset_timer_tick = QLAFX00_RESET_INTERVAL; ha 2998 drivers/scsi/qla2xxx/qla_os.c ha->mr.fw_critemp_timer_tick = QLAFX00_CRITEMP_INTERVAL; ha 2999 drivers/scsi/qla2xxx/qla_os.c ha->mr.fw_hbt_en = 1; ha 3000 drivers/scsi/qla2xxx/qla_os.c ha->mr.host_info_resend = false; ha 3001 drivers/scsi/qla2xxx/qla_os.c ha->mr.hinfo_resend_timer_tick = QLAFX00_HINFO_RESEND_INTERVAL; ha 3002 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA27XX(ha)) { ha 3003 drivers/scsi/qla2xxx/qla_os.c ha->portnum = PCI_FUNC(ha->pdev->devfn); ha 3004 drivers/scsi/qla2xxx/qla_os.c ha->max_fibre_devices = MAX_FIBRE_DEVICES_2400; ha 3005 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count = MAILBOX_REGISTER_COUNT; ha 3008 drivers/scsi/qla2xxx/qla_os.c ha->tgt.atio_q_length = ATIO_ENTRY_CNT_24XX; ha 3009 drivers/scsi/qla2xxx/qla_os.c ha->max_loop_id = SNS_LAST_LOOP_ID_2300; ha 3010 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_size = sizeof(struct mid_init_cb_81xx); ha 3011 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_info_size = 8; ha 3012 drivers/scsi/qla2xxx/qla_os.c ha->optrom_size = OPTROM_SIZE_83XX; ha 3013 drivers/scsi/qla2xxx/qla_os.c ha->nvram_npiv_size = QLA_MAX_VPORTS_QLA25XX; ha 3014 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops = &qla27xx_isp_ops; ha 3015 drivers/scsi/qla2xxx/qla_os.c ha->flash_conf_off = FARX_ACCESS_FLASH_CONF_81XX; ha 3016 drivers/scsi/qla2xxx/qla_os.c ha->flash_data_off = FARX_ACCESS_FLASH_DATA_81XX; ha 3017 drivers/scsi/qla2xxx/qla_os.c ha->nvram_conf_off = ~0; ha 3018 drivers/scsi/qla2xxx/qla_os.c ha->nvram_data_off = ~0; ha 3019 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA28XX(ha)) { ha 3020 drivers/scsi/qla2xxx/qla_os.c ha->portnum = PCI_FUNC(ha->pdev->devfn); ha 3021 drivers/scsi/qla2xxx/qla_os.c ha->max_fibre_devices = MAX_FIBRE_DEVICES_2400; ha 3022 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count = MAILBOX_REGISTER_COUNT; ha 3025 drivers/scsi/qla2xxx/qla_os.c ha->tgt.atio_q_length = ATIO_ENTRY_CNT_24XX; ha 3026 drivers/scsi/qla2xxx/qla_os.c ha->max_loop_id = SNS_LAST_LOOP_ID_2300; ha 3027 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_size = sizeof(struct mid_init_cb_81xx); ha 3028 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_info_size = 8; ha 3029 drivers/scsi/qla2xxx/qla_os.c ha->optrom_size = OPTROM_SIZE_28XX; ha 3030 drivers/scsi/qla2xxx/qla_os.c ha->nvram_npiv_size = QLA_MAX_VPORTS_QLA25XX; ha 3031 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops = &qla27xx_isp_ops; ha 3032 drivers/scsi/qla2xxx/qla_os.c ha->flash_conf_off = FARX_ACCESS_FLASH_CONF_28XX; ha 3033 drivers/scsi/qla2xxx/qla_os.c ha->flash_data_off = FARX_ACCESS_FLASH_DATA_28XX; ha 3034 drivers/scsi/qla2xxx/qla_os.c ha->nvram_conf_off = ~0; ha 3035 drivers/scsi/qla2xxx/qla_os.c ha->nvram_data_off = ~0; ha 3043 drivers/scsi/qla2xxx/qla_os.c ha->mbx_count, req_length, rsp_length, ha->max_loop_id, ha 3044 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_size, ha->gid_list_info_size, ha->optrom_size, ha 3045 drivers/scsi/qla2xxx/qla_os.c ha->nvram_npiv_size, ha->max_fibre_devices); ha 3049 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops, ha->flash_conf_off, ha->flash_data_off, ha 3050 drivers/scsi/qla2xxx/qla_os.c ha->nvram_conf_off, ha->nvram_data_off); ha 3053 drivers/scsi/qla2xxx/qla_os.c ret = ha->isp_ops->iospace_config(ha); ha 3059 drivers/scsi/qla2xxx/qla_os.c pdev->device, pdev->irq, ha->iobase); ha 3060 drivers/scsi/qla2xxx/qla_os.c mutex_init(&ha->vport_lock); ha 3061 drivers/scsi/qla2xxx/qla_os.c mutex_init(&ha->mq_lock); ha 3062 drivers/scsi/qla2xxx/qla_os.c init_completion(&ha->mbx_cmd_comp); ha 3063 drivers/scsi/qla2xxx/qla_os.c complete(&ha->mbx_cmd_comp); ha 3064 drivers/scsi/qla2xxx/qla_os.c init_completion(&ha->mbx_intr_comp); ha 3065 drivers/scsi/qla2xxx/qla_os.c init_completion(&ha->dcbx_comp); ha 3066 drivers/scsi/qla2xxx/qla_os.c init_completion(&ha->lb_portup_comp); ha 3068 drivers/scsi/qla2xxx/qla_os.c set_bit(0, (unsigned long *) ha->vp_idx_map); ha 3070 drivers/scsi/qla2xxx/qla_os.c qla2x00_config_dma_addressing(ha); ha 3073 drivers/scsi/qla2xxx/qla_os.c ha->flags.enable_64bit_addressing ? "enable" : ha 3075 drivers/scsi/qla2xxx/qla_os.c ret = qla2x00_mem_alloc(ha, req_length, rsp_length, &req, &rsp); ha 3088 drivers/scsi/qla2xxx/qla_os.c base_vha = qla2x00_create_host(sht, ha); ha 3099 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA2XXX_MIDTYPE(ha)) ha 3107 drivers/scsi/qla2xxx/qla_os.c ha->mr.fcport.vha = base_vha; ha 3108 drivers/scsi/qla2xxx/qla_os.c ha->mr.fcport.port_type = FCT_UNKNOWN; ha 3109 drivers/scsi/qla2xxx/qla_os.c ha->mr.fcport.loop_id = FC_NO_LOOP_ID; ha 3110 drivers/scsi/qla2xxx/qla_os.c qla2x00_set_fcport_state(&ha->mr.fcport, FCS_UNCONFIGURED); ha 3111 drivers/scsi/qla2xxx/qla_os.c ha->mr.fcport.supported_classes = FC_COS_UNSPECIFIED; ha 3112 drivers/scsi/qla2xxx/qla_os.c ha->mr.fcport.scan_state = 1; ha 3115 drivers/scsi/qla2xxx/qla_os.c if (!IS_FWI2_CAPABLE(ha)) { ha 3116 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA2100(ha)) ha 3119 drivers/scsi/qla2xxx/qla_os.c if (!IS_QLA82XX(ha)) ha 3122 drivers/scsi/qla2xxx/qla_os.c host->max_id = ha->max_fibre_devices; ha 3125 drivers/scsi/qla2xxx/qla_os.c if (IS_T10_PI_CAPABLE(ha) && ql2xenabledif) ha 3131 drivers/scsi/qla2xxx/qla_os.c if (!IS_QLAFX00(ha) && !IS_FWI2_CAPABLE(ha) && ha 3150 drivers/scsi/qla2xxx/qla_os.c ret = qla2x00_request_irqs(ha, rsp); ha 3155 drivers/scsi/qla2xxx/qla_os.c ret = qla2x00_alloc_queues(ha, req, rsp); ha 3164 drivers/scsi/qla2xxx/qla_os.c if (ha->mqenable) { ha 3166 drivers/scsi/qla2xxx/qla_os.c host->nr_hw_queues = ha->max_qpairs; ha 3172 drivers/scsi/qla2xxx/qla_os.c host->nr_hw_queues = ha->max_qpairs; ha 3182 drivers/scsi/qla2xxx/qla_os.c qlt_probe_one_stage1(base_vha, ha); ha 3190 drivers/scsi/qla2xxx/qla_os.c if (IS_QLAFX00(ha)) { ha 3191 drivers/scsi/qla2xxx/qla_os.c ha->rsp_q_map[0] = rsp; ha 3192 drivers/scsi/qla2xxx/qla_os.c ha->req_q_map[0] = req; ha 3193 drivers/scsi/qla2xxx/qla_os.c set_bit(0, ha->req_qid_map); ha 3194 drivers/scsi/qla2xxx/qla_os.c set_bit(0, ha->rsp_qid_map); ha 3198 drivers/scsi/qla2xxx/qla_os.c req->req_q_in = &ha->iobase->isp24.req_q_in; ha 3199 drivers/scsi/qla2xxx/qla_os.c req->req_q_out = &ha->iobase->isp24.req_q_out; ha 3200 drivers/scsi/qla2xxx/qla_os.c rsp->rsp_q_in = &ha->iobase->isp24.rsp_q_in; ha 3201 drivers/scsi/qla2xxx/qla_os.c rsp->rsp_q_out = &ha->iobase->isp24.rsp_q_out; ha 3202 drivers/scsi/qla2xxx/qla_os.c if (ha->mqenable || IS_QLA83XX(ha) || IS_QLA27XX(ha) || ha 3203 drivers/scsi/qla2xxx/qla_os.c IS_QLA28XX(ha)) { ha 3204 drivers/scsi/qla2xxx/qla_os.c req->req_q_in = &ha->mqiobase->isp25mq.req_q_in; ha 3205 drivers/scsi/qla2xxx/qla_os.c req->req_q_out = &ha->mqiobase->isp25mq.req_q_out; ha 3206 drivers/scsi/qla2xxx/qla_os.c rsp->rsp_q_in = &ha->mqiobase->isp25mq.rsp_q_in; ha 3207 drivers/scsi/qla2xxx/qla_os.c rsp->rsp_q_out = &ha->mqiobase->isp25mq.rsp_q_out; ha 3210 drivers/scsi/qla2xxx/qla_os.c if (IS_QLAFX00(ha)) { ha 3211 drivers/scsi/qla2xxx/qla_os.c req->req_q_in = &ha->iobase->ispfx00.req_q_in; ha 3212 drivers/scsi/qla2xxx/qla_os.c req->req_q_out = &ha->iobase->ispfx00.req_q_out; ha 3213 drivers/scsi/qla2xxx/qla_os.c rsp->rsp_q_in = &ha->iobase->ispfx00.rsp_q_in; ha 3214 drivers/scsi/qla2xxx/qla_os.c rsp->rsp_q_out = &ha->iobase->ispfx00.rsp_q_out; ha 3217 drivers/scsi/qla2xxx/qla_os.c if (IS_P3P_TYPE(ha)) { ha 3218 drivers/scsi/qla2xxx/qla_os.c req->req_q_out = &ha->iobase->isp82.req_q_out[0]; ha 3219 drivers/scsi/qla2xxx/qla_os.c rsp->rsp_q_in = &ha->iobase->isp82.rsp_q_in[0]; ha 3220 drivers/scsi/qla2xxx/qla_os.c rsp->rsp_q_out = &ha->iobase->isp82.rsp_q_out[0]; ha 3225 drivers/scsi/qla2xxx/qla_os.c ha->rsp_q_map, ha->req_q_map, rsp->req, req->rsp); ha 3233 drivers/scsi/qla2xxx/qla_os.c ha->rsp_q_map, ha->req_q_map, rsp->req, req->rsp); ha 3238 drivers/scsi/qla2xxx/qla_os.c ha->wq = alloc_workqueue("qla2xxx_wq", 0, 0); ha 3239 drivers/scsi/qla2xxx/qla_os.c if (unlikely(!ha->wq)) { ha 3244 drivers/scsi/qla2xxx/qla_os.c if (ha->isp_ops->initialize_adapter(base_vha)) { ha 3249 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA82XX(ha)) { ha 3250 drivers/scsi/qla2xxx/qla_os.c qla82xx_idc_lock(ha); ha 3251 drivers/scsi/qla2xxx/qla_os.c qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, ha 3253 drivers/scsi/qla2xxx/qla_os.c qla82xx_idc_unlock(ha); ha 3256 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA8044(ha)) { ha 3257 drivers/scsi/qla2xxx/qla_os.c qla8044_idc_lock(ha); ha 3261 drivers/scsi/qla2xxx/qla_os.c qla8044_idc_unlock(ha); ha 3270 drivers/scsi/qla2xxx/qla_os.c if (IS_QLAFX00(ha)) ha 3280 drivers/scsi/qla2xxx/qla_os.c if (ha->mqenable) { ha 3290 drivers/scsi/qla2xxx/qla_os.c for (i = 0; i < ha->max_qpairs; i++) ha 3294 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.running_gold_fw) ha 3300 drivers/scsi/qla2xxx/qla_os.c ha->dpc_thread = kthread_create(qla2x00_do_dpc, ha, ha 3302 drivers/scsi/qla2xxx/qla_os.c if (IS_ERR(ha->dpc_thread)) { ha 3305 drivers/scsi/qla2xxx/qla_os.c ret = PTR_ERR(ha->dpc_thread); ha 3306 drivers/scsi/qla2xxx/qla_os.c ha->dpc_thread = NULL; ha 3320 drivers/scsi/qla2xxx/qla_os.c INIT_WORK(&ha->board_disable, qla2x00_disable_board_on_pci_error); ha 3322 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA8031(ha) || IS_MCTP_CAPABLE(ha)) { ha 3324 drivers/scsi/qla2xxx/qla_os.c ha->dpc_lp_wq = create_singlethread_workqueue(wq_name); ha 3325 drivers/scsi/qla2xxx/qla_os.c INIT_WORK(&ha->idc_aen, qla83xx_service_idc_aen); ha 3328 drivers/scsi/qla2xxx/qla_os.c ha->dpc_hp_wq = create_singlethread_workqueue(wq_name); ha 3329 drivers/scsi/qla2xxx/qla_os.c INIT_WORK(&ha->nic_core_reset, qla83xx_nic_core_reset_work); ha 3330 drivers/scsi/qla2xxx/qla_os.c INIT_WORK(&ha->idc_state_handler, ha 3332 drivers/scsi/qla2xxx/qla_os.c INIT_WORK(&ha->nic_core_unrecoverable, ha 3337 drivers/scsi/qla2xxx/qla_os.c list_add_tail(&base_vha->list, &ha->vp_list); ha 3338 drivers/scsi/qla2xxx/qla_os.c base_vha->host->irq = ha->pdev->irq; ha 3347 drivers/scsi/qla2xxx/qla_os.c ha); ha 3349 drivers/scsi/qla2xxx/qla_os.c if (IS_T10_PI_CAPABLE(ha) && ql2xenabledif) { ha 3350 drivers/scsi/qla2xxx/qla_os.c if (ha->fw_attributes & BIT_4) { ha 3371 drivers/scsi/qla2xxx/qla_os.c if (IS_PI_IPGUARD_CAPABLE(ha) && ha 3372 drivers/scsi/qla2xxx/qla_os.c (ql2xenabledif > 1 || IS_PI_DIFB_DIX0_CAPABLE(ha))) ha 3383 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops->enable_intrs(ha); ha 3385 drivers/scsi/qla2xxx/qla_os.c if (IS_QLAFX00(ha)) { ha 3388 drivers/scsi/qla2xxx/qla_os.c host->sg_tablesize = (ha->mr.extended_io_enabled) ? ha 3398 drivers/scsi/qla2xxx/qla_os.c ha->prev_minidump_failed = 0; ha 3412 drivers/scsi/qla2xxx/qla_os.c if (IS_QLAFX00(ha)) { ha 3426 drivers/scsi/qla2xxx/qla_os.c "QLogic %s - %s.\n", ha->model_number, ha->model_desc); ha 3429 drivers/scsi/qla2xxx/qla_os.c pdev->device, ha->isp_ops->pci_info_str(base_vha, pci_info, ha 3431 drivers/scsi/qla2xxx/qla_os.c pci_name(pdev), ha->flags.enable_64bit_addressing ? '+' : '-', ha 3433 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops->fw_version_str(base_vha, fw_str, sizeof(fw_str))); ha 3435 drivers/scsi/qla2xxx/qla_os.c qlt_add_target(ha, base_vha); ha 3442 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.detected_lr_sfp) { ha 3453 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, base_vha->gnl.size, ha 3461 drivers/scsi/qla2xxx/qla_os.c if (ha->dpc_thread) { ha 3462 drivers/scsi/qla2xxx/qla_os.c struct task_struct *t = ha->dpc_thread; ha 3464 drivers/scsi/qla2xxx/qla_os.c ha->dpc_thread = NULL; ha 3480 drivers/scsi/qla2xxx/qla_os.c qla2x00_mem_free(ha); ha 3481 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_req_que(ha, req); ha 3482 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_rsp_que(ha, rsp); ha 3483 drivers/scsi/qla2xxx/qla_os.c qla2x00_clear_drv_active(ha); ha 3486 drivers/scsi/qla2xxx/qla_os.c if (IS_P3P_TYPE(ha)) { ha 3487 drivers/scsi/qla2xxx/qla_os.c if (!ha->nx_pcibase) ha 3488 drivers/scsi/qla2xxx/qla_os.c iounmap((device_reg_t *)ha->nx_pcibase); ha 3490 drivers/scsi/qla2xxx/qla_os.c iounmap((device_reg_t *)ha->nxdb_wr_ptr); ha 3492 drivers/scsi/qla2xxx/qla_os.c if (ha->iobase) ha 3493 drivers/scsi/qla2xxx/qla_os.c iounmap(ha->iobase); ha 3494 drivers/scsi/qla2xxx/qla_os.c if (ha->cregbase) ha 3495 drivers/scsi/qla2xxx/qla_os.c iounmap(ha->cregbase); ha 3497 drivers/scsi/qla2xxx/qla_os.c pci_release_selected_regions(ha->pdev, ha->bars); ha 3498 drivers/scsi/qla2xxx/qla_os.c kfree(ha); ha 3509 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha; ha 3512 drivers/scsi/qla2xxx/qla_os.c ha = vha->hw; ha 3522 drivers/scsi/qla2xxx/qla_os.c cancel_work_sync(&ha->board_disable); ha 3528 drivers/scsi/qla2xxx/qla_os.c if (IS_QLAFX00(ha)) ha 3532 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.fce_enabled) { ha 3534 drivers/scsi/qla2xxx/qla_os.c ha->flags.fce_enabled = 0; ha 3538 drivers/scsi/qla2xxx/qla_os.c if (ha->eft) ha 3541 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA25XX(ha) || IS_QLA2031(ha) || IS_QLA27XX(ha) || ha 3542 drivers/scsi/qla2xxx/qla_os.c IS_QLA28XX(ha)) { ha 3543 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.fw_started) ha 3558 drivers/scsi/qla2xxx/qla_os.c if (ha->interrupts_on) { ha 3560 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops->disable_intrs(ha); ha 3565 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_fw_dump(ha); ha 3574 drivers/scsi/qla2xxx/qla_os.c qla2x00_delete_all_vps(struct qla_hw_data *ha, scsi_qla_host_t *base_vha) ha 3579 drivers/scsi/qla2xxx/qla_os.c mutex_lock(&ha->vport_lock); ha 3580 drivers/scsi/qla2xxx/qla_os.c while (ha->cur_vport_count) { ha 3581 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->vport_slock, flags); ha 3583 drivers/scsi/qla2xxx/qla_os.c BUG_ON(base_vha->list.next == &ha->vp_list); ha 3588 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 3589 drivers/scsi/qla2xxx/qla_os.c mutex_unlock(&ha->vport_lock); ha 3596 drivers/scsi/qla2xxx/qla_os.c mutex_lock(&ha->vport_lock); ha 3598 drivers/scsi/qla2xxx/qla_os.c mutex_unlock(&ha->vport_lock); ha 3603 drivers/scsi/qla2xxx/qla_os.c qla2x00_destroy_deferred_work(struct qla_hw_data *ha) ha 3606 drivers/scsi/qla2xxx/qla_os.c if (ha->dpc_lp_wq) { ha 3607 drivers/scsi/qla2xxx/qla_os.c cancel_work_sync(&ha->idc_aen); ha 3608 drivers/scsi/qla2xxx/qla_os.c destroy_workqueue(ha->dpc_lp_wq); ha 3609 drivers/scsi/qla2xxx/qla_os.c ha->dpc_lp_wq = NULL; ha 3612 drivers/scsi/qla2xxx/qla_os.c if (ha->dpc_hp_wq) { ha 3613 drivers/scsi/qla2xxx/qla_os.c cancel_work_sync(&ha->nic_core_reset); ha 3614 drivers/scsi/qla2xxx/qla_os.c cancel_work_sync(&ha->idc_state_handler); ha 3615 drivers/scsi/qla2xxx/qla_os.c cancel_work_sync(&ha->nic_core_unrecoverable); ha 3616 drivers/scsi/qla2xxx/qla_os.c destroy_workqueue(ha->dpc_hp_wq); ha 3617 drivers/scsi/qla2xxx/qla_os.c ha->dpc_hp_wq = NULL; ha 3621 drivers/scsi/qla2xxx/qla_os.c if (ha->dpc_thread) { ha 3622 drivers/scsi/qla2xxx/qla_os.c struct task_struct *t = ha->dpc_thread; ha 3628 drivers/scsi/qla2xxx/qla_os.c ha->dpc_thread = NULL; ha 3634 drivers/scsi/qla2xxx/qla_os.c qla2x00_unmap_iobases(struct qla_hw_data *ha) ha 3636 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA82XX(ha)) { ha 3638 drivers/scsi/qla2xxx/qla_os.c iounmap((device_reg_t *)ha->nx_pcibase); ha 3640 drivers/scsi/qla2xxx/qla_os.c iounmap((device_reg_t *)ha->nxdb_wr_ptr); ha 3642 drivers/scsi/qla2xxx/qla_os.c if (ha->iobase) ha 3643 drivers/scsi/qla2xxx/qla_os.c iounmap(ha->iobase); ha 3645 drivers/scsi/qla2xxx/qla_os.c if (ha->cregbase) ha 3646 drivers/scsi/qla2xxx/qla_os.c iounmap(ha->cregbase); ha 3648 drivers/scsi/qla2xxx/qla_os.c if (ha->mqiobase) ha 3649 drivers/scsi/qla2xxx/qla_os.c iounmap(ha->mqiobase); ha 3651 drivers/scsi/qla2xxx/qla_os.c if ((IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) && ha 3652 drivers/scsi/qla2xxx/qla_os.c ha->msixbase) ha 3653 drivers/scsi/qla2xxx/qla_os.c iounmap(ha->msixbase); ha 3658 drivers/scsi/qla2xxx/qla_os.c qla2x00_clear_drv_active(struct qla_hw_data *ha) ha 3660 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA8044(ha)) { ha 3661 drivers/scsi/qla2xxx/qla_os.c qla8044_idc_lock(ha); ha 3662 drivers/scsi/qla2xxx/qla_os.c qla8044_clear_drv_active(ha); ha 3663 drivers/scsi/qla2xxx/qla_os.c qla8044_idc_unlock(ha); ha 3664 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA82XX(ha)) { ha 3665 drivers/scsi/qla2xxx/qla_os.c qla82xx_idc_lock(ha); ha 3666 drivers/scsi/qla2xxx/qla_os.c qla82xx_clear_drv_active(ha); ha 3667 drivers/scsi/qla2xxx/qla_os.c qla82xx_idc_unlock(ha); ha 3675 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha; ha 3678 drivers/scsi/qla2xxx/qla_os.c ha = base_vha->hw; ha 3685 drivers/scsi/qla2xxx/qla_os.c cancel_work_sync(&ha->board_disable); ha 3693 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, base_vha->gnl.size, ha 3697 drivers/scsi/qla2xxx/qla_os.c kfree(ha); ha 3710 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA25XX(ha) || IS_QLA2031(ha) || IS_QLA27XX(ha) || ha 3711 drivers/scsi/qla2xxx/qla_os.c IS_QLA28XX(ha)) { ha 3712 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.fw_started) ha 3714 drivers/scsi/qla2xxx/qla_os.c } else if (!IS_QLAFX00(ha)) { ha 3715 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA8031(ha)) { ha 3730 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ha 3737 drivers/scsi/qla2xxx/qla_os.c if (IS_QLAFX00(ha)) ha 3740 drivers/scsi/qla2xxx/qla_os.c qla2x00_delete_all_vps(ha, base_vha); ha 3753 drivers/scsi/qla2xxx/qla_os.c if (ha->exlogin_buf) ha 3754 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_exlogin_buffer(ha); ha 3757 drivers/scsi/qla2xxx/qla_os.c if (ha->exchoffld_buf) ha 3758 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_exchoffld_buffer(ha); ha 3760 drivers/scsi/qla2xxx/qla_os.c qla2x00_destroy_deferred_work(ha); ha 3762 drivers/scsi/qla2xxx/qla_os.c qlt_remove_target(ha, base_vha); ha 3767 drivers/scsi/qla2xxx/qla_os.c qlt_remove_target_resources(ha); ha 3773 drivers/scsi/qla2xxx/qla_os.c qla2x00_clear_drv_active(ha); ha 3777 drivers/scsi/qla2xxx/qla_os.c qla2x00_unmap_iobases(ha); ha 3779 drivers/scsi/qla2xxx/qla_os.c pci_release_selected_regions(ha->pdev, ha->bars); ha 3780 drivers/scsi/qla2xxx/qla_os.c kfree(ha); ha 3790 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 3802 drivers/scsi/qla2xxx/qla_os.c if (ha->interrupts_on) { ha 3804 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops->disable_intrs(ha); ha 3812 drivers/scsi/qla2xxx/qla_os.c if (ha->wq) { ha 3813 drivers/scsi/qla2xxx/qla_os.c flush_workqueue(ha->wq); ha 3814 drivers/scsi/qla2xxx/qla_os.c destroy_workqueue(ha->wq); ha 3815 drivers/scsi/qla2xxx/qla_os.c ha->wq = NULL; ha 3819 drivers/scsi/qla2xxx/qla_os.c qla2x00_mem_free(ha); ha 3823 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_queues(ha); ha 3948 drivers/scsi/qla2xxx/qla_os.c static void qla2x00_set_reserved_loop_ids(struct qla_hw_data *ha) ha 3952 drivers/scsi/qla2xxx/qla_os.c if (IS_FWI2_CAPABLE(ha)) ha 3956 drivers/scsi/qla2xxx/qla_os.c set_bit(i, ha->loop_id_map); ha 3957 drivers/scsi/qla2xxx/qla_os.c set_bit(MANAGEMENT_SERVER, ha->loop_id_map); ha 3958 drivers/scsi/qla2xxx/qla_os.c set_bit(BROADCAST, ha->loop_id_map); ha 3970 drivers/scsi/qla2xxx/qla_os.c qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, ha 3975 drivers/scsi/qla2xxx/qla_os.c ha->init_cb = dma_alloc_coherent(&ha->pdev->dev, ha->init_cb_size, ha 3976 drivers/scsi/qla2xxx/qla_os.c &ha->init_cb_dma, GFP_KERNEL); ha 3977 drivers/scsi/qla2xxx/qla_os.c if (!ha->init_cb) ha 3980 drivers/scsi/qla2xxx/qla_os.c if (qlt_mem_alloc(ha) < 0) ha 3983 drivers/scsi/qla2xxx/qla_os.c ha->gid_list = dma_alloc_coherent(&ha->pdev->dev, ha 3984 drivers/scsi/qla2xxx/qla_os.c qla2x00_gid_list_size(ha), &ha->gid_list_dma, GFP_KERNEL); ha 3985 drivers/scsi/qla2xxx/qla_os.c if (!ha->gid_list) ha 3988 drivers/scsi/qla2xxx/qla_os.c ha->srb_mempool = mempool_create_slab_pool(SRB_MIN_REQ, srb_cachep); ha 3989 drivers/scsi/qla2xxx/qla_os.c if (!ha->srb_mempool) ha 3992 drivers/scsi/qla2xxx/qla_os.c if (IS_P3P_TYPE(ha)) { ha 4001 drivers/scsi/qla2xxx/qla_os.c ha->ctx_mempool = mempool_create_slab_pool(SRB_MIN_REQ, ha 4003 drivers/scsi/qla2xxx/qla_os.c if (!ha->ctx_mempool) ha 4005 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0021, ha 4007 drivers/scsi/qla2xxx/qla_os.c ctx_cachep, ha->ctx_mempool); ha 4011 drivers/scsi/qla2xxx/qla_os.c ha->nvram = kzalloc(MAX_NVRAM_SIZE, GFP_KERNEL); ha 4012 drivers/scsi/qla2xxx/qla_os.c if (!ha->nvram) ha 4016 drivers/scsi/qla2xxx/qla_os.c ha->pdev->device); ha 4017 drivers/scsi/qla2xxx/qla_os.c ha->s_dma_pool = dma_pool_create(name, &ha->pdev->dev, ha 4019 drivers/scsi/qla2xxx/qla_os.c if (!ha->s_dma_pool) ha 4022 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0022, ha 4024 drivers/scsi/qla2xxx/qla_os.c ha->init_cb, ha->gid_list, ha->srb_mempool, ha->s_dma_pool); ha 4026 drivers/scsi/qla2xxx/qla_os.c if (IS_P3P_TYPE(ha) || ql2xenabledif) { ha 4027 drivers/scsi/qla2xxx/qla_os.c ha->dl_dma_pool = dma_pool_create(name, &ha->pdev->dev, ha 4029 drivers/scsi/qla2xxx/qla_os.c if (!ha->dl_dma_pool) { ha 4030 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x0023, ha 4035 drivers/scsi/qla2xxx/qla_os.c ha->fcp_cmnd_dma_pool = dma_pool_create(name, &ha->pdev->dev, ha 4037 drivers/scsi/qla2xxx/qla_os.c if (!ha->fcp_cmnd_dma_pool) { ha 4038 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x0024, ha 4048 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundl_pool = dma_pool_create(name, ha 4049 drivers/scsi/qla2xxx/qla_os.c &ha->pdev->dev, DIF_BUNDLING_DMA_POOL_SIZE, 8, 0); ha 4050 drivers/scsi/qla2xxx/qla_os.c if (!ha->dif_bundl_pool) { ha 4051 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0024, ha 4057 drivers/scsi/qla2xxx/qla_os.c INIT_LIST_HEAD(&ha->pool.good.head); ha 4058 drivers/scsi/qla2xxx/qla_os.c INIT_LIST_HEAD(&ha->pool.unusable.head); ha 4059 drivers/scsi/qla2xxx/qla_os.c ha->pool.good.count = 0; ha 4060 drivers/scsi/qla2xxx/qla_os.c ha->pool.unusable.count = 0; ha 4064 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, ha 4069 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundle_kallocs++; ha 4072 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundl_pool, GFP_ATOMIC, ha 4075 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, ha 4080 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundle_kallocs--; ha 4083 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundle_dma_allocs++; ha 4092 drivers/scsi/qla2xxx/qla_os.c &ha->pool.unusable.head); ha 4093 drivers/scsi/qla2xxx/qla_os.c ha->pool.unusable.count++; ha 4096 drivers/scsi/qla2xxx/qla_os.c &ha->pool.good.head); ha 4097 drivers/scsi/qla2xxx/qla_os.c ha->pool.good.count++; ha 4103 drivers/scsi/qla2xxx/qla_os.c &ha->pool.good.head, list) { ha 4105 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->dif_bundl_pool, ha 4107 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundle_dma_allocs--; ha 4109 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundle_kallocs--; ha 4112 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0024, ha 4114 drivers/scsi/qla2xxx/qla_os.c __func__, ha->pool.good.count, ha 4115 drivers/scsi/qla2xxx/qla_os.c ha->pool.unusable.count); ha 4118 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0025, ha 4120 drivers/scsi/qla2xxx/qla_os.c ha->dl_dma_pool, ha->fcp_cmnd_dma_pool, ha 4121 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundl_pool); ha 4125 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA2100(ha) || IS_QLA2200(ha)) { ha 4127 drivers/scsi/qla2xxx/qla_os.c ha->sns_cmd = dma_alloc_coherent(&ha->pdev->dev, ha 4128 drivers/scsi/qla2xxx/qla_os.c sizeof(struct sns_cmd_pkt), &ha->sns_cmd_dma, GFP_KERNEL); ha 4129 drivers/scsi/qla2xxx/qla_os.c if (!ha->sns_cmd) ha 4131 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0026, ha 4132 drivers/scsi/qla2xxx/qla_os.c "sns_cmd: %p.\n", ha->sns_cmd); ha 4135 drivers/scsi/qla2xxx/qla_os.c ha->ms_iocb = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, ha 4136 drivers/scsi/qla2xxx/qla_os.c &ha->ms_iocb_dma); ha 4137 drivers/scsi/qla2xxx/qla_os.c if (!ha->ms_iocb) ha 4140 drivers/scsi/qla2xxx/qla_os.c ha->ct_sns = dma_alloc_coherent(&ha->pdev->dev, ha 4141 drivers/scsi/qla2xxx/qla_os.c sizeof(struct ct_sns_pkt), &ha->ct_sns_dma, GFP_KERNEL); ha 4142 drivers/scsi/qla2xxx/qla_os.c if (!ha->ct_sns) ha 4144 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0027, ha 4146 drivers/scsi/qla2xxx/qla_os.c ha->ms_iocb, ha->ct_sns); ha 4152 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x0028, ha 4157 drivers/scsi/qla2xxx/qla_os.c (*req)->ring = dma_alloc_coherent(&ha->pdev->dev, ha 4161 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x0029, ha 4168 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x002a, ha 4172 drivers/scsi/qla2xxx/qla_os.c (*rsp)->hw = ha; ha 4174 drivers/scsi/qla2xxx/qla_os.c (*rsp)->ring = dma_alloc_coherent(&ha->pdev->dev, ha 4178 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x002b, ha 4184 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x002c, ha 4190 drivers/scsi/qla2xxx/qla_os.c if (ha->nvram_npiv_size) { ha 4191 drivers/scsi/qla2xxx/qla_os.c ha->npiv_info = kcalloc(ha->nvram_npiv_size, ha 4194 drivers/scsi/qla2xxx/qla_os.c if (!ha->npiv_info) { ha 4195 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x002d, ha 4200 drivers/scsi/qla2xxx/qla_os.c ha->npiv_info = NULL; ha 4203 drivers/scsi/qla2xxx/qla_os.c if (IS_CNA_CAPABLE(ha) || IS_QLA2031(ha) || IS_QLA27XX(ha) || ha 4204 drivers/scsi/qla2xxx/qla_os.c IS_QLA28XX(ha)) { ha 4205 drivers/scsi/qla2xxx/qla_os.c ha->ex_init_cb = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, ha 4206 drivers/scsi/qla2xxx/qla_os.c &ha->ex_init_cb_dma); ha 4207 drivers/scsi/qla2xxx/qla_os.c if (!ha->ex_init_cb) ha 4209 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x002e, ha 4210 drivers/scsi/qla2xxx/qla_os.c "ex_init_cb=%p.\n", ha->ex_init_cb); ha 4213 drivers/scsi/qla2xxx/qla_os.c INIT_LIST_HEAD(&ha->gbl_dsd_list); ha 4216 drivers/scsi/qla2xxx/qla_os.c if (!IS_FWI2_CAPABLE(ha)) { ha 4217 drivers/scsi/qla2xxx/qla_os.c ha->async_pd = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, ha 4218 drivers/scsi/qla2xxx/qla_os.c &ha->async_pd_dma); ha 4219 drivers/scsi/qla2xxx/qla_os.c if (!ha->async_pd) ha 4221 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x002f, ha 4222 drivers/scsi/qla2xxx/qla_os.c "async_pd=%p.\n", ha->async_pd); ha 4225 drivers/scsi/qla2xxx/qla_os.c INIT_LIST_HEAD(&ha->vp_list); ha 4228 drivers/scsi/qla2xxx/qla_os.c ha->loop_id_map = kcalloc(BITS_TO_LONGS(LOOPID_MAP_SIZE), ha 4231 drivers/scsi/qla2xxx/qla_os.c if (!ha->loop_id_map) ha 4234 drivers/scsi/qla2xxx/qla_os.c qla2x00_set_reserved_loop_ids(ha); ha 4235 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0123, ha 4236 drivers/scsi/qla2xxx/qla_os.c "loop_id_map=%p.\n", ha->loop_id_map); ha 4239 drivers/scsi/qla2xxx/qla_os.c ha->sfp_data = dma_alloc_coherent(&ha->pdev->dev, ha 4240 drivers/scsi/qla2xxx/qla_os.c SFP_DEV_SIZE, &ha->sfp_data_dma, GFP_KERNEL); ha 4241 drivers/scsi/qla2xxx/qla_os.c if (!ha->sfp_data) { ha 4242 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x011b, ha 4247 drivers/scsi/qla2xxx/qla_os.c ha->flt = dma_alloc_coherent(&ha->pdev->dev, ha 4248 drivers/scsi/qla2xxx/qla_os.c sizeof(struct qla_flt_header) + FLT_REGIONS_SIZE, &ha->flt_dma, ha 4250 drivers/scsi/qla2xxx/qla_os.c if (!ha->flt) { ha 4251 drivers/scsi/qla2xxx/qla_os.c ql_dbg_pci(ql_dbg_init, ha->pdev, 0x011b, ha 4259 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, SFP_DEV_SIZE, ha 4260 drivers/scsi/qla2xxx/qla_os.c ha->sfp_data, ha->sfp_data_dma); ha 4262 drivers/scsi/qla2xxx/qla_os.c kfree(ha->loop_id_map); ha 4264 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->s_dma_pool, ha->async_pd, ha->async_pd_dma); ha 4266 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->s_dma_pool, ha->ex_init_cb, ha->ex_init_cb_dma); ha 4268 drivers/scsi/qla2xxx/qla_os.c kfree(ha->npiv_info); ha 4270 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ((*rsp)->length + 1) * ha 4278 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ((*req)->length + 1) * ha 4286 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, sizeof(struct ct_sns_pkt), ha 4287 drivers/scsi/qla2xxx/qla_os.c ha->ct_sns, ha->ct_sns_dma); ha 4288 drivers/scsi/qla2xxx/qla_os.c ha->ct_sns = NULL; ha 4289 drivers/scsi/qla2xxx/qla_os.c ha->ct_sns_dma = 0; ha 4291 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->s_dma_pool, ha->ms_iocb, ha->ms_iocb_dma); ha 4292 drivers/scsi/qla2xxx/qla_os.c ha->ms_iocb = NULL; ha 4293 drivers/scsi/qla2xxx/qla_os.c ha->ms_iocb_dma = 0; ha 4295 drivers/scsi/qla2xxx/qla_os.c if (ha->sns_cmd) ha 4296 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, sizeof(struct sns_cmd_pkt), ha 4297 drivers/scsi/qla2xxx/qla_os.c ha->sns_cmd, ha->sns_cmd_dma); ha 4302 drivers/scsi/qla2xxx/qla_os.c list_for_each_entry_safe(dsd, nxt, &ha->pool.unusable.head, ha 4305 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->dif_bundl_pool, dsd->dsd_addr, ha 4307 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundle_dma_allocs--; ha 4309 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundle_kallocs--; ha 4310 drivers/scsi/qla2xxx/qla_os.c ha->pool.unusable.count--; ha 4312 drivers/scsi/qla2xxx/qla_os.c dma_pool_destroy(ha->dif_bundl_pool); ha 4313 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundl_pool = NULL; ha 4317 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA82XX(ha) || ql2xenabledif) { ha 4318 drivers/scsi/qla2xxx/qla_os.c dma_pool_destroy(ha->fcp_cmnd_dma_pool); ha 4319 drivers/scsi/qla2xxx/qla_os.c ha->fcp_cmnd_dma_pool = NULL; ha 4322 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA82XX(ha) || ql2xenabledif) { ha 4323 drivers/scsi/qla2xxx/qla_os.c dma_pool_destroy(ha->dl_dma_pool); ha 4324 drivers/scsi/qla2xxx/qla_os.c ha->dl_dma_pool = NULL; ha 4327 drivers/scsi/qla2xxx/qla_os.c dma_pool_destroy(ha->s_dma_pool); ha 4328 drivers/scsi/qla2xxx/qla_os.c ha->s_dma_pool = NULL; ha 4330 drivers/scsi/qla2xxx/qla_os.c kfree(ha->nvram); ha 4331 drivers/scsi/qla2xxx/qla_os.c ha->nvram = NULL; ha 4333 drivers/scsi/qla2xxx/qla_os.c mempool_destroy(ha->ctx_mempool); ha 4334 drivers/scsi/qla2xxx/qla_os.c ha->ctx_mempool = NULL; ha 4336 drivers/scsi/qla2xxx/qla_os.c mempool_destroy(ha->srb_mempool); ha 4337 drivers/scsi/qla2xxx/qla_os.c ha->srb_mempool = NULL; ha 4339 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha), ha 4340 drivers/scsi/qla2xxx/qla_os.c ha->gid_list, ha 4341 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_dma); ha 4342 drivers/scsi/qla2xxx/qla_os.c ha->gid_list = NULL; ha 4343 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_dma = 0; ha 4345 drivers/scsi/qla2xxx/qla_os.c qlt_mem_free(ha); ha 4347 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ha->init_cb_size, ha->init_cb, ha 4348 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_dma); ha 4349 drivers/scsi/qla2xxx/qla_os.c ha->init_cb = NULL; ha 4350 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_dma = 0; ha 4362 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 4368 drivers/scsi/qla2xxx/qla_os.c if (!IS_EXLOGIN_OFFLD_CAPABLE(ha)) ha 4375 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0xd029, ha 4383 drivers/scsi/qla2xxx/qla_os.c if (temp != ha->exlogin_size) { ha 4384 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_exlogin_buffer(ha); ha 4385 drivers/scsi/qla2xxx/qla_os.c ha->exlogin_size = temp; ha 4392 drivers/scsi/qla2xxx/qla_os.c "EXLOGIN: requested size=0x%x\n", ha->exlogin_size); ha 4395 drivers/scsi/qla2xxx/qla_os.c ha->exlogin_buf = dma_alloc_coherent(&ha->pdev->dev, ha 4396 drivers/scsi/qla2xxx/qla_os.c ha->exlogin_size, &ha->exlogin_buf_dma, GFP_KERNEL); ha 4397 drivers/scsi/qla2xxx/qla_os.c if (!ha->exlogin_buf) { ha 4398 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0xd02a, ha 4405 drivers/scsi/qla2xxx/qla_os.c rval = qla_set_exlogin_mem_cfg(vha, ha->exlogin_buf_dma); ha 4409 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_exlogin_buffer(ha); ha 4422 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_exlogin_buffer(struct qla_hw_data *ha) ha 4424 drivers/scsi/qla2xxx/qla_os.c if (ha->exlogin_buf) { ha 4425 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ha->exlogin_size, ha 4426 drivers/scsi/qla2xxx/qla_os.c ha->exlogin_buf, ha->exlogin_buf_dma); ha 4427 drivers/scsi/qla2xxx/qla_os.c ha->exlogin_buf = NULL; ha 4428 drivers/scsi/qla2xxx/qla_os.c ha->exlogin_size = 0; ha 4477 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 4479 drivers/scsi/qla2xxx/qla_os.c if (!ha->flags.exchoffld_enabled) ha 4482 drivers/scsi/qla2xxx/qla_os.c if (!IS_EXCHG_OFFLD_CAPABLE(ha)) ha 4488 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0xd012, ha 4499 drivers/scsi/qla2xxx/qla_os.c if (totsz != ha->exchoffld_size) { ha 4500 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_exchoffld_buffer(ha); ha 4502 drivers/scsi/qla2xxx/qla_os.c ha->exchoffld_size = 0; ha 4503 drivers/scsi/qla2xxx/qla_os.c ha->flags.exchoffld_enabled = 0; ha 4507 drivers/scsi/qla2xxx/qla_os.c ha->exchoffld_size = totsz; ha 4515 drivers/scsi/qla2xxx/qla_os.c ha->exchoffld_size); ha 4518 drivers/scsi/qla2xxx/qla_os.c ha->exchoffld_buf = dma_alloc_coherent(&ha->pdev->dev, ha 4519 drivers/scsi/qla2xxx/qla_os.c ha->exchoffld_size, &ha->exchoffld_buf_dma, GFP_KERNEL); ha 4520 drivers/scsi/qla2xxx/qla_os.c if (!ha->exchoffld_buf) { ha 4521 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0xd013, ha 4524 drivers/scsi/qla2xxx/qla_os.c if (ha->max_exchg > ha 4526 drivers/scsi/qla2xxx/qla_os.c ha->max_exchg -= REDUCE_EXCHANGES_CNT; ha 4527 drivers/scsi/qla2xxx/qla_os.c } else if (ha->max_exchg > ha 4529 drivers/scsi/qla2xxx/qla_os.c ha->max_exchg -= 512; ha 4531 drivers/scsi/qla2xxx/qla_os.c ha->flags.exchoffld_enabled = 0; ha 4532 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0xd013, ha 4535 drivers/scsi/qla2xxx/qla_os.c ha->exchoffld_size = 0; ha 4539 drivers/scsi/qla2xxx/qla_os.c } else if (!ha->exchoffld_buf || (actual_cnt <= FW_DEF_EXCHANGES_CNT)) { ha 4541 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_exchoffld_buffer(ha); ha 4542 drivers/scsi/qla2xxx/qla_os.c ha->exchoffld_size = 0; ha 4543 drivers/scsi/qla2xxx/qla_os.c ha->flags.exchoffld_enabled = 0; ha 4546 drivers/scsi/qla2xxx/qla_os.c ha->exchoffld_size, actual_cnt, size, totsz); ha 4555 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_exchoffld_buffer(ha); ha 4558 drivers/scsi/qla2xxx/qla_os.c struct init_cb_81xx *icb = (struct init_cb_81xx *)ha->init_cb; ha 4576 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_exchoffld_buffer(struct qla_hw_data *ha) ha 4578 drivers/scsi/qla2xxx/qla_os.c if (ha->exchoffld_buf) { ha 4579 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ha->exchoffld_size, ha 4580 drivers/scsi/qla2xxx/qla_os.c ha->exchoffld_buf, ha->exchoffld_buf_dma); ha 4581 drivers/scsi/qla2xxx/qla_os.c ha->exchoffld_buf = NULL; ha 4582 drivers/scsi/qla2xxx/qla_os.c ha->exchoffld_size = 0; ha 4594 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_fw_dump(struct qla_hw_data *ha) ha 4596 drivers/scsi/qla2xxx/qla_os.c struct fwdt *fwdt = ha->fwdt; ha 4599 drivers/scsi/qla2xxx/qla_os.c if (ha->fce) ha 4600 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ha 4601 drivers/scsi/qla2xxx/qla_os.c FCE_SIZE, ha->fce, ha->fce_dma); ha 4603 drivers/scsi/qla2xxx/qla_os.c if (ha->eft) ha 4604 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ha 4605 drivers/scsi/qla2xxx/qla_os.c EFT_SIZE, ha->eft, ha->eft_dma); ha 4607 drivers/scsi/qla2xxx/qla_os.c if (ha->fw_dump) ha 4608 drivers/scsi/qla2xxx/qla_os.c vfree(ha->fw_dump); ha 4610 drivers/scsi/qla2xxx/qla_os.c ha->fce = NULL; ha 4611 drivers/scsi/qla2xxx/qla_os.c ha->fce_dma = 0; ha 4612 drivers/scsi/qla2xxx/qla_os.c ha->flags.fce_enabled = 0; ha 4613 drivers/scsi/qla2xxx/qla_os.c ha->eft = NULL; ha 4614 drivers/scsi/qla2xxx/qla_os.c ha->eft_dma = 0; ha 4615 drivers/scsi/qla2xxx/qla_os.c ha->fw_dumped = 0; ha 4616 drivers/scsi/qla2xxx/qla_os.c ha->fw_dump_cap_flags = 0; ha 4617 drivers/scsi/qla2xxx/qla_os.c ha->fw_dump_reading = 0; ha 4618 drivers/scsi/qla2xxx/qla_os.c ha->fw_dump = NULL; ha 4619 drivers/scsi/qla2xxx/qla_os.c ha->fw_dump_len = 0; ha 4637 drivers/scsi/qla2xxx/qla_os.c qla2x00_mem_free(struct qla_hw_data *ha) ha 4639 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_fw_dump(ha); ha 4641 drivers/scsi/qla2xxx/qla_os.c if (ha->mctp_dump) ha 4642 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, MCTP_DUMP_SIZE, ha->mctp_dump, ha 4643 drivers/scsi/qla2xxx/qla_os.c ha->mctp_dump_dma); ha 4644 drivers/scsi/qla2xxx/qla_os.c ha->mctp_dump = NULL; ha 4646 drivers/scsi/qla2xxx/qla_os.c mempool_destroy(ha->srb_mempool); ha 4647 drivers/scsi/qla2xxx/qla_os.c ha->srb_mempool = NULL; ha 4649 drivers/scsi/qla2xxx/qla_os.c if (ha->dcbx_tlv) ha 4650 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, DCBX_TLV_DATA_SIZE, ha 4651 drivers/scsi/qla2xxx/qla_os.c ha->dcbx_tlv, ha->dcbx_tlv_dma); ha 4652 drivers/scsi/qla2xxx/qla_os.c ha->dcbx_tlv = NULL; ha 4654 drivers/scsi/qla2xxx/qla_os.c if (ha->xgmac_data) ha 4655 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, XGMAC_DATA_SIZE, ha 4656 drivers/scsi/qla2xxx/qla_os.c ha->xgmac_data, ha->xgmac_data_dma); ha 4657 drivers/scsi/qla2xxx/qla_os.c ha->xgmac_data = NULL; ha 4659 drivers/scsi/qla2xxx/qla_os.c if (ha->sns_cmd) ha 4660 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, sizeof(struct sns_cmd_pkt), ha 4661 drivers/scsi/qla2xxx/qla_os.c ha->sns_cmd, ha->sns_cmd_dma); ha 4662 drivers/scsi/qla2xxx/qla_os.c ha->sns_cmd = NULL; ha 4663 drivers/scsi/qla2xxx/qla_os.c ha->sns_cmd_dma = 0; ha 4665 drivers/scsi/qla2xxx/qla_os.c if (ha->ct_sns) ha 4666 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, sizeof(struct ct_sns_pkt), ha 4667 drivers/scsi/qla2xxx/qla_os.c ha->ct_sns, ha->ct_sns_dma); ha 4668 drivers/scsi/qla2xxx/qla_os.c ha->ct_sns = NULL; ha 4669 drivers/scsi/qla2xxx/qla_os.c ha->ct_sns_dma = 0; ha 4671 drivers/scsi/qla2xxx/qla_os.c if (ha->sfp_data) ha 4672 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, SFP_DEV_SIZE, ha->sfp_data, ha 4673 drivers/scsi/qla2xxx/qla_os.c ha->sfp_data_dma); ha 4674 drivers/scsi/qla2xxx/qla_os.c ha->sfp_data = NULL; ha 4676 drivers/scsi/qla2xxx/qla_os.c if (ha->flt) ha 4677 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ha 4679 drivers/scsi/qla2xxx/qla_os.c ha->flt, ha->flt_dma); ha 4680 drivers/scsi/qla2xxx/qla_os.c ha->flt = NULL; ha 4681 drivers/scsi/qla2xxx/qla_os.c ha->flt_dma = 0; ha 4683 drivers/scsi/qla2xxx/qla_os.c if (ha->ms_iocb) ha 4684 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->s_dma_pool, ha->ms_iocb, ha->ms_iocb_dma); ha 4685 drivers/scsi/qla2xxx/qla_os.c ha->ms_iocb = NULL; ha 4686 drivers/scsi/qla2xxx/qla_os.c ha->ms_iocb_dma = 0; ha 4688 drivers/scsi/qla2xxx/qla_os.c if (ha->ex_init_cb) ha 4689 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->s_dma_pool, ha 4690 drivers/scsi/qla2xxx/qla_os.c ha->ex_init_cb, ha->ex_init_cb_dma); ha 4691 drivers/scsi/qla2xxx/qla_os.c ha->ex_init_cb = NULL; ha 4692 drivers/scsi/qla2xxx/qla_os.c ha->ex_init_cb_dma = 0; ha 4694 drivers/scsi/qla2xxx/qla_os.c if (ha->async_pd) ha 4695 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->s_dma_pool, ha->async_pd, ha->async_pd_dma); ha 4696 drivers/scsi/qla2xxx/qla_os.c ha->async_pd = NULL; ha 4697 drivers/scsi/qla2xxx/qla_os.c ha->async_pd_dma = 0; ha 4699 drivers/scsi/qla2xxx/qla_os.c dma_pool_destroy(ha->s_dma_pool); ha 4700 drivers/scsi/qla2xxx/qla_os.c ha->s_dma_pool = NULL; ha 4702 drivers/scsi/qla2xxx/qla_os.c if (ha->gid_list) ha 4703 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha), ha 4704 drivers/scsi/qla2xxx/qla_os.c ha->gid_list, ha->gid_list_dma); ha 4705 drivers/scsi/qla2xxx/qla_os.c ha->gid_list = NULL; ha 4706 drivers/scsi/qla2xxx/qla_os.c ha->gid_list_dma = 0; ha 4708 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA82XX(ha)) { ha 4709 drivers/scsi/qla2xxx/qla_os.c if (!list_empty(&ha->gbl_dsd_list)) { ha 4714 drivers/scsi/qla2xxx/qla_os.c tdsd_ptr, &ha->gbl_dsd_list, list) { ha 4715 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->dl_dma_pool, ha 4723 drivers/scsi/qla2xxx/qla_os.c dma_pool_destroy(ha->dl_dma_pool); ha 4724 drivers/scsi/qla2xxx/qla_os.c ha->dl_dma_pool = NULL; ha 4726 drivers/scsi/qla2xxx/qla_os.c dma_pool_destroy(ha->fcp_cmnd_dma_pool); ha 4727 drivers/scsi/qla2xxx/qla_os.c ha->fcp_cmnd_dma_pool = NULL; ha 4729 drivers/scsi/qla2xxx/qla_os.c mempool_destroy(ha->ctx_mempool); ha 4730 drivers/scsi/qla2xxx/qla_os.c ha->ctx_mempool = NULL; ha 4732 drivers/scsi/qla2xxx/qla_os.c if (ql2xenabledif && ha->dif_bundl_pool) { ha 4735 drivers/scsi/qla2xxx/qla_os.c list_for_each_entry_safe(dsd, nxt, &ha->pool.unusable.head, ha 4738 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->dif_bundl_pool, dsd->dsd_addr, ha 4740 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundle_dma_allocs--; ha 4742 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundle_kallocs--; ha 4743 drivers/scsi/qla2xxx/qla_os.c ha->pool.unusable.count--; ha 4745 drivers/scsi/qla2xxx/qla_os.c list_for_each_entry_safe(dsd, nxt, &ha->pool.good.head, list) { ha 4747 drivers/scsi/qla2xxx/qla_os.c dma_pool_free(ha->dif_bundl_pool, dsd->dsd_addr, ha 4749 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundle_dma_allocs--; ha 4751 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundle_kallocs--; ha 4755 drivers/scsi/qla2xxx/qla_os.c dma_pool_destroy(ha->dif_bundl_pool); ha 4756 drivers/scsi/qla2xxx/qla_os.c ha->dif_bundl_pool = NULL; ha 4758 drivers/scsi/qla2xxx/qla_os.c qlt_mem_free(ha); ha 4760 drivers/scsi/qla2xxx/qla_os.c if (ha->init_cb) ha 4761 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, ha->init_cb_size, ha 4762 drivers/scsi/qla2xxx/qla_os.c ha->init_cb, ha->init_cb_dma); ha 4763 drivers/scsi/qla2xxx/qla_os.c ha->init_cb = NULL; ha 4764 drivers/scsi/qla2xxx/qla_os.c ha->init_cb_dma = 0; ha 4766 drivers/scsi/qla2xxx/qla_os.c vfree(ha->optrom_buffer); ha 4767 drivers/scsi/qla2xxx/qla_os.c ha->optrom_buffer = NULL; ha 4768 drivers/scsi/qla2xxx/qla_os.c kfree(ha->nvram); ha 4769 drivers/scsi/qla2xxx/qla_os.c ha->nvram = NULL; ha 4770 drivers/scsi/qla2xxx/qla_os.c kfree(ha->npiv_info); ha 4771 drivers/scsi/qla2xxx/qla_os.c ha->npiv_info = NULL; ha 4772 drivers/scsi/qla2xxx/qla_os.c kfree(ha->swl); ha 4773 drivers/scsi/qla2xxx/qla_os.c ha->swl = NULL; ha 4774 drivers/scsi/qla2xxx/qla_os.c kfree(ha->loop_id_map); ha 4775 drivers/scsi/qla2xxx/qla_os.c ha->loop_id_map = NULL; ha 4779 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha) ha 4786 drivers/scsi/qla2xxx/qla_os.c ql_log_pci(ql_log_fatal, ha->pdev, 0x0107, ha 4797 drivers/scsi/qla2xxx/qla_os.c vha->hw = ha; ha 4821 drivers/scsi/qla2xxx/qla_os.c (ha->max_loop_id + 1); ha 4822 drivers/scsi/qla2xxx/qla_os.c vha->gnl.l = dma_alloc_coherent(&ha->pdev->dev, ha 4832 drivers/scsi/qla2xxx/qla_os.c vha->scan.size = ha->max_fibre_devices * sizeof(struct fab_scan_rp); ha 4837 drivers/scsi/qla2xxx/qla_os.c dma_free_coherent(&ha->pdev->dev, vha->gnl.size, ha 4849 drivers/scsi/qla2xxx/qla_os.c dev_name(&(ha->pdev->dev))); ha 5420 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = base_vha->hw; ha 5424 drivers/scsi/qla2xxx/qla_os.c if (ha->dpc_lp_wq) ha 5425 drivers/scsi/qla2xxx/qla_os.c queue_work(ha->dpc_lp_wq, &ha->idc_aen); ha 5429 drivers/scsi/qla2xxx/qla_os.c if (!ha->flags.nic_core_reset_hdlr_active) { ha 5430 drivers/scsi/qla2xxx/qla_os.c if (ha->dpc_hp_wq) ha 5431 drivers/scsi/qla2xxx/qla_os.c queue_work(ha->dpc_hp_wq, &ha->nic_core_reset); ha 5438 drivers/scsi/qla2xxx/qla_os.c if (ha->dpc_hp_wq) ha 5439 drivers/scsi/qla2xxx/qla_os.c queue_work(ha->dpc_hp_wq, &ha->idc_state_handler); ha 5442 drivers/scsi/qla2xxx/qla_os.c if (ha->dpc_hp_wq) ha 5443 drivers/scsi/qla2xxx/qla_os.c queue_work(ha->dpc_hp_wq, &ha->nic_core_unrecoverable); ha 5457 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = ha 5459 drivers/scsi/qla2xxx/qla_os.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 5465 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.nic_core_reset_owner) { ha 5466 drivers/scsi/qla2xxx/qla_os.c ha->flags.nic_core_reset_owner = 0; ha 5479 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = ha 5481 drivers/scsi/qla2xxx/qla_os.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 5525 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = ha 5527 drivers/scsi/qla2xxx/qla_os.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 5530 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA2031(ha)) { ha 5537 drivers/scsi/qla2xxx/qla_os.c if (!ha->flags.nic_core_reset_hdlr_active) { ha 5550 drivers/scsi/qla2xxx/qla_os.c ha->flags.nic_core_reset_hdlr_active = 1; ha 5556 drivers/scsi/qla2xxx/qla_os.c ha->flags.nic_core_reset_hdlr_active = 0; ha 5564 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = ha 5566 drivers/scsi/qla2xxx/qla_os.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 5617 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = base_vha->hw; ha 5629 drivers/scsi/qla2xxx/qla_os.c data = (IDC_LOCK_RECOVERY_STAGE1) | (ha->portnum << 2); ha 5642 drivers/scsi/qla2xxx/qla_os.c if (((data & idc_lck_rcvry_owner_mask) >> 2) == ha->portnum) { ha 5712 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = base_vha->hw; ha 5721 drivers/scsi/qla2xxx/qla_os.c ha->portnum); ha 5752 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = base_vha->hw; ha 5761 drivers/scsi/qla2xxx/qla_os.c if (data == ha->portnum) { ha 5809 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 5814 drivers/scsi/qla2xxx/qla_os.c drv_presence |= (1 << ha->portnum); ha 5838 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 5843 drivers/scsi/qla2xxx/qla_os.c drv_presence &= ~(1 << ha->portnum); ha 5866 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 5871 drivers/scsi/qla2xxx/qla_os.c ack_timeout = jiffies + (ha->fcoe_reset_timeout * HZ); ha 5939 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = base_vha->hw; ha 5945 drivers/scsi/qla2xxx/qla_os.c dev_init_timeout = jiffies + (ha->fcoe_dev_init_timeout * HZ); ha 5964 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.nic_core_reset_owner) ha 5967 drivers/scsi/qla2xxx/qla_os.c ha->flags.nic_core_reset_owner = 0; ha 5970 drivers/scsi/qla2xxx/qla_os.c ha->portnum); ha 5973 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.nic_core_reset_owner) ha 5989 drivers/scsi/qla2xxx/qla_os.c if (!ql2xdontresethba && ha->flags.nic_core_reset_owner) ha 5999 drivers/scsi/qla2xxx/qla_os.c (ha->fcoe_dev_init_timeout * HZ); ha 6009 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.quiesce_owner) ha 6016 drivers/scsi/qla2xxx/qla_os.c (ha->fcoe_dev_init_timeout * HZ); ha 6019 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.nic_core_reset_owner) ha 6022 drivers/scsi/qla2xxx/qla_os.c ha->flags.nic_core_reset_owner = 0; ha 6052 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = container_of(work, struct qla_hw_data, ha 6054 drivers/scsi/qla2xxx/qla_os.c struct pci_dev *pdev = ha->pdev; ha 6055 drivers/scsi/qla2xxx/qla_os.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 6076 drivers/scsi/qla2xxx/qla_os.c qla2x00_delete_all_vps(ha, base_vha); ha 6089 drivers/scsi/qla2xxx/qla_os.c qla2x00_destroy_deferred_work(ha); ha 6105 drivers/scsi/qla2xxx/qla_os.c qla2x00_mem_free(ha); ha 6107 drivers/scsi/qla2xxx/qla_os.c qla2x00_free_queues(ha); ha 6109 drivers/scsi/qla2xxx/qla_os.c qla2x00_unmap_iobases(ha); ha 6111 drivers/scsi/qla2xxx/qla_os.c pci_release_selected_regions(ha->pdev, ha->bars); ha 6137 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha; ha 6141 drivers/scsi/qla2xxx/qla_os.c ha = (struct qla_hw_data *)data; ha 6142 drivers/scsi/qla2xxx/qla_os.c base_vha = pci_get_drvdata(ha->pdev); ha 6153 drivers/scsi/qla2xxx/qla_os.c if (!base_vha->flags.init_done || ha->flags.mbox_busy) ha 6156 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.eeh_busy) { ha 6158 drivers/scsi/qla2xxx/qla_os.c "eeh_busy=%d.\n", ha->flags.eeh_busy); ha 6162 drivers/scsi/qla2xxx/qla_os.c ha->dpc_active = 1; ha 6171 drivers/scsi/qla2xxx/qla_os.c if (IS_P3P_TYPE(ha)) { ha 6172 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA8044(ha)) { ha 6175 drivers/scsi/qla2xxx/qla_os.c qla8044_idc_lock(ha); ha 6179 drivers/scsi/qla2xxx/qla_os.c qla8044_idc_unlock(ha); ha 6189 drivers/scsi/qla2xxx/qla_os.c qla82xx_idc_lock(ha); ha 6190 drivers/scsi/qla2xxx/qla_os.c qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, ha 6192 drivers/scsi/qla2xxx/qla_os.c qla82xx_idc_unlock(ha); ha 6221 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLAFX00(ha)) { ha 6269 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.detected_lr_sfp != ha 6270 drivers/scsi/qla2xxx/qla_os.c ha->flags.using_lr_setting) ha 6284 drivers/scsi/qla2xxx/qla_os.c !ha->flags.fw_started) ha 6289 drivers/scsi/qla2xxx/qla_os.c !ha->flags.fw_started) ha 6300 drivers/scsi/qla2xxx/qla_os.c if (ha->isp_ops->abort_isp(base_vha)) { ha 6317 drivers/scsi/qla2xxx/qla_os.c if (IS_QLAFX00(ha)) ha 6323 drivers/scsi/qla2xxx/qla_os.c if (IS_P3P_TYPE(ha)) { ha 6324 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA82XX(ha)) ha 6326 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA8044(ha)) ha 6330 drivers/scsi/qla2xxx/qla_os.c if (!ha->flags.quiesce_owner) { ha 6332 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA82XX(ha)) { ha 6333 drivers/scsi/qla2xxx/qla_os.c qla82xx_idc_lock(ha); ha 6336 drivers/scsi/qla2xxx/qla_os.c qla82xx_idc_unlock(ha); ha 6337 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA8044(ha)) { ha 6338 drivers/scsi/qla2xxx/qla_os.c qla8044_idc_lock(ha); ha 6341 drivers/scsi/qla2xxx/qla_os.c qla8044_idc_unlock(ha); ha 6400 drivers/scsi/qla2xxx/qla_os.c if (IS_QLAFX00(ha)) ha 6410 drivers/scsi/qla2xxx/qla_os.c if (!ha->interrupts_on) ha 6411 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops->enable_intrs(ha); ha 6415 drivers/scsi/qla2xxx/qla_os.c if (ha->beacon_blink_led == 1) ha 6416 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops->beacon_blink(base_vha); ha 6422 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.eeh_busy || ha 6423 drivers/scsi/qla2xxx/qla_os.c ha->flags.pci_channel_io_perm_failure) ha 6428 drivers/scsi/qla2xxx/qla_os.c mutex_lock(&ha->mq_lock); ha 6432 drivers/scsi/qla2xxx/qla_os.c mutex_unlock(&ha->mq_lock); ha 6439 drivers/scsi/qla2xxx/qla_os.c ha->nvme_last_rptd_aen); ha 6441 drivers/scsi/qla2xxx/qla_os.c ha->nvme_last_rptd_aen)) { ha 6444 drivers/scsi/qla2xxx/qla_os.c ha->nvme_last_rptd_aen); ha 6452 drivers/scsi/qla2xxx/qla_os.c ha->last_zio_threshold); ha 6454 drivers/scsi/qla2xxx/qla_os.c ha->last_zio_threshold); ha 6457 drivers/scsi/qla2xxx/qla_os.c if (!IS_QLAFX00(ha)) ha 6465 drivers/scsi/qla2xxx/qla_os.c ha->dpc_active = 0; ha 6477 drivers/scsi/qla2xxx/qla_os.c ha->dpc_active = 0; ha 6488 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 6489 drivers/scsi/qla2xxx/qla_os.c struct task_struct *t = ha->dpc_thread; ha 6538 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 6541 drivers/scsi/qla2xxx/qla_os.c if (ha->flags.eeh_busy) { ha 6544 drivers/scsi/qla2xxx/qla_os.c ha->flags.eeh_busy); ha 6553 drivers/scsi/qla2xxx/qla_os.c if (!pci_channel_offline(ha->pdev)) { ha 6554 drivers/scsi/qla2xxx/qla_os.c pci_read_config_word(ha->pdev, PCI_VENDOR_ID, &w); ha 6559 drivers/scsi/qla2xxx/qla_os.c if (!vha->vp_idx && IS_P3P_TYPE(ha)) { ha 6562 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA82XX(ha)) ha 6564 drivers/scsi/qla2xxx/qla_os.c else if (IS_QLA8044(ha)) ha 6568 drivers/scsi/qla2xxx/qla_os.c if (!vha->vp_idx && IS_QLAFX00(ha)) ha 6583 drivers/scsi/qla2xxx/qla_os.c if (!IS_QLA2100(ha) && vha->link_down_timeout) ha 6592 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->hardware_lock, ha 6594 drivers/scsi/qla2xxx/qla_os.c req = ha->req_q_map[0]; ha 6611 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA82XX(ha)) ha 6619 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->hardware_lock, ha 6631 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA82XX(ha)) ha 6644 drivers/scsi/qla2xxx/qla_os.c if (!vha->vp_idx && (ha->beacon_blink_led == 1)) { ha 6646 drivers/scsi/qla2xxx/qla_os.c if (!IS_P3P_TYPE(ha)) { ha 6670 drivers/scsi/qla2xxx/qla_os.c (atomic_read(&ha->nvme_active_aen_cnt) != ha->nvme_last_rptd_aen) && ha 6671 drivers/scsi/qla2xxx/qla_os.c ha->zio_mode == QLA_ZIO_MODE_6 && ha 6672 drivers/scsi/qla2xxx/qla_os.c !ha->flags.host_shutting_down) { ha 6675 drivers/scsi/qla2xxx/qla_os.c ha->nvme_last_rptd_aen); ha 6676 drivers/scsi/qla2xxx/qla_os.c ha->nvme_last_rptd_aen = atomic_read(&ha->nvme_active_aen_cnt); ha 6682 drivers/scsi/qla2xxx/qla_os.c (atomic_read(&ha->zio_threshold) != ha->last_zio_threshold) && ha 6683 drivers/scsi/qla2xxx/qla_os.c (ha->zio_mode == QLA_ZIO_MODE_6) && ha 6684 drivers/scsi/qla2xxx/qla_os.c (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha))) { ha 6687 drivers/scsi/qla2xxx/qla_os.c ha->last_zio_threshold); ha 6688 drivers/scsi/qla2xxx/qla_os.c ha->last_zio_threshold = atomic_read(&ha->zio_threshold); ha 6778 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 6781 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA2100(ha)) { ha 6783 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA2200(ha)) { ha 6785 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA2300(ha) || IS_QLA2312(ha) || IS_QLA6312(ha)) { ha 6787 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA2322(ha) || IS_QLA6322(ha)) { ha 6789 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA24XX_TYPE(ha)) { ha 6791 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA25XX(ha)) { ha 6793 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA81XX(ha)) { ha 6795 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA82XX(ha)) { ha 6797 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA2031(ha)) { ha 6799 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA8031(ha)) { ha 6801 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA27XX(ha)) { ha 6803 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA28XX(ha)) { ha 6816 drivers/scsi/qla2xxx/qla_os.c if (request_firmware(&blob->fw, blob->name, &ha->pdev->dev)) { ha 6841 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 6842 drivers/scsi/qla2xxx/qla_os.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 6849 drivers/scsi/qla2xxx/qla_os.c ha->chip_reset++; ha 6851 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->chip_reset = ha->chip_reset; ha 6852 drivers/scsi/qla2xxx/qla_os.c for (i = 0; i < ha->max_qpairs; i++) { ha 6853 drivers/scsi/qla2xxx/qla_os.c if (ha->queue_pair_map[i]) ha 6854 drivers/scsi/qla2xxx/qla_os.c ha->queue_pair_map[i]->chip_reset = ha 6855 drivers/scsi/qla2xxx/qla_os.c ha->base_qpair->chip_reset; ha 6859 drivers/scsi/qla2xxx/qla_os.c if (atomic_read(&ha->num_pend_mbx_stage3)) { ha 6860 drivers/scsi/qla2xxx/qla_os.c clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); ha 6861 drivers/scsi/qla2xxx/qla_os.c complete(&ha->mbx_intr_comp); ha 6866 drivers/scsi/qla2xxx/qla_os.c while (atomic_read(&ha->num_pend_mbx_stage3) || ha 6867 drivers/scsi/qla2xxx/qla_os.c atomic_read(&ha->num_pend_mbx_stage2) || ha 6868 drivers/scsi/qla2xxx/qla_os.c atomic_read(&ha->num_pend_mbx_stage1)) { ha 6875 drivers/scsi/qla2xxx/qla_os.c ha->flags.purge_mbox = 0; ha 6877 drivers/scsi/qla2xxx/qla_os.c mutex_lock(&ha->mq_lock); ha 6880 drivers/scsi/qla2xxx/qla_os.c mutex_unlock(&ha->mq_lock); ha 6884 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->vport_slock, flags); ha 6885 drivers/scsi/qla2xxx/qla_os.c list_for_each_entry(vp, &ha->vp_list, list) { ha 6887 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 6889 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->vport_slock, flags); ha 6892 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 6898 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->vport_slock, flags); ha 6899 drivers/scsi/qla2xxx/qla_os.c list_for_each_entry(vp, &ha->vp_list, list) { ha 6901 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 6904 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->vport_slock, flags); ha 6907 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->vport_slock, flags); ha 6915 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = vha->hw; ha 6928 drivers/scsi/qla2xxx/qla_os.c ha->flags.eeh_busy = 0; ha 6935 drivers/scsi/qla2xxx/qla_os.c ha->flags.eeh_busy = 1; ha 6939 drivers/scsi/qla2xxx/qla_os.c ha->flags.pci_channel_io_perm_failure = 1; ha 6957 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = base_vha->hw; ha 6958 drivers/scsi/qla2xxx/qla_os.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 6959 drivers/scsi/qla2xxx/qla_os.c struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24; ha 6961 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA82XX(ha)) ha 6964 drivers/scsi/qla2xxx/qla_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 6965 drivers/scsi/qla2xxx/qla_os.c if (IS_QLA2100(ha) || IS_QLA2200(ha)){ ha 6969 drivers/scsi/qla2xxx/qla_os.c } else if (IS_QLA23XX(ha)) { ha 6973 drivers/scsi/qla2xxx/qla_os.c } else if (IS_FWI2_CAPABLE(ha)) { ha 6978 drivers/scsi/qla2xxx/qla_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 6983 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops->fw_dump(base_vha, 0); ha 6995 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = base_vha->hw; ha 7015 drivers/scsi/qla2xxx/qla_os.c if (ha->mem_only) ha 7027 drivers/scsi/qla2xxx/qla_os.c if (ha->isp_ops->pci_config(base_vha)) ha 7030 drivers/scsi/qla2xxx/qla_os.c mutex_lock(&ha->mq_lock); ha 7033 drivers/scsi/qla2xxx/qla_os.c mutex_unlock(&ha->mq_lock); ha 7037 drivers/scsi/qla2xxx/qla_os.c if (ha->isp_ops->abort_isp(base_vha) == QLA_SUCCESS) ha 7053 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = base_vha->hw; ha 7059 drivers/scsi/qla2xxx/qla_os.c ha->flags.eeh_busy = 0; ha 7072 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = base_vha->hw; ha 7084 drivers/scsi/qla2xxx/qla_os.c ha->flags.eeh_busy = 1; ha 7085 drivers/scsi/qla2xxx/qla_os.c mutex_lock(&ha->mq_lock); ha 7088 drivers/scsi/qla2xxx/qla_os.c mutex_unlock(&ha->mq_lock); ha 7099 drivers/scsi/qla2xxx/qla_os.c struct qla_hw_data *ha = base_vha->hw; ha 7108 drivers/scsi/qla2xxx/qla_os.c ha->flags.eeh_busy = 0; ha 7109 drivers/scsi/qla2xxx/qla_os.c mutex_lock(&ha->mq_lock); ha 7112 drivers/scsi/qla2xxx/qla_os.c mutex_unlock(&ha->mq_lock); ha 7115 drivers/scsi/qla2xxx/qla_os.c ha->isp_ops->abort_isp(base_vha); ha 23 drivers/scsi/qla2xxx/qla_sup.c qla2x00_lock_nvram_access(struct qla_hw_data *ha) ha 26 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 28 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA2300(ha)) { ha 56 drivers/scsi/qla2xxx/qla_sup.c qla2x00_unlock_nvram_access(struct qla_hw_data *ha) ha 58 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 60 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA2300(ha)) { ha 72 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(struct qla_hw_data *ha, uint16_t data) ha 74 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 104 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nvram_request(struct qla_hw_data *ha, uint32_t nv_cmd) ha 107 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 115 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 117 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 153 drivers/scsi/qla2xxx/qla_sup.c qla2x00_get_nvram_word(struct qla_hw_data *ha, uint32_t addr) ha 160 drivers/scsi/qla2xxx/qla_sup.c data = qla2x00_nvram_request(ha, nv_cmd); ha 170 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(struct qla_hw_data *ha) ha 172 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 186 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_nvram_word(struct qla_hw_data *ha, uint32_t addr, uint16_t data) ha 191 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 192 drivers/scsi/qla2xxx/qla_sup.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 194 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 195 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 196 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 199 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 201 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 209 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 211 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 216 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 232 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 235 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 237 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 239 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 243 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_nvram_word_tmo(struct qla_hw_data *ha, uint32_t addr, ha 249 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 253 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 254 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 255 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 258 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 260 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 268 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 270 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 275 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 289 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 292 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 294 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 296 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 306 drivers/scsi/qla2xxx/qla_sup.c qla2x00_clear_nvram_protection(struct qla_hw_data *ha) ha 309 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 312 drivers/scsi/qla2xxx/qla_sup.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 317 drivers/scsi/qla2xxx/qla_sup.c wprot_old = cpu_to_le16(qla2x00_get_nvram_word(ha, ha->nvram_base)); ha 318 drivers/scsi/qla2xxx/qla_sup.c stat = qla2x00_write_nvram_word_tmo(ha, ha->nvram_base, ha 320 drivers/scsi/qla2xxx/qla_sup.c wprot = cpu_to_le16(qla2x00_get_nvram_word(ha, ha->nvram_base)); ha 323 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 324 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 325 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 327 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 329 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 332 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE | NVR_DATA_OUT); ha 333 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE); ha 334 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE); ha 336 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT | NVR_PR_ENABLE); ha 338 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 341 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE | NVR_DATA_OUT); ha 342 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE | NVR_DATA_OUT); ha 343 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE | NVR_DATA_OUT); ha 345 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT | NVR_PR_ENABLE); ha 347 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 366 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_nvram_word(ha, ha->nvram_base, wprot_old); ha 372 drivers/scsi/qla2xxx/qla_sup.c qla2x00_set_nvram_protection(struct qla_hw_data *ha, int stat) ha 374 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 376 drivers/scsi/qla2xxx/qla_sup.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 383 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 384 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 385 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, 0); ha 387 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT); ha 389 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 392 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE | NVR_DATA_OUT); ha 393 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE); ha 394 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE); ha 396 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_DATA_OUT | NVR_PR_ENABLE); ha 398 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 401 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE | NVR_DATA_OUT); ha 402 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE); ha 403 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE | NVR_DATA_OUT); ha 405 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_write(ha, NVR_PR_ENABLE); ha 407 drivers/scsi/qla2xxx/qla_sup.c qla2x00_nv_deselect(ha); ha 430 drivers/scsi/qla2xxx/qla_sup.c flash_conf_addr(struct qla_hw_data *ha, uint32_t faddr) ha 432 drivers/scsi/qla2xxx/qla_sup.c return ha->flash_conf_off + faddr; ha 436 drivers/scsi/qla2xxx/qla_sup.c flash_data_addr(struct qla_hw_data *ha, uint32_t faddr) ha 438 drivers/scsi/qla2xxx/qla_sup.c return ha->flash_data_off + faddr; ha 442 drivers/scsi/qla2xxx/qla_sup.c nvram_conf_addr(struct qla_hw_data *ha, uint32_t naddr) ha 444 drivers/scsi/qla2xxx/qla_sup.c return ha->nvram_conf_off + naddr; ha 448 drivers/scsi/qla2xxx/qla_sup.c nvram_data_addr(struct qla_hw_data *ha, uint32_t naddr) ha 450 drivers/scsi/qla2xxx/qla_sup.c return ha->nvram_data_off + naddr; ha 454 drivers/scsi/qla2xxx/qla_sup.c qla24xx_read_flash_dword(struct qla_hw_data *ha, uint32_t addr, uint32_t *data) ha 456 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 470 drivers/scsi/qla2xxx/qla_sup.c ql_log(ql_log_warn, pci_get_drvdata(ha->pdev), 0x7090, ha 482 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 485 drivers/scsi/qla2xxx/qla_sup.c faddr = flash_data_addr(ha, faddr); ha 487 drivers/scsi/qla2xxx/qla_sup.c ret = qla24xx_read_flash_dword(ha, faddr, dwptr); ha 497 drivers/scsi/qla2xxx/qla_sup.c qla24xx_write_flash_dword(struct qla_hw_data *ha, uint32_t addr, uint32_t data) ha 499 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 512 drivers/scsi/qla2xxx/qla_sup.c ql_log(ql_log_warn, pci_get_drvdata(ha->pdev), 0x7090, ha 518 drivers/scsi/qla2xxx/qla_sup.c qla24xx_get_flash_manufacturer(struct qla_hw_data *ha, uint8_t *man_id, ha 525 drivers/scsi/qla2xxx/qla_sup.c faddr = flash_conf_addr(ha, 0x03ab); ha 526 drivers/scsi/qla2xxx/qla_sup.c if (!qla24xx_read_flash_dword(ha, faddr, &ids)) { ha 539 drivers/scsi/qla2xxx/qla_sup.c faddr = flash_conf_addr(ha, 0x009f); ha 540 drivers/scsi/qla2xxx/qla_sup.c if (!qla24xx_read_flash_dword(ha, faddr, &ids)) { ha 553 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 554 drivers/scsi/qla2xxx/qla_sup.c struct req_que *req = ha->req_q_map[0]; ha 566 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA24XX_TYPE(ha)) ha 568 drivers/scsi/qla2xxx/qla_sup.c else if (IS_QLA25XX(ha)) ha 570 drivers/scsi/qla2xxx/qla_sup.c else if (IS_QLA81XX(ha)) ha 572 drivers/scsi/qla2xxx/qla_sup.c else if (IS_P3P_TYPE(ha)) { ha 575 drivers/scsi/qla2xxx/qla_sup.c } else if (IS_QLA83XX(ha) || IS_QLA27XX(ha)) { ha 578 drivers/scsi/qla2xxx/qla_sup.c } else if (IS_QLA28XX(ha)) { ha 670 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 671 drivers/scsi/qla2xxx/qla_sup.c uint32_t def = IS_QLA81XX(ha) ? 2 : IS_QLA25XX(ha) ? 1 : 0; ha 672 drivers/scsi/qla2xxx/qla_sup.c struct qla_flt_header *flt = (void *)ha->flt; ha 680 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fcp_prio = (ha->port_no == 0) ? ha 683 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_flt = flt_addr; ha 684 drivers/scsi/qla2xxx/qla_sup.c wptr = (uint16_t *)ha->flt; ha 685 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->read_optrom(vha, (void *)flt, flt_addr << 2, ha 724 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA8031(ha)) ha 726 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fw = start; ha 729 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA8031(ha)) ha 731 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fw = start; ha 734 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_boot = start; ha 737 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA8031(ha)) ha 739 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd_nvram = start; ha 740 drivers/scsi/qla2xxx/qla_sup.c if (IS_P3P_TYPE(ha)) ha 742 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 0) ha 743 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd = start; ha 746 drivers/scsi/qla2xxx/qla_sup.c if (IS_P3P_TYPE(ha) || IS_QLA8031(ha)) ha 748 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 1) ha 749 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd = start; ha 752 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 754 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 2) ha 755 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd = start; ha 758 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 760 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 3) ha 761 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd = start; ha 764 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA8031(ha)) ha 766 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 0) ha 767 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_nvram = start; ha 770 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA8031(ha)) ha 772 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 1) ha 773 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_nvram = start; ha 776 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 778 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 2) ha 779 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_nvram = start; ha 782 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 784 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 3) ha 785 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_nvram = start; ha 788 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fdt = start; ha 791 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 0) ha 792 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_npiv_conf = start; ha 795 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 1) ha 796 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_npiv_conf = start; ha 799 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_gold_fw = start; ha 802 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 0) ha 803 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fcp_prio = start; ha 806 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 1) ha 807 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fcp_prio = start; ha 810 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_boot = start; ha 813 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA8044(ha)) ha 814 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_boot = start; ha 817 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fw = start; ha 820 drivers/scsi/qla2xxx/qla_sup.c if (IS_CNA_CAPABLE(ha)) ha 821 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fw = start; ha 824 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_gold_fw = start; ha 827 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_bootload = start; ha 830 drivers/scsi/qla2xxx/qla_sup.c if (IS_CNA_CAPABLE(ha)) ha 831 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd = start; ha 834 drivers/scsi/qla2xxx/qla_sup.c if (!(IS_QLA8031(ha) || IS_QLA8044(ha))) ha 836 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 0) ha 837 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_nvram = start; ha 840 drivers/scsi/qla2xxx/qla_sup.c if (!(IS_QLA8031(ha) || IS_QLA8044(ha))) ha 842 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 1) ha 843 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_nvram = start; ha 846 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 847 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_img_status_pri = start; ha 850 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 851 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_img_status_sec = start; ha 854 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 855 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fw_sec = start; ha 858 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 859 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_boot_sec = start; ha 862 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 863 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_aux_img_status_pri = start; ha 866 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 867 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_aux_img_status_sec = start; ha 870 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 871 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 0) ha 872 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_nvram_sec = start; ha 875 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 876 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 1) ha 877 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_nvram_sec = start; ha 880 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 881 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 2) ha 882 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_nvram_sec = start; ha 885 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 886 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 3) ha 887 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_nvram_sec = start; ha 891 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 892 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd_nvram_sec = start; ha 893 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 0) ha 894 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd_sec = start; ha 899 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 900 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 1) ha 901 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd_sec = start; ha 905 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 906 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 2) ha 907 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd_sec = start; ha 911 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 912 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 3) ha 913 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd_sec = start; ha 922 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fw = def_fw[def]; ha 923 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_boot = def_boot[def]; ha 924 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd_nvram = def_vpd_nvram[def]; ha 925 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd = (ha->port_no == 0) ? ha 927 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_nvram = (ha->port_no == 0) ? ha 929 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fdt = def_fdt[def]; ha 930 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_npiv_conf = (ha->port_no == 0) ? ha 936 drivers/scsi/qla2xxx/qla_sup.c loc, ha->flt_region_boot, ha->flt_region_fw, ha 937 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_vpd_nvram, ha->flt_region_vpd, ha->flt_region_nvram, ha 938 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fdt, ha->flt_region_flt, ha->flt_region_npiv_conf, ha 939 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fcp_prio); ha 949 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 950 drivers/scsi/qla2xxx/qla_sup.c struct req_que *req = ha->req_q_map[0]; ha 957 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->read_optrom(vha, fdt, ha->flt_region_fdt << 2, ha 979 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_wrt_disable = fdt->wrt_disable_bits; ha 980 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_wrt_enable = fdt->wrt_enable_bits; ha 981 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_wrt_sts_reg_cmd = fdt->wrt_sts_reg_cmd; ha 982 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA8044(ha)) ha 983 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_erase_cmd = fdt->erase_cmd; ha 985 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_erase_cmd = ha 986 drivers/scsi/qla2xxx/qla_sup.c flash_conf_addr(ha, 0x0300 | fdt->erase_cmd); ha 987 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_block_size = le32_to_cpu(fdt->block_size); ha 989 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_unprotect_sec_cmd = flash_conf_addr(ha, 0x0300 | ha 991 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_protect_sec_cmd = fdt->protect_sec_cmd ? ha 992 drivers/scsi/qla2xxx/qla_sup.c flash_conf_addr(ha, 0x0300 | fdt->protect_sec_cmd) : ha 993 drivers/scsi/qla2xxx/qla_sup.c flash_conf_addr(ha, 0x0336); ha 998 drivers/scsi/qla2xxx/qla_sup.c if (IS_P3P_TYPE(ha)) { ha 999 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_block_size = FLASH_BLK_SIZE_64K; ha 1002 drivers/scsi/qla2xxx/qla_sup.c qla24xx_get_flash_manufacturer(ha, &man_id, &flash_id); ha 1005 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_wrt_disable = 0x9c; ha 1006 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_erase_cmd = flash_conf_addr(ha, 0x03d8); ha 1010 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_block_size = FLASH_BLK_SIZE_64K; ha 1012 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_block_size = FLASH_BLK_SIZE_32K; ha 1015 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_erase_cmd = flash_conf_addr(ha, 0x0352); ha 1018 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_block_size = FLASH_BLK_SIZE_64K; ha 1021 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_block_size = FLASH_BLK_SIZE_4K; ha 1022 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_erase_cmd = flash_conf_addr(ha, 0x0320); ha 1023 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_unprotect_sec_cmd = flash_conf_addr(ha, 0x0339); ha 1024 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_protect_sec_cmd = flash_conf_addr(ha, 0x0336); ha 1028 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_block_size = FLASH_BLK_SIZE_64K; ha 1036 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd, ha 1037 drivers/scsi/qla2xxx/qla_sup.c ha->fdt_wrt_disable, ha->fdt_block_size); ha 1046 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1047 drivers/scsi/qla2xxx/qla_sup.c struct req_que *req = ha->req_q_map[0]; ha 1049 drivers/scsi/qla2xxx/qla_sup.c if (!(IS_P3P_TYPE(ha))) ha 1053 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->read_optrom(vha, req->ring, QLA82XX_IDC_PARAM_ADDR, 8); ha 1056 drivers/scsi/qla2xxx/qla_sup.c ha->fcoe_dev_init_timeout = QLA82XX_ROM_DEV_INIT_TIMEOUT; ha 1057 drivers/scsi/qla2xxx/qla_sup.c ha->fcoe_reset_timeout = QLA82XX_ROM_DRV_RESET_ACK_TIMEOUT; ha 1059 drivers/scsi/qla2xxx/qla_sup.c ha->fcoe_dev_init_timeout = le32_to_cpu(*wptr); ha 1061 drivers/scsi/qla2xxx/qla_sup.c ha->fcoe_reset_timeout = le32_to_cpu(*wptr); ha 1065 drivers/scsi/qla2xxx/qla_sup.c "fcoe_reset_timeout=%d.\n", ha->fcoe_dev_init_timeout, ha 1066 drivers/scsi/qla2xxx/qla_sup.c ha->fcoe_reset_timeout); ha 1075 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1077 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA24XX_TYPE(ha) && !IS_QLA25XX(ha) && ha 1078 drivers/scsi/qla2xxx/qla_sup.c !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha) && ha 1079 drivers/scsi/qla2xxx/qla_sup.c !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 1103 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1105 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA24XX_TYPE(ha) && !IS_QLA25XX(ha) && ha 1106 drivers/scsi/qla2xxx/qla_sup.c !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha)) ha 1109 drivers/scsi/qla2xxx/qla_sup.c if (ha->flags.nic_core_reset_hdlr_active) ha 1112 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA8044(ha)) ha 1115 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->read_optrom(vha, &hdr, ha->flt_region_npiv_conf << 2, ha 1135 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->read_optrom(vha, data, ha->flt_region_npiv_conf << 2, ha 1157 drivers/scsi/qla2xxx/qla_sup.c memcpy(&ha->npiv_info[i], entry, sizeof(struct qla_npiv_entry)); ha 1193 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1194 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 1196 drivers/scsi/qla2xxx/qla_sup.c if (ha->flags.fac_supported) ha 1204 drivers/scsi/qla2xxx/qla_sup.c if (!ha->fdt_wrt_disable) ha 1208 drivers/scsi/qla2xxx/qla_sup.c qla24xx_write_flash_dword(ha, flash_conf_addr(ha, 0x101), 0); ha 1210 drivers/scsi/qla2xxx/qla_sup.c qla24xx_write_flash_dword(ha, flash_conf_addr(ha, 0x101), 0); ha 1218 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1219 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 1223 drivers/scsi/qla2xxx/qla_sup.c if (ha->flags.fac_supported) ha 1226 drivers/scsi/qla2xxx/qla_sup.c if (!ha->fdt_wrt_disable) ha 1230 drivers/scsi/qla2xxx/qla_sup.c faddr = flash_conf_addr(ha, 0x101); ha 1231 drivers/scsi/qla2xxx/qla_sup.c qla24xx_write_flash_dword(ha, faddr, ha->fdt_wrt_disable); ha 1232 drivers/scsi/qla2xxx/qla_sup.c faddr = flash_conf_addr(ha, 0x5); ha 1234 drivers/scsi/qla2xxx/qla_sup.c if (!qla24xx_read_flash_dword(ha, faddr, &dword)) { ha 1252 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1255 drivers/scsi/qla2xxx/qla_sup.c if (ha->flags.fac_supported) { ha 1257 drivers/scsi/qla2xxx/qla_sup.c finish = start + (ha->fdt_block_size >> 2) - 1; ha 1258 drivers/scsi/qla2xxx/qla_sup.c return qla81xx_fac_erase_sector(vha, flash_data_addr(ha, ha 1259 drivers/scsi/qla2xxx/qla_sup.c start), flash_data_addr(ha, finish)); ha 1262 drivers/scsi/qla2xxx/qla_sup.c return qla24xx_write_flash_dword(ha, ha->fdt_erase_cmd, ha 1277 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1279 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha) && ha 1280 drivers/scsi/qla2xxx/qla_sup.c !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 1284 drivers/scsi/qla2xxx/qla_sup.c optrom = dma_alloc_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE, ha 1301 drivers/scsi/qla2xxx/qla_sup.c rest_addr = (ha->fdt_block_size >> 2) - 1; ha 1331 drivers/scsi/qla2xxx/qla_sup.c flash_data_addr(ha, faddr), dburst); ha 1341 drivers/scsi/qla2xxx/qla_sup.c flash_data_addr(ha, faddr), optrom, ha 1344 drivers/scsi/qla2xxx/qla_sup.c dma_free_coherent(&ha->pdev->dev, ha 1347 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 1354 drivers/scsi/qla2xxx/qla_sup.c ret = qla24xx_write_flash_dword(ha, ha 1355 drivers/scsi/qla2xxx/qla_sup.c flash_data_addr(ha, faddr), cpu_to_le32(*dwptr)); ha 1371 drivers/scsi/qla2xxx/qla_sup.c dma_free_coherent(&ha->pdev->dev, ha 1383 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1387 drivers/scsi/qla2xxx/qla_sup.c qla2x00_lock_nvram_access(ha); ha 1389 drivers/scsi/qla2xxx/qla_sup.c wptr[i] = cpu_to_le16(qla2x00_get_nvram_word(ha, ha 1391 drivers/scsi/qla2xxx/qla_sup.c qla2x00_unlock_nvram_access(ha); ha 1400 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1404 drivers/scsi/qla2xxx/qla_sup.c if (IS_P3P_TYPE(ha)) ha 1408 drivers/scsi/qla2xxx/qla_sup.c naddr = nvram_data_addr(ha, naddr); ha 1411 drivers/scsi/qla2xxx/qla_sup.c if (qla24xx_read_flash_dword(ha, naddr, dwptr)) ha 1427 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1431 drivers/scsi/qla2xxx/qla_sup.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1432 drivers/scsi/qla2xxx/qla_sup.c qla2x00_lock_nvram_access(ha); ha 1435 drivers/scsi/qla2xxx/qla_sup.c stat = qla2x00_clear_nvram_protection(ha); ha 1439 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_nvram_word(ha, naddr, ha 1445 drivers/scsi/qla2xxx/qla_sup.c qla2x00_set_nvram_protection(ha, stat); ha 1447 drivers/scsi/qla2xxx/qla_sup.c qla2x00_unlock_nvram_access(ha); ha 1448 drivers/scsi/qla2xxx/qla_sup.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1457 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1458 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 1465 drivers/scsi/qla2xxx/qla_sup.c if (IS_P3P_TYPE(ha)) ha 1474 drivers/scsi/qla2xxx/qla_sup.c qla24xx_write_flash_dword(ha, nvram_conf_addr(ha, 0x101), 0); ha 1475 drivers/scsi/qla2xxx/qla_sup.c qla24xx_write_flash_dword(ha, nvram_conf_addr(ha, 0x101), 0); ha 1478 drivers/scsi/qla2xxx/qla_sup.c naddr = nvram_data_addr(ha, naddr); ha 1481 drivers/scsi/qla2xxx/qla_sup.c if (qla24xx_write_flash_dword(ha, naddr, cpu_to_le32(*dwptr))) { ha 1490 drivers/scsi/qla2xxx/qla_sup.c qla24xx_write_flash_dword(ha, nvram_conf_addr(ha, 0x101), 0x8c); ha 1504 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1509 drivers/scsi/qla2xxx/qla_sup.c naddr = flash_data_addr(ha, ha->flt_region_vpd_nvram | naddr); ha 1512 drivers/scsi/qla2xxx/qla_sup.c if (qla24xx_read_flash_dword(ha, naddr, dwptr)) ha 1526 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1531 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->read_optrom(vha, dbuf, ha->flt_region_vpd_nvram << 2, ha 1534 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->write_optrom(vha, dbuf, ha->flt_region_vpd_nvram << 2, ha 1542 drivers/scsi/qla2xxx/qla_sup.c qla2x00_flip_colors(struct qla_hw_data *ha, uint16_t *pflags) ha 1544 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA2322(ha)) { ha 1546 drivers/scsi/qla2xxx/qla_sup.c if (ha->beacon_color_state == QLA_LED_ALL_ON) { ha 1548 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_color_state = 0; ha 1552 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_color_state = QLA_LED_ALL_ON; ha 1557 drivers/scsi/qla2xxx/qla_sup.c if (ha->beacon_color_state == QLA_LED_GRN_ON) { ha 1559 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_color_state = 0; ha 1563 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_color_state = QLA_LED_GRN_ON; ha 1578 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1579 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 1581 drivers/scsi/qla2xxx/qla_sup.c if (IS_P3P_TYPE(ha)) ha 1584 drivers/scsi/qla2xxx/qla_sup.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1587 drivers/scsi/qla2xxx/qla_sup.c if (ha->pio_address) { ha 1588 drivers/scsi/qla2xxx/qla_sup.c gpio_enable = RD_REG_WORD_PIO(PIO_REG(ha, gpioe)); ha 1589 drivers/scsi/qla2xxx/qla_sup.c gpio_data = RD_REG_WORD_PIO(PIO_REG(ha, gpiod)); ha 1598 drivers/scsi/qla2xxx/qla_sup.c if (ha->pio_address) { ha 1599 drivers/scsi/qla2xxx/qla_sup.c WRT_REG_WORD_PIO(PIO_REG(ha, gpioe), gpio_enable); ha 1605 drivers/scsi/qla2xxx/qla_sup.c qla2x00_flip_colors(ha, &led_color); ha 1614 drivers/scsi/qla2xxx/qla_sup.c if (ha->pio_address) { ha 1615 drivers/scsi/qla2xxx/qla_sup.c WRT_REG_WORD_PIO(PIO_REG(ha, gpiod), gpio_data); ha 1621 drivers/scsi/qla2xxx/qla_sup.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1630 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1631 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 1633 drivers/scsi/qla2xxx/qla_sup.c ha->fw_options[1] &= ~FO1_SET_EMPHASIS_SWING; ha 1634 drivers/scsi/qla2xxx/qla_sup.c ha->fw_options[1] |= FO1_DISABLE_GPIO6_7; ha 1636 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_set_fw_options(vha, ha->fw_options) != QLA_SUCCESS) { ha 1643 drivers/scsi/qla2xxx/qla_sup.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1644 drivers/scsi/qla2xxx/qla_sup.c if (ha->pio_address) { ha 1645 drivers/scsi/qla2xxx/qla_sup.c gpio_enable = RD_REG_WORD_PIO(PIO_REG(ha, gpioe)); ha 1646 drivers/scsi/qla2xxx/qla_sup.c gpio_data = RD_REG_WORD_PIO(PIO_REG(ha, gpiod)); ha 1654 drivers/scsi/qla2xxx/qla_sup.c if (ha->pio_address) { ha 1655 drivers/scsi/qla2xxx/qla_sup.c WRT_REG_WORD_PIO(PIO_REG(ha, gpioe), gpio_enable); ha 1663 drivers/scsi/qla2xxx/qla_sup.c if (ha->pio_address) { ha 1664 drivers/scsi/qla2xxx/qla_sup.c WRT_REG_WORD_PIO(PIO_REG(ha, gpiod), gpio_data); ha 1669 drivers/scsi/qla2xxx/qla_sup.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1675 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_blink_led = 1; ha 1676 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_color_state = 0; ha 1685 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1687 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_blink_led = 0; ha 1690 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA2322(ha)) ha 1691 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_color_state = QLA_LED_ALL_ON; ha 1693 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_color_state = QLA_LED_GRN_ON; ha 1695 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->beacon_blink(vha); /* This turns green LED off */ ha 1697 drivers/scsi/qla2xxx/qla_sup.c ha->fw_options[1] &= ~FO1_SET_EMPHASIS_SWING; ha 1698 drivers/scsi/qla2xxx/qla_sup.c ha->fw_options[1] &= ~FO1_DISABLE_GPIO6_7; ha 1700 drivers/scsi/qla2xxx/qla_sup.c rval = qla2x00_set_fw_options(vha, ha->fw_options); ha 1709 drivers/scsi/qla2xxx/qla_sup.c qla24xx_flip_colors(struct qla_hw_data *ha, uint16_t *pflags) ha 1712 drivers/scsi/qla2xxx/qla_sup.c if (ha->beacon_color_state == QLA_LED_ALL_ON) { ha 1714 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_color_state = 0; ha 1718 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_color_state = QLA_LED_ALL_ON; ha 1729 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1730 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 1733 drivers/scsi/qla2xxx/qla_sup.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1743 drivers/scsi/qla2xxx/qla_sup.c qla24xx_flip_colors(ha, &led_color); ha 1754 drivers/scsi/qla2xxx/qla_sup.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1758 drivers/scsi/qla2xxx/qla_sup.c qla83xx_select_led_port(struct qla_hw_data *ha) ha 1762 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ha 1765 drivers/scsi/qla2xxx/qla_sup.c if (ha->port_no == 0) ha 1778 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1783 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA83XX(ha) && !IS_QLA81XX(ha) && !IS_QLA27XX(ha) && ha 1784 drivers/scsi/qla2xxx/qla_sup.c !IS_QLA28XX(ha)) ha 1787 drivers/scsi/qla2xxx/qla_sup.c if (!ha->beacon_blink_led) ha 1790 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 1793 drivers/scsi/qla2xxx/qla_sup.c } else if (IS_QLA2031(ha)) { ha 1794 drivers/scsi/qla2xxx/qla_sup.c led_select_value = qla83xx_select_led_port(ha); ha 1798 drivers/scsi/qla2xxx/qla_sup.c } else if (IS_QLA8031(ha)) { ha 1799 drivers/scsi/qla2xxx/qla_sup.c led_select_value = qla83xx_select_led_port(ha); ha 1809 drivers/scsi/qla2xxx/qla_sup.c } else if (IS_QLA81XX(ha)) { ha 1816 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA81XX(ha)) { ha 1833 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA81XX(ha)) { ha 1857 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1858 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 1860 drivers/scsi/qla2xxx/qla_sup.c if (IS_P3P_TYPE(ha)) ha 1863 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA8031(ha) || IS_QLA81XX(ha)) ha 1866 drivers/scsi/qla2xxx/qla_sup.c if (ha->beacon_blink_led == 0) { ha 1868 drivers/scsi/qla2xxx/qla_sup.c ha->fw_options[1] |= ADD_FO1_DISABLE_GPIO_LED_CTRL; ha 1870 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_set_fw_options(vha, ha->fw_options) != QLA_SUCCESS) ha 1873 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_get_fw_options(vha, ha->fw_options) != ha 1880 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA2031(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 1883 drivers/scsi/qla2xxx/qla_sup.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1891 drivers/scsi/qla2xxx/qla_sup.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1895 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_color_state = 0; ha 1899 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_blink_led = 1; ha 1909 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 1910 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; ha 1912 drivers/scsi/qla2xxx/qla_sup.c if (IS_P3P_TYPE(ha)) ha 1915 drivers/scsi/qla2xxx/qla_sup.c if (!ha->flags.fw_started) ha 1918 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_blink_led = 0; ha 1920 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA2031(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 1923 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA8031(ha) || IS_QLA81XX(ha)) ha 1926 drivers/scsi/qla2xxx/qla_sup.c ha->beacon_color_state = QLA_LED_ALL_ON; ha 1928 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->beacon_blink(vha); /* Will flip to all off. */ ha 1931 drivers/scsi/qla2xxx/qla_sup.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1938 drivers/scsi/qla2xxx/qla_sup.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1941 drivers/scsi/qla2xxx/qla_sup.c ha->fw_options[1] &= ~ADD_FO1_DISABLE_GPIO_LED_CTRL; ha 1943 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_set_fw_options(vha, ha->fw_options) != QLA_SUCCESS) { ha 1949 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_get_fw_options(vha, ha->fw_options) != QLA_SUCCESS) { ha 1968 drivers/scsi/qla2xxx/qla_sup.c qla2x00_flash_enable(struct qla_hw_data *ha) ha 1971 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 1984 drivers/scsi/qla2xxx/qla_sup.c qla2x00_flash_disable(struct qla_hw_data *ha) ha 1987 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2005 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_byte(struct qla_hw_data *ha, uint32_t addr) ha 2009 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2013 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA2322(ha) || IS_QLA6322(ha)) { ha 2041 drivers/scsi/qla2xxx/qla_sup.c if (ha->pio_address) { ha 2044 drivers/scsi/qla2xxx/qla_sup.c WRT_REG_WORD_PIO(PIO_REG(ha, flash_address), (uint16_t)addr); ha 2046 drivers/scsi/qla2xxx/qla_sup.c data = RD_REG_WORD_PIO(PIO_REG(ha, flash_data)); ha 2049 drivers/scsi/qla2xxx/qla_sup.c data2 = RD_REG_WORD_PIO(PIO_REG(ha, flash_data)); ha 2066 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(struct qla_hw_data *ha, uint32_t addr, uint8_t data) ha 2069 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2072 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA2322(ha) || IS_QLA6322(ha)) { ha 2102 drivers/scsi/qla2xxx/qla_sup.c if (ha->pio_address) { ha 2103 drivers/scsi/qla2xxx/qla_sup.c WRT_REG_WORD_PIO(PIO_REG(ha, flash_address), (uint16_t)addr); ha 2104 drivers/scsi/qla2xxx/qla_sup.c WRT_REG_WORD_PIO(PIO_REG(ha, flash_data), (uint16_t)data); ha 2129 drivers/scsi/qla2xxx/qla_sup.c qla2x00_poll_flash(struct qla_hw_data *ha, uint32_t addr, uint8_t poll_data, ha 2141 drivers/scsi/qla2xxx/qla_sup.c flash_data = qla2x00_read_flash_byte(ha, addr); ha 2169 drivers/scsi/qla2xxx/qla_sup.c qla2x00_program_flash_address(struct qla_hw_data *ha, uint32_t addr, ha 2173 drivers/scsi/qla2xxx/qla_sup.c if (IS_OEM_001(ha)) { ha 2174 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0xaaa, 0xaa); ha 2175 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x555, 0x55); ha 2176 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0xaaa, 0xa0); ha 2177 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, addr, data); ha 2180 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, addr, data); ha 2184 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0xaa); ha 2185 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x2aaa, 0x55); ha 2186 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0xa0); ha 2187 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, addr, data); ha 2194 drivers/scsi/qla2xxx/qla_sup.c return qla2x00_poll_flash(ha, addr, data, man_id, flash_id); ha 2206 drivers/scsi/qla2xxx/qla_sup.c qla2x00_erase_flash(struct qla_hw_data *ha, uint8_t man_id, uint8_t flash_id) ha 2209 drivers/scsi/qla2xxx/qla_sup.c if (IS_OEM_001(ha)) { ha 2210 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0xaaa, 0xaa); ha 2211 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x555, 0x55); ha 2212 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0xaaa, 0x80); ha 2213 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0xaaa, 0xaa); ha 2214 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x555, 0x55); ha 2215 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0xaaa, 0x10); ha 2217 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0xaa); ha 2218 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x2aaa, 0x55); ha 2219 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0x80); ha 2220 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0xaa); ha 2221 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x2aaa, 0x55); ha 2222 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0x10); ha 2228 drivers/scsi/qla2xxx/qla_sup.c return qla2x00_poll_flash(ha, 0x00, 0x80, man_id, flash_id); ha 2242 drivers/scsi/qla2xxx/qla_sup.c qla2x00_erase_flash_sector(struct qla_hw_data *ha, uint32_t addr, ha 2246 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0xaa); ha 2247 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x2aaa, 0x55); ha 2248 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0x80); ha 2249 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0xaa); ha 2250 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x2aaa, 0x55); ha 2252 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, addr & sec_mask, 0x10); ha 2254 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, addr & sec_mask, 0x30); ha 2259 drivers/scsi/qla2xxx/qla_sup.c return qla2x00_poll_flash(ha, addr, 0x80, man_id, flash_id); ha 2269 drivers/scsi/qla2xxx/qla_sup.c qla2x00_get_flash_manufacturer(struct qla_hw_data *ha, uint8_t *man_id, ha 2272 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0xaa); ha 2273 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x2aaa, 0x55); ha 2274 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0x90); ha 2275 drivers/scsi/qla2xxx/qla_sup.c *man_id = qla2x00_read_flash_byte(ha, 0x0000); ha 2276 drivers/scsi/qla2xxx/qla_sup.c *flash_id = qla2x00_read_flash_byte(ha, 0x0001); ha 2277 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0xaa); ha 2278 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x2aaa, 0x55); ha 2279 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, 0xf0); ha 2283 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_data(struct qla_hw_data *ha, uint8_t *tmp_buf, ha 2286 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2299 drivers/scsi/qla2xxx/qla_sup.c data = qla2x00_read_flash_byte(ha, saddr); ha 2312 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 2313 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2317 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->disable_intrs(ha); ha 2318 drivers/scsi/qla2xxx/qla_sup.c set_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); ha 2321 drivers/scsi/qla2xxx/qla_sup.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 2324 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA2100(ha) || IS_QLA2200(ha) || IS_QLA2300(ha)) { ha 2333 drivers/scsi/qla2xxx/qla_sup.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 2339 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 2342 drivers/scsi/qla2xxx/qla_sup.c clear_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); ha 2355 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 2356 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2362 drivers/scsi/qla2xxx/qla_sup.c midpoint = ha->optrom_size / 2; ha 2364 drivers/scsi/qla2xxx/qla_sup.c qla2x00_flash_enable(ha); ha 2373 drivers/scsi/qla2xxx/qla_sup.c *data = qla2x00_read_flash_byte(ha, addr); ha 2375 drivers/scsi/qla2xxx/qla_sup.c qla2x00_flash_disable(ha); ha 2392 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 2393 drivers/scsi/qla2xxx/qla_sup.c struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; ha 2403 drivers/scsi/qla2xxx/qla_sup.c pci_read_config_word(ha->pdev, PCI_COMMAND, &wd); ha 2406 drivers/scsi/qla2xxx/qla_sup.c qla2x00_flash_enable(ha); ha 2409 drivers/scsi/qla2xxx/qla_sup.c if (IS_OEM_001(ha)) { ha 2416 drivers/scsi/qla2xxx/qla_sup.c qla2x00_get_flash_manufacturer(ha, &man_id, &flash_id); ha 2509 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA2322(ha) || IS_QLA6322(ha)) { ha 2510 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_erase_flash(ha, man_id, flash_id)) { ha 2521 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA2322(ha) || IS_QLA6322(ha)) { ha 2550 drivers/scsi/qla2xxx/qla_sup.c } else if (addr == ha->optrom_size / 2) { ha 2556 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, ha 2558 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x2aaa, ha 2560 drivers/scsi/qla2xxx/qla_sup.c qla2x00_write_flash_byte(ha, 0x5555, ha 2562 drivers/scsi/qla2xxx/qla_sup.c } else if (!IS_QLA2322(ha) && !IS_QLA6322(ha)) { ha 2564 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_erase_flash_sector(ha, ha 2586 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_program_flash_address(ha, addr, *data, ha 2594 drivers/scsi/qla2xxx/qla_sup.c qla2x00_flash_disable(ha); ha 2606 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 2610 drivers/scsi/qla2xxx/qla_sup.c set_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); ha 2616 drivers/scsi/qla2xxx/qla_sup.c clear_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); ha 2654 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 2660 drivers/scsi/qla2xxx/qla_sup.c if (!ha->flt) ha 2663 drivers/scsi/qla2xxx/qla_sup.c flt = (struct qla_flt_header *)ha->flt; ha 2683 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 2710 drivers/scsi/qla2xxx/qla_sup.c optrom = dma_alloc_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE, ha 2723 drivers/scsi/qla2xxx/qla_sup.c if (ha->flags.secure_adapter && region.attribute) { ha 2785 drivers/scsi/qla2xxx/qla_sup.c sfub = dma_alloc_coherent(&ha->pdev->dev, ha 2805 drivers/scsi/qla2xxx/qla_sup.c rest_addr = (ha->fdt_block_size >> 2) - 1; ha 2841 drivers/scsi/qla2xxx/qla_sup.c if (ha->flags.secure_adapter) { ha 2847 drivers/scsi/qla2xxx/qla_sup.c if (!ha->flags.secure_fw) { ha 2871 drivers/scsi/qla2xxx/qla_sup.c ha->flags.fac_supported = 0; ha 2927 drivers/scsi/qla2xxx/qla_sup.c flash_data_addr(ha, faddr), dburst); ha 2931 drivers/scsi/qla2xxx/qla_sup.c flash_data_addr(ha, faddr), optrom, ha 2965 drivers/scsi/qla2xxx/qla_sup.c dma_free_coherent(&ha->pdev->dev, ha 2976 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 2980 drivers/scsi/qla2xxx/qla_sup.c set_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); ha 2983 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA28XX(ha)) ha 2990 drivers/scsi/qla2xxx/qla_sup.c clear_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); ha 3005 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 3007 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA25XX(ha) || IS_QLA81XX(ha) || IS_QLA83XX(ha) || ha 3008 drivers/scsi/qla2xxx/qla_sup.c IS_QLA27XX(ha) || IS_QLA28XX(ha)) ha 3018 drivers/scsi/qla2xxx/qla_sup.c optrom = dma_alloc_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE, ha 3036 drivers/scsi/qla2xxx/qla_sup.c flash_data_addr(ha, faddr), burst); ha 3040 drivers/scsi/qla2xxx/qla_sup.c rval, flash_data_addr(ha, faddr), ha 3045 drivers/scsi/qla2xxx/qla_sup.c dma_free_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE, ha 3057 drivers/scsi/qla2xxx/qla_sup.c dma_free_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE, optrom, ha 3085 drivers/scsi/qla2xxx/qla_sup.c qla2x00_get_fcode_version(struct qla_hw_data *ha, uint32_t pcids) ha 3091 drivers/scsi/qla2xxx/qla_sup.c memset(ha->fcode_revision, 0, sizeof(ha->fcode_revision)); ha 3095 drivers/scsi/qla2xxx/qla_sup.c ((qla2x00_read_flash_byte(ha, pcids + 0x0B) << 8) | ha 3096 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_byte(ha, pcids + 0x0A)); ha 3104 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_read_flash_byte(ha, iter) == '/') { ha 3105 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_read_flash_byte(ha, iter + 2) == ha 3108 drivers/scsi/qla2xxx/qla_sup.c else if (qla2x00_read_flash_byte(ha, ha 3120 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_read_flash_byte(ha, iter) == ' ') ha 3134 drivers/scsi/qla2xxx/qla_sup.c rbyte = qla2x00_read_flash_byte(ha, iter); ha 3144 drivers/scsi/qla2xxx/qla_sup.c ((vend - iter) < sizeof(ha->fcode_revision))) { ha 3145 drivers/scsi/qla2xxx/qla_sup.c vbyte = ha->fcode_revision; ha 3147 drivers/scsi/qla2xxx/qla_sup.c *vbyte++ = qla2x00_read_flash_byte(ha, iter); ha 3155 drivers/scsi/qla2xxx/qla_sup.c memset(ha->fcode_revision, 0, sizeof(ha->fcode_revision)); ha 3166 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 3168 drivers/scsi/qla2xxx/qla_sup.c if (!ha->pio_address || !mbuf) ha 3171 drivers/scsi/qla2xxx/qla_sup.c memset(ha->bios_revision, 0, sizeof(ha->bios_revision)); ha 3172 drivers/scsi/qla2xxx/qla_sup.c memset(ha->efi_revision, 0, sizeof(ha->efi_revision)); ha 3173 drivers/scsi/qla2xxx/qla_sup.c memset(ha->fcode_revision, 0, sizeof(ha->fcode_revision)); ha 3174 drivers/scsi/qla2xxx/qla_sup.c memset(ha->fw_revision, 0, sizeof(ha->fw_revision)); ha 3176 drivers/scsi/qla2xxx/qla_sup.c qla2x00_flash_enable(ha); ha 3183 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_read_flash_byte(ha, pcihdr) != 0x55 || ha 3184 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_byte(ha, pcihdr + 0x01) != 0xaa) { ha 3194 drivers/scsi/qla2xxx/qla_sup.c ((qla2x00_read_flash_byte(ha, pcihdr + 0x19) << 8) | ha 3195 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_byte(ha, pcihdr + 0x18)); ha 3198 drivers/scsi/qla2xxx/qla_sup.c if (qla2x00_read_flash_byte(ha, pcids) != 'P' || ha 3199 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_byte(ha, pcids + 0x1) != 'C' || ha 3200 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_byte(ha, pcids + 0x2) != 'I' || ha 3201 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_byte(ha, pcids + 0x3) != 'R') { ha 3210 drivers/scsi/qla2xxx/qla_sup.c code_type = qla2x00_read_flash_byte(ha, pcids + 0x14); ha 3214 drivers/scsi/qla2xxx/qla_sup.c ha->bios_revision[0] = ha 3215 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_byte(ha, pcids + 0x12); ha 3216 drivers/scsi/qla2xxx/qla_sup.c ha->bios_revision[1] = ha 3217 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_byte(ha, pcids + 0x13); ha 3220 drivers/scsi/qla2xxx/qla_sup.c ha->bios_revision[1], ha->bios_revision[0]); ha 3225 drivers/scsi/qla2xxx/qla_sup.c qla2x00_get_fcode_version(ha, pcids); ha 3229 drivers/scsi/qla2xxx/qla_sup.c ha->efi_revision[0] = ha 3230 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_byte(ha, pcids + 0x12); ha 3231 drivers/scsi/qla2xxx/qla_sup.c ha->efi_revision[1] = ha 3232 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_byte(ha, pcids + 0x13); ha 3235 drivers/scsi/qla2xxx/qla_sup.c ha->efi_revision[1], ha->efi_revision[0]); ha 3244 drivers/scsi/qla2xxx/qla_sup.c last_image = qla2x00_read_flash_byte(ha, pcids + 0x15) & BIT_7; ha 3247 drivers/scsi/qla2xxx/qla_sup.c pcihdr += ((qla2x00_read_flash_byte(ha, pcids + 0x11) << 8) | ha 3248 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_byte(ha, pcids + 0x10)) * 512; ha 3251 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA2322(ha)) { ha 3253 drivers/scsi/qla2xxx/qla_sup.c memset(ha->fw_revision, 0, sizeof(ha->fw_revision)); ha 3258 drivers/scsi/qla2xxx/qla_sup.c qla2x00_read_flash_data(ha, dbyte, ha->flt_region_fw * 4 + 10, ha 3272 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fw * 4); ha 3275 drivers/scsi/qla2xxx/qla_sup.c ha->fw_revision[0] = dbyte[0] << 16 | dbyte[1]; ha 3276 drivers/scsi/qla2xxx/qla_sup.c ha->fw_revision[1] = dbyte[2] << 16 | dbyte[3]; ha 3277 drivers/scsi/qla2xxx/qla_sup.c ha->fw_revision[2] = dbyte[4] << 16 | dbyte[5]; ha 3280 drivers/scsi/qla2xxx/qla_sup.c "%d.%d.%d.\n", ha->fw_revision[0], ha 3281 drivers/scsi/qla2xxx/qla_sup.c ha->fw_revision[1], ha->fw_revision[2]); ha 3285 drivers/scsi/qla2xxx/qla_sup.c qla2x00_flash_disable(ha); ha 3298 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 3303 drivers/scsi/qla2xxx/qla_sup.c memset(ha->bios_revision, 0, sizeof(ha->bios_revision)); ha 3304 drivers/scsi/qla2xxx/qla_sup.c memset(ha->efi_revision, 0, sizeof(ha->efi_revision)); ha 3305 drivers/scsi/qla2xxx/qla_sup.c memset(ha->fcode_revision, 0, sizeof(ha->fcode_revision)); ha 3306 drivers/scsi/qla2xxx/qla_sup.c memset(ha->fw_revision, 0, sizeof(ha->fw_revision)); ha 3309 drivers/scsi/qla2xxx/qla_sup.c pcihdr = ha->flt_region_boot << 2; ha 3313 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->read_optrom(vha, dcode, pcihdr, 0x20 * 4); ha 3326 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->read_optrom(vha, dcode, pcids, 0x20 * 4); ha 3343 drivers/scsi/qla2xxx/qla_sup.c ha->bios_revision[0] = bcode[0x12]; ha 3344 drivers/scsi/qla2xxx/qla_sup.c ha->bios_revision[1] = bcode[0x13]; ha 3347 drivers/scsi/qla2xxx/qla_sup.c ha->bios_revision[1], ha->bios_revision[0]); ha 3351 drivers/scsi/qla2xxx/qla_sup.c ha->fcode_revision[0] = bcode[0x12]; ha 3352 drivers/scsi/qla2xxx/qla_sup.c ha->fcode_revision[1] = bcode[0x13]; ha 3355 drivers/scsi/qla2xxx/qla_sup.c ha->fcode_revision[1], ha->fcode_revision[0]); ha 3359 drivers/scsi/qla2xxx/qla_sup.c ha->efi_revision[0] = bcode[0x12]; ha 3360 drivers/scsi/qla2xxx/qla_sup.c ha->efi_revision[1] = bcode[0x13]; ha 3363 drivers/scsi/qla2xxx/qla_sup.c ha->efi_revision[1], ha->efi_revision[0]); ha 3379 drivers/scsi/qla2xxx/qla_sup.c memset(ha->fw_revision, 0, sizeof(ha->fw_revision)); ha 3381 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->read_optrom(vha, dcode, ha->flt_region_fw << 2, 0x20); ha 3387 drivers/scsi/qla2xxx/qla_sup.c ha->fw_revision[0] = bcode[0x4]; ha 3388 drivers/scsi/qla2xxx/qla_sup.c ha->fw_revision[1] = bcode[0x5]; ha 3389 drivers/scsi/qla2xxx/qla_sup.c ha->fw_revision[2] = bcode[0x6]; ha 3392 drivers/scsi/qla2xxx/qla_sup.c ha->fw_revision[0], ha->fw_revision[1], ha 3393 drivers/scsi/qla2xxx/qla_sup.c ha->fw_revision[2]); ha 3408 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 3412 drivers/scsi/qla2xxx/qla_sup.c if (IS_P3P_TYPE(ha)) ha 3418 drivers/scsi/qla2xxx/qla_sup.c memset(ha->bios_revision, 0, sizeof(ha->bios_revision)); ha 3419 drivers/scsi/qla2xxx/qla_sup.c memset(ha->efi_revision, 0, sizeof(ha->efi_revision)); ha 3420 drivers/scsi/qla2xxx/qla_sup.c memset(ha->fcode_revision, 0, sizeof(ha->fcode_revision)); ha 3421 drivers/scsi/qla2xxx/qla_sup.c memset(ha->fw_revision, 0, sizeof(ha->fw_revision)); ha 3423 drivers/scsi/qla2xxx/qla_sup.c pcihdr = ha->flt_region_boot << 2; ha 3424 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 3427 drivers/scsi/qla2xxx/qla_sup.c pcihdr = ha->flt_region_boot_sec << 2; ha 3464 drivers/scsi/qla2xxx/qla_sup.c ha->bios_revision[0] = bcode[0x12]; ha 3465 drivers/scsi/qla2xxx/qla_sup.c ha->bios_revision[1] = bcode[0x13]; ha 3468 drivers/scsi/qla2xxx/qla_sup.c ha->bios_revision[1], ha->bios_revision[0]); ha 3472 drivers/scsi/qla2xxx/qla_sup.c ha->fcode_revision[0] = bcode[0x12]; ha 3473 drivers/scsi/qla2xxx/qla_sup.c ha->fcode_revision[1] = bcode[0x13]; ha 3476 drivers/scsi/qla2xxx/qla_sup.c ha->fcode_revision[1], ha->fcode_revision[0]); ha 3480 drivers/scsi/qla2xxx/qla_sup.c ha->efi_revision[0] = bcode[0x12]; ha 3481 drivers/scsi/qla2xxx/qla_sup.c ha->efi_revision[1] = bcode[0x13]; ha 3484 drivers/scsi/qla2xxx/qla_sup.c ha->efi_revision[1], ha->efi_revision[0]); ha 3500 drivers/scsi/qla2xxx/qla_sup.c memset(ha->fw_revision, 0, sizeof(ha->fw_revision)); ha 3501 drivers/scsi/qla2xxx/qla_sup.c faddr = ha->flt_region_fw; ha 3502 drivers/scsi/qla2xxx/qla_sup.c if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 3505 drivers/scsi/qla2xxx/qla_sup.c faddr = ha->flt_region_fw_sec; ha 3512 drivers/scsi/qla2xxx/qla_sup.c ha->flt_region_fw * 4); ha 3516 drivers/scsi/qla2xxx/qla_sup.c ha->fw_revision[i] = be32_to_cpu(dcode[4+i]); ha 3519 drivers/scsi/qla2xxx/qla_sup.c ha->fw_revision[0], ha->fw_revision[1], ha 3520 drivers/scsi/qla2xxx/qla_sup.c ha->fw_revision[2], ha->fw_revision[3]); ha 3524 drivers/scsi/qla2xxx/qla_sup.c if (!IS_QLA81XX(ha)) { ha 3529 drivers/scsi/qla2xxx/qla_sup.c memset(ha->gold_fw_version, 0, sizeof(ha->gold_fw_version)); ha 3530 drivers/scsi/qla2xxx/qla_sup.c faddr = ha->flt_region_gold_fw; ha 3531 drivers/scsi/qla2xxx/qla_sup.c qla24xx_read_flash_data(vha, (void *)dcode, ha->flt_region_gold_fw, 8); ha 3540 drivers/scsi/qla2xxx/qla_sup.c ha->gold_fw_version[i] = be32_to_cpu(dcode[4+i]); ha 3565 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 3566 drivers/scsi/qla2xxx/qla_sup.c uint8_t *pos = ha->vpd; ha 3567 drivers/scsi/qla2xxx/qla_sup.c uint8_t *end = pos + ha->vpd_size; ha 3570 drivers/scsi/qla2xxx/qla_sup.c if (!IS_FWI2_CAPABLE(ha) || !qla2xxx_is_vpd_valid(pos, end)) ha 3596 drivers/scsi/qla2xxx/qla_sup.c struct qla_hw_data *ha = vha->hw; ha 3598 drivers/scsi/qla2xxx/qla_sup.c if (!ha->fcp_prio_cfg) { ha 3599 drivers/scsi/qla2xxx/qla_sup.c ha->fcp_prio_cfg = vmalloc(FCP_PRIO_CFG_SIZE); ha 3600 drivers/scsi/qla2xxx/qla_sup.c if (!ha->fcp_prio_cfg) { ha 3607 drivers/scsi/qla2xxx/qla_sup.c memset(ha->fcp_prio_cfg, 0, FCP_PRIO_CFG_SIZE); ha 3609 drivers/scsi/qla2xxx/qla_sup.c fcp_prio_addr = ha->flt_region_fcp_prio; ha 3612 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->read_optrom(vha, ha->fcp_prio_cfg, ha 3615 drivers/scsi/qla2xxx/qla_sup.c if (!qla24xx_fcp_prio_cfg_valid(vha, ha->fcp_prio_cfg, 0)) ha 3620 drivers/scsi/qla2xxx/qla_sup.c len = ha->fcp_prio_cfg->num_entries * FCP_PRIO_CFG_ENTRY_SIZE; ha 3623 drivers/scsi/qla2xxx/qla_sup.c ha->isp_ops->read_optrom(vha, &ha->fcp_prio_cfg->entry[0], ha 3627 drivers/scsi/qla2xxx/qla_sup.c if (!qla24xx_fcp_prio_cfg_valid(vha, ha->fcp_prio_cfg, 1)) ha 3630 drivers/scsi/qla2xxx/qla_sup.c ha->flags.fcp_prio_enabled = 1; ha 3633 drivers/scsi/qla2xxx/qla_sup.c vfree(ha->fcp_prio_cfg); ha 3634 drivers/scsi/qla2xxx/qla_sup.c ha->fcp_prio_cfg = NULL; ha 110 drivers/scsi/qla2xxx/qla_target.c static void qlt_24xx_atio_pkt(struct scsi_qla_host *ha, ha 112 drivers/scsi/qla2xxx/qla_target.c static void qlt_response_pkt(struct scsi_qla_host *ha, struct rsp_que *rsp, ha 215 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 220 drivers/scsi/qla2xxx/qla_target.c BUG_ON(ha->tgt.tgt_vp_map == NULL); ha 221 drivers/scsi/qla2xxx/qla_target.c if (likely(test_bit(vp_idx, ha->vp_idx_map))) ha 222 drivers/scsi/qla2xxx/qla_target.c return ha->tgt.tgt_vp_map[vp_idx].vha; ha 697 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = fcport->vha->hw; ha 700 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->shutdown_sess(fcport); ha 701 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->put_sess(fcport); ha 712 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 720 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 722 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 727 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 732 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 738 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 741 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 749 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 761 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->update_sess(sess, fcport->d_id, ha 773 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 775 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->put_sess(sess); ha 953 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 956 drivers/scsi/qla2xxx/qla_target.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 996 drivers/scsi/qla2xxx/qla_target.c ELS_PRLI) && ha->flags.rida_fmt2) { ha 1019 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->free_session(sess); ha 1048 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 1108 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 1170 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 1181 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 1183 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 1185 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 1186 drivers/scsi/qla2xxx/qla_target.c sess = ha->tgt.tgt_ops->find_sess_by_loop_id(vha, loop_id); ha 1187 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 1288 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 1294 drivers/scsi/qla2xxx/qla_target.c gid_list = dma_alloc_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha), ha 1299 drivers/scsi/qla2xxx/qla_target.c vha->vp_idx, qla2x00_gid_list_size(ha)); ha 1323 drivers/scsi/qla2xxx/qla_target.c gid = (void *)gid + ha->gid_list_info_size; ha 1327 drivers/scsi/qla2xxx/qla_target.c dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha), ha 1341 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 1370 drivers/scsi/qla2xxx/qla_target.c if (ha->tgt.tgt_ops->check_initiator_node_acl(vha, ha 1389 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 1394 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 1458 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = tgt->ha; ha 1465 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 1470 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 1479 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = tgt->ha; ha 1482 drivers/scsi/qla2xxx/qla_target.c mutex_lock(&ha->optrom_mutex); ha 1489 drivers/scsi/qla2xxx/qla_target.c mutex_unlock(&ha->optrom_mutex); ha 1521 drivers/scsi/qla2xxx/qla_target.c if (!ha->flags.host_shutting_down && ha 1527 drivers/scsi/qla2xxx/qla_target.c mutex_unlock(&ha->optrom_mutex); ha 1578 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 1608 drivers/scsi/qla2xxx/qla_target.c if (ha->tgt.tgt_ops && ha 1609 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->remove_target && ha 1611 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->remove_target(vha); ha 1662 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 1666 drivers/scsi/qla2xxx/qla_target.c if (!ha->flags.fw_started) ha 1669 drivers/scsi/qla2xxx/qla_target.c ql_dbg(ql_dbg_tgt, vha, 0xe004, "Sending NOTIFY_ACK (ha=%p)\n", ha); ha 1718 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 1728 drivers/scsi/qla2xxx/qla_target.c ha, mcmd->fc_tm_rsp); ha 1807 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 1814 drivers/scsi/qla2xxx/qla_target.c ha, abts, status); ha 2018 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = mcmd->vha->hw; ha 2032 drivers/scsi/qla2xxx/qla_target.c rc = ha->tgt.tgt_ops->handle_tmr(mcmd, mcmd->unpacked_lun, ha 2071 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 2090 drivers/scsi/qla2xxx/qla_target.c mcmd->reset_count = ha->base_qpair->chip_reset; ha 2101 drivers/scsi/qla2xxx/qla_target.c if (ha->tgt.tgt_ops->find_cmd_by_tag) { ha 2104 drivers/scsi/qla2xxx/qla_target.c abort_cmd = ha->tgt.tgt_ops->find_cmd_by_tag(sess, ha 2126 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 2137 drivers/scsi/qla2xxx/qla_target.c qlt_24xx_send_abts_resp(ha->base_qpair, abts, FCP_TMF_REJECTED, ha 2146 drivers/scsi/qla2xxx/qla_target.c qlt_24xx_send_abts_resp(ha->base_qpair, abts, FCP_TMF_REJECTED, ha 2159 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 2160 drivers/scsi/qla2xxx/qla_target.c sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, s_id); ha 2165 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 2167 drivers/scsi/qla2xxx/qla_target.c qlt_24xx_send_abts_resp(ha->base_qpair, abts, FCP_TMF_REJECTED, ha 2171 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 2175 drivers/scsi/qla2xxx/qla_target.c qlt_24xx_send_abts_resp(ha->base_qpair, abts, FCP_TMF_REJECTED, ha 2185 drivers/scsi/qla2xxx/qla_target.c qlt_24xx_send_abts_resp(ha->base_qpair, abts, FCP_TMF_REJECTED, ha 2197 drivers/scsi/qla2xxx/qla_target.c struct scsi_qla_host *ha = mcmd->vha; ha 2202 drivers/scsi/qla2xxx/qla_target.c ql_dbg(ql_dbg_tgt, ha, 0xe008, ha 2204 drivers/scsi/qla2xxx/qla_target.c ha, atio, resp_code); ha 2209 drivers/scsi/qla2xxx/qla_target.c ql_dbg(ql_dbg_tgt, ha, 0xe04c, ha 2211 drivers/scsi/qla2xxx/qla_target.c "request packet\n", ha->vp_idx, __func__); ha 2220 drivers/scsi/qla2xxx/qla_target.c ctio->vp_index = ha->vp_idx; ha 2238 drivers/scsi/qla2xxx/qla_target.c qla2x00_start_iocbs(ha, qpair->req); ha 2319 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 2339 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->free_mcmd(mcmd); ha 2377 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->free_mcmd(mcmd); ha 2446 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha; ha 2464 drivers/scsi/qla2xxx/qla_target.c ha = vha->hw; ha 2466 drivers/scsi/qla2xxx/qla_target.c qla2x00_clean_dsd_pool(ha, cmd->ctx); ha 2468 drivers/scsi/qla2xxx/qla_target.c dma_pool_free(ha->dl_dma_pool, cmd->ctx, cmd->ctx->crc_ctx_dma); ha 2904 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 2916 drivers/scsi/qla2xxx/qla_target.c if (IS_PI_UNINIT_CAPABLE(ha)) { ha 2924 drivers/scsi/qla2xxx/qla_target.c t32 = ha->tgt.tgt_ops->get_dif_tags(cmd, pfw_prot_opts); ha 2947 drivers/scsi/qla2xxx/qla_target.c !(ha->tgt.tgt_ops->chk_dif_tags(t32))) { ha 2964 drivers/scsi/qla2xxx/qla_target.c !(ha->tgt.tgt_ops->chk_dif_tags(t32))) { ha 2992 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha; ha 3004 drivers/scsi/qla2xxx/qla_target.c ha = vha->hw; ha 3044 drivers/scsi/qla2xxx/qla_target.c else if (IS_PI_UNINIT_CAPABLE(ha)) { ha 3117 drivers/scsi/qla2xxx/qla_target.c dma_pool_zalloc(ha->dl_dma_pool, GFP_ATOMIC, &crc_ctx_dma); ha 3166 drivers/scsi/qla2xxx/qla_target.c if (qla24xx_walk_and_build_sglist_no_difb(ha, NULL, cur_dsd, ha 3169 drivers/scsi/qla2xxx/qla_target.c } else if (qla24xx_walk_and_build_sglist(ha, NULL, cur_dsd, ha 3178 drivers/scsi/qla2xxx/qla_target.c if (qla24xx_walk_and_build_prot_sglist(ha, NULL, cur_dsd, ha 3543 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 3548 drivers/scsi/qla2xxx/qla_target.c "Sending TERM ELS CTIO (ha=%p)\n", ha); ha 3608 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 3613 drivers/scsi/qla2xxx/qla_target.c ql_dbg(ql_dbg_tgt, vha, 0xe009, "Sending TERM EXCH CTIO (ha=%p)\n", ha); ha 3905 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 4024 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->handle_data(cmd); ha 4043 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->free_cmd(cmd); ha 4084 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 4122 drivers/scsi/qla2xxx/qla_target.c ret = ha->tgt.tgt_ops->handle_cmd(vha, cmd, cdb, data_length, ha 4129 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->put_sess(sess); ha 4146 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->put_sess(sess); ha 4165 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 4172 drivers/scsi/qla2xxx/qla_target.c ha->tgt.num_act_qpairs); ha 4174 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.atio_lock, flags); ha 4179 drivers/scsi/qla2xxx/qla_target.c ha->base_qpair->lun_cnt = 0; ha 4180 drivers/scsi/qla2xxx/qla_target.c for (key = 0; key < ha->max_qpairs; key++) ha 4181 drivers/scsi/qla2xxx/qla_target.c if (ha->queue_pair_map[key]) ha 4182 drivers/scsi/qla2xxx/qla_target.c ha->queue_pair_map[key]->lun_cnt = 0; ha 4184 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.atio_lock, flags); ha 4308 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 4325 drivers/scsi/qla2xxx/qla_target.c sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, atio->u.isp24.fcp_hdr.s_id); ha 4353 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->put_sess(sess); ha 4367 drivers/scsi/qla2xxx/qla_target.c } else if (ha->msix_count) { ha 4386 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 4408 drivers/scsi/qla2xxx/qla_target.c mcmd->reset_count = ha->base_qpair->chip_reset; ha 4446 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 4454 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 4455 drivers/scsi/qla2xxx/qla_target.c sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, ha 4457 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 4473 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 4493 drivers/scsi/qla2xxx/qla_target.c mcmd->reset_count = ha->base_qpair->chip_reset; ha 4495 drivers/scsi/qla2xxx/qla_target.c mcmd->qpair = ha->base_qpair; ha 4497 drivers/scsi/qla2xxx/qla_target.c rc = ha->tgt.tgt_ops->handle_tmr(mcmd, unpacked_lun, mcmd->tmr_func, ha 4514 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 4519 drivers/scsi/qla2xxx/qla_target.c loop_id = GET_TARGET_ID(ha, (struct atio_from_isp *)iocb); ha 4521 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 4522 drivers/scsi/qla2xxx/qla_target.c sess = ha->tgt.tgt_ops->find_sess_by_loop_id(vha, loop_id); ha 4523 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 4852 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 4861 drivers/scsi/qla2xxx/qla_target.c lockdep_assert_held(&ha->hardware_lock); ha 4888 drivers/scsi/qla2xxx/qla_target.c if (N2N_TOPO(ha)) { ha 4913 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&tgt->ha->tgt.sess_lock, flags); ha 4916 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&tgt->ha->tgt.sess_lock, flags); ha 4940 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&tgt->ha->tgt.sess_lock, flags); ha 4953 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&tgt->ha->tgt.sess_lock, ha 4979 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&tgt->ha->tgt.sess_lock, ha 5015 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&tgt->ha->tgt.sess_lock, flags); ha 5020 drivers/scsi/qla2xxx/qla_target.c if (ha->current_topology != ISP_CFG_F) { ha 5056 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 5058 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 5094 drivers/scsi/qla2xxx/qla_target.c qlt_send_notify_ack(ha->base_qpair, ha 5134 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 5139 drivers/scsi/qla2xxx/qla_target.c lockdep_assert_held(&ha->hardware_lock); ha 5165 drivers/scsi/qla2xxx/qla_target.c qlt_send_notify_ack(ha->base_qpair, ha 5228 drivers/scsi/qla2xxx/qla_target.c GET_TARGET_ID(ha, (struct atio_from_isp *)iocb), ha 5258 drivers/scsi/qla2xxx/qla_target.c qlt_send_notify_ack(ha->base_qpair, iocb, add_flags, 0, 0, 0, ha 5271 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 5280 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 5282 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 5343 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 5372 drivers/scsi/qla2xxx/qla_target.c sess = ha->tgt.tgt_ops->find_sess_by_s_id ha 5404 drivers/scsi/qla2xxx/qla_target.c cmd->reset_count = ha->base_qpair->chip_reset; ha 5406 drivers/scsi/qla2xxx/qla_target.c cmd->qpair = ha->base_qpair; ha 5431 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 5437 drivers/scsi/qla2xxx/qla_target.c if (list_empty(&ha->tgt.q_full_list)) ha 5444 drivers/scsi/qla2xxx/qla_target.c if (list_empty(&ha->tgt.q_full_list)) { ha 5519 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 5522 drivers/scsi/qla2xxx/qla_target.c if (ha->tgt.num_pend_cmds < Q_FULL_THRESH_HOLD(ha)) ha 5526 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 5529 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 5539 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 5546 drivers/scsi/qla2xxx/qla_target.c "ATIO pkt, but no tgt (ha %p)", ha); ha 5565 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 5566 drivers/scsi/qla2xxx/qla_target.c qlt_send_busy(ha->base_qpair, atio, qla_sam_status); ha 5568 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->hardware_lock, ha 5574 drivers/scsi/qla2xxx/qla_target.c rc = qlt_chk_qfull_thresh_hold(vha, ha->base_qpair, ha 5586 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 5595 drivers/scsi/qla2xxx/qla_target.c qlt_send_term_exchange(ha->base_qpair, NULL, ha 5602 drivers/scsi/qla2xxx/qla_target.c qlt_send_busy(ha->base_qpair, atio, ha 5609 drivers/scsi/qla2xxx/qla_target.c qlt_send_busy(ha->base_qpair, atio, ha 5614 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->hardware_lock, ha 5632 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 5635 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 5657 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 5678 drivers/scsi/qla2xxx/qla_target.c if (qpair == ha->base_qpair) ha 5679 drivers/scsi/qla2xxx/qla_target.c ha->isp_ops->fw_dump(vha, 1); ha 5681 drivers/scsi/qla2xxx/qla_target.c ha->isp_ops->fw_dump(vha, 0); ha 5703 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 5725 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->free_mcmd(mcmd); ha 5736 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->free_mcmd(mcmd); ha 5739 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->free_mcmd(mcmd); ha 5903 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 5911 drivers/scsi/qla2xxx/qla_target.c IS_QLA2100(ha)) ha 5940 drivers/scsi/qla2xxx/qla_target.c qlt_send_notify_ack(ha->base_qpair, ha 6164 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 6170 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags2); ha 6177 drivers/scsi/qla2xxx/qla_target.c sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, s_id); ha 6179 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags2); ha 6184 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags2); ha 6203 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags2); ha 6205 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->put_sess(sess); ha 6212 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags2); ha 6215 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 6216 drivers/scsi/qla2xxx/qla_target.c qlt_24xx_send_abts_resp(ha->base_qpair, &prm->abts, ha 6218 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 6226 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 6235 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 6241 drivers/scsi/qla2xxx/qla_target.c sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, s_id); ha 6243 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 6248 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 6270 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 6272 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->put_sess(sess); ha 6279 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 6281 drivers/scsi/qla2xxx/qla_target.c qlt_send_term_exchange(ha->base_qpair, NULL, &prm->tm_iocb2, 1, 0); ha 6326 drivers/scsi/qla2xxx/qla_target.c int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha) ha 6335 drivers/scsi/qla2xxx/qla_target.c if (!IS_TGT_MODE_CAPABLE(ha)) { ha 6342 drivers/scsi/qla2xxx/qla_target.c "Registering target for host %ld(%p).\n", base_vha->host_no, ha); ha 6353 drivers/scsi/qla2xxx/qla_target.c tgt->qphints = kcalloc(ha->max_qpairs + 1, ha 6375 drivers/scsi/qla2xxx/qla_target.c h->qpair = ha->base_qpair; ha 6377 drivers/scsi/qla2xxx/qla_target.c h->cpuid = ha->base_qpair->cpuid; ha 6378 drivers/scsi/qla2xxx/qla_target.c list_add_tail(&h->hint_elem, &ha->base_qpair->hints_list); ha 6380 drivers/scsi/qla2xxx/qla_target.c for (i = 0; i < ha->max_qpairs; i++) { ha 6383 drivers/scsi/qla2xxx/qla_target.c struct qla_qpair *qpair = ha->queue_pair_map[i]; ha 6396 drivers/scsi/qla2xxx/qla_target.c tgt->ha = ha; ha 6417 drivers/scsi/qla2xxx/qla_target.c if (ha->tgt.tgt_ops && ha->tgt.tgt_ops->add_target) ha 6418 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops->add_target(base_vha); ha 6424 drivers/scsi/qla2xxx/qla_target.c int qlt_remove_target(struct qla_hw_data *ha, struct scsi_qla_host *vha) ha 6438 drivers/scsi/qla2xxx/qla_target.c vha->host_no, ha); ha 6444 drivers/scsi/qla2xxx/qla_target.c void qlt_remove_target_resources(struct qla_hw_data *ha) ha 6449 drivers/scsi/qla2xxx/qla_target.c btree_for_each_safe32(&ha->tgt.host_map, key, node) ha 6450 drivers/scsi/qla2xxx/qla_target.c btree_remove32(&ha->tgt.host_map, key); ha 6452 drivers/scsi/qla2xxx/qla_target.c btree_destroy32(&ha->tgt.host_map); ha 6479 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha; ha 6488 drivers/scsi/qla2xxx/qla_target.c ha = vha->hw; ha 6500 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 6504 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 6510 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 6513 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 6547 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 6553 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_ops = NULL; ha 6607 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 6610 drivers/scsi/qla2xxx/qla_target.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 6622 drivers/scsi/qla2xxx/qla_target.c if (ha->tgt.num_act_qpairs > ha->max_qpairs) ha 6623 drivers/scsi/qla2xxx/qla_target.c ha->tgt.num_act_qpairs = ha->max_qpairs; ha 6624 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 6627 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 6629 drivers/scsi/qla2xxx/qla_target.c mutex_lock(&ha->optrom_mutex); ha 6641 drivers/scsi/qla2xxx/qla_target.c mutex_unlock(&ha->optrom_mutex); ha 6652 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 6664 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 6666 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 6681 drivers/scsi/qla2xxx/qla_target.c qlt_vport_create(struct scsi_qla_host *vha, struct qla_hw_data *ha) ha 6696 drivers/scsi/qla2xxx/qla_target.c ha->tgt.atio_q_length = ATIO_ENTRY_CNT_24XX; ha 6698 drivers/scsi/qla2xxx/qla_target.c qlt_add_target(ha, vha); ha 6730 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 6732 drivers/scsi/qla2xxx/qla_target.c struct atio_from_isp *pkt = (struct atio_from_isp *)ha->tgt.atio_ring; ha 6737 drivers/scsi/qla2xxx/qla_target.c for (cnt = 0; cnt < ha->tgt.atio_q_length; cnt++) { ha 6751 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 6755 drivers/scsi/qla2xxx/qla_target.c if (!ha->flags.fw_started) ha 6758 drivers/scsi/qla2xxx/qla_target.c while ((ha->tgt.atio_ring_ptr->signature != ATIO_PROCESSED) || ha 6759 drivers/scsi/qla2xxx/qla_target.c fcpcmd_is_corrupted(ha->tgt.atio_ring_ptr)) { ha 6760 drivers/scsi/qla2xxx/qla_target.c pkt = (struct atio_from_isp *)ha->tgt.atio_ring_ptr; ha 6763 drivers/scsi/qla2xxx/qla_target.c if (unlikely(fcpcmd_is_corrupted(ha->tgt.atio_ring_ptr))) { ha 6776 drivers/scsi/qla2xxx/qla_target.c qlt_send_term_exchange(ha->base_qpair, NULL, pkt, ha 6784 drivers/scsi/qla2xxx/qla_target.c ha->tgt.atio_ring_index++; ha 6785 drivers/scsi/qla2xxx/qla_target.c if (ha->tgt.atio_ring_index == ha->tgt.atio_q_length) { ha 6786 drivers/scsi/qla2xxx/qla_target.c ha->tgt.atio_ring_index = 0; ha 6787 drivers/scsi/qla2xxx/qla_target.c ha->tgt.atio_ring_ptr = ha->tgt.atio_ring; ha 6789 drivers/scsi/qla2xxx/qla_target.c ha->tgt.atio_ring_ptr++; ha 6792 drivers/scsi/qla2xxx/qla_target.c pkt = (struct atio_from_isp *)ha->tgt.atio_ring_ptr; ha 6798 drivers/scsi/qla2xxx/qla_target.c WRT_REG_DWORD(ISP_ATIO_Q_OUT(vha), ha->tgt.atio_ring_index); ha 6804 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 6805 drivers/scsi/qla2xxx/qla_target.c struct qla_msix_entry *msix = &ha->msix_entries[2]; ha 6806 drivers/scsi/qla2xxx/qla_target.c struct init_cb_24xx *icb = (struct init_cb_24xx *)ha->init_cb; ha 6815 drivers/scsi/qla2xxx/qla_target.c if (ha->flags.msix_enabled) { ha 6816 drivers/scsi/qla2xxx/qla_target.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 6817 drivers/scsi/qla2xxx/qla_target.c if (IS_QLA2071(ha)) { ha 6831 drivers/scsi/qla2xxx/qla_target.c if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ha 6843 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 6850 drivers/scsi/qla2xxx/qla_target.c if (!ha->tgt.saved_set) { ha 6852 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_exchange_count = nv->exchange_count; ha 6853 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_firmware_options_1 = ha 6855 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_firmware_options_2 = ha 6857 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_firmware_options_3 = ha 6859 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_set = 1; ha 6897 drivers/scsi/qla2xxx/qla_target.c if (IS_QLA25XX(ha)) { ha 6905 drivers/scsi/qla2xxx/qla_target.c if (ha->tgt.saved_set) { ha 6906 drivers/scsi/qla2xxx/qla_target.c nv->exchange_count = ha->tgt.saved_exchange_count; ha 6908 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_firmware_options_1; ha 6910 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_firmware_options_2; ha 6912 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_firmware_options_3; ha 6917 drivers/scsi/qla2xxx/qla_target.c if (ha->base_qpair->enable_class_2) { ha 6935 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 6940 drivers/scsi/qla2xxx/qla_target.c if (ha->tgt.node_name_set) { ha 6941 drivers/scsi/qla2xxx/qla_target.c memcpy(icb->node_name, ha->tgt.tgt_node_name, WWN_SIZE); ha 6949 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 6956 drivers/scsi/qla2xxx/qla_target.c if (!ha->tgt.saved_set) { ha 6958 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_exchange_count = nv->exchange_count; ha 6959 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_firmware_options_1 = ha 6961 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_firmware_options_2 = ha 6963 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_firmware_options_3 = ha 6965 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_set = 1; ha 7008 drivers/scsi/qla2xxx/qla_target.c if (ha->tgt.saved_set) { ha 7009 drivers/scsi/qla2xxx/qla_target.c nv->exchange_count = ha->tgt.saved_exchange_count; ha 7011 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_firmware_options_1; ha 7013 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_firmware_options_2; ha 7015 drivers/scsi/qla2xxx/qla_target.c ha->tgt.saved_firmware_options_3; ha 7020 drivers/scsi/qla2xxx/qla_target.c if (ha->base_qpair->enable_class_2) { ha 7038 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 7043 drivers/scsi/qla2xxx/qla_target.c if (ha->tgt.node_name_set) { ha 7044 drivers/scsi/qla2xxx/qla_target.c memcpy(icb->node_name, ha->tgt.tgt_node_name, WWN_SIZE); ha 7050 drivers/scsi/qla2xxx/qla_target.c qlt_83xx_iospace_config(struct qla_hw_data *ha) ha 7055 drivers/scsi/qla2xxx/qla_target.c ha->msix_count += 1; /* For ATIO Q */ ha 7073 drivers/scsi/qla2xxx/qla_target.c qlt_probe_one_stage1(struct scsi_qla_host *base_vha, struct qla_hw_data *ha) ha 7080 drivers/scsi/qla2xxx/qla_target.c if ((ql2xenablemsix == 0) || IS_QLA83XX(ha) || IS_QLA27XX(ha) || ha 7081 drivers/scsi/qla2xxx/qla_target.c IS_QLA28XX(ha)) { ha 7082 drivers/scsi/qla2xxx/qla_target.c ISP_ATIO_Q_IN(base_vha) = &ha->mqiobase->isp25mq.atio_q_in; ha 7083 drivers/scsi/qla2xxx/qla_target.c ISP_ATIO_Q_OUT(base_vha) = &ha->mqiobase->isp25mq.atio_q_out; ha 7085 drivers/scsi/qla2xxx/qla_target.c ISP_ATIO_Q_IN(base_vha) = &ha->iobase->isp24.atio_q_in; ha 7086 drivers/scsi/qla2xxx/qla_target.c ISP_ATIO_Q_OUT(base_vha) = &ha->iobase->isp24.atio_q_out; ha 7098 drivers/scsi/qla2xxx/qla_target.c rc = btree_init32(&ha->tgt.host_map); ha 7111 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha; ha 7115 drivers/scsi/qla2xxx/qla_target.c ha = rsp->hw; ha 7116 drivers/scsi/qla2xxx/qla_target.c vha = pci_get_drvdata(ha->pdev); ha 7118 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.atio_lock, flags); ha 7122 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.atio_lock, flags); ha 7133 drivers/scsi/qla2xxx/qla_target.c struct qla_hw_data *ha = vha->hw; ha 7137 drivers/scsi/qla2xxx/qla_target.c (op->chip_reset != ha->base_qpair->chip_reset)) ha 7140 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->tgt.atio_lock, flags); ha 7142 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->tgt.atio_lock, flags); ha 7144 drivers/scsi/qla2xxx/qla_target.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 7146 drivers/scsi/qla2xxx/qla_target.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 7177 drivers/scsi/qla2xxx/qla_target.c qlt_mem_alloc(struct qla_hw_data *ha) ha 7182 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_vp_map = kcalloc(MAX_MULTI_ID_FABRIC, ha 7185 drivers/scsi/qla2xxx/qla_target.c if (!ha->tgt.tgt_vp_map) ha 7188 drivers/scsi/qla2xxx/qla_target.c ha->tgt.atio_ring = dma_alloc_coherent(&ha->pdev->dev, ha 7189 drivers/scsi/qla2xxx/qla_target.c (ha->tgt.atio_q_length + 1) * sizeof(struct atio_from_isp), ha 7190 drivers/scsi/qla2xxx/qla_target.c &ha->tgt.atio_dma, GFP_KERNEL); ha 7191 drivers/scsi/qla2xxx/qla_target.c if (!ha->tgt.atio_ring) { ha 7192 drivers/scsi/qla2xxx/qla_target.c kfree(ha->tgt.tgt_vp_map); ha 7199 drivers/scsi/qla2xxx/qla_target.c qlt_mem_free(struct qla_hw_data *ha) ha 7204 drivers/scsi/qla2xxx/qla_target.c if (ha->tgt.atio_ring) { ha 7205 drivers/scsi/qla2xxx/qla_target.c dma_free_coherent(&ha->pdev->dev, (ha->tgt.atio_q_length + 1) * ha 7206 drivers/scsi/qla2xxx/qla_target.c sizeof(struct atio_from_isp), ha->tgt.atio_ring, ha 7207 drivers/scsi/qla2xxx/qla_target.c ha->tgt.atio_dma); ha 7209 drivers/scsi/qla2xxx/qla_target.c ha->tgt.atio_ring = NULL; ha 7210 drivers/scsi/qla2xxx/qla_target.c ha->tgt.atio_dma = 0; ha 7211 drivers/scsi/qla2xxx/qla_target.c kfree(ha->tgt.tgt_vp_map); ha 7212 drivers/scsi/qla2xxx/qla_target.c ha->tgt.tgt_vp_map = NULL; ha 121 drivers/scsi/qla2xxx/qla_target.h #define GET_TARGET_ID(ha, iocb) ((HAS_EXTENDED_IDS(ha)) \ ha 776 drivers/scsi/qla2xxx/qla_target.h struct qla_hw_data *ha; ha 1018 drivers/scsi/qla2xxx/qla_target.h static inline bool qla_tgt_mode_enabled(struct scsi_qla_host *ha) ha 1020 drivers/scsi/qla2xxx/qla_target.h return ha->host->active_mode == MODE_TARGET; ha 1023 drivers/scsi/qla2xxx/qla_target.h static inline bool qla_ini_mode_enabled(struct scsi_qla_host *ha) ha 1025 drivers/scsi/qla2xxx/qla_target.h return ha->host->active_mode == MODE_INITIATOR; ha 1028 drivers/scsi/qla2xxx/qla_target.h static inline bool qla_dual_mode_enabled(struct scsi_qla_host *ha) ha 1030 drivers/scsi/qla2xxx/qla_target.h return (ha->host->active_mode == MODE_DUAL); ha 359 drivers/scsi/qla2xxx/qla_tmpl.c struct qla_hw_data *ha = vha->hw; ha 360 drivers/scsi/qla2xxx/qla_tmpl.c struct atio *atr = ha->tgt.atio_ring; ha 363 drivers/scsi/qla2xxx/qla_tmpl.c length = ha->tgt.atio_q_length; ha 653 drivers/scsi/qla2xxx/qla_tmpl.c struct qla_hw_data *ha = vha->hw; ha 654 drivers/scsi/qla2xxx/qla_tmpl.c struct atio *atr = ha->tgt.atio_ring_ptr; ha 659 drivers/scsi/qla2xxx/qla_tmpl.c qla27xx_insert32(ha->tgt.atio_q_in ? ha 660 drivers/scsi/qla2xxx/qla_tmpl.c readl(ha->tgt.atio_q_in) : 0, buf, len); ha 1367 drivers/scsi/qla2xxx/tcm_qla2xxx.c struct qla_hw_data *ha = tgt->ha; ha 1368 drivers/scsi/qla2xxx/tcm_qla2xxx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 1398 drivers/scsi/qla2xxx/tcm_qla2xxx.c struct qla_hw_data *ha = lport->qla_vha->hw; ha 1410 drivers/scsi/qla2xxx/tcm_qla2xxx.c spin_lock_irqsave(&ha->tgt.sess_lock, flags); ha 1415 drivers/scsi/qla2xxx/tcm_qla2xxx.c spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); ha 1429 drivers/scsi/qla2xxx/tcm_qla2xxx.c struct qla_hw_data *ha = vha->hw; ha 1434 drivers/scsi/qla2xxx/tcm_qla2xxx.c int num_tags = (ha->cur_fw_xcb_count) ? ha->cur_fw_xcb_count : ha 1475 drivers/scsi/qla2xxx/tcm_qla2xxx.c struct qla_hw_data *ha = tgt->ha; ha 1476 drivers/scsi/qla2xxx/tcm_qla2xxx.c scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); ha 1594 drivers/scsi/qla2xxx/tcm_qla2xxx.c struct qla_hw_data *ha = vha->hw; ha 1600 drivers/scsi/qla2xxx/tcm_qla2xxx.c ha->tgt.tgt_ops = &tcm_qla2xxx_template; ha 1777 drivers/scsi/qla2xxx/tcm_qla2xxx.c struct qla_hw_data *ha = npiv_vha->hw; ha 1778 drivers/scsi/qla2xxx/tcm_qla2xxx.c scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); ha 16 drivers/scsi/qla4xxx/ql4_83xx.c uint32_t qla4_83xx_rd_reg(struct scsi_qla_host *ha, ulong addr) ha 18 drivers/scsi/qla4xxx/ql4_83xx.c return readl((void __iomem *)(ha->nx_pcibase + addr)); ha 21 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_wr_reg(struct scsi_qla_host *ha, ulong addr, uint32_t val) ha 23 drivers/scsi/qla4xxx/ql4_83xx.c writel(val, (void __iomem *)(ha->nx_pcibase + addr)); ha 26 drivers/scsi/qla4xxx/ql4_83xx.c static int qla4_83xx_set_win_base(struct scsi_qla_host *ha, uint32_t addr) ha 31 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg(ha, QLA83XX_CRB_WIN_FUNC(ha->func_num), addr); ha 32 drivers/scsi/qla4xxx/ql4_83xx.c val = qla4_83xx_rd_reg(ha, QLA83XX_CRB_WIN_FUNC(ha->func_num)); ha 34 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Failed to set register window : addr written 0x%x, read 0x%x!\n", ha 42 drivers/scsi/qla4xxx/ql4_83xx.c int qla4_83xx_rd_reg_indirect(struct scsi_qla_host *ha, uint32_t addr, ha 47 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_set_win_base(ha, addr); ha 50 drivers/scsi/qla4xxx/ql4_83xx.c *data = qla4_83xx_rd_reg(ha, QLA83XX_WILDCARD); ha 53 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: failed read of addr 0x%x!\n", ha 60 drivers/scsi/qla4xxx/ql4_83xx.c int qla4_83xx_wr_reg_indirect(struct scsi_qla_host *ha, uint32_t addr, ha 65 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_set_win_base(ha, addr); ha 68 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg(ha, QLA83XX_WILDCARD, data); ha 70 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: failed wrt to addr 0x%x, data 0x%x\n", ha 76 drivers/scsi/qla4xxx/ql4_83xx.c static int qla4_83xx_flash_lock(struct scsi_qla_host *ha) ha 84 drivers/scsi/qla4xxx/ql4_83xx.c lock_status = qla4_83xx_rd_reg(ha, QLA83XX_FLASH_LOCK); ha 89 drivers/scsi/qla4xxx/ql4_83xx.c lock_owner = qla4_83xx_rd_reg(ha, ha 91 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: flash lock by func %d failed, held by func %d\n", ha 92 drivers/scsi/qla4xxx/ql4_83xx.c __func__, ha->func_num, lock_owner); ha 99 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg(ha, QLA83XX_FLASH_LOCK_ID, ha->func_num); ha 103 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_flash_unlock(struct scsi_qla_host *ha) ha 106 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg(ha, QLA83XX_FLASH_LOCK_ID, 0xFF); ha 107 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_rd_reg(ha, QLA83XX_FLASH_UNLOCK); ha 110 drivers/scsi/qla4xxx/ql4_83xx.c int qla4_83xx_flash_read_u32(struct scsi_qla_host *ha, uint32_t flash_addr, ha 118 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_flash_lock(ha); ha 123 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Illegal addr = 0x%x\n", ha 130 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_wr_reg_indirect(ha, ha 134 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: failed to write addr 0x%x to FLASH_DIRECT_WINDOW\n!", ha 139 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_rd_reg_indirect(ha, ha 143 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: failed to read addr 0x%x!\n", ha 154 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_flash_unlock(ha); ha 160 drivers/scsi/qla4xxx/ql4_83xx.c int qla4_83xx_lockless_flash_read_u32(struct scsi_qla_host *ha, ha 173 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Illegal addr = 0x%x\n", ha 179 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_wr_reg_indirect(ha, QLA83XX_FLASH_DIRECT_WINDOW, ha 182 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: failed to write addr 0x%x to FLASH_DIRECT_WINDOW!\n", ha 193 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_rd_reg_indirect(ha, ha 197 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: failed to read addr 0x%x!\n", ha 209 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_wr_reg_indirect(ha, ha 213 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: failed to write addr 0x%x to FLASH_DIRECT_WINDOW!\n", ha 223 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_rd_reg_indirect(ha, ha 227 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: failed to read addr 0x%x!\n", ha 242 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_rom_lock_recovery(struct scsi_qla_host *ha) ha 244 drivers/scsi/qla4xxx/ql4_83xx.c if (qla4_83xx_flash_lock(ha)) ha 245 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "%s: Resetting rom lock\n", __func__); ha 251 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_flash_unlock(ha); ha 257 drivers/scsi/qla4xxx/ql4_83xx.c static int qla4_83xx_lock_recovery(struct scsi_qla_host *ha) ha 263 drivers/scsi/qla4xxx/ql4_83xx.c lockid = ha->isp_ops->rd_reg_direct(ha, QLA83XX_DRV_LOCKRECOVERY); ha 270 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->wr_reg_direct(ha, QLA83XX_DRV_LOCKRECOVERY, ha 271 drivers/scsi/qla4xxx/ql4_83xx.c (ha->func_num << 2) | INTENT_TO_RECOVER); ha 276 drivers/scsi/qla4xxx/ql4_83xx.c lockid = ha->isp_ops->rd_reg_direct(ha, QLA83XX_DRV_LOCKRECOVERY); ha 277 drivers/scsi/qla4xxx/ql4_83xx.c if ((lockid & 0x3C) != (ha->func_num << 2)) ha 280 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "%s: IDC Lock recovery initiated for func %d\n", ha 281 drivers/scsi/qla4xxx/ql4_83xx.c __func__, ha->func_num); ha 284 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->wr_reg_direct(ha, QLA83XX_DRV_LOCKRECOVERY, ha 285 drivers/scsi/qla4xxx/ql4_83xx.c (ha->func_num << 2) | PROCEED_TO_RECOVER); ha 288 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->wr_reg_direct(ha, QLA83XX_DRV_LOCK_ID, 0xFF); ha 289 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->rd_reg_direct(ha, QLA83XX_DRV_UNLOCK); ha 292 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->wr_reg_direct(ha, QLA83XX_DRV_LOCKRECOVERY, 0); ha 295 drivers/scsi/qla4xxx/ql4_83xx.c lock = ha->isp_ops->rd_reg_direct(ha, QLA83XX_DRV_LOCK); ha 297 drivers/scsi/qla4xxx/ql4_83xx.c lockid = ha->isp_ops->rd_reg_direct(ha, QLA83XX_DRV_LOCK_ID); ha 298 drivers/scsi/qla4xxx/ql4_83xx.c lockid = ((lockid + (1 << 8)) & ~0xFF) | ha->func_num; ha 299 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->wr_reg_direct(ha, QLA83XX_DRV_LOCK_ID, lockid); ha 309 drivers/scsi/qla4xxx/ql4_83xx.c int qla4_83xx_drv_lock(struct scsi_qla_host *ha) ha 321 drivers/scsi/qla4xxx/ql4_83xx.c status = qla4_83xx_rd_reg(ha, QLA83XX_DRV_LOCK); ha 325 drivers/scsi/qla4xxx/ql4_83xx.c lock_id = qla4_83xx_rd_reg(ha, QLA83XX_DRV_LOCK_ID); ha 326 drivers/scsi/qla4xxx/ql4_83xx.c lock_id = ((lock_id + (1 << 8)) & ~0xFF) | ha->func_num; ha 327 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg(ha, QLA83XX_DRV_LOCK_ID, lock_id); ha 334 drivers/scsi/qla4xxx/ql4_83xx.c first_owner = ha->isp_ops->rd_reg_direct(ha, ha 339 drivers/scsi/qla4xxx/ql4_83xx.c tmo_owner = qla4_83xx_rd_reg(ha, QLA83XX_DRV_LOCK_ID); ha 342 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "%s: Lock by func %d failed after 2s, lock held by func %d, lock count %d, first_owner %d\n", ha 343 drivers/scsi/qla4xxx/ql4_83xx.c __func__, ha->func_num, func_num, lock_cnt, ha 351 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "%s: IDC lock failed for func %d\n", ha 352 drivers/scsi/qla4xxx/ql4_83xx.c __func__, ha->func_num); ha 357 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_lock_recovery(ha); ha 360 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "%s: IDC lock Recovery by %d successful\n", ha 361 drivers/scsi/qla4xxx/ql4_83xx.c __func__, ha->func_num); ha 366 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "%s: IDC lock Recovery by %d failed, Retrying timeout\n", ha 367 drivers/scsi/qla4xxx/ql4_83xx.c __func__, ha->func_num); ha 377 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_drv_unlock(struct scsi_qla_host *ha) ha 381 drivers/scsi/qla4xxx/ql4_83xx.c id = qla4_83xx_rd_reg(ha, QLA83XX_DRV_LOCK_ID); ha 383 drivers/scsi/qla4xxx/ql4_83xx.c if ((id & 0xFF) != ha->func_num) { ha 384 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: IDC Unlock by %d failed, lock owner is %d\n", ha 385 drivers/scsi/qla4xxx/ql4_83xx.c __func__, ha->func_num, (id & 0xFF)); ha 390 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg(ha, QLA83XX_DRV_LOCK_ID, (id | 0xFF)); ha 391 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_rd_reg(ha, QLA83XX_DRV_UNLOCK); ha 394 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_set_idc_dontreset(struct scsi_qla_host *ha) ha 398 drivers/scsi/qla4xxx/ql4_83xx.c idc_ctrl = qla4_83xx_rd_reg(ha, QLA83XX_IDC_DRV_CTRL); ha 400 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg(ha, QLA83XX_IDC_DRV_CTRL, idc_ctrl); ha 401 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: idc_ctrl = %d\n", __func__, ha 405 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_clear_idc_dontreset(struct scsi_qla_host *ha) ha 409 drivers/scsi/qla4xxx/ql4_83xx.c idc_ctrl = qla4_83xx_rd_reg(ha, QLA83XX_IDC_DRV_CTRL); ha 411 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg(ha, QLA83XX_IDC_DRV_CTRL, idc_ctrl); ha 412 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: idc_ctrl = %d\n", __func__, ha 416 drivers/scsi/qla4xxx/ql4_83xx.c int qla4_83xx_idc_dontreset(struct scsi_qla_host *ha) ha 420 drivers/scsi/qla4xxx/ql4_83xx.c idc_ctrl = qla4_83xx_rd_reg(ha, QLA83XX_IDC_DRV_CTRL); ha 439 drivers/scsi/qla4xxx/ql4_83xx.c int qla4_83xx_can_perform_reset(struct scsi_qla_host *ha) ha 453 drivers/scsi/qla4xxx/ql4_83xx.c dev_part1 = qla4_83xx_rd_reg(ha, ha 454 drivers/scsi/qla4xxx/ql4_83xx.c ha->reg_tbl[QLA8XXX_CRB_DEV_PART_INFO]); ha 455 drivers/scsi/qla4xxx/ql4_83xx.c dev_part2 = qla4_83xx_rd_reg(ha, QLA83XX_CRB_DEV_PART_INFO2); ha 456 drivers/scsi/qla4xxx/ql4_83xx.c drv_active = qla4_83xx_rd_reg(ha, ha->reg_tbl[QLA8XXX_CRB_DRV_ACTIVE]); ha 494 drivers/scsi/qla4xxx/ql4_83xx.c if (!nic_present && (ha->func_num == iscsi_func_low)) { ha 495 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 497 drivers/scsi/qla4xxx/ql4_83xx.c __func__, ha->func_num)); ha 510 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_need_reset_handler(struct scsi_qla_host *ha) ha 515 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "%s: Performing ISP error recovery\n", ha 518 drivers/scsi/qla4xxx/ql4_83xx.c if (!test_bit(AF_8XXX_RST_OWNER, &ha->flags)) { ha 519 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: reset acknowledged\n", ha 521 drivers/scsi/qla4xxx/ql4_83xx.c qla4_8xxx_set_rst_ready(ha); ha 525 drivers/scsi/qla4xxx/ql4_83xx.c dev_init_timeout = jiffies + (ha->nx_dev_init_timeout * HZ); ha 529 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "%s: Non Reset owner dev init timeout\n", ha 534 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->idc_unlock(ha); ha 536 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->idc_lock(ha); ha 538 drivers/scsi/qla4xxx/ql4_83xx.c dev_state = qla4_8xxx_rd_direct(ha, ha 542 drivers/scsi/qla4xxx/ql4_83xx.c qla4_8xxx_set_rst_ready(ha); ha 543 drivers/scsi/qla4xxx/ql4_83xx.c reset_timeout = jiffies + (ha->nx_reset_timeout * HZ); ha 544 drivers/scsi/qla4xxx/ql4_83xx.c drv_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_STATE); ha 545 drivers/scsi/qla4xxx/ql4_83xx.c drv_active = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_ACTIVE); ha 547 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "%s: drv_state = 0x%x, drv_active = 0x%x\n", ha 552 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "%s: %s: RESET TIMEOUT! drv_state: 0x%08x, drv_active: 0x%08x\n", ha 558 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->idc_unlock(ha); ha 560 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->idc_lock(ha); ha 562 drivers/scsi/qla4xxx/ql4_83xx.c drv_state = qla4_8xxx_rd_direct(ha, ha 564 drivers/scsi/qla4xxx/ql4_83xx.c drv_active = qla4_8xxx_rd_direct(ha, ha 569 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "%s: Reset_owner turning off drv_active of non-acking function 0x%x\n", ha 572 drivers/scsi/qla4xxx/ql4_83xx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_ACTIVE, ha 576 drivers/scsi/qla4xxx/ql4_83xx.c clear_bit(AF_8XXX_RST_OWNER, &ha->flags); ha 578 drivers/scsi/qla4xxx/ql4_83xx.c qla4_8xxx_device_bootstrap(ha); ha 582 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_get_idc_param(struct scsi_qla_host *ha) ha 586 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_flash_read_u32(ha, QLA83XX_IDC_PARAM_ADDR, ha 589 drivers/scsi/qla4xxx/ql4_83xx.c ha->nx_dev_init_timeout = idc_params & 0xFFFF; ha 590 drivers/scsi/qla4xxx/ql4_83xx.c ha->nx_reset_timeout = (idc_params >> 16) & 0xFFFF; ha 592 drivers/scsi/qla4xxx/ql4_83xx.c ha->nx_dev_init_timeout = ROM_DEV_INIT_TIMEOUT; ha 593 drivers/scsi/qla4xxx/ql4_83xx.c ha->nx_reset_timeout = ROM_DRV_RESET_ACK_TIMEOUT; ha 596 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_DEBUG, ha, ha 598 drivers/scsi/qla4xxx/ql4_83xx.c __func__, ha->nx_dev_init_timeout, ha 599 drivers/scsi/qla4xxx/ql4_83xx.c ha->nx_reset_timeout)); ha 604 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_dump_reset_seq_hdr(struct scsi_qla_host *ha) ha 608 drivers/scsi/qla4xxx/ql4_83xx.c if (!ha->reset_tmplt.buff) { ha 609 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Error: Invalid reset_seq_template\n", ha 614 drivers/scsi/qla4xxx/ql4_83xx.c phdr = ha->reset_tmplt.buff; ha 616 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 624 drivers/scsi/qla4xxx/ql4_83xx.c static int qla4_83xx_copy_bootloader(struct scsi_qla_host *ha) ha 632 drivers/scsi/qla4xxx/ql4_83xx.c dest = qla4_83xx_rd_reg(ha, QLA83XX_BOOTLOADER_ADDR); ha 633 drivers/scsi/qla4xxx/ql4_83xx.c size = qla4_83xx_rd_reg(ha, QLA83XX_BOOTLOADER_SIZE); ha 644 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Failed to allocate memory for boot loader cache\n", ha 650 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_lockless_flash_read_u32(ha, src, p_cache, ha 653 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Error reading firmware from flash\n", ha 657 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Read firmware from flash\n", ha 661 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_8xxx_ms_mem_write_128b(ha, dest, (uint32_t *)p_cache, ha 664 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Error writing firmware to MS\n", ha 669 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Wrote firmware size %d to MS\n", ha 679 drivers/scsi/qla4xxx/ql4_83xx.c static int qla4_83xx_check_cmd_peg_status(struct scsi_qla_host *ha) ha 685 drivers/scsi/qla4xxx/ql4_83xx.c val = qla4_83xx_rd_reg(ha, QLA83XX_CMDPEG_STATE); ha 687 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 709 drivers/scsi/qla4xxx/ql4_83xx.c static int qla4_83xx_poll_reg(struct scsi_qla_host *ha, uint32_t addr, ha 717 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_rd_reg_indirect(ha, addr, &value); ha 725 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_rd_reg_indirect(ha, addr, &value); ha 738 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.seq_error++; ha 739 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Poll Failed: 0x%08x 0x%08x 0x%08x\n", ha 746 drivers/scsi/qla4xxx/ql4_83xx.c static int qla4_83xx_reset_seq_checksum_test(struct scsi_qla_host *ha) ha 749 drivers/scsi/qla4xxx/ql4_83xx.c uint16_t *buff = (uint16_t *)ha->reset_tmplt.buff; ha 750 drivers/scsi/qla4xxx/ql4_83xx.c int u16_count = ha->reset_tmplt.hdr->size / sizeof(uint16_t); ha 763 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Reset seq checksum failed\n", ha 775 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_read_reset_template(struct scsi_qla_host *ha) ha 781 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.seq_error = 0; ha 782 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.buff = vmalloc(QLA83XX_RESTART_TEMPLATE_SIZE); ha 783 drivers/scsi/qla4xxx/ql4_83xx.c if (ha->reset_tmplt.buff == NULL) { ha 784 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Failed to allocate reset template resources\n", ha 789 drivers/scsi/qla4xxx/ql4_83xx.c p_buff = ha->reset_tmplt.buff; ha 795 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 800 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_flash_read_u32(ha, addr, p_buff, ha 803 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Failed to read reset template\n", ha 808 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.hdr = ha 809 drivers/scsi/qla4xxx/ql4_83xx.c (struct qla4_83xx_reset_template_hdr *)ha->reset_tmplt.buff; ha 812 drivers/scsi/qla4xxx/ql4_83xx.c tmplt_hdr_size = ha->reset_tmplt.hdr->hdr_size/sizeof(uint32_t); ha 814 drivers/scsi/qla4xxx/ql4_83xx.c (ha->reset_tmplt.hdr->signature != RESET_TMPLT_HDR_SIGNATURE)) { ha 815 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Template Header size %d is invalid, tmplt_hdr_def_size %d\n", ha 820 drivers/scsi/qla4xxx/ql4_83xx.c addr = QLA83XX_RESET_TEMPLATE_ADDR + ha->reset_tmplt.hdr->hdr_size; ha 821 drivers/scsi/qla4xxx/ql4_83xx.c p_buff = ha->reset_tmplt.buff + ha->reset_tmplt.hdr->hdr_size; ha 822 drivers/scsi/qla4xxx/ql4_83xx.c tmplt_hdr_def_size = (ha->reset_tmplt.hdr->size - ha 823 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.hdr->hdr_size) / sizeof(uint32_t); ha 825 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 827 drivers/scsi/qla4xxx/ql4_83xx.c __func__, ha->reset_tmplt.hdr->size)); ha 830 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_flash_read_u32(ha, addr, p_buff, ha 833 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Failed to read reset template\n", ha 839 drivers/scsi/qla4xxx/ql4_83xx.c if (qla4_83xx_reset_seq_checksum_test(ha)) { ha 840 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Reset Seq checksum failed!\n", ha 844 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 849 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.init_offset = ha->reset_tmplt.buff + ha 850 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.hdr->init_seq_offset; ha 851 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.start_offset = ha->reset_tmplt.buff + ha 852 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.hdr->start_seq_offset; ha 853 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.stop_offset = ha->reset_tmplt.buff + ha 854 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.hdr->hdr_size; ha 855 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_dump_reset_seq_hdr(ha); ha 860 drivers/scsi/qla4xxx/ql4_83xx.c vfree(ha->reset_tmplt.buff); ha 873 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_read_write_crb_reg(struct scsi_qla_host *ha, ha 878 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_rd_reg_indirect(ha, raddr, &value); ha 879 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, waddr, value); ha 893 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_rmw_crb_reg(struct scsi_qla_host *ha, uint32_t raddr, ha 900 drivers/scsi/qla4xxx/ql4_83xx.c value = ha->reset_tmplt.array[p_rmw_hdr->index_a]; ha 902 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_rd_reg_indirect(ha, raddr, &value); ha 910 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, waddr, value); ha 915 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_write_list(struct scsi_qla_host *ha, ha 925 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, p_entry->arg1, p_entry->arg2); ha 931 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_read_write_list(struct scsi_qla_host *ha, ha 941 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_read_write_crb_reg(ha, p_entry->arg1, p_entry->arg2); ha 947 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_poll_list(struct scsi_qla_host *ha, ha 967 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_poll_reg(ha, p_entry->arg1, delay, ha 973 drivers/scsi/qla4xxx/ql4_83xx.c if (qla4_83xx_poll_reg(ha, p_entry->arg1, delay, ha 976 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_rd_reg_indirect(ha, p_entry->arg1, ha 978 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_rd_reg_indirect(ha, p_entry->arg2, ha 985 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_poll_write_list(struct scsi_qla_host *ha, ha 1000 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, p_entry->dr_addr, ha 1002 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, p_entry->ar_addr, ha 1005 drivers/scsi/qla4xxx/ql4_83xx.c if (qla4_83xx_poll_reg(ha, p_entry->ar_addr, delay, ha 1008 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1011 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.seq_index)); ha 1017 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_read_modify_write(struct scsi_qla_host *ha, ha 1030 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_rmw_crb_reg(ha, p_entry->arg1, p_entry->arg2, ha 1037 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_pause(struct scsi_qla_host *ha, ha 1044 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_poll_read_list(struct scsi_qla_host *ha, ha 1061 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, p_entry->ar_addr, ha 1064 drivers/scsi/qla4xxx/ql4_83xx.c if (qla4_83xx_poll_reg(ha, p_entry->ar_addr, delay, ha 1067 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1070 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.seq_index)); ha 1072 drivers/scsi/qla4xxx/ql4_83xx.c index = ha->reset_tmplt.array_index; ha 1073 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_rd_reg_indirect(ha, p_entry->dr_addr, ha 1075 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.array[index++] = value; ha 1078 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.array_index = 1; ha 1084 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_seq_end(struct scsi_qla_host *ha, ha 1087 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.seq_end = 1; ha 1090 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_template_end(struct scsi_qla_host *ha, ha 1093 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.template_end = 1; ha 1095 drivers/scsi/qla4xxx/ql4_83xx.c if (ha->reset_tmplt.seq_error == 0) { ha 1096 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1100 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Reset sequence completed with some timeout errors.\n", ha 1116 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_process_reset_template(struct scsi_qla_host *ha, ha 1123 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.seq_end = 0; ha 1124 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.template_end = 0; ha 1125 drivers/scsi/qla4xxx/ql4_83xx.c entries = ha->reset_tmplt.hdr->entries; ha 1126 drivers/scsi/qla4xxx/ql4_83xx.c index = ha->reset_tmplt.seq_index; ha 1128 drivers/scsi/qla4xxx/ql4_83xx.c for (; (!ha->reset_tmplt.seq_end) && (index < entries); index++) { ha 1135 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_write_list(ha, p_hdr); ha 1138 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_read_write_list(ha, p_hdr); ha 1141 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_poll_list(ha, p_hdr); ha 1144 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_poll_write_list(ha, p_hdr); ha 1147 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_read_modify_write(ha, p_hdr); ha 1150 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_pause(ha, p_hdr); ha 1153 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_seq_end(ha, p_hdr); ha 1156 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_template_end(ha, p_hdr); ha 1159 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_poll_read_list(ha, p_hdr); ha 1162 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Unknown command ==> 0x%04x on entry = %d\n", ha 1171 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.seq_index = index; ha 1174 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_process_stop_seq(struct scsi_qla_host *ha) ha 1176 drivers/scsi/qla4xxx/ql4_83xx.c ha->reset_tmplt.seq_index = 0; ha 1177 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_process_reset_template(ha, ha->reset_tmplt.stop_offset); ha 1179 drivers/scsi/qla4xxx/ql4_83xx.c if (ha->reset_tmplt.seq_end != 1) ha 1180 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Abrupt STOP Sub-Sequence end.\n", ha 1184 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_process_start_seq(struct scsi_qla_host *ha) ha 1186 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_process_reset_template(ha, ha->reset_tmplt.start_offset); ha 1188 drivers/scsi/qla4xxx/ql4_83xx.c if (ha->reset_tmplt.template_end != 1) ha 1189 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Abrupt START Sub-Sequence end.\n", ha 1193 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_process_init_seq(struct scsi_qla_host *ha) ha 1195 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_process_reset_template(ha, ha->reset_tmplt.init_offset); ha 1197 drivers/scsi/qla4xxx/ql4_83xx.c if (ha->reset_tmplt.seq_end != 1) ha 1198 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Abrupt INIT Sub-Sequence end.\n", ha 1202 drivers/scsi/qla4xxx/ql4_83xx.c static int qla4_83xx_restart(struct scsi_qla_host *ha) ha 1207 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_process_stop_seq(ha); ha 1214 drivers/scsi/qla4xxx/ql4_83xx.c idc_ctrl = qla4_83xx_rd_reg(ha, QLA83XX_IDC_DRV_CTRL); ha 1216 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg(ha, QLA83XX_IDC_DRV_CTRL, ha 1218 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "%s: Graceful RESET: Not collecting minidump\n", ha 1221 drivers/scsi/qla4xxx/ql4_83xx.c qla4_8xxx_get_minidump(ha); ha 1224 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_process_init_seq(ha); ha 1226 drivers/scsi/qla4xxx/ql4_83xx.c if (qla4_83xx_copy_bootloader(ha)) { ha 1227 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Copy bootloader, firmware restart failed!\n", ha 1233 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg(ha, QLA83XX_FW_IMAGE_VALID, QLA83XX_BOOT_FROM_FLASH); ha 1234 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_process_start_seq(ha); ha 1240 drivers/scsi/qla4xxx/ql4_83xx.c int qla4_83xx_start_firmware(struct scsi_qla_host *ha) ha 1244 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_restart(ha); ha 1246 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Restart error\n", __func__); ha 1249 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Restart done\n", ha 1253 drivers/scsi/qla4xxx/ql4_83xx.c ret_val = qla4_83xx_check_cmd_peg_status(ha); ha 1255 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Peg not initialized\n", ha 1264 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_disable_iocb_intrs(struct scsi_qla_host *ha) ha 1266 drivers/scsi/qla4xxx/ql4_83xx.c if (test_and_clear_bit(AF_83XX_IOCB_INTR_ON, &ha->flags)) ha 1267 drivers/scsi/qla4xxx/ql4_83xx.c qla4_8xxx_intr_disable(ha); ha 1270 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_disable_mbox_intrs(struct scsi_qla_host *ha) ha 1274 drivers/scsi/qla4xxx/ql4_83xx.c if (test_and_clear_bit(AF_83XX_MBOX_INTR_ON, &ha->flags)) { ha 1275 drivers/scsi/qla4xxx/ql4_83xx.c ret = readl(&ha->qla4_83xx_reg->mbox_int); ha 1277 drivers/scsi/qla4xxx/ql4_83xx.c writel(mb_int, &ha->qla4_83xx_reg->mbox_int); ha 1278 drivers/scsi/qla4xxx/ql4_83xx.c writel(1, &ha->qla4_83xx_reg->leg_int_mask); ha 1282 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_disable_intrs(struct scsi_qla_host *ha) ha 1284 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_disable_mbox_intrs(ha); ha 1285 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_disable_iocb_intrs(ha); ha 1288 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_enable_iocb_intrs(struct scsi_qla_host *ha) ha 1290 drivers/scsi/qla4xxx/ql4_83xx.c if (!test_bit(AF_83XX_IOCB_INTR_ON, &ha->flags)) { ha 1291 drivers/scsi/qla4xxx/ql4_83xx.c qla4_8xxx_intr_enable(ha); ha 1292 drivers/scsi/qla4xxx/ql4_83xx.c set_bit(AF_83XX_IOCB_INTR_ON, &ha->flags); ha 1296 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_enable_mbox_intrs(struct scsi_qla_host *ha) ha 1300 drivers/scsi/qla4xxx/ql4_83xx.c if (!test_bit(AF_83XX_MBOX_INTR_ON, &ha->flags)) { ha 1302 drivers/scsi/qla4xxx/ql4_83xx.c writel(mb_int, &ha->qla4_83xx_reg->mbox_int); ha 1303 drivers/scsi/qla4xxx/ql4_83xx.c writel(0, &ha->qla4_83xx_reg->leg_int_mask); ha 1304 drivers/scsi/qla4xxx/ql4_83xx.c set_bit(AF_83XX_MBOX_INTR_ON, &ha->flags); ha 1309 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_enable_intrs(struct scsi_qla_host *ha) ha 1311 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_enable_mbox_intrs(ha); ha 1312 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_enable_iocb_intrs(ha); ha 1316 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_queue_mbox_cmd(struct scsi_qla_host *ha, uint32_t *mbx_cmd, ha 1323 drivers/scsi/qla4xxx/ql4_83xx.c writel(mbx_cmd[i], &ha->qla4_83xx_reg->mailbox_in[i]); ha 1325 drivers/scsi/qla4xxx/ql4_83xx.c writel(mbx_cmd[0], &ha->qla4_83xx_reg->mailbox_in[0]); ha 1330 drivers/scsi/qla4xxx/ql4_83xx.c writel(HINT_MBX_INT_PENDING, &ha->qla4_83xx_reg->host_intr); ha 1333 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_process_mbox_intr(struct scsi_qla_host *ha, int outcount) ha 1337 drivers/scsi/qla4xxx/ql4_83xx.c intr_status = readl(&ha->qla4_83xx_reg->risc_intr); ha 1339 drivers/scsi/qla4xxx/ql4_83xx.c ha->mbox_status_count = outcount; ha 1340 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->interrupt_service_routine(ha, intr_status); ha 1348 drivers/scsi/qla4xxx/ql4_83xx.c int qla4_83xx_isp_reset(struct scsi_qla_host *ha) ha 1353 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->idc_lock(ha); ha 1354 drivers/scsi/qla4xxx/ql4_83xx.c dev_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DEV_STATE); ha 1357 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_set_idc_dontreset(ha); ha 1362 drivers/scsi/qla4xxx/ql4_83xx.c if (qla4_83xx_idc_dontreset(ha) == DONTRESET_BIT0) { ha 1363 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_ERR, ha, "%s: Reset recovery disabled\n", ha 1369 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: HW State: NEED RESET\n", ha 1371 drivers/scsi/qla4xxx/ql4_83xx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, ha 1381 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1389 drivers/scsi/qla4xxx/ql4_83xx.c if (qla4_83xx_can_perform_reset(ha)) ha 1390 drivers/scsi/qla4xxx/ql4_83xx.c set_bit(AF_8XXX_RST_OWNER, &ha->flags); ha 1392 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->idc_unlock(ha); ha 1393 drivers/scsi/qla4xxx/ql4_83xx.c rval = qla4_8xxx_device_state_handler(ha); ha 1395 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->idc_lock(ha); ha 1396 drivers/scsi/qla4xxx/ql4_83xx.c qla4_8xxx_clear_rst_ready(ha); ha 1398 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->idc_unlock(ha); ha 1401 drivers/scsi/qla4xxx/ql4_83xx.c clear_bit(AF_FW_RECOVERY, &ha->flags); ha 1406 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) ha 1411 drivers/scsi/qla4xxx/ql4_83xx.c status = qla4_83xx_rd_reg_indirect(ha, QLA83XX_SRE_SHIM_CONTROL, &val); ha 1412 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, "SRE-Shim Ctrl:0x%x\n", val)); ha 1415 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1418 drivers/scsi/qla4xxx/ql4_83xx.c status = qla4_83xx_rd_reg_indirect(ha, ha 1426 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1429 drivers/scsi/qla4xxx/ql4_83xx.c status = qla4_83xx_rd_reg_indirect(ha, ha 1437 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1440 drivers/scsi/qla4xxx/ql4_83xx.c status = qla4_83xx_rd_reg_indirect(ha, ha 1448 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1451 drivers/scsi/qla4xxx/ql4_83xx.c status = qla4_83xx_rd_reg_indirect(ha, ha 1459 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1462 drivers/scsi/qla4xxx/ql4_83xx.c status = qla4_83xx_rd_reg_indirect(ha, ha 1466 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_PORT0_RXB_TC_STATS, ha 1468 drivers/scsi/qla4xxx/ql4_83xx.c status = qla4_83xx_rd_reg_indirect(ha, ha 1477 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1480 drivers/scsi/qla4xxx/ql4_83xx.c status = qla4_83xx_rd_reg_indirect(ha, ha 1484 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_PORT1_RXB_TC_STATS, ha 1486 drivers/scsi/qla4xxx/ql4_83xx.c status = qla4_83xx_rd_reg_indirect(ha, ha 1494 drivers/scsi/qla4xxx/ql4_83xx.c status = qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT2_IFB_PAUSE_THRS, ha 1496 drivers/scsi/qla4xxx/ql4_83xx.c status = qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT3_IFB_PAUSE_THRS, ha 1499 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1504 drivers/scsi/qla4xxx/ql4_83xx.c static void __qla4_83xx_disable_pause(struct scsi_qla_host *ha) ha 1509 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_SRE_SHIM_CONTROL, ha 1514 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, ha 1518 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, ha 1525 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, ha 1529 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, ha 1534 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_PORT2_IFB_PAUSE_THRS, ha 1536 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_PORT3_IFB_PAUSE_THRS, ha 1539 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "Disabled pause frames successfully.\n"); ha 1550 drivers/scsi/qla4xxx/ql4_83xx.c static void qla4_83xx_eport_init(struct scsi_qla_host *ha) ha 1553 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_RESET_REG, 0x0); ha 1554 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_RESET_PORT0, 0x0); ha 1555 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_RESET_PORT1, 0x0); ha 1556 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_RESET_PORT2, 0x0); ha 1557 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_RESET_PORT3, 0x0); ha 1558 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_RESET_SRE_SHIM, 0x0); ha 1559 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_RESET_EPG_SHIM, 0x0); ha 1560 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_RESET_ETHER_PCS, 0x0); ha 1563 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_wr_reg_indirect(ha, QLA83XX_RESET_CONTROL, 0xFF); ha 1565 drivers/scsi/qla4xxx/ql4_83xx.c ql4_printk(KERN_INFO, ha, "EPORT is out of reset.\n"); ha 1568 drivers/scsi/qla4xxx/ql4_83xx.c void qla4_83xx_disable_pause(struct scsi_qla_host *ha) ha 1570 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->idc_lock(ha); ha 1572 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_eport_init(ha); ha 1573 drivers/scsi/qla4xxx/ql4_83xx.c qla4_83xx_dump_pause_control_regs(ha); ha 1574 drivers/scsi/qla4xxx/ql4_83xx.c __qla4_83xx_disable_pause(ha); ha 1575 drivers/scsi/qla4xxx/ql4_83xx.c ha->isp_ops->idc_unlock(ha); ha 1582 drivers/scsi/qla4xxx/ql4_83xx.c int qla4_83xx_is_detached(struct scsi_qla_host *ha) ha 1586 drivers/scsi/qla4xxx/ql4_83xx.c drv_active = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_ACTIVE); ha 1588 drivers/scsi/qla4xxx/ql4_83xx.c if (test_bit(AF_INIT_DONE, &ha->flags) && ha 1589 drivers/scsi/qla4xxx/ql4_83xx.c !(drv_active & (1 << ha->func_num))) { ha 1590 drivers/scsi/qla4xxx/ql4_83xx.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: drv_active = 0x%X\n", ha 17 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, ha 20 drivers/scsi/qla4xxx/ql4_attr.c if (is_qla40XX(ha)) ha 23 drivers/scsi/qla4xxx/ql4_attr.c if (!test_bit(AF_82XX_DUMP_READING, &ha->flags)) ha 26 drivers/scsi/qla4xxx/ql4_attr.c return memory_read_from_buffer(buf, count, &off, ha->fw_dump, ha 27 drivers/scsi/qla4xxx/ql4_attr.c ha->fw_dump_size); ha 35 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, ha 41 drivers/scsi/qla4xxx/ql4_attr.c if (is_qla40XX(ha)) ha 50 drivers/scsi/qla4xxx/ql4_attr.c ql4_printk(KERN_ERR, ha, "%s: Invalid input. Return err %d\n", ha 58 drivers/scsi/qla4xxx/ql4_attr.c if (test_and_clear_bit(AF_82XX_DUMP_READING, &ha->flags)) { ha 59 drivers/scsi/qla4xxx/ql4_attr.c clear_bit(AF_82XX_FW_DUMPED, &ha->flags); ha 61 drivers/scsi/qla4xxx/ql4_attr.c qla4xxx_alloc_fw_dump(ha); ha 62 drivers/scsi/qla4xxx/ql4_attr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 68 drivers/scsi/qla4xxx/ql4_attr.c if (test_bit(AF_82XX_FW_DUMPED, &ha->flags) && ha 69 drivers/scsi/qla4xxx/ql4_attr.c !test_bit(AF_82XX_DUMP_READING, &ha->flags)) { ha 70 drivers/scsi/qla4xxx/ql4_attr.c set_bit(AF_82XX_DUMP_READING, &ha->flags); ha 71 drivers/scsi/qla4xxx/ql4_attr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 73 drivers/scsi/qla4xxx/ql4_attr.c ha->host_no)); ha 78 drivers/scsi/qla4xxx/ql4_attr.c ha->isp_ops->idc_lock(ha); ha 79 drivers/scsi/qla4xxx/ql4_attr.c dev_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DEV_STATE); ha 81 drivers/scsi/qla4xxx/ql4_attr.c ql4_printk(KERN_INFO, ha, "%s: Setting Need reset\n", ha 83 drivers/scsi/qla4xxx/ql4_attr.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, ha 85 drivers/scsi/qla4xxx/ql4_attr.c if (is_qla8022(ha) || ha 86 drivers/scsi/qla4xxx/ql4_attr.c ((is_qla8032(ha) || is_qla8042(ha)) && ha 87 drivers/scsi/qla4xxx/ql4_attr.c qla4_83xx_can_perform_reset(ha))) { ha 88 drivers/scsi/qla4xxx/ql4_attr.c set_bit(AF_8XXX_RST_OWNER, &ha->flags); ha 89 drivers/scsi/qla4xxx/ql4_attr.c set_bit(AF_FW_RECOVERY, &ha->flags); ha 90 drivers/scsi/qla4xxx/ql4_attr.c ql4_printk(KERN_INFO, ha, "%s: Reset owner is 0x%x\n", ha 91 drivers/scsi/qla4xxx/ql4_attr.c __func__, ha->func_num); ha 94 drivers/scsi/qla4xxx/ql4_attr.c ql4_printk(KERN_INFO, ha, ha 98 drivers/scsi/qla4xxx/ql4_attr.c ha->isp_ops->idc_unlock(ha); ha 126 drivers/scsi/qla4xxx/ql4_attr.c void qla4_8xxx_alloc_sysfs_attr(struct scsi_qla_host *ha) ha 128 drivers/scsi/qla4xxx/ql4_attr.c struct Scsi_Host *host = ha->host; ha 136 drivers/scsi/qla4xxx/ql4_attr.c ql4_printk(KERN_ERR, ha, ha 142 drivers/scsi/qla4xxx/ql4_attr.c void qla4_8xxx_free_sysfs_attr(struct scsi_qla_host *ha) ha 144 drivers/scsi/qla4xxx/ql4_attr.c struct Scsi_Host *host = ha->host; ha 157 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 159 drivers/scsi/qla4xxx/ql4_attr.c if (is_qla80XX(ha)) ha 161 drivers/scsi/qla4xxx/ql4_attr.c ha->fw_info.fw_major, ha->fw_info.fw_minor, ha 162 drivers/scsi/qla4xxx/ql4_attr.c ha->fw_info.fw_patch, ha->fw_info.fw_build); ha 165 drivers/scsi/qla4xxx/ql4_attr.c ha->fw_info.fw_major, ha->fw_info.fw_minor, ha 166 drivers/scsi/qla4xxx/ql4_attr.c ha->fw_info.fw_patch, ha->fw_info.fw_build); ha 173 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 174 drivers/scsi/qla4xxx/ql4_attr.c return snprintf(buf, PAGE_SIZE, "%s\n", ha->serial_number); ha 181 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 182 drivers/scsi/qla4xxx/ql4_attr.c return snprintf(buf, PAGE_SIZE, "%d.%02d\n", ha->fw_info.iscsi_major, ha 183 drivers/scsi/qla4xxx/ql4_attr.c ha->fw_info.iscsi_minor); ha 190 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 192 drivers/scsi/qla4xxx/ql4_attr.c ha->fw_info.bootload_major, ha->fw_info.bootload_minor, ha 193 drivers/scsi/qla4xxx/ql4_attr.c ha->fw_info.bootload_patch, ha->fw_info.bootload_build); ha 200 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 201 drivers/scsi/qla4xxx/ql4_attr.c return snprintf(buf, PAGE_SIZE, "0x%08X\n", ha->board_id); ha 208 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 210 drivers/scsi/qla4xxx/ql4_attr.c qla4xxx_get_firmware_state(ha); ha 211 drivers/scsi/qla4xxx/ql4_attr.c return snprintf(buf, PAGE_SIZE, "0x%08X%8X\n", ha->firmware_state, ha 212 drivers/scsi/qla4xxx/ql4_attr.c ha->addl_fw_state); ha 219 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 221 drivers/scsi/qla4xxx/ql4_attr.c if (is_qla40XX(ha)) ha 224 drivers/scsi/qla4xxx/ql4_attr.c return snprintf(buf, PAGE_SIZE, "0x%04X\n", ha->phy_port_cnt); ha 231 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 233 drivers/scsi/qla4xxx/ql4_attr.c if (is_qla40XX(ha)) ha 236 drivers/scsi/qla4xxx/ql4_attr.c return snprintf(buf, PAGE_SIZE, "0x%04X\n", ha->phy_port_num); ha 243 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 245 drivers/scsi/qla4xxx/ql4_attr.c if (is_qla40XX(ha)) ha 248 drivers/scsi/qla4xxx/ql4_attr.c return snprintf(buf, PAGE_SIZE, "0x%04X\n", ha->iscsi_pci_func_cnt); ha 255 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 257 drivers/scsi/qla4xxx/ql4_attr.c return snprintf(buf, PAGE_SIZE, "%s\n", ha->model_name); ha 264 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 265 drivers/scsi/qla4xxx/ql4_attr.c return snprintf(buf, PAGE_SIZE, "%s %s\n", ha->fw_info.fw_build_date, ha 266 drivers/scsi/qla4xxx/ql4_attr.c ha->fw_info.fw_build_time); ha 273 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 274 drivers/scsi/qla4xxx/ql4_attr.c return snprintf(buf, PAGE_SIZE, "%s\n", ha->fw_info.fw_build_user); ha 281 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 282 drivers/scsi/qla4xxx/ql4_attr.c return snprintf(buf, PAGE_SIZE, "%s\n", ha->fw_info.extended_timestamp); ha 289 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 292 drivers/scsi/qla4xxx/ql4_attr.c switch (ha->fw_info.fw_load_source) { ha 311 drivers/scsi/qla4xxx/ql4_attr.c struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev)); ha 312 drivers/scsi/qla4xxx/ql4_attr.c qla4xxx_about_firmware(ha); ha 313 drivers/scsi/qla4xxx/ql4_attr.c return snprintf(buf, PAGE_SIZE, "%u.%u secs\n", ha->fw_uptime_secs, ha 314 drivers/scsi/qla4xxx/ql4_attr.c ha->fw_uptime_msecs); ha 16 drivers/scsi/qla4xxx/ql4_bsg.c struct scsi_qla_host *ha = to_qla_host(host); ha 27 drivers/scsi/qla4xxx/ql4_bsg.c if (unlikely(pci_channel_offline(ha->pdev))) ha 30 drivers/scsi/qla4xxx/ql4_bsg.c if (ql4xxx_reset_active(ha)) { ha 31 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: reset active\n", __func__); ha 36 drivers/scsi/qla4xxx/ql4_bsg.c if (ha->flash_state != QLFLASH_WAITING) { ha 37 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: another flash operation " ha 43 drivers/scsi/qla4xxx/ql4_bsg.c ha->flash_state = QLFLASH_READING; ha 47 drivers/scsi/qla4xxx/ql4_bsg.c flash = dma_alloc_coherent(&ha->pdev->dev, length, &flash_dma, ha 50 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: dma alloc failed for flash " ha 56 drivers/scsi/qla4xxx/ql4_bsg.c rval = qla4xxx_get_flash(ha, flash_dma, offset, length); ha 58 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: get flash failed\n", __func__); ha 71 drivers/scsi/qla4xxx/ql4_bsg.c dma_free_coherent(&ha->pdev->dev, length, flash, flash_dma); ha 73 drivers/scsi/qla4xxx/ql4_bsg.c ha->flash_state = QLFLASH_WAITING; ha 81 drivers/scsi/qla4xxx/ql4_bsg.c struct scsi_qla_host *ha = to_qla_host(host); ha 93 drivers/scsi/qla4xxx/ql4_bsg.c if (unlikely(pci_channel_offline(ha->pdev))) ha 96 drivers/scsi/qla4xxx/ql4_bsg.c if (ql4xxx_reset_active(ha)) { ha 97 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: reset active\n", __func__); ha 102 drivers/scsi/qla4xxx/ql4_bsg.c if (ha->flash_state != QLFLASH_WAITING) { ha 103 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: another flash operation " ha 109 drivers/scsi/qla4xxx/ql4_bsg.c ha->flash_state = QLFLASH_WRITING; ha 114 drivers/scsi/qla4xxx/ql4_bsg.c flash = dma_alloc_coherent(&ha->pdev->dev, length, &flash_dma, ha 117 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: dma alloc failed for flash " ha 126 drivers/scsi/qla4xxx/ql4_bsg.c rval = qla4xxx_set_flash(ha, flash_dma, offset, length, options); ha 128 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: set flash failed\n", __func__); ha 136 drivers/scsi/qla4xxx/ql4_bsg.c dma_free_coherent(&ha->pdev->dev, length, flash, flash_dma); ha 138 drivers/scsi/qla4xxx/ql4_bsg.c ha->flash_state = QLFLASH_WAITING; ha 146 drivers/scsi/qla4xxx/ql4_bsg.c struct scsi_qla_host *ha = to_qla_host(host); ha 156 drivers/scsi/qla4xxx/ql4_bsg.c if (unlikely(pci_channel_offline(ha->pdev))) ha 160 drivers/scsi/qla4xxx/ql4_bsg.c if (is_qla4010(ha)) ha 163 drivers/scsi/qla4xxx/ql4_bsg.c if (ql4xxx_reset_active(ha)) { ha 164 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: reset active\n", __func__); ha 170 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: invalid payload len %d\n", ha 179 drivers/scsi/qla4xxx/ql4_bsg.c rval = qla4xxx_get_ip_state(ha, acb_idx, ip_idx, status); ha 181 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: get ip state failed\n", ha 203 drivers/scsi/qla4xxx/ql4_bsg.c struct scsi_qla_host *ha = to_qla_host(host); ha 215 drivers/scsi/qla4xxx/ql4_bsg.c if (unlikely(pci_channel_offline(ha->pdev))) ha 219 drivers/scsi/qla4xxx/ql4_bsg.c if (!(is_qla4010(ha) || is_qla4022(ha) || is_qla4032(ha))) ha 222 drivers/scsi/qla4xxx/ql4_bsg.c if (ql4xxx_reset_active(ha)) { ha 223 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: reset active\n", __func__); ha 233 drivers/scsi/qla4xxx/ql4_bsg.c if ((is_qla4010(ha) && total_len > QL4010_NVRAM_SIZE) || ha 234 drivers/scsi/qla4xxx/ql4_bsg.c ((is_qla4022(ha) || is_qla4032(ha)) && ha 236 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: offset+len greater than max" ha 242 drivers/scsi/qla4xxx/ql4_bsg.c nvram = dma_alloc_coherent(&ha->pdev->dev, len, &nvram_dma, ha 245 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: dma alloc failed for nvram " ha 251 drivers/scsi/qla4xxx/ql4_bsg.c rval = qla4xxx_get_nvram(ha, nvram_dma, offset, len); ha 253 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: get nvram failed\n", __func__); ha 266 drivers/scsi/qla4xxx/ql4_bsg.c dma_free_coherent(&ha->pdev->dev, len, nvram, nvram_dma); ha 275 drivers/scsi/qla4xxx/ql4_bsg.c struct scsi_qla_host *ha = to_qla_host(host); ha 287 drivers/scsi/qla4xxx/ql4_bsg.c if (unlikely(pci_channel_offline(ha->pdev))) ha 290 drivers/scsi/qla4xxx/ql4_bsg.c if (!(is_qla4010(ha) || is_qla4022(ha) || is_qla4032(ha))) ha 293 drivers/scsi/qla4xxx/ql4_bsg.c if (ql4xxx_reset_active(ha)) { ha 294 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: reset active\n", __func__); ha 304 drivers/scsi/qla4xxx/ql4_bsg.c if ((is_qla4010(ha) && total_len > QL4010_NVRAM_SIZE) || ha 305 drivers/scsi/qla4xxx/ql4_bsg.c ((is_qla4022(ha) || is_qla4032(ha)) && ha 307 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: offset+len greater than max" ha 313 drivers/scsi/qla4xxx/ql4_bsg.c nvram = dma_alloc_coherent(&ha->pdev->dev, len, &nvram_dma, ha 316 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: dma alloc failed for flash " ha 325 drivers/scsi/qla4xxx/ql4_bsg.c rval = qla4xxx_set_nvram(ha, nvram_dma, offset, len); ha 327 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: set nvram failed\n", __func__); ha 335 drivers/scsi/qla4xxx/ql4_bsg.c dma_free_coherent(&ha->pdev->dev, len, nvram, nvram_dma); ha 344 drivers/scsi/qla4xxx/ql4_bsg.c struct scsi_qla_host *ha = to_qla_host(host); ha 354 drivers/scsi/qla4xxx/ql4_bsg.c if (unlikely(pci_channel_offline(ha->pdev))) ha 357 drivers/scsi/qla4xxx/ql4_bsg.c if (is_qla4010(ha)) ha 360 drivers/scsi/qla4xxx/ql4_bsg.c if (ql4xxx_reset_active(ha)) { ha 361 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: reset active\n", __func__); ha 370 drivers/scsi/qla4xxx/ql4_bsg.c rval = qla4xxx_restore_factory_defaults(ha, region, field0, field1); ha 372 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: set nvram failed\n", __func__); ha 388 drivers/scsi/qla4xxx/ql4_bsg.c struct scsi_qla_host *ha = to_qla_host(host); ha 399 drivers/scsi/qla4xxx/ql4_bsg.c if (unlikely(pci_channel_offline(ha->pdev))) ha 403 drivers/scsi/qla4xxx/ql4_bsg.c if (is_qla4010(ha)) ha 406 drivers/scsi/qla4xxx/ql4_bsg.c if (ql4xxx_reset_active(ha)) { ha 407 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: reset active\n", __func__); ha 415 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: invalid acb len %d\n", ha 421 drivers/scsi/qla4xxx/ql4_bsg.c acb = dma_alloc_coherent(&ha->pdev->dev, len, &acb_dma, GFP_KERNEL); ha 423 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: dma alloc failed for acb " ha 429 drivers/scsi/qla4xxx/ql4_bsg.c rval = qla4xxx_get_acb(ha, acb_dma, acb_type, len); ha 431 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: get acb failed\n", __func__); ha 444 drivers/scsi/qla4xxx/ql4_bsg.c dma_free_coherent(&ha->pdev->dev, len, acb, acb_dma); ha 452 drivers/scsi/qla4xxx/ql4_bsg.c struct scsi_qla_host *ha = to_qla_host(host); ha 460 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: in\n", __func__)); ha 462 drivers/scsi/qla4xxx/ql4_bsg.c if (test_bit(DPC_RESET_HA, &ha->dpc_flags)) { ha 463 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_INFO, ha, "%s: Adapter reset in progress. Invalid Request\n", ha 473 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 479 drivers/scsi/qla4xxx/ql4_bsg.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 8, &mbox_cmd[0], ha 482 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 499 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 507 drivers/scsi/qla4xxx/ql4_bsg.c static int qla4_83xx_wait_for_loopback_config_comp(struct scsi_qla_host *ha, ha 512 drivers/scsi/qla4xxx/ql4_bsg.c if (!wait_for_completion_timeout(&ha->idc_comp, (IDC_COMP_TOV * HZ))) { ha 513 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_INFO, ha, "%s: IDC Complete notification not received, Waiting for another %d timeout", ha 514 drivers/scsi/qla4xxx/ql4_bsg.c __func__, ha->idc_extend_tmo); ha 515 drivers/scsi/qla4xxx/ql4_bsg.c if (ha->idc_extend_tmo) { ha 516 drivers/scsi/qla4xxx/ql4_bsg.c if (!wait_for_completion_timeout(&ha->idc_comp, ha 517 drivers/scsi/qla4xxx/ql4_bsg.c (ha->idc_extend_tmo * HZ))) { ha 518 drivers/scsi/qla4xxx/ql4_bsg.c ha->notify_idc_comp = 0; ha 519 drivers/scsi/qla4xxx/ql4_bsg.c ha->notify_link_up_comp = 0; ha 520 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_WARNING, ha, "%s: Aborting: IDC Complete notification not received", ha 525 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 531 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 535 drivers/scsi/qla4xxx/ql4_bsg.c ha->notify_idc_comp = 0; ha 538 drivers/scsi/qla4xxx/ql4_bsg.c if (!wait_for_completion_timeout(&ha->link_up_comp, ha 540 drivers/scsi/qla4xxx/ql4_bsg.c ha->notify_link_up_comp = 0; ha 541 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_WARNING, ha, "%s: Aborting: LINK UP notification not received", ha 546 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 550 drivers/scsi/qla4xxx/ql4_bsg.c ha->notify_link_up_comp = 0; ha 557 drivers/scsi/qla4xxx/ql4_bsg.c static int qla4_83xx_pre_loopback_config(struct scsi_qla_host *ha, ha 563 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: in\n", __func__)); ha 565 drivers/scsi/qla4xxx/ql4_bsg.c status = qla4_83xx_get_port_config(ha, &config); ha 569 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Default port config=%08X\n", ha 574 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_INFO, ha, "%s: Loopback diagnostics already in progress. Invalid request\n", ha 587 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: New port config=%08X\n", ha 590 drivers/scsi/qla4xxx/ql4_bsg.c ha->notify_idc_comp = 1; ha 591 drivers/scsi/qla4xxx/ql4_bsg.c ha->notify_link_up_comp = 1; ha 594 drivers/scsi/qla4xxx/ql4_bsg.c qla4xxx_get_firmware_state(ha); ha 596 drivers/scsi/qla4xxx/ql4_bsg.c status = qla4_83xx_set_port_config(ha, &config); ha 598 drivers/scsi/qla4xxx/ql4_bsg.c ha->notify_idc_comp = 0; ha 599 drivers/scsi/qla4xxx/ql4_bsg.c ha->notify_link_up_comp = 0; ha 603 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: status = %s\n", __func__, ha 608 drivers/scsi/qla4xxx/ql4_bsg.c static int qla4_83xx_post_loopback_config(struct scsi_qla_host *ha, ha 614 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: in\n", __func__)); ha 616 drivers/scsi/qla4xxx/ql4_bsg.c status = qla4_83xx_get_port_config(ha, &config); ha 620 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: port config=%08X\n", __func__, ha 630 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 634 drivers/scsi/qla4xxx/ql4_bsg.c ha->notify_idc_comp = 1; ha 635 drivers/scsi/qla4xxx/ql4_bsg.c if (ha->addl_fw_state & FW_ADDSTATE_LINK_UP) ha 636 drivers/scsi/qla4xxx/ql4_bsg.c ha->notify_link_up_comp = 1; ha 638 drivers/scsi/qla4xxx/ql4_bsg.c status = qla4_83xx_set_port_config(ha, &config); ha 640 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_INFO, ha, "%s: Scheduling adapter reset\n", ha 642 drivers/scsi/qla4xxx/ql4_bsg.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 643 drivers/scsi/qla4xxx/ql4_bsg.c clear_bit(AF_LOOPBACK, &ha->flags); ha 648 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: status = %s\n", __func__, ha 656 drivers/scsi/qla4xxx/ql4_bsg.c struct scsi_qla_host *ha = to_qla_host(host); ha 665 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: in\n", __func__)); ha 669 drivers/scsi/qla4xxx/ql4_bsg.c if (test_bit(AF_LOOPBACK, &ha->flags)) { ha 670 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_INFO, ha, "%s: Loopback Diagnostics already in progress. Invalid Request\n", ha 676 drivers/scsi/qla4xxx/ql4_bsg.c if (test_bit(DPC_RESET_HA, &ha->dpc_flags)) { ha 677 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_INFO, ha, "%s: Adapter reset in progress. Invalid Request\n", ha 686 drivers/scsi/qla4xxx/ql4_bsg.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 687 drivers/scsi/qla4xxx/ql4_bsg.c status = qla4_83xx_pre_loopback_config(ha, mbox_cmd); ha 693 drivers/scsi/qla4xxx/ql4_bsg.c status = qla4_83xx_wait_for_loopback_config_comp(ha, ha 701 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 707 drivers/scsi/qla4xxx/ql4_bsg.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 8, &mbox_cmd[0], ha 715 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 726 drivers/scsi/qla4xxx/ql4_bsg.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 727 drivers/scsi/qla4xxx/ql4_bsg.c status = qla4_83xx_post_loopback_config(ha, mbox_cmd); ha 735 drivers/scsi/qla4xxx/ql4_bsg.c if (!(ha->addl_fw_state & FW_ADDSTATE_LINK_UP)) ha 738 drivers/scsi/qla4xxx/ql4_bsg.c status = qla4_83xx_wait_for_loopback_config_comp(ha, ha 746 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 756 drivers/scsi/qla4xxx/ql4_bsg.c struct scsi_qla_host *ha = to_qla_host(host); ha 761 drivers/scsi/qla4xxx/ql4_bsg.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: in\n", __func__)); ha 790 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: Invalid diag test: 0x%x\n", ha 799 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: Invalid diag cmd: 0x%x\n", ha 815 drivers/scsi/qla4xxx/ql4_bsg.c struct scsi_qla_host *ha = to_qla_host(host); ha 843 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: invalid BSG vendor command: " ha 861 drivers/scsi/qla4xxx/ql4_bsg.c struct scsi_qla_host *ha = to_qla_host(host); ha 868 drivers/scsi/qla4xxx/ql4_bsg.c ql4_printk(KERN_ERR, ha, "%s: invalid BSG command: 0x%x\n", ha 33 drivers/scsi/qla4xxx/ql4_dbg.c void qla4xxx_dump_registers(struct scsi_qla_host *ha) ha 37 drivers/scsi/qla4xxx/ql4_dbg.c if (is_qla8022(ha)) { ha 40 drivers/scsi/qla4xxx/ql4_dbg.c i, readl(&ha->qla4_82xx_reg->mailbox_in[i])); ha 47 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->mailbox[i])); ha 52 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->flash_address)); ha 55 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->flash_data)); ha 58 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->ctrl_status)); ha 60 drivers/scsi/qla4xxx/ql4_dbg.c if (is_qla4010(ha)) { ha 63 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u1.isp4010.nvram)); ha 64 drivers/scsi/qla4xxx/ql4_dbg.c } else if (is_qla4022(ha) | is_qla4032(ha)) { ha 67 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u1.isp4022.intr_mask)); ha 70 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u1.isp4022.nvram)); ha 73 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u1.isp4022.semaphore)); ha 77 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->req_q_in)); ha 80 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->rsp_q_out)); ha 82 drivers/scsi/qla4xxx/ql4_dbg.c if (is_qla4010(ha)) { ha 85 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4010.ext_hw_conf)); ha 88 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4010.port_ctrl)); ha 91 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4010.port_status)); ha 94 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4010.req_q_out)); ha 97 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4010.gp_out)); ha 100 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4010.gp_in)); ha 103 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4010.port_err_status)); ha 104 drivers/scsi/qla4xxx/ql4_dbg.c } else if (is_qla4022(ha) | is_qla4032(ha)) { ha 108 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4022.p0.ext_hw_conf)); ha 111 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4022.p0.port_ctrl)); ha 114 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4022.p0.port_status)); ha 117 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4022.p0.gp_out)); ha 120 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4022.p0.gp_in)); ha 123 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4022.p0.port_err_status)); ha 126 drivers/scsi/qla4xxx/ql4_dbg.c &ha->reg->ctrl_status); ha 129 drivers/scsi/qla4xxx/ql4_dbg.c readw(&ha->reg->u2.isp4022.p1.req_q_out)); ha 131 drivers/scsi/qla4xxx/ql4_dbg.c &ha->reg->ctrl_status); ha 135 drivers/scsi/qla4xxx/ql4_dbg.c void qla4_8xxx_dump_peg_reg(struct scsi_qla_host *ha) ha 139 drivers/scsi/qla4xxx/ql4_dbg.c halt_status1 = qla4_8xxx_rd_direct(ha, QLA8XXX_PEG_HALT_STATUS1); ha 140 drivers/scsi/qla4xxx/ql4_dbg.c halt_status2 = qla4_8xxx_rd_direct(ha, QLA8XXX_PEG_HALT_STATUS2); ha 142 drivers/scsi/qla4xxx/ql4_dbg.c if (is_qla8022(ha)) { ha 143 drivers/scsi/qla4xxx/ql4_dbg.c ql4_printk(KERN_INFO, ha, ha 148 drivers/scsi/qla4xxx/ql4_dbg.c " PEG_NET_4_PC: 0x%x\n", ha->host_no, __func__, ha 149 drivers/scsi/qla4xxx/ql4_dbg.c ha->pdev->device, halt_status1, halt_status2, ha 150 drivers/scsi/qla4xxx/ql4_dbg.c qla4_82xx_rd_32(ha, QLA82XX_CRB_PEG_NET_0 + 0x3c), ha 151 drivers/scsi/qla4xxx/ql4_dbg.c qla4_82xx_rd_32(ha, QLA82XX_CRB_PEG_NET_1 + 0x3c), ha 152 drivers/scsi/qla4xxx/ql4_dbg.c qla4_82xx_rd_32(ha, QLA82XX_CRB_PEG_NET_2 + 0x3c), ha 153 drivers/scsi/qla4xxx/ql4_dbg.c qla4_82xx_rd_32(ha, QLA82XX_CRB_PEG_NET_3 + 0x3c), ha 154 drivers/scsi/qla4xxx/ql4_dbg.c qla4_82xx_rd_32(ha, QLA82XX_CRB_PEG_NET_4 + 0x3c)); ha 155 drivers/scsi/qla4xxx/ql4_dbg.c } else if (is_qla8032(ha) || is_qla8042(ha)) { ha 156 drivers/scsi/qla4xxx/ql4_dbg.c ql4_printk(KERN_INFO, ha, ha 159 drivers/scsi/qla4xxx/ql4_dbg.c ha->host_no, __func__, ha->pdev->device, ha 118 drivers/scsi/qla4xxx/ql4_def.h #define ql4_printk(level, ha, format, arg...) \ ha 119 drivers/scsi/qla4xxx/ql4_def.h dev_printk(level , &((ha)->pdev->dev) , format , ## arg) ha 228 drivers/scsi/qla4xxx/ql4_def.h struct scsi_qla_host *ha; /* HA the SP is queued on */ ha 264 drivers/scsi/qla4xxx/ql4_def.h struct scsi_qla_host *ha; ha 287 drivers/scsi/qla4xxx/ql4_def.h struct scsi_qla_host *ha; ha 298 drivers/scsi/qla4xxx/ql4_def.h int (*ddb_change)(struct scsi_qla_host *ha, uint32_t fw_ddb_index, ha 419 drivers/scsi/qla4xxx/ql4_def.h int (*iospace_config) (struct scsi_qla_host *ha); ha 825 drivers/scsi/qla4xxx/ql4_def.h struct scsi_qla_host *ha; ha 848 drivers/scsi/qla4xxx/ql4_def.h static inline int is_ipv4_enabled(struct scsi_qla_host *ha) ha 850 drivers/scsi/qla4xxx/ql4_def.h return ((ha->ip_config.ipv4_options & IPOPT_IPV4_PROTOCOL_ENABLE) != 0); ha 853 drivers/scsi/qla4xxx/ql4_def.h static inline int is_ipv6_enabled(struct scsi_qla_host *ha) ha 855 drivers/scsi/qla4xxx/ql4_def.h return ((ha->ip_config.ipv6_options & ha 859 drivers/scsi/qla4xxx/ql4_def.h static inline int is_qla4010(struct scsi_qla_host *ha) ha 861 drivers/scsi/qla4xxx/ql4_def.h return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4010; ha 864 drivers/scsi/qla4xxx/ql4_def.h static inline int is_qla4022(struct scsi_qla_host *ha) ha 866 drivers/scsi/qla4xxx/ql4_def.h return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4022; ha 869 drivers/scsi/qla4xxx/ql4_def.h static inline int is_qla4032(struct scsi_qla_host *ha) ha 871 drivers/scsi/qla4xxx/ql4_def.h return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4032; ha 874 drivers/scsi/qla4xxx/ql4_def.h static inline int is_qla40XX(struct scsi_qla_host *ha) ha 876 drivers/scsi/qla4xxx/ql4_def.h return is_qla4032(ha) || is_qla4022(ha) || is_qla4010(ha); ha 879 drivers/scsi/qla4xxx/ql4_def.h static inline int is_qla8022(struct scsi_qla_host *ha) ha 881 drivers/scsi/qla4xxx/ql4_def.h return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8022; ha 884 drivers/scsi/qla4xxx/ql4_def.h static inline int is_qla8032(struct scsi_qla_host *ha) ha 886 drivers/scsi/qla4xxx/ql4_def.h return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8324; ha 889 drivers/scsi/qla4xxx/ql4_def.h static inline int is_qla8042(struct scsi_qla_host *ha) ha 891 drivers/scsi/qla4xxx/ql4_def.h return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8042; ha 894 drivers/scsi/qla4xxx/ql4_def.h static inline int is_qla80XX(struct scsi_qla_host *ha) ha 896 drivers/scsi/qla4xxx/ql4_def.h return is_qla8022(ha) || is_qla8032(ha) || is_qla8042(ha); ha 899 drivers/scsi/qla4xxx/ql4_def.h static inline int is_aer_supported(struct scsi_qla_host *ha) ha 901 drivers/scsi/qla4xxx/ql4_def.h return ((ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8022) || ha 902 drivers/scsi/qla4xxx/ql4_def.h (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8324) || ha 903 drivers/scsi/qla4xxx/ql4_def.h (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8042)); ha 906 drivers/scsi/qla4xxx/ql4_def.h static inline int adapter_up(struct scsi_qla_host *ha) ha 908 drivers/scsi/qla4xxx/ql4_def.h return (test_bit(AF_ONLINE, &ha->flags) != 0) && ha 909 drivers/scsi/qla4xxx/ql4_def.h (test_bit(AF_LINK_UP, &ha->flags) != 0) && ha 910 drivers/scsi/qla4xxx/ql4_def.h (!test_bit(AF_LOOPBACK, &ha->flags)); ha 918 drivers/scsi/qla4xxx/ql4_def.h static inline void __iomem* isp_semaphore(struct scsi_qla_host *ha) ha 920 drivers/scsi/qla4xxx/ql4_def.h return (is_qla4010(ha) ? ha 921 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u1.isp4010.nvram : ha 922 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u1.isp4022.semaphore); ha 925 drivers/scsi/qla4xxx/ql4_def.h static inline void __iomem* isp_nvram(struct scsi_qla_host *ha) ha 927 drivers/scsi/qla4xxx/ql4_def.h return (is_qla4010(ha) ? ha 928 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u1.isp4010.nvram : ha 929 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u1.isp4022.nvram); ha 932 drivers/scsi/qla4xxx/ql4_def.h static inline void __iomem* isp_ext_hw_conf(struct scsi_qla_host *ha) ha 934 drivers/scsi/qla4xxx/ql4_def.h return (is_qla4010(ha) ? ha 935 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u2.isp4010.ext_hw_conf : ha 936 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u2.isp4022.p0.ext_hw_conf); ha 939 drivers/scsi/qla4xxx/ql4_def.h static inline void __iomem* isp_port_status(struct scsi_qla_host *ha) ha 941 drivers/scsi/qla4xxx/ql4_def.h return (is_qla4010(ha) ? ha 942 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u2.isp4010.port_status : ha 943 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u2.isp4022.p0.port_status); ha 946 drivers/scsi/qla4xxx/ql4_def.h static inline void __iomem* isp_port_ctrl(struct scsi_qla_host *ha) ha 948 drivers/scsi/qla4xxx/ql4_def.h return (is_qla4010(ha) ? ha 949 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u2.isp4010.port_ctrl : ha 950 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u2.isp4022.p0.port_ctrl); ha 953 drivers/scsi/qla4xxx/ql4_def.h static inline void __iomem* isp_port_error_status(struct scsi_qla_host *ha) ha 955 drivers/scsi/qla4xxx/ql4_def.h return (is_qla4010(ha) ? ha 956 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u2.isp4010.port_err_status : ha 957 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u2.isp4022.p0.port_err_status); ha 960 drivers/scsi/qla4xxx/ql4_def.h static inline void __iomem * isp_gp_out(struct scsi_qla_host *ha) ha 962 drivers/scsi/qla4xxx/ql4_def.h return (is_qla4010(ha) ? ha 963 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u2.isp4010.gp_out : ha 964 drivers/scsi/qla4xxx/ql4_def.h &ha->reg->u2.isp4022.p0.gp_out); ha 967 drivers/scsi/qla4xxx/ql4_def.h static inline int eeprom_ext_hw_conf_offset(struct scsi_qla_host *ha) ha 969 drivers/scsi/qla4xxx/ql4_def.h return (is_qla4010(ha) ? ha 974 drivers/scsi/qla4xxx/ql4_def.h int ql4xxx_sem_spinlock(struct scsi_qla_host * ha, u32 sem_mask, u32 sem_bits); ha 975 drivers/scsi/qla4xxx/ql4_def.h void ql4xxx_sem_unlock(struct scsi_qla_host * ha, u32 sem_mask); ha 976 drivers/scsi/qla4xxx/ql4_def.h int ql4xxx_sem_lock(struct scsi_qla_host * ha, u32 sem_mask, u32 sem_bits); ha 1035 drivers/scsi/qla4xxx/ql4_def.h static inline int ql4xxx_reset_active(struct scsi_qla_host *ha) ha 1037 drivers/scsi/qla4xxx/ql4_def.h return test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags) || ha 1038 drivers/scsi/qla4xxx/ql4_def.h test_bit(DPC_RESET_HA, &ha->dpc_flags) || ha 1039 drivers/scsi/qla4xxx/ql4_def.h test_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags) || ha 1040 drivers/scsi/qla4xxx/ql4_def.h test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags) || ha 1041 drivers/scsi/qla4xxx/ql4_def.h test_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags) || ha 1042 drivers/scsi/qla4xxx/ql4_def.h test_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags); ha 1046 drivers/scsi/qla4xxx/ql4_def.h static inline int qla4_8xxx_rd_direct(struct scsi_qla_host *ha, ha 1049 drivers/scsi/qla4xxx/ql4_def.h return ha->isp_ops->rd_reg_direct(ha, ha->reg_tbl[crb_reg]); ha 1052 drivers/scsi/qla4xxx/ql4_def.h static inline void qla4_8xxx_wr_direct(struct scsi_qla_host *ha, ha 1056 drivers/scsi/qla4xxx/ql4_def.h ha->isp_ops->wr_reg_direct(ha, ha->reg_tbl[crb_reg], value); ha 13 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_hw_reset(struct scsi_qla_host *ha); ha 15 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb *srb); ha 16 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_initialize_adapter(struct scsi_qla_host *ha, int is_reset); ha 17 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_soft_reset(struct scsi_qla_host *ha); ha 20 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_free_ddb(struct scsi_qla_host *ha, struct ddb_entry *ddb_entry); ha 21 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_process_aen(struct scsi_qla_host *ha, uint8_t process_aen); ha 23 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_dhcp_ip_address(struct scsi_qla_host *ha); ha 24 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_abort_task(struct scsi_qla_host *ha, struct srb *srb); ha 25 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_reset_lun(struct scsi_qla_host *ha, struct ddb_entry *ddb_entry, ha 27 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_reset_target(struct scsi_qla_host *ha, ha 29 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_flash(struct scsi_qla_host *ha, dma_addr_t dma_addr, ha 31 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_firmware_status(struct scsi_qla_host *ha); ha 32 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_firmware_state(struct scsi_qla_host *ha); ha 33 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_initialize_fw_cb(struct scsi_qla_host *ha); ha 37 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_fwddb_entry(struct scsi_qla_host *ha, ha 48 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index, ha 50 drivers/scsi/qla4xxx/ql4_glbl.h uint8_t qla4xxx_get_ifcb(struct scsi_qla_host *ha, uint32_t *mbox_cmd, ha 52 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_conn_close_sess_logout(struct scsi_qla_host *ha, ha 56 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_disable_acb(struct scsi_qla_host *ha); ha 57 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_set_acb(struct scsi_qla_host *ha, uint32_t *mbox_cmd, ha 59 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_acb(struct scsi_qla_host *ha, dma_addr_t acb_dma, ha 61 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_ip_state(struct scsi_qla_host *ha, uint32_t acb_idx, ha 64 drivers/scsi/qla4xxx/ql4_glbl.h u16 rd_nvram_word(struct scsi_qla_host *ha, int offset); ha 65 drivers/scsi/qla4xxx/ql4_glbl.h u8 rd_nvram_byte(struct scsi_qla_host *ha, int offset); ha 66 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_get_crash_record(struct scsi_qla_host *ha); ha 67 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_is_nvram_configuration_valid(struct scsi_qla_host *ha); ha 68 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_about_firmware(struct scsi_qla_host *ha); ha 69 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_interrupt_service_routine(struct scsi_qla_host *ha, ha 71 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_init_rings(struct scsi_qla_host *ha); ha 73 drivers/scsi/qla4xxx/ql4_glbl.h struct srb *qla4xxx_del_from_active_array(struct scsi_qla_host *ha, ha 75 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index, ha 78 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha, ha 80 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_set_flash(struct scsi_qla_host *ha, dma_addr_t dma_addr, ha 82 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount, ha 84 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_chap_index(struct scsi_qla_host *ha, char *username, ha 86 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_set_chap(struct scsi_qla_host *ha, char *username, char *password, ha 89 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_queue_iocb(struct scsi_qla_host *ha); ha 90 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_complete_iocb(struct scsi_qla_host *ha); ha 91 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_sys_info(struct scsi_qla_host *ha); ha 92 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_iospace_config(struct scsi_qla_host *ha); ha 93 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_pci_config(struct scsi_qla_host *ha); ha 94 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_start_firmware(struct scsi_qla_host *ha); ha 96 drivers/scsi/qla4xxx/ql4_glbl.h uint16_t qla4xxx_rd_shdw_req_q_out(struct scsi_qla_host *ha); ha 97 drivers/scsi/qla4xxx/ql4_glbl.h uint16_t qla4xxx_rd_shdw_rsp_q_in(struct scsi_qla_host *ha); ha 98 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_request_irqs(struct scsi_qla_host *ha); ha 99 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_free_irqs(struct scsi_qla_host *ha); ha 100 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_process_response_queue(struct scsi_qla_host *ha); ha 101 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_wake_dpc(struct scsi_qla_host *ha); ha 102 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_get_conn_event_log(struct scsi_qla_host *ha); ha 103 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_mailbox_premature_completion(struct scsi_qla_host *ha); ha 104 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_dump_registers(struct scsi_qla_host *ha); ha 105 drivers/scsi/qla4xxx/ql4_glbl.h uint8_t qla4xxx_update_local_ifcb(struct scsi_qla_host *ha, ha 112 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_iospace_config(struct scsi_qla_host *ha); ha 115 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_82xx_queue_iocb(struct scsi_qla_host *ha); ha 116 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_82xx_complete_iocb(struct scsi_qla_host *ha); ha 124 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_82xx_pci_mem_write_2M(struct scsi_qla_host *ha, u64, void *, int); ha 125 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_82xx_isp_reset(struct scsi_qla_host *ha); ha 126 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_82xx_interrupt_service_routine(struct scsi_qla_host *ha, ha 128 drivers/scsi/qla4xxx/ql4_glbl.h uint16_t qla4_82xx_rd_shdw_req_q_out(struct scsi_qla_host *ha); ha 129 drivers/scsi/qla4xxx/ql4_glbl.h uint16_t qla4_82xx_rd_shdw_rsp_q_in(struct scsi_qla_host *ha); ha 130 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_get_sys_info(struct scsi_qla_host *ha); ha 131 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_8xxx_watchdog(struct scsi_qla_host *ha); ha 132 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_stop_firmware(struct scsi_qla_host *ha); ha 133 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_get_flash_info(struct scsi_qla_host *ha); ha 134 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_82xx_enable_intrs(struct scsi_qla_host *ha); ha 135 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_82xx_disable_intrs(struct scsi_qla_host *ha); ha 136 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_enable_msix(struct scsi_qla_host *ha); ha 140 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_mark_all_devices_missing(struct scsi_qla_host *ha); ha 141 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_dead_adapter_cleanup(struct scsi_qla_host *ha); ha 142 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_82xx_idc_lock(struct scsi_qla_host *ha); ha 143 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_82xx_idc_unlock(struct scsi_qla_host *ha); ha 144 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_device_state_handler(struct scsi_qla_host *ha); ha 145 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_8xxx_need_qsnt_handler(struct scsi_qla_host *ha); ha 146 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_8xxx_clear_drv_active(struct scsi_qla_host *ha); ha 147 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_8xxx_set_drv_active(struct scsi_qla_host *ha); ha 148 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_conn_open(struct scsi_qla_host *ha, uint16_t fw_ddb_index); ha 149 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_set_param_ddbentry(struct scsi_qla_host *ha, ha 153 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_session_logout_ddb(struct scsi_qla_host *ha, ha 155 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_req_ddb_entry(struct scsi_qla_host *ha, uint32_t fw_ddb_index, ha 157 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_clear_ddb_entry(struct scsi_qla_host *ha, uint32_t fw_ddb_index); ha 159 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_free_ddb_index(struct scsi_qla_host *ha); ha 160 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_mgmt_data(struct scsi_qla_host *ha, uint16_t fw_ddb_index, ha 162 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_update_session_conn_param(struct scsi_qla_host *ha, ha 164 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_update_session_conn_fwddb_param(struct scsi_qla_host *ha, ha 166 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_bootdb_by_index(struct scsi_qla_host *ha, ha 169 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_chap(struct scsi_qla_host *ha, char *username, ha 171 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_nvram(struct scsi_qla_host *ha, dma_addr_t nvram_dma, ha 173 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_set_nvram(struct scsi_qla_host *ha, dma_addr_t nvram_dma, ha 175 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_restore_factory_defaults(struct scsi_qla_host *ha, ha 178 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_ddb_index(struct scsi_qla_host *ha, uint16_t *ddb_index); ha 182 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_flash_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index, ha 184 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index, ha 186 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_build_ddb_list(struct scsi_qla_host *ha, int is_reset); ha 187 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_post_aen_work(struct scsi_qla_host *ha, ha 190 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_ping_iocb(struct scsi_qla_host *ha, uint32_t options, ha 192 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_post_ping_evt_work(struct scsi_qla_host *ha, ha 195 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_flashdb_by_index(struct scsi_qla_host *ha, ha 204 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_minidump_template(struct scsi_qla_host *ha, ha 206 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_req_template_size(struct scsi_qla_host *ha); ha 207 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_8xxx_alloc_sysfs_attr(struct scsi_qla_host *ha); ha 208 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_8xxx_free_sysfs_attr(struct scsi_qla_host *ha); ha 209 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_alloc_fw_dump(struct scsi_qla_host *ha); ha 210 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_82xx_try_start_fw(struct scsi_qla_host *ha); ha 211 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_need_reset(struct scsi_qla_host *ha); ha 212 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_82xx_md_rd_32(struct scsi_qla_host *ha, uint32_t off, uint32_t *data); ha 213 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_82xx_md_wr_32(struct scsi_qla_host *ha, uint32_t off, uint32_t data); ha 214 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_82xx_rom_lock_recovery(struct scsi_qla_host *ha); ha 215 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_82xx_queue_mbox_cmd(struct scsi_qla_host *ha, uint32_t *mbx_cmd, ha 217 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_82xx_process_mbox_intr(struct scsi_qla_host *ha, int outcount); ha 218 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_queue_mbox_cmd(struct scsi_qla_host *ha, uint32_t *mbx_cmd, ha 220 drivers/scsi/qla4xxx/ql4_glbl.h void qla4xxx_process_mbox_intr(struct scsi_qla_host *ha, int outcount); ha 221 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_8xxx_dump_peg_reg(struct scsi_qla_host *ha); ha 222 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_disable_intrs(struct scsi_qla_host *ha); ha 223 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_enable_intrs(struct scsi_qla_host *ha); ha 224 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_start_firmware(struct scsi_qla_host *ha); ha 226 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_interrupt_service_routine(struct scsi_qla_host *ha, ha 228 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_isp_reset(struct scsi_qla_host *ha); ha 229 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_queue_iocb(struct scsi_qla_host *ha); ha 230 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_complete_iocb(struct scsi_qla_host *ha); ha 231 drivers/scsi/qla4xxx/ql4_glbl.h uint32_t qla4_83xx_rd_reg(struct scsi_qla_host *ha, ulong addr); ha 232 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_wr_reg(struct scsi_qla_host *ha, ulong addr, uint32_t val); ha 233 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_rd_reg_indirect(struct scsi_qla_host *ha, uint32_t addr, ha 235 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_wr_reg_indirect(struct scsi_qla_host *ha, uint32_t addr, ha 237 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_drv_lock(struct scsi_qla_host *ha); ha 238 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_drv_unlock(struct scsi_qla_host *ha); ha 239 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_rom_lock_recovery(struct scsi_qla_host *ha); ha 240 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_queue_mbox_cmd(struct scsi_qla_host *ha, uint32_t *mbx_cmd, ha 242 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_process_mbox_intr(struct scsi_qla_host *ha, int outcount); ha 243 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_read_reset_template(struct scsi_qla_host *ha); ha 244 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_set_idc_dontreset(struct scsi_qla_host *ha); ha 245 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_idc_dontreset(struct scsi_qla_host *ha); ha 246 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_lockless_flash_read_u32(struct scsi_qla_host *ha, ha 249 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_clear_idc_dontreset(struct scsi_qla_host *ha); ha 250 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_need_reset_handler(struct scsi_qla_host *ha); ha 251 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_flash_read_u32(struct scsi_qla_host *ha, uint32_t flash_addr, ha 253 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_get_idc_param(struct scsi_qla_host *ha); ha 254 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_8xxx_set_rst_ready(struct scsi_qla_host *ha); ha 255 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_8xxx_clear_rst_ready(struct scsi_qla_host *ha); ha 256 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_device_bootstrap(struct scsi_qla_host *ha); ha 257 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_8xxx_get_minidump(struct scsi_qla_host *ha); ha 258 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_intr_disable(struct scsi_qla_host *ha); ha 259 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_intr_enable(struct scsi_qla_host *ha); ha 260 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_set_param(struct scsi_qla_host *ha, int param); ha 261 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_update_idc_reg(struct scsi_qla_host *ha); ha 262 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_post_idc_ack(struct scsi_qla_host *ha); ha 263 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_disable_pause(struct scsi_qla_host *ha); ha 264 drivers/scsi/qla4xxx/ql4_glbl.h void qla4_83xx_enable_mbox_intrs(struct scsi_qla_host *ha); ha 265 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_can_perform_reset(struct scsi_qla_host *ha); ha 266 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_default_ddb(struct scsi_qla_host *ha, uint32_t options, ha 268 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_uni_chap_at_index(struct scsi_qla_host *ha, char *username, ha 270 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_disable_acb(struct scsi_qla_host *ha); ha 271 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_set_acb(struct scsi_qla_host *ha, uint32_t *mbox_cmd, ha 273 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_get_acb(struct scsi_qla_host *ha, dma_addr_t acb_dma, ha 275 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_84xx_config_acb(struct scsi_qla_host *ha, int acb_config); ha 276 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_ms_mem_write_128b(struct scsi_qla_host *ha, ha 279 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_get_port_config(struct scsi_qla_host *ha, uint32_t *config); ha 280 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_set_port_config(struct scsi_qla_host *ha, uint32_t *config); ha 281 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_8xxx_check_init_adapter_retry(struct scsi_qla_host *ha); ha 282 drivers/scsi/qla4xxx/ql4_glbl.h int qla4_83xx_is_detached(struct scsi_qla_host *ha); ha 283 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_sysfs_ddb_export(struct scsi_qla_host *ha); ha 14 drivers/scsi/qla4xxx/ql4_init.c static void ql4xxx_set_mac_number(struct scsi_qla_host *ha) ha 21 drivers/scsi/qla4xxx/ql4_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 22 drivers/scsi/qla4xxx/ql4_init.c value = readw(&ha->reg->ctrl_status); ha 23 drivers/scsi/qla4xxx/ql4_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 28 drivers/scsi/qla4xxx/ql4_init.c ha->mac_index = 1; ha 31 drivers/scsi/qla4xxx/ql4_init.c ha->mac_index = 3; ha 35 drivers/scsi/qla4xxx/ql4_init.c "ispControlStatus = 0x%x\n", ha->host_no, ha 39 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(printk("scsi%ld: %s: mac_index %d.\n", ha->host_no, __func__, ha 40 drivers/scsi/qla4xxx/ql4_init.c ha->mac_index)); ha 50 drivers/scsi/qla4xxx/ql4_init.c void qla4xxx_free_ddb(struct scsi_qla_host *ha, ha 54 drivers/scsi/qla4xxx/ql4_init.c ha->fw_ddb_index_map[ddb_entry->fw_ddb_index] = ha 56 drivers/scsi/qla4xxx/ql4_init.c ha->tot_ddbs--; ha 66 drivers/scsi/qla4xxx/ql4_init.c static void qla4xxx_init_response_q_entries(struct scsi_qla_host *ha) ha 71 drivers/scsi/qla4xxx/ql4_init.c pkt = (struct response *)ha->response_ptr; ha 86 drivers/scsi/qla4xxx/ql4_init.c int qla4xxx_init_rings(struct scsi_qla_host *ha) ha 92 drivers/scsi/qla4xxx/ql4_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 93 drivers/scsi/qla4xxx/ql4_init.c ha->request_out = 0; ha 94 drivers/scsi/qla4xxx/ql4_init.c ha->request_in = 0; ha 95 drivers/scsi/qla4xxx/ql4_init.c ha->request_ptr = &ha->request_ring[ha->request_in]; ha 96 drivers/scsi/qla4xxx/ql4_init.c ha->req_q_count = REQUEST_QUEUE_DEPTH; ha 99 drivers/scsi/qla4xxx/ql4_init.c ha->response_in = 0; ha 100 drivers/scsi/qla4xxx/ql4_init.c ha->response_out = 0; ha 101 drivers/scsi/qla4xxx/ql4_init.c ha->response_ptr = &ha->response_ring[ha->response_out]; ha 103 drivers/scsi/qla4xxx/ql4_init.c if (is_qla8022(ha)) { ha 105 drivers/scsi/qla4xxx/ql4_init.c (unsigned long __iomem *)&ha->qla4_82xx_reg->req_q_out); ha 107 drivers/scsi/qla4xxx/ql4_init.c (unsigned long __iomem *)&ha->qla4_82xx_reg->rsp_q_in); ha 109 drivers/scsi/qla4xxx/ql4_init.c (unsigned long __iomem *)&ha->qla4_82xx_reg->rsp_q_out); ha 110 drivers/scsi/qla4xxx/ql4_init.c } else if (is_qla8032(ha) || is_qla8042(ha)) { ha 112 drivers/scsi/qla4xxx/ql4_init.c (unsigned long __iomem *)&ha->qla4_83xx_reg->req_q_in); ha 114 drivers/scsi/qla4xxx/ql4_init.c (unsigned long __iomem *)&ha->qla4_83xx_reg->rsp_q_in); ha 116 drivers/scsi/qla4xxx/ql4_init.c (unsigned long __iomem *)&ha->qla4_83xx_reg->rsp_q_out); ha 125 drivers/scsi/qla4xxx/ql4_init.c ha->shadow_regs->req_q_out = __constant_cpu_to_le32(0); ha 126 drivers/scsi/qla4xxx/ql4_init.c ha->shadow_regs->rsp_q_in = __constant_cpu_to_le32(0); ha 129 drivers/scsi/qla4xxx/ql4_init.c writel(0, &ha->reg->req_q_in); ha 130 drivers/scsi/qla4xxx/ql4_init.c writel(0, &ha->reg->rsp_q_out); ha 131 drivers/scsi/qla4xxx/ql4_init.c readl(&ha->reg->rsp_q_out); ha 134 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_init_response_q_entries(ha); ha 138 drivers/scsi/qla4xxx/ql4_init.c ha->active_mrb_array[i] = NULL; ha 140 drivers/scsi/qla4xxx/ql4_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 150 drivers/scsi/qla4xxx/ql4_init.c int qla4xxx_get_sys_info(struct scsi_qla_host *ha) ha 156 drivers/scsi/qla4xxx/ql4_init.c sys_info = dma_alloc_coherent(&ha->pdev->dev, sizeof(*sys_info), ha 160 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 166 drivers/scsi/qla4xxx/ql4_init.c if (qla4xxx_get_flash(ha, sys_info_dma, FLASH_OFFSET_SYS_INFO, ha 169 drivers/scsi/qla4xxx/ql4_init.c "failed\n", ha->host_no, __func__)); ha 175 drivers/scsi/qla4xxx/ql4_init.c memcpy(ha->my_mac, &sys_info->physAddr[0].address[0], ha 176 drivers/scsi/qla4xxx/ql4_init.c min(sizeof(ha->my_mac), ha 178 drivers/scsi/qla4xxx/ql4_init.c memcpy(ha->serial_number, &sys_info->acSerialNumber, ha 179 drivers/scsi/qla4xxx/ql4_init.c min(sizeof(ha->serial_number), ha 185 drivers/scsi/qla4xxx/ql4_init.c dma_free_coherent(&ha->pdev->dev, sizeof(*sys_info), sys_info, ha 197 drivers/scsi/qla4xxx/ql4_init.c static void qla4xxx_init_local_data(struct scsi_qla_host *ha) ha 200 drivers/scsi/qla4xxx/ql4_init.c ha->aen_q_count = MAX_AEN_ENTRIES; ha 204 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_wait_for_ip_config(struct scsi_qla_host *ha) ha 213 drivers/scsi/qla4xxx/ql4_init.c if (is_ipv4_enabled(ha) && is_ipv6_enabled(ha)) { ha 214 drivers/scsi/qla4xxx/ql4_init.c if (((ha->addl_fw_state & FW_ADDSTATE_DHCPv4_ENABLED) != 0) && ha 215 drivers/scsi/qla4xxx/ql4_init.c ((ha->addl_fw_state & ha 219 drivers/scsi/qla4xxx/ql4_init.c if (((ha->ip_config.ipv6_addl_options & ha 221 drivers/scsi/qla4xxx/ql4_init.c ((ha->ip_config.ipv6_link_local_state == ha 223 drivers/scsi/qla4xxx/ql4_init.c (ha->ip_config.ipv6_addr0_state == ha 225 drivers/scsi/qla4xxx/ql4_init.c (ha->ip_config.ipv6_addr1_state == ha 230 drivers/scsi/qla4xxx/ql4_init.c if ((ha->ip_config.ipv6_link_local_state == ha 232 drivers/scsi/qla4xxx/ql4_init.c (ha->ip_config.ipv6_addr0_state == ha 234 drivers/scsi/qla4xxx/ql4_init.c (ha->ip_config.ipv6_addr1_state == ha 238 drivers/scsi/qla4xxx/ql4_init.c " Don't wait!\n", ha->host_no, ha 242 drivers/scsi/qla4xxx/ql4_init.c if (memcmp(&ha->ip_config.ipv6_default_router_addr, ha 246 drivers/scsi/qla4xxx/ql4_init.c "Don't wait!\n", ha->host_no, ha 250 drivers/scsi/qla4xxx/ql4_init.c if ((ha->ip_config.ipv6_default_router_state == ha 252 drivers/scsi/qla4xxx/ql4_init.c (ha->ip_config.ipv6_link_local_state == ha 254 drivers/scsi/qla4xxx/ql4_init.c (memcmp(&ha->ip_config.ipv6_link_local_addr, ha 255 drivers/scsi/qla4xxx/ql4_init.c &ha->ip_config.ipv6_default_router_addr, 4) == ha 259 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 265 drivers/scsi/qla4xxx/ql4_init.c "IP(s) \"", ha->host_no, __func__)); ha 268 drivers/scsi/qla4xxx/ql4_init.c if (ha->ip_config.ipv6_link_local_state == ha 271 drivers/scsi/qla4xxx/ql4_init.c if (ha->ip_config.ipv6_addr0_state == ha 274 drivers/scsi/qla4xxx/ql4_init.c if (ha->ip_config.ipv6_addr1_state == ha 284 drivers/scsi/qla4xxx/ql4_init.c static int qla4_80xx_is_minidump_dma_capable(struct scsi_qla_host *ha, ha 287 drivers/scsi/qla4xxx/ql4_init.c int offset = (is_qla8022(ha)) ? QLA8022_TEMPLATE_CAP_OFFSET : ha 295 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_INFO, ha, "PEX DMA Not supported %d\n", ha 307 drivers/scsi/qla4xxx/ql4_init.c void qla4xxx_alloc_fw_dump(struct scsi_qla_host *ha) ha 317 drivers/scsi/qla4xxx/ql4_init.c if (ha->fw_dump) { ha 318 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_WARNING, ha, ha 323 drivers/scsi/qla4xxx/ql4_init.c status = qla4xxx_req_template_size(ha); ha 325 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_INFO, ha, ha 327 drivers/scsi/qla4xxx/ql4_init.c ha->host_no); ha 331 drivers/scsi/qla4xxx/ql4_init.c clear_bit(AF_82XX_FW_DUMPED, &ha->flags); ha 334 drivers/scsi/qla4xxx/ql4_init.c md_tmp = dma_alloc_coherent(&ha->pdev->dev, ha->fw_dump_tmplt_size, ha 337 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_INFO, ha, ha 339 drivers/scsi/qla4xxx/ql4_init.c ha->host_no); ha 344 drivers/scsi/qla4xxx/ql4_init.c status = qla4xxx_get_minidump_template(ha, md_tmp_dma); ha 346 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_INFO, ha, ha 348 drivers/scsi/qla4xxx/ql4_init.c ha->host_no); ha 354 drivers/scsi/qla4xxx/ql4_init.c dma_capable = qla4_80xx_is_minidump_dma_capable(ha, md_hdr); ha 361 drivers/scsi/qla4xxx/ql4_init.c ha->fw_dump_capture_mask = ql4xmdcapmask; ha 364 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_INFO, ha, "Falling back to default capture mask, as PEX DMA is not supported\n"); ha 365 drivers/scsi/qla4xxx/ql4_init.c ha->fw_dump_capture_mask = capture_debug_level; ha 368 drivers/scsi/qla4xxx/ql4_init.c md_hdr->driver_capture_mask = ha->fw_dump_capture_mask; ha 370 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, "Minimum num of entries = %d\n", ha 372 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, "Dump template size = %d\n", ha 373 drivers/scsi/qla4xxx/ql4_init.c ha->fw_dump_tmplt_size)); ha 374 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, "Selected Capture mask =0x%x\n", ha 375 drivers/scsi/qla4xxx/ql4_init.c ha->fw_dump_capture_mask)); ha 380 drivers/scsi/qla4xxx/ql4_init.c if (hdr_entry_bit & ha->fw_dump_capture_mask) ha 381 drivers/scsi/qla4xxx/ql4_init.c ha->fw_dump_size += md_hdr->capture_size_array[k]; ha 385 drivers/scsi/qla4xxx/ql4_init.c ha->fw_dump_size += ha->fw_dump_tmplt_size; ha 386 drivers/scsi/qla4xxx/ql4_init.c ha->fw_dump = vmalloc(ha->fw_dump_size); ha 387 drivers/scsi/qla4xxx/ql4_init.c if (!ha->fw_dump) ha 390 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 392 drivers/scsi/qla4xxx/ql4_init.c ha->fw_dump_tmplt_size)); ha 393 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 394 drivers/scsi/qla4xxx/ql4_init.c "Total Minidump size = 0x%x KB\n", ha->fw_dump_size)); ha 396 drivers/scsi/qla4xxx/ql4_init.c memcpy(ha->fw_dump, md_tmp, ha->fw_dump_tmplt_size); ha 397 drivers/scsi/qla4xxx/ql4_init.c ha->fw_dump_tmplt_hdr = ha->fw_dump; ha 400 drivers/scsi/qla4xxx/ql4_init.c dma_free_coherent(&ha->pdev->dev, ha->fw_dump_tmplt_size, ha 404 drivers/scsi/qla4xxx/ql4_init.c static int qla4xxx_fw_ready(struct scsi_qla_host *ha) ha 409 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, "Waiting for Firmware Ready..\n")); ha 412 drivers/scsi/qla4xxx/ql4_init.c if (test_and_clear_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags)) ha 413 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_get_dhcp_ip_address(ha); ha 416 drivers/scsi/qla4xxx/ql4_init.c if (qla4xxx_get_firmware_state(ha) != QLA_SUCCESS) { ha 418 drivers/scsi/qla4xxx/ql4_init.c "state\n", ha->host_no, __func__)); ha 422 drivers/scsi/qla4xxx/ql4_init.c if (ha->firmware_state & FW_STATE_ERROR) { ha 424 drivers/scsi/qla4xxx/ql4_init.c " occurred\n", ha->host_no, __func__)); ha 428 drivers/scsi/qla4xxx/ql4_init.c if (ha->firmware_state & FW_STATE_CONFIG_WAIT) { ha 433 drivers/scsi/qla4xxx/ql4_init.c if (qla4xxx_initialize_fw_cb(ha) == QLA_ERROR) ha 440 drivers/scsi/qla4xxx/ql4_init.c if (ha->firmware_state & FW_STATE_WAIT_AUTOCONNECT) { ha 443 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 446 drivers/scsi/qla4xxx/ql4_init.c if (ha->firmware_state & FW_STATE_CONFIGURING_IP) { ha 449 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 458 drivers/scsi/qla4xxx/ql4_init.c if (ha->addl_fw_state & FW_ADDSTATE_LINK_UP) { ha 461 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 462 drivers/scsi/qla4xxx/ql4_init.c } else if (ha->firmware_state & ha 467 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 468 drivers/scsi/qla4xxx/ql4_init.c ha->firmware_state = FW_STATE_READY; ha 473 drivers/scsi/qla4xxx/ql4_init.c if (ha->firmware_state == FW_STATE_READY) { ha 476 drivers/scsi/qla4xxx/ql4_init.c &ha->dpc_flags)) ha 477 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_get_dhcp_ip_address(ha); ha 479 drivers/scsi/qla4xxx/ql4_init.c if (!qla4xxx_wait_for_ip_config(ha) || ha 481 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 485 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 487 drivers/scsi/qla4xxx/ql4_init.c " - %s\n", ha->host_no, ha 488 drivers/scsi/qla4xxx/ql4_init.c __func__, (ha->addl_fw_state & ha 491 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 493 drivers/scsi/qla4xxx/ql4_init.c " Enabled %s\n", ha->host_no, ha 494 drivers/scsi/qla4xxx/ql4_init.c __func__, (ha->addl_fw_state & ha 497 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 499 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__, ha 500 drivers/scsi/qla4xxx/ql4_init.c (ha->addl_fw_state & ha 503 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 506 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__, ha 507 drivers/scsi/qla4xxx/ql4_init.c (ha->addl_fw_state & ha 516 drivers/scsi/qla4xxx/ql4_init.c "seconds expired= %d\n", ha->host_no, __func__, ha 517 drivers/scsi/qla4xxx/ql4_init.c ha->firmware_state, ha->addl_fw_state, ha 519 drivers/scsi/qla4xxx/ql4_init.c if (is_qla4032(ha) && ha 520 drivers/scsi/qla4xxx/ql4_init.c !(ha->addl_fw_state & FW_ADDSTATE_LINK_UP) && ha 530 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 532 drivers/scsi/qla4xxx/ql4_init.c if (ha->firmware_state & FW_STATE_CONFIGURING_IP) { ha 535 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 537 drivers/scsi/qla4xxx/ql4_init.c } else if (ha->firmware_state & FW_STATE_WAIT_AUTOCONNECT) { ha 540 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 552 drivers/scsi/qla4xxx/ql4_init.c static int qla4xxx_init_firmware(struct scsi_qla_host *ha) ha 556 drivers/scsi/qla4xxx/ql4_init.c if (is_aer_supported(ha) && ha 557 drivers/scsi/qla4xxx/ql4_init.c test_bit(AF_PCI_CHANNEL_IO_PERM_FAILURE, &ha->flags)) ha 563 drivers/scsi/qla4xxx/ql4_init.c if (is_qla80XX(ha)) ha 564 drivers/scsi/qla4xxx/ql4_init.c qla4_8xxx_stop_firmware(ha); ha 566 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_INFO, ha, "Initializing firmware..\n"); ha 567 drivers/scsi/qla4xxx/ql4_init.c if (qla4xxx_initialize_fw_cb(ha) == QLA_ERROR) { ha 569 drivers/scsi/qla4xxx/ql4_init.c "control block\n", ha->host_no, __func__)); ha 573 drivers/scsi/qla4xxx/ql4_init.c if (!qla4xxx_fw_ready(ha)) ha 576 drivers/scsi/qla4xxx/ql4_init.c if (is_qla80XX(ha) && !test_bit(AF_INIT_DONE, &ha->flags)) ha 577 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_alloc_fw_dump(ha); ha 579 drivers/scsi/qla4xxx/ql4_init.c return qla4xxx_get_firmware_status(ha); ha 582 drivers/scsi/qla4xxx/ql4_init.c static void qla4xxx_set_model_info(struct scsi_qla_host *ha) ha 586 drivers/scsi/qla4xxx/ql4_init.c int size = sizeof(ha->nvram->isp4022.boardIdStr); ha 590 drivers/scsi/qla4xxx/ql4_init.c board_id_string[i] = rd_nvram_word(ha, offset); ha 594 drivers/scsi/qla4xxx/ql4_init.c memcpy(ha->model_name, board_id_string, size); ha 597 drivers/scsi/qla4xxx/ql4_init.c static int qla4xxx_config_nvram(struct scsi_qla_host *ha) ha 602 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(printk("scsi%ld: %s: Get EEProm parameters \n", ha->host_no, ha 604 drivers/scsi/qla4xxx/ql4_init.c if (ql4xxx_lock_flash(ha) != QLA_SUCCESS) ha 606 drivers/scsi/qla4xxx/ql4_init.c if (ql4xxx_lock_nvram(ha) != QLA_SUCCESS) { ha 607 drivers/scsi/qla4xxx/ql4_init.c ql4xxx_unlock_flash(ha); ha 612 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_INFO, ha, "Configuring NVRAM ...\n"); ha 613 drivers/scsi/qla4xxx/ql4_init.c if (qla4xxx_is_nvram_configuration_valid(ha) == QLA_SUCCESS) { ha 614 drivers/scsi/qla4xxx/ql4_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 616 drivers/scsi/qla4xxx/ql4_init.c rd_nvram_word(ha, eeprom_ext_hw_conf_offset(ha)); ha 617 drivers/scsi/qla4xxx/ql4_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 619 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_WARNING, ha, ha 621 drivers/scsi/qla4xxx/ql4_init.c "Please update your EEPROM\n", ha->host_no, ha 625 drivers/scsi/qla4xxx/ql4_init.c if (is_qla4010(ha)) ha 627 drivers/scsi/qla4xxx/ql4_init.c else if (is_qla4022(ha) | is_qla4032(ha)) ha 633 drivers/scsi/qla4xxx/ql4_init.c if (is_qla4022(ha) || is_qla4032(ha)) ha 634 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_set_model_info(ha); ha 636 drivers/scsi/qla4xxx/ql4_init.c strcpy(ha->model_name, "QLA4010"); ha 639 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__, extHwConfig.Asuint32_t)); ha 641 drivers/scsi/qla4xxx/ql4_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 642 drivers/scsi/qla4xxx/ql4_init.c writel((0xFFFF << 16) | extHwConfig.Asuint32_t, isp_ext_hw_conf(ha)); ha 643 drivers/scsi/qla4xxx/ql4_init.c readl(isp_ext_hw_conf(ha)); ha 644 drivers/scsi/qla4xxx/ql4_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 646 drivers/scsi/qla4xxx/ql4_init.c ql4xxx_unlock_nvram(ha); ha 647 drivers/scsi/qla4xxx/ql4_init.c ql4xxx_unlock_flash(ha); ha 656 drivers/scsi/qla4xxx/ql4_init.c void qla4_8xxx_pci_config(struct scsi_qla_host *ha) ha 658 drivers/scsi/qla4xxx/ql4_init.c pci_set_master(ha->pdev); ha 661 drivers/scsi/qla4xxx/ql4_init.c void qla4xxx_pci_config(struct scsi_qla_host *ha) ha 666 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_INFO, ha, "Configuring PCI space...\n"); ha 668 drivers/scsi/qla4xxx/ql4_init.c pci_set_master(ha->pdev); ha 669 drivers/scsi/qla4xxx/ql4_init.c status = pci_set_mwi(ha->pdev); ha 675 drivers/scsi/qla4xxx/ql4_init.c pci_read_config_word(ha->pdev, PCI_COMMAND, &w); ha 678 drivers/scsi/qla4xxx/ql4_init.c pci_write_config_word(ha->pdev, PCI_COMMAND, w); ha 681 drivers/scsi/qla4xxx/ql4_init.c static int qla4xxx_start_firmware_from_flash(struct scsi_qla_host *ha) ha 688 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_INFO, ha, "Starting firmware ...\n"); ha 700 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 702 drivers/scsi/qla4xxx/ql4_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 703 drivers/scsi/qla4xxx/ql4_init.c writel(jiffies, &ha->reg->mailbox[7]); ha 704 drivers/scsi/qla4xxx/ql4_init.c if (is_qla4022(ha) | is_qla4032(ha)) ha 706 drivers/scsi/qla4xxx/ql4_init.c &ha->reg->u1.isp4022.nvram); ha 708 drivers/scsi/qla4xxx/ql4_init.c writel(2, &ha->reg->mailbox[6]); ha 709 drivers/scsi/qla4xxx/ql4_init.c readl(&ha->reg->mailbox[6]); ha 711 drivers/scsi/qla4xxx/ql4_init.c writel(set_rmask(CSR_BOOT_ENABLE), &ha->reg->ctrl_status); ha 712 drivers/scsi/qla4xxx/ql4_init.c readl(&ha->reg->ctrl_status); ha 713 drivers/scsi/qla4xxx/ql4_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 718 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__, FIRMWARE_UP_TOV)); ha 723 drivers/scsi/qla4xxx/ql4_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 724 drivers/scsi/qla4xxx/ql4_init.c ctrl_status = readw(&ha->reg->ctrl_status); ha 725 drivers/scsi/qla4xxx/ql4_init.c mbox_status = readw(&ha->reg->mailbox[0]); ha 726 drivers/scsi/qla4xxx/ql4_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 735 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__, ctrl_status, max_wait_time)); ha 742 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 744 drivers/scsi/qla4xxx/ql4_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 746 drivers/scsi/qla4xxx/ql4_init.c &ha->reg->ctrl_status); ha 747 drivers/scsi/qla4xxx/ql4_init.c readl(&ha->reg->ctrl_status); ha 748 drivers/scsi/qla4xxx/ql4_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 753 drivers/scsi/qla4xxx/ql4_init.c "- mbox status 0x%x\n", ha->host_no, __func__, ha 790 drivers/scsi/qla4xxx/ql4_init.c int qla4xxx_start_firmware(struct scsi_qla_host *ha) ha 798 drivers/scsi/qla4xxx/ql4_init.c if (is_qla4022(ha) | is_qla4032(ha)) ha 799 drivers/scsi/qla4xxx/ql4_init.c ql4xxx_set_mac_number(ha); ha 801 drivers/scsi/qla4xxx/ql4_init.c if (ql4xxx_lock_drvr_wait(ha) != QLA_SUCCESS) ha 804 drivers/scsi/qla4xxx/ql4_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 806 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(printk("scsi%ld: %s: port_ctrl = 0x%08X\n", ha->host_no, ha 807 drivers/scsi/qla4xxx/ql4_init.c __func__, readw(isp_port_ctrl(ha)))); ha 808 drivers/scsi/qla4xxx/ql4_init.c DEBUG(printk("scsi%ld: %s: port_status = 0x%08X\n", ha->host_no, ha 809 drivers/scsi/qla4xxx/ql4_init.c __func__, readw(isp_port_status(ha)))); ha 812 drivers/scsi/qla4xxx/ql4_init.c if ((readw(isp_port_ctrl(ha)) & 0x8000) != 0) { ha 814 drivers/scsi/qla4xxx/ql4_init.c "initialized\n", ha->host_no, __func__)); ha 817 drivers/scsi/qla4xxx/ql4_init.c mbox_status = readw(&ha->reg->mailbox[0]); ha 820 drivers/scsi/qla4xxx/ql4_init.c "0x%x\n", ha->host_no, __func__, mbox_status)); ha 829 drivers/scsi/qla4xxx/ql4_init.c &ha->reg->ctrl_status); ha 830 drivers/scsi/qla4xxx/ql4_init.c readl(&ha->reg->ctrl_status); ha 832 drivers/scsi/qla4xxx/ql4_init.c &ha->reg->ctrl_status); ha 833 drivers/scsi/qla4xxx/ql4_init.c readl(&ha->reg->ctrl_status); ha 834 drivers/scsi/qla4xxx/ql4_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 835 drivers/scsi/qla4xxx/ql4_init.c if (qla4xxx_get_firmware_state(ha) == QLA_SUCCESS) { ha 838 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, ha 839 drivers/scsi/qla4xxx/ql4_init.c __func__, ha->firmware_state)); ha 841 drivers/scsi/qla4xxx/ql4_init.c if (ha->firmware_state & ha 847 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__, ha 848 drivers/scsi/qla4xxx/ql4_init.c ha->firmware_state)); ha 856 drivers/scsi/qla4xxx/ql4_init.c "0x%x\n", ha->host_no, __func__, ha 857 drivers/scsi/qla4xxx/ql4_init.c ha->firmware_state)); ha 859 drivers/scsi/qla4xxx/ql4_init.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 863 drivers/scsi/qla4xxx/ql4_init.c "started - resetting\n", ha->host_no, __func__)); ha 865 drivers/scsi/qla4xxx/ql4_init.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 868 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__, soft_reset, config_chip)); ha 870 drivers/scsi/qla4xxx/ql4_init.c DEBUG(printk("scsi%ld: %s: Issue Soft Reset\n", ha->host_no, ha 872 drivers/scsi/qla4xxx/ql4_init.c status = qla4xxx_soft_reset(ha); /* NOTE: acquires drvr ha 876 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 877 drivers/scsi/qla4xxx/ql4_init.c ql4xxx_unlock_drvr(ha); ha 883 drivers/scsi/qla4xxx/ql4_init.c if (ql4xxx_lock_drvr_wait(ha) != QLA_SUCCESS) ha 888 drivers/scsi/qla4xxx/ql4_init.c if ((status = qla4xxx_config_nvram(ha)) == QLA_SUCCESS) ha 889 drivers/scsi/qla4xxx/ql4_init.c status = qla4xxx_start_firmware_from_flash(ha); ha 892 drivers/scsi/qla4xxx/ql4_init.c ql4xxx_unlock_drvr(ha); ha 894 drivers/scsi/qla4xxx/ql4_init.c if (test_and_clear_bit(AF_GET_CRASH_RECORD, &ha->flags)) ha 895 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_get_crash_record(ha); ha 897 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_init_rings(ha); ha 900 drivers/scsi/qla4xxx/ql4_init.c ha->host_no, __func__)); ha 912 drivers/scsi/qla4xxx/ql4_init.c void qla4xxx_free_ddb_index(struct scsi_qla_host *ha) ha 919 drivers/scsi/qla4xxx/ql4_init.c max_ddbs = is_qla40XX(ha) ? MAX_DEV_DB_ENTRIES_40XX : ha 923 drivers/scsi/qla4xxx/ql4_init.c ret = qla4xxx_get_fwddb_entry(ha, idx, NULL, 0, NULL, ha 932 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 934 drivers/scsi/qla4xxx/ql4_init.c ret = qla4xxx_clear_ddb_entry(ha, idx); ha 936 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_ERR, ha, ha 952 drivers/scsi/qla4xxx/ql4_init.c int qla4xxx_initialize_adapter(struct scsi_qla_host *ha, int is_reset) ha 956 drivers/scsi/qla4xxx/ql4_init.c ha->eeprom_cmd_data = 0; ha 958 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_INFO, ha, "Configuring PCI space...\n"); ha 959 drivers/scsi/qla4xxx/ql4_init.c ha->isp_ops->pci_config(ha); ha 961 drivers/scsi/qla4xxx/ql4_init.c ha->isp_ops->disable_intrs(ha); ha 964 drivers/scsi/qla4xxx/ql4_init.c if (ha->isp_ops->start_firmware(ha) == QLA_ERROR) ha 974 drivers/scsi/qla4xxx/ql4_init.c if (is_qla8032(ha) || is_qla8042(ha)) ha 975 drivers/scsi/qla4xxx/ql4_init.c qla4_83xx_enable_mbox_intrs(ha); ha 977 drivers/scsi/qla4xxx/ql4_init.c if (qla4xxx_about_firmware(ha) == QLA_ERROR) ha 980 drivers/scsi/qla4xxx/ql4_init.c if (ha->isp_ops->get_sys_info(ha) == QLA_ERROR) ha 983 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_init_local_data(ha); ha 985 drivers/scsi/qla4xxx/ql4_init.c status = qla4xxx_init_firmware(ha); ha 990 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_build_ddb_list(ha, is_reset); ha 992 drivers/scsi/qla4xxx/ql4_init.c set_bit(AF_ONLINE, &ha->flags); ha 995 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(printk("scsi%ld: initialize adapter: %s\n", ha->host_no, ha 1000 drivers/scsi/qla4xxx/ql4_init.c int qla4xxx_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index, ha 1007 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1019 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_update_session_conn_param(ha, ddb_entry); ha 1045 drivers/scsi/qla4xxx/ql4_init.c clear_bit(fw_ddb_index, ha->ddb_idx_map); ha 1055 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_update_session_conn_param(ha, ddb_entry); ha 1066 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Unknown Event\n", ha 1094 drivers/scsi/qla4xxx/ql4_init.c int qla4xxx_flash_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index, ha 1101 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1114 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_update_session_conn_fwddb_param(ha, ddb_entry); ha 1139 drivers/scsi/qla4xxx/ql4_init.c qla4xxx_update_session_conn_fwddb_param(ha, ddb_entry); ha 1150 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Unknown Event\n", ha 1165 drivers/scsi/qla4xxx/ql4_init.c int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, ha 1177 drivers/scsi/qla4xxx/ql4_init.c ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, fw_ddb_index); ha 1180 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_ERR, ha, "%s: No ddb_entry at FW index [%d]\n", ha 1184 drivers/scsi/qla4xxx/ql4_init.c clear_bit(fw_ddb_index, ha->ddb_idx_map); ha 1189 drivers/scsi/qla4xxx/ql4_init.c ddb_entry->ddb_change(ha, fw_ddb_index, ddb_entry, state); ha 1206 drivers/scsi/qla4xxx/ql4_init.c struct scsi_qla_host *ha; ha 1214 drivers/scsi/qla4xxx/ql4_init.c ha = ddb_entry->ha; ha 1216 drivers/scsi/qla4xxx/ql4_init.c if (!test_bit(AF_LINK_UP, &ha->flags)) ha 1220 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1225 drivers/scsi/qla4xxx/ql4_init.c fw_ddb_entry = dma_pool_alloc(ha->fw_ddb_dma_pool, GFP_KERNEL, ha 1228 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_ERR, ha, "Out of memory\n")); ha 1233 drivers/scsi/qla4xxx/ql4_init.c ret = qla4xxx_get_ddb_index(ha, &ddb_entry->fw_ddb_index); ha 1237 drivers/scsi/qla4xxx/ql4_init.c ha->fw_ddb_index_map[ddb_entry->fw_ddb_index] = ddb_entry; ha 1238 drivers/scsi/qla4xxx/ql4_init.c ha->tot_ddbs++; ha 1245 drivers/scsi/qla4xxx/ql4_init.c ret = qla4xxx_set_ddb_entry(ha, ddb_entry->fw_ddb_index, ha 1248 drivers/scsi/qla4xxx/ql4_init.c DEBUG2(ql4_printk(KERN_ERR, ha, "Set DDB failed\n")); ha 1253 drivers/scsi/qla4xxx/ql4_init.c ret = qla4xxx_conn_open(ha, ddb_entry->fw_ddb_index); ha 1255 drivers/scsi/qla4xxx/ql4_init.c ql4_printk(KERN_ERR, ha, "%s: Login failed: %s\n", __func__, ha 1262 drivers/scsi/qla4xxx/ql4_init.c dma_pool_free(ha->fw_ddb_dma_pool, fw_ddb_entry, fw_ddb_dma); ha 22 drivers/scsi/qla4xxx/ql4_inline.h qla4xxx_lookup_ddb_by_fw_index(struct scsi_qla_host *ha, uint32_t fw_ddb_index) ha 27 drivers/scsi/qla4xxx/ql4_inline.h (ha->fw_ddb_index_map[fw_ddb_index] != ha 29 drivers/scsi/qla4xxx/ql4_inline.h ddb_entry = ha->fw_ddb_index_map[fw_ddb_index]; ha 33 drivers/scsi/qla4xxx/ql4_inline.h ha->host_no, __func__, fw_ddb_index, ddb_entry)); ha 39 drivers/scsi/qla4xxx/ql4_inline.h __qla4xxx_enable_intrs(struct scsi_qla_host *ha) ha 41 drivers/scsi/qla4xxx/ql4_inline.h if (is_qla4022(ha) | is_qla4032(ha)) { ha 43 drivers/scsi/qla4xxx/ql4_inline.h &ha->reg->u1.isp4022.intr_mask); ha 44 drivers/scsi/qla4xxx/ql4_inline.h readl(&ha->reg->u1.isp4022.intr_mask); ha 46 drivers/scsi/qla4xxx/ql4_inline.h writel(set_rmask(CSR_SCSI_INTR_ENABLE), &ha->reg->ctrl_status); ha 47 drivers/scsi/qla4xxx/ql4_inline.h readl(&ha->reg->ctrl_status); ha 49 drivers/scsi/qla4xxx/ql4_inline.h set_bit(AF_INTERRUPTS_ON, &ha->flags); ha 53 drivers/scsi/qla4xxx/ql4_inline.h __qla4xxx_disable_intrs(struct scsi_qla_host *ha) ha 55 drivers/scsi/qla4xxx/ql4_inline.h if (is_qla4022(ha) | is_qla4032(ha)) { ha 57 drivers/scsi/qla4xxx/ql4_inline.h &ha->reg->u1.isp4022.intr_mask); ha 58 drivers/scsi/qla4xxx/ql4_inline.h readl(&ha->reg->u1.isp4022.intr_mask); ha 60 drivers/scsi/qla4xxx/ql4_inline.h writel(clr_rmask(CSR_SCSI_INTR_ENABLE), &ha->reg->ctrl_status); ha 61 drivers/scsi/qla4xxx/ql4_inline.h readl(&ha->reg->ctrl_status); ha 63 drivers/scsi/qla4xxx/ql4_inline.h clear_bit(AF_INTERRUPTS_ON, &ha->flags); ha 67 drivers/scsi/qla4xxx/ql4_inline.h qla4xxx_enable_intrs(struct scsi_qla_host *ha) ha 71 drivers/scsi/qla4xxx/ql4_inline.h spin_lock_irqsave(&ha->hardware_lock, flags); ha 72 drivers/scsi/qla4xxx/ql4_inline.h __qla4xxx_enable_intrs(ha); ha 73 drivers/scsi/qla4xxx/ql4_inline.h spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 77 drivers/scsi/qla4xxx/ql4_inline.h qla4xxx_disable_intrs(struct scsi_qla_host *ha) ha 81 drivers/scsi/qla4xxx/ql4_inline.h spin_lock_irqsave(&ha->hardware_lock, flags); ha 82 drivers/scsi/qla4xxx/ql4_inline.h __qla4xxx_disable_intrs(ha); ha 83 drivers/scsi/qla4xxx/ql4_inline.h spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 16 drivers/scsi/qla4xxx/ql4_iocb.c qla4xxx_space_in_req_ring(struct scsi_qla_host *ha, uint16_t req_cnt) ha 21 drivers/scsi/qla4xxx/ql4_iocb.c if ((req_cnt + 2) >= ha->req_q_count) { ha 22 drivers/scsi/qla4xxx/ql4_iocb.c cnt = (uint16_t) ha->isp_ops->rd_shdw_req_q_out(ha); ha 23 drivers/scsi/qla4xxx/ql4_iocb.c if (ha->request_in < cnt) ha 24 drivers/scsi/qla4xxx/ql4_iocb.c ha->req_q_count = cnt - ha->request_in; ha 26 drivers/scsi/qla4xxx/ql4_iocb.c ha->req_q_count = REQUEST_QUEUE_DEPTH - ha 27 drivers/scsi/qla4xxx/ql4_iocb.c (ha->request_in - cnt); ha 31 drivers/scsi/qla4xxx/ql4_iocb.c if ((req_cnt + 2) < ha->req_q_count) ha 37 drivers/scsi/qla4xxx/ql4_iocb.c static void qla4xxx_advance_req_ring_ptr(struct scsi_qla_host *ha) ha 40 drivers/scsi/qla4xxx/ql4_iocb.c if (ha->request_in == (REQUEST_QUEUE_DEPTH - 1)) { ha 41 drivers/scsi/qla4xxx/ql4_iocb.c ha->request_in = 0; ha 42 drivers/scsi/qla4xxx/ql4_iocb.c ha->request_ptr = ha->request_ring; ha 44 drivers/scsi/qla4xxx/ql4_iocb.c ha->request_in++; ha 45 drivers/scsi/qla4xxx/ql4_iocb.c ha->request_ptr++; ha 59 drivers/scsi/qla4xxx/ql4_iocb.c static int qla4xxx_get_req_pkt(struct scsi_qla_host *ha, ha 64 drivers/scsi/qla4xxx/ql4_iocb.c if (qla4xxx_space_in_req_ring(ha, req_cnt)) { ha 65 drivers/scsi/qla4xxx/ql4_iocb.c *queue_entry = ha->request_ptr; ha 68 drivers/scsi/qla4xxx/ql4_iocb.c qla4xxx_advance_req_ring_ptr(ha); ha 69 drivers/scsi/qla4xxx/ql4_iocb.c ha->req_q_count -= req_cnt; ha 85 drivers/scsi/qla4xxx/ql4_iocb.c int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha, ha 93 drivers/scsi/qla4xxx/ql4_iocb.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 96 drivers/scsi/qla4xxx/ql4_iocb.c if (qla4xxx_get_req_pkt(ha, (struct queue_entry **) &marker_entry) != ha 111 drivers/scsi/qla4xxx/ql4_iocb.c ha->isp_ops->queue_iocb(ha); ha 114 drivers/scsi/qla4xxx/ql4_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 119 drivers/scsi/qla4xxx/ql4_iocb.c qla4xxx_alloc_cont_entry(struct scsi_qla_host *ha) ha 123 drivers/scsi/qla4xxx/ql4_iocb.c cont_entry = (struct continuation_t1_entry *)ha->request_ptr; ha 125 drivers/scsi/qla4xxx/ql4_iocb.c qla4xxx_advance_req_ring_ptr(ha); ha 130 drivers/scsi/qla4xxx/ql4_iocb.c cont_entry->hdr.systemDefined = (uint8_t) cpu_to_le16(ha->request_in); ha 152 drivers/scsi/qla4xxx/ql4_iocb.c struct scsi_qla_host *ha; ha 160 drivers/scsi/qla4xxx/ql4_iocb.c ha = srb->ha; ha 178 drivers/scsi/qla4xxx/ql4_iocb.c cont_entry = qla4xxx_alloc_cont_entry(ha); ha 195 drivers/scsi/qla4xxx/ql4_iocb.c void qla4_83xx_queue_iocb(struct scsi_qla_host *ha) ha 197 drivers/scsi/qla4xxx/ql4_iocb.c writel(ha->request_in, &ha->qla4_83xx_reg->req_q_in); ha 198 drivers/scsi/qla4xxx/ql4_iocb.c readl(&ha->qla4_83xx_reg->req_q_in); ha 201 drivers/scsi/qla4xxx/ql4_iocb.c void qla4_83xx_complete_iocb(struct scsi_qla_host *ha) ha 203 drivers/scsi/qla4xxx/ql4_iocb.c writel(ha->response_out, &ha->qla4_83xx_reg->rsp_q_out); ha 204 drivers/scsi/qla4xxx/ql4_iocb.c readl(&ha->qla4_83xx_reg->rsp_q_out); ha 214 drivers/scsi/qla4xxx/ql4_iocb.c void qla4_82xx_queue_iocb(struct scsi_qla_host *ha) ha 218 drivers/scsi/qla4xxx/ql4_iocb.c dbval = 0x14 | (ha->func_num << 5); ha 219 drivers/scsi/qla4xxx/ql4_iocb.c dbval = dbval | (0 << 8) | (ha->request_in << 16); ha 221 drivers/scsi/qla4xxx/ql4_iocb.c qla4_82xx_wr_32(ha, ha->nx_db_wr_ptr, ha->request_in); ha 232 drivers/scsi/qla4xxx/ql4_iocb.c void qla4_82xx_complete_iocb(struct scsi_qla_host *ha) ha 234 drivers/scsi/qla4xxx/ql4_iocb.c writel(ha->response_out, &ha->qla4_82xx_reg->rsp_q_out); ha 235 drivers/scsi/qla4xxx/ql4_iocb.c readl(&ha->qla4_82xx_reg->rsp_q_out); ha 245 drivers/scsi/qla4xxx/ql4_iocb.c void qla4xxx_queue_iocb(struct scsi_qla_host *ha) ha 247 drivers/scsi/qla4xxx/ql4_iocb.c writel(ha->request_in, &ha->reg->req_q_in); ha 248 drivers/scsi/qla4xxx/ql4_iocb.c readl(&ha->reg->req_q_in); ha 259 drivers/scsi/qla4xxx/ql4_iocb.c void qla4xxx_complete_iocb(struct scsi_qla_host *ha) ha 261 drivers/scsi/qla4xxx/ql4_iocb.c writel(ha->response_out, &ha->reg->rsp_q_out); ha 262 drivers/scsi/qla4xxx/ql4_iocb.c readl(&ha->reg->rsp_q_out); ha 273 drivers/scsi/qla4xxx/ql4_iocb.c int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb * srb) ha 290 drivers/scsi/qla4xxx/ql4_iocb.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 300 drivers/scsi/qla4xxx/ql4_iocb.c if (!test_bit(AF_ONLINE, &ha->flags)) { ha 303 drivers/scsi/qla4xxx/ql4_iocb.c ha->host_no, __func__)); ha 314 drivers/scsi/qla4xxx/ql4_iocb.c if (!qla4xxx_space_in_req_ring(ha, req_cnt)) ha 318 drivers/scsi/qla4xxx/ql4_iocb.c if ((ha->iocb_cnt + req_cnt) >= ha->iocb_hiwat) ha 322 drivers/scsi/qla4xxx/ql4_iocb.c cmd_entry = (struct command_t3_entry *) ha->request_ptr; ha 345 drivers/scsi/qla4xxx/ql4_iocb.c ha->bytes_xfered += scsi_bufflen(cmd); ha 346 drivers/scsi/qla4xxx/ql4_iocb.c if (ha->bytes_xfered & ~0xFFFFF){ ha 347 drivers/scsi/qla4xxx/ql4_iocb.c ha->total_mbytes_xferred += ha->bytes_xfered >> 20; ha 348 drivers/scsi/qla4xxx/ql4_iocb.c ha->bytes_xfered &= 0xFFFFF; ha 355 drivers/scsi/qla4xxx/ql4_iocb.c qla4xxx_advance_req_ring_ptr(ha); ha 366 drivers/scsi/qla4xxx/ql4_iocb.c ha->iocb_cnt += req_cnt; ha 368 drivers/scsi/qla4xxx/ql4_iocb.c ha->req_q_count -= req_cnt; ha 370 drivers/scsi/qla4xxx/ql4_iocb.c ha->isp_ops->queue_iocb(ha); ha 371 drivers/scsi/qla4xxx/ql4_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 379 drivers/scsi/qla4xxx/ql4_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 389 drivers/scsi/qla4xxx/ql4_iocb.c struct scsi_qla_host *ha = ddb_entry->ha; ha 395 drivers/scsi/qla4xxx/ql4_iocb.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 398 drivers/scsi/qla4xxx/ql4_iocb.c if (!qla4xxx_space_in_req_ring(ha, task_data->iocb_req_cnt)) ha 401 drivers/scsi/qla4xxx/ql4_iocb.c passthru_iocb = (struct passthru0 *) ha->request_ptr; ha 437 drivers/scsi/qla4xxx/ql4_iocb.c qla4xxx_advance_req_ring_ptr(ha); ha 441 drivers/scsi/qla4xxx/ql4_iocb.c ha->iocb_cnt += task_data->iocb_req_cnt; ha 442 drivers/scsi/qla4xxx/ql4_iocb.c ha->req_q_count -= task_data->iocb_req_cnt; ha 443 drivers/scsi/qla4xxx/ql4_iocb.c ha->isp_ops->queue_iocb(ha); ha 447 drivers/scsi/qla4xxx/ql4_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 451 drivers/scsi/qla4xxx/ql4_iocb.c static struct mrb *qla4xxx_get_new_mrb(struct scsi_qla_host *ha) ha 459 drivers/scsi/qla4xxx/ql4_iocb.c mrb->ha = ha; ha 463 drivers/scsi/qla4xxx/ql4_iocb.c static int qla4xxx_send_mbox_iocb(struct scsi_qla_host *ha, struct mrb *mrb, ha 472 drivers/scsi/qla4xxx/ql4_iocb.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 475 drivers/scsi/qla4xxx/ql4_iocb.c rval = qla4xxx_get_req_pkt(ha, (struct queue_entry **) &(mrb->mbox)); ha 479 drivers/scsi/qla4xxx/ql4_iocb.c index = ha->mrb_index; ha 485 drivers/scsi/qla4xxx/ql4_iocb.c if (ha->active_mrb_array[index] == NULL) { ha 486 drivers/scsi/qla4xxx/ql4_iocb.c ha->mrb_index = index; ha 492 drivers/scsi/qla4xxx/ql4_iocb.c ha->active_mrb_array[index] = mrb; ha 500 drivers/scsi/qla4xxx/ql4_iocb.c ha->iocb_cnt += mrb->iocb_cnt; ha 501 drivers/scsi/qla4xxx/ql4_iocb.c ha->isp_ops->queue_iocb(ha); ha 503 drivers/scsi/qla4xxx/ql4_iocb.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 507 drivers/scsi/qla4xxx/ql4_iocb.c int qla4xxx_ping_iocb(struct scsi_qla_host *ha, uint32_t options, ha 516 drivers/scsi/qla4xxx/ql4_iocb.c mrb = qla4xxx_get_new_mrb(ha); ha 518 drivers/scsi/qla4xxx/ql4_iocb.c DEBUG2(ql4_printk(KERN_WARNING, ha, "%s: fail to get new mrb\n", ha 533 drivers/scsi/qla4xxx/ql4_iocb.c rval = qla4xxx_send_mbox_iocb(ha, mrb, in_mbox); ha 19 drivers/scsi/qla4xxx/ql4_isr.c static void qla4xxx_copy_sense(struct scsi_qla_host *ha, ha 29 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, "scsi%ld:%d:%d:%llu: %s:" ha 30 drivers/scsi/qla4xxx/ql4_isr.c " sense len 0\n", ha->host_no, ha 33 drivers/scsi/qla4xxx/ql4_isr.c ha->status_srb = NULL; ha 47 drivers/scsi/qla4xxx/ql4_isr.c "ASL= %02x, ASC/ASCQ = %02x/%02x\n", ha->host_no, ha 62 drivers/scsi/qla4xxx/ql4_isr.c ha->status_srb = srb; ha 64 drivers/scsi/qla4xxx/ql4_isr.c ha->status_srb = NULL; ha 75 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_status_cont_entry(struct scsi_qla_host *ha, ha 78 drivers/scsi/qla4xxx/ql4_isr.c struct srb *srb = ha->status_srb; ha 88 drivers/scsi/qla4xxx/ql4_isr.c "back to OS srb=%p srb->state:%d\n", ha->host_no, ha 90 drivers/scsi/qla4xxx/ql4_isr.c ha->status_srb = NULL; ha 106 drivers/scsi/qla4xxx/ql4_isr.c ha->status_srb = NULL; ha 115 drivers/scsi/qla4xxx/ql4_isr.c static void qla4xxx_status_entry(struct scsi_qla_host *ha, ha 124 drivers/scsi/qla4xxx/ql4_isr.c srb = qla4xxx_del_from_active_array(ha, le32_to_cpu(sts_entry->handle)); ha 126 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_WARNING, ha, "%s invalid status entry: " ha 129 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla80XX(ha)) ha 130 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags); ha 132 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 140 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, __func__, sts_entry->handle, ha 142 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_WARNING, ha, "Command is NULL:" ha 175 drivers/scsi/qla4xxx/ql4_isr.c "residual = 0x%x\n", ha->host_no, ha 190 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_copy_sense(ha, sts_entry, srb); ha 201 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, cmd->device->channel, ha 209 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, cmd->device->channel, ha 217 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, cmd->device->channel, ha 236 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, ha 261 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 263 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, ha 293 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 295 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, ha 310 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_copy_sense(ha, sts_entry, srb); ha 317 drivers/scsi/qla4xxx/ql4_isr.c "state: 0x%x\n", ha->host_no, ha 338 drivers/scsi/qla4xxx/ql4_isr.c " iResp=%02x\n", ha->host_no, cmd->device->id, ha 355 drivers/scsi/qla4xxx/ql4_isr.c if (ha->status_srb == NULL) ha 364 drivers/scsi/qla4xxx/ql4_isr.c static void qla4xxx_passthru_status_entry(struct scsi_qla_host *ha, ha 378 drivers/scsi/qla4xxx/ql4_isr.c ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, fw_ddb_index); ha 381 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_ERR, ha, "%s: Invalid target index = 0x%x\n", ha 393 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_ERR, ha, "%s: Task is NULL\n", __func__); ha 399 drivers/scsi/qla4xxx/ql4_isr.c ha->iocb_cnt -= task_data->iocb_req_cnt; ha 400 drivers/scsi/qla4xxx/ql4_isr.c queue_work(ha->task_wq, &task_data->task_work); ha 403 drivers/scsi/qla4xxx/ql4_isr.c static struct mrb *qla4xxx_del_mrb_from_active_array(struct scsi_qla_host *ha, ha 412 drivers/scsi/qla4xxx/ql4_isr.c mrb = ha->active_mrb_array[index]; ha 413 drivers/scsi/qla4xxx/ql4_isr.c ha->active_mrb_array[index] = NULL; ha 418 drivers/scsi/qla4xxx/ql4_isr.c ha->iocb_cnt -= mrb->iocb_cnt; ha 423 drivers/scsi/qla4xxx/ql4_isr.c static void qla4xxx_mbox_status_entry(struct scsi_qla_host *ha, ha 430 drivers/scsi/qla4xxx/ql4_isr.c mrb = qla4xxx_del_mrb_from_active_array(ha, ha 434 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_WARNING, ha, "%s: mrb[%d] is null\n", __func__, ha 441 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: mbox_cmd = 0x%x, " ha 454 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_post_ping_evt_work(ha, status, mrb->pid, data_size, ha 459 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_WARNING, ha, "%s: invalid mbox_cmd = " ha 474 drivers/scsi/qla4xxx/ql4_isr.c void qla4xxx_process_response_queue(struct scsi_qla_host *ha) ha 481 drivers/scsi/qla4xxx/ql4_isr.c while ((ha->response_ptr->signature != RESPONSE_PROCESSED)) { ha 482 drivers/scsi/qla4xxx/ql4_isr.c sts_entry = (struct status_entry *) ha->response_ptr; ha 486 drivers/scsi/qla4xxx/ql4_isr.c if (ha->response_out == (RESPONSE_QUEUE_DEPTH - 1)) { ha 487 drivers/scsi/qla4xxx/ql4_isr.c ha->response_out = 0; ha 488 drivers/scsi/qla4xxx/ql4_isr.c ha->response_ptr = ha->response_ring; ha 490 drivers/scsi/qla4xxx/ql4_isr.c ha->response_out++; ha 491 drivers/scsi/qla4xxx/ql4_isr.c ha->response_ptr++; ha 498 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_status_entry(ha, sts_entry); ha 503 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_passthru_status_entry(ha, ha 506 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_ERR, ha, ha 513 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_status_cont_entry(ha, ha 522 drivers/scsi/qla4xxx/ql4_isr.c srb = qla4xxx_del_from_active_array(ha, ha 529 drivers/scsi/qla4xxx/ql4_isr.c "srb %p\n", ha->host_no, __func__, srb)); ha 540 drivers/scsi/qla4xxx/ql4_isr.c "ignoring\n", ha->host_no, __func__)); ha 544 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 546 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_mbox_status_entry(ha, ha 556 drivers/scsi/qla4xxx/ql4_isr.c "response queue \n", ha->host_no, ha 568 drivers/scsi/qla4xxx/ql4_isr.c ha->isp_ops->complete_iocb(ha); ha 574 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, __func__, srb, sts_entry->hdr.entryType, ha 578 drivers/scsi/qla4xxx/ql4_isr.c ha->isp_ops->complete_iocb(ha); ha 579 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 587 drivers/scsi/qla4xxx/ql4_isr.c static int qla4_83xx_loopback_in_progress(struct scsi_qla_host *ha) ha 591 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 592 drivers/scsi/qla4xxx/ql4_isr.c if ((ha->idc_info.info2 & ENABLE_INTERNAL_LOOPBACK) || ha 593 drivers/scsi/qla4xxx/ql4_isr.c (ha->idc_info.info2 & ENABLE_EXTERNAL_LOOPBACK)) { ha 594 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 599 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 609 drivers/scsi/qla4xxx/ql4_isr.c static void qla4xxx_update_ipaddr_state(struct scsi_qla_host *ha, ha 621 drivers/scsi/qla4xxx/ql4_isr.c ha->ip_config.ipv4_addr_state = ipaddr_state; ha 624 drivers/scsi/qla4xxx/ql4_isr.c ha->ip_config.ipv6_link_local_state = ipaddr_state; ha 627 drivers/scsi/qla4xxx/ql4_isr.c ha->ip_config.ipv6_addr0_state = ipaddr_state; ha 630 drivers/scsi/qla4xxx/ql4_isr.c ha->ip_config.ipv6_addr1_state = ipaddr_state; ha 633 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_INFO, ha, "%s: Invalid IPADDR index %d\n", ha 638 drivers/scsi/qla4xxx/ql4_isr.c static void qla4xxx_default_router_changed(struct scsi_qla_host *ha, ha 641 drivers/scsi/qla4xxx/ql4_isr.c memcpy(&ha->ip_config.ipv6_default_router_addr.s6_addr32[0], ha 643 drivers/scsi/qla4xxx/ql4_isr.c memcpy(&ha->ip_config.ipv6_default_router_addr.s6_addr32[1], ha 645 drivers/scsi/qla4xxx/ql4_isr.c memcpy(&ha->ip_config.ipv6_default_router_addr.s6_addr32[2], ha 647 drivers/scsi/qla4xxx/ql4_isr.c memcpy(&ha->ip_config.ipv6_default_router_addr.s6_addr32[3], ha 659 drivers/scsi/qla4xxx/ql4_isr.c static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha, ha 667 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla8032(ha) || is_qla8042(ha)) ha 668 drivers/scsi/qla4xxx/ql4_isr.c mailbox_out = &ha->qla4_83xx_reg->mailbox_out[0]; ha 669 drivers/scsi/qla4xxx/ql4_isr.c else if (is_qla8022(ha)) ha 670 drivers/scsi/qla4xxx/ql4_isr.c mailbox_out = &ha->qla4_82xx_reg->mailbox_out[0]; ha 672 drivers/scsi/qla4xxx/ql4_isr.c mailbox_out = &ha->reg->mailbox[0]; ha 677 drivers/scsi/qla4xxx/ql4_isr.c ha->mbox_status[0] = mbox_status; ha 679 drivers/scsi/qla4xxx/ql4_isr.c if (test_bit(AF_MBOX_COMMAND, &ha->flags)) { ha 684 drivers/scsi/qla4xxx/ql4_isr.c for (i = 0; i < ha->mbox_status_count; i++) ha 685 drivers/scsi/qla4xxx/ql4_isr.c ha->mbox_status[i] = readl(&mailbox_out[i]); ha 687 drivers/scsi/qla4xxx/ql4_isr.c set_bit(AF_MBOX_COMMAND_DONE, &ha->flags); ha 689 drivers/scsi/qla4xxx/ql4_isr.c if (test_bit(AF_MBOX_COMMAND_NOPOLL, &ha->flags)) ha 690 drivers/scsi/qla4xxx/ql4_isr.c complete(&ha->mbx_intr_comp); ha 698 drivers/scsi/qla4xxx/ql4_isr.c if (ha->aen_log.count < MAX_AEN_ENTRIES) { ha 700 drivers/scsi/qla4xxx/ql4_isr.c ha->aen_log.entry[ha->aen_log.count].mbox_sts[i] = ha 702 drivers/scsi/qla4xxx/ql4_isr.c ha->aen_log.count++; ha 707 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_INFO, ha, "%s: System Err\n", __func__); ha 708 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_dump_registers(ha); ha 710 drivers/scsi/qla4xxx/ql4_isr.c if ((is_qla8022(ha) && ql4xdontresethba) || ha 711 drivers/scsi/qla4xxx/ql4_isr.c ((is_qla8032(ha) || is_qla8042(ha)) && ha 712 drivers/scsi/qla4xxx/ql4_isr.c qla4_83xx_idc_dontreset(ha))) { ha 714 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, __func__)); ha 716 drivers/scsi/qla4xxx/ql4_isr.c set_bit(AF_GET_CRASH_RECORD, &ha->flags); ha 717 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 727 drivers/scsi/qla4xxx/ql4_isr.c "Reset HA\n", ha->host_no, mbox_status)); ha 728 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla80XX(ha)) ha 730 drivers/scsi/qla4xxx/ql4_isr.c &ha->dpc_flags); ha 732 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 736 drivers/scsi/qla4xxx/ql4_isr.c set_bit(AF_LINK_UP, &ha->flags); ha 737 drivers/scsi/qla4xxx/ql4_isr.c if (test_bit(AF_INIT_DONE, &ha->flags)) ha 738 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_LINK_CHANGED, &ha->dpc_flags); ha 740 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_INFO, ha, "%s: LINK UP\n", __func__); ha 741 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_post_aen_work(ha, ISCSI_EVENT_LINKUP, ha 745 drivers/scsi/qla4xxx/ql4_isr.c if ((is_qla8032(ha) || is_qla8042(ha)) && ha 746 drivers/scsi/qla4xxx/ql4_isr.c ha->notify_link_up_comp) ha 747 drivers/scsi/qla4xxx/ql4_isr.c complete(&ha->link_up_comp); ha 752 drivers/scsi/qla4xxx/ql4_isr.c clear_bit(AF_LINK_UP, &ha->flags); ha 753 drivers/scsi/qla4xxx/ql4_isr.c if (test_bit(AF_INIT_DONE, &ha->flags)) { ha 754 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_LINK_CHANGED, &ha->dpc_flags); ha 755 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_wake_dpc(ha); ha 758 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_INFO, ha, "%s: LINK DOWN\n", __func__); ha 759 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_post_aen_work(ha, ISCSI_EVENT_LINKDOWN, ha 765 drivers/scsi/qla4xxx/ql4_isr.c ha->seconds_since_last_heartbeat = 0; ha 770 drivers/scsi/qla4xxx/ql4_isr.c "ACQUIRED\n", ha->host_no, mbox_status)); ha 771 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags); ha 783 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(printk("scsi%ld: AEN %04x\n", ha->host_no, ha 789 drivers/scsi/qla4xxx/ql4_isr.c "mbox_sts[3]=%04x\n", ha->host_no, mbox_sts[0], ha 792 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_update_ipaddr_state(ha, mbox_sts[5], ha 799 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags); ha 802 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla80XX(ha)) ha 804 drivers/scsi/qla4xxx/ql4_isr.c &ha->dpc_flags); ha 806 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 808 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: ACB in disabling state\n", ha 809 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, __func__); ha 811 drivers/scsi/qla4xxx/ql4_isr.c complete(&ha->disable_acb_comp); ha 812 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: ACB state unconfigured\n", ha 813 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, __func__); ha 821 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, "scsi%ld: AEN %04x\n", ha 822 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_status)); ha 826 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 829 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0], mbox_sts[1], ha 839 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0], ha 848 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0], mbox_sts[1], ha 855 drivers/scsi/qla4xxx/ql4_isr.c if (ha->aen_q_count > 0) { ha 858 drivers/scsi/qla4xxx/ql4_isr.c ha->aen_q_count--; ha 861 drivers/scsi/qla4xxx/ql4_isr.c ha->aen_q[ha->aen_in].mbox_sts[i] = ha 868 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, ha->aen_in, ha 874 drivers/scsi/qla4xxx/ql4_isr.c ha->aen_in++; ha 875 drivers/scsi/qla4xxx/ql4_isr.c if (ha->aen_in == MAX_AEN_ENTRIES) ha 876 drivers/scsi/qla4xxx/ql4_isr.c ha->aen_in = 0; ha 879 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_AEN, &ha->dpc_flags); ha 883 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, __func__, ha 887 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no)); ha 901 drivers/scsi/qla4xxx/ql4_isr.c " inserted\n", ha->host_no, mbox_sts[0])); ha 907 drivers/scsi/qla4xxx/ql4_isr.c " removed\n", ha->host_no, mbox_sts[0])); ha 911 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 912 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 914 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0], ha 921 drivers/scsi/qla4xxx/ql4_isr.c &ha->dpc_flags); ha 922 drivers/scsi/qla4xxx/ql4_isr.c ha->idc_info.request_desc = mbox_sts[1]; ha 923 drivers/scsi/qla4xxx/ql4_isr.c ha->idc_info.info1 = mbox_sts[2]; ha 924 drivers/scsi/qla4xxx/ql4_isr.c ha->idc_info.info2 = mbox_sts[3]; ha 925 drivers/scsi/qla4xxx/ql4_isr.c ha->idc_info.info3 = mbox_sts[4]; ha 926 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_wake_dpc(ha); ha 932 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 933 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 935 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0], ha 938 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 940 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0])); ha 943 drivers/scsi/qla4xxx/ql4_isr.c if (ha->notify_idc_comp) ha 944 drivers/scsi/qla4xxx/ql4_isr.c complete(&ha->idc_comp); ha 948 drivers/scsi/qla4xxx/ql4_isr.c ha->idc_info.info2 = mbox_sts[3]; ha 950 drivers/scsi/qla4xxx/ql4_isr.c if (qla4_83xx_loopback_in_progress(ha)) { ha 951 drivers/scsi/qla4xxx/ql4_isr.c set_bit(AF_LOOPBACK, &ha->flags); ha 953 drivers/scsi/qla4xxx/ql4_isr.c clear_bit(AF_LOOPBACK, &ha->flags); ha 954 drivers/scsi/qla4xxx/ql4_isr.c if (ha->saved_acb) ha 956 drivers/scsi/qla4xxx/ql4_isr.c &ha->dpc_flags); ha 958 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_wake_dpc(ha); ha 963 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 965 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0], mbox_sts[1], ha 968 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 970 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0])); ha 971 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_default_router_changed(ha, mbox_sts); ha 975 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 977 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0], mbox_sts[1], ha 980 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 982 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0])); ha 984 drivers/scsi/qla4xxx/ql4_isr.c ha->idc_extend_tmo = mbox_sts[1]; ha 988 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 990 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0], ha 995 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_WARNING, ha, ha 997 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0], mbox_sts[1], ha 1003 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1005 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0], mbox_sts[1], ha 1008 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1010 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0])); ha 1016 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_sts[0])); ha 1021 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, mbox_status)); ha 1023 drivers/scsi/qla4xxx/ql4_isr.c ha->mbox_status[0] = mbox_status; ha 1027 drivers/scsi/qla4xxx/ql4_isr.c void qla4_83xx_interrupt_service_routine(struct scsi_qla_host *ha, ha 1032 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_isr_decode_mailbox(ha, ha 1033 drivers/scsi/qla4xxx/ql4_isr.c readl(&ha->qla4_83xx_reg->mailbox_out[0])); ha 1035 drivers/scsi/qla4xxx/ql4_isr.c writel(0, &ha->qla4_83xx_reg->risc_intr); ha 1037 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_process_response_queue(ha); ha 1041 drivers/scsi/qla4xxx/ql4_isr.c writel(0, &ha->qla4_83xx_reg->mb_int_mask); ha 1051 drivers/scsi/qla4xxx/ql4_isr.c void qla4_82xx_interrupt_service_routine(struct scsi_qla_host *ha, ha 1056 drivers/scsi/qla4xxx/ql4_isr.c test_bit(AF_INIT_DONE, &ha->flags)) ha 1057 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_process_response_queue(ha); ha 1061 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_isr_decode_mailbox(ha, ha 1062 drivers/scsi/qla4xxx/ql4_isr.c readl(&ha->qla4_82xx_reg->mailbox_out[0])); ha 1065 drivers/scsi/qla4xxx/ql4_isr.c writel(0, &ha->qla4_82xx_reg->host_int); ha 1066 drivers/scsi/qla4xxx/ql4_isr.c readl(&ha->qla4_82xx_reg->host_int); ha 1076 drivers/scsi/qla4xxx/ql4_isr.c void qla4xxx_interrupt_service_routine(struct scsi_qla_host * ha, ha 1081 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_process_response_queue(ha); ha 1085 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_isr_decode_mailbox(ha, ha 1086 drivers/scsi/qla4xxx/ql4_isr.c readl(&ha->reg->mailbox[0])); ha 1090 drivers/scsi/qla4xxx/ql4_isr.c &ha->reg->ctrl_status); ha 1091 drivers/scsi/qla4xxx/ql4_isr.c readl(&ha->reg->ctrl_status); ha 1101 drivers/scsi/qla4xxx/ql4_isr.c static void qla4_82xx_spurious_interrupt(struct scsi_qla_host *ha, ha 1107 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, "Spurious Interrupt\n")); ha 1108 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla8022(ha)) { ha 1109 drivers/scsi/qla4xxx/ql4_isr.c writel(0, &ha->qla4_82xx_reg->host_int); ha 1110 drivers/scsi/qla4xxx/ql4_isr.c if (!ha->pdev->msi_enabled && !ha->pdev->msix_enabled) ha 1111 drivers/scsi/qla4xxx/ql4_isr.c qla4_82xx_wr_32(ha, ha->nx_legacy_intr.tgt_mask_reg, ha 1114 drivers/scsi/qla4xxx/ql4_isr.c ha->spurious_int_count++; ha 1124 drivers/scsi/qla4xxx/ql4_isr.c struct scsi_qla_host *ha; ha 1129 drivers/scsi/qla4xxx/ql4_isr.c ha = (struct scsi_qla_host *) dev_id; ha 1130 drivers/scsi/qla4xxx/ql4_isr.c if (!ha) { ha 1136 drivers/scsi/qla4xxx/ql4_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1138 drivers/scsi/qla4xxx/ql4_isr.c ha->isr_count++; ha 1147 drivers/scsi/qla4xxx/ql4_isr.c if (ha->isp_ops->rd_shdw_rsp_q_in(ha) != ha 1148 drivers/scsi/qla4xxx/ql4_isr.c ha->response_out) ha 1151 drivers/scsi/qla4xxx/ql4_isr.c intr_status = readl(&ha->reg->ctrl_status); ha 1156 drivers/scsi/qla4xxx/ql4_isr.c ha->spurious_int_count++; ha 1162 drivers/scsi/qla4xxx/ql4_isr.c "Status 0x%04x\n", ha->host_no, ha 1163 drivers/scsi/qla4xxx/ql4_isr.c readl(isp_port_error_status (ha)))); ha 1172 drivers/scsi/qla4xxx/ql4_isr.c if ((readl(&ha->reg->ctrl_status) & ha 1175 drivers/scsi/qla4xxx/ql4_isr.c &ha->reg->ctrl_status); ha 1176 drivers/scsi/qla4xxx/ql4_isr.c readl(&ha->reg->ctrl_status); ha 1180 drivers/scsi/qla4xxx/ql4_isr.c &ha->reg->ctrl_status); ha 1181 drivers/scsi/qla4xxx/ql4_isr.c readl(&ha->reg->ctrl_status); ha 1183 drivers/scsi/qla4xxx/ql4_isr.c __qla4xxx_disable_intrs(ha); ha 1185 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 1189 drivers/scsi/qla4xxx/ql4_isr.c clear_bit(AF_ONLINE, &ha->flags); ha 1190 drivers/scsi/qla4xxx/ql4_isr.c __qla4xxx_disable_intrs(ha); ha 1193 drivers/scsi/qla4xxx/ql4_isr.c &ha->reg->ctrl_status); ha 1194 drivers/scsi/qla4xxx/ql4_isr.c readl(&ha->reg->ctrl_status); ha 1196 drivers/scsi/qla4xxx/ql4_isr.c if (!test_bit(AF_HA_REMOVAL, &ha->flags)) ha 1197 drivers/scsi/qla4xxx/ql4_isr.c set_bit(DPC_RESET_HA_INTR, &ha->dpc_flags); ha 1201 drivers/scsi/qla4xxx/ql4_isr.c ha->isp_ops->interrupt_service_routine(ha, intr_status); ha 1202 drivers/scsi/qla4xxx/ql4_isr.c ha->total_io_count++; ha 1208 drivers/scsi/qla4xxx/ql4_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1220 drivers/scsi/qla4xxx/ql4_isr.c struct scsi_qla_host *ha = dev_id; ha 1226 drivers/scsi/qla4xxx/ql4_isr.c if (unlikely(pci_channel_offline(ha->pdev))) ha 1229 drivers/scsi/qla4xxx/ql4_isr.c ha->isr_count++; ha 1230 drivers/scsi/qla4xxx/ql4_isr.c status = qla4_82xx_rd_32(ha, ISR_INT_VECTOR); ha 1231 drivers/scsi/qla4xxx/ql4_isr.c if (!(status & ha->nx_legacy_intr.int_vec_bit)) ha 1234 drivers/scsi/qla4xxx/ql4_isr.c status = qla4_82xx_rd_32(ha, ISR_INT_STATE_REG); ha 1236 drivers/scsi/qla4xxx/ql4_isr.c DEBUG7(ql4_printk(KERN_INFO, ha, ha 1242 drivers/scsi/qla4xxx/ql4_isr.c qla4_82xx_wr_32(ha, ha->nx_legacy_intr.tgt_status_reg, 0xffffffff); ha 1245 drivers/scsi/qla4xxx/ql4_isr.c qla4_82xx_rd_32(ha, ISR_INT_VECTOR); ha 1246 drivers/scsi/qla4xxx/ql4_isr.c qla4_82xx_rd_32(ha, ISR_INT_VECTOR); ha 1248 drivers/scsi/qla4xxx/ql4_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1250 drivers/scsi/qla4xxx/ql4_isr.c if (!(readl(&ha->qla4_82xx_reg->host_int) & ha 1252 drivers/scsi/qla4xxx/ql4_isr.c qla4_82xx_spurious_interrupt(ha, reqs_count); ha 1255 drivers/scsi/qla4xxx/ql4_isr.c intr_status = readl(&ha->qla4_82xx_reg->host_status); ha 1258 drivers/scsi/qla4xxx/ql4_isr.c qla4_82xx_spurious_interrupt(ha, reqs_count); ha 1262 drivers/scsi/qla4xxx/ql4_isr.c ha->isp_ops->interrupt_service_routine(ha, intr_status); ha 1265 drivers/scsi/qla4xxx/ql4_isr.c qla4_82xx_wr_32(ha, ha->nx_legacy_intr.tgt_mask_reg, 0xfbff); ha 1271 drivers/scsi/qla4xxx/ql4_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1286 drivers/scsi/qla4xxx/ql4_isr.c struct scsi_qla_host *ha = dev_id; ha 1290 drivers/scsi/qla4xxx/ql4_isr.c ha->isr_count++; ha 1291 drivers/scsi/qla4xxx/ql4_isr.c leg_int_ptr = readl(&ha->qla4_83xx_reg->leg_int_ptr); ha 1295 drivers/scsi/qla4xxx/ql4_isr.c DEBUG7(ql4_printk(KERN_ERR, ha, ha 1302 drivers/scsi/qla4xxx/ql4_isr.c if ((leg_int_ptr & PF_BITS_MASK) != ha->pf_bit) { ha 1303 drivers/scsi/qla4xxx/ql4_isr.c DEBUG7(ql4_printk(KERN_ERR, ha, ha 1306 drivers/scsi/qla4xxx/ql4_isr.c ha->pf_bit)); ha 1314 drivers/scsi/qla4xxx/ql4_isr.c writel(0, &ha->qla4_83xx_reg->leg_int_trig); ha 1316 drivers/scsi/qla4xxx/ql4_isr.c leg_int_ptr = readl(&ha->qla4_83xx_reg->leg_int_ptr); ha 1317 drivers/scsi/qla4xxx/ql4_isr.c if ((leg_int_ptr & PF_BITS_MASK) != ha->pf_bit) ha 1321 drivers/scsi/qla4xxx/ql4_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1322 drivers/scsi/qla4xxx/ql4_isr.c leg_int_ptr = readl(&ha->qla4_83xx_reg->risc_intr); ha 1323 drivers/scsi/qla4xxx/ql4_isr.c ha->isp_ops->interrupt_service_routine(ha, leg_int_ptr); ha 1324 drivers/scsi/qla4xxx/ql4_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1332 drivers/scsi/qla4xxx/ql4_isr.c struct scsi_qla_host *ha; ha 1334 drivers/scsi/qla4xxx/ql4_isr.c ha = (struct scsi_qla_host *) dev_id; ha 1335 drivers/scsi/qla4xxx/ql4_isr.c if (!ha) { ha 1341 drivers/scsi/qla4xxx/ql4_isr.c ha->isr_count++; ha 1343 drivers/scsi/qla4xxx/ql4_isr.c qla4_82xx_wr_32(ha, ha->nx_legacy_intr.tgt_status_reg, 0xffffffff); ha 1346 drivers/scsi/qla4xxx/ql4_isr.c qla4_82xx_rd_32(ha, ISR_INT_VECTOR); ha 1347 drivers/scsi/qla4xxx/ql4_isr.c qla4_82xx_rd_32(ha, ISR_INT_VECTOR); ha 1354 drivers/scsi/qla4xxx/ql4_isr.c struct scsi_qla_host *ha = dev_id; ha 1358 drivers/scsi/qla4xxx/ql4_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1360 drivers/scsi/qla4xxx/ql4_isr.c ival = readl(&ha->qla4_83xx_reg->risc_intr); ha 1362 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_INFO, ha, ha 1365 drivers/scsi/qla4xxx/ql4_isr.c ival = readl(&ha->qla4_83xx_reg->mb_int_mask); ha 1367 drivers/scsi/qla4xxx/ql4_isr.c writel(ival, &ha->qla4_83xx_reg->mb_int_mask); ha 1371 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_isr_decode_mailbox(ha, ha 1372 drivers/scsi/qla4xxx/ql4_isr.c readl(&ha->qla4_83xx_reg->mailbox_out[0])); ha 1373 drivers/scsi/qla4xxx/ql4_isr.c writel(0, &ha->qla4_83xx_reg->risc_intr); ha 1374 drivers/scsi/qla4xxx/ql4_isr.c ival = readl(&ha->qla4_83xx_reg->mb_int_mask); ha 1376 drivers/scsi/qla4xxx/ql4_isr.c writel(ival, &ha->qla4_83xx_reg->mb_int_mask); ha 1377 drivers/scsi/qla4xxx/ql4_isr.c ha->isr_count++; ha 1379 drivers/scsi/qla4xxx/ql4_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1394 drivers/scsi/qla4xxx/ql4_isr.c struct scsi_qla_host *ha = dev_id; ha 1399 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 1402 drivers/scsi/qla4xxx/ql4_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1404 drivers/scsi/qla4xxx/ql4_isr.c if (!(readl(&ha->qla4_82xx_reg->host_int) & ha 1406 drivers/scsi/qla4xxx/ql4_isr.c qla4_82xx_spurious_interrupt(ha, reqs_count); ha 1410 drivers/scsi/qla4xxx/ql4_isr.c intr_status = readl(&ha->qla4_82xx_reg->host_status); ha 1413 drivers/scsi/qla4xxx/ql4_isr.c qla4_82xx_spurious_interrupt(ha, reqs_count); ha 1417 drivers/scsi/qla4xxx/ql4_isr.c ha->isp_ops->interrupt_service_routine(ha, intr_status); ha 1422 drivers/scsi/qla4xxx/ql4_isr.c ha->isr_count++; ha 1423 drivers/scsi/qla4xxx/ql4_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1431 drivers/scsi/qla4xxx/ql4_isr.c struct scsi_qla_host *ha = dev_id; ha 1436 drivers/scsi/qla4xxx/ql4_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1437 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 1438 drivers/scsi/qla4xxx/ql4_isr.c ival = readl(&ha->qla4_83xx_reg->iocb_int_mask); ha 1440 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_INFO, ha, "%s: It is a spurious iocb interrupt!\n", ha 1444 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_process_response_queue(ha); ha 1445 drivers/scsi/qla4xxx/ql4_isr.c writel(0, &ha->qla4_83xx_reg->iocb_int_mask); ha 1447 drivers/scsi/qla4xxx/ql4_isr.c intr_status = readl(&ha->qla4_82xx_reg->host_status); ha 1449 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_process_response_queue(ha); ha 1450 drivers/scsi/qla4xxx/ql4_isr.c writel(0, &ha->qla4_82xx_reg->host_int); ha 1452 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_INFO, ha, "%s: spurious iocb interrupt...\n", ha 1457 drivers/scsi/qla4xxx/ql4_isr.c ha->isr_count++; ha 1459 drivers/scsi/qla4xxx/ql4_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1474 drivers/scsi/qla4xxx/ql4_isr.c void qla4xxx_process_aen(struct scsi_qla_host * ha, uint8_t process_aen) ha 1481 drivers/scsi/qla4xxx/ql4_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1482 drivers/scsi/qla4xxx/ql4_isr.c while (ha->aen_out != ha->aen_in) { ha 1483 drivers/scsi/qla4xxx/ql4_isr.c aen = &ha->aen_q[ha->aen_out]; ha 1488 drivers/scsi/qla4xxx/ql4_isr.c ha->aen_q_count++; ha 1489 drivers/scsi/qla4xxx/ql4_isr.c ha->aen_out++; ha 1491 drivers/scsi/qla4xxx/ql4_isr.c if (ha->aen_out == MAX_AEN_ENTRIES) ha 1492 drivers/scsi/qla4xxx/ql4_isr.c ha->aen_out = 0; ha 1494 drivers/scsi/qla4xxx/ql4_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1497 drivers/scsi/qla4xxx/ql4_isr.c " mbx3=0x%08x mbx4=0x%08x\n", ha->host_no, ha 1498 drivers/scsi/qla4xxx/ql4_isr.c (ha->aen_out ? (ha->aen_out-1): (MAX_AEN_ENTRIES-1)), ha 1508 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, ha->aen_out, ha 1516 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_process_ddb_changed(ha, ha 1522 drivers/scsi/qla4xxx/ql4_isr.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1524 drivers/scsi/qla4xxx/ql4_isr.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1527 drivers/scsi/qla4xxx/ql4_isr.c int qla4xxx_request_irqs(struct scsi_qla_host *ha) ha 1532 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla40XX(ha)) ha 1537 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 1538 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_INFO, ha, "%s: MSI Interrupts not supported for ISP%04x, Falling back-to INTx mode\n", ha 1539 drivers/scsi/qla4xxx/ql4_isr.c __func__, ha->pdev->device); ha 1549 drivers/scsi/qla4xxx/ql4_isr.c ret = qla4_8xxx_enable_msix(ha); ha 1551 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1552 drivers/scsi/qla4xxx/ql4_isr.c "MSI-X: Enabled (0x%X).\n", ha->revision_id)); ha 1555 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 1556 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_INFO, ha, "%s: ISP%04x: MSI-X: Falling back-to INTx mode. ret = %d\n", ha 1557 drivers/scsi/qla4xxx/ql4_isr.c __func__, ha->pdev->device, ret); ha 1562 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_WARNING, ha, ha 1567 drivers/scsi/qla4xxx/ql4_isr.c ret = pci_alloc_irq_vectors(ha->pdev, 1, 1, PCI_IRQ_MSI); ha 1569 drivers/scsi/qla4xxx/ql4_isr.c ret = request_irq(ha->pdev->irq, qla4_8xxx_msi_handler, ha 1570 drivers/scsi/qla4xxx/ql4_isr.c 0, DRIVER_NAME, ha); ha 1572 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, "MSI: Enabled.\n")); ha 1575 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_WARNING, ha, ha 1577 drivers/scsi/qla4xxx/ql4_isr.c "already in use.\n", ha->pdev->irq); ha 1578 drivers/scsi/qla4xxx/ql4_isr.c pci_free_irq_vectors(ha->pdev); ha 1583 drivers/scsi/qla4xxx/ql4_isr.c if (is_qla8022(ha)) { ha 1584 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_WARNING, ha, "%s: ISP82xx Legacy interrupt not supported\n", ha 1590 drivers/scsi/qla4xxx/ql4_isr.c ret = request_irq(ha->pdev->irq, ha->isp_ops->intr_handler, ha 1591 drivers/scsi/qla4xxx/ql4_isr.c IRQF_SHARED, DRIVER_NAME, ha); ha 1593 drivers/scsi/qla4xxx/ql4_isr.c DEBUG2(ql4_printk(KERN_INFO, ha, "INTx: Enabled.\n")); ha 1597 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_WARNING, ha, ha 1599 drivers/scsi/qla4xxx/ql4_isr.c " use.\n", ha->pdev->irq); ha 1604 drivers/scsi/qla4xxx/ql4_isr.c set_bit(AF_IRQ_ATTACHED, &ha->flags); ha 1605 drivers/scsi/qla4xxx/ql4_isr.c ha->host->irq = ha->pdev->irq; ha 1606 drivers/scsi/qla4xxx/ql4_isr.c ql4_printk(KERN_INFO, ha, "%s: irq %d attached\n", ha 1607 drivers/scsi/qla4xxx/ql4_isr.c __func__, ha->pdev->irq); ha 1613 drivers/scsi/qla4xxx/ql4_isr.c void qla4xxx_free_irqs(struct scsi_qla_host *ha) ha 1615 drivers/scsi/qla4xxx/ql4_isr.c if (!test_and_clear_bit(AF_IRQ_ATTACHED, &ha->flags)) ha 1618 drivers/scsi/qla4xxx/ql4_isr.c if (ha->pdev->msix_enabled) ha 1619 drivers/scsi/qla4xxx/ql4_isr.c free_irq(pci_irq_vector(ha->pdev, 1), ha); ha 1620 drivers/scsi/qla4xxx/ql4_isr.c free_irq(pci_irq_vector(ha->pdev, 0), ha); ha 1621 drivers/scsi/qla4xxx/ql4_isr.c pci_free_irq_vectors(ha->pdev); ha 15 drivers/scsi/qla4xxx/ql4_mbx.c void qla4xxx_queue_mbox_cmd(struct scsi_qla_host *ha, uint32_t *mbx_cmd, ha 22 drivers/scsi/qla4xxx/ql4_mbx.c writel(mbx_cmd[i], &ha->reg->mailbox[i]); ha 25 drivers/scsi/qla4xxx/ql4_mbx.c writel(mbx_cmd[0], &ha->reg->mailbox[0]); ha 26 drivers/scsi/qla4xxx/ql4_mbx.c readl(&ha->reg->mailbox[0]); ha 27 drivers/scsi/qla4xxx/ql4_mbx.c writel(set_rmask(CSR_INTR_RISC), &ha->reg->ctrl_status); ha 28 drivers/scsi/qla4xxx/ql4_mbx.c readl(&ha->reg->ctrl_status); ha 31 drivers/scsi/qla4xxx/ql4_mbx.c void qla4xxx_process_mbox_intr(struct scsi_qla_host *ha, int out_count) ha 35 drivers/scsi/qla4xxx/ql4_mbx.c intr_status = readl(&ha->reg->ctrl_status); ha 42 drivers/scsi/qla4xxx/ql4_mbx.c ha->mbox_status_count = out_count; ha 43 drivers/scsi/qla4xxx/ql4_mbx.c ha->isp_ops->interrupt_service_routine(ha, intr_status); ha 52 drivers/scsi/qla4xxx/ql4_mbx.c static int qla4xxx_is_intr_poll_mode(struct scsi_qla_host *ha) ha 56 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 57 drivers/scsi/qla4xxx/ql4_mbx.c if (test_bit(AF_IRQ_ATTACHED, &ha->flags) && ha 58 drivers/scsi/qla4xxx/ql4_mbx.c test_bit(AF_83XX_MBOX_INTR_ON, &ha->flags)) ha 61 drivers/scsi/qla4xxx/ql4_mbx.c if (test_bit(AF_IRQ_ATTACHED, &ha->flags) && ha 62 drivers/scsi/qla4xxx/ql4_mbx.c test_bit(AF_INTERRUPTS_ON, &ha->flags) && ha 63 drivers/scsi/qla4xxx/ql4_mbx.c test_bit(AF_ONLINE, &ha->flags) && ha 64 drivers/scsi/qla4xxx/ql4_mbx.c !test_bit(AF_HA_REMOVAL, &ha->flags)) ha 83 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount, ha 96 drivers/scsi/qla4xxx/ql4_mbx.c "pointer\n", ha->host_no, __func__)); ha 100 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla40XX(ha)) { ha 101 drivers/scsi/qla4xxx/ql4_mbx.c if (test_bit(AF_HA_REMOVAL, &ha->flags)) { ha 102 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: " ha 105 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__)); ha 110 drivers/scsi/qla4xxx/ql4_mbx.c if ((is_aer_supported(ha)) && ha 111 drivers/scsi/qla4xxx/ql4_mbx.c (test_bit(AF_PCI_CHANNEL_IO_PERM_FAILURE, &ha->flags))) { ha 113 drivers/scsi/qla4xxx/ql4_mbx.c "timeout MBX Exiting.\n", ha->host_no, __func__)); ha 121 drivers/scsi/qla4xxx/ql4_mbx.c mutex_lock(&ha->mbox_sem); ha 122 drivers/scsi/qla4xxx/ql4_mbx.c if (!test_bit(AF_MBOX_COMMAND, &ha->flags)) { ha 123 drivers/scsi/qla4xxx/ql4_mbx.c set_bit(AF_MBOX_COMMAND, &ha->flags); ha 124 drivers/scsi/qla4xxx/ql4_mbx.c mutex_unlock(&ha->mbox_sem); ha 127 drivers/scsi/qla4xxx/ql4_mbx.c mutex_unlock(&ha->mbox_sem); ha 130 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__)); ha 136 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla80XX(ha)) { ha 137 drivers/scsi/qla4xxx/ql4_mbx.c if (test_bit(AF_FW_RECOVERY, &ha->flags)) { ha 138 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_WARNING, ha, ha 140 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__)); ha 144 drivers/scsi/qla4xxx/ql4_mbx.c ha->isp_ops->idc_lock(ha); ha 145 drivers/scsi/qla4xxx/ql4_mbx.c dev_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DEV_STATE); ha 146 drivers/scsi/qla4xxx/ql4_mbx.c ha->isp_ops->idc_unlock(ha); ha 148 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_WARNING, ha, ha 150 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__); ha 155 drivers/scsi/qla4xxx/ql4_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 157 drivers/scsi/qla4xxx/ql4_mbx.c ha->mbox_status_count = outCount; ha 159 drivers/scsi/qla4xxx/ql4_mbx.c ha->mbox_status[i] = 0; ha 162 drivers/scsi/qla4xxx/ql4_mbx.c ha->isp_ops->queue_mailbox_command(ha, mbx_cmd, inCount); ha 164 drivers/scsi/qla4xxx/ql4_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 181 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_is_intr_poll_mode(ha)) { ha 184 drivers/scsi/qla4xxx/ql4_mbx.c while (test_bit(AF_MBOX_COMMAND_DONE, &ha->flags) == 0) { ha 193 drivers/scsi/qla4xxx/ql4_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 194 drivers/scsi/qla4xxx/ql4_mbx.c ha->isp_ops->process_mailbox_interrupt(ha, outCount); ha 195 drivers/scsi/qla4xxx/ql4_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 200 drivers/scsi/qla4xxx/ql4_mbx.c set_bit(AF_MBOX_COMMAND_NOPOLL, &ha->flags); ha 201 drivers/scsi/qla4xxx/ql4_mbx.c wait_for_completion_timeout(&ha->mbx_intr_comp, MBOX_TOV * HZ); ha 202 drivers/scsi/qla4xxx/ql4_mbx.c clear_bit(AF_MBOX_COMMAND_NOPOLL, &ha->flags); ha 206 drivers/scsi/qla4xxx/ql4_mbx.c if (!test_bit(AF_MBOX_COMMAND_DONE, &ha->flags)) { ha 207 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla80XX(ha) && ha 208 drivers/scsi/qla4xxx/ql4_mbx.c test_bit(AF_FW_RECOVERY, &ha->flags)) { ha 209 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 212 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__)); ha 215 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_WARNING, ha, "scsi%ld: Mailbox Cmd 0x%08X timed out, Scheduling Adapter Reset\n", ha 216 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, mbx_cmd[0]); ha 217 drivers/scsi/qla4xxx/ql4_mbx.c ha->mailbox_timeout_count++; ha 219 drivers/scsi/qla4xxx/ql4_mbx.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 220 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla8022(ha)) { ha 221 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_INFO, ha, ha 223 drivers/scsi/qla4xxx/ql4_mbx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x98, ha 226 drivers/scsi/qla4xxx/ql4_mbx.c } else if (is_qla8032(ha) || is_qla8042(ha)) { ha 227 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_INFO, ha, " %s: disabling pause transmit on port 0 & 1.\n", ha 229 drivers/scsi/qla4xxx/ql4_mbx.c qla4_83xx_disable_pause(ha); ha 238 drivers/scsi/qla4xxx/ql4_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 240 drivers/scsi/qla4xxx/ql4_mbx.c mbx_sts[i] = ha->mbox_status[i]; ha 243 drivers/scsi/qla4xxx/ql4_mbx.c switch (ha->mbox_status[0]) { ha 253 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: Cmd = %08X, ISP BUSY\n", ha 254 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__, mbx_cmd[0]); ha 255 drivers/scsi/qla4xxx/ql4_mbx.c ha->mailbox_timeout_count++; ha 259 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: FAILED, MBOX CMD = %08X, MBOX STS = %08X %08X %08X %08X %08X %08X %08X %08X\n", ha 260 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__, mbx_cmd[0], mbx_sts[0], ha 265 drivers/scsi/qla4xxx/ql4_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 268 drivers/scsi/qla4xxx/ql4_mbx.c mutex_lock(&ha->mbox_sem); ha 269 drivers/scsi/qla4xxx/ql4_mbx.c clear_bit(AF_MBOX_COMMAND, &ha->flags); ha 270 drivers/scsi/qla4xxx/ql4_mbx.c mutex_unlock(&ha->mbox_sem); ha 271 drivers/scsi/qla4xxx/ql4_mbx.c clear_bit(AF_MBOX_COMMAND_DONE, &ha->flags); ha 284 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_minidump_template(struct scsi_qla_host *ha, ha 298 drivers/scsi/qla4xxx/ql4_mbx.c mbox_cmd[4] = ha->fw_dump_tmplt_size; ha 301 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 2, &mbox_cmd[0], ha 304 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 306 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__, mbox_cmd[0], ha 316 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_req_template_size(struct scsi_qla_host *ha) ha 328 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 8, &mbox_cmd[0], ha 331 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_dump_tmplt_size = mbox_sts[1]; ha 332 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 337 drivers/scsi/qla4xxx/ql4_mbx.c if (ha->fw_dump_tmplt_size == 0) ha 340 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_WARNING, ha, ha 349 drivers/scsi/qla4xxx/ql4_mbx.c void qla4xxx_mailbox_premature_completion(struct scsi_qla_host *ha) ha 351 drivers/scsi/qla4xxx/ql4_mbx.c set_bit(AF_FW_RECOVERY, &ha->flags); ha 352 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: set FW RECOVERY!\n", ha 353 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__); ha 355 drivers/scsi/qla4xxx/ql4_mbx.c if (test_bit(AF_MBOX_COMMAND, &ha->flags)) { ha 356 drivers/scsi/qla4xxx/ql4_mbx.c if (test_bit(AF_MBOX_COMMAND_NOPOLL, &ha->flags)) { ha 357 drivers/scsi/qla4xxx/ql4_mbx.c complete(&ha->mbx_intr_comp); ha 358 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: Due to fw " ha 360 drivers/scsi/qla4xxx/ql4_mbx.c "mbx cmd\n", ha->host_no, __func__); ha 363 drivers/scsi/qla4xxx/ql4_mbx.c set_bit(AF_MBOX_COMMAND_DONE, &ha->flags); ha 364 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: Due to fw " ha 366 drivers/scsi/qla4xxx/ql4_mbx.c "polling mbx cmd\n", ha->host_no, __func__); ha 372 drivers/scsi/qla4xxx/ql4_mbx.c qla4xxx_set_ifcb(struct scsi_qla_host *ha, uint32_t *mbox_cmd, ha 378 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla8022(ha)) ha 379 drivers/scsi/qla4xxx/ql4_mbx.c qla4_82xx_wr_32(ha, ha->nx_db_wr_ptr, 0); ha 387 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_mailbox_command(ha, 6, 6, mbox_cmd, mbox_sts) != ha 392 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__, mbox_sts[0])); ha 399 drivers/scsi/qla4xxx/ql4_mbx.c qla4xxx_get_ifcb(struct scsi_qla_host *ha, uint32_t *mbox_cmd, ha 409 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_mailbox_command(ha, 5, 5, mbox_cmd, mbox_sts) != ha 414 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__, mbox_sts[0])); ha 453 drivers/scsi/qla4xxx/ql4_mbx.c qla4xxx_update_local_ip(struct scsi_qla_host *ha, ha 456 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.tcp_options = le16_to_cpu(init_fw_cb->ipv4_tcp_opts); ha 457 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv4_options = le16_to_cpu(init_fw_cb->ipv4_ip_opts); ha 458 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv4_addr_state = ha 460 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.eth_mtu_size = ha 462 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv4_port = le16_to_cpu(init_fw_cb->ipv4_port); ha 464 drivers/scsi/qla4xxx/ql4_mbx.c if (ha->acb_version == ACB_SUPPORTED) { ha 465 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_options = le16_to_cpu(init_fw_cb->ipv6_opts); ha 466 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_addl_options = ha 468 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_tcp_options = ha 473 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(ha->ip_config.ip_address, init_fw_cb->ipv4_addr, ha 474 drivers/scsi/qla4xxx/ql4_mbx.c min(sizeof(ha->ip_config.ip_address), ha 476 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(ha->ip_config.subnet_mask, init_fw_cb->ipv4_subnet, ha 477 drivers/scsi/qla4xxx/ql4_mbx.c min(sizeof(ha->ip_config.subnet_mask), ha 479 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(ha->ip_config.gateway, init_fw_cb->ipv4_gw_addr, ha 480 drivers/scsi/qla4xxx/ql4_mbx.c min(sizeof(ha->ip_config.gateway), ha 483 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv4_vlan_tag = be16_to_cpu(init_fw_cb->ipv4_vlan_tag); ha 484 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.control = init_fw_cb->control; ha 485 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.tcp_wsf = init_fw_cb->ipv4_tcp_wsf; ha 486 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv4_tos = init_fw_cb->ipv4_tos; ha 487 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv4_cache_id = init_fw_cb->ipv4_cacheid; ha 488 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv4_alt_cid_len = init_fw_cb->ipv4_dhcp_alt_cid_len; ha 489 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(ha->ip_config.ipv4_alt_cid, init_fw_cb->ipv4_dhcp_alt_cid, ha 490 drivers/scsi/qla4xxx/ql4_mbx.c min(sizeof(ha->ip_config.ipv4_alt_cid), ha 492 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv4_vid_len = init_fw_cb->ipv4_dhcp_vid_len; ha 493 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(ha->ip_config.ipv4_vid, init_fw_cb->ipv4_dhcp_vid, ha 494 drivers/scsi/qla4xxx/ql4_mbx.c min(sizeof(ha->ip_config.ipv4_vid), ha 496 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv4_ttl = init_fw_cb->ipv4_ttl; ha 497 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.def_timeout = le16_to_cpu(init_fw_cb->def_timeout); ha 498 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.abort_timer = init_fw_cb->abort_timer; ha 499 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.iscsi_options = le16_to_cpu(init_fw_cb->iscsi_opts); ha 500 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.iscsi_max_pdu_size = ha 502 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.iscsi_first_burst_len = ha 504 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.iscsi_max_outstnd_r2t = ha 506 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.iscsi_max_burst_len = ha 508 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(ha->ip_config.iscsi_name, init_fw_cb->iscsi_name, ha 509 drivers/scsi/qla4xxx/ql4_mbx.c min(sizeof(ha->ip_config.iscsi_name), ha 512 drivers/scsi/qla4xxx/ql4_mbx.c if (is_ipv6_enabled(ha)) { ha 514 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_link_local_state = ha 516 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_addr0_state = ha 518 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_addr1_state = ha 523 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_default_router_state = ha 527 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_default_router_state = ha 531 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_default_router_state = ha 535 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_default_router_state = ha 539 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_default_router_state = ha 543 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_link_local_addr.in6_u.u6_addr8[0] = 0xFE; ha 544 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_link_local_addr.in6_u.u6_addr8[1] = 0x80; ha 546 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(&ha->ip_config.ipv6_link_local_addr.in6_u.u6_addr8[8], ha 548 drivers/scsi/qla4xxx/ql4_mbx.c min(sizeof(ha->ip_config.ipv6_link_local_addr)/2, ha 550 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(&ha->ip_config.ipv6_addr0, init_fw_cb->ipv6_addr0, ha 551 drivers/scsi/qla4xxx/ql4_mbx.c min(sizeof(ha->ip_config.ipv6_addr0), ha 553 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(&ha->ip_config.ipv6_addr1, init_fw_cb->ipv6_addr1, ha 554 drivers/scsi/qla4xxx/ql4_mbx.c min(sizeof(ha->ip_config.ipv6_addr1), ha 556 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(&ha->ip_config.ipv6_default_router_addr, ha 558 drivers/scsi/qla4xxx/ql4_mbx.c min(sizeof(ha->ip_config.ipv6_default_router_addr), ha 560 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_vlan_tag = ha 562 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_port = le16_to_cpu(init_fw_cb->ipv6_port); ha 563 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_cache_id = init_fw_cb->ipv6_cache_id; ha 564 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_flow_lbl = ha 566 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_traffic_class = ha 568 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_hop_limit = init_fw_cb->ipv6_hop_limit; ha 569 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_nd_reach_time = ha 571 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_nd_rexmit_timer = ha 573 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_nd_stale_timeout = ha 575 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_dup_addr_detect_count = ha 577 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_gw_advrt_mtu = ha 579 drivers/scsi/qla4xxx/ql4_mbx.c ha->ip_config.ipv6_tcp_wsf = init_fw_cb->ipv6_tcp_wsf; ha 584 drivers/scsi/qla4xxx/ql4_mbx.c qla4xxx_update_local_ifcb(struct scsi_qla_host *ha, ha 590 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_get_ifcb(ha, mbox_cmd, mbox_sts, init_fw_cb_dma) ha 594 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__)); ha 601 drivers/scsi/qla4xxx/ql4_mbx.c ha->acb_version = init_fw_cb->acb_version; ha 602 drivers/scsi/qla4xxx/ql4_mbx.c ha->firmware_options = le16_to_cpu(init_fw_cb->fw_options); ha 603 drivers/scsi/qla4xxx/ql4_mbx.c ha->heartbeat_interval = init_fw_cb->hb_interval; ha 604 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(ha->name_string, init_fw_cb->iscsi_name, ha 605 drivers/scsi/qla4xxx/ql4_mbx.c min(sizeof(ha->name_string), ha 607 drivers/scsi/qla4xxx/ql4_mbx.c ha->def_timeout = le16_to_cpu(init_fw_cb->def_timeout); ha 611 drivers/scsi/qla4xxx/ql4_mbx.c qla4xxx_update_local_ip(ha, init_fw_cb); ha 620 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_initialize_fw_cb(struct scsi_qla_host * ha) ha 628 drivers/scsi/qla4xxx/ql4_mbx.c init_fw_cb = dma_alloc_coherent(&ha->pdev->dev, ha 633 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__)); ha 641 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_get_ifcb(ha, &mbox_cmd[0], &mbox_sts[0], init_fw_cb_dma) != ha 647 drivers/scsi/qla4xxx/ql4_mbx.c init_fw_cb->rqq_consumer_idx = cpu_to_le16(ha->request_out); ha 648 drivers/scsi/qla4xxx/ql4_mbx.c init_fw_cb->compq_producer_idx = cpu_to_le16(ha->response_in); ha 651 drivers/scsi/qla4xxx/ql4_mbx.c init_fw_cb->rqq_addr_lo = cpu_to_le32(LSDW(ha->request_dma)); ha 652 drivers/scsi/qla4xxx/ql4_mbx.c init_fw_cb->rqq_addr_hi = cpu_to_le32(MSDW(ha->request_dma)); ha 653 drivers/scsi/qla4xxx/ql4_mbx.c init_fw_cb->compq_addr_lo = cpu_to_le32(LSDW(ha->response_dma)); ha 654 drivers/scsi/qla4xxx/ql4_mbx.c init_fw_cb->compq_addr_hi = cpu_to_le32(MSDW(ha->response_dma)); ha 655 drivers/scsi/qla4xxx/ql4_mbx.c init_fw_cb->shdwreg_addr_lo = cpu_to_le32(LSDW(ha->shadow_regs_dma)); ha 656 drivers/scsi/qla4xxx/ql4_mbx.c init_fw_cb->shdwreg_addr_hi = cpu_to_le32(MSDW(ha->shadow_regs_dma)); ha 663 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla80XX(ha)) ha 675 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_set_ifcb(ha, &mbox_cmd[0], &mbox_sts[0], init_fw_cb_dma) ha 679 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__)); ha 683 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_update_local_ifcb(ha, &mbox_cmd[0], &mbox_sts[0], ha 686 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__)); ha 692 drivers/scsi/qla4xxx/ql4_mbx.c dma_free_coherent(&ha->pdev->dev, sizeof(struct addr_ctrl_blk), ha 702 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_dhcp_ip_address(struct scsi_qla_host * ha) ha 709 drivers/scsi/qla4xxx/ql4_mbx.c init_fw_cb = dma_alloc_coherent(&ha->pdev->dev, ha 713 drivers/scsi/qla4xxx/ql4_mbx.c printk("scsi%ld: %s: Unable to alloc init_cb\n", ha->host_no, ha 719 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_get_ifcb(ha, &mbox_cmd[0], &mbox_sts[0], init_fw_cb_dma) != ha 722 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__)); ha 723 drivers/scsi/qla4xxx/ql4_mbx.c dma_free_coherent(&ha->pdev->dev, ha 730 drivers/scsi/qla4xxx/ql4_mbx.c qla4xxx_update_local_ip(ha, init_fw_cb); ha 731 drivers/scsi/qla4xxx/ql4_mbx.c dma_free_coherent(&ha->pdev->dev, sizeof(struct addr_ctrl_blk), ha 741 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_firmware_state(struct scsi_qla_host * ha) ha 752 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 4, &mbox_cmd[0], &mbox_sts[0]) != ha 755 drivers/scsi/qla4xxx/ql4_mbx.c "status %04X\n", ha->host_no, __func__, ha 759 drivers/scsi/qla4xxx/ql4_mbx.c ha->firmware_state = mbox_sts[1]; ha 760 drivers/scsi/qla4xxx/ql4_mbx.c ha->board_id = mbox_sts[2]; ha 761 drivers/scsi/qla4xxx/ql4_mbx.c ha->addl_fw_state = mbox_sts[3]; ha 763 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__, ha->firmware_state);) ha 772 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_firmware_status(struct scsi_qla_host * ha) ha 783 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 3, &mbox_cmd[0], &mbox_sts[0]) != ha 786 drivers/scsi/qla4xxx/ql4_mbx.c "status %04X\n", ha->host_no, __func__, ha 792 drivers/scsi/qla4xxx/ql4_mbx.c ha->iocb_hiwat = mbox_sts[2]; ha 793 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 795 drivers/scsi/qla4xxx/ql4_mbx.c ha->iocb_hiwat)); ha 797 drivers/scsi/qla4xxx/ql4_mbx.c if (ha->iocb_hiwat > IOCB_HIWAT_CUSHION) ha 798 drivers/scsi/qla4xxx/ql4_mbx.c ha->iocb_hiwat -= IOCB_HIWAT_CUSHION; ha 803 drivers/scsi/qla4xxx/ql4_mbx.c if (ha->iocb_hiwat == 0) { ha 804 drivers/scsi/qla4xxx/ql4_mbx.c ha->iocb_hiwat = REQUEST_QUEUE_DEPTH / 4; ha 805 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_WARNING, ha, ha 807 drivers/scsi/qla4xxx/ql4_mbx.c ha->iocb_hiwat)); ha 822 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_fwddb_entry(struct scsi_qla_host *ha, ha 841 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__, fw_ddb_index)); ha 855 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 7, &mbox_cmd[0], &mbox_sts[0]) == ha 858 drivers/scsi/qla4xxx/ql4_mbx.c " with status 0x%04X\n", ha->host_no, __func__, ha 864 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__, fw_ddb_index, ha 871 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_INFO, ha, "%s: DDB[%d] MB0 %04x Tot %d " ha 880 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_INFO, ha, "%s: DDB[%d] MB0 %04x Tot %d " ha 916 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_conn_open(struct scsi_qla_host *ha, uint16_t fw_ddb_index) ha 928 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 2, &mbox_cmd[0], ha 930 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 946 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index, ha 965 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 5, &mbox_cmd[0], ha 970 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__, status, mbox_sts[0], mbox_sts[4]);) ha 975 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_session_logout_ddb(struct scsi_qla_host *ha, ha 989 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 2, &mbox_cmd[0], ha 992 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1011 drivers/scsi/qla4xxx/ql4_mbx.c void qla4xxx_get_crash_record(struct scsi_qla_host * ha) ha 1025 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 5, &mbox_cmd[0], &mbox_sts[0]) != ha 1028 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__)); ha 1034 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__)); ha 1039 drivers/scsi/qla4xxx/ql4_mbx.c crash_record = dma_alloc_coherent(&ha->pdev->dev, crash_record_size, ha 1053 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 5, &mbox_cmd[0], &mbox_sts[0]) != ha 1061 drivers/scsi/qla4xxx/ql4_mbx.c dma_free_coherent(&ha->pdev->dev, crash_record_size, ha 1069 drivers/scsi/qla4xxx/ql4_mbx.c void qla4xxx_get_conn_event_log(struct scsi_qla_host * ha) ha 1087 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 5, &mbox_cmd[0], &mbox_sts[0]) != ha 1096 drivers/scsi/qla4xxx/ql4_mbx.c event_log = dma_alloc_coherent(&ha->pdev->dev, event_log_size, ha 1109 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 5, &mbox_cmd[0], &mbox_sts[0]) != ha 1112 drivers/scsi/qla4xxx/ql4_mbx.c "log!\n", ha->host_no, __func__)); ha 1126 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, num_valid_entries)); ha 1155 drivers/scsi/qla4xxx/ql4_mbx.c dma_free_coherent(&ha->pdev->dev, event_log_size, event_log, ha 1168 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_abort_task(struct scsi_qla_host *ha, struct srb *srb) ha 1184 drivers/scsi/qla4xxx/ql4_mbx.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 1186 drivers/scsi/qla4xxx/ql4_mbx.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 1198 drivers/scsi/qla4xxx/ql4_mbx.c qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 5, &mbox_cmd[0], ha 1205 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, cmd->device->id, cmd->device->lun, mbox_sts[0], ha 1222 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_reset_lun(struct scsi_qla_host * ha, struct ddb_entry * ddb_entry, ha 1230 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(printk("scsi%ld:%d:%llu: lun reset issued\n", ha->host_no, ha 1251 drivers/scsi/qla4xxx/ql4_mbx.c qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, &mbox_cmd[0], &mbox_sts[0]); ha 1269 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_reset_target(struct scsi_qla_host *ha, ha 1276 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(printk("scsi%ld:%d: target reset issued\n", ha->host_no, ha 1290 drivers/scsi/qla4xxx/ql4_mbx.c qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, &mbox_cmd[0], ha 1299 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_flash(struct scsi_qla_host * ha, dma_addr_t dma_addr, ha 1314 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 2, &mbox_cmd[0], &mbox_sts[0]) != ha 1317 drivers/scsi/qla4xxx/ql4_mbx.c "status %04X %04X, offset %08x, len %08x\n", ha->host_no, ha 1332 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_about_firmware(struct scsi_qla_host *ha) ha 1340 drivers/scsi/qla4xxx/ql4_mbx.c about_fw = dma_alloc_coherent(&ha->pdev->dev, ha 1344 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_ERR, ha, "%s: Unable to alloc memory " ha 1357 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, MBOX_REG_COUNT, ha 1360 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_WARNING, ha, "%s: MBOX_CMD_ABOUT_FW " ha 1367 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_info.fw_major = le16_to_cpu(about_fw->fw_major); ha 1368 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_info.fw_minor = le16_to_cpu(about_fw->fw_minor); ha 1369 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_info.fw_patch = le16_to_cpu(about_fw->fw_patch); ha 1370 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_info.fw_build = le16_to_cpu(about_fw->fw_build); ha 1371 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(ha->fw_info.fw_build_date, about_fw->fw_build_date, ha 1373 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(ha->fw_info.fw_build_time, about_fw->fw_build_time, ha 1375 drivers/scsi/qla4xxx/ql4_mbx.c strcpy((char *)ha->fw_info.fw_build_user, ha 1377 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_info.fw_load_source = le16_to_cpu(about_fw->fw_load_source); ha 1378 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_info.iscsi_major = le16_to_cpu(about_fw->iscsi_major); ha 1379 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_info.iscsi_minor = le16_to_cpu(about_fw->iscsi_minor); ha 1380 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_info.bootload_major = le16_to_cpu(about_fw->bootload_major); ha 1381 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_info.bootload_minor = le16_to_cpu(about_fw->bootload_minor); ha 1382 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_info.bootload_patch = le16_to_cpu(about_fw->bootload_patch); ha 1383 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_info.bootload_build = le16_to_cpu(about_fw->bootload_build); ha 1384 drivers/scsi/qla4xxx/ql4_mbx.c strcpy((char *)ha->fw_info.extended_timestamp, ha 1387 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_uptime_secs = le32_to_cpu(mbox_sts[5]); ha 1388 drivers/scsi/qla4xxx/ql4_mbx.c ha->fw_uptime_msecs = le32_to_cpu(mbox_sts[6]); ha 1392 drivers/scsi/qla4xxx/ql4_mbx.c dma_free_coherent(&ha->pdev->dev, sizeof(struct about_fw_info), ha 1397 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_default_ddb(struct scsi_qla_host *ha, uint32_t options, ha 1411 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, &mbox_cmd[0], &mbox_sts[0]) != ha 1414 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__, mbox_sts[0])); ha 1420 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_req_ddb_entry(struct scsi_qla_host *ha, uint32_t ddb_index, ha 1433 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, &mbox_cmd[0], ha 1436 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_ERR, ha, "%s: failed status %04X\n", ha 1444 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_clear_ddb_entry(struct scsi_qla_host *ha, uint32_t ddb_index) ha 1456 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, 2, 1, &mbox_cmd[0], ha 1459 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_ERR, ha, "%s: failed status %04X\n", ha 1466 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_set_flash(struct scsi_qla_host *ha, dma_addr_t dma_addr, ha 1483 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, 6, 2, &mbox_cmd[0], &mbox_sts[0]); ha 1485 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_WARNING, ha, "%s: MBOX_CMD_WRITE_FLASH " ha 1492 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_bootdb_by_index(struct scsi_qla_host *ha, ha 1506 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 1512 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_get_flash(ha, fw_ddb_entry_dma, dev_db_start_offset, ha 1514 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "scsi%ld: %s: Get Flash" ha 1515 drivers/scsi/qla4xxx/ql4_mbx.c "failed\n", ha->host_no, __func__); ha 1526 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_flashdb_by_index(struct scsi_qla_host *ha, ha 1536 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla40XX(ha)) { ha 1541 drivers/scsi/qla4xxx/ql4_mbx.c (ha->hw.flt_region_ddb << 2); ha 1545 drivers/scsi/qla4xxx/ql4_mbx.c if (ha->port_num == 1) ha 1546 drivers/scsi/qla4xxx/ql4_mbx.c dev_db_start_offset += (ha->hw.flt_ddb_size / 2); ha 1549 drivers/scsi/qla4xxx/ql4_mbx.c (ha->hw.flt_ddb_size / 2); ha 1555 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 1561 drivers/scsi/qla4xxx/ql4_mbx.c if (qla4xxx_get_flash(ha, fw_ddb_entry_dma, dev_db_start_offset, ha 1563 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "scsi%ld: %s: Get Flash failed\n", ha 1564 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__); ha 1575 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_chap(struct scsi_qla_host *ha, char *username, char *password, ha 1584 drivers/scsi/qla4xxx/ql4_mbx.c chap_table = dma_pool_zalloc(ha->chap_dma_pool, GFP_KERNEL, &chap_dma); ha 1590 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla40XX(ha)) ha 1593 drivers/scsi/qla4xxx/ql4_mbx.c offset = FLASH_RAW_ACCESS_ADDR + (ha->hw.flt_region_chap << 2); ha 1597 drivers/scsi/qla4xxx/ql4_mbx.c if (ha->port_num == 1) ha 1598 drivers/scsi/qla4xxx/ql4_mbx.c offset += (ha->hw.flt_chap_size / 2); ha 1602 drivers/scsi/qla4xxx/ql4_mbx.c rval = qla4xxx_get_flash(ha, chap_dma, offset, chap_size); ha 1608 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Chap Cookie: x%x\n", ha 1612 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "No valid chap entry found\n"); ha 1621 drivers/scsi/qla4xxx/ql4_mbx.c dma_pool_free(ha->chap_dma_pool, chap_table, chap_dma); ha 1637 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_set_chap(struct scsi_qla_host *ha, char *username, char *password, ha 1647 drivers/scsi/qla4xxx/ql4_mbx.c chap_table = dma_pool_zalloc(ha->chap_dma_pool, GFP_KERNEL, &chap_dma); ha 1662 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla40XX(ha)) { ha 1668 drivers/scsi/qla4xxx/ql4_mbx.c chap_size = ha->hw.flt_chap_size / 2; ha 1669 drivers/scsi/qla4xxx/ql4_mbx.c offset = FLASH_RAW_ACCESS_ADDR + (ha->hw.flt_region_chap << 2); ha 1670 drivers/scsi/qla4xxx/ql4_mbx.c if (ha->port_num == 1) ha 1675 drivers/scsi/qla4xxx/ql4_mbx.c rval = qla4xxx_set_flash(ha, chap_dma, offset, ha 1679 drivers/scsi/qla4xxx/ql4_mbx.c if (rval == QLA_SUCCESS && ha->chap_list) { ha 1681 drivers/scsi/qla4xxx/ql4_mbx.c memcpy((struct ql4_chap_table *)ha->chap_list + idx, ha 1684 drivers/scsi/qla4xxx/ql4_mbx.c dma_pool_free(ha->chap_dma_pool, chap_table, chap_dma); ha 1693 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_uni_chap_at_index(struct scsi_qla_host *ha, char *username, ha 1700 drivers/scsi/qla4xxx/ql4_mbx.c if (!ha->chap_list) { ha 1701 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "Do not have CHAP table cache\n"); ha 1707 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "No memory for username & secret\n"); ha 1712 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla80XX(ha)) ha 1713 drivers/scsi/qla4xxx/ql4_mbx.c max_chap_entries = (ha->hw.flt_chap_size / 2) / ha 1719 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "Invalid Chap index\n"); ha 1724 drivers/scsi/qla4xxx/ql4_mbx.c mutex_lock(&ha->chap_sem); ha 1725 drivers/scsi/qla4xxx/ql4_mbx.c chap_table = (struct ql4_chap_table *)ha->chap_list + chap_index; ha 1732 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "Unidirectional entry not set\n"); ha 1743 drivers/scsi/qla4xxx/ql4_mbx.c mutex_unlock(&ha->chap_sem); ha 1760 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_chap_index(struct scsi_qla_host *ha, char *username, ha 1769 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla80XX(ha)) ha 1770 drivers/scsi/qla4xxx/ql4_mbx.c max_chap_entries = (ha->hw.flt_chap_size / 2) / ha 1775 drivers/scsi/qla4xxx/ql4_mbx.c if (!ha->chap_list) { ha 1776 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "Do not have CHAP table cache\n"); ha 1781 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "Do not have username and psw\n"); ha 1785 drivers/scsi/qla4xxx/ql4_mbx.c mutex_lock(&ha->chap_sem); ha 1787 drivers/scsi/qla4xxx/ql4_mbx.c chap_table = (struct ql4_chap_table *)ha->chap_list + i; ha 1815 drivers/scsi/qla4xxx/ql4_mbx.c rval = qla4xxx_set_chap(ha, username, password, ha 1823 drivers/scsi/qla4xxx/ql4_mbx.c mutex_unlock(&ha->chap_sem); ha 1830 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_conn_close_sess_logout(struct scsi_qla_host *ha, ha 1847 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, 4, 2, &mbox_cmd[0], &mbox_sts[0]); ha 1849 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_WARNING, ha, "%s: MBOX_CMD_CONN_CLOSE " ha 1863 drivers/scsi/qla4xxx/ql4_mbx.c static int qla4_84xx_extend_idc_tmo(struct scsi_qla_host *ha, uint32_t ext_tmo) ha 1874 drivers/scsi/qla4xxx/ql4_mbx.c mbox_cmd[1] = ((ha->idc_info.request_desc & 0xfffff0ff) | ha 1876 drivers/scsi/qla4xxx/ql4_mbx.c mbox_cmd[2] = ha->idc_info.info1; ha 1877 drivers/scsi/qla4xxx/ql4_mbx.c mbox_cmd[3] = ha->idc_info.info2; ha 1878 drivers/scsi/qla4xxx/ql4_mbx.c mbox_cmd[4] = ha->idc_info.info3; ha 1880 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, MBOX_REG_COUNT, ha 1883 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1885 drivers/scsi/qla4xxx/ql4_mbx.c ha->host_no, __func__, mbox_sts[0])); ha 1888 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_INFO, ha, "%s: IDC timeout extended by %d secs\n", ha 1895 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_disable_acb(struct scsi_qla_host *ha) ha 1906 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, 8, 5, &mbox_cmd[0], &mbox_sts[0]); ha 1908 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_WARNING, ha, "%s: MBOX_CMD_DISABLE_ACB " ha 1912 drivers/scsi/qla4xxx/ql4_mbx.c if (is_qla8042(ha) && ha 1913 drivers/scsi/qla4xxx/ql4_mbx.c test_bit(DPC_POST_IDC_ACK, &ha->dpc_flags) && ha 1922 drivers/scsi/qla4xxx/ql4_mbx.c qla4_84xx_extend_idc_tmo(ha, IDC_EXTEND_TOV); ha 1923 drivers/scsi/qla4xxx/ql4_mbx.c if (!wait_for_completion_timeout(&ha->disable_acb_comp, ha 1925 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_WARNING, ha, "%s: Disable ACB Completion not received\n", ha 1933 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_acb(struct scsi_qla_host *ha, dma_addr_t acb_dma, ha 1949 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, 5, 5, &mbox_cmd[0], &mbox_sts[0]); ha 1951 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_WARNING, ha, "%s: MBOX_CMD_GET_ACB " ha 1958 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_set_acb(struct scsi_qla_host *ha, uint32_t *mbox_cmd, ha 1971 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, 5, 5, &mbox_cmd[0], &mbox_sts[0]); ha 1973 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_WARNING, ha, "%s: MBOX_CMD_SET_ACB " ha 1980 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_set_param_ddbentry(struct scsi_qla_host *ha, ha 2000 drivers/scsi/qla4xxx/ql4_mbx.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 2003 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 2018 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_get_default_ddb(ha, options, fw_ddb_entry_dma); ha 2027 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_INFO, ha, "ISID [%pmR]\n", fw_ddb_entry->isid)); ha 2050 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2060 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2065 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, ha 2077 drivers/scsi/qla4xxx/ql4_mbx.c rval = qla4xxx_get_chap_index(ha, sess->username, ha 2092 drivers/scsi/qla4xxx/ql4_mbx.c rval = qla4xxx_get_chap_index(ha, sess->username_in, ha 2131 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_set_ddb_entry(ha, ddb_entry->fw_ddb_index, ha 2137 drivers/scsi/qla4xxx/ql4_mbx.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 2143 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_mgmt_data(struct scsi_qla_host *ha, uint16_t fw_ddb_index, ha 2158 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, 5, 1, &mbox_cmd[0], &mbox_sts[0]); ha 2160 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_WARNING, ha, ha 2168 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_ip_state(struct scsi_qla_host *ha, uint32_t acb_idx, ha 2181 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, 3, 8, &mbox_cmd[0], &mbox_sts[0]); ha 2183 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_WARNING, ha, "%s: " ha 2191 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_get_nvram(struct scsi_qla_host *ha, dma_addr_t nvram_dma, ha 2207 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, &mbox_cmd[0], ha 2210 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_ERR, ha, "scsi%ld: %s: failed " ha 2211 drivers/scsi/qla4xxx/ql4_mbx.c "status %04X\n", ha->host_no, __func__, ha 2217 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_set_nvram(struct scsi_qla_host *ha, dma_addr_t nvram_dma, ha 2233 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, &mbox_cmd[0], ha 2236 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_ERR, ha, "scsi%ld: %s: failed " ha 2237 drivers/scsi/qla4xxx/ql4_mbx.c "status %04X\n", ha->host_no, __func__, ha 2243 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_restore_factory_defaults(struct scsi_qla_host *ha, ha 2259 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 3, &mbox_cmd[0], ha 2262 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_ERR, ha, "scsi%ld: %s: failed " ha 2263 drivers/scsi/qla4xxx/ql4_mbx.c "status %04X\n", ha->host_no, __func__, ha 2274 drivers/scsi/qla4xxx/ql4_mbx.c int qla4_8xxx_set_param(struct scsi_qla_host *ha, int param) ha 2289 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "%s: invalid parameter 0x%x\n", ha 2295 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 2, mbox_cmd, ha 2298 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "%s: failed status %04X\n", ha 2311 drivers/scsi/qla4xxx/ql4_mbx.c int qla4_83xx_post_idc_ack(struct scsi_qla_host *ha) ha 2321 drivers/scsi/qla4xxx/ql4_mbx.c mbox_cmd[1] = ha->idc_info.request_desc; ha 2322 drivers/scsi/qla4xxx/ql4_mbx.c mbox_cmd[2] = ha->idc_info.info1; ha 2323 drivers/scsi/qla4xxx/ql4_mbx.c mbox_cmd[3] = ha->idc_info.info2; ha 2324 drivers/scsi/qla4xxx/ql4_mbx.c mbox_cmd[4] = ha->idc_info.info3; ha 2326 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, MBOX_REG_COUNT, ha 2329 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "%s: failed status %04X\n", __func__, ha 2332 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_INFO, ha, "%s: IDC ACK posted\n", __func__); ha 2337 drivers/scsi/qla4xxx/ql4_mbx.c int qla4_84xx_config_acb(struct scsi_qla_host *ha, int acb_config) ha 2346 drivers/scsi/qla4xxx/ql4_mbx.c acb = dma_alloc_coherent(&ha->pdev->dev, ha 2350 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "%s: Unable to alloc acb\n", __func__); ha 2358 drivers/scsi/qla4xxx/ql4_mbx.c rval = qla4xxx_get_acb(ha, acb_dma, 0, acb_len); ha 2362 drivers/scsi/qla4xxx/ql4_mbx.c rval = qla4xxx_disable_acb(ha); ha 2366 drivers/scsi/qla4xxx/ql4_mbx.c if (!ha->saved_acb) ha 2367 drivers/scsi/qla4xxx/ql4_mbx.c ha->saved_acb = kzalloc(acb_len, GFP_KERNEL); ha 2369 drivers/scsi/qla4xxx/ql4_mbx.c if (!ha->saved_acb) { ha 2370 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "%s: Unable to alloc acb\n", ha 2375 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(ha->saved_acb, acb, acb_len); ha 2379 drivers/scsi/qla4xxx/ql4_mbx.c if (!ha->saved_acb) { ha 2380 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "%s: Can't set ACB, Saved ACB not available\n", ha 2386 drivers/scsi/qla4xxx/ql4_mbx.c memcpy(acb, ha->saved_acb, acb_len); ha 2388 drivers/scsi/qla4xxx/ql4_mbx.c rval = qla4xxx_set_acb(ha, &mbox_cmd[0], &mbox_sts[0], acb_dma); ha 2394 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "%s: Invalid ACB Configuration\n", ha 2399 drivers/scsi/qla4xxx/ql4_mbx.c dma_free_coherent(&ha->pdev->dev, sizeof(struct addr_ctrl_blk), acb, ha 2402 drivers/scsi/qla4xxx/ql4_mbx.c if ((acb_config == ACB_CONFIG_SET) && ha->saved_acb) { ha 2403 drivers/scsi/qla4xxx/ql4_mbx.c kfree(ha->saved_acb); ha 2404 drivers/scsi/qla4xxx/ql4_mbx.c ha->saved_acb = NULL; ha 2406 drivers/scsi/qla4xxx/ql4_mbx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2412 drivers/scsi/qla4xxx/ql4_mbx.c int qla4_83xx_get_port_config(struct scsi_qla_host *ha, uint32_t *config) ha 2423 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, MBOX_REG_COUNT, ha 2428 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "%s: failed status %04X\n", __func__, ha 2434 drivers/scsi/qla4xxx/ql4_mbx.c int qla4_83xx_set_port_config(struct scsi_qla_host *ha, uint32_t *config) ha 2446 drivers/scsi/qla4xxx/ql4_mbx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, MBOX_REG_COUNT, ha 2449 drivers/scsi/qla4xxx/ql4_mbx.c ql4_printk(KERN_ERR, ha, "%s: failed status %04X\n", __func__, ha 13 drivers/scsi/qla4xxx/ql4_nvram.c static inline void eeprom_cmd(uint32_t cmd, struct scsi_qla_host *ha) ha 15 drivers/scsi/qla4xxx/ql4_nvram.c writel(cmd, isp_nvram(ha)); ha 16 drivers/scsi/qla4xxx/ql4_nvram.c readl(isp_nvram(ha)); ha 20 drivers/scsi/qla4xxx/ql4_nvram.c static inline int eeprom_size(struct scsi_qla_host *ha) ha 22 drivers/scsi/qla4xxx/ql4_nvram.c return is_qla4010(ha) ? FM93C66A_SIZE_16 : FM93C86A_SIZE_16; ha 25 drivers/scsi/qla4xxx/ql4_nvram.c static inline int eeprom_no_addr_bits(struct scsi_qla_host *ha) ha 27 drivers/scsi/qla4xxx/ql4_nvram.c return is_qla4010(ha) ? FM93C56A_NO_ADDR_BITS_16 : ha 31 drivers/scsi/qla4xxx/ql4_nvram.c static inline int eeprom_no_data_bits(struct scsi_qla_host *ha) ha 36 drivers/scsi/qla4xxx/ql4_nvram.c static int fm93c56a_select(struct scsi_qla_host * ha) ha 40 drivers/scsi/qla4xxx/ql4_nvram.c ha->eeprom_cmd_data = AUBURN_EEPROM_CS_1 | 0x000f0000; ha 41 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data, ha); ha 45 drivers/scsi/qla4xxx/ql4_nvram.c static int fm93c56a_cmd(struct scsi_qla_host * ha, int cmd, int addr) ha 53 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data | AUBURN_EEPROM_DO_1, ha); ha 55 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data | AUBURN_EEPROM_DO_1 | ha 56 drivers/scsi/qla4xxx/ql4_nvram.c AUBURN_EEPROM_CLK_RISE, ha); ha 57 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data | AUBURN_EEPROM_DO_1 | ha 58 drivers/scsi/qla4xxx/ql4_nvram.c AUBURN_EEPROM_CLK_FALL, ha); ha 73 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data | dataBit, ha); ha 76 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data | dataBit | ha 77 drivers/scsi/qla4xxx/ql4_nvram.c AUBURN_EEPROM_CLK_RISE, ha); ha 78 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data | dataBit | ha 79 drivers/scsi/qla4xxx/ql4_nvram.c AUBURN_EEPROM_CLK_FALL, ha); ha 83 drivers/scsi/qla4xxx/ql4_nvram.c mask = 1 << (eeprom_no_addr_bits(ha) - 1); ha 87 drivers/scsi/qla4xxx/ql4_nvram.c for (i = 0; i < eeprom_no_addr_bits(ha); i++) { ha 95 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data | dataBit, ha); ha 99 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data | dataBit | ha 100 drivers/scsi/qla4xxx/ql4_nvram.c AUBURN_EEPROM_CLK_RISE, ha); ha 101 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data | dataBit | ha 102 drivers/scsi/qla4xxx/ql4_nvram.c AUBURN_EEPROM_CLK_FALL, ha); ha 109 drivers/scsi/qla4xxx/ql4_nvram.c static int fm93c56a_deselect(struct scsi_qla_host * ha) ha 111 drivers/scsi/qla4xxx/ql4_nvram.c ha->eeprom_cmd_data = AUBURN_EEPROM_CS_0 | 0x000f0000; ha 112 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data, ha); ha 116 drivers/scsi/qla4xxx/ql4_nvram.c static int fm93c56a_datain(struct scsi_qla_host * ha, unsigned short *value) ha 124 drivers/scsi/qla4xxx/ql4_nvram.c for (i = 0; i < eeprom_no_data_bits(ha); i++) { ha 125 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data | ha 126 drivers/scsi/qla4xxx/ql4_nvram.c AUBURN_EEPROM_CLK_RISE, ha); ha 127 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_cmd(ha->eeprom_cmd_data | ha 128 drivers/scsi/qla4xxx/ql4_nvram.c AUBURN_EEPROM_CLK_FALL, ha); ha 130 drivers/scsi/qla4xxx/ql4_nvram.c dataBit = (readw(isp_nvram(ha)) & AUBURN_EEPROM_DI_1) ? 1 : 0; ha 140 drivers/scsi/qla4xxx/ql4_nvram.c struct scsi_qla_host * ha) ha 142 drivers/scsi/qla4xxx/ql4_nvram.c fm93c56a_select(ha); ha 143 drivers/scsi/qla4xxx/ql4_nvram.c fm93c56a_cmd(ha, FM93C56A_READ, eepromAddr); ha 144 drivers/scsi/qla4xxx/ql4_nvram.c fm93c56a_datain(ha, value); ha 145 drivers/scsi/qla4xxx/ql4_nvram.c fm93c56a_deselect(ha); ha 150 drivers/scsi/qla4xxx/ql4_nvram.c u16 rd_nvram_word(struct scsi_qla_host * ha, int offset) ha 155 drivers/scsi/qla4xxx/ql4_nvram.c eeprom_readword(offset, &val, ha); ha 159 drivers/scsi/qla4xxx/ql4_nvram.c u8 rd_nvram_byte(struct scsi_qla_host *ha, int offset) ha 170 drivers/scsi/qla4xxx/ql4_nvram.c val = le16_to_cpu(rd_nvram_word(ha, index)); ha 180 drivers/scsi/qla4xxx/ql4_nvram.c int qla4xxx_is_nvram_configuration_valid(struct scsi_qla_host * ha) ha 187 drivers/scsi/qla4xxx/ql4_nvram.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 188 drivers/scsi/qla4xxx/ql4_nvram.c for (index = 0; index < eeprom_size(ha); index++) ha 189 drivers/scsi/qla4xxx/ql4_nvram.c checksum += rd_nvram_word(ha, index); ha 190 drivers/scsi/qla4xxx/ql4_nvram.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 203 drivers/scsi/qla4xxx/ql4_nvram.c int ql4xxx_sem_spinlock(struct scsi_qla_host * ha, u32 sem_mask, u32 sem_bits) ha 210 drivers/scsi/qla4xxx/ql4_nvram.c "0x%x\n", ha->host_no, sem_mask, sem_bits)); ha 212 drivers/scsi/qla4xxx/ql4_nvram.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 213 drivers/scsi/qla4xxx/ql4_nvram.c writel((sem_mask | sem_bits), isp_semaphore(ha)); ha 214 drivers/scsi/qla4xxx/ql4_nvram.c value = readw(isp_semaphore(ha)); ha 215 drivers/scsi/qla4xxx/ql4_nvram.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 218 drivers/scsi/qla4xxx/ql4_nvram.c "code = 0x%x\n", ha->host_no, ha 227 drivers/scsi/qla4xxx/ql4_nvram.c void ql4xxx_sem_unlock(struct scsi_qla_host * ha, u32 sem_mask) ha 231 drivers/scsi/qla4xxx/ql4_nvram.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 232 drivers/scsi/qla4xxx/ql4_nvram.c writel(sem_mask, isp_semaphore(ha)); ha 233 drivers/scsi/qla4xxx/ql4_nvram.c readl(isp_semaphore(ha)); ha 234 drivers/scsi/qla4xxx/ql4_nvram.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 236 drivers/scsi/qla4xxx/ql4_nvram.c DEBUG2(printk("scsi%ld : UNLOCK SEM - mask= 0x%x\n", ha->host_no, ha 240 drivers/scsi/qla4xxx/ql4_nvram.c int ql4xxx_sem_lock(struct scsi_qla_host * ha, u32 sem_mask, u32 sem_bits) ha 245 drivers/scsi/qla4xxx/ql4_nvram.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 246 drivers/scsi/qla4xxx/ql4_nvram.c writel((sem_mask | sem_bits), isp_semaphore(ha)); ha 247 drivers/scsi/qla4xxx/ql4_nvram.c value = readw(isp_semaphore(ha)); ha 248 drivers/scsi/qla4xxx/ql4_nvram.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 251 drivers/scsi/qla4xxx/ql4_nvram.c "0x%x, sema code=0x%x\n", ha->host_no, ha 39 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_pci_base_offsetfset(struct scsi_qla_host *ha, unsigned long off) ha 41 drivers/scsi/qla4xxx/ql4_nx.c if ((off < ha->first_page_group_end) && ha 42 drivers/scsi/qla4xxx/ql4_nx.c (off >= ha->first_page_group_start)) ha 43 drivers/scsi/qla4xxx/ql4_nx.c return (void __iomem *)(ha->nx_pcibase + off); ha 360 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_pci_set_crbwindow_2M(struct scsi_qla_host *ha, ulong *off) ha 364 drivers/scsi/qla4xxx/ql4_nx.c ha->crb_win = CRB_HI(*off); ha 365 drivers/scsi/qla4xxx/ql4_nx.c writel(ha->crb_win, ha 366 drivers/scsi/qla4xxx/ql4_nx.c (void __iomem *)(CRB_WINDOW_2M + ha->nx_pcibase)); ha 370 drivers/scsi/qla4xxx/ql4_nx.c win_read = readl((void __iomem *)(CRB_WINDOW_2M + ha->nx_pcibase)); ha 371 drivers/scsi/qla4xxx/ql4_nx.c if (win_read != ha->crb_win) { ha 372 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 374 drivers/scsi/qla4xxx/ql4_nx.c " off=0x%lx\n", __func__, ha->crb_win, win_read, *off)); ha 376 drivers/scsi/qla4xxx/ql4_nx.c *off = (*off & MASK(16)) + CRB_INDIRECT_2M + ha->nx_pcibase; ha 380 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(struct scsi_qla_host *ha, ulong off, u32 data) ha 385 drivers/scsi/qla4xxx/ql4_nx.c rv = qla4_82xx_pci_get_crb_addr_2M(ha, &off); ha 390 drivers/scsi/qla4xxx/ql4_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 391 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_crb_win_lock(ha); ha 392 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_pci_set_crbwindow_2M(ha, &off); ha 398 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_crb_win_unlock(ha); ha 399 drivers/scsi/qla4xxx/ql4_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 403 drivers/scsi/qla4xxx/ql4_nx.c uint32_t qla4_82xx_rd_32(struct scsi_qla_host *ha, ulong off) ha 409 drivers/scsi/qla4xxx/ql4_nx.c rv = qla4_82xx_pci_get_crb_addr_2M(ha, &off); ha 414 drivers/scsi/qla4xxx/ql4_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 415 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_crb_win_lock(ha); ha 416 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_pci_set_crbwindow_2M(ha, &off); ha 421 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_crb_win_unlock(ha); ha 422 drivers/scsi/qla4xxx/ql4_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 428 drivers/scsi/qla4xxx/ql4_nx.c int qla4_82xx_md_rd_32(struct scsi_qla_host *ha, uint32_t off, uint32_t *data) ha 434 drivers/scsi/qla4xxx/ql4_nx.c writel(off_value, (void __iomem *)(CRB_WINDOW_2M + ha->nx_pcibase)); ha 440 drivers/scsi/qla4xxx/ql4_nx.c win_read = readl((void __iomem *)(CRB_WINDOW_2M + ha->nx_pcibase)); ha 442 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 449 drivers/scsi/qla4xxx/ql4_nx.c ha->nx_pcibase)); ha 454 drivers/scsi/qla4xxx/ql4_nx.c int qla4_82xx_md_wr_32(struct scsi_qla_host *ha, uint32_t off, uint32_t data) ha 460 drivers/scsi/qla4xxx/ql4_nx.c writel(off_value, (void __iomem *)(CRB_WINDOW_2M + ha->nx_pcibase)); ha 465 drivers/scsi/qla4xxx/ql4_nx.c win_read = readl((void __iomem *)(CRB_WINDOW_2M + ha->nx_pcibase)); ha 467 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 474 drivers/scsi/qla4xxx/ql4_nx.c ha->nx_pcibase)); ha 481 drivers/scsi/qla4xxx/ql4_nx.c int qla4_82xx_crb_win_lock(struct scsi_qla_host *ha) ha 488 drivers/scsi/qla4xxx/ql4_nx.c done = qla4_82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM7_LOCK)); ha 504 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_WIN_LOCK_ID, ha->func_num); ha 508 drivers/scsi/qla4xxx/ql4_nx.c void qla4_82xx_crb_win_unlock(struct scsi_qla_host *ha) ha 510 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM7_UNLOCK)); ha 522 drivers/scsi/qla4xxx/ql4_nx.c int qla4_82xx_idc_lock(struct scsi_qla_host *ha) ha 529 drivers/scsi/qla4xxx/ql4_nx.c done = qla4_82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM5_LOCK)); ha 548 drivers/scsi/qla4xxx/ql4_nx.c void qla4_82xx_idc_unlock(struct scsi_qla_host *ha) ha 550 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM5_UNLOCK)); ha 554 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_pci_get_crb_addr_2M(struct scsi_qla_host *ha, ulong *off) ha 563 drivers/scsi/qla4xxx/ql4_nx.c QLA82XX_PCI_CAMQM_2M_BASE + ha->nx_pcibase; ha 578 drivers/scsi/qla4xxx/ql4_nx.c *off = *off + m->start_2M - m->start_128M + ha->nx_pcibase; ha 593 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_pci_mem_bound_check(struct scsi_qla_host *ha, ha 609 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_pci_set_window(struct scsi_qla_host *ha, unsigned long long addr) ha 618 drivers/scsi/qla4xxx/ql4_nx.c ha->ddr_mn_window = window; ha 619 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, ha->mn_win_crb | ha 621 drivers/scsi/qla4xxx/ql4_nx.c win_read = qla4_82xx_rd_32(ha, ha->mn_win_crb | ha 624 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_WARNING, ha, ha 639 drivers/scsi/qla4xxx/ql4_nx.c ha->ddr_mn_window = window; ha 640 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, ha->mn_win_crb | ha 642 drivers/scsi/qla4xxx/ql4_nx.c win_read = qla4_82xx_rd_32(ha, ha->mn_win_crb | ha 656 drivers/scsi/qla4xxx/ql4_nx.c ha->qdr_sn_window = window; ha 657 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, ha->ms_win_crb | ha 659 drivers/scsi/qla4xxx/ql4_nx.c win_read = qla4_82xx_rd_32(ha, ha 660 drivers/scsi/qla4xxx/ql4_nx.c ha->ms_win_crb | QLA82XX_PCI_CRBSPACE); ha 683 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_82xx_pci_is_same_window(struct scsi_qla_host *ha, ha 705 drivers/scsi/qla4xxx/ql4_nx.c if (ha->qdr_sn_window == window) ha 712 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_82xx_pci_mem_read_direct(struct scsi_qla_host *ha, ha 723 drivers/scsi/qla4xxx/ql4_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 729 drivers/scsi/qla4xxx/ql4_nx.c start = qla4_82xx_pci_set_window(ha, off); ha 731 drivers/scsi/qla4xxx/ql4_nx.c (qla4_82xx_pci_is_same_window(ha, off + size - 1) == 0)) { ha 732 drivers/scsi/qla4xxx/ql4_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 738 drivers/scsi/qla4xxx/ql4_nx.c addr = qla4_8xxx_pci_base_offsetfset(ha, start); ha 740 drivers/scsi/qla4xxx/ql4_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 741 drivers/scsi/qla4xxx/ql4_nx.c mem_base = pci_resource_start(ha->pdev, 0); ha 757 drivers/scsi/qla4xxx/ql4_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 777 drivers/scsi/qla4xxx/ql4_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 785 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_pci_mem_write_direct(struct scsi_qla_host *ha, u64 off, ha 796 drivers/scsi/qla4xxx/ql4_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 802 drivers/scsi/qla4xxx/ql4_nx.c start = qla4_82xx_pci_set_window(ha, off); ha 804 drivers/scsi/qla4xxx/ql4_nx.c (qla4_82xx_pci_is_same_window(ha, off + size - 1) == 0)) { ha 805 drivers/scsi/qla4xxx/ql4_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 811 drivers/scsi/qla4xxx/ql4_nx.c addr = qla4_8xxx_pci_base_offsetfset(ha, start); ha 813 drivers/scsi/qla4xxx/ql4_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 814 drivers/scsi/qla4xxx/ql4_nx.c mem_base = pci_resource_start(ha->pdev, 0); ha 828 drivers/scsi/qla4xxx/ql4_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 848 drivers/scsi/qla4xxx/ql4_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 885 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rom_lock(struct scsi_qla_host *ha) ha 893 drivers/scsi/qla4xxx/ql4_nx.c done = qla4_82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM2_LOCK)); ha 909 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_ROM_LOCK_ID, ROM_LOCK_DRIVER); ha 914 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rom_unlock(struct scsi_qla_host *ha) ha 916 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM2_UNLOCK)); ha 920 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wait_rom_done(struct scsi_qla_host *ha) ha 926 drivers/scsi/qla4xxx/ql4_nx.c done = qla4_82xx_rd_32(ha, QLA82XX_ROMUSB_GLB_STATUS); ha 939 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_do_rom_fast_read(struct scsi_qla_host *ha, int addr, int *valp) ha 941 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_ADDRESS, addr); ha 942 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_DUMMY_BYTE_CNT, 0); ha 943 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_ABYTE_CNT, 3); ha 944 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_INSTR_OPCODE, 0xb); ha 945 drivers/scsi/qla4xxx/ql4_nx.c if (qla4_82xx_wait_rom_done(ha)) { ha 950 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_DUMMY_BYTE_CNT, 0); ha 952 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_ABYTE_CNT, 0); ha 954 drivers/scsi/qla4xxx/ql4_nx.c *valp = qla4_82xx_rd_32(ha, QLA82XX_ROMUSB_ROM_RDATA); ha 959 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rom_fast_read(struct scsi_qla_host *ha, int addr, int *valp) ha 963 drivers/scsi/qla4xxx/ql4_nx.c while ((qla4_82xx_rom_lock(ha) != 0) && (loops < 50000)) { ha 968 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_WARNING, ha, "%s: qla4_82xx_rom_lock failed\n", ha 972 drivers/scsi/qla4xxx/ql4_nx.c ret = qla4_82xx_do_rom_fast_read(ha, addr, valp); ha 973 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rom_unlock(ha); ha 982 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_pinit_from_rom(struct scsi_qla_host *ha, int verbose) ha 996 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rom_lock(ha); ha 999 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_I2Q + 0x10, 0x0); ha 1000 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_I2Q + 0x14, 0x0); ha 1001 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_I2Q + 0x18, 0x0); ha 1002 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_I2Q + 0x1c, 0x0); ha 1003 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_I2Q + 0x20, 0x0); ha 1004 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_I2Q + 0x24, 0x0); ha 1007 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x40, 0xff); ha 1009 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x70000, 0x00); ha 1011 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x80000, 0x00); ha 1013 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x90000, 0x00); ha 1015 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_NIU + 0xa0000, 0x00); ha 1017 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_NIU + 0xb0000, 0x00); ha 1020 drivers/scsi/qla4xxx/ql4_nx.c val = qla4_82xx_rd_32(ha, QLA82XX_CRB_SRE + 0x1000); ha 1021 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_SRE + 0x1000, val & (~(0x1))); ha 1024 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_EPG + 0x1300, 0x1); ha 1027 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x0, 0x0); ha 1028 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x8, 0x0); ha 1029 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x10, 0x0); ha 1030 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x18, 0x0); ha 1031 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x100, 0x0); ha 1032 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x200, 0x0); ha 1035 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_0 + 0x3c, 1); ha 1036 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_1 + 0x3c, 1); ha 1037 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_2 + 0x3c, 1); ha 1038 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_3 + 0x3c, 1); ha 1039 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_4 + 0x3c, 1); ha 1043 drivers/scsi/qla4xxx/ql4_nx.c if (test_bit(DPC_RESET_HA, &ha->dpc_flags)) ha 1045 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xfeffffff); ha 1047 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xffffffff); ha 1049 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rom_unlock(ha); ha 1056 drivers/scsi/qla4xxx/ql4_nx.c if (qla4_82xx_rom_fast_read(ha, 0, &n) != 0 || n != 0xcafecafeUL || ha 1057 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rom_fast_read(ha, 4, &n) != 0) { ha 1058 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_WARNING, ha, ha 1071 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_WARNING, ha, ha 1077 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 1082 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_WARNING, ha, ha 1088 drivers/scsi/qla4xxx/ql4_nx.c if (qla4_82xx_rom_fast_read(ha, 8*i + 4*offset, &val) != 0 || ha 1089 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rom_fast_read(ha, 8*i + 4*offset + 4, &addr) != ha 1111 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_WARNING, ha, ha 1142 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_WARNING, ha, ha 1148 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, off, buf[i].data); ha 1165 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_D+0xec, 0x1e); ha 1166 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_D+0x4c, 8); ha 1167 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_I+0x4c, 8); ha 1170 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_0+0x8, 0); ha 1171 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_0+0xc, 0); ha 1172 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_1+0x8, 0); ha 1173 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_1+0xc, 0); ha 1174 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_2+0x8, 0); ha 1175 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_2+0xc, 0); ha 1176 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_3+0x8, 0); ha 1177 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_3+0xc, 0); ha 1192 drivers/scsi/qla4xxx/ql4_nx.c int qla4_8xxx_ms_mem_write_128b(struct scsi_qla_host *ha, uint64_t addr, ha 1206 drivers/scsi/qla4xxx/ql4_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 1209 drivers/scsi/qla4xxx/ql4_nx.c ret_val = ha->isp_ops->wr_reg_indirect(ha, MD_MIU_TEST_AGT_ADDR_HI, 0); ha 1211 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "%s: write to AGT_ADDR_HI failed\n", ha 1225 drivers/scsi/qla4xxx/ql4_nx.c ret_val = ha->isp_ops->wr_reg_indirect(ha, ha 1229 drivers/scsi/qla4xxx/ql4_nx.c ret_val |= ha->isp_ops->wr_reg_indirect(ha, ha 1232 drivers/scsi/qla4xxx/ql4_nx.c ret_val |= ha->isp_ops->wr_reg_indirect(ha, ha 1235 drivers/scsi/qla4xxx/ql4_nx.c ret_val |= ha->isp_ops->wr_reg_indirect(ha, ha 1238 drivers/scsi/qla4xxx/ql4_nx.c ret_val |= ha->isp_ops->wr_reg_indirect(ha, ha 1242 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "%s: write to AGT_WRDATA failed\n", ha 1248 drivers/scsi/qla4xxx/ql4_nx.c ret_val = ha->isp_ops->wr_reg_indirect(ha, MD_MIU_TEST_AGT_CTRL, ha 1250 drivers/scsi/qla4xxx/ql4_nx.c ret_val |= ha->isp_ops->wr_reg_indirect(ha, ha 1254 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "%s: write to AGT_CTRL failed\n", ha 1260 drivers/scsi/qla4xxx/ql4_nx.c ret_val = ha->isp_ops->rd_reg_indirect(ha, ha 1264 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "%s: failed to read MD_MIU_TEST_AGT_CTRL\n", ha 1282 drivers/scsi/qla4xxx/ql4_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 1289 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_load_from_flash(struct scsi_qla_host *ha, uint32_t image_start) ha 1297 drivers/scsi/qla4xxx/ql4_nx.c flashaddr = memaddr = ha->hw.flt_region_bootload; ha 1301 drivers/scsi/qla4xxx/ql4_nx.c ha->host_no, __func__, flashaddr, image_start)); ha 1304 drivers/scsi/qla4xxx/ql4_nx.c if ((qla4_82xx_rom_fast_read(ha, flashaddr, (int *)&low)) || ha 1305 drivers/scsi/qla4xxx/ql4_nx.c (qla4_82xx_rom_fast_read(ha, flashaddr + 4, ha 1311 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_82xx_pci_mem_write_2M(ha, memaddr, &data, 8); ha 1325 drivers/scsi/qla4xxx/ql4_nx.c read_lock(&ha->hw_lock); ha 1326 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_0 + 0x18, 0x1020); ha 1327 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0x80001e); ha 1328 drivers/scsi/qla4xxx/ql4_nx.c read_unlock(&ha->hw_lock); ha 1334 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_82xx_load_fw(struct scsi_qla_host *ha, uint32_t image_start) ha 1338 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, CRB_CMDPEG_STATE, 0); ha 1339 drivers/scsi/qla4xxx/ql4_nx.c if (qla4_82xx_pinit_from_rom(ha, 0) != QLA_SUCCESS) { ha 1352 drivers/scsi/qla4xxx/ql4_nx.c rst = qla4_82xx_rd_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET); ha 1355 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, rst); ha 1357 drivers/scsi/qla4xxx/ql4_nx.c if (qla4_82xx_load_from_flash(ha, image_start)) { ha 1366 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_pci_mem_read_2M(struct scsi_qla_host *ha, ha 1382 drivers/scsi/qla4xxx/ql4_nx.c if (qla4_82xx_pci_mem_bound_check(ha, off, size) == 0) ha 1383 drivers/scsi/qla4xxx/ql4_nx.c return qla4_82xx_pci_mem_read_direct(ha, ha 1399 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, mem_crb + MIU_TEST_AGT_ADDR_LO, temp); ha 1401 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, mem_crb + MIU_TEST_AGT_ADDR_HI, temp); ha 1403 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, mem_crb + MIU_TEST_AGT_CTRL, temp); ha 1405 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, mem_crb + MIU_TEST_AGT_CTRL, temp); ha 1408 drivers/scsi/qla4xxx/ql4_nx.c temp = qla4_82xx_rd_32(ha, mem_crb + MIU_TEST_AGT_CTRL); ha 1423 drivers/scsi/qla4xxx/ql4_nx.c temp = qla4_82xx_rd_32(ha, ha 1457 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_pci_mem_write_2M(struct scsi_qla_host *ha, ha 1472 drivers/scsi/qla4xxx/ql4_nx.c if (qla4_82xx_pci_mem_bound_check(ha, off, size) == 0) ha 1473 drivers/scsi/qla4xxx/ql4_nx.c return qla4_82xx_pci_mem_write_direct(ha, ha 1488 drivers/scsi/qla4xxx/ql4_nx.c if (qla4_82xx_pci_mem_read_2M(ha, off8 + ha 1524 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, mem_crb+MIU_TEST_AGT_ADDR_LO, temp); ha 1526 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, mem_crb+MIU_TEST_AGT_ADDR_HI, temp); ha 1528 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, mem_crb+MIU_TEST_AGT_WRDATA_LO, temp); ha 1530 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, mem_crb+MIU_TEST_AGT_WRDATA_HI, temp); ha 1532 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, mem_crb + MIU_TEST_AGT_WRDATA_UPPER_LO, ha 1535 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, mem_crb + MIU_TEST_AGT_WRDATA_UPPER_HI, ha 1539 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, mem_crb+MIU_TEST_AGT_CTRL, temp); ha 1541 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, mem_crb+MIU_TEST_AGT_CTRL, temp); ha 1544 drivers/scsi/qla4xxx/ql4_nx.c temp = qla4_82xx_rd_32(ha, mem_crb + MIU_TEST_AGT_CTRL); ha 1551 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, ha 1562 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_82xx_cmdpeg_ready(struct scsi_qla_host *ha, int pegtune_val) ha 1569 drivers/scsi/qla4xxx/ql4_nx.c val = qla4_82xx_rd_32(ha, CRB_CMDPEG_STATE); ha 1579 drivers/scsi/qla4xxx/ql4_nx.c pegtune_val = qla4_82xx_rd_32(ha, ha 1589 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_82xx_rcvpeg_ready(struct scsi_qla_host *ha) ha 1595 drivers/scsi/qla4xxx/ql4_nx.c read_lock(&ha->hw_lock); ha 1596 drivers/scsi/qla4xxx/ql4_nx.c state = qla4_82xx_rd_32(ha, CRB_RCVPEG_STATE); ha 1597 drivers/scsi/qla4xxx/ql4_nx.c read_unlock(&ha->hw_lock); ha 1602 drivers/scsi/qla4xxx/ql4_nx.c read_lock(&ha->hw_lock); ha 1603 drivers/scsi/qla4xxx/ql4_nx.c state = qla4_82xx_rd_32(ha, CRB_RCVPEG_STATE); ha 1604 drivers/scsi/qla4xxx/ql4_nx.c read_unlock(&ha->hw_lock); ha 1610 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 1619 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_set_drv_active(struct scsi_qla_host *ha) ha 1623 drivers/scsi/qla4xxx/ql4_nx.c drv_active = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_ACTIVE); ha 1630 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8032(ha) || is_qla8042(ha)) ha 1631 drivers/scsi/qla4xxx/ql4_nx.c drv_active |= (1 << ha->func_num); ha 1633 drivers/scsi/qla4xxx/ql4_nx.c drv_active |= (1 << (ha->func_num * 4)); ha 1635 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "%s(%ld): drv_active: 0x%08x\n", ha 1636 drivers/scsi/qla4xxx/ql4_nx.c __func__, ha->host_no, drv_active); ha 1637 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_ACTIVE, drv_active); ha 1641 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_clear_drv_active(struct scsi_qla_host *ha) ha 1645 drivers/scsi/qla4xxx/ql4_nx.c drv_active = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_ACTIVE); ha 1652 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8032(ha) || is_qla8042(ha)) ha 1653 drivers/scsi/qla4xxx/ql4_nx.c drv_active &= ~(1 << (ha->func_num)); ha 1655 drivers/scsi/qla4xxx/ql4_nx.c drv_active &= ~(1 << (ha->func_num * 4)); ha 1657 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "%s(%ld): drv_active: 0x%08x\n", ha 1658 drivers/scsi/qla4xxx/ql4_nx.c __func__, ha->host_no, drv_active); ha 1659 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_ACTIVE, drv_active); ha 1662 drivers/scsi/qla4xxx/ql4_nx.c inline int qla4_8xxx_need_reset(struct scsi_qla_host *ha) ha 1667 drivers/scsi/qla4xxx/ql4_nx.c drv_active = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_ACTIVE); ha 1668 drivers/scsi/qla4xxx/ql4_nx.c drv_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_STATE); ha 1675 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8032(ha) || is_qla8042(ha)) ha 1676 drivers/scsi/qla4xxx/ql4_nx.c rval = drv_state & (1 << ha->func_num); ha 1678 drivers/scsi/qla4xxx/ql4_nx.c rval = drv_state & (1 << (ha->func_num * 4)); ha 1680 drivers/scsi/qla4xxx/ql4_nx.c if ((test_bit(AF_EEH_BUSY, &ha->flags)) && drv_active) ha 1686 drivers/scsi/qla4xxx/ql4_nx.c void qla4_8xxx_set_rst_ready(struct scsi_qla_host *ha) ha 1690 drivers/scsi/qla4xxx/ql4_nx.c drv_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_STATE); ha 1697 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8032(ha) || is_qla8042(ha)) ha 1698 drivers/scsi/qla4xxx/ql4_nx.c drv_state |= (1 << ha->func_num); ha 1700 drivers/scsi/qla4xxx/ql4_nx.c drv_state |= (1 << (ha->func_num * 4)); ha 1702 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "%s(%ld): drv_state: 0x%08x\n", ha 1703 drivers/scsi/qla4xxx/ql4_nx.c __func__, ha->host_no, drv_state); ha 1704 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_STATE, drv_state); ha 1707 drivers/scsi/qla4xxx/ql4_nx.c void qla4_8xxx_clear_rst_ready(struct scsi_qla_host *ha) ha 1711 drivers/scsi/qla4xxx/ql4_nx.c drv_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_STATE); ha 1718 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8032(ha) || is_qla8042(ha)) ha 1719 drivers/scsi/qla4xxx/ql4_nx.c drv_state &= ~(1 << ha->func_num); ha 1721 drivers/scsi/qla4xxx/ql4_nx.c drv_state &= ~(1 << (ha->func_num * 4)); ha 1723 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "%s(%ld): drv_state: 0x%08x\n", ha 1724 drivers/scsi/qla4xxx/ql4_nx.c __func__, ha->host_no, drv_state); ha 1725 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_STATE, drv_state); ha 1729 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_set_qsnt_ready(struct scsi_qla_host *ha) ha 1733 drivers/scsi/qla4xxx/ql4_nx.c qsnt_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_STATE); ha 1740 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8032(ha) || is_qla8042(ha)) ha 1741 drivers/scsi/qla4xxx/ql4_nx.c qsnt_state |= (1 << ha->func_num); ha 1743 drivers/scsi/qla4xxx/ql4_nx.c qsnt_state |= (2 << (ha->func_num * 4)); ha 1745 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_STATE, qsnt_state); ha 1750 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_start_firmware(struct scsi_qla_host *ha, uint32_t image_start) ha 1755 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, CRB_DMA_SHIFT, 0x55555555); ha 1758 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, CRB_CMDPEG_STATE, 0); ha 1759 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, CRB_RCVPEG_STATE, 0); ha 1760 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_PEG_HALT_STATUS1, 0); ha 1761 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_PEG_HALT_STATUS2, 0); ha 1763 drivers/scsi/qla4xxx/ql4_nx.c if (qla4_82xx_load_fw(ha, image_start) != QLA_SUCCESS) { ha 1769 drivers/scsi/qla4xxx/ql4_nx.c if (qla4_82xx_cmdpeg_ready(ha, 0) != QLA_SUCCESS) { ha 1775 drivers/scsi/qla4xxx/ql4_nx.c pcie_capability_read_word(ha->pdev, PCI_EXP_LNKSTA, &lnk); ha 1776 drivers/scsi/qla4xxx/ql4_nx.c ha->link_width = (lnk >> 4) & 0x3f; ha 1779 drivers/scsi/qla4xxx/ql4_nx.c return qla4_82xx_rcvpeg_ready(ha); ha 1782 drivers/scsi/qla4xxx/ql4_nx.c int qla4_82xx_try_start_fw(struct scsi_qla_host *ha) ha 1792 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 1794 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_8xxx_get_flash_info(ha); ha 1798 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 1800 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_82xx_start_firmware(ha, ha->hw.flt_region_fw); ha 1803 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "FW: Load firmware from flash" ha 1811 drivers/scsi/qla4xxx/ql4_nx.c void qla4_82xx_rom_lock_recovery(struct scsi_qla_host *ha) ha 1813 drivers/scsi/qla4xxx/ql4_nx.c if (qla4_82xx_rom_lock(ha)) { ha 1815 drivers/scsi/qla4xxx/ql4_nx.c dev_info(&ha->pdev->dev, "Resetting rom_lock\n"); ha 1823 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rom_unlock(ha); ha 1826 drivers/scsi/qla4xxx/ql4_nx.c static uint32_t ql4_84xx_poll_wait_for_ready(struct scsi_qla_host *ha, ha 1835 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr1, &temp); ha 1840 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "Error in processing rdmdio entry\n"); ha 1848 drivers/scsi/qla4xxx/ql4_nx.c static uint32_t ql4_84xx_ipmdio_rd_reg(struct scsi_qla_host *ha, uint32_t addr1, ha 1856 drivers/scsi/qla4xxx/ql4_nx.c rval = ql4_84xx_poll_wait_for_ready(ha, addr1, mask); ha 1861 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr1, temp); ha 1863 drivers/scsi/qla4xxx/ql4_nx.c rval = ql4_84xx_poll_wait_for_ready(ha, addr1, mask); ha 1867 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr3, &data); ha 1875 drivers/scsi/qla4xxx/ql4_nx.c static uint32_t ql4_84xx_poll_wait_ipmdio_bus_idle(struct scsi_qla_host *ha, ha 1887 drivers/scsi/qla4xxx/ql4_nx.c ql4_84xx_ipmdio_rd_reg(ha, addr1, addr3, mask, addr2, &temp); ha 1891 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "Error in processing mdiobus idle\n"); ha 1899 drivers/scsi/qla4xxx/ql4_nx.c static int ql4_84xx_ipmdio_wr_reg(struct scsi_qla_host *ha, ha 1906 drivers/scsi/qla4xxx/ql4_nx.c rval = ql4_84xx_poll_wait_for_ready(ha, addr1, mask); ha 1910 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr3, value); ha 1911 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr1, addr); ha 1913 drivers/scsi/qla4xxx/ql4_nx.c rval = ql4_84xx_poll_wait_for_ready(ha, addr1, mask); ha 1921 drivers/scsi/qla4xxx/ql4_nx.c static void qla4_8xxx_minidump_process_rdcrb(struct scsi_qla_host *ha, ha 1929 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Entering fn: %s\n", __func__)); ha 1936 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, r_addr, &r_value); ha 1944 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_83xx_check_dma_engine_state(struct scsi_qla_host *ha) ha 1952 drivers/scsi/qla4xxx/ql4_nx.c ha->fw_dump_tmplt_hdr; ha 1959 drivers/scsi/qla4xxx/ql4_nx.c rval = ha->isp_ops->rd_reg_indirect(ha, ha 1973 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_83xx_start_pex_dma(struct scsi_qla_host *ha, ha 1982 drivers/scsi/qla4xxx/ql4_nx.c ha->fw_dump_tmplt_hdr; ha 1988 drivers/scsi/qla4xxx/ql4_nx.c rval = ha->isp_ops->wr_reg_indirect(ha, ha 1994 drivers/scsi/qla4xxx/ql4_nx.c rval = ha->isp_ops->wr_reg_indirect(ha, ha 1999 drivers/scsi/qla4xxx/ql4_nx.c rval = ha->isp_ops->wr_reg_indirect(ha, ha 2007 drivers/scsi/qla4xxx/ql4_nx.c rval = ha->isp_ops->rd_reg_indirect(ha, ha 2029 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_8xxx_minidump_pex_dma_read(struct scsi_qla_host *ha, ha 2041 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Entering fn: %s\n", __func__)); ha 2043 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_83xx_check_dma_engine_state(ha); ha 2045 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2052 drivers/scsi/qla4xxx/ql4_nx.c rdmem_buffer = dma_alloc_coherent(&ha->pdev->dev, ha 2056 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2069 drivers/scsi/qla4xxx/ql4_nx.c dma_desc.cmd.dma_desc_cmd |= ((PCI_FUNC(ha->pdev->devfn) & 0xf) << 0x4); ha 2086 drivers/scsi/qla4xxx/ql4_nx.c dma_free_coherent(&ha->pdev->dev, ha 2090 drivers/scsi/qla4xxx/ql4_nx.c rdmem_buffer = dma_alloc_coherent(&ha->pdev->dev, size, ha 2094 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2106 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_8xxx_ms_mem_write_128b(ha, ha 2111 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 2117 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2121 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_83xx_start_pex_dma(ha, m_hdr); ha 2123 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2125 drivers/scsi/qla4xxx/ql4_nx.c ha->host_no, rval)); ha 2134 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Leaving fn: %s\n", __func__)); ha 2140 drivers/scsi/qla4xxx/ql4_nx.c dma_free_coherent(&ha->pdev->dev, size, rdmem_buffer, ha 2146 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_8xxx_minidump_process_l2tag(struct scsi_qla_host *ha, ha 2158 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Entering fn: %s\n", __func__)); ha 2173 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, t_r_addr, t_value); ha 2176 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, c_addr, c_value_w); ha 2181 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, c_addr, ha 2194 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr, &r_value); ha 2205 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_8xxx_minidump_process_control(struct scsi_qla_host *ha, ha 2215 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Entering fn: %s\n", __func__)); ha 2217 drivers/scsi/qla4xxx/ql4_nx.c ha->fw_dump_tmplt_hdr; ha 2224 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, crb_addr, ha 2229 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, crb_addr, &read_value); ha 2230 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, crb_addr, read_value); ha 2234 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, crb_addr, &read_value); ha 2241 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, crb_addr, read_value); ha 2244 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, crb_addr, &read_value); ha 2246 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, crb_addr, read_value); ha 2252 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, crb_addr, &read_value); ha 2263 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, ha 2278 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr, &read_value); ha 2300 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr, read_value); ha 2318 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Leaving fn: %s\n", __func__)); ha 2322 drivers/scsi/qla4xxx/ql4_nx.c static void qla4_8xxx_minidump_process_rdocm(struct scsi_qla_host *ha, ha 2330 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Entering fn: %s\n", __func__)); ha 2336 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2341 drivers/scsi/qla4xxx/ql4_nx.c r_value = readl((void __iomem *)(r_addr + ha->nx_pcibase)); ha 2345 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Leaving fn: %s datacount: 0x%lx\n", ha 2350 drivers/scsi/qla4xxx/ql4_nx.c static void qla4_8xxx_minidump_process_rdmux(struct scsi_qla_host *ha, ha 2358 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Entering fn: %s\n", __func__)); ha 2367 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, s_addr, s_value); ha 2368 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, r_addr, &r_value); ha 2376 drivers/scsi/qla4xxx/ql4_nx.c static void qla4_8xxx_minidump_process_l1cache(struct scsi_qla_host *ha, ha 2397 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, t_r_addr, t_value); ha 2398 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, c_addr, c_value_w); ha 2401 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr, &r_value); ha 2410 drivers/scsi/qla4xxx/ql4_nx.c static void qla4_8xxx_minidump_process_queue(struct scsi_qla_host *ha, ha 2420 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Entering fn: %s\n", __func__)); ha 2428 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, s_addr, qid); ha 2431 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, r_addr, &r_value); ha 2443 drivers/scsi/qla4xxx/ql4_nx.c static void qla4_82xx_minidump_process_rdrom(struct scsi_qla_host *ha, ha 2452 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Entering fn: %s\n", __func__)); ha 2457 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2462 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, MD_DIRECT_ROM_WINDOW, ha 2464 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, ha 2477 drivers/scsi/qla4xxx/ql4_nx.c static int __qla4_8xxx_minidump_process_rdmem(struct scsi_qla_host *ha, ha 2487 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Entering fn: %s\n", __func__)); ha 2492 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2497 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2504 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2510 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2514 drivers/scsi/qla4xxx/ql4_nx.c write_lock_irqsave(&ha->hw_lock, flags); ha 2516 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, MD_MIU_TEST_AGT_ADDR_LO, ha 2519 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, MD_MIU_TEST_AGT_ADDR_HI, ha 2522 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, MD_MIU_TEST_AGT_CTRL, r_value); ha 2524 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, MD_MIU_TEST_AGT_CTRL, r_value); ha 2527 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, MD_MIU_TEST_AGT_CTRL, ha 2537 drivers/scsi/qla4xxx/ql4_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 2542 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, ha 2550 drivers/scsi/qla4xxx/ql4_nx.c write_unlock_irqrestore(&ha->hw_lock, flags); ha 2552 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Leaving fn: %s datacount: 0x%x\n", ha 2559 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_8xxx_minidump_process_rdmem(struct scsi_qla_host *ha, ha 2566 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_8xxx_minidump_pex_dma_read(ha, entry_hdr, &data_ptr); ha 2568 drivers/scsi/qla4xxx/ql4_nx.c rval = __qla4_8xxx_minidump_process_rdmem(ha, entry_hdr, ha 2574 drivers/scsi/qla4xxx/ql4_nx.c static void qla4_8xxx_mark_entry_skipped(struct scsi_qla_host *ha, ha 2579 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2581 drivers/scsi/qla4xxx/ql4_nx.c ha->host_no, index, entry_hdr->entry_type, ha 2587 drivers/scsi/qla4xxx/ql4_nx.c ha->fw_dump_skip_size += entry_hdr->entry_capture_size; ha 2591 drivers/scsi/qla4xxx/ql4_nx.c static uint32_t qla83xx_minidump_process_pollrd(struct scsi_qla_host *ha, ha 2611 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, s_addr, s_value); ha 2614 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, s_addr, &r_value); ha 2621 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "%s: TIMEOUT\n", ha 2628 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, r_addr, &r_value); ha 2640 drivers/scsi/qla4xxx/ql4_nx.c static uint32_t qla4_84xx_minidump_process_rddfe(struct scsi_qla_host *ha, ha 2669 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr1, (0x40000000 | value)); ha 2673 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr1, &temp); ha 2680 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "%s: TIMEOUT\n", __func__); ha 2684 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr2, &temp); ha 2689 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr2, wrval); ha 2690 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr1, value); ha 2694 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr1, &temp); ha 2700 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "%s: TIMEOUT\n", ha 2706 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr1, ha 2711 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr1, &temp); ha 2718 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "%s: TIMEOUT\n", ha 2724 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr2, &data); ha 2736 drivers/scsi/qla4xxx/ql4_nx.c static uint32_t qla4_84xx_minidump_process_rdmdio(struct scsi_qla_host *ha, ha 2764 drivers/scsi/qla4xxx/ql4_nx.c rval = ql4_84xx_poll_wait_ipmdio_bus_idle(ha, addr1, addr2, ha 2770 drivers/scsi/qla4xxx/ql4_nx.c rval = ql4_84xx_ipmdio_wr_reg(ha, addr1, addr3, mask, addr4, ha 2776 drivers/scsi/qla4xxx/ql4_nx.c rval = ql4_84xx_ipmdio_wr_reg(ha, addr1, addr3, mask, addr5, ha 2782 drivers/scsi/qla4xxx/ql4_nx.c rval = ql4_84xx_ipmdio_wr_reg(ha, addr1, addr3, mask, ha 2787 drivers/scsi/qla4xxx/ql4_nx.c rval = ql4_84xx_poll_wait_ipmdio_bus_idle(ha, addr1, addr2, ha 2793 drivers/scsi/qla4xxx/ql4_nx.c rval = ql4_84xx_ipmdio_rd_reg(ha, addr1, addr3, ha 2812 drivers/scsi/qla4xxx/ql4_nx.c static uint32_t qla4_84xx_minidump_process_pollwr(struct scsi_qla_host *ha, ha 2831 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr1, &r_value); ha 2840 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "%s: TIMEOUT\n", __func__); ha 2845 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr2, value2); ha 2846 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr1, value1); ha 2850 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr1, &r_value); ha 2861 drivers/scsi/qla4xxx/ql4_nx.c static void qla83xx_minidump_process_rdmux2(struct scsi_qla_host *ha, ha 2879 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, sel_addr1, sel_val1); ha 2883 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, sel_addr2, t_sel_val); ha 2884 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, read_addr, &data); ha 2888 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, sel_addr1, sel_val2); ha 2892 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, sel_addr2, t_sel_val); ha 2893 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, read_addr, &data); ha 2904 drivers/scsi/qla4xxx/ql4_nx.c static uint32_t qla83xx_minidump_process_pollrdmwr(struct scsi_qla_host *ha, ha 2921 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr_1, value_1); ha 2925 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr_1, &r_value); ha 2932 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "%s: TIMEOUT_1\n", ha 2940 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr_2, &data); ha 2942 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr_2, data); ha 2943 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->wr_reg_indirect(ha, addr_1, value_2); ha 2947 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rd_reg_indirect(ha, addr_1, &r_value); ha 2954 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "%s: TIMEOUT_2\n", ha 2970 drivers/scsi/qla4xxx/ql4_nx.c static uint32_t qla4_83xx_minidump_process_rdrom(struct scsi_qla_host *ha, ha 2982 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "[%s]: fl_addr: 0x%x, count: 0x%x\n", ha 2985 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_83xx_lockless_flash_read_u32(ha, fl_addr, ha 2989 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_ERR, ha, "%s: Flash Read Error,Count=%d\n", ha 3005 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_8xxx_collect_md_data(struct scsi_qla_host *ha) ha 3016 drivers/scsi/qla4xxx/ql4_nx.c ha->fw_dump_skip_size = 0; ha 3017 drivers/scsi/qla4xxx/ql4_nx.c if (!ha->fw_dump) { ha 3018 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "%s(%ld) No buffer to dump\n", ha 3019 drivers/scsi/qla4xxx/ql4_nx.c __func__, ha->host_no); ha 3024 drivers/scsi/qla4xxx/ql4_nx.c ha->fw_dump_tmplt_hdr; ha 3025 drivers/scsi/qla4xxx/ql4_nx.c data_ptr = (uint32_t *)((uint8_t *)ha->fw_dump + ha 3026 drivers/scsi/qla4xxx/ql4_nx.c ha->fw_dump_tmplt_size); ha 3027 drivers/scsi/qla4xxx/ql4_nx.c data_collected += ha->fw_dump_tmplt_size; ha 3030 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "[%s]: starting data ptr: %p\n", ha 3032 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 3035 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "[%s]: Capture Mask obtained: 0x%x\n", ha 3036 drivers/scsi/qla4xxx/ql4_nx.c __func__, ha->fw_dump_capture_mask); ha 3037 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "[%s]: Total_data_size 0x%x, %d obtained\n", ha 3038 drivers/scsi/qla4xxx/ql4_nx.c __func__, ha->fw_dump_size, ha->fw_dump_size); ha 3046 drivers/scsi/qla4xxx/ql4_nx.c (((uint8_t *)ha->fw_dump_tmplt_hdr) + ha 3049 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8032(ha) || is_qla8042(ha)) ha 3051 drivers/scsi/qla4xxx/ql4_nx.c tmplt_hdr->ocm_window_reg[ha->func_num]; ha 3055 drivers/scsi/qla4xxx/ql4_nx.c if (data_collected > ha->fw_dump_size) { ha 3056 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 3058 drivers/scsi/qla4xxx/ql4_nx.c data_collected, ha->fw_dump_size); ha 3063 drivers/scsi/qla4xxx/ql4_nx.c ha->fw_dump_capture_mask)) { ha 3069 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 3072 drivers/scsi/qla4xxx/ql4_nx.c (ha->fw_dump_size - data_collected))); ha 3079 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3082 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_8xxx_minidump_process_control(ha, ha 3085 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3090 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_minidump_process_rdcrb(ha, entry_hdr, ha 3094 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_8xxx_minidump_process_rdmem(ha, entry_hdr, ha 3097 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3103 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8022(ha)) { ha 3104 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_minidump_process_rdrom(ha, entry_hdr, ha 3106 drivers/scsi/qla4xxx/ql4_nx.c } else if (is_qla8032(ha) || is_qla8042(ha)) { ha 3107 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_83xx_minidump_process_rdrom(ha, ha 3111 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, ha 3120 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_8xxx_minidump_process_l2tag(ha, entry_hdr, ha 3123 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3131 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_minidump_process_l1cache(ha, entry_hdr, ha 3135 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_minidump_process_rdocm(ha, entry_hdr, ha 3139 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_minidump_process_rdmux(ha, entry_hdr, ha 3143 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_minidump_process_queue(ha, entry_hdr, ha 3147 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8022(ha)) { ha 3148 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3151 drivers/scsi/qla4xxx/ql4_nx.c rval = qla83xx_minidump_process_pollrd(ha, entry_hdr, ha 3154 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3157 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8022(ha)) { ha 3158 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3161 drivers/scsi/qla4xxx/ql4_nx.c qla83xx_minidump_process_rdmux2(ha, entry_hdr, ha 3165 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8022(ha)) { ha 3166 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3169 drivers/scsi/qla4xxx/ql4_nx.c rval = qla83xx_minidump_process_pollrdmwr(ha, entry_hdr, ha 3172 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3175 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_84xx_minidump_process_rddfe(ha, entry_hdr, ha 3178 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3181 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_84xx_minidump_process_rdmdio(ha, entry_hdr, ha 3184 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3187 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_84xx_minidump_process_pollwr(ha, entry_hdr, ha 3190 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3194 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_mark_entry_skipped(ha, entry_hdr, i); ha 3198 drivers/scsi/qla4xxx/ql4_nx.c data_collected = (uint8_t *)data_ptr - (uint8_t *)ha->fw_dump; ha 3206 drivers/scsi/qla4xxx/ql4_nx.c if ((data_collected + ha->fw_dump_skip_size) != ha->fw_dump_size) { ha 3207 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 3209 drivers/scsi/qla4xxx/ql4_nx.c data_collected, ha->fw_dump_size); ha 3214 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Leaving fn: %s Last entry: 0x%x\n", ha 3224 drivers/scsi/qla4xxx/ql4_nx.c static void qla4_8xxx_uevent_emit(struct scsi_qla_host *ha, u32 code) ha 3232 drivers/scsi/qla4xxx/ql4_nx.c ha->host_no); ha 3239 drivers/scsi/qla4xxx/ql4_nx.c kobject_uevent_env(&(&ha->pdev->dev)->kobj, KOBJ_CHANGE, envp); ha 3242 drivers/scsi/qla4xxx/ql4_nx.c void qla4_8xxx_get_minidump(struct scsi_qla_host *ha) ha 3244 drivers/scsi/qla4xxx/ql4_nx.c if (ql4xenablemd && test_bit(AF_FW_RECOVERY, &ha->flags) && ha 3245 drivers/scsi/qla4xxx/ql4_nx.c !test_bit(AF_82XX_FW_DUMPED, &ha->flags)) { ha 3246 drivers/scsi/qla4xxx/ql4_nx.c if (!qla4_8xxx_collect_md_data(ha)) { ha 3247 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_uevent_emit(ha, QL4_UEVENT_CODE_FW_DUMP); ha 3248 drivers/scsi/qla4xxx/ql4_nx.c set_bit(AF_82XX_FW_DUMPED, &ha->flags); ha 3250 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "%s: Unable to collect minidump\n", ha 3262 drivers/scsi/qla4xxx/ql4_nx.c int qla4_8xxx_device_bootstrap(struct scsi_qla_host *ha) ha 3269 drivers/scsi/qla4xxx/ql4_nx.c need_reset = ha->isp_ops->need_reset(ha); ha 3273 drivers/scsi/qla4xxx/ql4_nx.c if (test_bit(AF_FW_RECOVERY, &ha->flags)) ha 3274 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rom_lock_recovery(ha); ha 3276 drivers/scsi/qla4xxx/ql4_nx.c old_count = qla4_8xxx_rd_direct(ha, QLA8XXX_PEG_ALIVE_COUNTER); ha 3279 drivers/scsi/qla4xxx/ql4_nx.c count = qla4_8xxx_rd_direct(ha, ha 3286 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->rom_lock_recovery(ha); ha 3290 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "HW State: INITIALIZING\n"); ha 3291 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, ha 3294 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_unlock(ha); ha 3296 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8022(ha)) ha 3297 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_get_minidump(ha); ha 3299 drivers/scsi/qla4xxx/ql4_nx.c rval = ha->isp_ops->restart_firmware(ha); ha 3300 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_lock(ha); ha 3303 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "HW State: FAILED\n"); ha 3304 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_clear_drv_active(ha); ha 3305 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, ha 3311 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "HW State: READY\n"); ha 3312 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, QLA8XXX_DEV_READY); ha 3324 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_need_reset_handler(struct scsi_qla_host *ha) ha 3330 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 3333 drivers/scsi/qla4xxx/ql4_nx.c if (test_and_clear_bit(AF_ONLINE, &ha->flags)) { ha 3334 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_idc_unlock(ha); ha 3335 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->disable_intrs(ha); ha 3336 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_idc_lock(ha); ha 3339 drivers/scsi/qla4xxx/ql4_nx.c if (!test_bit(AF_8XXX_RST_OWNER, &ha->flags)) { ha 3340 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 3342 drivers/scsi/qla4xxx/ql4_nx.c __func__, ha->host_no)); ha 3343 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_set_rst_ready(ha); ha 3345 drivers/scsi/qla4xxx/ql4_nx.c active_mask = (~(1 << (ha->func_num * 4))); ha 3349 drivers/scsi/qla4xxx/ql4_nx.c reset_timeout = jiffies + (ha->nx_reset_timeout * HZ); ha 3351 drivers/scsi/qla4xxx/ql4_nx.c drv_state = qla4_82xx_rd_32(ha, QLA82XX_CRB_DRV_STATE); ha 3352 drivers/scsi/qla4xxx/ql4_nx.c drv_active = qla4_82xx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE); ha 3354 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 3356 drivers/scsi/qla4xxx/ql4_nx.c __func__, ha->host_no, drv_state, drv_active); ha 3360 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 3370 drivers/scsi/qla4xxx/ql4_nx.c if (test_bit(AF_8XXX_RST_OWNER, &ha->flags)) { ha 3371 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 3373 drivers/scsi/qla4xxx/ql4_nx.c __func__, ha->host_no, drv_state, ha 3376 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_idc_unlock(ha); ha 3378 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_idc_lock(ha); ha 3380 drivers/scsi/qla4xxx/ql4_nx.c drv_state = qla4_82xx_rd_32(ha, QLA82XX_CRB_DRV_STATE); ha 3381 drivers/scsi/qla4xxx/ql4_nx.c drv_active = qla4_82xx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE); ha 3385 drivers/scsi/qla4xxx/ql4_nx.c clear_bit(AF_8XXX_RST_OWNER, &ha->flags); ha 3387 drivers/scsi/qla4xxx/ql4_nx.c dev_state = qla4_82xx_rd_32(ha, QLA82XX_CRB_DEV_STATE); ha 3388 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "Device state is 0x%x = %s\n", dev_state, ha 3393 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "HW State: COLD/RE-INIT\n"); ha 3394 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, QLA8XXX_DEV_COLD); ha 3395 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_set_rst_ready(ha); ha 3404 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_need_qsnt_handler(struct scsi_qla_host *ha) ha 3406 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_lock(ha); ha 3407 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_set_qsnt_ready(ha); ha 3408 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_unlock(ha); ha 3411 drivers/scsi/qla4xxx/ql4_nx.c static void qla4_82xx_set_idc_ver(struct scsi_qla_host *ha) ha 3416 drivers/scsi/qla4xxx/ql4_nx.c drv_active = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_ACTIVE); ha 3417 drivers/scsi/qla4xxx/ql4_nx.c if (drv_active == (1 << (ha->func_num * 4))) { ha 3418 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_IDC_VERSION, ha 3420 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 3424 drivers/scsi/qla4xxx/ql4_nx.c idc_ver = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_IDC_VERSION); ha 3426 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 3433 drivers/scsi/qla4xxx/ql4_nx.c static int qla4_83xx_set_idc_ver(struct scsi_qla_host *ha) ha 3439 drivers/scsi/qla4xxx/ql4_nx.c drv_active = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_ACTIVE); ha 3440 drivers/scsi/qla4xxx/ql4_nx.c if (drv_active == (1 << ha->func_num)) { ha 3441 drivers/scsi/qla4xxx/ql4_nx.c idc_ver = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_IDC_VERSION); ha 3444 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_IDC_VERSION, idc_ver); ha 3445 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 3449 drivers/scsi/qla4xxx/ql4_nx.c idc_ver = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_IDC_VERSION); ha 3452 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, ha 3462 drivers/scsi/qla4xxx/ql4_nx.c idc_ver = qla4_83xx_rd_reg(ha, QLA83XX_CRB_IDC_VER_MINOR); ha 3463 drivers/scsi/qla4xxx/ql4_nx.c idc_ver &= ~(0x03 << (ha->func_num * 2)); ha 3464 drivers/scsi/qla4xxx/ql4_nx.c idc_ver |= (QLA83XX_IDC_VER_MIN_VALUE << (ha->func_num * 2)); ha 3465 drivers/scsi/qla4xxx/ql4_nx.c qla4_83xx_wr_reg(ha, QLA83XX_CRB_IDC_VER_MINOR, idc_ver); ha 3471 drivers/scsi/qla4xxx/ql4_nx.c int qla4_8xxx_update_idc_reg(struct scsi_qla_host *ha) ha 3476 drivers/scsi/qla4xxx/ql4_nx.c if (test_bit(AF_INIT_DONE, &ha->flags)) ha 3479 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_lock(ha); ha 3480 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_set_drv_active(ha); ha 3486 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 3487 drivers/scsi/qla4xxx/ql4_nx.c drv_active = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DRV_ACTIVE); ha 3488 drivers/scsi/qla4xxx/ql4_nx.c if ((drv_active == (1 << ha->func_num)) && !ql4xdontresethba) ha 3489 drivers/scsi/qla4xxx/ql4_nx.c qla4_83xx_clear_idc_dontreset(ha); ha 3492 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8022(ha)) { ha 3493 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_set_idc_ver(ha); ha 3494 drivers/scsi/qla4xxx/ql4_nx.c } else if (is_qla8032(ha) || is_qla8042(ha)) { ha 3495 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_83xx_set_idc_ver(ha); ha 3497 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_clear_drv_active(ha); ha 3500 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_unlock(ha); ha 3512 drivers/scsi/qla4xxx/ql4_nx.c int qla4_8xxx_device_state_handler(struct scsi_qla_host *ha) ha 3518 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_8xxx_update_idc_reg(ha); ha 3522 drivers/scsi/qla4xxx/ql4_nx.c dev_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DEV_STATE); ha 3523 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Device state is 0x%x = %s\n", ha 3528 drivers/scsi/qla4xxx/ql4_nx.c dev_init_timeout = jiffies + (ha->nx_dev_init_timeout * HZ); ha 3530 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_lock(ha); ha 3534 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_WARNING, ha, ha 3539 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, ha 3543 drivers/scsi/qla4xxx/ql4_nx.c dev_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DEV_STATE); ha 3544 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "Device state is 0x%x = %s\n", ha 3553 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_8xxx_device_bootstrap(ha); ha 3556 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_unlock(ha); ha 3558 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_lock(ha); ha 3566 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 3567 drivers/scsi/qla4xxx/ql4_nx.c qla4_83xx_need_reset_handler(ha); ha 3568 drivers/scsi/qla4xxx/ql4_nx.c } else if (is_qla8022(ha)) { ha 3570 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_need_reset_handler(ha); ha 3574 drivers/scsi/qla4xxx/ql4_nx.c (ha->nx_dev_init_timeout * HZ); ha 3576 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_unlock(ha); ha 3578 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_lock(ha); ha 3584 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_need_qsnt_handler(ha); ha 3587 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_unlock(ha); ha 3589 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_lock(ha); ha 3592 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_unlock(ha); ha 3593 drivers/scsi/qla4xxx/ql4_nx.c qla4xxx_dead_adapter_cleanup(ha); ha 3595 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_lock(ha); ha 3598 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_unlock(ha); ha 3599 drivers/scsi/qla4xxx/ql4_nx.c qla4xxx_dead_adapter_cleanup(ha); ha 3601 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_lock(ha); ha 3606 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->idc_unlock(ha); ha 3611 drivers/scsi/qla4xxx/ql4_nx.c int qla4_8xxx_load_risc(struct scsi_qla_host *ha) ha 3616 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 3617 drivers/scsi/qla4xxx/ql4_nx.c writel(0, &ha->qla4_83xx_reg->risc_intr); ha 3618 drivers/scsi/qla4xxx/ql4_nx.c readl(&ha->qla4_83xx_reg->risc_intr); ha 3619 drivers/scsi/qla4xxx/ql4_nx.c } else if (is_qla8022(ha)) { ha 3620 drivers/scsi/qla4xxx/ql4_nx.c writel(0, &ha->qla4_82xx_reg->host_int); ha 3621 drivers/scsi/qla4xxx/ql4_nx.c readl(&ha->qla4_82xx_reg->host_int); ha 3624 drivers/scsi/qla4xxx/ql4_nx.c retval = qla4_8xxx_device_state_handler(ha); ha 3628 drivers/scsi/qla4xxx/ql4_nx.c qla4xxx_init_rings(ha); ha 3630 drivers/scsi/qla4xxx/ql4_nx.c if (retval == QLA_SUCCESS && !test_bit(AF_IRQ_ATTACHED, &ha->flags)) ha 3631 drivers/scsi/qla4xxx/ql4_nx.c retval = qla4xxx_request_irqs(ha); ha 3660 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_read_flash_data(struct scsi_qla_host *ha, uint32_t *dwptr, ha 3666 drivers/scsi/qla4xxx/ql4_nx.c while ((qla4_82xx_rom_lock(ha) != 0) && (loops < 50000)) { ha 3672 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_WARNING, ha, "ROM lock failed\n"); ha 3678 drivers/scsi/qla4xxx/ql4_nx.c if (qla4_82xx_do_rom_fast_read(ha, faddr, &val)) { ha 3679 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_WARNING, ha, ha 3687 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_rom_unlock(ha); ha 3695 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_read_optrom_data(struct scsi_qla_host *ha, uint8_t *buf, ha 3698 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_read_flash_data(ha, (uint32_t *)buf, offset, length); ha 3703 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_find_flt_start(struct scsi_qla_host *ha, uint32_t *start) ha 3715 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "FLTL[%s] = 0x%x.\n", loc, *start)); ha 3720 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_get_flt_info(struct scsi_qla_host *ha, uint32_t flt_addr) ha 3728 drivers/scsi/qla4xxx/ql4_nx.c struct ql82xx_hw_data *hw = &ha->hw; ha 3731 drivers/scsi/qla4xxx/ql4_nx.c wptr = (uint16_t *)ha->request_ring; ha 3732 drivers/scsi/qla4xxx/ql4_nx.c flt = (struct qla_flt_header *)ha->request_ring; ha 3735 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8022(ha)) { ha 3736 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_read_optrom_data(ha, (uint8_t *)ha->request_ring, ha 3738 drivers/scsi/qla4xxx/ql4_nx.c } else if (is_qla8032(ha) || is_qla8042(ha)) { ha 3739 drivers/scsi/qla4xxx/ql4_nx.c status = qla4_83xx_flash_read_u32(ha, flt_addr << 2, ha 3740 drivers/scsi/qla4xxx/ql4_nx.c (uint8_t *)ha->request_ring, ha 3749 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Unsupported FLT detected: " ha 3760 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Inconsistent FLT detected: " ha 3773 drivers/scsi/qla4xxx/ql4_nx.c DEBUG3(ql4_printk(KERN_DEBUG, ha, "FLT[%02x]: start=0x%x " ha 3820 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 3830 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_get_fdt_info(struct scsi_qla_host *ha) ha 3841 drivers/scsi/qla4xxx/ql4_nx.c struct ql82xx_hw_data *hw = &ha->hw; ha 3846 drivers/scsi/qla4xxx/ql4_nx.c wptr = (uint16_t *)ha->request_ring; ha 3847 drivers/scsi/qla4xxx/ql4_nx.c fdt = (struct qla_fdt_layout *)ha->request_ring; ha 3848 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_read_optrom_data(ha, (uint8_t *)ha->request_ring, ha 3863 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "Inconsistent FDT detected: " ha 3889 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "FDT[%s]: (0x%x/0x%x) erase=0x%x " ha 3897 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_get_idc_param(struct scsi_qla_host *ha) ha 3902 drivers/scsi/qla4xxx/ql4_nx.c if (!is_qla8022(ha)) ha 3904 drivers/scsi/qla4xxx/ql4_nx.c wptr = (uint32_t *)ha->request_ring; ha 3905 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_read_optrom_data(ha, (uint8_t *)ha->request_ring, ha 3909 drivers/scsi/qla4xxx/ql4_nx.c ha->nx_dev_init_timeout = ROM_DEV_INIT_TIMEOUT; ha 3910 drivers/scsi/qla4xxx/ql4_nx.c ha->nx_reset_timeout = ROM_DRV_RESET_ACK_TIMEOUT; ha 3912 drivers/scsi/qla4xxx/ql4_nx.c ha->nx_dev_init_timeout = le32_to_cpu(*wptr++); ha 3913 drivers/scsi/qla4xxx/ql4_nx.c ha->nx_reset_timeout = le32_to_cpu(*wptr); ha 3916 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_DEBUG, ha, ha 3917 drivers/scsi/qla4xxx/ql4_nx.c "ha->nx_dev_init_timeout = %d\n", ha->nx_dev_init_timeout)); ha 3918 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_DEBUG, ha, ha 3919 drivers/scsi/qla4xxx/ql4_nx.c "ha->nx_reset_timeout = %d\n", ha->nx_reset_timeout)); ha 3923 drivers/scsi/qla4xxx/ql4_nx.c void qla4_82xx_queue_mbox_cmd(struct scsi_qla_host *ha, uint32_t *mbx_cmd, ha 3930 drivers/scsi/qla4xxx/ql4_nx.c writel(mbx_cmd[i], &ha->qla4_82xx_reg->mailbox_in[i]); ha 3933 drivers/scsi/qla4xxx/ql4_nx.c writel(mbx_cmd[0], &ha->qla4_82xx_reg->mailbox_in[0]); ha 3934 drivers/scsi/qla4xxx/ql4_nx.c readl(&ha->qla4_82xx_reg->mailbox_in[0]); ha 3935 drivers/scsi/qla4xxx/ql4_nx.c writel(HINT_MBX_INT_PENDING, &ha->qla4_82xx_reg->hint); ha 3936 drivers/scsi/qla4xxx/ql4_nx.c readl(&ha->qla4_82xx_reg->hint); ha 3939 drivers/scsi/qla4xxx/ql4_nx.c void qla4_82xx_process_mbox_intr(struct scsi_qla_host *ha, int out_count) ha 3943 drivers/scsi/qla4xxx/ql4_nx.c intr_status = readl(&ha->qla4_82xx_reg->host_int); ha 3945 drivers/scsi/qla4xxx/ql4_nx.c ha->mbox_status_count = out_count; ha 3946 drivers/scsi/qla4xxx/ql4_nx.c intr_status = readl(&ha->qla4_82xx_reg->host_status); ha 3947 drivers/scsi/qla4xxx/ql4_nx.c ha->isp_ops->interrupt_service_routine(ha, intr_status); ha 3949 drivers/scsi/qla4xxx/ql4_nx.c if (test_bit(AF_INTERRUPTS_ON, &ha->flags) && ha 3950 drivers/scsi/qla4xxx/ql4_nx.c (!ha->pdev->msi_enabled && !ha->pdev->msix_enabled)) ha 3951 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, ha->nx_legacy_intr.tgt_mask_reg, ha 3957 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_get_flash_info(struct scsi_qla_host *ha) ha 3962 drivers/scsi/qla4xxx/ql4_nx.c ret = qla4_8xxx_find_flt_start(ha, &flt_addr); ha 3966 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_get_flt_info(ha, flt_addr); ha 3967 drivers/scsi/qla4xxx/ql4_nx.c if (is_qla8022(ha)) { ha 3968 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_get_fdt_info(ha); ha 3969 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_get_idc_param(ha); ha 3970 drivers/scsi/qla4xxx/ql4_nx.c } else if (is_qla8032(ha) || is_qla8042(ha)) { ha 3971 drivers/scsi/qla4xxx/ql4_nx.c qla4_83xx_get_idc_param(ha); ha 3987 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_stop_firmware(struct scsi_qla_host *ha) ha 3997 drivers/scsi/qla4xxx/ql4_nx.c status = qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, ha 4000 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(printk("scsi%ld: %s: status = %d\n", ha->host_no, ha 4010 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_isp_reset(struct scsi_qla_host *ha) ha 4015 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_idc_lock(ha); ha 4016 drivers/scsi/qla4xxx/ql4_nx.c dev_state = qla4_82xx_rd_32(ha, QLA82XX_CRB_DEV_STATE); ha 4019 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "HW State: NEED RESET\n"); ha 4020 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE, ha 4022 drivers/scsi/qla4xxx/ql4_nx.c set_bit(AF_8XXX_RST_OWNER, &ha->flags); ha 4024 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "HW State: DEVICE INITIALIZING\n"); ha 4026 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_idc_unlock(ha); ha 4028 drivers/scsi/qla4xxx/ql4_nx.c rval = qla4_8xxx_device_state_handler(ha); ha 4030 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_idc_lock(ha); ha 4031 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_clear_rst_ready(ha); ha 4032 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_idc_unlock(ha); ha 4035 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_INFO, ha, "Clearing AF_RECOVERY in qla4_82xx_isp_reset\n"); ha 4036 drivers/scsi/qla4xxx/ql4_nx.c clear_bit(AF_FW_RECOVERY, &ha->flags); ha 4047 drivers/scsi/qla4xxx/ql4_nx.c int qla4_8xxx_get_sys_info(struct scsi_qla_host *ha) ha 4055 drivers/scsi/qla4xxx/ql4_nx.c sys_info = dma_alloc_coherent(&ha->pdev->dev, sizeof(*sys_info), ha 4059 drivers/scsi/qla4xxx/ql4_nx.c ha->host_no, __func__)); ha 4071 drivers/scsi/qla4xxx/ql4_nx.c if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 6, &mbox_cmd[0], ha 4074 drivers/scsi/qla4xxx/ql4_nx.c ha->host_no, __func__)); ha 4079 drivers/scsi/qla4xxx/ql4_nx.c if (((is_qla8032(ha) || is_qla8042(ha)) ? mbox_sts[3] : mbox_sts[4]) < ha 4082 drivers/scsi/qla4xxx/ql4_nx.c " error (%x)\n", ha->host_no, __func__, mbox_sts[4])); ha 4087 drivers/scsi/qla4xxx/ql4_nx.c ha->port_num = sys_info->port_num; ha 4088 drivers/scsi/qla4xxx/ql4_nx.c memcpy(ha->my_mac, &sys_info->mac_addr[0], ha 4089 drivers/scsi/qla4xxx/ql4_nx.c min(sizeof(ha->my_mac), sizeof(sys_info->mac_addr))); ha 4090 drivers/scsi/qla4xxx/ql4_nx.c memcpy(ha->serial_number, &sys_info->serial_number, ha 4091 drivers/scsi/qla4xxx/ql4_nx.c min(sizeof(ha->serial_number), sizeof(sys_info->serial_number))); ha 4092 drivers/scsi/qla4xxx/ql4_nx.c memcpy(ha->model_name, &sys_info->board_id_str, ha 4093 drivers/scsi/qla4xxx/ql4_nx.c min(sizeof(ha->model_name), sizeof(sys_info->board_id_str))); ha 4094 drivers/scsi/qla4xxx/ql4_nx.c ha->phy_port_cnt = sys_info->phys_port_cnt; ha 4095 drivers/scsi/qla4xxx/ql4_nx.c ha->phy_port_num = sys_info->port_num; ha 4096 drivers/scsi/qla4xxx/ql4_nx.c ha->iscsi_pci_func_cnt = sys_info->iscsi_pci_func_cnt; ha 4099 drivers/scsi/qla4xxx/ql4_nx.c ha->host_no, __func__, ha->my_mac, ha->serial_number)); ha 4104 drivers/scsi/qla4xxx/ql4_nx.c dma_free_coherent(&ha->pdev->dev, sizeof(*sys_info), sys_info, ha 4111 drivers/scsi/qla4xxx/ql4_nx.c int qla4_8xxx_intr_enable(struct scsi_qla_host *ha) ha 4116 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s\n", __func__)); ha 4122 drivers/scsi/qla4xxx/ql4_nx.c if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, &mbox_cmd[0], ha 4124 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 4132 drivers/scsi/qla4xxx/ql4_nx.c int qla4_8xxx_intr_disable(struct scsi_qla_host *ha) ha 4137 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s\n", __func__)); ha 4143 drivers/scsi/qla4xxx/ql4_nx.c if (qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, &mbox_cmd[0], ha 4145 drivers/scsi/qla4xxx/ql4_nx.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 4155 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_enable_intrs(struct scsi_qla_host *ha) ha 4157 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_intr_enable(ha); ha 4159 drivers/scsi/qla4xxx/ql4_nx.c spin_lock_irq(&ha->hardware_lock); ha 4161 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, ha->nx_legacy_intr.tgt_mask_reg, 0xfbff); ha 4162 drivers/scsi/qla4xxx/ql4_nx.c spin_unlock_irq(&ha->hardware_lock); ha 4163 drivers/scsi/qla4xxx/ql4_nx.c set_bit(AF_INTERRUPTS_ON, &ha->flags); ha 4167 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_disable_intrs(struct scsi_qla_host *ha) ha 4169 drivers/scsi/qla4xxx/ql4_nx.c if (test_and_clear_bit(AF_INTERRUPTS_ON, &ha->flags)) ha 4170 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_intr_disable(ha); ha 4172 drivers/scsi/qla4xxx/ql4_nx.c spin_lock_irq(&ha->hardware_lock); ha 4174 drivers/scsi/qla4xxx/ql4_nx.c qla4_82xx_wr_32(ha, ha->nx_legacy_intr.tgt_mask_reg, 0x0400); ha 4175 drivers/scsi/qla4xxx/ql4_nx.c spin_unlock_irq(&ha->hardware_lock); ha 4179 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_enable_msix(struct scsi_qla_host *ha) ha 4183 drivers/scsi/qla4xxx/ql4_nx.c ret = pci_alloc_irq_vectors(ha->pdev, QLA_MSIX_ENTRIES, ha 4186 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_WARNING, ha, ha 4192 drivers/scsi/qla4xxx/ql4_nx.c ret = request_irq(pci_irq_vector(ha->pdev, 0), ha 4194 drivers/scsi/qla4xxx/ql4_nx.c ha); ha 4198 drivers/scsi/qla4xxx/ql4_nx.c ret = request_irq(pci_irq_vector(ha->pdev, 1), ha 4199 drivers/scsi/qla4xxx/ql4_nx.c qla4_8xxx_msix_rsp_q, 0, "qla4xxx (rsp_q)", ha); ha 4206 drivers/scsi/qla4xxx/ql4_nx.c free_irq(pci_irq_vector(ha->pdev, 0), ha); ha 4208 drivers/scsi/qla4xxx/ql4_nx.c pci_free_irq_vectors(ha->pdev); ha 4212 drivers/scsi/qla4xxx/ql4_nx.c int qla4_8xxx_check_init_adapter_retry(struct scsi_qla_host *ha) ha 4217 drivers/scsi/qla4xxx/ql4_nx.c if (!test_bit(AF_IRQ_ATTACHED, &ha->flags)) { ha 4218 drivers/scsi/qla4xxx/ql4_nx.c ql4_printk(KERN_WARNING, ha, "%s: Skipping retry of adapter initialization as IRQs are not attached\n", ha 4227 drivers/scsi/qla4xxx/ql4_nx.c qla4xxx_free_irqs(ha); ha 100 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_wait_for_hba_online(struct scsi_qla_host *ha); ha 104 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_config_dma_addressing(struct scsi_qla_host *ha); ha 264 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_isp_check_reg(struct scsi_qla_host *ha) ha 269 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8022(ha)) ha 270 drivers/scsi/qla4xxx/ql4_os.c reg_val = readl(&ha->qla4_82xx_reg->host_status); ha 271 drivers/scsi/qla4xxx/ql4_os.c else if (is_qla8032(ha) || is_qla8042(ha)) ha 272 drivers/scsi/qla4xxx/ql4_os.c reg_val = qla4_8xxx_rd_direct(ha, QLA8XXX_PEG_ALIVE_COUNTER); ha 274 drivers/scsi/qla4xxx/ql4_os.c reg_val = readw(&ha->reg->ctrl_status); ha 286 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 299 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: IPv4 Ping src: %pI4 " ha 301 drivers/scsi/qla4xxx/ql4_os.c &ha->ip_config.ip_address, ipaddr)); ha 302 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_ping_iocb(ha, options, payload_size, pid, ha 316 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: LinkLocal Ping " ha 318 drivers/scsi/qla4xxx/ql4_os.c &ha->ip_config.ipv6_link_local_addr, ha 321 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_ping_iocb(ha, options, payload_size, ha 324 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "%s: iface num = %d " ha 338 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: IPv6 " ha 341 drivers/scsi/qla4xxx/ql4_os.c &ha->ip_config.ipv6_addr0, ha 345 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: IPv6 " ha 348 drivers/scsi/qla4xxx/ql4_os.c &ha->ip_config.ipv6_addr1, ha 351 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_ping_iocb(ha, options, payload_size, ha 597 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_create_chap_list(struct scsi_qla_host *ha) ha 605 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha)) ha 611 drivers/scsi/qla4xxx/ql4_os.c chap_size = ha->hw.flt_chap_size / 2; ha 613 drivers/scsi/qla4xxx/ql4_os.c chap_flash_data = dma_alloc_coherent(&ha->pdev->dev, chap_size, ha 616 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "No memory for chap_flash_data\n"); ha 620 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha)) { ha 623 drivers/scsi/qla4xxx/ql4_os.c offset = FLASH_RAW_ACCESS_ADDR + (ha->hw.flt_region_chap << 2); ha 624 drivers/scsi/qla4xxx/ql4_os.c if (ha->port_num == 1) ha 628 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_get_flash(ha, chap_dma, offset, chap_size); ha 632 drivers/scsi/qla4xxx/ql4_os.c if (ha->chap_list == NULL) ha 633 drivers/scsi/qla4xxx/ql4_os.c ha->chap_list = vmalloc(chap_size); ha 634 drivers/scsi/qla4xxx/ql4_os.c if (ha->chap_list == NULL) { ha 635 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "No memory for ha->chap_list\n"); ha 639 drivers/scsi/qla4xxx/ql4_os.c memset(ha->chap_list, 0, chap_size); ha 640 drivers/scsi/qla4xxx/ql4_os.c memcpy(ha->chap_list, chap_flash_data, chap_size); ha 643 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, chap_size, chap_flash_data, chap_dma); ha 646 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_get_chap_by_index(struct scsi_qla_host *ha, ha 653 drivers/scsi/qla4xxx/ql4_os.c if (!ha->chap_list) { ha 654 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "CHAP table cache is empty!\n"); ha 659 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) ha 660 drivers/scsi/qla4xxx/ql4_os.c max_chap_entries = (ha->hw.flt_chap_size / 2) / ha 666 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Invalid Chap index\n"); ha 671 drivers/scsi/qla4xxx/ql4_os.c *chap_entry = (struct ql4_chap_table *)ha->chap_list + chap_index; ha 693 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_find_free_chap_index(struct scsi_qla_host *ha, ha 701 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) ha 702 drivers/scsi/qla4xxx/ql4_os.c max_chap_entries = (ha->hw.flt_chap_size / 2) / ha 707 drivers/scsi/qla4xxx/ql4_os.c if (!ha->chap_list) { ha 708 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "CHAP table cache is empty!\n"); ha 714 drivers/scsi/qla4xxx/ql4_os.c chap_table = (struct ql4_chap_table *)ha->chap_list + i; ha 738 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 745 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) ha 746 drivers/scsi/qla4xxx/ql4_os.c max_chap_entries = (ha->hw.flt_chap_size / 2) / ha 751 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: num_entries = %d, CHAP idx = %d\n", ha 759 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_create_chap_list(ha); ha 762 drivers/scsi/qla4xxx/ql4_os.c mutex_lock(&ha->chap_sem); ha 764 drivers/scsi/qla4xxx/ql4_os.c chap_table = (struct ql4_chap_table *)ha->chap_list + i; ha 790 drivers/scsi/qla4xxx/ql4_os.c mutex_unlock(&ha->chap_sem); ha 793 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: Valid CHAP Entries = %d\n", ha 837 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 845 drivers/scsi/qla4xxx/ql4_os.c chap_table = dma_pool_zalloc(ha->chap_dma_pool, GFP_KERNEL, &chap_dma); ha 849 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) ha 850 drivers/scsi/qla4xxx/ql4_os.c max_chap_entries = (ha->hw.flt_chap_size / 2) / ha 864 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "CHAP entry %d is in use, cannot " ha 871 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha)) ha 874 drivers/scsi/qla4xxx/ql4_os.c offset = FLASH_RAW_ACCESS_ADDR + (ha->hw.flt_region_chap << 2); ha 878 drivers/scsi/qla4xxx/ql4_os.c if (ha->port_num == 1) ha 879 drivers/scsi/qla4xxx/ql4_os.c offset += (ha->hw.flt_chap_size / 2); ha 883 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_flash(ha, chap_dma, offset, chap_size); ha 889 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "Chap Cookie: x%x\n", ha 893 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "No valid chap entry found\n"); ha 901 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_set_flash(ha, chap_dma, offset, chap_size, ha 903 drivers/scsi/qla4xxx/ql4_os.c if (ret == QLA_SUCCESS && ha->chap_list) { ha 904 drivers/scsi/qla4xxx/ql4_os.c mutex_lock(&ha->chap_sem); ha 906 drivers/scsi/qla4xxx/ql4_os.c memcpy((struct ql4_chap_table *)ha->chap_list + chap_tbl_idx, ha 908 drivers/scsi/qla4xxx/ql4_os.c mutex_unlock(&ha->chap_sem); ha 914 drivers/scsi/qla4xxx/ql4_os.c dma_pool_free(ha->chap_dma_pool, chap_table, chap_dma); ha 928 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 965 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 977 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) ha 978 drivers/scsi/qla4xxx/ql4_os.c max_chap_entries = (ha->hw.flt_chap_size / 2) / ha 983 drivers/scsi/qla4xxx/ql4_os.c mutex_lock(&ha->chap_sem); ha 985 drivers/scsi/qla4xxx/ql4_os.c rc = qla4xxx_get_chap_by_index(ha, chap_rec.chap_tbl_idx, ha 989 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 1000 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 1008 drivers/scsi/qla4xxx/ql4_os.c rc = qla4xxx_find_free_chap_index(ha, &chap_rec.chap_tbl_idx); ha 1010 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "CHAP entry not available\n"); ha 1016 drivers/scsi/qla4xxx/ql4_os.c rc = qla4xxx_set_chap(ha, chap_rec.username, chap_rec.password, ha 1020 drivers/scsi/qla4xxx/ql4_os.c mutex_unlock(&ha->chap_sem); ha 1029 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 1038 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "Func: %s\n", __func__)); ha 1043 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: host_stats size mismatch expected = %d, is = %d\n", ha 1057 drivers/scsi/qla4xxx/ql4_os.c ql_iscsi_stats = dma_alloc_coherent(&ha->pdev->dev, stats_size, ha 1060 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 1066 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_mgmt_data(ha, ddb_idx, stats_size, ha 1069 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 1223 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, host_stats_size, ha 1226 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: Get host stats done\n", ha 1236 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 1244 drivers/scsi/qla4xxx/ql4_os.c len = sprintf(buf, "%pI4\n", &ha->ip_config.ip_address); ha 1248 drivers/scsi/qla4xxx/ql4_os.c &ha->ip_config.subnet_mask); ha 1251 drivers/scsi/qla4xxx/ql4_os.c len = sprintf(buf, "%pI4\n", &ha->ip_config.gateway); ha 1255 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv4_options, ha 1258 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv6_options, ha 1266 drivers/scsi/qla4xxx/ql4_os.c (ha->ip_config.tcp_options & ha 1273 drivers/scsi/qla4xxx/ql4_os.c &ha->ip_config.ipv6_addr0); ha 1276 drivers/scsi/qla4xxx/ql4_os.c &ha->ip_config.ipv6_addr1); ha 1280 drivers/scsi/qla4xxx/ql4_os.c &ha->ip_config.ipv6_link_local_addr); ha 1284 drivers/scsi/qla4xxx/ql4_os.c &ha->ip_config.ipv6_default_router_addr); ha 1287 drivers/scsi/qla4xxx/ql4_os.c pval = (ha->ip_config.ipv6_addl_options & ha 1294 drivers/scsi/qla4xxx/ql4_os.c pval = (ha->ip_config.ipv6_addl_options & ha 1302 drivers/scsi/qla4xxx/ql4_os.c ival = ha->ip_config.ipv4_vlan_tag & ha 1305 drivers/scsi/qla4xxx/ql4_os.c ival = ha->ip_config.ipv6_vlan_tag & ha 1312 drivers/scsi/qla4xxx/ql4_os.c ival = (ha->ip_config.ipv4_vlan_tag >> 13) & ha 1315 drivers/scsi/qla4xxx/ql4_os.c ival = (ha->ip_config.ipv6_vlan_tag >> 13) & ha 1322 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv4_options, ha 1325 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv6_options, ha 1331 drivers/scsi/qla4xxx/ql4_os.c len = sprintf(buf, "%d\n", ha->ip_config.eth_mtu_size); ha 1336 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv4_port); ha 1339 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_port); ha 1344 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv4_addr_state); ha 1348 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_addr0_state); ha 1351 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_addr1_state); ha 1358 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_link_local_state); ha 1363 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_default_router_state); ha 1368 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(~ha->ip_config.tcp_options, ha 1371 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(~ha->ip_config.ipv6_tcp_options, ha 1378 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(~ha->ip_config.tcp_options, ha 1381 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(~ha->ip_config.ipv6_tcp_options, ha 1388 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(~ha->ip_config.tcp_options, ha 1391 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(~ha->ip_config.ipv6_tcp_options, ha 1400 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.tcp_wsf); ha 1403 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_tcp_wsf); ha 1407 drivers/scsi/qla4xxx/ql4_os.c ival = (ha->ip_config.tcp_options & ha 1410 drivers/scsi/qla4xxx/ql4_os.c ival = (ha->ip_config.ipv6_tcp_options & ha 1417 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.tcp_options, ha 1420 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv6_tcp_options, ha 1428 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv4_cache_id); ha 1431 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_cache_id); ha 1434 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.tcp_options, ha 1440 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.tcp_options, ha 1446 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv4_options, ha 1452 drivers/scsi/qla4xxx/ql4_os.c len = sprintf(buf, "%d\n", ha->ip_config.ipv4_tos); ha 1455 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv4_options, ha 1461 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv4_options, IPOPT_ALT_CID_EN, ha 1467 drivers/scsi/qla4xxx/ql4_os.c pval = (ha->ip_config.ipv4_alt_cid_len) ? ha 1468 drivers/scsi/qla4xxx/ql4_os.c (char *)ha->ip_config.ipv4_alt_cid : ""; ha 1473 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv4_options, ha 1479 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv4_options, ha 1485 drivers/scsi/qla4xxx/ql4_os.c pval = (ha->ip_config.ipv4_vid_len) ? ha 1486 drivers/scsi/qla4xxx/ql4_os.c (char *)ha->ip_config.ipv4_vid : ""; ha 1491 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv4_options, ha 1497 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(~ha->ip_config.ipv4_options, ha 1503 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv4_options, ha 1510 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv4_options, ha 1513 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv6_options, ha 1519 drivers/scsi/qla4xxx/ql4_os.c len = sprintf(buf, "%d\n", ha->ip_config.ipv4_ttl); ha 1522 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv6_options, ha 1528 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.ipv6_addl_options, ha 1534 drivers/scsi/qla4xxx/ql4_os.c len = sprintf(buf, "%u\n", ha->ip_config.ipv6_flow_lbl); ha 1538 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_traffic_class); ha 1542 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_hop_limit); ha 1546 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_nd_reach_time); ha 1550 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_nd_rexmit_timer); ha 1554 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_nd_stale_timeout); ha 1558 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_dup_addr_detect_count); ha 1562 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.ipv6_gw_advrt_mtu); ha 1570 drivers/scsi/qla4xxx/ql4_os.c len = sprintf(buf, "%d\n", ha->ip_config.def_timeout); ha 1573 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.iscsi_options, ha 1579 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.iscsi_options, ha 1585 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.iscsi_options, ha 1591 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.iscsi_options, ha 1597 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.iscsi_options, ha 1603 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.iscsi_options, ha 1610 drivers/scsi/qla4xxx/ql4_os.c (ha->ip_config.iscsi_options & ha 1615 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.iscsi_max_pdu_size * ha 1620 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.iscsi_first_burst_len * ha 1625 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.iscsi_max_outstnd_r2t); ha 1629 drivers/scsi/qla4xxx/ql4_os.c ha->ip_config.iscsi_max_burst_len * ha 1633 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.iscsi_options, ha 1639 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.iscsi_options, ha 1645 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.iscsi_options, ha 1651 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.iscsi_options, ha 1657 drivers/scsi/qla4xxx/ql4_os.c OP_STATE(ha->ip_config.iscsi_options, ha 1663 drivers/scsi/qla4xxx/ql4_os.c len = sprintf(buf, "%s\n", ha->ip_config.iscsi_name); ha 1680 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 1690 drivers/scsi/qla4xxx/ql4_os.c ha = iscsi_host_priv(shost); ha 1702 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: %pI4\n", __func__, ha 1708 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: %pI6\n", __func__, ha 1711 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "%s: Invalid endpoint\n", ha 1723 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 1727 drivers/scsi/qla4xxx/ql4_os.c ha = to_qla_host(qla_ep->host); ha 1728 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(pr_info_ratelimited("%s: host: %ld\n", __func__, ha->host_no)); ha 1730 drivers/scsi/qla4xxx/ql4_os.c if (adapter_up(ha) && !test_bit(AF_BUILD_DDB_LIST, &ha->flags)) ha 1739 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 1742 drivers/scsi/qla4xxx/ql4_os.c ha = to_qla_host(qla_ep->host); ha 1743 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: host: %ld\n", __func__, ha 1744 drivers/scsi/qla4xxx/ql4_os.c ha->host_no)); ha 1754 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 1759 drivers/scsi/qla4xxx/ql4_os.c ha = to_qla_host(qla_ep->host); ha 1760 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: host: %ld\n", __func__, ha 1761 drivers/scsi/qla4xxx/ql4_os.c ha->host_no)); ha 1783 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 1792 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 1794 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: host: %ld\n", __func__, ha 1795 drivers/scsi/qla4xxx/ql4_os.c ha->host_no)); ha 1798 drivers/scsi/qla4xxx/ql4_os.c ql_iscsi_stats = dma_alloc_coherent(&ha->pdev->dev, stats_size, ha 1801 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 1806 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_mgmt_data(ha, ddb_entry->fw_ddb_index, stats_size, ha 1809 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 1839 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, stats_size, ql_iscsi_stats, ha 1865 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 1869 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_get_firmware_state(ha); ha 1871 drivers/scsi/qla4xxx/ql4_os.c switch (ha->addl_fw_state & 0x0F00) { ha 1890 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 1894 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(AF_LINK_UP, &ha->flags)) ha 1903 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 1908 drivers/scsi/qla4xxx/ql4_os.c len = sysfs_format_mac(buf, ha->my_mac, MAC_ADDR_LEN); ha 1911 drivers/scsi/qla4xxx/ql4_os.c len = sprintf(buf, "%pI4\n", &ha->ip_config.ip_address); ha 1914 drivers/scsi/qla4xxx/ql4_os.c len = sprintf(buf, "%s\n", ha->name_string); ha 1931 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_create_ipv4_iface(struct scsi_qla_host *ha) ha 1933 drivers/scsi/qla4xxx/ql4_os.c if (ha->iface_ipv4) ha 1937 drivers/scsi/qla4xxx/ql4_os.c ha->iface_ipv4 = iscsi_create_iface(ha->host, ha 1940 drivers/scsi/qla4xxx/ql4_os.c if (!ha->iface_ipv4) ha 1941 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Could not create IPv4 iSCSI " ha 1945 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_create_ipv6_iface(struct scsi_qla_host *ha) ha 1947 drivers/scsi/qla4xxx/ql4_os.c if (!ha->iface_ipv6_0) ha 1949 drivers/scsi/qla4xxx/ql4_os.c ha->iface_ipv6_0 = iscsi_create_iface(ha->host, ha 1953 drivers/scsi/qla4xxx/ql4_os.c if (!ha->iface_ipv6_0) ha 1954 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Could not create IPv6 iSCSI " ha 1957 drivers/scsi/qla4xxx/ql4_os.c if (!ha->iface_ipv6_1) ha 1959 drivers/scsi/qla4xxx/ql4_os.c ha->iface_ipv6_1 = iscsi_create_iface(ha->host, ha 1963 drivers/scsi/qla4xxx/ql4_os.c if (!ha->iface_ipv6_1) ha 1964 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Could not create IPv6 iSCSI " ha 1968 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_create_ifaces(struct scsi_qla_host *ha) ha 1970 drivers/scsi/qla4xxx/ql4_os.c if (ha->ip_config.ipv4_options & IPOPT_IPV4_PROTOCOL_ENABLE) ha 1971 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_create_ipv4_iface(ha); ha 1973 drivers/scsi/qla4xxx/ql4_os.c if (ha->ip_config.ipv6_options & IPV6_OPT_IPV6_PROTOCOL_ENABLE) ha 1974 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_create_ipv6_iface(ha); ha 1977 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_destroy_ipv4_iface(struct scsi_qla_host *ha) ha 1979 drivers/scsi/qla4xxx/ql4_os.c if (ha->iface_ipv4) { ha 1980 drivers/scsi/qla4xxx/ql4_os.c iscsi_destroy_iface(ha->iface_ipv4); ha 1981 drivers/scsi/qla4xxx/ql4_os.c ha->iface_ipv4 = NULL; ha 1985 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_destroy_ipv6_iface(struct scsi_qla_host *ha) ha 1987 drivers/scsi/qla4xxx/ql4_os.c if (ha->iface_ipv6_0) { ha 1988 drivers/scsi/qla4xxx/ql4_os.c iscsi_destroy_iface(ha->iface_ipv6_0); ha 1989 drivers/scsi/qla4xxx/ql4_os.c ha->iface_ipv6_0 = NULL; ha 1991 drivers/scsi/qla4xxx/ql4_os.c if (ha->iface_ipv6_1) { ha 1992 drivers/scsi/qla4xxx/ql4_os.c iscsi_destroy_iface(ha->iface_ipv6_1); ha 1993 drivers/scsi/qla4xxx/ql4_os.c ha->iface_ipv6_1 = NULL; ha 1997 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_destroy_ifaces(struct scsi_qla_host *ha) ha 1999 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_destroy_ipv4_iface(ha); ha 2000 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_destroy_ipv6_iface(ha); ha 2003 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_set_ipv6(struct scsi_qla_host *ha, ha 2048 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 2065 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 2081 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_create_ipv6_iface(ha); ha 2086 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_destroy_ipv6_iface(ha); ha 2246 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Unknown IPv6 param = %d\n", ha 2252 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_set_ipv4(struct scsi_qla_host *ha, ha 2277 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Invalid IPv4 bootproto\n"); ha 2283 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_create_ipv4_iface(ha); ha 2288 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_destroy_ipv4_iface(ha); ha 2504 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Unknown IPv4 param = %d\n", ha 2510 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_set_iscsi_param(struct scsi_qla_host *ha, ha 2666 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Unknown iscsi param = %d\n", ha 2697 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 2707 drivers/scsi/qla4xxx/ql4_os.c init_fw_cb = dma_alloc_coherent(&ha->pdev->dev, ha 2711 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: Unable to alloc init_cb\n", ha 2719 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_get_ifcb(ha, &mbox_cmd[0], &mbox_sts[0], init_fw_cb_dma)) { ha 2720 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: get ifcb failed\n", __func__); ha 2733 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_set_ipv4(ha, iface_param, ha 2738 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 2748 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_set_ipv6(ha, iface_param, ha 2753 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 2760 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 2765 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_set_iscsi_param(ha, iface_param, ha 2774 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_set_flash(ha, init_fw_cb_dma, FLASH_SEGMENT_IFCB, ha 2778 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: set flash mbx failed\n", ha 2784 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_disable_acb(ha); ha 2786 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: disable acb mbx failed\n", ha 2792 drivers/scsi/qla4xxx/ql4_os.c wait_for_completion_timeout(&ha->disable_acb_comp, ha 2797 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_set_acb(ha, &mbox_cmd[0], &mbox_sts[0], init_fw_cb_dma); ha 2799 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: set acb mbx failed\n", ha 2806 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_update_local_ifcb(ha, &mbox_cmd[0], &mbox_sts[0], init_fw_cb, ha 2810 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(struct addr_ctrl_blk), ha 2821 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = ddb_entry->ha; ha 2830 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_get_chap_index(ha, sess->username_in, ha 2847 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_get_chap_index(ha, sess->username, ha 2866 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_get_uni_chap_at_index(ha, chap_tbl.name, ha 2907 drivers/scsi/qla4xxx/ql4_os.c int qla4xxx_get_ddb_index(struct scsi_qla_host *ha, uint16_t *ddb_index) ha 2914 drivers/scsi/qla4xxx/ql4_os.c tmp_ddb_index = find_first_zero_bit(ha->ddb_idx_map, MAX_DDB_ENTRIES); ha 2917 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2923 drivers/scsi/qla4xxx/ql4_os.c if (test_and_set_bit(tmp_ddb_index, ha->ddb_idx_map)) ha 2926 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2928 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_req_ddb_entry(ha, tmp_ddb_index, &mbx_sts); ha 2931 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 2936 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 2946 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_match_ipaddress(struct scsi_qla_host *ha, ha 2980 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_match_fwdb_session(struct scsi_qla_host *ha, ha 2997 drivers/scsi/qla4xxx/ql4_os.c max_ddbs = is_qla40XX(ha) ? MAX_DEV_DB_ENTRIES_40XX : ha 3001 drivers/scsi/qla4xxx/ql4_os.c ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, idx); ha 3016 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 3021 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 3026 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 3033 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_match_ipaddress(ha, ddb_entry, ha 3046 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 3057 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 3072 drivers/scsi/qla4xxx/ql4_os.c ha = to_qla_host(qla_ep->host); ha 3073 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: host: %ld\n", __func__, ha 3074 drivers/scsi/qla4xxx/ql4_os.c ha->host_no)); ha 3076 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_ddb_index(ha, &ddb_index); ha 3091 drivers/scsi/qla4xxx/ql4_os.c ddb_entry->ha = ha; ha 3097 drivers/scsi/qla4xxx/ql4_os.c ha->fw_ddb_index_map[ddb_entry->fw_ddb_index] = ddb_entry; ha 3098 drivers/scsi/qla4xxx/ql4_os.c ha->tot_ddbs++; ha 3107 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 3116 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 3117 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: host: %ld\n", __func__, ha 3118 drivers/scsi/qla4xxx/ql4_os.c ha->host_no)); ha 3120 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 3123 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 3130 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_fwddb_entry(ha, ddb_entry->fw_ddb_index, ha 3145 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_clear_ddb_entry(ha, ddb_entry->fw_ddb_index); ha 3147 drivers/scsi/qla4xxx/ql4_os.c clear_bit(ddb_entry->fw_ddb_index, ha->ddb_idx_map); ha 3148 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 3149 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_free_ddb(ha, ddb_entry); ha 3150 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 3155 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 3165 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 3179 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 3180 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: conn_idx = %u\n", __func__, ha 3193 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 3198 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 3200 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: sid = %d, cid = %d\n", __func__, ha 3219 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 3228 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 3229 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: sid = %d, cid = %d\n", __func__, ha 3236 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_match_fwdb_session(ha, cls_conn); ha 3238 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 3244 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 3247 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 3253 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_set_param_ddbentry(ha, ddb_entry, cls_conn, &mbx_sts); ha 3267 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: Failed set param for index[%d]\n", ha 3272 drivers/scsi/qla4xxx/ql4_os.c status = qla4xxx_conn_open(ha, ddb_entry->fw_ddb_index); ha 3274 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: Login failed: %s\n", __func__, ha 3291 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 3300 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 3306 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 3307 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: cid = %d\n", __func__, ha 3311 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_session_logout_ddb(ha, ddb_entry, options) == QLA_ERROR) ha 3312 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: Logout failed\n", __func__); ha 3318 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 3329 drivers/scsi/qla4xxx/ql4_os.c ha = task_data->ha; ha 3352 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Passthru failed status = 0x%x\n", ha 3364 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 3369 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 3374 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 3380 drivers/scsi/qla4xxx/ql4_os.c task_data->ha = ha; ha 3384 drivers/scsi/qla4xxx/ql4_os.c task_data->data_dma = dma_map_single(&ha->pdev->dev, task->data, ha 3389 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: MaxRecvLen %u, iscsi hrd %d\n", ha 3393 drivers/scsi/qla4xxx/ql4_os.c task_data->resp_buffer = dma_alloc_coherent(&ha->pdev->dev, ha 3401 drivers/scsi/qla4xxx/ql4_os.c task_data->req_buffer = dma_alloc_coherent(&ha->pdev->dev, ha 3416 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, task_data->resp_len, ha 3420 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, task_data->req_len, ha 3430 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 3436 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 3440 drivers/scsi/qla4xxx/ql4_os.c dma_unmap_single(&ha->pdev->dev, task_data->data_dma, ha 3444 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: MaxRecvLen %u, iscsi hrd %d\n", ha 3447 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, task_data->resp_len, ha 3449 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, task_data->req_len, ha 3459 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = ddb_entry->ha; ha 3464 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: scsi cmd xmit not implemented\n", ha 3817 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_copy_fwddb_param(struct scsi_qla_host *ha, ha 3859 drivers/scsi/qla4xxx/ql4_os.c (char *)ha->name_string, buflen); ha 3862 drivers/scsi/qla4xxx/ql4_os.c if (!qla4xxx_get_uni_chap_at_index(ha, chap_tbl.name, ha 3875 drivers/scsi/qla4xxx/ql4_os.c void qla4xxx_update_session_conn_fwddb_param(struct scsi_qla_host *ha, ha 3884 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 3887 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 3892 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_get_fwddb_entry(ha, ddb_entry->fw_ddb_index, fw_ddb_entry, ha 3895 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, "scsi%ld: %s: failed " ha 3897 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__, ha 3907 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_copy_fwddb_param(ha, fw_ddb_entry, cls_sess, cls_conn); ha 3911 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 3915 drivers/scsi/qla4xxx/ql4_os.c void qla4xxx_update_session_conn_param(struct scsi_qla_host *ha, ha 3926 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 3929 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 3934 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_get_fwddb_entry(ha, ddb_entry->fw_ddb_index, fw_ddb_entry, ha 3937 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, "scsi%ld: %s: failed " ha 3939 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__, ha 3962 drivers/scsi/qla4xxx/ql4_os.c memcpy(sess->initiatorname, ha->name_string, ha 3963 drivers/scsi/qla4xxx/ql4_os.c min(sizeof(ha->name_string), sizeof(sess->initiatorname))); ha 3967 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 3976 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_start_timer(struct scsi_qla_host *ha, ha 3980 drivers/scsi/qla4xxx/ql4_os.c __func__, ha->host->host_no)); ha 3981 drivers/scsi/qla4xxx/ql4_os.c timer_setup(&ha->timer, qla4xxx_timer, 0); ha 3982 drivers/scsi/qla4xxx/ql4_os.c ha->timer.expires = jiffies + interval * HZ; ha 3983 drivers/scsi/qla4xxx/ql4_os.c add_timer(&ha->timer); ha 3984 drivers/scsi/qla4xxx/ql4_os.c ha->timer_active = 1; ha 3987 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_stop_timer(struct scsi_qla_host *ha) ha 3989 drivers/scsi/qla4xxx/ql4_os.c del_timer_sync(&ha->timer); ha 3990 drivers/scsi/qla4xxx/ql4_os.c ha->timer_active = 0; ha 4011 drivers/scsi/qla4xxx/ql4_os.c void qla4xxx_mark_all_devices_missing(struct scsi_qla_host *ha) ha 4013 drivers/scsi/qla4xxx/ql4_os.c iscsi_host_for_each_session(ha->host, qla4xxx_mark_device_missing); ha 4016 drivers/scsi/qla4xxx/ql4_os.c static struct srb* qla4xxx_get_new_srb(struct scsi_qla_host *ha, ha 4022 drivers/scsi/qla4xxx/ql4_os.c srb = mempool_alloc(ha->srb_mempool, GFP_ATOMIC); ha 4027 drivers/scsi/qla4xxx/ql4_os.c srb->ha = ha; ha 4036 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_srb_free_dma(struct scsi_qla_host *ha, struct srb *srb) ha 4051 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = srb->ha; ha 4053 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_srb_free_dma(ha, srb); ha 4055 drivers/scsi/qla4xxx/ql4_os.c mempool_free(srb, ha->srb_mempool); ha 4075 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(host); ha 4081 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(AF_EEH_BUSY, &ha->flags)) { ha 4082 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(AF_PCI_CHANNEL_IO_PERM_FAILURE, &ha->flags)) ha 4100 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags) || ha 4101 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags) || ha 4102 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESET_HA, &ha->dpc_flags) || ha 4103 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags) || ha 4104 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_HA_NEED_QUIESCENT, &ha->dpc_flags) || ha 4105 drivers/scsi/qla4xxx/ql4_os.c !test_bit(AF_ONLINE, &ha->flags) || ha 4106 drivers/scsi/qla4xxx/ql4_os.c !test_bit(AF_LINK_UP, &ha->flags) || ha 4107 drivers/scsi/qla4xxx/ql4_os.c test_bit(AF_LOOPBACK, &ha->flags) || ha 4108 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_POST_IDC_ACK, &ha->dpc_flags) || ha 4109 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESTORE_ACB, &ha->dpc_flags) || ha 4110 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags)) ha 4113 drivers/scsi/qla4xxx/ql4_os.c srb = qla4xxx_get_new_srb(ha, ddb_entry, cmd); ha 4117 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_send_command_to_isp(ha, srb); ha 4124 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_srb_free_dma(ha, srb); ha 4125 drivers/scsi/qla4xxx/ql4_os.c mempool_free(srb, ha->srb_mempool); ha 4142 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_mem_free(struct scsi_qla_host *ha) ha 4144 drivers/scsi/qla4xxx/ql4_os.c if (ha->queues) ha 4145 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, ha->queues_len, ha->queues, ha 4146 drivers/scsi/qla4xxx/ql4_os.c ha->queues_dma); ha 4148 drivers/scsi/qla4xxx/ql4_os.c if (ha->fw_dump) ha 4149 drivers/scsi/qla4xxx/ql4_os.c vfree(ha->fw_dump); ha 4151 drivers/scsi/qla4xxx/ql4_os.c ha->queues_len = 0; ha 4152 drivers/scsi/qla4xxx/ql4_os.c ha->queues = NULL; ha 4153 drivers/scsi/qla4xxx/ql4_os.c ha->queues_dma = 0; ha 4154 drivers/scsi/qla4xxx/ql4_os.c ha->request_ring = NULL; ha 4155 drivers/scsi/qla4xxx/ql4_os.c ha->request_dma = 0; ha 4156 drivers/scsi/qla4xxx/ql4_os.c ha->response_ring = NULL; ha 4157 drivers/scsi/qla4xxx/ql4_os.c ha->response_dma = 0; ha 4158 drivers/scsi/qla4xxx/ql4_os.c ha->shadow_regs = NULL; ha 4159 drivers/scsi/qla4xxx/ql4_os.c ha->shadow_regs_dma = 0; ha 4160 drivers/scsi/qla4xxx/ql4_os.c ha->fw_dump = NULL; ha 4161 drivers/scsi/qla4xxx/ql4_os.c ha->fw_dump_size = 0; ha 4164 drivers/scsi/qla4xxx/ql4_os.c mempool_destroy(ha->srb_mempool); ha 4165 drivers/scsi/qla4xxx/ql4_os.c ha->srb_mempool = NULL; ha 4167 drivers/scsi/qla4xxx/ql4_os.c dma_pool_destroy(ha->chap_dma_pool); ha 4169 drivers/scsi/qla4xxx/ql4_os.c if (ha->chap_list) ha 4170 drivers/scsi/qla4xxx/ql4_os.c vfree(ha->chap_list); ha 4171 drivers/scsi/qla4xxx/ql4_os.c ha->chap_list = NULL; ha 4173 drivers/scsi/qla4xxx/ql4_os.c dma_pool_destroy(ha->fw_ddb_dma_pool); ha 4176 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8022(ha)) { ha 4177 drivers/scsi/qla4xxx/ql4_os.c if (ha->nx_pcibase) ha 4179 drivers/scsi/qla4xxx/ql4_os.c (struct device_reg_82xx __iomem *)ha->nx_pcibase); ha 4180 drivers/scsi/qla4xxx/ql4_os.c } else if (is_qla8032(ha) || is_qla8042(ha)) { ha 4181 drivers/scsi/qla4xxx/ql4_os.c if (ha->nx_pcibase) ha 4183 drivers/scsi/qla4xxx/ql4_os.c (struct device_reg_83xx __iomem *)ha->nx_pcibase); ha 4184 drivers/scsi/qla4xxx/ql4_os.c } else if (ha->reg) { ha 4185 drivers/scsi/qla4xxx/ql4_os.c iounmap(ha->reg); ha 4188 drivers/scsi/qla4xxx/ql4_os.c if (ha->reset_tmplt.buff) ha 4189 drivers/scsi/qla4xxx/ql4_os.c vfree(ha->reset_tmplt.buff); ha 4191 drivers/scsi/qla4xxx/ql4_os.c pci_release_regions(ha->pdev); ha 4201 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_mem_alloc(struct scsi_qla_host *ha) ha 4206 drivers/scsi/qla4xxx/ql4_os.c ha->queues_len = ((REQUEST_QUEUE_DEPTH * QUEUE_SIZE) + ha 4211 drivers/scsi/qla4xxx/ql4_os.c ha->queues = dma_alloc_coherent(&ha->pdev->dev, ha->queues_len, ha 4212 drivers/scsi/qla4xxx/ql4_os.c &ha->queues_dma, GFP_KERNEL); ha 4213 drivers/scsi/qla4xxx/ql4_os.c if (ha->queues == NULL) { ha 4214 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, ha 4225 drivers/scsi/qla4xxx/ql4_os.c if ((unsigned long)ha->queues_dma & (MEM_ALIGN_VALUE - 1)) ha 4226 drivers/scsi/qla4xxx/ql4_os.c align = MEM_ALIGN_VALUE - ((unsigned long)ha->queues_dma & ha 4230 drivers/scsi/qla4xxx/ql4_os.c ha->request_dma = ha->queues_dma + align; ha 4231 drivers/scsi/qla4xxx/ql4_os.c ha->request_ring = (struct queue_entry *) (ha->queues + align); ha 4232 drivers/scsi/qla4xxx/ql4_os.c ha->response_dma = ha->queues_dma + align + ha 4234 drivers/scsi/qla4xxx/ql4_os.c ha->response_ring = (struct queue_entry *) (ha->queues + align + ha 4237 drivers/scsi/qla4xxx/ql4_os.c ha->shadow_regs_dma = ha->queues_dma + align + ha 4240 drivers/scsi/qla4xxx/ql4_os.c ha->shadow_regs = (struct shadow_regs *) (ha->queues + align + ha 4247 drivers/scsi/qla4xxx/ql4_os.c ha->srb_mempool = mempool_create(SRB_MIN_REQ, mempool_alloc_slab, ha 4249 drivers/scsi/qla4xxx/ql4_os.c if (ha->srb_mempool == NULL) { ha 4250 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, ha 4256 drivers/scsi/qla4xxx/ql4_os.c ha->chap_dma_pool = dma_pool_create("ql4_chap", &ha->pdev->dev, ha 4259 drivers/scsi/qla4xxx/ql4_os.c if (ha->chap_dma_pool == NULL) { ha 4260 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, ha 4265 drivers/scsi/qla4xxx/ql4_os.c ha->fw_ddb_dma_pool = dma_pool_create("ql4_fw_ddb", &ha->pdev->dev, ha 4268 drivers/scsi/qla4xxx/ql4_os.c if (ha->fw_ddb_dma_pool == NULL) { ha 4269 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, ha 4287 drivers/scsi/qla4xxx/ql4_os.c static int qla4_8xxx_check_temp(struct scsi_qla_host *ha) ha 4292 drivers/scsi/qla4xxx/ql4_os.c temp = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_TEMP_STATE); ha 4298 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "Device temperature %d degrees C" ha 4303 drivers/scsi/qla4xxx/ql4_os.c if (ha->temperature == QLA82XX_TEMP_NORMAL) ha 4304 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "Device temperature %d" ha 4308 drivers/scsi/qla4xxx/ql4_os.c if (ha->temperature == QLA82XX_TEMP_WARN) ha 4309 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "Device temperature is" ha 4313 drivers/scsi/qla4xxx/ql4_os.c ha->temperature = temp_state; ha 4323 drivers/scsi/qla4xxx/ql4_os.c static int qla4_8xxx_check_fw_alive(struct scsi_qla_host *ha) ha 4328 drivers/scsi/qla4xxx/ql4_os.c fw_heartbeat_counter = qla4_8xxx_rd_direct(ha, ha 4334 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__)); ha 4338 drivers/scsi/qla4xxx/ql4_os.c if (ha->fw_heartbeat_counter == fw_heartbeat_counter) { ha 4339 drivers/scsi/qla4xxx/ql4_os.c ha->seconds_since_last_heartbeat++; ha 4341 drivers/scsi/qla4xxx/ql4_os.c if (ha->seconds_since_last_heartbeat == 2) { ha 4342 drivers/scsi/qla4xxx/ql4_os.c ha->seconds_since_last_heartbeat = 0; ha 4343 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_dump_peg_reg(ha); ha 4347 drivers/scsi/qla4xxx/ql4_os.c ha->seconds_since_last_heartbeat = 0; ha 4349 drivers/scsi/qla4xxx/ql4_os.c ha->fw_heartbeat_counter = fw_heartbeat_counter; ha 4353 drivers/scsi/qla4xxx/ql4_os.c static void qla4_8xxx_process_fw_error(struct scsi_qla_host *ha) ha 4358 drivers/scsi/qla4xxx/ql4_os.c halt_status = qla4_8xxx_rd_direct(ha, QLA8XXX_PEG_HALT_STATUS1); ha 4360 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8022(ha)) { ha 4361 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: disabling pause transmit on port 0 & 1.\n", ha 4363 drivers/scsi/qla4xxx/ql4_os.c qla4_82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x98, ha 4368 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: Firmware aborted with error code 0x00006700. Device is being reset\n", ha 4372 drivers/scsi/qla4xxx/ql4_os.c } else if (is_qla8032(ha) || is_qla8042(ha)) { ha 4374 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: Firmware error detected device is being reset\n", ha 4385 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags); ha 4387 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: detect abort needed!\n", ha 4389 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 4391 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_mailbox_premature_completion(ha); ha 4392 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_wake_dpc(ha); ha 4401 drivers/scsi/qla4xxx/ql4_os.c void qla4_8xxx_watchdog(struct scsi_qla_host *ha) ha 4406 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8032(ha) && ha 4407 drivers/scsi/qla4xxx/ql4_os.c (qla4_83xx_is_detached(ha) == QLA_SUCCESS)) ha 4409 drivers/scsi/qla4xxx/ql4_os.c __func__, ha->func_num); ha 4412 drivers/scsi/qla4xxx/ql4_os.c if (!(test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags) || ha 4413 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESET_HA, &ha->dpc_flags) || ha 4414 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags))) { ha 4415 drivers/scsi/qla4xxx/ql4_os.c dev_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DEV_STATE); ha 4417 drivers/scsi/qla4xxx/ql4_os.c if (qla4_8xxx_check_temp(ha)) { ha 4418 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8022(ha)) { ha 4419 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "disabling pause transmit on port 0 & 1.\n"); ha 4420 drivers/scsi/qla4xxx/ql4_os.c qla4_82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x98, ha 4424 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags); ha 4425 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_wake_dpc(ha); ha 4427 drivers/scsi/qla4xxx/ql4_os.c !test_bit(DPC_RESET_HA, &ha->dpc_flags)) { ha 4429 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: HW State: NEED RESET!\n", ha 4432 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 4433 drivers/scsi/qla4xxx/ql4_os.c idc_ctrl = qla4_83xx_rd_reg(ha, ha 4436 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: Graceful reset bit is not set\n", ha 4439 drivers/scsi/qla4xxx/ql4_os.c ha); ha 4443 drivers/scsi/qla4xxx/ql4_os.c if ((is_qla8032(ha) || is_qla8042(ha)) || ha 4444 drivers/scsi/qla4xxx/ql4_os.c (is_qla8022(ha) && !ql4xdontresethba)) { ha 4445 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 4446 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_wake_dpc(ha); ha 4449 drivers/scsi/qla4xxx/ql4_os.c !test_bit(DPC_HA_NEED_QUIESCENT, &ha->dpc_flags)) { ha 4450 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: HW State: NEED QUIES!\n", ha 4452 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_HA_NEED_QUIESCENT, &ha->dpc_flags); ha 4453 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_wake_dpc(ha); ha 4456 drivers/scsi/qla4xxx/ql4_os.c if (qla4_8xxx_check_fw_alive(ha)) ha 4457 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_process_fw_error(ha); ha 4466 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 4470 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 4475 drivers/scsi/qla4xxx/ql4_os.c if (adapter_up(ha) && !test_bit(DF_RELOGIN, &ddb_entry->flags) && ha 4483 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RELOGIN_DEVICE, &ha->dpc_flags); ha 4485 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 4503 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 4509 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RELOGIN_DEVICE, &ha->dpc_flags); ha 4522 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = from_timer(ha, t, timer); ha 4526 drivers/scsi/qla4xxx/ql4_os.c iscsi_host_for_each_session(ha->host, qla4xxx_check_relogin_flash_ddb); ha 4531 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(AF_EEH_BUSY, &ha->flags)) { ha 4532 drivers/scsi/qla4xxx/ql4_os.c mod_timer(&ha->timer, jiffies + HZ); ha 4537 drivers/scsi/qla4xxx/ql4_os.c if (!pci_channel_offline(ha->pdev)) ha 4538 drivers/scsi/qla4xxx/ql4_os.c pci_read_config_word(ha->pdev, PCI_VENDOR_ID, &w); ha 4540 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) ha 4541 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_watchdog(ha); ha 4543 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha)) { ha 4545 drivers/scsi/qla4xxx/ql4_os.c if (ha->firmware_options & FWOPT_HEARTBEAT_ENABLE && ha 4546 drivers/scsi/qla4xxx/ql4_os.c ha->heartbeat_interval != 0) { ha 4547 drivers/scsi/qla4xxx/ql4_os.c ha->seconds_since_last_heartbeat++; ha 4548 drivers/scsi/qla4xxx/ql4_os.c if (ha->seconds_since_last_heartbeat > ha 4549 drivers/scsi/qla4xxx/ql4_os.c ha->heartbeat_interval + 2) ha 4550 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 4555 drivers/scsi/qla4xxx/ql4_os.c if (!list_empty(&ha->work_list)) ha 4560 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESET_HA, &ha->dpc_flags) || ha 4561 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags) || ha 4562 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RELOGIN_DEVICE, &ha->dpc_flags) || ha 4563 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags) || ha 4564 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags) || ha 4565 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags) || ha 4566 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_LINK_CHANGED, &ha->dpc_flags) || ha 4567 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags) || ha 4568 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_HA_NEED_QUIESCENT, &ha->dpc_flags) || ha 4569 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_SYSFS_DDB_EXPORT, &ha->dpc_flags) || ha 4570 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_AEN, &ha->dpc_flags)) { ha 4573 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__, ha->dpc_flags)); ha 4574 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_wake_dpc(ha); ha 4578 drivers/scsi/qla4xxx/ql4_os.c mod_timer(&ha->timer, jiffies + HZ); ha 4580 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ha->seconds_since_last_intr++); ha 4590 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_cmd_wait(struct scsi_qla_host *ha) ha 4598 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha)) ha 4601 drivers/scsi/qla4xxx/ql4_os.c wtmo = ha->nx_reset_timeout / 2; ha 4605 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 4610 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4612 drivers/scsi/qla4xxx/ql4_os.c for (index = 0; index < ha->host->can_queue; index++) { ha 4613 drivers/scsi/qla4xxx/ql4_os.c cmd = scsi_host_find_tag(ha->host, index); ha 4623 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4626 drivers/scsi/qla4xxx/ql4_os.c if (index == ha->host->can_queue) ha 4636 drivers/scsi/qla4xxx/ql4_os.c int qla4xxx_hw_reset(struct scsi_qla_host *ha) ha 4641 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(printk(KERN_ERR "scsi%ld: %s\n", ha->host_no, __func__)); ha 4643 drivers/scsi/qla4xxx/ql4_os.c if (ql4xxx_lock_drvr_wait(ha) != QLA_SUCCESS) ha 4646 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4652 drivers/scsi/qla4xxx/ql4_os.c ctrl_status = readw(&ha->reg->ctrl_status); ha 4654 drivers/scsi/qla4xxx/ql4_os.c writel(set_rmask(CSR_SCSI_RESET_INTR), &ha->reg->ctrl_status); ha 4657 drivers/scsi/qla4xxx/ql4_os.c writel(set_rmask(CSR_SOFT_RESET), &ha->reg->ctrl_status); ha 4658 drivers/scsi/qla4xxx/ql4_os.c readl(&ha->reg->ctrl_status); ha 4660 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4668 drivers/scsi/qla4xxx/ql4_os.c int qla4xxx_soft_reset(struct scsi_qla_host *ha) ha 4675 drivers/scsi/qla4xxx/ql4_os.c status = qla4xxx_hw_reset(ha); ha 4683 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4684 drivers/scsi/qla4xxx/ql4_os.c ctrl_status = readw(&ha->reg->ctrl_status); ha 4685 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4697 drivers/scsi/qla4xxx/ql4_os.c ha->host_no)); ha 4698 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4699 drivers/scsi/qla4xxx/ql4_os.c writel(set_rmask(CSR_NET_RESET_INTR), &ha->reg->ctrl_status); ha 4700 drivers/scsi/qla4xxx/ql4_os.c readl(&ha->reg->ctrl_status); ha 4701 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4707 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4708 drivers/scsi/qla4xxx/ql4_os.c ctrl_status = readw(&ha->reg->ctrl_status); ha 4709 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4723 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4724 drivers/scsi/qla4xxx/ql4_os.c ctrl_status = readw(&ha->reg->ctrl_status); ha 4726 drivers/scsi/qla4xxx/ql4_os.c writel(set_rmask(CSR_SCSI_RESET_INTR), &ha->reg->ctrl_status); ha 4727 drivers/scsi/qla4xxx/ql4_os.c readl(&ha->reg->ctrl_status); ha 4729 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4739 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4740 drivers/scsi/qla4xxx/ql4_os.c writel(set_rmask(CSR_FORCE_SOFT_RESET), &ha->reg->ctrl_status); ha 4741 drivers/scsi/qla4xxx/ql4_os.c readl(&ha->reg->ctrl_status); ha 4742 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4746 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4747 drivers/scsi/qla4xxx/ql4_os.c ctrl_status = readw(&ha->reg->ctrl_status); ha 4748 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4772 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_abort_active_cmds(struct scsi_qla_host *ha, int res) ha 4778 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 4779 drivers/scsi/qla4xxx/ql4_os.c for (i = 0; i < ha->host->can_queue; i++) { ha 4780 drivers/scsi/qla4xxx/ql4_os.c srb = qla4xxx_del_from_active_array(ha, i); ha 4786 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 4789 drivers/scsi/qla4xxx/ql4_os.c void qla4xxx_dead_adapter_cleanup(struct scsi_qla_host *ha) ha 4791 drivers/scsi/qla4xxx/ql4_os.c clear_bit(AF_ONLINE, &ha->flags); ha 4794 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "Disabling the board\n"); ha 4796 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_abort_active_cmds(ha, DID_NO_CONNECT << 16); ha 4797 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_mark_all_devices_missing(ha); ha 4798 drivers/scsi/qla4xxx/ql4_os.c clear_bit(AF_INIT_DONE, &ha->flags); ha 4821 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_recover_adapter(struct scsi_qla_host *ha) ha 4829 drivers/scsi/qla4xxx/ql4_os.c scsi_block_requests(ha->host); ha 4830 drivers/scsi/qla4xxx/ql4_os.c clear_bit(AF_ONLINE, &ha->flags); ha 4831 drivers/scsi/qla4xxx/ql4_os.c clear_bit(AF_LINK_UP, &ha->flags); ha 4833 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: adapter OFFLINE\n", __func__)); ha 4835 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RESET_ACTIVE, &ha->dpc_flags); ha 4837 drivers/scsi/qla4xxx/ql4_os.c if ((is_qla8032(ha) || is_qla8042(ha)) && ha 4838 drivers/scsi/qla4xxx/ql4_os.c !test_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags)) { ha 4839 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: disabling pause transmit on port 0 & 1.\n", ha 4842 drivers/scsi/qla4xxx/ql4_os.c qla4_83xx_disable_pause(ha); ha 4845 drivers/scsi/qla4xxx/ql4_os.c iscsi_host_for_each_session(ha->host, qla4xxx_fail_session); ha 4847 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(DPC_RESET_HA, &ha->dpc_flags)) ha 4852 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags)) { ha 4859 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha) && !reset_chip && ha 4860 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags)) { ha 4862 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 4864 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__)); ha 4865 drivers/scsi/qla4xxx/ql4_os.c status = ha->isp_ops->reset_firmware(ha); ha 4867 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->disable_intrs(ha); ha 4868 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS); ha 4869 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_abort_active_cmds(ha, DID_RESET << 16); ha 4874 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags); ha 4875 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 4882 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha) || reset_chip) { ha 4883 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha)) ha 4889 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(AF_FW_RECOVERY, &ha->flags)) ha 4894 drivers/scsi/qla4xxx/ql4_os.c if (qla4_8xxx_check_fw_alive(ha)) { ha 4895 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_mailbox_premature_completion(ha); ha 4903 drivers/scsi/qla4xxx/ql4_os.c if (!test_bit(AF_FW_RECOVERY, &ha->flags)) ha 4904 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_cmd_wait(ha); ha 4906 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS); ha 4907 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 4909 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__)); ha 4910 drivers/scsi/qla4xxx/ql4_os.c status = ha->isp_ops->reset_chip(ha); ha 4911 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_abort_active_cmds(ha, DID_RESET << 16); ha 4915 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS); ha 4923 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha) && (ha->mac_index == 3)) ha 4928 drivers/scsi/qla4xxx/ql4_os.c status = qla4xxx_initialize_adapter(ha, RESET_ADAPTER); ha 4929 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha) && (status == QLA_ERROR)) { ha 4930 drivers/scsi/qla4xxx/ql4_os.c status = qla4_8xxx_check_init_adapter_retry(ha); ha 4932 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: Don't retry recover adapter\n", ha 4933 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__); ha 4934 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_dead_adapter_cleanup(ha); ha 4935 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags); ha 4936 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESET_HA, &ha->dpc_flags); ha 4938 drivers/scsi/qla4xxx/ql4_os.c &ha->dpc_flags); ha 4947 drivers/scsi/qla4xxx/ql4_os.c if (!test_bit(AF_ONLINE, &ha->flags) && ha 4948 drivers/scsi/qla4xxx/ql4_os.c !test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags)) { ha 4954 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) { ha 4955 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_lock(ha); ha 4956 drivers/scsi/qla4xxx/ql4_os.c dev_state = qla4_8xxx_rd_direct(ha, ha 4958 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_unlock(ha); ha 4960 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: don't retry " ha 4963 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_dead_adapter_cleanup(ha); ha 4964 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags); ha 4965 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESET_HA, &ha->dpc_flags); ha 4967 drivers/scsi/qla4xxx/ql4_os.c &ha->dpc_flags); ha 4974 drivers/scsi/qla4xxx/ql4_os.c if (!test_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags)) { ha 4975 drivers/scsi/qla4xxx/ql4_os.c ha->retry_reset_ha_cnt = MAX_RESET_HA_RETRIES; ha 4977 drivers/scsi/qla4xxx/ql4_os.c "(%d) more times\n", ha->host_no, ha 4978 drivers/scsi/qla4xxx/ql4_os.c ha->retry_reset_ha_cnt)); ha 4979 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags); ha 4982 drivers/scsi/qla4xxx/ql4_os.c if (ha->retry_reset_ha_cnt > 0) { ha 4984 drivers/scsi/qla4xxx/ql4_os.c ha->retry_reset_ha_cnt--; ha 4987 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, ha 4988 drivers/scsi/qla4xxx/ql4_os.c ha->retry_reset_ha_cnt)); ha 4992 drivers/scsi/qla4xxx/ql4_os.c if (ha->retry_reset_ha_cnt == 0) { ha 4997 drivers/scsi/qla4xxx/ql4_os.c ha->host_no)); ha 4998 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_dead_adapter_cleanup(ha); ha 4999 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags); ha 5000 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESET_HA, &ha->dpc_flags); ha 5002 drivers/scsi/qla4xxx/ql4_os.c &ha->dpc_flags); ha 5007 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESET_HA, &ha->dpc_flags); ha 5008 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags); ha 5009 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags); ha 5013 drivers/scsi/qla4xxx/ql4_os.c ha->adapter_error_count++; ha 5015 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(AF_ONLINE, &ha->flags)) ha 5016 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->enable_intrs(ha); ha 5018 drivers/scsi/qla4xxx/ql4_os.c scsi_unblock_requests(ha->host); ha 5020 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESET_ACTIVE, &ha->dpc_flags); ha 5021 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(printk("scsi%ld: recover adapter: %s\n", ha->host_no, ha 5031 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 5035 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 5038 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: ddb[%d]" ha 5039 drivers/scsi/qla4xxx/ql4_os.c " unblock session\n", ha->host_no, __func__, ha 5060 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 5064 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 5065 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: ddb[%d]" ha 5066 drivers/scsi/qla4xxx/ql4_os.c " unblock session\n", ha->host_no, __func__, ha 5072 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(AF_ONLINE, &ha->flags)) { ha 5073 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: ddb[%d]" ha 5074 drivers/scsi/qla4xxx/ql4_os.c " start scan\n", ha->host_no, __func__, ha 5076 drivers/scsi/qla4xxx/ql4_os.c scsi_queue_work(ha->host, &ddb_entry->sess->scan_work); ha 5085 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 5090 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 5091 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: ddb[%d]" ha 5092 drivers/scsi/qla4xxx/ql4_os.c " unblock user space session\n", ha->host_no, __func__, ha 5100 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 5102 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__, ddb_entry->fw_ddb_index, ha 5110 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_relogin_all_devices(struct scsi_qla_host *ha) ha 5112 drivers/scsi/qla4xxx/ql4_os.c iscsi_host_for_each_session(ha->host, qla4xxx_relogin_devices); ha 5120 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 5124 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 5130 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 5131 drivers/scsi/qla4xxx/ql4_os.c "scsi%ld: Relogin index [%d]. TOV=%d\n", ha->host_no, ha 5141 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 5145 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 5155 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 5161 drivers/scsi/qla4xxx/ql4_os.c void qla4xxx_wake_dpc(struct scsi_qla_host *ha) ha 5163 drivers/scsi/qla4xxx/ql4_os.c if (ha->dpc_thread) ha 5164 drivers/scsi/qla4xxx/ql4_os.c queue_work(ha->dpc_thread, &ha->dpc_work); ha 5168 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_alloc_work(struct scsi_qla_host *ha, uint32_t data_size, ha 5183 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_post_work(struct scsi_qla_host *ha, ha 5188 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->work_lock, flags); ha 5189 drivers/scsi/qla4xxx/ql4_os.c list_add_tail(&e->list, &ha->work_list); ha 5190 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->work_lock, flags); ha 5191 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_wake_dpc(ha); ha 5194 drivers/scsi/qla4xxx/ql4_os.c int qla4xxx_post_aen_work(struct scsi_qla_host *ha, ha 5200 drivers/scsi/qla4xxx/ql4_os.c e = qla4xxx_alloc_work(ha, data_size, QLA4_EVENT_AEN); ha 5208 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_post_work(ha, e); ha 5213 drivers/scsi/qla4xxx/ql4_os.c int qla4xxx_post_ping_evt_work(struct scsi_qla_host *ha, ha 5219 drivers/scsi/qla4xxx/ql4_os.c e = qla4xxx_alloc_work(ha, data_size, QLA4_EVENT_PING_STATUS); ha 5228 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_post_work(ha, e); ha 5233 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_do_work(struct scsi_qla_host *ha) ha 5239 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->work_lock, flags); ha 5240 drivers/scsi/qla4xxx/ql4_os.c list_splice_init(&ha->work_list, &work); ha 5241 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->work_lock, flags); ha 5248 drivers/scsi/qla4xxx/ql4_os.c iscsi_post_host_event(ha->host_no, ha 5255 drivers/scsi/qla4xxx/ql4_os.c iscsi_ping_comp_event(ha->host_no, ha 5263 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "event type: 0x%x not " ha 5283 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = ha 5287 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 5289 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__, ha->flags, ha->dpc_flags)); ha 5292 drivers/scsi/qla4xxx/ql4_os.c if (!test_bit(AF_INIT_DONE, &ha->flags)) ha 5295 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(AF_EEH_BUSY, &ha->flags)) { ha 5297 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__, ha->flags)); ha 5302 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_do_work(ha); ha 5304 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) { ha 5305 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags)) { ha 5306 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 5307 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: disabling pause transmit on port 0 & 1.\n", ha 5310 drivers/scsi/qla4xxx/ql4_os.c qla4_83xx_disable_pause(ha); ha 5313 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_lock(ha); ha 5314 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, ha 5316 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_unlock(ha); ha 5317 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "HW State: FAILED\n"); ha 5318 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_device_state_handler(ha); ha 5321 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(DPC_POST_IDC_ACK, &ha->dpc_flags)) { ha 5322 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8042(ha)) { ha 5323 drivers/scsi/qla4xxx/ql4_os.c if (ha->idc_info.info2 & ha 5325 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: Disabling ACB\n", ha 5327 drivers/scsi/qla4xxx/ql4_os.c status = qla4_84xx_config_acb(ha, ha 5330 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: ACB config failed\n", ha 5335 drivers/scsi/qla4xxx/ql4_os.c qla4_83xx_post_idc_ack(ha); ha 5336 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_POST_IDC_ACK, &ha->dpc_flags); ha 5339 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8042(ha) && ha 5340 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESTORE_ACB, &ha->dpc_flags)) { ha 5341 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: Restoring ACB\n", ha 5343 drivers/scsi/qla4xxx/ql4_os.c if (qla4_84xx_config_acb(ha, ACB_CONFIG_SET) != ha 5345 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: ACB config failed ", ha 5348 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESTORE_ACB, &ha->dpc_flags); ha 5351 drivers/scsi/qla4xxx/ql4_os.c if (test_and_clear_bit(DPC_HA_NEED_QUIESCENT, &ha->dpc_flags)) { ha 5352 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_need_qsnt_handler(ha); ha 5356 drivers/scsi/qla4xxx/ql4_os.c if (!test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags) && ha 5357 drivers/scsi/qla4xxx/ql4_os.c (test_bit(DPC_RESET_HA, &ha->dpc_flags) || ha 5358 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags) || ha 5359 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags))) { ha 5360 drivers/scsi/qla4xxx/ql4_os.c if ((is_qla8022(ha) && ql4xdontresethba) || ha 5361 drivers/scsi/qla4xxx/ql4_os.c ((is_qla8032(ha) || is_qla8042(ha)) && ha 5362 drivers/scsi/qla4xxx/ql4_os.c qla4_83xx_idc_dontreset(ha))) { ha 5364 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__)); ha 5365 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESET_HA, &ha->dpc_flags); ha 5366 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESET_HA_INTR, &ha->dpc_flags); ha 5367 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags); ha 5370 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags) || ha 5371 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESET_HA, &ha->dpc_flags)) ha 5372 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_recover_adapter(ha); ha 5374 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags)) { ha 5377 drivers/scsi/qla4xxx/ql4_os.c while ((readw(&ha->reg->ctrl_status) & ha 5386 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__)); ha 5387 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_abort_active_cmds(ha, DID_RESET << 16); ha 5388 drivers/scsi/qla4xxx/ql4_os.c if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS) { ha 5389 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS); ha 5390 drivers/scsi/qla4xxx/ql4_os.c status = qla4xxx_recover_adapter(ha); ha 5392 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESET_HA_INTR, &ha->dpc_flags); ha 5394 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->enable_intrs(ha); ha 5400 drivers/scsi/qla4xxx/ql4_os.c if (test_and_clear_bit(DPC_AEN, &ha->dpc_flags)) ha 5401 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_process_aen(ha, PROCESS_ALL_AENS); ha 5404 drivers/scsi/qla4xxx/ql4_os.c if (test_and_clear_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags)) ha 5405 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_get_dhcp_ip_address(ha); ha 5408 drivers/scsi/qla4xxx/ql4_os.c if (adapter_up(ha) && ha 5409 drivers/scsi/qla4xxx/ql4_os.c test_and_clear_bit(DPC_RELOGIN_DEVICE, &ha->dpc_flags)) { ha 5410 drivers/scsi/qla4xxx/ql4_os.c iscsi_host_for_each_session(ha->host, qla4xxx_dpc_relogin); ha 5414 drivers/scsi/qla4xxx/ql4_os.c if (!test_bit(AF_LOOPBACK, &ha->flags) && ha 5415 drivers/scsi/qla4xxx/ql4_os.c test_and_clear_bit(DPC_LINK_CHANGED, &ha->dpc_flags)) { ha 5416 drivers/scsi/qla4xxx/ql4_os.c if (!test_bit(AF_LINK_UP, &ha->flags)) { ha 5418 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_mark_all_devices_missing(ha); ha 5426 drivers/scsi/qla4xxx/ql4_os.c if (test_and_clear_bit(AF_BUILD_DDB_LIST, &ha->flags)) { ha 5427 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_build_ddb_list(ha, ha->is_reset); ha 5428 drivers/scsi/qla4xxx/ql4_os.c iscsi_host_for_each_session(ha->host, ha 5431 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_relogin_all_devices(ha); ha 5434 drivers/scsi/qla4xxx/ql4_os.c if (test_and_clear_bit(DPC_SYSFS_DDB_EXPORT, &ha->dpc_flags)) { ha 5435 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_sysfs_ddb_export(ha)) ha 5436 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: Error exporting ddb to sysfs\n", ha 5445 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_free_adapter(struct scsi_qla_host *ha) ha 5447 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_abort_active_cmds(ha, DID_NO_CONNECT << 16); ha 5450 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->disable_intrs(ha); ha 5452 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha)) { ha 5454 drivers/scsi/qla4xxx/ql4_os.c &ha->reg->ctrl_status); ha 5455 drivers/scsi/qla4xxx/ql4_os.c readl(&ha->reg->ctrl_status); ha 5456 drivers/scsi/qla4xxx/ql4_os.c } else if (is_qla8022(ha)) { ha 5457 drivers/scsi/qla4xxx/ql4_os.c writel(0, &ha->qla4_82xx_reg->host_int); ha 5458 drivers/scsi/qla4xxx/ql4_os.c readl(&ha->qla4_82xx_reg->host_int); ha 5459 drivers/scsi/qla4xxx/ql4_os.c } else if (is_qla8032(ha) || is_qla8042(ha)) { ha 5460 drivers/scsi/qla4xxx/ql4_os.c writel(0, &ha->qla4_83xx_reg->risc_intr); ha 5461 drivers/scsi/qla4xxx/ql4_os.c readl(&ha->qla4_83xx_reg->risc_intr); ha 5465 drivers/scsi/qla4xxx/ql4_os.c if (ha->timer_active) ha 5466 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_stop_timer(ha); ha 5469 drivers/scsi/qla4xxx/ql4_os.c if (ha->dpc_thread) ha 5470 drivers/scsi/qla4xxx/ql4_os.c destroy_workqueue(ha->dpc_thread); ha 5473 drivers/scsi/qla4xxx/ql4_os.c if (ha->task_wq) ha 5474 drivers/scsi/qla4xxx/ql4_os.c destroy_workqueue(ha->task_wq); ha 5477 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->reset_firmware(ha); ha 5479 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) { ha 5480 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_lock(ha); ha 5481 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_clear_drv_active(ha); ha 5482 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_unlock(ha); ha 5486 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_free_irqs(ha); ha 5489 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_mem_free(ha); ha 5492 drivers/scsi/qla4xxx/ql4_os.c int qla4_8xxx_iospace_config(struct scsi_qla_host *ha) ha 5496 drivers/scsi/qla4xxx/ql4_os.c struct pci_dev *pdev = ha->pdev; ha 5502 drivers/scsi/qla4xxx/ql4_os.c "status=%d\n", ha->host_no, pci_name(pdev), status); ha 5508 drivers/scsi/qla4xxx/ql4_os.c ha->revision_id = pdev->revision; ha 5517 drivers/scsi/qla4xxx/ql4_os.c ha->nx_pcibase = (unsigned long)ioremap(mem_base, mem_len); ha 5518 drivers/scsi/qla4xxx/ql4_os.c if (!ha->nx_pcibase) { ha 5521 drivers/scsi/qla4xxx/ql4_os.c pci_release_regions(ha->pdev); ha 5528 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8022(ha)) { ha 5529 drivers/scsi/qla4xxx/ql4_os.c ha->qla4_82xx_reg = (struct device_reg_82xx __iomem *) ha 5530 drivers/scsi/qla4xxx/ql4_os.c ((uint8_t *)ha->nx_pcibase + 0xbc000 + ha 5531 drivers/scsi/qla4xxx/ql4_os.c (ha->pdev->devfn << 11)); ha 5532 drivers/scsi/qla4xxx/ql4_os.c ha->nx_db_wr_ptr = (ha->pdev->devfn == 4 ? QLA82XX_CAM_RAM_DB1 : ha 5534 drivers/scsi/qla4xxx/ql4_os.c } else if (is_qla8032(ha) || is_qla8042(ha)) { ha 5535 drivers/scsi/qla4xxx/ql4_os.c ha->qla4_83xx_reg = (struct device_reg_83xx __iomem *) ha 5536 drivers/scsi/qla4xxx/ql4_os.c ((uint8_t *)ha->nx_pcibase); ha 5554 drivers/scsi/qla4xxx/ql4_os.c int qla4xxx_iospace_config(struct scsi_qla_host *ha) ha 5559 drivers/scsi/qla4xxx/ql4_os.c pio = pci_resource_start(ha->pdev, 0); ha 5560 drivers/scsi/qla4xxx/ql4_os.c pio_len = pci_resource_len(ha->pdev, 0); ha 5561 drivers/scsi/qla4xxx/ql4_os.c pio_flags = pci_resource_flags(ha->pdev, 0); ha 5564 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, ha 5569 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "region #0 not a PIO resource\n"); ha 5574 drivers/scsi/qla4xxx/ql4_os.c mmio = pci_resource_start(ha->pdev, 1); ha 5575 drivers/scsi/qla4xxx/ql4_os.c mmio_len = pci_resource_len(ha->pdev, 1); ha 5576 drivers/scsi/qla4xxx/ql4_os.c mmio_flags = pci_resource_flags(ha->pdev, 1); ha 5579 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 5586 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 5591 drivers/scsi/qla4xxx/ql4_os.c if (pci_request_regions(ha->pdev, DRIVER_NAME)) { ha 5592 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, ha 5598 drivers/scsi/qla4xxx/ql4_os.c ha->pio_address = pio; ha 5599 drivers/scsi/qla4xxx/ql4_os.c ha->pio_length = pio_len; ha 5600 drivers/scsi/qla4xxx/ql4_os.c ha->reg = ioremap(mmio, MIN_IOBASE_LEN); ha 5601 drivers/scsi/qla4xxx/ql4_os.c if (!ha->reg) { ha 5602 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 5689 drivers/scsi/qla4xxx/ql4_os.c uint16_t qla4xxx_rd_shdw_req_q_out(struct scsi_qla_host *ha) ha 5691 drivers/scsi/qla4xxx/ql4_os.c return (uint16_t)le32_to_cpu(ha->shadow_regs->req_q_out); ha 5694 drivers/scsi/qla4xxx/ql4_os.c uint16_t qla4_82xx_rd_shdw_req_q_out(struct scsi_qla_host *ha) ha 5696 drivers/scsi/qla4xxx/ql4_os.c return (uint16_t)le32_to_cpu(readl(&ha->qla4_82xx_reg->req_q_out)); ha 5699 drivers/scsi/qla4xxx/ql4_os.c uint16_t qla4xxx_rd_shdw_rsp_q_in(struct scsi_qla_host *ha) ha 5701 drivers/scsi/qla4xxx/ql4_os.c return (uint16_t)le32_to_cpu(ha->shadow_regs->rsp_q_in); ha 5704 drivers/scsi/qla4xxx/ql4_os.c uint16_t qla4_82xx_rd_shdw_rsp_q_in(struct scsi_qla_host *ha) ha 5706 drivers/scsi/qla4xxx/ql4_os.c return (uint16_t)le32_to_cpu(readl(&ha->qla4_82xx_reg->rsp_q_in)); ha 5711 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = data; ha 5723 drivers/scsi/qla4xxx/ql4_os.c rc = sysfs_format_mac(str, ha->my_mac, ha 5752 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = data; ha 5758 drivers/scsi/qla4xxx/ql4_os.c rc = sprintf(str, "%s\n", ha->name_string); ha 5840 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = data; ha 5841 drivers/scsi/qla4xxx/ql4_os.c struct ql4_boot_session_info *boot_sess = &(ha->boot_tgt.boot_pri_sess); ha 5848 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = data; ha 5849 drivers/scsi/qla4xxx/ql4_os.c struct ql4_boot_session_info *boot_sess = &(ha->boot_tgt.boot_sec_sess); ha 5879 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = data; ha 5881 drivers/scsi/qla4xxx/ql4_os.c scsi_host_put(ha->host); ha 5884 drivers/scsi/qla4xxx/ql4_os.c static int get_fw_boot_info(struct scsi_qla_host *ha, uint16_t ddb_index[]) ha 5895 drivers/scsi/qla4xxx/ql4_os.c func_num = PCI_FUNC(ha->pdev->devfn); ha 5897 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: Get FW boot info for 0x%x func %d\n", ha 5898 drivers/scsi/qla4xxx/ql4_os.c __func__, ha->pdev->device, func_num); ha 5900 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha)) { ha 5915 drivers/scsi/qla4xxx/ql4_os.c val = rd_nvram_byte(ha, addr); ha 5917 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Adapter boot " ha 5924 drivers/scsi/qla4xxx/ql4_os.c val = rd_nvram_byte(ha, pri_addr); ha 5929 drivers/scsi/qla4xxx/ql4_os.c val = rd_nvram_byte(ha, sec_addr); ha 5933 drivers/scsi/qla4xxx/ql4_os.c } else if (is_qla80XX(ha)) { ha 5934 drivers/scsi/qla4xxx/ql4_os.c buf = dma_alloc_coherent(&ha->pdev->dev, size, ha 5937 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 5944 drivers/scsi/qla4xxx/ql4_os.c if (ha->port_num == 0) ha 5946 drivers/scsi/qla4xxx/ql4_os.c else if (ha->port_num == 1) ha 5952 drivers/scsi/qla4xxx/ql4_os.c addr = FLASH_RAW_ACCESS_ADDR + (ha->hw.flt_iscsi_param * 4) + ha 5954 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_get_flash(ha, buf_dma, addr, ha 5956 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, "scsi%ld: %s: Get Flash" ha 5957 drivers/scsi/qla4xxx/ql4_os.c " failed\n", ha->host_no, __func__)); ha 5963 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "Firmware boot options" ha 5981 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Primary target ID %d, Secondary" ha 5986 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, size, buf, buf_dma); ha 5988 drivers/scsi/qla4xxx/ql4_os.c ha->pri_ddb_idx = ddb_index[0]; ha 5989 drivers/scsi/qla4xxx/ql4_os.c ha->sec_ddb_idx = ddb_index[1]; ha 6004 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_get_bidi_chap(struct scsi_qla_host *ha, char *username, ha 6011 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) ha 6012 drivers/scsi/qla4xxx/ql4_os.c max_chap_entries = (ha->hw.flt_chap_size / 2) / ha 6017 drivers/scsi/qla4xxx/ql4_os.c if (!ha->chap_list) { ha 6018 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Do not have CHAP table cache\n"); ha 6022 drivers/scsi/qla4xxx/ql4_os.c mutex_lock(&ha->chap_sem); ha 6024 drivers/scsi/qla4xxx/ql4_os.c chap_table = (struct ql4_chap_table *)ha->chap_list + i; ha 6041 drivers/scsi/qla4xxx/ql4_os.c mutex_unlock(&ha->chap_sem); ha 6047 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_get_boot_target(struct scsi_qla_host *ha, ha 6058 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 6061 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 6068 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_bootdb_by_index(ha, fw_ddb_entry, ha 6070 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: No Flash DDB found at " ha 6098 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "Setting chap\n")); ha 6100 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_chap(ha, (char *)&boot_conn->chap. ha 6105 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Failed to set chap\n"); ha 6116 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "Setting BIDI chap\n")); ha 6118 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_bidi_chap(ha, ha 6123 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Failed to set BIDI chap\n"); ha 6133 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 6138 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_get_boot_info(struct scsi_qla_host *ha) ha 6147 drivers/scsi/qla4xxx/ql4_os.c ret = get_fw_boot_info(ha, ddb_index); ha 6149 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 6160 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_get_boot_target(ha, &(ha->boot_tgt.boot_pri_sess), ha 6163 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Primary boot target not " ha 6172 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_get_boot_target(ha, &(ha->boot_tgt.boot_sec_sess), ha 6175 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Secondary boot target not" ha 6184 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_setup_boot_info(struct scsi_qla_host *ha) ha 6188 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_get_boot_info(ha) != QLA_SUCCESS) ha 6192 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 6199 drivers/scsi/qla4xxx/ql4_os.c ha->boot_kset = iscsi_boot_create_host_kset(ha->host->host_no); ha 6200 drivers/scsi/qla4xxx/ql4_os.c if (!ha->boot_kset) ha 6203 drivers/scsi/qla4xxx/ql4_os.c if (!scsi_host_get(ha->host)) ha 6205 drivers/scsi/qla4xxx/ql4_os.c boot_kobj = iscsi_boot_create_target(ha->boot_kset, 0, ha, ha 6212 drivers/scsi/qla4xxx/ql4_os.c if (!scsi_host_get(ha->host)) ha 6214 drivers/scsi/qla4xxx/ql4_os.c boot_kobj = iscsi_boot_create_target(ha->boot_kset, 1, ha, ha 6221 drivers/scsi/qla4xxx/ql4_os.c if (!scsi_host_get(ha->host)) ha 6223 drivers/scsi/qla4xxx/ql4_os.c boot_kobj = iscsi_boot_create_initiator(ha->boot_kset, 0, ha, ha 6230 drivers/scsi/qla4xxx/ql4_os.c if (!scsi_host_get(ha->host)) ha 6232 drivers/scsi/qla4xxx/ql4_os.c boot_kobj = iscsi_boot_create_ethernet(ha->boot_kset, 0, ha, ha 6242 drivers/scsi/qla4xxx/ql4_os.c scsi_host_put(ha->host); ha 6244 drivers/scsi/qla4xxx/ql4_os.c iscsi_boot_destroy_kset(ha->boot_kset); ha 6252 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 6259 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 6296 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_compare_tuple_ddb(struct scsi_qla_host *ha, ha 6317 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 6326 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 6335 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_is_session_exists(struct scsi_qla_host *ha, ha 6347 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_WARNING, ha, ha 6355 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_WARNING, ha, ha 6364 drivers/scsi/qla4xxx/ql4_os.c ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, idx); ha 6369 drivers/scsi/qla4xxx/ql4_os.c if (!qla4xxx_compare_tuple_ddb(ha, fw_tddb, tmp_tddb, false)) { ha 6419 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_update_isid(struct scsi_qla_host *ha, ha 6447 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_should_update_isid(struct scsi_qla_host *ha, ha 6481 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_is_flash_ddb_exists(struct scsi_qla_host *ha, ha 6492 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_WARNING, ha, ha 6500 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_WARNING, ha, ha 6511 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_compare_tuple_ddb(ha, fw_tddb, tmp_tddb, true); ha 6520 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_should_update_isid(ha, tmp_tddb, fw_tddb); ha 6522 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_update_isid(ha, list_nt, fw_ddb_entry); ha 6550 drivers/scsi/qla4xxx/ql4_os.c static struct iscsi_endpoint *qla4xxx_get_ep_fwdb(struct scsi_qla_host *ha, ha 6582 drivers/scsi/qla4xxx/ql4_os.c ep = qla4xxx_ep_connect(ha->host, (struct sockaddr *)dst_addr, 0); ha 6587 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_verify_boot_idx(struct scsi_qla_host *ha, uint16_t idx) ha 6591 drivers/scsi/qla4xxx/ql4_os.c if (idx == ha->pri_ddb_idx || idx == ha->sec_ddb_idx) ha 6596 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_setup_flash_ddb_entry(struct scsi_qla_host *ha, ha 6605 drivers/scsi/qla4xxx/ql4_os.c ddb_entry->ha = ha; ha 6621 drivers/scsi/qla4xxx/ql4_os.c (idx == ha->pri_ddb_idx || idx == ha->sec_ddb_idx)) ha 6625 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_wait_for_ip_configuration(struct scsi_qla_host *ha) ha 6640 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_ip_state(ha, 0, ip_idx[idx], sts); ha 6649 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 6694 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_find_flash_st_idx(struct scsi_qla_host *ha, ha 6704 drivers/scsi/qla4xxx/ql4_os.c max_ddbs = is_qla40XX(ha) ? MAX_DEV_DB_ENTRIES_40XX : ha 6707 drivers/scsi/qla4xxx/ql4_os.c flash_ddb_entry = dma_pool_alloc(ha->fw_ddb_dma_pool, GFP_KERNEL, ha 6710 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Out of memory\n"); ha 6714 drivers/scsi/qla4xxx/ql4_os.c status = qla4xxx_flashdb_by_index(ha, flash_ddb_entry, ha 6726 drivers/scsi/qla4xxx/ql4_os.c status = qla4xxx_flashdb_by_index(ha, flash_ddb_entry, ha 6740 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "Failed to find ST [%d] in flash\n", ha 6745 drivers/scsi/qla4xxx/ql4_os.c dma_pool_free(ha->fw_ddb_dma_pool, flash_ddb_entry, ha 6751 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_build_st_list(struct scsi_qla_host *ha, ha 6765 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_pool_alloc(ha->fw_ddb_dma_pool, GFP_KERNEL, ha 6768 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, "Out of memory\n")); ha 6772 drivers/scsi/qla4xxx/ql4_os.c max_ddbs = is_qla40XX(ha) ? MAX_DEV_DB_ENTRIES_40XX : ha 6777 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_fwddb_entry(ha, idx, fw_ddb_entry, fw_ddb_dma, ha 6795 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_find_flash_st_idx(ha, fw_ddb_entry, idx, ha 6798 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 6802 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 6818 drivers/scsi/qla4xxx/ql4_os.c dma_pool_free(ha->fw_ddb_dma_pool, fw_ddb_entry, fw_ddb_dma); ha 6829 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_remove_failed_ddb(struct scsi_qla_host *ha, ha 6838 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_fwddb_entry(ha, ddb_idx->fw_ddb_idx, ha 6852 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_update_sess_disc_idx(struct scsi_qla_host *ha, ha 6861 drivers/scsi/qla4xxx/ql4_os.c max_ddbs = is_qla40XX(ha) ? MAX_DEV_DB_ENTRIES_40XX : ha 6874 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_sess_conn_setup(struct scsi_qla_host *ha, ha 6892 drivers/scsi/qla4xxx/ql4_os.c cls_sess = iscsi_session_setup(&qla4xxx_iscsi_transport, ha->host, ha 6914 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_setup_flash_ddb_entry(ha, ddb_entry, idx); ha 6926 drivers/scsi/qla4xxx/ql4_os.c ep = qla4xxx_get_ep_fwdb(ha, fw_ddb_entry); ha 6931 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, "Unable to get ep\n")); ha 6937 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_copy_fwddb_param(ha, fw_ddb_entry, cls_sess, cls_conn); ha 6938 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_update_sess_disc_idx(ha, ddb_entry, fw_ddb_entry); ha 6947 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RELOGIN_DEVICE, &ha->dpc_flags); ha 6955 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_update_fw_ddb_link(struct scsi_qla_host *ha, ha 6966 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 6976 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_build_nt_list(struct scsi_qla_host *ha, ha 6994 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_pool_alloc(ha->fw_ddb_dma_pool, GFP_KERNEL, ha 6997 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, "Out of memory\n")); ha 7000 drivers/scsi/qla4xxx/ql4_os.c max_ddbs = is_qla40XX(ha) ? MAX_DEV_DB_ENTRIES_40XX : ha 7005 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_fwddb_entry(ha, idx, fw_ddb_entry, fw_ddb_dma, ha 7011 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_verify_boot_idx(ha, idx) != QLA_SUCCESS) ha 7020 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_update_fw_ddb_link(ha, list_st, fw_ddb_entry); ha 7027 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 7045 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_is_flash_ddb_exists(ha, list_nt, ha 7059 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_is_session_exists(ha, fw_ddb_entry, ha 7062 drivers/scsi/qla4xxx/ql4_os.c ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, ha 7065 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_update_sess_disc_idx(ha, ha 7072 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_sess_conn_setup(ha, fw_ddb_entry, is_reset, idx); ha 7083 drivers/scsi/qla4xxx/ql4_os.c dma_pool_free(ha->fw_ddb_dma_pool, fw_ddb_entry, fw_ddb_dma); ha 7086 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_build_new_nt_list(struct scsi_qla_host *ha, ha 7100 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_pool_alloc(ha->fw_ddb_dma_pool, GFP_KERNEL, ha 7103 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, "Out of memory\n")); ha 7106 drivers/scsi/qla4xxx/ql4_os.c max_ddbs = is_qla40XX(ha) ? MAX_DEV_DB_ENTRIES_40XX : ha 7111 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_fwddb_entry(ha, idx, fw_ddb_entry, fw_ddb_dma, ha 7124 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 7133 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_is_session_exists(ha, fw_ddb_entry, NULL); ha 7145 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_sess_conn_setup(ha, fw_ddb_entry, RESET_ADAPTER, ha 7157 drivers/scsi/qla4xxx/ql4_os.c dma_pool_free(ha->fw_ddb_dma_pool, fw_ddb_entry, fw_ddb_dma); ha 7197 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_sysfs_ddb_tgt_create(struct scsi_qla_host *ha, ha 7205 drivers/scsi/qla4xxx/ql4_os.c fnode_sess = iscsi_create_flashnode_sess(ha->host, *idx, ha 7208 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 7210 drivers/scsi/qla4xxx/ql4_os.c __func__, *idx, ha->host_no); ha 7214 drivers/scsi/qla4xxx/ql4_os.c fnode_conn = iscsi_create_flashnode_conn(ha->host, fnode_sess, ha 7217 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 7219 drivers/scsi/qla4xxx/ql4_os.c __func__, *idx, ha->host_no); ha 7228 drivers/scsi/qla4xxx/ql4_os.c if (*idx == ha->pri_ddb_idx || *idx == ha->sec_ddb_idx) ha 7239 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: sysfs entry %s created\n", ha 7242 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "%s: sysfs entry %s created\n", ha 7266 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 7277 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, "%s: Invalid portal type\n", ha 7282 drivers/scsi/qla4xxx/ql4_os.c max_ddbs = is_qla40XX(ha) ? MAX_PRST_DEV_DB_ENTRIES : ha 7285 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 7288 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 7294 drivers/scsi/qla4xxx/ql4_os.c dev = iscsi_find_flashnode_sess(ha->host, NULL, ha 7297 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 7306 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_flashdb_by_index(ha, fw_ddb_entry, ha 7317 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_get_default_ddb(ha, options, fw_ddb_entry_dma); ha 7321 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_sysfs_ddb_tgt_create(ha, fw_ddb_entry, &idx, 1); ha 7325 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 7345 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 7352 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 7355 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 7365 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_get_default_ddb(ha, options, fw_ddb_entry_dma); ha 7375 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_set_flash(ha, fw_ddb_entry_dma, dev_db_start_offset, ha 7380 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 7382 drivers/scsi/qla4xxx/ql4_os.c __func__, fnode_sess->target_id, ha->host_no); ha 7385 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 7387 drivers/scsi/qla4xxx/ql4_os.c __func__, fnode_sess->target_id, ha->host_no); ha 7392 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 7397 drivers/scsi/qla4xxx/ql4_os.c static ssize_t qla4xxx_sysfs_ddb_conn_open(struct scsi_qla_host *ha, ha 7409 drivers/scsi/qla4xxx/ql4_os.c ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*ddb_entry), ha 7412 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 7420 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_set_ddb_entry(ha, idx, ddb_entry_dma, &mbx_sts); ha 7422 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 7428 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_conn_open(ha, idx); ha 7431 drivers/scsi/qla4xxx/ql4_os.c tmo = ((ha->def_timeout > LOGIN_TOV) && ha 7432 drivers/scsi/qla4xxx/ql4_os.c (ha->def_timeout < LOGIN_TOV * 10) ? ha 7433 drivers/scsi/qla4xxx/ql4_os.c ha->def_timeout : LOGIN_TOV); ha 7435 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 7440 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_fwddb_entry(ha, idx, NULL, 0, NULL, ha 7455 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*ddb_entry), ha 7460 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_ddb_login_st(struct scsi_qla_host *ha, ha 7469 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(AF_ST_DISCOVERY_IN_PROGRESS, &ha->flags)) { ha 7470 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, ha 7477 drivers/scsi/qla4xxx/ql4_os.c set_bit(AF_ST_DISCOVERY_IN_PROGRESS, &ha->flags); ha 7479 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_ddb_index(ha, &ddb_index); ha 7483 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_sysfs_ddb_conn_open(ha, fw_ddb_entry, ddb_index); ha 7487 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_build_new_nt_list(ha, &list_nt, target_id); ha 7491 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_clear_ddb_entry(ha, ddb_idx->fw_ddb_idx); ha 7496 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_clear_ddb_entry(ha, ddb_index) == QLA_ERROR) { ha 7497 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 7501 drivers/scsi/qla4xxx/ql4_os.c clear_bit(ddb_index, ha->ddb_idx_map); ha 7504 drivers/scsi/qla4xxx/ql4_os.c clear_bit(AF_ST_DISCOVERY_IN_PROGRESS, &ha->flags); ha 7508 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_ddb_login_nt(struct scsi_qla_host *ha, ha 7514 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_is_session_exists(ha, fw_ddb_entry, NULL); ha 7516 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_sess_conn_setup(ha, fw_ddb_entry, RESET_ADAPTER, ha 7535 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 7542 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 7548 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 7551 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 7561 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_default_ddb(ha, options, fw_ddb_entry_dma); ha 7569 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_ddb_login_st(ha, fw_ddb_entry, ha 7572 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_ddb_login_nt(ha, fw_ddb_entry, ha 7580 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 7595 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 7606 drivers/scsi/qla4xxx/ql4_os.c ha = ddb_entry->ha; ha 7609 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: Not a flash node session\n", ha 7616 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 7623 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 7626 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 7635 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_fwddb_entry(ha, ddb_entry->fw_ddb_index, ha 7661 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_session_logout_ddb(ha, ddb_entry, options); ha 7666 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_fwddb_entry(ha, ddb_entry->fw_ddb_index, ha 7681 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_clear_ddb_entry(ha, ddb_entry->fw_ddb_index); ha 7691 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 7692 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_free_ddb(ha, ddb_entry); ha 7693 drivers/scsi/qla4xxx/ql4_os.c clear_bit(ddb_entry->fw_ddb_index, ha->ddb_idx_map); ha 7694 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 7703 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 7719 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 7731 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_pool_alloc(ha->fw_ddb_dma_pool, GFP_KERNEL, ha 7734 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s:Out of memory\n", __func__); ha 7741 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, ha 7749 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, ha 7756 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 7764 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 7785 drivers/scsi/qla4xxx/ql4_os.c ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, idx); ha 7793 drivers/scsi/qla4xxx/ql4_os.c status = qla4xxx_get_fwddb_entry(ha, index, fw_ddb_entry, ha 7804 drivers/scsi/qla4xxx/ql4_os.c status = qla4xxx_compare_tuple_ddb(ha, flash_tddb, tmp_tddb, ha 7821 drivers/scsi/qla4xxx/ql4_os.c dma_pool_free(ha->fw_ddb_dma_pool, fw_ddb_entry, fw_ddb_dma); ha 7831 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 8033 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_get_uni_chap_at_index(ha, ha 8044 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_get_uni_chap_at_index(ha, ha 8086 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 8280 drivers/scsi/qla4xxx/ql4_os.c if (!qla4xxx_get_uni_chap_at_index(ha, ha 8290 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 8312 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 8325 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 8334 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha)) { ha 8342 drivers/scsi/qla4xxx/ql4_os.c (ha->hw.flt_region_ddb << 2); ha 8346 drivers/scsi/qla4xxx/ql4_os.c if (ha->port_num == 1) ha 8347 drivers/scsi/qla4xxx/ql4_os.c dev_db_start_offset += (ha->hw.flt_ddb_size / 2); ha 8350 drivers/scsi/qla4xxx/ql4_os.c (ha->hw.flt_ddb_size / 2); ha 8359 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, "%s: start offset=%u, end offset=%u\n", ha 8364 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, "%s:Invalid DDB index %u\n", ha 8369 drivers/scsi/qla4xxx/ql4_os.c pddb = dma_alloc_coherent(&ha->pdev->dev, ddb_size, ha 8373 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 8379 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha)) { ha 8389 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_set_flash(ha, fw_ddb_entry_dma, dev_db_start_offset, ha 8395 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 8397 drivers/scsi/qla4xxx/ql4_os.c __func__, target_id, ha->host_no); ha 8400 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, ddb_size, pddb, ha 8411 drivers/scsi/qla4xxx/ql4_os.c int qla4xxx_sysfs_ddb_export(struct scsi_qla_host *ha) ha 8419 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, ha 8423 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_ERR, ha, ha 8429 drivers/scsi/qla4xxx/ql4_os.c max_ddbs = is_qla40XX(ha) ? MAX_PRST_DEV_DB_ENTRIES : ha 8433 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_flashdb_by_index(ha, fw_ddb_entry, fw_ddb_entry_dma, ha 8437 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_sysfs_ddb_tgt_create(ha, fw_ddb_entry, &idx, 0); ha 8444 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), fw_ddb_entry, ha 8450 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_sysfs_ddb_remove(struct scsi_qla_host *ha) ha 8452 drivers/scsi/qla4xxx/ql4_os.c iscsi_destroy_all_flashnode(ha->host); ha 8465 drivers/scsi/qla4xxx/ql4_os.c void qla4xxx_build_ddb_list(struct scsi_qla_host *ha, int is_reset) ha 8472 drivers/scsi/qla4xxx/ql4_os.c if (!test_bit(AF_LINK_UP, &ha->flags)) { ha 8473 drivers/scsi/qla4xxx/ql4_os.c set_bit(AF_BUILD_DDB_LIST, &ha->flags); ha 8474 drivers/scsi/qla4xxx/ql4_os.c ha->is_reset = is_reset; ha 8481 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_build_st_list(ha, &list_st); ha 8486 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_wait_for_ip_configuration(ha); ha 8490 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_conn_open(ha, st_ddb_idx->fw_ddb_idx); ha 8494 drivers/scsi/qla4xxx/ql4_os.c tmo = ((ha->def_timeout > LOGIN_TOV) && ha 8495 drivers/scsi/qla4xxx/ql4_os.c (ha->def_timeout < LOGIN_TOV * 10) ? ha 8496 drivers/scsi/qla4xxx/ql4_os.c ha->def_timeout : LOGIN_TOV); ha 8498 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 8506 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_remove_failed_ddb(ha, &list_st); ha 8511 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_build_nt_list(ha, &list_nt, &list_st, is_reset); ha 8516 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_free_ddb_index(ha); ha 8528 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_wait_login_resp_boot_tgt(struct scsi_qla_host *ha) ha 8537 drivers/scsi/qla4xxx/ql4_os.c max_ddbs = is_qla40XX(ha) ? MAX_DEV_DB_ENTRIES_40XX : ha 8540 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 8543 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 8551 drivers/scsi/qla4xxx/ql4_os.c ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, idx); ha 8556 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 8560 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_get_fwddb_entry(ha, ha 8577 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, ha 8587 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 8605 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 8614 drivers/scsi/qla4xxx/ql4_os.c host = iscsi_host_alloc(&qla4xxx_driver_template, sizeof(*ha), 0); ha 8622 drivers/scsi/qla4xxx/ql4_os.c ha = to_qla_host(host); ha 8623 drivers/scsi/qla4xxx/ql4_os.c memset(ha, 0, sizeof(*ha)); ha 8626 drivers/scsi/qla4xxx/ql4_os.c ha->pdev = pdev; ha 8627 drivers/scsi/qla4xxx/ql4_os.c ha->host = host; ha 8628 drivers/scsi/qla4xxx/ql4_os.c ha->host_no = host->host_no; ha 8629 drivers/scsi/qla4xxx/ql4_os.c ha->func_num = PCI_FUNC(ha->pdev->devfn); ha 8634 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8022(ha)) { ha 8635 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops = &qla4_82xx_isp_ops; ha 8636 drivers/scsi/qla4xxx/ql4_os.c ha->reg_tbl = (uint32_t *) qla4_82xx_reg_tbl; ha 8637 drivers/scsi/qla4xxx/ql4_os.c ha->qdr_sn_window = -1; ha 8638 drivers/scsi/qla4xxx/ql4_os.c ha->ddr_mn_window = -1; ha 8639 drivers/scsi/qla4xxx/ql4_os.c ha->curr_window = 255; ha 8640 drivers/scsi/qla4xxx/ql4_os.c nx_legacy_intr = &legacy_intr[ha->func_num]; ha 8641 drivers/scsi/qla4xxx/ql4_os.c ha->nx_legacy_intr.int_vec_bit = nx_legacy_intr->int_vec_bit; ha 8642 drivers/scsi/qla4xxx/ql4_os.c ha->nx_legacy_intr.tgt_status_reg = ha 8644 drivers/scsi/qla4xxx/ql4_os.c ha->nx_legacy_intr.tgt_mask_reg = nx_legacy_intr->tgt_mask_reg; ha 8645 drivers/scsi/qla4xxx/ql4_os.c ha->nx_legacy_intr.pci_int_reg = nx_legacy_intr->pci_int_reg; ha 8646 drivers/scsi/qla4xxx/ql4_os.c } else if (is_qla8032(ha) || is_qla8042(ha)) { ha 8647 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops = &qla4_83xx_isp_ops; ha 8648 drivers/scsi/qla4xxx/ql4_os.c ha->reg_tbl = (uint32_t *)qla4_83xx_reg_tbl; ha 8650 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops = &qla4xxx_isp_ops; ha 8653 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) { ha 8654 drivers/scsi/qla4xxx/ql4_os.c rwlock_init(&ha->hw_lock); ha 8655 drivers/scsi/qla4xxx/ql4_os.c ha->pf_bit = ha->func_num << 16; ha 8661 drivers/scsi/qla4xxx/ql4_os.c ret = ha->isp_ops->iospace_config(ha); ha 8665 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "Found an ISP%04x, irq %d, iobase 0x%p\n", ha 8666 drivers/scsi/qla4xxx/ql4_os.c pdev->device, pdev->irq, ha->reg); ha 8668 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_config_dma_addressing(ha); ha 8671 drivers/scsi/qla4xxx/ql4_os.c INIT_LIST_HEAD(&ha->free_srb_q); ha 8673 drivers/scsi/qla4xxx/ql4_os.c mutex_init(&ha->mbox_sem); ha 8674 drivers/scsi/qla4xxx/ql4_os.c mutex_init(&ha->chap_sem); ha 8675 drivers/scsi/qla4xxx/ql4_os.c init_completion(&ha->mbx_intr_comp); ha 8676 drivers/scsi/qla4xxx/ql4_os.c init_completion(&ha->disable_acb_comp); ha 8677 drivers/scsi/qla4xxx/ql4_os.c init_completion(&ha->idc_comp); ha 8678 drivers/scsi/qla4xxx/ql4_os.c init_completion(&ha->link_up_comp); ha 8680 drivers/scsi/qla4xxx/ql4_os.c spin_lock_init(&ha->hardware_lock); ha 8681 drivers/scsi/qla4xxx/ql4_os.c spin_lock_init(&ha->work_lock); ha 8684 drivers/scsi/qla4xxx/ql4_os.c INIT_LIST_HEAD(&ha->work_list); ha 8687 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_mem_alloc(ha)) { ha 8688 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, ha 8703 drivers/scsi/qla4xxx/ql4_os.c pci_set_drvdata(pdev, ha); ha 8709 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) ha 8710 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_get_flash_info(ha); ha 8712 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8032(ha) || is_qla8042(ha)) { ha 8713 drivers/scsi/qla4xxx/ql4_os.c qla4_83xx_read_reset_template(ha); ha 8721 drivers/scsi/qla4xxx/ql4_os.c qla4_83xx_set_idc_dontreset(ha); ha 8729 drivers/scsi/qla4xxx/ql4_os.c status = qla4xxx_initialize_adapter(ha, INIT_ADAPTER); ha 8732 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha) && (status == QLA_ERROR)) ha 8735 drivers/scsi/qla4xxx/ql4_os.c while ((!test_bit(AF_ONLINE, &ha->flags)) && ha 8738 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) { ha 8739 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_lock(ha); ha 8740 drivers/scsi/qla4xxx/ql4_os.c dev_state = qla4_8xxx_rd_direct(ha, ha 8742 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_unlock(ha); ha 8744 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "%s: don't retry " ha 8753 drivers/scsi/qla4xxx/ql4_os.c if (ha->isp_ops->reset_chip(ha) == QLA_ERROR) ha 8756 drivers/scsi/qla4xxx/ql4_os.c status = qla4xxx_initialize_adapter(ha, INIT_ADAPTER); ha 8757 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha) && (status == QLA_ERROR)) { ha 8758 drivers/scsi/qla4xxx/ql4_os.c if (qla4_8xxx_check_init_adapter_retry(ha) == QLA_ERROR) ha 8764 drivers/scsi/qla4xxx/ql4_os.c if (!test_bit(AF_ONLINE, &ha->flags)) { ha 8765 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "Failed to initialize adapter\n"); ha 8767 drivers/scsi/qla4xxx/ql4_os.c if ((is_qla8022(ha) && ql4xdontresethba) || ha 8768 drivers/scsi/qla4xxx/ql4_os.c ((is_qla8032(ha) || is_qla8042(ha)) && ha 8769 drivers/scsi/qla4xxx/ql4_os.c qla4_83xx_idc_dontreset(ha))) { ha 8772 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_lock(ha); ha 8773 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, ha 8775 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_unlock(ha); ha 8784 drivers/scsi/qla4xxx/ql4_os.c sprintf(buf, "qla4xxx_%lu_dpc", ha->host_no); ha 8785 drivers/scsi/qla4xxx/ql4_os.c ha->dpc_thread = create_singlethread_workqueue(buf); ha 8786 drivers/scsi/qla4xxx/ql4_os.c if (!ha->dpc_thread) { ha 8787 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "Unable to start DPC thread!\n"); ha 8791 drivers/scsi/qla4xxx/ql4_os.c INIT_WORK(&ha->dpc_work, qla4xxx_do_dpc); ha 8793 drivers/scsi/qla4xxx/ql4_os.c ha->task_wq = alloc_workqueue("qla4xxx_%lu_task", WQ_MEM_RECLAIM, 1, ha 8794 drivers/scsi/qla4xxx/ql4_os.c ha->host_no); ha 8795 drivers/scsi/qla4xxx/ql4_os.c if (!ha->task_wq) { ha 8796 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "Unable to start task thread!\n"); ha 8807 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha)) { ha 8808 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_request_irqs(ha); ha 8810 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "Failed to reserve " ha 8816 drivers/scsi/qla4xxx/ql4_os.c pci_save_state(ha->pdev); ha 8817 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->enable_intrs(ha); ha 8820 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_start_timer(ha, 1); ha 8822 drivers/scsi/qla4xxx/ql4_os.c set_bit(AF_INIT_DONE, &ha->flags); ha 8824 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_alloc_sysfs_attr(ha); ha 8829 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_version_str, ha->pdev->device, pci_name(ha->pdev), ha 8830 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, ha->fw_info.fw_major, ha->fw_info.fw_minor, ha 8831 drivers/scsi/qla4xxx/ql4_os.c ha->fw_info.fw_patch, ha->fw_info.fw_build); ha 8834 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) ha 8835 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_set_param(ha, SET_DRVR_VERSION); ha 8837 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_setup_boot_info(ha)) ha 8838 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 8841 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_SYSFS_DDB_EXPORT, &ha->dpc_flags); ha 8843 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_build_ddb_list(ha, INIT_ADAPTER); ha 8844 drivers/scsi/qla4xxx/ql4_os.c iscsi_host_for_each_session(ha->host, qla4xxx_login_flash_ddb); ha 8845 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_wait_login_resp_boot_tgt(ha); ha 8847 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_create_chap_list(ha); ha 8849 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_create_ifaces(ha); ha 8853 drivers/scsi/qla4xxx/ql4_os.c scsi_remove_host(ha->host); ha 8856 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_free_adapter(ha); ha 8860 drivers/scsi/qla4xxx/ql4_os.c scsi_host_put(ha->host); ha 8876 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_prevent_other_port_reinit(struct scsi_qla_host *ha) ha 8883 drivers/scsi/qla4xxx/ql4_os.c if (PCI_FUNC(ha->pdev->devfn) & BIT_1) ha 8887 drivers/scsi/qla4xxx/ql4_os.c pci_get_domain_bus_and_slot(pci_domain_nr(ha->pdev->bus), ha 8888 drivers/scsi/qla4xxx/ql4_os.c ha->pdev->bus->number, PCI_DEVFN(PCI_SLOT(ha->pdev->devfn), ha 8897 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: " ha 8906 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_destroy_ddb(struct scsi_qla_host *ha, ha 8917 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_session_logout_ddb(ha, ddb_entry, options) == QLA_ERROR) { ha 8918 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: Logout failed\n", __func__); ha 8922 drivers/scsi/qla4xxx/ql4_os.c fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 8925 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, ha 8932 drivers/scsi/qla4xxx/ql4_os.c status = qla4xxx_get_fwddb_entry(ha, ddb_entry->fw_ddb_index, ha 8947 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), ha 8950 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_clear_ddb_entry(ha, ddb_entry->fw_ddb_index); ha 8953 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_destroy_fw_ddb_session(struct scsi_qla_host *ha) ha 8960 drivers/scsi/qla4xxx/ql4_os.c ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, idx); ha 8964 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_destroy_ddb(ha, ddb_entry); ha 8973 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_free_ddb(ha, ddb_entry); ha 8984 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 8993 drivers/scsi/qla4xxx/ql4_os.c ha = pci_get_drvdata(pdev); ha 8995 drivers/scsi/qla4xxx/ql4_os.c if (is_qla40XX(ha)) ha 8996 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_prevent_other_port_reinit(ha); ha 8999 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_destroy_ifaces(ha); ha 9001 drivers/scsi/qla4xxx/ql4_os.c if ((!ql4xdisablesysfsboot) && ha->boot_kset) ha 9002 drivers/scsi/qla4xxx/ql4_os.c iscsi_boot_destroy_kset(ha->boot_kset); ha 9004 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_destroy_fw_ddb_session(ha); ha 9005 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_free_sysfs_attr(ha); ha 9007 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_sysfs_ddb_remove(ha); ha 9008 drivers/scsi/qla4xxx/ql4_os.c scsi_remove_host(ha->host); ha 9010 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_free_adapter(ha); ha 9012 drivers/scsi/qla4xxx/ql4_os.c scsi_host_put(ha->host); ha 9022 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_config_dma_addressing(struct scsi_qla_host *ha) ha 9025 drivers/scsi/qla4xxx/ql4_os.c if (dma_set_mask_and_coherent(&ha->pdev->dev, DMA_BIT_MASK(64))) { ha 9026 drivers/scsi/qla4xxx/ql4_os.c dev_dbg(&ha->pdev->dev, ha 9029 drivers/scsi/qla4xxx/ql4_os.c dma_set_mask_and_coherent(&ha->pdev->dev, DMA_BIT_MASK(32)); ha 9060 drivers/scsi/qla4xxx/ql4_os.c struct srb *qla4xxx_del_from_active_array(struct scsi_qla_host *ha, ha 9066 drivers/scsi/qla4xxx/ql4_os.c cmd = scsi_host_find_tag(ha->host, index); ha 9076 drivers/scsi/qla4xxx/ql4_os.c ha->iocb_cnt -= srb->iocb_cnt; ha 9092 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_eh_wait_on_command(struct scsi_qla_host *ha, ha 9103 drivers/scsi/qla4xxx/ql4_os.c if (unlikely(pci_channel_offline(ha->pdev)) || ha 9104 drivers/scsi/qla4xxx/ql4_os.c (test_bit(AF_EEH_BUSY, &ha->flags))) { ha 9105 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "scsi%ld: Return from %s\n", ha 9106 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__); ha 9128 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_wait_for_hba_online(struct scsi_qla_host *ha) ha 9135 drivers/scsi/qla4xxx/ql4_os.c if (adapter_up(ha)) ha 9153 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_eh_wait_for_commands(struct scsi_qla_host *ha, ha 9165 drivers/scsi/qla4xxx/ql4_os.c for (cnt = 0; cnt < ha->host->can_queue; cnt++) { ha 9166 drivers/scsi/qla4xxx/ql4_os.c cmd = scsi_host_find_tag(ha->host, cnt); ha 9169 drivers/scsi/qla4xxx/ql4_os.c if (!qla4xxx_eh_wait_on_command(ha, cmd)) { ha 9187 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(cmd->device->host); ha 9196 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld:%d:%llu: Abort command issued cmd=%p, cdb=0x%x\n", ha 9197 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, id, lun, cmd, cmd->cmnd[0]); ha 9199 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_isp_check_reg(ha); ha 9201 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "PCI/Register disconnect, exiting.\n"); ha 9205 drivers/scsi/qla4xxx/ql4_os.c spin_lock_irqsave(&ha->hardware_lock, flags); ha 9208 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 9209 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld:%d:%llu: Specified command has already completed.\n", ha 9210 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, id, lun); ha 9214 drivers/scsi/qla4xxx/ql4_os.c spin_unlock_irqrestore(&ha->hardware_lock, flags); ha 9216 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_abort_task(ha, srb) != QLA_SUCCESS) { ha 9218 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, id, lun)); ha 9222 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, id, lun)); ha 9230 drivers/scsi/qla4xxx/ql4_os.c if (!qla4xxx_eh_wait_on_command(ha, cmd)) { ha 9232 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, id, lun)); ha 9237 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 9239 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, id, lun, (ret == SUCCESS) ? "succeeded" : "failed"); ha 9253 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(cmd->device->host); ha 9266 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 9267 drivers/scsi/qla4xxx/ql4_os.c "scsi%ld:%d:%d:%llu: DEVICE RESET ISSUED.\n", ha->host_no, ha 9272 drivers/scsi/qla4xxx/ql4_os.c "dpc_flags=%lx, status=%x allowed=%d\n", ha->host_no, ha 9274 drivers/scsi/qla4xxx/ql4_os.c ha->dpc_flags, cmd->result, cmd->allowed)); ha 9276 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_isp_check_reg(ha); ha 9278 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "PCI/Register disconnect, exiting.\n"); ha 9283 drivers/scsi/qla4xxx/ql4_os.c stat = qla4xxx_reset_lun(ha, ddb_entry, cmd->device->lun); ha 9285 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "DEVICE RESET FAILED. %d\n", stat); ha 9289 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_eh_wait_for_commands(ha, scsi_target(cmd->device), ha 9291 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 9298 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_send_marker_iocb(ha, ddb_entry, cmd->device->lun, ha 9302 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 9304 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, cmd->device->channel, cmd->device->id, ha 9322 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(cmd->device->host); ha 9340 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, cmd, jiffies, cmd->request->timeout / HZ, ha 9341 drivers/scsi/qla4xxx/ql4_os.c ha->dpc_flags, cmd->result, cmd->allowed)); ha 9343 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_isp_check_reg(ha); ha 9345 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "PCI/Register disconnect, exiting.\n"); ha 9349 drivers/scsi/qla4xxx/ql4_os.c stat = qla4xxx_reset_target(ha, ddb_entry); ha 9356 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_eh_wait_for_commands(ha, scsi_target(cmd->device), ha 9365 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_send_marker_iocb(ha, ddb_entry, cmd->device->lun, ha 9402 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha; ha 9405 drivers/scsi/qla4xxx/ql4_os.c ha = to_qla_host(cmd->device->host); ha 9407 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_isp_check_reg(ha); ha 9409 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "PCI/Register disconnect, exiting.\n"); ha 9413 drivers/scsi/qla4xxx/ql4_os.c if ((is_qla8032(ha) || is_qla8042(ha)) && ql4xdontresethba) ha 9414 drivers/scsi/qla4xxx/ql4_os.c qla4_83xx_set_idc_dontreset(ha); ha 9421 drivers/scsi/qla4xxx/ql4_os.c ((is_qla8032(ha) || is_qla8042(ha)) && ha 9422 drivers/scsi/qla4xxx/ql4_os.c qla4_83xx_idc_dontreset(ha))) { ha 9424 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__)); ha 9428 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_abort_active_cmds(ha, DID_ABORT << 16); ha 9433 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, ha 9434 drivers/scsi/qla4xxx/ql4_os.c "scsi(%ld:%d:%d:%llu): HOST RESET ISSUED.\n", ha->host_no, ha 9437 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_wait_for_hba_online(ha) != QLA_SUCCESS) { ha 9439 drivers/scsi/qla4xxx/ql4_os.c "DEAD.\n", ha->host_no, cmd->device->channel, ha 9445 drivers/scsi/qla4xxx/ql4_os.c if (!test_bit(DPC_RESET_HA, &ha->dpc_flags)) { ha 9446 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) ha 9447 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags); ha 9449 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 9452 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_recover_adapter(ha) == QLA_SUCCESS) ha 9455 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "HOST RESET %s.\n", ha 9461 drivers/scsi/qla4xxx/ql4_os.c static int qla4xxx_context_reset(struct scsi_qla_host *ha) ha 9470 drivers/scsi/qla4xxx/ql4_os.c acb = dma_alloc_coherent(&ha->pdev->dev, ha 9474 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "%s: Unable to alloc acb\n", ha 9482 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_get_acb(ha, acb_dma, PRIMARI_ACB, acb_len); ha 9488 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_disable_acb(ha); ha 9494 drivers/scsi/qla4xxx/ql4_os.c wait_for_completion_timeout(&ha->disable_acb_comp, ha 9497 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_set_acb(ha, &mbox_cmd[0], &mbox_sts[0], acb_dma); ha 9504 drivers/scsi/qla4xxx/ql4_os.c dma_free_coherent(&ha->pdev->dev, sizeof(struct addr_ctrl_blk_def), ha 9507 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s %s\n", __func__, ha 9514 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = to_qla_host(shost); ha 9519 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Don't Reset HBA\n", ha 9525 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(DPC_RESET_HA, &ha->dpc_flags)) ha 9530 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RESET_HA, &ha->dpc_flags); ha 9533 drivers/scsi/qla4xxx/ql4_os.c if (!test_bit(DPC_RESET_HA, &ha->dpc_flags)) { ha 9534 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) ha 9537 drivers/scsi/qla4xxx/ql4_os.c &ha->dpc_flags); ha 9539 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_context_reset(ha); ha 9549 drivers/scsi/qla4xxx/ql4_os.c if ((is_qla8032(ha) || is_qla8042(ha)) && ha 9550 drivers/scsi/qla4xxx/ql4_os.c test_bit(DPC_RESET_HA, &ha->dpc_flags)) { ha 9551 drivers/scsi/qla4xxx/ql4_os.c idc_ctrl = qla4_83xx_rd_reg(ha, QLA83XX_IDC_DRV_CTRL); ha 9552 drivers/scsi/qla4xxx/ql4_os.c qla4_83xx_wr_reg(ha, QLA83XX_IDC_DRV_CTRL, ha 9556 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_recover_adapter(ha); ha 9558 drivers/scsi/qla4xxx/ql4_os.c DEBUG2(ql4_printk(KERN_INFO, ha, "%s: recover adapter fail\n", ha 9585 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = pci_get_drvdata(pdev); ha 9587 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: error detected:state %x\n", ha 9588 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__, state); ha 9590 drivers/scsi/qla4xxx/ql4_os.c if (!is_aer_supported(ha)) ha 9595 drivers/scsi/qla4xxx/ql4_os.c clear_bit(AF_EEH_BUSY, &ha->flags); ha 9598 drivers/scsi/qla4xxx/ql4_os.c set_bit(AF_EEH_BUSY, &ha->flags); ha 9599 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_mailbox_premature_completion(ha); ha 9600 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_free_irqs(ha); ha 9603 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_abort_active_cmds(ha, DID_RESET << 16); ha 9606 drivers/scsi/qla4xxx/ql4_os.c set_bit(AF_EEH_BUSY, &ha->flags); ha 9607 drivers/scsi/qla4xxx/ql4_os.c set_bit(AF_PCI_CHANNEL_IO_PERM_FAILURE, &ha->flags); ha 9608 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_abort_active_cmds(ha, DID_NO_CONNECT << 16); ha 9622 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = pci_get_drvdata(pdev); ha 9624 drivers/scsi/qla4xxx/ql4_os.c if (!is_aer_supported(ha)) ha 9630 drivers/scsi/qla4xxx/ql4_os.c static uint32_t qla4_8xxx_error_recovery(struct scsi_qla_host *ha) ha 9636 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "scsi%ld: In %s\n", ha->host_no, __func__); ha 9638 drivers/scsi/qla4xxx/ql4_os.c set_bit(DPC_RESET_ACTIVE, &ha->dpc_flags); ha 9640 drivers/scsi/qla4xxx/ql4_os.c if (test_bit(AF_ONLINE, &ha->flags)) { ha 9641 drivers/scsi/qla4xxx/ql4_os.c clear_bit(AF_ONLINE, &ha->flags); ha 9642 drivers/scsi/qla4xxx/ql4_os.c clear_bit(AF_LINK_UP, &ha->flags); ha 9643 drivers/scsi/qla4xxx/ql4_os.c iscsi_host_for_each_session(ha->host, qla4xxx_fail_session); ha 9644 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS); ha 9647 drivers/scsi/qla4xxx/ql4_os.c fn = PCI_FUNC(ha->pdev->devfn); ha 9648 drivers/scsi/qla4xxx/ql4_os.c if (is_qla8022(ha)) { ha 9651 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: Finding PCI device at func %x\n", ha 9652 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__, fn); ha 9656 drivers/scsi/qla4xxx/ql4_os.c pci_domain_nr(ha->pdev->bus), ha 9657 drivers/scsi/qla4xxx/ql4_os.c ha->pdev->bus->number, ha 9658 drivers/scsi/qla4xxx/ql4_os.c PCI_DEVFN(PCI_SLOT(ha->pdev->devfn), ha 9665 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: Found PCI func in enabled state%x\n", ha 9666 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__, fn); ha 9674 drivers/scsi/qla4xxx/ql4_os.c if (qla4_83xx_can_perform_reset(ha)) { ha 9685 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: devfn being reset " ha 9686 drivers/scsi/qla4xxx/ql4_os.c "0x%x is the owner\n", ha->host_no, __func__, ha 9687 drivers/scsi/qla4xxx/ql4_os.c ha->pdev->devfn); ha 9689 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_lock(ha); ha 9690 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, ha 9692 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_unlock(ha); ha 9694 drivers/scsi/qla4xxx/ql4_os.c rval = qla4_8xxx_update_idc_reg(ha); ha 9696 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: HW State: FAILED\n", ha 9697 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__); ha 9698 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_lock(ha); ha 9699 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, ha 9701 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_unlock(ha); ha 9705 drivers/scsi/qla4xxx/ql4_os.c clear_bit(AF_FW_RECOVERY, &ha->flags); ha 9706 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_initialize_adapter(ha, RESET_ADAPTER); ha 9709 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: HW State: " ha 9710 drivers/scsi/qla4xxx/ql4_os.c "FAILED\n", ha->host_no, __func__); ha 9711 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_free_irqs(ha); ha 9712 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_lock(ha); ha 9713 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_clear_drv_active(ha); ha 9714 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, ha 9716 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_unlock(ha); ha 9718 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: HW State: " ha 9719 drivers/scsi/qla4xxx/ql4_os.c "READY\n", ha->host_no, __func__); ha 9720 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_lock(ha); ha 9721 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, ha 9724 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_STATE, 0); ha 9725 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_set_drv_active(ha); ha 9726 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_unlock(ha); ha 9727 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->enable_intrs(ha); ha 9730 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_INFO, ha, "scsi%ld: %s: devfn 0x%x is not " ha 9731 drivers/scsi/qla4xxx/ql4_os.c "the reset owner\n", ha->host_no, __func__, ha 9732 drivers/scsi/qla4xxx/ql4_os.c ha->pdev->devfn); ha 9733 drivers/scsi/qla4xxx/ql4_os.c if ((qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DEV_STATE) == ha 9735 drivers/scsi/qla4xxx/ql4_os.c clear_bit(AF_FW_RECOVERY, &ha->flags); ha 9736 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_initialize_adapter(ha, RESET_ADAPTER); ha 9738 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->enable_intrs(ha); ha 9740 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_free_irqs(ha); ha 9742 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_lock(ha); ha 9743 drivers/scsi/qla4xxx/ql4_os.c qla4_8xxx_set_drv_active(ha); ha 9744 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->idc_unlock(ha); ha 9748 drivers/scsi/qla4xxx/ql4_os.c clear_bit(DPC_RESET_ACTIVE, &ha->dpc_flags); ha 9756 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = pci_get_drvdata(pdev); ha 9759 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: slot_reset\n", ha 9760 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__); ha 9762 drivers/scsi/qla4xxx/ql4_os.c if (!is_aer_supported(ha)) ha 9779 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: Can't re-enable " ha 9780 drivers/scsi/qla4xxx/ql4_os.c "device after reset\n", ha->host_no, __func__); ha 9784 drivers/scsi/qla4xxx/ql4_os.c ha->isp_ops->disable_intrs(ha); ha 9786 drivers/scsi/qla4xxx/ql4_os.c if (is_qla80XX(ha)) { ha 9787 drivers/scsi/qla4xxx/ql4_os.c if (qla4_8xxx_error_recovery(ha) == QLA_SUCCESS) { ha 9795 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: Return=%x\n" ha 9796 drivers/scsi/qla4xxx/ql4_os.c "device after reset\n", ha->host_no, __func__, ret); ha 9803 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = pci_get_drvdata(pdev); ha 9806 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: pci_resume\n", ha 9807 drivers/scsi/qla4xxx/ql4_os.c ha->host_no, __func__); ha 9809 drivers/scsi/qla4xxx/ql4_os.c ret = qla4xxx_wait_for_hba_online(ha); ha 9811 drivers/scsi/qla4xxx/ql4_os.c ql4_printk(KERN_ERR, ha, "scsi%ld: %s: the device failed to " ha 9812 drivers/scsi/qla4xxx/ql4_os.c "resume I/O from slot/link_reset\n", ha->host_no, ha 9816 drivers/scsi/qla4xxx/ql4_os.c clear_bit(AF_EEH_BUSY, &ha->flags); ha 916 drivers/staging/fsl-dpaa2/ethsw/ethsw.c struct netdev_hw_addr *ha; ha 919 drivers/staging/fsl-dpaa2/ethsw/ethsw.c list_for_each_entry(ha, &list->list, list) { ha 920 drivers/staging/fsl-dpaa2/ethsw/ethsw.c if (ether_addr_equal(ha->addr, addr)) { ha 1902 drivers/staging/ks7010/ks_hostif.c struct netdev_hw_addr *ha; ha 1925 drivers/staging/ks7010/ks_hostif.c netdev_for_each_mc_addr(ha, dev) { ha 1926 drivers/staging/ks7010/ks_hostif.c ether_addr_copy(&set_address[i * ETH_ALEN], ha->addr); ha 4329 drivers/staging/qlge/qlge_main.c struct netdev_hw_addr *ha; ha 4393 drivers/staging/qlge/qlge_main.c netdev_for_each_mc_addr(ha, ndev) { ha 4394 drivers/staging/qlge/qlge_main.c if (ql_set_mac_addr_reg(qdev, (u8 *) ha->addr, ha 1341 drivers/staging/unisys/visornic/visornic_main.c struct netdev_hw_addr *ha; ha 1347 drivers/staging/unisys/visornic/visornic_main.c netdev_for_each_mc_addr(ha, netdev) { ha 1349 drivers/staging/unisys/visornic/visornic_main.c ha->addr)) { ha 1486 drivers/staging/vt6655/device_main.c struct netdev_hw_addr *ha; ha 1490 drivers/staging/vt6655/device_main.c netdev_hw_addr_list_for_each(ha, mc_list) { ha 1491 drivers/staging/vt6655/device_main.c bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 803 drivers/staging/vt6656/main_usb.c struct netdev_hw_addr *ha; ha 807 drivers/staging/vt6656/main_usb.c netdev_hw_addr_list_for_each(ha, mc_list) { ha 808 drivers/staging/vt6656/main_usb.c bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; ha 666 drivers/staging/wilc1000/wilc_netdev.c struct netdev_hw_addr *ha; ha 692 drivers/staging/wilc1000/wilc_netdev.c netdev_for_each_mc_addr(ha, dev) { ha 693 drivers/staging/wilc1000/wilc_netdev.c memcpy(cur_mc, ha->addr, ETH_ALEN); ha 472 include/linux/etherdevice.h struct netdev_hw_addr *ha; ha 476 include/linux/etherdevice.h for_each_dev_addr(dev, ha) { ha 477 include/linux/etherdevice.h res = ether_addr_equal_64bits(addr, ha->addr); ha 226 include/linux/netdevice.h #define netdev_hw_addr_list_for_each(ha, l) \ ha 227 include/linux/netdevice.h list_for_each_entry(ha, &(l)->list, list) ha 231 include/linux/netdevice.h #define netdev_for_each_uc_addr(ha, dev) \ ha 232 include/linux/netdevice.h netdev_hw_addr_list_for_each(ha, &(dev)->uc) ha 236 include/linux/netdevice.h #define netdev_for_each_mc_addr(ha, dev) \ ha 237 include/linux/netdevice.h netdev_hw_addr_list_for_each(ha, &(dev)->mc) ha 4081 include/linux/netdevice.h #define for_each_dev_addr(dev, ha) \ ha 4082 include/linux/netdevice.h list_for_each_entry_rcu(ha, &dev->dev_addrs.list, list) ha 701 include/net/bonding.h struct netdev_hw_addr *ha; ha 710 include/net/bonding.h netdev_for_each_uc_addr(ha, bond->dev) ha 711 include/net/bonding.h if (ether_addr_equal_64bits(mac, ha->addr)) ha 211 include/net/ndisc.h u8 **ha); ha 214 include/net/ndisc.h const u8 *ha); ha 267 include/net/ndisc.h u8 *ha_buf, u8 **ha) ha 271 include/net/ndisc.h neigh, ha_buf, ha); ha 287 include/net/ndisc.h const u8 *ha) ha 290 include/net/ndisc.h dev->ndisc_ops->fill_addr_option(dev, skb, NDISC_REDIRECT, ha); ha 153 include/net/neighbour.h unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))] __aligned(8); ha 553 include/net/neighbour.h memcpy(dst, n->ha, dev->addr_len); ha 274 include/scsi/libsas.h struct sas_ha_struct *ha; ha 344 include/scsi/libsas.h struct sas_ha_struct *ha; /* may be set; the class sets it anyway */ ha 701 include/scsi/libsas.h extern int sas_drain_work(struct sas_ha_struct *ha); ha 108 include/trace/events/neigh.h memcpy(__entry->lladdr, n->ha, lladdr_len); ha 185 include/trace/events/neigh.h memcpy(__entry->lladdr, n->ha, lladdr_len); ha 116 net/6lowpan/ndisc.c u8 *ha_buf, u8 **ha) ha 135 net/6lowpan/ndisc.c *ha = ha_buf; ha 157 net/6lowpan/ndisc.c const u8 *ha) ha 168 net/6lowpan/ndisc.c if (ha) { ha 169 net/6lowpan/ndisc.c ieee802154_le16_to_be16(&short_addr, ha); ha 212 net/bluetooth/6lowpan.c if (!memcmp(neigh->ha, peer->lladdr, ETH_ALEN)) { ha 82 net/bluetooth/bnep/netdev.c struct netdev_hw_addr *ha; ha 93 net/bluetooth/bnep/netdev.c netdev_for_each_mc_addr(ha, dev) { ha 96 net/bluetooth/bnep/netdev.c __skb_put_data(skb, ha->addr, ETH_ALEN); ha 97 net/bluetooth/bnep/netdev.c __skb_put_data(skb, ha->addr, ETH_ALEN); ha 193 net/bridge/br_arp_nd_proxy.c f = br_fdb_find_rcu(br, n->ha, vid); ha 202 net/bridge/br_arp_nd_proxy.c sha, n->ha, sha, 0, 0); ha 205 net/bridge/br_arp_nd_proxy.c sha, n->ha, sha, ha 291 net/bridge/br_arp_nd_proxy.c ether_addr_copy(eth_hdr(reply)->h_source, n->ha); ha 321 net/bridge/br_arp_nd_proxy.c ether_addr_copy(&na->opt[2], n->ha); ha 350 net/bridge/br_arp_nd_proxy.c dev->name, &pip6->daddr, daddr, &pip6->saddr, n->ha); ha 448 net/bridge/br_arp_nd_proxy.c f = br_fdb_find_rcu(br, n->ha, vid); ha 863 net/core/dev.c const char *ha) ha 869 net/core/dev.c !memcmp(dev->dev_addr, ha, dev->addr_len)) ha 24 net/core/dev_addr_lists.c struct netdev_hw_addr *ha; ha 27 net/core/dev_addr_lists.c alloc_size = sizeof(*ha); ha 30 net/core/dev_addr_lists.c ha = kmalloc(alloc_size, GFP_ATOMIC); ha 31 net/core/dev_addr_lists.c if (!ha) ha 33 net/core/dev_addr_lists.c memcpy(ha->addr, addr, addr_len); ha 34 net/core/dev_addr_lists.c ha->type = addr_type; ha 35 net/core/dev_addr_lists.c ha->refcount = 1; ha 36 net/core/dev_addr_lists.c ha->global_use = global; ha 37 net/core/dev_addr_lists.c ha->synced = sync ? 1 : 0; ha 38 net/core/dev_addr_lists.c ha->sync_cnt = 0; ha 39 net/core/dev_addr_lists.c list_add_tail_rcu(&ha->list, &list->list); ha 50 net/core/dev_addr_lists.c struct netdev_hw_addr *ha; ha 55 net/core/dev_addr_lists.c list_for_each_entry(ha, &list->list, list) { ha 56 net/core/dev_addr_lists.c if (ha->type == addr_type && ha 57 net/core/dev_addr_lists.c !memcmp(ha->addr, addr, addr_len)) { ha 60 net/core/dev_addr_lists.c if (ha->global_use) ha 63 net/core/dev_addr_lists.c ha->global_use = true; ha 66 net/core/dev_addr_lists.c if (ha->synced && sync_count) ha 69 net/core/dev_addr_lists.c ha->synced++; ha 71 net/core/dev_addr_lists.c ha->refcount++; ha 89 net/core/dev_addr_lists.c struct netdev_hw_addr *ha, bool global, ha 92 net/core/dev_addr_lists.c if (global && !ha->global_use) ha 95 net/core/dev_addr_lists.c if (sync && !ha->synced) ha 99 net/core/dev_addr_lists.c ha->global_use = false; ha 102 net/core/dev_addr_lists.c ha->synced--; ha 104 net/core/dev_addr_lists.c if (--ha->refcount) ha 106 net/core/dev_addr_lists.c list_del_rcu(&ha->list); ha 107 net/core/dev_addr_lists.c kfree_rcu(ha, rcu_head); ha 116 net/core/dev_addr_lists.c struct netdev_hw_addr *ha; ha 118 net/core/dev_addr_lists.c list_for_each_entry(ha, &list->list, list) { ha 119 net/core/dev_addr_lists.c if (!memcmp(ha->addr, addr, addr_len) && ha 120 net/core/dev_addr_lists.c (ha->type == addr_type || !addr_type)) ha 121 net/core/dev_addr_lists.c return __hw_addr_del_entry(list, ha, global, sync); ha 134 net/core/dev_addr_lists.c struct netdev_hw_addr *ha, ha 139 net/core/dev_addr_lists.c err = __hw_addr_add_ex(to_list, ha->addr, addr_len, ha->type, ha 140 net/core/dev_addr_lists.c false, true, ha->sync_cnt); ha 145 net/core/dev_addr_lists.c ha->sync_cnt++; ha 146 net/core/dev_addr_lists.c ha->refcount++; ha 154 net/core/dev_addr_lists.c struct netdev_hw_addr *ha, ha 159 net/core/dev_addr_lists.c err = __hw_addr_del_ex(to_list, ha->addr, addr_len, ha->type, ha 163 net/core/dev_addr_lists.c ha->sync_cnt--; ha 165 net/core/dev_addr_lists.c __hw_addr_del_entry(from_list, ha, false, false); ha 173 net/core/dev_addr_lists.c struct netdev_hw_addr *ha, *tmp; ha 175 net/core/dev_addr_lists.c list_for_each_entry_safe(ha, tmp, &from_list->list, list) { ha 176 net/core/dev_addr_lists.c if (ha->sync_cnt == ha->refcount) { ha 177 net/core/dev_addr_lists.c __hw_addr_unsync_one(to_list, from_list, ha, addr_len); ha 179 net/core/dev_addr_lists.c err = __hw_addr_sync_one(to_list, ha, addr_len); ha 197 net/core/dev_addr_lists.c struct netdev_hw_addr *ha, *tmp; ha 199 net/core/dev_addr_lists.c list_for_each_entry_safe(ha, tmp, &from_list->list, list) { ha 200 net/core/dev_addr_lists.c if (!ha->sync_cnt) { ha 201 net/core/dev_addr_lists.c err = __hw_addr_sync_one(to_list, ha, addr_len); ha 204 net/core/dev_addr_lists.c } else if (ha->refcount == 1) ha 205 net/core/dev_addr_lists.c __hw_addr_unsync_one(to_list, from_list, ha, addr_len); ha 215 net/core/dev_addr_lists.c struct netdev_hw_addr *ha, *tmp; ha 217 net/core/dev_addr_lists.c list_for_each_entry_safe(ha, tmp, &from_list->list, list) { ha 218 net/core/dev_addr_lists.c if (ha->sync_cnt) ha 219 net/core/dev_addr_lists.c __hw_addr_unsync_one(to_list, from_list, ha, addr_len); ha 243 net/core/dev_addr_lists.c struct netdev_hw_addr *ha, *tmp; ha 247 net/core/dev_addr_lists.c list_for_each_entry_safe(ha, tmp, &list->list, list) { ha 248 net/core/dev_addr_lists.c if (!ha->sync_cnt || ha->refcount != 1) ha 252 net/core/dev_addr_lists.c if (unsync && unsync(dev, ha->addr)) ha 255 net/core/dev_addr_lists.c ha->sync_cnt--; ha 256 net/core/dev_addr_lists.c __hw_addr_del_entry(list, ha, false, false); ha 260 net/core/dev_addr_lists.c list_for_each_entry_safe(ha, tmp, &list->list, list) { ha 261 net/core/dev_addr_lists.c if (ha->sync_cnt) ha 264 net/core/dev_addr_lists.c err = sync(dev, ha->addr); ha 268 net/core/dev_addr_lists.c ha->sync_cnt++; ha 269 net/core/dev_addr_lists.c ha->refcount++; ha 299 net/core/dev_addr_lists.c struct netdev_hw_addr *ha, *tmp; ha 303 net/core/dev_addr_lists.c list_for_each_entry_safe(ha, tmp, &list->list, list) { ha 305 net/core/dev_addr_lists.c if ((ha->sync_cnt << 1) <= ha->refcount) ha 309 net/core/dev_addr_lists.c ref_cnt = ha->refcount - ha->sync_cnt; ha 310 net/core/dev_addr_lists.c if (unsync && unsync(dev, ha->addr, ref_cnt)) ha 313 net/core/dev_addr_lists.c ha->refcount = (ref_cnt << 1) + 1; ha 314 net/core/dev_addr_lists.c ha->sync_cnt = ref_cnt; ha 315 net/core/dev_addr_lists.c __hw_addr_del_entry(list, ha, false, false); ha 319 net/core/dev_addr_lists.c list_for_each_entry_safe(ha, tmp, &list->list, list) { ha 321 net/core/dev_addr_lists.c if ((ha->sync_cnt << 1) >= ha->refcount) ha 324 net/core/dev_addr_lists.c ref_cnt = ha->refcount - ha->sync_cnt; ha 325 net/core/dev_addr_lists.c err = sync(dev, ha->addr, ref_cnt); ha 329 net/core/dev_addr_lists.c ha->refcount = ref_cnt << 1; ha 330 net/core/dev_addr_lists.c ha->sync_cnt = ref_cnt; ha 356 net/core/dev_addr_lists.c struct netdev_hw_addr *ha, *tmp; ha 358 net/core/dev_addr_lists.c list_for_each_entry_safe(ha, tmp, &list->list, list) { ha 359 net/core/dev_addr_lists.c if (!ha->sync_cnt) ha 363 net/core/dev_addr_lists.c if (unsync && unsync(dev, ha->addr, ha->sync_cnt)) ha 366 net/core/dev_addr_lists.c ha->refcount -= ha->sync_cnt - 1; ha 367 net/core/dev_addr_lists.c ha->sync_cnt = 0; ha 368 net/core/dev_addr_lists.c __hw_addr_del_entry(list, ha, false, false); ha 390 net/core/dev_addr_lists.c struct netdev_hw_addr *ha, *tmp; ha 392 net/core/dev_addr_lists.c list_for_each_entry_safe(ha, tmp, &list->list, list) { ha 393 net/core/dev_addr_lists.c if (!ha->sync_cnt) ha 397 net/core/dev_addr_lists.c if (unsync && unsync(dev, ha->addr)) ha 400 net/core/dev_addr_lists.c ha->sync_cnt--; ha 401 net/core/dev_addr_lists.c __hw_addr_del_entry(list, ha, false, false); ha 408 net/core/dev_addr_lists.c struct netdev_hw_addr *ha, *tmp; ha 410 net/core/dev_addr_lists.c list_for_each_entry_safe(ha, tmp, &list->list, list) { ha 411 net/core/dev_addr_lists.c list_del_rcu(&ha->list); ha 412 net/core/dev_addr_lists.c kfree_rcu(ha, rcu_head); ha 457 net/core/dev_addr_lists.c struct netdev_hw_addr *ha; ha 471 net/core/dev_addr_lists.c ha = list_first_entry(&dev->dev_addrs.list, ha 473 net/core/dev_addr_lists.c dev->dev_addr = ha->addr; ha 522 net/core/dev_addr_lists.c struct netdev_hw_addr *ha; ha 530 net/core/dev_addr_lists.c ha = list_first_entry(&dev->dev_addrs.list, ha 532 net/core/dev_addr_lists.c if (!memcmp(ha->addr, addr, dev->addr_len) && ha 533 net/core/dev_addr_lists.c ha->type == addr_type && ha->refcount == 1) ha 555 net/core/dev_addr_lists.c struct netdev_hw_addr *ha; ha 559 net/core/dev_addr_lists.c list_for_each_entry(ha, &dev->uc.list, list) { ha 560 net/core/dev_addr_lists.c if (!memcmp(ha->addr, addr, dev->addr_len) && ha 561 net/core/dev_addr_lists.c ha->type == NETDEV_HW_ADDR_T_UNICAST) { ha 739 net/core/dev_addr_lists.c struct netdev_hw_addr *ha; ha 743 net/core/dev_addr_lists.c list_for_each_entry(ha, &dev->mc.list, list) { ha 744 net/core/dev_addr_lists.c if (!memcmp(ha->addr, addr, dev->addr_len) && ha 745 net/core/dev_addr_lists.c ha->type == NETDEV_HW_ADDR_T_MULTICAST) { ha 4603 net/core/filter.c memcpy(params->dmac, neigh->ha, ETH_ALEN); ha 1199 net/core/neighbour.c update(hh, neigh->dev, neigh->ha); ha 1273 net/core/neighbour.c lladdr = neigh->ha; ha 1281 net/core/neighbour.c !memcmp(lladdr, neigh->ha, dev->addr_len)) ha 1282 net/core/neighbour.c lladdr = neigh->ha; ha 1292 net/core/neighbour.c lladdr = neigh->ha; ha 1307 net/core/neighbour.c if (lladdr != neigh->ha && !(flags & NEIGH_UPDATE_F_OVERRIDE)) { ha 1311 net/core/neighbour.c lladdr = neigh->ha; ha 1316 net/core/neighbour.c if (lladdr == neigh->ha && new == NUD_STALE && ha 1326 net/core/neighbour.c if (new != old || lladdr != neigh->ha) ha 1342 net/core/neighbour.c if (lladdr != neigh->ha) { ha 1344 net/core/neighbour.c memcpy(&neigh->ha, lladdr, dev->addr_len); ha 1483 net/core/neighbour.c neigh->ha, NULL, skb->len); ha 1512 net/core/neighbour.c neigh->ha, NULL, skb->len); ha 319 net/core/net-procfs.c struct netdev_hw_addr *ha; ha 326 net/core/net-procfs.c netdev_for_each_mc_addr(ha, dev) { ha 329 net/core/net-procfs.c ha->refcount, ha->global_use, ha 330 net/core/net-procfs.c (int)dev->addr_len, ha->addr); ha 3878 net/core/rtnetlink.c struct netdev_hw_addr *ha; ha 3885 net/core/rtnetlink.c list_for_each_entry(ha, &list->list, list) { ha 3889 net/core/rtnetlink.c err = nlmsg_populate_fdb_fill(skb, dev, ha->addr, 0, ha 140 net/decnet/dn_neigh.c memcpy(neigh->ha, dev->broadcast, dev->addr_len); ha 142 net/decnet/dn_neigh.c dn_dn2eth(neigh->ha, dn->addr); ha 186 net/decnet/dn_neigh.c neigh->ha, mac_addr, skb->len); ha 407 net/decnet/dn_neigh.c memcpy(neigh->ha, ð_hdr(skb)->h_source, ETH_ALEN); ha 466 net/decnet/dn_neigh.c memcpy(neigh->ha, ð_hdr(skb)->h_source, ETH_ALEN); ha 246 net/ethernet/eth.c memcpy(eth->h_dest, neigh->ha, ETH_ALEN); ha 268 net/ipv4/arp.c arp_mc_map(addr, neigh->ha, dev, 1); ha 271 net/ipv4/arp.c memcpy(neigh->ha, dev->dev_addr, dev->addr_len); ha 275 net/ipv4/arp.c memcpy(neigh->ha, dev->broadcast, dev->addr_len); ha 1101 net/ipv4/arp.c memcpy(r->arp_ha.sa_data, neigh->ha, dev->addr_len); ha 1352 net/ipv4/arp.c ax2asc2((ax25_address *)n->ha, hbuffer); ha 1356 net/ipv4/arp.c hbuffer[k++] = hex_asc_hi(n->ha[j]); ha 1357 net/ipv4/arp.c hbuffer[k++] = hex_asc_lo(n->ha[j]); ha 2214 net/ipv6/addrconf.c union fwnet_hwaddr *ha; ha 2219 net/ipv6/addrconf.c ha = (union fwnet_hwaddr *)dev->dev_addr; ha 2221 net/ipv6/addrconf.c memcpy(eui, &ha->uc.uniq_id, sizeof(ha->uc.uniq_id)); ha 174 net/ipv6/ndisc.c void *ha, ha 177 net/ipv6/ndisc.c ndisc_fill_addr_option(skb, ND_OPT_TARGET_LL_ADDR, ha, NDISC_REDIRECT); ha 347 net/ipv6/ndisc.c ndisc_mc_map(addr, neigh->ha, dev, 1); ha 350 net/ipv6/ndisc.c memcpy(neigh->ha, dev->dev_addr, dev->addr_len); ha 355 net/ipv6/ndisc.c memcpy(neigh->ha, dev->broadcast, dev->addr_len); ha 1590 net/ipv6/ndisc.c u8 ha_buf[MAX_ADDR_LEN], *ha = NULL, ha 1649 net/ipv6/ndisc.c memcpy(ha_buf, neigh->ha, dev->addr_len); ha 1651 net/ipv6/ndisc.c ha = ha_buf; ha 1684 net/ipv6/ndisc.c if (ha) ha 1685 net/ipv6/ndisc.c ndisc_fill_redirect_addr_option(buff, ha, ops_data); ha 1557 net/netfilter/nf_tables_api.c struct nlattr *ha[NFTA_HOOK_MAX + 1]; ha 1565 net/netfilter/nf_tables_api.c err = nla_parse_nested_deprecated(ha, NFTA_HOOK_MAX, ha 1571 net/netfilter/nf_tables_api.c if (ha[NFTA_HOOK_HOOKNUM] == NULL || ha 1572 net/netfilter/nf_tables_api.c ha[NFTA_HOOK_PRIORITY] == NULL) ha 1575 net/netfilter/nf_tables_api.c hook->num = ntohl(nla_get_be32(ha[NFTA_HOOK_HOOKNUM])); ha 1576 net/netfilter/nf_tables_api.c hook->priority = ntohl(nla_get_be32(ha[NFTA_HOOK_PRIORITY])); ha 1604 net/netfilter/nf_tables_api.c if (!ha[NFTA_HOOK_DEV]) { ha 1609 net/netfilter/nf_tables_api.c nla_strlcpy(ifname, ha[NFTA_HOOK_DEV], IFNAMSIZ); ha 1616 net/netfilter/nf_tables_api.c } else if (ha[NFTA_HOOK_DEV]) { ha 310 sound/soc/ti/omap-hdmi.c struct omap_hdmi_audio_pdata *ha = pdev->dev.platform_data; ha 318 sound/soc/ti/omap-hdmi.c if (!ha) { ha 326 sound/soc/ti/omap-hdmi.c ad->dssdev = ha->dev; ha 327 sound/soc/ti/omap-hdmi.c ad->ops = ha->ops; ha 328 sound/soc/ti/omap-hdmi.c ad->dma_data.addr = ha->audio_dma_addr; ha 333 sound/soc/ti/omap-hdmi.c switch (ha->version) { ha 211 tools/testing/selftests/powerpc/primitives/asm/ppc_asm.h 0: addis r2,r12,(.TOC.-0b)@ha; \ ha 311 tools/testing/selftests/powerpc/primitives/asm/ppc_asm.h addis reg,reg,(name - 0b)@ha; \ ha 371 tools/testing/selftests/powerpc/primitives/asm/ppc_asm.h lis reg,(expr)@ha; \ ha 376 tools/testing/selftests/powerpc/primitives/asm/ppc_asm.h #define LOAD_REG_ADDRBASE(reg, name) lis reg,name@ha