ida_disk.c (124500) | ida_disk.c (124539) |
---|---|
1/*- 2 * Copyright (c) 1999,2000 Jonathan Lemon 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1999,2000 Jonathan Lemon 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/dev/ida/ida_disk.c 124500 2004-01-13 21:44:03Z mdodd $ | 26 * $FreeBSD: head/sys/dev/ida/ida_disk.c 124539 2004-01-15 04:05:47Z mdodd $ |
27 */ 28 29/* 30 * Disk driver for Compaq SMART RAID adapters. 31 */ 32 33#include <sys/param.h> 34#include <sys/systm.h> --- 150 unchanged lines hidden (view full) --- 185 186 error = ida_command(drv->controller, CMD_GET_LOG_DRV_INFO, 187 &dinfo, sizeof(dinfo), drv->drive, 0, DMA_DATA_IN); 188 if (error) { 189 device_printf(dev, "CMD_GET_LOG_DRV_INFO failed\n"); 190 return (ENXIO); 191 } 192 | 27 */ 28 29/* 30 * Disk driver for Compaq SMART RAID adapters. 31 */ 32 33#include <sys/param.h> 34#include <sys/systm.h> --- 150 unchanged lines hidden (view full) --- 185 186 error = ida_command(drv->controller, CMD_GET_LOG_DRV_INFO, 187 &dinfo, sizeof(dinfo), drv->drive, 0, DMA_DATA_IN); 188 if (error) { 189 device_printf(dev, "CMD_GET_LOG_DRV_INFO failed\n"); 190 return (ENXIO); 191 } 192 |
193 drv->cylinders = dinfo.ncylinders; 194 drv->heads = dinfo.nheads; 195 drv->sectors = dinfo.nsectors; | 193 drv->cylinders = dinfo.dp.ncylinders; 194 drv->heads = dinfo.dp.nheads; 195 drv->sectors = dinfo.dp.nsectors; |
196 drv->secsize = dinfo.secsize == 0 ? 512 : dinfo.secsize; 197 drv->secperunit = dinfo.secperunit; 198 199 /* XXX 200 * other initialization 201 */ 202 device_printf(dev, "%uMB (%u sectors), blocksize=%d\n", 203 drv->secperunit / ((1024 * 1024) / drv->secsize), --- 25 unchanged lines hidden --- | 196 drv->secsize = dinfo.secsize == 0 ? 512 : dinfo.secsize; 197 drv->secperunit = dinfo.secperunit; 198 199 /* XXX 200 * other initialization 201 */ 202 device_printf(dev, "%uMB (%u sectors), blocksize=%d\n", 203 drv->secperunit / ((1024 * 1024) / drv->secsize), --- 25 unchanged lines hidden --- |