summaryrefslogtreecommitdiffstats
path: root/sys/dev/hptiop/hptiop.c
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2011-11-23 21:43:51 +0000
committermarius <marius@FreeBSD.org>2011-11-23 21:43:51 +0000
commitc5cf0f6b20206d14255b5200ec08705a768ac451 (patch)
tree07604949d086d79c0b4929545a210d0cc779bb03 /sys/dev/hptiop/hptiop.c
parent0f30a4cf8906e3cbfa5895b21f8f9232f17e39bb (diff)
downloadFreeBSD-src-c5cf0f6b20206d14255b5200ec08705a768ac451.zip
FreeBSD-src-c5cf0f6b20206d14255b5200ec08705a768ac451.tar.gz
- Just use cam_calc_geometry(9) on newer version of FreeBSD rather than
duplicating it. - In hptmv(4) and hptrr(4) use __FBSDID and DEVMETHOD_END.
Diffstat (limited to 'sys/dev/hptiop/hptiop.c')
-rw-r--r--sys/dev/hptiop/hptiop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/hptiop/hptiop.c b/sys/dev/hptiop/hptiop.c
index c4e2427..035cf07 100644
--- a/sys/dev/hptiop/hptiop.c
+++ b/sys/dev/hptiop/hptiop.c
@@ -1813,11 +1813,15 @@ scsi_done:
break;
case XPT_CALC_GEOMETRY:
+#if __FreeBSD_version >= 500000
+ cam_calc_geometry(&ccb->ccg, 1);
+#else
ccb->ccg.heads = 255;
ccb->ccg.secs_per_track = 63;
ccb->ccg.cylinders = ccb->ccg.volume_size /
(ccb->ccg.heads * ccb->ccg.secs_per_track);
ccb->ccb_h.status = CAM_REQ_CMP;
+#endif
break;
case XPT_PATH_INQ:
OpenPOWER on IntegriCloud