Bug 5759 - ATIIXP driver does not detect some MDMA devices correctly
Summary: ATIIXP driver does not detect some MDMA devices correctly
Status: REJECTED INSUFFICIENT_DATA
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: IDE (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Bartlomiej Zolnierkiewicz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-19 10:20 UTC by Felix K
Modified: 2006-04-22 04:59 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.4.26
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Felix K 2005-12-19 10:20:39 UTC
Distribution: Red Hat 7.3

Problem Description:

TEAC DV-W28EA-559 DVD drive supports MWDMA but not UDMA. However on a ATI SB4xx
southbridge under Linux the controller treats the drive as a UDMA drive. So
reading from the drive fails.

Root cause investigation:

David Chen et.al. looked into the root cause of this problem and this is what
they found:

We understand the root cause right now.  The IDE driver for ATI SB is not
flexible enough according to the IDE spec.  Here is the root cause below:

 

Root cause:

 

Our SB IDE driver for Linux only reads the word 53 bit 2 from the IDE drive.  If
the bit 2 of word 53 is set to 1, then the driver will think the device is UDMA
device.  However, according to the spec, if the bit 2 of word 53 is set to 1,
the word 88 is valid.  The driver should read the word 88.  If the word 88 =
0000, the driver should set the transfer mode of the specific IDE controller
connected to the device to MWDMA.  But the driver is not doing this way.  It
only reads word 53 [2] to decide which mode should be set.  If the bit 2 of word
53 is set, it will set the transfer mode to UDMA mode.  If the bit is not set,
the MWDMA will be set.  

 

After updating the firmware (clearing the bit 2 of word 53 to 0), the transfer
mode setting of the 2nd IDE controller can be set correctly to MWDMA mode.

[...]

Here is the algorithm should be for the IDE driver:

==========================

Read the word 53 [2].

If word 53[2] = 0 set the device to PIO mode or MWDMA mode (needs to read word
63 in order to set correct MWDMA mode).

If word 53[2] = 1 

{

Read word 88.

If word 88 = 0000 set the device to MWDMA mode and go to read word 63.

Else set the device to the UDMA mode according to the setting in the word 88.

}

==========================

 

To HDD vendors, the word 53 [2] can be set or cleared if the device only
supports MWDMA.  The IDE driver needs to read word 88 in order to make the final
decision.
Comment 1 Bartlomiej Zolnierkiewicz 2005-12-20 10:02:22 UTC
AFAIK atiix driver in 2.6.x kernels does DMA mode selection exactly like
described above.  Please try to reproduce the problem with 2.6.14 or 2.6.15-rc6.

Obsoleted 2.4.x kernels are not supported (due to the lack of time and interest)
but if somebody provides a patch I will take a look at it.
Comment 2 Adrian Bunk 2006-04-22 04:59:05 UTC
I'm assuming this issue is already fixed in recent 2.6 kernels.

Please reopen this bug if it's still present in kernel 2.6.16.

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