X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=src%2Fcp210x.c.karmic;fp=src%2Fcp210x.c.karmic;h=84d1b93d528e4f969600cbc98cb82adac5d57fa5;hb=a74c472ed86a609ce4892e06fb0174788579da39;hp=267ff4c8b50401b97d1ecc9592ccfc636ebe2d9c;hpb=e1a0c29481c23a33bdf7dcbfb052cd5b9b440286;p=cp210x.git diff --git a/src/cp210x.c.karmic b/src/cp210x.c.karmic index 267ff4c..84d1b93 100644 --- a/src/cp210x.c.karmic +++ b/src/cp210x.c.karmic @@ -342,16 +342,10 @@ static int cp210x_reset(struct usb_serial_port *port) { dbg("%s", __func__); -#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; } @@ -466,13 +460,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));