mlx_disk.c (111499) | mlx_disk.c (111509) |
---|---|
1/*- 2 * Copyright (c) 1999 Jonathan Lemon 3 * Copyright (c) 1999 Michael Smith 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/*- 2 * Copyright (c) 1999 Jonathan Lemon 3 * Copyright (c) 1999 Michael Smith 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sys/dev/mlx/mlx_disk.c 111499 2003-02-25 20:47:22Z jhb $ | 27 * $FreeBSD: head/sys/dev/mlx/mlx_disk.c 111509 2003-02-25 22:48:33Z jhb $ |
28 */ 29 30/* 31 * Disk driver for Mylex DAC960 RAID adapters. 32 */ 33 34#include <sys/param.h> 35#include <sys/systm.h> --- 197 unchanged lines hidden (view full) --- 233 sc->mlxd_disk.d_fwsectors = sc->mlxd_drive->ms_sectors; 234 sc->mlxd_disk.d_fwheads = sc->mlxd_drive->ms_heads; 235 236 /* 237 * Set maximum I/O size to the lesser of the recommended maximum and the practical 238 * maximum except on v2 cards where the maximum is set to 8 pages. 239 */ 240 if (sc->mlxd_controller->mlx_iftype == MLX_IFTYPE_2) | 28 */ 29 30/* 31 * Disk driver for Mylex DAC960 RAID adapters. 32 */ 33 34#include <sys/param.h> 35#include <sys/systm.h> --- 197 unchanged lines hidden (view full) --- 233 sc->mlxd_disk.d_fwsectors = sc->mlxd_drive->ms_sectors; 234 sc->mlxd_disk.d_fwheads = sc->mlxd_drive->ms_heads; 235 236 /* 237 * Set maximum I/O size to the lesser of the recommended maximum and the practical 238 * maximum except on v2 cards where the maximum is set to 8 pages. 239 */ 240 if (sc->mlxd_controller->mlx_iftype == MLX_IFTYPE_2) |
241 dsk->si_iosize_max = 8 * PAGE_SIZE; | 241 sc->mlxd_disk.d_maxsize = 8 * PAGE_SIZE; |
242 else { 243 s1 = sc->mlxd_controller->mlx_enq2->me_maxblk * MLX_BLKSIZE; 244 s2 = (sc->mlxd_controller->mlx_enq2->me_max_sg - 1) * PAGE_SIZE; | 242 else { 243 s1 = sc->mlxd_controller->mlx_enq2->me_maxblk * MLX_BLKSIZE; 244 s2 = (sc->mlxd_controller->mlx_enq2->me_max_sg - 1) * PAGE_SIZE; |
245 dsk->si_iosize_max = imin(s1, s2); | 245 sc->mlxd_disk.d_maxsize = imin(s1, s2); |
246 } 247 248 disk_create(sc->mlxd_unit, &sc->mlxd_disk, 0, NULL, NULL); 249 250 return (0); 251} 252 253static int --- 12 unchanged lines hidden --- | 246 } 247 248 disk_create(sc->mlxd_unit, &sc->mlxd_disk, 0, NULL, NULL); 249 250 return (0); 251} 252 253static int --- 12 unchanged lines hidden --- |