X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=src%2Fcp210x.c;h=81e2e9136d4b58a088c6e5fd1511645a942df35c;hb=a74c472ed86a609ce4892e06fb0174788579da39;hp=d1fbf26753346a7a4a7351dab590fdac21c3fb07;hpb=e1a0c29481c23a33bdf7dcbfb052cd5b9b440286;p=cp210x.git diff --git a/src/cp210x.c b/src/cp210x.c index d1fbf26..81e2e91 100644 --- a/src/cp210x.c +++ b/src/cp210x.c @@ -321,16 +321,10 @@ static int cp210x_reset(struct usb_serial_port *port) { dbg("%s", __FUNCTION__); -#if 1 - /* Is this better than usb_device_reset? It may be. Once a client - * issues the reset ioctl, it must disconnect and reconnect, since the - * USB connections are torn down. We also ignore the error return, - * since the part resets and doesn't send one... + /* Instructing the CP210X to reset seems to work more reliably than + * calling usb_reset_device(). */ cp210x_ctlmsg(port, 0xff, 0x40, 0x0008, 0x00, NULL, 0); -#else - usb_reset_device(port->serial->dev); -#endif return 0; } @@ -445,13 +439,9 @@ static int cp210x_portconfset(struct usb_serial_port *port, lconfig.reset.latch = cpu_to_be16(config->reset.latch); lconfig.suspend.mode = cpu_to_be16(config->suspend.mode); lconfig.suspend.latch = cpu_to_be16(config->suspend.latch); -#if 0 /* apparently not implemented by CP210X firmware */ - lconfig.reset.lowPower = cpu_to_be16(config->reset.lowPower); - lconfig.suspend.lowPower = cpu_to_be16(config->suspend.lowPower); -#else + /* apparently not implemented by CP210X firmware */ lconfig.suspend.lowPower = 0; lconfig.reset.lowPower = 0; -#endif ret = cp210x_ctlmsg(port, 0xff, 0x40, 0x370c, 0, &lconfig, sizeof(struct cp210x_port_config));