aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.c1
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h116
-rw-r--r--drivers/scsi/qla2xxx/qla_gbl.h2
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c17
-rw-r--r--drivers/scsi/qla2xxx/qla_iocb.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c5
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c30
-rw-r--r--drivers/scsi/qla2xxx/qla_rscn.c1
-rw-r--r--drivers/scsi/qla2xxx/qla_settings.h1
9 files changed, 5 insertions, 170 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 2d9b12ffe09c..e8120fb7f88e 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -1995,7 +1995,6 @@ qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd)
1995 return; 1995 return;
1996 1996
1997 printk(" sp flags=0x%x\n", sp->flags); 1997 printk(" sp flags=0x%x\n", sp->flags);
1998 printk(" state=%d\n", sp->state);
1999} 1998}
2000 1999
2001void 2000void
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 488124258e84..4bd67e9c2840 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -189,22 +189,13 @@ typedef struct srb {
189 189
190 struct scsi_cmnd *cmd; /* Linux SCSI command pkt */ 190 struct scsi_cmnd *cmd; /* Linux SCSI command pkt */
191 191
192 struct timer_list timer; /* Command timer */
193 atomic_t ref_count; /* Reference count for this structure */
194 uint16_t flags; 192 uint16_t flags;
195 193
196 /* Request state */
197 uint16_t state;
198
199 /* Single transfer DMA context */ 194 /* Single transfer DMA context */
200 dma_addr_t dma_handle; 195 dma_addr_t dma_handle;
201 196
202 uint32_t request_sense_length; 197 uint32_t request_sense_length;
203 uint8_t *request_sense_ptr; 198 uint8_t *request_sense_ptr;
204
205 /* SRB magic number */
206 uint16_t magic;
207#define SRB_MAGIC 0x10CB
208} srb_t; 199} srb_t;
209 200
210/* 201/*
@@ -226,21 +217,6 @@ typedef struct srb {
226#define SRB_TAPE BIT_11 /* FCP2 (Tape) command. */ 217#define SRB_TAPE BIT_11 /* FCP2 (Tape) command. */
227 218
228/* 219/*
229 * SRB state definitions
230 */
231#define SRB_FREE_STATE 0 /* returned back */
232#define SRB_PENDING_STATE 1 /* queued in LUN Q */
233#define SRB_ACTIVE_STATE 2 /* in Active Array */
234#define SRB_DONE_STATE 3 /* queued in Done Queue */
235#define SRB_RETRY_STATE 4 /* in Retry Queue */
236#define SRB_SUSPENDED_STATE 5 /* in suspended state */
237#define SRB_NO_QUEUE_STATE 6 /* is in between states */
238#define SRB_ACTIVE_TIMEOUT_STATE 7 /* in Active Array but timed out */
239#define SRB_FAILOVER_STATE 8 /* in Failover Queue */
240#define SRB_SCSI_RETRY_STATE 9 /* in Scsi Retry Queue */
241
242
243/*
244 * ISP I/O Register Set structure definitions. 220 * ISP I/O Register Set structure definitions.
245 */ 221 */
246struct device_reg_2xxx { 222struct device_reg_2xxx {
@@ -1516,62 +1492,6 @@ typedef struct {
1516} sw_info_t; 1492} sw_info_t;
1517 1493
1518/* 1494/*
1519 * Inquiry command structure.
1520 */
1521#define INQ_DATA_SIZE 36
1522
1523/*
1524 * Inquiry mailbox IOCB packet definition.
1525 */
1526typedef struct {
1527 union {
1528 cmd_a64_entry_t cmd;
1529 sts_entry_t rsp;
1530 struct cmd_type_7 cmd24;
1531 struct sts_entry_24xx rsp24;
1532 } p;
1533 uint8_t inq[INQ_DATA_SIZE];
1534} inq_cmd_rsp_t;
1535
1536/*
1537 * Report LUN command structure.
1538 */
1539#define CHAR_TO_SHORT(a, b) (uint16_t)((uint8_t)b << 8 | (uint8_t)a)
1540
1541typedef struct {
1542 uint32_t len;
1543 uint32_t rsrv;
1544} rpt_hdr_t;
1545
1546typedef struct {
1547 struct {
1548 uint8_t b : 6;
1549 uint8_t address_method : 2;
1550 } msb;
1551 uint8_t lsb;
1552 uint8_t unused[6];
1553} rpt_lun_t;
1554
1555typedef struct {
1556 rpt_hdr_t hdr;
1557 rpt_lun_t lst[MAX_LUNS];
1558} rpt_lun_lst_t;
1559
1560/*
1561 * Report Lun mailbox IOCB packet definition.
1562 */
1563typedef struct {
1564 union {
1565 cmd_a64_entry_t cmd;
1566 sts_entry_t rsp;
1567 struct cmd_type_7 cmd24;
1568 struct sts_entry_24xx rsp24;
1569 } p;
1570 rpt_lun_lst_t list;
1571} rpt_lun_cmd_rsp_t;
1572
1573
1574/*
1575 * Fibre channel port type. 1495 * Fibre channel port type.
1576 */ 1496 */
1577 typedef enum { 1497 typedef enum {
@@ -1589,7 +1509,6 @@ typedef struct {
1589typedef struct fc_port { 1509typedef struct fc_port {
1590 struct list_head list; 1510 struct list_head list;
1591 struct scsi_qla_host *ha; 1511 struct scsi_qla_host *ha;
1592 struct scsi_qla_host *vis_ha; /* only used when suspending lun */
1593 1512
1594 uint8_t node_name[WWN_SIZE]; 1513 uint8_t node_name[WWN_SIZE];
1595 uint8_t port_name[WWN_SIZE]; 1514 uint8_t port_name[WWN_SIZE];
@@ -1610,17 +1529,9 @@ typedef struct fc_port {
1610 int login_retry; 1529 int login_retry;
1611 atomic_t port_down_timer; 1530 atomic_t port_down_timer;
1612 1531
1613 uint8_t device_type;
1614 uint8_t unused;
1615
1616 uint8_t mp_byte; /* multi-path byte (not used) */
1617 uint8_t cur_path; /* current path id */
1618
1619 spinlock_t rport_lock; 1532 spinlock_t rport_lock;
1620 struct fc_rport *rport, *drport; 1533 struct fc_rport *rport, *drport;
1621 u32 supported_classes; 1534 u32 supported_classes;
1622 struct work_struct rport_add_work;
1623 struct work_struct rport_del_work;
1624} fc_port_t; 1535} fc_port_t;
1625 1536
1626/* 1537/*
@@ -2305,9 +2216,6 @@ typedef struct scsi_qla_host {
2305 uint32_t current_outstanding_cmd; 2216 uint32_t current_outstanding_cmd;
2306 srb_t *status_srb; /* Status continuation entry. */ 2217 srb_t *status_srb; /* Status continuation entry. */
2307 2218
2308 uint16_t revision;
2309 uint8_t ports;
2310
2311 /* ISP configuration data. */ 2219 /* ISP configuration data. */
2312 uint16_t loop_id; /* Host adapter loop id */ 2220 uint16_t loop_id; /* Host adapter loop id */
2313 uint16_t fb_rev; 2221 uint16_t fb_rev;
@@ -2397,9 +2305,6 @@ typedef struct scsi_qla_host {
2397 struct gid_list_info *gid_list; 2305 struct gid_list_info *gid_list;
2398 int gid_list_info_size; 2306 int gid_list_info_size;
2399 2307
2400 dma_addr_t rlc_rsp_dma;
2401 rpt_lun_cmd_rsp_t *rlc_rsp;
2402
2403 /* Small DMA pool allocations -- maximum 256 bytes in length. */ 2308 /* Small DMA pool allocations -- maximum 256 bytes in length. */
2404#define DMA_POOL_SIZE 256 2309#define DMA_POOL_SIZE 256
2405 struct dma_pool *s_dma_pool; 2310 struct dma_pool *s_dma_pool;
@@ -2505,8 +2410,6 @@ typedef struct scsi_qla_host {
2505 test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \ 2410 test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \
2506 atomic_read(&ha->loop_state) == LOOP_DOWN) 2411 atomic_read(&ha->loop_state) == LOOP_DOWN)
2507 2412
2508#define TGT_Q(ha, t) (ha->otgt[t])
2509
2510#define to_qla_host(x) ((scsi_qla_host_t *) (x)->hostdata) 2413#define to_qla_host(x) ((scsi_qla_host_t *) (x)->hostdata)
2511 2414
2512#define qla_printk(level, ha, format, arg...) \ 2415#define qla_printk(level, ha, format, arg...) \
@@ -2539,19 +2442,6 @@ typedef struct scsi_qla_host {
2539#define QLA_RSCNS_HANDLED 0x108 2442#define QLA_RSCNS_HANDLED 0x108
2540#define QLA_ALREADY_REGISTERED 0x109 2443#define QLA_ALREADY_REGISTERED 0x109
2541 2444
2542/*
2543* Stat info for all adpaters
2544*/
2545struct _qla2x00stats {
2546 unsigned long mboxtout; /* mailbox timeouts */
2547 unsigned long mboxerr; /* mailbox errors */
2548 unsigned long ispAbort; /* ISP aborts */
2549 unsigned long debugNo;
2550 unsigned long loop_resync;
2551 unsigned long outarray_full;
2552 unsigned long retry_q_cnt;
2553};
2554
2555#define NVRAM_DELAY() udelay(10) 2445#define NVRAM_DELAY() udelay(10)
2556 2446
2557#define INVALID_HANDLE (MAX_OUTSTANDING_COMMANDS+1) 2447#define INVALID_HANDLE (MAX_OUTSTANDING_COMMANDS+1)
@@ -2567,12 +2457,6 @@ struct _qla2x00stats {
2567#include "qla_dbg.h" 2457#include "qla_dbg.h"
2568#include "qla_inline.h" 2458#include "qla_inline.h"
2569 2459
2570/*
2571* String arrays
2572*/
2573#define LINESIZE 256
2574#define MAXARGS 26
2575
2576#define CMD_SP(Cmnd) ((Cmnd)->SCp.ptr) 2460#define CMD_SP(Cmnd) ((Cmnd)->SCp.ptr)
2577#define CMD_COMPL_STATUS(Cmnd) ((Cmnd)->SCp.this_residual) 2461#define CMD_COMPL_STATUS(Cmnd) ((Cmnd)->SCp.this_residual)
2578#define CMD_RESID_LEN(Cmnd) ((Cmnd)->SCp.buffers_residual) 2462#define CMD_RESID_LEN(Cmnd) ((Cmnd)->SCp.buffers_residual)
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
index 91e83e2c1eb8..26d1181b3389 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -70,8 +70,6 @@ extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *);
70 70
71extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *); 71extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *);
72 72
73extern void qla2x00_cmd_timeout(srb_t *);
74
75extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int, int); 73extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int, int);
76extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *, int); 74extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *, int);
77 75
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index b1b20f43d722..7e18b9c12654 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -194,7 +194,6 @@ qla2100_pci_config(scsi_qla_host_t *ha)
194 mwi = 0; 194 mwi = 0;
195 if (pci_set_mwi(ha->pdev)) 195 if (pci_set_mwi(ha->pdev))
196 mwi = PCI_COMMAND_INVALIDATE; 196 mwi = PCI_COMMAND_INVALIDATE;
197 pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision);
198 197
199 pci_read_config_word(ha->pdev, PCI_COMMAND, &w); 198 pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
200 w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); 199 w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
@@ -232,7 +231,6 @@ qla2300_pci_config(scsi_qla_host_t *ha)
232 mwi = 0; 231 mwi = 0;
233 if (pci_set_mwi(ha->pdev)) 232 if (pci_set_mwi(ha->pdev))
234 mwi = PCI_COMMAND_INVALIDATE; 233 mwi = PCI_COMMAND_INVALIDATE;
235 pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision);
236 234
237 pci_read_config_word(ha->pdev, PCI_COMMAND, &w); 235 pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
238 w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); 236 w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
@@ -320,7 +318,6 @@ qla24xx_pci_config(scsi_qla_host_t *ha)
320 mwi = 0; 318 mwi = 0;
321 if (pci_set_mwi(ha->pdev)) 319 if (pci_set_mwi(ha->pdev))
322 mwi = PCI_COMMAND_INVALIDATE; 320 mwi = PCI_COMMAND_INVALIDATE;
323 pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision);
324 321
325 pci_read_config_word(ha->pdev, PCI_COMMAND, &w); 322 pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
326 w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); 323 w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
@@ -1675,14 +1672,6 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
1675} 1672}
1676 1673
1677static void 1674static void
1678qla2x00_rport_add(void *data)
1679{
1680 fc_port_t *fcport = data;
1681
1682 qla2x00_reg_remote_port(fcport->ha, fcport);
1683}
1684
1685static void
1686qla2x00_rport_del(void *data) 1675qla2x00_rport_del(void *data)
1687{ 1676{
1688 fc_port_t *fcport = data; 1677 fc_port_t *fcport = data;
@@ -1724,8 +1713,6 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha, gfp_t flags)
1724 fcport->flags = FCF_RLC_SUPPORT; 1713 fcport->flags = FCF_RLC_SUPPORT;
1725 fcport->supported_classes = FC_COS_UNSPECIFIED; 1714 fcport->supported_classes = FC_COS_UNSPECIFIED;
1726 spin_lock_init(&fcport->rport_lock); 1715 spin_lock_init(&fcport->rport_lock);
1727 INIT_WORK(&fcport->rport_add_work, qla2x00_rport_add, fcport);
1728 INIT_WORK(&fcport->rport_del_work, qla2x00_rport_del, fcport);
1729 1716
1730 return (fcport); 1717 return (fcport);
1731} 1718}
@@ -2048,10 +2035,6 @@ qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
2048 PORT_RETRY_TIME); 2035 PORT_RETRY_TIME);
2049 fcport->flags &= ~FCF_LOGIN_NEEDED; 2036 fcport->flags &= ~FCF_LOGIN_NEEDED;
2050 2037
2051 if (fcport->port_type == FCT_INITIATOR ||
2052 fcport->port_type == FCT_BROADCAST)
2053 fcport->device_type = TYPE_PROCESSOR;
2054
2055 atomic_set(&fcport->state, FCS_ONLINE); 2038 atomic_set(&fcport->state, FCS_ONLINE);
2056 2039
2057 if (ha->flags.init_done) 2040 if (ha->flags.init_done)
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
index 8f0f4a298357..8c769cfaa14c 100644
--- a/drivers/scsi/qla2xxx/qla_iocb.c
+++ b/drivers/scsi/qla2xxx/qla_iocb.c
@@ -408,7 +408,6 @@ qla2x00_start_scsi(srb_t *sp)
408 ha->request_ring_ptr++; 408 ha->request_ring_ptr++;
409 409
410 sp->flags |= SRB_DMA_VALID; 410 sp->flags |= SRB_DMA_VALID;
411 sp->state = SRB_ACTIVE_STATE;
412 411
413 /* Set chip new ring index. */ 412 /* Set chip new ring index. */
414 WRT_REG_WORD(ISP_REQ_Q_IN(ha, reg), ha->req_ring_index); 413 WRT_REG_WORD(ISP_REQ_Q_IN(ha, reg), ha->req_ring_index);
@@ -838,7 +837,6 @@ qla24xx_start_scsi(srb_t *sp)
838 ha->request_ring_ptr++; 837 ha->request_ring_ptr++;
839 838
840 sp->flags |= SRB_DMA_VALID; 839 sp->flags |= SRB_DMA_VALID;
841 sp->state = SRB_ACTIVE_STATE;
842 840
843 /* Set chip new ring index. */ 841 /* Set chip new ring index. */
844 WRT_REG_DWORD(&reg->req_q_in, ha->req_ring_index); 842 WRT_REG_DWORD(&reg->req_q_in, ha->req_ring_index);
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 40325ec70056..39b5082eb3bc 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -844,8 +844,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
844 cp = sp->cmd; 844 cp = sp->cmd;
845 if (cp == NULL) { 845 if (cp == NULL) {
846 DEBUG2(printk("scsi(%ld): Command already returned back to OS " 846 DEBUG2(printk("scsi(%ld): Command already returned back to OS "
847 "pkt->handle=%d sp=%p sp->state:%d\n", 847 "pkt->handle=%d sp=%p.\n", ha->host_no, sts->handle, sp));
848 ha->host_no, sts->handle, sp, sp->state));
849 qla_printk(KERN_WARNING, ha, 848 qla_printk(KERN_WARNING, ha,
850 "Command is NULL: already returned to OS (sp=%p)\n", sp); 849 "Command is NULL: already returned to OS (sp=%p)\n", sp);
851 850
@@ -1189,7 +1188,7 @@ qla2x00_status_cont_entry(scsi_qla_host_t *ha, sts_cont_entry_t *pkt)
1189 cp = sp->cmd; 1188 cp = sp->cmd;
1190 if (cp == NULL) { 1189 if (cp == NULL) {
1191 DEBUG2(printk("%s(): Cmd already returned back to OS " 1190 DEBUG2(printk("%s(): Cmd already returned back to OS "
1192 "sp=%p sp->state:%d\n", __func__, sp, sp->state)); 1191 "sp=%p.\n", __func__, sp));
1193 qla_printk(KERN_INFO, ha, 1192 qla_printk(KERN_INFO, ha,
1194 "cmd is NULL: already returned to OS (sp=%p)\n", 1193 "cmd is NULL: already returned to OS (sp=%p)\n",
1195 sp); 1194 sp);
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index fbf3b03aba6b..77e67e1429ee 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -340,7 +340,6 @@ qla2x00_get_new_sp(scsi_qla_host_t *ha, fc_port_t *fcport,
340 if (!sp) 340 if (!sp)
341 return sp; 341 return sp;
342 342
343 atomic_set(&sp->ref_count, 1);
344 sp->ha = ha; 343 sp->ha = ha;
345 sp->fcport = fcport; 344 sp->fcport = fcport;
346 sp->cmd = cmd; 345 sp->cmd = cmd;
@@ -634,9 +633,8 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
634 if (sp->cmd != cmd) 633 if (sp->cmd != cmd)
635 continue; 634 continue;
636 635
637 DEBUG2(printk("%s(%ld): aborting sp %p from RISC. pid=%ld " 636 DEBUG2(printk("%s(%ld): aborting sp %p from RISC. pid=%ld.\n",
638 "sp->state=%x\n", __func__, ha->host_no, sp, serial, 637 __func__, ha->host_no, sp, serial));
639 sp->state));
640 DEBUG3(qla2x00_print_scsi_cmd(cmd);) 638 DEBUG3(qla2x00_print_scsi_cmd(cmd);)
641 639
642 spin_unlock_irqrestore(&ha->hardware_lock, flags); 640 spin_unlock_irqrestore(&ha->hardware_lock, flags);
@@ -1377,7 +1375,6 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
1377 spin_lock_init(&ha->hardware_lock); 1375 spin_lock_init(&ha->hardware_lock);
1378 1376
1379 ha->prev_topology = 0; 1377 ha->prev_topology = 0;
1380 ha->ports = MAX_BUSES;
1381 ha->init_cb_size = sizeof(init_cb_t); 1378 ha->init_cb_size = sizeof(init_cb_t);
1382 ha->mgmt_svr_loop_id = MANAGEMENT_SERVER; 1379 ha->mgmt_svr_loop_id = MANAGEMENT_SERVER;
1383 ha->link_data_rate = LDR_UNKNOWN; 1380 ha->link_data_rate = LDR_UNKNOWN;
@@ -1544,7 +1541,7 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
1544 host->cmd_per_lun = 3; 1541 host->cmd_per_lun = 3;
1545 host->unique_id = ha->instance; 1542 host->unique_id = ha->instance;
1546 host->max_cmd_len = MAX_CMDSZ; 1543 host->max_cmd_len = MAX_CMDSZ;
1547 host->max_channel = ha->ports - 1; 1544 host->max_channel = MAX_BUSES - 1;
1548 host->max_lun = MAX_LUNS; 1545 host->max_lun = MAX_LUNS;
1549 host->transportt = qla2xxx_transport_template; 1546 host->transportt = qla2xxx_transport_template;
1550 1547
@@ -1885,18 +1882,6 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
1885 continue; 1882 continue;
1886 } 1883 }
1887 1884
1888 ha->rlc_rsp = dma_alloc_coherent(&ha->pdev->dev,
1889 sizeof(rpt_lun_cmd_rsp_t), &ha->rlc_rsp_dma, GFP_KERNEL);
1890 if (ha->rlc_rsp == NULL) {
1891 qla_printk(KERN_WARNING, ha,
1892 "Memory Allocation failed - rlc");
1893
1894 qla2x00_mem_free(ha);
1895 msleep(100);
1896
1897 continue;
1898 }
1899
1900 snprintf(name, sizeof(name), "qla2xxx_%ld", ha->host_no); 1885 snprintf(name, sizeof(name), "qla2xxx_%ld", ha->host_no);
1901 ha->s_dma_pool = dma_pool_create(name, &ha->pdev->dev, 1886 ha->s_dma_pool = dma_pool_create(name, &ha->pdev->dev,
1902 DMA_POOL_SIZE, 8, 0); 1887 DMA_POOL_SIZE, 8, 0);
@@ -2072,11 +2057,6 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
2072 if (ha->s_dma_pool) 2057 if (ha->s_dma_pool)
2073 dma_pool_destroy(ha->s_dma_pool); 2058 dma_pool_destroy(ha->s_dma_pool);
2074 2059
2075 if (ha->rlc_rsp)
2076 dma_free_coherent(&ha->pdev->dev,
2077 sizeof(rpt_lun_cmd_rsp_t), ha->rlc_rsp,
2078 ha->rlc_rsp_dma);
2079
2080 if (ha->gid_list) 2060 if (ha->gid_list)
2081 dma_free_coherent(&ha->pdev->dev, GID_LIST_SIZE, ha->gid_list, 2061 dma_free_coherent(&ha->pdev->dev, GID_LIST_SIZE, ha->gid_list,
2082 ha->gid_list_dma); 2062 ha->gid_list_dma);
@@ -2104,8 +2084,6 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
2104 2084
2105 ha->s_dma_pool = NULL; 2085 ha->s_dma_pool = NULL;
2106 2086
2107 ha->rlc_rsp = NULL;
2108 ha->rlc_rsp_dma = 0;
2109 ha->gid_list = NULL; 2087 ha->gid_list = NULL;
2110 ha->gid_list_dma = 0; 2088 ha->gid_list_dma = 0;
2111 2089
@@ -2149,8 +2127,6 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
2149 * 2127 *
2150 * Context: 2128 * Context:
2151 * Kernel context. 2129 * Kernel context.
2152 *
2153 * Note: Sets the ref_count for non Null sp to one.
2154 */ 2130 */
2155static int 2131static int
2156qla2x00_allocate_sp_pool(scsi_qla_host_t *ha) 2132qla2x00_allocate_sp_pool(scsi_qla_host_t *ha)
diff --git a/drivers/scsi/qla2xxx/qla_rscn.c b/drivers/scsi/qla2xxx/qla_rscn.c
index b70bebe18c01..33e287b4f177 100644
--- a/drivers/scsi/qla2xxx/qla_rscn.c
+++ b/drivers/scsi/qla2xxx/qla_rscn.c
@@ -318,7 +318,6 @@ qla2x00_update_login_fcport(scsi_qla_host_t *ha, struct mbx_entry *mbxstat,
318 fcport->flags &= ~FCF_FAILOVER_NEEDED; 318 fcport->flags &= ~FCF_FAILOVER_NEEDED;
319 fcport->iodesc_idx_sent = IODESC_INVALID_INDEX; 319 fcport->iodesc_idx_sent = IODESC_INVALID_INDEX;
320 atomic_set(&fcport->state, FCS_ONLINE); 320 atomic_set(&fcport->state, FCS_ONLINE);
321 schedule_work(&fcport->rport_add_work);
322} 321}
323 322
324 323
diff --git a/drivers/scsi/qla2xxx/qla_settings.h b/drivers/scsi/qla2xxx/qla_settings.h
index 363205c0e84f..249e4d90fdc5 100644
--- a/drivers/scsi/qla2xxx/qla_settings.h
+++ b/drivers/scsi/qla2xxx/qla_settings.h
@@ -16,7 +16,6 @@
16 16
17/* Max time to wait for the loop to be in LOOP_READY state */ 17/* Max time to wait for the loop to be in LOOP_READY state */
18#define MAX_LOOP_TIMEOUT (60 * 5) 18#define MAX_LOOP_TIMEOUT (60 * 5)
19#define EH_ACTIVE 1 /* Error handler active */
20 19
21/* 20/*
22 * Some vendor subsystems do not recover properly after a device reset. Define 21 * Some vendor subsystems do not recover properly after a device reset. Define