Skip to contentSkip to conversation

VIA 4.2x driver for 2.2 kernels

PATCH In review Vojtech Pavlik 3 participants 9 messages Feb 20, 2001 – Feb 21, 2001

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 VIA 4.2x driver for 2.2 kernels

Hi Andre!

You wanted my VIA driver for 2.2. Here is a patch that brings the very latest 4.2 driver to the 2.2 kernel. The patch is against the 2.2.19-pre13 kernel plus yours 1221 ide patch.

Enjoy!

Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#1 lore raw
Quoted 5 lines · Vojtech Pavlik

Hi Andre!

You wanted my VIA driver for 2.2. Here is a patch that brings the very latest 4.2 driver to the 2.2 kernel. The patch is against the 2.2.19-pre13 kernel plus yours 1221 ide patch.

Hi,

This drivers breaks with my HP 8110 CD-R drive. It's sitting on primary slave of a Via 686B controler. When I try to do a hdparm -d1 -u1 -k1 /dev/hdb, the kernel locks up hard. Not even an oops. Reverting to the old driver works fine.

Uniform Multi-Platform E-IDE driver Revision: 6.30
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller on PCI bus 00 dev 39
VP_IDE: chipset revision 6
VP_IDE: not 100%% native mode: will probe irqs later
VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci00:07.1

    ide0: BM-DMA at 0xc000-0xc007, BIOS settings: hda:pio,
hdb:pio
    ide1: BM-DMA at 0xc008-0xc00f, BIOS settings: hdc:pio,

hdd:pio
HPT370: IDE controller on PCI bus 00 dev 70
HPT370: chipset revision 3
HPT370: not 100%% native mode: will probe irqs later

    ide2: BM-DMA at 0xec00-0xec07, BIOS settings: hde:DMA,
hdf:pio
    ide3: BM-DMA at 0xec08-0xec0f, BIOS settings: hdg:DMA,

hdh:pio
hdb: Hewlett-Packard CD-Writer Plus 8100, ATAPI CDROM drive
VP_IDE: Calibrating PCI clock ... 34.91 MHz
hde: Maxtor 92720U8, ATA DISK drive
hdg: Maxtor 96147U8, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide2 at 0xdc00-0xdc07,0xe002 on irq 10
ide3 at 0xe400-0xe407,0xe802 on irq 10
hde: Maxtor 92720U8, 25965MB w/2048kB Cache, CHS=52755/16/63, UDMA(66)
hdg: Maxtor 96147U8, 58623MB w/2048kB Cache, CHS=119108/16/63, UDMA(66)

The one thing I see here which looks odd is the PCI clock timing at 34.91 MHZ. The CPU is not overclocked so the PCI clock should be 33MHZ but that's probably not related.

Regards,
Shane

Signature · 5 lines
Shane Wegner: [email protected]
              http://www.cm.nu/~shane/
PGP:          1024D/FFE3035D
              A0ED DAC4 77EC D674 5487
              5B5C 4F89 9A4E FFE3 035D
#2 lore raw
In reply to Vojtech Pavlik
Quoted 9 lines · Shane Wegner
Quoted 3 lines

You wanted my VIA driver for 2.2. Here is a patch that brings the very latest 4.2 driver to the 2.2 kernel. The patch is against the 2.2.19-pre13 kernel plus yours 1221 ide patch.

This drivers breaks with my HP 8110 CD-R drive. It's sitting on primary slave of a Via 686B controler. When I try to do a hdparm -d1 -u1 -k1 /dev/hdb, the kernel locks up hard. Not even an oops. Reverting to the old driver works fine.

Don't do that. Use the kernel option to enable DMA instead.

Hmm, I'll have to look into this anyway - many users seem to do that and it isn't as harmless as it looks (it worked by pure luck with the previous version).

Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#3 lore raw
In reply to Vojtech Pavlik
Quoted 12 lines · Vojtech Pavlik
Quoted 9 lines · Shane Wegner
Quoted 3 lines

You wanted my VIA driver for 2.2. Here is a patch that brings the very latest 4.2 driver to the 2.2 kernel. The patch is against the 2.2.19-pre13 kernel plus yours 1221 ide patch.

This drivers breaks with my HP 8110 CD-R drive. It's sitting on primary slave of a Via 686B controler. When I try to do a hdparm -d1 -u1 -k1 /dev/hdb, the kernel locks up hard. Not even an oops. Reverting to the old driver works fine.

Quoted 5 lines

Don't do that. Use the kernel option to enable DMA instead.

Hmm, I'll have to look into this anyway - many users seem to do that and it isn't as harmless as it looks (it worked by pure luck with the previous version).

Ok, can I still use -u1 -k1 -c1 on the drives or is it even necessary anymore. Is the deprecation of -d1 VIA IDE specific or does it apply to the entire subsystem.

Signature · 5 lines
Shane Wegner: [email protected]
              http://www.cm.nu/~shane/
PGP:          1024D/FFE3035D
              A0ED DAC4 77EC D674 5487
              5B5C 4F89 9A4E FFE3 035D
