summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ips.c
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2009-03-20 20:16:57 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2009-03-20 20:16:57 +0000
commit55ed008bbe35b6be69ad870b6fdae327b97b33ac (patch)
tree08a8a947170c4d300ee3f1c5ed9ec8ea1bfd59e1 /sys/dev/pci/ips.c
parent82675978e6f894ab126d76920de1045d8f9de2e1 (diff)
When calculating physical disk size use its number of sectors
rather than chunk's.
Diffstat (limited to 'sys/dev/pci/ips.c')
-rw-r--r--sys/dev/pci/ips.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c
index e7156380848..a53a3be6620 100644
--- a/sys/dev/pci/ips.c
+++ b/sys/dev/pci/ips.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ips.c,v 1.82 2009/03/20 20:11:07 grange Exp $ */
+/* $OpenBSD: ips.c,v 1.83 2009/03/20 20:16:56 grange Exp $ */
/*
* Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org>
@@ -1238,7 +1238,7 @@ out:
bd->bd_channel = chan;
bd->bd_target = target;
bd->bd_lun = 0;
- bd->bd_size = (u_quad_t)letoh32(chunk->seccnt) * IPS_SECSZ;
+ bd->bd_size = (u_quad_t)letoh32(dev->seccnt) * IPS_SECSZ;
bzero(bd->bd_vendor, sizeof(bd->bd_vendor));
memcpy(bd->bd_vendor, dev->devid, MIN(sizeof(bd->bd_vendor),