On 5 June 2011 14:48, Ohad Ben-Cohen <ohad@xxxxxxxxxx> wrote: >> + >> + /* >> + * Reset the card by performing the same steps that are taken by >> + * mmc_rescan_try_freq() and mmc_attach_sdio() during a "normal" probe >> + */ >> + sdio_reset(host); > > Sending a reset is necessary only if we are re-initing a powered on > card, but in this case, we know that we just powered the card up, so > this is not needed. Don't ask me for an explanation, but this is required here, for the following scenario: 1. Power up and probe 2. Power down via runtime pm 3. Power up step 3 needs the reset (even though it wasnt needed in step 1), otherwise mmc_send_io_op_cond() fails with a timeout. It is also needed for: 1. Power up 2. Suspend, libertas handler returns -ENOSYS so card gets powered down 3. System resume 4. Reprobe needs to power up card Step 4 fails without this reset. > + ret = mmc_send_io_op_cond(host, 0, NULL); > + if (ret) > + goto out; > > Can you please add this under a card quirk ? > > The spec does not require this for embedded sdio cards, and we would > like to skip this for wl12xx. I could do this if it is required for merge, but I don't agree with it. Are you suggesting that a quirk is used to enable this reset, or to disable it? It seems overkill for something that is going to be trivial and harmless to your setup. Also, the most frustrating thing when working on this issue is that the codepaths for powering up a SD card between the following 3 situations are significantly different: 1. Power up and probe during boot 2. Resume from suspend 3. Power up after runtime suspend It feels like there should be a lot more in common here. My patch is adding some coherence to the process (and there is still plenty of room for improvement, but adding quirks won't help...). Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html