Deleted Added
full compact
1c1
< /* $FreeBSD: head/sys/dev/mpt/mpt.h 153072 2005-12-04 02:12:43Z ru $ */
---
> /* $FreeBSD: head/sys/dev/mpt/mpt.h 155521 2006-02-11 01:35:29Z mjacob $ */
89d88
< #include <machine/bus.h>
95a95,103
> #if __FreeBSD_version < 500000
> #include <pci/pcireg.h>
> #include <pci/pcivar.h>
> #else
> #include <dev/pci/pcireg.h>
> #include <dev/pci/pcivar.h>
> #endif
>
> #include <machine/bus.h>
249a258
> struct req_entry *chain; /* for SGE overallocations */
379c388,389
< uint32_t : 15,
---
> uint32_t : 14,
> is_sas : 1,
399a410
> uint8_t ioc_facts_flags;
488a500,504
> uint32_t max_seg_cnt; /* calculated after IOC facts */
>
> /*
> * Hardware management
> */
661c677
< #define MPT_REPLY_SIZE 128
---
> #define MPT_REPLY_SIZE 256
663,665c679,681
< #define MPT_MAX_REQUESTS(mpt) ((mpt)->is_fc ? 1024 : 256)
< #define MPT_REQUEST_AREA 512
< #define MPT_SENSE_SIZE 32 /* included in MPT_REQUEST_SIZE */
---
> #define MPT_MAX_REQUESTS(mpt) 512
> #define MPT_REQUEST_AREA 512
> #define MPT_SENSE_SIZE 32 /* included in MPT_REQUEST_AREA */
717,736c733
< /*
< * We cannot tell prior to getting IOC facts how big the IOC's request
< * area is. Because of this we cannot tell at compile time how many
< * simple SG elements we can fit within an IOC request prior to having
< * to put in a chain element.
< *
< * Experimentally we know that the Ultra4 parts have a 96 byte request
< * element size and the Fibre Channel units have a 144 byte request
< * element size. Therefore, if we have 512-32 (== 480) bytes of request
< * area to play with, we have room for between 3 and 5 request sized
< * regions- the first of which is the command plus a simple SG list,
< * the rest of which are chained continuation SG lists. Given that the
< * normal request we use is 48 bytes w/o the first SG element, we can
< * assume we have 480-48 == 432 bytes to have simple SG elements and/or
< * chain elements. If we assume 32 bit addressing, this works out to
< * 54 SG or chain elements. If we assume 5 chain elements, then we have
< * a maximum of 49 seperate actual SG segments.
< */
< #define MPT_SGL_MAX 49
<
---
> /* MPT_RQSL- size of request frame, in bytes */
738d734
< #define MPT_NSGL(mpt) (MPT_RQSL(mpt) / sizeof (SGE_SIMPLE32))
740,743c736,737
< #define MPT_NSGL_FIRST(mpt) \
< (((mpt->request_frame_size << 2) - \
< sizeof (MSG_SCSI_IO_REQUEST) - \
< sizeof (SGE_IO_UNION)) / sizeof (SGE_SIMPLE32))
---
> /* MPT_NSGL- how many SG entries can fit in a request frame size */
> #define MPT_NSGL(mpt) (MPT_RQSL(mpt) / sizeof (SGE_IO_UNION))
744a739,752
> /* MPT_NRFM- how many request frames can fit in each request alloc we make */
> #define MPT_NRFM(mpt) (MPT_REQUEST_AREA / MPT_RQSL(mpt))
>
> /*
> * MPT_NSGL_FIRST- # of SG elements that can fit after
> * an I/O request but still within the request frame.
> * Do this safely based upon SGE_IO_UNION.
> *
> * Note that the first element is *within* the SCSI request.
> */
> #define MPT_NSGL_FIRST(mpt) \
> ((MPT_RQSL(mpt) - sizeof (MSG_SCSI_IO_REQUEST) + sizeof (SGE_IO_UNION)) / \
> sizeof (SGE_IO_UNION))
>
766c774,775
< MPT_PRT_TRACE
---
> MPT_PRT_TRACE,
> MPT_PRT_NONE=100
852a862
> void mpt_dump_sgl(SGE_IO_UNION *se, int offset);