Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 710588
Collapse All | Expand All

(-)a/drivers/usb/serial/ch341.c (+13 lines)
Lines 205-210 Link Here
205
			16 * speed - 16 * CH341_CLKRATE / (clk_div * (div + 1)))
205
			16 * speed - 16 * CH341_CLKRATE / (clk_div * (div + 1)))
206
		div++;
206
		div++;
207
207
208
/*
209
	 * Prefer lower base clock (fact = 0) if even divisor.
210
	 *
211
	 * Note that this makes the receiver more tolerant to errors.
212
	 */
213
	if (fact == 1 && div % 2 == 0) {
214
		div /= 2;
215
		fact = 0;
216
	}
217
218
219
220
208
	return (0x100 - div) << 8 | fact << 2 | ps;
221
	return (0x100 - div) << 8 | fact << 2 | ps;
209
}
222
}
210
223

Return to bug 710588