USB: serial: mos7720: fix parallel-port state restore
Subsystems (3)
Johan Hovold
maintainerPATCH 1/1 USB: serial: mos7720: fix parallel-port state restore
The parallel-port restore operations is called when a driver claims the port and is supposed to restore the provided state (e.g. saved when releasing the port).
--- drivers/usb/serial/mos7720.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/serial/mos7720.c +2 -0
@@ -639,6 +639,8 @@ static void parport_mos7715_restore_state(struct parport *pp,spin_unlock (&release_lock);return ; } + mos_parport->shadowDCR = s->u.pc.ctr; + mos_parport->shadowECR = s->u.pc.ecr;write_parport_reg_nonblock (mos_parport,MOS7720_DCR , mos_parport->shadowDCR); write_parport_reg_nonblock(mos_parport, MOS7720_ECR,
Signature · 1 line
2.26.2
Quoted 16 lines · Johan Hovold
The parallel-port restore operations is called when a driver claims the port and is supposed to restore the provided state (e.g. saved when releasing the port).
Fixes b69578df7e98 ("USB: usbserial: mos7720: add support for parallel port on moschip 7715")Cc stable <[email protected]> # 2.6.35Signed-off-by Johan Hovold <[email protected]>--- drivers/usb/serial/mos7720.c | 2 ++ 1 file changed, 2 insertions(+)drivers/usb/serial/mos7720.c +0
-0
drivers/usb/serial/mos7720.c static void parport_mos7715_restore_state(struct parport *pp, · line 643
Quoted 5 lines
drivers/usb/serial/mos7720.c +2
-0@@ -639,6 +639,8 @@ static void parport_mos7715_restore_state(struct parport *pp,spin_unlock (&release_lock);return ; } + mos_parport->shadowDCR = s->u.pc.ctr; + mos_parport->shadowECR = s->u.pc.ecr;
Wow that's old code. I'm guessing no one uses these devices really :(
Anyway, nice work:
Quoted 6 lines
drivers/usb/serial/mos7720.c +0
-0write_parport_reg_nonblock (mos_parport,MOS7720_DCR , mos_parport->shadowDCR); write_parport_reg_nonblock(mos_parport, MOS7720_ECR,Signature · 1 line
2.26.2
Johan Hovold
maintainerQuoted 12 lines · Greg Kroah-Hartman
Quoted 11 lines · Johan Hovold
The parallel-port restore operations is called when a driver claims the port and is supposed to restore the provided state (e.g. saved when releasing the port).
Fixes b69578df7e98 ("USB: usbserial: mos7720: add support for parallel port on moschip 7715")Cc stable <[email protected]> # 2.6.35Signed-off-by Johan Hovold <[email protected]>--- drivers/usb/serial/mos7720.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 12 lines
drivers/usb/serial/mos7720.c static void parport_mos7715_restore_state(struct parport *pp, · line 643
Quoted 10 lines
drivers/usb/serial/mos7720.c +2
-0@@ -639,6 +639,8 @@ static void parport_mos7715_restore_state(struct parport *pp,spin_unlock (&release_lock);return ; } + mos_parport->shadowDCR = s->u.pc.ctr; + mos_parport->shadowECR = s->u.pc.ecr;Wow that's old code. I'm guessing no one uses these devices really :(
Possibly, but this would still work as long as you don't switch parallel port driver without disconnecting the mos7715 device in between.
Quoted 3 lines
Anyway, nice work:
Reviewed-by Greg Kroah-Hartman <[email protected]>
Thanks, now applied for -next.
Johan