[Samsung Epic 4G Touch] garwynn:
Source Notes - Part 1

Source Notes - Part 1

(Please feel free to skip if you're not interested in the programming)

This section is just to document what models and versions are affected.

I'm posting this in rather lengthy detail in part for peer review and also as I misread this the first time.

If you want to see the results of this documentation you can skip to the bottom.

Again, you'll need the link to the change:

https://bitbucket.org/franciscofranco/android-tuna-omap/changeset/cea631bdac53

If I look at this part of code alone:

cid_rev(0, 0x25, 1997, 1)

...this tells me to look for a definition of cid_rev. So I do and get here:

#define cid_rev(hwrev, fwrev, year, month) \
(((u64) hwrev) << 40 | \
((u64) fwrev) << 32 | \
((u64) year) << 16 | \
((u64) month))

It's not included in this change as this was introduced previously.

But you can see the definition here:

https://bitbucket.org/franciscofranco/android-tuna-omap/src/388ae9aa9b26/include/linux/mmc/card.h

OK, so I should look for HW revision 0x0, FW revision 0x25, right?

Nope. This was nested in another function and I didn't look at that right:

MMC_FIXUP_REV("VYL00M", 0x15, CID_OEMID_ANY,
cid_rev(0, 0x25, 1997, 1), cid_rev(0, 0x25, 2012, 12),
add_quirk_mmc, MMC_QUIRK_SAMSUNG_WL_PATCH),
MMC_FIXUP_REV("KYL00M", 0x15, CID_OEMID_ANY,
cid_rev(0, 0x25, 1997, 1), cid_rev(0, 0x25, 2012, 12),
add_quirk_mmc, MMC_QUIRK_SAMSUNG_WL_PATCH),
MMC_FIXUP_REV("MAG4FA", 0x15, CID_OEMID_ANY,
cid_rev(0, 0x25, 1997, 1), cid_rev(0, 0x25, 2012, 12),
add_quirk_mmc, MMC_QUIRK_SAMSUNG_WL_PATCH),

OK, so back to the card.h file to get my definition of MMC_FIXUP_REV:

#define MMC_FIXUP_REV(_name, _manfid, _oemid, _rev_start, _rev_end, \
_fixup, _data) \
_FIXUP_EXT(_name, _manfid, \
_oemid, _rev_start, _rev_end, \
SDIO_ANY_ID, SDIO_ANY_ID, \
_fixup, _data) \

I also want to look at _FIXUP_EXT next:

#define _FIXUP_EXT(_name, _manfid, _oemid, _rev_start, _rev_end, \
_cis_vendor, _cis_device, \
_fixup, _data) \
{ \
.name = (_name), \
.manfid = (_manfid), \
.oemid = (_oemid), \
.rev_start = (_rev_start), \
.rev_end = (_rev_end), \
.cis_vendor = (_cis_vendor), \
.cis_device = (_cis_device), \
.vendor_fixup = (_fixup), \
.data = (_data), \
}

So to properly identify what is affected:

Model Name (.name) -> VYL00M, KYL00M or MAG4FA

Manu. Firwmare ID Manufacturer ID: --> 0x15

OEM ID: Any ID (easy extrapolation of CID_OEMID_ANY)

Revision Start (Range): The result of cid_rev(0, 0x25, 1997, 1). The date indicates a low limit value.

Revision End (Range: The result of cid_rev(0, 0x25, 2012, 12). The date indicates a high limit value.

Fixup: Function to call to add the fixup - in this case, add_quirk_mmc (data.h linked above)

Data: MMC_QUIRK_SAMSUNG_WL_PATH (Not 100% but looks like a label to me. Can't find a definition in change.)

Note:

The fix mentioned right above the models affected in a note: "Date doesn't matter, so include all possible dates in min and max fields." I misread how they were getting the low and high limits of the range.

The

corrected

eMMCs affected involve VYL00M, KYL00M or MAG4FA at Manufacturer Firmware ID 0x15.

I would like to apologize for providing inaccurate info the first time; after going through the code another time I'm fairly certain the correction to the affected model list is accurate.

This also confirms that those who have posted are in the affected list, which we knew but couldn't confirm until now.