Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp108060ybf; Wed, 26 Feb 2020 09:40:00 -0800 (PST) X-Google-Smtp-Source: APXvYqx/s7Dyz+PIT5rMZnBl9EY7MThS79SERX9Zp6JBvH8jdHji3rfW0DAhWEO65eqIKhKn4xt/ X-Received: by 2002:aca:af09:: with SMTP id y9mr72847oie.101.1582738800773; Wed, 26 Feb 2020 09:40:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582738800; cv=none; d=google.com; s=arc-20160816; b=Kic5oFOCxz3nwnubGaTZnHxhyq1YXKgrsB+kafkZk7Ue+vG0lUjS2ysv6dsFiDBQS+ HddNC3jvICu6Wqlzc6POveWXeB4pKygSRcDkqRtSaeGYKvR+C+HYz4skvYW6BxMgvuyG kgSiSosbSeeO+Eu0o0OyHQz//lUvwydf0Ow522+6ESlbS8XQLQ9y0h1ytHuSKxLAaH/J GqyBqyc6n8DZIa4WsWsu5I1BSQuDX2YbRaKjCB9qPDnAX/M3ayA4iYq0wPZ1hMCMir/d rmNaQGbwbNz6UmLn4Y7snjyqTUHQCwLcPh/ptDfzuhVI42DtdZ5VnMoEElV8+qGVXKNx 8nbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=KJVWNiLO2XYEh/FJRHM/WNaS94bI+2bjZE1Lp7/CNI8=; b=PgJqYxtcFW0sJX/9X3NllEpKsB/pilYOjfJ+bjMnz33maTlLW3gHJ1So8h6f5T/KRC hAZ9+5QtZW9SB0D7AlM/iJpk5+Cn6p5V5qNlhaowulNgClx6WgeOCcRlungfIqxJZ3Bj eauSnYapUbGksEtWNGHCnLr5e2ZuM4KqPlh596vsLdpbkFynBHJsgIcYNN93vW20X5JU aYJr5d22Csd+kumf1Sph4oTJs2KpWBoRgmqlT7CppWAJNkM3/uIQKudwWrTTXmKVRAOw vzeUy4ZVyAZ4/Oidauw87PVQBCvB3n+nvRibxzW2FpX/CkFWt6vRcNubcyBhbVeUJ0Kd sPlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b="dIpH/wDA"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y23si140785oti.65.2020.02.26.09.39.45; Wed, 26 Feb 2020 09:40:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b="dIpH/wDA"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726995AbgBZRjf (ORCPT + 99 others); Wed, 26 Feb 2020 12:39:35 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:33476 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726747AbgBZRje (ORCPT ); Wed, 26 Feb 2020 12:39:34 -0500 Received: by mail-lj1-f194.google.com with SMTP id y6so35700lji.0 for ; Wed, 26 Feb 2020 09:39:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KJVWNiLO2XYEh/FJRHM/WNaS94bI+2bjZE1Lp7/CNI8=; b=dIpH/wDA+5ORYci2RAKWNzFzZt5sm/omU0tq/L8PepurNM9S4YzCfMTtXNupSrv7Vf IQOMP7hSQn6ONokXpHYW3RocjvKVT5PyIFE42iTyo7MRFtyalwi62sBMB3uYHgq37BU6 0uI0CzLwZaCydkkf2fhIjihY3VFbPs3sPPnfUT0R3phOU4KGGU93CNtzkT/3yj89lmES rwYv88J/icWZ9owhdYngzLVojP0+K90bJ+wJqOyv/Y0XqjEm5fE3Ufq8pxsXGOzxs37m HhXkPDIq1/ZlxFuPieRYRDT7xRng9aV/Km9JRptj6X54C+mR5+6/82XSud2X7kEDCanm ZAHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KJVWNiLO2XYEh/FJRHM/WNaS94bI+2bjZE1Lp7/CNI8=; b=NAHVkhbZL8oCYdp/PmglE9KlhSoPFCEMrtt5DkgEiGK2OwZoyDGnKdiPcNBgsA8sZa Nw185BCybXR/qZ1fRjxLblB6J8aNDtFbRXhqjZwFHWUXhpn4RLO+N32+JyxGaXlX5ktR 8Bp6yFljks5pi4IIhCAt4ZcRFPjYvgG7+qKgh+Vv9Bg0GHSO8YkDJGtnA8+cq4NGyLlY 5atPfmTnEmAZfa2xegpb/dKN8ock3C4oQuHrMT/yqEUGBL43Wt8w0p15Z+z9pF7GgFId D6wNuTeHA8bM3+hxDSejjFEIlaNaGGnS5Osq0hIFecGRteM7bc0jmjNDOVxRiga0XlNr tjaA== X-Gm-Message-State: ANhLgQ11pAY6daunpDCWAizGN1iNeMY/fjsxpaWMCYMAJB+lNuVALwfS NU1P1YlpJl470mgPpU3QR1QOghgHJPthJL/PJD5Cxw== X-Received: by 2002:a2e:9052:: with SMTP id n18mr27628ljg.251.1582738772180; Wed, 26 Feb 2020 09:39:32 -0800 (PST) MIME-Version: 1.0 References: <20200225091130.29467-1-kishon@ti.com> <1582665067-20462-1-git-send-email-alan.mikhak@sifive.com> <7e1202a3-037b-d1f3-f2bf-1b8964787ebd@ti.com> In-Reply-To: <7e1202a3-037b-d1f3-f2bf-1b8964787ebd@ti.com> From: Alan Mikhak Date: Wed, 26 Feb 2020 09:39:20 -0800 Message-ID: Subject: Re: [PATCH 1/5] PCI: endpoint: functions/pci-epf-test: Add DMA support to transfer data To: Kishon Vijay Abraham I Cc: amurray@thegoodpenguin.co.uk, arnd@arndb.de, Bjorn Helgaas , gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-pci , lorenzo.pieralisi@arm.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 25, 2020 at 9:27 PM Kishon Vijay Abraham I wrote: > > Hi Alan, > > On 26/02/20 2:41 am, Alan Mikhak wrote: > > @@ -380,6 +572,7 @@ static void pci_epf_test_unbind(struct pci_epf *epf) > > int bar; > > > > cancel_delayed_work(&epf_test->cmd_handler); > > + pci_epf_clean_dma_chan(epf_test); > > pci_epc_stop(epc); > > for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { > > epf_bar = &epf->bar[bar]; > > @@ -550,6 +743,12 @@ static int pci_epf_test_bind(struct pci_epf *epf) > > } > > } > > > > + epf_test->dma_supported = true; > > + > > + ret = pci_epf_init_dma_chan(epf_test); > > + if (ret) > > + epf_test->dma_supported = false; > > + > > if (linkup_notifier) { > > epf->nb.notifier_call = pci_epf_test_notifier; > > pci_epc_register_notifier(epc, &epf->nb); > > > > Hi Kishon, > > > > Looking forward to building and trying this patch series on > > a platform I work on. > > > > Would you please point me to where I can find the patches > > which add pci_epf_init_dma_chan() and pci_epf_clean_dma_chan() > > to Linux PCI Endpoint Framework? > > I've added these functions in pci-epf-test itself instead of adding in > the core files. I realized adding it in core files may not be helpful if > the endpoint function decides to use more number of DMA channels etc., Thanks Kishon, I now realize they are in [PATCH 1/5] of this series. May I suggest renaming them to pci_epf_test_init_dma_chan() and pci_epf_test_cleanup_dma_chan()? With just pci_epf in their name, I was looking for them in pci-epf-core.c. Regards, Alan > > Thanks > Kishon