Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153318695
D38413.id116695.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D38413.id116695.diff
View Options
Index: sys/dev/ahci/ahci.h
===================================================================
--- sys/dev/ahci/ahci.h
+++ sys/dev/ahci/ahci.h
@@ -621,6 +621,7 @@
#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 @@
"\026MRVL_SR_DEL" \
"\027NOCCS" \
"\030NOAUX" \
- "\031IOMMU_BUSWIDE"
+ "\031IOMMU_BUSWIDE" \
+ "\032SLOWDEV"
int ahci_attach(device_t dev);
int ahci_detach(device_t dev);
Index: sys/dev/ahci/ahci.c
===================================================================
--- sys/dev/ahci/ahci.c
+++ sys/dev/ahci/ahci.c
@@ -151,8 +151,10 @@
((v = ATA_INL(ctlr->r_mem, AHCI_BOHC)) & AHCI_BOHC_OOS) == 0) {
/* Request OS ownership. */
ATA_OUTL(ctlr->r_mem, AHCI_BOHC, v | AHCI_BOHC_OOS);
-
- /* Wait up to 2s for BIOS ownership release. */
+ /*
+ * Wait for "connect well", up to 100ms by default and
+ * up to 500ms for devices with the SLOWDEV quirk.
+ */
for (timeout = 0; timeout < 80; timeout++) {
DELAY(25000);
v = ATA_INL(ctlr->r_mem, AHCI_BOHC);
@@ -2605,10 +2607,11 @@
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 up to 100ms for "connect well" or 500ms for slow devices */
+ 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;
Index: sys/dev/ahci/ahci_pci.c
===================================================================
--- sys/dev/ahci/ahci_pci.c
+++ sys/dev/ahci/ahci_pci.c
@@ -293,7 +293,7 @@
{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},
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 11:10 AM (42 m, 13 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31906487
Default Alt Text
D38413.id116695.diff (2 KB)
Attached To
Mode
D38413: ahci: increase timout
Attached
Detach File
Event Timeline
Log In to Comment