[SCSI] lpfc: NPIV: split ports
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / scsi / lpfc / lpfc_sli.h
index e26de6809358a8529b5df6b2a3e88611be709cbd..0e857e51a2c47f3d94091156c803d597cfd4e696 100644 (file)
@@ -1,7 +1,7 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
  * Fibre Channel Host Bus Adapters.                                *
- * Copyright (C) 2004-2006 Emulex.  All rights reserved.           *
+ * Copyright (C) 2004-2007 Emulex.  All rights reserved.           *
  * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
  *                                                                 *
@@ -20,6 +20,7 @@
 
 /* forward declaration for LPFC_IOCB_t's use */
 struct lpfc_hba;
+struct lpfc_vport;
 
 /* Define the context types that SLI handles for abort and sums. */
 typedef enum _lpfc_ctx_cmd {
@@ -39,13 +40,15 @@ struct lpfc_iocbq {
        IOCB_t iocb;            /* IOCB cmd */
        uint8_t retry;          /* retry counter for IOCB cmd - if needed */
        uint8_t iocb_flag;
-#define LPFC_IO_LIBDFC 1       /* libdfc iocb */
-#define LPFC_IO_WAKE   2       /* High Priority Queue signal flag */
-#define LPFC_IO_FCP    4       /* FCP command -- iocbq in scsi_buf */
+#define LPFC_IO_LIBDFC         1       /* libdfc iocb */
+#define LPFC_IO_WAKE           2       /* High Priority Queue signal flag */
+#define LPFC_IO_FCP            4       /* FCP command -- iocbq in scsi_buf */
+#define LPFC_DRIVER_ABORTED    8       /* driver aborted this request */
 
        uint8_t abort_count;
        uint8_t rsvd2;
        uint32_t drvrTimeout;   /* driver timeout in seconds */
+       struct lpfc_vport *vport;/* virtual port pointer */
        void *context1;         /* caller context information */
        void *context2;         /* caller context information */
        void *context3;         /* caller context information */
@@ -67,14 +70,18 @@ struct lpfc_iocbq {
 #define IOCB_ERROR          2
 #define IOCB_TIMEDOUT       3
 
+#define LPFC_MBX_WAKE  1
+
 typedef struct lpfcMboxq {
        /* MBOXQs are used in single linked lists */
        struct list_head list;  /* ptr to next mailbox command */
        MAILBOX_t mb;           /* Mailbox cmd */
+       struct lpfc_vport *vport;/* virutal port pointer */
        void *context1;         /* caller context information */
        void *context2;         /* caller context information */
 
        void (*mbox_cmpl) (struct lpfc_hba *, struct lpfcMboxq *);
+       uint8_t mbox_flag;
 
 } LPFC_MBOXQ_t;
 
@@ -193,12 +200,13 @@ struct lpfc_sli {
 #define LPFC_SLI_MBOX_ACTIVE      0x100        /* HBA mailbox is currently active */
 #define LPFC_SLI2_ACTIVE          0x200        /* SLI2 overlay in firmware is active */
 #define LPFC_PROCESS_LA           0x400        /* Able to process link attention */
+#define LPFC_BLOCK_MGMT_IO        0x800        /* Don't allow mgmt mbx or iocb cmds */
 
        struct lpfc_sli_ring ring[LPFC_MAX_RING];
        int fcp_ring;           /* ring used for FCP initiator commands */
        int next_ring;
 
-       int ip_ring;            /* ring used for IP network drv cmds */
+       int extra_ring;         /* extra ring used for other protocols */
 
        struct lpfc_sli_stat slistat;   /* SLI statistical info */
        struct list_head mboxq;