From: Andrew Morton <akpm@osdl.org>
To: "S. Anderson" <sa@xmission.com>
Cc: pavel@xal.co.uk, linux-kernel@vger.kernel.org, adaplas@pol.net
Subject: Re: OOPS 2.6.0-test2, modprobe i810fb
Date: Mon, 28 Jul 2003 20:26:00 -0700 [thread overview]
Message-ID: <20030728202600.18338fa9.akpm@osdl.org> (raw)
In-Reply-To: <20030728201954.A16103@xmission.xmission.com>
"S. Anderson" <sa@xmission.com> wrote:
>
> On Mon, Jul 28, 2003 at 06:18:07PM +0100, Pavel Rabel wrote:
> > Got this OOPS when trying "modprobe i810fb",
> > kernel 2.6.0-test2
> >
>
> I am also getting this oops, or somthing very simmillar.
yay! I finally fixed a bug! (sheesh, bad day).
The device table is not null-terminated so we run off the end during
matching and go oops.
I also moved all the statics out of i810_main.h and into i810_main.c.
There is not a lot of point putting them in a header file: if any other .c
file includes the header we get multiple private instantiatiations of
all that stuff.
drivers/video/i810/i810_main.c | 51 +++++++++++++++++++++++++++++++++++++++++
drivers/video/i810/i810_main.h | 50 ----------------------------------------
2 files changed, 51 insertions(+), 50 deletions(-)
diff -puN drivers/video/i810/i810_main.h~i810-fix drivers/video/i810/i810_main.h
--- 25/drivers/video/i810/i810_main.h~i810-fix 2003-07-28 20:20:15.000000000 -0700
+++ 25-akpm/drivers/video/i810/i810_main.h 2003-07-28 20:20:15.000000000 -0700
@@ -14,62 +14,12 @@
#ifndef __I810_MAIN_H__
#define __I810_MAIN_H__
-/* PCI */
-static const char *i810_pci_list[] __initdata = {
- "Intel(R) 810 Framebuffer Device" ,
- "Intel(R) 810-DC100 Framebuffer Device" ,
- "Intel(R) 810E Framebuffer Device" ,
- "Intel(R) 815 (Internal Graphics 100Mhz FSB) Framebuffer Device" ,
- "Intel(R) 815 (Internal Graphics only) Framebuffer Device" ,
- "Intel(R) 815 (Internal Graphics with AGP) Framebuffer Device"
-};
-
-static struct pci_device_id i810fb_pci_tbl[] __initdata = {
- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG1,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG3,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810E_IG,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 },
- /* mvo: added i815 PCI-ID */
- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82815_100,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 },
- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82815_NOAGP,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82815_CGC,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 }
-};
-
static int __init i810fb_init_pci (struct pci_dev *dev,
const struct pci_device_id *entry);
static void __exit i810fb_remove_pci(struct pci_dev *dev);
static int i810fb_resume(struct pci_dev *dev);
static int i810fb_suspend(struct pci_dev *dev, u32 state);
-static struct pci_driver i810fb_driver = {
- .name = "i810fb",
- .id_table = i810fb_pci_tbl,
- .probe = i810fb_init_pci,
- .remove = __exit_p(i810fb_remove_pci),
- .suspend = i810fb_suspend,
- .resume = i810fb_resume,
-};
-
-static int vram __initdata = 4;
-static int bpp __initdata = 8;
-static int mtrr __initdata = 0;
-static int accel __initdata = 0;
-static int hsync1 __initdata = 0;
-static int hsync2 __initdata = 0;
-static int vsync1 __initdata = 0;
-static int vsync2 __initdata = 0;
-static int xres __initdata = 640;
-static int yres __initdata = 480;
-static int vyres __initdata = 0;
-static int sync __initdata = 0;
-static int ext_vga __initdata = 0;
-static int dcolor __initdata = 0;
-
/*
* voffset - framebuffer offset in MiB from aperture start address. In order for
* the driver to work with X, we must try to use memory holes left untouched by X. The
diff -puN drivers/video/i810/i810_main.c~i810-fix drivers/video/i810/i810_main.c
--- 25/drivers/video/i810/i810_main.c~i810-fix 2003-07-28 20:20:15.000000000 -0700
+++ 25-akpm/drivers/video/i810/i810_main.c 2003-07-28 20:20:15.000000000 -0700
@@ -56,6 +56,57 @@
#include "i810.h"
#include "i810_main.h"
+/* PCI */
+static const char *i810_pci_list[] __initdata = {
+ "Intel(R) 810 Framebuffer Device" ,
+ "Intel(R) 810-DC100 Framebuffer Device" ,
+ "Intel(R) 810E Framebuffer Device" ,
+ "Intel(R) 815 (Internal Graphics 100Mhz FSB) Framebuffer Device" ,
+ "Intel(R) 815 (Internal Graphics only) Framebuffer Device" ,
+ "Intel(R) 815 (Internal Graphics with AGP) Framebuffer Device"
+};
+
+static struct pci_device_id i810fb_pci_tbl[] __initdata = {
+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG1,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG3,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810E_IG,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 },
+ /* mvo: added i815 PCI-ID */
+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82815_100,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 },
+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82815_NOAGP,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82815_CGC,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 },
+ { 0 },
+};
+
+static struct pci_driver i810fb_driver = {
+ .name = "i810fb",
+ .id_table = i810fb_pci_tbl,
+ .probe = i810fb_init_pci,
+ .remove = __exit_p(i810fb_remove_pci),
+ .suspend = i810fb_suspend,
+ .resume = i810fb_resume,
+};
+
+static int vram __initdata = 4;
+static int bpp __initdata = 8;
+static int mtrr __initdata = 0;
+static int accel __initdata = 0;
+static int hsync1 __initdata = 0;
+static int hsync2 __initdata = 0;
+static int vsync1 __initdata = 0;
+static int vsync2 __initdata = 0;
+static int xres __initdata = 640;
+static int yres __initdata = 480;
+static int vyres __initdata = 0;
+static int sync __initdata = 0;
+static int ext_vga __initdata = 0;
+static int dcolor __initdata = 0;
+
/*------------------------------------------------------------*/
/**************************************************************
_
next prev parent reply other threads:[~2003-07-29 3:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-28 17:18 OOPS 2.6.0-test2, modprobe i810fb Pavel Rabel
2003-07-29 2:19 ` S. Anderson
2003-07-29 3:26 ` Andrew Morton [this message]
2003-07-29 5:18 ` S. Anderson
2003-07-29 5:32 ` Andrew Morton
2003-07-30 2:56 ` Bill Davidsen
2003-07-30 20:56 ` Michael Driscoll
2003-07-29 5:59 ` Andrew Morton
2003-07-29 7:24 ` S. Anderson
2003-07-29 7:54 ` Andrew Morton
2003-07-29 8:18 ` S. Anderson
2003-07-29 12:00 ` Alan Cox
2003-07-29 19:59 ` Andrew Morton
2003-07-29 23:04 ` S. Anderson
2003-07-29 9:34 ` Pavel Rabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030728202600.18338fa9.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=adaplas@pol.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@xal.co.uk \
--cc=sa@xmission.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).