RE: [PATCH v4] mmc: core: allow detection of locked cards

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

 



> On 2024-07-09 22:06, Avri Altman wrote:
> >> If I understand correctly, there is no point in sending the CMD13
> >> above, unless this is the first attempt to initialize the card.
> >> Therefore, it's better to move the whole part above, inside the below
> >> if-clause too, otherwise we would end up sending a CMD13 in cases
> >> when it's not needed.
> > R1_CARD_IS_LOCKED is CMD13 response, but already in CMD7 response as
> > well, So theoretically you want to skip mmc_sd_setup_card altogether.
> 
> Do you mean to modify:
> mmc_select_card(struct mmc_card *card)
> to somehow return or save the R1 response to card struct?
> 
> Because currently, it is not available.
Its just a suggestion - CMD13 does carry this bit as well.
Either way, the card will not respond to ACMD6, CMD6, and CMD19 while waiting for CMD42 to unlock the card,
Hence failing those should not eventually cause mmc_remove_card().

Thanks,
Avri

> 
> Thank you,
> Daniel.
> 
> > ACMD6, CMD6, and CMD19 should wait for CMD42 to unlock the card.
> >
> > Thanks,
> > Avri
> >
> >>
> >> > +
> >> > +       if (!reinit && !(card_status & R1_CARD_IS_LOCKED)) {
> >> >                 /*
> >> >                  * Fetch SCR from card.
> >> >                  */
> >> > --
> >> > 2.34.1
> >> >
> >>
> >> Kind regards
> >> Uffe





[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