From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sricharan R Subject: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops Date: Tue, 4 Oct 2016 22:33:50 +0530 Message-ID: <1475600632-21289-7-git-send-email-sricharan@codeaurora.org> References: <1475600632-21289-1-git-send-email-sricharan@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1475600632-21289-1-git-send-email-sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: will.deacon-5wv7dgnIgG8@public.gmane.org, robin.murphy-5wv7dgnIgG8@public.gmane.org, joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org, m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, tfiga-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org Cc: sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org List-Id: linux-arm-msm@vger.kernel.org The dma_ops for the device is not getting set to NULL in arch_tear_down_dma_ops and this causes an issue when the device's probe gets deferred and retried. So reset the dma_ops to NULL. Signed-off-by: Sricharan R --- arch/arm/mm/dma-mapping.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index dde6514..b9191f0 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -2295,6 +2295,7 @@ static void arm_teardown_iommu_dma_ops(struct device *dev) __arm_iommu_detach_device(dev); arm_iommu_release_mapping(mapping); + set_dma_ops(dev, NULL); } #else -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation From mboxrd@z Thu Jan 1 00:00:00 1970 From: sricharan@codeaurora.org (Sricharan R) Date: Tue, 4 Oct 2016 22:33:50 +0530 Subject: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops In-Reply-To: <1475600632-21289-1-git-send-email-sricharan@codeaurora.org> References: <1475600632-21289-1-git-send-email-sricharan@codeaurora.org> Message-ID: <1475600632-21289-7-git-send-email-sricharan@codeaurora.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org The dma_ops for the device is not getting set to NULL in arch_tear_down_dma_ops and this causes an issue when the device's probe gets deferred and retried. So reset the dma_ops to NULL. Signed-off-by: Sricharan R --- arch/arm/mm/dma-mapping.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index dde6514..b9191f0 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -2295,6 +2295,7 @@ static void arm_teardown_iommu_dma_ops(struct device *dev) __arm_iommu_detach_device(dev); arm_iommu_release_mapping(mapping); + set_dma_ops(dev, NULL); } #else -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation