Hello,

I’ve been reverse engineering Sony SxS memory cards, which are simple
PCIe based block devices. I am able to read successfully from the
device with DMA memory allocated using pci_alloc_consistent and
memcpying to the buffer the block device layer provides.

But if I use the dma_addr_t provided by the block device DMA layer, I
get a soft lockup. Is there something special about the dma_addr_t
that comes from the block layer? Is there anything I need to do to it
before passing it to the hardware.

The device’s block size is 2048, the block layer reads two blocks at a time.

Memcpy code is here:
https://github.com/kierank/sxs-linux/blob/master/sxs.c#L98

DMA code is here:
https://github.com/kierank/sxs-linux/blob/dma/sxs.c#L101

Apologies for the untidiness of the code, it’s entirely reverse engineered.
Any help would be appreciated.

Kieran

Reply via email to