diff options
Diffstat (limited to 'sys/dev/ahb/ahb.c')
-rw-r--r-- | sys/dev/ahb/ahb.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/sys/dev/ahb/ahb.c b/sys/dev/ahb/ahb.c index e6d715b..a3902ae 100644 --- a/sys/dev/ahb/ahb.c +++ b/sys/dev/ahb/ahb.c @@ -1171,24 +1171,7 @@ ahbaction(struct cam_sim *sim, union ccb *ccb) } case XPT_CALC_GEOMETRY: { - struct ccb_calc_geometry *ccg; - u_int32_t size_mb; - u_int32_t secs_per_cylinder; - - ccg = &ccb->ccg; - size_mb = ccg->volume_size - / ((1024L * 1024L) / ccg->block_size); - - if (size_mb > 1024 && (ahb->extended_trans != 0)) { - ccg->heads = 255; - ccg->secs_per_track = 63; - } else { - 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; - ccb->ccb_h.status = CAM_REQ_CMP; + cam_calc_geometry(&ccb->ccg, ahb->extended_trans); xpt_done(ccb); break; } |