summaryrefslogtreecommitdiffstats
path: root/sys/dev/mfi/mfi_pci.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r261491 (by ambrisko):markj2014-08-271-14/+25
| | | | | | | | | | | | | | | | | | | | | | Add a tunable "hw.mfi.mrsas_enable" to allow mfi(4) to drop priority and allow mrsas(4) from LSI to attach to newer LSI cards that are support by mrsas(4). If mrsas(4) is not loaded into the system at boot then mfi(4) will always attach. If a modified mrsas(4) is loaded in the system. That modification is return "-30" in it's probe since that is between BUS_PROBE_DEFAULT and BUS_PROBE_LOW_PRIORITY. This option is controller by a new probe flag "MFI_FLAGS_MRSAS" in mfi_ident that denotes cards that should work with mrsas(4). New entries that should have this option. This is the first step to get mrsas(4) checked into FreeBSD and to avoid collision with people that use mrsas(4) from LSI. Since mfi(4) takes priority, then mrsas(4) users need to rebuild GENERIC. Using the .disabled="1" method doesn't work since that blocks attaching and the probe gave it to mfi(4). MFC r267451 (by delphij): Correct variable for loader tunable variable hw.mfi.mrsas_enable.
* MFC r261535:markj2014-03-101-1/+2
| | | | | | | | | | Add support for MegaRAID Fury cards. The main change needed to boot from a 9341-4i controller was to ensure that scatter/gather lists are ended with an end-of-list marker. Both the mrsas and Linux megaraid_sas drivers use this marker with Invader cards as well, so we do the same thing, though it is apparently not strictly necessary. PR: 187312
* Add PCI device ID for MegaRAID Invader cards. This was the onlyambrisko2013-09-251-0/+1
| | | | | | change needed to make it work on my card. Approved by: re (glebius)
* Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIscottl2013-08-121-14/+2
| | | | | | | | | | | | | | | | | command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit. This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot. Submitted by: jhb Reviewed by: jfv, marius, achadd, achim MFC after: 1 day
* MFhead_mfi r227068ambrisko2012-03-301-11/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First cut of new HW support from LSI and merge into FreeBSD. Supports Drake Skinny and ThunderBolt cards. MFhead_mfi r227574 Style MFhead_mfi r227579 Use bus_addr_t instead of uintXX_t. MFhead_mfi r227580 MSI support MFhead_mfi r227612 More bus_addr_t and remove "#ifdef __amd64__". MFhead_mfi r227905 Improved timeout support from Scott. MFhead_mfi r228108 Make file. MFhead_mfi r228208 Fixed botched merge of Skinny support and enhanced handling in call back routine. MFhead_mfi r228279 Remove superfluous !TAILQ_EMPTY() checks before TAILQ_FOREACH(). MFhead_mfi r228310 Move mfi_decode_evt() to taskqueue. MFhead_mfi r228320 Implement MFI_DEBUG for 64bit S/G lists. MFhead_mfi r231988 Restore structure layout by reverting the array header to use [0] instead of [1]. MFhead_mfi r232412 Put wildcard pattern later in the match table. MFhead_mfi r232413 Use lower case for hexadecimal numbers to match surrounding style. MFhead_mfi r232414 Add more Thunderbolt variants. MFhead_mfi r232888 Don't act on events prior to boot or when shutting down. Add hw.mfi.detect_jbod_change to enable or disable acting on JBOD type of disks being added on insert and removed on removing. Switch hw.mfi.msi to 1 by default since it works better on newer cards. MFhead_mfi r233016 Release driver lock before taking Giant when deleting children. Use TAILQ_FOREACH_SAFE when items can be deleted. Make code a little simplier to follow. Fix a couple more style issues. MFhead_mfi r233620 Update mfi_spare/mfi_array with the actual number of elements for array_ref and pd. Change these max. #define names to avoid name space collisions. This will require an update to mfiutil It avoids mfiutil having to do a magic calculation. Add a note and #define to state that a "SYSTEM" disk is really what the firmware calls a "JBOD" drive. Thanks to the many that helped, LSI for the initial code drop, mav, delphij, jhb, sbruno that all helped with code and testing.
| * First cut at updating mfi(4) to support newer LSI MegaRAID SAS cards.ambrisko2011-11-041-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, add support for "Drake Skinny" and "ThunderBolt" LSI cards. Initial code was supplied by LSI under BSD license. Several improvements were done by myself. Such things like making it work in a static kernel, be able to boot of the RAID, performance improvements. I removed some fairly complicated code that seemed to directly access the disks under the firmware. It doesn't seem to be needed and significantly slowed down the performance of the driver and caused tons of sense errors to be reported. This code is being checked in this area so others can help me get it into shape to commit into the FreeBSD tree. Assistance has been volunteered by iXsystems. We might want to re-work the JBOD attachment that creates /dev/mfisyspd? node for each disk. Performance is faster then prior cards. It works okay with WITNESS and INVARIANTS on amd64 and i386. I recall seeing a use after free time bug with FreeBSD 8 and a Drake Skinny card with WITNESS and INVARIANTS on. First task is get all of the new structures to be named in FreeBSD style format. Next is probably to deal with the 64bit addressing changes that are mostly around the #ifdef __amd64__ checks. Thanks to LSI for providing the initial code. Obtained from: LSI
* | Convert a number of drivers to obtaining their parent DMA tag from theirscottl2012-03-121-1/+1
| | | | | | | | PCI device attachment.
* | - There's no need to overwrite the default device method with the defaultmarius2011-11-221-3/+2
| | | | | | | | | | | | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
* | Add single-message MSI support to mfi(4). It is disabled by default butjhb2011-11-161-1/+23
|/ | | | | | | | can be enabled via the hw.mfi.msi tunable. Many mfi(4) controllers also support MSI-X, but in testing it seems that many adapters do not work with MSI-X but do work with MSI. MFC after: 2 weeks
* Correct mfip module dependency on mfi. This allows mfip to be loaded askib2010-03-021-0/+1
| | | | | | | module when mfi is a module itself. Reviewed by: jhb, scottl MFC after: 1 week
* Change Dell's gen2 catch-all from Dell PERC H700/H800 to Dell PERC Gen2ambrisko2008-12-151-1/+1
| | | | | | and bump the driver version from 2 to 3 and fix the related style problem. Suggested by: LSI
* Sort the PCI device's and make the catch-all for new Dellambrisko2008-12-121-6/+6
| | | | | | | | cards only apply to Dell. This gets rid of the duplicate catch-all that I introduced that jkim caught. Prompted by: jkim Reviewed by: jkim
* Add in some more device ID's and a generic catch-all.ambrisko2008-12-121-0/+3
| | | | Submitted by: LSI
* Change new card identification names.ambrisko2008-12-031-4/+4
| | | | | Submitted by: LSI MFC after: 3 days
* - Fix from jhb for failing I/O request when bus_dmamap_load fails.ambrisko2008-11-121-5/+18
| | | | | | | | | | | | | | - Fix to ioctl path in which the length could be 0 which means no data in/out from LSI. - Fix to ioctl path in which the data in the sense data space of the ioctl packet is a really a pointer to some location in user-space. From LSI re-worked a bit by me. - Add HW support for next gen cards from LSI. Thanks to LSI for their support! Submitted by: jhb, LSI MFC after: 3 days
* Add Dell's sub-vendor id to identify PERC6 RAID controller which has LSIambrisko2007-12-191-0/+1
| | | | vendor id's.
* Update the MFI driver to support new "1078" series of hardware. Thisscottl2007-08-251-3/+30
| | | | | | | | includes the upcoming Dell PERC6 series. Many thanks to LSI for contributing this code. Submitted by: LSI Approved by: re
* Fix a few nits relative to the previous changes:jhb2007-08-131-0/+1
| | | | | | | | | | - Don't leak the config lock if detach() fails due to the controller char dev being open. - Close a race between detach() and a process opening the controller char dev. MFC after: 1 week Approved by: re (bmah)
* Teach the mfi(4) driver to handle requests from userland managementjhb2007-08-131-2/+6
| | | | | | | | applications to add and remove volumes. MFC after: 1 week Approved by: re (bmah) Reviewed by: ambrisko, scottl
* Collapse the mfi_ld object. Add an ioctl to help management apps mapscottl2007-05-101-7/+9
| | | | array Id's to FreeBSD device names.
* Remove a PCI ID entry that conflicts with the AMR driver.scottl2007-01-231-1/+0
|
* Add PCI Id's for upcoming controllers.scottl2007-01-171-1/+3
| | | | | Obtained from: LSI Corp. MFC After: 3 days
* Instead of using scsi probes to do device discovery, use the firmwareps2006-06-201-0/+1
| | | | | | commands to grab the device listing. This resolves issues using multiple volumes, where each volume was actually internally pointing to target 0.
* Add in a bunch of things to the mfi driver:ambrisko2006-05-181-0/+2
| | | | | | | | | | | | | | | | | | | - Linux ioctl support, with the other Linux changes MegaCli will run if you mount linprocfs & linsysfs then set sysctl compat.linux.osrelease=2.6.12 or similar. This works on i386. It should work on amd64 but not well tested yet. StoreLib may or may not work. Remember to kldload mfi_linux. - Add in AEN (Async Event Notification) support so we can get messages from the firmware when something happens. Not all messages are in defined in event detail. Use event_log to try to figure out what happened. - Try to implement something like SIGIO for StoreLib. Since mrmonitor doesn't work right I can't fully test it. StoreLib works best with the rh9 base. In theory mrmonitor isn't needed due to native driver support of AEN :-) Now we can configure and monitor the RAID better. Submitted by: IronPort Systems.
* Add a driver for the new LSI MegaRAID SAS controller family. The 'MFI' namescottl2006-03-251-0/+243
is derived from the phrase 'MegaRAID Firmware Interface' used by LSI. This driver provides a block interface to logical disks on the card and a minimal management device. It is MPSAFE, INTR_FAST, and 64-bit capable. Thanks to Dell for providing hardware to test with and IronPort for sponsoring the work. Sponsored by: Dell, Ironport MFC After: 3 days
OpenPOWER on IntegriCloud