DMA mappings cannot be used by the device in a resume handler

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

 



Hello,
I have an issue where the device is unable to access the system DMA
memory mappings in a resume handler. This issue is mitigated by adding
a `msleep(20);` before sending a DMA address to the device.

The following is the call flow during my device's resume:
pci_enable_device -> pci_set_master -> msleep(20) which I want to get
rid of -> a write to the device's BAR region with a DMA address. The
DMA memory region is question is allocated using dma_alloc_coherent
(doesn't matter if the allocation took place before suspend or during
resume).
If I get rid of the `msleep(20)` the device fails to read the DMA'd
memory properly and crashes itself. The 20ms duration has been
selected empirically.

Are there any better possible solutions to this problem? As far as I
am aware the device lacks any sort of a 'ready' register.

The resume code in question if anyone wants to look at it:
https://github.com/MCMrARM/mbp2018-bridge-drv/blob/ba0df879c6b64a59ac12f8d6f763b3e39fab49a1/pci.c#L333

Thank you,
Paul Pawlowski




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux