Subject: Re: [PATCH] add pcibios_enable_device() return value check

From: Michael Buesch <[email-masked]>
Date: Thu, 28 Feb 2008 22:54:52 +0100

On Thursday 28 February 2008 14:15:38 Yoichi Yuasa wrote:
> This patch has added pcibios_enable_device() return value check.
> 
> Signed-off-by: Yoichi Yuasa <[email-masked]>
> 
> diff -pruN -X /home/yuasa/Memo/dontdiff linux-orig/drivers/ssb/driver_pcicore.c linux/drivers/ssb/driver_pcicore.c
> --- linux-orig/drivers/ssb/driver_pcicore.c	2008-02-26 15:51:13.146734949 +0900
> +++ linux/drivers/ssb/driver_pcicore.c	2008-02-26 15:54:29.257910690 +0900
> @@ -111,7 +111,8 @@ static void __init ssb_fixup_pcibridge(s
>  
>  	/* Enable PCI bridge bus mastering and memory space */
>  	pci_set_master(dev);
> -	pcibios_enable_device(dev, ~0);
> +	if (pcibios_enable_device(dev, ~0) < 0)
> +		return;

I'm not sure if we really want to silently fail here.
Please add this:
		ssb_printk(KERN_ERR "PCI: SSB bridge enable failed\n");

>  	/* Enable PCI bridge BAR1 prefetch and burst */
>  	pci_write_config_dword(dev, SSB_BAR1_CONTROL, 3);

-- 
Greetings Michael.