{
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;
}
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));
{
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;
}
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));