Commit Graph

9 Commits

Author SHA1 Message Date
Scott Long
763fae7918 ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6
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.
2009-08-13 23:18:45 +00:00
Doug Ambrisko
fa1e6ef4ef - Fix from jhb for failing I/O request when bus_dmamap_load fails.
- 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
2008-11-12 22:44:50 +00:00
Doug Ambrisko
46fb79ea72 Add support to talk to the LSI ioctl path on with FreeBSD 32 bit app's
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
2008-05-28 23:19:27 +00:00
Scott Long
0929b66905 Add support for management apps. Work around an apparent firmware bug that
results in hung i/o if more than 128 commands are scheduled for an array.
2008-05-12 14:09:19 +00:00
Scott Long
ddfae47b9d Collapse the mfi_ld object. Add an ioctl to help management apps map
array Id's to FreeBSD device names.
2007-05-10 15:33:41 +00:00
Doug Ambrisko
812819c7b1 Some relatively minor changes and bug fixes:
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.
2006-12-14 18:29:08 +00:00
Doug Ambrisko
c2be47f25f - Add in FreeBSD native ioctl that models the Linux version.
- 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.
2006-11-14 16:48:00 +00:00
Doug Ambrisko
741367d5a5 Add in a bunch of things to the mfi driver:
- Linux ioctl support, with the other Linux changes MegaCli
	will run if you mount linprocfs & linsysfs then set
	sysctl compat.linux.osrelease=2.6.12 or similar.  This works
	on i386.  It should work on amd64 but not well tested yet.
	StoreLib may or may not work.  Remember to kldload mfi_linux.
      - Add in AEN (Async Event Notification) support so we can
	get messages from the firmware when something happens.
	Not all messages are in defined in event detail.  Use
	event_log to try to figure out what happened.
      - Try to implement something like SIGIO for StoreLib.  Since
	mrmonitor doesn't work right I can't fully test it.  StoreLib
	works best with the rh9 base.  In theory mrmonitor isn't
	needed due to native driver support of AEN :-)
Now we can configure and monitor the RAID better.

Submitted by:	IronPort Systems.
2006-05-18 23:30:48 +00:00
Scott Long
2e21a3ef7e Add a driver for the new LSI MegaRAID SAS controller family. The 'MFI' name
is derived from the phrase 'MegaRAID Firmware Interface' used by LSI.  This
driver provides a block interface to logical disks on the card and a minimal
management device.  It is MPSAFE, INTR_FAST, and 64-bit capable.

Thanks to Dell for providing hardware to test with and IronPort for
sponsoring the work.

Sponsored by: Dell, Ironport
MFC After: 3 days
2006-03-25 06:14:32 +00:00