amr_disk.c (125975) | amr_disk.c (126116) |
---|---|
1/*- 2 * Copyright (c) 1999 Jonathan Lemon 3 * Copyright (c) 1999, 2000 Michael Smith 4 * Copyright (c) 2000 BSDi 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 42 unchanged lines hidden (view full) --- 51 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 52 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 53 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 54 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 55 * SUCH DAMAGE. 56 */ 57 58#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1999 Jonathan Lemon 3 * Copyright (c) 1999, 2000 Michael Smith 4 * Copyright (c) 2000 BSDi 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 42 unchanged lines hidden (view full) --- 51 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 52 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 53 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 54 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 55 * SUCH DAMAGE. 56 */ 57 58#include <sys/cdefs.h> |
59__FBSDID("$FreeBSD: head/sys/dev/amr/amr_disk.c 125975 2004-02-18 21:36:53Z phk $"); | 59__FBSDID("$FreeBSD: head/sys/dev/amr/amr_disk.c 126116 2004-02-22 10:00:05Z cperciva $"); |
60 61/* 62 * Disk driver for AMI MegaRaid controllers 63 */ 64 65#include <sys/param.h> 66#include <sys/systm.h> 67#include <sys/kernel.h> --- 84 unchanged lines hidden (view full) --- 152 153 struct amrd_softc *amrd_sc; 154 struct amr_softc *amr_sc; 155 int error; 156 struct disk *dp; 157 158 dp = arg; 159 amrd_sc = (struct amrd_softc *)dp->d_drv1; | 60 61/* 62 * Disk driver for AMI MegaRaid controllers 63 */ 64 65#include <sys/param.h> 66#include <sys/systm.h> 67#include <sys/kernel.h> --- 84 unchanged lines hidden (view full) --- 152 153 struct amrd_softc *amrd_sc; 154 struct amr_softc *amr_sc; 155 int error; 156 struct disk *dp; 157 158 dp = arg; 159 amrd_sc = (struct amrd_softc *)dp->d_drv1; |
160 amr_sc = (struct amr_softc *)amrd_sc->amrd_controller; 161 if (!amrd_sc || !amr_sc) | 160 if (amrd_sc == NULL) |
162 return(ENXIO); | 161 return(ENXIO); |
162 amr_sc = (struct amr_softc *)amrd_sc->amrd_controller; |
|
163 164 if (length > 0) { 165 int driveno = amrd_sc->amrd_drive - amr_sc->amr_drive; 166 if ((error = amr_dump_blocks(amr_sc,driveno,offset / AMR_BLKSIZE ,(void *)virtual,(int) length / AMR_BLKSIZE )) != 0) 167 return(error); 168 169 } 170 return(0); --- 115 unchanged lines hidden --- | 163 164 if (length > 0) { 165 int driveno = amrd_sc->amrd_drive - amr_sc->amr_drive; 166 if ((error = amr_dump_blocks(amr_sc,driveno,offset / AMR_BLKSIZE ,(void *)virtual,(int) length / AMR_BLKSIZE )) != 0) 167 return(error); 168 169 } 170 return(0); --- 115 unchanged lines hidden --- |