summaryrefslogtreecommitdiffstats
path: root/sys/dev/mpt
Commit message (Collapse)AuthorAgeFilesLines
* Make the whole initiator mode part of mpt(4) endian-clean,marius2009-01-075-37/+223
| | | | | | | | | | | | | | | | | | | specifically SPI controllers now also work in big-endian machines and some conversions relevant for FC and SAS controllers as well as support for ILP32 machines which all were omitted in previous attempts are now also implemented. The IOCTL-interface is intentionally left (and where needed actually changed) to be completely little-endian as otherwise we would have to add conversion code for every possible configuration page to mpt(4), which didn't seem the right thing to do, neither did converting only half of the user- interface to the native byte order. This change was tested on amd64 (SAS+SPI), i386 (SAS) and sparc64 (SAS+SPI). Due to lack of the necessary hardware the target mode code is still left to be made endian-clean. Reviewed by: scottl MFC after: 1 month
* Allocate a single CCB at the start of the main loop of the RAID monitoringjhb2008-07-211-4/+4
| | | | | | | | | | kthread of the mpt(4) driver that hangs around for the entire lifetime of the thread. Previously the driver would allocate a new CCB using M_WAITOK with a lock held each time it updated its state. While here, use the CAM API for allocating a CCB rather than raw malloc(9). Reviewed by: scottl MFC after: 1 week
* Rework how the mpt_user personality handles buffers for config pages.jhb2008-07-011-67/+105
| | | | | | | | | | | | | | Previously we reused the space in the request buffer after the request header to hold config pages during a transaction. This does not work when reading large pages however. Also, we were already malloc'ing a buffer to do a copyin/copyout w/o holding locks that was then copied into/out of the request buffer. Instead, go ahead and use bus dma to alloc a buffer for each config page request (and RAID actions that have an associated ActionSGE). This results in fewer data copies and allows for larger sized requests. For now the maximum size of a request is arbitrarily limited to 16 MB. MFC after: 2 weeks
* During shutdown, deregister the shutdown hook from the correct eventjhb2008-07-011-1/+1
| | | | | | handler. MFC after: 2 weeks
* Add support for LSI 1078DE (ServeRAID-AR10is SAS/SATAdelphij2008-05-101-0/+6
| | | | | | Controller) MFC after: 2 weeks
* Add a new personality to mpt(4) devices to allow userland applications tojhb2008-05-062-0/+758
| | | | | | | | | perform various operations on a controller. Specifically, for each mpt(4) device, create a character device in devfs which accepts ioctl requests for reading and writing configuration pages and performing RAID actions. MFC after: 1 week Reviewed by: scottl
* Restore multi-release tradition of the driver.jkim2008-05-023-7/+20
| | | | Reviewed by: mjacob
* Don't force a reset at driver attach time. It doesn't work on somescottl2008-04-031-1/+1
| | | | adapters, apparently.
* The MPT driver treats the "core" module with the same importance andscottl2008-03-311-4/+7
| | | | | | | | | | | | | | | | abstraction as the RAID and CAM modules, making it nearly impossible for enough initialization to be done in time for the RAID module to know whether to attach. On top of this, no reset was being done on the controller on attach, in violation of the spec. Additionally, the port enable step was being deferred to the end of the attach process, long after it should have been done to ensure reliable operation from the controller. Fix all of these with a few hacks to force the "attach" and "enable" steps of the core module early on, and ensure that a reset and port enable also happens early on. In the future, the driver needs to be refactored to eliminate the core module abstraction, clean up withe reset/enable steps, and defer event messages until all of the modules are available to recieve them.
* Ever since the module registration system was introduced to this driver,scottl2007-11-031-1/+2
| | | | | | it's been printing out scary messages about "Unhanded Event Notify Frame" that are needlessly worrisome to users. Change this warning to only print out at an elevated debugging level.
* fix up some code for older systems changed by accident in the last commitjulian2007-10-211-1/+6
| | | | | this whole support for systems earlier than 5.0 should probably be removed but I'll at least FIX it before removing it, so that CVS has it right.
* Rename the kthread_xxx (e.g. kthread_create()) callsjulian2007-10-203-4/+4
| | | | | | | | | | | to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls.
* For some blasted reason the SATA WC change frees a structure right in thescottl2007-10-121-1/+0
| | | | middle of using it.
* Spelling fix for interupt -> interruptkevlo2007-10-121-3/+3
|
* Fix an incorrect PCI device id. The current value conflicts withambrisko2007-09-181-1/+1
| | | | | | | | | | the mfi(4) LSI MegaSAS RAID card. Looking at the Linux driver for the mpt(4) it should be 0x0062 and not 0x0060. Tested with an mfi card of this device id. Approved by: re (bmah) Reviewed by: scottl MFC after: 3 days
* Move callout initialization to the proper spot. This prevents panics duringscottl2007-08-143-8/+1
| | | | | | | error recovery. Approved by: re Found by: kan
* Fix some debugging code that crept in accidentally.scottl2007-06-181-3/+3
|
* Prepare for future integration between CAM and newbus. xpt_bus_registerscottl2007-06-171-5/+5
| | | | | | | now takes a device_t to be the parent of the bus that is being created. Most SIMs have been updated with a reasonable argument, but a few exceptions just pass NULL for now. This argument isn't used yet and the newbus integration likely won't be ready until after 7.0-RELEASE.
* Track an update in the MPI headers that was missed earlier.scottl2007-06-041-1/+1
|
* Free the portinfo object on unload.scottl2007-06-041-0/+4
|
* mpt.c:scottl2007-06-033-32/+514
| | | | | | | | | | | | | | | | | | | | | | | | | mpt.h: Add support for reading extended configuration pages. mpt_cam.c: Do a top level topology scan on the SAS controller. If any SATA device are discovered in this scan, send a passthrough FIS to set the write cache. This is controllable through the following tunable at boot: hw.mpt.enable_sata_wc: -1 = Do not configure, use the controller default 0 = Disable the write cache 1 = Enable the write cache The default is -1. This tunable is just a hack and may be deprecated in the future. Turning on the write cache alleviates the write performance problems with SATA that many people have observed. It is not recommend for those who value data reliability! I cannot stress this strongly enough. However, it is useful in certain circumstances, and it brings the performence in line with what a generic SATA controller running under the FreeBSD ATA driver provides (and the ATA driver has had the WC enabled by default for years).
* Update to MPI 1.5.16scottl2007-06-039-456/+589
|
* Make this driver MP safe and still be a multi-release driver.mjacob2007-05-056-129/+150
| | | | | Obtained from: 99% of the work done by Scott Long. MFC after: 3 days
* Revert a driver API change to xpt_alloc_ccb that isn't necessary. Fix ascottl2007-04-181-5/+3
| | | | couple of associated error checks.
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willscottl2007-04-151-5/+7
| | | | | | | | | | | use to synchornize and protect all data objects that are used for that SIM. Drivers that are not yet MPSAFE register Giant and operate as usual. RIght now, no drivers are MPSAFE, though a few will be changed in the coming week as this work settles down. The driver API has changed, so all CAM drivers will need to be recompiled. The userland API has not changed, so tools like camcontrol do not need to be recompiled.
* Hide bus reset announcements within bootverbose.mjacob2007-04-071-2/+7
| | | | MFC after: 3 days
* feedback from RELENG_5 portmjacob2007-03-112-0/+8
|
* Redo previous newbus related change to be kinder tomjacob2007-02-232-1/+8
| | | | multi-release support.
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+1
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* Use the new xpt_rescan function to truly now have dynamicmjacob2007-02-232-2/+42
| | | | | | | | | | attachment of new devices that arrive (and we notice them via async Fibre Channel events). We've always had the right thing (of sorts) happen when devices go away- this is the corollary function that makes multipath failover actually work. MFC after: 2 weeks
* Catch up to MSI-X API changes. Tested with both MSI and MSI-X.jhb2007-02-141-8/+23
|
* Whoops- #ifdef problem caused uninitialized transport. Not horriblymjacob2007-01-251-1/+1
| | | | a problem, but caused annoying messages.
* (commented out) multipath fault injection code.mjacob2007-01-054-2/+21
| | | | Some code to make diffs with RELENG_6 easier.
* Another (minor) CAM_NEW_TRAN backport thingie, plus a slightlymjacob2007-01-051-1/+17
| | | | closer to __FreeBSD_version comparison for this.
* Make some slight reorganization (bringing back in somemjacob2006-12-161-12/+86
| | | | | non-CAM_NEW_TRAN code) to make diffs to previous FreeBSD versions more manageable.
* Make mpt_pci depend on pci and mpt_cam depend on CAM.mjacob2006-12-102-0/+2
| | | | | | PR: 106536 Suggested by: Norikatsu Shigemura MFC after: 3 days
* PH! Forgot to do my cross-compile check. Also now rearranged things somjacob2006-12-072-14/+17
| | | | the ENDIAN defines are consistent between mpt.h and mpt.c.
* MFP4: principally to reapply tagged command support to FC and SAS cards.mjacob2006-12-075-285/+389
|
* use xpt_print functionmjacob2006-12-051-3/+2
|
* Fix a massive couple of botches here: the NVRAM settingsmjacob2006-12-031-23/+15
| | | | | | | | | | | | | read wasn't flagging the SYNC mode was enabled. The temp values for offset and sync period were uint8_t, but were being assigned and shifted from a uint32_t value. This didn't show up in testing because a random number of 1030 cards set a bit that says "honor BIOS negotiation", which means this whole code path was skipped. This should clear up at least some of the negotation issues that have been seen.
* Forced commit: previous revision just correctly reflected thatmjacob2006-12-031-1/+0
| | | | the number of attached devices is 16 bits wide, not 8 bits wide.
* Fix a debug message which didn't quite get it right about data direction.mjacob2006-12-034-102/+163
| | | | | | Fix things to use the LSI-Logic Fusion Library mask and shift names for offset and sync, no matter how awkward they are, in preference to just plain numbers.
* Pointy hat handed to me by Andrew: had msi_enable on as a default.mjacob2006-11-191-1/+1
|
* Play it safe and make MSI and MSI-X an option you have to turn on for MPT.mjacob2006-11-192-4/+15
|
* If a TMF request fails to start, make sure that we pull it off themjacob2006-11-191-2/+4
| | | | | pending list and set the state back to free prior to calling mpt_reset so we don't panic at a later point.
* *smack* - forgot to do i386 compile, so lastmjacob2006-11-171-2/+2
| | | | commit broke things.
* Finally fix local command responses to set residual correctly.mjacob2006-11-161-19/+35
| | | | | | This allows us to play nicely on SANs when we have target mode enabled in f/w but have neither the scsi_targbh enabled or scsi_targ with a target enabled.
* After tests on 2 different AMD platforms with severalmjacob2006-11-161-2/+0
| | | | | | | | different cards (SAS, 4Gb FC), MSI seems to work with the cards. This was of some concern because some PCI cards claim to work with MSI but don't.
* Add big endian support.jb2006-11-152-61/+85
| | | | | Submitted by: scottl Reviewed by: mjacob
* Get the parent dma tag if one exists. This is required on sun4v. Otherjb2006-11-151-2/+2
| | | | | | arches will default to NULL if they have no parent. Reviewed by: mjacob
OpenPOWER on IntegriCloud