/* mpt_halt_firmware - Halts the firmware if it is operational and panic the kernel @ioc: Pointer to MPT_ADAPTER structure  */
void mpt_halt_firmware(MPT_ADAPTER *ioc)
/* mpt_halt_firmware - Halts the firmware if it is operational and panic the kernel @ioc: Pointer to MPT_ADAPTER structure  */
void mpt_halt_firmware(MPT_ADAPTER *ioc)
{
	u32	 ioc_raw_state;
	ioc_raw_state = mpt_GetIocState(ioc, 0);
	if ((ioc_raw_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_FAULT) {
		printk(MYIOC_s_ERR_FMT "IOC is in FAULT state (%04xh)!!!\n",
			ioc->name, ioc_raw_state & MPI_DOORBELL_DATA_MASK);
		panic("%s: IOC Fault (%04xh)!!!\n", ioc->name,
			ioc_raw_state & MPI_DOORBELL_DATA_MASK);
	} else {
		CHIPREG_WRITE32(&ioc->chip->Doorbell, 0xC0FFEE00);
		panic("%s: Firmware is halted due to command timeout\n",
			ioc->name);
	}
}