ida_disk.c (124539) | ida_disk.c (125975) |
---|---|
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 124539 2004-01-15 04:05:47Z mdodd $ | 26 * $FreeBSD: head/sys/dev/ida/ida_disk.c 125975 2004-02-18 21:36:53Z phk $ |
27 */ 28 29/* 30 * Disk driver for Compaq SMART RAID adapters. 31 */ 32 33#include <sys/param.h> 34#include <sys/systm.h> --- 163 unchanged lines hidden (view full) --- 198 199 /* XXX 200 * other initialization 201 */ 202 device_printf(dev, "%uMB (%u sectors), blocksize=%d\n", 203 drv->secperunit / ((1024 * 1024) / drv->secsize), 204 drv->secperunit, drv->secsize); 205 | 27 */ 28 29/* 30 * Disk driver for Compaq SMART RAID adapters. 31 */ 32 33#include <sys/param.h> 34#include <sys/systm.h> --- 163 unchanged lines hidden (view full) --- 198 199 /* XXX 200 * other initialization 201 */ 202 device_printf(dev, "%uMB (%u sectors), blocksize=%d\n", 203 drv->secperunit / ((1024 * 1024) / drv->secsize), 204 drv->secperunit, drv->secsize); 205 |
206 drv->disk.d_strategy = idad_strategy; 207 drv->disk.d_name = "idad"; 208 drv->disk.d_dump = idad_dump; 209 drv->disk.d_sectorsize = drv->secsize; 210 drv->disk.d_mediasize = (off_t)drv->secperunit * drv->secsize; 211 drv->disk.d_fwsectors = drv->sectors; 212 drv->disk.d_fwheads = drv->heads; 213 drv->disk.d_drv1 = drv; 214 drv->disk.d_maxsize = DFLTPHYS; /* XXX guess? */ 215 disk_create(drv->unit, &drv->disk, 0, NULL, NULL); | 206 drv->disk = disk_alloc(); 207 drv->disk->d_strategy = idad_strategy; 208 drv->disk->d_name = "idad"; 209 drv->disk->d_dump = idad_dump; 210 drv->disk->d_sectorsize = drv->secsize; 211 drv->disk->d_mediasize = (off_t)drv->secperunit * drv->secsize; 212 drv->disk->d_fwsectors = drv->sectors; 213 drv->disk->d_fwheads = drv->heads; 214 drv->disk->d_drv1 = drv; 215 drv->disk->d_maxsize = DFLTPHYS; /* XXX guess? */ 216 drv->disk->d_unit = drv->unit; 217 drv->disk->d_flags = DISKFLAG_NEEDSGIANT; 218 disk_create(drv->disk, DISK_VERSION); |
216 217 return (0); 218} 219 220static int 221idad_detach(device_t dev) 222{ 223 struct idad_softc *drv; 224 225 drv = (struct idad_softc *)device_get_softc(dev); | 219 220 return (0); 221} 222 223static int 224idad_detach(device_t dev) 225{ 226 struct idad_softc *drv; 227 228 drv = (struct idad_softc *)device_get_softc(dev); |
226 disk_destroy(&drv->disk); | 229 disk_destroy(drv->disk); |
227 return (0); 228} | 230 return (0); 231} |