Skip to contentSkip to conversation

dma_debug_device_change() gives bogus errors

DISCUSSION David Vrabel 2 participants 2 messages Apr 24, 2009

lore
Share & tools
lore
#0 lore raw

dma_debug_device_change() gives bogus errors if a driver unmaps dma buffers within its driver->remove() method. This is because the BUS_NOTIFY_UNBIND_DRIVER notification is raised before calling driver->remove() (see __device_release_driver() in drivers/base/dd.c).

By the time my driver->remove() completes, there are no DMA mappings (debug_dma_dump_mappings() produces no output).

Also, somewhat surprisingly, it only prints the error the first time the driver is unbound.

David

Signature · 3 lines
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park,  Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ                 http://www.csr.com/
#1 lore raw
Quoted 10 lines · David Vrabel

dma_debug_device_change() gives bogus errors if a driver unmaps dma buffers within its driver->remove() method. This is because the BUS_NOTIFY_UNBIND_DRIVER notification is raised before calling driver->remove() (see __device_release_driver() in drivers/base/dd.c).

By the time my driver->remove() completes, there are no DMA mappings (debug_dma_dump_mappings() produces no output).

Also, somewhat surprisingly, it only prints the error the first time the driver is unbound.

Thanks for the report. This is being worked on already. I will disable this check for 2.6.30 and try to get a solution upstream for 2.6.31.

Joerg

Signature · 6 lines
           | Advanced Micro Devices GmbH
 Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
 System    | 
 Research  | Geschäftsführer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
 Center    | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
           | Registergericht München, HRB Nr. 43632