#
331903 |
|
03-Apr-2018 |
mav |
MFC r331228: Update mpr(4) driver from v15 to v18 from Broadcom site.
Version 16 is just a number bump, since we already had those changes.
Version 17 introduces new AdapterType value, that allows new user-space tools from Broadcom to differentiate adapter generations 3 and 3.5.
Version 18 updates headers and adds SAS_DEVICE_DISCOVERY_ERROR reporting.
|
#
322658 |
|
18-Aug-2017 |
ken |
MFC r321502, r321714, r321733, r321737, r321799, r322364:
------------------------------------------------------------------------ r321502 | scottl | 2017-07-25 19:48:13 -0600 (Tue, 25 Jul 2017) | 2 lines
Quiet a message that sounds far more dire than it really is.
------------------------------------------------------------------------ r321714 | scottl | 2017-07-30 00:53:58 -0600 (Sun, 30 Jul 2017) | 13 lines
Split the interrupt setup code into two parts: allocation and configuration. Do the allocation before requesting the IOCFacts message. This triggers the LSI firmware to recognize the multiqueue should be enabled if available. Multiqueue isn't used by the driver yet, but this also fixes a problem with the cached IOCFacts not matching latter checks, leading to potential problems with error recovery.
As a side-effect, fetch the driver tunables as early as possible.
Reviewed by: slm Obtained from: Netflix Differential Revision: D9243
------------------------------------------------------------------------ r321733 | scottl | 2017-07-30 16:34:24 -0600 (Sun, 30 Jul 2017) | 5 lines
Change from using underbar function names to normal function names for the informational print functions. Collapse the debug API a bit to be more generic and not require as much code duplication. While here, fix a bug in MPS that was already fixed in MPR.
------------------------------------------------------------------------ r321737 | scottl | 2017-07-30 18:05:49 -0600 (Sun, 30 Jul 2017) | 3 lines
Don't re-parse PCI IDs in order to set card-specific flags, use the flags field in the PCIID table.
------------------------------------------------------------------------ r321799 | scottl | 2017-07-31 10:55:56 -0600 (Mon, 31 Jul 2017) | 4 lines
Fix a logic bug in the split PCI interrupt code that slipped through
Reported by: Harry Schmalzbauer
------------------------------------------------------------------------ r322364 | ken | 2017-08-10 08:59:17 -0600 (Thu, 10 Aug 2017) | 39 lines
Changes to make mps(4) and mpr(4) handle reinit with reallocation.
When the mps(4) and mpr(4) drivers need to reinitialize the firmware, they sometimes need to reallocate all of the memory allocated by the driver. The reallocation happens whenever the IOC Facts change. That should only happen after a firmware upgrade.
If the reinitialization happens as a result of a timed out command sent to the card, the command that timed out and triggered the reinit may have been freed if iocfacts_allocate() reallocated all memory. If the caller attempts to access the command after that, the kernel will panic because the caller will be dereferencing freed memory.
The solution is to set a flag in the softc when we reallocate, and avoid dereferencing the command strucure if we've reallocated.
The changes are largely the same in both drivers, since mpr(4) is a derivative of mps(4).
o In iocfacts_allocate(), if the IOC Facts have changed and we need to reallocate, set the REALLOCATED flag in the softc.
o Change wait_command() to take a struct mps_command ** instead of a struct mps_command *. This allows us to NULL out the caller's command pointer if we have to reinit the controller and the data structures get reallocated. (The REALLOCATED flag will be set in the softc if that has happened.)
o In every place that calls wait_command(), make sure we handle the case where the command is NULL after the call.
o The mpr(4) driver has mpr_request_polled() which can also reinitialize the card. Also check for reallocation there.
Reviewed by: scottl, slm Sponsored by: Spectra Logic
------------------------------------------------------------------------
|
#
319446 |
|
01-Jun-2017 |
slm |
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
|
#
319435 |
|
01-Jun-2017 |
slm |
MFC r308217, r308301, r311958, r312437, r318188, r318427, r318679
r308217: Add a fallback to the device mapper logic. We've seen systems in the field that are apparently misconfigured by the manufacturer and cause the mapping logic to fail. The fallback allows drive numbers to be assigned based on the PHY number that they're attached to. Add sysctls and tunables to overrid this new behavior, but they should be considered only necessary for debugging.
Reviewed by: imp, smh Obtained from: Netflix MFC after: 3 days Sponsored by: D8403
r308301: Record the LogInfo field when reporting the IOCStatus. Helps in debugging errors.
Submitted by: slm Obtained from: Netflix MFC after: 3 days
r311958: Print out the number of queues/MSIx vectors.
Sponsored by: Netflix
r312437: Rework the debug print API. Event printing no longer gets special handling. All of the printing from the tables file now has wrappers so that the handling is cleaner and it's possible to print something out (say, during development) without having to fight the global debug flags. This re-org will also make it easier to have the tables be compiled out at build time if desired.
Other than fixing some minor bugs, there are no user-visible changes from this change
Sponsored by: Netflix, Inc. Differential Revision: D9238
r318188: Improve error messages during command timeout for the mpr and mps drivers.
Sponsored by: Netflix
r318427: Add tri-mode support (SAS/SATA/PCIe).
This includes NVMe device support and adds support for the following adapters: SAS 3408 SAS 3416 SAS 3508 SAS 3516 SAS 3616 SAS 3708 SAS 3716
Reviewed by: ken, scottl, asomers, mav Approved by: ken, scottl, mav MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D10095
r318679: Fix powerpc compiler error.
Approved by: ken
|
#
315188 |
|
13-Mar-2017 |
mav |
MFC r314786: Import mpr(4) driver P12 to P14 diff from vendor site.
This is mostly a version bump to stay in version number sync with firmware. The only change there was cosmetic: Display degraded speed message upon receiving Active Cable Exception Event with DEGRADED reason code.
|
#
314441 |
|
01-Mar-2017 |
asomers |
MFC r312995:
Initialize a stack variable in mprsas_get_sas_address_for_sata_disk
Thought it's difficult to reproduce, I think this variable was responsible for a use-after-free panic when a SATA disk timed out responding to a SATA identify command during boot.
Submitted by: slm Reviewed by: slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9364
|
#
313100 |
|
02-Feb-2017 |
asomers |
MFC r311160, r311210, r311288, r311292, r311298, r311340
r311160: misc minor fixes in mpr(4)
sys/dev/mpr/mpr_sas.c * Fix a potential null pointer dereference (CID 1305731) * Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID 1211934)
sys/dev/mpr/mpr_sas_lsi.c * Nullify a dangling pointer in mprsas_get_sata_identify * Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935)
Reported by: Coverity (partially) CID: 1305731 1211934 1211935 Reviewed by: slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8880
r311210: Quell Coverity for diskinfo(8)
* CID 1198994: Don't run the speed disk on a disk with no sectors * CID 1011442: Don't call close(2) if open(2) fails * CID 1011161: Use snprintf instead of sprintf * CID 1009825: Check the return value of lseek
Reported by: Coverity CID: 1198994 1011442 1011161 1009825 MFC after: 4 weeks Sponsored by: Spectra Logic Corp
r311288: Delete dead code in chat(8)
It's always been dead, ever since first import in 1994. It's still dead in OpenBSD's version, too.
Reported by: Coverity CID: 270586 MFC after: 4 weeks Sponsored by: Spectra Logic Corp
r311292: Remove dead code in rpc_parse.c
It's been dead ever since it was imported from TI-RPC in 1995. The dead code is still present in Illumos today, but was removed from NetBSD in 2006.
Reported by: Coverity CID: 270097 Obtained from: NetBSD MFC after: 4 weeks Sponsored by: Spectra Logic Corp
r311298: Remove dead code in dhclient(8)
The offending code has been dead ever since the import from OpenBSD in r195805. OpenBSD later deleted that entire function.
Reported by: Coverity CID: 500059 MFC after: 4 weeks Sponsored by: Spectra Logic Corp
r311340: Misc Coverity fixes for tail(1)
CID 1006402: Initialize stack variable CID 271580: Don't leak memory when ENOMEM.
Reported by: Coverity CID: 271580 1006402 MFC after: 4 weeks Sponsored by: Spectra Logic Corp
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
299272 |
|
09-May-2016 |
slm |
done_ccb pointer can be used if it is NULL.
To prevent this, move check for done_ccb == NULL to before done_ccb is used in mprsas_stop_unit_done().
Reviewed by: ken, scottl, ambrisko, asomers Approved by: ken, scottl, ambrisko MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6099
|
#
299266 |
|
09-May-2016 |
slm |
Add support for the Broadcom (Avago/LSI) 9305 16 and 24 port HBA's.
Reviewed by: ken, scottl, ambrisko, asomers Approved by: ken, scottl, ambrisko MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D6098
|
#
299265 |
|
09-May-2016 |
slm |
Several style changes and add copyrights for 2016.
Reviewed by: ken, scottl, ambrisko, asomers Approved by: ken, scottl, ambrisko MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6103
|
#
298955 |
|
03-May-2016 |
pfg |
sys/dev: minor spelling fixes.
Most affect comments, very few have user-visible effects.
|
#
292218 |
|
14-Dec-2015 |
asomers |
Don't retry SAS commands in response to protocol errors
sys/dev/mpr/mpr_sas_lsi.c sys/dev/mps/mps_sas_lsi.c When mp[rs]sas_get_sata_identify returns MPI2_IOCSTATUS_SCSI_PROTOCOL_ERROR, don't bother retrying. Protocol errors aren't likely to be fixed by sleeping.
Without this change, a system that generated may protocol errors due to signal integrity issues was taking more than an hour to boot, due to all the retries.
Reviewed by: slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D4553
|
#
283661 |
|
28-May-2015 |
slm |
The wrong commit message was given with r283632. This is the correct message.
- 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 9.255.01.00-fbsd
PR: 191348 Reviewed by: ken, scottl Approved by: ken, scottl MFC after: 1 week
|
#
283660 |
|
28-May-2015 |
slm |
The wrong commit message was given with r283632. To get the correct commit message synced to the changes in r283632, those changes are now backed out. Another commit will be done that is exactly the same as r283632 except it will have to correct commit message.
Approved by: ken, scottl, asomers, gibbs
|
#
283632 |
|
27-May-2015 |
slm |
This setting of stop_at_shutdown should have been removed with r279253
Approved by: ken MFC after: 1 week
|
#
265712 |
|
08-May-2014 |
ken |
Add #ifdefs in the mpr(4) driver so that versions of stable/9 that have implemented the PIM_NOSCAN rescan functionality will have it enabled.
This is a no-op for head.
Reviewed by: slm Sponsored by: Spectra Logic Corporation MFC after: 3 days
|
#
265485 |
|
07-May-2014 |
ken |
Hold the SIM lock when calling xpt_create_path() and xpt_action() in mprsas_SSU_to_SATA_devices().
This fixes an assertion on shutdown with INVARIANTS enabled with SATA drives present on an IR firmware controller.
Reviewed by: Steve McConnell <stephen.mcconnell@avagotech.com>. MFC after: 3 days
|
#
265236 |
|
02-May-2014 |
ken |
Bring in the mpr(4) driver for LSI's MPT3 12Gb SAS controllers.
This is derived from the mps(4) driver, but it supports only the 12Gb IT and IR hardware including the SAS 3004, SAS 3008 and SAS 3108.
Some notes about this driver: o The 12Gb hardware can do "FastPath" I/O, and that capability is included in this driver.
o WarpDrive functionality has been removed, since it isn't supported in the 12Gb driver interface.
o The Scatter/Gather list handling code is significantly different between the 6Gb and 12Gb hardware. The 12Gb boards support IEEE Scatter/Gather lists.
Thanks to LSI for developing and testing this driver for FreeBSD.
share/man/man4/mpr.4: mpr(4) man page.
sys/dev/mpr/*: mpr(4) driver files.
sys/modules/Makefile, sys/modules/mpr/Makefile: Add a module Makefile for the mpr(4) driver.
sys/conf/files: Add the mpr(4) driver.
sys/amd64/conf/GENERIC, sys/i386/conf/GENERIC, sys/mips/conf/OCTEON1, sys/sparc64/conf/GENERIC: Add the mpr(4) driver to all config files that currently have the mps(4) driver.
sys/ia64/conf/GENERIC: Add the mps(4) and mpr(4) drivers to the ia64 GENERIC config file.
sys/i386/conf/XEN: Exclude the mpr module from building here.
Submitted by: Steve McConnell <Stephen.McConnell@lsi.com> MFC after: 3 days Tested by: Chris Reeves <chrisr@spectralogic.com> Sponsored by: LSI, Spectra Logic Relnotes: LSI 12Gb SAS driver mpr(4) added
|