From patchwork Wed Jan 13 13:15:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikael Pettersson X-Patchwork-Id: 42820 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 DEEE6B7C94 for ; Thu, 14 Jan 2010 00:15:12 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751705Ab0AMNPL (ORCPT ); Wed, 13 Jan 2010 08:15:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752618Ab0AMNPK (ORCPT ); Wed, 13 Jan 2010 08:15:10 -0500 Received: from fanny.its.uu.se ([130.238.4.241]:40466 "EHLO fanny.its.uu.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751705Ab0AMNPJ (ORCPT ); Wed, 13 Jan 2010 08:15:09 -0500 Received: by fanny.its.uu.se (Postfix, from userid 212) id 6547A6465; Wed, 13 Jan 2010 14:15:07 +0100 (MEZ) X-Spam-Checker-Version: SpamAssassin 3.1.9 (2007-02-13) on spamass.its.uu.se X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.1.9 Received: from pilspetsen.it.uu.se (pilspetsen.it.uu.se [130.238.18.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by fanny.its.uu.se (Postfix) with ESMTP id D36D0622B; Wed, 13 Jan 2010 14:15:02 +0100 (MEZ) Received: (from mikpe@localhost) by pilspetsen.it.uu.se (8.13.8+Sun/8.13.8) id o0DDF1Wv020171; Wed, 13 Jan 2010 14:15:01 +0100 (MET) X-Authentication-Warning: pilspetsen.it.uu.se: mikpe set sender to mikpe@it.uu.se using -f MIME-Version: 1.0 Message-ID: <19277.51029.197524.477689@pilspetsen.it.uu.se> Date: Wed, 13 Jan 2010 14:15:01 +0100 From: Mikael Pettersson To: Benjamin Herrenschmidt Cc: Mikael Pettersson , linux-ide@vger.kernel.org, Tejun Heo Subject: Re: 2.6.33-rc2 pata_macio fails to detect PMac G3 CD-drive In-Reply-To: <1263186759.724.132.camel@pasglop> References: <19254.17766.674348.933702@pilspetsen.it.uu.se> <1263186759.724.132.camel@pasglop> X-Mailer: VM 7.17 under Emacs 20.7.1 Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Benjamin Herrenschmidt writes: > Mikael: Can you try commenting out the code in pata_macio_reset_hw() > that calles ppc_mc.feature_call(PMAC_FTR_IDE_RESET,...) ? Keep the > ENABLE calls but comment out the reset ones, and let us know if that > makes a difference. These calls basically toggle the HW reset line of > the drive. Made no difference (2.6.33-rc4 + patch appended below): pata-macio 0.00020000:ide: Activating pata-macio chipset Heathrow ATA, Apple bus ID 0 scsi1 : pata_macio ata1: PATA max MWDMA2 irq 30 irq 30: nobody cared (try booting with the "irqpoll" option) Call Trace: [ef075c40] [c00094a0] show_stack+0x74/0x1a8 (unreliable) [ef075c70] [c00604f0] __report_bad_irq+0x40/0xd4 [ef075c90] [c006077c] note_interrupt+0x1f8/0x254 [ef075cc0] [c0061198] handle_edge_irq+0xe4/0x1ac [ef075ce0] [c0007004] do_IRQ+0xa8/0xcc [ef075d00] [c00142cc] ret_from_except+0x0/0x14 --- Exception: 501 at ata_eh_freeze_port+0x34/0x48 LR = ata_eh_freeze_port+0x30/0x48 [ef075dd0] [c01af1ec] ata_eh_reset+0x370/0xd90 [ef075e50] [c01b0eb4] ata_eh_recover+0x300/0x115c [ef075ee0] [c01b1f18] ata_do_eh+0x54/0xc8 [ef075f10] [c01b3f68] ata_sff_error_handler+0x144/0x228 [ef075f30] [c01b28a4] ata_scsi_error+0x320/0x548 [ef075f60] [c017e970] scsi_error_handler+0x174/0x444 [ef075fc0] [c0046bc4] kthread+0x80/0x84 [ef075ff0] [c0013a44] kernel_thread+0x4c/0x68 handlers: [] (ata_sff_interrupt+0x0/0x12c) Disabling IRQ #30 ata1.00: ATAPI: MATSHITA CR-585, ZS20, max MWDMA1 ata1.00: configured for MWDMA1 pata-macio 0.00021000:ide: Activating pata-macio chipset Heathrow ATA, Apple bus ID 1 scsi2 : pata_macio ata2: PATA max MWDMA2 irq 34 ... ata1.00: qc timeout (cmd 0xa0) ata1.00: TEST_UNIT_READY failed (err_mask=0x5) ata1.00: configured for MWDMA1 ata1.00: qc timeout (cmd 0xa0) ata1.00: TEST_UNIT_READY failed (err_mask=0x5) ata1.00: limiting speed to MWDMA1:PIO2 ata1.00: configured for MWDMA1 ata1.00: qc timeout (cmd 0xa0) ata1.00: TEST_UNIT_READY failed (err_mask=0x5) ata1.00: disabled ata1: soft resetting link ata1: EH complete Seems to me the "irq 30: nobody cared" and "Disabling IRQ #30" are the real problems. Is the pata_macio irq handler registered too late, or does it ignore the interrupt? --- 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 --- linux-2.6.33-rc4/drivers/ata/pata_macio.c.~1~ 2010-01-13 12:49:00.000000000 +0100 +++ linux-2.6.33-rc4/drivers/ata/pata_macio.c 2010-01-13 13:26:01.000000000 +0100 @@ -749,15 +749,21 @@ static void pata_macio_reset_hw(struct p int rc; /* Reset and enable controller */ +#if 0 rc = ppc_md.feature_call(PMAC_FTR_IDE_RESET, priv->node, priv->aapl_bus_id, 1); +#else + rc = 0; +#endif ppc_md.feature_call(PMAC_FTR_IDE_ENABLE, priv->node, priv->aapl_bus_id, 1); msleep(10); /* Only bother waiting if there's a reset control */ if (rc == 0) { +#if 0 ppc_md.feature_call(PMAC_FTR_IDE_RESET, priv->node, priv->aapl_bus_id, 0); +#endif msleep(IDE_WAKEUP_DELAY_MS); } }