Bug 62384 - Broken VIA266A DVDrom support
Summary: Broken VIA266A DVDrom support
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-03-30 23:21 UTC by Artem Veremey
Modified: 2008-08-01 16:22 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-30 15:39:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Artem Veremey 2002-03-30 23:21:15 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020314

Description of problem:
I have a Hitachi DVD-ROM that works flawlessly under RedHat 7.2.
In Skipjack I am constatly getting read errors from the drive.

Here are the settings on the drive (set by system):
/sbin/hdparm -I /dev/hdc

/dev/hdc:

ATAPI CD-ROM, with removable media
        Model Number:           HITACHI DVD-ROM GD-7500                 
        Serial Number:                              
        Firmware Revision:      0005    
Standards:
Configuration:
        DRQ response: 50us.
        Packet size: 12 bytes
Capabilities:
        LBA, IORDY(can be disabled)
        DMA: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 *udma2 
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4 
             Cycle time: no flow control=120ns  IORDY flow control=120ns

/sbin/hdparm -v /dev/hdc

/dev/hdc:
 HDIO_GET_MULTCOUNT failed: Invalid argument
 I/O support  =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 HDIO_GET_NOWERR failed: Invalid argument
 readonly     =  1 (on)
 readahead    =  8 (on)
 HDIO_GETGEO failed: Invalid argument
 busstate     =  1 (on)

And the errors I am recieving look like this:
Mar 30 10:49:18 bud kernel: hdc: cdrom_decode_status: status=0x51 { DriveReady
SeekComplete Error }
Mar 30 10:49:18 bud kernel: hdc: cdrom_decode_status: error=0x34
Mar 30 10:49:19 bud kernel: hdc: cdrom_decode_status: status=0x51 { DriveReady
SeekComplete Error }

If I turn scsi-ide support they look like this:
Mar 30 02:59:15 bud kernel: Info fld=0x39272, Current sd0b:00: sense key Medium
Error
Mar 30 02:59:15 bud kernel: Additional sense indicates Unrecovered read error
Mar 30 02:59:15 bud kernel:  I/O error: dev 0b:00, sector 936392
Mar 30 02:59:16 bud kernel: scsi0: ERROR on channel 0, id 0, lun 0, CDB: Request
Sense 00 00 00 40 00

I also couldn't install Skipjack from this DVDrom (my CDRW worked though).
Installation failed attempting to load kernel.


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


How reproducible:
Always

Steps to Reproduce:
1. Mount a media in DVDrom
2. Start copy from DVDrom to the disk
3. Watch errors.
	

Additional info:

Comment 1 Artem Veremey 2002-03-31 17:54:57 UTC
I have tried a different DVDrom otherwise working with the same results:

hdparm -I /dev/hdc

/dev/hdc:

ATAPI CD-ROM, with removable media
	Model Number:		DVD-ROM BDV212B                         
	Serial Number:		MT1318  Firmware    
	Firmware Revision:	VER 0.36
Standards:
	Used: ATAPI for CD-ROMs, SFF-8020i, r2.5
	Supported: CD-ROM ATAPI-2 
Configuration:
	DRQ response: 50us.
	Packet size: 12 bytes
Capabilities:
	LBA, IORDY(cannot be disabled)
	DMA: mdma0 mdma1 *mdma2 udma0 udma1 udma2 
	     Cycle time: min=120ns recommended=150ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=227ns  IORDY flow control=120ns


Mar 31 09:01:30 bud kernel: hdc: cdrom_decode_status: status=0x51 { DriveReady
SeekComplete Error }
Mar 31 09:01:30 bud kernel: hdc: cdrom_decode_status: error=0x40
Mar 31 09:02:34 bud kernel: hdc: cdrom_decode_status: status=0x51 { DriveReady
SeekComplete Error }
Mar 31 09:02:34 bud kernel: hdc: cdrom_decode_status: error=0x40
Mar 31 09:02:39 bud kernel: hdc: cdrom_decode_status: status=0x51 { DriveReady
SeekComplete Error }
Mar 31 09:02:39 bud kernel: hdc: cdrom_decode_status: error=0x40
Mar 31 09:02:45 bud kernel: hdc: cdrom_decode_status: status=0x51 { DriveReady
SeekComplete Error }
Mar 31 09:02:45 bud kernel: hdc: cdrom_decode_status: error=0x40
Mar 31 09:02:50 bud kernel: hdc: cdrom_decode_status: status=0x51 { DriveReady
SeekComplete Error }
Mar 31 09:02:50 bud kernel: hdc: cdrom_decode_status: error=0x40
Mar 31 09:02:50 bud kernel: hdc: ATAPI reset complete

Now it looks like a VIA266A support problem for DVDrom devices.

I run this on Epox 8KHA+ motherboard:
00:00.0 Host bridge: VIA Technologies, Inc. VT8367 [KT266]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8367 [KT266 AGP]
00:11.0 ISA bridge: VIA Technologies, Inc. VT8233 PCI to ISA Bridge
00:11.1 IDE interface: VIA Technologies, Inc. Bus Master IDE (rev 06)
00:11.2 USB Controller: VIA Technologies, Inc. UHCI USB (rev 1b)
00:11.3 USB Controller: VIA Technologies, Inc. UHCI USB (rev 1b)
00:11.4 USB Controller: VIA Technologies, Inc. UHCI USB (rev 1b)

In BIOS it has a "Disable UDMA on CDROMs" setting which for some reson gets
ignored by the kernel. Disabling UDMA on DVDrom channel doesn't help.

