FreeBSD Bugzilla – Attachment 237998 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]
updated patch compatible with stable/13
stable_13_boss.diff (text/plain), 18.93 KB, created by
Lorenzo Perone
on 2022-11-10 09:32:32 UTC
(
hide
)
Description:
updated patch compatible with stable/13
Filename:
MIME Type:
Creator:
Lorenzo Perone
Created:
2022-11-10 09:32:32 UTC
Size:
18.93 KB
patch
obsolete
>diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c >index c6cf273fdf0b..76d2268d2d67 100644 >--- a/sys/dev/ahci/ahci.c >+++ b/sys/dev/ahci/ahci.c >@@ -103,6 +103,12 @@ static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); > #define RECOVERY_REQUEST_SENSE 2 > #define recovery_slot spriv_field1 > >+SYSCTL_NODE(_hw, OID_AUTO, ahci, CTLFLAG_RW, 0, "AHCI debugging"); >+ >+int ahci_verbose = 0; >+SYSCTL_INT(_hw_ahci, OID_AUTO, verbose, CTLFLAG_RWTUN, >+ &ahci_verbose, 0, "AHCI debug verbosity"); >+ > static uint32_t > ahci_ch_detval(struct ahci_channel *ch, uint32_t val) > { >@@ -125,7 +131,7 @@ ahci_ctlr_setup(device_t dev) > AHCI_CCCC_EN); > ctlr->cccv = (ATA_INL(ctlr->r_mem, AHCI_CCCC) & > AHCI_CCCC_INT_MASK) >> AHCI_CCCC_INT_SHIFT; >- if (bootverbose) { >+ if (bootverbose || ahci_verbose) { > device_printf(dev, > "CCC with %dms/4cmd enabled on vector %d\n", > ctlr->ccc, ctlr->cccv); >@@ -320,7 +326,7 @@ ahci_attach(device_t dev) > device_printf(dev, "quirks=0x%b\n", ctlr->quirks, > AHCI_Q_BIT_STRING); > } >- if (bootverbose) { >+ if (bootverbose || ahci_verbose) { > device_printf(dev, "Caps:%s%s%s%s%s%s%s%s %sGbps", > (ctlr->caps & AHCI_CAP_64BIT) ? " 64bit":"", > (ctlr->caps & AHCI_CAP_SNCQ) ? " NCQ":"", >@@ -345,7 +351,7 @@ ahci_attach(device_t dev) > (ctlr->caps & AHCI_CAP_SXS) ? " eSATA":"", > (ctlr->caps & AHCI_CAP_NPMASK) + 1); > } >- if (bootverbose && version >= 0x00010200) { >+ if ((bootverbose || ahci_verbose) && version >= 0x00010200) { > device_printf(dev, "Caps2:%s%s%s%s%s%s\n", > (ctlr->caps2 & AHCI_CAP2_DESO) ? " DESO":"", > (ctlr->caps2 & AHCI_CAP2_SADM) ? " SADM":"", >@@ -860,7 +866,7 @@ ahci_ch_attach(device_t dev) > ch->chcaps |= AHCI_P_CMD_FBSCP; > if (ch->caps2 & AHCI_CAP2_SDS) > ch->chscaps = ATA_INL(ch->r_mem, AHCI_P_DEVSLP); >- if (bootverbose) { >+ if (bootverbose || ahci_verbose) { > device_printf(dev, "Caps:%s%s%s%s%s%s\n", > (ch->chcaps & AHCI_P_CMD_HPCP) ? " HPCP":"", > (ch->chcaps & AHCI_P_CMD_MPSP) ? " MPSP":"", >@@ -983,6 +989,9 @@ ahci_ch_init(device_t dev) > struct ahci_channel *ch = device_get_softc(dev); > uint64_t work; > >+ if (ahci_verbose > 2) >+ device_printf(dev, "ahci_ch_init: Start\n"); >+ > /* Disable port interrupts */ > ATA_OUTL(ch->r_mem, AHCI_P_IE, 0); > /* Setup work areas */ >@@ -999,6 +1008,9 @@ ahci_ch_init(device_t dev) > ((ch->pm_level > 2) ? AHCI_P_CMD_ASP : 0 ))); > ahci_start_fr(ch); > ahci_start(ch, 1); >+ >+ if (ahci_verbose > 2) >+ device_printf(dev, "ahci_ch_init: Done\n"); > return (0); > } > >@@ -1007,6 +1019,9 @@ ahci_ch_deinit(device_t dev) > { > struct ahci_channel *ch = device_get_softc(dev); > >+ if (ahci_verbose > 2) >+ device_printf(dev, "ahci_ch_deinit: Start\n"); >+ > /* Disable port interrupts. */ > ATA_OUTL(ch->r_mem, AHCI_P_IE, 0); > /* Reset command register. */ >@@ -1020,6 +1035,10 @@ ahci_ch_deinit(device_t dev) > DELAY(100); > /* Disable PHY. */ > ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_DISABLE); >+ >+ if (ahci_verbose > 2) >+ device_printf(dev, "ahci_ch_deinit: Done\n"); >+ > return (0); > } > >@@ -1048,11 +1067,17 @@ ahci_ch_resume(device_t dev) > { > struct ahci_channel *ch = device_get_softc(dev); > >+ if (ahci_verbose > 2) >+ device_printf(dev, "ahci_ch_resume: Start\n"); >+ > mtx_lock(&ch->mtx); > ahci_ch_init(dev); > ahci_reset(ch); > xpt_release_simq(ch->sim, TRUE); > mtx_unlock(&ch->mtx); >+ >+ if (ahci_verbose > 2) >+ device_printf(dev, "ahci_ch_resume: Done\n"); > return (0); > } > >@@ -1221,13 +1246,12 @@ ahci_slotsfree(device_t dev) > static int > ahci_phy_check_events(struct ahci_channel *ch, u_int32_t serr) > { >- > if (((ch->pm_level == 0) && (serr & ATA_SE_PHY_CHANGED)) || > ((ch->pm_level != 0 || ch->listening) && (serr & ATA_SE_EXCHANGED))) { > u_int32_t status = ATA_INL(ch->r_mem, AHCI_P_SSTS); > union ccb *ccb; > >- if (bootverbose) { >+ if (bootverbose || ahci_verbose) { > if ((status & ATA_SS_DET_MASK) != ATA_SS_DET_NO_DEVICE) > device_printf(ch->dev, "CONNECT requested\n"); > else >@@ -1262,7 +1286,7 @@ ahci_cpd_check_events(struct ahci_channel *ch) > if ((status & AHCI_P_CMD_CPD) == 0) > return; > >- if (bootverbose) { >+ if (bootverbose || ahci_verbose) { > dev = ch->dev; > if (status & AHCI_P_CMD_CPS) { > device_printf(dev, "COLD CONNECT requested\n"); >@@ -1288,7 +1312,7 @@ ahci_notify_events(struct ahci_channel *ch, u_int32_t status) > > if (ch->caps & AHCI_CAP_SSNTF) > ATA_OUTL(ch->r_mem, AHCI_P_SNTF, status); >- if (bootverbose) >+ if (bootverbose || ahci_verbose) > device_printf(ch->dev, "SNTF 0x%04x\n", status); > for (i = 0; i < 16; i++) { > if ((status & (1 << i)) == 0) >@@ -1675,6 +1699,9 @@ ahci_execute_transaction(struct ahci_slot *slot) > uint8_t val; > uint16_t cmd_flags; > >+ if (!mtx_owned(&ch->mtx)) >+ device_printf(ch->dev, "ahci_execute_transaction: channel mutex not owned!\n"); >+ > /* Get a piece of the workspace for this request */ > ctp = (struct ahci_cmd_tab *)(ch->dma.work + slot->ct_offset); > /* Setup the FIS for this request */ >@@ -1699,6 +1726,8 @@ ahci_execute_transaction(struct ahci_slot *slot) > if (ccb->ataio.cmd.control & ATA_A_RESET) { > softreset = 1; > /* Kick controller into sane state */ >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_execute_transaction: Kicking controller into sane state\n"); > ahci_stop(ch); > ahci_clo(ch); > ahci_start(ch, 0); >@@ -1944,6 +1973,9 @@ ahci_end_transaction(struct ahci_slot *slot, enum ahci_err_type et) > int lastto; > uint32_t sig; > >+ if (!mtx_owned(&ch->mtx)) >+ device_printf(ch->dev, "ahci_end_transaction: channel mutex not owned!\n"); >+ > bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, > BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); > clp = (struct ahci_cmd_list *) >@@ -2117,10 +2149,14 @@ ahci_end_transaction(struct ahci_slot *slot, enum ahci_err_type et) > if (ch->rslots == 0) { > /* if there was fatal error - reset port. */ > if (ch->toslots != 0 || ch->fatalerr) { >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_end_transaction: Calling ahci_reset\n"); > ahci_reset(ch); > } else { > /* if we have slots in error, we can reinit port. */ > if (ch->eslots != 0) { >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_end_transaction: Reinit port (eslots=%08x)\n", ch->eslots); > ahci_stop(ch); > ahci_clo(ch); > ahci_start(ch, 1); >@@ -2175,6 +2211,8 @@ ahci_issue_recovery(struct ahci_channel *ch) > ch->hold[i] = NULL; > ch->numhslots--; > } >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_issue_recovery: Calling ahci_reset\n"); > ahci_reset(ch); > return; > } >@@ -2309,6 +2347,9 @@ ahci_start(struct ahci_channel *ch, int fbs) > { > u_int32_t cmd; > >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "AHCI engine(fbs=%d): starting\n", fbs); >+ > /* Run the channel start callback, if any. */ > if (ch->start) > ch->start(ch); >@@ -2328,6 +2369,9 @@ ahci_start(struct ahci_channel *ch, int fbs) > cmd &= ~AHCI_P_CMD_PMA; > ATA_OUTL(ch->r_mem, AHCI_P_CMD, cmd | AHCI_P_CMD_ST | > (ch->pm_present ? AHCI_P_CMD_PMA : 0)); >+ >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_start: Done\n"); > } > > static void >@@ -2335,20 +2379,88 @@ ahci_stop(struct ahci_channel *ch) > { > u_int32_t cmd; > int timeout; >- >+ int delay_time = 10; >+ int timeout_limit = 100000; /* 50000 */ >+ int ci = -1; >+ int last_ci = 0; >+ int sact = -1; >+ int last_sact = 0; >+ int ccs = -1; >+ int last_ccs = 0; >+ int cr = 1; >+ int last_cr = 0; >+ >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "AHCI engine: stopping\n"); >+ > /* Kill all activity on this channel */ > cmd = ATA_INL(ch->r_mem, AHCI_P_CMD); >+ if ((cmd & AHCI_P_CMD_ST) == 0) { >+ /* Not started */ >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "AHCI engine already stopped (ignoring)\n"); >+ return; >+ } >+ >+ last_cr = ((cmd & AHCI_P_CMD_CR) != 0); >+ if (!last_cr) { >+ /* No Commands Running */ >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "AHCI engine not running (notice only)\n"); >+ } >+ > ATA_OUTL(ch->r_mem, AHCI_P_CMD, cmd & ~AHCI_P_CMD_ST); >+ > /* Wait for activity stop. */ > timeout = 0; > do { >- DELAY(10); >- if (timeout++ > 50000) { >- device_printf(ch->dev, "stopping AHCI engine failed\n"); >+ DELAY(delay_time); >+ if (++timeout >= timeout_limit) { >+ device_printf(ch->dev, >+ "stopping AHCI engine: timeout at %d us (cr=%d, ccs=%d, ci=%d, sact=%d)\n", >+ timeout*delay_time, cr, ccs, ci, sact); > break; > } >- } while (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CR); >+ >+ cmd = ATA_INL(ch->r_mem, AHCI_P_CMD); >+ cr = ((cmd & AHCI_P_CMD_CR) != 0); >+ ccs = ((cmd & AHCI_P_CMD_CCS_MASK) >> AHCI_P_CMD_CCS_SHIFT); >+ >+ ci = ATA_INL(ch->r_mem, AHCI_P_CI); >+ sact = ATA_INL(ch->r_mem, AHCI_P_SACT); >+ >+ if (cr != last_cr) { >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "stopping AHCI engine: cr: %d -> %d at time %d us\n", >+ last_cr, cr, timeout*delay_time); >+ last_cr = cr; >+ } >+ >+ if (ci != last_ci) { >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "stopping AHCI engine: ci: %d -> %d at time %d us\n", >+ last_ci, ci, timeout*delay_time); >+ last_ci = ci; >+ } >+ >+ if (sact != last_sact) { >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "stopping AHCI engine: sact: %d -> %d at time %d us\n", >+ last_sact, sact, timeout*delay_time); >+ last_sact = sact; >+ } >+ >+ if (ccs != last_ccs) { >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "stopping AHCI engine: ccs: %d -> %d at time %d us\n", >+ last_ccs, ccs, timeout*delay_time); >+ last_ccs = ccs; >+ } >+ } while (cr); > ch->eslots = 0; >+ >+ if (ahci_verbose && timeout < timeout_limit) >+ device_printf(ch->dev, "AHCI engine stopped at time %d us\n", timeout*delay_time); > } > > static void >@@ -2357,6 +2469,9 @@ ahci_clo(struct ahci_channel *ch) > u_int32_t cmd; > int timeout; > >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_clo: Start\n"); >+ > /* Issue Command List Override if supported */ > if (ch->caps & AHCI_CAP_SCLO) { > cmd = ATA_INL(ch->r_mem, AHCI_P_CMD); >@@ -2371,14 +2486,20 @@ ahci_clo(struct ahci_channel *ch) > } > } while (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CLO); > } >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_clo: Done\n"); > } > >+ > static void > ahci_stop_fr(struct ahci_channel *ch) > { > u_int32_t cmd; > int timeout; > >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_stop_fr: Start\n"); >+ > /* Kill all FIS reception on this channel */ > cmd = ATA_INL(ch->r_mem, AHCI_P_CMD); > ATA_OUTL(ch->r_mem, AHCI_P_CMD, cmd & ~AHCI_P_CMD_FRE); >@@ -2391,6 +2512,8 @@ ahci_stop_fr(struct ahci_channel *ch) > break; > } > } while (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_FR); >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_stop_fr: Done\n"); > } > > static void >@@ -2398,9 +2521,15 @@ ahci_start_fr(struct ahci_channel *ch) > { > u_int32_t cmd; > >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_start_fr: Start\n"); >+ > /* Start FIS reception on this channel */ > cmd = ATA_INL(ch->r_mem, AHCI_P_CMD); > ATA_OUTL(ch->r_mem, AHCI_P_CMD, cmd | AHCI_P_CMD_FRE); >+ >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_start_fr: Done\n"); > } > > static int >@@ -2423,7 +2552,7 @@ ahci_wait_ready(struct ahci_channel *ch, int t, int t0) > DELAY(1000); > timeout++; > } >- if (bootverbose) >+ if (bootverbose || ahci_verbose) > device_printf(ch->dev, "AHCI reset: device ready after %dms\n", > timeout + t0); > return (0); >@@ -2434,17 +2563,24 @@ ahci_reset_to(void *arg) > { > struct ahci_channel *ch = arg; > >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_reset_to: Timeout!\n"); >+ > if (ch->resetting == 0) > return; > ch->resetting--; > if (ahci_wait_ready(ch, ch->resetting == 0 ? -1 : 0, > (310 - ch->resetting) * 100) == 0) { > ch->resetting = 0; >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_reset_to: Starting up channel!\n"); > ahci_start(ch, 1); > xpt_release_simq(ch->sim, TRUE); > return; > } > if (ch->resetting == 0) { >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_reset_to: Restarting channel!\n"); > ahci_clo(ch); > ahci_start(ch, 1); > xpt_release_simq(ch->sim, TRUE); >@@ -2458,9 +2594,12 @@ ahci_reset(struct ahci_channel *ch) > { > struct ahci_controller *ctlr = device_get_softc(device_get_parent(ch->dev)); > int i; >- >+ >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_reset: Start\n"); >+ > xpt_freeze_simq(ch->sim, 1); >- if (bootverbose) >+ if (bootverbose || ahci_verbose) > device_printf(ch->dev, "AHCI reset...\n"); > /* Forget about previous reset. */ > if (ch->resetting) { >@@ -2507,7 +2646,7 @@ ahci_reset(struct ahci_channel *ch) > ATA_OUTL(ch->r_mem, AHCI_P_IE, 0); > /* Reset and reconnect PHY, */ > if (!ahci_sata_phy_reset(ch)) { >- if (bootverbose) >+ if (bootverbose || ahci_verbose) > device_printf(ch->dev, > "AHCI reset: device not found\n"); > ch->devices = 0; >@@ -2516,9 +2655,11 @@ ahci_reset(struct ahci_channel *ch) > (((ch->pm_level != 0) ? AHCI_P_IX_CPD | AHCI_P_IX_MP : 0) | > AHCI_P_IX_PRC | AHCI_P_IX_PC)); > xpt_release_simq(ch->sim, TRUE); >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_reset: Done (ahci_sata_phy_reset failed)\n"); > return; > } >- if (bootverbose) >+ if (bootverbose || ahci_verbose) > device_printf(ch->dev, "AHCI reset: device found\n"); > /* Wait for clearing busy status. */ > if (ahci_wait_ready(ch, dumping ? 31000 : 0, 0)) { >@@ -2542,6 +2683,8 @@ ahci_reset(struct ahci_channel *ch) > ahci_start(ch, 1); > xpt_release_simq(ch->sim, TRUE); > } >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_reset: Done\n"); > } > > static int >@@ -2606,41 +2749,65 @@ ahci_sata_connect(struct ahci_channel *ch) > { > u_int32_t status; > int timeout, found = 0; >- >- /* Wait up to 100ms for "connect well" */ >- for (timeout = 0; timeout < 1000 ; timeout++) { >+ int last_status = 0; >+ int delay_time = 10; /* 10 us */ >+ int timeout_full_limit = 100000 / delay_time; /* 100ms */ >+ int timeout_detect_limit = 10000 / delay_time; /* 10ms */ >+ >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_sata_connect: Start\n"); >+ >+ for (timeout = 0; timeout < timeout_full_limit ; timeout++) { > status = ATA_INL(ch->r_mem, AHCI_P_SSTS); >- if ((status & ATA_SS_DET_MASK) != ATA_SS_DET_NO_DEVICE) >+ >+ if (status != last_status) { >+ if (ahci_verbose > 1) >+ device_printf(ch->dev, "SATA changed status 0x%08x -> 0x%08x at time=%dus\n", >+ last_status, status, timeout * delay_time); >+ last_status = status; >+ } >+ if ((status & ATA_SS_DET_MASK) != ATA_SS_DET_NO_DEVICE) { > found = 1; >+ /* Increase timeout to 500ms after first status change to allow for slow devices >+ (needed on Dell BOSS-S1 with later firmwares) */ >+ if (ch->quirks & AHCI_Q_SLOWDEV) >+ timeout_full_limit = 500000 / delay_time; >+ } > if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && >- ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && >+ ((ch->quirks & AHCI_Q_NOSPD) || (status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && > ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) > break; > if ((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_OFFLINE) { >- if (bootverbose) { >- device_printf(ch->dev, "SATA offline status=%08x\n", >- status); >+ if (bootverbose || ahci_verbose) { >+ device_printf(ch->dev, "SATA offline status 0x%08x at time=%dus\n", >+ status, timeout * delay_time); > } >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_sata_connect: Done (0)\n"); > return (0); > } >- if (found == 0 && timeout >= 100) >+ if (found == 0 && timeout >= timeout_detect_limit) > break; >- DELAY(100); >+ DELAY(delay_time); > } >- if (timeout >= 1000 || !found) { >- if (bootverbose) { >+ if (!found || timeout >= timeout_full_limit) { >+ if (bootverbose || ahci_verbose) { > device_printf(ch->dev, >- "SATA connect timeout time=%dus status=%08x\n", >- timeout * 100, status); >+ "SATA connect timeout status 0x%08x at time=%dus\n", >+ status, timeout * delay_time); > } >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_sata_connect: Done (0)\n"); > return (0); > } >- if (bootverbose) { >- device_printf(ch->dev, "SATA connect time=%dus status=%08x\n", >- timeout * 100, status); >+ if (bootverbose || ahci_verbose) { >+ device_printf(ch->dev, "SATA connect status 0x%08x at time=%dus\n", >+ status, timeout * delay_time); > } > /* Clear SATA error register */ > ATA_OUTL(ch->r_mem, AHCI_P_SERR, 0xffffffff); >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_sata_connect: Done (1)\n"); > return (1); > } > >@@ -2650,6 +2817,9 @@ ahci_sata_phy_reset(struct ahci_channel *ch) > int sata_rev; > uint32_t val, detval; > >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_sata_phy_reset: Start\n"); >+ > if (ch->listening) { > val = ATA_INL(ch->r_mem, AHCI_P_CMD); > val |= AHCI_P_CMD_SUD; >@@ -2682,8 +2852,12 @@ ahci_sata_phy_reset(struct ahci_channel *ch) > ch->listening = 1; > } else if (ch->pm_level > 0) > ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_DISABLE); >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_sata_phy_reset: Done (0)\n"); > return (0); > } >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahci_sata_phy_reset: Done (1)\n"); > return (1); > } > >@@ -2832,6 +3006,9 @@ ahciaction(struct cam_sim *sim, union ccb *ccb) > } > case XPT_RESET_BUS: /* Reset the specified SCSI bus */ > case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ >+ if (ahci_verbose > 2) >+ device_printf(ch->dev, "ahciaction: Calling ahci_reset (%s)\n", >+ (ccb->ccb_h.func_code == XPT_RESET_BUS ? "XPT_RESET_BUS" : "XPT_RESET_DEV")); > ahci_reset(ch); > ccb->ccb_h.status = CAM_REQ_CMP; > break; >diff --git a/sys/dev/ahci/ahci.h b/sys/dev/ahci/ahci.h >index 472f9845117d..804c030f46bc 100644 >--- a/sys/dev/ahci/ahci.h >+++ b/sys/dev/ahci/ahci.h >@@ -621,6 +621,8 @@ enum ahci_err_type { > #define AHCI_Q_NOCCS 0x00400000 > #define AHCI_Q_NOAUX 0x00800000 > #define AHCI_Q_IOMMU_BUSWIDE 0x01000000 >+#define AHCI_Q_NOSPD 0x01000000 /* Ignore SPD field in status */ >+#define AHCI_Q_SLOWDEV 0x02000000 /* Device is slow in detecting drives */ > > #define AHCI_Q_BIT_STRING \ > "\020" \ >@@ -648,7 +650,9 @@ enum ahci_err_type { > "\026MRVL_SR_DEL" \ > "\027NOCCS" \ > "\030NOAUX" \ >- "\031IOMMU_BUSWIDE" >+ "\031IOMMU_BUSWIDE" \ >+ "\031NOSPD" \ >+ "\032SLOWDEV" > > int ahci_attach(device_t dev); > int ahci_detach(device_t dev); >diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c >index 3671efcb8e22..935d5a5287ef 100644 >--- a/sys/dev/ahci/ahci_pci.c >+++ b/sys/dev/ahci/ahci_pci.c >@@ -1,4 +1,4 @@ >-/*- >+/* > * Copyright (c) 2009-2012 Alexander Motin <mav@FreeBSD.org> > * All rights reserved. > * >@@ -291,8 +291,9 @@ static const struct { > {0x92151b4b, 0x00, "Marvell 88SE9215", 0}, > {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_ALTSIG | > AHCI_Q_IOMMU_BUSWIDE}, >+ {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_ALTSIG}, > {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
Actions:
View
|
Diff
Attachments on
bug 243401
:
220793
|
221500
|
221502
|
237998
|
240058