From: hugang <hugang@soulinfo.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [IDE-PATCH] Add piix fix up function into pii.c
Date: Wed, 4 Dec 2002 21:10:55 +0800 [thread overview]
Message-ID: <20021204211055.185221c0.hugang@soulinfo.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1157 bytes --]
Hello all:
Please apply.
Index: drivers/ide//pci/piix.c
===================================================================
RCS file: /home/hugang/local/cvs/2.4/drivers/ide/pci/piix.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 piix.c
--- drivers/ide//pci/piix.c 28 Nov 2002 06:41:20 -0000 1.1.1.2
+++ drivers/ide//pci/piix.c 4 Dec 2002 13:02:36 -0000
@@ -652,6 +652,27 @@
static void __init init_setup_piix (struct pci_dev *dev, ide_pci_device_t *d)
{
+ int i;
+ unsigned short cmd;
+ unsigned long flags;
+ unsigned long base_address[4] = { 0x1f0, 0x3f4, 0x170, 0x374 };
+
+ printk(KERN_INFO "PIIX: fixup IDE controller\n");
+ local_irq_save(flags);
+ pci_read_config_word(dev, PCI_COMMAND, &cmd);
+ pci_write_config_word(dev, PCI_COMMAND, cmd & ~PCI_COMMAND_IO);
+
+ for (i=0; i<4; i++) {
+ dev->resource[i].start = base_address[i];
+ dev->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO;
+ pci_write_config_dword(dev,
+ (PCI_BASE_ADDRESS_0 + (i * 4)),
+ dev->resource[i].start);
+ }
+
+ pci_write_config_word(dev, PCI_COMMAND, cmd);
+ local_irq_restore(flags);
+
ide_setup_pci_device(dev, d);
}
--
- Hu Gang
[-- Attachment #1.2: 2.5.gz --]
[-- Type: application/octet-stream, Size: 569 bytes --]
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2002-12-04 13:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-04 13:10 hugang [this message]
2002-12-04 14:35 ` Alan Cox
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=20021204211055.185221c0.hugang@soulinfo.com \
--to=hugang@soulinfo.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®