* commit a258f183ee4e48e9352b408e8448467eebdc6cd2 @ 2008-01-02 9:34 Tejun Heo 2008-01-02 13:48 ` Alan Cox 0 siblings, 1 reply; 7+ messages in thread From: Tejun Heo @ 2008-01-02 9:34 UTC (permalink / raw) To: Jeff Garzik, Alan Cox, IDE/ATA development list Happy new year, Jeff, Alan. I'm curious why commit a258f183 got in? We already deal with this problem by executing SETXFER by polling. That's better IMHO for two reasons - no clutter in hot path && applies to drivers which use custom interrupt handlers. Thanks. -- tejun ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: commit a258f183ee4e48e9352b408e8448467eebdc6cd2 2008-01-02 9:34 commit a258f183ee4e48e9352b408e8448467eebdc6cd2 Tejun Heo @ 2008-01-02 13:48 ` Alan Cox 2008-01-02 14:24 ` Tejun Heo 0 siblings, 1 reply; 7+ messages in thread From: Alan Cox @ 2008-01-02 13:48 UTC (permalink / raw) To: Tejun Heo; +Cc: Jeff Garzik, IDE/ATA development list On Wed, 02 Jan 2008 18:34:38 +0900 Tejun Heo <htejun@gmail.com> wrote: > Happy new year, Jeff, Alan. > > I'm curious why commit a258f183 got in? Whats that commit in real code ? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: commit a258f183ee4e48e9352b408e8448467eebdc6cd2 2008-01-02 13:48 ` Alan Cox @ 2008-01-02 14:24 ` Tejun Heo 2008-01-02 14:19 ` Alan Cox 0 siblings, 1 reply; 7+ messages in thread From: Tejun Heo @ 2008-01-02 14:24 UTC (permalink / raw) To: Alan Cox; +Cc: Jeff Garzik, IDE/ATA development list [-- Attachment #1: Type: text/plain, Size: 241 bytes --] Alan Cox wrote: > On Wed, 02 Jan 2008 18:34:38 +0900 > Tejun Heo <htejun@gmail.com> wrote: > >> Happy new year, Jeff, Alan. >> >> I'm curious why commit a258f183 got in? > > Whats that commit in real code ? The attached one. -- tejun [-- Attachment #2: 0001-libata-fix-hopefully-all-the-remaining-problems-w.patch --] [-- Type: text/x-patch, Size: 2062 bytes --] >From a258f183ee4e48e9352b408e8448467eebdc6cd2 Mon Sep 17 00:00:00 2001 From: Alan <alan@lxorguk.ukuu.org.uk> Date: Tue, 2 Oct 2007 13:53:05 -0700 Subject: [PATCH] libata: fix (hopefully) all the remaining problems with devices failing setup/identify Two fixes in this test patch. One of them allows old CF cards to refuse pio mode setting, and one to wait for the drive to settle after a set features changes the speed settings, which is based upon the workarounds used by drivers/ide. Please test and report back if you have an afflicted system. This patch isn't for merging just testing. The CF card fix will still display errors when the card works (got fixes for that once I know the cure works) but should then be found/usable. Not signed off by anyone, not for merging Signed-off-by: Andrew Morton <akpm@linux-foundation.org> --- drivers/ata/libata-core.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 0c2f37e..2b24041 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -6134,6 +6134,7 @@ inline unsigned int ata_host_intr(struct ata_port *ap, { struct ata_eh_info *ehi = &ap->link.eh_info; u8 status, host_stat = 0; + int i; VPRINTK("ata%u: protocol %d task_state %d\n", ap->print_id, qc->tf.protocol, ap->hsm_task_state); @@ -6190,6 +6191,20 @@ inline unsigned int ata_host_intr(struct ata_port *ap, if (unlikely(status & ATA_BUSY)) goto idle_irq; + if (unlikely(qc->tf.command == ATA_CMD_SET_FEATURES && + qc->tf.feature == SETFEATURES_XFER)) { + /* Let the timings change settle and the drive catch up as + some hardware needs up to 10uS to get its brain back in + gear. Taken from the workarounds in drivers/ide done by + Matthew Faupel/Niccolo Rigacci */ + for (i = 0; i < 10; i++) { + if ((status & (ATA_BUSY | ATA_DRQ | ATA_ERR)) == 0) + break; + udelay(1); + status = ata_chk_status(ap); + } + } + /* ack bmdma irq events */ ap->ops->irq_clear(ap); -- 1.5.2.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: commit a258f183ee4e48e9352b408e8448467eebdc6cd2 2008-01-02 14:24 ` Tejun Heo @ 2008-01-02 14:19 ` Alan Cox 2008-01-02 14:33 ` Tejun Heo 0 siblings, 1 reply; 7+ messages in thread From: Alan Cox @ 2008-01-02 14:19 UTC (permalink / raw) To: Tejun Heo; +Cc: Jeff Garzik, IDE/ATA development list On Wed, 02 Jan 2008 23:24:30 +0900 Tejun Heo <htejun@gmail.com> wrote: > Alan Cox wrote: > > On Wed, 02 Jan 2008 18:34:38 +0900 > > Tejun Heo <htejun@gmail.com> wrote: > > > >> Happy new year, Jeff, Alan. > >> > >> I'm curious why commit a258f183 got in? > > > > Whats that commit in real code ? > > The attached one. Ok I don't see how that is related to the switch to polling. The old IDE code found it neccessary and always did polling. Alan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: commit a258f183ee4e48e9352b408e8448467eebdc6cd2 2008-01-02 14:19 ` Alan Cox @ 2008-01-02 14:33 ` Tejun Heo 2008-01-02 15:18 ` Alan Cox 0 siblings, 1 reply; 7+ messages in thread From: Tejun Heo @ 2008-01-02 14:33 UTC (permalink / raw) To: Alan Cox; +Cc: Jeff Garzik, IDE/ATA development list Alan Cox wrote: > On Wed, 02 Jan 2008 23:24:30 +0900 > Tejun Heo <htejun@gmail.com> wrote: > >> Alan Cox wrote: >>> On Wed, 02 Jan 2008 18:34:38 +0900 >>> Tejun Heo <htejun@gmail.com> wrote: >>> >>>> Happy new year, Jeff, Alan. >>>> >>>> I'm curious why commit a258f183 got in? >>> Whats that commit in real code ? >> The attached one. > > Ok I don't see how that is related to the switch to polling. The > old IDE code found it neccessary and always did polling. ata_host_intr() is just never traveled while executing SETXFER because SETXFERs are executed using polling which nicely works around quirky controllers which raises interrupt a tad bit too early during SETXFER. -- tejun ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: commit a258f183ee4e48e9352b408e8448467eebdc6cd2 2008-01-02 14:33 ` Tejun Heo @ 2008-01-02 15:18 ` Alan Cox 2008-01-02 15:52 ` Tejun Heo 0 siblings, 1 reply; 7+ messages in thread From: Alan Cox @ 2008-01-02 15:18 UTC (permalink / raw) To: Tejun Heo; +Cc: Jeff Garzik, IDE/ATA development list > ata_host_intr() is just never traveled while executing SETXFER because > SETXFERs are executed using polling which nicely works around quirky > controllers which raises interrupt a tad bit too early during SETXFER. Ok ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: commit a258f183ee4e48e9352b408e8448467eebdc6cd2 2008-01-02 15:18 ` Alan Cox @ 2008-01-02 15:52 ` Tejun Heo 0 siblings, 0 replies; 7+ messages in thread From: Tejun Heo @ 2008-01-02 15:52 UTC (permalink / raw) To: Alan Cox; +Cc: Jeff Garzik, IDE/ATA development list Alan Cox wrote: >> ata_host_intr() is just never traveled while executing SETXFER because >> SETXFERs are executed using polling which nicely works around quirky >> controllers which raises interrupt a tad bit too early during SETXFER. > > Ok Okay. Jeff, can you please revert the commit? Thanks. -- tejun ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-01-02 15:53 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-01-02 9:34 commit a258f183ee4e48e9352b408e8448467eebdc6cd2 Tejun Heo 2008-01-02 13:48 ` Alan Cox 2008-01-02 14:24 ` Tejun Heo 2008-01-02 14:19 ` Alan Cox 2008-01-02 14:33 ` Tejun Heo 2008-01-02 15:18 ` Alan Cox 2008-01-02 15:52 ` Tejun Heo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).