[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <MN0PR12MB6101A10A0EC4EF7CA48C4FC5E2819@MN0PR12MB6101.namprd12.prod.outlook.com>
Date: Tue, 21 Mar 2023 21:16:10 +0000
From: "Limonciello, Mario" <Mario.Limonciello@....com>
To: Grzegorz Bernacki <gjb@...ihalf.com>
CC: Jan Dąbroś <jsd@...ihalf.com>,
"Thomas, Rijo-john" <Rijo-john.Thomas@....com>,
"Lendacky, Thomas" <Thomas.Lendacky@....com>,
"herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
"Allen, John" <John.Allen@....com>,
"Held, Felix" <Felix.Held@....com>,
"David S. Miller" <davem@...emloft.net>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v4 7/8] crypto: ccp: Add support for ringing a platform
doorbell
[Public]
> Hi Mario,
> [...]
> > +int psp_ring_platform_doorbell(int msg)
> > +{
> > + struct psp_device *psp = psp_get_master_device();
> > + struct psp_platform_access_device *pa_dev;
> > + u32 __iomem *button, *cmd;
> > + int ret, val;
> > +
> > + if (!psp || !psp->platform_access_data)
> > + return -ENODEV;
> > +
> > + pa_dev = psp->platform_access_data;
> > + button = psp->io_regs + pa_dev->vdata->doorbell_button_reg;
> > + cmd = psp->io_regs + pa_dev->vdata->doorbell_cmd_reg;
> > +
> > + mutex_lock(&pa_dev->doorbell_mutex);
> > +
> > + if (check_doorbell(button)) {
> > + dev_dbg(psp->dev, "doorbell is not ready\n");
>
> Can you change dev_dbg() to dev_err() when there is an error in all
> cases in that function?
Sure, I'll adjust this.
> [...]
>
> > +
> > + val = FIELD_GET(PSP_CMDRESP_STS, ioread32(cmd));
> > + if (val) {
> > + ret = -EIO;
> > + goto unlock;
> > + }
>
> Are you sure that PSP_CMDRESP_STS should be zero? My tests failed due
> to the fact the val is 1 and moreover I don't see that check in the
> original Jan's patch.
> Can you also add here dev_err()?
I got a link to the spec for this stuff and that was how I understood it to work.
As it's a command/response register those lower 15 bits should be 0 to indicate
it worked and anything else is some kind of failure.
As some of these patches are merged, I'll rebase on cryptodev-2.6 and send
out an updated patch series.
Powered by blists - more mailing lists