From patchwork Wed May 30 09:06:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuzhou Chen X-Patchwork-Id: 161897 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 1D109B7042 for ; Wed, 30 May 2012 19:07:53 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932415Ab2E3JHv (ORCPT ); Wed, 30 May 2012 05:07:51 -0400 Received: from db3ehsobe004.messaging.microsoft.com ([213.199.154.142]:59116 "EHLO db3outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932272Ab2E3JHt convert rfc822-to-8bit (ORCPT ); Wed, 30 May 2012 05:07:49 -0400 Received: from mail73-db3-R.bigfish.com (10.3.81.237) by DB3EHSOBE001.bigfish.com (10.3.84.21) with Microsoft SMTP Server id 14.1.225.23; Wed, 30 May 2012 09:07:22 +0000 Received: from mail73-db3 (localhost [127.0.0.1]) by mail73-db3-R.bigfish.com (Postfix) with ESMTP id AFCCE140096; Wed, 30 May 2012 09:07:22 +0000 (UTC) X-Forefront-Antispam-Report: CIP:131.107.125.8; KIP:(null); UIP:(null); IPV:NLI; H:TK5EX14MLTC103.redmond.corp.microsoft.com; RD:none; EFVD:NLI X-SpamScore: -17 X-BigFish: VS-17(zz9371I1447I542M1432N98dK4015Izz1202hzz8275dhz2fh2a8h668h839h944hd25hf0ah) Received-SPF: pass (mail73-db3: domain of microsoft.com designates 131.107.125.8 as permitted sender) client-ip=131.107.125.8; envelope-from=fuzhouch@microsoft.com; helo=TK5EX14MLTC103.redmond.corp.microsoft.com ; icrosoft.com ; Received: from mail73-db3 (localhost.localdomain [127.0.0.1]) by mail73-db3 (MessageSwitch) id 1338368840396520_21855; Wed, 30 May 2012 09:07:20 +0000 (UTC) Received: from DB3EHSMHS005.bigfish.com (unknown [10.3.81.249]) by mail73-db3.bigfish.com (Postfix) with ESMTP id 544F94A0046; Wed, 30 May 2012 09:07:20 +0000 (UTC) Received: from TK5EX14MLTC103.redmond.corp.microsoft.com (131.107.125.8) by DB3EHSMHS005.bigfish.com (10.3.87.105) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 30 May 2012 09:07:18 +0000 Received: from SINEX14HUBC403.southpacific.corp.microsoft.com (157.60.220.217) by TK5EX14MLTC103.redmond.corp.microsoft.com (157.54.79.174) with Microsoft SMTP Server (TLS) id 14.2.298.5; Wed, 30 May 2012 09:07:16 +0000 Received: from SINEX14MBXC403.southpacific.corp.microsoft.com ([169.254.3.117]) by SINEX14HUBC403.southpacific.corp.microsoft.com ([157.60.220.217]) with mapi id 14.02.0298.005; Wed, 30 May 2012 09:06:43 +0000 From: Fuzhou Chen To: Aaron Lu , Lin Ming , Hashir Abdi CC: Alan Cox , Jeff Garzik , David Woodhouse , Holger Macht , Matthew Garrett , "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "linux-ide@vger.kernel.org" , "linux-acpi@vger.kernel.org" Subject: RE: [PATCH v4 0/13] SATA ZPODD support Thread-Topic: [PATCH v4 0/13] SATA ZPODD support Thread-Index: AQHNPic5sKac6ROXoUmhaKVdpIsQT5biCA0g Date: Wed, 30 May 2012 09:06:43 +0000 Message-ID: <6689D53B948ACF469C8E9C8CCD48EBE1166CD91A@SINEX14MBXC403.southpacific.corp.microsoft.com> References: <1338181720-4149-1-git-send-email-ming.m.lin@intel.com> <20120528104438.044ae385@pyramind.ukuu.org.uk> <20120528105428.689d0102@pyramind.ukuu.org.uk> <20120530054310.GA11672@ladygaga> In-Reply-To: <20120530054310.GA11672@ladygaga> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.168.3.92] MIME-Version: 1.0 X-OriginatorOrg: microsoft.com Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Sorry Aaron, but I have left Microsoft Open Source team for a while. Due to policy limitations, I can't touch Linux kernel source now. Hi Hashir, could you help find current owner of our HDD driver to verify this fix? This is a ata-acpi module bug I reported last year. Our daily BVT in linux-next tree should be able to handle this verification Thanks, Fuzhou -----Original Message----- From: Aaron Lu [mailto:aaron.lu@amd.com] Sent: Wednesday, May 30, 2012 1:43 PM To: Lin Ming; Fuzhou Chen Cc: Alan Cox; Jeff Garzik; David Woodhouse; Holger Macht; Matthew Garrett; linux-kernel@vger.kernel.org; linux-pm@vger.kernel.org; linux-scsi@vger.kernel.org; linux-ide@vger.kernel.org; linux-acpi@vger.kernel.org Subject: Re: [PATCH v4 0/13] SATA ZPODD support On Tue, May 29, 2012 at 08:32:49PM +0800, Lin Ming wrote: > On Mon, May 28, 2012 at 5:54 PM, Alan Cox wrote: > >> Have you fixed the fact that Matthews patches broke things like > >> pata_acpi last time ? Until that is fixed properly I don't see that > >> these patches can make any progress. > > > > https://lkml.org/lkml/2012/2/24/2 > > Aaron has a fix. > We'll do more test. Here is the patch, apply on top of the ZPODD patch set. Hi Fuzhou, Can you please give it a test? Thanks. I tested on my system with a ATI IDE controller and it could work with pata_acpi module. > > Thanks for the info. > Lin Ming > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" > in the body of a message to majordomo@vger.kernel.org More majordomo > info at http://vger.kernel.org/majordomo-info.html > --- 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 --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index 6de8f32..c53266a 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c @@ -59,7 +59,18 @@ acpi_handle ata_ap_acpi_handle(struct ata_port *ap) { if (ap->flags & ATA_FLAG_ACPI_SATA) return NULL; - return DEVICE_ACPI_HANDLE(&ap->scsi_host->shost_gendev); + + /* + * If acpi bind operation has already happened, we can get the handle + * for the port by checking the corresponding scsi_host device's + * firmware node, otherwise we will need to find out the handle from + * its parent's acpi node. + */ + if (ap->scsi_host) + return DEVICE_ACPI_HANDLE(&ap->scsi_host->shost_gendev); + else + return acpi_get_child(DEVICE_ACPI_HANDLE(ap->host->dev), + ap->port_no); } EXPORT_SYMBOL(ata_ap_acpi_handle); -Aaron