Linux 4.16.1
Greg KH
maintainerI'm announcing the release of the 4.16.1 kernel.
All users of the 4.16 kernel series must upgrade.
The updated 4.16.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.16.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/serial/8250.txt | 1 Makefile | 2 arch/arm/crypto/Makefile | 2 arch/arm64/crypto/Makefile | 2 arch/x86/crypto/cast5_avx_glue.c | 3 block/bio.c | 4 crypto/ahash.c | 7 crypto/lrw.c | 2 crypto/testmgr.h | 6 drivers/base/arch_topology.c | 12 - drivers/bluetooth/hci_bcm.c | 6 drivers/char/mem.c | 6 drivers/crypto/caam/ctrl.c | 3 drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 2 drivers/crypto/ccp/ccp-crypto-rsa.c | 7 drivers/crypto/ccp/ccp-crypto-sha.c | 2 drivers/crypto/inside-secure/safexcel.c | 2 drivers/crypto/talitos.c | 168 ++++++++-------------- drivers/input/mouse/alps.c | 24 ++- drivers/input/serio/i8042-x86ia64io.h | 24 +++ drivers/media/usb/usbtv/usbtv-core.c | 2 drivers/misc/mei/main.c | 1 drivers/parport/parport_pc.c | 4 drivers/siox/siox-core.c | 2 drivers/staging/comedi/drivers/ni_mio_common.c | 2 drivers/tty/serial/8250/8250_of.c | 1 drivers/tty/serial/8250/8250_port.c | 33 ++++ drivers/tty/vt/vt.c | 6 drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/ftdi_sio.c | 2 drivers/usb/serial/ftdi_sio_ids.h | 9 + fs/btrfs/inode.c | 37 ++++ include/linux/bitmap.h | 22 ++ include/linux/compat.h | 6 include/uapi/asm-generic/siginfo.h | 7 include/uapi/linux/serial_core.h | 3 36 files changed, 268 insertions(+), 155 deletions(-)
Alexander Gerasiov (1):
parport_pc: Add support for WCH CH382L PCI-E single parallel port card.
Clemens Werther (1):
USB: serial: ftdi_sio: add support for Harman FirmwareHubEmulator
Colin Ian King (1):
mei: remove dev_err message on an unsupported ioctl
Conor McLoughlin (1):
crypto: testmgr - Fix incorrect values in PKCS#1 test vector
Dennis Wassenberg (1):
Input: i8042 - add Lenovo ThinkPad L460 to i8042 reset list
Eric Biggers (1):
crypto: x86/cast5-avx - fix ECB encryption when long sg follows short one
Eric W. Biederman (1):
signal: Correct the offset of si_pkey and si_lower in struct siginfo on m68k
Frank Mori Hess (1):
staging: comedi: ni_mio_common: ack ai fifo error interrupts.
Gaku Inami (1):
Revert "base: arch_topology: fix section mismatch build warnings"
Gary R Hook (1):
crypto: ccp - Fill the result buffer only on digest, finup, and final ops
Gavin Schenk (1):
siox: fix possible buffer overflow in device_add_store
Greg Kroah-Hartman (1):
Linux 4.16.1
Gregory CLEMENT (1):
crypto: inside-secure - fix clock management
Hans de Goede (1):
Bluetooth: hci_bcm: Add 6 new ACPI HIDs
Herbert Xu (2):
crypto: lrw - Free rctx->ext with kzfree
crypto: ahash - Fix early termination in hash walk
Joel Stanley (1):
serial: 8250: Add Nuvoton NPCM UART
Johan Hovold (1):
USB: serial: cp210x: add ELDAT Easywave RX09 id
Kees Cook (1):
/dev/mem: Avoid overwriting "err" in read_mem()
LEROY Christophe (2):
crypto: talitos - don't persistently map req_ctx->hw_context and req_ctx->buf
crypto: talitos - fix IPsec cipher in length
Leonard Crestez (1):
crypto: arm,arm64 - Fix random regeneration of S_shipped
Liu Bo (1):
Btrfs: fix unexpected cow in run_delalloc_nocow
Maciej S. Szmigiero (1):
crypto: ccp - return an actual key size from RSA max_size callback
Major Hayden (1):
USB: serial: ftdi_sio: add RT Systems VX-8 cable
Masaki Ota (1):
Input: ALPS - fix TrackStick detection on Thinkpad L570 and Latitude 7370
Mike Frysinger (1):
vt: change SGR 21 to follow the standards
Mikulas Patocka (1):
Fix slab name "biovec-(1<<(21-12))"
Oliver Neukum (1):
media: usbtv: prevent double free in error case
Omar Sandoval (1):
bitmap: fix memset optimization on big-endian systems
Ondrej Zary (1):
Input: i8042 - enable MUX on Sony VAIO VGN-CS series to fix touchpad
Rui Miguel Silva (1):
crypto: caam - Fix null dereference at error path
Greg KH
maintainerDocumentation/devicetree/bindings/serial/8250.txt +1 -0
@@ -24,6 +24,7 @@ Required properties: - "ti,da830-uart" - "aspeed,ast2400-vuart" - "aspeed,ast2500-vuart" + - "nuvoton,npcm750-uart" - "serial" if the port type is unknown. - reg : offset and length of the register set for the device. - interrupts : should contain uart interrupt.
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 16 -SUBLEVEL = 0 +SUBLEVEL = 1 EXTRAVERSION = NAME = Fearless Coyote
arch/arm/crypto/Makefile +2 -0
@@ -54,6 +54,7 @@ crct10dif-arm-ce-y := crct10dif-ce-core.o crct10dif-ce-glue.o crc32-arm-ce-y:= crc32-ce-core.o crc32-ce-glue.o chacha20-neon-y := chacha20-neon-core.o chacha20-neon-glue.o +ifdef REGENERATE_ARM_CRYPTO quiet_cmd_perl = PERL $@ cmd_perl = $(PERL) $(<) > $(@)
@@ -62,5 +63,6 @@ $(src)/sha256-core.S_shipped: $(src)/sha256-armv4.pl $(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl $(call cmd,perl) +endif .PRECIOUS: $(obj)/sha256-core.S $(obj)/sha512-core.S
arch/arm64/crypto/Makefile +2 -0
@@ -67,6 +67,7 @@ CFLAGS_aes-glue-ce.o := -DUSE_V8_CRYPTO_EXTENSIONS $(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE $(call if_changed_rule,cc_o_c) +ifdef REGENERATE_ARM64_CRYPTO quiet_cmd_perlasm = PERLASM $@ cmd_perlasm = $(PERL) $(<) void $(@)
@@ -75,5 +76,6 @@ $(src)/sha256-core.S_shipped: $(src)/sha512-armv8.pl $(src)/sha512-core.S_shipped: $(src)/sha512-armv8.pl $(call cmd,perlasm) +endif .PRECIOUS: $(obj)/sha256-core.S $(obj)/sha512-core.S
arch/x86/crypto/cast5_avx_glue.c +1 -2
@@ -66,8 +66,6 @@ static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk,void (*fn)(struct cast5_ctx *ctx,u8 *dst,const u8 *src);int err; - fn = (enc) ? cast5_ecb_enc_16way : cast5_ecb_dec_16way; - err =blkcipher_walk_virt (desc, walk); desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ;
@@ -79,6 +77,7 @@ static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk,/* Process multi-block batch */ if (nbytes >= bsize *CAST5_PARALLEL_BLOCKS ) { + fn = (enc) ? cast5_ecb_enc_16way : cast5_ecb_dec_16way; do { fn(ctx, wdst, wsrc);
block/bio.c +2 -2
@@ -43,9 +43,9 @@* break badly! cannot be bigger than what you can fit into an * unsigned short */ -#define BV (x) { .nr_vecs = x, .name = "biovec-"__stringify(x) } +#define BV (x, n) { .nr_vecs = x, .name = "biovec-"#n }static struct biovec_slab bvec_slabs[BVEC_POOL_NR ]__read_mostly = { -BV (1 ),BV (4 ),BV (16 ),BV (64 ),BV (128 ),BV (BIO_MAX_PAGES ), +BV (1 ,1 ),BV (4 ,4 ),BV (16 ,16 ),BV (64 ,64 ),BV (128 ,128 ),BV (BIO_MAX_PAGES , max), };#undef BV
crypto/ahash.c +4 -3
@@ -92,13 +92,14 @@ int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err)if (nbytes && walk->offset & alignmask && !err) { walk->offset =ALIGN (walk->offset, alignmask +1 ); - walk->data += walk->offset; - nbytes =min (nbytes, ((unsigned int )(PAGE_SIZE )) - walk->offset); walk->entrylen -= nbytes; -return nbytes; +if (nbytes) { + walk->data += walk->offset; +return nbytes; + } }if (walk->flags &CRYPTO_ALG_ASYNC )
crypto/lrw.c +1 -1
@@ -313,7 +313,7 @@ static void exit_crypt(struct skcipher_request *req) rctx->left =0 ;if (rctx->ext) -kfree (rctx->ext); +kzfree (rctx->ext); }static int do_encrypt (struct skcipher_request *req,int err)
crypto/testmgr.h +3 -3
@@ -548,7 +548,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {static const struct akcipher_testvec pkcs1pad_rsa_tv_template[] = { { .key = -"\x30\x82\x03\x1f\x02\x01\x10\x02\x82\x01\x01\x00\xd7\x1e\x77\x82" +"\x30\x82\x03\x1f\x02\x01\x00\x02\x82\x01\x01\x00\xd7\x1e\x77\x82" "\x8c\x92\x31\xe7\x69\x02\xa2\xd5\x5c\x78\xde\xa2\x0c\x8f\xfe\x28" "\x59\x31\xdf\x40\x9c\x60\x61\x06\xb9\x2f\x62\x40\x80\x76\xcb\x67" "\x4a\xb5\x59\x56\x69\x17\x07\xfa\xf9\x4c\xbd\x6c\x37\x7a\x46\x7d"
@@ -597,8 +597,8 @@ static const struct akcipher_testvec pkcs1pad_rsa_tv_template[] = {"\xfe\xf8\x27\x1b\xd6\x55\x60\x5e\x48\xb7\x6d\x9a\xa8\x37\xf9\x7a" "\xde\x1b\xcd\x5d\x1a\x30\xd4\xe9\x9e\x5b\x3c\x15\xf8\x9c\x1f\xda" "\xd1\x86\x48\x55\xce\x83\xee\x8e\x51\xc7\xde\x32\x12\x47\x7d\x46" -"\xb8\x35\xdf\x41\x02\x01\x30\x02\x01\x30\x02\x01\x30\x02\x01\x30" - "\x02\x01\x30", +"\xb8\x35\xdf\x41\x02\x01\x00\x02\x01\x00\x02\x01\x00\x02\x01\x00" + "\x02\x01\x00", .key_len = 804,/* * m is SHA256 hash of following message:
drivers/base/arch_topology.c +6 -6
@@ -169,11 +169,11 @@ bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu) }#ifdef CONFIG_CPU_FREQ -static cpumask_var_t cpus_to_visit__initdata ; -static void __init parsing_done_workfn (struct work_struct *work); -static __initdata DECLARE_WORK(parsing_done_work, parsing_done_workfn); +static cpumask_var_t cpus_to_visit; +static void parsing_done_workfn (struct work_struct *work); +static DECLARE_WORK(parsing_done_work, parsing_done_workfn); -static int __init +static int init_cpu_capacity_callback (struct notifier_block *nb,unsigned long val,void *data)
@@ -209,7 +209,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,return 0 ; } -static struct notifier_block init_cpu_capacity_notifier__initdata = { +static struct notifier_block init_cpu_capacity_notifier = { .notifier_call = init_cpu_capacity_callback, };
@@ -242,7 +242,7 @@ static int __init register_cpufreq_notifier(void) }core_initcall (register_cpufreq_notifier); -static void __init parsing_done_workfn (struct work_struct *work) +static void parsing_done_workfn (struct work_struct *work) {cpufreq_unregister_notifier (&init_cpu_capacity_notifier,CPUFREQ_POLICY_NOTIFIER );
drivers/bluetooth/hci_bcm.c +6 -0
@@ -1080,6 +1080,7 @@ static const struct hci_uart_proto bcm_proto = {#ifdef CONFIG_ACPI static const struct acpi_device_id bcm_acpi_match[] = { {"BCM2E1A" , (kernel_ulong_t)&acpi_bcm_int_last_gpios }, + {"BCM2E38" , (kernel_ulong_t)&acpi_bcm_int_last_gpios }, {"BCM2E39" , (kernel_ulong_t)&acpi_bcm_int_last_gpios }, {"BCM2E3A" , (kernel_ulong_t)&acpi_bcm_int_last_gpios }, { "BCM2E3D", (kernel_ulong_t)&acpi_bcm_int_last_gpios },
@@ -1092,12 +1093,17 @@ static const struct acpi_device_id bcm_acpi_match[] = { { "BCM2E67", (kernel_ulong_t)&acpi_bcm_int_last_gpios }, { "BCM2E71", (kernel_ulong_t)&acpi_bcm_int_last_gpios }, { "BCM2E72", (kernel_ulong_t)&acpi_bcm_int_last_gpios }, + { "BCM2E74", (kernel_ulong_t)&acpi_bcm_int_last_gpios }, { "BCM2E7B", (kernel_ulong_t)&acpi_bcm_int_last_gpios }, { "BCM2E7C", (kernel_ulong_t)&acpi_bcm_int_last_gpios }, { "BCM2E7E", (kernel_ulong_t)&acpi_bcm_int_first_gpios }, + { "BCM2E83", (kernel_ulong_t)&acpi_bcm_int_first_gpios }, + { "BCM2E84", (kernel_ulong_t)&acpi_bcm_int_last_gpios }, + { "BCM2E90", (kernel_ulong_t)&acpi_bcm_int_last_gpios }, { "BCM2E95", (kernel_ulong_t)&acpi_bcm_int_first_gpios }, { "BCM2E96", (kernel_ulong_t)&acpi_bcm_int_first_gpios }, { "BCM2EA4", (kernel_ulong_t)&acpi_bcm_int_first_gpios }, + { "BCM2EAA", (kernel_ulong_t)&acpi_bcm_int_first_gpios }, { }, };MODULE_DEVICE_TABLE (acpi, bcm_acpi_match);
drivers/char/mem.c +3 -3
@@ -137,7 +137,7 @@ static ssize_t read_mem(struct file *file, char __user *buf,while (count >0 ) {unsigned long remaining; -int allowed; +int allowed, probe; sz =size_inside_page (p, count);
@@ -160,9 +160,9 @@ static ssize_t read_mem(struct file *file, char __user *buf,if (!ptr) goto failed; - err =probe_kernel_read (bounce, ptr, sz); + probe =probe_kernel_read (bounce, ptr, sz);unxlate_dev_mem_ptr (p, ptr); -if (err) +if (probe) goto failed; remaining =copy_to_user (buf, bounce, sz);
drivers/crypto/caam/ctrl.c +0 -3
@@ -815,9 +815,6 @@ static int caam_probe(struct platform_device *pdev)return 0 ; caam_remove: -#ifdef CONFIG_DEBUG_FS -debugfs_remove_recursive (ctrlpriv->dfs_root); -#endif caam_remove (pdev);return ret;
drivers/crypto/ccp/ccp-crypto-aes-cmac.c +1 -1
@@ -46,7 +46,7 @@ static int ccp_aes_cmac_complete(struct crypto_async_request *async_req, }/* Update result area if supplied */ -if (req->result) +if (req->result && rctx->final)memcpy (req->result, rctx->iv, digest_size); e_free:
drivers/crypto/ccp/ccp-crypto-rsa.c +3 -4
@@ -60,10 +60,9 @@ static int ccp_rsa_complete(struct crypto_async_request *async_req, int ret)static unsigned int ccp_rsa_maxsize (struct crypto_akcipher *tfm) { -if (ccp_version () >CCP_VERSION (3 ,0 )) -return CCP5_RSA_MAXMOD ; -else -return CCP_RSA_MAXMOD ; +struct ccp_ctx *ctx =akcipher_tfm_ctx (tfm); + +return ctx->u.rsa.n_len; }static int ccp_rsa_crypt (struct akcipher_request *req,bool encrypt)
drivers/crypto/ccp/ccp-crypto-sha.c +1 -1
@@ -47,7 +47,7 @@ static int ccp_sha_complete(struct crypto_async_request *async_req, int ret) }/* Update result area if supplied */ -if (req->result) +if (req->result && rctx->final)memcpy (req->result, rctx->ctx, digest_size); e_free:
drivers/crypto/inside-secure/safexcel.c +1 -1
@@ -894,7 +894,7 @@ static int safexcel_probe(struct platform_device *pdev)return PTR_ERR (priv->base); } - priv->clk =of_clk_get (dev->of_node,0 ); + priv->clk =devm_clk_get (&pdev->dev,NULL );if (!IS_ERR (priv->clk)) { ret =clk_prepare_enable (priv->clk);if (ret) {
drivers/crypto/talitos.c +64 -104
315 lines not on this page · raw message
drivers/input/mouse/alps.c +21 -3
@@ -2544,13 +2544,31 @@ static int alps_update_btn_info_ss4_v2(unsigned char otp[][4], }static int alps_update_dual_info_ss4_v2 (unsigned char otp[][4 ], -struct alps_data *priv) +struct alps_data *priv, +struct psmouse *psmouse) {bool is_dual = false; +int reg_val =0 ; +struct ps2dev *ps2dev = &psmouse->ps2dev; -if (IS_SS4PLUS_DEV (priv->dev_id)) +if (IS_SS4PLUS_DEV (priv->dev_id)) { is_dual = (otp[0 ][0 ] >>4 ) &0x01 ; +if (!is_dual) { +/* For support TrackStick of Thinkpad L/E series */ +if (alps_exit_command_mode (psmouse) ==0 && +alps_enter_command_mode (psmouse) ==0 ) { + reg_val =alps_command_mode_read_reg (psmouse, +0xD7 ); + } +alps_exit_command_mode (psmouse); +ps2_command (ps2dev,NULL ,PSMOUSE_CMD_ENABLE ); + +if (reg_val ==0x0C || reg_val ==0x1D ) + is_dual = true; + } + } +if (is_dual) priv->flags |=ALPS_DUALPOINT |ALPS_DUALPOINT_WITH_PRESSURE ;
@@ -2573,7 +2591,7 @@ static int alps_set_defaults_ss4_v2(struct psmouse *psmouse,alps_update_btn_info_ss4_v2 (otp, priv); -alps_update_dual_info_ss4_v2 (otp, priv); +alps_update_dual_info_ss4_v2 (otp, priv, psmouse);return 0 ; }
drivers/input/serio/i8042-x86ia64io.h +24 -0
@@ -530,6 +530,20 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { { } }; +static const struct dmi_system_id i8042_dmi_forcemux_table[]__initconst = { + { +/* +* Sony Vaio VGN-CS series require MUX or the touch sensor +* buttons will disturb touchpad operation +*/ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Sony Corporation" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"VGN-CS" ), + }, + }, + { } +}; +/* * On some Asus laptops, just running self tests cause problems. */
@@ -620,6 +634,13 @@ static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "20046"), }, }, + { +/* Lenovo ThinkPad L460 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L460"), + }, + }, {/* Clevo P650RS, 650RP6, Sager NP8152-S, and others */ .matches = {
@@ -1163,6 +1184,9 @@ static int __init i8042_platform_init(void)if (dmi_check_system (i8042_dmi_nomux_table)) i8042_nomux = true; +if (dmi_check_system (i8042_dmi_forcemux_table)) + i8042_nomux = false; +if (dmi_check_system (i8042_dmi_notimeout_table)) i8042_notimeout = true;
drivers/media/usb/usbtv/usbtv-core.c +2 -0
@@ -112,6 +112,8 @@ static int usbtv_probe(struct usb_interface *intf,return 0 ; usbtv_audio_fail: +/* we must not free at this point */ +usb_get_dev (usbtv->udev);usbtv_video_free (usbtv); usbtv_video_fail:
drivers/misc/mei/main.c +0 -1
@@ -507,7 +507,6 @@ static long mei_ioctl(struct file *file, unsigned int cmd, unsigned long data)break ;default : -dev_err (dev->dev,": unsupported ioctl %d.\n" , cmd); rets = -ENOIOCTLCMD ; }
drivers/parport/parport_pc.c +4 -0
@@ -2646,6 +2646,7 @@ enum parport_pc_pci_cards { netmos_9901, netmos_9865, quatech_sppxp100, + wch_ch382l, };
@@ -2708,6 +2709,7 @@ static struct parport_pc_pci { /* netmos_9901 */ { 1, { { 0, -1 }, } }, /* netmos_9865 */ { 1, { { 0, -1 }, } }, /* quatech_sppxp100 */ { 1, { { 0, 1 }, } }, + /* wch_ch382l */ { 1, { { 2, -1 }, } }, }; static const struct pci_device_id parport_pc_pci_tbl[] = {
@@ -2797,6 +2799,8 @@ static const struct pci_device_id parport_pc_pci_tbl[] = {/* Quatech SPPXP-100 Parallel port PCI ExpressCard */ {PCI_VENDOR_ID_QUATECH ,PCI_DEVICE_ID_QUATECH_SPPXP_100 , PCI_ANY_ID, PCI_ANY_ID, 0, 0, quatech_sppxp100 }, +/* WCH CH382L PCI-E single parallel port card */ + { 0x1c00, 0x3050, 0x1c00, 0x3050, 0, 0, wch_ch382l }, { 0, } /* terminate list */ };MODULE_DEVICE_TABLE (pci, parport_pc_pci_tbl);
drivers/siox/siox-core.c +1 -1
@@ -594,7 +594,7 @@ static ssize_t device_add_store(struct device *dev,size_t inbytes =0 , outbytes =0 ;u8 statustype =0 ; - ret =sscanf (buf,"%20s %zu %zu %hhu" , type, &inbytes, + ret =sscanf (buf,"%19s %zu %zu %hhu" , type, &inbytes, &outbytes, &statustype);if (ret !=3 && ret !=4 )return -EINVAL ;
drivers/staging/comedi/drivers/ni_mio_common.c +2 -0
@@ -1275,6 +1275,8 @@ static void ack_a_interrupt(struct comedi_device *dev, unsigned short a_status) ack |=NISTC_INTA_ACK_AI_START ;if (a_status &NISTC_AI_STATUS1_STOP ) ack |=NISTC_INTA_ACK_AI_STOP ; +if (a_status &NISTC_AI_STATUS1_OVER ) + ack |=NISTC_INTA_ACK_AI_ERR ;if (ack)ni_stc_writew (dev, ack,NISTC_INTA_ACK_REG ); }
drivers/tty/serial/8250/8250_of.c +1 -0
@@ -316,6 +316,7 @@ static const struct of_device_id of_platform_serial_table[] = { { .compatible = "mrvl,mmp-uart", .data = (void *)PORT_XSCALE, }, { .compatible = "ti,da830-uart", .data = (void *)PORT_DA830, }, + { .compatible = "nuvoton,npcm750-uart", .data = (void *)PORT_NPCM, }, { /* end of list */ }, }; MODULE_DEVICE_TABLE(of, of_platform_serial_table);
drivers/tty/serial/8250/8250_port.c +33 -0
@@ -47,6 +47,10 @@#define UART_EXAR_SLEEP 0x8b/* Sleep mode */ #define UART_EXAR_DVID 0x8d/* Device identification */ +/* Nuvoton NPCM timeout register */ +#define UART_NPCM_TOR 7 +#define UART_NPCM_TOIE BIT(7)/* Timeout Interrupt Enable */ +/* * Debugging. */
@@ -293,6 +297,15 @@ static const struct serial8250_config uart_config[] = { UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT, .flags = UART_CAP_FIFO, }, + [PORT_NPCM] = { + .name = "Nuvoton 16550", + .fifo_size = 16, + .tx_loadsz = 16, + .fcr =UART_FCR_ENABLE_FIFO |UART_FCR_R_TRIG_10 | + UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT, + .rxtrig_bytes = {1, 4, 8, 14}, + .flags = UART_CAP_FIFO, + }, };/* Uart divisor latch read */
@@ -2140,6 +2153,15 @@ int serial8250_do_startup(struct uart_port *port) UART_DA830_PWREMU_MGMT_FREE); } +if (port->type ==PORT_NPCM ) { +/* +* Nuvoton calls the scratch register 'UART_TOR' (timeout +* register). Enable it, and set TIOC (timeout interrupt +* comparator) to be 0x20 for correct operation. +*/ +serial_port_out (port,UART_NPCM_TOR ,UART_NPCM_TOIE |0x20 ); + } +#ifdef CONFIG_SERIAL_8250_RSA /* * If this is an RSA port, see if we can kick it up to the
@@ -2462,6 +2484,15 @@ static unsigned int xr17v35x_get_divisor(struct uart_8250_port *up,return quot_16 >>4 ; } +/* Nuvoton NPCM UARTs have a custom divisor calculation */ +static unsigned int npcm_get_divisor (struct uart_8250_port *up, +unsigned int baud) +{ +struct uart_port *port = &up->port; + +return DIV_ROUND_CLOSEST (port->uartclk,16 * baud +2 ) -2 ; +} +static unsigned int serial8250_get_divisor (struct uart_8250_port *up,unsigned int baud,unsigned int *frac)
@@ -2482,6 +2513,8 @@ static unsigned int serial8250_get_divisor(struct uart_8250_port *up, quot =0x8002 ; else if (up->port.type == PORT_XR17V35X) quot =xr17v35x_get_divisor (up, baud, frac); + else if (up->port.type == PORT_NPCM) + quot =npcm_get_divisor (up, baud); else quot =uart_get_divisor (port, baud);
drivers/tty/vt/vt.c +5 -1
@@ -1354,6 +1354,11 @@ static void csi_m(struct vc_data *vc)case 3 : vc->vc_italic =1 ;break ; +case 21 : +/* +* No console drivers support double underline, so +* convert it to a single underline. +*/ case 4 : vc->vc_underline =1 ;break ;
@@ -1389,7 +1394,6 @@ static void csi_m(struct vc_data *vc) vc->vc_disp_ctrl =1 ; vc->vc_toggle_meta =1 ;break ; -case 21 :case 22 : vc->vc_intensity =1 ;break ;
drivers/usb/serial/cp210x.c +1 -0
@@ -155,6 +155,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x12B8, 0xEC62) }, /* Link G4+ ECU */ { USB_DEVICE(0x13AD, 0x9999) }, /* Baltech card reader */ { USB_DEVICE(0x1555, 0x0004) }, /* Owen AC4 USB-RS485 Converter */ + { USB_DEVICE(0x155A, 0x1006) }, /* ELDAT Easywave RX09 */ { USB_DEVICE(0x166A, 0x0201) }, /* Clipsal 5500PACA C-Bus Pascal Automation Controller */ { USB_DEVICE(0x166A, 0x0301) }, /* Clipsal 5800PC C-Bus Wireless PC Interface */ { USB_DEVICE(0x166A, 0x0303) }, /* Clipsal 5500PCU C-Bus USB interface */
drivers/usb/serial/ftdi_sio.c +2 -0
@@ -769,6 +769,7 @@ static const struct usb_device_id id_table_combined[] = { .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, { USB_DEVICE(NOVITUS_VID, NOVITUS_BONO_E_PID) }, + { USB_DEVICE(FTDI_VID, RTSYSTEMS_USB_VX8_PID) }, { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_S03_PID) }, { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_59_PID) }, { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_57A_PID) },
@@ -931,6 +932,7 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) }, { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) }, { USB_DEVICE(FTDI_VID, FTDI_CINTERION_MC55I_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_FHE_PID) }, { USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) }, { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
drivers/usb/serial/ftdi_sio_ids.h +9 -0
@@ -923,6 +923,9 @@/* * RT Systems programming cables for various ham radios */ +/* This device uses the VID of FTDI */ +#define RTSYSTEMS_USB_VX8_PID 0x9e50/* USB-VX8 USB to 7 pin modular plug for Yaesu VX-8 radio */ +#define RTSYSTEMS_VID 0x2100/* Vendor ID */ #define RTSYSTEMS_USB_S03_PID 0x9001/* RTS-03 USB to Serial Adapter */ #define RTSYSTEMS_USB_59_PID 0x9e50/* USB-59 USB to 8 pin plug */
@@ -1441,6 +1444,12 @@*/ #define FTDI_CINTERION_MC55I_PID 0xA951 +/* +* Product: FirmwareHubEmulator +* Manufacturer: Harman Becker Automotive Systems +*/ +#define FTDI_FHE_PID 0xA9A0 +/* * Product: Comet Caller ID decoder * Manufacturer: Crucible Technologies
fs/btrfs/inode.c +32 -5
@@ -1262,6 +1262,8 @@ static noinline int csum_exist_in_range(struct btrfs_fs_info *fs_info,list_del (&sums->list);kfree (sums); } +if (ret <0 ) +return ret;return 1 ; }
@@ -1394,10 +1396,23 @@ static noinline int run_delalloc_nocow(struct inode *inode, goto out_check;if (btrfs_extent_readonly (fs_info, disk_bytenr)) goto out_check; -if (btrfs_cross_ref_exist (root, ino, - found_key.offset - - extent_offset, disk_bytenr)) + ret =btrfs_cross_ref_exist (root, ino, + found_key.offset - + extent_offset, disk_bytenr); +if (ret) { +/* +* ret could be -EIO if the above fails to read +* metadata. +*/ +if (ret <0 ) { +if (cow_start != (u64)-1 ) + cur_offset = cow_start; + goto error; + } + +WARN_ON_ONCE (nolock); goto out_check; + } disk_bytenr += extent_offset; disk_bytenr += cur_offset - found_key.offset; num_bytes =min (end +1 , extent_end) - cur_offset;
@@ -1415,10 +1430,22 @@ static noinline int run_delalloc_nocow(struct inode *inode,* this ensure that csum for a given extent are * either valid or do not exist. */ -if (csum_exist_in_range (fs_info, disk_bytenr, - num_bytes)) { + ret =csum_exist_in_range (fs_info, disk_bytenr, + num_bytes); +if (ret) {if (!nolock)btrfs_end_write_no_snapshotting (root); + +/* +* ret could be -EIO if the above fails to read +* metadata. +*/ +if (ret <0 ) { +if (cow_start != (u64)-1 ) + cur_offset = cow_start; + goto error; + } +WARN_ON_ONCE (nolock); goto out_check; }if (!btrfs_inc_nocow_writers (fs_info, disk_bytenr)) {
include/linux/bitmap.h +17 -5
@@ -302,12 +302,20 @@ static inline void bitmap_complement(unsigned long *dst, const unsigned long *sr__bitmap_complement (dst, src, nbits); } +#ifdef __LITTLE_ENDIAN +#define BITMAP_MEM_ALIGNMENT 8 +#else +#define BITMAP_MEM_ALIGNMENT (8 * sizeof(unsigned long)) +#endif +#define BITMAP_MEM_MASK (BITMAP_MEM_ALIGNMENT - 1) +static inline int bitmap_equal (const unsigned long *src1,const unsigned long *src2,unsigned int nbits) {if (small_const_nbits (nbits))return !((*src1 ^ *src2) &BITMAP_LAST_WORD_MASK (nbits)); -if (__builtin_constant_p (nbits &7 ) &&IS_ALIGNED (nbits,8 )) +if (__builtin_constant_p (nbits &BITMAP_MEM_MASK ) && +IS_ALIGNED (nbits,BITMAP_MEM_ALIGNMENT ))return !memcmp (src1, src2, nbits /8 );return __bitmap_equal (src1, src2, nbits); }
@@ -358,8 +366,10 @@ static __always_inline void bitmap_set(unsigned long *map, unsigned int start, {if (__builtin_constant_p (nbits) && nbits ==1 )__set_bit (start, map); -else if (__builtin_constant_p (start &7 ) &&IS_ALIGNED (start,8 ) && -__builtin_constant_p (nbits &7 ) &&IS_ALIGNED (nbits,8 )) +else if (__builtin_constant_p (start &BITMAP_MEM_MASK ) && +IS_ALIGNED (start,BITMAP_MEM_ALIGNMENT ) && +__builtin_constant_p (nbits &BITMAP_MEM_MASK ) && +IS_ALIGNED (nbits,BITMAP_MEM_ALIGNMENT ))memset ((char *)map + start /8 ,0xff , nbits /8 );else __bitmap_set (map, start, nbits);
@@ -370,8 +380,10 @@ static __always_inline void bitmap_clear(unsigned long *map, unsigned int start, {if (__builtin_constant_p (nbits) && nbits ==1 )__clear_bit (start, map); -else if (__builtin_constant_p (start &7 ) &&IS_ALIGNED (start,8 ) && -__builtin_constant_p (nbits &7 ) &&IS_ALIGNED (nbits,8 )) +else if (__builtin_constant_p (start &BITMAP_MEM_MASK ) && +IS_ALIGNED (start,BITMAP_MEM_ALIGNMENT ) && +__builtin_constant_p (nbits &BITMAP_MEM_MASK ) && +IS_ALIGNED (nbits,BITMAP_MEM_ALIGNMENT ))memset ((char *)map + start /8 ,0 , nbits /8 );else __bitmap_clear (map, start, nbits);
include/linux/compat.h +4 -2
@@ -222,6 +222,8 @@ typedef struct compat_siginfo {#ifdef __ARCH_SI_TRAPNOint _trapno;/* TRAP # which caused the signal */ #endif +#define __COMPAT_ADDR_BND_PKEY_PAD (__alignof__(compat_uptr_t) < sizeof(short) ? \ + sizeof(short) : __alignof__(compat_uptr_t))union {/* * used when si_code=BUS_MCEERR_AR or
@@ -230,13 +232,13 @@ typedef struct compat_siginfo {short int _addr_lsb;/* Valid LSB of the reported address. */ /* used when si_code=SEGV_BNDERR */ struct { -compat_uptr_t _dummy_bnd; +char _dummy_bnd[__COMPAT_ADDR_BND_PKEY_PAD];compat_uptr_t _lower;compat_uptr_t _upper; } _addr_bnd;/* used when si_code=SEGV_PKUERR */ struct { -compat_uptr_t _dummy_pkey; +char _dummy_pkey[__COMPAT_ADDR_BND_PKEY_PAD];u32 _pkey; } _addr_pkey; };
include/uapi/asm-generic/siginfo.h +5 -2
@@ -94,6 +94,9 @@ typedef struct siginfo {unsigned int _flags;/* see ia64 si_flags */ unsigned long _isr;/* isr */ #endif + +#define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? \ + sizeof(short) : __alignof__(void *))union {/* * used when si_code=BUS_MCEERR_AR or
@@ -102,13 +105,13 @@ typedef struct siginfo {short _addr_lsb;/* LSB of the reported address */ /* used when si_code=SEGV_BNDERR */ struct { -void *_dummy_bnd; +char _dummy_bnd[__ADDR_BND_PKEY_PAD];void __user *_lower;void __user *_upper; } _addr_bnd;/* used when si_code=SEGV_PKUERR */ struct { -void *_dummy_pkey; +char _dummy_pkey[__ADDR_BND_PKEY_PAD];__u32 _pkey; } _addr_pkey; };
include/uapi/linux/serial_core.h +3 -0
@@ -76,6 +76,9 @@#define PORT_SUNZILOG 38#define PORT_SUNSAB 39 +/* Nuvoton UART */ +#define PORT_NPCM 40 +/* Intel EG20 */ #define PORT_PCH_8LINE 44#define PORT_PCH_2LINE 45