diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2010-07-23 06:28:37 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 10:06:18 -0400 |
commit | 3dbe756a66afbec6487068d4213ecccc3a18807f (patch) | |
tree | 5b7c6454be612ffdb41788bb11fa16d5bf998774 /drivers/scsi | |
parent | de7c5d059dbd245ad80011725f9c86f560e61fff (diff) |
[SCSI] qla2xxx: Cleanup some dead-code and make some functions static.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 6 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 51 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 4 |
5 files changed, 5 insertions, 60 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index b7d940fcbc1b..1a1b281cea33 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -175,10 +175,7 @@ extern int qla2x00_start_scsi(srb_t *sp); | |||
175 | extern int qla24xx_start_scsi(srb_t *sp); | 175 | extern int qla24xx_start_scsi(srb_t *sp); |
176 | int qla2x00_marker(struct scsi_qla_host *, struct req_que *, struct rsp_que *, | 176 | int qla2x00_marker(struct scsi_qla_host *, struct req_que *, struct rsp_que *, |
177 | uint16_t, uint16_t, uint8_t); | 177 | uint16_t, uint16_t, uint8_t); |
178 | int __qla2x00_marker(struct scsi_qla_host *, struct req_que *, struct rsp_que *, | ||
179 | uint16_t, uint16_t, uint8_t); | ||
180 | extern int qla2x00_start_sp(srb_t *); | 178 | extern int qla2x00_start_sp(srb_t *); |
181 | extern void qla2x00_ctx_sp_free(srb_t *); | ||
182 | extern uint16_t qla24xx_calc_iocbs(uint16_t); | 179 | extern uint16_t qla24xx_calc_iocbs(uint16_t); |
183 | extern void qla24xx_build_scsi_iocbs(srb_t *, struct cmd_type_7 *, uint16_t); | 180 | extern void qla24xx_build_scsi_iocbs(srb_t *, struct cmd_type_7 *, uint16_t); |
184 | extern int qla24xx_dif_start_scsi(srb_t *); | 181 | extern int qla24xx_dif_start_scsi(srb_t *); |
@@ -489,11 +486,8 @@ extern int qla25xx_create_req_que(struct qla_hw_data *, uint16_t, uint8_t, | |||
489 | uint16_t, int, uint8_t); | 486 | uint16_t, int, uint8_t); |
490 | extern int qla25xx_create_rsp_que(struct qla_hw_data *, uint16_t, uint8_t, | 487 | extern int qla25xx_create_rsp_que(struct qla_hw_data *, uint16_t, uint8_t, |
491 | uint16_t, int); | 488 | uint16_t, int); |
492 | extern int qla25xx_update_req_que(struct scsi_qla_host *, uint8_t, uint8_t); | ||
493 | extern void qla2x00_init_response_q_entries(struct rsp_que *); | 489 | extern void qla2x00_init_response_q_entries(struct rsp_que *); |
494 | extern int qla25xx_delete_req_que(struct scsi_qla_host *, struct req_que *); | 490 | extern int qla25xx_delete_req_que(struct scsi_qla_host *, struct req_que *); |
495 | extern int qla25xx_delete_rsp_que(struct scsi_qla_host *, struct rsp_que *); | ||
496 | extern int qla25xx_create_queues(struct scsi_qla_host *, uint8_t); | ||
497 | extern int qla25xx_delete_queues(struct scsi_qla_host *); | 491 | extern int qla25xx_delete_queues(struct scsi_qla_host *); |
498 | extern uint16_t qla24xx_rd_req_reg(struct qla_hw_data *, uint16_t); | 492 | extern uint16_t qla24xx_rd_req_reg(struct qla_hw_data *, uint16_t); |
499 | extern uint16_t qla25xx_rd_req_reg(struct qla_hw_data *, uint16_t); | 493 | extern uint16_t qla25xx_rd_req_reg(struct qla_hw_data *, uint16_t); |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 1b7d80b20986..d863ed2619b5 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -64,7 +64,7 @@ qla2x00_ctx_sp_timeout(unsigned long __data) | |||
64 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 64 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
65 | } | 65 | } |
66 | 66 | ||
67 | void | 67 | static void |
68 | qla2x00_ctx_sp_free(srb_t *sp) | 68 | qla2x00_ctx_sp_free(srb_t *sp) |
69 | { | 69 | { |
70 | struct srb_ctx *ctx = sp->ctx; | 70 | struct srb_ctx *ctx = sp->ctx; |
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index c9c709e0f1a2..d2b299f2c503 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -461,7 +461,7 @@ queuing_error: | |||
461 | * | 461 | * |
462 | * Returns non-zero if a failure occurred, else zero. | 462 | * Returns non-zero if a failure occurred, else zero. |
463 | */ | 463 | */ |
464 | int | 464 | static int |
465 | __qla2x00_marker(struct scsi_qla_host *vha, struct req_que *req, | 465 | __qla2x00_marker(struct scsi_qla_host *vha, struct req_que *req, |
466 | struct rsp_que *rsp, uint16_t loop_id, | 466 | struct rsp_que *rsp, uint16_t loop_id, |
467 | uint16_t lun, uint8_t type) | 467 | uint16_t lun, uint8_t type) |
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 642cd79bd030..9a82c34f6206 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
@@ -482,7 +482,7 @@ qla25xx_delete_req_que(struct scsi_qla_host *vha, struct req_que *req) | |||
482 | return ret; | 482 | return ret; |
483 | } | 483 | } |
484 | 484 | ||
485 | int | 485 | static int |
486 | qla25xx_delete_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp) | 486 | qla25xx_delete_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp) |
487 | { | 487 | { |
488 | int ret = -1; | 488 | int ret = -1; |
@@ -497,23 +497,6 @@ qla25xx_delete_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp) | |||
497 | return ret; | 497 | return ret; |
498 | } | 498 | } |
499 | 499 | ||
500 | int qla25xx_update_req_que(struct scsi_qla_host *vha, uint8_t que, uint8_t qos) | ||
501 | { | ||
502 | int ret = 0; | ||
503 | struct qla_hw_data *ha = vha->hw; | ||
504 | struct req_que *req = ha->req_q_map[que]; | ||
505 | |||
506 | req->options |= BIT_3; | ||
507 | req->qos = qos; | ||
508 | ret = qla25xx_init_req_que(vha, req); | ||
509 | if (ret != QLA_SUCCESS) | ||
510 | DEBUG2_17(printk(KERN_WARNING "%s failed\n", __func__)); | ||
511 | /* restore options bit */ | ||
512 | req->options &= ~BIT_3; | ||
513 | return ret; | ||
514 | } | ||
515 | |||
516 | |||
517 | /* Delete all queues for a given vhost */ | 500 | /* Delete all queues for a given vhost */ |
518 | int | 501 | int |
519 | qla25xx_delete_queues(struct scsi_qla_host *vha) | 502 | qla25xx_delete_queues(struct scsi_qla_host *vha) |
@@ -740,35 +723,3 @@ que_failed: | |||
740 | failed: | 723 | failed: |
741 | return 0; | 724 | return 0; |
742 | } | 725 | } |
743 | |||
744 | int | ||
745 | qla25xx_create_queues(struct scsi_qla_host *vha, uint8_t qos) | ||
746 | { | ||
747 | uint16_t options = 0; | ||
748 | uint8_t ret = 0; | ||
749 | struct qla_hw_data *ha = vha->hw; | ||
750 | struct rsp_que *rsp; | ||
751 | |||
752 | options |= BIT_1; | ||
753 | ret = qla25xx_create_rsp_que(ha, options, vha->vp_idx, 0, -1); | ||
754 | if (!ret) { | ||
755 | qla_printk(KERN_WARNING, ha, "Response Que create failed\n"); | ||
756 | return ret; | ||
757 | } else | ||
758 | qla_printk(KERN_INFO, ha, "Response Que:%d created.\n", ret); | ||
759 | rsp = ha->rsp_q_map[ret]; | ||
760 | |||
761 | options = 0; | ||
762 | if (qos & BIT_7) | ||
763 | options |= BIT_8; | ||
764 | ret = qla25xx_create_req_que(ha, options, vha->vp_idx, 0, ret, | ||
765 | qos & ~BIT_7); | ||
766 | if (ret) { | ||
767 | vha->req = ha->req_q_map[ret]; | ||
768 | qla_printk(KERN_INFO, ha, "Request Que:%d created.\n", ret); | ||
769 | } else | ||
770 | qla_printk(KERN_WARNING, ha, "Request Que create failed\n"); | ||
771 | rsp->req = ha->req_q_map[ret]; | ||
772 | |||
773 | return ret; | ||
774 | } | ||
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 50f685415fb2..aeb2f1b504c4 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -701,7 +701,7 @@ qla2x00_wait_for_hba_online(scsi_qla_host_t *vha) | |||
701 | * Success (Adapter is online/no flash ops) : 0 | 701 | * Success (Adapter is online/no flash ops) : 0 |
702 | * Failed (Adapter is offline/disabled/flash ops in progress) : 1 | 702 | * Failed (Adapter is offline/disabled/flash ops in progress) : 1 |
703 | */ | 703 | */ |
704 | int | 704 | static int |
705 | qla2x00_wait_for_reset_ready(scsi_qla_host_t *vha) | 705 | qla2x00_wait_for_reset_ready(scsi_qla_host_t *vha) |
706 | { | 706 | { |
707 | int return_status; | 707 | int return_status; |
@@ -3469,7 +3469,7 @@ qla2x00_sp_free_dma(srb_t *sp) | |||
3469 | CMD_SP(cmd) = NULL; | 3469 | CMD_SP(cmd) = NULL; |
3470 | } | 3470 | } |
3471 | 3471 | ||
3472 | void | 3472 | static void |
3473 | qla2x00_sp_final_compl(struct qla_hw_data *ha, srb_t *sp) | 3473 | qla2x00_sp_final_compl(struct qla_hw_data *ha, srb_t *sp) |
3474 | { | 3474 | { |
3475 | struct scsi_cmnd *cmd = sp->cmd; | 3475 | struct scsi_cmnd *cmd = sp->cmd; |