Merge branch 'master' into upstream
[pandora-kernel.git] / drivers / scsi / lpfc / lpfc_scsi.h
index 0fd9ba1..cdcd253 100644 (file)
 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 :                             \
@@ -78,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.
-        */
-#ifdef __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 */