Re: non-standard baud rates with Prolific 2303 USB-serial

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 12, 2021 at 08:17:55AM -0500, Michael G. Katzmann wrote:
> On 3/11/21 11:08 AM, Johan Hovold wrote:

> >> static speed_t pl2303_encode_baud_rate_divisor( struct usb_serial_port *port,
> >> 							unsigned char buf[4],
> >> 								speed_t baud)
> >> {
> >> 	unsigned int baseline, mantissa, exponent;
> >> 	struct usb_serial *serial = port->serial;
> >> 	struct pl2303_serial_private *spriv = usb_get_serial_data(serial);
> >>
> >> 	/*
> >> 	 * Apparently the formula is:
> >> 	 * baudrate = 12M * 32 / (mantissa * 4^exponent)
> >> 	 * where
> >> 	 *   mantissa = buf[8:0]
> >> 	 *   exponent = buf[11:9]
> >> 	 *
> >> 	 * TA version has more precision
> >> 	 *      uses mantissa = buf[bits 10:0 ]
> > So you discovered that there were even more bits here? Your first
> > version used ten bits, I believe.
> >
> > I got an offline mail from a third person having problems with the TA
> > and who had also verified eleven bits here.
> 
> I was basing this on Joe's discovery of the value used for 110 bd by
> the windows driver (confirmed by Charles). The sequence 80 01 a6 a8
> implies that the mantissa is 0x6a8 (i.e. 11 bits). The tests that I
> did seemed to confirm this.

Ah, of course.

> Pardon my ignorance of the process but where is the git repo for this
> development branch?

I'll wait for a few days before applying the series I posted yesterday
to the usb-next (development) branch, but I've pushed a pl2303-wip
branch for you that you can use use until then:

	https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git/log/?h=pl2303-wip

You can fetch from

	https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git

Johan



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux