Re: CFR: ACPI Dock driver

From: Gavin Atkinson <gavin.atkinson_at_ury.york.ac.uk>
Date: Sat, 15 Apr 2006 11:13:12 +0100 (BST)
On Fri, 14 Apr 2006, [ISO-8859-1] Søren Schmidt wrote:

> On Fre, 2006-04-14 at 23:30 +0900, Mitsuru IWASAKI wrote:
>> Hi, Soren.
>> I've found the problem with detached ATA channel suspending.
>> After detaching second channel, the system drops into infinity
>> loop at ata_suspend().
>> I'll commit the following patches with acpi_dock patches, so
>> please refine these if they have any problem.
>
> Uhm, would this simple patch help you ?
>
> --- ata-all.c   31 Mar 2006 08:09:04 -0000      1.271
> +++ ata-all.c   14 Apr 2006 15:39:20 -0000
> _at__at_ -277,8 +277,8 _at__at_
>     if (!dev || !(ch = device_get_softc(dev)))
>        return ENXIO;
>
> -    /* wait for the channel to be IDLE before entering suspend mode */
> -    while (1) {
> +    /* wait for the channel to be IDLE or detached before suspending */
> +    while (ch->r_irq) {
>        mtx_lock(&ch->state_mtx);
>        if (ch->state == ATA_IDLE) {
>            ch->state = ATA_ACTIVE;
>
> That I'll gladly commit for you instead...

Is there any chance this will also fix the panic myself and several others 
have been seeing with suspend and CD-ROM drives?
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/current/2005-08/0996.html

I'll take my laptop to top-of-tree CURRENT in the next day or so to try 
it.

Gavin
Received on Sat Apr 15 2006 - 08:13:17 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:54 UTC