diff mbox series

[1/1] qla2xxx: Initialize port speed to avoid setting lower speed

Message ID 20181106085121.13814-1-himanshu.madhani@cavium.com (mailing list archive)
State Accepted
Headers show
Series [1/1] qla2xxx: Initialize port speed to avoid setting lower speed | expand

Commit Message

Madhani, Himanshu Nov. 6, 2018, 8:51 a.m. UTC
From: Quinn Tran <quinn.tran@cavium.com>

This patch initializes port speed so that firmware does not
set lower operating speed. Setting lower speed in firmware
impacts WRITE perfomance.

Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery")
Cc: <stable@vger.kernel.org>
Singed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
---
Hi Martin, 

This patch fixes initialization issue for the driver which results into setting lower
speed for WRITE transfer. In our latest experiments we have seen improvments of 47%
for WRITE data 

Please apply this patch to 4.20/scsi-fixes for 4.20-rcX inclusion at your earliest convenience.

Thanks,
Himanshu
---
 drivers/scsi/qla2xxx/qla_init.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ewan Milne Nov. 6, 2018, 8:38 p.m. UTC | #1
On Tue, 2018-11-06 at 00:51 -0800, Himanshu Madhani wrote:
> From: Quinn Tran <quinn.tran@cavium.com>
> 
> This patch initializes port speed so that firmware does not
> set lower operating speed. Setting lower speed in firmware
> impacts WRITE perfomance.
> 
> Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery")
> Cc: <stable@vger.kernel.org>
> Singed-off-by: Quinn Tran <quinn.tran@cavium.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
> Tested-by: Laurence Oberman <loberman@redhat.com>
> ---
> Hi Martin, 
> 
> This patch fixes initialization issue for the driver which results into setting lower
> speed for WRITE transfer. In our latest experiments we have seen improvments of 47%
> for WRITE data 
> 
> Please apply this patch to 4.20/scsi-fixes for 4.20-rcX inclusion at your earliest convenience.
> 
> Thanks,
> Himanshu
> ---
>  drivers/scsi/qla2xxx/qla_init.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
> index 36d67230c3b1..92d2c6866e35 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -4791,6 +4791,7 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags)
>  	fcport->loop_id = FC_NO_LOOP_ID;
>  	qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED);
>  	fcport->supported_classes = FC_COS_UNSPECIFIED;
> +	fcport->fp_speed = PORT_SPEED_UNKNOWN;
>  
>  	fcport->ct_desc.ct_sns = dma_alloc_coherent(&vha->hw->pdev->dev,
>  		sizeof(struct ct_sns_pkt), &fcport->ct_desc.ct_sns_dma,

Thanks Laurence for the bisect that found this...

Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Martin K. Petersen Nov. 7, 2018, 2:13 a.m. UTC | #2
Himanshu,

> This patch initializes port speed so that firmware does not set lower
> operating speed. Setting lower speed in firmware impacts WRITE
> perfomance.

Applied to 4.20/scsi-fixes.

> Singed-off-by: Quinn Tran <quinn.tran@cavium.com>

Pitch Perfect but not Patch Perfect. Fixed.
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 36d67230c3b1..92d2c6866e35 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -4791,6 +4791,7 @@  qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags)
 	fcport->loop_id = FC_NO_LOOP_ID;
 	qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED);
 	fcport->supported_classes = FC_COS_UNSPECIFIED;
+	fcport->fp_speed = PORT_SPEED_UNKNOWN;
 
 	fcport->ct_desc.ct_sns = dma_alloc_coherent(&vha->hw->pdev->dev,
 		sizeof(struct ct_sns_pkt), &fcport->ct_desc.ct_sns_dma,