Tuesday, November 15, 2005

Linux tips: Recompiling Kernel 2.6.14.2 to enable DMA support in SIS 5513 IDE controller in AsRock 939S56M motherboard

On the very same day I successfully installed my first linux kernel 2.6.14.1. I notice from kernel.org that 2.6.14.2 is released. Another 2 days later, Fedora Core 4's live update is ready to update kernel to 2.6.14 while strangely Fedora Core 3's live update is still stuck at 2.6.12.

Nevertheless, that does not warrant a recompile of my kernel from 2.6.14.1 to 2.6.14.2. However the info from this thread here actually prompted me to do so.

Basically, the device ID of the SIS 5513 IDE controller is not identified correctly. And it rendered the kernel to turn off the DMA support for the harddisk.

To check the kernel boot log, I did the following.

vi /var/log/dmesg

It indeed reveal that the detection of the SIS 5513 IDE controller returned a -1. And from the very same thread, user sinthetek found that the problem can very well be fixed by adding the following entry in /usr/src/linux-2.6.14.2/drivers/ide/pci/sis5513.c

{ "SiS5513", PCI_DEVICE_ID_SI_5513, ATA_100 },

It was added right after the entry

{ "SiS551x", PCI_DEVICE_ID_SI_5511, ATA_16 },

Seemingly, the 'SIS551x' isn't the same reference for the SIS5513 controller.

Since I need to recompile the kernel to include the SIS5513 support, I downloaded the latest 2.6.14.2 kernel & made the modification above in sis5513.c & had the kernel recompiled.

Upon rebooting & from /var/log/dmesg, now I can see my sSIS5513 is DMA enabled now. To check disk access speed, I use

hdparm -t /dev/hda

output is as follow

/dev/hda:
Timing buffered disk reads: 176 MB in 3.00 seconds = 58.66 MB/sec

prior to that with DMA disabled, the output reads

/dev/hda:
Timing buffered disk reads: 176 MB in 3.00 seconds = 2.90 MB/sec

Hopefully, this glitch is fixed in the next kernel release. Looks like I can start to like this linux os more now.

Extract of my new /var/log/dmesg with DMA enabled as follow:

------------------------------------------------------------------------------------------------------------------------
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
SIS5513: IDE controller at PCI slot 0000:00:02.5
PCI: IRQ 0 for device 0000:00:02.5 doesn't match PIRQ mask - try pci=usepirqmask
SIS5513: chipset revision 1
SIS5513: not 100% native mode: will probe irqs later
SIS5513: SiS5513 ATA 100 (2nd gen) controller
ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:DMA
Probing IDE interface ide0...
hda: WDC WD800JB-00FMA0, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: HL-DT-ST DVDRAM GSA-4167B, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: Host Protected Area detected.
current capacity is 156299375 sectors (80025 MB)
native capacity is 156301488 sectors (80026 MB)
hda: Host Protected Area disabled.
hda: 156301488 sectors (80026 MB) w/8192KiB Cache, CHS=65535/16/63, UDMA(100)
hda: cache flushes supported
hda: hda1 hda2 <>
hdc: ATAPI 48X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide

Extract of my old /var/log/dmesg with DMA disabled as follow:

------------------------------------------------------------------------------------------------------------------------
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
SIS5513: IDE controller at PCI slot 0000:00:02.5
PCI: IRQ 0 for device 0000:00:02.5 doesn't match PIRQ mask - try pci=usepirqmask
SIS5513: chipset revision 1
SIS5513: not 100% native mode: will probe irqs later
SIS5513: IDE controller at PCI slot 0000:00:02.5
PCI: IRQ 0 for device 0000:00:02.5 doesn't match PIRQ mask - try pci=usepirqmask
SIS5513: chipset revision 1
SIS5513: not 100% native mode: will probe irqs later
SIS_IDE: probe of 0000:00:02.5 failed with error -1
Probing IDE interface ide0...
hda: WDC WD800JB-00FMA0, ATA DISK drive
Probing IDE interface ide1...
hdc: HL-DT-ST DVDRAM GSA-4167B, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: Host Protected Area detected.
current capacity is 156299375 sectors (80025 MB)
native capacity is 156301488 sectors (80026 MB)
hda: Host Protected Area disabled.
hda: 156301488 sectors (80026 MB) w/8192KiB Cache, CHS=65535/16/63
hda: cache flushes supported
hda: hda1 hda2 <>
hdc: ATAPI 79X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide

1 Comments:

Blogger aks said...

Google Analytics Is Sloooooow
I'd love to see how many people signed up for Google analytics yesterday because I've never seen such slow response times from a service Google provided.
Your blog is soo great.. I'm definitely going to bookmark you!

I have a
making money on the internet
site. It pretty much covers making money on the internet related stuff.

Come and check it out if you get time :-) Im waiting...

9:25 AM  

Post a Comment

<< Home