aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mrsas
Commit message (Collapse)AuthorAgeFilesLines
* Use uintptr_t instead of unsigned long for pointers.John Baldwin2020-12-161-4/+4
| | | | | | | | | | | | | | | | The sense_ptr thing is quite broken. As near as I can tell, the driver tries to copyout to a physical address rather than whatever user address the sense buffer should be copied to. It is not immediately obvious what user address the sense buffer should be copied to. Reviewed by: imp Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27578 Notes: svn path=/head/; revision=368686
* Make MAXPHYS tunable. Bump MAXPHYS to 1M.Konstantin Belousov2020-11-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys. Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value. Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work. Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav. Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225 Notes: svn path=/head/; revision=368124
* mrsas: clean up empty lines in .c and .h filesMateusz Guzik2020-09-015-70/+1
| | | | Notes: svn path=/head/; revision=365201
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-2/+3
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* Fix some misleading indentation warnings reported by recent clang.John Baldwin2020-01-261-7/+8
| | | | | | | | | | | | | These should not be any functional change. While the change in emul10kx-pcm.c looks like a real bug fix (as opposed to inconsistent whitespace), the extra statements were not harmful. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23363 Notes: svn path=/head/; revision=357146
* Add KERNEL_PANICKED macro for use in place of direct panicstr testsMateusz Guzik2020-01-121-1/+1
| | | | Notes: svn path=/head/; revision=356655
* add mrsas_shutdown methodAndriy Gapon2019-05-231-0/+34
| | | | | | | | | | | | | | | | It should be safer to flush controller and disk caches on the shutdown. And to gracefully shut down the controller as well. It seems that the Linux driver has been doing that for a long time. Discussed with: scottl Reviewed by: imp, Sumit Saxena <sumit.saxena@broadcom.com> (both earlier version) MFC after: 3 weeks Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D19817 Notes: svn path=/head/; revision=348159
* Extract eventfilter declarations to sys/_eventfilter.hConrad Meyer2019-05-201-0/+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
* Update driver version to 07.709.04.00-fbsdKashyap D Desai2019-03-121-1/+1
| | | | | | | | | | | Submitted by: Sumit Saxena <sumit.saxena@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=345059
* Allocated MFI frames should be same as MPT frames reserved for DCMDsKashyap D Desai2019-03-121-2/+1
| | | | | | | | | | | Submitted by: Sumit Saxena <sumit.saxena@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=345058
* fw_outstanding"(outstanding IOs at firmware level) counter gets screwed up ↵Kashyap D Desai2019-03-122-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when R1 fastpath writes are running. Some of the cases which are not handled properly in driver are: 1. With R1 fastpath supported, single write from CAM layer can consume 2 MPT frames at driver/firmware level for fastpath qualification(if fw_outstanding < controller Queue Depth). Due to this driver has to throttle IOs coming from CAM layer as well as second fastpath write(of R1 write) against Adapter Queue Depth. If "fw_outstanding" reaches to adapter queue depth, driver should return IOs from CAM layer with device busy status.While allocating second MPT frame(corresponding to R1 FP write) also, driver should ensure fw_outstanding should not exceed adapter QD. 2. For R1 fastpath writes completion, driver decrements "fw_oustanding" counter without really returning MPT frame to free pool. It may cause IOs(with heavy IOs running, consuming whole adapter Queue Depth) consuming MPT frames reserved for DCMDs(management commands) and DCMDs(internal and sent by application) not getting MPT frame will start failing. Below is one test case to hit the issue described above- 1. Run heavy IOs (outstanding IOs should hit adapter Queue Depth). 2. Run management tool (Broadcom's storcli tool) querying adapter in loop (run command- "storcli64 /c0 show" in loop). 3. Management tool's requests would start failing due to non-availability of free MPT frames as all frames would be consumed by IOs. Fix: Increment/decrement of "fw_outstanding" counter should be in sync with MPT frame get/return. Submitted by: Sumit Saxena <sumit.saxena@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=345056
* Driver version upgrade.Kashyap D Desai2018-12-261-1/+1
| | | | | | | | | | | Submitted by: Sumit Saxena <sumit.saxena@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=342540
* Problem statement:Kashyap D Desai2018-12-261-23/+41
| | | | | | | | | | | | | | | | | | | | Due to hardware errata in Aero controllers, reads to certain fusion registers could intermittently return all zeroes. This behavior is transient in nature and subsequent reads will return valid value. Fix: For Aero controllers, any read will retry the read operations from certain registers for maximum three times, if read returns zero. Submitted by: Sumit Saxena <sumit.saxena@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=342539
* This patch will add support for 32 bit atomic request descriptor for Aero ↵Kashyap D Desai2018-12-262-9/+41
| | | | | | | | | | | | | | | | | | | | | | adapters. For Aero adapters- 1. Driver will use 32 bit atomic descriptor to fire IOs and DCMDs. 2. Driver will use 64 bit request descriptor to fire IOC INIT. 3. If Aero firmware supports 32 bit atomic descriptor, then only driver will use it otherwise driver will use 64 bit request descriptor. For rest of adapters(Ventura, Invader and Thunderbolt), driver will use 64 bit request descriptors only. Submitted by: Sumit Saxena <sumit.saxena@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=342538
* This patch will add support for latest generation MegaRAID adapters- Aero(39xx).Kashyap D Desai2018-12-264-39/+74
| | | | | | | | | | | | | | Driver will throw a warning message when a Configurable secure type controller is encountered. Submitted by: Sumit Saxena <sumit.saxena@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=342537
* Compilation failure on ppc and mips due to Revision 342066.Kashyap D Desai2018-12-141-3/+5
| | | | | | | | | | | | | Adding extra memset on chain frame. Submitted by: Sumit Saxena <sumit.saxena@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=342079
* Driver version upgrade 07.708.02.00-fbsdKashyap D Desai2018-12-141-1/+1
| | | | | | | | | | | Submitted by: Sumit Saxena <sumit.saxena@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=342069
* This patch will increase debug level as current logging level hasKashyap D Desai2018-12-141-1/+2
| | | | | | | | | | | | | very minimal prints and even few important messages will not get logged. Submitted by: Sumit Saxena <sumit.saxena@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=342068
* Change IOC INIT wait time to 180 secs to keep it inline with timeoutKashyap D Desai2018-12-142-2/+1
| | | | | | | | | | | | | used by internal DCMDs. Submitted by: Sumit Saxena <sumit.saxena@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=342067
* This patch will add support for NVME PRPs creation by driver for fastpathKashyap D Desai2018-12-144-38/+312
| | | | | | | | | | | | | | | | | | capable IOs. NVME specification supports specific type of scatter gather list called as PRP (Physical Region Page) for IO data buffers. Since NVME drive is connected behind SAS3.5 tri-mode adapter, MegaRAID driver/firmware has to convert OS SGLs in native NVMe PRP format. For IOs sent to firmware, MegaRAID firmware does this job of OS SGLs to PRP translation and send PRPs to backend NVME device. For fastpath IOs, driver will do this OS SGLs to PRP translation. Submitted by: Sumit Saxena <sumit.saxena@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=342066
* This patch will add support for new DCMD to get PD information and a single ↵Kashyap D Desai2018-12-142-4/+400
| | | | | | | | | | | | | | | data structure to specify LD and JBOD. Submitted by: Sumit Saxena <sumit.saxena@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=342065
* To improve RAID 1/10 Write performance, OS drivers need to issue theKashyap D Desai2018-12-144-95/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | required Write IOs as Fast Path IOs (after the appropriate checks allowing Fast Path to be used) to the appropriate physical drives (translated from the OS logical IO) and wait for all Write IOs to complete. Design: A write IO on RAID volume will be examined if it can be sent in Fast Path based on IO size and starting LBA and ending LBA falling on to a Physical Drive boundary. If the underlying RAID volume is a RAID 1/10, driver issues two fast path write IOs one for each corresponding physical drive after computing the corresponding start LBA for each physical drive. Both write IOs will have the same payload and are posted to HW such that replies land in the same reply queue. If there are no resources available for sending two IOs, driver will send the original IO from upper layer to RAID volume through the Firmware. When both IOs are completed by HW, the resources will be released and SCSI IO completion handler will be called. Submitted by: Sumit Saxena <sumit.saxena@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=342064
* Detect sequential Write IOs and pass the hint that it is part of sequentialKashyap D Desai2018-12-144-2/+159
| | | | | | | | | | | | | | | | | | | | | | stream to help HBA Firmware do the Full Stripe Writes. For read IOs on certain RAID volumes like Read Ahead volumes,this will help driver to send it to Firmware even if the IOs can potentially be sent to hardware directly (called fast path) bypassing firmware. Design: 8 streams are maintained per RAID volume as per the combined firmware/driver design. When there is no stream detected the LRU stream is used for next potential stream and LRU/MRU map is updated to make this as MRU stream. Every time a stream is detected the MRU map is updated to make the current stream as MRU stream. Submitted by: Sumit Saxena <sumit.saxena@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=342063
* This patch will add new interface to support more than 256 JBODs.Kashyap D Desai2018-12-143-3/+32
| | | | | | | | | | | Submitted by: Sumit Saxena <sumit.saxena@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=342062
* This patch will add support for divert bitmap in RAID map. Divert bitmap is ↵Kashyap D Desai2018-12-144-63/+170
| | | | | | | | | | | | | | | supported for SAS3.5 adapters only. Submitted by: Sumit Saxena <sumit.saxena@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=342061
* This patch will add support for new Dynamic RaidMap to have different sizesKashyap D Desai2018-12-143-36/+327
| | | | | | | | | | | | | for different number of supported VDs for SAS3.5 MegaRAID adapters. Submitted by: Sumit Saxena <sumit.saxena@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=342060
* This patch will add support for next generation(SAS3.5) of Tri mode(SAS, ↵Kashyap D Desai2018-12-144-21/+64
| | | | | | | | | | | | | | | SATA, NVMe) MegaRAID adapters. Submitted by: Sumit Saxena <sumit.saxena@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=342059
* Use plain atomic_{add,subtract} when that's sufficient.Mark Johnston2018-11-061-2/+2
| | | | | | | | CID: 1386920 MFC after: 2 weeks Notes: svn path=/head/; revision=340192
* mrsas(4): Remove unneed extra arg from MR_LdBlockSizeGet().Eitan Adler2018-05-231-3/+2
| | | | | | | Obtained From: DragonFly (482292f9859e1ceae4f35343c0a8eac4c4486d1) Notes: svn path=/head/; revision=334076
* Move most of the contents of opt_compat.h to opt_global.h.Brooks Davis2018-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options. Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h is created on all architectures. Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the set of compiled files. Reviewed by: kib, cem, jhb, jtl Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14941 Notes: svn path=/head/; revision=332122
* Revert r327828, r327949, r327953, r328016-r328026, r328041:Pedro F. Giffuni2018-01-211-2/+1
| | | | | | | | | | | | | | | | | | 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-1/+2
| | | | | | | | | | | | | | 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 a typo introduced in r306024.Jung-uk Kim2017-01-231-1/+1
| | | | Notes: svn path=/head/; revision=312672
* Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)Alan Somers2017-01-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are fixed-length strings. AFAICT the only place they're read is in sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated. However, the kernel doesn't null-terminate them. A bunch of copy-pasted code uses strncpy to write them, and doesn't guarantee null-termination. For at least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually overflows. You can see the result by doing "camcontrol negotiate da0 -v". This change null-terminates those fields everywhere they're set in the kernel. It also shortens a few strings to ensure they'll fit within the 16-character field. PR: 215474 Reported by: Coverity CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005 CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000 CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014 CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021 CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027 CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187 CID: 1010035 1010036 1010042 1010041 1010040 1010039 Reviewed by: imp, sephe, slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9037 Differential Revision: https://reviews.freebsd.org/D9038 Notes: svn path=/head/; revision=311305
* This patch upgrades driver version to 06.712.04.00-fbsdKashyap D Desai2016-11-291-1/+1
| | | | | | | | | | Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies Notes: svn path=/head/; revision=309294
* This patch will add code to refire IOCTL commands after OCR.Kashyap D Desai2016-11-291-1/+22
| | | | | | | | | | Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies Notes: svn path=/head/; revision=309293
* This patch will unblock SYNCHRONIZE_CACHE command to firmware, i.e. don't ↵Kashyap D Desai2016-11-293-2/+24
| | | | | | | | | | | | | | | | | | block the SYNCHRONIZE_CACHE command at driver instead of passing it to firmware for all Gen3 controllers. For Thunderbolt controller, keep the legacy behavior i.e. return the SYNCHRONIZE_CACHE command with success status from driver itself. There is Sysctl parameter 'block_sync_cache' is provided to enable customers either to block/unblock these commands to facilitate legacy behavior if there is a compatibility issue. Default value for module parameter is to unblock this command. Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies Notes: svn path=/head/; revision=309292
* Wait for AEN task to be completed(if in queue) before resetting the controllerKashyap D Desai2016-11-291-15/+15
| | | | | | | | | | | | and return without processing event in AEN thread, if controller reset is in progress. Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies Notes: svn path=/head/; revision=309291
* This patch will add task management support in driver. Below is high level ↵Kashyap D Desai2016-11-293-56/+494
| | | | | | | | | | | | | | | | description: If a SCSI IO times out, then before initiating OCR, now the driver will try to send a target reset to the particular target for which the IO is timed out. If that also fails, then the driver will initiate OCR. Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies Notes: svn path=/head/; revision=309290
* Process outstanding reply descriptors from all the reply descriptor post ↵Kashyap D Desai2016-11-291-0/+5
| | | | | | | | | | | | queues before initiating OCR. Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies Notes: svn path=/head/; revision=309289
* Clean up reference to AEN command if abort AEN is succesful as the command ↵Kashyap D Desai2016-11-291-1/+2
| | | | | | | | | | | | | | is aborted. Did the same by setting sc->aen_cmd = NULL when aborting AEN is successful. Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies Notes: svn path=/head/; revision=309288
* Update controller properties(read OCR capability bit) when ↵Kashyap D Desai2016-11-292-6/+16
| | | | | | | | | | | | MR_EVT_CTRL_PROP_CHANGED recieved. Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies Notes: svn path=/head/; revision=309287
* Add sanity check in IO and IOCTL path not to process command further if ↵Kashyap D Desai2016-11-292-2/+15
| | | | | | | | | | | | | | controller is in HW_CRITICAL_ERROR. Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies Notes: svn path=/head/; revision=309286
* Use a variable to indicate Gen3 controllers and remove all PCI ids basedKashyap D Desai2016-11-294-86/+23
| | | | | | | | | | | | checks used for gen3 controllers. Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies Notes: svn path=/head/; revision=309285
* Problem statement:Kashyap D Desai2016-11-293-33/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | MFI linked list in megaraid_sas driver is used for mfi-mpt pass-through commands. This list can be corrupted due to many possible race conditions in driver and eventually we may see kernel panic. One example - MFI frame is freed from calling process as driver send command via polling method and interrupt for that command comes after driver free mfi frame (actually even after some other context reuse the mfi frame). When driver receive MPT frame in ISR, driver will be using the index of MFI and access that MFI frame and finally in-used MFI frames list will be corrupted. High level description of new solution - Free MFI and MPT command from same context. Free both the command either from process (from where mfi-mpt pass-through was called) or from ISR context. Do not split freeing of MFI and MPT, because it creates the race condition which will do MFI/MPT list. Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: Broadcom Limited/AVAGO Technologies Notes: svn path=/head/; revision=309284
* mrsas: update for sys/capability.h rename in r263232Ed Maste2016-09-201-2/+4
| | | | Notes: svn path=/head/; revision=306024
* Added support for Avago/Broadcom Cutlass(12 Gbps- 16 port count) controllers.Kashyap D Desai2016-06-024-13/+43
| | | | | | | | | | Submitted by: Sumit Saxena <Sumit.Saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: AVAGO/BROADCOM Limited Notes: svn path=/head/; revision=301203
* Version update patch.Kashyap D Desai2016-05-131-1/+1
| | | | | | | | | | Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: AVAGO Technologies Notes: svn path=/head/; revision=299672
* Following bugs fixed as part of this patch:Kashyap D Desai2016-05-134-17/+36
| | | | | | | | | | | | | | .Kernel panic while collecting kdump (reported by Doug A.) .NULL pointer dereference at sertain places .Removed dead codes Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: AVAGO Technologies Notes: svn path=/head/; revision=299671
* Added supprot for Avago Intruder controller.Kashyap D Desai2016-05-134-13/+53
| | | | | | | | | | Submitted by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> MFC after: 3 days Sponsored by: AVAGO Technologies Notes: svn path=/head/; revision=299670