From patchwork Wed Nov 25 17:11:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 39369 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 4947BB7067 for ; Thu, 26 Nov 2009 04:22:22 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934757AbZKYRMc (ORCPT ); Wed, 25 Nov 2009 12:12:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933760AbZKYRM3 (ORCPT ); Wed, 25 Nov 2009 12:12:29 -0500 Received: from ey-out-2122.google.com ([74.125.78.26]:30269 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933637AbZKYRMZ (ORCPT ); Wed, 25 Nov 2009 12:12:25 -0500 Received: by ey-out-2122.google.com with SMTP id 4so1570886eyf.19 for ; Wed, 25 Nov 2009 09:12:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=EXW+558L0Gsjb+zotvce864Pl+EzddkZrGqAIhtoZGs=; b=lt+F/VqNtgiR5kjNzro0TnTom46hn1bgFXZ3IsRdoJSlfHq7d4WvMjpRVLjOi1Uzv5 DyzdG6fKK2ZKdUgo9o1mLcMX11kY92+epdHp8jGGTWQABCZfMoyZaMqdqkFzWBvp9SYH BEI+QgKISrPQqm/l+DVB1WqpZvosEOCKdHcdY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=kfK14i8jWvFjLp3OxiQVeghzaFY6R9G8u0EEh9GsAawijfx8mnjLXZYDNgBOGjZDID yp24tQ4me0KxyRR+hgATOyA2B1/B7dA59jxM9KLW78Xu9IPT6gJgXQlMYw02TJRqyi40 CgcOwjkaNOVOv2I50sjJuDJ/1BnHo7eSs8uu0= Received: by 10.216.87.5 with SMTP id x5mr2535360wee.75.1259169151810; Wed, 25 Nov 2009 09:12:31 -0800 (PST) Received: from ?127.0.0.1? (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id q9sm14671158gve.15.2009.11.25.09.12.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Nov 2009 09:12:30 -0800 (PST) From: Bartlomiej Zolnierkiewicz To: linux-ide@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org Date: Wed, 25 Nov 2009 18:11:47 +0100 Message-Id: <20091125171147.5446.15532.sendpatchset@localhost> In-Reply-To: <20091125170218.5446.13513.sendpatchset@localhost> References: <20091125170218.5446.13513.sendpatchset@localhost> Subject: [PATCH 78/86] pata_sis: Power Management fix Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org From: Bartlomiej Zolnierkiewicz Subject: [PATCH] pata_sis: Power Management fix Call sis_fixup() on resume. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ata/pata_sis.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) -- 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 Index: b/drivers/ata/pata_sis.c =================================================================== --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c @@ -2,7 +2,7 @@ * pata_sis.c - SiS ATA driver * * (C) 2005 Red Hat - * (C) 2007 Bartlomiej Zolnierkiewicz + * (C) 2007,2009 Bartlomiej Zolnierkiewicz * * Based upon linux/drivers/ide/pci/sis5513.c * Copyright (C) 1999-2000 Andre Hedrick @@ -829,6 +829,23 @@ static int sis_init_one (struct pci_dev return ata_pci_sff_init_one(pdev, ppi, &sis_sht, chipset); } +#ifdef CONFIG_PM +static int sis_reinit_one(struct pci_dev *pdev) +{ + struct ata_host *host = dev_get_drvdata(&pdev->dev); + int rc; + + rc = ata_pci_device_do_resume(pdev); + if (rc) + return rc; + + sis_fixup(pdev, host->private_data); + + ata_host_resume(host); + return 0; +} +#endif + static const struct pci_device_id sis_pci_tbl[] = { { PCI_VDEVICE(SI, 0x5513), }, /* SiS 5513 */ { PCI_VDEVICE(SI, 0x5518), }, /* SiS 5518 */ @@ -844,7 +861,7 @@ static struct pci_driver sis_pci_driver .remove = ata_pci_remove_one, #ifdef CONFIG_PM .suspend = ata_pci_device_suspend, - .resume = ata_pci_device_resume, + .resume = sis_reinit_one, #endif };