mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 14:30:06 -04:00
Merge tag 'tty-7.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial fixes from Greg KH:
"Here are some small tty/serial/vt fixes for 7.2-rc3 that resolve some
reported problems. Included in here are:
- vt spurious modifier issue that showed up in -rc1 (reported a
bunch)
- 8250 driver bugfixes
- msm serial driver bugfix
- max310x serial driver bugfix
All of these have been in linux-next with no reported issues"
* tag 'tty-7.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
serial: 8250: Ignore flow control on suspend/resume with no_console_suspend
serial: 8250_mid: Disable DMA for selected platforms
serial: 8250_omap: clear rx_running on zero-length DMA completes
vt: fix spurious modifier in CSI/cursor key sequences
serial: msm: Disable DMA for kernel console UART
serial: max310x: implement gpio_chip::get_direction()
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/rational.h>
|
||||
#include <linux/util_macros.h>
|
||||
|
||||
#include <linux/dma/hsu.h>
|
||||
|
||||
@@ -368,8 +369,16 @@ static const struct mid8250_board dnv_board = {
|
||||
.freq = 133333333,
|
||||
.base_baud = 115200,
|
||||
.bar = 1,
|
||||
.setup = dnv_setup,
|
||||
.exit = dnv_exit,
|
||||
/*
|
||||
* Errata:
|
||||
* HSUART May Stop Functioning when DMA is Active.
|
||||
*
|
||||
* - Denverton document #572409, rev 3.4, DNV60
|
||||
* - Ice Lake Xeon D document #714070, ICXD65
|
||||
* - Snowridge document #731931, SNR44
|
||||
*/
|
||||
.setup = PTR_IF(false, dnv_setup),
|
||||
.exit = PTR_IF(false, dnv_exit),
|
||||
};
|
||||
|
||||
static const struct pci_device_id pci_ids[] = {
|
||||
|
||||
@@ -944,11 +944,12 @@ static void __dma_rx_do_complete(struct uart_8250_port *p)
|
||||
dev_err(p->port.dev, "teardown incomplete\n");
|
||||
}
|
||||
}
|
||||
|
||||
dma->rx_running = 0;
|
||||
if (!count)
|
||||
goto out;
|
||||
ret = tty_insert_flip_string(tty_port, dma->rx_buf, count);
|
||||
|
||||
dma->rx_running = 0;
|
||||
p->port.icount.rx += ret;
|
||||
p->port.icount.buf_overrun += count - ret;
|
||||
out:
|
||||
|
||||
@@ -2000,8 +2000,14 @@ static void wait_for_xmitr(struct uart_8250_port *up, int bits)
|
||||
|
||||
tx_ready = wait_for_lsr(up, bits);
|
||||
|
||||
/* Wait up to 1s for flow control if necessary */
|
||||
if (uart_console_hwflow_active(&up->port)) {
|
||||
/*
|
||||
* Wait up to 1s for flow control if necessary.
|
||||
* When 'no_console_suspend' is active (in the window between
|
||||
* suspend() and resume()), flow control is temporarily ignored
|
||||
* because the canary workaround is not reliable in all situations,
|
||||
* leading to flow control timeouts for every character.
|
||||
*/
|
||||
if (uart_console_hwflow_active(&up->port) && !up->canary) {
|
||||
for (tmout = 1000000; tmout; tmout--) {
|
||||
unsigned int msr = serial_in(up, UART_MSR);
|
||||
up->msr_saved_flags |= msr & MSR_SAVE_FLAGS;
|
||||
|
||||
@@ -1243,6 +1243,17 @@ static int max310x_gpio_set(struct gpio_chip *chip, unsigned int offset,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int max310x_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
|
||||
{
|
||||
struct max310x_port *s = gpiochip_get_data(chip);
|
||||
struct uart_port *port = &s->p[offset / 4].port;
|
||||
unsigned int val;
|
||||
|
||||
val = max310x_port_read(port, MAX310X_GPIOCFG_REG);
|
||||
|
||||
return val & BIT(offset % 4) ? GPIO_LINE_DIRECTION_OUT : GPIO_LINE_DIRECTION_IN;
|
||||
}
|
||||
|
||||
static int max310x_gpio_direction_input(struct gpio_chip *chip, unsigned int offset)
|
||||
{
|
||||
struct max310x_port *s = gpiochip_get_data(chip);
|
||||
@@ -1446,6 +1457,7 @@ static int max310x_probe(struct device *dev, const struct max310x_devtype *devty
|
||||
s->gpio.owner = THIS_MODULE;
|
||||
s->gpio.parent = dev;
|
||||
s->gpio.label = devtype->name;
|
||||
s->gpio.get_direction = max310x_gpio_get_direction;
|
||||
s->gpio.direction_input = max310x_gpio_direction_input;
|
||||
s->gpio.get = max310x_gpio_get;
|
||||
s->gpio.direction_output= max310x_gpio_direction_output;
|
||||
|
||||
@@ -1228,7 +1228,8 @@ static int msm_startup(struct uart_port *port)
|
||||
data |= MSM_UART_MR1_AUTO_RFR_LEVEL0 & rfr_level;
|
||||
msm_write(port, data, MSM_UART_MR1);
|
||||
|
||||
if (msm_port->is_uartdm) {
|
||||
/* Disable DMA for console to prevent PIO/DMA collisions */
|
||||
if (msm_port->is_uartdm && !uart_console(port)) {
|
||||
msm_request_tx_dma(msm_port, msm_port->uart.mapbase);
|
||||
msm_request_rx_dma(msm_port, msm_port->uart.mapbase);
|
||||
}
|
||||
|
||||
@@ -765,16 +765,22 @@ static void k_fn(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
/*
|
||||
* Compute xterm-style modifier parameter for CSI sequences.
|
||||
* Returns 1 + (shift ? 1 : 0) + (alt ? 2 : 0) + (ctrl ? 4 : 0)
|
||||
*
|
||||
* Only the canonical modifier weights are counted. The left/right variants
|
||||
* (KG_SHIFTL, KG_SHIFTR, KG_CTRLL, KG_CTRLR) and KG_ALTGR are commonly
|
||||
* repurposed as keymap layout-group or level selectors rather than as plain
|
||||
* modifiers (for instance XKB-derived keymaps select the layout group with
|
||||
* KG_SHIFTL/KG_SHIFTR), so counting them would encode a spurious modifier.
|
||||
*/
|
||||
static int csi_modifier_param(void)
|
||||
{
|
||||
int mod = 1;
|
||||
|
||||
if (shift_state & (BIT(KG_SHIFT) | BIT(KG_SHIFTL) | BIT(KG_SHIFTR)))
|
||||
if (shift_state & BIT(KG_SHIFT))
|
||||
mod += 1;
|
||||
if (shift_state & (BIT(KG_ALT) | BIT(KG_ALTGR)))
|
||||
if (shift_state & BIT(KG_ALT))
|
||||
mod += 2;
|
||||
if (shift_state & (BIT(KG_CTRL) | BIT(KG_CTRLL) | BIT(KG_CTRLR)))
|
||||
if (shift_state & BIT(KG_CTRL))
|
||||
mod += 4;
|
||||
return mod;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user