summaryrefslogtreecommitdiffstats
path: root/sys/dev/mfi/mfi.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r284180:ambrisko2015-06-151-1/+3
| | | | | Switch from make_dev_alias to make_dev_alias_p since make_dev_alias_p can gracefully fail if the /dev/megaraid_sas_ioctl_node symlink already exists.
* MFC r266848:kib2014-06-051-6/+12
| | | | Add support for the unmapped i/o to mfi(4).
* Remove forced timeout of in-flight commands from mfi_timeout.smh2013-07-011-5/+8
| | | | | | | | | | | | | | | While this prevents commands getting stuck forever there is no way to guarantee that data from the command hasn't been committed to the device. In addition older mfi firmware has a bug that would cause the controller to frequently stall IO for over our timeout value, which when combined with a forced timeout often resulted in panics in UFS; which would otherwise be avoided when the command eventually completed if left alone. For reference this timeout issue is resolved in Dell FW package 21.2.1-0000. Fixed FW package version for none Dell controller will likely vary. MFC after: 2 days
* Fix a typo in mfi_stp_cmd() that would give wrong assignment.delphij2013-03-011-1/+1
| | | | | | Submitted by: Sascha Wildner <saw online de> Obtained from: DragonFly rev 0dc98fff2206d7bb78ce5e07ac34d6954e4bd96a MFC after: 3 days
* Adds hw.mfi.cmd_timeout loader / sysctl tuneable which controls the defaultsmh2013-02-271-5/+11
| | | | | | | | timeout used in the mfi driver. This is useful for long running commands such as secure erase. Reviewed by: John Baldwin Approved by: pjd (mentor)
* Fixes queuing issues where mfi_release_command blindly sets the cm_flags = 0smh2013-02-271-116/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | without first removing the command from the relavent queue. This was causing panics in the queue functions which check to ensure a command is not on another queue. Fixed some cases where the error from mfi_mapcmd was lost and where the command was never released / dequeued in error cases. Ensure that all failures to mfi_mapcmd are logged. Fixed possible null pointer exception in mfi_aen_setup if mfi_get_log_state failed. Fixed mfi_parse_entries & mfi_aen_setup not returning possible errors. Corrected MFI_DUMP_CMDS calls with invalid vars SC vs sc. Commands which have timed out now set cm_error to ETIMEDOUT and call mfi_complete which prevents them getting stuck in the busy queue forever. Fixed possible use of NULL pointer in mfi_tbolt_get_cmd. Changed output formats to be more easily recognisable when debugging. Optimised mfi_cmd_pool_tbolt cleanup. Made information about driver limiting commands always display as for modern cards this can be severe. Fixed mfi_tbolt_alloc_cmd out of memory case which previously didnt return an error. Added malloc checks for request_desc_pool including free when subsiquent errors are detected. Fixed overflow error in SIMD reply descriptor check. Fixed tbolt_cmd leak in mfi_build_and_issue_cmd if there's an error during IO build. Elimintated double checks on sc->mfi_aen_cm & sc->mfi_map_sync_cm in mfi_shutdown. Move local hdr calculation after error check in mfi_aen_complete. Fixed wakeup on NULL in mfi_aen_complete. Fixed mfi_aen_cm cleanup in mfi_process_fw_state_chg_isr not checking if it was NULL. Changed mfi_alloc_commands to error if bus_dmamap_create fails. Previously we would try to continue with the number of allocated commands but lots of places in the driver assume sc->mfi_max_fw_cmds is whats available so its unsafe to do this without lots of changes. Removed mfi_total_cmds as its no longer used due the above change. Corrected mfi_tbolt_alloc_cmd to return ENOMEM where appropriate. Fixed timeouts actually firing at double what they should. Setting hw.mfi.max_cmds=-1 now configures to use the controller max. A few style (9) fixes e.g. braced single line conditions and double blank lines Cleaned up queuing macros Removed invalid queuing tests for multiple queues Trap and deal with errors when doing sends in mfi_data_cb Refactored frame sending into one method with error checking of the return code so we can ensure commands aren't left on the queue after error. This ensures that mfi_mapcmd & mfi_data_cb leave the queue in a valid state. Refactored how commands are cleaned up, mfi_release_command now ensures that all queues and command state is maintained in a consistent state. Prevent NULL pointer use in mfi_tbolt_complete_cmd Fixed use of NULL sc->mfi_map_sync_cm in wakeup Added defines to help with output of mfi_cmd and header flags. Fixed mfi_tbolt_init_MFI_queue invalidating cm_index of the acquired mfi_cmd. Reset now reinitialises sync map as well as AEN. Fixed possible use of NULL pointer in mfi_build_and_issue_cmd Fixed mfi_tbolt_init_MFI_queue call to mfi_process_fw_state_chg_isr causing panic on failure. Ensure that tbolt cards always initialise next_host_reply_index and free_host_reply_index (based off mfi_max_fw_cmds) on both startup and reset as per the linux driver. Fixed mfi_tbolt_complete_cmd not acknowledging unknown commands so it didn't clear the controller. Prevent locks from being dropped and re-acquired in the following functions which was allowing multiple threads to enter critical methods such as mfi_tbolt_complete_cmd & mfi_process_fw_state_chg_isr:- * mfi_tbolt_init_MFI_queue * mfi_aen_complete / mfi_aen_register * mfi_tbolt_sync_map_info * mfi_get_log_state * mfi_parse_entries The locking for these functions was promoting to higher level methods. This also fixed MFI_LINUX_SET_AEN_2 which was already acquiring the lock, so would have paniced for recursive lock. This also required changing malloc of ld_sync in mfi_tbolt_sync_map_info to M_NOWAIT which can hence now fail but this was already expected as its return was being tested. Removed the assignment of cm_index in mfi_tbolt_init_MFI_queue which breaks the world if the cmd returned by mfi_dequeue_free isn't the first cmd. Fixed locking in mfi_data_cb, this is an async callback from bus_dmamap_load which could hence be called after the caller has dropped the lock. If we don't have the lock we aquire it and ensure we unlock before returning. Fixed locking mfi_comms_init when mfi_dequeue_free fails. Fixed mfi_build_and_issue_cmd not returning tbolt cmds aquired to the pool on error. Fixed mfi_abort not dropping the io lock when mfi_dequeue_free fails. Added hw.mfi.polled_cmd_timeout sysctl that enables tuning of polled timeouts. This shouldn't be reduced below 50 seconds as its used for firmware patching which can take quite some time. Added hw.mfi.fw_reset_test sysctl which is avaliable when compiled with MFI_DEBUG and allows the testing of controller reset that was provoking a large number of the issues encountered here. Reviewed by: Doug Ambrisko Approved by: pjd (mentor) MFC after: 1 month
* Fixes mfi panic on recused on non-recusive mutex MFI I/O locksmh2013-02-271-3/+1
| | | | | | | | | | Removes a mtx_unlock call for mfi_io_lock which is never aquired While I'm here fix a braceing style issue. Reviewed by: Doug Ambrisko Approved by: pjd (mentor) MFC after: 1 month
* Reform the busdma API so that new types may be added without modifyingkib2013-02-121-2/+8
| | | | | | | | | | | | | | | | | | | | | every architecture's busdma_machdep.c. It is done by unifying the bus_dmamap_load_buffer() routines so that they may be called from MI code. The MD busdma is then given a chance to do any final processing in the complete() callback. The cam changes unify the bus_dmamap_load* handling in cam drivers. The arm and mips implementations are updated to track virtual addresses for sync(). Previously this was done in a type specific way. Now it is done in a generic way by recording the list of virtuals in the map. Submitted by: jeff (sponsored by EMC/Isilon) Reviewed by: kan (previous version), scottl, mjacob (isp(4), no objections for target mode changes) Discussed with: ian (arm changes) Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
* Add support for SCSI pass through devices to be attached andambrisko2012-11-081-0/+5
| | | | | | | detached. PR: 172864 Submitted by: rstone@
* - Extend the prior commit to use the generic SCSI command buildingambrisko2012-11-061-53/+97
| | | | | | | | | | | | | | | | | | | | | | function use that for JBOD and Thunderbolt disk write command. Now we only have one implementation in mfi. - Fix dumping on Thunderbolt cards. Polled IO commands do not seem to be normally acknowledged by changing cmd_status to MFI_STAT_OK. In order to get acknowledgement of the IO is complete, the Thunderbolt command queue needs to be run through. I added a flag MFI_CMD_SCSI to indicate this command is being polled and to complete the Thunderbolt wrapper and indicate the result. This flag needs to be set in the JBOD case in case if that us using Thunderbolt card. When in the polling loop check for completed commands. - Remove mfi_tbolt_is_ldio and just do the check when needed. - Fix an issue when attaching of disk device happens when a device is already scheduled to be attached but hasn't attached. - add a tunable to allow raw disk attachment to CAM via: hw.mfi.allow_cam_disk_passthrough=1 - fixup aborting of commands (AEN and LD state change). Use a generic abort function and only wait the command being aborted not both. Thunderbolt cards don't seem to abort commands so the abort times out.
* Copy code from scsi_read_write() as mfi_build_syspd_cdb() to build SCSIdelphij2012-11-021-26/+82
| | | | | | | | | | | command properly. Without this change, mfi(4) always sends 10 byte READ and WRITE commands, which will cause data corruption when device is larger than 2^32 sectors. PR: kern/173291 Submitted by: Steven Hartland <steven.hartland multiplay.co.uk> Reviewed by: mav MFC after: 2 weeks
* Grab the mfi_config_lock while performing a MFI_DCMD_CFG_FOREIGN_IMPORTjhb2012-09-261-0/+1
| | | | | | | request on behalf of a user utility. Submitted by: Steven Hartland killing multiplay co uk MFC after: 1 week
* Fix panics triggered by older mfiutil binaries run on the new mfi(4) driver.jhb2012-07-031-4/+8
| | | | | | | | | | | | | | | | | | | The new driver changed the size of the mfi_dcmd_frame structure in such a way that a MFI_IOC_PASSTHRU ioctl from an old amd64 binary is treated as an MFI_IOC_PASSTHRU32 ioctl in the new driver. As a result, the user pointer is treated as the buffer length. mfi_user_command() doesn't have a bounds check on the buffer length, so it passes a really big value to malloc() which panics when it tries to exhaust the kmem_map. Fix this two ways: - Only honor MFI_IOC_PASSTHRU32 if the binary has the SV_ILP32 flag set, otherwise treat it as an unknown ioctl. - Add a bounds check on the buffer length passed by the user. For now it fails any user attempts to use a buffer larger than 1MB. While here, fix a few other nits: - Remove an unnecessary check for a NULL return from malloc(M_WAITOK). - Use the ENOTTY errno for invalid ioctl commands instead of ENOENT. MFC after: 3 days
* Some style improvements.ambrisko2012-05-041-5/+6
|
* First fix pr 167226:ambrisko2012-05-041-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ThunderBolt cannot read sector >= 2^32 or 2^21 with supplied patch. Second the bigger change, fix RAID operation on ThunderBolt base card such as physically removing a disk from a RAID and replacing it. The current situation is the RAID firmware effectively hangs waiting for an acknowledgement from the driver. This is due to the firmware support of the driver actually accessing the RAID from under the firmware. This is an interesting feature that the FreeBSD driver does not use. However, when the firmare detects the driver has attached it then expects the driver will synchronize LD's with the firmware. If the driver does not sync. then the management part of the firmware will hang waiting for it so a pulled driver will listed as still there. The fix for this problem isn't extremely difficult. However, figuring out why some of the code was the way it was and then redoing it was involved. Not have a spec. made it harder to try to figure out. The existing driver would send a MFI_DCMD_LD_MAP_GET_INFO command in write mode to acknowledge a LD state change. In read mode it gets the RAID map from the firmware. The FreeBSD driver doesn't do that currently. It could be added in the future with the appropriate structures. To simplify things, get the current LD state and then build the MFI_DCMD_LD_MAP_GET_INFO/write command so that it sends an acknowledgement for each LD. The map would probably state which LD's changed so then the driver could probably just acknowledge the LD's that changed versus all. This doesn't seem to be a problem. When a MFI_DCMD_LD_MAP_GET_INFO/write command is sent to the firmware, it will complete later when a change to the LD's happen. So it is very much like an AEN command returning when something happened. When the MFI_DCMD_LD_MAP_GET_INFO/write command completes, we refire the sync'ing of the LD state. This needs to be done in as an event so that MFI_DCMD_LD_GET_LIST can wait for that command to complete before issuing the MFI_DCMD_LD_MAP_GET_INFO/write. The prior code didn't use the call-back function and tried to intercept the MFI_DCMD_LD_MAP_GET_INFO/write command when processing an interrupt. This added a bunch of code complexity to the interrupt handler. Using the call-back that is done for other commands got rid of this need. So the interrupt handler is greatly simplified. It seems that even commands that shouldn't be acknowledged end up in the interrupt handler. To deal with this, code was added to check to see if a command is in the busy queue or not. This might have contributed to the interrupt storm happening without MSI enabled on these cards. Note that MFI_DCMD_LD_MAP_GET_INFO/read returns right away. It would be interesting to see what other complexity could be removed from the ThunderBolt driver that really isn't needed in our mode of operation. Letting the RAID firmware do all of the I/O to disks is a lot faster since it can use its caches. It greatly simplifies what the driver has to do and potential bugs if the driver and firmware are not in sync. Simplify the aen_abort/cm_map_abort and put it in the softc versus in the command structure. This should get merged to 9 before the driver is merged to 8. PR: 167226 Submitted by: Petr Lampa MFC after: 3 days
* MFhead_mfi r227068ambrisko2012-03-301-217/+1228
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-177/+1170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add single-message MSI support to mfi(4). It is disabled by default butjhb2011-11-161-9/+2
| | | | | | | | | | | | | | | | 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
* | Do a dummy read to flush the interrupt ACK that we just performed,delphij2011-11-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | ensuring that everything is really, truly consistent. This fixes certain cases where one will see various: mfi0: COMMAND 0xffffffXXXXXXXXXX TIMEOUT AFTER XX SECONDS MFC after: 3 days Submitted by: scottl Ok'ed by: jhb
* | Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-071-1/+1
|/ | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
* - Add special support for the MFI_CMD ioctl with MFI_CMD_STP command, usedmav2011-09-291-40/+63
| | | | | | | | | | | by present MegaCLI version. It has some special meaning for the first s/g list entry, while the main s/g list begins from the the second entry, and those lists should remain separate after loading to the busdma map. - Fix bug in 32bit ioctl compatibility shims when s/g list consists of more then on element. Sponsored by: iXsystems, inc. MFC after: 3 days
* In order to maximize the re-usability of kernel code in user space thiskmacy2011-09-161-1/+1
| | | | | | | | | | | | | patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
* Shorten a variable access some using a cached value rather thanbz2011-09-071-2/+1
| | | | | | | | casting the input argument again, making the code more readable. Reviewed by: jhb MFC after: 2 weeks Approved by: re (kib)
* Support controllers whose option ROM is disabled in the BIOS by kickingjhb2011-07-141-2/+6
| | | | | | | | | the firmware so that it boots. PR: kern/154978 Submitted by: Andrew Boyer aboyer of averesystems com Obtained from: LSI MFC after: 1 week
* Use MFI_STAT_* constants for cmd_status field values rather than magicjhb2011-07-141-5/+6
| | | | | | | | numbers in a few places. PR: bin/145960 Submitted by: gcooper MFC after: 1 week
* There are a couple of structs in mfireg.h with members named 'class'.emaste2011-06-021-9/+9
| | | | | | | | | | These cause problems when trying to include the header in a C++ project. Rename them to 'evt_class', and track the change in mfi and mfiutil. Submitted by: Mark Johnston Sponsored by: Sandvine Incorporated Reviewed by: jhb@ MFC after: 1 week
* Revert r200231. It was already taken cared by jhb long ago.jkim2009-12-071-16/+3
| | | | | Pointed out by: jhb Pointy hat: jkim
* Make mfi(4) little bit less chatty.jkim2009-12-071-3/+16
|
* Temporarily revert the new-bus locking for 8.0 release. It will bejhb2009-08-201-13/+7
| | | | | | reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio
* Make the newbus subsystem Giant free by adding the new newbus sxlock.attilio2009-08-021-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races. Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped. For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens. Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing. Bump __FreeBSD_version in order to reflect the newbus lock introduction. Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra <giovanni dot trematerra at gmail dot com>, Brandon Gooch <jamesbrandongooch at gmail dot com> Sponsored by: Yahoo! Incorporated Approved by: re (ksmith)
* Separate the parallel scsi knowledge out of the core of the XPT, andscottl2009-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modularize it so that new transports can be created. Add a transport for SATA Add a periph+protocol layer for ATA Add a driver for AHCI-compliant hardware. Add a maxio field to CAM so that drivers can advertise their max I/O capability. Modify various drivers so that they are insulated from the value of MAXPHYS. The new ATA/SATA code supports AHCI-compliant hardware, and will override the classic ATA driver if it is loaded as a module at boot time or compiled into the kernel. The stack now support NCQ (tagged queueing) for increased performance on modern SATA drives. It also supports port multipliers. ATA drives are accessed via 'ada' device nodes. ATAPI drives are accessed via 'cd' device nodes. They can all be enumerated and manipulated via camcontrol, just like SCSI drives. SCSI commands are not translated to their ATA equivalents; ATA native commands are used throughout the entire stack, including camcontrol. See the camcontrol manpage for further details. Testing this code may require that you update your fstab, and possibly modify your BIOS to enable AHCI functionality, if available. This code is very experimental at the moment. The userland ABI/API has changed, so applications will need to be recompiled. It may change further in the near future. The 'ada' device name may also change as more infrastructure is completed in this project. The goal is to eventually put all CAM busses and devices until newbus, allowing for interesting topology and management options. Few functional changes will be seen with existing SCSI/SAS/FC drivers, though the userland ABI has still changed. In the future, transports specific modules for SAS and FC may appear in order to better support the topologies and capabilities of these technologies. The modularization of CAM and the addition of the ATA/SATA modules is meant to break CAM out of the mold of being specific to SCSI, letting it grow to be a framework for arbitrary transports and protocols. It also allows drivers to be written to support discrete hardware without jeopardizing the stability of non-related hardware. While only an AHCI driver is provided now, a Silicon Image driver is also in the works. Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware is possible and encouraged. Help with new transports is also encouraged. Submitted by: scottl, mav Approved by: re
* fw_state ad cur_state are holding unsigned bitfields, so declare thenscottl2009-06-241-1/+1
| | | | | | as unsigned as well. Submitted by: rdivacky
* We no longer need to use d_thread_t, migrate to struct thread *.imp2009-05-201-5/+5
|
* Change Dell's gen2 catch-all from Dell PERC H700/H800 to Dell PERC Gen2ambrisko2008-12-151-1/+2
| | | | | | and bump the driver version from 2 to 3 and fix the related style problem. Suggested by: LSI
* Fix compile. I was in the wrong tree when I tested it :-(ambrisko2008-11-141-2/+2
| | | | Pointed out by: Andrzej
* When running a 32bit app. on amd64, ensure the bits above 32bitambrisko2008-11-141-0/+15
| | | | are zero for the copyout. Confirmed by LSI.
* One more piece to add to make sense data work for a user app. from LSI.ambrisko2008-11-131-0/+10
| | | | | Submitted by: LSI MFC after: 3 days
* - Fix from jhb for failing I/O request when bus_dmamap_load fails.ambrisko2008-11-121-24/+48
| | | | | | | | | | | | | | - 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
* Fix style nit: s/^ }/}/ in two places.imp2008-08-231-2/+2
|
* Tweak the output of event log messages from the controller:jhb2008-06-261-283/+48
| | | | | | | | | | | - Each log entry contains a text description in the "description" field of the entry. The existing decode logic always ended up duplicating information that was already in the description string. This made the logs overly verbose. Now we just print out the description string. - Add some simple parsing of the timestamp and event classes. Reviewed by: ambrisko, scottl MFC after: 2 weeks
* Adjust the handling of pending log events during boot:jhb2008-06-261-50/+75
| | | | | | | | | | | | | | | | | - Fetch events from the controller in batches of 15 rather than a single event at a time. - When fetching events from the controller, honor the event class and locale settings (via hw.mfi tunables). This also allows the firmware to skip over unwanted log entries resulting in fewer requests to the controller if there many unwanted log entries since the last clean shutdown. - Don't drop the driver mutex while decoding an event. - If we get an error other than MFI_STAT_NOT_FOUND (basically EOF for hitting the end of the event log) then emit a warning and bail on processing further log entries. Reviewed by: ambrisko, scottl MFC after: 2 weeks
* Add support to talk to the LSI ioctl path on with FreeBSD 32 bit app'sambrisko2008-05-281-0/+42
| | | | | | | | | | | on amd64. Note the only difference is the iovec32 part so I use the native structure for everything else. Also I plan to MFC all the changes in -current to 7-stable and 6-stable shortly since I've been running them. This does not include the cam changes. MFC after: 3 days
* Add support for management apps. Work around an apparent firmware bug thatscottl2008-05-121-8/+108
| | | | results in hung i/o if more than 128 commands are scheduled for an array.
* Replace callout_init(..., 1) with callout_init(..., CALLOUT_MPSAFE) forkris2008-04-161-1/+1
| | | | | | | better grep-compliance and to standardize with the rest of the kernel. Reviewed by: jhb MFC after: 1 week
* Add in a compat. mode so you can either open the card's deviceambrisko2008-03-221-0/+9
| | | | | node or directly open mfi0 and specify the card you want to talk to in the ioctl.
* Fix some bugs in dealing with DCMD'd without data. MegaCli was sendingambrisko2008-02-021-58/+92
| | | | | | | | | down some DCMD's without any data. Thanks to Dell and LSI for helping to provide clues to figure out this problem. Now MegaCli can upgrade the firmware and should work identical when run on Linux. Reviewed by: scottl, LSI MFC after: 1 day
* I incorrectly assumed the log buffer started from the beginning when itambrisko2007-12-191-7/+3
| | | | | | is actually a circular log. Deal with it rolling around. Fortunately, the log area is big and I haven't seen any roll over yet. Update and get rid of the obsolete comment.
* Update the MFI driver to support new "1078" series of hardware. Thisscottl2007-08-251-21/+120
| | | | | | | | 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-2/+8
| | | | | | | | | | - 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-22/+155
| | | | | | | | applications to add and remove volumes. MFC after: 1 week Approved by: re (bmah) Reviewed by: ambrisko, scottl
OpenPOWER on IntegriCloud