summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2003-06-28 04:43:19 +0000
committergibbs <gibbs@FreeBSD.org>2003-06-28 04:43:19 +0000
commit5473e39568c7cd94479a81a77b7556590c16d777 (patch)
tree5340c2c6f688c9c5d62b237f907401d9173154d1 /sys/dev/aic7xxx
parent823e5bf4ee92e5884e7d49ae45b39be9cc31da4f (diff)
downloadFreeBSD-src-5473e39568c7cd94479a81a77b7556590c16d777.zip
FreeBSD-src-5473e39568c7cd94479a81a77b7556590c16d777.tar.gz
Implement ahd_inq_scbram() and change the implemention
of ahd_inl_scbram to use ahd_inw_scbram instead of ahd_inb_scbram().
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r--sys/dev/aic7xxx/aic79xx_inline.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/aic7xxx/aic79xx_inline.h b/sys/dev/aic7xxx/aic79xx_inline.h
index 9346d47..440212a 100644
--- a/sys/dev/aic7xxx/aic79xx_inline.h
+++ b/sys/dev/aic7xxx/aic79xx_inline.h
@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
- * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#50 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#51 $
*
* $FreeBSD$
*/
@@ -455,6 +455,8 @@ static __inline u_int ahd_inb_scbram(struct ahd_softc *ahd, u_int offset);
static __inline u_int ahd_inw_scbram(struct ahd_softc *ahd, u_int offset);
static __inline uint32_t
ahd_inl_scbram(struct ahd_softc *ahd, u_int offset);
+static __inline uint64_t
+ ahd_inq_scbram(struct ahd_softc *ahd, u_int offset);
static __inline void ahd_swap_with_next_hscb(struct ahd_softc *ahd,
struct scb *scb);
static __inline void ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb);
@@ -697,10 +699,15 @@ ahd_inw_scbram(struct ahd_softc *ahd, u_int offset)
static __inline uint32_t
ahd_inl_scbram(struct ahd_softc *ahd, u_int offset)
{
- return (ahd_inb_scbram(ahd, offset)
- | (ahd_inb_scbram(ahd, offset+1) << 8)
- | (ahd_inb_scbram(ahd, offset+2) << 16)
- | (ahd_inb_scbram(ahd, offset+3) << 24));
+ return (ahd_inw_scbram(ahd, offset)
+ | (ahd_inw_scbram(ahd, offset+2) << 16));
+}
+
+static __inline uint64_t
+ahd_inq_scbram(struct ahd_softc *ahd, u_int offset)
+{
+ return (ahd_inl_scbram(ahd, offset)
+ | ((uint64_t)ahd_inl_scbram(ahd, offset+4)) << 32);
}
static __inline struct scb *
OpenPOWER on IntegriCloud