Bug 176560 - Southbridge SiS 0965 with driver SiS5513 has no working DMA
Southbridge SiS 0965 with driver SiS5513 has no working DMA
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-26 08:26 EST by Gustavo Kuhn Andriotti
Modified: 2015-01-04 17:23 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-09 21:20:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch to [sis5513.c] (1.01 KB, patch)
2006-01-08 06:18 EST, Gustavo Kuhn Andriotti
no flags Details | Diff
Proposed patch to [pci_ids.c] (421 bytes, patch)
2006-01-08 06:19 EST, Gustavo Kuhn Andriotti
no flags Details | Diff

  None (edit)
Description Gustavo Kuhn Andriotti 2005-12-26 08:26:07 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051201 Fedora/1.5-1.1.fc4.nr Firefox/1.5

Description of problem:
The driver that comes with the kernel for the southbridge SiS 965 and suppose to work with the driver for SiS 5513 chipset does not include DMA support. It was tested with [hdparm -d <device>] and with the same application it is not possible to activated the DMA support.

Version-Release number of selected component (if applicable):
2.6.14-1.1653_FC4

How reproducible:
Always

Steps to Reproduce:
1. In a system with SiS 965 Sothbridge and Chipset SiS 5513 install the corresponding kernel;
2. Verify with [hdparm], as root, if the DMA is enable for a give device (in my case a CD-ROM drive);
3. Try to activate the DMA support, using [hdparm];

It fails every time.
  

Actual Results:  The system respond with an error message that says that it is impossible to adjust the given parameter, DMA support to active.

Expected Results:  DMA should be always active.

Additional info:

I patched the kernel and it works. The above patch was inspired on:

http://lkml.org/lkml/2005/10/5/293

1. Patch to [pci_ids.h], called [linux-2.6-pci_ids.patch]:

--- a/include/linux/pci_ids.h   2005-12-26 09:00:09.000000000 +0100
+++ b/include/linux/pci_ids.h   2005-12-26 09:00:27.000000000 +0100
@@ -672,6 +672,7 @@
 #define PCI_DEVICE_ID_SI_961           0x0961
 #define PCI_DEVICE_ID_SI_962           0x0962
 #define PCI_DEVICE_ID_SI_963           0x0963
+#define PCI_DEVICE_ID_SI_965           0x0965
 #define PCI_DEVICE_ID_SI_5107          0x5107
 #define PCI_DEVICE_ID_SI_5300          0x5300
 #define PCI_DEVICE_ID_SI_5511          0x5511

2. Patch to [sis5513.c], called [linux-2.6-sis5513.patch]:

--- a/drivers/ide/pci/sis5513.c 2005-12-26 08:59:29.000000000 +0100
+++ b/drivers/ide/pci/sis5513.c 2005-12-26 09:02:44.000000000 +0100
@@ -20,6 +20,7 @@
  * ATA16/33 support from specs
  * ATA133 support for SiS961/962 by L.C. Chang <lcchang@sis.com.tw>
  * ATA133 961/962/963 fixes by Vojtech Pavlik <vojtech@suse.cz>
+ * ATA133 inspired on http://lkml.org/lkml/2005/10/5/293
  *
  * Documentation:
  *     SiS chipset documentation available under NDA to companies only
@@ -74,7 +75,7 @@
 #define ATA_100a       0x04 // SiS730/SiS550 is ATA100 with ATA66 layout
 #define ATA_100                0x05
 #define ATA_133a       0x06 // SiS961b with 133 support
-#define ATA_133                0x07 // SiS962/963
+#define ATA_133                0x07 // SiS962/963/965

 static u8 chipset_family;

