mpi3mr_fw.c (02ca7da2919ada525fb424640205110e24646b50) | mpi3mr_fw.c (0a319f1629495d27879b7ebf6eee62b8cf6e4c37) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Driver for Broadcom MPI3 Storage Controllers 4 * 5 * Copyright (C) 2017-2022 Broadcom Inc. 6 * (mailto: mpi3mr-linuxdrv.pdl@broadcom.com) 7 * 8 */ --- 1184 unchanged lines hidden (view full) --- 1193 * 1194 * Set Enable IOC bit in IOC configuration register and wait for 1195 * the controller to become ready. 1196 * 1197 * Return: 0 on success, appropriate error on failure. 1198 */ 1199static int mpi3mr_bring_ioc_ready(struct mpi3mr_ioc *mrioc) 1200{ | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Driver for Broadcom MPI3 Storage Controllers 4 * 5 * Copyright (C) 2017-2022 Broadcom Inc. 6 * (mailto: mpi3mr-linuxdrv.pdl@broadcom.com) 7 * 8 */ --- 1184 unchanged lines hidden (view full) --- 1193 * 1194 * Set Enable IOC bit in IOC configuration register and wait for 1195 * the controller to become ready. 1196 * 1197 * Return: 0 on success, appropriate error on failure. 1198 */ 1199static int mpi3mr_bring_ioc_ready(struct mpi3mr_ioc *mrioc) 1200{ |
1201 u32 ioc_config, ioc_status, timeout; | 1201 u32 ioc_config, ioc_status, timeout, host_diagnostic; |
1202 int retval = 0; 1203 enum mpi3mr_iocstate ioc_state; 1204 u64 base_info; 1205 1206 ioc_status = readl(&mrioc->sysif_regs->ioc_status); 1207 ioc_config = readl(&mrioc->sysif_regs->ioc_configuration); 1208 base_info = lo_hi_readq(&mrioc->sysif_regs->ioc_information); 1209 ioc_info(mrioc, "ioc_status(0x%08x), ioc_config(0x%08x), ioc_info(0x%016llx) at the bringup\n", --- 37 unchanged lines hidden (view full) --- 1247 MPI3MR_RESET_FROM_BRINGUP); 1248 ioc_state = mpi3mr_get_iocstate(mrioc); 1249 if (retval) 1250 ioc_err(mrioc, 1251 "message unit reset failed with error %d current state %s\n", 1252 retval, mpi3mr_iocstate_name(ioc_state)); 1253 } 1254 if (ioc_state != MRIOC_STATE_RESET) { | 1202 int retval = 0; 1203 enum mpi3mr_iocstate ioc_state; 1204 u64 base_info; 1205 1206 ioc_status = readl(&mrioc->sysif_regs->ioc_status); 1207 ioc_config = readl(&mrioc->sysif_regs->ioc_configuration); 1208 base_info = lo_hi_readq(&mrioc->sysif_regs->ioc_information); 1209 ioc_info(mrioc, "ioc_status(0x%08x), ioc_config(0x%08x), ioc_info(0x%016llx) at the bringup\n", --- 37 unchanged lines hidden (view full) --- 1247 MPI3MR_RESET_FROM_BRINGUP); 1248 ioc_state = mpi3mr_get_iocstate(mrioc); 1249 if (retval) 1250 ioc_err(mrioc, 1251 "message unit reset failed with error %d current state %s\n", 1252 retval, mpi3mr_iocstate_name(ioc_state)); 1253 } 1254 if (ioc_state != MRIOC_STATE_RESET) { |
1255 if (ioc_state == MRIOC_STATE_FAULT) { 1256 timeout = MPI3_SYSIF_DIAG_SAVE_TIMEOUT * 10; 1257 mpi3mr_print_fault_info(mrioc); 1258 do { 1259 host_diagnostic = 1260 readl(&mrioc->sysif_regs->host_diagnostic); 1261 if (!(host_diagnostic & 1262 MPI3_SYSIF_HOST_DIAG_SAVE_IN_PROGRESS)) 1263 break; 1264 if (!pci_device_is_present(mrioc->pdev)) { 1265 mrioc->unrecoverable = 1; 1266 ioc_err(mrioc, "controller is not present at the bringup\n"); 1267 goto out_device_not_present; 1268 } 1269 msleep(100); 1270 } while (--timeout); 1271 } |
|
1255 mpi3mr_print_fault_info(mrioc); 1256 ioc_info(mrioc, "issuing soft reset to bring to reset state\n"); 1257 retval = mpi3mr_issue_reset(mrioc, 1258 MPI3_SYSIF_HOST_DIAG_RESET_ACTION_SOFT_RESET, 1259 MPI3MR_RESET_FROM_BRINGUP); 1260 if (retval) { 1261 ioc_err(mrioc, 1262 "soft reset failed with error %d\n", retval); --- 4512 unchanged lines hidden --- | 1272 mpi3mr_print_fault_info(mrioc); 1273 ioc_info(mrioc, "issuing soft reset to bring to reset state\n"); 1274 retval = mpi3mr_issue_reset(mrioc, 1275 MPI3_SYSIF_HOST_DIAG_RESET_ACTION_SOFT_RESET, 1276 MPI3MR_RESET_FROM_BRINGUP); 1277 if (retval) { 1278 ioc_err(mrioc, 1279 "soft reset failed with error %d\n", retval); --- 4512 unchanged lines hidden --- |