Comment 2 Arjan van de Ven 2002-03-31 18:13:26 UTC
Do you have any of the following running:
1) smartd
2) autorun
3) magicdev 
?

Comment 3 Artem Veremey 2002-03-31 23:16:39 UTC
smartd, autorun or magicdev are not running.

I found this thread on LKML:
http://groups.google.com/groups?hl=en&threadm=linux.kernel.3C336A6C.493BFD27%40i.am&rnum=16&prev=/groups%3Fq%3Dcdrom_decode_status:%2Bstatus%253D0x51%26start%3D10%26hl%3Den%26selm%3Dlinux.kernel.3C336A6C.493BFD27%2540i.am%26rnum%3D16

I also have CDRW on that computer working fine with the same CDs that give
errors on DVDroms.

/dev/hdd:

 Model=20X10, FwRev=H.BK, SerialNo=
 Config={ Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=DualPortCache, BuffSize=1024kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes: pio0 pio1 pio2 pio3 pio4 
 DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 *mdma2 
 AdvancedPM=no

Comment 4 Alan Cox 2002-04-02 00:04:38 UTC
Unrecovered read error is a message from the device itself saying "Sorry I
couldn't read the disk". DVD drives having trouble reading CD-R and CD-RW media
is not uncommon and apparently relates to the laser wavelength used

The BIOS DMA disable is ignored because its not something we can access sanely
and its really there for DOS and old old windows only. Linux has its own IDE DMA
control - in fact you can do hdparm -d0 /dev/hdc and try the disk with it off
(0) and on (1) if you want to see hwo it behaves


Comment 5 Artem Veremey 2002-04-02 04:14:54 UTC
I had a chance to play with IDE settings for DVD drive today with some very
interesting results.
Right after boot there are no DMA settings on the drive:
hdparm -i /dev/hdc

/dev/hdc:

 Model=HITACHI DVD-ROM GD-7500, FwRev=0005, SerialNo=
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes: pio0 pio1 pio2 pio3 pio4 
 DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 udma2 
 AdvancedPM=no

I don't understand what absence of mode stetting means.
hdparm -I shows UDMA2 mode in use
hdparm -I /dev/hdc

/dev/hdc:

ATAPI CD-ROM, with removable media
        Model Number:           HITACHI DVD-ROM GD-7500                 
        Serial Number:                              
        Firmware Revision:      0005    
Standards:
Configuration:
        DRQ response: 50us.
        Packet size: 12 bytes
Capabilities:
        LBA, IORDY(can be disabled)
        DMA: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 *udma2 
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4 
             Cycle time: no flow control=120ns  IORDY flow control=120ns

DMA cannot be set on the drive:
hdparm -d1 /dev/hdc

/dev/hdc:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)

Setting transfer mode -X33 actually works, but actually sets multiword 1
hdparm -X33 /dev/hdc

/dev/hdc:
 setting xfermode to 33 (multiword DMA mode1)
hdparm -i /dev/hdc

/dev/hdc:

 Model=HITACHI DVD-ROM GD-7500, FwRev=0005, SerialNo=
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes: pio0 pio1 pio2 pio3 pio4 
 DMA modes: sdma0 sdma1 sdma2 mdma0 *mdma1 mdma2 udma0 udma1 udma2 
 AdvancedPM=no

Attempt to copy from DVD drive to the disk results in 100% CPU usage: 
  8:03pm  up 22 min,  2 users,  load average: 1.11, 0.33, 0.11
63 processes: 61 sleeping, 2 running, 0 zombie, 0 stopped
CPU states:  0.5% user, 91.5% system,  0.0% nice,  7.9% idle
Mem:   514796K av,  506488K used,    8308K free,       0K shrd,   12512K buff
Swap:  530104K av,       0K used,  530104K free                  432768K cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 1516 root      15   0   564  564   464 R     9.2  0.1   0:03 cp

But no errors observed!

Setting transfer mode to -X66 also works:
hdparm -X66 /dev/hdc

/dev/hdc:
 setting xfermode to 66 (UltraDMA mode2)

Now hdparm -i also shows UDMA mode2
hdparm -i /dev/hdc

/dev/hdc:

 Model=HITACHI DVD-ROM GD-7500, FwRev=0005, SerialNo=
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes: pio0 pio1 pio2 pio3 pio4 
 DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 *udma2 
 AdvancedPM=no

But hdparm -v still does not indicate that DMA is used!
hdparm -v /dev/hdc

/dev/hdc:
 HDIO_GET_MULTCOUNT failed: Invalid argument
 I/O support  =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 HDIO_GET_NOWERR failed: Invalid argument
 readonly     =  1 (on)
 readahead    =  8 (on)
 HDIO_GETGEO failed: Invalid argument
 busstate     =  1 (on)

Copying content from DVD drive still results in 70%-100% cpu usage:
  8:10pm  up 28 min,  2 users,  load average: 0.53, 0.36, 0.21
64 processes: 61 sleeping, 3 running, 0 zombie, 0 stopped
CPU states:  0.5% user, 69.9% system,  0.0% nice, 29.4% idle
Mem:   514796K av,  411364K used,  103432K free,       0K shrd,   13724K buff
Swap:  530104K av,       0K used,  530104K free                  341864K cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 1564 root      16   0   564  564   464 R     3.7  0.1   0:01 cp

No kernel error though.

Something doesn't look about all this...

Comment 6 Artem Veremey 2002-04-02 04:26:47 UTC
Pardon my spelling :)

Comment 7 Bugzilla owner 2004-09-30 15:39:28 UTC
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem
persists.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/



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