Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756146AbZDYJ0s (ORCPT ); Sat, 25 Apr 2009 05:26:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753974AbZDYJ0i (ORCPT ); Sat, 25 Apr 2009 05:26:38 -0400 Received: from ppp-111-148.adsl.restena.lu ([158.64.111.148]:58761 "EHLO bonbons.gotdns.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753953AbZDYJ0g convert rfc822-to-8bit (ORCPT ); Sat, 25 Apr 2009 05:26:36 -0400 X-Greylist: delayed 495 seconds by postgrey-1.27 at vger.kernel.org; Sat, 25 Apr 2009 05:26:36 EDT Date: Sat, 25 Apr 2009 11:18:18 +0200 From: Bruno =?UTF-8?B?UHLDqW1vbnQ=?= To: Ciprian Dorin =?UTF-8?B?Q3LEg2NpdW4=?= Cc: Linux IDE , Linux Kernel , Linux SCSI , Tejun Heo Subject: Re: Stop disks on reboot for laptop which cuts power Message-ID: <20090425111818.1728cf21@neptune.home> In-Reply-To: <9f0e232d-4901-4e60-ac83-c14a6405202d@z5g2000yqn.googlegroups.com> References: <9f0e232d-4901-4e60-ac83-c14a6405202d@z5g2000yqn.googlegroups.com> X-Mailer: Claws Mail 3.7.0 (GTK+ 2.14.7; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3683 Lines: 109 On Sat, 25 April 2009 Ciprian Dorin Craciun wrote: > On Apr 18, 7:30 pm, Bruno Prémont wrote: > > Hi, > > > > During shutdown (power off) the disks are stopped gracefully thus > > the stopping is skipped for reboot case. > > > > On my Acer Travelmate 660 reboot is more like power-off as it cuts > > all power during reboot which currently causes the disk to > > emergency-park its head (noisy and shortens disk life). > > > > This patch series adds a DMI-based check to ide-gd and sd to still > > stop the disks for affected laptop during reboot. > > > > Has been compile an run-tested with libata and just compile-tested > > for ide. > > > > Bruno Prémont > > (I've tried to reply to the group by google-groups, but it didn't > worked...) > > I have a Benq JoyBook S32 laptop that has the same behaviour... > I've applied you patch, and just replaced the condition (dmi_...) with > true, and now my laptop works OK while rebooting (it doesn't just cut > power to the disks)... > > So I would say this is a very needed patch for the mainline > kernel... Will it be included? Also how do I add my laptop to the > table provided in your patch? > > Thanks, > Ciprian Craciun. > Just a note, my patches do not change the BIOS behavior on reboot, thus power is still being cut if it was so before applying the patches. But it stops the disks first so those do not suffer from the power cut. The variant for IDE-GD is on its way for inclusion, for the SD one I don't know. Below is a sample patch to add your system to the list, please check if it works when applied on top of my 2 patches. If it doesn't you will have to adjust the name of your laptop's manufacturer and it's product name to correctly match your system. Please report if it works (or what manufacturer/product name it works with) for you. The right information can be extracted from dmidecode (System Information block) Tejun suggested eventually stopping the disks for all machines though as far as I can see here my laptop is the only one affected out of a dozen different boxes I have around. (eventually just doing it for laptops might be reasonable as generalization) Bruno --- sd, ide-gd: stop disk on reboot for Benq JoyBook S32 Ciprian Craciun reported that Benq JoyBook S32 was affected by the same power-cut on reboot as Acer TravelMate 660, so add it to the list. --- diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c index 4b6b71e..a78813d 100644 --- a/drivers/ide/ide-gd.c +++ b/drivers/ide/ide-gd.c @@ -109,6 +109,14 @@ static const struct dmi_system_id ide_coldreboot_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"), }, }, + { + /* Benq JoyBook S32 cuts power during reboot */ + .ident = "Benq JoyBook S32", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Benq"), + DMI_MATCH(DMI_PRODUCT_NAME, "JoyBook S32"), + }, + }, { } /* terminate list */ }; diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index fdad8bc..68c828a 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2137,6 +2137,14 @@ static const struct dmi_system_id sd_coldreboot_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"), }, }, + { + /* Benq JoyBook S32 cuts power during reboot */ + .ident = "Benq JoyBook S32", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Benq"), + DMI_MATCH(DMI_PRODUCT_NAME, "JoyBook S32"), + }, + }, { } /* terminate list */ }; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/