From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akio Takebe Subject: Re: [Patch] cleanup pciback_reset_device Date: Mon, 18 Dec 2006 22:26:56 +0900 Message-ID: <35C722A830293Ctakebe_akio@jp.fujitsu.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , xen-devel@lists.xensource.com Cc: Akio Takebe List-Id: xen-devel@lists.xenproject.org Hi, Keir >On 18/12/06 9:21 am, "Akio Takebe" wrote: > >> This patch is for cleanup of pciback_reset_device. >> is_enabled=0 and is_busmaster=0 are not necessary >> because pci_disable_device() do them. > >If you are zapping the command register then doesn't it makes sense to zap >the software flags relating to that at the same time, even if that sometimes >happens to be redundant? It certainly means we can be sure they won't get >out of sync. > I checked linux-2.6.19 and linux-2.6.18, both pci_disable_device()s do is_enabled=0 and is_busmaster=0. I think pci_write_config_word(dev, PCI_COMMAND, 0) is not also necessary, (though I'm not sure it.) So I think they in pciback_reset_device() are not necessary. But if you want to leave it for safe, I agree. :) Best Regards, Akio Takebe