Lines Matching refs:mpi_coredump
135 struct ql_mpi_coredump *mpi_coredump)
214 direct_ptr = mpi_coredump->serdes2_xaui_an;
215 indirect_ptr = mpi_coredump->serdes_xaui_an;
218 direct_ptr = mpi_coredump->serdes_xaui_an;
219 indirect_ptr = mpi_coredump->serdes2_xaui_an;
229 mpi_coredump->serdes2_xaui_hss_pcs;
231 mpi_coredump->serdes_xaui_hss_pcs;
234 mpi_coredump->serdes_xaui_hss_pcs;
236 mpi_coredump->serdes2_xaui_hss_pcs;
245 direct_ptr = mpi_coredump->serdes2_xfi_an;
246 indirect_ptr = mpi_coredump->serdes_xfi_an;
248 direct_ptr = mpi_coredump->serdes_xfi_an;
249 indirect_ptr = mpi_coredump->serdes2_xfi_an;
258 direct_ptr = mpi_coredump->serdes2_xfi_train;
260 mpi_coredump->serdes_xfi_train;
262 direct_ptr = mpi_coredump->serdes_xfi_train;
264 mpi_coredump->serdes2_xfi_train;
274 mpi_coredump->serdes2_xfi_hss_pcs;
276 mpi_coredump->serdes_xfi_hss_pcs;
279 mpi_coredump->serdes_xfi_hss_pcs;
281 mpi_coredump->serdes2_xfi_hss_pcs;
291 mpi_coredump->serdes2_xfi_hss_tx;
293 mpi_coredump->serdes_xfi_hss_tx;
295 direct_ptr = mpi_coredump->serdes_xfi_hss_tx;
297 mpi_coredump->serdes2_xfi_hss_tx;
306 mpi_coredump->serdes2_xfi_hss_rx;
308 mpi_coredump->serdes_xfi_hss_rx;
310 direct_ptr = mpi_coredump->serdes_xfi_hss_rx;
312 mpi_coredump->serdes2_xfi_hss_rx;
323 mpi_coredump->serdes2_xfi_hss_pll;
325 mpi_coredump->serdes_xfi_hss_pll;
328 mpi_coredump->serdes_xfi_hss_pll;
330 mpi_coredump->serdes2_xfi_hss_pll;
737 int ql_core_dump(struct ql_adapter *qdev, struct ql_mpi_coredump *mpi_coredump)
742 if (!mpi_coredump) {
761 memset(&(mpi_coredump->mpi_global_header), 0,
763 mpi_coredump->mpi_global_header.cookie = MPI_COREDUMP_COOKIE;
764 mpi_coredump->mpi_global_header.headerSize =
766 mpi_coredump->mpi_global_header.imageSize =
768 memcpy(mpi_coredump->mpi_global_header.idString, "MPI Coredump",
769 sizeof(mpi_coredump->mpi_global_header.idString));
772 ql_build_coredump_seg_header(&mpi_coredump->nic_regs_seg_hdr,
775 sizeof(mpi_coredump->nic_regs), "NIC1 Registers");
777 ql_build_coredump_seg_header(&mpi_coredump->nic2_regs_seg_hdr,
780 sizeof(mpi_coredump->nic2_regs), "NIC2 Registers");
783 ql_build_coredump_seg_header(&mpi_coredump->xgmac1_seg_hdr,
786 sizeof(mpi_coredump->xgmac1), "NIC1 XGMac Registers");
788 ql_build_coredump_seg_header(&mpi_coredump->xgmac2_seg_hdr,
791 sizeof(mpi_coredump->xgmac2), "NIC2 XGMac Registers");
796 mpi_coredump->nic2_regs[i] =
800 mpi_coredump->nic_regs[i] =
803 ql_get_xgmac_regs(qdev, &mpi_coredump->xgmac2[0], 0);
804 ql_get_xgmac_regs(qdev, &mpi_coredump->xgmac1[0], 1);
808 mpi_coredump->nic_regs[i] =
811 mpi_coredump->nic2_regs[i] =
814 ql_get_xgmac_regs(qdev, &mpi_coredump->xgmac1[0], 0);
815 ql_get_xgmac_regs(qdev, &mpi_coredump->xgmac2[0], 1);
819 ql_build_coredump_seg_header(&mpi_coredump->xaui_an_hdr,
822 sizeof(mpi_coredump->serdes_xaui_an),
826 ql_build_coredump_seg_header(&mpi_coredump->xaui_hss_pcs_hdr,
829 sizeof(mpi_coredump->serdes_xaui_hss_pcs),
832 ql_build_coredump_seg_header(&mpi_coredump->xfi_an_hdr, XFI_AN_SEG_NUM,
834 sizeof(mpi_coredump->serdes_xfi_an),
837 ql_build_coredump_seg_header(&mpi_coredump->xfi_train_hdr,
840 sizeof(mpi_coredump->serdes_xfi_train),
843 ql_build_coredump_seg_header(&mpi_coredump->xfi_hss_pcs_hdr,
846 sizeof(mpi_coredump->serdes_xfi_hss_pcs),
849 ql_build_coredump_seg_header(&mpi_coredump->xfi_hss_tx_hdr,
852 sizeof(mpi_coredump->serdes_xfi_hss_tx),
855 ql_build_coredump_seg_header(&mpi_coredump->xfi_hss_rx_hdr,
858 sizeof(mpi_coredump->serdes_xfi_hss_rx),
861 ql_build_coredump_seg_header(&mpi_coredump->xfi_hss_pll_hdr,
864 sizeof(mpi_coredump->serdes_xfi_hss_pll),
867 ql_build_coredump_seg_header(&mpi_coredump->xaui2_an_hdr,
870 sizeof(mpi_coredump->serdes2_xaui_an),
873 ql_build_coredump_seg_header(&mpi_coredump->xaui2_hss_pcs_hdr,
876 sizeof(mpi_coredump->serdes2_xaui_hss_pcs),
879 ql_build_coredump_seg_header(&mpi_coredump->xfi2_an_hdr,
882 sizeof(mpi_coredump->serdes2_xfi_an),
885 ql_build_coredump_seg_header(&mpi_coredump->xfi2_train_hdr,
888 sizeof(mpi_coredump->serdes2_xfi_train),
891 ql_build_coredump_seg_header(&mpi_coredump->xfi2_hss_pcs_hdr,
894 sizeof(mpi_coredump->serdes2_xfi_hss_pcs),
897 ql_build_coredump_seg_header(&mpi_coredump->xfi2_hss_tx_hdr,
900 sizeof(mpi_coredump->serdes2_xfi_hss_tx),
903 ql_build_coredump_seg_header(&mpi_coredump->xfi2_hss_rx_hdr,
906 sizeof(mpi_coredump->serdes2_xfi_hss_rx),
909 ql_build_coredump_seg_header(&mpi_coredump->xfi2_hss_pll_hdr,
912 sizeof(mpi_coredump->serdes2_xfi_hss_pll),
915 status = ql_get_serdes_regs(qdev, mpi_coredump);
923 ql_build_coredump_seg_header(&mpi_coredump->core_regs_seg_hdr,
925 sizeof(mpi_coredump->core_regs_seg_hdr) +
926 sizeof(mpi_coredump->mpi_core_regs) +
927 sizeof(mpi_coredump->mpi_core_sh_regs),
931 status = ql_get_mpi_regs(qdev, &mpi_coredump->mpi_core_regs[0],
937 &mpi_coredump->mpi_core_sh_regs[0]);
942 ql_build_coredump_seg_header(&mpi_coredump->test_logic_regs_seg_hdr,
945 + sizeof(mpi_coredump->test_logic_regs),
947 status = ql_get_mpi_regs(qdev, &mpi_coredump->test_logic_regs[0],
953 ql_build_coredump_seg_header(&mpi_coredump->rmii_regs_seg_hdr,
956 + sizeof(mpi_coredump->rmii_regs),
958 status = ql_get_mpi_regs(qdev, &mpi_coredump->rmii_regs[0],
964 ql_build_coredump_seg_header(&mpi_coredump->fcmac1_regs_seg_hdr,
967 + sizeof(mpi_coredump->fcmac1_regs),
969 status = ql_get_mpi_regs(qdev, &mpi_coredump->fcmac1_regs[0],
976 ql_build_coredump_seg_header(&mpi_coredump->fcmac2_regs_seg_hdr,
979 + sizeof(mpi_coredump->fcmac2_regs),
982 status = ql_get_mpi_regs(qdev, &mpi_coredump->fcmac2_regs[0],
988 ql_build_coredump_seg_header(&mpi_coredump->fc1_mbx_regs_seg_hdr,
991 + sizeof(mpi_coredump->fc1_mbx_regs),
993 status = ql_get_mpi_regs(qdev, &mpi_coredump->fc1_mbx_regs[0],
999 ql_build_coredump_seg_header(&mpi_coredump->ide_regs_seg_hdr,
1002 + sizeof(mpi_coredump->ide_regs),
1004 status = ql_get_mpi_regs(qdev, &mpi_coredump->ide_regs[0],
1010 ql_build_coredump_seg_header(&mpi_coredump->nic1_mbx_regs_seg_hdr,
1013 + sizeof(mpi_coredump->nic1_mbx_regs),
1015 status = ql_get_mpi_regs(qdev, &mpi_coredump->nic1_mbx_regs[0],
1021 ql_build_coredump_seg_header(&mpi_coredump->smbus_regs_seg_hdr,
1024 + sizeof(mpi_coredump->smbus_regs),
1026 status = ql_get_mpi_regs(qdev, &mpi_coredump->smbus_regs[0],
1032 ql_build_coredump_seg_header(&mpi_coredump->fc2_mbx_regs_seg_hdr,
1035 + sizeof(mpi_coredump->fc2_mbx_regs),
1037 status = ql_get_mpi_regs(qdev, &mpi_coredump->fc2_mbx_regs[0],
1043 ql_build_coredump_seg_header(&mpi_coredump->nic2_mbx_regs_seg_hdr,
1046 + sizeof(mpi_coredump->nic2_mbx_regs),
1048 status = ql_get_mpi_regs(qdev, &mpi_coredump->nic2_mbx_regs[0],
1054 ql_build_coredump_seg_header(&mpi_coredump->i2c_regs_seg_hdr,
1057 + sizeof(mpi_coredump->i2c_regs),
1059 status = ql_get_mpi_regs(qdev, &mpi_coredump->i2c_regs[0],
1065 ql_build_coredump_seg_header(&mpi_coredump->memc_regs_seg_hdr,
1068 + sizeof(mpi_coredump->memc_regs),
1070 status = ql_get_mpi_regs(qdev, &mpi_coredump->memc_regs[0],
1076 ql_build_coredump_seg_header(&mpi_coredump->pbus_regs_seg_hdr,
1079 + sizeof(mpi_coredump->pbus_regs),
1081 status = ql_get_mpi_regs(qdev, &mpi_coredump->pbus_regs[0],
1087 ql_build_coredump_seg_header(&mpi_coredump->mde_regs_seg_hdr,
1090 + sizeof(mpi_coredump->mde_regs),
1092 status = ql_get_mpi_regs(qdev, &mpi_coredump->mde_regs[0],
1097 ql_build_coredump_seg_header(&mpi_coredump->misc_nic_seg_hdr,
1100 + sizeof(mpi_coredump->misc_nic_info),
1102 mpi_coredump->misc_nic_info.rx_ring_count = qdev->rx_ring_count;
1103 mpi_coredump->misc_nic_info.tx_ring_count = qdev->tx_ring_count;
1104 mpi_coredump->misc_nic_info.intr_count = qdev->intr_count;
1105 mpi_coredump->misc_nic_info.function = qdev->func;
1109 ql_build_coredump_seg_header(&mpi_coredump->intr_states_seg_hdr,
1112 + sizeof(mpi_coredump->intr_states),
1114 ql_get_intr_states(qdev, &mpi_coredump->intr_states[0]);
1116 ql_build_coredump_seg_header(&mpi_coredump->cam_entries_seg_hdr,
1119 + sizeof(mpi_coredump->cam_entries),
1121 status = ql_get_cam_entries(qdev, &mpi_coredump->cam_entries[0]);
1125 ql_build_coredump_seg_header(&mpi_coredump->nic_routing_words_seg_hdr,
1128 + sizeof(mpi_coredump->nic_routing_words),
1131 &mpi_coredump->nic_routing_words[0]);
1136 ql_build_coredump_seg_header(&mpi_coredump->ets_seg_hdr,
1139 + sizeof(mpi_coredump->ets),
1141 status = ql_get_ets_regs(qdev, &mpi_coredump->ets[0]);
1145 ql_build_coredump_seg_header(&mpi_coredump->probe_dump_seg_hdr,
1148 + sizeof(mpi_coredump->probe_dump),
1150 ql_get_probe_dump(qdev, &mpi_coredump->probe_dump[0]);
1152 ql_build_coredump_seg_header(&mpi_coredump->routing_reg_seg_hdr,
1155 + sizeof(mpi_coredump->routing_regs),
1158 &mpi_coredump->routing_regs[0]);
1162 ql_build_coredump_seg_header(&mpi_coredump->mac_prot_reg_seg_hdr,
1165 + sizeof(mpi_coredump->mac_prot_regs),
1167 ql_get_mac_protocol_registers(qdev, &mpi_coredump->mac_prot_regs[0]);
1170 ql_build_coredump_seg_header(&mpi_coredump->sem_regs_seg_hdr,
1173 sizeof(mpi_coredump->sem_regs), "Sem Registers");
1175 ql_get_sem_registers(qdev, &mpi_coredump->sem_regs[0]);
1196 ql_build_coredump_seg_header(&mpi_coredump->code_ram_seg_hdr,
1199 + sizeof(mpi_coredump->code_ram),
1201 status = ql_dump_risc_ram_area(qdev, &mpi_coredump->code_ram[0],
1211 ql_build_coredump_seg_header(&mpi_coredump->memc_ram_seg_hdr,
1214 + sizeof(mpi_coredump->memc_ram),
1216 status = ql_dump_risc_ram_area(qdev, &mpi_coredump->memc_ram[0],
1246 struct ql_reg_dump *mpi_coredump)
1251 memset(&(mpi_coredump->mpi_global_header), 0,
1253 mpi_coredump->mpi_global_header.cookie = MPI_COREDUMP_COOKIE;
1254 mpi_coredump->mpi_global_header.headerSize =
1256 mpi_coredump->mpi_global_header.imageSize =
1258 memcpy(mpi_coredump->mpi_global_header.idString, "MPI Coredump",
1259 sizeof(mpi_coredump->mpi_global_header.idString));
1263 ql_build_coredump_seg_header(&mpi_coredump->misc_nic_seg_hdr,
1266 + sizeof(mpi_coredump->misc_nic_info),
1268 mpi_coredump->misc_nic_info.rx_ring_count = qdev->rx_ring_count;
1269 mpi_coredump->misc_nic_info.tx_ring_count = qdev->tx_ring_count;
1270 mpi_coredump->misc_nic_info.intr_count = qdev->intr_count;
1271 mpi_coredump->misc_nic_info.function = qdev->func;
1274 ql_build_coredump_seg_header(&mpi_coredump->nic_regs_seg_hdr,
1277 + sizeof(mpi_coredump->nic_regs),
1281 mpi_coredump->nic_regs[i] = ql_read32(qdev, i * sizeof(u32));
1285 ql_build_coredump_seg_header(&mpi_coredump->intr_states_seg_hdr,
1288 + sizeof(mpi_coredump->intr_states),
1290 ql_get_intr_states(qdev, &mpi_coredump->intr_states[0]);
1292 ql_build_coredump_seg_header(&mpi_coredump->cam_entries_seg_hdr,
1295 + sizeof(mpi_coredump->cam_entries),
1297 status = ql_get_cam_entries(qdev, &mpi_coredump->cam_entries[0]);
1301 ql_build_coredump_seg_header(&mpi_coredump->nic_routing_words_seg_hdr,
1304 + sizeof(mpi_coredump->nic_routing_words),
1307 &mpi_coredump->nic_routing_words[0]);
1312 ql_build_coredump_seg_header(&mpi_coredump->ets_seg_hdr,
1315 + sizeof(mpi_coredump->ets),
1317 status = ql_get_ets_regs(qdev, &mpi_coredump->ets[0]);
1334 tmp = (u32 *)qdev->mpi_coredump;