* [AMD76X]
@ 2003-08-23 23:33 Herbert Xu
2003-08-24 17:53 ` [AMD76X] Willy Tarreau
0 siblings, 1 reply; 3+ messages in thread
From: Herbert Xu @ 2003-08-23 23:33 UTC (permalink / raw)
To: Marcelo Tosatti, Alan Cox, Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
Hi:
amd76x_pm.c will crash if no chipsets are found and CONFIG_HOTPLUG is
turned on. This patch makes it return with a failure instead.
Cheers,
--
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
[-- Attachment #2: p --]
[-- Type: text/plain, Size: 1045 bytes --]
Index: kernel-source-2.4/drivers/char/amd76x_pm.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.4/drivers/char/amd76x_pm.c,v
retrieving revision 1.2
diff -u -r1.2 amd76x_pm.c
--- kernel-source-2.4/drivers/char/amd76x_pm.c 1 Dec 2002 05:52:05 -0000 1.2
+++ kernel-source-2.4/drivers/char/amd76x_pm.c 23 Aug 2003 23:30:11 -0000
@@ -577,16 +577,18 @@
int found;
/* Find northbridge */
- found = pci_module_init(&amd_nb_driver);
- if (found < 0) {
+ found = pci_register_driver(&amd_nb_driver);
+ if (found <= 0) {
printk(KERN_ERR "amd76x_pm: Could not find northbridge\n");
+ pci_unregister_driver(&amd_nb_driver);
return 1;
}
/* Find southbridge */
- found = pci_module_init(&amd_sb_driver);
- if (found < 0) {
+ found = pci_register_driver(&amd_sb_driver);
+ if (found <= 0) {
printk(KERN_ERR "amd76x_pm: Could not find southbridge\n");
+ pci_unregister_driver(&amd_sb_driver);
pci_unregister_driver(&amd_nb_driver);
return 1;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [AMD76X]
2003-08-23 23:33 [AMD76X] Herbert Xu
@ 2003-08-24 17:53 ` Willy Tarreau
2003-08-25 8:12 ` [AMD76X] Herbert Xu
0 siblings, 1 reply; 3+ messages in thread
From: Willy Tarreau @ 2003-08-24 17:53 UTC (permalink / raw)
To: Herbert Xu; +Cc: Marcelo Tosatti, Alan Cox, Linux Kernel Mailing List
On Sun, Aug 24, 2003 at 09:33:23AM +1000, Herbert Xu wrote:
> Hi:
>
> amd76x_pm.c will crash if no chipsets are found and CONFIG_HOTPLUG is
> turned on. This patch makes it return with a failure instead.
Hi !
I'm wondering whether this patch should be needed too.
Cheers,
Willy
--- linux-2.4.22-rc3/drivers/char/amd76x_pm.c.orig Sun Aug 24 19:52:42 2003
+++ linux-2.4.22-rc3/drivers/char/amd76x_pm.c Sun Aug 24 19:53:49 2003
@@ -620,6 +620,8 @@
#ifndef AMD76X_NTH
if (!amd76x_pm_cfg.curr_idle) {
printk(KERN_ERR "amd76x_pm: Idle function not changed\n");
+ pci_unregister_driver(&amd_nb_driver);
+ pci_unregister_driver(&amd_sb_driver);
return 1;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [AMD76X]
2003-08-24 17:53 ` [AMD76X] Willy Tarreau
@ 2003-08-25 8:12 ` Herbert Xu
0 siblings, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2003-08-25 8:12 UTC (permalink / raw)
To: Willy Tarreau; +Cc: Marcelo Tosatti, Alan Cox, Linux Kernel Mailing List
On Sun, Aug 24, 2003 at 07:53:21PM +0200, Willy Tarreau wrote:
>
> I'm wondering whether this patch should be needed too.
>
> --- linux-2.4.22-rc3/drivers/char/amd76x_pm.c.orig Sun Aug 24 19:52:42 2003
> +++ linux-2.4.22-rc3/drivers/char/amd76x_pm.c Sun Aug 24 19:53:49 2003
> @@ -620,6 +620,8 @@
> #ifndef AMD76X_NTH
> if (!amd76x_pm_cfg.curr_idle) {
> printk(KERN_ERR "amd76x_pm: Idle function not changed\n");
> + pci_unregister_driver(&amd_nb_driver);
> + pci_unregister_driver(&amd_sb_driver);
> return 1;
> }
Although this error is currently not possible, we should include
your fixup anyway.
Thanks,
--
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-08-25 8:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-23 23:33 [AMD76X] Herbert Xu
2003-08-24 17:53 ` [AMD76X] Willy Tarreau
2003-08-25 8:12 ` [AMD76X] Herbert Xu
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).