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

Commit cfb0919c authored by Chad Dupuis's avatar Chad Dupuis Committed by James Bottomley
Browse files

[SCSI] qla2xxx: Update to dynamic logging.



This patch contains minor fixes to our new logging infrastructure:

- Remove extranous messages.
- Re-add 'nexus' and 'hdl' information.
- Adjusted the message ids to fill up the holes.
- Display FCP_CMND priority on update.
- Log only mail box error conditions.
- Do not print "Firmware ready **** FAILED ****" if cable is unplugged.
- Drop noisy 'fw_state...curr time...' message.
- Correct nexus display during abort.
- Add a special case error-logging set to '1'.
- Catagorize I/O exception display handling.
- Correct the bsg msg code printing.
- Dont use dynamic logging after host is removed.

Signed-off-by: default avatarSaurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent d8424f68
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1971,8 +1971,8 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
			    "Queue delete failed.\n");
	}

	scsi_host_put(vha->host);
	ql_log(ql_log_info, vha, 0x7088, "VP[%d] deleted.\n", id);
	scsi_host_put(vha->host);
	return 0;
}

+1 −1
Original line number Diff line number Diff line
@@ -1653,7 +1653,7 @@ qla24xx_bsg_request(struct fc_bsg_job *bsg_job)
	}

	ql_dbg(ql_dbg_user, vha, 0x7000,
	    "Entered %s msgcode=%d.\n", __func__, bsg_job->request->msgcode);
	    "Entered %s msgcode=0x%x.\n", __func__, bsg_job->request->msgcode);

	switch (bsg_job->request->msgcode) {
	case FC_BSG_RPT_ELS:
+52 −41
Original line number Diff line number Diff line
@@ -11,15 +11,16 @@
 * ----------------------------------------------------------------------
 * |             Level            |   Last Value Used  |     Holes	|
 * ----------------------------------------------------------------------
 * | Module Init and Probe        |       0x0116       |  		|
 * | Module Init and Probe        |       0x0116       | 0xfa           |
 * | Mailbox commands             |       0x112b       |		|
 * | Device Discovery             |       0x2083       |		|
 * | Queue Command and IO tracing |       0x302e       |     0x3008     |
 * | Device Discovery             |       0x2084       |		|
 * | Queue Command and IO tracing |       0x302f       | 0x3008         |
 * | DPC Thread                   |       0x401c       |		|
 * | Async Events                 |       0x5059       |		|
 * | Timer Routines               |       0x6010       | 0x600e,0x600f  |
 * | User Space Interactions      |       0x709d       |		|
 * | Task Management              |       0x8041       | 0x800b         |
 * | Async Events                 |       0x5057       | 0x5052		|
 * | Timer Routines               |       0x6011       | 0x600e,0x600f  |
 * | User Space Interactions      |       0x709e       |		|
 * | Task Management              |       0x803c       | 0x8025-0x8026  |
 * |                              |                    | 0x800b,0x8039  |
 * | AER/EEH                      |       0x900f       |		|
 * | Virtual Port                 |       0xa007       |		|
 * | ISP82XX Specific             |       0xb052       |    		|
@@ -1650,6 +1651,15 @@ qla81xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
/****************************************************************************/
/*                         Driver Debug Functions.                          */
/****************************************************************************/

static inline int
ql_mask_match(uint32_t level)
{
	if (ql2xextended_error_logging == 1)
		ql2xextended_error_logging = QL_DBG_DEFAULT1_MASK;
	return (level & ql2xextended_error_logging) == level;
}

/*
 * This function is for formatting and logging debug information.
 * It is to be used when vha is available. It formats the message
@@ -1669,7 +1679,7 @@ ql_dbg(uint32_t level, scsi_qla_host_t *vha, int32_t id, const char *fmt, ...)
	va_list va;
	struct va_format vaf;

	if ((level & ql2xextended_error_logging) != level)
	if (!ql_mask_match(level))
		return;

	va_start(va, fmt);
@@ -1715,7 +1725,7 @@ ql_dbg_pci(uint32_t level, struct pci_dev *pdev, int32_t id,

	if (pdev == NULL)
		return;
	if ((level & ql2xextended_error_logging) != level)
	if (!ql_mask_match(level))
		return;

	va_start(va, fmt);
@@ -1852,7 +1862,8 @@ ql_dump_regs(uint32_t level, scsi_qla_host_t *vha, int32_t id)
	struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82;
	uint16_t __iomem *mbx_reg;

	if ((level & ql2xextended_error_logging) == level) {
	if (!ql_mask_match(level))
		return;

	if (IS_QLA82XX(ha))
		mbx_reg = &reg82->mailbox_in[0];
@@ -1866,7 +1877,6 @@ ql_dump_regs(uint32_t level, scsi_qla_host_t *vha, int32_t id)
		ql_dbg(level, vha, id,
		    "mbox[%d] 0x%04x\n", i, RD_REG_WORD(mbx_reg++));
}
}


void
@@ -1875,7 +1885,9 @@ ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id,
{
	uint32_t cnt;
	uint8_t c;
	if ((level & ql2xextended_error_logging) == level) {

	if (!ql_mask_match(level))
		return;

	ql_dbg(level, vha, id, " 0   1   2   3   4   5   6   7   8   "
	    "9  Ah  Bh  Ch  Dh  Eh  Fh\n");
@@ -1895,4 +1907,3 @@ ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id,
	if (cnt % 16)
		ql_dbg(level, vha, id, "\n");
}
}
+1 −0
Original line number Diff line number Diff line
@@ -232,6 +232,7 @@ struct qla2xxx_fw_dump {
};

#define QL_MSGHDR "qla2xxx"
#define QL_DBG_DEFAULT1_MASK    0x1e400000

#define ql_log_fatal		0 /* display fatal errors */
#define ql_log_warn		1 /* display critical errors */
+0 −4
Original line number Diff line number Diff line
@@ -2978,10 +2978,6 @@ typedef struct scsi_qla_host {
	atomic_dec(&__vha->vref_count);			     \
} while (0)


#define qla_printk(level, ha, format, arg...) \
	dev_printk(level , &((ha)->pdev->dev) , format , ## arg)

/*
 * qla2x00 local function return status codes
 */
Loading