Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751408AbeACFJS (ORCPT + 1 other); Wed, 3 Jan 2018 00:09:18 -0500 Received: from mail-by2nam01on0080.outbound.protection.outlook.com ([104.47.34.80]:9117 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751239AbeACFJQ (ORCPT ); Wed, 3 Jan 2018 00:09:16 -0500 From: Appana Durga Kedareswara Rao To: Vinod Koul CC: "dan.j.williams@intel.com" , "michal.simek@xilinx.com" , "lars@metafoo.de" , "akinobu.mita@gmail.com" , "joabreu@synopsys.com" , "mike.looijmans@topic.nl" , "kedare06@gmail.com" , "dmaengine@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: RE: [LINUX PATCH 1/4] dmaengine: xilinx_dma: Fix dma_get_slave_caps() API failures Thread-Topic: [LINUX PATCH 1/4] dmaengine: xilinx_dma: Fix dma_get_slave_caps() API failures Thread-Index: AQHTekQg7VENjOPnUE+AbePFR1Y+X6NhmXGAgAATpuA= Date: Wed, 3 Jan 2018 05:09:08 +0000 Message-ID: References: <1513851098-15787-1-git-send-email-appanad@xilinx.com> <1513851098-15787-2-git-send-email-appanad@xilinx.com> <20180103035735.GF18649@localhost> In-Reply-To: <20180103035735.GF18649@localhost> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=appanad@xilinx.com; x-originating-ip: [182.72.145.30] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR02MB1691;7:wlU3DXHhGBsiPyZceakMgc/uPRkEBvCwYG/kxCO0W8cdnKY6sjjgyJZishq3xumAUo5hlileLYcF/hP2ee//nyAEuMc8Tl7BJExEmDFWpFYa5+EaOtA5CQEcChnoFlfefTmK2TTG0JykTCvrqarEeo/M71HlKevM2Kxr1vexbQtCrtJSQiFo0R3UAA0MGN82Agh3p8fqkhYEwP2fMt5z9D0ODpeoPi55O87p79KeUl3mg/citxVFdo5G7EJy2hMd x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 4140ed5a-9a2c-4f31-7e80-08d552681ef2 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7153060);SRVR:CY1PR02MB1691; x-ms-traffictypediagnostic: CY1PR02MB1691: x-ld-processed: 657af505-d5df-48d0-8300-c31994686c5c,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(192813158149592); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(3231023)(944501075)(93006095)(93001095)(10201501046)(6055026)(6041268)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:CY1PR02MB1691;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:CY1PR02MB1691; x-forefront-prvs: 0541031FF6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(39860400002)(346002)(376002)(396003)(39380400002)(51914003)(189003)(199004)(24454002)(2950100002)(25786009)(6506007)(55236004)(478600001)(6916009)(68736007)(81156014)(8676002)(2900100001)(6116002)(54906003)(102836004)(86362001)(316002)(3846002)(76176011)(81166006)(8936002)(59450400001)(9686003)(33656002)(6306002)(229853002)(55016002)(97736004)(106356001)(6436002)(14454004)(77096006)(105586002)(6246003)(7696005)(4326008)(5660300001)(53936002)(74316002)(7416002)(305945005)(3660700001)(7736002)(66066001)(99286004)(3280700002)(2906002)(966005)(39060400002)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR02MB1691;H:CY1PR02MB1692.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-microsoft-antispam-message-info: oGEHg6rpO3Wv7zFNrF5VCpOSa2EVF3q9rJpa8Atnka4UM5af4zY3z+ygg52YAPpRKFwaOBjQPhzRxDvwD1IhZQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4140ed5a-9a2c-4f31-7e80-08d552681ef2 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jan 2018 05:09:09.0671 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR02MB1691 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Vinod, Thanks for the review... > >On Thu, Dec 21, 2017 at 03:41:35PM +0530, Kedareswara rao Appana wrote: > >Patch title should say what is does, not the cause/effect Sure will fix in v2... > >An apt title might be "populate dma caps properly" > >> When client driver uses dma_get_slave_caps() api, it checks for >> certain fields of dma_device struct currently driver is not settings >> few fields resulting >> dma_get_slave_caps() returning failure. > >It would help to mention the fields you are setting here Sure will fix in v2... Regards, Kedar. > >> >> This patch fixes this issue by populating proper values to the struct >> dma_device fields. >> >> Signed-off-by: Kedareswara rao Appana >> --- >> drivers/dma/xilinx/xilinx_dma.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/dma/xilinx/xilinx_dma.c >> b/drivers/dma/xilinx/xilinx_dma.c index 88d317d..21ac954 100644 >> --- a/drivers/dma/xilinx/xilinx_dma.c >> +++ b/drivers/dma/xilinx/xilinx_dma.c >> @@ -2398,6 +2398,7 @@ static int xilinx_dma_chan_probe(struct >xilinx_dma_device *xdev, >> chan->direction = DMA_MEM_TO_DEV; >> chan->id = chan_id; >> chan->tdest = chan_id; >> + xdev->common.directions = BIT(DMA_MEM_TO_DEV); >> >> chan->ctrl_offset = XILINX_DMA_MM2S_CTRL_OFFSET; >> if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) { @@ - >2415,6 >> +2416,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev, >> chan->direction = DMA_DEV_TO_MEM; >> chan->id = chan_id; >> chan->tdest = chan_id - xdev->nr_channels; >> + xdev->common.directions |= BIT(DMA_DEV_TO_MEM); >> >> chan->ctrl_offset = XILINX_DMA_S2MM_CTRL_OFFSET; >> if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) { @@ - >2629,6 >> +2631,8 @@ static int xilinx_dma_probe(struct platform_device *pdev) >> dma_cap_set(DMA_PRIVATE, xdev->common.cap_mask); >> } >> >> + xdev->common.dst_addr_widths = BIT(addr_width / 8); >> + xdev->common.src_addr_widths = BIT(addr_width / 8); >> xdev->common.device_alloc_chan_resources = >> xilinx_dma_alloc_chan_resources; >> xdev->common.device_free_chan_resources = >> -- >> 2.7.4 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe dmaengine" >> in the body of a message to majordomo@vger.kernel.org More majordomo >> info at http://vger.kernel.org/majordomo-info.html > >-- >~Vinod