Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2f45eef authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tty/serial driver fix from Greg KH:
 "Here's a single 8250 serial driver that fixes a reported deadlock with
  the serial console and the tty driver.

  It's been in linux-next for a while now"

* tag 'tty-4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: 8250_dw: Fix deadlock in LCR workaround
parents cedd5f65 7fd6f640
Loading
Loading
Loading
Loading
+12 −3
Original line number Original line Diff line number Diff line
@@ -119,7 +119,10 @@ static void dw8250_serial_out(struct uart_port *p, int offset, int value)
			dw8250_force_idle(p);
			dw8250_force_idle(p);
			writeb(value, p->membase + (UART_LCR << p->regshift));
			writeb(value, p->membase + (UART_LCR << p->regshift));
		}
		}
		dev_err(p->dev, "Couldn't set LCR to %d\n", value);
		/*
		 * FIXME: this deadlocks if port->lock is already held
		 * dev_err(p->dev, "Couldn't set LCR to %d\n", value);
		 */
	}
	}
}
}


@@ -163,7 +166,10 @@ static void dw8250_serial_outq(struct uart_port *p, int offset, int value)
			__raw_writeq(value & 0xff,
			__raw_writeq(value & 0xff,
				     p->membase + (UART_LCR << p->regshift));
				     p->membase + (UART_LCR << p->regshift));
		}
		}
		dev_err(p->dev, "Couldn't set LCR to %d\n", value);
		/*
		 * FIXME: this deadlocks if port->lock is already held
		 * dev_err(p->dev, "Couldn't set LCR to %d\n", value);
		 */
	}
	}
}
}
#endif /* CONFIG_64BIT */
#endif /* CONFIG_64BIT */
@@ -187,7 +193,10 @@ static void dw8250_serial_out32(struct uart_port *p, int offset, int value)
			dw8250_force_idle(p);
			dw8250_force_idle(p);
			writel(value, p->membase + (UART_LCR << p->regshift));
			writel(value, p->membase + (UART_LCR << p->regshift));
		}
		}
		dev_err(p->dev, "Couldn't set LCR to %d\n", value);
		/*
		 * FIXME: this deadlocks if port->lock is already held
		 * dev_err(p->dev, "Couldn't set LCR to %d\n", value);
		 */
	}
	}
}
}