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

Commit 5266e703 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tty/serial updates from Greg KH:
 "Here's the tty/serial patchset for 4.10-rc1.

  It's been a quiet kernel cycle for this subsystem, just a small number
  of changes. A few new serial drivers, and some cleanups to the old
  vgacon logic, and other minor serial driver changes as well.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'tty-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (54 commits)
  serial: 8250_mid fix calltrace when hotplug 8250 serial controller
  console: Move userspace I/O out of console_lock to fix lockdep warning
  tty: nozomi: avoid sprintf buffer overflow
  serial: 8250_pci: Detach low-level driver during PCI error recovery
  serial: core: don't check port twice in a row
  mxs-auart: count FIFO overrun errors
  serial: 8250_dw: Add support for IrDA SIR mode
  serial: 8250: Expose set_ldisc function
  serial: 8250: Add IrDA to UART capabilities
  serial: 8250_dma: power off device after TX is done
  serial: 8250_port: export serial8250_rpm_{get|put}_tx()
  serial: sunsu: Free memory when probe fails
  serial: sunhv: Free memory when remove() is called
  vt: fix Scroll Lock LED trigger name
  tty: typo in comments in drivers/tty/vt/keyboard.c
  tty: amba-pl011: Add earlycon support for SBSA UART
  tty: nozomi: use permission-specific DEVICE_ATTR variants
  tty: serial: Make the STM32 serial port depend on it's arch
  serial: ifx6x60: Free memory when probe fails
  serial: ioc4_serial: Free memory when kzalloc fails during probe
  ...
parents 03f8d4cc a9b01b58
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -4,15 +4,13 @@ Software cursor for VGA
by Pavel Machek <pavel@atrey.karlin.mff.cuni.cz>
and Martin Mares <mj@atrey.karlin.mff.cuni.cz>

Linux now has some ability to manipulate cursor appearance. Normally, you
can set the size of hardware cursor (and also work around some ugly bugs in
those miserable Trident cards [#f1]_. You can now play a few new tricks:
you can make your cursor look

like a non-blinking red block, make it inverse background of the character it's
over or to highlight that character and still choose whether the original
hardware cursor should remain visible or not.  There may be other things I have
never thought of.
Linux now has some ability to manipulate cursor appearance.  Normally,
you can set the size of hardware cursor.  You can now play a few new
tricks: you can make your cursor look like a non-blinking red block,
make it inverse background of the character it's over or to highlight
that character and still choose whether the original hardware cursor
should remain visible or not.  There may be other things I have never
thought of.

The cursor appearance is controlled by a ``<ESC>[?1;2;3c`` escape sequence
where 1, 2 and 3 are parameters described below. If you omit any of them,
@@ -48,8 +46,6 @@ third parameter
	Bit setting takes place before bit toggling, so you can simply clear a
	bit by including it in both the set mask and the toggle mask.

.. [#f1] see ``#define TRIDENT_GLITCH`` in ``drivers/video/vgacon.c``.

Examples
--------

+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ static void ce4100_mem_serial_out(struct uart_port *p, int offset, int value)
}

static void ce4100_serial_fixup(int port, struct uart_port *up,
	unsigned short *capabilites)
	u32 *capabilites)
{
#ifdef CONFIG_EARLY_PRINTK
	/*
+0 −2
Original line number Diff line number Diff line
@@ -1012,8 +1012,6 @@ static int get_serial_info(struct tty_struct *tty, struct serial_state *state,
{
	struct serial_struct tmp;
   
	if (!retinfo)
		return -EFAULT;
	memset(&tmp, 0, sizeof(tmp));
	tty_lock(tty);
	tmp.line = tty->index;
+14 −37
Original line number Diff line number Diff line
@@ -63,44 +63,23 @@

#define VERSION_STRING DRIVER_DESC " 2.1d"

/*    Macros definitions */

/* Default debug printout level */
#define NOZOMI_DEBUG_LEVEL 0x00
static int debug = NOZOMI_DEBUG_LEVEL;
module_param(debug, int, S_IRUGO | S_IWUSR);

#define P_BUF_SIZE 128
#define NFO(_err_flag_, args...)				\
/*    Macros definitions */
#define DBG_(lvl, fmt, args...)				\
do {							\
	char tmp[P_BUF_SIZE];					\
	snprintf(tmp, sizeof(tmp), ##args);			\
	printk(_err_flag_ "[%d] %s(): %s\n", __LINE__,		\
		__func__, tmp);				\
	if (lvl & debug)				\
		pr_debug("[%d] %s(): " fmt "\n",	\
			 __LINE__, __func__,  ##args);	\
} while (0)

#define DBG1(args...) D_(0x01, ##args)
#define DBG2(args...) D_(0x02, ##args)
#define DBG3(args...) D_(0x04, ##args)
#define DBG4(args...) D_(0x08, ##args)
#define DBG5(args...) D_(0x10, ##args)
#define DBG6(args...) D_(0x20, ##args)
#define DBG7(args...) D_(0x40, ##args)
#define DBG8(args...) D_(0x80, ##args)

#ifdef DEBUG
/* Do we need this settable at runtime? */
static int debug = NOZOMI_DEBUG_LEVEL;

#define D(lvl, args...)  do \
			{if (lvl & debug) NFO(KERN_DEBUG, ##args); } \
			while (0)
#define D_(lvl, args...) D(lvl, ##args)

/* These printouts are always printed */

#else
static int debug;
#define D_(lvl, args...)
#endif
#define DBG1(args...) DBG_(0x01, ##args)
#define DBG2(args...) DBG_(0x02, ##args)
#define DBG3(args...) DBG_(0x04, ##args)
#define DBG4(args...) DBG_(0x08, ##args)

/* TODO: rewrite to optimize macros... */

@@ -1320,7 +1299,7 @@ static ssize_t card_type_show(struct device *dev, struct device_attribute *attr,

	return sprintf(buf, "%d\n", dc->card_type);
}
static DEVICE_ATTR(card_type, S_IRUGO, card_type_show, NULL);
static DEVICE_ATTR_RO(card_type);

static ssize_t open_ttys_show(struct device *dev, struct device_attribute *attr,
			  char *buf)
@@ -1329,7 +1308,7 @@ static ssize_t open_ttys_show(struct device *dev, struct device_attribute *attr,

	return sprintf(buf, "%u\n", dc->open_ttys);
}
static DEVICE_ATTR(open_ttys, S_IRUGO, open_ttys_show, NULL);
static DEVICE_ATTR_RO(open_ttys);

static void make_sysfs_files(struct nozomi *dc)
{
@@ -1943,7 +1922,5 @@ static __exit void nozomi_exit(void)
module_init(nozomi_init);
module_exit(nozomi_exit);

module_param(debug, int, S_IRUGO | S_IWUSR);

MODULE_LICENSE("Dual BSD/GPL");
MODULE_DESCRIPTION(DRIVER_DESC);
+0 −4
Original line number Diff line number Diff line
@@ -1189,8 +1189,6 @@ static int get_config(struct r_port *info, struct rocket_config __user *retinfo)
{
	struct rocket_config tmp;

	if (!retinfo)
		return -EFAULT;
	memset(&tmp, 0, sizeof (tmp));
	mutex_lock(&info->port.mutex);
	tmp.line = info->line;
@@ -1255,8 +1253,6 @@ static int get_ports(struct r_port *info, struct rocket_ports __user *retports)
	struct rocket_ports tmp;
	int board;

	if (!retports)
		return -EFAULT;
	memset(&tmp, 0, sizeof (tmp));
	tmp.tty_major = rocket_driver->major;

Loading