From patchwork Thu Dec 21 10:11:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 10127267 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6B13D60318 for ; Thu, 21 Dec 2017 10:11:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55B3329BB6 for ; Thu, 21 Dec 2017 10:11:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53F9629BBB; Thu, 21 Dec 2017 10:11:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D06C29BB7 for ; Thu, 21 Dec 2017 10:11:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751105AbdLUKLI (ORCPT ); Thu, 21 Dec 2017 05:11:08 -0500 Received: from mail-cys01nam02on0068.outbound.protection.outlook.com ([104.47.37.68]:2848 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751168AbdLUKLC (ORCPT ); Thu, 21 Dec 2017 05:11:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=tPO7ZXaVfyGQFLAGS2cwbAOEVnfziUTPqkyeqNeZ8fo=; b=I1sY0jXTilyqGQP6RbbJq9ly+70bKhSH/iQbEa9NHkAxJlS6f8gV2dltAx6lb7+W0jvPGNFtLYxP1WUNaDuCCgIe7BYcP/6LgylvZC4LwKQMvX734S/T33cvrt3GrHWlsj1Rebq5Qe7PgFZd++oP3LwWcQrM6qn9w4JKkw8qhlQ= Received: from MWHPR02CA0020.namprd02.prod.outlook.com (10.168.209.158) by MWHPR02MB3390.namprd02.prod.outlook.com (10.164.187.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Thu, 21 Dec 2017 10:10:57 +0000 Received: from SN1NAM02FT014.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::207) by MWHPR02CA0020.outlook.office365.com (2603:10b6:300:4b::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.345.14 via Frontend Transport; Thu, 21 Dec 2017 10:10:57 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by SN1NAM02FT014.mail.protection.outlook.com (10.152.72.106) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.302.6 via Frontend Transport; Thu, 21 Dec 2017 10:10:56 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1eRxoW-0003Hz-3M; Thu, 21 Dec 2017 02:10:56 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1eRxoV-0001a1-TF; Thu, 21 Dec 2017 02:10:56 -0800 Received: from xsj-pvapsmtp01 (xsj-smtp1.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id vBLAAoge027227; Thu, 21 Dec 2017 02:10:50 -0800 Received: from [172.23.37.94] (helo=ubuntu.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1eRxoQ-0001VY-2V; Thu, 21 Dec 2017 02:10:50 -0800 From: Kedareswara rao Appana To: , , , , , , , , CC: , , Subject: [LINUX PATCH 1/4] dmaengine: xilinx_dma: Fix dma_get_slave_caps() API failures Date: Thu, 21 Dec 2017 15:41:35 +0530 Message-ID: <1513851098-15787-2-git-send-email-appanad@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513851098-15787-1-git-send-email-appanad@xilinx.com> References: <1513851098-15787-1-git-send-email-appanad@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23542.006 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(39380400002)(376002)(39860400002)(396003)(2980300002)(438002)(199004)(189003)(5660300001)(47776003)(48376002)(106002)(77096006)(305945005)(2201001)(7696005)(81166006)(50466002)(478600001)(2906002)(8676002)(4326008)(39060400002)(54906003)(51416003)(81156014)(110136005)(63266004)(356003)(76176011)(7416002)(316002)(2950100002)(36756003)(106466001)(6666003)(16586007)(9786002)(36386004)(8936002)(59450400001)(50226002)(107986001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR02MB3390; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT014; 1:Qn5OPGr5dZKazu9E5IZW6twqxpykN6kxC20lPEK7wnzHEQDodB2adcB831E9iH2TEZtn7O6NT6O6oqW1rTcLNY6OD38uMz5p1vKKxf5YM7kIAPo9oJw3vx0DkmzC9N2v MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 86f88ec6-ab41-4c5f-97ae-08d5485b20a1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4608076)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307)(7153060); SRVR:MWHPR02MB3390; X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB3390; 3:36kHYgtYJ3vvUsf7ilhhqwBy+HlwErtehNJok9ZCs9DTtaNDakX+AfkwCmR0ECssIu+fjwMgi+EfON3kG0828p2tGMcjgJsoi47qHEv/NZqSPzijPPQ3tojvKMMnBYA30hQNdGLBHHq7vl+C9Ab3hAgXHDudolyailWrHn5xslAC9XQ8zAmQdQKxyoSsixEpxUyDu6eWhB2/+1L80v/WxgNLGGSBtX9UvkPDkIvr9Tleq2WcqeJ8IL5DhgtpgApq/8tGt/zJ6E70iFGBjLcPV5SFDiMlGxsnxvyWVbCiq+QeCEttGCcfvufbuGgSPq/uDUwDX3O1/yRD6A53kq/UpDVQOPRWvwJHfZmJUMEMreU=; 25:DgvQtLZAer5weJJZqS686wtht6EjjSF7RvJ7cSXHtVnxs8jmiPaCV8yD+Epx1AmDsi6zoMAvAIRWmFN0LjgGGaYVKkiBnvdqipEeFBHCpt2pNAq2FQN7PCVVAM82UayimlttP0r4sG7/G0LGX5pMSnCrQAFs7SquXTL49hzsQs1K6Gac2BP5JiE4xtVOL7Q76YupFHcEMGxgTsignQfdwXCrWAPfZmQ64tzgV0p+pbHGxSbB7yeI4OBP6Lno43fP6Fx56Opq+qYDrdfZj4Rm+0ZsjyTOIGc2mEyVMOJFh23G32UDdVFUYy9cyNPzF2WYCje5EoCYiDID7Z9n/W0eskxQO5Nv99AEiZGSHUfopFs= X-MS-TrafficTypeDiagnostic: MWHPR02MB3390: X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB3390; 31:xcwaeOl9SzSNkfVE3/8tKH9wHFmE5yEMATLcvgir2ypkQAQOb5U3Jc2tjua5eNnEWaQuOnvZQRh4gmvGn41uZIxo+M9uOdMFG2Q+wSDJxjMkwoy7fGfhQCK55ZZ8bedG2xh/HIL3QGMEfb/0IOf/CpuMu7AECx3p1gid08fddfmqhhG99M6V94o3VR7q0JrPkvdvlu6tb+LKtmisL0zuLFzofJbRLwdfMaZalSjXVEY=; 20:NyQM3o8aSwin4TW59xZ8cOTZCI8f4z921RgK8+Ke+9L3xCQ0cximUu1ICWomPEylRoJq5BCpo6DgAYfhjl0R7++NfYLIIovsxxCzuruo2dEF/JJV9S/WPd1g8sFqwkAvvIffpDW38Y5aj6BZ0JBbUuaOIr6gjTrI3Q77E689sSxy8MhejIXYUSxGSFkcI2n/M79OD3JJ9Ep32pzYpCv+M+1u7rP6jw820g/nU8FOZZbOY5aElsTMUYOI/QQJmO3BDukDnGzv7+3rZYraJG73HHDRpgYR3x5XktjbLhit99PVsvq5iRjPODlJFlcPDOBHAyHlM4ccKJY1I7GC+6w5GHO6ops2NICNMdIrfP6dtwRI99OPHK6yabCYV7gEWX/jodFJo2dyUxnZU5KvHrPvoZXn8mlKrAN0/wKVmYaFw5tZ23MZjkZD+CRzhZqSqqdAJYz9yF33aQvTr/mPocN538A+8vVHUT5EExxEIz5DlwxNvNepJ35gQRRN5RyIBjpC X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(93006095)(93004095)(10201501046)(3231023)(3002001)(6055026)(6041268)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:MWHPR02MB3390; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:MWHPR02MB3390; X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB3390; 4:WMAfPO3HvFoJJR+ZuxCbD/s6OI9mltNN+CPEe7TvFe6WZQ1+psbpVB3ZOsfgqF+OiBlJk7PUdgkGhvIRXXolCsG2+i67Sz+wsUfiD0OPIqtmHAcF5KrDY7OHZ4ATHyDfbIvdgADo2KnHxSgAxivd7oKzp+4uT+gFKPkQQOKmeOR83HIm9tcAX1Bocma7c6Z1iF5OSx5v41K40S3aKkgjC4L/3YcMq0gwQhOYx0itCqT8YpkPTxXUJt/3QdbFgKCDwKFw3113+MBgIoSBnWhhYp502gcrFC7dW+k5/wGAPEMHubc/WaTXwUopPObNXIIc X-Forefront-PRVS: 0528942FD8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR02MB3390; 23:a4UTp0IjFnA1Ha/KxD0eS53fej6x/611vJFJiGcvP?= =?us-ascii?Q?bjs9cthFKubKs7rm5ZhKVIX2+axIA1fzdi+HG0dFz4pvrRtRMCjNo8eY3UEl?= =?us-ascii?Q?P1Zqoykyrl3GyRMpcU0xOaxviab9Irol2z8yOoanYHqAjWfjb0msrpRfmP9g?= =?us-ascii?Q?Z7qp9zWuFHzmcN8CHIlfNNUaZ57HxW3OuHczHkBF2DDNghLPQo2gtxef0y92?= =?us-ascii?Q?g7G6aD9bjIQ2wqjVY+fFbeIhyRPeXLNauQtNJBdomA2pIZ/u/Yqfro4tQO1n?= =?us-ascii?Q?uEuuHqZe+AJM3zm7lPSI345nOcJCVLAZsLm9i0zQ/bo4i4sEIqsSMOBjiKeT?= =?us-ascii?Q?LwE0JfbnvLmSMIVPTVV6OwVHoa1WCVnc9NyR23nrmPqQMDHkrvgH88zzrQ6d?= =?us-ascii?Q?zFsJ+VHgPe8za9wWKhmNx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JnA8shadPBPifG3A82rtmdipw2XwImnvo5oPVlokiEJc/IPjmij5sauR6sbvxJ/O7l4WHMpvEZ38pSgODVE3akQ0MKy6vZIOPZMQODds+f83OcIxZhJ1r9sdtBPg2cLD6pKHiJDZyxSkF4yABo=; 5:+KaEx8ugI1fQV4L7tvyc6WBYEX2CVOW6w9wcONxncZDPqOUpEiWg6ibx7xQq/5HtjHy9Zl02iv48/urcysQoUTjjK/UqczTTKJSudW8OTPU4zJdy49bZCGkKtVXjtK9m73SvKmMOCVyNyNw2gz9hcLKb4e6FUT+9gV0mI+YQFuA=; 24:1XWVAsxHsv5qpLIsZ7OMjI4JV2KNkU2dmWFfSKltRSN8M7+2r2ZGjGXMKZROFYxSppmDpJueAlV6zj6hKn4ZGuCtVIC4SWgoR2lIzCsKuN8=; 7:yiAkPUq7K71qh4Og534iFhb/on3CXGtZc5mUcjvJmxyjzbZEUY15qpwlMyFz/WLmOMqdtBwXST6RwPeL7sFqWtDR3s4jBdftlGTrFEG7DV49GicG83540BAvnp1+3X82n/otzU+AVJtI+d0GP1H18OVW+LA6ebMKvO581hWfOjSVDTqOkPXHR+jVo/+9Enbah7E7GVubEfIntk3bFOXRYoJkfFvSo/WlMsP8iqGPeGwEU46YglVGAW0H4aWNDPaW SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2017 10:10:56.5727 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 86f88ec6-ab41-4c5f-97ae-08d5485b20a1 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR02MB3390 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. 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 =