aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c6
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.c15
-rw-r--r--drivers/scsi/qla2xxx/qla_gbl.h25
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c177
-rw-r--r--drivers/scsi/qla2xxx/qla_mid.c6
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c20
-rw-r--r--drivers/scsi/qla2xxx/qla_sup.c8
7 files changed, 19 insertions, 238 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 22b3868e7a1f..adf97320574b 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -9,7 +9,7 @@
9#include <linux/kthread.h> 9#include <linux/kthread.h>
10#include <linux/vmalloc.h> 10#include <linux/vmalloc.h>
11 11
12int qla24xx_vport_disable(struct fc_vport *, bool); 12static int qla24xx_vport_disable(struct fc_vport *, bool);
13 13
14/* SYSFS attributes --------------------------------------------------------- */ 14/* SYSFS attributes --------------------------------------------------------- */
15 15
@@ -1129,7 +1129,7 @@ vport_create_failed_2:
1129 return FC_VPORT_FAILED; 1129 return FC_VPORT_FAILED;
1130} 1130}
1131 1131
1132int 1132static int
1133qla24xx_vport_delete(struct fc_vport *fc_vport) 1133qla24xx_vport_delete(struct fc_vport *fc_vport)
1134{ 1134{
1135 scsi_qla_host_t *ha = shost_priv(fc_vport->shost); 1135 scsi_qla_host_t *ha = shost_priv(fc_vport->shost);
@@ -1162,7 +1162,7 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
1162 return 0; 1162 return 0;
1163} 1163}
1164 1164
1165int 1165static int
1166qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable) 1166qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable)
1167{ 1167{
1168 scsi_qla_host_t *vha = fc_vport->dd_data; 1168 scsi_qla_host_t *vha = fc_vport->dd_data;
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index eaa04dabcdf6..796c4ce87831 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -1428,21 +1428,6 @@ qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd)
1428 printk(" sp flags=0x%x\n", sp->flags); 1428 printk(" sp flags=0x%x\n", sp->flags);
1429} 1429}
1430 1430
1431void
1432qla2x00_dump_pkt(void *pkt)
1433{
1434 uint32_t i;
1435 uint8_t *data = (uint8_t *) pkt;
1436
1437 for (i = 0; i < 64; i++) {
1438 if (!(i % 4))
1439 printk("\n%02x: ", i);
1440
1441 printk("%02x ", data[i]);
1442 }
1443 printk("\n");
1444}
1445
1446#if defined(QL_DEBUG_ROUTINES) 1431#if defined(QL_DEBUG_ROUTINES)
1447/* 1432/*
1448 * qla2x00_formatted_dump_buffer 1433 * qla2x00_formatted_dump_buffer
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
index fa4455f48f1d..fd7553920e00 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -70,30 +70,20 @@ extern int qla2x00_loop_reset(scsi_qla_host_t *);
70/* 70/*
71 * Global Functions in qla_mid.c source file. 71 * Global Functions in qla_mid.c source file.
72 */ 72 */
73extern struct scsi_host_template qla2x00_driver_template;
74extern struct scsi_host_template qla24xx_driver_template; 73extern struct scsi_host_template qla24xx_driver_template;
75extern struct scsi_transport_template *qla2xxx_transport_vport_template; 74extern struct scsi_transport_template *qla2xxx_transport_vport_template;
76extern uint8_t qla2x00_mem_alloc(scsi_qla_host_t *);
77extern void qla2x00_timer(scsi_qla_host_t *); 75extern void qla2x00_timer(scsi_qla_host_t *);
78extern void qla2x00_start_timer(scsi_qla_host_t *, void *, unsigned long); 76extern void qla2x00_start_timer(scsi_qla_host_t *, void *, unsigned long);
79extern void qla2x00_stop_timer(scsi_qla_host_t *);
80extern uint32_t qla24xx_allocate_vp_id(scsi_qla_host_t *);
81extern void qla24xx_deallocate_vp_id(scsi_qla_host_t *); 77extern void qla24xx_deallocate_vp_id(scsi_qla_host_t *);
82extern int qla24xx_disable_vp (scsi_qla_host_t *); 78extern int qla24xx_disable_vp (scsi_qla_host_t *);
83extern int qla24xx_enable_vp (scsi_qla_host_t *); 79extern int qla24xx_enable_vp (scsi_qla_host_t *);
84extern void qla2x00_mem_free(scsi_qla_host_t *);
85extern int qla24xx_control_vp(scsi_qla_host_t *, int ); 80extern int qla24xx_control_vp(scsi_qla_host_t *, int );
86extern int qla24xx_modify_vp_config(scsi_qla_host_t *); 81extern int qla24xx_modify_vp_config(scsi_qla_host_t *);
87extern int qla2x00_send_change_request(scsi_qla_host_t *, uint16_t, uint16_t); 82extern int qla2x00_send_change_request(scsi_qla_host_t *, uint16_t, uint16_t);
88extern void qla2x00_vp_stop_timer(scsi_qla_host_t *); 83extern void qla2x00_vp_stop_timer(scsi_qla_host_t *);
89extern int qla24xx_configure_vhba (scsi_qla_host_t *); 84extern int qla24xx_configure_vhba (scsi_qla_host_t *);
90extern int qla24xx_get_vp_entry(scsi_qla_host_t *, uint16_t, int);
91extern int qla24xx_get_vp_database(scsi_qla_host_t *, uint16_t);
92extern int qla2x00_do_dpc_vp(scsi_qla_host_t *);
93extern void qla24xx_report_id_acquisition(scsi_qla_host_t *, 85extern void qla24xx_report_id_acquisition(scsi_qla_host_t *,
94 struct vp_rpt_id_entry_24xx *); 86 struct vp_rpt_id_entry_24xx *);
95extern scsi_qla_host_t * qla24xx_find_vhost_by_name(scsi_qla_host_t *,
96 uint8_t *);
97extern void qla2x00_do_dpc_all_vps(scsi_qla_host_t *); 87extern void qla2x00_do_dpc_all_vps(scsi_qla_host_t *);
98extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *); 88extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *);
99extern scsi_qla_host_t * qla24xx_create_vhost(struct fc_vport *); 89extern scsi_qla_host_t * qla24xx_create_vhost(struct fc_vport *);
@@ -113,7 +103,6 @@ extern void qla2xxx_wake_dpc(scsi_qla_host_t *);
113extern void qla2x00_alert_all_vps(scsi_qla_host_t *, uint16_t *); 103extern void qla2x00_alert_all_vps(scsi_qla_host_t *, uint16_t *);
114extern void qla2x00_async_event(scsi_qla_host_t *, uint16_t *); 104extern void qla2x00_async_event(scsi_qla_host_t *, uint16_t *);
115extern void qla2x00_vp_abort_isp(scsi_qla_host_t *); 105extern void qla2x00_vp_abort_isp(scsi_qla_host_t *);
116extern int qla24xx_vport_delete(struct fc_vport *);
117 106
118/* 107/*
119 * Global Function Prototypes in qla_iocb.c source file. 108 * Global Function Prototypes in qla_iocb.c source file.
@@ -232,12 +221,6 @@ qla24xx_get_isp_stats(scsi_qla_host_t *, struct link_statistics *,
232extern int qla24xx_abort_command(scsi_qla_host_t *, srb_t *); 221extern int qla24xx_abort_command(scsi_qla_host_t *, srb_t *);
233extern int qla24xx_abort_target(fc_port_t *); 222extern int qla24xx_abort_target(fc_port_t *);
234 223
235extern int qla2x00_system_error(scsi_qla_host_t *);
236
237extern int
238qla2x00_get_serdes_params(scsi_qla_host_t *, uint16_t *, uint16_t *,
239 uint16_t *);
240
241extern int 224extern int
242qla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t); 225qla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t);
243 226
@@ -251,9 +234,6 @@ extern int
251qla2x00_read_sfp(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t, uint16_t); 234qla2x00_read_sfp(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t, uint16_t);
252 235
253extern int 236extern int
254qla2x00_get_idma_speed(scsi_qla_host_t *, uint16_t, uint16_t *, uint16_t *);
255
256extern int
257qla2x00_set_idma_speed(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t *); 237qla2x00_set_idma_speed(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t *);
258 238
259/* 239/*
@@ -271,11 +251,7 @@ extern void qla2x00_free_irqs(scsi_qla_host_t *);
271/* 251/*
272 * Global Function Prototypes in qla_sup.c source file. 252 * Global Function Prototypes in qla_sup.c source file.
273 */ 253 */
274extern void qla2x00_lock_nvram_access(scsi_qla_host_t *);
275extern void qla2x00_unlock_nvram_access(scsi_qla_host_t *);
276extern void qla2x00_release_nvram_protection(scsi_qla_host_t *); 254extern void qla2x00_release_nvram_protection(scsi_qla_host_t *);
277extern uint16_t qla2x00_get_nvram_word(scsi_qla_host_t *, uint32_t);
278extern void qla2x00_write_nvram_word(scsi_qla_host_t *, uint32_t, uint16_t);
279extern uint32_t *qla24xx_read_flash_data(scsi_qla_host_t *, uint32_t *, 255extern uint32_t *qla24xx_read_flash_data(scsi_qla_host_t *, uint32_t *,
280 uint32_t, uint32_t); 256 uint32_t, uint32_t);
281extern uint8_t *qla2x00_read_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t, 257extern uint8_t *qla2x00_read_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
@@ -322,7 +298,6 @@ extern void qla25xx_fw_dump(scsi_qla_host_t *, int);
322extern void qla2x00_dump_regs(scsi_qla_host_t *); 298extern void qla2x00_dump_regs(scsi_qla_host_t *);
323extern void qla2x00_dump_buffer(uint8_t *, uint32_t); 299extern void qla2x00_dump_buffer(uint8_t *, uint32_t);
324extern void qla2x00_print_scsi_cmd(struct scsi_cmnd *); 300extern void qla2x00_print_scsi_cmd(struct scsi_cmnd *);
325extern void qla2x00_dump_pkt(void *);
326 301
327/* 302/*
328 * Global Function Prototypes in qla_gs.c source file. 303 * Global Function Prototypes in qla_gs.c source file.
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index d23d6fcfb225..ee7899d31e18 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -2248,6 +2248,8 @@ atarget_done:
2248 return rval; 2248 return rval;
2249} 2249}
2250 2250
2251#if 0
2252
2251int 2253int
2252qla2x00_system_error(scsi_qla_host_t *ha) 2254qla2x00_system_error(scsi_qla_host_t *ha)
2253{ 2255{
@@ -2277,47 +2279,7 @@ qla2x00_system_error(scsi_qla_host_t *ha)
2277 return rval; 2279 return rval;
2278} 2280}
2279 2281
2280/** 2282#endif /* 0 */
2281 * qla2x00_get_serdes_params() -
2282 * @ha: HA context
2283 *
2284 * Returns
2285 */
2286int
2287qla2x00_get_serdes_params(scsi_qla_host_t *ha, uint16_t *sw_em_1g,
2288 uint16_t *sw_em_2g, uint16_t *sw_em_4g)
2289{
2290 int rval;
2291 mbx_cmd_t mc;
2292 mbx_cmd_t *mcp = &mc;
2293
2294 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
2295
2296 mcp->mb[0] = MBC_SERDES_PARAMS;
2297 mcp->mb[1] = 0;
2298 mcp->out_mb = MBX_1|MBX_0;
2299 mcp->in_mb = MBX_4|MBX_3|MBX_2|MBX_0;
2300 mcp->tov = 30;
2301 mcp->flags = 0;
2302 rval = qla2x00_mailbox_command(ha, mcp);
2303
2304 if (rval != QLA_SUCCESS) {
2305 /*EMPTY*/
2306 DEBUG2_3_11(printk("%s(%ld): failed=%x (%x).\n", __func__,
2307 ha->host_no, rval, mcp->mb[0]));
2308 } else {
2309 DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no));
2310
2311 if (sw_em_1g)
2312 *sw_em_1g = mcp->mb[2];
2313 if (sw_em_2g)
2314 *sw_em_2g = mcp->mb[3];
2315 if (sw_em_4g)
2316 *sw_em_4g = mcp->mb[4];
2317 }
2318
2319 return rval;
2320}
2321 2283
2322/** 2284/**
2323 * qla2x00_set_serdes_params() - 2285 * qla2x00_set_serdes_params() -
@@ -2466,49 +2428,6 @@ qla2x00_read_sfp(scsi_qla_host_t *ha, dma_addr_t sfp_dma, uint16_t addr,
2466} 2428}
2467 2429
2468int 2430int
2469qla2x00_get_idma_speed(scsi_qla_host_t *ha, uint16_t loop_id,
2470 uint16_t *port_speed, uint16_t *mb)
2471{
2472 int rval;
2473 mbx_cmd_t mc;
2474 mbx_cmd_t *mcp = &mc;
2475
2476 if (!IS_IIDMA_CAPABLE(ha))
2477 return QLA_FUNCTION_FAILED;
2478
2479 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
2480
2481 mcp->mb[0] = MBC_PORT_PARAMS;
2482 mcp->mb[1] = loop_id;
2483 mcp->mb[2] = mcp->mb[3] = mcp->mb[4] = mcp->mb[5] = 0;
2484 mcp->out_mb = MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0;
2485 mcp->in_mb = MBX_5|MBX_4|MBX_3|MBX_1|MBX_0;
2486 mcp->tov = 30;
2487 mcp->flags = 0;
2488 rval = qla2x00_mailbox_command(ha, mcp);
2489
2490 /* Return mailbox statuses. */
2491 if (mb != NULL) {
2492 mb[0] = mcp->mb[0];
2493 mb[1] = mcp->mb[1];
2494 mb[3] = mcp->mb[3];
2495 mb[4] = mcp->mb[4];
2496 mb[5] = mcp->mb[5];
2497 }
2498
2499 if (rval != QLA_SUCCESS) {
2500 DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__,
2501 ha->host_no, rval));
2502 } else {
2503 DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no));
2504 if (port_speed)
2505 *port_speed = mcp->mb[3];
2506 }
2507
2508 return rval;
2509}
2510
2511int
2512qla2x00_set_idma_speed(scsi_qla_host_t *ha, uint16_t loop_id, 2431qla2x00_set_idma_speed(scsi_qla_host_t *ha, uint16_t loop_id,
2513 uint16_t port_speed, uint16_t *mb) 2432 uint16_t port_speed, uint16_t *mb)
2514{ 2433{
@@ -2551,96 +2470,6 @@ qla2x00_set_idma_speed(scsi_qla_host_t *ha, uint16_t loop_id,
2551 return rval; 2470 return rval;
2552} 2471}
2553 2472
2554/*
2555 * qla24xx_get_vp_database
2556 * Get the VP's database for all configured ports.
2557 *
2558 * Input:
2559 * ha = adapter block pointer.
2560 * size = size of initialization control block.
2561 *
2562 * Returns:
2563 * qla2x00 local function return status code.
2564 *
2565 * Context:
2566 * Kernel context.
2567 */
2568int
2569qla24xx_get_vp_database(scsi_qla_host_t *ha, uint16_t size)
2570{
2571 int rval;
2572 mbx_cmd_t mc;
2573 mbx_cmd_t *mcp = &mc;
2574
2575 DEBUG11(printk("scsi(%ld):%s - entered.\n",
2576 ha->host_no, __func__));
2577
2578 mcp->mb[0] = MBC_MID_GET_VP_DATABASE;
2579 mcp->mb[2] = MSW(ha->init_cb_dma);
2580 mcp->mb[3] = LSW(ha->init_cb_dma);
2581 mcp->mb[4] = 0;
2582 mcp->mb[5] = 0;
2583 mcp->mb[6] = MSW(MSD(ha->init_cb_dma));
2584 mcp->mb[7] = LSW(MSD(ha->init_cb_dma));
2585 mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_0;
2586 mcp->in_mb = MBX_1|MBX_0;
2587 mcp->buf_size = size;
2588 mcp->flags = MBX_DMA_OUT;
2589 mcp->tov = MBX_TOV_SECONDS;
2590 rval = qla2x00_mailbox_command(ha, mcp);
2591
2592 if (rval != QLA_SUCCESS) {
2593 /*EMPTY*/
2594 DEBUG2_3_11(printk("%s(%ld): failed=%x "
2595 "mb0=%x.\n",
2596 __func__, ha->host_no, rval, mcp->mb[0]));
2597 } else {
2598 /*EMPTY*/
2599 DEBUG11(printk("%s(%ld): done.\n",
2600 __func__, ha->host_no));
2601 }
2602
2603 return rval;
2604}
2605
2606int
2607qla24xx_get_vp_entry(scsi_qla_host_t *ha, uint16_t size, int vp_id)
2608{
2609 int rval;
2610 mbx_cmd_t mc;
2611 mbx_cmd_t *mcp = &mc;
2612
2613 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
2614
2615 mcp->mb[0] = MBC_MID_GET_VP_ENTRY;
2616 mcp->mb[2] = MSW(ha->init_cb_dma);
2617 mcp->mb[3] = LSW(ha->init_cb_dma);
2618 mcp->mb[4] = 0;
2619 mcp->mb[5] = 0;
2620 mcp->mb[6] = MSW(MSD(ha->init_cb_dma));
2621 mcp->mb[7] = LSW(MSD(ha->init_cb_dma));
2622 mcp->mb[9] = vp_id;
2623 mcp->out_mb = MBX_9|MBX_7|MBX_6|MBX_3|MBX_2|MBX_0;
2624 mcp->in_mb = MBX_0;
2625 mcp->buf_size = size;
2626 mcp->flags = MBX_DMA_OUT;
2627 mcp->tov = 30;
2628 rval = qla2x00_mailbox_command(ha, mcp);
2629
2630 if (rval != QLA_SUCCESS) {
2631 /*EMPTY*/
2632 DEBUG2_3_11(printk("qla24xx_get_vp_entry(%ld): failed=%x "
2633 "mb0=%x.\n",
2634 ha->host_no, rval, mcp->mb[0]));
2635 } else {
2636 /*EMPTY*/
2637 DEBUG11(printk("qla24xx_get_vp_entry(%ld): done.\n",
2638 ha->host_no));
2639 }
2640
2641 return rval;
2642}
2643
2644void 2473void
2645qla24xx_report_id_acquisition(scsi_qla_host_t *ha, 2474qla24xx_report_id_acquisition(scsi_qla_host_t *ha,
2646 struct vp_rpt_id_entry_24xx *rptid_entry) 2475 struct vp_rpt_id_entry_24xx *rptid_entry)
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
index dea37689b7d4..cf784cdafb01 100644
--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -39,7 +39,7 @@ qla2x00_vp_stop_timer(scsi_qla_host_t *vha)
39 } 39 }
40} 40}
41 41
42uint32_t 42static uint32_t
43qla24xx_allocate_vp_id(scsi_qla_host_t *vha) 43qla24xx_allocate_vp_id(scsi_qla_host_t *vha)
44{ 44{
45 uint32_t vp_id; 45 uint32_t vp_id;
@@ -77,7 +77,7 @@ qla24xx_deallocate_vp_id(scsi_qla_host_t *vha)
77 up(&ha->vport_sem); 77 up(&ha->vport_sem);
78} 78}
79 79
80scsi_qla_host_t * 80static scsi_qla_host_t *
81qla24xx_find_vhost_by_name(scsi_qla_host_t *ha, uint8_t *port_name) 81qla24xx_find_vhost_by_name(scsi_qla_host_t *ha, uint8_t *port_name)
82{ 82{
83 scsi_qla_host_t *vha; 83 scsi_qla_host_t *vha;
@@ -265,7 +265,7 @@ qla2x00_vp_abort_isp(scsi_qla_host_t *vha)
265 qla24xx_enable_vp(vha); 265 qla24xx_enable_vp(vha);
266} 266}
267 267
268int 268static int
269qla2x00_do_dpc_vp(scsi_qla_host_t *vha) 269qla2x00_do_dpc_vp(scsi_qla_host_t *vha)
270{ 270{
271 if (test_and_clear_bit(VP_IDX_ACQUIRED, &vha->vp_flags)) { 271 if (test_and_clear_bit(VP_IDX_ACQUIRED, &vha->vp_flags)) {
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index b9ee56567940..23ee05913fc5 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -110,7 +110,7 @@ static int qla2x00_device_reset(scsi_qla_host_t *, fc_port_t *);
110static int qla2x00_change_queue_depth(struct scsi_device *, int); 110static int qla2x00_change_queue_depth(struct scsi_device *, int);
111static int qla2x00_change_queue_type(struct scsi_device *, int); 111static int qla2x00_change_queue_type(struct scsi_device *, int);
112 112
113struct scsi_host_template qla2x00_driver_template = { 113static struct scsi_host_template qla2x00_driver_template = {
114 .module = THIS_MODULE, 114 .module = THIS_MODULE,
115 .name = QLA2XXX_DRIVER_NAME, 115 .name = QLA2XXX_DRIVER_NAME,
116 .queuecommand = qla2x00_queuecommand, 116 .queuecommand = qla2x00_queuecommand,
@@ -178,13 +178,6 @@ struct scsi_transport_template *qla2xxx_transport_vport_template = NULL;
178 * Timer routines 178 * Timer routines
179 */ 179 */
180 180
181void qla2x00_timer(scsi_qla_host_t *);
182
183__inline__ void qla2x00_start_timer(scsi_qla_host_t *,
184 void *, unsigned long);
185static __inline__ void qla2x00_restart_timer(scsi_qla_host_t *, unsigned long);
186__inline__ void qla2x00_stop_timer(scsi_qla_host_t *);
187
188__inline__ void 181__inline__ void
189qla2x00_start_timer(scsi_qla_host_t *ha, void *func, unsigned long interval) 182qla2x00_start_timer(scsi_qla_host_t *ha, void *func, unsigned long interval)
190{ 183{
@@ -202,7 +195,7 @@ qla2x00_restart_timer(scsi_qla_host_t *ha, unsigned long interval)
202 mod_timer(&ha->timer, jiffies + interval * HZ); 195 mod_timer(&ha->timer, jiffies + interval * HZ);
203} 196}
204 197
205__inline__ void 198static __inline__ void
206qla2x00_stop_timer(scsi_qla_host_t *ha) 199qla2x00_stop_timer(scsi_qla_host_t *ha)
207{ 200{
208 del_timer_sync(&ha->timer); 201 del_timer_sync(&ha->timer);
@@ -213,12 +206,11 @@ static int qla2x00_do_dpc(void *data);
213 206
214static void qla2x00_rst_aen(scsi_qla_host_t *); 207static void qla2x00_rst_aen(scsi_qla_host_t *);
215 208
216uint8_t qla2x00_mem_alloc(scsi_qla_host_t *); 209static uint8_t qla2x00_mem_alloc(scsi_qla_host_t *);
217void qla2x00_mem_free(scsi_qla_host_t *ha); 210static void qla2x00_mem_free(scsi_qla_host_t *ha);
218static int qla2x00_allocate_sp_pool( scsi_qla_host_t *ha); 211static int qla2x00_allocate_sp_pool( scsi_qla_host_t *ha);
219static void qla2x00_free_sp_pool(scsi_qla_host_t *ha); 212static void qla2x00_free_sp_pool(scsi_qla_host_t *ha);
220static void qla2x00_sp_free_dma(scsi_qla_host_t *, srb_t *); 213static void qla2x00_sp_free_dma(scsi_qla_host_t *, srb_t *);
221void qla2x00_sp_compl(scsi_qla_host_t *ha, srb_t *);
222 214
223/* -------------------------------------------------------------------------- */ 215/* -------------------------------------------------------------------------- */
224 216
@@ -2008,7 +2000,7 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *ha, int defer)
2008* 0 = success. 2000* 0 = success.
2009* 1 = failure. 2001* 1 = failure.
2010*/ 2002*/
2011uint8_t 2003static uint8_t
2012qla2x00_mem_alloc(scsi_qla_host_t *ha) 2004qla2x00_mem_alloc(scsi_qla_host_t *ha)
2013{ 2005{
2014 char name[16]; 2006 char name[16];
@@ -2205,7 +2197,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
2205* Input: 2197* Input:
2206* ha = adapter block pointer. 2198* ha = adapter block pointer.
2207*/ 2199*/
2208void 2200static void
2209qla2x00_mem_free(scsi_qla_host_t *ha) 2201qla2x00_mem_free(scsi_qla_host_t *ha)
2210{ 2202{
2211 struct list_head *fcpl, *fcptemp; 2203 struct list_head *fcpl, *fcptemp;
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
index af16c55b47a7..b68fb73613ed 100644
--- a/drivers/scsi/qla2xxx/qla_sup.c
+++ b/drivers/scsi/qla2xxx/qla_sup.c
@@ -22,7 +22,7 @@ static void qla2x00_nv_write(scsi_qla_host_t *, uint16_t);
22 * qla2x00_lock_nvram_access() - 22 * qla2x00_lock_nvram_access() -
23 * @ha: HA context 23 * @ha: HA context
24 */ 24 */
25void 25static void
26qla2x00_lock_nvram_access(scsi_qla_host_t *ha) 26qla2x00_lock_nvram_access(scsi_qla_host_t *ha)
27{ 27{
28 uint16_t data; 28 uint16_t data;
@@ -55,7 +55,7 @@ qla2x00_lock_nvram_access(scsi_qla_host_t *ha)
55 * qla2x00_unlock_nvram_access() - 55 * qla2x00_unlock_nvram_access() -
56 * @ha: HA context 56 * @ha: HA context
57 */ 57 */
58void 58static void
59qla2x00_unlock_nvram_access(scsi_qla_host_t *ha) 59qla2x00_unlock_nvram_access(scsi_qla_host_t *ha)
60{ 60{
61 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; 61 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
@@ -74,7 +74,7 @@ qla2x00_unlock_nvram_access(scsi_qla_host_t *ha)
74 * 74 *
75 * Returns the word read from nvram @addr. 75 * Returns the word read from nvram @addr.
76 */ 76 */
77uint16_t 77static uint16_t
78qla2x00_get_nvram_word(scsi_qla_host_t *ha, uint32_t addr) 78qla2x00_get_nvram_word(scsi_qla_host_t *ha, uint32_t addr)
79{ 79{
80 uint16_t data; 80 uint16_t data;
@@ -93,7 +93,7 @@ qla2x00_get_nvram_word(scsi_qla_host_t *ha, uint32_t addr)
93 * @addr: Address in NVRAM to write 93 * @addr: Address in NVRAM to write
94 * @data: word to program 94 * @data: word to program
95 */ 95 */
96void 96static void
97qla2x00_write_nvram_word(scsi_qla_host_t *ha, uint32_t addr, uint16_t data) 97qla2x00_write_nvram_word(scsi_qla_host_t *ha, uint32_t addr, uint16_t data)
98{ 98{
99 int count; 99 int count;