diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2012-01-29 01:40:39 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2012-01-29 01:40:39 +0000 |
| commit | 017fcddf19345b6c5fa4c0e5d7dcb7b52fe34e22 (patch) | |
| tree | d3d9a844853185e062c03056d1f3c1426833b412 /sys/dev/hptrr | |
| parent | ccd139ee234936016729a21087630e5b0575c2e7 (diff) | |
Notes
Diffstat (limited to 'sys/dev/hptrr')
| -rw-r--r-- | sys/dev/hptrr/hptrr_osm_bsd.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/hptrr/hptrr_osm_bsd.c b/sys/dev/hptrr/hptrr_osm_bsd.c index 6bc30c22b36f..fa2ff6f7990d 100644 --- a/sys/dev/hptrr/hptrr_osm_bsd.c +++ b/sys/dev/hptrr/hptrr_osm_bsd.c @@ -22,9 +22,11 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + #include <dev/hptrr/hptrr_config.h> /* $Id: osm_bsd.c,v 1.27 2007/11/22 07:35:49 gmm Exp $ * @@ -795,10 +797,14 @@ static void hpt_action(struct cam_sim *sim, union ccb *ccb) break; case XPT_CALC_GEOMETRY: +#if __FreeBSD_version >= 500000 + cam_calc_geometry(&ccb->ccg, 1); +#else ccb->ccg.heads = 255; ccb->ccg.secs_per_track = 63; ccb->ccg.cylinders = ccb->ccg.volume_size / (ccb->ccg.heads * ccb->ccg.secs_per_track); ccb->ccb_h.status = CAM_REQ_CMP; +#endif break; case XPT_PATH_INQ: @@ -1250,7 +1256,7 @@ static device_method_t driver_methods[] = { DEVMETHOD(device_attach, hpt_attach), DEVMETHOD(device_detach, hpt_detach), DEVMETHOD(device_shutdown, hpt_shutdown), - { 0, 0 } + DEVMETHOD_END }; static driver_t hpt_pci_driver = { |
