Re: [PATCH v4 14/14] mmc: queue: create dev->dma_parms before call dma_set_max_seg_size()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 5, 2020 at 3:30 PM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> On Wed, Mar 4, 2020 at 5:28 PM Christoph Hellwig <hch@xxxxxx> wrote:
> > On Wed, Mar 04, 2020 at 02:32:42PM +0100, Ulf Hansson wrote:
> > > + Christoph, Arnd

> Today MMC isn't using a bus for the host controllers,
> it is a class device, so I suppose the "real" solution would
> be:
>
> 1. Move MMC hosts to a bus instead of a class named
>    say mmc_bus. If this is OK with the userspace ABI.
>
> 2. Make everything necessary from the struct device
>     inside struct mmc_host (today called "class_device")
>     copied over from the parent and stop referencing
>     the struct device *parent field in struct mmc_host
>     directly for everything and its dog.

I don't think that copying the dma settings is a good solution
here. The software model that we have is that a bus can be a
dma master on its parent, which in turn is a master on
a parent bus, all the way up to the root of the tree. This is
not always the reality, but having an intermediate device
on a fake bus won't make it better.

The natural model is that an mmc host is a device on an
arbitrary dma capable bus (platform, pci, ...), and its
children are mmc devices with bus=&mmc_bus_type.

If that is not already the case, that is where I'd start
changing it to simplify the model.

        Arnd



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux