Skip to content

Commit e34fcb0

Browse files
dmosbergercomputersforpeace
authored andcommitted
mtd: nand: fix GET/SET_FEATURES address on 16-bit devices
GET_FEATURES and SET_FEATURES also need byte-addressing on 16-bit devices. Signed-off-by: David Mosberger <davidm@egauge.net> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
1 parent 00d0989 commit e34fcb0

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎include/linux/mtd/nand.h‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,16 @@ static inline bool nand_is_slc(struct nand_chip *chip)
925925
*/
926926
static inline int nand_opcode_8bits(unsigned int command)
927927
{
928-
return command == NAND_CMD_READID || command == NAND_CMD_PARAM;
928+
switch (command) {
929+
case NAND_CMD_READID:
930+
case NAND_CMD_PARAM:
931+
case NAND_CMD_GET_FEATURES:
932+
case NAND_CMD_SET_FEATURES:
933+
return 1;
934+
default:
935+
break;
936+
}
937+
return 0;
929938
}
930939

931940
/* return the supported JEDEC features. */

0 commit comments

Comments
 (0)