aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_def.h
diff options
context:
space:
mode:
author <andrew.vasquez@qlogic.com>2005-04-17 16:06:53 -0400
committerJames Bottomley <jejb@titanic>2005-04-18 14:47:46 -0400
commitbdf796210e01145fd77bbb3ae644d04f982b6c3b (patch)
tree92253748a63c51e76a70384d35119e107077b050 /drivers/scsi/qla2xxx/qla_def.h
parent8482e118afa0cb4321ab3d30b1100d27d63130c0 (diff)
[PATCH] qla2xxx: remove lun discovery codes...
Remove internal lun discovery routines and support structures. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h103
1 files changed, 2 insertions, 101 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index b153d64bb966..7d47b8d92047 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -241,6 +241,7 @@ typedef struct srb {
241 struct list_head list; 241 struct list_head list;
242 242
243 struct scsi_qla_host *ha; /* HA the SP is queued on */ 243 struct scsi_qla_host *ha; /* HA the SP is queued on */
244 struct fc_port *fcport;
244 245
245 struct scsi_cmnd *cmd; /* Linux SCSI command pkt */ 246 struct scsi_cmnd *cmd; /* Linux SCSI command pkt */
246 247
@@ -251,11 +252,6 @@ typedef struct srb {
251 /* Request state */ 252 /* Request state */
252 uint16_t state; 253 uint16_t state;
253 254
254 /* Target/LUN queue pointers. */
255 struct os_tgt *tgt_queue; /* ptr to visible ha's target */
256 struct os_lun *lun_queue; /* ptr to visible ha's lun */
257 struct fc_lun *fclun; /* FC LUN context pointer. */
258
259 /* Timing counts. */ 255 /* Timing counts. */
260 unsigned long e_start; /* Start of extend timeout */ 256 unsigned long e_start; /* Start of extend timeout */
261 unsigned long r_start; /* Start of request */ 257 unsigned long r_start; /* Start of request */
@@ -1603,73 +1599,6 @@ typedef struct {
1603} rpt_lun_cmd_rsp_t; 1599} rpt_lun_cmd_rsp_t;
1604 1600
1605/* 1601/*
1606 * SCSI Target Queue structure
1607 */
1608typedef struct os_tgt {
1609 struct os_lun *olun[MAX_LUNS]; /* LUN context pointer. */
1610 struct fc_port *fcport;
1611 unsigned long flags;
1612 uint8_t port_down_retry_count;
1613 uint32_t down_timer;
1614 struct scsi_qla_host *ha;
1615
1616 /* Persistent binding information */
1617 port_id_t d_id;
1618 uint8_t node_name[WWN_SIZE];
1619 uint8_t port_name[WWN_SIZE];
1620} os_tgt_t;
1621
1622/*
1623 * SCSI Target Queue flags
1624 */
1625#define TQF_ONLINE 0 /* Device online to OS. */
1626#define TQF_SUSPENDED 1
1627#define TQF_RETRY_CMDS 2
1628
1629/*
1630 * SCSI LUN Queue structure
1631 */
1632typedef struct os_lun {
1633 struct fc_lun *fclun; /* FC LUN context pointer. */
1634 spinlock_t q_lock; /* Lun Lock */
1635
1636 unsigned long q_flag;
1637#define LUN_MPIO_RESET_CNTS 1 /* Lun */
1638#define LUN_MPIO_BUSY 2 /* Lun is changing paths */
1639#define LUN_EXEC_DELAYED 7 /* Lun execution is delayed */
1640
1641 u_long q_timeout; /* total command timeouts */
1642 atomic_t q_timer; /* suspend timer */
1643 uint32_t q_count; /* current count */
1644 uint32_t q_max; /* maxmum count lun can be suspended */
1645 uint8_t q_state; /* lun State */
1646#define LUN_STATE_READY 1 /* lun is ready for i/o */
1647#define LUN_STATE_RUN 2 /* lun has a timer running */
1648#define LUN_STATE_WAIT 3 /* lun is suspended */
1649#define LUN_STATE_TIMEOUT 4 /* lun has timed out */
1650
1651 u_long io_cnt; /* total xfer count since boot */
1652 u_long out_cnt; /* total outstanding IO count */
1653 u_long w_cnt; /* total writes */
1654 u_long r_cnt; /* total reads */
1655 u_long avg_time; /* */
1656} os_lun_t;
1657
1658
1659/* LUN BitMask structure definition, array of 32bit words,
1660 * 1 bit per lun. When bit == 1, the lun is masked.
1661 * Most significant bit of mask[0] is lun 0, bit 24 is lun 7.
1662 */
1663typedef struct lun_bit_mask {
1664 /* Must allocate at least enough bits to accomodate all LUNs */
1665#if ((MAX_FIBRE_LUNS & 0x7) == 0)
1666 uint8_t mask[MAX_FIBRE_LUNS >> 3];
1667#else
1668 uint8_t mask[(MAX_FIBRE_LUNS + 8) >> 3];
1669#endif
1670} lun_bit_mask_t;
1671
1672/*
1673 * Fibre channel port type. 1602 * Fibre channel port type.
1674 */ 1603 */
1675 typedef enum { 1604 typedef enum {
@@ -1686,8 +1615,6 @@ typedef struct lun_bit_mask {
1686 */ 1615 */
1687typedef struct fc_port { 1616typedef struct fc_port {
1688 struct list_head list; 1617 struct list_head list;
1689 struct list_head fcluns;
1690
1691 struct scsi_qla_host *ha; 1618 struct scsi_qla_host *ha;
1692 struct scsi_qla_host *vis_ha; /* only used when suspending lun */ 1619 struct scsi_qla_host *vis_ha; /* only used when suspending lun */
1693 1620
@@ -1702,8 +1629,7 @@ typedef struct fc_port {
1702 atomic_t state; 1629 atomic_t state;
1703 uint32_t flags; 1630 uint32_t flags;
1704 1631
1705 os_tgt_t *tgt_queue; 1632 unsigned int os_target_id;
1706 uint16_t os_target_id;
1707 1633
1708 uint16_t iodesc_idx_sent; 1634 uint16_t iodesc_idx_sent;
1709 1635
@@ -1717,7 +1643,6 @@ typedef struct fc_port {
1717 uint8_t mp_byte; /* multi-path byte (not used) */ 1643 uint8_t mp_byte; /* multi-path byte (not used) */
1718 uint8_t cur_path; /* current path id */ 1644 uint8_t cur_path; /* current path id */
1719 1645
1720 lun_bit_mask_t lun_mask;
1721 struct fc_rport *rport; 1646 struct fc_rport *rport;
1722} fc_port_t; 1647} fc_port_t;
1723 1648
@@ -1765,25 +1690,6 @@ typedef struct fc_port {
1765#define FC_NO_LOOP_ID 0x1000 1690#define FC_NO_LOOP_ID 0x1000
1766 1691
1767/* 1692/*
1768 * Fibre channel LUN structure.
1769 */
1770typedef struct fc_lun {
1771 struct list_head list;
1772
1773 fc_port_t *fcport;
1774 fc_port_t *o_fcport;
1775 uint16_t lun;
1776 atomic_t state;
1777 uint8_t device_type;
1778
1779 uint8_t max_path_retries;
1780 uint32_t flags;
1781} fc_lun_t;
1782
1783#define FLF_VISIBLE_LUN BIT_0
1784#define FLF_ACTIVE_LUN BIT_1
1785
1786/*
1787 * FC-CT interface 1693 * FC-CT interface
1788 * 1694 *
1789 * NOTE: All structures are big-endian in form. 1695 * NOTE: All structures are big-endian in form.
@@ -2253,9 +2159,6 @@ typedef struct scsi_qla_host {
2253 struct io_descriptor io_descriptors[MAX_IO_DESCRIPTORS]; 2159 struct io_descriptor io_descriptors[MAX_IO_DESCRIPTORS];
2254 uint16_t iodesc_signature; 2160 uint16_t iodesc_signature;
2255 2161
2256 /* OS target queue pointers. */
2257 os_tgt_t *otgt[MAX_FIBRE_DEVICES];
2258
2259 /* RSCN queue. */ 2162 /* RSCN queue. */
2260 uint32_t rscn_queue[MAX_RSCN_COUNT]; 2163 uint32_t rscn_queue[MAX_RSCN_COUNT];
2261 uint8_t rscn_in_ptr; 2164 uint8_t rscn_in_ptr;
@@ -2400,8 +2303,6 @@ typedef struct scsi_qla_host {
2400#define LOOP_RDY(ha) (!LOOP_NOT_READY(ha)) 2303#define LOOP_RDY(ha) (!LOOP_NOT_READY(ha))
2401 2304
2402#define TGT_Q(ha, t) (ha->otgt[t]) 2305#define TGT_Q(ha, t) (ha->otgt[t])
2403#define LUN_Q(ha, t, l) (TGT_Q(ha, t)->olun[l])
2404#define GET_LU_Q(ha, t, l) ((TGT_Q(ha,t) != NULL)? TGT_Q(ha, t)->olun[l] : NULL)
2405 2306
2406#define to_qla_host(x) ((scsi_qla_host_t *) (x)->hostdata) 2307#define to_qla_host(x) ((scsi_qla_host_t *) (x)->hostdata)
2407 2308