From: Alex Williamson <alex_williamson@hp.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] [PATCH] 2.5.67 Don't init zx1 agpgart on non-AGP system
Date: Mon, 21 Apr 2003 19:33:38 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590723705580@msgid-missing> (raw)
[-- Attachment #1: Type: text/plain, Size: 213 bytes --]
This fixes agp_hp_init() so that it doesn't try to register
the zx1 AGP driver when there is no AGP slot in the system.
Thanks,
Alex
--
Alex Williamson HP Linux & Open Source Lab
[-- Attachment #2: hp-agp.diff --]
[-- Type: text/plain, Size: 1210 bytes --]
--- linux-2.5.67/drivers/char/agp/hp-agp.c~ 2003-04-21 12:37:52.000000000 -0600
+++ linux-2.5.67/drivers/char/agp/hp-agp.c 2003-04-21 12:53:20.000000000 -0600
@@ -420,6 +420,9 @@
if (hp_zx1_setup(sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa))
return 1;
+ fake_bridge_dev.vendor = PCI_VENDOR_ID_HP;
+ fake_bridge_dev.device = PCI_DEVICE_ID_HP_ZX1_LBA;
+
return 0;
}
@@ -435,16 +438,19 @@
status = acpi_get_devices("HWP0003", zx1_gart_probe, "HWP0003 AGP LBA", NULL);
if (!(ACPI_SUCCESS(status))) {
agp_bridge->type = NOT_SUPPORTED;
- printk(KERN_INFO PFX "Didn't find an HP ZX1 Chipset.\n");
+ printk(KERN_INFO PFX "Failed to initialize zx1 AGP.\n");
return -ENODEV;
}
- fake_bridge_dev.vendor = PCI_VENDOR_ID_HP;
- fake_bridge_dev.device = PCI_DEVICE_ID_HP_ZX1_LBA;
- hp_agp_driver.dev = &fake_bridge_dev;
- agp_bridge->type = HP_ZX1;
- agp_bridge->dev = &fake_bridge_dev;
- return agp_register_driver(&hp_agp_driver);
+ if (fake_bridge_dev.vendor && !agp_bridge->type) {
+ hp_agp_driver.dev = &fake_bridge_dev;
+ agp_bridge->type = HP_ZX1;
+ agp_bridge->dev = &fake_bridge_dev;
+ return agp_register_driver(&hp_agp_driver);
+
+ } else {
+ return -ENODEV;
+ }
}
static void __exit
reply other threads:[~2003-04-21 19:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=marc-linux-ia64-105590723705580@msgid-missing \
--to=alex_williamson@hp.com \
--cc=linux-ia64@vger.kernel.org \
/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