Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359480
b: refs/heads/master
c: 9661975
h: refs/heads/master
v: v3
  • Loading branch information
Vikas Chaudhary authored and James Bottomley committed Jan 30, 2013
1 parent d21ff7c commit 66e8490
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 137257da9e52c6aec9ba67aae0a2bbae235dfa3a
refs/heads/master: 9661975f1717876577c62796707a2b7e34facb3f
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/qla4xxx/ql4_83xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 11 additions & 5 deletions trunk/drivers/scsi/qla4xxx/ql4_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/qla4xxx/ql4_glbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 66e8490

Please sign in to comment.