Skip to contentSkip to conversation

ahci: Add Intel Cannon Lake PCH-H PCI ID

PATCH Applied Mika Westerberg 2 participants 5 messages Jan 11, 2018 libata

lore
Share & tools
lore
#1 lore raw

PATCH 2/2 ahci: Use usleep_range() in ahci_start_port()

In reply to Mika Westerberg

Using msleep(1) may actually sleep much longer than 1 msecs (~20 msecs) which unnecessarily slows down system startup. Avoid that and use usleep_range() instead.

---
 drivers/ata/libahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/libahci.c +1 -1
index a0de7a38430c..27e7daa01ccb 100644
@@ -871,7 +871,7 @@ static void ahci_start_port(struct ata_port *ap)
 				 * ports to fail the same way.
 				 */
 				if (rc == -EBUSY)
-					msleep(1);
+					usleep_range(1000, 1050);
 				else
 					break;
 			}
Signature · 1 line
2.15.1
#0 lore raw

PATCH 1/2 ahci: Add Intel Cannon Lake PCH-H PCI ID

Add Intel Cannon Lake PCH-H PCI ID to the list of supported controllers.

---
 drivers/ata/ahci.c | 1 +
 1 file changed, 1 insertion(+)
drivers/ata/ahci.c +1 -0
index 5443cb71d7ba..a3131107136f 100644
@@ -386,6 +386,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
 	{ PCI_VDEVICE(INTEL, 0xa206), board_ahci }, /* Lewisburg RAID*/
 	{ PCI_VDEVICE(INTEL, 0xa252), board_ahci }, /* Lewisburg RAID*/
 	{ PCI_VDEVICE(INTEL, 0xa256), board_ahci }, /* Lewisburg RAID*/
+	{ PCI_VDEVICE(INTEL, 0xa356), board_ahci }, /* Cannon Lake PCH-H RAID */
 
 	/* JMicron 360/1/3/5/6, match class to avoid IDE function */
 	{ PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
Signature · 1 line
2.15.1
#2 lore raw

Re: [PATCH 2/2] ahci: Use usleep_range() in ahci_start_port()

In reply to Mika Westerberg
Quoted 5 lines · Mika Westerberg

Using msleep(1) may actually sleep much longer than 1 msecs (~20 msecs) which unnecessarily slows down system startup. Avoid that and use usleep_range() instead.

Heh, I'm not sure. How big of a problem is this?

Thanks.

Signature · 1 line
tejun
#3 lore raw

Re: [PATCH 2/2] ahci: Use usleep_range() in ahci_start_port()

Quoted 8 lines · Tejun Heo
Quoted 5 lines · Mika Westerberg

Using msleep(1) may actually sleep much longer than 1 msecs (~20 msecs) which unnecessarily slows down system startup. Avoid that and use usleep_range() instead.

Heh, I'm not sure. How big of a problem is this?

It's not a big problem so you may ignore the patch if you think it is not needed. I just noticed the msleep(1) there and though we could do better using usleep_range().