summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-10-05 20:29:00 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-10-05 20:29:00 +0000
commitcbeed38584861682f8ceb2855915ab1a12c048f8 (patch)
treebb9bf53a39c574a8c6ff82828e19df0c0cbc4829 /sys/dev/ppbus
parent982ef3a773b544fca3bd4b23db3fc8e692421f32 (diff)
downloadFreeBSD-src-cbeed38584861682f8ceb2855915ab1a12c048f8.zip
FreeBSD-src-cbeed38584861682f8ceb2855915ab1a12c048f8.tar.gz
Print more verbose debugging output
Clean up computation of parameters.
Diffstat (limited to 'sys/dev/ppbus')
-rw-r--r--sys/dev/ppbus/vpo.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/dev/ppbus/vpo.c b/sys/dev/ppbus/vpo.c
index f589ecf..a6801f2 100644
--- a/sys/dev/ppbus/vpo.c
+++ b/sys/dev/ppbus/vpo.c
@@ -357,20 +357,23 @@ vpo_action(struct cam_sim *sim, union ccb *ccb)
case XPT_CALC_GEOMETRY:
{
struct ccb_calc_geometry *ccg;
- u_int32_t secs_per_cylinder;
ccg = &ccb->ccg;
#ifdef VP0_DEBUG
- printf("vpo%d: XPT_CALC_GEOMETRY (%d, %d) request\n",
- vpo->vpo_unit, ccg->volume_size, ccg->block_size);
+ printf("vpo%d: XPT_CALC_GEOMETRY (bs=%d,vs=%d,c=%d,h=%d,spt=%d) request\n",
+ vpo->vpo_unit,
+ ccg->block_size,
+ ccg->volume_size,
+ ccg->cylinders,
+ ccg->heads,
+ ccg->secs_per_track);
#endif
-
+
ccg->heads = 64;
ccg->secs_per_track = 32;
-
- secs_per_cylinder = ccg->heads * ccg->secs_per_track;
- ccg->cylinders = ccg->volume_size / secs_per_cylinder;
+ ccg->cylinders = ccg->volume_size /
+ (ccg->heads * ccg->secs_per_track);
ccb->ccb_h.status = CAM_REQ_CMP;
xpt_done(ccb);
OpenPOWER on IntegriCloud