mpt.c (171842) | mpt.c (172568) |
---|---|
1/*- 2 * Generic routines for LSI Fusion adapters. 3 * FreeBSD Version. 4 * 5 * Copyright (c) 2000, 2001 by Greg Ansley 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 82 unchanged lines hidden (view full) --- 91 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 92 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 93 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 94 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT 95 * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 96 */ 97 98#include <sys/cdefs.h> | 1/*- 2 * Generic routines for LSI Fusion adapters. 3 * FreeBSD Version. 4 * 5 * Copyright (c) 2000, 2001 by Greg Ansley 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 82 unchanged lines hidden (view full) --- 91 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 92 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 93 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 94 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT 95 * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 96 */ 97 98#include <sys/cdefs.h> |
99__FBSDID("$FreeBSD: head/sys/dev/mpt/mpt.c 171842 2007-08-14 19:17:35Z scottl $"); | 99__FBSDID("$FreeBSD: head/sys/dev/mpt/mpt.c 172568 2007-10-12 06:03:46Z kevlo $"); |
100 101#include <dev/mpt/mpt.h> 102#include <dev/mpt/mpt_cam.h> /* XXX For static handler registration */ 103#include <dev/mpt/mpt_raid.h> /* XXX For static handler registration */ 104 105#include <dev/mpt/mpilib/mpi.h> 106#include <dev/mpt/mpilib/mpi_ioc.h> 107#include <dev/mpt/mpilib/mpi_fc.h> --- 1243 unchanged lines hidden (view full) --- 1351 mpt_print_db(data); 1352 return (EBUSY); 1353 } 1354 1355 /* We move things in 32 bit chunks */ 1356 len = (len + 3) >> 2; 1357 data32 = cmd; 1358 | 100 101#include <dev/mpt/mpt.h> 102#include <dev/mpt/mpt_cam.h> /* XXX For static handler registration */ 103#include <dev/mpt/mpt_raid.h> /* XXX For static handler registration */ 104 105#include <dev/mpt/mpilib/mpi.h> 106#include <dev/mpt/mpilib/mpi_ioc.h> 107#include <dev/mpt/mpilib/mpi_fc.h> --- 1243 unchanged lines hidden (view full) --- 1351 mpt_print_db(data); 1352 return (EBUSY); 1353 } 1354 1355 /* We move things in 32 bit chunks */ 1356 len = (len + 3) >> 2; 1357 data32 = cmd; 1358 |
1359 /* Clear any left over pending doorbell interupts */ | 1359 /* Clear any left over pending doorbell interrupts */ |
1360 if (MPT_DB_INTR(mpt_rd_intr(mpt))) 1361 mpt_write(mpt, MPT_OFFSET_INTR_STATUS, 0); 1362 1363 /* 1364 * Tell the handshake reg. we are going to send a command 1365 * and how long it is going to be. 1366 */ 1367 data = (MPI_FUNCTION_HANDSHAKE << MPI_DOORBELL_FUNCTION_SHIFT) | --- 722 unchanged lines hidden (view full) --- 2090 /* 2091 * Send the command off, but don't wait for it. 2092 */ 2093 mpt_send_cmd(mpt, req); 2094 return (0); 2095} 2096 2097/* | 1360 if (MPT_DB_INTR(mpt_rd_intr(mpt))) 1361 mpt_write(mpt, MPT_OFFSET_INTR_STATUS, 0); 1362 1363 /* 1364 * Tell the handshake reg. we are going to send a command 1365 * and how long it is going to be. 1366 */ 1367 data = (MPI_FUNCTION_HANDSHAKE << MPI_DOORBELL_FUNCTION_SHIFT) | --- 722 unchanged lines hidden (view full) --- 2090 /* 2091 * Send the command off, but don't wait for it. 2092 */ 2093 mpt_send_cmd(mpt, req); 2094 return (0); 2095} 2096 2097/* |
2098 * Un-mask the interupts on the chip. | 2098 * Un-mask the interrupts on the chip. |
2099 */ 2100void 2101mpt_enable_ints(struct mpt_softc *mpt) 2102{ 2103 /* Unmask every thing except door bell int */ 2104 mpt_write(mpt, MPT_OFFSET_INTR_MASK, MPT_INTR_DB_MASK); 2105} 2106 2107/* | 2099 */ 2100void 2101mpt_enable_ints(struct mpt_softc *mpt) 2102{ 2103 /* Unmask every thing except door bell int */ 2104 mpt_write(mpt, MPT_OFFSET_INTR_MASK, MPT_INTR_DB_MASK); 2105} 2106 2107/* |
2108 * Mask the interupts on the chip. | 2108 * Mask the interrupts on the chip. |
2109 */ 2110void 2111mpt_disable_ints(struct mpt_softc *mpt) 2112{ 2113 /* Mask all interrupts */ 2114 mpt_write(mpt, MPT_OFFSET_INTR_MASK, 2115 MPT_INTR_REPLY_MASK | MPT_INTR_DB_MASK); 2116} --- 726 unchanged lines hidden --- | 2109 */ 2110void 2111mpt_disable_ints(struct mpt_softc *mpt) 2112{ 2113 /* Mask all interrupts */ 2114 mpt_write(mpt, MPT_OFFSET_INTR_MASK, 2115 MPT_INTR_REPLY_MASK | MPT_INTR_DB_MASK); 2116} --- 726 unchanged lines hidden --- |