diff options
author | slm <slm@FreeBSD.org> | 2017-06-01 16:55:03 +0000 |
---|---|---|
committer | slm <slm@FreeBSD.org> | 2017-06-01 16:55:03 +0000 |
commit | 6ec4b0641762d521d99545fd95f16cb05c65bec3 (patch) | |
tree | 2818010f044ffa0b1dfd1beb96c66008bb8e66bb /sys/dev/mpr/mpr_user.c | |
parent | 2844e19fe7f54e34791df710ce48485a185ec5cd (diff) | |
download | FreeBSD-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 'sys/dev/mpr/mpr_user.c')
-rw-r--r-- | sys/dev/mpr/mpr_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/mpr/mpr_user.c b/sys/dev/mpr/mpr_user.c index b1c1109..750b126 100644 --- a/sys/dev/mpr/mpr_user.c +++ b/sys/dev/mpr/mpr_user.c @@ -2145,7 +2145,7 @@ mpr_user_btdh(struct mpr_softc *sc, mpr_btdh_mapping_t *data) data->DevHandle = dev_handle; } else { bus = 0; - target = mpr_mapping_get_sas_id_from_handle(sc, dev_handle); + target = mpr_mapping_get_tid_from_handle(sc, dev_handle); data->Bus = bus; data->TargetID = target; } |