9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Michael Forney <mforney@mforney.org>
To: 9front@9front.org
Subject: Re: [9front] Re: [PATCH] nusb/serial: fix pl2303 usbcmd error checks
Date: Wed, 2 Mar 2022 13:06:40 -0800	[thread overview]
Message-ID: <CAGw6cBttCnwM29evR-NfCgcMw7w5fqTPnsqNPvX454xYU=mVUg@mail.gmail.com> (raw)
In-Reply-To: <7AEFE9FB827E6798723FEAD905091F7F@felloff.net>

On 2022-03-02, cinap_lenrek@felloff.net <cinap_lenrek@felloff.net> wrote:
> still seems to work fine with the latest patch.
>
> attach 8 1a86 7523 0000ff 55b22

Those device IDs match ch340.c, not prolific.c.

The prolific one was bugged since the referenced commit:
http://git.9front.org/plan9front/plan9front/e0087b2a78d7229d8d2b148b8def688be6639797/commit.html

In prolific.c, vendorwrite and plsetparam call usbcmd with Rh2d and
some ndata (0 or ParamReqSz), and then errors out when the result is
not 8+ndata. That previous commit made usbcmd with Rh2d return ndata,
not 8+ndata, so it is now failing.

Here are the error messages I was getting:

term% nusb/serial 7
serial: vendorwrite failed with res=0
serial: vendorwrite failed with res=0
serial: vendorwrite failed with res=0
serial: vendorwrite failed with res=0
serial: vendorwrite failed with res=0
term% echo 'b 19200' >/dev/eiaU7ctl
serial: vendorwrite failed with res=0
serial: vendorwrite failed with res=0
serial: plsetparam failed with res=7
echo: write error: bad control request

  reply	other threads:[~2022-03-02 21:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-01 22:51 [9front] " Michael Forney
2022-02-28 23:55 ` [9front] " Michael Forney
2022-03-02  4:08   ` ori
2022-03-02 19:09     ` cinap_lenrek
2022-03-02 19:12     ` cinap_lenrek
2022-03-02 21:06       ` Michael Forney [this message]
2022-03-04 10:47         ` cinap_lenrek

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='CAGw6cBttCnwM29evR-NfCgcMw7w5fqTPnsqNPvX454xYU=mVUg@mail.gmail.com' \
    --to=mforney@mforney.org \
    --cc=9front@9front.org \
    /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;
as well as URLs for NNTP newsgroup(s).