public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Kenji Kaneshige <kaneshige.kenji@jp•fujitsu.com>
To: Alexander Duyck <alexander.h.duyck@intel•com>
Cc: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel•com>,
	"davem@davemloft•net" <davem@davemloft•net>,
	"jbarnes@virtuousgeek•org" <jbarnes@virtuousgeek•org>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	"linux-pci@vger•kernel.org" <linux-pci@vger•kernel.org>
Subject: Re: [RFC PATCH 1/2] pci: add function reset call that can be used inside	of probe
Date: Wed, 11 Aug 2010 09:44:03 +0900	[thread overview]
Message-ID: <4C61F253.8050700@jp.fujitsu.com> (raw)
In-Reply-To: <4C61DD57.5030208@intel.com>

(2010/08/11 8:14), Alexander Duyck wrote:
> Kenji Kaneshige wrote:
>> (2010/07/31 9:58), Jeff Kirsher wrote:
>>> From: Alexander Duyck<alexander.h.duyck@intel•com>
>>> + /*
>>> + * both INTx and MSI are disabled after the Interrupt Disable bit
>>> + * is set and the Bus Master bit is cleared.
>>> + */
>>> + pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE);
>>> +
>>> + rc = __pci_dev_reset(dev, 0);
>>
>> Could you tell me why you need to program command register before reset?
>>
>> "MSI enable" and "Bus Master" bits are cleared by the reset. Furthermore,
>> resetting the device clears the "Interrupt Disable bit", even though it
>> was set just before the rest. So I'm a little confused.
>>
>> Thanks,
>> Kenji Kaneshige
>>
>
> The point is to prevent any pending transactions from being on the bus
> while we are doing the reset. By writing only the INTX disable bit we
> are disabling all interrupts from being generated, and also disabling
> all DMA and MSI interrupts since the bus master enable bit is not set.
>
> Without this change the device might be in the middle of a transaction
> or sending an interrupt while we are doing the reset which may lead to
> other issues after the reset.
>

Thank you for clarification. I understood.

Thanks,
Kenji Kaneshige

      reply	other threads:[~2010-08-11  0:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-31  0:58 [RFC PATCH 1/2] pci: add function reset call that can be used inside of probe Jeff Kirsher
2010-07-31  0:59 ` [RFC PATCH 2/2] igb/ixgbe: add code to trigger function reset if reset_devices is set Jeff Kirsher
2010-08-01  8:15   ` David Miller
2010-08-05 16:27     ` David Woodhouse
2010-08-10  9:31       ` Kenji Kaneshige
2010-08-10 10:39 ` [RFC PATCH 1/2] pci: add function reset call that can be used inside of probe Kenji Kaneshige
2010-08-10 23:14   ` Alexander Duyck
2010-08-11  0:44     ` Kenji Kaneshige [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C61F253.8050700@jp.fujitsu.com \
    --to=kaneshige.kenji@jp$(echo .)fujitsu.com \
    --cc=alexander.h.duyck@intel$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=jbarnes@virtuousgeek$(echo .)org \
    --cc=jeffrey.t.kirsher@intel$(echo .)com \
    --cc=linux-pci@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox