Revert previos change for prior release/branch.

This commit is contained in:
simokawa 2003-06-16 03:44:36 +00:00
parent 11bf0fa585
commit b70380d374

View File

@ -2291,6 +2291,11 @@ 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;
#if __FreeBSD_version < 501100
u_int32_t size_mb;
u_int32_t secs_per_cylinder;
int extended = 1;
#endif
ccg = &ccb->ccg;
if (ccg->block_size == 0) {
@ -2315,7 +2320,23 @@ SBP_DEBUG(1)
ccg->volume_size);
END_DEBUG
#if __FreeBSD_version < 501100
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;
#else
cam_calc_geometry(ccg, /*extended*/1);
#endif
xpt_done(ccb);
break;
}