summaryrefslogtreecommitdiffstats
path: root/sys/dev/mfi
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add in a couple of things:ambrisko2007-06-042-19/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In the ioctl path let command get queued up and return when complete _without_ blocking the driving waiting for the response. This way the driver doesn't "lock up" for ~30s during a flash command. Submitted by scottl. - Add a guard so that if a DCMD of 0 is sent down the ioctl path don't send it to the controller. Return with a status of OK. This is a little strange since MegaCli doesn't seem to like something and will issue some DCMD of 0. This doesn't happen under Linux. So the emulation needs to be improved but I'm not sure what. Another strange thing is that when a DCMD of 0 gets issued under i386 the controller returns OK but in amd64 the context is messed up. - Add a guard so the context has to be with-in the legal limit so we get a reasonable error assertion versus random panic. It's going to be a challenge to figure out why MegaCli is not totally happy and then sends some bogus commands. This means that flashing firmware via the Linux tool won't work since it generates a DCMD of 0 when it should be opening the firmware for a flash update. Without this problem flashing works fine. This means there is no publicly available tool to upgrade the RAID firmware under FreeBSD right now. I plan to MFC all of the mfi changes to 6.X shortly. This might not include the SCSI pass-through changes. Submitted by: scottl Reviewed by: scottl MFC after: 3 days
* Catch up to driver changes required for the mfip sub-driver.scottl2007-05-163-4/+27
|
* Add the 'mfip' sub-driver for gaining SCSI-passthrough access to devicesscottl2007-05-161-0/+389
| | | | on an MFI controller.
* Collapse the mfi_ld object. Add an ioctl to help management apps mapscottl2007-05-105-44/+79
| | | | array Id's to FreeBSD device names.
* 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@
* 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
* Up the event class reporting from 10 (basically, nothing) to EVT_CLASS_INFO.scottl2007-01-071-1/+1
| | | | Submitted by: Doug Ambrisko
* Make sure that all of the fields in the header are clean. It was possible forscottl2007-01-021-5/+9
| | | | unsafe flags to leak from one command to another.
* Some relatively minor changes and bug fixes:ambrisko2006-12-143-65/+54
| | | | | | | | | | | | | | | | | 1) s/mi/mfi/ in FreeBSD ioctl path 2) add in "\n" on various failure messages 3) cap the length of time to abort an AEN command 4) fix passing sense data back to user to make Dell's Linux firmware upgrade tool happy. 5) bump the MFI_POLL_TIMEOUT_SECS from 10s to 50s since the firmware flash command can take ~40s to return. This is some clean-up and enables RAID firmware to updated via Dell's tool. Note Dell's tool requires the updates to the Linux emulator that has been done in -current with TLS etc. I need to discuss with scottl how to better submit mfi commands to the firmware via the ioctl path so we don't do it in polled mode.
* Change the internal API for polled commands. Calling mfi_polled_commandscottl2006-11-181-83/+39
| | | | | | | | | after calling mfi_mapcmd is no longer needed, so long as the MFI_CMD_POLLED flag is set. This change eliminates the possibility of a polled command getting posted twice to the driver. This is turn fixes panics on shutdown when INVARIANTS is set. Sponsored by: Ironport
* - Add in FreeBSD native ioctl that models the Linux version.ambrisko2006-11-143-7/+206
| | | | | | | | - Add a translation so the Linux ioctl's don't conflict with the FreeBSD definition. - Assume Linux 32bit emulation on amd64. This was tested on i386 and amd64 with the 32bit Linux MegaCli. Eventually we should do a 32bit native FreeBSD translation app.
* Remove some debugging code that accidentally crept in.scottl2006-10-161-3/+1
|
* - Add a command validator for use in debugging.scottl2006-10-165-53/+425
| | | | | | | | - Fix the locking protocol to eliminate races between normal I/O and AENs. - Various small improvements and usability tweaks. Sponsored by: IronPort Portions Submitted by: Doug Ambrisko
* Skip the AEN event command that is always hanging out on the card.scottl2006-09-271-0/+2
| | | | Submitted by: Doug Ambrisko
* Fix a bad #include statmentscottl2006-09-271-1/+1
|
* Add a command debugging module and a periodic watchdog timer.scottl2006-09-253-0/+287
| | | | Sponsored by: IronPort
* Allow hw.mfi.event_locale/hw.mfi.event_class to be set via loader.ambrisko2006-09-201-2/+8
| | | | | If an event doesn't match the criteria then don't print it. Some events are not saved in the log (<0 class events).
OpenPOWER on IntegriCloud