lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140501154339.GC9180@redhat.com>
Date:	Thu, 1 May 2014 18:43:39 +0300
From:	"Michael S. Tsirkin" <mst@...hat.com>
To:	Marcel Apfelbaum <marcel.a@...hat.com>
Cc:	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	bhelgaas@...gle.com, matthew@....cx
Subject: Re: [PATCH] PCI/shpchp: fix a bus speed issue on hotplug

On Thu, May 01, 2014 at 05:35:48PM +0300, Marcel Apfelbaum wrote:
> When a board is added, the shpchp driver checks if there
> is a mismatch between the bridge's adapter and the bus speed.
> If there is, it sets the subordinate speed (if there is no device on it).
> 
> However, it takes the reference of the board speed from the primary bus
> and not from the subordinate. If the primary bus is PCI and not PCIX/PCIe,
> its speed is not updated and remains 0xff. As a result hotplug fails
> with error: "Speed of bus ff and adapter 0 mismatch".
> 
> Fixed that by checking the speed against the subordinate bus.
> 
> Signed-off-by: Marcel Apfelbaum <marcel.a@...hat.com>
> Acked-by: Michael S. Tsirkin <mst@...hat.com>

Looking at git history, I suspect this is a regression
introduced by
	commit 3749c51ac6c1560aa1cb1520066bed84c6f8152a
	Author: Matthew Wilcox <matthew@....cx>
	Date:   Sun Dec 13 08:11:32 2009 -0500
	    PCI: Make current and maximum bus speeds part of the PCI core
At least I remember this configuration worked for me early in 2009...

> ---
>  drivers/pci/hotplug/shpchp_ctrl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c
> index 5849927..6efc2ec 100644
> --- a/drivers/pci/hotplug/shpchp_ctrl.c
> +++ b/drivers/pci/hotplug/shpchp_ctrl.c
> @@ -282,8 +282,8 @@ static int board_added(struct slot *p_slot)
>  		return WRONG_BUS_FREQUENCY;
>  	}
>  
> -	bsp = ctrl->pci_dev->bus->cur_bus_speed;
> -	msp = ctrl->pci_dev->bus->max_bus_speed;
> +	bsp = ctrl->pci_dev->subordinate->cur_bus_speed;
> +	msp = ctrl->pci_dev->subordinate->max_bus_speed;
>  
>  	/* Check if there are other slots or devices on the same bus */
>  	if (!list_empty(&ctrl->pci_dev->subordinate->devices))
> -- 
> 1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