From patchwork Thu Jul 26 14:41:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: aaron lu X-Patchwork-Id: 1242931 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D4E423FC5A for ; Thu, 26 Jul 2012 14:41:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752148Ab2GZOlY (ORCPT ); Thu, 26 Jul 2012 10:41:24 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:54028 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751040Ab2GZOlW (ORCPT ); Thu, 26 Jul 2012 10:41:22 -0400 Received: by pbbrp8 with SMTP id rp8so3322614pbb.19 for ; Thu, 26 Jul 2012 07:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=+x5+7R3RhVKkTozQoETHOITRUT63ZbWt59KevI4fl7E=; b=OEY2437pp0PSaVh/v4enuJz3nVaO/YuGkcuUdeNRbb+2f3mEpuwIh+RbD7Bm0MHCXD EX+zO3IB2bnBCI6njC5KEMIXNgYz/c/8AhmVJNRnQjlEF16Q3sDiBmzjY5vabm85qi0g EO5uFlk07YhIm1PJRY0RkInsczuWZ8z3bcOz8pCz5oij+MbjRyVUL05loIt+TgaGFoXD x+s7njwrw8Pc+GEEDHOG9/XWllt+AFZj1RzL0DEefzT9mkDa8vXe26pHqja/P44TYngI F0hviB9ERnGJ5hdTdZxdkKlrcpxdZk4pdJM/7bwWD8xIMlmYLYoNoNIngigcIJ33Qz5S orzA== Received: by 10.68.231.168 with SMTP id th8mr6039568pbc.14.1343313682192; Thu, 26 Jul 2012 07:41:22 -0700 (PDT) Received: from localhost.localdomain ([222.65.187.251]) by mx.google.com with ESMTPS id rd7sm16656638pbc.70.2012.07.26.07.41.17 (version=SSLv3 cipher=OTHER); Thu, 26 Jul 2012 07:41:21 -0700 (PDT) Date: Thu, 26 Jul 2012 22:41:14 +0800 From: Aaron Lu To: Jeff Garzik , James Bottomley Cc: Alan Stern , Lin Ming , Jeff Wu , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org, Aaron Lu Subject: Re: [PATCH v3 0/7] ZPODD patches for scsi tree Message-ID: <20120726144108.GA2724@localhost.localdomain> References: <1343297129-28174-1-git-send-email-aaron.lu@amd.com> <50114989.3010900@pobox.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <50114989.3010900@pobox.com> User-Agent: Mutt/1.5.20 (2009-12-10) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Thu, Jul 26, 2012 at 09:43:37AM -0400, Jeff Garzik wrote: > On 07/26/2012 06:05 AM, Aaron Lu wrote: > >v3: > >Rebase on top of scsi-misc tree; > >Add the sr related patches previously in Jeff's libata tree; > >Re-organize the sr patches. > >A problem for now: for patch > >scsi: sr: support zero power ODD(ZPODD) > >I can't set a flag in libata-acpi.c since a related function is > >missing in scsi-misc tree. Will fix this when 3.6-rc1 released. > > What does this mean? Would you be more specific? The patch "libata-acpi: add ata port runtime D3Cold support" by Lin Ming introduced a function ata_acpi_wake_dev in libata-acpi.c, and only lives in libata-next tree but not scsi-misc tree. In patch "scsi: sr: support zero power ODD(ZPODD)" I need to set the wakeup_by_user flag of the scsi device in ata_acpi_wake_dev like this: flag. Any suggestions? Another minor issue is, I need to use the can_power_off and wakeup_by_user flag of the scsi_device structure in sr patches, but they are all introduced in patches in libata-next tree, so I have to re-define them in this patch set. Will cause conflict if James send these sr patches to Linus. Any way to avoid this? Thanks, Aaron --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c @@ -985,8 +985,10 @@ static void ata_acpi_wake_dev(acpi_handle handle, u32 event, void *context) struct ata_device *ata_dev = context; if (event == ACPI_NOTIFY_DEVICE_WAKE && ata_dev && - pm_runtime_suspended(&ata_dev->sdev->sdev_gendev)) + pm_runtime_suspended(&ata_dev->sdev->sdev_gendev)) { + ata_dev->sdev->wakeup_by_user = 1; scsi_autopm_get_device(ata_dev->sdev); + } } But since there is no such function in scsi-misc tree, I can't set the