DMA memory from block layer vs pci_alloc_consistent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux