summaryrefslogtreecommitdiffstats
path: root/sys/dev/mfi
Commit message (Collapse)AuthorAgeFilesLines
* - 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.
* The sys/sysctl.h header is needed when MFI_DEBUG is defined.kib2011-11-161-0/+1
| | | | Nod from: jhb
* Add single-message MSI support to mfi(4). It is disabled by default butjhb2011-11-165-10/+28
| | | | | | | | 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.
* Fix an implicit dependency between the MFI driver and CAM that had grown duescottl2011-10-291-1/+18
| | | | | | | | | to an API change in CAM. It's once again possible to link a static kernel with 'mfi' without requiring 'scbus' as well. Ditto for KLD loading. Submitted by: kib Reviewed by: ken MFC after: 3 days
* Merge from r225950:marius2011-10-131-1/+7
| | | | | | Set the sense residual properly. Reviewed by: ken
* - Add special support for the MFI_CMD ioctl with MFI_CMD_STP command, usedmav2011-09-292-40/+64
| | | | | | | | | | | 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)
* Second-to-last commit implementing Capsicum capabilities in the FreeBSDrwatson2011-08-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel for FreeBSD 9.0: Add a new capability mask argument to fget(9) and friends, allowing system call code to declare what capabilities are required when an integer file descriptor is converted into an in-kernel struct file *. With options CAPABILITIES compiled into the kernel, this enforces capability protection; without, this change is effectively a no-op. Some cases require special handling, such as mmap(2), which must preserve information about the maximum rights at the time of mapping in the memory map so that they can later be enforced in mprotect(2) -- this is done by narrowing the rights in the existing max_protection field used for similar purposes with file permissions. In namei(9), we assert that the code is not reached from within capability mode, as we're not yet ready to enforce namespace capabilities there. This will follow in a later commit. Update two capability names: CAP_EVENT and CAP_KEVENT become CAP_POST_KEVENT and CAP_POLL_KEVENT to more accurately indicate what they represent. Approved by: re (bz) Submitted by: jonathan Sponsored by: Google Inc
* Support controllers whose option ROM is disabled in the BIOS by kickingjhb2011-07-142-2/+8
| | | | | | | | | 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
* Remove duplicate header includeskevlo2011-06-281-3/+0
|
* There are a couple of structs in mfireg.h with members named 'class'.emaste2011-06-022-11/+11
| | | | | | | | | | 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
* When masking direct and processor devices during an inquiry, properlyjhb2010-12-061-4/+4
| | | | | | | | | | | preserve the upper bits of the first data byte. While here, shorten a few nearby lines. PR: kern/152768 Reported by: Sascha Wildner saw of online.de Reviewed by: scottl MFC after: 1 week
* Update PD state firmware definitions: add copyback, system.pluknet2010-10-211-1/+3
| | | | | | Reviewed by: jhb Approved by: avg (mentor) MFC after: 1 week
* Correct mfip module dependency on mfi. This allows mfip to be loaded askib2010-03-022-0/+2
| | | | | | | module when mfi is a module itself. Reviewed by: jhb, scottl 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
* ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6scottl2009-08-132-37/+184
| | | | | | | | | | | | | | controllers. Controller, array, and drive status can be checked, basic attributes can be changed, and arrays and spares can be created and deleted. Controller firmware can also be flashed. This does not replace MegaCLI, found in ports, as that is officially sanctioned and supported by LSI and includes vastly more functionality. However, mfiutil is open source and guaranteed to provide basic functionality, which can be especially useful if you have a problem and can't get MegaCLI to work. Approved by: re Obtained from: Yahoo! Inc.
* 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-102-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-202-6/+6
|
* Change Dell's gen2 catch-all from Dell PERC H700/H800 to Dell PERC Gen2ambrisko2008-12-152-2/+3
| | | | | | 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 the maximum transfer size for mfi(4) disk devices to not exceed thejhb2008-11-171-1/+2
| | | | | | | maximum number of scatter/gather elements supported in the bus dma tag. Reviewed by: scottl MFC after: 1 week
* 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-125-30/+85
| | | | | | | | | | | | | | - 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-282-0/+62
| | | | | | | | | | | 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-122-8/+126
| | | | 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-022-58/+94
| | | | | | | | | 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
* Add Dell's sub-vendor id to identify PERC6 RAID controller which has LSIambrisko2007-12-191-0/+1
| | | | vendor id's.
* 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.
* Play better with CAM so that there aren't so many spurious warnings at boot.scottl2007-10-121-17/+14
|
* Update the MFI driver to support new "1078" series of hardware. Thisscottl2007-08-254-24/+221
| | | | | | | | 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-132-2/+9
| | | | | | | | | | - 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-135-29/+217
| | | | | | | | applications to add and remove volumes. MFC after: 1 week Approved by: re (bmah) Reviewed by: ambrisko, scottl
* Prepare for future integration between CAM and newbus. xpt_bus_registerscottl2007-06-171-1/+1
| | | | | | | 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.
OpenPOWER on IntegriCloud