diff options
author | ambrisko <ambrisko@FreeBSD.org> | 2012-03-30 23:05:48 +0000 |
---|---|---|
committer | ambrisko <ambrisko@FreeBSD.org> | 2012-03-30 23:05:48 +0000 |
commit | af288dfa91cb30ed7346d095af475eacf258fcee (patch) | |
tree | e1b865ec95e3c7d85bba7e6ba5c14bc2630a1809 /sys/dev/mfi/mfi_debug.c | |
parent | 8251950705577f472f1a2c4052195c05c3e41d32 (diff) | |
parent | 096734a154b76780bd2761cf8e196c6fd4e0562d (diff) | |
download | FreeBSD-src-af288dfa91cb30ed7346d095af475eacf258fcee.zip FreeBSD-src-af288dfa91cb30ed7346d095af475eacf258fcee.tar.gz |
MFhead_mfi r227068
First cut of new HW support from LSI and merge into FreeBSD.
Supports Drake Skinny and ThunderBolt cards.
MFhead_mfi r227574
Style
MFhead_mfi r227579
Use bus_addr_t instead of uintXX_t.
MFhead_mfi r227580
MSI support
MFhead_mfi r227612
More bus_addr_t and remove "#ifdef __amd64__".
MFhead_mfi r227905
Improved timeout support from Scott.
MFhead_mfi r228108
Make file.
MFhead_mfi r228208
Fixed botched merge of Skinny support and enhanced handling
in call back routine.
MFhead_mfi r228279
Remove superfluous !TAILQ_EMPTY() checks before TAILQ_FOREACH().
MFhead_mfi r228310
Move mfi_decode_evt() to taskqueue.
MFhead_mfi r228320
Implement MFI_DEBUG for 64bit S/G lists.
MFhead_mfi r231988
Restore structure layout by reverting the array header to
use [0] instead of [1].
MFhead_mfi r232412
Put wildcard pattern later in the match table.
MFhead_mfi r232413
Use lower case for hexadecimal numbers to match surrounding
style.
MFhead_mfi r232414
Add more Thunderbolt variants.
MFhead_mfi r232888
Don't act on events prior to boot or when shutting down.
Add hw.mfi.detect_jbod_change to enable or disable acting
on JBOD type of disks being added on insert and removed on
removing. Switch hw.mfi.msi to 1 by default since it works
better on newer cards.
MFhead_mfi r233016
Release driver lock before taking Giant when deleting children.
Use TAILQ_FOREACH_SAFE when items can be deleted. Make code a
little simplier to follow. Fix a couple more style issues.
MFhead_mfi r233620
Update mfi_spare/mfi_array with the actual number of elements
for array_ref and pd. Change these max. #define names to avoid
name space collisions. This will require an update to mfiutil
It avoids mfiutil having to do a magic calculation.
Add a note and #define to state that a "SYSTEM" disk is really
what the firmware calls a "JBOD" drive.
Thanks to the many that helped, LSI for the initial code drop,
mav, delphij, jhb, sbruno that all helped with code and testing.
Diffstat (limited to 'sys/dev/mfi/mfi_debug.c')
-rw-r--r-- | sys/dev/mfi/mfi_debug.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sys/dev/mfi/mfi_debug.c b/sys/dev/mfi/mfi_debug.c index 8fe7778..d6f4c9a 100644 --- a/sys/dev/mfi/mfi_debug.c +++ b/sys/dev/mfi/mfi_debug.c @@ -63,7 +63,8 @@ mfi_print_frame_flags(device_t dev, uint32_t flags) "\2SGL64" "\3SENSE64" "\4WRITE" - "\5READ"); + "\5READ" + "\6IEEESGL"); } static void @@ -73,7 +74,15 @@ mfi_print_sgl(struct mfi_frame_header *hdr, union mfi_sgl *sgl, int count) printf("SG List:\n"); for (i = 0; i < count; i++) { - if (hdr->flags & MFI_FRAME_SGL64) { + if (hdr->flags & MFI_FRAME_IEEE_SGL) { + printf("0x%lx:%06d ", (u_long)sgl->sg_skinny[i].addr, + sgl->sg_skinny[i].len); + columns += 26; + if (columns > 77) { + printf("\n"); + columns = 0; + } + } else if (hdr->flags & MFI_FRAME_SGL64) { printf("0x%lx:%06d ", (u_long)sgl->sg64[i].addr, sgl->sg64[i].len); columns += 26; @@ -240,7 +249,12 @@ mfi_validate_sg(struct mfi_softc *sc, struct mfi_command *cm, hdr = &cm->cm_frame->header; count = 0; for (i = 0; i < hdr->sg_count; i++) { - count += cm->cm_sg->sg32[i].len; + if (hdr->flags & MFI_FRAME_IEEE_SGL) + count += cm->cm_sg->sg_skinny[i].len; + else if (hdr->flags & MFI_FRAME_SGL64) + count += cm->cm_sg->sg64[i].len; + else + count += cm->cm_sg->sg32[i].len; } /* count++; |