9front - general discussion about 9front
 help / color / mirror / Atom feed
From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] new nusb/serial driver
Date: Thu, 11 Jun 2020 19:10:22 +0200	[thread overview]
Message-ID: <46EFE19EBB1B74CCB387820F084840C6@felloff.net> (raw)
In-Reply-To: <CAHwi9bz-SAHQUbG8ftSNeBcZu19eXkQM_8YOfUCOWPq_CKCeiQ@mail.gmail.com>

> I only did that because the other drivers did it.

yeah, it could be that they'r also wrong. or the devices they support
have broken descriptors... or they did the same as you and just copied
it from another driver. :)

> It seems to work just as well without that

good. then i'd suggest we leave it out. given that cdc is a generic
standard, we should use the value the device advertises as we'r not
targeting specific chips where we know which packet sizes will work
or not.

another issue:

> 	if(epin == -1 || epout == -1 || (ser->hasepintr && epintr == -1)){
> 		ifc++;
> 		if(ifc > 1)
> 			return -1;
> 		goto TOPFINDEPS;
> 	}

i think this should not be done here. rather, we should do that in
the caller of findendendpoints(), and have it continue if it cant
open a interface. and only fail in the end when all interfaces
failed to be usable.

the reason is the caller already iterates over the interfaces,
and the task of this function is to bring the interface up that
was passed to it.

otherwise, everything looks good. you are almost there! :-)

--
cinap


  reply	other threads:[~2020-06-11 17:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11  7:03 Eli Cohen
2020-06-11  7:17 ` [9front] " Alex Musolino
2020-06-11  7:19   ` Eli Cohen
2020-06-11  7:29     ` Alex Musolino
2020-06-11  7:36       ` Eli Cohen
2020-06-11  7:57         ` Eli Cohen
2020-06-11 12:15           ` cinap_lenrek
2020-06-11 14:08             ` Eli Cohen
2020-06-11 17:10               ` cinap_lenrek [this message]
2020-06-12  1:28                 ` Eli Cohen
2020-06-12 18:02                 ` cinap_lenrek
2020-06-12 22:15                   ` Eli Cohen
2020-06-13 14:03                     ` cinap_lenrek
2020-06-13 14:18                       ` Eli Cohen
2020-06-13 15:37                         ` 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=46EFE19EBB1B74CCB387820F084840C6@felloff.net \
    --to=cinap_lenrek@felloff.net \
    --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).