View | Details | Raw Unified | Return to bug 191348 | Differences between
and this patch

Collapse All | Expand All

(-)head/sys/dev/mps/mps.c (+11 lines)
Lines 1349-1354 Link Here
1349
	sc->disable_msix = 0;
1349
	sc->disable_msix = 0;
1350
	sc->disable_msi = 0;
1350
	sc->disable_msi = 0;
1351
	sc->max_chains = MPS_CHAIN_FRAMES;
1351
	sc->max_chains = MPS_CHAIN_FRAMES;
1352
	sc->spinup_wait_time = DEFAULT_SPINUP_WAIT;
1352
1353
1353
	/*
1354
	/*
1354
	 * Grab the global variables.
1355
	 * Grab the global variables.
Lines 1357-1362 Link Here
1357
	TUNABLE_INT_FETCH("hw.mps.disable_msix", &sc->disable_msix);
1358
	TUNABLE_INT_FETCH("hw.mps.disable_msix", &sc->disable_msix);
1358
	TUNABLE_INT_FETCH("hw.mps.disable_msi", &sc->disable_msi);
1359
	TUNABLE_INT_FETCH("hw.mps.disable_msi", &sc->disable_msi);
1359
	TUNABLE_INT_FETCH("hw.mps.max_chains", &sc->max_chains);
1360
	TUNABLE_INT_FETCH("hw.mps.max_chains", &sc->max_chains);
1361
	TUNABLE_INT_FETCH("hw.mps.spinup_wait_time", &sc->spinup_wait_time);
1360
1362
1361
	/* Grab the unit-instance variables */
1363
	/* Grab the unit-instance variables */
1362
	snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.debug_level",
1364
	snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.debug_level",
Lines 1379-1384 Link Here
1379
	snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.exclude_ids",
1381
	snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.exclude_ids",
1380
	    device_get_unit(sc->mps_dev));
1382
	    device_get_unit(sc->mps_dev));
1381
	TUNABLE_STR_FETCH(tmpstr, sc->exclude_ids, sizeof(sc->exclude_ids));
1383
	TUNABLE_STR_FETCH(tmpstr, sc->exclude_ids, sizeof(sc->exclude_ids));
1384
1385
	snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.spinup_wait_time",
1386
	    device_get_unit(sc->mps_dev));
1387
	TUNABLE_INT_FETCH(tmpstr, &sc->spinup_wait_time);
1382
}
1388
}
1383
1389
1384
static void
1390
static void
Lines 1456-1461 Link Here
1456
	    OID_AUTO, "chain_alloc_fail", CTLFLAG_RD,
1462
	    OID_AUTO, "chain_alloc_fail", CTLFLAG_RD,
1457
	    &sc->chain_alloc_fail, "chain allocation failures");
1463
	    &sc->chain_alloc_fail, "chain allocation failures");
1458
#endif //FreeBSD_version >= 900030
1464
#endif //FreeBSD_version >= 900030
1465
1466
	SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree),
1467
	    OID_AUTO, "spinup_wait_time", CTLFLAG_RD,
1468
	    &sc->spinup_wait_time, DEFAULT_SPINUP_WAIT, "seconds to wait for "
1469
	    "spinup after SATA ID error");
1459
}
1470
}
1460
1471
1461
int
1472
int
(-)head/sys/dev/mps/mps_sas_lsi.c (+9 lines)
Lines 743-748 Link Here
743
		ioc_status = le16toh(mpi_reply.IOCStatus)
743
		ioc_status = le16toh(mpi_reply.IOCStatus)
744
		    & MPI2_IOCSTATUS_MASK;
744
		    & MPI2_IOCSTATUS_MASK;
745
		sas_status = mpi_reply.SASStatus;
745
		sas_status = mpi_reply.SASStatus;
746
		if (ioc_status != MPI2_IOCSTATUS_SUCCESS) {
747
			if (sc->spinup_wait_time > 0) {
748
				mps_dprint(sc, MPS_XINFO, "Sleeping %d seconds "
749
				    "after SATA ID error to wait for spinup\n",
750
				    sc->spinup_wait_time);
751
				msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0,
752
				    "mpsid", sc->spinup_wait_time * hz);
753
			}
754
		}
746
	} while ((rc == -EAGAIN || ioc_status || sas_status) &&
755
	} while ((rc == -EAGAIN || ioc_status || sas_status) &&
747
	    (try_count < 5));
756
	    (try_count < 5));
748
757
(-)head/sys/dev/mps/mpsvar.h (-1 / +4 lines)
Lines 32-38 Link Here
32
#ifndef _MPSVAR_H
32
#ifndef _MPSVAR_H
33
#define _MPSVAR_H
33
#define _MPSVAR_H
34
34
35
#define MPS_DRIVER_VERSION	"19.00.00.00-fbsd"
35
#define MPS_DRIVER_VERSION	"19.00.01.00-fbsd"
36
36
37
#define MPS_DB_MAX_WAIT		2500
37
#define MPS_DB_MAX_WAIT		2500
38
38
Lines 54-59 Link Here
54
#define MPS_SCSI_RI_INVALID_FRAME	(0x00000002)
54
#define MPS_SCSI_RI_INVALID_FRAME	(0x00000002)
55
#define MPS_STRING_LENGTH               64
55
#define MPS_STRING_LENGTH               64
56
56
57
#define DEFAULT_SPINUP_WAIT	3	/* seconds to wait for spinup */
58
57
#include <sys/endian.h>
59
#include <sys/endian.h>
58
60
59
/*
61
/*
Lines 276-281 Link Here
276
	int				chain_free;
278
	int				chain_free;
277
	int				max_chains;
279
	int				max_chains;
278
	int				chain_free_lowwater;
280
	int				chain_free_lowwater;
281
	int				spinup_wait_time;
279
#if __FreeBSD_version >= 900030
282
#if __FreeBSD_version >= 900030
280
	uint64_t			chain_alloc_fail;
283
	uint64_t			chain_alloc_fail;
281
#endif
284
#endif

Return to bug 191348