mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
[SCSI] qla4xxx: Added support for force firmware dump
This patch force driver to collect firmware dump using following command:- "echo 2 > /sys/class/scsi_host/hostX/device/fw_dump" Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
137257da9e
commit
9661975f17
3 changed files with 13 additions and 6 deletions
|
@ -538,7 +538,7 @@ struct device_info {
|
|||
int port_num;
|
||||
};
|
||||
|
||||
static int qla4_83xx_can_perform_reset(struct scsi_qla_host *ha)
|
||||
int qla4_83xx_can_perform_reset(struct scsi_qla_host *ha)
|
||||
{
|
||||
uint32_t drv_active;
|
||||
uint32_t dev_part, dev_part1, dev_part2;
|
||||
|
|
|
@ -74,16 +74,22 @@ qla4_8xxx_sysfs_write_fw_dump(struct file *filep, struct kobject *kobj,
|
|||
}
|
||||
break;
|
||||
case 2:
|
||||
/* Reset HBA */
|
||||
/* Reset HBA and collect FW dump */
|
||||
ha->isp_ops->idc_lock(ha);
|
||||
dev_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DEV_STATE);
|
||||
if (dev_state == QLA8XXX_DEV_READY) {
|
||||
ql4_printk(KERN_INFO, ha,
|
||||
"%s: Setting Need reset, reset_owner is 0x%x.\n",
|
||||
__func__, ha->func_num);
|
||||
ql4_printk(KERN_INFO, ha, "%s: Setting Need reset\n",
|
||||
__func__);
|
||||
qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE,
|
||||
QLA8XXX_DEV_NEED_RESET);
|
||||
set_bit(AF_8XXX_RST_OWNER, &ha->flags);
|
||||
if (is_qla8022(ha) ||
|
||||
(is_qla8032(ha) &&
|
||||
qla4_83xx_can_perform_reset(ha))) {
|
||||
set_bit(AF_8XXX_RST_OWNER, &ha->flags);
|
||||
set_bit(AF_FW_RECOVERY, &ha->flags);
|
||||
ql4_printk(KERN_INFO, ha, "%s: Reset owner is 0x%x\n",
|
||||
__func__, ha->func_num);
|
||||
}
|
||||
} else
|
||||
ql4_printk(KERN_INFO, ha,
|
||||
"%s: Reset not performed as device state is 0x%x\n",
|
||||
|
|
|
@ -260,6 +260,7 @@ int qla4_8xxx_update_idc_reg(struct scsi_qla_host *ha);
|
|||
int qla4_83xx_post_idc_ack(struct scsi_qla_host *ha);
|
||||
void qla4_83xx_disable_pause(struct scsi_qla_host *ha);
|
||||
void qla4_83xx_enable_mbox_intrs(struct scsi_qla_host *ha);
|
||||
int qla4_83xx_can_perform_reset(struct scsi_qla_host *ha);
|
||||
|
||||
extern int ql4xextended_error_logging;
|
||||
extern int ql4xdontresethba;
|
||||
|
|
Loading…
Reference in a new issue