Bug 1031

Summary: dvd-player on HPT302 fail with dma on
Product: IO/Storage Reporter: Eirik Thorsnes (eirik.thorsnes)
Component: IDEAssignee: Dominik Brodowski (linux)
Status: CLOSED INSUFFICIENT_DATA    
Severity: normal CC: alexn, herbert
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.1-1.63 (DJ at Fedora devel) Subsystem:
Regression: --- Bisected commit-id:
Attachments: dmesg for failure case, acpi on, ide-scsi on for OTHER drive
/proc/interupts for failure case, acpi on, ide-scsi on for other drive
dmesg for failure case - taken during mounting of drive, acpi and ide-scsi on
dmesg -s40000 during mount with dma on (kernel 2.6.1-1.63)
/proc/interupts for kernel 2.6.1-1.63
lsmod output for kernel 2.6.1-1.63

Description Eirik Thorsnes 2003-08-02 03:00:22 UTC
Distribution: Red Hat Linux 9 up2date + Arjan at Red Hat's kernel related packages

Hardware Environment: Mainboard: ASUS A7V333-X latest bios, Athlon XP2600, 1GB
DDR-RAM, SAMSUNG DVD-ROM SD-616Q, HighPoint 302 IDE controller

Problem Description: CD-ROM will not mount in drive - hangs, "hdparm /dev/hdg"
hangs and is unkillable

Steps to reproduce: Boot with acpi on, run hdparm on drive or try to mount a CDROM

Selected log entries and information:

[root@torso root]# cat /proc/version
Linux version 2.6.0-0.test2.1.28 (bhcompile@daffy.perf.redhat.com) (gcc
version 3.3 20030728 (Red Hat Linux 3.3-16)) #1 Wed Jul 30 06:26:59 EDT 2003

no disc in drive hdg (only drive on HPT302):

at startup:

Aug  1 22:27:57 torso kernel: HPT302: IDE controller at PCI slot 0000:00:0e.0
Aug  1 22:27:57 torso kernel: HPT302: chipset revision 1
Aug  1 22:27:57 torso kernel: HPT37X: using 33MHz PCI clock
Aug  1 22:27:57 torso kernel: HPT302: 100%% native mode on irq 10
Aug  1 22:27:57 torso kernel:     ide2: BM-DMA at 0xa800-0xa807, BIOS
settings: hde:pio, hdf:pio
Aug  1 22:27:57 torso kernel:     ide3: BM-DMA at 0xa808-0xa80f, BIOS
settings: hdg:pio, hdh:pio
Aug  1 22:27:57 torso kernel: hdg: SAMSUNG DVD-ROM SD-616Q, ATAPI CD/DVD-ROM
drive
Aug  1 22:27:57 torso kernel: hdg: set_drive_speed_status: status=0x51 {
DriveReady SeekComplete Error }
Aug  1 22:27:57 torso kernel: hdg: set_drive_speed_status: error=0x04

Aug  1 22:27:59 torso modprobe: FATAL: Module ide_probe_mod not found.

Aug  1 22:28:01 torso kernel: hdg: ATAPI 48X DVD-ROM drive, 512kB Cache

------
disc inserted:

Aug  1 23:26:07 torso kernel: hdg: status error: status=0x58 { DriveReady
SeekComplete DataRequest }
Aug  1 23:26:07 torso kernel: hdg: status error: error=0x00
Aug  1 23:26:07 torso kernel: hdg: drive not ready for command
Aug  1 23:26:07 torso kernel: hdg: status error: status=0x51 { DriveReady
SeekComplete Error }
Aug  1 23:26:07 torso kernel: hdg: status error: error=0x04Aborted Command
Aug  1 23:26:07 torso kernel: hdg: status error: status=0x58 { DriveReady
SeekComplete DataRequest }
Aug  1 23:26:07 torso kernel: hdg: status error: error=0x00
Aug  1 23:26:07 torso kernel: hdg: drive not ready for command
Aug  1 23:26:07 torso kernel: hdg: ATAPI reset complete

Aug  1 23:39:27 torso kernel: hdg: drive not ready for command
Aug  1 23:39:27 torso kernel: hdg: status error: status=0x48 { DriveReady
DataRequest }
Aug  1 23:39:27 torso kernel: hdg: status error: error=0x00
Aug  1 23:39:27 torso kernel: hdg: drive not ready for command
Aug  1 23:39:27 torso kernel: hdg: ATAPI reset complete
Aug  1 23:39:27 torso kernel: hdg: status error: status=0x48 { DriveReady
DataRequest }
Aug  1 23:39:27 torso kernel: hdg: status error: error=0x00
Aug  1 23:39:27 torso kernel: end_request: I/O error, dev hdg, sector 0
Aug  1 23:39:27 torso kernel: hdg: drive not ready for command
Aug  1 23:39:30 torso kernel: hdg: lost interrupt

