summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2002-04-11 08:52:32 +0000
committersos <sos@FreeBSD.org>2002-04-11 08:52:32 +0000
commit03183c74c32489047b7a4658f2ff8089b05e6d07 (patch)
tree1096016071b4150d982e908cf531b6f06cc2785d /sys/dev
parentb66ff604b7e3250dfcf544c09b190115a81d2fd6 (diff)
downloadFreeBSD-src-03183c74c32489047b7a4658f2ff8089b05e6d07.zip
FreeBSD-src-03183c74c32489047b7a4658f2ff8089b05e6d07.tar.gz
Only calculate Promise magic if a device is there for info.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata-raid.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ata/ata-raid.h b/sys/dev/ata/ata-raid.h
index 8755acc..755b147 100644
--- a/sys/dev/ata/ata-raid.h
+++ b/sys/dev/ata/ata-raid.h
@@ -158,8 +158,8 @@ struct promise_raid_conf {
u_int32_t dummy_0;
u_int64_t magic_0;
-#define PR_MAGIC0(x) ((u_int64_t)x.device->channel->unit << 48) | \
- ((u_int64_t)(x.device->unit != 0) << 56)
+#define PR_MAGIC0(x) (x.device ? ((u_int64_t)x.device->channel->unit<<48) | \
+ ((u_int64_t)(x.device->unit != 0) << 56) : 0)
u_int16_t magic_1;
u_int32_t magic_2;
u_int8_t filler1[470];
OpenPOWER on IntegriCloud