All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe De Muyter <phdm@macqel.be>
To: linux-ide@vger.kernel.org, davem@davemloft.net,
	linux-kernel@vger.kernel.org
Subject: [PATCH ide] : Increase WAIT_DRQ to support slow CF cards
Date: Mon, 26 Oct 2009 17:20:11 +0100	[thread overview]
Message-ID: <20091026162011.GA3289@frolo.macqel> (raw)

Hi,

I just encountered a problem with write-access to a batch of CF cards
(KINGSTON TECHNOLOGY 4GB COMPACT FLASH CF/4GB
3.3V/5V 9904321 - 006.AOOLF 4449081 - 1219643 X001 ASSY IN TAIWAN (c) 2008)
connected to a PC-CARD / PCMCIA interface, with the following error messages :

	hda: status timeout: status=0xd0 { Busy }
	ide: failed opcode was: unknown
	hda: no DRQ after issuing MULTWRITE

After testing with different bigger values for the WAIT_DRQ timeout value,
the problem disappeared.  I had success with WAIT_DRQ = 500ms, then with
WAIT_DRQ = 300ms.  I then tested with WAIT_DRQ = 200ms, but the problem
reappeared.  So I kept the 300ms value.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>

diff -r a145344bb228 include/linux/ide.h
--- a/include/linux/ide.h	Thu Oct 22 08:28:28 2009 +0900
+++ b/include/linux/ide.h	Mon Oct 26 16:51:23 2009 +0100
@@ -125,8 +125,8 @@
  * Timeouts for various operations:
  */
 enum {
-	/* spec allows up to 20ms */
-	WAIT_DRQ	= HZ / 10,	/* 100ms */
+	/* spec allows up to 20ms, but some CF cards need more than 200ms */
+	WAIT_DRQ	= 3 * HZ / 10,	/* 300ms */
 	/* some laptops are very slow */
 	WAIT_READY	= 5 * HZ,	/* 5s */
 	/* should be less than 3ms (?), if all ATAPI CD is closed at boot */

             reply	other threads:[~2009-10-26 16:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-26 16:20 Philippe De Muyter [this message]
2009-10-27  0:34 ` [PATCH ide] : Increase WAIT_DRQ to support slow CF cards Robert Hancock
2009-10-27  0:45   ` David Miller
2009-10-27  1:07     ` Robert Hancock
2009-10-27  1:19       ` David Miller
2009-10-27  1:40         ` Robert Hancock
2009-10-27  1:43           ` David Miller
2009-10-27  9:45             ` Philippe De Muyter
2009-10-27 10:24               ` Sergei Shtylyov
2009-10-31 13:56   ` Mark Lord
2009-12-03  5:57     ` David Miller
2009-12-03  8:55       ` Philippe De Muyter

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=20091026162011.GA3289@frolo.macqel \
    --to=phdm@macqel.be \
    --cc=davem@davemloft.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.