On Mon, Jan 03, 2011 at 02:45:47PM +0100, Roman Fietze wrote:
Hello,
When merging more recent kernel versions, tried that using v2.6.35 and
v2.6.36, into our tree (branched at v2.6.34), I detected, that MWDMA2
on the HW listed in the subject does no longer work.
So I bisected that using the original, standard kernel tree using a
minimum config using
git bisect start v2.6.35 v2.6.34
The final result is:
360ff7833098e944e5003618b03894251e937802 is the first bad commit
commit 360ff7833098e944e5003618b03894251e937802
Author: Tejun Heo [off-list ref]
Date: Mon May 10 21:41:42 2010 +0200
libata-sff: separate out BMDMA qc_issue
...
I double checked the failure with the latest torvalds/master as well
(b518a64983cbf2ff31), still the same issue.
The HW is an own board very close to the original Freescale
Lite5200/Lite5200B. The relevant part of the device tree source file
contains "mwdma-mode = <2>;" inside the ata section.
In the bad case the log always shows (the exact drive or drive type
doesn't matter, double checked):
[ 1.553501] ata1.00: ATA-5: HEJ423020F9AT00, 00MJA0A0, max UDMA/100
[ 1.560003] ata1.00: 39070080 sectors, multi 0: LBA
[ 1.581418] ata1.00: configured for MWDMA2
[ 1.586644] scsi 0:0:0:0: Direct-Access ATA HEJ423020F9AT00 00MJ PQ: 0 ANSI: 5
[ 1.597831] sd 0:0:0:0: [sda] 39070080 512-byte logical blocks: (20.0 GB/18.6 GiB)
[ 1.606876] sd 0:0:0:0: [sda] Write Protect is off
[ 1.611907] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 1.617627] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.629423] sda:
[ 1.631702] ------------[ cut here ]------------
[ 1.636613] Badness at /home/fietze/src/linux-2.6-telemotive/drivers/ata/libata-sff.c:1466
[ 1.645047] NIP: c01ae650 LR: c01ae624 CTR: c01accbc
[ 1.650115] REGS: c7955b30 TRAP: 0700 Not tainted (2.6.34-rc7-obelix)
[ 1.656948] MSR: 00021032 <ME,CE,IR,DR> CR: 24008084 XER: 00000000
[ 1.663452] TASK = c78f2490[784] 'async/0' THREAD: c7954000
[ 1.668957] GPR00: 00000001 c7955be0 c78f2490 00000050 c904aa78 00000001 00000000 00000000
[ 1.677497] GPR08: 00000000 c034ee50 00000000 00000000 44008082 1001a7f0 c7955f68 07fb2938
[ 1.686037] GPR16: c78a8000 07fb2914 07f3f64c c0340000 c031ed00 c78a8000 00000000 c0010adc
[ 1.694577] GPR24: c7842820 00000002 c7949428 c7948000 00000003 00000000 c7948000 c794809c
[ 1.703321] NIP [c01ae650] ata_sff_qc_issue+0x74/0x248
[ 1.708564] LR [c01ae624] ata_sff_qc_issue+0x48/0x248
[ 1.713712] Call Trace:
[ 1.716211] [c7955be0] [c01ae624] ata_sff_qc_issue+0x48/0x248 (unreliable)
Which driver is it? You probably now want to use ata_bmdma_qc_issue()
instead of ata_sff_qc_issue() (or inherit from ata_bmdma_port_ops
instead of ata_sff_port_ops) as sff doesn't deal with BMDMA anymore.
The commit you bisected to contains all those conversions too. Take a
look at a similar driver and look at how it has been converted
recently. Even better, just send the driver upstream. :-)
Good luck.
--
tejun
From: Sergei Shtylyov <hidden> Date: 2011-01-03 14:30:50
Hello.
On 03-01-2011 16:59, Tejun Heo wrote:
quoted
When merging more recent kernel versions, tried that using v2.6.35 and
v2.6.36, into our tree (branched at v2.6.34), I detected, that MWDMA2
on the HW listed in the subject does no longer work.
quoted
So I bisected that using the original, standard kernel tree using a
minimum config using
quoted
git bisect start v2.6.35 v2.6.34
quoted
The final result is:
quoted
360ff7833098e944e5003618b03894251e937802 is the first bad commit
commit 360ff7833098e944e5003618b03894251e937802
Author: Tejun Heo[off-list ref]
Date: Mon May 10 21:41:42 2010 +0200
quoted
libata-sff: separate out BMDMA qc_issue
quoted
...
quoted
I double checked the failure with the latest torvalds/master as well
(b518a64983cbf2ff31), still the same issue.
quoted
The HW is an own board very close to the original Freescale
Lite5200/Lite5200B. The relevant part of the device tree source file
contains "mwdma-mode =<2>;" inside the ata section.
quoted
In the bad case the log always shows (the exact drive or drive type
doesn't matter, double checked):
You probably now want to use ata_bmdma_qc_issue()
instead of ata_sff_qc_issue() (or inherit from ata_bmdma_port_ops
instead of ata_sff_port_ops) as sff doesn't deal with BMDMA anymore.
Indeed, the driver inherits from 'ata_sff_port_ops'...
The commit you bisected to contains all those conversions too. Take a
look at a similar driver and look at how it has been converted
recently. Even better, just send the driver upstream. :-)
On Mon, Jan 3, 2011 at 3:29 PM, Sergei Shtylyov [off-list ref] wrot=
e:
quoted
The commit you bisected to contains all those conversions too. =A0Take a
look at a similar driver and look at how it has been converted
recently. =A0Even better, just send the driver upstream. =A0:-)
=A0 It's already there...
Ouch, did I forget to convert it or was it a merge timing problem?
Anyways, sorry about that. Please go ahead and fix it. :-)
--=20
tejun
From: Roman Fietze <hidden> Date: 2011-01-03 14:34:19
Hallo Tejun,
On Monday, 03.January.2011 14:59:29 Tejun Heo wrote:
Which driver is it?
drivers/ata/pata_mpc52xx.c from the standard tree, 100% unchanged. As
I said, for the bisect I was using the original, unchanged
torvalds/master tree from git.kernel.org.
You probably now want to use ata_bmdma_qc_issue() ...
I'm sorry, but if I would know about the details, and would know more
about ATA I would have tried to patch pata_mpc52xx.c by myself.
Even better, just send the driver upstream.
It has been there for a long while. You even patched it last summer.
Roman
--
Roman Fietze Telemotive AG Buero Muehlhausen
Breitwiesen 73347 Muehlhausen
Tel.: +49(0)7335/18493-45 http://www.telemotive.de
From: Sergei Shtylyov <hidden> Date: 2011-01-03 15:28:52
Hello.
On 03-01-2011 17:33, Tejun Heo wrote:
quoted
quoted
The commit you bisected to contains all those conversions too. Take a
look at a similar driver and look at how it has been converted
recently. Even better, just send the driver upstream. :-)
From: Sergei Shtylyov <hidden> Date: 2011-01-03 16:34:25
Hello.
On 03-01-2011 18:27, Sergei Shtylyov wrote:
quoted
quoted
quoted
The commit you bisected to contains all those conversions too. Take a
look at a similar driver and look at how it has been converted
recently. Even better, just send the driver upstream. :-)
quoted
quoted
It's already there...
quoted
Ouch, did I forget to convert
It probably wasn't obvious as this driver had lived in non-BMDMA section of
Kconfig before the recent patch:
From: Roman Fietze <hidden> Date: 2011-01-10 07:26:41
Hello Tejun,
On Sunday, 09.January.2011 23:48:20 Tejun Heo wrote:
Fix it.
I can confirm that, it's fixed.
Thank's a lot. Should have looked into it, that was really a simple
fix.
Roman
--
Roman Fietze Telemotive AG Buero Muehlhausen
Breitwiesen 73347 Muehlhausen
Tel.: +49(0)7335/18493-45 http://www.telemotive.de
From: Jeff Garzik <hidden> Date: 2011-01-19 01:00:34
On 01/09/2011 05:48 PM, Tejun Heo wrote:
quoted hunk
pata_mpc52xx supports BMDMA but inherits ata_sff_port_ops which
triggers BUG_ON() when a DMA command is issued. Fix it.
Signed-off-by: Tejun Heo<tj@kernel.org>
Reported-by: Roman Fietze<redacted>
Cc: Sergei Shtylyov<redacted>
Cc: stable@kernel.org
---
drivers/ata/pata_mpc52xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)