lkml.org 
[lkml]   [2012]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Xen-devel] [PATCH 2/2] xen/pciback: When resetting the device don't disable twice.
>>> On 25.09.12 at 23:27, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> We call 'pci_disable_device' which sets the bus_master to zero
> and it also disables the PCI_COMMAND. There is no need to
> do it outside the PCI library.

Not really - pci_disable_device() only does anything if enable_cnt
drops to zero, and only clears the bus master flag in the command
word.

The code you delete fully zeros the command word unconditionally.
(I also noticed that the old [forward ported] code here forced
enable_cnt to zero.)

Hence the question is whether this really isn't a functional
change rather than mere cleanup.

Jan

> --- a/drivers/xen/xen-pciback/pciback_ops.c
> +++ b/drivers/xen/xen-pciback/pciback_ops.c
> @@ -114,10 +114,6 @@ void xen_pcibk_reset_device(struct pci_dev *dev)
> pci_disable_msi(dev);
> #endif
> pci_disable_device(dev);
> -
> - pci_write_config_word(dev, PCI_COMMAND, 0);
> -
> - dev->is_busmaster = 0;
> } else {
> pci_read_config_word(dev, PCI_COMMAND, &cmd);
> if (cmd & (PCI_COMMAND_INVALIDATE)) {




\
 
 \ /
  Last update: 2012-09-26 12:41    [W:0.037 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site