@@ -87,6 +88,8 @@ static const struct {
        u8 chipset_family;
        u8 flags;
 } SiSHostChipInfo[] = {
+       { "SiS965",     PCI_DEVICE_ID_SI_965,   ATA_133  },
+
        { "SiS745",     PCI_DEVICE_ID_SI_745,   ATA_100  },
        { "SiS735",     PCI_DEVICE_ID_SI_735,   ATA_100  },
        { "SiS733",     PCI_DEVICE_ID_SI_733,   ATA_100  },

3. Patch to {kernel-2.6.spec], called [kernel.kernel-2.6.spec.2.6.14.1-653.patch]:

--- kernel-2.6.spec.orig        2005-12-26 09:04:38.000000000 +0100
+++ kernel-2.6.spec     2005-12-26 09:07:14.000000000 +0100
@@ -352,6 +352,8 @@ Patch1771: linux-2.6-sata-promise-pata-p
 Patch1780: linux-2.6-net-bonding-feature-consolidation.patch
 Patch1781: linux-2.6-net-bridge-feature-consolidation.patch
 Patch1782: linux-2.6-selinux-mls-compat.patch
+Patch1783: linux-2.6-pci_ids.patch
+Patch1784: linux-2.6-sis5513.patch


 # ACPI patches.
@@ -813,6 +815,9 @@ cd linux-%{kversion}
 %patch1780 -p1
 %patch1781 -p1
 %patch1782 -p1
+# Fix DMA on SiS965 southbridge with SiS5513 driver
+%patch1783 -p1
+%patch1784 -p1

 # ACPI patches.
 # Enable EC burst

4. Build the rpm files and install it;
5. After that the system work as expected.
Comment 1 Gustavo Kuhn Andriotti 2006-01-08 06:14:02 EST
I have tryed the new kernel, but the driver for [sata_sis] in the
kernel-2.6.14-1.1656_FC4 is the same as in kernel-2.6.14-1.1653_FC4, and the
problem is still valid.
Comment 2 Gustavo Kuhn Andriotti 2006-01-08 06:16:59 EST
Oops, I meant [sis5513] and [pci_ids] on the above comment. Sorry!
Comment 3 Gustavo Kuhn Andriotti 2006-01-08 06:18:47 EST
Created attachment 122922 [details]
Proposed patch to [sis5513.c]
Comment 4 Gustavo Kuhn Andriotti 2006-01-08 06:19:44 EST
Created attachment 122923 [details]
Proposed patch to [pci_ids.c]
Comment 5 Frank Wittig 2006-01-30 10:58:01 EST
I got the same Problem with SIS965l and applied this patch to make it work:

--- linux-2.6.14/drivers/ide/pci/sis5513.c~sis5513-support-sis-965l 2006-01-27
16:47:57.088109691 +0100
+++ linux-2.6.14/drivers/ide/pci/sis5513.c  2006-01-27 17:05:40.452482594 +0100
@@ -777,6 +777,10 @@
          pci_write_config_dword(dev, 0x54, idemisc | 0x40000000);
          printk(KERN_INFO "SIS5513: Switching to 5513 register mapping\n");
        }
+      } else if (trueid == 0x180) { /* sis965L */
+        chipset_family = ATA_133;
+        printk(KERN_INFO "SIS5513: SiS 965 IDE "
+            "UDMA133 controller\n");
      }
  }

@@ -952,6 +956,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},
+  { PCI_VENDOR_ID_SI, 0x180,                 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
  { 0, },
 };
 MODULE_DEVICE_TABLE(pci, sis5513_pci_tbl);
Comment 6 Gustavo Kuhn Andriotti 2006-01-30 12:49:09 EST
My point is: why there is not yet a patch on Kernel tree. There are until now
(thanks Frank) 2 solutions. I realy don't care much about which will be taken
just that I don't need to make my own kernel to play a DVD without skips.
Comment 7 Dave Jones 2006-02-03 00:23:05 EST
This is a mass-update to all currently open kernel bugs.

A new kernel update has been released (Version: 2.6.15-1.1830_FC4)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO_REPORTER state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

Thank you.
Comment 8 Gustavo Kuhn Andriotti 2006-02-04 05:19:03 EST
The problem was resolved by the new kernel: 2.6.15-1.1830_FC4.

Note You need to log in before you can comment on or make changes to this bug.