All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ata: ahci: stop using saved_port_map for quircks
@ 2024-02-25  9:55 Andrey Jr. Melnikov
  2024-02-26  8:42 ` Sergey Shtylyov
  2024-02-26  9:57 ` Niklas Cassel
  0 siblings, 2 replies; 5+ messages in thread
From: Andrey Jr. Melnikov @ 2024-02-25  9:55 UTC (permalink / raw)
  To: Niklas Cassel; +Cc: Damien Le Moal, linux-ide


Stop using saved_port_map for masking port quirks, use force_port_map
instead.

Signed-off-by: Andrey Jr. Melnikov <temnota.am@gmail.com>

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 682ff550ccfb..066e3118801c 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -675,18 +675,18 @@ static void ahci_pci_save_initial_config(struct pci_dev *pdev,
 		switch (pdev->device) {
 		case 0x1166:
 			dev_info(&pdev->dev, "ASM1166 has only six ports\n");
-			hpriv->saved_port_map = 0x3f;
+			hpriv->mask_port_map = 0x3f;
 			break;
 		case 0x1064:
 			dev_info(&pdev->dev, "ASM1064 has only four ports\n");
-			hpriv->saved_port_map = 0xf;
+			hpriv->mask_port_map = 0xf;
 			break;
 		}
 	}
 
 	if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361) {
 		dev_info(&pdev->dev, "JMB361 has only one port\n");
-		hpriv->saved_port_map = 1;
+		hpriv->mask_port_map = 1;
 	}
 
 	/*
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 1a63200ea437..cc705d3bdc50 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -531,16 +531,10 @@ void ahci_save_initial_config(struct device *dev, struct ahci_host_priv *hpriv)
 		cap &= ~HOST_CAP_SXS;
 	}
 
-	/* Override the HBA ports mapping if the platform needs it */
 	port_map = readl(mmio + HOST_PORTS_IMPL);
-	if (hpriv->saved_port_map && port_map != hpriv->saved_port_map) {
-		dev_info(dev, "forcing port_map 0x%lx -> 0x%x\n",
-			 port_map, hpriv->saved_port_map);
-		port_map = hpriv->saved_port_map;
-	} else {
-		hpriv->saved_port_map = port_map;
-	}
+	hpriv->saved_port_map = port_map;
 
+	/* Override the HBA ports mapping if the platform needs it */
 	if (hpriv->mask_port_map) {
 		dev_warn(dev, "masking port_map 0x%lx -> 0x%lx\n",
 			port_map,
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-01  9:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-25  9:55 [PATCH] ata: ahci: stop using saved_port_map for quircks Andrey Jr. Melnikov
2024-02-26  8:42 ` Sergey Shtylyov
2024-02-26  9:57 ` Niklas Cassel
2024-02-26 10:30   ` Serge Semin
2024-03-01  9:32   ` Serge Semin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.