From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933868AbcBDLkC (ORCPT ); Thu, 4 Feb 2016 06:40:02 -0500 Received: from mx2.suse.de ([195.135.220.15]:58697 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933227AbcBDLj7 (ORCPT ); Thu, 4 Feb 2016 06:39:59 -0500 Message-ID: <1454585845.16206.2.camel@suse.com> Subject: Re: [Resend PATCH 3/3] scsi:stex.c Add S3/S4 support From: Oliver Neukum To: Charles Chiou Cc: Johannes Thumshirn , Christoph Hellwig , JBottomley@parallels.com, grace.chang@tw.promise.com, linus.chen@tw.promise.com, victor.p@promise.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, eva.cheng@tw.promise.com Date: Thu, 04 Feb 2016 12:37:25 +0100 In-Reply-To: <56B33493.80300@gmail.com> References: <55E83F66.2060300@gmail.com> <56AB4BBD.2030702@gmail.com> <56B33493.80300@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-02-04 at 19:22 +0800, Charles Chiou wrote: > +static int stex_choice_sleep_mic(pm_message_t state) > +{ > + switch (state.event) { > + case PM_EVENT_SUSPEND: > + return ST_S3; > + case PM_EVENT_FREEZE: Why do you react to PM_EVENT_FREEZE at all? That is too early. You will get a HIBERNATE event anyway. If the write out fails you are in trouble if you already reacted to PM_EVENT_FREEZE Regards Oliver