Thu Dec 3 14:51:48 2009 UTC ()
Have as a backup at least *some* usable WWN.


(mjacob)
diff -r1.69 -r1.70 src/sys/dev/ic/isp_netbsd.h

cvs diff -r1.69 -r1.70 src/sys/dev/ic/isp_netbsd.h (expand / switch to unified diff)

--- src/sys/dev/ic/isp_netbsd.h 2009/11/23 02:13:46 1.69
+++ src/sys/dev/ic/isp_netbsd.h 2009/12/03 14:51:48 1.70
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: isp_netbsd.h,v 1.69 2009/11/23 02:13:46 rmind Exp $ */ 1/* $NetBSD: isp_netbsd.h,v 1.70 2009/12/03 14:51:48 mjacob Exp $ */
2/* 2/*
3 * NetBSD Specific definitions for the Qlogic ISP Host Adapter 3 * NetBSD Specific definitions for the Qlogic ISP Host Adapter
4 */ 4 */
5/* 5/*
6 * Copyright (C) 1997, 1998, 1999 National Aeronautics & Space Administration 6 * Copyright (C) 1997, 1998, 1999 National Aeronautics & Space Administration
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Additional Copyright (C) 2000-2007 by Matthew Jacob 9 * Additional Copyright (C) 2000-2007 by Matthew Jacob
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions 13 * modification, are permitted provided that the following conditions
14 * are met: 14 * are met:
@@ -258,31 +258,33 @@ default: \ @@ -258,31 +258,33 @@ default: \
258 xs->error = XS_SENSE; \ 258 xs->error = XS_SENSE; \
259 } \ 259 } \
260 memcpy(&(xs)->sense, ptr, imin(XS_SNSLEN(xs), len)) 260 memcpy(&(xs)->sense, ptr, imin(XS_SNSLEN(xs), len))
261 261
262#define DEFAULT_FRAMESIZE(isp) (isp)->isp_osinfo.framesize 262#define DEFAULT_FRAMESIZE(isp) (isp)->isp_osinfo.framesize
263#define DEFAULT_EXEC_THROTTLE(isp) (isp)->isp_osinfo.exec_throttle 263#define DEFAULT_EXEC_THROTTLE(isp) (isp)->isp_osinfo.exec_throttle
264#define GET_DEFAULT_ROLE(isp, chan) ISP_ROLE_INITIATOR 264#define GET_DEFAULT_ROLE(isp, chan) ISP_ROLE_INITIATOR
265#define SET_DEFAULT_ROLE(isp, chan) do { } while (0) 265#define SET_DEFAULT_ROLE(isp, chan) do { } while (0)
266#define DEFAULT_IID(x, chan) 7 266#define DEFAULT_IID(x, chan) 7
267#define DEFAULT_LOOPID(x, chan) 108 267#define DEFAULT_LOOPID(x, chan) 108
268#define DEFAULT_NODEWWN(isp, chan) (isp)->isp_osinfo.wwn 268#define DEFAULT_NODEWWN(isp, chan) (isp)->isp_osinfo.wwn
269#define DEFAULT_PORTWWN(isp, chan) (isp)->isp_osinfo.wwn 269#define DEFAULT_PORTWWN(isp, chan) (isp)->isp_osinfo.wwn
270#define ACTIVE_NODEWWN(isp, chan) \ 270#define ACTIVE_NODEWWN(isp, chan) \
271 (isp)->isp_osinfo.wwn? (isp)->isp_osinfo.wwn : \ 271 ((isp)->isp_osinfo.wwn? (isp)->isp_osinfo.wwn : \
272 FCPARAM(isp, chan)->isp_wwnn_nvram 272 (FCPARAM(isp, chan)->isp_wwnn_nvram? \
 273 FCPARAM(isp, chan)->isp_wwnn_nvram : 0x400000007F000008ull))
273#define ACTIVE_PORTWWN(isp, chan) \ 274#define ACTIVE_PORTWWN(isp, chan) \
274 (isp)->isp_osinfo.wwn? (isp)->isp_osinfo.wwn : \ 275 ((isp)->isp_osinfo.wwn? (isp)->isp_osinfo.wwn : \
275 FCPARAM(isp, chan)->isp_wwpn_nvram 276 (FCPARAM(isp, chan)->isp_wwpn_nvram? \
 277 FCPARAM(isp, chan)->isp_wwpn_nvram : 0x400000007F000008ull))
276 278
277#if _BYTE_ORDER == _BIG_ENDIAN 279#if _BYTE_ORDER == _BIG_ENDIAN
278#ifdef ISP_SBUS_SUPPORTED 280#ifdef ISP_SBUS_SUPPORTED
279#define ISP_IOXPUT_8(isp, s, d) *(d) = s 281#define ISP_IOXPUT_8(isp, s, d) *(d) = s
280#define ISP_IOXPUT_16(isp, s, d) \ 282#define ISP_IOXPUT_16(isp, s, d) \
281 *(d) = (isp->isp_bustype == ISP_BT_SBUS)? s : bswap16(s) 283 *(d) = (isp->isp_bustype == ISP_BT_SBUS)? s : bswap16(s)
282#define ISP_IOXPUT_32(isp, s, d) \ 284#define ISP_IOXPUT_32(isp, s, d) \
283 *(d) = (isp->isp_bustype == ISP_BT_SBUS)? s : bswap32(s) 285 *(d) = (isp->isp_bustype == ISP_BT_SBUS)? s : bswap32(s)
284 286
285#define ISP_IOXGET_8(isp, s, d) d = (*((uint8_t *)s)) 287#define ISP_IOXGET_8(isp, s, d) d = (*((uint8_t *)s))
286#define ISP_IOXGET_16(isp, s, d) \ 288#define ISP_IOXGET_16(isp, s, d) \
287 d = (isp->isp_bustype == ISP_BT_SBUS)? \ 289 d = (isp->isp_bustype == ISP_BT_SBUS)? \
288 *((uint16_t *)s) : bswap16(*((uint16_t *)s)) 290 *((uint16_t *)s) : bswap16(*((uint16_t *)s))