uftdi bug?

Emmanuel Dreyfus <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
Hello

uftdi_read() does not update the count parameter. I would expect it 
to do this:
--- sys/dev/usb/uftdi.c 11 May 2025 22:36:13 -0000      1.81
+++ sys/dev/usb/uftdi.c 21 Aug 2025 15:30:54 -0000
@@ -558,8 +558,9 @@
        }
 
        /* Adjust buffer pointer to skip status prefix */
        *ptr += 2;
+       *count -= 2;
 }
 
 static void
 uftdi_write(void *vsc, int portno, u_char *to, u_char *from, uint32_t *count)

But such a change breaks ucom. Did I misunderstood the way it should work, 
or is it a bug that is worked arond somewhere else?

-- 
Emmanuel Dreyfus
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.