-
由 Tudor Ambarus 提交于
stable inclusion from stable-5.10.36 commit cb5305ac5bac21ec9ff3aadd7c9ca2142bc64c90 bugzilla: 51867 CVE: NA -------------------------------- commit 46094049 upstream. This reverts commit 04b8edad. mx25l51245g and mx66l51235l have the same flash ID. The flash detection returns the first entry in the flash_info array that matches the flash ID that was read, thus for the 0xc2201a ID, mx25l51245g was always hit, introducing a regression for mx66l51235l. If one wants to differentiate the flash names, a better fix would be to differentiate between the two at run-time, depending on SFDP, and choose the correct name from a list of flash names, depending on the SFDP differentiator. Fixes: 04b8edad ("mtd: spi-nor: macronix: Add support for mx25l51245g") Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Acked-by: NPratyush Yadav <p.yadav@ti.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210402082031.19055-2-tudor.ambarus@microchip.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
e6b6e1ec