From patchwork Sun Mar 28 23:47:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 48795 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.180.67]) by ozlabs.org (Postfix) with ESMTP id 21215B7CA6 for ; Mon, 29 Mar 2010 10:44:00 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755390Ab0C1Xn6 (ORCPT ); Sun, 28 Mar 2010 19:43:58 -0400 Received: from hera.kernel.org ([140.211.167.34]:47327 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755381Ab0C1Xn6 (ORCPT ); Sun, 28 Mar 2010 19:43:58 -0400 Received: from htj.dyndns.org (localhost [127.0.0.1]) by hera.kernel.org (8.14.3/8.14.3) with ESMTP id o2SNhqXV002201 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 28 Mar 2010 23:43:54 GMT X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.95.2 at hera.kernel.org Received: from [10.7.8.135] (a135.air [10.7.8.135]) by htj.dyndns.org (Postfix) with ESMTPSA id 76927100CAC18; Mon, 29 Mar 2010 08:43:52 +0900 (KST) Message-ID: <4BAFEA7A.50904@kernel.org> Date: Mon, 29 Mar 2010 08:47:06 +0900 From: Tejun Heo User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Robert Hancock CC: Stan Hoeppner , linux-ide@vger.kernel.org Subject: Re: ata2.00: failed to set xfermode (err_mask=0x100), ata2.00: disabled, CD-ROM drive dead References: <4B9EA02F.2070704@hardwarefreak.com> <4B9EC67A.3020201@gmail.com> <4B9ED027.30800@hardwarefreak.com> <4BAAB080.3010401@kernel.org> <4BAB2A94.8010001@hardwarefreak.com> <20100325215242.GA9785@localhost.localdomain> <4BAF9670.6010706@hardwarefreak.com> <4BAFB58C.5050702@gmail.com> In-Reply-To: <4BAFB58C.5050702@gmail.com> X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on hera.kernel.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (hera.kernel.org [127.0.0.1]); Sun, 28 Mar 2010 23:43:54 +0000 (UTC) Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Hello, On 03/29/2010 05:01 AM, Robert Hancock wrote: >> ata2.00: ATAPI: Pioneer CD-ROM ATAPI Model DR-A24X 0102, E1.02, max >> MWDMA2 >> ata2.00: NOSETXFER but PATA detected - can't skip SETXFER, might >> malfunction > > Yeah, NOSETXFER doesn't take effect on PATA drives. It could, but it > would assume that the BIOS has set the right mode which seems rather > dangerous. Well, we can issue the command, ignore the error and then check the correct mode is configured during revalidation. For now, the following should show us whether something like that would work. diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 4a28420..ca4a50a 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3446,6 +3446,10 @@ static int ata_dev_set_mode(struct ata_device *dev) "NOSETXFER but PATA detected - can't " "skip SETXFER, might malfunction\n"); err_mask = ata_dev_set_xfermode(dev); + if (err_mask) + ata_dev_printk(dev, KERN_WARNING, "SETXFER failed w/ %x\n", + err_mask); + err_mask = 0; } if (err_mask & ~AC_ERR_DEV)