]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qla2xxx: Fix response queue handler reading stale packets
authorArun Easi <aeasi@marvell.com>
Wed, 13 Jul 2022 05:20:39 +0000 (22:20 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 19 Jul 2022 02:33:03 +0000 (22:33 -0400)
commit4cd1c35998f92ac225a116336457ad15f921d6eb
treeb12d90e669e8d870360c055b7a7295be5586a897
parent104f9b9fd9af1f732e810d999593931e2c9551f0
scsi: qla2xxx: Fix response queue handler reading stale packets

On some platforms, the current logic of relying on finding new packet
solely based on signature pattern can lead to driver reading stale
packets. Though this is a bug in those platforms, reduce such exposures by
limiting reading packets until the IN pointer.

Two module parameters are introduced:

  ql2xrspq_follow_inptr:

    When set, on newer adapters that has queue pointer shadowing, look for
    response packets only until response queue in pointer.

    When reset, response packets are read based on a signature pattern
    logic (old way).

  ql2xrspq_follow_inptr_legacy:

    Like ql2xrspq_follow_inptr, but for those adapters where there is no
    queue pointer shadowing.

Link: https://lore.kernel.org/r/20220713052045.10683-5-njavali@marvell.com
Cc: stable@vger.kernel.org
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_os.c