Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b37ca418 authored by Vikas Chaudhary's avatar Vikas Chaudhary Committed by James Bottomley
Browse files

[SCSI] qla4xxx: Added support for ISP8042

parent 4d81233c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1473,9 +1473,9 @@ int qla4_83xx_isp_reset(struct scsi_qla_host *ha)
				  __func__));
	}

	/* For ISP8324, Reset owner is NIC, iSCSI or FCOE based on priority
	 * and which drivers are present. Unlike ISP8022, the function setting
	 * NEED_RESET, may not be the Reset owner. */
	/* For ISP8324 and ISP8042, Reset owner is NIC, iSCSI or FCOE based on
	 * priority and which drivers are present. Unlike ISP8022, the function
	 * setting NEED_RESET, may not be the Reset owner. */
	if (qla4_83xx_can_perform_reset(ha))
		set_bit(AF_8XXX_RST_OWNER, &ha->flags);

+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ qla4_8xxx_sysfs_write_fw_dump(struct file *filep, struct kobject *kobj,
			qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE,
					    QLA8XXX_DEV_NEED_RESET);
			if (is_qla8022(ha) ||
			    (is_qla8032(ha) &&
			    ((is_qla8032(ha) || is_qla8042(ha)) &&
			     qla4_83xx_can_perform_reset(ha))) {
				set_bit(AF_8XXX_RST_OWNER, &ha->flags);
				set_bit(AF_FW_RECOVERY, &ha->flags);
+7 −6
Original line number Diff line number Diff line
@@ -141,21 +141,22 @@ void qla4_8xxx_dump_peg_reg(struct scsi_qla_host *ha)

	if (is_qla8022(ha)) {
		ql4_printk(KERN_INFO, ha,
			   "scsi(%ld): %s, ISP8022 Dumping hw/fw registers:\n"
			   "scsi(%ld): %s, ISP%04x Dumping hw/fw registers:\n"
			   " PEG_HALT_STATUS1: 0x%x, PEG_HALT_STATUS2: 0x%x,\n"
			   " PEG_NET_0_PC: 0x%x, PEG_NET_1_PC: 0x%x,\n"
			   " PEG_NET_2_PC: 0x%x, PEG_NET_3_PC: 0x%x,\n"
			   " PEG_NET_4_PC: 0x%x\n", ha->host_no,
			   __func__, halt_status1, halt_status2,
			   " PEG_NET_4_PC: 0x%x\n", ha->host_no, __func__,
			   ha->pdev->device, halt_status1, halt_status2,
			   qla4_82xx_rd_32(ha, QLA82XX_CRB_PEG_NET_0 + 0x3c),
			   qla4_82xx_rd_32(ha, QLA82XX_CRB_PEG_NET_1 + 0x3c),
			   qla4_82xx_rd_32(ha, QLA82XX_CRB_PEG_NET_2 + 0x3c),
			   qla4_82xx_rd_32(ha, QLA82XX_CRB_PEG_NET_3 + 0x3c),
			   qla4_82xx_rd_32(ha, QLA82XX_CRB_PEG_NET_4 + 0x3c));
	} else if (is_qla8032(ha)) {
	} else if (is_qla8032(ha) || is_qla8042(ha)) {
		ql4_printk(KERN_INFO, ha,
			   "scsi(%ld): %s, ISP8324 Dumping hw/fw registers:\n"
			   "scsi(%ld): %s, ISP%04x Dumping hw/fw registers:\n"
			   " PEG_HALT_STATUS1: 0x%x, PEG_HALT_STATUS2: 0x%x,\n",
			   ha->host_no, __func__, halt_status1, halt_status2);
			   ha->host_no, __func__, ha->pdev->device,
			   halt_status1, halt_status2);
	}
}
+12 −2
Original line number Diff line number Diff line
@@ -64,6 +64,10 @@
#define PCI_DEVICE_ID_QLOGIC_ISP8324	0x8032
#endif

#ifndef PCI_DEVICE_ID_QLOGIC_ISP8042
#define PCI_DEVICE_ID_QLOGIC_ISP8042	0x8042
#endif

#define ISP4XXX_PCI_FN_1	0x1
#define ISP4XXX_PCI_FN_2	0x3

@@ -778,7 +782,8 @@ struct scsi_qla_host {
	uint32_t *reg_tbl;
	struct qla4_83xx_reset_template reset_tmplt;
	struct device_reg_83xx  __iomem *qla4_83xx_reg; /* Base I/O address
							   for ISP8324 */
							   for ISP8324 and
							   and ISP8042 */
	uint32_t pf_bit;
	struct qla4_83xx_idc_information idc_info;
};
@@ -848,9 +853,14 @@ static inline int is_qla8032(struct scsi_qla_host *ha)
	return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8324;
}

static inline int is_qla8042(struct scsi_qla_host *ha)
{
	return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8042;
}

static inline int is_qla80XX(struct scsi_qla_host *ha)
{
	return is_qla8022(ha) || is_qla8032(ha);
	return is_qla8022(ha) || is_qla8032(ha) || is_qla8042(ha);
}

static inline int is_aer_supported(struct scsi_qla_host *ha)
+2 −2
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ int qla4xxx_init_rings(struct scsi_qla_host *ha)
		    (unsigned long  __iomem *)&ha->qla4_82xx_reg->rsp_q_in);
		writel(0,
		    (unsigned long  __iomem *)&ha->qla4_82xx_reg->rsp_q_out);
	} else if (is_qla8032(ha)) {
	} else if (is_qla8032(ha) || is_qla8042(ha)) {
		writel(0,
		       (unsigned long __iomem *)&ha->qla4_83xx_reg->req_q_in);
		writel(0,
@@ -940,7 +940,7 @@ int qla4xxx_initialize_adapter(struct scsi_qla_host *ha, int is_reset)
	 * while switching from polling to interrupt mode. IOCB interrupts are
	 * enabled via isp_ops->enable_intrs.
	 */
	if (is_qla8032(ha))
	if (is_qla8032(ha) || is_qla8042(ha))
		qla4_83xx_enable_mbox_intrs(ha);

	if (qla4xxx_about_firmware(ha) == QLA_ERROR)
Loading