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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Alan Stern

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux