lkml.org 
[lkml]   [2012]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Disable Bus Master on PCI device shutdown
From
Date
On Wed, 2012-06-06 at 12:42 -0700, Eric W. Biederman wrote:
> Absent anyone even knowing if there are devices that exist that can not
> tolerate their bus master bit being flipped when DMA is not ongoing I
> think the current state of the code is good. When we find the broken
> hardware that can not tolerate a standard PCI bit being used in a
> standard way we can add a flag in the core to avoid doing that.
>
> pci_device_shutdown calls drv->shutdown before calling
> pci_device_disable. Which means that only devices that have trouble
> with this bit being flipped while DMA is ongoing and don't bother
> to stop their own DMA will have a problem.
>
> As for shifting problems I do think we have shifted the problem in a
> very positive way. Now instead of having a random failure at a random
> location caused by DMA happing at a random moment for no expected reason
> we have failures happening when we disable or enable a device, which
> should be much more debugable.

That is a very good point. Failure at a predictable point is much better
than random failures with the root cause being elsewhere from the point
of failure in time and code. This at least gives us a good shot at being
able to debug buggy hardware and drivers.

--
====================================================================
Khalid Aziz Unix Systems Lab
(970)898-9214 Hewlett-Packard
khalid.aziz@hp.com Fort Collins, CO



\
 
 \ /
  Last update: 2012-06-07 17:02    [W:0.079 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site