netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]  add pcibios_enable_device() return value check
@ 2008-02-28 13:15 Yoichi Yuasa
  2008-02-28 21:54 ` Michael Buesch
  0 siblings, 1 reply; 3+ messages in thread
From: Yoichi Yuasa @ 2008-02-28 13:15 UTC (permalink / raw)
  To: mb; +Cc: yoichi_yuasa, netdev

This patch has added pcibios_enable_device() return value check.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

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;
 
 	/* Enable PCI bridge BAR1 prefetch and burst */
 	pci_write_config_dword(dev, SSB_BAR1_CONTROL, 3);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH]  add pcibios_enable_device() return value check
  2008-02-28 13:15 [PATCH] add pcibios_enable_device() return value check Yoichi Yuasa
@ 2008-02-28 21:54 ` Michael Buesch
  2008-02-29  2:45   ` [PATCH UPDATE] " Yoichi Yuasa
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Buesch @ 2008-02-28 21:54 UTC (permalink / raw)
  To: Yoichi Yuasa; +Cc: netdev

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 <yoichi_yuasa@tripeaks.co.jp>
> 
> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH UPDATE]  add pcibios_enable_device() return value check
  2008-02-28 21:54 ` Michael Buesch
@ 2008-02-29  2:45   ` Yoichi Yuasa
  0 siblings, 0 replies; 3+ messages in thread
From: Yoichi Yuasa @ 2008-02-29  2:45 UTC (permalink / raw)
  To: Michael Buesch; +Cc: yoichi_yuasa, netdev

Hi Michael,

Thank you for your comment.
I updated it.

Yoichi

This patch has added pcibios_enable_device() return value check.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

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-29 09:39:39.355620210 +0900
+++ linux/drivers/ssb/driver_pcicore.c	2008-02-29 10:59:18.649231996 +0900
@@ -111,7 +111,10 @@ 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) {
+		ssb_printk(KERN_ERR "PCI: SSB bridge enable failed\n");
+		return;
+	}
 
 	/* Enable PCI bridge BAR1 prefetch and burst */
 	pci_write_config_dword(dev, SSB_BAR1_CONTROL, 3);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-29  2:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-28 13:15 [PATCH] add pcibios_enable_device() return value check Yoichi Yuasa
2008-02-28 21:54 ` Michael Buesch
2008-02-29  2:45   ` [PATCH UPDATE] " Yoichi Yuasa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).