diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-01-17 12:02:15 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-23 12:29:32 -0500 |
commit | a824ebb37c1a1c5fd8e19b47bf5c14cb7b419b48 (patch) | |
tree | 1aa1f3731409f448b40f5c5b9e49c9e85eedff1d /drivers | |
parent | 50db6b134c31351a03cec9d2a7f9e61f63a5ce9f (diff) |
[SCSI] qla2xxx: Code cleanups.
- make the following needlessly global code static:
- qla_attr.c: qla24xx_vport_delete()
- qla_attr.c: qla24xx_vport_disable()
- qla_mid.c: qla24xx_allocate_vp_id()
- qla_mid.c: qla24xx_find_vhost_by_name()
- qla_mid.c: qla2x00_do_dpc_vp()
- qla_os.c: struct qla2x00_driver_template
- qla_os.c: qla2x00_stop_timer()
- qla_os.c: qla2x00_mem_alloc()
- qla_os.c: qla2x00_mem_free()
- qla_sup.c: qla2x00_lock_nvram_access()
- qla_sup.c: qla2x00_unlock_nvram_access()
- qla_sup.c: qla2x00_get_nvram_word()
- qla_sup.c: qla2x00_write_nvram_word()
- #if 0 the following unused global functions:
- qla_mbx.c: qla2x00_system_error()
- qla_os.c: remove some unneeded function prototypes
- removed unused functions:
- qla_dbg.c: qla2x00_dump_pkt()
- qla_mbx.c: qla2x00_get_serdes_params()
- qla_mbx.c: qla2x00_get_idma_speed()
- qla_mbx.c: qla24xx_get_vp_database()
- qla_mbx.c: qla24xx_get_vp_entry()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Small modifications and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 6 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.c | 15 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 25 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 177 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 6 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 20 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 8 |
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 | ||
12 | int qla24xx_vport_disable(struct fc_vport *, bool); | 12 | static 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 | ||
1132 | int | 1132 | static int |
1133 | qla24xx_vport_delete(struct fc_vport *fc_vport) | 1133 | qla24xx_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 | ||
1165 | int | 1165 | static int |
1166 | qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable) | 1166 | qla24xx_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 | ||
1431 | void | ||
1432 | qla2x00_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 | */ |
73 | extern struct scsi_host_template qla2x00_driver_template; | ||
74 | extern struct scsi_host_template qla24xx_driver_template; | 73 | extern struct scsi_host_template qla24xx_driver_template; |
75 | extern struct scsi_transport_template *qla2xxx_transport_vport_template; | 74 | extern struct scsi_transport_template *qla2xxx_transport_vport_template; |
76 | extern uint8_t qla2x00_mem_alloc(scsi_qla_host_t *); | ||
77 | extern void qla2x00_timer(scsi_qla_host_t *); | 75 | extern void qla2x00_timer(scsi_qla_host_t *); |
78 | extern void qla2x00_start_timer(scsi_qla_host_t *, void *, unsigned long); | 76 | extern void qla2x00_start_timer(scsi_qla_host_t *, void *, unsigned long); |
79 | extern void qla2x00_stop_timer(scsi_qla_host_t *); | ||
80 | extern uint32_t qla24xx_allocate_vp_id(scsi_qla_host_t *); | ||
81 | extern void qla24xx_deallocate_vp_id(scsi_qla_host_t *); | 77 | extern void qla24xx_deallocate_vp_id(scsi_qla_host_t *); |
82 | extern int qla24xx_disable_vp (scsi_qla_host_t *); | 78 | extern int qla24xx_disable_vp (scsi_qla_host_t *); |
83 | extern int qla24xx_enable_vp (scsi_qla_host_t *); | 79 | extern int qla24xx_enable_vp (scsi_qla_host_t *); |
84 | extern void qla2x00_mem_free(scsi_qla_host_t *); | ||
85 | extern int qla24xx_control_vp(scsi_qla_host_t *, int ); | 80 | extern int qla24xx_control_vp(scsi_qla_host_t *, int ); |
86 | extern int qla24xx_modify_vp_config(scsi_qla_host_t *); | 81 | extern int qla24xx_modify_vp_config(scsi_qla_host_t *); |
87 | extern int qla2x00_send_change_request(scsi_qla_host_t *, uint16_t, uint16_t); | 82 | extern int qla2x00_send_change_request(scsi_qla_host_t *, uint16_t, uint16_t); |
88 | extern void qla2x00_vp_stop_timer(scsi_qla_host_t *); | 83 | extern void qla2x00_vp_stop_timer(scsi_qla_host_t *); |
89 | extern int qla24xx_configure_vhba (scsi_qla_host_t *); | 84 | extern int qla24xx_configure_vhba (scsi_qla_host_t *); |
90 | extern int qla24xx_get_vp_entry(scsi_qla_host_t *, uint16_t, int); | ||
91 | extern int qla24xx_get_vp_database(scsi_qla_host_t *, uint16_t); | ||
92 | extern int qla2x00_do_dpc_vp(scsi_qla_host_t *); | ||
93 | extern void qla24xx_report_id_acquisition(scsi_qla_host_t *, | 85 | extern void qla24xx_report_id_acquisition(scsi_qla_host_t *, |
94 | struct vp_rpt_id_entry_24xx *); | 86 | struct vp_rpt_id_entry_24xx *); |
95 | extern scsi_qla_host_t * qla24xx_find_vhost_by_name(scsi_qla_host_t *, | ||
96 | uint8_t *); | ||
97 | extern void qla2x00_do_dpc_all_vps(scsi_qla_host_t *); | 87 | extern void qla2x00_do_dpc_all_vps(scsi_qla_host_t *); |
98 | extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *); | 88 | extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *); |
99 | extern scsi_qla_host_t * qla24xx_create_vhost(struct fc_vport *); | 89 | extern scsi_qla_host_t * qla24xx_create_vhost(struct fc_vport *); |
@@ -113,7 +103,6 @@ extern void qla2xxx_wake_dpc(scsi_qla_host_t *); | |||
113 | extern void qla2x00_alert_all_vps(scsi_qla_host_t *, uint16_t *); | 103 | extern void qla2x00_alert_all_vps(scsi_qla_host_t *, uint16_t *); |
114 | extern void qla2x00_async_event(scsi_qla_host_t *, uint16_t *); | 104 | extern void qla2x00_async_event(scsi_qla_host_t *, uint16_t *); |
115 | extern void qla2x00_vp_abort_isp(scsi_qla_host_t *); | 105 | extern void qla2x00_vp_abort_isp(scsi_qla_host_t *); |
116 | extern 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 *, | |||
232 | extern int qla24xx_abort_command(scsi_qla_host_t *, srb_t *); | 221 | extern int qla24xx_abort_command(scsi_qla_host_t *, srb_t *); |
233 | extern int qla24xx_abort_target(fc_port_t *); | 222 | extern int qla24xx_abort_target(fc_port_t *); |
234 | 223 | ||
235 | extern int qla2x00_system_error(scsi_qla_host_t *); | ||
236 | |||
237 | extern int | ||
238 | qla2x00_get_serdes_params(scsi_qla_host_t *, uint16_t *, uint16_t *, | ||
239 | uint16_t *); | ||
240 | |||
241 | extern int | 224 | extern int |
242 | qla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t); | 225 | qla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t); |
243 | 226 | ||
@@ -251,9 +234,6 @@ extern int | |||
251 | qla2x00_read_sfp(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t, uint16_t); | 234 | qla2x00_read_sfp(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t, uint16_t); |
252 | 235 | ||
253 | extern int | 236 | extern int |
254 | qla2x00_get_idma_speed(scsi_qla_host_t *, uint16_t, uint16_t *, uint16_t *); | ||
255 | |||
256 | extern int | ||
257 | qla2x00_set_idma_speed(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t *); | 237 | qla2x00_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 | */ |
274 | extern void qla2x00_lock_nvram_access(scsi_qla_host_t *); | ||
275 | extern void qla2x00_unlock_nvram_access(scsi_qla_host_t *); | ||
276 | extern void qla2x00_release_nvram_protection(scsi_qla_host_t *); | 254 | extern void qla2x00_release_nvram_protection(scsi_qla_host_t *); |
277 | extern uint16_t qla2x00_get_nvram_word(scsi_qla_host_t *, uint32_t); | ||
278 | extern void qla2x00_write_nvram_word(scsi_qla_host_t *, uint32_t, uint16_t); | ||
279 | extern uint32_t *qla24xx_read_flash_data(scsi_qla_host_t *, uint32_t *, | 255 | extern uint32_t *qla24xx_read_flash_data(scsi_qla_host_t *, uint32_t *, |
280 | uint32_t, uint32_t); | 256 | uint32_t, uint32_t); |
281 | extern uint8_t *qla2x00_read_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t, | 257 | extern 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); | |||
322 | extern void qla2x00_dump_regs(scsi_qla_host_t *); | 298 | extern void qla2x00_dump_regs(scsi_qla_host_t *); |
323 | extern void qla2x00_dump_buffer(uint8_t *, uint32_t); | 299 | extern void qla2x00_dump_buffer(uint8_t *, uint32_t); |
324 | extern void qla2x00_print_scsi_cmd(struct scsi_cmnd *); | 300 | extern void qla2x00_print_scsi_cmd(struct scsi_cmnd *); |
325 | extern 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 | |||
2251 | int | 2253 | int |
2252 | qla2x00_system_error(scsi_qla_host_t *ha) | 2254 | qla2x00_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 | */ | ||
2286 | int | ||
2287 | qla2x00_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 | ||
2468 | int | 2430 | int |
2469 | qla2x00_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 | |||
2511 | int | ||
2512 | qla2x00_set_idma_speed(scsi_qla_host_t *ha, uint16_t loop_id, | 2431 | qla2x00_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 | */ | ||
2568 | int | ||
2569 | qla24xx_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 | |||
2606 | int | ||
2607 | qla24xx_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 | |||
2644 | void | 2473 | void |
2645 | qla24xx_report_id_acquisition(scsi_qla_host_t *ha, | 2474 | qla24xx_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 | ||
42 | uint32_t | 42 | static uint32_t |
43 | qla24xx_allocate_vp_id(scsi_qla_host_t *vha) | 43 | qla24xx_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 | ||
80 | scsi_qla_host_t * | 80 | static scsi_qla_host_t * |
81 | qla24xx_find_vhost_by_name(scsi_qla_host_t *ha, uint8_t *port_name) | 81 | qla24xx_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 | ||
268 | int | 268 | static int |
269 | qla2x00_do_dpc_vp(scsi_qla_host_t *vha) | 269 | qla2x00_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 *); | |||
110 | static int qla2x00_change_queue_depth(struct scsi_device *, int); | 110 | static int qla2x00_change_queue_depth(struct scsi_device *, int); |
111 | static int qla2x00_change_queue_type(struct scsi_device *, int); | 111 | static int qla2x00_change_queue_type(struct scsi_device *, int); |
112 | 112 | ||
113 | struct scsi_host_template qla2x00_driver_template = { | 113 | static 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 | ||
181 | void qla2x00_timer(scsi_qla_host_t *); | ||
182 | |||
183 | __inline__ void qla2x00_start_timer(scsi_qla_host_t *, | ||
184 | void *, unsigned long); | ||
185 | static __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 |
189 | qla2x00_start_timer(scsi_qla_host_t *ha, void *func, unsigned long interval) | 182 | qla2x00_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 | 198 | static __inline__ void |
206 | qla2x00_stop_timer(scsi_qla_host_t *ha) | 199 | qla2x00_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 | ||
214 | static void qla2x00_rst_aen(scsi_qla_host_t *); | 207 | static void qla2x00_rst_aen(scsi_qla_host_t *); |
215 | 208 | ||
216 | uint8_t qla2x00_mem_alloc(scsi_qla_host_t *); | 209 | static uint8_t qla2x00_mem_alloc(scsi_qla_host_t *); |
217 | void qla2x00_mem_free(scsi_qla_host_t *ha); | 210 | static void qla2x00_mem_free(scsi_qla_host_t *ha); |
218 | static int qla2x00_allocate_sp_pool( scsi_qla_host_t *ha); | 211 | static int qla2x00_allocate_sp_pool( scsi_qla_host_t *ha); |
219 | static void qla2x00_free_sp_pool(scsi_qla_host_t *ha); | 212 | static void qla2x00_free_sp_pool(scsi_qla_host_t *ha); |
220 | static void qla2x00_sp_free_dma(scsi_qla_host_t *, srb_t *); | 213 | static void qla2x00_sp_free_dma(scsi_qla_host_t *, srb_t *); |
221 | void 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 | */ |
2011 | uint8_t | 2003 | static uint8_t |
2012 | qla2x00_mem_alloc(scsi_qla_host_t *ha) | 2004 | qla2x00_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 | */ |
2208 | void | 2200 | static void |
2209 | qla2x00_mem_free(scsi_qla_host_t *ha) | 2201 | qla2x00_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 | */ |
25 | void | 25 | static void |
26 | qla2x00_lock_nvram_access(scsi_qla_host_t *ha) | 26 | qla2x00_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 | */ |
58 | void | 58 | static void |
59 | qla2x00_unlock_nvram_access(scsi_qla_host_t *ha) | 59 | qla2x00_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 | */ |
77 | uint16_t | 77 | static uint16_t |
78 | qla2x00_get_nvram_word(scsi_qla_host_t *ha, uint32_t addr) | 78 | qla2x00_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 | */ |
96 | void | 96 | static void |
97 | qla2x00_write_nvram_word(scsi_qla_host_t *ha, uint32_t addr, uint16_t data) | 97 | qla2x00_write_nvram_word(scsi_qla_host_t *ha, uint32_t addr, uint16_t data) |
98 | { | 98 | { |
99 | int count; | 99 | int count; |