diff options
author | simokawa <simokawa@FreeBSD.org> | 2003-06-16 03:44:36 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2003-06-16 03:44:36 +0000 |
commit | b70380d374cd8d614961519c02d9ace45a669731 (patch) | |
tree | 232f1f3ce28789f12dc19c63f02790ff4e8e5dad /sys/dev/firewire | |
parent | 11bf0fa5850859eb8977690d26007e827a585174 (diff) | |
download | FreeBSD-src-b70380d374cd8d614961519c02d9ace45a669731.zip FreeBSD-src-b70380d374cd8d614961519c02d9ace45a669731.tar.gz |
Revert previos change for prior release/branch.
Diffstat (limited to 'sys/dev/firewire')
-rw-r--r-- | sys/dev/firewire/sbp.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c index 43323e9..8e296dd 100644 --- a/sys/dev/firewire/sbp.c +++ b/sys/dev/firewire/sbp.c @@ -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; } |