aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mpr/mpr_mapping.c
Commit message (Collapse)AuthorAgeFilesLines
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* mpr(4): Remove a double word in a source code commentGordon Bergling2022-09-041-1/+1
| | | | | | - s/the the/the/ MFC after: 3 days
* mpr/mps(4): Make device mapping some more robust.Alexander Motin2021-04-241-26/+45
| | | | | | | | | | | | | | | | | | | | Allow new enclosure to replace previously existing one if there is no completely unused table entry, same as it is done for devices. If we can not process DPM due to corruption -- wipe it and restart from scratch. Otherwise I don't see a way to recover persistence if something go wrong and there is no BIOS to recover it for us. Together this solves a problem that appeared when 9300-8i firmware update to 16.00.10.00 somehow switched its mapping mode from Device Persistence to Enclosure/Slot without wiping the DPM table. It made HBA completely unusable, since overflowed and conflicting mapping table was unable to map any of enclosures and so devices. Also while there make some enclosure mapping errors more informative. MFC after: 1 month Sponsored by: iXsystems, Inc.
* mpr: big-endian supportAlfredo Dal'Ava Junior2021-03-031-2/+2
| | | | | | | | | | | | This fixes mpr driver on big-endian devices. Tested on powerpc64 and powerpc64le targets using a SAS9300-8i card (LSISAS3008 pci vendor=0x1000 device=0x0097) Submitted by: Andre Fernando da Silva <andre.silva@eldorado.org.br> Reviewed by: luporl, alfredo, Sreekanth Reddy <sreekanth.reddy@broadcom.com> (by email) Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25785
* mpr: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-8/+3
| | | | Notes: svn path=/head/; revision=365204
* Update copyright informationKashyap D Desai2018-12-261-1/+2
| | | | | | | | | | | Submitted by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Notes: svn path=/head/; revision=342535
* Clean enclosure_table when resetting num_enc_table_entries to zero.Alexander Motin2018-05-021-0/+2
| | | | | | | | | | | Garbage left there by r325363 in some scenarios found to lead to later enclosure mapping failures. MFC after: 1 week Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=333158
* Revert r327828, r327949, r327953, r328016-r328026, r328041:Pedro F. Giffuni2018-01-211-11/+11
| | | | | | | | | | | | | | | | | | Uses of mallocarray(9). The use of mallocarray(9) has rocketed the required swap to build FreeBSD. This is likely caused by the allocation size attributes which put extra pressure on the compiler. Given that most of these checks are superfluous we have to choose better where to use mallocarray(9). We still have more uses of mallocarray(9) but hopefully this is enough to bring swap usage to a reasonable level. Reported by: wosch PR: 225197 Notes: svn path=/head/; revision=328218
* dev: make some use of mallocarray(9).Pedro F. Giffuni2018-01-131-11/+11
| | | | | | | | | | | | | | Focus on code where we are doing multiplications within malloc(9). None of these is likely to overflow, however the change is still useful as some static checkers can benefit from the allocation attributes we use for mallocarray. This initial sweep only covers malloc(9) calls with M_NOWAIT. No good reason but I started doing the changes before r327796 and at that time it was convenient to make sure the sorrounding code could handle NULL values. Notes: svn path=/head/; revision=327949
* Fix mpr(4) panics caused by bad drive mapping tablesAlan Somers2017-11-031-6/+20
| | | | | | | | | | | | | | | | | sys/dev/mpr/mpr_mapping.c If _mapping_process_dpm_pg0 detects inconsistencies in the drive mapping table (stored in the HBA's NVRAM), abort reading it and continue to boot as if the mapping table were blank. I observed such inconsistencies in several HBAs after upgrading firmware from 14.0.0.0 to 15.0.0.0. Reviewed by: slm MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D12901 Notes: svn path=/head/; revision=325363
* Start overhauling debug printing in the MPS and MPR drivers. The focus of thisScott Long2017-08-271-3/+0
| | | | | | | | | | | commit it to make initiazation less chatty in the normal case, and more useful and informative when real debugging is turned on. Reviewed by: ken (earlier version) Sponsored by: Netflix Notes: svn path=/head/; revision=322943
* Fix several problems with mapping code.Stephen McConnell2017-05-251-418/+830
| | | | | | | | | | Reviewed by: ken, scottl, asomers, ambrisko, mav Approved by: ken, mav MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10861 Notes: svn path=/head/; revision=318896
* Add tri-mode support (SAS/SATA/PCIe).Stephen McConnell2017-05-171-49/+490
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=318427
* Several style changes and add copyrights for 2016.Stephen McConnell2016-05-091-1/+1
| | | | | | | | | | Reviewed by: ken, scottl, ambrisko, asomers Approved by: ken, scottl, ambrisko MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6103 Notes: svn path=/head/; revision=299265
* The wrong commit message was given with r283632. This is the correct message.Stephen McConnell2015-05-281-37/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=283661
* The wrong commit message was given with r283632. To get the correct commitStephen McConnell2015-05-281-35/+37
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=283660
* This setting of stop_at_shutdown should have been removed with r279253Stephen McConnell2015-05-271-37/+35
| | | | | | | | Approved by: ken MFC after: 1 week Notes: svn path=/head/; revision=283632
* Bring in the mpr(4) driver for LSI's MPT3 12Gb SAS controllers.Kenneth D. Merry2014-05-021-0/+2269
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 Notes: svn path=/head/; revision=265236