------------------------
with hdg=nodma
at startup (no disc in drive):

Aug  2 10:20:45 torso kernel: HPT302: IDE controller at PCI slot 0000:00:0e.0
Aug  2 10:20:45 torso kernel: HPT302: chipset revision 1
Aug  2 10:20:45 torso kernel: HPT37X: using 33MHz PCI clock
Aug  2 10:20:45 torso kernel: HPT302: 100%% native mode on irq 10
Aug  2 10:20:45 torso kernel:     ide2: BM-DMA at 0xa800-0xa807, BIOS
settings: hde:pio, hdf:pio
Aug  2 10:20:45 torso kernel:     ide3: BM-DMA at 0xa808-0xa80f, BIOS
settings: hdg:pio, hdh:pio
Aug  2 10:20:45 torso kernel: hdg: SAMSUNG DVD-ROM SD-616Q, ATAPI CD/DVD-ROM
drive
Aug  2 10:20:45 torso kernel: hdg: set_drive_speed_status: status=0x51 {
DriveReady SeekComplete Error }
Aug  2 10:20:45 torso kernel: hdg: set_drive_speed_status: error=0x04

Aug  2 10:20:46 torso kernel: hdg: ATAPI 48X DVD-ROM drive, 512kB Cache

Aug  2 10:21:22 torso kernel: end_request: I/O error, dev hdg, sector 0
Aug  2 10:21:29 torso last message repeated 10 times
-------
[root@torso root]# hdparm -i /dev/hdg

/dev/hdg:

 Model=SAMSUNG DVD-ROM SD-616Q, FwRev=F401, 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
 UDMA modes: udma0 udma1 udma2
 AdvancedPM=no
------
[root@torso root]# cat /proc/ide/hdg/settings
name                    value           min             max             mode
----                    -----           ---             ---             ----
current_speed           0               0               70              rw
dsc_overlap             0               0               1               rw
ide-scsi                0               0               1               rw
init_speed              0               0               70              rw
io_32bit                0               0               3               rw
keepsettings            0               0               1               rw
nice1                   1               0               1               rw
number                  2               0               3               rw
pio_mode                write-only      0               255             w
slow                    0               0               1               rw
unmaskirq               0               0               1               rw
using_dma               0               0               1               rw
------
[root@torso root]# cat /proc/ide/hpt366
                             HighPoint HPT366/368/370/372/374
Controller: 0
Chipset: HPT302
--------------- Primary Channel --------------- Secondary Channel
Enabled:        yes                             yes
Cable:          ATA-66                          ATA-66

--------------- drive0 --------- drive1 ------- drive0 ---------- drive1
DMA capable:    no               no             no                no
Mode:           off              off            off               off
------[root@torso root]# hdparm /dev/hdg

no output,hdparm is unkillable and this is in dmesg:

hdg: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdg: status error: error=0x00
hdg: drive not ready for command
hdg: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdg: status error: error=0x00
hdg: drive not ready for command
hdg: lost interrupt
cdrom_pc_intr, write: dev hdg: flags = REQ_STARTED REQ_PC REQ_QUIET
sector 0, nr/cnr 0/0
bio 00000000, biotail 00000000, buffer 00000000, data 00000000, len 0
cdb: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
hdg: cdrom_pc_intr: The drive appears confused (ireason = 0x00)
hdg: lost interrupt
cdrom_pc_intr, write: dev hdg: flags = REQ_STARTED REQ_PC REQ_FAILED REQ_QUIET
sector 0, nr/cnr 0/0
bio 00000000, biotail 00000000, buffer 00000000, data 00000000, len 0
cdb: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
hdg: cdrom_pc_intr: The drive appears confused (ireason = 0x00)
hdg: lost interrupt

-------------------------------
with hdg=nodma acpi=off
OR only acpi=off
at startup, no disc in drive

Aug  2 10:43:16 torso kernel: HPT302: IDE controller at PCI slot 0000:00:0e.0
Aug  2 10:43:16 torso kernel: PCI: Found IRQ 10 for device 0000:00:0e.0
Aug  2 10:43:16 torso kernel: HPT302: chipset revision 1
Aug  2 10:43:16 torso kernel: HPT37X: using 33MHz PCI clock
Aug  2 10:43:17 torso kernel: HPT302: 100%% native mode on irq 10
Aug  2 10:43:17 torso kernel:     ide3: BM-DMA at 0xa808-0xa80f, BIOS
settings: hdg:pio, hdh:pio
Aug  2 10:43:17 torso kernel: hdg: SAMSUNG DVD-ROM SD-616Q, ATAPI CD/DVD-ROM
drive
Aug  2 10:43:17 torso kernel: hdg: set_drive_speed_status: status=0x51 {
DriveReady SeekComplete Error }
Aug  2 10:43:17 torso kernel: hdg: set_drive_speed_status: error=0x04

