freebsd-skq/sys/dev/mpt
ken 49f38732fc Change the mpt driver to allow larger I/O sizes.
The mpt driver previously didn't report a 'maxio' size to CAM, and so the
da(4) driver limited I/O sizes to DFLTPHYS (64K) by default.  The number
of scatter gather segments allowed, as reported to busdma, was
(128K / PAGE_SIZE) + 1, or 33 on architectures with 4K pages.

Change things around so that we wait until we've determined how many
segments the adapter can support before creating the busdma tag used for
buffers, so we can potentially support more S/G segments and therefore
larger I/O sizes.

Also, fix some things that were broken about the module unload path.  It
still gets hung up inside CAM, though.

mpt.c:		Move some busdma initialization calls in here, and call
		them just after we've gotten the IOCFacts, and know how
		many S/G segments this adapter can support.

mpt.h:		Get rid of MPT_MAXPHYS, it is no longer used.

		Add max_cam_seg_cnt, which is used to report our maximum
		I/O size up to CAM.

mpt_cam.c:	Use max_cam_seg_cnt to report our maximum I/O size to CAM.

		Fix the locking in mpt_cam_detach().

mpt_pci.c:	Pull some busdma initialization and teardown out and put
		it in mpt.c.  We now delay it until we know many scatter
		gather segments the adapter can support, and therefore
		how to setup our busdma tags.

mpt_raid.c:	Make sure we wake up the right wait channel to get the
		raid thread to wake up when we're trying to shut it down.

Reviewed by:	gibbs, mjacob
MFC after:	2 weeks
2010-06-29 22:07:53 +00:00
..
mpilib
mpt_cam.c Change the mpt driver to allow larger I/O sizes. 2010-06-29 22:07:53 +00:00
mpt_cam.h MFp4: Large set of CAM inprovements. 2010-01-28 08:41:30 +00:00
mpt_debug.c
mpt_pci.c Change the mpt driver to allow larger I/O sizes. 2010-06-29 22:07:53 +00:00
mpt_raid.c Change the mpt driver to allow larger I/O sizes. 2010-06-29 22:07:53 +00:00
mpt_raid.h
mpt_reg.h
mpt_user.c We no longer need to use d_thread_t, migrate to struct thread *. 2009-05-20 17:29:21 +00:00
mpt.c Change the mpt driver to allow larger I/O sizes. 2010-06-29 22:07:53 +00:00
mpt.h Change the mpt driver to allow larger I/O sizes. 2010-06-29 22:07:53 +00:00