[disclaimer]THE FOLLOWING CAN DAMAGE STUFF[/disclaimer]
My laptop has a SiS5513, well atleast linux thinks it is. It’s really a SiS962. I’ve had my laptop for a few years now, and I wish I would have “figured” this out sooner.
/*
* The original SiS5513 comes from a SiS5511/55112/5513 chipset. The original
* SiS5513 was also used in the SiS5596/5513 chipset. Thus if we see a SiS5511
* or SiS5596, we can assume we see the first MWDMA-16 capable SiS5513 chip.
*
* Later SiS chipsets integrated the 5513 functionality into the NorthBridge,
* starting with SiS5571 and up to SiS745. The PCI ID didn't change, though. We
* can figure out that we have a more modern and more capable 5513 by looking
* for the respective NorthBridge IDs.
*
* Even later (96x family) SiS chipsets use the MuTIOL link and place the 5513
* into the SouthBrige. Here we cannot rely on looking up the NorthBridge PCI
* ID, while the now ATA-133 capable 5513 still has the same PCI ID.
* Fortunately the 5513 can be 'unmasked' by fiddling with some config space
* bits, changing its device id to the true one - 5517 for 961 and 5518 for
* 962/963.
*/
In order to fix this, I need to use pcitweak to change some bits. There isn’t a whole lot of information around the internet about pcitweak, so I have no idea if this is permanent. Hopefully if it works it is, and if it does not work, then it was merely temporary.
px@pmobilex ~ $ sudo pcitweak -r 00:02:5 -h 02
0x5513
px@pmobilex ~ $ sudo pcitweak -r 00:02:5 0x0
0x55131039
# 5513 is the device ID, 1039 is the Vendor ID
px@pmobilex ~ $ sudo pcitweak -w 00:02:5 0x0 0x55181039
px@pmobilex ~ $ sudo pcitweak -r 00:02:5 0x0
0x55131039
px@pmobilex ~ $ sudo pcitweak -w 00:02:5 0x0 0x55181039
px@pmobilex ~ $ sudo pcitweak -r 00:02:5 0x0
0x55131039
When I write the information I get no output.
I can’t for the life of me figure out why pcitweak won’t actually write the values. Using su, or sudo makes no difference.
[update]
OK, maybe this can help me. I found another program called setpci. why it took me so long to find i’ll never know. On Gentoo you’ll need to have >=sys-apps/pciutils-2.2.0-r1 installed.
I’ll explain the options I’m using first.
-v be verbose
-D Don’t actually do anything, just list it.
px@pmobilex ~ $ sudo setpci -v -D -H1 -d 1039:5513 0
00:02.5:00 = 39
px@pmobilex ~ $ sudo setpci -v -D -H1 -d 1039:5513 1
00:02.5:01 = 10
px@pmobilex ~ $ sudo setpci -v -D -H1 -d 1039:5513 2
00:02.5:02 = 13
px@pmobilex ~ $ sudo setpci -v -D -H1 -d 1039:5513 3
00:02.5:03 = 55
[/bash
We only need to change registers 2 and 3, well really only 2 in my case.
# You can also ask for multiple registers in one command.
px@pmobilex ~ $ sudo setpci -v -D -H1 -d 1039:5513 0 1 2 3
00:02.5:00 = 39
00:02.5:01 = 10
00:02.5:02 = 13
00:02.5:03 = 55
px@pmobilex /etc/portage $ sudo setpci -v -H1 -d 1039:5513 device_id.W=0x5518
00:02.5:02 5518
px@pmobilex /etc/portage $ sudo setpci -v -D -H1 -d 1039:5513 device_id
00:02.5:02 = 5513
Grrr, still won’t change. What’s the point of these tools if they don’t work?
# as root.
pmobilex px # setpci -v -H1 -s 0:02.5 device_id
00:02.5:02 = 5513
pmobilex px # setpci -v -H1 -s 0:02.5 device_id.W=0x5518
00:02.5:02 5518
pmobilex px # setpci -v -H1 -s 0:02.5 device_id
00:02.5:02 = 5513
OK, it works, but not for what I need? argh.
pmobilex px # setpci -v -d *:* latency_timer
00:00.0:0d = 40
00:01.0:0d = 40
00:02.0:0d = 00
00:02.1:0d = 00
00:02.3:0d = 40
00:02.5:0d = 80
00:02.6:0d = 40
00:02.7:0d = 40
00:03.0:0d = 40
00:03.1:0d = 40
00:03.2:0d = 40
00:03.3:0d = 40
00:04.0:0d = 40
00:08.0:0d = a8
00:0a.0:0d = a8
01:00.0:0d = f8
pmobilex px # setpci -v -d *:* latency_timer=b0
00:00.0:0d b0
00:01.0:0d b0
00:02.0:0d b0
00:02.1:0d b0
00:02.3:0d b0
00:02.5:0d b0
00:02.6:0d b0
00:02.7:0d b0
00:03.0:0d b0
00:03.1:0d b0
00:03.2:0d b0
00:03.3:0d b0
00:04.0:0d b0
00:08.0:0d b0
00:0a.0:0d b0
01:00.0:0d b0
pmobilex px # setpci -v -d *:* latency_timer
00:00.0:0d = b0
00:01.0:0d = b0
00:02.0:0d = 00
00:02.1:0d = 00
00:02.3:0d = b0
00:02.5:0d = b0
00:02.6:0d = b0
00:02.7:0d = b0
00:03.0:0d = b0
00:03.1:0d = b0
00:03.2:0d = b0
00:03.3:0d = b0
00:04.0:0d = b0
00:08.0:0d = b0
00:0a.0:0d = b0
01:00.0:0d = b0
I guess I’ll see if I can patch the sis5513.c to be always be hard coded as a sis5518.
resources:
http://lkml.org/lkml/2003/6/20/208
file:///usr/src/linux/drivers/ide/pci/sis5513.c
http://www.linux-hacker.net/cgi-bin/UltraBoard/UltraBoard.pl?Action=ShowPost&Board=technical&Post=2489
http://www-128.ibm.com/developerworks/library/l-hw2.html
http://www.daniel.nofftz.net/linux/Athlon-Powersaving-HOWTO.html
http://www.fedoraforum.org/forum/showthread.php?p=556644
http://www.mail-archive.com/linux-ide@vger.kernel.org/msg01794.html