qla2xxx: changes in multiq code
Subsystems (2)
PATCH 1/1 qla2xxx: changes in multiq code
Following changes have been made:
1. Scan outstanding commands only in the queue where it is submitted
2. Update queue registers directly in the fast path
3. Queue specific BAR is remapped only for multiq capable adapters
Please apply.
Thanks,
Anirban
Signed-off-by Anirban Chakraborty <[email protected]>
--- drivers/scsi/qla2xxx/qla_def.h | 7 ++- drivers/scsi/qla2xxx/qla_gbl.h | 6 ++ drivers/scsi/qla2xxx/qla_init.c | 4 +- drivers/scsi/qla2xxx/qla_inline.h | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 68 +++++++++----- drivers/scsi/qla2xxx/qla_isr.c | 22 ++++-- drivers/scsi/qla2xxx/qla_mbx.c | 4 +- drivers/scsi/qla2xxx/qla_os.c | 178 ++++++++++++++++++++---------------- 8 files changed, 175 insertions(+), 116 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +6 -1
@@ -181,11 +181,14 @@#define RESPONSE_ENTRY_CNT_2100 64/* Number of response entries.*/ #define RESPONSE_ENTRY_CNT_2300 512/* Number of response entries.*/ +struct req_que ; +/* * SCSI Request Block */ typedef struct srb { struct scsi_qla_host *vha; /* HA the SP is queued on */ + struct req_que *que; struct fc_port *fcport; struct scsi_cmnd *cmd; /* Linux SCSI command pkt */
@@ -2045,7 +2048,6 @@ typedef struct vport_params {#define VP_RET_CODE_NOT_FOUND 6struct qla_hw_data ; -struct req_que ;/* * ISP operations
@@ -2101,6 +2103,9 @@ struct isp_operations {int (*get_flash_version) (struct scsi_qla_host *,void *);int (*start_scsi) (srb_t *); +void (*wrt_req_reg) (struct qla_hw_data *,uint16_t ,uint16_t ); +void (*wrt_rsp_reg) (struct qla_hw_data *,uint16_t ,uint16_t ); +uint16_t (*rd_req_reg) (struct qla_hw_data *,uint16_t ); };/* MSI-X Support *************************************************************/
drivers/scsi/qla2xxx/qla_gbl.h +6 -0
@@ -391,4 +391,10 @@ extern int qla25xx_delete_req_que(struct scsi_qla_host *, struct req_que *);extern int qla25xx_delete_rsp_que (struct scsi_qla_host *,struct rsp_que *);extern int qla25xx_create_queues (struct scsi_qla_host *,uint8_t );extern int qla25xx_delete_queues (struct scsi_qla_host *,uint8_t ); +extern uint16_t qla24xx_rd_req_reg (struct qla_hw_data *,uint16_t ); +extern uint16_t qla25xx_rd_req_reg (struct qla_hw_data *,uint16_t ); +extern void qla24xx_wrt_req_reg (struct qla_hw_data *,uint16_t ,uint16_t ); +extern void qla25xx_wrt_req_reg (struct qla_hw_data *,uint16_t ,uint16_t ); +extern void qla25xx_wrt_rsp_reg (struct qla_hw_data *,uint16_t ,uint16_t ); +extern void qla24xx_wrt_rsp_reg (struct qla_hw_data *,uint16_t ,uint16_t );#endif /* _QLA_GBL_H */
drivers/scsi/qla2xxx/qla_init.c +2 -2
@@ -796,7 +796,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)if (!tc) {qla_printk (KERN_WARNING , ha,"Unable to allocate " "(%d KB) for FCE.\n" ,FCE_SIZE /1024 ); - goto cont_alloc; + goto try_eft; }memset (tc,0 ,FCE_SIZE );
@@ -808,7 +808,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)dma_free_coherent (&ha->pdev->dev,FCE_SIZE , tc, tc_dma); ha->flags.fce_enabled =0 ; - goto cont_alloc; + goto try_eft; } qla_printk(KERN_INFO, ha, "Allocated (%d KB) for FCE...\n",
drivers/scsi/qla2xxx/qla_inline.h +1 -1
@@ -63,4 +63,4 @@ qla2x00_is_reserved_id(scsi_qla_host_t *vha, uint16_t loop_id)return ((loop_id > ha->max_loop_id && loop_id <SNS_FIRST_LOOP_ID ) || loop_id ==MANAGEMENT_SERVER || loop_id ==BROADCAST ); -}; +}
drivers/scsi/qla2xxx/qla_iocb.c +43 -25
149 lines not on this page · raw message
drivers/scsi/qla2xxx/qla_isr.c +16 -6
@@ -1446,7 +1446,6 @@ void qla24xx_process_response_queue(struct rsp_que *rsp) {struct qla_hw_data *ha = rsp->hw; -device_reg_t __iomem *reg =ISP_QUE_REG (ha, rsp->id);struct sts_entry_24xx *pkt;struct scsi_qla_host *vha;
@@ -1500,10 +1499,7 @@ qla24xx_process_response_queue(struct rsp_que *rsp) }/* Adjust ring index */ -if (ha->mqenable) -WRT_REG_DWORD (®->isp25mq.rsp_q_out, rsp->ring_index); -else -WRT_REG_DWORD (®->isp24.rsp_q_out, rsp->ring_index); + ha->isp_ops->wrt_rsp_reg (ha, rsp->id, rsp->ring_index); } static void
@@ -1702,7 +1698,7 @@ qla25xx_msix_rsp_q(int irq, void *dev_id)if (!rsp->id) msix_disabled_hccr &=__constant_cpu_to_le32 (BIT_22 );else - msix_disabled_hccr &=BIT_6 ; + msix_disabled_hccr &=__constant_cpu_to_le32 (BIT_6 );qla24xx_process_response_queue (rsp);
@@ -2077,3 +2073,17 @@ int qla25xx_request_irq(struct rsp_que *rsp)return ret; } +void +qla25xx_wrt_rsp_reg (struct qla_hw_data *ha,uint16_t id,uint16_t index) +{ +device_reg_t __iomem *reg = (void *) ha->mqiobase +QLA_QUE_PAGE * id; +WRT_REG_DWORD (®->isp25mq.rsp_q_out, index); +} + +void +qla24xx_wrt_rsp_reg (struct qla_hw_data *ha,uint16_t id,uint16_t index) +{ +device_reg_t __iomem *reg = (void *) ha->iobase; +WRT_REG_DWORD (®->isp24.rsp_q_out, index); +} +
drivers/scsi/qla2xxx/qla_mbx.c +2 -2
@@ -3129,7 +3129,7 @@ qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req, }spin_unlock_irqrestore (&ha->hardware_lock, flags); - rval = (int )qla2x00_mailbox_command (vha, mcp); + rval =qla2x00_mailbox_command (vha, mcp);if (rval !=QLA_SUCCESS )DEBUG2_3_11 (printk (KERN_WARNING "%s(%ld): failed=%x mb0=%x.\n" , __func__, vha->host_no, rval, mcp->mb[0 ]));
@@ -3180,7 +3180,7 @@ qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp,spin_unlock_irqrestore (&ha->hardware_lock, flags); - rval = (int )qla2x00_mailbox_command (vha, mcp); + rval =qla2x00_mailbox_command (vha, mcp);if (rval !=QLA_SUCCESS ) DEBUG2_3_11(printk(KERN_WARNING "%s(%ld): failed=%x " "mb0=%x.\n", __func__,
drivers/scsi/qla2xxx/qla_os.c +98 -78
291 lines not on this page · raw message
Signature · 1 line
1.5.4.5