summaryrefslogtreecommitdiffstats
path: root/sys/dev/firewire/sbp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/firewire/sbp.c')
-rw-r--r--sys/dev/firewire/sbp.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c
index 7bb8370..43323e9 100644
--- a/sys/dev/firewire/sbp.c
+++ b/sys/dev/firewire/sbp.c
@@ -2291,11 +2291,8 @@ printf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[4]), ntohl(ocb->orb[5]), ntoh
case XPT_CALC_GEOMETRY:
{
struct ccb_calc_geometry *ccg;
- u_int32_t size_mb;
- u_int32_t secs_per_cylinder;
- int extended = 1;
- ccg = &ccb->ccg;
+ ccg = &ccb->ccg;
if (ccg->block_size == 0) {
printf("sbp_action1: block_size is 0.\n");
ccb->ccb_h.status = CAM_REQ_INVALID;
@@ -2318,19 +2315,7 @@ SBP_DEBUG(1)
ccg->volume_size);
END_DEBUG
- size_mb = ccg->volume_size
- / ((1024L * 1024L) / ccg->block_size);
-
- if (size_mb >= 1024 && extended) {
- 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(ccg, /*extended*/1);
xpt_done(ccb);
break;
}
OpenPOWER on IntegriCloud