Re: [PATCH] mtd: spinand: Enable QE on all dies

Miquel Raynal <[email protected]>
Newsgroups org.infradead.lists.linux-mtd,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
>> > +	/*
>> > +	 * QE is a per-die setting on some devices. Program each target
>> > +	 * individually when enabling or disabling quad I/O mode.
>> > +	 */
>> > +	for (target = 0; target < nand->memorg.ntargets; target++) {
>> > +		ret = spinand_select_target(spinand, target);
>> > +		if (ret)
>> > +			return ret;
>> > +
>> > +		ret = spinand_upd_cfg(spinand, CFG_QUAD_ENABLE,
>> > +				      enable ? CFG_QUAD_ENABLE : 0);
>> > +		if (ret)
>> > +			return ret;
>> 
>> If there is an issue in the middle of the loop, the chip will become
>> unusable. Perhaps we should reset the dies to the !QE state and return
>> an error to continue in degraded (single) mode if that happens?
>
>
> Single-lane is the most basic op - if the QE set_feature write fails, the link
> is broken and single-lane won't work anyway. And falling back needs the vendor's
> own 1S op stored somewhere, but those variant tables are discarded after probe.
> So it likely requires refactoring struct spinand_device to cache them. Given that,
> maybe just keep the current return-error implementation.

Ack.

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.