Re: [linux-pm] [PATCH, fix] Re: [Regression] 2.6.31-git: tty change broke resume from hibernation on MSI Wind U100

From: Dave Young
Date: Mon Sep 28 2009 - 20:39:19 EST


On Tue, Sep 29, 2009 at 4:20 AM, Rafael J. Wysocki <rjw@xxxxxxx> wrote:
> On Monday 28 September 2009, Alan Stern wrote:
>> On Mon, 28 Sep 2009, Dave Young wrote:
>>
>> > On Mon, Sep 28, 2009 at 2:16 AM, Rafael J. Wysocki <rjw@xxxxxxx> wrote:
>> > > On Sunday 27 September 2009, Alan Stern wrote:
>> > >> On Sun, 27 Sep 2009, Rafael J. Wysocki wrote:
>> > >>
>> > >> > Tested, works.
>> > >> >
>> > >> > Greg, could you please consider taking the patch below? Ã It fixes a recent
>> > >> > hibernation regression for me, so if not this one, another fix is necessary.
>> > >>
>> > >> This patch has a mistake.
>> > >>
>> > >> > Index: linux-2.6/drivers/usb/serial/usb-serial.c
>> > >> > ===================================================================
>> > >> > --- linux-2.6.orig/drivers/usb/serial/usb-serial.c
>> > >> > +++ linux-2.6/drivers/usb/serial/usb-serial.c
>> > >> > @@ -1210,7 +1210,7 @@ static const struct tty_operations seria
>> > >> > Ã ÂÃ Â.chars_in_buffer = Ã ÂÃ ÂÃ serial_chars_in_buffer,
>> > >> > Ã ÂÃ Â.tiocmget = Ã ÂÃ ÂÃ ÂÃ ÂÃ ÂÃ Âserial_tiocmget,
>> > >> > Ã ÂÃ Â.tiocmset = Ã ÂÃ ÂÃ ÂÃ ÂÃ ÂÃ Âserial_tiocmset,
>> > >> > - Ã Â.shutdown = Ã ÂÃ ÂÃ ÂÃ ÂÃ ÂÃ Âserial_release,
>> > >> > + Ã Â.cleanup = Ã ÂÃ ÂÃ ÂÃ ÂÃ ÂÃ ÂÃ serial_release,
>> > >> > Ã ÂÃ Â.install = Ã ÂÃ ÂÃ ÂÃ ÂÃ ÂÃ ÂÃ serial_install,
>> > >> > Ã ÂÃ Â.proc_fops = Ã ÂÃ ÂÃ ÂÃ ÂÃ ÂÃ &serial_proc_fops,
>> > >> > Ã };
>> > >>
>> > >> It isn't enough to change the method pointer. Ã The code in
>> > >> serial_release() has to be changed too; it must not call tty_shutdown()
>> > >> any more.
>> > >
>> > > Would it be sufficient to remove the tty_shutdown() call from
>> > > serial_release()?
>> >
>> > I think so, because standard shutdown will be called in queue_release_one_tty.
>> >
>> > Alan, could you confirm about this? ÂThus I'd like to update the patch.
>>
>> Yes, that's right. ÂJust remove the function call. ÂBut what happens if
>> the device is a serial console? ÂShouldn't the call to tty_shutdown()
>> be skipped in that case? Â(Eventually this won't matter; the console
>> code will be straightened out so that we never release a serial console
>> device. ÂBut for now it's important.)
>>
>> If you think it would be appropriate, you could also rename
>> serial_release() to serial_cleanup() -- it's up to you.
>
> The patch has been fixed up by Linus and merged as
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f278a2f7bbc2239f479eaf63d0b3ae573b1d746c
>
> If any more fixes are necessary, they'll have to go on top of it.

Oh, I'm late. Thanks for tell

>
> Best,
> Rafael
>



--
Regards
dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/