public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Holger Macht <hmacht@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kristen Carlson Accardi <kristen.c.accardi@intel.com>,
	Len Brown <lenb@kernel.org>,
	stable@kernel.org
Subject: Re: [PATCH] ACPI: Set flag DOCK_UNDOCKING when triggered via sysfs
Date: Wed, 12 Mar 2008 11:40:35 +0100	[thread overview]
Message-ID: <20080312104034.GA4371@homac> (raw)
In-Reply-To: <20080311223522.3326b6ee.akpm@linux-foundation.org>

On Di 11. Mär - 22:35:22, Andrew Morton wrote:
> On Wed, 12 Mar 2008 01:07:27 +0100 Holger Macht <hmacht@suse.de> wrote:
> 
> > begin_undock() is only called when triggered via a acpi notify handler
> > (pressing the undock button on the dock station), but complete_undock() is
> > always called after the eject. So if a undock is triggered through a sysfs
> > write, the flag DOCK_UNDOCKING has to be set for the dock station,
> > too. Otherwise this will freeze the system hard.
> > 
> 
> We prefer not to make systems freeze hard.
> 
> > ---
> > 
> > diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
> > index 307cef6..fa44fb9 100644
> > --- a/drivers/acpi/dock.c
> > +++ b/drivers/acpi/dock.c
> > @@ -710,6 +710,7 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr,
> >  	if (!count)
> >  		return -EINVAL;
> >  
> > +	begin_undock(dock_station);
> >  	ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST);
> >  	return ret ? ret: count;
> >  }
> 
> I assume that this is needed in 2.6.24.x as well?

I tested this, and no, I weren't able to reproduce on 2.6.24.

Moreover, it seems that the freeze is related to some libata issue because
it only freezes when a drive is in the dock station.

Nevertheless, I think the patch is correct. Maybe there's a race involved
somewhere I'm not aware of. I really like to wait for Kristen to comment
before pushing it into more trees.

Thanks,
	Holger
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-03-12 10:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12  0:07 [PATCH] ACPI: Set flag DOCK_UNDOCKING when triggered via sysfs Holger Macht
2008-03-12  5:35 ` Andrew Morton
2008-03-12 10:40   ` Holger Macht [this message]
2008-03-13 17:27     ` Kristen Carlson Accardi
2008-03-13 18:14       ` Holger Macht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080312104034.GA4371@homac \
    --to=hmacht@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=kristen.c.accardi@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox