From d83a80ee57f0cb38baccc75e96bc56ac47d300b3 Mon Sep 17 00:00:00 2001 From: Joe Carnuccio Date: Wed, 12 Feb 2020 13:44:18 -0800 Subject: scsi: qla2xxx: Add vendor extended RDP additions and amendments This patch adds RDP command support in the driver. With the help of new ql2xsmartsan parameter, driver will use PUREX IOCB mode to send RDP command to switch and will be able to receive various diagnostic data. Link: https://lore.kernel.org/r/20200212214436.25532-8-hmadhani@marvell.com Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen --- drivers/scsi/qla2xxx/qla_isr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/scsi/qla2xxx/qla_isr.c') diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 73b6cfd14581..96f73a5b3c83 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -31,6 +31,13 @@ const char *const port_state_str[] = { "ONLINE" }; +static void qla24xx_purex_iocb(scsi_qla_host_t *vha, struct req_que *req, + struct sts_entry_24xx *pkt) +{ + memcpy(vha->purex_data, pkt, PUREX_ENTRY_SIZE); + set_bit(PROCESS_PUREX_IOCB, &vha->dpc_flags); +} + /** * qla2100_intr_handler() - Process interrupts for the ISP2100 and ISP2200. * @irq: interrupt number @@ -3128,6 +3135,9 @@ process_err: qla_ctrlvp_completed(vha, rsp->req, (struct vp_ctrl_entry_24xx *)pkt); break; + case PUREX_IOCB_TYPE: + qla24xx_purex_iocb(vha, rsp->req, pkt); + break; default: /* Type Not Supported. */ ql_dbg(ql_dbg_async, vha, 0x5042, -- cgit v1.2.3