aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/smartpqi
Commit message (Collapse)AuthorAgeFilesLines
* style(9): white space after ; and around binary operatorsDavid E. O'Brien2025-10-162-5/+5
| | | | | | | in for() loops. Also, use 'while', where only the conditional test of 'for' was used. Reviewed by: sjg
* smartpqi(4): Fix a typo in a source code commentGordon Bergling2025-01-261-1/+1
| | | | | | - s/isnt/isn’t/ MFC after: 3 days
* smartpqi: Change alignment for dma tagsJohn Hall2023-10-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Under certain I/O conditions, a program doing large block disk reads can cause a controller to crash. Root Cause: The SCSI read request and destination address in the BDMA descriptor is incorrect, causing the BDMA engine in the controller to assert. Fix: Change the alignment for creating bus_dma_tags in the driver from PAGE_SIZE (4k) to 1, which allows the controller to manage it's own address range for BDMA transactions. Risk: Medium Exposure: This reverts a change first made to support NVMe drives on Excalibur. At that time a 4k alignment was necessary. This no longer seems to be the case. PR: 259541 Reported by: Ka Ho Ng <khng@freebsd.org> Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D41619
* smartpqi: Drop spinlock before freeing memoryJohn F. Carr2023-10-191-3/+3
| | | | | | | | | | | pqisrc_free_device frees the device softc with the os spinlock held. This causes crashes when devices are removed because the memory free might sleep (which is prohibited with spin locks held). Drop the spinlock before releasing the memory. MFC After: 2 days PR: 273289 Reviewed by: imp
* smartpqi: Fix build issues highlighted by gcc12Warner Losh2023-08-254-23/+7
| | | | | | | | | Make inline functions defined in a header file as static inline. Mark inline functions used only in the compilation unit they are defined in as merely static (the compiler can figure out it these days). Sponsored by: Netflix
* smartpqi: update to version 4410.0.2005John Hall2023-08-2423-2409/+5363
| | | | | | | | This updates the smartpqi driver to Microsemi's latest code. This will be the driver for FreeBSD 14 (with updates), but no MFC is planned. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D41550
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-1621-21/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* smartpqi(4): Fix two typos in kernel error messagesGordon Bergling2022-10-252-2/+2
| | | | | | - s/runnning/running/ MFC after: 2 weeks
* Adjust check_struct_sizes() definition to avoid clang 15 warningDimitry Andric2022-07-261-1/+1
| | | | | | | | | | | | | | | With clang 15, the following -Werror warning is produced: sys/dev/smartpqi/smartpqi_helper.c:374:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] check_struct_sizes() ^ void This is because check_struct_sizes() is declared with a (void) argument list, but defined with an empty argument list. Make the definition match the declaration. MFC after: 3 days
* smartpqi: Allocate DMA memory NOWAITYuri2022-06-271-1/+1
| | | | | | | | | | We're not allowed to wait in this allocation path, so allocate the memory NOWAIT instead of WAITOK. The code already copes with the failures that may result, so no additional code is needed. PR: 263008 Reviewed by: markj, Scott Benesh at Microsemi, imp Differential Revision: https://reviews.freebsd.org/D35601
* smartpqi: Remove unused devclass argument to DRIVER_MODULE.John Baldwin2022-05-061-3/+1
|
* smartpqi(4): Fix a typo in a source code commentGordon Bergling2022-04-021-1/+1
| | | | | | - s/commmand/command/ MFC after: 3 days
* Update smartqpi driver to vendor's latest submissionWarner Losh2022-03-095-14/+90
| | | | | | | | | | | | | | | | Newly added features & bug fixes o Fixed an issue smartpqi debug log messages are flooding kernel logs. o Fixed an issue where devices are shown as RAID 0 in display info. o Feature: Changed 32 bit dma address to 64 bit address o Added new controlller ids. Submitted by: Microsemi Reviewed by: Scott Benesh (Microsemi), imp Differential Revision: https://reviews.freebsd.org/D34469 MFC After: 3 days Sponsored by: Netflix
* Fix "set but not used" in smartpqi. The PCI_MEM macros don't require aScott Long2022-02-262-2/+2
| | | | | | | physical/absolute address in FreeBSD, but it looks like the calling code might be somewhat portable to other OS's that do require this. Therefore, set the variables to __unused instead of removing the code entirely.
* cam: fix xpt_bus_register and xpt_bus_deregister return errnoWarner Losh2021-06-281-4/+4
| | | | | | | | | | | | | | | | | | | xpt_bus_register and xpt_bus_deregister returns a hybrid error that's neither a cam_status, nor an errno, but a mix of both. Update xpt_bus_register and xpt_bus_deregister to return an errno. The vast majority of current users compare against zero, which can also be spelled CAM_SUCCESS. Nobody uses CAM_FAILURE, so remove that symbol to prevent comfusion (nothing returns it either). Where the return value is saved, ensure that the variable 'error' is used to store an errno and 'status' is used to store a cam_status where it makes the code clearer (usually just in functions that already mix and match). Where the return value isn't used at all, avoid storing it at all. Reviewed by: scottl@, mav@ (earlier version) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30860
* smartpqi: Remove stray declarationWarner Losh2021-06-031-2/+0
| | | | | | | | pqisrc_is_firmware_feature_enabled shouldn't be declared inline in a header, and then static inline in the .c function. Remove this stray declartion from the header. gcc6 complains, but clang does not. Sponsored by: Netflix
* smartpqi: clear CCBs allocated on the stackEdward Tomasz Napierala2021-05-281-0/+3
| | | | | | Differential Revision: https://reviews.freebsd.org/D30299 Sponsored by: Netflix
* Newly added features and bug fixes in latest Microchip SmartPQI driverPAPANI SRIKANTH2021-05-2821-1598/+3392
| | | | | | | | | | | | | | | | | | | | | | | | | It includes: 1)Newly added TMF feature. 2)Added newly Huawei & Inspur PCI ID's 3)Fixed smartpqi driver hangs in Z-Pool while running on FreeBSD12.1 4)Fixed flooding dmesg in kernel while the controller is offline during in ioctls. 5)Avoided unnecessary host memory allocation for rcb sg buffers. 6)Fixed race conditions while accessing internal rcb structure. 7)Fixed where Logical volumes exposing two different names to the OS it's due to the system memory is overwritten with DMA stale data. 8)Fixed dynamically unloading a smartpqi driver. 9)Added device_shutdown callback instead of deprecated shutdown_final kernel event in smartpqi driver. 10)Fixed where Os is crashed during physical drive hot removal during heavy IO. 11)Fixed OS crash during controller lockup/offline during heavy IO. 12)Fixed coverity issues in smartpqi driver 13)Fixed system crash while creating and deleting logical volume in a continuous loop. 14)Fixed where the volume size is not exposing to OS when it expands. 15)Added HC3 pci id's. Reviewed by: Scott Benesh (microsemi), Murthy Bhat (microsemi), imp Differential Revision: https://reviews.freebsd.org/D30182 Sponsored by: Netflix
* smartpqi: don't bzero the new ccb; xpt_alloc_ccb_nowait() already does that.Edward Tomasz Napierala2020-11-231-1/+0
| | | | | | | | | | | Reviewed by: imp MFC after: 2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26838 Notes: svn path=/head/; revision=367949
* smartpqi: clean up empty lines in .c and .h filesMateusz Guzik2020-09-0121-286/+174
| | | | Notes: svn path=/head/; revision=365154
* remove extraneous double ;s in sys/Ed Maste2020-03-302-6/+6
| | | | Notes: svn path=/head/; revision=359441
* Decrease logging severity when adding a device or reading config table.Mark Johnston2020-01-072-2/+2
| | | | | | | | | | | | | | | | | | | | In PR 243056 a user reports some spam from smartpqi(4). In particular, the driver warns about an unrecognized PQI_CONF_TABLE_SECTION_SOFT_RESET section (not yet defined in the driver, but handled in Linux), but this doesn't cause any problems. The Linux driver also does not warn about unrecognized sections. Also do not log a warning when a device is added, since this is routine. Lower severity to DISC, to match pqisrc_remove_device(). PR: 243056 Reviewed by: sbruno MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23023 Notes: svn path=/head/; revision=356445
* Use callout(9) instead of deprecated timeout(9).John Baldwin2019-12-133-15/+14
| | | | | | | | | Reviewed by: imp Tested by: Scott Benesh Differential Revision: https://reviews.freebsd.org/D22598 Notes: svn path=/head/; revision=355728
* Extract eventfilter declarations to sys/_eventfilter.hConrad Meyer2019-05-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header pollution substantially. EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c files into appropriate headers (e.g., sys/proc.h, powernv/opal.h). As a side effect of reduced header pollution, many .c files and headers no longer contain needed definitions. The remainder of the patch addresses adding appropriate includes to fix those files. LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by sys/mutex.h since r326106 (but silently protected by header pollution prior to this change). No functional change (intended). Of course, any out of tree modules that relied on header pollution for sys/eventhandler.h, sys/lock.h, or sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped. Notes: svn path=/head/; revision=347984
* Remove single-use DEV_RESET() macro.Konstantin Belousov2019-04-052-3/+1
| | | | | | | | | | | | It conflicts with the sys/bus.h DEV_XXX namespace. Reviewed by: imp (previous version), jhb (previous version) Sponsored by: Mellanox Technologies MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D19646 Notes: svn path=/head/; revision=345964
* Make smartpqi(4) behave better when running out of memory, by returningEdward Tomasz Napierala2019-03-261-9/+15
| | | | | | | | | | | | | CAM_RESRC_UNAVAIL instead of CAM_REQUEUE_REQ. This makes CAM delay a bit before retrying, so that the retries actually get a chance to succeed. Reviewed by: sbruno MFC after: 2 weeks Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D19696 Notes: svn path=/head/; revision=345549
* Fix smartpqi(4) malloc tag and description to match the driver name.Edward Tomasz Napierala2019-03-211-3/+3
| | | | | | | | | | | | No functional changes. Reviewed by: sbruno MFC after: 2 weeks Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D19625 Notes: svn path=/head/; revision=345385
* Fix crash in low memory conditions. Usual backtrace lookedEdward Tomasz Napierala2019-03-101-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | like this: pqisrc_build_sgl() at pqisrc_build_sgl+0x8d/frame 0xfffffe009e8b7a00 pqisrc_build_raid_io() at pqisrc_build_raid_io+0x231/frame 0xfffffe009e8b7a40 pqisrc_build_send_io() at pqisrc_build_send_io+0x375/frame 0xfffffe009e8b7b00 pqi_request_map_helper() at pqi_request_map_helper+0x282/frame 0xfffffe009e8b7ba0 bus_dmamap_load_ccb() at bus_dmamap_load_ccb+0xd7/frame 0xfffffe009e8b7c00 pqi_map_request() at pqi_map_request+0x9b/frame 0xfffffe009e8b7c70 pqisrc_io_start() at pqisrc_io_start+0x55c/frame 0xfffffe009e8b7d50 smartpqi_cam_action() at smartpqi_cam_action+0xb8/frame 0xfffffe009e8b7de0 xpt_run_devq() at xpt_run_devq+0x30a/frame 0xfffffe009e8b7e40 xpt_action_default() at xpt_action_default+0x94b/frame 0xfffffe009e8b7e90 dastart() at dastart+0x33b/frame 0xfffffe009e8b7ee0 xpt_run_allocq() at xpt_run_allocq+0x1a2/frame 0xfffffe009e8b7f30 dastrategy() at dastrategy+0x71/frame 0xfffffe009e8b7f60 g_disk_start() at g_disk_start+0x351/frame 0xfffffe009e8b7fc0 g_io_request() at g_io_request+0x3cf/frame 0xfffffe009e8b8010 g_part_start() at g_part_start+0x120/frame 0xfffffe009e8b8090 g_io_request() at g_io_request+0x3cf/frame 0xfffffe009e8b80e0 zio_vdev_io_start() at zio_vdev_io_start+0x4b2/frame 0xfffffe009e8b8140 zio_execute() at zio_execute+0x17c/frame 0xfffffe009e8b8180 zio_nowait() at zio_nowait+0xc4/frame 0xfffffe009e8b81b0 vdev_queue_io_done() at vdev_queue_io_done+0x138/frame 0xfffffe009e8b81f0 zio_vdev_io_done() at zio_vdev_io_done+0x151/frame 0xfffffe009e8b8220 zio_execute() at zio_execute+0x17c/frame 0xfffffe009e8b8260 taskqueue_run_locked() at taskqueue_run_locked+0x10c/frame 0xfffffe009e8b82c0 taskqueue_thread_loop() at taskqueue_thread_loop+0x88/frame 0xfffffe009e8b82f0 fork_exit() at fork_exit+0x84/frame 0xfffffe009e8b8330 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe009e8b8330 Reviewed by: deepak.ukey_microsemi.com, sbruno MFC after: 2 weeks Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D19470 Notes: svn path=/head/; revision=344987
* Re-unbreak smartpqi(4) GCC buildConrad Meyer2018-07-134-18/+0
| | | | | | | | | | | Like r333085, remove redundant declarations. Redundant declarations were re-introduced in r336201. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=336268
* smartpqi(4):Sean Bruno2018-07-1115-146/+359
| | | | | | | | | | | | - Update to release "3" Submitted by: Deepak Ukey <deepak.ukey@microsemi.com> Reviewed by: mav MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16060 Notes: svn path=/head/; revision=336201
* smartpqi(4): Unbreak GCC buildConrad Meyer2018-04-284-24/+0
| | | | | | | Remove redundant declarations. Notes: svn path=/head/; revision=333085
* martpqi(4):Sean Bruno2018-04-2621-0/+11674
- Microsemi SCSI driver for PQI controllers. - Found on newer model HP servers. - Restrict to AMD64 only as per developer request. The driver provides support for the new generation of PQI controllers from Microsemi. This driver is the first SCSI driver to implement the PQI queuing model and it will replace the aacraid driver for Adaptec Series 9 controllers. HARDWARE Controllers supported by the driver include: HPE Gen10 Smart Array Controller Family OEM Controllers based on the Microsemi Chipset. Submitted by: deepak.ukey@microsemi.com Relnotes: yes Sponsored by: Microsemi Differential Revision: https://reviews.freebsd.org/D14514 Notes: svn path=/head/; revision=333019