Merge tag 'rpmsg-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson...
[linux-2.6-microblaze.git] / drivers / scsi / hpsa.c
index 48d5da5..83ce4f1 100644 (file)
@@ -1,5 +1,6 @@
 /*
  *    Disk Array driver for HP Smart Array SAS controllers
+ *    Copyright (c) 2019-2020 Microchip Technology Inc. and its subsidiaries
  *    Copyright 2016 Microsemi Corporation
  *    Copyright 2014-2015 PMC-Sierra, Inc.
  *    Copyright 2000,2009-2015 Hewlett-Packard Development Company, L.P.
@@ -9329,10 +9330,10 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
 static void hpsa_free_ioaccel1_cmd_and_bft(struct ctlr_info *h)
 {
        if (h->ioaccel_cmd_pool) {
-               pci_free_consistent(h->pdev,
-                       h->nr_cmds * sizeof(*h->ioaccel_cmd_pool),
-                       h->ioaccel_cmd_pool,
-                       h->ioaccel_cmd_pool_dhandle);
+               dma_free_coherent(&h->pdev->dev,
+                                 h->nr_cmds * sizeof(*h->ioaccel_cmd_pool),
+                                 h->ioaccel_cmd_pool,
+                                 h->ioaccel_cmd_pool_dhandle);
                h->ioaccel_cmd_pool = NULL;
                h->ioaccel_cmd_pool_dhandle = 0;
        }
@@ -9382,10 +9383,10 @@ static void hpsa_free_ioaccel2_cmd_and_bft(struct ctlr_info *h)
        hpsa_free_ioaccel2_sg_chain_blocks(h);
 
        if (h->ioaccel2_cmd_pool) {
-               pci_free_consistent(h->pdev,
-                       h->nr_cmds * sizeof(*h->ioaccel2_cmd_pool),
-                       h->ioaccel2_cmd_pool,
-                       h->ioaccel2_cmd_pool_dhandle);
+               dma_free_coherent(&h->pdev->dev,
+                                 h->nr_cmds * sizeof(*h->ioaccel2_cmd_pool),
+                                 h->ioaccel2_cmd_pool,
+                                 h->ioaccel2_cmd_pool_dhandle);
                h->ioaccel2_cmd_pool = NULL;
                h->ioaccel2_cmd_pool_dhandle = 0;
        }