Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / scsi / lpfc / lpfc_scsi.h
index 4aafba4..cdcd253 100644 (file)
@@ -1,34 +1,35 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_scsi.h 1.83 2005/04/07 08:47:43EDT sf_support Exp  $
- */
+#include <asm/byteorder.h>
 
 struct lpfc_hba;
 
 #define list_remove_head(list, entry, type, member)            \
+       do {                                                    \
+       entry = NULL;                                           \
        if (!list_empty(list)) {                                \
                entry = list_entry((list)->next, type, member); \
                list_del_init(&entry->member);                  \
-       }
+       }                                                       \
+       } while(0)
 
 #define list_get_first(list, type, member)                     \
        (list_empty(list)) ? NULL :                             \
@@ -80,18 +81,7 @@ struct fcp_rsp {
 };
 
 struct fcp_cmnd {
-       uint32_t fcpLunMsl;     /* most  significant lun word (32 bits) */
-       uint32_t fcpLunLsl;     /* least significant lun word (32 bits) */
-       /* # of bits to shift lun id to end up in right
-        * payload word, little endian = 8, big = 16.
-        */
-#if __BIG_ENDIAN
-#define FC_LUN_SHIFT         16
-#define FC_ADDR_MODE_SHIFT   24
-#else  /*  __LITTLE_ENDIAN */
-#define FC_LUN_SHIFT         8
-#define FC_ADDR_MODE_SHIFT   0
-#endif
+       struct scsi_lun  fcp_lun;
 
        uint8_t fcpCntl0;       /* FCP_CNTL byte 0 (reserved) */
        uint8_t fcpCntl1;       /* FCP_CNTL byte 1 task codes */