Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic make sure the alignment of ciss_cmd matches KASSE...



details:   https://anonhg.NetBSD.org/src/rev/a973dfda3e17
branches:  trunk
changeset: 936034:a973dfda3e17
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Thu Jul 16 14:41:04 2020 +0000

description:
make sure the alignment of ciss_cmd matches KASSERT() in ciss_cmd()

diffstat:

 sys/dev/ic/cissreg.h |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 63fd0cb98cc4 -r a973dfda3e17 sys/dev/ic/cissreg.h
--- a/sys/dev/ic/cissreg.h      Thu Jul 16 14:39:33 2020 +0000
+++ b/sys/dev/ic/cissreg.h      Thu Jul 16 14:41:04 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cissreg.h,v 1.9 2020/07/16 14:39:33 jdolecek Exp $     */
+/*     $NetBSD: cissreg.h,v 1.10 2020/07/16 14:41:04 jdolecek Exp $    */
 /*     $OpenBSD: cissreg.h,v 1.11 2010/06/03 01:02:13 dlg Exp $        */
 
 /*
@@ -535,8 +535,9 @@
        uint8_t                 ccb_sg_tag;
 
        struct ciss_error       ccb_err;
-       struct ciss_cmd         ccb_cmd __aligned(8);   /* followed by sgl */
+       struct ciss_cmd         ccb_cmd __aligned(16);  /* followed by sgl */
 };
+CTASSERT((offsetof(struct ciss_ccb, ccb_cmd) & 0xf) == 0);
 
 typedef TAILQ_HEAD(ciss_queue_head, ciss_ccb)     ciss_queue_head;
 



Home | Main Index | Thread Index | Old Index