lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOgAA6FJrJ2kVg4hg3sAE_VAG8SyQ4UzKikU+Ofa=N2w0Q4Ghg@mail.gmail.com>
Date: Tue, 19 Dec 2023 13:21:18 +0800
From: liu kaiwei <liukaiwei086@...il.com>
To: Vinod Koul <vkoul@...nel.org>
Cc: Kaiwei Liu <kaiwei.liu@...soc.com>, Orson Zhai <orsonzhai@...il.com>, 
	Baolin Wang <baolin.wang@...ux.alibaba.com>, Chunyan Zhang <zhang.lyra@...il.com>, 
	dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Wenming Wu <wenming.wu@...soc.com>
Subject: Re: [PATCH 1/2] dmaengine: sprd: delete enable opreation in probe

On Mon, Dec 11, 2023 at 7:41 PM Vinod Koul <vkoul@...nel.org> wrote:
>
> On 06-12-23, 17:32, liu kaiwei wrote:
> > On Fri, Nov 24, 2023 at 9:11 PM Vinod Koul <vkoul@...nel.org> wrote:
> > >
> > > On 02-11-23, 20:16, Kaiwei Liu wrote:
> > > > From: "kaiwei.liu" <kaiwei.liu@...soc.com>
> > >
> > > Typo is subject line
> > >
> > > >
> > > > In the probe of dma, it will allocate device memory and do some
> > > > initalization settings. All operations are only at the software
> > > > level and don't need the DMA hardware power on. It doesn't need
> > > > to resume the device and set the device active as well. here
> > > > delete unnecessary operation.
> > >
> > > Don't you need to read or write to the device? Without enable that wont
> > > work right?
> > >
> >
> > Yes, it doesn't need to read or write to the device in the probe of DMA.
> > We will enable the DMA when allocating the DMA channel.
>
> So you will probe even if device is not present! I think it makes sense
> to access device registers in probe!

There is another reason why we delete enable/disable and not to access
device in probe. The current driver is applicable to two DMA devices
in different
power domain. For some scenes, one of the domain is power off and when you
probe,  enable the dma with the domain power off may cause crash.

For example, one case is for audio co-processor and DMA serves for it,
DMA's power domain is off during initialization since audio is not used
at that time, so we cannot read/write DMA's register for this kind of cases.

@Baolin Wang
Hi baolin,what's your opinion?

> --
> ~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