scsi: csiostor: fix incorrect dma device in case of vport
authorVarun Prakash <varun@chelsio.com>
Wed, 19 Dec 2018 10:12:50 +0000 (15:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 14:37:39 +0000 (15:37 +0100)
[ Upstream commit 9934613edcb40b92a216122876cd3b7e76d08390 ]

In case of ->vport_create() call scsi_add_host_with_dma() instead of
scsi_add_host() to pass correct dma device.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/csiostor/csio_init.c

index 28a9c7d706cb0ec3d63c2ab641d71fc687e90023..03c7b1603dbc186c1fcdb50d9ea53d7168b39ce9 100644 (file)
@@ -649,7 +649,7 @@ csio_shost_init(struct csio_hw *hw, struct device *dev,
        if (csio_lnode_init(ln, hw, pln))
                goto err_shost_put;
 
-       if (scsi_add_host(shost, dev))
+       if (scsi_add_host_with_dma(shost, dev, &hw->pdev->dev))
                goto err_lnode_exit;
 
        return ln;