summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorslm <slm@FreeBSD.org>2017-06-01 16:55:03 +0000
committerslm <slm@FreeBSD.org>2017-06-01 16:55:03 +0000
commit6ec4b0641762d521d99545fd95f16cb05c65bec3 (patch)
tree2818010f044ffa0b1dfd1beb96c66008bb8e66bb /share
parent2844e19fe7f54e34791df710ce48485a185ec5cd (diff)
downloadFreeBSD-src-6ec4b0641762d521d99545fd95f16cb05c65bec3.zip
FreeBSD-src-6ec4b0641762d521d99545fd95f16cb05c65bec3.tar.gz
MFC r318895: Fix several problems with mapping code in mps(4).
MFC r318896: Fix several problems with mapping code in mpr(4). -Add several comments describing what the mapping code is doing. -Added a callout timer to improve check for missing devices when discovery has completed so that missing counts are incremented correctly. -Fix problems with missing counts not being saved to the HBA. -Update man pages mps(4) and mpr(4) to include a description of the use use_phy_num sysctl variable. -Remove channel field in the mapping structure because it's not used. -Improve logging by using mps_dprint or mpr_dprint instead of printf and adding more logging where appropriate. -Add check for a bad index before writing mapping entries to controller. -The high missing count check in the mapping table was using the incorrect initial value, which could lead to a bad result. -The usage of the IN_USE flag for volume mapping was changed to be more intuitive, and was not being used correctly. -The check for a free DPM entry was changed, as this was completely wrong. -Updates to the missing count for volumes were not being done correctly, so this function was completely rewritten. -_mapping_add_to_removal_table() was overly complicated and incorrectly used, so this function was rewritten. -Missing counts for all devices were not being incremented properly, so this functionality was added. -The search for space in the mapping table for missing enclosures was not calculating the found space correctly due to not breaking out of a loop when required, and the num_found variable was not being reset when needed. -Retries when a device fails to get added due to a full mapping table were removed because this is unneccessary. -mps_mapping_is_reinit_required() and mpr_mapping_is_reinit_required() were removed because they were not being used. -Some functions were renamed to avoid confusion between Target IDs and SAS IDs. -_mapping_check_update_ir_mt_idx() was removed because it was overly complicating volume mapping. -The setting of the maxtargets variable was changed to include max volumes. -The setting of the initiator_id variable was changed to be the invalid target ID after all targets, including volumes. Previously, this was set to the last valid target ID. -Don't exclude target IDs of RAID components or check for a reuse of a target ID for RAID components. -Some endienness was added. Approved by: ken, mav
Diffstat (limited to 'share')
-rw-r--r--share/man/man4/mpr.46
-rw-r--r--share/man/man4/mps.449
2 files changed, 47 insertions, 8 deletions
diff --git a/share/man/man4/mpr.4 b/share/man/man4/mpr.4
index e741d6e..68f02ab 100644
--- a/share/man/man4/mpr.4
+++ b/share/man/man4/mpr.4
@@ -1,8 +1,8 @@
.\"
.\" Copyright (c) 2010 Spectra Logic Corporation
.\" Copyright (c) 2014 LSI Corp
-.\" Copyright (c) 2017 Avago Technologies
-.\" Copyright (c) 2017 Broadcom Ltd.
+.\" Copyright (c) 2015-2017 Avago Technologies
+.\" Copyright (c) 2015-2017 Broadcom Ltd.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@
.\" $Id$
.\" $FreeBSD$
.\"
-.Dd May 17, 2017
+.Dd May 25, 2017
.Dt MPR 4
.Os
.Sh NAME
diff --git a/share/man/man4/mps.4 b/share/man/man4/mps.4
index 99af107..7f341bd 100644
--- a/share/man/man4/mps.4
+++ b/share/man/man4/mps.4
@@ -1,8 +1,8 @@
.\"
.\" Copyright (c) 2010 Spectra Logic Corporation
.\" Copyright (c) 2014 LSI Corp
-.\" Copyright (c) 2016 Avago Technologies
-.\" Copyright (c) 2016 Broadcom Ltd.
+.\" Copyright (c) 2015-2017 Avago Technologies
+.\" Copyright (c) 2015-2017 Broadcom Ltd.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@
.\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $
.\" $FreeBSD$
.\"
-.Dd July 5, 2016
+.Dd May 25, 2017
.Dt MPS 4
.Os
.Sh NAME
@@ -243,13 +243,13 @@ Send SSU to HDDs, but not to SSDs.
Send SSU to both HDDs and SSDs.
.El
.Pp
-To control the feature for a specific adapter, set this tunable value in
+To control this feature for a specific adapter, set this tunable value in
.Xr loader.conf 5 :
.Bd -literal -offset indent
dev.mps.X.enable_ssu
.Ed
.Pp
-The same set of values are valid when setting this tunable for all adapters.
+The same set of values are valid as when setting this tunable for all adapters.
.Pp
SATA disks that take several seconds to spin up and fail the SATA Identify
command might not be discovered by the driver.
@@ -275,6 +275,45 @@ dev.mps.X.spinup_wait_time=NNNN
tunable.
NNNN is the number of seconds to wait for SATA devices to spin up when they fail
the initial SATA Identify command.
+.Pp
+The driver can map devices discovered by the adapter so that target IDs
+corresponding to a specific device persist across resets and reboots.
+In some cases it is possible for devices to lose their mapped IDs due to
+unexpected behavior from certain hardware, such as some types of enclosures.
+To overcome this problem, a tunable is provided that will force the driver to
+map devices using the Phy number associated with the device.
+This feature is not recommended if the topology includes multiple
+enclosures/expanders.
+If multiple enclosures/expanders are present in the topology, Phy numbers are
+repeated, causing all devices at these Phy numbers except the first device to
+fail enumeration.
+To control this feature for all adapters, set the
+.Bd -literal -offset indent
+hw.mps.use_phy_num
+.Ed
+.Pp
+tunable in
+.Xr loader.conf 5
+to one of these values:
+.Bl -tag -width 6n -offset indent
+.It -1
+Only use Phy numbers to map devices and bypass the driver's mapping logic.
+.It 0
+Never use Phy numbers to map devices.
+.It 1
+Use Phy numbers to map devices, but only if the driver's mapping logic fails
+to map the device that is being enumerated.
+This is the default value.
+.El
+.Pp
+To control this feature for a specific adapter, set this tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mps.X.use_phy_num
+.Ed
+.Pp
+The same set of values are valid as when setting this tunable for all adapters.
+.Pp
.Sh DEBUGGING
To enable debugging prints from the
.Nm
OpenPOWER on IntegriCloud