Date: Tue, 24 Feb 2015 22:07:43 +0000 (UTC) From: Stephen McConnell <slm@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279253 - in head/sys/dev/mps: . mpi Message-ID: <201502242207.t1OM7hqB064133@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: slm Date: Tue Feb 24 22:07:42 2015 New Revision: 279253 URL: https://svnweb.freebsd.org/changeset/base/279253 Log: - Updated all files with 2015 Avago copyright, and updated LSI's copyright dates. - Changed all of the PCI device strings from LSI to Avago Technologies (LSI). - Added a sysctl variable to control how StartStopUnit behavior works. User can select to spin down disks based on if disk is SSD or HDD. - Inquiry data is required to tell if a disk will support SSU at shutdown or not. Due to the addition of mpssas_async, which gets Advanced Info but not Inquiry data, the setting of supports_SSU was moved to the mpssas_scsiio_complete function, which snoops for any Inquiry commands. And, since disks are shutdown as a target and not a LUN, this process was simplified by basing it on targets and not LUNs. - Added a sysctl variable that sets the amount of time to retry after sending a failed SATA ID command. This helps with some bad disks and large disks that require a lot of time to spin up. Part of this change was to add a callout to handle timeouts with the SATA ID command. The callout function is called mpssas_ata_id_timeout(). (Fixes PR 191348) - Changed the way resets work by allowing I/O to continue to devices that are not currently under a reset condition. This uses devq's instead of simq's and makes use of the MPSSAS_TARGET_INRESET flag. This change also adds a function called mpssas_prepare_tm(). - Some changes were made to reduce code duplication when getting a SAS address for a SATA disk. - Fixed some formatting and whitespace. - Bump version of mps driver to 20.00.00.00-fbsd PR: 191348 Reviewed by: ken, scottl Approved by: ken, scottl MFC after: 2 weeks Modified: head/sys/dev/mps/mpi/mpi2.h head/sys/dev/mps/mpi/mpi2_cnfg.h head/sys/dev/mps/mpi/mpi2_hbd.h head/sys/dev/mps/mpi/mpi2_history.txt head/sys/dev/mps/mpi/mpi2_init.h head/sys/dev/mps/mpi/mpi2_ioc.h head/sys/dev/mps/mpi/mpi2_ra.h head/sys/dev/mps/mpi/mpi2_raid.h head/sys/dev/mps/mpi/mpi2_sas.h head/sys/dev/mps/mpi/mpi2_targ.h head/sys/dev/mps/mpi/mpi2_tool.h head/sys/dev/mps/mpi/mpi2_type.h head/sys/dev/mps/mps.c head/sys/dev/mps/mps_config.c head/sys/dev/mps/mps_ioctl.h head/sys/dev/mps/mps_mapping.c head/sys/dev/mps/mps_mapping.h head/sys/dev/mps/mps_pci.c head/sys/dev/mps/mps_sas.c head/sys/dev/mps/mps_sas.h head/sys/dev/mps/mps_sas_lsi.c head/sys/dev/mps/mps_user.c head/sys/dev/mps/mpsvar.h Modified: head/sys/dev/mps/mpi/mpi2.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mpi/mpi2.h Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2006-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,13 +24,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2012 LSI Corporation. + * Copyright (c) 2006-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2.h Modified: head/sys/dev/mps/mpi/mpi2_cnfg.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_cnfg.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mpi/mpi2_cnfg.h Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2006-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,13 +24,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2012 LSI Corporation. + * Copyright (c) 2006-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_cnfg.h Modified: head/sys/dev/mps/mpi/mpi2_hbd.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_hbd.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mpi/mpi2_hbd.h Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2009-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,13 +24,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2009-2012 LSI Corporation. + * Copyright (c) 2009-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_hbd.h Modified: head/sys/dev/mps/mpi/mpi2_history.txt ============================================================================== --- head/sys/dev/mps/mpi/mpi2_history.txt Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mpi/mpi2_history.txt Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2000-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ @@ -32,7 +33,8 @@ Fusion-MPT MPI 2.0 Header File Change History ============================== - Copyright (c) 2000-2012 LSI Corporation. + Copyright (c) 2000-2015 LSI Corporation. + Copyright (c) 2013-2015 Avago Technologies --------------------------------------- Header Set Release Version: 02.00.18 Modified: head/sys/dev/mps/mpi/mpi2_init.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_init.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mpi/mpi2_init.h Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2006-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,13 +24,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2012 LSI Corporation. + * Copyright (c) 2006-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_init.h Modified: head/sys/dev/mps/mpi/mpi2_ioc.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_ioc.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mpi/mpi2_ioc.h Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2006-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,13 +24,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2012 LSI Corporation. + * Copyright (c) 2006-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_ioc.h Modified: head/sys/dev/mps/mpi/mpi2_ra.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_ra.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mpi/mpi2_ra.h Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2009-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,13 +24,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2012 LSI Corporation. + * Copyright (c) 2009-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_ra.h Modified: head/sys/dev/mps/mpi/mpi2_raid.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_raid.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mpi/mpi2_raid.h Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2007-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,13 +24,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2012 LSI Corporation. + * Copyright (c) 2007-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_raid.h Modified: head/sys/dev/mps/mpi/mpi2_sas.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_sas.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mpi/mpi2_sas.h Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2007-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,13 +24,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2012 LSI Corporation. + * Copyright (c) 2007-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_sas.h Modified: head/sys/dev/mps/mpi/mpi2_targ.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_targ.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mpi/mpi2_targ.h Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2006-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,13 +24,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2012 LSI Corporation. + * Copyright (c) 2006-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_targ.h Modified: head/sys/dev/mps/mpi/mpi2_tool.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_tool.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mpi/mpi2_tool.h Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2007-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,13 +24,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2012 LSI Corporation. + * Copyright (c) 2007-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_tool.h Modified: head/sys/dev/mps/mpi/mpi2_type.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_type.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mpi/mpi2_type.h Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2006-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,13 +24,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2012 LSI Corporation. + * Copyright (c) 2006-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_type.h Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mps.c Tue Feb 24 22:07:42 2015 (r279253) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2009 Yahoo! Inc. - * Copyright (c) 2012 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ @@ -32,7 +33,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -/* Communications core for LSI MPT2 */ +/* Communications core for Avago Technologies (LSI) MPT2 */ /* TODO Move headers to mpsvar */ #include <sys/types.h> @@ -1349,6 +1350,8 @@ mps_get_tunables(struct mps_softc *sc) sc->disable_msix = 0; sc->disable_msi = 0; sc->max_chains = MPS_CHAIN_FRAMES; + sc->enable_ssu = MPS_SSU_ENABLE_SSD_DISABLE_HDD; + sc->spinup_wait_time = DEFAULT_SPINUP_WAIT; /* * Grab the global variables. @@ -1357,6 +1360,8 @@ mps_get_tunables(struct mps_softc *sc) 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.enable_ssu", &sc->enable_ssu); + 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 +1384,14 @@ mps_get_tunables(struct mps_softc *sc) 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.enable_ssu", + device_get_unit(sc->mps_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->enable_ssu); + + 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 @@ -1451,11 +1464,20 @@ mps_setup_sysctl(struct mps_softc *sc) OID_AUTO, "max_chains", CTLFLAG_RD, &sc->max_chains, 0,"maximum chain frames that will be allocated"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "enable_ssu", CTLFLAG_RW, &sc->enable_ssu, 0, + "enable SSU to SATA SSD/HDD at shutdown"); + #if __FreeBSD_version >= 900030 SYSCTL_ADD_UQUAD(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), 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 Modified: head/sys/dev/mps/mps_config.c ============================================================================== --- head/sys/dev/mps/mps_config.c Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mps_config.c Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD */ #include <sys/cdefs.h> Modified: head/sys/dev/mps/mps_ioctl.h ============================================================================== --- head/sys/dev/mps/mps_ioctl.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mps_ioctl.h Tue Feb 24 22:07:42 2015 (r279253) @@ -27,12 +27,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD userland interface + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD userland interface * * $FreeBSD$ */ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,7 +57,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ Modified: head/sys/dev/mps/mps_mapping.c ============================================================================== --- head/sys/dev/mps/mps_mapping.c Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mps_mapping.c Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD */ #include <sys/cdefs.h> @@ -889,14 +890,14 @@ _mapping_get_dev_info(struct mps_softc * u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); Mpi2ConfigReply_t mpi_reply; Mpi2SasDevicePage0_t sas_device_pg0; - u8 entry, enc_idx, phy_idx; + u8 entry, enc_idx, phy_idx, sata_end_device; u32 map_idx, index, device_info; struct _map_phy_change *phy_change, *tmp_phy_change; uint64_t sas_address; struct enc_mapping_table *et_entry; struct dev_mapping_table *mt_entry; u8 add_code = MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED; - int rc; + int rc = 1; for (entry = 0; entry < topo_change->num_entries; entry++) { phy_change = &topo_change->phy_details[entry]; @@ -910,42 +911,36 @@ _mapping_get_dev_info(struct mps_softc * continue; } + /* + * Always get SATA Identify information because this is used + * to determine if Start/Stop Unit should be sent to the drive + * when the system is shutdown. + */ device_info = le32toh(sas_device_pg0.DeviceInfo); - if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == - MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING) { - if ((device_info & MPI2_SAS_DEVICE_INFO_END_DEVICE) && - (device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE)) { - rc = mpssas_get_sas_address_for_sata_disk(sc, - &sas_address, phy_change->dev_handle, - device_info); - if (rc) { - printf("%s: failed to compute the " - "hashed SAS Address for SATA " - "device with handle 0x%04x\n", - __func__, phy_change->dev_handle); - sas_address = - sas_device_pg0.SASAddress.High; - sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; - } - mps_dprint(sc, MPS_MAPPING, - "SAS Address for SATA device = %jx\n", - sas_address); + sas_address = sas_device_pg0.SASAddress.High; + sas_address = (sas_address << 32) | + sas_device_pg0.SASAddress.Low; + sata_end_device = 0; + if ((device_info & MPI2_SAS_DEVICE_INFO_END_DEVICE) && + (device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE)) { + sata_end_device = 1; + rc = mpssas_get_sas_address_for_sata_disk(sc, + &sas_address, phy_change->dev_handle, device_info, + &phy_change->is_SATA_SSD); + if (rc) { + mps_dprint(sc, MPS_ERROR, "%s: failed to get " + "disk type (SSD or HDD) and SAS Address " + "for SATA device with handle 0x%04x\n", + __func__, phy_change->dev_handle); } else { - sas_address = - sas_device_pg0.SASAddress.High; - sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; + mps_dprint(sc, MPS_INFO, "SAS Address for SATA " + "device = %jx\n", sas_address); } - } else { - sas_address = sas_device_pg0.SASAddress.High; - sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; } + phy_change->physical_id = sas_address; phy_change->slot = le16toh(sas_device_pg0.Slot); - phy_change->device_info = - le32toh(sas_device_pg0.DeviceInfo); + phy_change->device_info = le32toh(sas_device_pg0.DeviceInfo); if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { @@ -953,10 +948,10 @@ _mapping_get_dev_info(struct mps_softc * topo_change->enc_handle); if (enc_idx == MPS_ENCTABLE_BAD_IDX) { phy_change->is_processed = 1; - printf("%s: failed to add the device with " - "handle 0x%04x because the enclosure is " - "not in the mapping table\n", __func__, - phy_change->dev_handle); + mps_dprint(sc, MPS_MAPPING, "%s: failed to add " + "the device with handle 0x%04x because the " + "enclosure is not in the mapping table\n", + __func__, phy_change->dev_handle); continue; } if (!((phy_change->device_info & Modified: head/sys/dev/mps/mps_mapping.h ============================================================================== --- head/sys/dev/mps/mps_mapping.h Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mps_mapping.h Tue Feb 24 22:07:42 2015 (r279253) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ @@ -38,6 +39,7 @@ * @dev_handle: device handle for the device pointed by this entry * @slot: slot ID * @is_processed: Flag to indicate whether this entry is processed or not + * @is_SATA_SSD: 1 if this is a SATA device AND an SSD, 0 otherwise */ struct _map_phy_change { uint64_t physical_id; @@ -46,6 +48,8 @@ struct _map_phy_change { uint16_t slot; uint8_t reason; uint8_t is_processed; + uint8_t is_SATA_SSD; + uint8_t reserved; }; /** @@ -66,6 +70,6 @@ struct _map_topology_change { extern int mpssas_get_sas_address_for_sata_disk(struct mps_softc *ioc, - u64 *sas_address, u16 handle, u32 device_info); + u64 *sas_address, u16 handle, u32 device_info, u8 *is_SATA_SSD); #endif Modified: head/sys/dev/mps/mps_pci.c ============================================================================== --- head/sys/dev/mps/mps_pci.c Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mps_pci.c Tue Feb 24 22:07:42 2015 (r279253) @@ -27,7 +27,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -/* PCI/PCI-X/PCIe bus interface for the LSI MPT2 controllers */ +/* PCI/PCI-X/PCIe bus interface for the Avago Tech (LSI) MPT2 controllers */ /* TODO Move headers to mpsvar */ #include <sys/types.h> @@ -98,33 +98,33 @@ struct mps_ident { const char *desc; } mps_identifiers[] = { { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2004, - 0xffff, 0xffff, 0, "LSI SAS2004" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2004" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2008, - 0xffff, 0xffff, 0, "LSI SAS2008" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2008" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2108_1, - 0xffff, 0xffff, 0, "LSI SAS2108" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2108" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2108_2, - 0xffff, 0xffff, 0, "LSI SAS2108" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2108" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2108_3, - 0xffff, 0xffff, 0, "LSI SAS2108" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2108" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2116_1, - 0xffff, 0xffff, 0, "LSI SAS2116" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2116" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2116_2, - 0xffff, 0xffff, 0, "LSI SAS2116" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2116" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_1, - 0xffff, 0xffff, 0, "LSI SAS2208" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2208" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_2, - 0xffff, 0xffff, 0, "LSI SAS2208" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2208" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_3, - 0xffff, 0xffff, 0, "LSI SAS2208" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2208" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_4, - 0xffff, 0xffff, 0, "LSI SAS2208" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2208" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_5, - 0xffff, 0xffff, 0, "LSI SAS2208" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2208" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_6, - 0xffff, 0xffff, 0, "LSI SAS2208" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2208" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2308_1, - 0xffff, 0xffff, 0, "LSI SAS2308" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2308" }, // Add Customer specific vender/subdevice id before generic // (0xffff) vender/subdevice id. { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2308_2, @@ -136,11 +136,11 @@ struct mps_ident { { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2308_2, 0x8086, 0x3519, 0, "Intel(R) Integrated RAID Module RMS25KB040" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2308_2, - 0xffff, 0xffff, 0, "LSI SAS2308" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2308" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2308_3, - 0xffff, 0xffff, 0, "LSI SAS2308" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS2308" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SSS6200, - 0xffff, 0xffff, MPS_FLAGS_WD_AVAILABLE, "LSI SSS6200" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SSS6200" }, { 0, 0, 0, 0, 0, NULL } }; Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Tue Feb 24 21:37:20 2015 (r279252) +++ head/sys/dev/mps/mps_sas.c Tue Feb 24 22:07:42 2015 (r279253) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2009 Yahoo! Inc. - * Copyright (c) 2011, 2012 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ @@ -32,7 +33,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -/* Communications core for LSI MPT2 */ +/* Communications core for Avago Technologies (LSI) MPT2 */ /* TODO Move headers to mpsvar */ #include <sys/types.h> @@ -119,6 +120,8 @@ static void mpssas_remove_device(struct static void mpssas_remove_complete(struct mps_softc *, struct mps_command *); static void mpssas_action(struct cam_sim *sim, union ccb *ccb); static void mpssas_poll(struct cam_sim *sim); +static int mpssas_send_abort(struct mps_softc *sc, struct mps_command *tm, + struct mps_command *cm); static void mpssas_scsiio_timeout(void *data); static void mpssas_abort_complete(struct mps_softc *sc, struct mps_command *cm); static void mpssas_direct_drive_io(struct mpssas_softc *sassc, @@ -133,8 +136,6 @@ static void mpssas_send_smpcmd(struct mp static void mpssas_action_smpio(struct mpssas_softc *sassc, union ccb *ccb); #endif //FreeBSD_version >= 900026 static void mpssas_resetdev_complete(struct mps_softc *, struct mps_command *); -static int mpssas_send_abort(struct mps_softc *sc, struct mps_command *tm, struct mps_command *cm); -static int mpssas_send_reset(struct mps_softc *sc, struct mps_command *tm, uint8_t type); static void mpssas_async(void *callback_arg, uint32_t code, struct cam_path *path, void *arg); #if (__FreeBSD_version < 901503) || \ @@ -224,7 +225,7 @@ mpssas_startup_decrement(struct mpssas_s } } -/* LSI's firmware requires us to stop sending commands when we're doing task +/* The firmware requires us to stop sending commands when we're doing task * management, so refcount the TMs and keep the simq frozen when any are in * use. */ @@ -233,37 +234,31 @@ mpssas_alloc_tm(struct mps_softc *sc) { struct mps_command *tm; - MPS_FUNCTRACE(sc); tm = mps_alloc_high_priority_command(sc); - if (tm != NULL) { - if (sc->sassc->tm_count++ == 0) { - mps_dprint(sc, MPS_RECOVERY, - "%s freezing simq\n", __func__); - xpt_freeze_simq(sc->sassc->sim, 1); - } - mps_dprint(sc, MPS_RECOVERY, "%s tm_count %u\n", __func__, - sc->sassc->tm_count); - } return tm; } void mpssas_free_tm(struct mps_softc *sc, struct mps_command *tm) { - mps_dprint(sc, MPS_TRACE, "%s", __func__); if (tm == NULL) return; - /* if there are no TMs in use, we can release the simq. We use our - * own refcount so that it's easier for a diag reset to cleanup and - * release the simq. - */ - if (--sc->sassc->tm_count == 0) { - mps_dprint(sc, MPS_RECOVERY, "%s releasing simq\n", __func__); - xpt_release_simq(sc->sassc->sim, 1); + /* + * For TM's the devq is frozen for the device. Unfreeze it here and + * free the resources used for freezing the devq. Must clear the + * INRESET flag as well or scsi I/O will not work. + */ + if (tm->cm_targ != NULL) { + tm->cm_targ->flags &= ~MPSSAS_TARGET_INRESET; + } + if (tm->cm_ccb) { + mps_dprint(sc, MPS_INFO, "Unfreezing devq for target ID %d\n", + tm->cm_targ->tid); + xpt_release_devq(tm->cm_ccb->ccb_h.path, 1, TRUE); + xpt_free_path(tm->cm_ccb->ccb_h.path); + xpt_free_ccb(tm->cm_ccb); } - mps_dprint(sc, MPS_RECOVERY, "%s tm_count %u\n", __func__, - sc->sassc->tm_count); mps_free_high_priority_command(sc, tm); } @@ -371,7 +366,8 @@ mpssas_remove_volume(struct mps_softc *s if (reply == NULL) { /* XXX retry the remove after the diag reset completes? */ mps_dprint(sc, MPS_FAULT, - "%s NULL reply reseting device 0x%04x\n", __func__, handle); + "%s NULL reply resetting device 0x%04x\n", __func__, + handle); mpssas_free_tm(sc, tm); return; } @@ -475,6 +471,11 @@ mpssas_prepare_volume_remove(struct mpss MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY; cm->cm_complete = mpssas_remove_volume; cm->cm_complete_data = (void *)(uintptr_t)handle; + + mps_dprint(sc, MPS_INFO, "%s: Sending reset for target ID %d\n", + __func__, targ->tid); + mpssas_prepare_for_tm(sc, cm, targ, CAM_LUN_WILDCARD); + mps_map_command(sc, cm); } @@ -533,6 +534,11 @@ mpssas_prepare_remove(struct mpssas_soft cm->cm_desc.HighPriority.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY; cm->cm_complete = mpssas_remove_device; cm->cm_complete_data = (void *)(uintptr_t)handle; + + mps_dprint(sc, MPS_INFO, "%s: Sending reset for target ID %d\n", + __func__, targ->tid); + mpssas_prepare_for_tm(sc, cm, targ, CAM_LUN_WILDCARD); + mps_map_command(sc, cm); } @@ -785,9 +791,6 @@ mps_attach_sas(struct mps_softc *sc) mpssas_startup_increment(sassc); callout_init(&sassc->discovery_callout, 1 /*mpsafe*/); - sassc->discovery_timeouts = 0; - - sassc->tm_count = 0; /* * Register for async events so we can determine the EEDP @@ -938,7 +941,7 @@ mpssas_action(struct cam_sim *sim, union cpi->max_lun = 255; cpi->initiator_id = sassc->maxtargets - 1; strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "LSILogic", HBA_IDLEN); + strncpy(cpi->hba_vid, "Avago Tech (LSI)", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); @@ -1134,8 +1137,8 @@ mpssas_handle_reinit(struct mps_softc *s mpssas_complete_all_commands(sc); mps_dprint(sc, MPS_INIT, - "%s startup %u tm %u after command completion\n", - __func__, sc->sassc->startup_refcount, sc->sassc->tm_count); + "%s startup %u after command completion\n", __func__, + sc->sassc->startup_refcount); /* zero all the target handles, since they may change after the * reset, and we have to rediscover all the targets and use the new @@ -1198,7 +1201,6 @@ mpssas_logical_unit_reset_complete(struc "NULL reset reply for tm %p\n", tm); if ((sc->mps_flags & MPS_FLAGS_DIAGRESET) != 0) { /* this completion was due to a reset, just cleanup */ - targ->flags &= ~MPSSAS_TARGET_INRESET; targ->tm = NULL; mpssas_free_tm(sc, tm); } @@ -1287,7 +1289,6 @@ mpssas_target_reset_complete(struct mps_ "NULL reset reply for tm %p\n", tm); if ((sc->mps_flags & MPS_FLAGS_DIAGRESET) != 0) { /* this completion was due to a reset, just cleanup */ - targ->flags &= ~MPSSAS_TARGET_INRESET; targ->tm = NULL; mpssas_free_tm(sc, tm); } @@ -1303,8 +1304,6 @@ mpssas_target_reset_complete(struct mps_ le16toh(reply->IOCStatus), le32toh(reply->ResponseCode), le32toh(reply->TerminationCount)); - targ->flags &= ~MPSSAS_TARGET_INRESET; - if (targ->outstanding == 0) { /* we've finished recovery for this target and all * of its logical units. @@ -1332,7 +1331,7 @@ mpssas_target_reset_complete(struct mps_ #define MPS_RESET_TIMEOUT 30 -static int +int mpssas_send_reset(struct mps_softc *sc, struct mps_command *tm, uint8_t type) { MPI2_SCSI_TASK_MANAGE_REQUEST *req; @@ -1358,15 +1357,19 @@ mpssas_send_reset(struct mps_softc *sc, mpssas_log_command(tm, MPS_RECOVERY|MPS_INFO, "sending logical unit reset\n"); tm->cm_complete = mpssas_logical_unit_reset_complete; + mpssas_prepare_for_tm(sc, tm, target, tm->cm_lun); } else if (type == MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET) { - /* Target reset method = SAS Hard Link Reset / SATA Link Reset */ + /* + * Target reset method = + * SAS Hard Link Reset / SATA Link Reset + */ req->MsgFlags = MPI2_SCSITASKMGMT_MSGFLAGS_LINK_RESET; tm->cm_targ->target_resets++; - tm->cm_targ->flags |= MPSSAS_TARGET_INRESET; mpssas_log_command(tm, MPS_RECOVERY|MPS_INFO, "sending target reset\n"); tm->cm_complete = mpssas_target_reset_complete; + mpssas_prepare_for_tm(sc, tm, target, CAM_LUN_WILDCARD); } else { mps_dprint(sc, MPS_ERROR, "unexpected reset type 0x%x\n", type); @@ -1513,6 +1516,10 @@ mpssas_send_abort(struct mps_softc *sc, targ->aborts++; + mps_dprint(sc, MPS_INFO, "Sending reset from %s for target ID %d\n", + __func__, targ->tid); + mpssas_prepare_for_tm(sc, tm, targ, tm->cm_lun); + err = mps_map_command(sc, tm); if (err) mpssas_log_command(tm, MPS_RECOVERY, @@ -1521,7 +1528,6 @@ mpssas_send_abort(struct mps_softc *sc, return err; } - static void mpssas_scsiio_timeout(void *data) { @@ -1667,6 +1673,19 @@ mpssas_action_scsiio(struct mpssas_softc return; } + /* + * If target has a reset in progress, freeze the devq and return. The + * devq will be released when the TM reset is finished. + */ + if (targ->flags & MPSSAS_TARGET_INRESET) { + ccb->ccb_h.status = CAM_BUSY | CAM_DEV_QFRZN; + mps_dprint(sc, MPS_INFO, "%s: Freezing devq for target ID %d\n", + __func__, targ->tid); + xpt_freeze_devq(ccb->ccb_h.path, 1); + xpt_done(ccb); + return; + } + cm = mps_alloc_command(sc); if (cm == NULL || (sc->mps_flags & MPS_FLAGS_DIAGRESET)) { if (cm != NULL) { @@ -2056,6 +2075,8 @@ mpssas_scsiio_complete(struct mps_softc u8 *TLR_bits, TLR_on; int dir = 0, i; u16 alloc_len; + struct mpssas_target *target; + target_id_t target_id; MPS_FUNCTRACE(sc); mps_dprint(sc, MPS_TRACE, @@ -2069,6 +2090,7 @@ mpssas_scsiio_complete(struct mps_softc sassc = sc->sassc; ccb = cm->cm_complete_data; csio = &ccb->csio; + target_id = csio->ccb_h.target_id; rep = (MPI2_SCSI_IO_REPLY *)cm->cm_reply; /* * XXX KDM if the chain allocation fails, does it matter if we do @@ -2250,9 +2272,10 @@ mpssas_scsiio_complete(struct mps_softc * TLR_bits for the target. */ if ((rep->SCSIState & MPI2_SCSI_STATE_RESPONSE_INFO_VALID) && - ((le32toh(rep->ResponseInfo) & MPI2_SCSI_RI_MASK_REASONCODE) == + ((le32toh(rep->ResponseInfo) & + MPI2_SCSI_RI_MASK_REASONCODE) == MPS_SCSI_RI_INVALID_FRAME)) { - sc->mapping_table[csio->ccb_h.target_id].TLR_bits = + sc->mapping_table[target_id].TLR_bits = (u8)MPI2_SCSIIO_CONTROL_NO_TLR; } @@ -2309,12 +2332,11 @@ mpssas_scsiio_complete(struct mps_softc (csio->data_ptr != NULL) && ((csio->data_ptr[0] & 0x1f) == T_SEQUENTIAL) && (sc->control_TLR) && - (sc->mapping_table[csio->ccb_h.target_id].device_info & + (sc->mapping_table[target_id].device_info & MPI2_SAS_DEVICE_INFO_SSP_TARGET)) { vpd_list = (struct scsi_vpd_supported_page_list *) csio->data_ptr; - TLR_bits = &sc->mapping_table[csio->ccb_h.target_id]. - TLR_bits; + TLR_bits = &sc->mapping_table[target_id].TLR_bits; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502242207.t1OM7hqB064133>