public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alex Villacís Lasso" <a_villacis@palosanto.com>
To: David Frey <dpfrey@gmail.com>, Johan Hovold <johan@kernel.org>
Cc: linux-usb@vger.kernel.org, Pho Tran <pho.tran@silabs.com>,
	Tung Pham <tung.pham@silabs.com>,
	Hung.Nguyen@silabs.com
Subject: Re: cp210x module broken in 5.12.5 and 5.12.6, works in 5.11.21 (with bisection)
Date: Mon, 7 Jun 2021 18:50:05 -0500	[thread overview]
Message-ID: <9f7e4dac-dc1c-2011-2ddd-5debd32539fb@palosanto.com> (raw)
In-Reply-To: <CAAvkfd-mnb-g_ANwXeMn03rDfOSJrFkCREtPMGB=KZOUDg4gKg@mail.gmail.com>

El 7/6/21 a las 15:44, David Frey escribió:
> On Mon, Jun 7, 2021 at 11:02 AM David Frey <dpfrey@gmail.com> wrote:
>> I made a bit of progress.  I found that CP210xManufacturing.dll was
>> bundled with Simplicity Studio and in the same folder as the DLL was
>> inspect_usbxpress.exe.  It looks like that tool is able to report the
>> firmware version of the device.  In the output below, the first run is
>> against the device that I am able to program successfully on any
>> kernel and that shows firmware 1.0.6.  The second run is against a
>> device that I can't program and it shows firmware version 1.0.4.  I
>> recall reading some information that 1.0.6 is A02 and that 1.0.4 is
>> A01, but I think there might have been another firmware revision
>> that's also A01 (maybe 1.0.2?).  I can't find the source of this
>> information anymore.  I'm going to try to figure out how to use
>> wireshark to capture USB traffic now.
>>
>> C:\SiliconLabs\SimplicityStudio\v5\developer\adapter_packs\inspect_usbxpress>.\inspect_usbxpress.exe
>> -slist
>> serial_no =
>> deviceCount = 1
>> device (0) {
>>    SoftIndex = 0
>>    adapterLabel = CP2102N USB to UART Bridge Controller (ID:0)
>>    SerialNo = 1017bfe99d98e8118ea47540c3e5cfbd
>>    Vid = 0
>>    Pid = 0
>>    PartNumber = 32
>>    BoardID =
>>    BoardCount = 0
>>    FirmwareVersion = 1.0.6
>>    Name = cp2102N version 1.0.6
>>    Type = CP210x
>>    Family = USBXpress
>>    Locked = 1
>> }
>>
>> C:\SiliconLabs\SimplicityStudio\v5\developer\adapter_packs\inspect_usbxpress>.\inspect_usbxpress.exe
>> -slist
>> serial_no =
>> deviceCount = 1
>> device (0) {
>>    SoftIndex = 0
>>    adapterLabel = CP2102N USB to UART Bridge Controller (ID:0)
>>    SerialNo = f06e721e74e1ea11bd9ddc2d9a583cc7
>>    Vid = 0
>>    Pid = 0
>>    PartNumber = 32
>>    BoardID =
>>    BoardCount = 0
>>    FirmwareVersion = 1.0.4
>>    Name = cp2102N version 1.0.4
>>    Type = CP210x
>>    Family = USBXpress
>>    Locked = 1
>> }
> I configured wireshark on Windows to capture the USB traffic and I ran
> the inspect_usbxpress.exe.  I believe the request/response where the
> firmware version is provided is in packets 38/39 in the attached
> trace.  Perhaps the mailing list will strip the trace, so I will
> describe it a bit.
>
> Setup packet:
>    bmRequestType: 0xC0 (device-to-host, vendor, device recipient)
>    bRequest: 255
>    wValue: 0x0010
>    wIndex: 0
>    wLength: 3
>
> Response Data: {0x01, 0x00, 0x04}
>
> When I captured the trace for the other device, the response data was
> {0x01, 0x00, 0x06} indicating firmware version 1.0.6.
>
> Let me know if there is any other information I can provide.

Yes! This is exactly the information required to query the firmware. Now 
a patch should be made that calls cp210x_read_vendor_block(), which 
internally uses CP210X_VENDOR_SPECIFIC (0xFF) with a #define 
CP210X_READ_FIRMWARE_VER    0x0010, and a 3-byte buffer that will 
contain the firmware version. Then the driver will refrain from 
programming the XON/XOFF limits if the firmware version is not the fixed 
one.


  reply	other threads:[~2021-06-07 23:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31 17:38 cp210x module broken in 5.12.5 and 5.12.6, works in 5.11.21 (with bisection) Alex Villacís Lasso
2021-06-01  7:50 ` Johan Hovold
2021-06-01 14:51   ` Alex Villacís Lasso
2021-06-01 15:40     ` Johan Hovold
2021-06-01 17:18       ` Alex Villacís Lasso
2021-06-02 14:50         ` Johan Hovold
2021-06-02 15:54           ` Alex Villacís Lasso
2021-06-04 15:42             ` Johan Hovold
2021-06-04 18:25               ` Alex Villacís Lasso
2021-06-05 10:24                 ` Johan Hovold
2021-06-05 10:54                   ` Johan Hovold
2021-06-04 23:16               ` David Frey
2021-06-05 10:13                 ` Johan Hovold
2021-06-07 15:16                   ` Alex Villacís Lasso
2021-06-07 16:45                     ` Johan Hovold
2021-06-07 16:44                   ` David Frey
2021-06-07 16:52                     ` Johan Hovold
2021-06-07 18:02                       ` David Frey
2021-06-07 20:44                         ` David Frey
2021-06-07 23:50                           ` Alex Villacís Lasso [this message]
2021-06-08  9:10                             ` Tung Pham
2021-06-08  9:52                               ` Johan Hovold
2021-06-08  9:41                           ` Johan Hovold
2021-06-09 16:15                             ` [PATCH] USB: serial: cp210x: fix CP2102N-A01 modem control Johan Hovold
2021-06-09 17:00                               ` Alex Villacís Lasso
2021-06-10  7:23                                 ` Johan Hovold
2021-06-10 14:55                                   ` Alex Villacís Lasso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f7e4dac-dc1c-2011-2ddd-5debd32539fb@palosanto.com \
    --to=a_villacis@palosanto.com \
    --cc=Hung.Nguyen@silabs.com \
    --cc=dpfrey@gmail.com \
    --cc=johan@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pho.tran@silabs.com \
    --cc=tung.pham@silabs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox