From: Tejun Heo <htejun@gmail.com>
To: Robert de Rooy <robert.de.rooy@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Jeff Garzik <jeff@garzik.org>,
linux-kernel@vger.kernel.org, bzolnier@gmail.com,
linux-pcmcia@lists.infradead.org
Subject: Re: libata and legacy ide pcmcia failure
Date: Thu, 07 Jun 2007 16:28:29 +0900 [thread overview]
Message-ID: <4667B39D.209@gmail.com> (raw)
In-Reply-To: <466718B6.4080105@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 910 bytes --]
Robert de Rooy wrote:
> Alan Cox wrote:
>>>> http://thread.gmane.org/gmane.linux.kernel/530099
>>>>
>>>> It seems we're losing interrupts from the CFA device. Any ideas?
>>>>
>>> Alan probably knows more, but ISTR some CFA PCMCIA devices that
>>> needed polling...
>>>
>>
>> Not that I know of. Not devices anyway - there are embedded boxes with no
>> IRQ configuration for the CF slot but we've never supported those (indeed
>> there are even people who bitbang ATA on GPIO pins...)
>>
>>
> I was able to test the same PCMCIA adapter in a different ThinkPad, an X40.
> The X40 also fails although it has a totally different Cardbus
> controller (TI on the T40 vs Ricoh on the X40)
>
> Here is the log from the X40 running the same kernel as before
> (2.6.22rc1-git5 + timing-debug.patch +
> disable-dev_init_param-and-setxfermode-for-CFA.patch)
Can you test the attached patch?
--
tejun
[-- Attachment #2: libata-dont-test-slave-register-readiness-after-srst.patch --]
[-- Type: text/x-patch, Size: 1161 bytes --]
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 4733f00..bac5e1f 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3042,7 +3042,6 @@ int ata_wait_ready(struct ata_port *ap, unsigned long deadline)
static int ata_bus_post_reset(struct ata_port *ap, unsigned int devmask,
unsigned long deadline)
{
- struct ata_ioports *ioaddr = &ap->ioaddr;
unsigned int dev0 = devmask & (1 << 0);
unsigned int dev1 = devmask & (1 << 1);
int rc, ret = 0;
@@ -3059,22 +3058,9 @@ static int ata_bus_post_reset(struct ata_port *ap, unsigned int devmask,
}
}
- /* if device 1 was found in ata_devchk, wait for
- * register access, then wait for BSY to clear
- */
- while (dev1) {
- u8 nsect, lbal;
-
- ap->ops->dev_select(ap, 1);
- nsect = ioread8(ioaddr->nsect_addr);
- lbal = ioread8(ioaddr->lbal_addr);
- if ((nsect == 1) && (lbal == 1))
- break;
- if (time_after(jiffies, deadline))
- return -EBUSY;
- msleep(50); /* give drive a breather */
- }
+ /* wait for device 1 */
if (dev1) {
+ ap->ops->dev_select(ap, 1);
rc = ata_wait_ready(ap, deadline);
if (rc) {
if (rc != -ENODEV)
next prev parent reply other threads:[~2007-06-07 7:38 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-15 18:59 libata pcmcia failure Robert de Rooy
2007-05-17 8:42 ` Robert de Rooy
2007-05-17 20:15 ` libata and legacy ide " Robert de Rooy
2007-05-20 11:31 ` Tejun Heo
2007-05-20 21:13 ` Robert de Rooy
2007-05-21 11:50 ` Tejun Heo
2007-05-21 12:37 ` Alan Cox
2007-05-21 12:42 ` Tejun Heo
2007-05-21 15:10 ` Robert de Rooy
2007-05-21 15:18 ` Tejun Heo
2007-05-21 16:11 ` Robert de Rooy
2007-05-21 16:22 ` Tejun Heo
2007-05-21 17:16 ` Robert de Rooy
2007-05-21 21:12 ` Jeff Garzik
2007-05-22 19:37 ` Robert de Rooy
2007-05-23 14:02 ` Alan Cox
2007-05-23 18:47 ` Robert de Rooy
2007-06-06 20:27 ` Robert de Rooy
2007-06-07 7:28 ` Tejun Heo [this message]
2007-06-07 19:22 ` Robert de Rooy
2007-06-08 7:10 ` Tejun Heo
2007-06-08 12:46 ` Mark Lord
2007-06-08 22:06 ` Robert de Rooy
2007-06-08 22:11 ` Mark Lord
2007-06-10 1:01 ` Robert de Rooy
2007-06-10 20:46 ` Mark Lord
[not found] ` <466C723C.6000300@gmail.com>
[not found] ` <20070610221322.GA18196@flint.arm.linux.org.uk>
[not found] ` <466C7A9F.1080700@rtr.ca>
2007-06-11 22:36 ` Robert de Rooy
2007-06-11 22:40 ` Mark Lord
2007-06-12 3:24 ` Tejun Heo
2007-06-13 1:36 ` Albert Lee
2007-06-14 9:39 ` Tejun Heo
2007-06-22 11:51 ` Robert de Rooy
2007-06-22 13:32 ` Mark Lord
2007-06-25 4:04 ` Albert Lee
2007-06-25 9:31 ` Robert de Rooy
2007-06-25 10:15 ` Albert Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4667B39D.209@gmail.com \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bzolnier@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.org \
--cc=robert.de.rooy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).