summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorRusk, Mark <mark.rusk@hpe.com>2016-09-19 15:50:01 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-27 06:53:46 -0400
commitc9fef1cc3dd3677633e6fd6ea5bd7ef3b741fab3 (patch)
tree40dab7d20cf23c9136ed164e064f685721c751b5 /drivers/misc
parent3936e4c8db2095af5e6c704a3e4b2b500f568ae5 (diff)
drivers/misc/hpilo: Changes to support new security states in iLO5 FW
Changes to support new security states of the iLO5 firmware. - use BAR5 for CCB's for iLO5 - simplification of error handling Signed-off-by: Mark Rusk <mark.rusk@hpe.com> Signed-off-by: David Altobelli <david.altobelli@hpe.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/hpilo.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c
index d6a901cd4222..fea8ff40440f 100644
--- a/drivers/misc/hpilo.c
+++ b/drivers/misc/hpilo.c
@@ -688,7 +688,8 @@ static void ilo_unmap_device(struct pci_dev *pdev, struct ilo_hwinfo *hw)
688 688
689static int ilo_map_device(struct pci_dev *pdev, struct ilo_hwinfo *hw) 689static int ilo_map_device(struct pci_dev *pdev, struct ilo_hwinfo *hw)
690{ 690{
691 int error = -ENOMEM; 691 int bar;
692 unsigned long off;
692 693
693 /* map the memory mapped i/o registers */ 694 /* map the memory mapped i/o registers */
694 hw->mmio_vaddr = pci_iomap(pdev, 1, 0); 695 hw->mmio_vaddr = pci_iomap(pdev, 1, 0);
@@ -698,7 +699,15 @@ static int ilo_map_device(struct pci_dev *pdev, struct ilo_hwinfo *hw)
698 } 699 }
699 700
700 /* map the adapter shared memory region */ 701 /* map the adapter shared memory region */
701 hw->ram_vaddr = pci_iomap(pdev, 2, max_ccb * ILOHW_CCB_SZ); 702 if (pdev->subsystem_device == 0x00E4) {
703 bar = 5;
704 /* Last 8k is reserved for CCBs */
705 off = pci_resource_len(pdev, bar) - 0x2000;
706 } else {
707 bar = 2;
708 off = 0;
709 }
710 hw->ram_vaddr = pci_iomap_range(pdev, bar, off, max_ccb * ILOHW_CCB_SZ);
702 if (hw->ram_vaddr == NULL) { 711 if (hw->ram_vaddr == NULL) {
703 dev_err(&pdev->dev, "Error mapping shared mem\n"); 712 dev_err(&pdev->dev, "Error mapping shared mem\n");
704 goto mmio_free; 713 goto mmio_free;
@@ -717,7 +726,7 @@ ram_free:
717mmio_free: 726mmio_free:
718 pci_iounmap(pdev, hw->mmio_vaddr); 727 pci_iounmap(pdev, hw->mmio_vaddr);
719out: 728out:
720 return error; 729 return -ENOMEM;
721} 730}
722 731
723static void ilo_remove(struct pci_dev *pdev) 732static void ilo_remove(struct pci_dev *pdev)
@@ -899,7 +908,7 @@ static void __exit ilo_exit(void)
899 class_destroy(ilo_class); 908 class_destroy(ilo_class);
900} 909}
901 910
902MODULE_VERSION("1.4.1"); 911MODULE_VERSION("1.5.0");
903MODULE_ALIAS(ILO_NAME); 912MODULE_ALIAS(ILO_NAME);
904MODULE_DESCRIPTION(ILO_NAME); 913MODULE_DESCRIPTION(ILO_NAME);
905MODULE_AUTHOR("David Altobelli <david.altobelli@hpe.com>"); 914MODULE_AUTHOR("David Altobelli <david.altobelli@hpe.com>");