On Mon, Feb 12, 2024 at 1:28 AM Tony Lindgren <tony@xxxxxxxxxxx> wrote: > > * Adam Ford <aford173@xxxxxxxxx> [240208 12:57]: > > I was testing the newer MMC driver on an AM3517 a few months ago, and > > I noticed that SD cards were returning weird or empty data after some > > indeterminate amount of time. If I read the IOS file immediately > > after boot, it worked. If I forced some sort of file IO, it might > > work, but after it went idle, it appeared to have strange data. I > > don't think this bug is limited to one platform. > > OK interesting. So the zero values for ios are expected when the card > is idle. What do you mean by weird values when idle? I meant zero-values when I said weird. It's weird to me, because other platforms don't return zero. If tha's normal, I'll likely submit an update to omap3.dtsi to migrate the MMC driver to the newer one. I'd been meaning to do that for a while, but this threw me off, then i forgot about it until I saw this thread. > > Can you please try catch the weird values or a failure maybe with > something like: > > while true; do > cat /sys/kernel/debug/mmc0/ios > fdisk -l /dev/mmcblk0 > cat /sys/kernel/debug/mmc0/ios > sleep 20 > done It appears the first time, that runs after fdisk, the values seems reasonable, but subsequent iterations, the values are zero again: clock: 0 Hz vdd: 0 (invalid) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 0 (off) bus width: 0 (1 bits) timing spec: 0 (legacy) signal voltage: 0 (3.30 V) driver type: 0 (driver type B) Disk /dev/mmcblk0: 3.75 GiB, 4025483264 bytes, 7862272 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 * 1 512000 512000 250M c W95 FAT32 (LBA) /dev/mmcblk0p2 512001 1560576 1048576 512M 83 Linux clock: 50000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 2 (sd high-speed) signal voltage: 0 (3.30 V) driver type: 0 (driver type B) clock: 0 Hz vdd: 0 (invalid) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 0 (off) bus width: 0 (1 bits) timing spec: 0 (legacy) signal voltage: 0 (3.30 V) driver type: 0 (driver type B) Disk /dev/mmcblk0: 3.75 GiB, 4025483264 bytes, 7862272 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 * 1 512000 512000 250M c W95 FAT32 (LBA) /dev/mmcblk0p2 512001 1560576 1048576 512M 83 Linux clock: 0 Hz vdd: 0 (invalid) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 0 (off) bus width: 0 (1 bits) timing spec: 0 (legacy) signal voltage: 0 (3.30 V) driver type: 0 (driver type B) clock: 0 Hz vdd: 0 (invalid) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 0 (off) bus width: 0 (1 bits) timing spec: 0 (legacy) signal voltage: 0 (3.30 V) driver type: 0 (driver type B) Disk /dev/mmcblk0: 3.75 GiB, 4025483264 bytes, 7862272 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 * 1 512000 512000 250M c W95 FAT32 (LBA) /dev/mmcblk0p2 512001 1560576 1048576 512M 83 Linux clock: 0 Hz vdd: 0 (invalid) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 0 (off) bus width: 0 (1 bits) timing spec: 0 (legacy) signal voltage: 0 (3.30 V) driver type: 0 (driver type B) This was on an AM3517 with an SD card. I don't have eMMC on this platform to try. adam > > Regards, > > Tony