Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1388548
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.2 003/115] 8250: use callbacks to access UART_DLL/UART_DLM |
| Date | 2016-04-27 02:50 +0200 |
| Message-ID | <rslPY-pf-29@gated-at.bofh.it> (permalink) |
| References | <rskqS-7Qj-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
3.2.80-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Frias <sf84@laposte.net>
commit 0b41ce991052022c030fd868e03877700220b090 upstream.
Some UART HW has a single register combining UART_DLL/UART_DLM
(this was probably forgotten in the change that introduced the
callbacks, commit b32b19b8ffc05cbd3bf91c65e205f6a912ca15d9)
Fixes: b32b19b8ffc0 ("[SERIAL] 8250: set divisor register correctly ...")
Signed-off-by: Sebastian Frias <sf84@laposte.net>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2:
- Adjust filename
- We're using serial_{in,out}p for 8-bit I/O]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/tty/serial/8250.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
@@ -777,22 +777,16 @@ static int size_fifo(struct uart_8250_po
*/
static unsigned int autoconfig_read_divisor_id(struct uart_8250_port *p)
{
- unsigned char old_dll, old_dlm, old_lcr;
- unsigned int id;
+ unsigned char old_lcr;
+ unsigned int id, old_dl;
old_lcr = serial_inp(p, UART_LCR);
serial_outp(p, UART_LCR, UART_LCR_CONF_MODE_A);
+ old_dl = serial_dl_read(p);
+ serial_dl_write(p, 0);
+ id = serial_dl_read(p);
+ serial_dl_write(p, old_dl);
- old_dll = serial_inp(p, UART_DLL);
- old_dlm = serial_inp(p, UART_DLM);
-
- serial_outp(p, UART_DLL, 0);
- serial_outp(p, UART_DLM, 0);
-
- id = serial_inp(p, UART_DLL) | serial_inp(p, UART_DLM) << 8;
-
- serial_outp(p, UART_DLL, old_dll);
- serial_outp(p, UART_DLM, old_dlm);
serial_outp(p, UART_LCR, old_lcr);
return id;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3.2 000/115] 3.2.80-rc1 review Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 006/115] [media] saa7134: Fix bytesperline not being set correctly for planar formats Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 014/115] [media] bttv: Width must be a multiple of 16 when capturing planar formats Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 114/115] jme: Fix device PM wakeup API usage Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 018/115] drivers/misc/ad525x_dpot: AD5274 fix RDAC read back errors Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 008/115] Bluetooth: Add new AR3012 ID 0489:e095 Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 019/115] usb: hub: fix a typo in hub_port_init() leading to wrong logic Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 007/115] Bluetooth: btusb: Add new AR3012 ID 13d3:3395 Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 115/115] netfilter: x_tables: fix unconditional helper Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 003/115] 8250: use callbacks to access UART_DLL/UART_DLM Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 013/115] Bluetooth: btusb: Add a new AR3012 ID 04ca:3014 Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 005/115] usb: retry reset if a device times out Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 010/115] mac80211: avoid excessive stack usage in sta_info Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 017/115] xfs: fix two memory leaks in xfs_attr_list.c error paths Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 001/115] EDAC, amd64_edac: Shift wrapping issue in f1x_get_norm_dct_addr() Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 011/115] mac80211: fix memory leak Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 002/115] [media] pwc: Add USB id for Philips Spc880nc webcam Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 012/115] PCI: Disable IO/MEM decoding for devices with non-compliant BARs Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 113/115] jme: Do not enable NIC WoL functions on S0 Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 009/115] aacraid: Fix memory leak in aac_fib_map_free Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 [PATCH 3.2 015/115] watchdog: rc32434_wdt: fix ioctl error handling Ben Hutchings <ben@decadent.org.uk> - 2016-04-27 02:50 +0200 Re: [PATCH 3.2 000/115] 3.2.80-rc1 review Guenter Roeck <linux@roeck-us.net> - 2016-04-27 05:40 +0200
csiph-web