mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Linux-IDE <linux-ide@vger.kernel.org>
Subject: [PATCH] sis5513 fix for SiS962 chipset
Date: Fri, 10 Sep 2004 16:29:16 +0200	[thread overview]
Message-ID: <1094826555.7868.186.camel@thomas.tec.linutronix.de> (raw)

Hi,

1. If the fake 5513 id bit is not set by the BIOS we must have the 5518
id in the device table.

2. If the register remapping is not set by the BIOS then the enable bit
check in ide_pci_setup_ports will fail. It's safe to switch to the
remapping mode here. Keeping the not remapped mode would need quite big
changes AFAICS.

Works with 2.4.27 and 2.6.8. Please apply.

tglx
________________________________________________________________________
SCO: Linux does not exist
Linux: SCO's claim does not exist
Wallstreet: SCO does not exist for long
________________________________________________________________________

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

diff -urN linux-2.6.8.1.org/drivers/ide/pci/sis5513.c
linux-2.6.8.1/drivers/ide/pci/sis5513.c
--- linux-2.6.8.1.org/drivers/ide/pci/sis5513.c	2004-08-14
12:55:32.000000000 +0200
+++ linux-2.6.8.1/drivers/ide/pci/sis5513.c	2004-09-10
15:50:50.000000000 +0200
@@ -788,6 +788,15 @@
 			if (trueid == 0x5518) {
 				printk(KERN_INFO "SIS5513: SiS 962/963 MuTIOL IDE UDMA133
controller\n");
 				chipset_family = ATA_133;
+				
+				/* Check for 5513 compability mapping 
+				 * We must use this, else the port enabled code will fail,
+				 * as it expects the enablebits at 0x4a. 
+				 */
+				if (!(idemisc & 0x40000000)) {
+					pci_write_config_dword(dev, 0x54, idemisc | 0x40000000);
+					printk (KERN_INFO "SIS5513: Switching to 5513 register
mapping\n");
+				}
 			}
 	}
 
@@ -963,6 +972,7 @@
 
 static struct pci_device_id sis5513_pci_tbl[] = {
 	{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5513, PCI_ANY_ID, PCI_ANY_ID, 0,
0, 0},
+	{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5518, PCI_ANY_ID, PCI_ANY_ID, 0,
0, 0},
 	{ 0, },
 };
 MODULE_DEVICE_TABLE(pci, sis5513_pci_tbl);





             reply	other threads:[~2004-09-10 14:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-10 14:29 Thomas Gleixner [this message]
2004-09-10 14:53 ` Lionel Bouton
2004-09-10 15:06   ` Thomas Gleixner
2004-09-10 15:31     ` Lionel Bouton
2004-09-10 15:32       ` Thomas Gleixner
2004-09-10 21:21       ` Bartlomiej Zolnierkiewicz
2004-09-11  7:11         ` Thomas Gleixner
2004-09-11 10:30         ` Lionel Bouton
2004-09-11 16:02           ` Bartlomiej Zolnierkiewicz
2004-09-13  9:23             ` Lionel Bouton

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=1094826555.7868.186.camel@thomas.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=linux-ide@vger.kernel.org \
    --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

Powered by JetHome