]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/qla2xxx/qla_def.h
[SCSI] qla2xxx: Drop noisy 'UNDERRUN' status message.
[linux-2.6-omap-h63xx.git] / drivers / scsi / qla2xxx / qla_def.h
index fc3234c3625b0ff698a6fd4b7b3a69a1a95a0b31..79d8a914f9d0f4ddb213fd1bd9d5b63f68c39138 100644 (file)
@@ -21,6 +21,8 @@
 #include <linux/spinlock.h>
 #include <linux/completion.h>
 #include <linux/interrupt.h>
+#include <linux/workqueue.h>
+#include <linux/firmware.h>
 #include <asm/semaphore.h>
 
 #include <scsi/scsi.h>
@@ -28,6 +30,7 @@
 #include <scsi/scsi_device.h>
 #include <scsi/scsi_cmnd.h>
 
+#if defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE)
 #if defined(CONFIG_SCSI_QLA21XX) || defined(CONFIG_SCSI_QLA21XX_MODULE)
 #define IS_QLA2100(ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2100)
 #else
 #define IS_QLA2522(ha) 0
 #endif
 
+#else  /* !defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE) */
+
+#define IS_QLA2100(ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2100)
+#define IS_QLA2200(ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2200)
+#define IS_QLA2300(ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2300)
+#define IS_QLA2312(ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2312)
+#define IS_QLA2322(ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2322)
+#define IS_QLA6312(ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP6312)
+#define IS_QLA6322(ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP6322)
+#define IS_QLA2422(ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2422)
+#define IS_QLA2432(ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2432)
+#define IS_QLA2512(ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2512)
+#define IS_QLA2522(ha) ((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2522)
+#endif
+
 #define IS_QLA23XX(ha) (IS_QLA2300(ha) || IS_QLA2312(ha) || IS_QLA2322(ha) || \
                         IS_QLA6312(ha) || IS_QLA6322(ha))
-
 #define IS_QLA24XX(ha) (IS_QLA2422(ha) || IS_QLA2432(ha))
 #define IS_QLA25XX(ha) (IS_QLA2512(ha) || IS_QLA2522(ha))
 
@@ -1665,6 +1682,8 @@ typedef struct fc_port {
 
        struct fc_rport *rport;
        u32 supported_classes;
+       struct work_struct rport_add_work;
+       struct work_struct rport_del_work;
 } fc_port_t;
 
 /*
@@ -2121,6 +2140,12 @@ struct qla_board_info {
        struct scsi_host_template *sht;
 };
 
+struct fw_blob {
+       char *name;
+       uint32_t segs[4];
+       const struct firmware *fw;
+};
+
 /* Return data from MBC_GET_ID_LIST call. */
 struct gid_list_info {
        uint8_t al_pa;
@@ -2473,17 +2498,9 @@ typedef struct scsi_qla_host {
  */
 #define LOOP_TRANSITION(ha) \
        (test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || \
-        test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags))
-
-#define LOOP_NOT_READY(ha) \
-       ((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || \
-         test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || \
-         test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \
-         test_bit(LOOP_RESYNC_ACTIVE, &ha->dpc_flags)) || \
+        test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \
         atomic_read(&ha->loop_state) == LOOP_DOWN)
 
-#define LOOP_RDY(ha)   (!LOOP_NOT_READY(ha))
-
 #define TGT_Q(ha, t) (ha->otgt[t])
 
 #define to_qla_host(x)         ((scsi_qla_host_t *) (x)->hostdata)