Message ID | 20230418011720.3900090-3-chutzpah@gentoo.org |
---|---|
State | New |
Headers | show |
Series | [1/2] gpu: Move ASPEED vendor ID definition to pci_ids.h | expand |
On Mon, Apr 17, 2023 at 06:17:20PM -0700, Patrick McLean wrote: > We have some machines with ASPEED SATA controllers, and are seeing the same NCQ > issues that ATI controllers (I am not sure if it's a rebranded ATI controller, > or they both have some faulty implementation). This NCQ breakage is consistent > across a few different types of drives. > > Instead of maintaining a list of drives that are broken with ASPEED controllers Are these ASPEED controllers all the same or a wide variety? Quirking all controllers from the same vendor seems like an overly broad approach to me.
On 4/18/23 14:24, Christoph Hellwig wrote: > On Mon, Apr 17, 2023 at 06:17:20PM -0700, Patrick McLean wrote: >> We have some machines with ASPEED SATA controllers, and are seeing the same NCQ >> issues that ATI controllers (I am not sure if it's a rebranded ATI controller, >> or they both have some faulty implementation). This NCQ breakage is consistent >> across a few different types of drives. >> >> Instead of maintaining a list of drives that are broken with ASPEED controllers > > Are these ASPEED controllers all the same or a wide variety? > Quirking all controllers from the same vendor seems like an overly > broad approach to me. Indeed. If you checked only one adapter model from ASPEED, then all that is needed is define it with "board_ahci_noncq" in drivers/ata/ahci.c (see ahci_pci_tbl array). NCQ support will be turned off for that particular adapter with that.
Hello! On 4/18/23 4:17 AM, Patrick McLean wrote: > We have some machines with ASPEED SATA controllers, and are seeing the same NCQ > issues that ATI controllers (I am not sure if it's a rebranded ATI controller, > or they both have some faulty implementation). This NCQ breakage is consistent > across a few different types of drives. > > Instead of maintaining a list of drives that are broken with ASPEED controllers > as well as ATI, let's just treat ASPEED controllers like ATI ones, and disable > NCQ on drives that have ATA_HORKAGE_NO_NCQ_ON_ATI set on them. > > We have been running this patch on several machines for over a week now without > reproducing an issue that was happening almost daily before. > > Signed-off-by: Patrick McLean <chutzpah@gentoo.org> > --- > drivers/ata/libata-core.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c > index 14c17c3bda4e..051492e8e9f9 100644 > --- a/drivers/ata/libata-core.c > +++ b/drivers/ata/libata-core.c > @@ -2219,7 +2219,8 @@ static int ata_dev_config_ncq(struct ata_device *dev, > } > > if (dev->horkage & ATA_HORKAGE_NO_NCQ_ON_ATI && > - ata_dev_check_adapter(dev, PCI_VENDOR_ID_ATI)) { > + (ata_dev_check_adapter(dev, PCI_VENDOR_ID_ATI) || > + ata_dev_check_adapter(dev, PCI_VENDOR_ID_ASPEED))) { Please align the start of this line with the start of the above line, so that it doesn't needlessly blend with the below line. > snprintf(desc, desc_sz, "NCQ (not used)"); > return 0; > } MBR, Sergey
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 14c17c3bda4e..051492e8e9f9 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -2219,7 +2219,8 @@ static int ata_dev_config_ncq(struct ata_device *dev, } if (dev->horkage & ATA_HORKAGE_NO_NCQ_ON_ATI && - ata_dev_check_adapter(dev, PCI_VENDOR_ID_ATI)) { + (ata_dev_check_adapter(dev, PCI_VENDOR_ID_ATI) || + ata_dev_check_adapter(dev, PCI_VENDOR_ID_ASPEED))) { snprintf(desc, desc_sz, "NCQ (not used)"); return 0; }
We have some machines with ASPEED SATA controllers, and are seeing the same NCQ issues that ATI controllers (I am not sure if it's a rebranded ATI controller, or they both have some faulty implementation). This NCQ breakage is consistent across a few different types of drives. Instead of maintaining a list of drives that are broken with ASPEED controllers as well as ATI, let's just treat ASPEED controllers like ATI ones, and disable NCQ on drives that have ATA_HORKAGE_NO_NCQ_ON_ATI set on them. We have been running this patch on several machines for over a week now without reproducing an issue that was happening almost daily before. Signed-off-by: Patrick McLean <chutzpah@gentoo.org> --- drivers/ata/libata-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)