From patchwork Mon Oct 26 16:20:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe De Muyter X-Patchwork-Id: 36930 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 5F4DCB7B95 for ; Tue, 27 Oct 2009 03:20:23 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752757AbZJZQUQ (ORCPT ); Mon, 26 Oct 2009 12:20:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753126AbZJZQUQ (ORCPT ); Mon, 26 Oct 2009 12:20:16 -0400 Received: from mailrelay007.isp.belgacom.be ([195.238.6.173]:3714 "EHLO mailrelay007.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752757AbZJZQUO (ORCPT ); Mon, 26 Oct 2009 12:20:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtoEAFto5UrCTtAn/2dsb2JhbACBUNZbgjSCCwQ Received: from mail.macqel.be ([194.78.208.39]) by relay.skynet.be with ESMTP; 26 Oct 2009 17:20:16 +0100 Received: from localhost (localhost [127.0.0.1]) by mail.macqel.be (Postfix) with ESMTP id E6B9B150A81; Mon, 26 Oct 2009 17:20:14 +0100 (CET) X-Virus-Scanned: amavisd-new at macqel.be Received: from mail.macqel.be ([127.0.0.1]) by localhost (mail.macqel.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j5dPyVL-sXaS; Mon, 26 Oct 2009 17:20:12 +0100 (CET) Received: from frolo.macqel.be (frolo.macqel [10.1.40.73]) by mail.macqel.be (Postfix) with ESMTP id 8986E150A82; Mon, 26 Oct 2009 17:20:12 +0100 (CET) Received: by frolo.macqel.be (Postfix, from userid 1000) id ADAF4DF0473; Mon, 26 Oct 2009 17:20:11 +0100 (CET) Date: Mon, 26 Oct 2009 17:20:11 +0100 From: Philippe De Muyter 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 Message-ID: <20091026162011.GA3289@frolo.macqel> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 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 --- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 */