From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from duke.felloff.net ([216.126.196.34]) by ewsd; Thu Jun 11 13:10:41 EDT 2020 Message-ID: <46EFE19EBB1B74CCB387820F084840C6@felloff.net> Date: Thu, 11 Jun 2020 19:10:22 +0200 From: cinap_lenrek@felloff.net To: 9front@9front.org Subject: Re: [9front] new nusb/serial driver In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: responsive shared SOAP over SQL browser-scale realtime-java generator > 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