Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1250493 > unrolled thread
| Started by | Oliver Neukum <oneukum@suse.com> |
|---|---|
| First post | 2015-10-19 11:20 +0200 |
| Last post | 2015-10-19 15:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug Oliver Neukum <oneukum@suse.com> - 2015-10-19 11:20 +0200
Re: [PATCH] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com> - 2015-10-19 15:30 +0200
| From | Oliver Neukum <oneukum@suse.com> |
|---|---|
| Date | 2015-10-19 11:20 +0200 |
| Subject | Re: [PATCH] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug |
| Message-ID | <qleLM-8ro-25@gated-at.bofh.it> |
On Thu, 2015-10-15 at 17:06 -0500, Konstantin Shkolnyy wrote:
> cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped.
> However, SET_LINE_CTL functions properly. When the driver tries to modify
> the register, it reads it, modifies some bits and writes back. Because the
> read bytes were swapped, this often results in an invalid value to be written.
> In turn, this causes cp2108 respond with a stall. The stall sometimes doesn't
> clear properly and cp2108 starts responding to following valid commands also
> with stalls, effectively failing.
Just a remark.
>
> @@ -865,18 +888,53 @@ static void cp210x_break_ctl(struct tty_struct *tty, int break_state)
>
> static int cp210x_startup(struct usb_serial *serial)
> {
> + struct usb_serial_port *port;
> struct usb_host_interface *cur_altsetting;
> struct cp210x_serial_private *spriv;
> + unsigned int line_ctl;
> + int err;
> +
> + /* We always expect a single port only */
> + if (serial->num_ports != 1) {
> + dev_err(&serial->dev->dev, "%s - expected 1 port, found %d\n",
> + __func__, serial->num_ports);
> + return -EINVAL;
> + }
Why do you introduce this new check? It has no obvious connect with the
subject of this fix.
Regards
Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com> |
|---|---|
| Date | 2015-10-19 15:30 +0200 |
| Subject | Re: [PATCH] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug |
| Message-ID | <qliFL-5Ez-79@gated-at.bofh.it> |
| In reply to | #1250493 |
On Mon, Oct 19, 2015 at 4:14 AM, Oliver Neukum <oneukum@suse.com> wrote:
> On Thu, 2015-10-15 at 17:06 -0500, Konstantin Shkolnyy wrote:
>> cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped.
>> However, SET_LINE_CTL functions properly. When the driver tries to modify
>> the register, it reads it, modifies some bits and writes back. Because the
>> read bytes were swapped, this often results in an invalid value to be written.
>> In turn, this causes cp2108 respond with a stall. The stall sometimes doesn't
>> clear properly and cp2108 starts responding to following valid commands also
>> with stalls, effectively failing.
>
> Just a remark.
>>
>> @@ -865,18 +888,53 @@ static void cp210x_break_ctl(struct tty_struct *tty, int break_state)
>>
>> static int cp210x_startup(struct usb_serial *serial)
>> {
>> + struct usb_serial_port *port;
>> struct usb_host_interface *cur_altsetting;
>> struct cp210x_serial_private *spriv;
>> + unsigned int line_ctl;
>> + int err;
>> +
>> + /* We always expect a single port only */
>> + if (serial->num_ports != 1) {
>> + dev_err(&serial->dev->dev, "%s - expected 1 port, found %d\n",
>> + __func__, serial->num_ports);
>> + return -EINVAL;
>> + }
>
> Why do you introduce this new check? It has no obvious connect with the
> subject of this fix.
Because I later use the port[0] field that this function hasn't
touched before. But this all will go away in the new version of the
patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web