On 1/26/19 2:18 AM, James Smart wrote:
Now that the lower half has much better per-cpu parallelization
using the hardware queues, the SCSI MQ support needs to be tied
into it.

The involves the following mods:
- Use the hardware queue info from the midlayer to help select the
   hardware queue to utilize. This required change to the
   get_scsi-buf_xxx routines.
= Remove lpfc_sli4_scmd_to_wqidx_distr() routine. No longer needed.
- Includes fix for SLI-3 that does not have multi queue parallelization.

Signed-off-by: Dick Kennedy <[email protected]>
Signed-off-by: James Smart <[email protected]>

---
v2:
  Adapt for 5.0 api changes:
    SCSI mq support only.
    Remove all use of shost_use_scsi_mq().
    Remove driver flag and module parameter to enable scsi_mq
---
  drivers/scsi/lpfc/lpfc.h      |  3 +-
  drivers/scsi/lpfc/lpfc_init.c |  5 +--
  drivers/scsi/lpfc/lpfc_scsi.c | 72 ++++++++++++-------------------------------
  drivers/scsi/lpfc/lpfc_scsi.h |  2 --
  4 files changed, 24 insertions(+), 58 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 9262c52e32d6..755bf49c272c 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -619,7 +619,8 @@ struct lpfc_ras_fwlog {
  struct lpfc_hba {
        /* SCSI interface function jump table entries */
        struct lpfc_scsi_buf * (*lpfc_get_scsi_buf)
-               (struct lpfc_hba *, struct lpfc_nodelist *);
+               (struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
+               struct scsi_cmnd *cmnd);
        int (*lpfc_scsi_prep_dma_buf)
                (struct lpfc_hba *, struct lpfc_scsi_buf *);
        void (*lpfc_scsi_unprep_dma_buf)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 36d9c32c9c87..e4040cdd76b7 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -4063,12 +4063,13 @@ lpfc_create_port(struct lpfc_hba *phba, int instance, 
struct device *dev)
        shost->max_lun = vport->cfg_max_luns;
        shost->this_id = -1;
        shost->max_cmd_len = 16;
-       shost->nr_hw_queues = phba->cfg_hdw_queue;
        if (phba->sli_rev == LPFC_SLI_REV4) {
+               shost->nr_hw_queues = phba->cfg_hdw_queue;
                shost->dma_boundary =
                        phba->sli4_hba.pc_sli4_params.sge_supp_len-1;
                shost->sg_tablesize = phba->cfg_scsi_seg_cnt;
-       }
+       } else
+               shost->nr_hw_queues = 1;
/*
         * Set initial can_queue value since 0 is no longer supported and

Why do you restrict full mq support to SLE-4?
The original code seems to imply that older revisions would be able to do mq, too...

Can you add a comment here why older revisions don't support it?

Other than that:

Reviewed-by: Hannes Reinecke <[email protected]>

Cheers,

Hannes

Reply via email to