Linux 2.6.22-rc4 - sata_promise regression since -rc3
Subsystems (2)
Quoted 14 lines · David Greaves
[Tejun, Jeff, added you since the bisect points to your patch.]
Sorry, mail glitch means I lost a couple of emails...
I said:
Compile warnings and a new regression: hang on boot duringsata_promisedetection...It turns out that the hang times out; it does boot after a while. It's missing 4 of my SATA disks though.
[in turn this means I can't test the hibernate regression against -rc4. But testing that regression againsta862b5c8cd5d847779a049a5fc8cf5b1e6f5fa07shows it is still there. Do I get a bonus for finding 2 regressions?]]
Quoted 5 lines
I also bisected and got:
Bisecting: 0 revisions left to test after this [464cf177df7727efcc5506322fc5d0c8b896f545] libata: always use polling SETXFERAccording to marc, Mikail said:
That's Mikael, not Mikail.
Quoted 16 lines
Please give us some details about your
sata_promiseproblem:
- describe your hardware (Promise chip version, mainboard, chipset, etc) I have a Promise TX-4 and onboard via-sata.
0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400/KT600 AGP] Host Bridge (rev 80)
0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge 0000:00:0d.0 Unknown mass storage controller: Promise Technology, Inc. PDC20318 (SATA150 TX4) (rev 02)
0000:00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)- which was the last kernel version prior to 2.6.22-rc4 that worked 2.6.22-rc3
- the kernel messages up to the hang, if you can capture them Easier once I learned patience...
Quoted 16 lines
sata_promise0000:00:0d.0: version 2.07
ACPI: PCI Interrupt 0000:00:0d.0[A] -> GSI 16 (level, low) -> IRQ 17 scsi0 :sata_promise
scsi1 :sata_promise
scsi2 :sata_promise
scsi3 :sata_promise
ata1: SATA max UDMA/133 cmd0xf880a200ctl0xf880a238bmdma0x00000000irq 0
ata2: SATA max UDMA/133 cmd0xf880a280ctl0xf880a2b8bmdma0x00000000irq 0
ata3: SATA max UDMA/133 cmd0xf880a300ctl0xf880a338bmdma0x00000000irq 0
ata4: SATA max UDMA/133 cmd0xf880a380ctl0xf880a3b8bmdma0x00000000irq 0
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00:ata_hpa_resize1: sectors = 490234752,hpa_sectors= 490234752 ata1.00: ATA-7: Maxtor 6B250S0, BANC19J0, max UDMA/133
ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (depth 0/32) ata1.00: qc timeout (cmd0xef)
ata1.00: failed to set xfermode (err_mask=0x4)
http://bugzilla.kernel.org/show_bug.cgi?id=8587 has a similar
report: it lists 2.6.22-rc3-git7 as OK but 2.6.22-rc4 as broken.
I can easily reproduce the problem in 2.6.22-rc4. There are no sata_promise changes between rc3 and rc4, but Tejun's libata polling SETXFER change was included in rc4. Reverting it makes sata_promise work again for me.
I suspect that sata_promise.c:pdc_interrupt() should detect a qc w/ ATA_TFLAG_POLLING, treat the interrupt as spurious, and just call ata_chk_status(qc), similar to how sata_inic162x.c, sata_nv.c, sata_sil.c, and sata_vsc.c do things.
Jeff/Tejun: comments?
/Mikael
Quoted 4 lines · Mikael Pettersson
I can easily reproduce the problem in 2.6.22-rc4. There are no
sata_promisechanges between rc3 and rc4, but Tejun's libata polling SETXFER change was included in rc4. Reverting it makessata_promisework again for me.
Ugh.
Quoted 4 lines
I suspect that sata_promise.c:pdc_interrupt() should detect a qc w/
ATA_TFLAG_POLLING, treat the interrupt as spurious, and just callata_chk_status(qc), similar to howsata_inic162x.c,sata_nv.c,sata_sil.c, andsata_vsc.cdo things.
Yes, highly likely.
SFF-like controllers (and in this case, Promise is included in that list) with their own interrupt handlers need their own polling handling code.
Jeff
Quoted 7 lines · Jeff Garzik
Quoted 4 lines · Mikael Pettersson
I can easily reproduce the problem in 2.6.22-rc4. There are no
sata_promisechanges between rc3 and rc4, but Tejun's libata polling SETXFER change was included in rc4. Reverting it makessata_promisework again for me.Ugh.
Reverting Tejun's patch also fixed my boot failure.
00:08.0 RAID bus controller: Promise Technology, Inc. PDC20376 (FastTrak 376) (rev 02)
Subsystem: ASUSTeK Computer Inc. A7V8X motherboard
Flags: bus master, 66MHz, medium devsel, latency 96, IRQ 16
I/O ports at d400 [size=64]
I/O ports at d000 [size=16]
I/O ports at b800 [size=128]
Memory at f6800000 (32-bit, non-prefetchable) [size=4K]
Memory at f6000000 (32-bit, non-prefetchable) [size=128K]
Capabilities: [60] Power Management version 200:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06) (prog-if
8a [Master SecP PriP])
Subsystem: ASUSTeK Computer Inc. A7V8X / A7V333 motherboard
Flags: bus master, medium devsel, latency 32, IRQ 255
[virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]
[virtual] Memory at 000003f0 (type 3, non-prefetchable) [size=1]
[virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]
[virtual] Memory at 00000370 (type 3, non-prefetchable) [size=1]
I/O ports at a400 [size=16]
Capabilities: [c0] Power Management version 2The problem is that the controller can't be initialized properly, so the kernel keeps trying every 5 seconds. I gave up after about five failures. If the actual boot error messages would help I'll need to copy them by hand -- just say the word.
Hello,
Quoted 7 lines · Jeff Garzik
Quoted 4 lines · Mikael Pettersson
I can easily reproduce the problem in 2.6.22-rc4. There are no
sata_promisechanges between rc3 and rc4, but Tejun's libata polling SETXFER change was included in rc4. Reverting it makessata_promisework again for me.Ugh.
Ugh...
Quoted 6 lines
Quoted 4 lines
I suspect that sata_promise.c:pdc_interrupt() should detect a qc w/
ATA_TFLAG_POLLING, treat the interrupt as spurious, and just callata_chk_status(qc), similar to howsata_inic162x.c,sata_nv.c,sata_sil.c, andsata_vsc.cdo things.Yes, highly likely.
I'm not sure whether that will work. I'll give a shot at it here.
Quoted 3 lines
SFF-like controllers (and in this case, Promise is included in that list) with their own interrupt handlers need their own polling handling code.
One thing I don't understand is why IDENTIFY works. IDENTIFY uses polling too. Hmm...
Signature · 1 line
tejun
PATCH 1/1 sata_promise: use TF interface for polling NODATA commands
sata_promise uses two different command modes - packet and TF. Packet mode is intelligent low-overhead mode while TF is the same old taskfile interface. As with other advanced interface (ahci/sil24), ATA_TFLAG_POLLING has no effect in packet mode. However, PIO commands are issued using TF interface in polling mode, so pdc_interrupt() considers interrupts spurious if ATA_TFLAG_POLLING is set.
This is broken for polling NODATA commands because command is issued using packet mode but the interrupt handler ignores it due to ATA_TFLAG_POLLING. Fix pdc_qc_issue_prot() such that ATA/ATAPI NODATA commands are issued using TF interface if ATA_TFLAG_POLLING is set.
This patch fixes detection failure introduced by polling SETXFERMODE.
---
David, please verify this patch. Mikael, does this look okay? Please push this upstream after David and Mikael's ack.
(This repost is identical to the previous posting but it's now on the
correct thread.)
Thanks.
drivers/ata/sata_promise.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/ata/sata_promise.c +6 -3
@@ -784,9 +784,12 @@ static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc)if (qc->dev->flags &ATA_DFLAG_CDB_INTR )break ;/*FALLTHROUGH*/ +case ATA_PROT_NODATA : +if (qc->tf.flags &ATA_TFLAG_POLLING ) +break ; +/*FALLTHROUGH*/ case ATA_PROT_ATAPI_DMA :case ATA_PROT_DMA : -case ATA_PROT_NODATA :pdc_packet_start (qc);return 0 ;
@@ -800,7 +803,7 @@ static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc)static void pdc_tf_load_mmio (struct ata_port *ap,const struct ata_taskfile *tf) {WARN_ON (tf->protocol ==ATA_PROT_DMA || - tf->protocol ==ATA_PROT_NODATA ); + tf->protocol ==ATA_PROT_ATAPI_DMA );ata_tf_load (ap, tf); }
@@ -808,7 +811,7 @@ static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf)static void pdc_exec_command_mmio (struct ata_port *ap,const struct ata_taskfile *tf) {WARN_ON (tf->protocol ==ATA_PROT_DMA || - tf->protocol ==ATA_PROT_NODATA ); + tf->protocol ==ATA_PROT_ATAPI_DMA );ata_exec_command (ap, tf); }
Re: [REPOST PATCH] sata_promise: use TF interface for polling NODATA commands
Quoted 4 lines · Tejun Heo
... Fix
pdc_qc_issue_prot()such that ATA/ATAPI NODATA commands are issued using TF interface ifATA_TFLAG_POLLINGis set.This patch fixes detection failure introduced by polling SETXFERMODE.
Your patch works for me, thanks.
Re: [REPOST PATCH] sata_promise: use TF interface for polling NODATA commands
In reply to Tejun HeoFYI to all --
As a reminder. the Promise hardware programs registers when it receives a SET FEATURES - XFER MODE.
If data transfer is occurring on OTHER ports at the time this is issued, then data corruption is guaranteed to occur. Polling will not fix this problem -- all ports need to be inactive, when a SET FEATURES - XFER MODE command is issued for any port.
Jeff
Re: [REPOST PATCH] sata_promise: use TF interface for polling NODATA commands
Quoted 10 lines · On Wed, 6 Jun 2007 12:05:11 -0400 Jeff Garzik <[email protected]> wrote:
FYI to all --
As a reminder. the Promise hardware programs registers when it receives a SET FEATURES - XFER MODE.
If data transfer is occurring on OTHER ports at the time this is issued, then data corruption is guaranteed to occur. Polling will not fix this problem -- all ports need to be inactive, when a SET FEATURES - XFER MODE command is issued for any port.
Cool - will whoever makes that work drop me a note as I need to do the same eventually for a couple of other controllers.
Re: [REPOST PATCH] sata_promise: use TF interface for polling NODATA commands
In reply to Jeff GarzikQuoted 10 lines · Jeff Garzik
FYI to all --
As a reminder. the Promise hardware programs registers when it receives a SET FEATURES - XFER MODE.
If data transfer is occurring on OTHER ports at the time this is issued, then data corruption is guaranteed to occur. Polling will not fix this problem -- all ports need to be inactive, when a SET FEATURES - XFER MODE command is issued for any port.
So is this patch OK but yet more work needs to be done, or does this patch cause new problems?
Re: [REPOST PATCH] sata_promise: use TF interface for polling NODATA commands
Quoted 6 lines · Chuck Ebbert
Quoted 5 lines · Jeff Garzik
FYI to all --
As a reminder. the Promise hardware programs registers when it receives a SET FEATURES - XFER MODE.
Quoted 7 lines
Quoted 4 lines
If data transfer is occurring on OTHER ports at the time this is issued, then data corruption is guaranteed to occur. Polling will not fix this problem -- all ports need to be inactive, when a SET FEATURES - XFER MODE command is issued for any port.
So is this patch OK but yet more work needs to be done, or does this patch cause new problems?
Causes no /new/ problems... :) The existing problem described above remains.
Jeff
Re: [REPOST PATCH] sata_promise: use TF interface for polling NODATA commands
Quoted 12 lines · Jeff Garzik
Quoted 10 lines · Chuck Ebbert
Quoted 9 lines · Jeff Garzik
FYI to all --
As a reminder. the Promise hardware programs registers when it receives a SET FEATURES - XFER MODE.
If data transfer is occurring on OTHER ports at the time this is issued, then data corruption is guaranteed to occur. Polling will not fix this problem -- all ports need to be inactive, when a SET FEATURES - XFER MODE command is issued for any port.
Quoted 5 lines
Quoted 2 lines
So is this patch OK but yet more work needs to be done, or does this patch cause new problems?
Causes no /new/ problems... :) The existing problem described above remains.
Just to expand... this problem doesn't really affect a lot of users in the majority case, since we do speed tuning before data transfer starts.
The main problem that remains is the rare (but no less important) case where libata-EH will tune speed during operation in respond to certain classes of errors.
Jeff
Re: [REPOST PATCH] sata_promise: use TF interface for polling NODATA commands
In reply to Tejun HeoQuoted 14 lines · Tejun Heo
sata_promiseuses two different command modes - packet and TF. Packet mode is intelligent low-overhead mode while TF is the same old taskfile interface. As with other advanced interface (ahci/sil24),ATA_TFLAG_POLLINGhas no effect in packet mode. However, PIO commands are issued using TF interface in polling mode, sopdc_interrupt()considers interrupts spurious ifATA_TFLAG_POLLINGis set.This is broken for polling NODATA commands because command is issued using packet mode but the interrupt handler ignores it due to
ATA_TFLAG_POLLING. Fixpdc_qc_issue_prot()such that ATA/ATAPI NODATA commands are issued using TF interface ifATA_TFLAG_POLLINGis set.This patch fixes detection failure introduced by polling SETXFERMODE.
Quoted 7 lines
Signed-off-by Tejun Heo <[email protected]>---
David, please verify this patch. Mikael, does this look okay? Please push this upstream after David and Mikael's ack.(This repost is identical to the previous posting but it's now on the
correct thread.)
Tejun, would you mind pushing this upstream to Linus/Andrew?
I'm travelling this week, and my home firewall doesn't like me. It is probably easier for you than me.
Jeff
Re: [REPOST PATCH] sata_promise: use TF interface for polling NODATA commands
Quoted 23 lines · On Thu, 7 Jun 2007 11:17:17 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 14 lines · Tejun Heo
sata_promiseuses two different command modes - packet and TF. Packet mode is intelligent low-overhead mode while TF is the same old taskfile interface. As with other advanced interface (ahci/sil24),ATA_TFLAG_POLLINGhas no effect in packet mode. However, PIO commands are issued using TF interface in polling mode, sopdc_interrupt()considers interrupts spurious ifATA_TFLAG_POLLINGis set.This is broken for polling NODATA commands because command is issued using packet mode but the interrupt handler ignores it due to
ATA_TFLAG_POLLING. Fixpdc_qc_issue_prot()such that ATA/ATAPI NODATA commands are issued using TF interface ifATA_TFLAG_POLLINGis set.This patch fixes detection failure introduced by polling SETXFERMODE.
Quoted 7 lines
Signed-off-by Tejun Heo <[email protected]>---
David, please verify this patch. Mikael, does this look okay? Please push this upstream after David and Mikael's ack.(This repost is identical to the previous posting but it's now on the
correct thread.)
Quoted 7 lines
Acked-by Jeff Garzik <[email protected]>Tejun, would you mind pushing this upstream to Linus/Andrew?
I'm travelling this week, and my home firewall doesn't like me. It is probably easier for you than me.
I added the below to my next batch:
From: Tejun Heo <[email protected]>
sata_promise uses two different command modes - packet and TF. Packet mode is intelligent low-overhead mode while TF is the same old taskfile interface. As with other advanced interface (ahci/sil24), ATA_TFLAG_POLLING has no effect in packet mode. However, PIO commands are issued using TF interface in polling mode, so pdc_interrupt() considers interrupts spurious if ATA_TFLAG_POLLING is set.
This is broken for polling NODATA commands because command is issued using packet mode but the interrupt handler ignores it due to ATA_TFLAG_POLLING. Fix pdc_qc_issue_prot() such that ATA/ATAPI NODATA commands are issued using TF interface if ATA_TFLAG_POLLING is set.
This patch fixes detection failure introduced by polling SETXFERMODE.
---
drivers/ata/sata_promise.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/ata/sata_promise.c renamed from drivers/ata/sata_promise.c~sata_promise-use-tf-interface-for-polling-nodata-commands +6 -3
@@ -784,9 +784,12 @@ static unsigned int pdc_qc_issue_prot(stif (qc->dev->flags &ATA_DFLAG_CDB_INTR )break ;/*FALLTHROUGH*/ +case ATA_PROT_NODATA : +if (qc->tf.flags &ATA_TFLAG_POLLING ) +break ; +/*FALLTHROUGH*/ case ATA_PROT_ATAPI_DMA :case ATA_PROT_DMA : -case ATA_PROT_NODATA :pdc_packet_start (qc);return 0 ;
@@ -800,7 +803,7 @@ static unsigned int pdc_qc_issue_prot(ststatic void pdc_tf_load_mmio (struct ata_port *ap,const struct ata_taskfile *tf) {WARN_ON (tf->protocol ==ATA_PROT_DMA || - tf->protocol ==ATA_PROT_NODATA ); + tf->protocol ==ATA_PROT_ATAPI_DMA );ata_tf_load (ap, tf); }
@@ -808,7 +811,7 @@ static void pdc_tf_load_mmio(struct ata_static void pdc_exec_command_mmio (struct ata_port *ap,const struct ata_taskfile *tf) {WARN_ON (tf->protocol ==ATA_PROT_DMA || - tf->protocol ==ATA_PROT_NODATA ); + tf->protocol ==ATA_PROT_ATAPI_DMA );ata_exec_command (ap, tf); }
_