Re: [PATCH] Disable Bus Master on PCI device shutdown

From: Myron Stowe
Date: Wed Jun 06 2012 - 19:18:14 EST


On Wed, Jun 6, 2012 at 5:03 PM, Khalid Aziz <khalid.aziz@xxxxxx> wrote:
> On Wed, 2012-06-06 at 14:16 -0600, Myron Stowe wrote:
>> Hay Khalid,
>>
>> I've been following this discussion but still do not understand what the
>> perceived correct fix is for the situation you were originally trying to
>> circumvent - namely, stopping NIC devices from triggering DMA activity
>> upon receipt of an incoming packet.
>>
>> From the discussion it sounds like a driver, upon shutdown, can end
>> all active I/O
>> clearing the I/O queue, and also (?) shut down its DMA engine, and may
>> also go as far as disabling the Bus Master bit.
>>
>> What was occurring in the original issue - was the driver in question not
>> shutting down its DMA engine for some, possibly valid, reason?
>>
>> Thanks,
>>  Myron
>
> Hi Myron,
>
> The last driver issue with kexec was reported on kexec mailing list in
> July of last year and that was with qla driver. From what H Peter Anvin
> described, the driver left DMA engine running.
>
> For the issue I found on an ia64 platform, it was so many years ago that
> you are now taxing my old and decrepit memory :)

Yeah, if it was more than a couple of weeks ago then I'm likely to have
forgotten myself.

If you can find it great but don't spend too much time digging. I just wanted
some validation of my understanding -
o That drivers must consider both "active I/O" and "DMA" (when
shutting down),
o That the Bus Master disablement was trying to compensate for a driver not
quiescing "DMA" as it probably should have (I wasn't sure if these were separate
capabilities and/or if there was possibly a valid reason for a driver
leaving "DMA"
in an enabled state upon shutdown - i.e. Wake on LAN or something similar).

Myron

> I am digging through
> old internal bug reports and will let you know once I find that original
> bug report.
>
> ====================================================================
> Khalid Aziz                                         Unix Systems Lab
> (970)898-9214                                        Hewlett-Packard
> khalid.aziz@xxxxxx                                  Fort Collins, CO
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/