#4 lore raw
In reply to Vojtech Pavlik
Quoted 13 lines · Shane Wegner
Quoted 12 lines · Vojtech Pavlik
Quoted 9 lines · Shane Wegner
Quoted 3 lines

You wanted my VIA driver for 2.2. Here is a patch that brings the very latest 4.2 driver to the 2.2 kernel. The patch is against the 2.2.19-pre13 kernel plus yours 1221 ide patch.

This drivers breaks with my HP 8110 CD-R drive. It's sitting on primary slave of a Via 686B controler. When I try to do a hdparm -d1 -u1 -k1 /dev/hdb, the kernel locks up hard. Not even an oops. Reverting to the old driver works fine.

Quoted 8 lines
Quoted 5 lines

Don't do that. Use the kernel option to enable DMA instead.

Hmm, I'll have to look into this anyway - many users seem to do that and it isn't as harmless as it looks (it worked by pure luck with the previous version).

Ok, can I still use -u1 -k1 -c1 on the drives or is it even necessary anymore.

If you enable automatic DMA in the kernel config, it isn't necessary at all. The VIA driver sets up everything.

Quoted 2 lines

Is the deprecation of -d1 VIA IDE
specific or does it apply to the entire subsystem.

Well, in my opinion it was always a potentially dangerous option and so it remains. I'll update the VIA driver to make sure its not dangerous at least with it anymore.

Scenario:

1) AutoDMA not enabled
2) VIA sets PIO mode on boot
3) User enables DMA -> IDE driver starts using dma
4) But VIA is still set to PIO mode

I'll have to make the VIA driver check when IDE dma is enabled, test whether the chipset was already programmed for it and program the chipset for it if needed.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#5 lore raw
In reply to Vojtech Pavlik
Quoted 1 line · Vojtech Pavlik

Don't do that. Use the kernel option to enable DMA instead.

You mean using hdparm can cause problems? Could you provide more details on the problems that could arise? I'm completely ignorant on the subject...

[]s, Roger...

Signature · 3 lines
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Rogerio Brito - [email protected] - http://www.ime.usp.br/~rbrito/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#6 lore raw
In reply to Vojtech Pavlik
Quoted 6 lines · Vojtech Pavlik
Quoted 2 lines · Shane Wegner

Ok, can I still use -u1 -k1 -c1 on the drives or is it even necessary anymore.

If you enable automatic DMA in the kernel config, it isn't necessary at all. The VIA driver sets up everything.

Ok. Please disregard my last message (this one contains exactly what I was looking for).

Quoted 1 line

4) But VIA is still set to PIO mode

Why does this happen?

And what about the other options to hdparm (-u1 -k1 -c1)? Are they potentially dangerous also?

[]s, Roger...

Signature · 3 lines
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Rogerio Brito - [email protected] - http://www.ime.usp.br/~rbrito/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#7 lore raw
In reply to Vojtech Pavlik
Quoted 11 lines · Rogerio Brito
Quoted 6 lines · Vojtech Pavlik
Quoted 2 lines · Shane Wegner

Ok, can I still use -u1 -k1 -c1 on the drives or is it even necessary anymore.

If you enable automatic DMA in the kernel config, it isn't necessary at all. The VIA driver sets up everything.

Ok. Please disregard my last message (this one contains exactly what I was looking for).

Quoted 6 lines
Quoted 1 line

4) But VIA is still set to PIO mode

Why does this happen?

And what about the other options to hdparm (-u1 -k1 -c1)? Are they potentially dangerous also?

Well, I checked today and my fears were *not* confirmed. Actually the VIA driver will set up the chipset for UDMA even when UDMA won't be later used, so it's all OK.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#8 lore raw
In reply to Vojtech Pavlik
Quoted 7 lines · Vojtech Pavlik
Quoted 6 lines · Shane Wegner
Quoted 5 lines · Vojtech Pavlik
Quoted 5 lines
Quoted 4 lines

You wanted my VIA driver for 2.2. Here is a patch that brings the very latest 4.2 driver to the 2.2 kernel. The patch is against the 2.2.19-pre13 kernel plus yours 1221 ide patch.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

This drivers breaks with my HP 8110 CD-R drive. It's sitting on primary slave of a Via 686B controler. When I try to do a hdparm -d1 -u1 -k1 /dev/hdb, the kernel locks up hard. Not even an oops. Reverting to the old driver works fine.

Don't do that. Use the kernel option to enable DMA instead.

Hi,

I have investigated this problem further. The hdparm triggers the error but is not the cause. hdparm accesses /dev/hdb which is my cd-r drive. This triggers the loading of the cdrom and ide-cd modules. Manually loading cdrom succeeds, after which, manually loading ide-cd crashes the system. No need to even open() the device. This works fine with the VIA driver from 2.2.19pre14+ide-2.2.18-1221.

Regards,
Shane

Signature · 5 lines
Shane Wegner: [email protected]
              http://www.cm.nu/~shane/
PGP:          1024D/FFE3035D
              A0ED DAC4 77EC D674 5487
              5B5C 4F89 9A4E FFE3 035D