diff options
author | sos <sos@FreeBSD.org> | 2002-04-11 08:52:32 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2002-04-11 08:52:32 +0000 |
commit | 03183c74c32489047b7a4658f2ff8089b05e6d07 (patch) | |
tree | 1096016071b4150d982e908cf531b6f06cc2785d | |
parent | b66ff604b7e3250dfcf544c09b190115a81d2fd6 (diff) | |
download | FreeBSD-src-03183c74c32489047b7a4658f2ff8089b05e6d07.zip FreeBSD-src-03183c74c32489047b7a4658f2ff8089b05e6d07.tar.gz |
Only calculate Promise magic if a device is there for info.
-rw-r--r-- | sys/dev/ata/ata-raid.h | 4 |
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]; |