svn commit: r228320 - projects/head_mfi/sys/dev/mfi
Alexander Motin
mav at FreeBSD.org
Wed Dec 7 12:48:11 UTC 2011
Author: mav
Date: Wed Dec 7 12:48:11 2011
New Revision: 228320
URL: http://svn.freebsd.org/changeset/base/228320
Log:
Implement MFI_DEBUG for 64bit S/G lists.
Modified:
projects/head_mfi/sys/dev/mfi/mfi_debug.c
Modified: projects/head_mfi/sys/dev/mfi/mfi_debug.c
==============================================================================
--- projects/head_mfi/sys/dev/mfi/mfi_debug.c Wed Dec 7 12:25:28 2011 (r228319)
+++ projects/head_mfi/sys/dev/mfi/mfi_debug.c Wed Dec 7 12:48:11 2011 (r228320)
@@ -63,7 +63,8 @@ mfi_print_frame_flags(device_t dev, uint
"\2SGL64"
"\3SENSE64"
"\4WRITE"
- "\5READ");
+ "\5READ"
+ "\6IEEESGL");
}
static void
@@ -73,7 +74,15 @@ mfi_print_sgl(struct mfi_frame_header *h
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, st
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++;
More information about the svn-src-projects
mailing list