FreeBSD Bugzilla – Attachment 240058 Details for
Bug 243401
[patch] ahci driver problems with Marvell 88SE9230 (Dell BOSS-S1)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
committed to address above issue, tested on a variety of Dell h/w and firmwares
346483b1f10454c5617a25d5e136829f60fb1184.patch (text/plain), 2.84 KB, created by
Dave Cottlehuber
on 2023-02-10 21:11:02 UTC
(
hide
)
Description:
committed to address above issue, tested on a variety of Dell h/w and firmwares
Filename:
MIME Type:
Creator:
Dave Cottlehuber
Created:
2023-02-10 21:11:02 UTC
Size:
2.84 KB
patch
obsolete
>commit 346483b1f10454c5617a25d5e136829f60fb1184 >Author: Mariusz Zaborski <oshogbo@FreeBSD.org> >Date: Fri Feb 10 16:56:04 2023 +0100 > > ahci: increase timout > > For some devices, like Marvell 88SE9230, it takes more time > to connect to the device. This patch introduces a special flag > that extends the timeout from around 100ms to around 500ms. > > This change is based on the work of: Peter Eriksson <pen@lysator.liu.se> > > PR: 243401 > Reviewed by: imp > Tested by: dch > MFC after: 3 days > Sponsored by: Equinix > Sponsored by: SkunkWerks, GmbH > Sponsored by: Klara, Inc. > Differential Revision: https://reviews.freebsd.org/D38413 > >diff --git sys/dev/ahci/ahci.c sys/dev/ahci/ahci.c >index 821ef756c9ba..9a07636b01f1 100644 >--- sys/dev/ahci/ahci.c >+++ sys/dev/ahci/ahci.c >@@ -2605,10 +2605,14 @@ static int > ahci_sata_connect(struct ahci_channel *ch) > { > u_int32_t status; >- int timeout, found = 0; >+ int timeout, timeoutslot, found = 0; > >- /* Wait up to 100ms for "connect well" */ >- for (timeout = 0; timeout < 1000 ; timeout++) { >+ /* >+ * Wait for "connect well", up to 100ms by default and >+ * up to 500ms for devices with the SLOWDEV quirk. >+ */ >+ timeoutslot = ((ch->quirks & AHCI_Q_SLOWDEV) ? 5000 : 1000); >+ for (timeout = 0; timeout < timeoutslot; timeout++) { > status = ATA_INL(ch->r_mem, AHCI_P_SSTS); > if ((status & ATA_SS_DET_MASK) != ATA_SS_DET_NO_DEVICE) > found = 1; >@@ -2627,7 +2631,7 @@ ahci_sata_connect(struct ahci_channel *ch) > break; > DELAY(100); > } >- if (timeout >= 1000 || !found) { >+ if (timeout >= timeoutslot || !found) { > if (bootverbose) { > device_printf(ch->dev, > "SATA connect timeout time=%dus status=%08x\n", >diff --git sys/dev/ahci/ahci.h sys/dev/ahci/ahci.h >index ae068d11ce4b..7f006ea031ca 100644 >--- sys/dev/ahci/ahci.h >+++ sys/dev/ahci/ahci.h >@@ -621,6 +621,7 @@ enum ahci_err_type { > #define AHCI_Q_NOCCS 0x00400000 > #define AHCI_Q_NOAUX 0x00800000 > #define AHCI_Q_IOMMU_BUSWIDE 0x01000000 >+#define AHCI_Q_SLOWDEV 0x02000000 > > #define AHCI_Q_BIT_STRING \ > "\020" \ >@@ -648,7 +649,8 @@ enum ahci_err_type { > "\026MRVL_SR_DEL" \ > "\027NOCCS" \ > "\030NOAUX" \ >- "\031IOMMU_BUSWIDE" >+ "\031IOMMU_BUSWIDE" \ >+ "\032SLOWDEV" > > int ahci_attach(device_t dev); > int ahci_detach(device_t dev); >diff --git sys/dev/ahci/ahci_pci.c sys/dev/ahci/ahci_pci.c >index 5bccb0dd914d..51bbe6e5cbe3 100644 >--- sys/dev/ahci/ahci_pci.c >+++ sys/dev/ahci/ahci_pci.c >@@ -293,7 +293,7 @@ static const struct { > {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_ALTSIG | > AHCI_Q_IOMMU_BUSWIDE}, > {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_ALTSIG | >- AHCI_Q_IOMMU_BUSWIDE}, >+ AHCI_Q_IOMMU_BUSWIDE | AHCI_Q_SLOWDEV}, > {0x92351b4b, 0x00, "Marvell 88SE9235", 0}, > {0x06201103, 0x00, "HighPoint RocketRAID 620", 0}, > {0x06201b4b, 0x00, "HighPoint RocketRAID 620", 0},
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dch
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 243401
:
220793
|
221500
|
221502
|
237998
| 240058