RE: [PATCH] mmc: host: renesas_internal_dmac: add pre_req and post_req support

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

 



Hi Wolfram-san again,

> From: Yoshihiro Shimoda, Sent: Tuesday, December 15, 2020 12:00 PM
> > From: Yoshihiro Shimoda, Sent: Tuesday, December 15, 2020 10:32 AM
> > > From: Wolfram Sang, Sent: Tuesday, December 15, 2020 12:50 AM
> > > On Fri, Dec 04, 2020 at 10:17:33PM +0900, Yoshihiro Shimoda wrote:
> > > >  /*
> > > >   * Specification of this driver:
> > > >   * - host->chan_{rx,tx} will be used as a flag of enabling/disabling the dma
> > > > @@ -172,6 +178,47 @@ renesas_sdhi_internal_dmac_dataend_dma(struct tmio_mmc_host *host) {
> > > >  	tasklet_schedule(&priv->dma_priv.dma_complete);
> > > >  }
> > > >
> > > > +/* Should not use host->sg_ptr/sg_len in the following function */
> > >
> > > Maybe a short explanation why we shouldn't use the functions?
> >
> > I tried to update the comment as below:
> > /*
> >  * tmio_mmc_request() only sets host->sg_{ptr,len} and
> >  * renesas_sdhi_internal_dmac_pre_req() doesn't set host->sg_{ptr,len} so that
> >  * we should not use the values in the following function.
> >  */
> >
> > Hmm... Perhaps, I should modify the code to use host->sg_{ptr,len}
> > in both paths (.request() and .pre_req()) and remove this comments.
> > So, I'll try to modify. I guess tmio_mmc_init_sg() is called in pre_req(),
> > we can use host->sg_{ptr,len}.
> 
> I'm sorry. I was completely wrong. If we use {pre,post}_req,
> the MMC core will call pre_req() twice with each mmc_data before
> pre_req() is called. So that, second pre_req() will overwrite
> the host->sg_ptr. So, we should not use host->sg_ptr here.
> So, I'll update the comments like below.

I'm sorry again and again. But, I realized the current patch breaks
"force_pio" mode because tmio_mmc_pio_irq() doesn't take care of {pre,post}_req.
So, I'll try to refactor tmio core to support {pre,post}_req().

Best regards,
Yoshihiro Shimoda





[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