diff options
Diffstat (limited to 'drivers/scsi/bfa/bfad.c')
-rw-r--r-- | drivers/scsi/bfa/bfad.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index 13f5feb308c2..d4fc4287ebd3 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <fcb/bfa_fcb.h> | 33 | #include <fcb/bfa_fcb.h> |
34 | 34 | ||
35 | BFA_TRC_FILE(LDRV, BFAD); | 35 | BFA_TRC_FILE(LDRV, BFAD); |
36 | static DEFINE_MUTEX(bfad_mutex); | 36 | DEFINE_MUTEX(bfad_mutex); |
37 | LIST_HEAD(bfad_list); | 37 | LIST_HEAD(bfad_list); |
38 | static int bfad_inst; | 38 | static int bfad_inst; |
39 | int bfad_supported_fc4s; | 39 | int bfad_supported_fc4s; |
@@ -299,8 +299,6 @@ bfa_fcb_vport_delete(struct bfad_vport_s *vport_drv) | |||
299 | complete(vport_drv->comp_del); | 299 | complete(vport_drv->comp_del); |
300 | return; | 300 | return; |
301 | } | 301 | } |
302 | |||
303 | kfree(vport_drv); | ||
304 | } | 302 | } |
305 | 303 | ||
306 | /** | 304 | /** |
@@ -483,7 +481,7 @@ ext: | |||
483 | */ | 481 | */ |
484 | bfa_status_t | 482 | bfa_status_t |
485 | bfad_vport_create(struct bfad_s *bfad, u16 vf_id, | 483 | bfad_vport_create(struct bfad_s *bfad, u16 vf_id, |
486 | struct bfa_port_cfg_s *port_cfg) | 484 | struct bfa_port_cfg_s *port_cfg, struct device *dev) |
487 | { | 485 | { |
488 | struct bfad_vport_s *vport; | 486 | struct bfad_vport_s *vport; |
489 | int rc = BFA_STATUS_OK; | 487 | int rc = BFA_STATUS_OK; |
@@ -506,7 +504,8 @@ bfad_vport_create(struct bfad_s *bfad, u16 vf_id, | |||
506 | goto ext_free_vport; | 504 | goto ext_free_vport; |
507 | 505 | ||
508 | if (port_cfg->roles & BFA_PORT_ROLE_FCP_IM) { | 506 | if (port_cfg->roles & BFA_PORT_ROLE_FCP_IM) { |
509 | rc = bfad_im_scsi_host_alloc(bfad, vport->drv_port.im_port); | 507 | rc = bfad_im_scsi_host_alloc(bfad, vport->drv_port.im_port, |
508 | dev); | ||
510 | if (rc != BFA_STATUS_OK) | 509 | if (rc != BFA_STATUS_OK) |
511 | goto ext_free_fcs_vport; | 510 | goto ext_free_fcs_vport; |
512 | } | 511 | } |
@@ -591,7 +590,6 @@ bfad_init_timer(struct bfad_s *bfad) | |||
591 | int | 590 | int |
592 | bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad) | 591 | bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad) |
593 | { | 592 | { |
594 | unsigned long bar0_len; | ||
595 | int rc = -ENODEV; | 593 | int rc = -ENODEV; |
596 | 594 | ||
597 | if (pci_enable_device(pdev)) { | 595 | if (pci_enable_device(pdev)) { |
@@ -611,9 +609,7 @@ bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad) | |||
611 | goto out_release_region; | 609 | goto out_release_region; |
612 | } | 610 | } |
613 | 611 | ||
614 | bfad->pci_bar0_map = pci_resource_start(pdev, 0); | 612 | bfad->pci_bar0_kva = pci_iomap(pdev, 0, pci_resource_len(pdev, 0)); |
615 | bar0_len = pci_resource_len(pdev, 0); | ||
616 | bfad->pci_bar0_kva = ioremap(bfad->pci_bar0_map, bar0_len); | ||
617 | 613 | ||
618 | if (bfad->pci_bar0_kva == NULL) { | 614 | if (bfad->pci_bar0_kva == NULL) { |
619 | BFA_PRINTF(BFA_ERR, "Fail to map bar0\n"); | 615 | BFA_PRINTF(BFA_ERR, "Fail to map bar0\n"); |
@@ -646,11 +642,7 @@ out: | |||
646 | void | 642 | void |
647 | bfad_pci_uninit(struct pci_dev *pdev, struct bfad_s *bfad) | 643 | bfad_pci_uninit(struct pci_dev *pdev, struct bfad_s *bfad) |
648 | { | 644 | { |
649 | #if defined(__ia64__) | ||
650 | pci_iounmap(pdev, bfad->pci_bar0_kva); | 645 | pci_iounmap(pdev, bfad->pci_bar0_kva); |
651 | #else | ||
652 | iounmap(bfad->pci_bar0_kva); | ||
653 | #endif | ||
654 | pci_release_regions(pdev); | 646 | pci_release_regions(pdev); |
655 | pci_disable_device(pdev); | 647 | pci_disable_device(pdev); |
656 | pci_set_drvdata(pdev, NULL); | 648 | pci_set_drvdata(pdev, NULL); |
@@ -848,7 +840,8 @@ bfad_cfg_pport(struct bfad_s *bfad, enum bfa_port_role role) | |||
848 | goto out; | 840 | goto out; |
849 | } | 841 | } |
850 | 842 | ||
851 | rc = bfad_im_scsi_host_alloc(bfad, bfad->pport.im_port); | 843 | rc = bfad_im_scsi_host_alloc(bfad, bfad->pport.im_port, |
844 | &bfad->pcidev->dev); | ||
852 | if (rc != BFA_STATUS_OK) | 845 | if (rc != BFA_STATUS_OK) |
853 | goto out; | 846 | goto out; |
854 | 847 | ||