Aug  2 10:43:19 torso modprobe: FATAL: Module ide_probe_mod not found.

Aug  2 10:43:22 torso kernel: hdg: ATAPI 48X DVD-ROM drive, 512kB Cache
Aug  2 10:43:22 torso kernel: Uniform CD-ROM driver Revision: 3.12
-----
root@torso root]# hdparm /dev/hdg

/dev/hdg:
 HDIO_GET_MULTCOUNT failed: Invalid argument
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  1 (on)
 readahead    = 256 (on)
 HDIO_GETGEO failed: Invalid argument
----
inserts disc --- mounts OK
Comment 1 Len Brown 2003-09-08 11:25:20 UTC
it is working with acpi=off, but failing without it?
can you attach the output of "dmesg -s40000" and "cat /proc/interrupts" from 
the failure case?
Comment 2 Eirik Thorsnes 2003-09-08 15:58:08 UTC
Created attachment 839 [details]
dmesg for failure case, acpi on, ide-scsi on for OTHER drive

Failure appears when acpi is on. If ide-scsi is NOT loaded - I only get "no
valid block device" on mount. If ide-scsi IS loaded (but for a another
interface) I get hang on mount.
Comment 3 Eirik Thorsnes 2003-09-08 15:59:25 UTC
Created attachment 840 [details]
/proc/interupts for failure case, acpi on, ide-scsi on for other drive
Comment 4 Eirik Thorsnes 2003-09-08 16:06:53 UTC
Created attachment 841 [details]
dmesg for failure case - taken during mounting of drive, acpi and ide-scsi on
Comment 5 Eirik Thorsnes 2003-09-08 16:12:17 UTC
2.6-test4 seems to mount ok with acpi=on and ide-scsi loaded, but I have not
tested this much yet.
Comment 6 Len Brown 2004-01-14 10:04:13 UTC
If you boot with acpi=off, does the failure go away?
If yes, go ahead and upate the category/component to power-management/ACPI.
If no, please remove "ACPI" from the Summary.

thanks,
-Len
Comment 7 Eirik Thorsnes 2004-02-04 07:34:37 UTC
Changed kernel version to 2.6.1-1.63 (Fedora development kernel).
Changed summary s/acpi/dma/ 

With this kernel the dvd mounts ok as long as dma is off 
(that is, acpi no longer has any effect).
The drive (/dev/hdg in the new dmesg attachment) starts up without dma.
If dma is activated with hdparm, and the drive is mounted the mount process
hangs and is unkillable with kill -9.
See new dmesg attachment

/proc/version :
Linux version 2.6.1-1.63 (bhcompile@bugs.devel.redhat.com) (gcc version 3.3.2
20040119 (Red Hat Linux 3.3.2-8)) #1 Thu Jan 29 11:58:52 EST 2004
Comment 8 Eirik Thorsnes 2004-02-04 07:37:46 UTC
Created attachment 2006 [details]
dmesg -s40000 during mount with dma on (kernel 2.6.1-1.63)
Comment 9 Eirik Thorsnes 2004-02-04 07:39:07 UTC
Created attachment 2007 [details]
/proc/interupts for kernel 2.6.1-1.63
Comment 10 Eirik Thorsnes 2004-02-04 07:40:19 UTC
Created attachment 2008 [details]
lsmod output for kernel 2.6.1-1.63
Comment 11 Herbert Xu 2004-05-13 03:10:35 UTC
This bug appears to be the same issue as http://bugs.debian.org/230755.

The latter also involves a PDC302 adapter where DMA fails, but the devices are
hard drives rather than CD-ROMs.  The submitter has tried drives of different
makes as well as different 80-pin cables.

Disabling DMA makes the drives work while displaying seemingly harmless
set_speed errors exactly like those listed here.
Comment 12 Alexander Nyberg 2004-12-09 05:03:05 UTC
Has this bug been resolved? 7 months since last update.
Comment 13 Eirik Thorsnes 2004-12-09 10:04:11 UTC
I have not tested this lately as I no longer use this hardware (I have the card
laying around still though).
Comment 14 Dominik Brodowski 2005-11-16 14:26:59 UTC
Closing with INSUFFICIENT_DATA, as bug reporter no longer owns the hardware
affected by this bug, and nobody else complained.