aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/twa
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2010-07-09 17:38:15 +0000
committerXin LI <delphij@FreeBSD.org>2010-07-09 17:38:15 +0000
commitc8ed14e2d850224a484fa5aa4bef11b6b457f757 (patch)
treef54c95b51e46022cbec11448ca1322c31d3f7201 /sys/dev/twa
parentd6ff3d4d13df9b39481d3d2470e2af0c13a4e1ba (diff)
downloadsrc-c8ed14e2d850224a484fa5aa4bef11b6b457f757.tar.gz
src-c8ed14e2d850224a484fa5aa4bef11b6b457f757.zip
Don't use pack() for structures that is used purely for software state.
Otherwise the resulting, unaligned mutex structure would trigger panic. Submitted by: Tom Cough <tom.couch lsi.com> Reported/Tested by: jhb MFC after: 3 days
Notes
Notes: svn path=/head/; revision=209860
Diffstat (limited to 'sys/dev/twa')
-rw-r--r--sys/dev/twa/tw_cl.h2
-rw-r--r--sys/dev/twa/tw_cl_share.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/twa/tw_cl.h b/sys/dev/twa/tw_cl.h
index 4bdb44261350..f15260a5ac77 100644
--- a/sys/dev/twa/tw_cl.h
+++ b/sys/dev/twa/tw_cl.h
@@ -74,7 +74,6 @@
#define TW_CLI_PCI_CONFIG_STATUS_OFFSET 0x6 /* status register offset */
#endif /* TW_OSL_PCI_CONFIG_ACCESSIBLE */
-#pragma pack(1)
#ifdef TW_OSL_DEBUG
struct tw_cli_q_stats {
@@ -206,7 +205,6 @@ struct tw_cli_ctlr_context {
#endif /* TW_OSL_DEBUG */
};
-#pragma pack()
/*
diff --git a/sys/dev/twa/tw_cl_share.h b/sys/dev/twa/tw_cl_share.h
index 2b3a0b7322ce..d9eb788b17ad 100644
--- a/sys/dev/twa/tw_cl_share.h
+++ b/sys/dev/twa/tw_cl_share.h
@@ -125,7 +125,6 @@
#define TW_CL_SEVERITY_DEBUG_STRING "DEBUG"
-#pragma pack(1)
/*
* Structure, a pointer to which is used as the controller handle in
@@ -190,6 +189,7 @@ struct tw_cl_req_packet {
};
+#pragma pack(1)
/*
* Packet that describes an AEN/error generated by the controller,
* Common Layer, or even the OS Layer.
@@ -206,6 +206,7 @@ struct tw_cl_event_packet {
TW_UINT32 event_src;
TW_UINT8 severity_str[20];
};
+#pragma pack()
/* Structure to link 2 adjacent elements in a list. */
@@ -215,6 +216,7 @@ struct tw_cl_link {
};
+#pragma pack(1)
/* Scatter/Gather list entry with 32 bit addresses. */
struct tw_cl_sg_desc32 {
TW_UINT32 address;