aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfad_im.c
diff options
context:
space:
mode:
authorMaggie Zhang <xmzhang@brocade.com>2010-12-09 22:12:32 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:32:56 -0500
commitf16a17507b09e10e0cccc4d675ccbfe030d51ef1 (patch)
tree4ead59bd8bfbd06f22dd18040b713fca998e1336 /drivers/scsi/bfa/bfad_im.c
parentf314878ab95d4802ddde066096f7b30087cea7ba (diff)
[SCSI] bfa: remove all OS wrappers
Remove OS wrapper functions/macros, and as a result remove bfa_os_inc.h. Signed-off-by: Maggie Zhang <xmzhang@brocade.com> Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfad_im.c')
-rw-r--r--drivers/scsi/bfa/bfad_im.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c
index d10adcbf24b3..7b0f9725bbc9 100644
--- a/drivers/scsi/bfa/bfad_im.c
+++ b/drivers/scsi/bfa/bfad_im.c
@@ -92,10 +92,10 @@ bfa_cb_ioim_done(void *drv, struct bfad_ioim_s *dio,
92 if (!cmnd->result && itnim && 92 if (!cmnd->result && itnim &&
93 (bfa_lun_queue_depth > cmnd->device->queue_depth)) { 93 (bfa_lun_queue_depth > cmnd->device->queue_depth)) {
94 /* Queue depth adjustment for good status completion */ 94 /* Queue depth adjustment for good status completion */
95 bfad_os_ramp_up_qdepth(itnim, cmnd->device); 95 bfad_ramp_up_qdepth(itnim, cmnd->device);
96 } else if (cmnd->result == SAM_STAT_TASK_SET_FULL && itnim) { 96 } else if (cmnd->result == SAM_STAT_TASK_SET_FULL && itnim) {
97 /* qfull handling */ 97 /* qfull handling */
98 bfad_os_handle_qfull(itnim, cmnd->device); 98 bfad_handle_qfull(itnim, cmnd->device);
99 } 99 }
100 } 100 }
101 101
@@ -123,7 +123,7 @@ bfa_cb_ioim_good_comp(void *drv, struct bfad_ioim_s *dio)
123 if (itnim_data) { 123 if (itnim_data) {
124 itnim = itnim_data->itnim; 124 itnim = itnim_data->itnim;
125 if (itnim) 125 if (itnim)
126 bfad_os_ramp_up_qdepth(itnim, cmnd->device); 126 bfad_ramp_up_qdepth(itnim, cmnd->device);
127 } 127 }
128 } 128 }
129 129
@@ -366,7 +366,7 @@ bfad_im_reset_bus_handler(struct scsi_cmnd *cmnd)
366 366
367 spin_lock_irqsave(&bfad->bfad_lock, flags); 367 spin_lock_irqsave(&bfad->bfad_lock, flags);
368 for (i = 0; i < MAX_FCP_TARGET; i++) { 368 for (i = 0; i < MAX_FCP_TARGET; i++) {
369 itnim = bfad_os_get_itnim(im_port, i); 369 itnim = bfad_get_itnim(im_port, i);
370 if (itnim) { 370 if (itnim) {
371 cmnd->SCp.ptr = (char *)&wq; 371 cmnd->SCp.ptr = (char *)&wq;
372 rc = bfad_im_target_reset_send(bfad, cmnd, itnim); 372 rc = bfad_im_target_reset_send(bfad, cmnd, itnim);
@@ -547,7 +547,7 @@ bfad_im_scsi_host_alloc(struct bfad_s *bfad, struct bfad_im_port_s *im_port,
547 547
548 mutex_unlock(&bfad_mutex); 548 mutex_unlock(&bfad_mutex);
549 549
550 im_port->shost = bfad_os_scsi_host_alloc(im_port, bfad); 550 im_port->shost = bfad_scsi_host_alloc(im_port, bfad);
551 if (!im_port->shost) { 551 if (!im_port->shost) {
552 error = 1; 552 error = 1;
553 goto out_free_idr; 553 goto out_free_idr;
@@ -573,7 +573,7 @@ bfad_im_scsi_host_alloc(struct bfad_s *bfad, struct bfad_im_port_s *im_port,
573 } 573 }
574 574
575 /* setup host fixed attribute if the lk supports */ 575 /* setup host fixed attribute if the lk supports */
576 bfad_os_fc_host_init(im_port); 576 bfad_fc_host_init(im_port);
577 577
578 return 0; 578 return 0;
579 579
@@ -684,7 +684,7 @@ bfad_im_probe(struct bfad_s *bfad)
684 bfad->im = im; 684 bfad->im = im;
685 im->bfad = bfad; 685 im->bfad = bfad;
686 686
687 if (bfad_os_thread_workq(bfad) != BFA_STATUS_OK) { 687 if (bfad_thread_workq(bfad) != BFA_STATUS_OK) {
688 kfree(im); 688 kfree(im);
689 rc = BFA_STATUS_FAILED; 689 rc = BFA_STATUS_FAILED;
690 } 690 }
@@ -697,14 +697,14 @@ void
697bfad_im_probe_undo(struct bfad_s *bfad) 697bfad_im_probe_undo(struct bfad_s *bfad)
698{ 698{
699 if (bfad->im) { 699 if (bfad->im) {
700 bfad_os_destroy_workq(bfad->im); 700 bfad_destroy_workq(bfad->im);
701 kfree(bfad->im); 701 kfree(bfad->im);
702 bfad->im = NULL; 702 bfad->im = NULL;
703 } 703 }
704} 704}
705 705
706struct Scsi_Host * 706struct Scsi_Host *
707bfad_os_scsi_host_alloc(struct bfad_im_port_s *im_port, struct bfad_s *bfad) 707bfad_scsi_host_alloc(struct bfad_im_port_s *im_port, struct bfad_s *bfad)
708{ 708{
709 struct scsi_host_template *sht; 709 struct scsi_host_template *sht;
710 710
@@ -719,7 +719,7 @@ bfad_os_scsi_host_alloc(struct bfad_im_port_s *im_port, struct bfad_s *bfad)
719} 719}
720 720
721void 721void
722bfad_os_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port) 722bfad_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port)
723{ 723{
724 if (!(im_port->flags & BFAD_PORT_DELETE)) 724 if (!(im_port->flags & BFAD_PORT_DELETE))
725 flush_workqueue(bfad->im->drv_workq); 725 flush_workqueue(bfad->im->drv_workq);
@@ -729,7 +729,7 @@ bfad_os_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port)
729} 729}
730 730
731void 731void
732bfad_os_destroy_workq(struct bfad_im_s *im) 732bfad_destroy_workq(struct bfad_im_s *im)
733{ 733{
734 if (im && im->drv_workq) { 734 if (im && im->drv_workq) {
735 flush_workqueue(im->drv_workq); 735 flush_workqueue(im->drv_workq);
@@ -739,7 +739,7 @@ bfad_os_destroy_workq(struct bfad_im_s *im)
739} 739}
740 740
741bfa_status_t 741bfa_status_t
742bfad_os_thread_workq(struct bfad_s *bfad) 742bfad_thread_workq(struct bfad_s *bfad)
743{ 743{
744 struct bfad_im_s *im = bfad->im; 744 struct bfad_im_s *im = bfad->im;
745 745
@@ -843,7 +843,7 @@ bfad_im_module_exit(void)
843} 843}
844 844
845void 845void
846bfad_os_ramp_up_qdepth(struct bfad_itnim_s *itnim, struct scsi_device *sdev) 846bfad_ramp_up_qdepth(struct bfad_itnim_s *itnim, struct scsi_device *sdev)
847{ 847{
848 struct scsi_device *tmp_sdev; 848 struct scsi_device *tmp_sdev;
849 849
@@ -871,7 +871,7 @@ bfad_os_ramp_up_qdepth(struct bfad_itnim_s *itnim, struct scsi_device *sdev)
871} 871}
872 872
873void 873void
874bfad_os_handle_qfull(struct bfad_itnim_s *itnim, struct scsi_device *sdev) 874bfad_handle_qfull(struct bfad_itnim_s *itnim, struct scsi_device *sdev)
875{ 875{
876 struct scsi_device *tmp_sdev; 876 struct scsi_device *tmp_sdev;
877 877
@@ -885,7 +885,7 @@ bfad_os_handle_qfull(struct bfad_itnim_s *itnim, struct scsi_device *sdev)
885} 885}
886 886
887struct bfad_itnim_s * 887struct bfad_itnim_s *
888bfad_os_get_itnim(struct bfad_im_port_s *im_port, int id) 888bfad_get_itnim(struct bfad_im_port_s *im_port, int id)
889{ 889{
890 struct bfad_itnim_s *itnim = NULL; 890 struct bfad_itnim_s *itnim = NULL;
891 891
@@ -946,7 +946,7 @@ bfad_im_supported_speeds(struct bfa_s *bfa)
946} 946}
947 947
948void 948void
949bfad_os_fc_host_init(struct bfad_im_port_s *im_port) 949bfad_fc_host_init(struct bfad_im_port_s *im_port)
950{ 950{
951 struct Scsi_Host *host = im_port->shost; 951 struct Scsi_Host *host = im_port->shost;
952 struct bfad_s *bfad = im_port->bfad; 952 struct bfad_s *bfad = im_port->bfad;
@@ -990,7 +990,7 @@ bfad_im_fc_rport_add(struct bfad_im_port_s *im_port, struct bfad_itnim_s *itnim)
990 rport_ids.port_name = 990 rport_ids.port_name =
991 cpu_to_be64(bfa_fcs_itnim_get_pwwn(&itnim->fcs_itnim)); 991 cpu_to_be64(bfa_fcs_itnim_get_pwwn(&itnim->fcs_itnim));
992 rport_ids.port_id = 992 rport_ids.port_id =
993 bfa_os_hton3b(bfa_fcs_itnim_get_fcid(&itnim->fcs_itnim)); 993 bfa_hton3b(bfa_fcs_itnim_get_fcid(&itnim->fcs_itnim));
994 rport_ids.roles = FC_RPORT_ROLE_UNKNOWN; 994 rport_ids.roles = FC_RPORT_ROLE_UNKNOWN;
995 995
996 itnim->fc_rport = fc_rport = 996 itnim->fc_rport = fc_rport =
@@ -1192,7 +1192,7 @@ out_fail_cmd:
1192static DEF_SCSI_QCMD(bfad_im_queuecommand) 1192static DEF_SCSI_QCMD(bfad_im_queuecommand)
1193 1193
1194void 1194void
1195bfad_os_rport_online_wait(struct bfad_s *bfad) 1195bfad_rport_online_wait(struct bfad_s *bfad)
1196{ 1196{
1197 int i; 1197 int i;
1198 int rport_delay = 10; 1198 int rport_delay = 10;
@@ -1220,7 +1220,7 @@ bfad_os_rport_online_wait(struct bfad_s *bfad)
1220} 1220}
1221 1221
1222int 1222int
1223bfad_os_get_linkup_delay(struct bfad_s *bfad) 1223bfad_get_linkup_delay(struct bfad_s *bfad)
1224{ 1224{
1225 u8 nwwns = 0; 1225 u8 nwwns = 0;
1226 wwn_t wwns[BFA_PREBOOT_BOOTLUN_MAX]; 1226 wwn_t wwns[BFA_PREBOOT_BOOTLUN_MAX];