From patchwork Mon Jul 6 04:19:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Adrian X-Patchwork-Id: 491418 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pa0-x237.google.com (mail-pa0-x237.google.com [IPv6:2607:f8b0:400e:c03::237]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 28BBA140771 for ; Mon, 6 Jul 2015 14:20:37 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b=V++T/Nec; dkim-atps=neutral Received: by padia9 with SMTP id ia9sf25255910pad.0 for ; Sun, 05 Jul 2015 21:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :reply-to:content-type:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe; bh=mtjZMBYkIIsdDX7FrZLY7tN+/Lh1MfYSljd0EpvRXr4=; b=V++T/NecCQ3z9xp7n6ookQPmX/KuWSOp69plbdFPikx/vJ8aLFXYGjNWR1zq4HIVbf rQq3t7RSD4ikHLnSImoUjbrPapuOiOCniogv64Zf+dNIL8CrydFyHkwYnaTBM+6Xy8t9 j6b5x3oy7eNjIBmHvQqSXoc/h6jdTxOQ5eLrL9iwUYlGDHJQ5dJlxvvc0CJwRPjDJdhF kxxdigtQli63LShKaJYOb1ZrUQGO6Jr/fWDYfyNKB+ojsGeTdTppFv5UZ5B6eE1FsDKt k6Yfh+I4kWxiBhRo/Z6OUACeLLf/p51lJCcP5IqjIt2Mm7106t0A4lu8uaQljxH+58s7 V3Sg== X-Received: by 10.182.245.130 with SMTP id xo2mr154301obc.30.1436156435226; Sun, 05 Jul 2015 21:20:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.182.165.2 with SMTP id yu2ls1003930obb.4.gmail; Sun, 05 Jul 2015 21:20:34 -0700 (PDT) X-Received: by 10.182.94.179 with SMTP id dd19mr54002572obb.13.1436156434981; Sun, 05 Jul 2015 21:20:34 -0700 (PDT) Received: from mail-pa0-x229.google.com (mail-pa0-x229.google.com. [2607:f8b0:400e:c03::229]) by gmr-mx.google.com with ESMTPS id ra16si1729551pac.0.2015.07.05.21.20.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Jul 2015 21:20:34 -0700 (PDT) Received-SPF: pass (google.com: domain of adrianhuang0701@gmail.com designates 2607:f8b0:400e:c03::229 as permitted sender) client-ip=2607:f8b0:400e:c03::229; Received: by mail-pa0-x229.google.com with SMTP id tm7so88425590pac.2 for ; Sun, 05 Jul 2015 21:20:34 -0700 (PDT) X-Received: by 10.70.102.11 with SMTP id fk11mr100220413pdb.144.1436156434847; Sun, 05 Jul 2015 21:20:34 -0700 (PDT) Received: from localhost.localdomain (122-121-100-89.dynamic.hinet.net. [122.121.100.89]) by mx.google.com with ESMTPSA id im7sm16437406pbc.25.2015.07.05.21.20.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 05 Jul 2015 21:20:33 -0700 (PDT) From: Adrian Huang To: Alexandre Belloni , Alessandro Zummo Cc: rtc-linux@googlegroups.com, Borislav Petkov , Thomas Gleixner , John Stultz , Egbert Eich , Diego Ercolani , Nagananda Chumbalkar , Max Asbock , Adrian Huang , Adrian Huang Subject: [rtc-linux] [RFC PATCH v4 2/2] rtc-cmos: Revert "rtc-cmos: Add an alarm disable quirk" Date: Mon, 6 Jul 2015 12:19:13 +0800 Message-Id: <1436156353-3599-3-git-send-email-adrianhuang0701@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436156353-3599-1-git-send-email-adrianhuang0701@gmail.com> References: <1436156353-3599-1-git-send-email-adrianhuang0701@gmail.com> X-Original-Sender: AdrianHuang0701@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of adrianhuang0701@gmail.com designates 2607:f8b0:400e:c03::229 as permitted sender) smtp.mail=adrianhuang0701@gmail.com; dmarc=pass (p=NONE dis=NONE) header.from=gmail.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: rtc-linux@googlegroups.com X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Commit d5a1c7e3fc38 ("rtc-cmos: Add an alarm disable quirk") that added a special quirk is not needed because [PATCH 1/2] of this patchset makes the kernel more robust: rtc-cmos: Cancel alarm timer if alarm time is equal to now+1 seconds Signed-off-by: Adrian Huang Tested-by: Egbert Eich Tested-by: Diego Ercolani Cc: Borislav Petkov --- drivers/rtc/rtc-cmos.c | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index f8900aa..916bd1f 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -41,7 +41,6 @@ #include #include #include -#include /* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */ #include @@ -383,50 +382,6 @@ static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t) return 0; } -/* - * Do not disable RTC alarm on shutdown - workaround for b0rked BIOSes. - */ -static bool alarm_disable_quirk; - -static int __init set_alarm_disable_quirk(const struct dmi_system_id *id) -{ - alarm_disable_quirk = true; - pr_info("BIOS has alarm-disable quirk - RTC alarms disabled\n"); - return 0; -} - -static const struct dmi_system_id rtc_quirks[] __initconst = { - /* https://bugzilla.novell.com/show_bug.cgi?id=805740 */ - { - .callback = set_alarm_disable_quirk, - .ident = "IBM Truman", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), - DMI_MATCH(DMI_PRODUCT_NAME, "4852570"), - }, - }, - /* https://bugzilla.novell.com/show_bug.cgi?id=812592 */ - { - .callback = set_alarm_disable_quirk, - .ident = "Gigabyte GA-990XA-UD3", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, - "Gigabyte Technology Co., Ltd."), - DMI_MATCH(DMI_PRODUCT_NAME, "GA-990XA-UD3"), - }, - }, - /* http://permalink.gmane.org/gmane.linux.kernel/1604474 */ - { - .callback = set_alarm_disable_quirk, - .ident = "Toshiba Satellite L300", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), - DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"), - }, - }, - {} -}; - static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled) { struct cmos_rtc *cmos = dev_get_drvdata(dev); @@ -435,9 +390,6 @@ static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled) if (!is_valid_irq(cmos->irq)) return -EINVAL; - if (alarm_disable_quirk) - return 0; - spin_lock_irqsave(&rtc_lock, flags); if (enabled) @@ -1300,8 +1252,6 @@ static int __init cmos_init(void) platform_driver_registered = true; } - dmi_check_system(rtc_quirks); - if (retval == 0) return 0;