FreeBSD Bugzilla – Attachment 148149 Details for
Bug 191348
[mps] LSI2308 with WD3000FYYZ drives disappears after hotswapping
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Spinup wait sysctl change
spinup_wait.patch (text/plain), 2.98 KB, created by
Stephen McConnell
on 2014-10-09 22:03:22 UTC
(
hide
)
Description:
Spinup wait sysctl change
Filename:
MIME Type:
Creator:
Stephen McConnell
Created:
2014-10-09 22:03:22 UTC
Size:
2.98 KB
patch
obsolete
>Index: head/sys/dev/mps/mps.c >=================================================================== >--- head/sys/dev/mps/mps.c (revision 272769) >+++ head/sys/dev/mps/mps.c (working copy) >@@ -1349,6 +1349,7 @@ > sc->disable_msix = 0; > sc->disable_msi = 0; > sc->max_chains = MPS_CHAIN_FRAMES; >+ sc->spinup_wait_time = DEFAULT_SPINUP_WAIT; > > /* > * Grab the global variables. >@@ -1357,6 +1358,7 @@ > TUNABLE_INT_FETCH("hw.mps.disable_msix", &sc->disable_msix); > TUNABLE_INT_FETCH("hw.mps.disable_msi", &sc->disable_msi); > TUNABLE_INT_FETCH("hw.mps.max_chains", &sc->max_chains); >+ TUNABLE_INT_FETCH("hw.mps.spinup_wait_time", &sc->spinup_wait_time); > > /* Grab the unit-instance variables */ > snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.debug_level", >@@ -1379,6 +1381,10 @@ > snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.exclude_ids", > device_get_unit(sc->mps_dev)); > TUNABLE_STR_FETCH(tmpstr, sc->exclude_ids, sizeof(sc->exclude_ids)); >+ >+ snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.spinup_wait_time", >+ device_get_unit(sc->mps_dev)); >+ TUNABLE_INT_FETCH(tmpstr, &sc->spinup_wait_time); > } > > static void >@@ -1456,6 +1462,11 @@ > OID_AUTO, "chain_alloc_fail", CTLFLAG_RD, > &sc->chain_alloc_fail, "chain allocation failures"); > #endif //FreeBSD_version >= 900030 >+ >+ SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), >+ OID_AUTO, "spinup_wait_time", CTLFLAG_RD, >+ &sc->spinup_wait_time, DEFAULT_SPINUP_WAIT, "seconds to wait for " >+ "spinup after SATA ID error"); > } > > int >Index: head/sys/dev/mps/mps_sas_lsi.c >=================================================================== >--- head/sys/dev/mps/mps_sas_lsi.c (revision 272769) >+++ head/sys/dev/mps/mps_sas_lsi.c (working copy) >@@ -743,6 +743,15 @@ > ioc_status = le16toh(mpi_reply.IOCStatus) > & MPI2_IOCSTATUS_MASK; > sas_status = mpi_reply.SASStatus; >+ if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { >+ if (sc->spinup_wait_time > 0) { >+ mps_dprint(sc, MPS_XINFO, "Sleeping %d seconds " >+ "after SATA ID error to wait for spinup\n", >+ sc->spinup_wait_time); >+ msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, >+ "mpsid", sc->spinup_wait_time * hz); >+ } >+ } > } while ((rc == -EAGAIN || ioc_status || sas_status) && > (try_count < 5)); > >Index: head/sys/dev/mps/mpsvar.h >=================================================================== >--- head/sys/dev/mps/mpsvar.h (revision 272769) >+++ head/sys/dev/mps/mpsvar.h (working copy) >@@ -32,7 +32,7 @@ > #ifndef _MPSVAR_H > #define _MPSVAR_H > >-#define MPS_DRIVER_VERSION "19.00.00.00-fbsd" >+#define MPS_DRIVER_VERSION "19.00.01.00-fbsd" > > #define MPS_DB_MAX_WAIT 2500 > >@@ -54,6 +54,8 @@ > #define MPS_SCSI_RI_INVALID_FRAME (0x00000002) > #define MPS_STRING_LENGTH 64 > >+#define DEFAULT_SPINUP_WAIT 3 /* seconds to wait for spinup */ >+ > #include <sys/endian.h> > > /* >@@ -276,6 +278,7 @@ > int chain_free; > int max_chains; > int chain_free_lowwater; >+ int spinup_wait_time; > #if __FreeBSD_version >= 900030 > uint64_t chain_alloc_fail; > #endif
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 191348
:
144141
|
144142
|
145541
| 148149 |
161521
|
161820
|
162037
|
166854