Commit Graph

4 Commits

Author SHA1 Message Date
Warner Losh
00b4e54ae7 We no longer need to use d_thread_t, migrate to struct thread *. 2009-05-20 17:29:21 +00:00
Marius Strobl
7ee3780799 Make the whole initiator mode part of mpt(4) endian-clean,
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
2009-01-07 21:52:47 +00:00
John Baldwin
4124f62e4f Rework how the mpt_user personality handles buffers for config pages.
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
2008-07-01 19:48:15 +00:00
John Baldwin
ee98c4a50e Add a new personality to mpt(4) devices to allow userland applications to
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
2008-05-06 20:49:53 +00:00