Skip to content

SPI driver change breaks multi-transfer messages so spi-nor devices are not working any longer. #38

@Markus-Pietrek-MSC

Description

@Markus-Pietrek-MSC

Hi,

this commit d54468e introduces SPI CS handling in the spi controller driver while it should be and is handled in spi_transfer_one_message().
https://github.com/intel/linux-intel-lts/blob/5.15/linux/drivers/spi/spi.c#L1361

This breaks any message consisting of two transfers, e.g. generated by spi-nor via spi-mem.
https://elixir.bootlin.com/linux/v5.10.156/source/drivers/spi/spi-mem.c#L329

spi-nor constructs a message consisting of at least two transfers, one byte for the command SPINOR_OP_RDID and another one for the response id. https://elixir.bootlin.com/linux/v5.10.156/source/drivers/spi/spi-mem.c#L329
Releasing the chipselect after SPINOR_OP_RDID interrupts the transfer, so no chip id is read.

To my knowledge this patch never made it into vanilla kernel as well.

Best regards,
Markus

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions