Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3228231imm; Mon, 10 Sep 2018 13:11:21 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYwERFfuxkb/Yr/Xpd9NtOyXWSeSdoOXCXFsQPdu3KGiyenio5RfsykKKknCjssGa1kqqme X-Received: by 2002:a62:1544:: with SMTP id 65-v6mr25454413pfv.178.1536610281152; Mon, 10 Sep 2018 13:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536610281; cv=none; d=google.com; s=arc-20160816; b=aTAQGhU0aVlVlZDmb0X80lVMFYJTTMGw/mrjzxXH2/7zZiXV+uWcs9kiA75Oulkgmr 5xLTjQyGUpimnIdmFw2ciu/6YHyfwU4U+00yiGVKAl1jOclgMFzMeYJdEmehNgR+WB+0 xfV2CD3Bq4U9Uy9fHUpFm3dfMHe7Kp9rZDDc9xiI1rE6N7G8qQKtCO3X8NK/n7U9llDp 5LGipN7XmTjgpB49UdSSe2XyTEDhlgAJPXz3k9adjXsR4gDdklCV1wVmu0HhBqxnyg2x tsNCnLWrU8QeZznIUIOCZ/xxZVPB/RhVCgjI/ITQzci1YsBDDHOfQBR60/L/Jj1RmZzP p9gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=wHzsqOQ6mW6JYIgsr6clYbP4E5pyie18CaUbebMoZ2A=; b=e8ixgRvcsmoRJpL5mfHjYPdOnyhXa59AdnPCKfI36Hq+0eyZypiB0fNDcA1Pz1IWwL eS9WtPss0KKI6ddk9WvBKeeDHX5HVIplks//h/D1zJkK5WApvL3AEc4s/bvzmi6GY33Y eOkeXJnr5DzYBuiLgbSoSMxrpYDsoAe+Mx5g/vvrQM27PzXnzI6FoJj8ndBEW8aMvvXN nC+OffJYuyesb0cgj3j1EHVcaHCOsKF4uztwPN5sv1pP68hFo8nWJ1X2o11myDrCV3tM w/cZ1GFSeG5i3NdChUOi7MP17d8phkN7vJJV/l2N/dLoYPBGFbWvwHo7zd6mu7KhK65y 9klg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h17-v6si18791880pgj.214.2018.09.10.13.10.56; Mon, 10 Sep 2018 13:11:21 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727411AbeIKBG0 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 10 Sep 2018 21:06:26 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:43251 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726091AbeIKBG0 (ORCPT ); Mon, 10 Sep 2018 21:06:26 -0400 Received: by mail-oi0-f66.google.com with SMTP id b15-v6so42684796oib.10; Mon, 10 Sep 2018 13:10:41 -0700 (PDT) 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:content-transfer-encoding; bh=n3NcV2Q4Hma1laT8mgAByOx3Z6nGbKNdPf+oJIOVDhM=; b=YcDXV7DQJTmQykXTsbouHvnhPv8k77IkC2ECfbQdK8v5Y9SLYv5VfQOCOIz5t4feQt txgWsOMqM/6TXMJ/ZD8Zk2GXpdTPQE2s7aEm+onVoVrXNVL8UiyWzUQmH5JlRzaue9iq AS6mZQA+H3FUgNVcwfpH5Abu2EoWjxt/9bmOHzym5ivupu6MoRRSzNVt1pLGPpM2bm/M vbHDNfuHwaLWYdav5xC7SQrF3dqQJ4OMfw3K0p8yK++ESsm2z2zGgTBCeafiqM16nDRs NrNba2/8UQON9FL8hldqh/pCNW4xKojjj//4/x4NH3XbRxklqukFdrUPjUf+Odm62tBo Dt9A== X-Gm-Message-State: APzg51BeQRUmejoVog8GeyyWHvAcKF/4NTuLxuIcv6mMhB/RqiAjSuA5 deHzWIO3uBQ/D53cR5tOW8UMA/Y9zew= X-Received: by 2002:aca:57d4:: with SMTP id l203-v6mr25628380oib.329.1536610241320; Mon, 10 Sep 2018 13:10:41 -0700 (PDT) Received: from mail-oi0-f53.google.com (mail-oi0-f53.google.com. [209.85.218.53]) by smtp.gmail.com with ESMTPSA id k85-v6sm50671722oiy.2.2018.09.10.13.10.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Sep 2018 13:10:40 -0700 (PDT) Received: by mail-oi0-f53.google.com with SMTP id 8-v6so42764759oip.0; Mon, 10 Sep 2018 13:10:40 -0700 (PDT) X-Received: by 2002:aca:b2c4:: with SMTP id b187-v6mr678118oif.160.1536610240159; Mon, 10 Sep 2018 13:10:40 -0700 (PDT) MIME-Version: 1.0 References: <20180910171550.5659-1-horia.geanta@nxp.com> <20180910171550.5659-3-horia.geanta@nxp.com> In-Reply-To: <20180910171550.5659-3-horia.geanta@nxp.com> From: Li Yang Date: Mon, 10 Sep 2018 15:10:28 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 02/11] Revert "staging: fsl-mc/dpio: remove couple of unused functions" To: Horia Geanta Cc: Herbert Xu , Stuart Yoder , Laurentiu Tudor , Roy Pledge , Catalin Marinas , Will Deacon , David Miller , aymen.sghaier@nxp.com, linux-crypto@vger.kernel.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , lkml Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 10, 2018 at 12:19 PM Horia Geantă wrote: > > This reverts commit a211c8170b3c348353decb6e175c58a7814f218c. > (+ updated to account for driver being moved out of staging) So this is not a straightforward revert, as the original files have been moved. Probably it will be better not to use the standard format of a revert commit which could cause confusion. Otherwise, Acked-by: Li Yang > > dpseci object will make use of these functions, thus it's time to add > them back. > > Signed-off-by: Horia Geantă > --- > drivers/soc/fsl/dpio/dpio-service.c | 58 +++++++++++++++++++++++++++++++++++++ > include/soc/fsl/dpaa2-io.h | 4 +++ > 2 files changed, 62 insertions(+) > > diff --git a/drivers/soc/fsl/dpio/dpio-service.c b/drivers/soc/fsl/dpio/dpio-service.c > index 9b17f72349ed..321a92613a7e 100644 > --- a/drivers/soc/fsl/dpio/dpio-service.c > +++ b/drivers/soc/fsl/dpio/dpio-service.c > @@ -309,6 +309,37 @@ int dpaa2_io_service_rearm(struct dpaa2_io *d, > } > EXPORT_SYMBOL_GPL(dpaa2_io_service_rearm); > > +/** > + * dpaa2_io_service_pull_fq() - pull dequeue functions from a fq. > + * @d: the given DPIO service. > + * @fqid: the given frame queue id. > + * @s: the dpaa2_io_store object for the result. > + * > + * Return 0 for success, or error code for failure. > + */ > +int dpaa2_io_service_pull_fq(struct dpaa2_io *d, u32 fqid, > + struct dpaa2_io_store *s) > +{ > + struct qbman_pull_desc pd; > + int err; > + > + qbman_pull_desc_clear(&pd); > + qbman_pull_desc_set_storage(&pd, s->vaddr, s->paddr, 1); > + qbman_pull_desc_set_numframes(&pd, (u8)s->max); > + qbman_pull_desc_set_fq(&pd, fqid); > + > + d = service_select(d); > + if (!d) > + return -ENODEV; > + s->swp = d->swp; > + err = qbman_swp_pull(d->swp, &pd); > + if (err) > + s->swp = NULL; > + > + return err; > +} > +EXPORT_SYMBOL(dpaa2_io_service_pull_fq); > + > /** > * dpaa2_io_service_pull_channel() - pull dequeue functions from a channel. > * @d: the given DPIO service. > @@ -341,6 +372,33 @@ int dpaa2_io_service_pull_channel(struct dpaa2_io *d, u32 channelid, > } > EXPORT_SYMBOL_GPL(dpaa2_io_service_pull_channel); > > +/** > + * dpaa2_io_service_enqueue_fq() - Enqueue a frame to a frame queue. > + * @d: the given DPIO service. > + * @fqid: the given frame queue id. > + * @fd: the frame descriptor which is enqueued. > + * > + * Return 0 for successful enqueue, -EBUSY if the enqueue ring is not ready, > + * or -ENODEV if there is no dpio service. > + */ > +int dpaa2_io_service_enqueue_fq(struct dpaa2_io *d, > + u32 fqid, > + const struct dpaa2_fd *fd) > +{ > + struct qbman_eq_desc ed; > + > + d = service_select(d); > + if (!d) > + return -ENODEV; > + > + qbman_eq_desc_clear(&ed); > + qbman_eq_desc_set_no_orp(&ed, 0); > + qbman_eq_desc_set_fq(&ed, fqid); > + > + return qbman_swp_enqueue(d->swp, &ed, fd); > +} > +EXPORT_SYMBOL(dpaa2_io_service_enqueue_fq); > + > /** > * dpaa2_io_service_enqueue_qd() - Enqueue a frame to a QD. > * @d: the given DPIO service. > diff --git a/include/soc/fsl/dpaa2-io.h b/include/soc/fsl/dpaa2-io.h > index ab51e40d11db..70997ab2146c 100644 > --- a/include/soc/fsl/dpaa2-io.h > +++ b/include/soc/fsl/dpaa2-io.h > @@ -97,9 +97,13 @@ void dpaa2_io_service_deregister(struct dpaa2_io *service, > int dpaa2_io_service_rearm(struct dpaa2_io *service, > struct dpaa2_io_notification_ctx *ctx); > > +int dpaa2_io_service_pull_fq(struct dpaa2_io *d, u32 fqid, > + struct dpaa2_io_store *s); > int dpaa2_io_service_pull_channel(struct dpaa2_io *d, u32 channelid, > struct dpaa2_io_store *s); > > +int dpaa2_io_service_enqueue_fq(struct dpaa2_io *d, u32 fqid, > + const struct dpaa2_fd *fd); > int dpaa2_io_service_enqueue_qd(struct dpaa2_io *d, u32 qdid, u8 prio, > u16 qdbin, const struct dpaa2_fd *fd); > int dpaa2_io_service_release(struct dpaa2_io *d, u32 bpid, > -- > 2.16.2 >