Re: Fwd: Kernel 6.5.2 Causes Marvell Technology Group 88SE9128 PCIe SATA to Constantly Reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 2023/09/16 à 0:20, Niklas Cassel a écrit :
On Fri, Sep 15, 2023 at 08:26:58PM +0800, David Gow wrote:
In any case, the bisect is done:

624885209f31eb9985bf51abe204ecbffe2fdeea is the first bad commit
commit 624885209f31eb9985bf51abe204ecbffe2fdeea
Author: Damien Le Moal <dlemoal@xxxxxxxxxx>
Date:   Thu May 11 03:13:41 2023 +0200

     scsi: core: Detect support for command duration limits

     Introduce the function scsi_cdl_check() to detect if a device supports
     command duration limits (CDL). Support for the READ 16, WRITE 16, READ
32
     and WRITE 32 commands are checked using the function
scsi_report_opcode()
     to probe the rwcdlp and cdlp bits as they indicate the mode page
defining
     the command duration limits descriptors that apply to the command being
     tested.

     If any of these commands support CDL, the field cdl_supported of struct
     scsi_device is set to 1 to indicate that the device supports CDL.

     Support for CDL for a device is advertizes through sysfs using the new
     cdl_supported device attribute. This attribute value is 1 for a device
     supporting CDL and 0 otherwise.

     Signed-off-by: Damien Le Moal <dlemoal@xxxxxxxxxx>
     Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
     Co-developed-by: Niklas Cassel <niklas.cassel@xxxxxxx>
     Signed-off-by: Niklas Cassel <niklas.cassel@xxxxxxx>
     Link: https://lore.kernel.org/r/20230511011356.227789-9-nks@xxxxxxxxxxx
     Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>

  Documentation/ABI/testing/sysfs-block-device |  9 ++++
  drivers/scsi/scsi.c                          | 81
++++++++++++++++++++++++++++
  drivers/scsi/scsi_scan.c                     |  3 ++
  drivers/scsi/scsi_sysfs.c                    |  2 +
  include/scsi/scsi_device.h                   |  3 ++
  5 files changed, 98 insertions(+)


This seems to match what was found on the Arch Linux forums, too:
https://bbs.archlinux.org/viewtopic.php?id=288723&p=3

I haven't tried it yet, but according to that forum thread, removing the
calls to scsi_cdl_check() seems to resolve the issue. This is all well
beyond my SCSI knowledge, but maybe a quirk to disable these CDL checks for
these older marvell controllers is required? Though it seems odd that the
device would be rescanned and/or scsi_add_lun called multiple times a second
-- is that normal?

In any case, this seems to be the cause.

Hello David,

Thank you very much for your effort of bisecting this.

Could you please try this patch and see if it improves things for you:
https://lore.kernel.org/linux-scsi/20230915022034.678121-1-dlemoal@xxxxxxxxxx/


Thanks very much: this seems to fix it here (on top of torvalds/master).

Cheers,
-- David




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux