isp_freebsd.h (84629) | isp_freebsd.h (87635) |
---|---|
1/* $FreeBSD: head/sys/dev/isp/isp_freebsd.h 84629 2001-10-07 18:18:50Z mjacob $ */ | 1/* $FreeBSD: head/sys/dev/isp/isp_freebsd.h 87635 2001-12-11 00:18:45Z mjacob $ */ |
2/* 3 * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions 4 * Copyright (c) 1997, 1998, 1999, 2000, 2001 by Matthew Jacob 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: 9 * 1. Redistributions of source code must retain the above copyright --- 45 unchanged lines hidden (view full) --- 55#include <cam/cam_xpt.h> 56#include <cam/cam_xpt_sim.h> 57#include <cam/cam_debug.h> 58#include <cam/scsi/scsi_all.h> 59#include <cam/scsi/scsi_message.h> 60 61#include "opt_ddb.h" 62#include "opt_isp.h" | 2/* 3 * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions 4 * Copyright (c) 1997, 1998, 1999, 2000, 2001 by Matthew Jacob 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: 9 * 1. Redistributions of source code must retain the above copyright --- 45 unchanged lines hidden (view full) --- 55#include <cam/cam_xpt.h> 56#include <cam/cam_xpt_sim.h> 57#include <cam/cam_debug.h> 58#include <cam/scsi/scsi_all.h> 59#include <cam/scsi/scsi_message.h> 60 61#include "opt_ddb.h" 62#include "opt_isp.h" |
63/* 64 * Efficiency- get rid of SBus code && tests unless we need them. 65 */ 66#if defined(__sparcv9__ ) || defined(__sparc__) 67#define ISP_SBUS_SUPPORTED 1 68#else 69#define ISP_SBUS_SUPPORTED 0 70#endif |
|
63 64#define HANDLE_LOOPSTATE_IN_OUTER_LAYERS 1 65 66typedef void ispfwfunc __P((int, int, int, const u_int16_t **)); 67 68#ifdef ISP_TARGET_MODE | 71 72#define HANDLE_LOOPSTATE_IN_OUTER_LAYERS 1 73 74typedef void ispfwfunc __P((int, int, int, const u_int16_t **)); 75 76#ifdef ISP_TARGET_MODE |
77#define ISP_TARGET_FUNCTIONS 1 |
|
69#define ATPDPSIZE 256 70typedef struct { 71 u_int32_t orig_datalen; 72 u_int32_t bytes_xfered; 73 u_int32_t last_xframt; 74 u_int32_t tag; 75} atio_private_data_t; 76 --- 182 unchanged lines hidden (view full) --- 259 260#define DEFAULT_IID(x) 7 261#define DEFAULT_LOOPID(x) 109 262#define DEFAULT_NODEWWN(isp) (isp)->isp_osinfo.default_node_wwn 263#define DEFAULT_PORTWWN(isp) (isp)->isp_osinfo.default_port_wwn 264#define ISP_NODEWWN(isp) FCPARAM(isp)->isp_nodewwn 265#define ISP_PORTWWN(isp) FCPARAM(isp)->isp_portwwn 266 | 78#define ATPDPSIZE 256 79typedef struct { 80 u_int32_t orig_datalen; 81 u_int32_t bytes_xfered; 82 u_int32_t last_xframt; 83 u_int32_t tag; 84} atio_private_data_t; 85 --- 182 unchanged lines hidden (view full) --- 268 269#define DEFAULT_IID(x) 7 270#define DEFAULT_LOOPID(x) 109 271#define DEFAULT_NODEWWN(isp) (isp)->isp_osinfo.default_node_wwn 272#define DEFAULT_PORTWWN(isp) (isp)->isp_osinfo.default_port_wwn 273#define ISP_NODEWWN(isp) FCPARAM(isp)->isp_nodewwn 274#define ISP_PORTWWN(isp) FCPARAM(isp)->isp_portwwn 275 |
267#define ISP_UNSWIZZLE_AND_COPY_PDBP(isp, dest, src) \ 268 if((void *)src != (void *)dest) bcopy(src, dest, sizeof (isp_pdb_t)) 269#define ISP_SWIZZLE_ICB(a, b) 270#define ISP_SWIZZLE_REQUEST(a, b) 271#define ISP_UNSWIZZLE_RESPONSE(a, b, c) 272#define ISP_SWIZZLE_SNS_REQ(a, b) 273#define ISP_UNSWIZZLE_SNS_RSP(a, b, c) 274#define ISP_SWIZZLE_NVRAM_WORD(isp, x) | 276#if BYTE_ORDER == BIG_ENDIAN 277#ifdef ISP_SBUS_SUPPORTED 278#define ISP_IOXPUT_8(isp, s, d) *(d) = s 279#define ISP_IOXPUT_16(isp, s, d) \ 280 *(d) = (isp->isp_bustype == ISP_BT_SBUS)? s : bswap16(s) 281#define ISP_IOXPUT_32(isp, s, d) \ 282 *(d) = (isp->isp_bustype == ISP_BT_SBUS)? s : bswap32(s) 283#define ISP_IOXGET_8(isp, s, d) d = (*((u_int8_t *)s)) 284#define ISP_IOXGET_16(isp, s, d) \ 285 d = (isp->isp_bustype == ISP_BT_SBUS)? \ 286 *((u_int16_t *)s) : bswap16(*((u_int16_t *)s)) 287#define ISP_IOXGET_32(isp, s, d) \ 288 d = (isp->isp_bustype == ISP_BT_SBUS)? \ 289 *((u_int32_t *)s) : bswap32(*((u_int32_t *)s)) 290#else 291#define ISP_IOXPUT_8(isp, s, d) *(d) = s 292#define ISP_IOXPUT_16(isp, s, d) *(d) = bswap16(s) 293#define ISP_IOXPUT_32(isp, s, d) *(d) = bswap32(s) 294#define ISP_IOXGET_8(isp, s, d) d = (*((u_int8_t *)s)) 295#define ISP_IOXGET_16(isp, s, d) d = bswap16(*((u_int16_t *)s)) 296#define ISP_IOXGET_32(isp, s, d) d = bswap32(*((u_int32_t *)s)) 297#endif 298#define ISP_SWIZZLE_NVRAM_WORD(isp, rp) *rp = bswap16(*rp) 299#else 300#define ISP_IOXPUT_8(isp, s, d) *(d) = s 301#define ISP_IOXPUT_16(isp, s, d) *(d) = s 302#define ISP_IOXPUT_32(isp, s, d) *(d) = s 303#define ISP_IOXGET_8(isp, s, d) d = *(s) 304#define ISP_IOXGET_16(isp, s, d) d = *(s) 305#define ISP_IOXGET_32(isp, s, d) d = *(s) 306#define ISP_SWIZZLE_NVRAM_WORD(isp, rp) 307#endif |
275 276/* 277 * Includes of common header files 278 */ 279 280#include <dev/isp/ispreg.h> 281#include <dev/isp/ispvar.h> 282#include <dev/isp/ispmbox.h> --- 121 unchanged lines hidden --- | 308 309/* 310 * Includes of common header files 311 */ 312 313#include <dev/isp/ispreg.h> 314#include <dev/isp/ispvar.h> 315#include <dev/isp/ispmbox.h> --- 121 unchanged lines hidden --- |