lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4667B39D.209@gmail.com>
Date:	Thu, 07 Jun 2007 16:28:29 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Robert de Rooy <robert.de.rooy@...il.com>
CC:	Alan Cox <alan@...rguk.ukuu.org.uk>, Jeff Garzik <jeff@...zik.org>,
	linux-kernel@...r.kernel.org, bzolnier@...il.com,
	linux-pcmcia@...ts.infradead.org
Subject: Re: libata and legacy ide pcmcia failure

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

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)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