amr.c (148499) | amr.c (148850) |
---|---|
1/*- 2 * Copyright (c) 1999,2000 Michael Smith 3 * Copyright (c) 2000 BSDi 4 * Copyright (c) 2005 Scott Long 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,2000 Michael Smith 3 * Copyright (c) 2000 BSDi 4 * Copyright (c) 2005 Scott Long 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.c 148499 2005-07-29 01:53:45Z ps $"); | 59__FBSDID("$FreeBSD: head/sys/dev/amr/amr.c 148850 2005-08-08 12:16:21Z scottl $"); |
60 61/* 62 * Driver for the AMI MegaRaid family of controllers. 63 */ 64 65#include <sys/param.h> 66#include <sys/systm.h> 67#include <sys/malloc.h> 68#include <sys/kernel.h> 69 | 60 61/* 62 * Driver for the AMI MegaRaid family of controllers. 63 */ 64 65#include <sys/param.h> 66#include <sys/systm.h> 67#include <sys/malloc.h> 68#include <sys/kernel.h> 69 |
70#include <dev/amr/amr_compat.h> | 70#include <sys/bio.h> |
71#include <sys/bus.h> 72#include <sys/conf.h> 73#include <sys/stat.h> 74 75#include <machine/bus.h> 76#include <machine/resource.h> 77#include <sys/rman.h> 78 --- 845 unchanged lines hidden (view full) --- 924 return (0); 925 } 926 927 /* connect the bio to the command */ 928 ac->ac_complete = amr_completeio; 929 ac->ac_bio = bio; 930 ac->ac_data = bio->bio_data; 931 ac->ac_length = bio->bio_bcount; | 71#include <sys/bus.h> 72#include <sys/conf.h> 73#include <sys/stat.h> 74 75#include <machine/bus.h> 76#include <machine/resource.h> 77#include <sys/rman.h> 78 --- 845 unchanged lines hidden (view full) --- 924 return (0); 925 } 926 927 /* connect the bio to the command */ 928 ac->ac_complete = amr_completeio; 929 ac->ac_bio = bio; 930 ac->ac_data = bio->bio_data; 931 ac->ac_length = bio->bio_bcount; |
932 if (BIO_IS_READ(bio)) { | 932 if (bio->bio_cmd == BIO_READ) { |
933 ac->ac_flags |= AMR_CMD_DATAIN; 934 cmd = AMR_CMD_LREAD; 935 } else { 936 ac->ac_flags |= AMR_CMD_DATAOUT; 937 cmd = AMR_CMD_LWRITE; 938 } 939 amrd = (struct amrd_softc *)bio->bio_disk->d_drv1; 940 driveno = amrd->amrd_drive - sc->amr_drive; --- 1070 unchanged lines hidden --- | 933 ac->ac_flags |= AMR_CMD_DATAIN; 934 cmd = AMR_CMD_LREAD; 935 } else { 936 ac->ac_flags |= AMR_CMD_DATAOUT; 937 cmd = AMR_CMD_LWRITE; 938 } 939 amrd = (struct amrd_softc *)bio->bio_disk->d_drv1; 940 driveno = amrd->amrd_drive - sc->amr_drive; --- 1070 unchanged lines hidden --- |