Linux 4.9.314
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.9.314 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 +- arch/mips/bmips/setup.c | 2 +- arch/mips/lantiq/prom.c | 2 +- arch/mips/pic32/pic32mzda/init.c | 2 +- drivers/block/drbd/drbd_nl.c | 13 ++++++++----- drivers/mmc/host/rtsx_pci_sdmmc.c | 30 ++++++++++++++++++++---------- drivers/net/can/grcan.c | 38 ++++++++++++++++++-------------------- include/net/bluetooth/hci_core.h | 3 +++ mm/userfaultfd.c | 3 +++ net/bluetooth/hci_core.c | 6 +++--- 10 files changed, 59 insertions(+), 42 deletions(-)
Andreas Larsson (2):
can: grcan: grcan_probe(): fix broken system id check for errata workaround needs
can: grcan: only use the NAPI poll budget for RX
Greg Kroah-Hartman (1):
Linux 4.9.314
Itay Iellin (1):
Bluetooth: Fix the creation of hdev->name
Lee Jones (1):
block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit
Muchun Song (1):
mm: userfaultfd: fix missing cache flush in mcopy_atomic_pte() and __mcopy_atomic()
Nathan Chancellor (1):
MIPS: Use address-of operator on section symbols
Ricky WU (1):
mmc: rtsx: add 74 Clocks in power on flow
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 313 +SUBLEVEL = 314 EXTRAVERSION = NAME = Roaring Lionus
arch/mips/bmips/setup.c +1 -1
@@ -174,7 +174,7 @@ void __init plat_mem_setup(void) dtb =phys_to_virt (fw_arg2); else if (fw_passed_dtb) /* UHI interface */ dtb = (void *)fw_passed_dtb; - else if (__dtb_start != __dtb_end) + else if (&__dtb_start != &__dtb_end) dtb = (void *)__dtb_start; else panic("no dtb found");
arch/mips/lantiq/prom.c +1 -1
@@ -76,7 +76,7 @@ void __init plat_mem_setup(void)if (fw_passed_dtb)/* UHI interface */ dtb = (void *)fw_passed_dtb; -else if (__dtb_start != __dtb_end) +else if (&__dtb_start != &__dtb_end) dtb = (void *)__dtb_start;else panic ("no dtb found" );
arch/mips/pic32/pic32mzda/init.c +1 -1
@@ -36,7 +36,7 @@ static ulong get_fdtaddr(void)if (fw_passed_dtb && !fw_arg2 && !fw_arg3)return (ulong )fw_passed_dtb; -if (__dtb_start < __dtb_end) +if (&__dtb_start < &__dtb_end) ftaddr = (ulong )__dtb_start;return ftaddr;
drivers/block/drbd/drbd_nl.c +8 -5
@@ -774,9 +774,11 @@ int drbd_adm_set_role(struct sk_buff *skb, struct genl_info *info)mutex_lock (&adm_ctx.resource->adm_mutex);if (info->genlhdr->cmd ==DRBD_ADM_PRIMARY ) - retcode =drbd_set_role (adm_ctx.device,R_PRIMARY , parms.assume_uptodate); + retcode = (enum drbd_ret_code )drbd_set_role (adm_ctx.device, +R_PRIMARY , parms.assume_uptodate);else - retcode =drbd_set_role (adm_ctx.device,R_SECONDARY ,0 ); + retcode = (enum drbd_ret_code )drbd_set_role (adm_ctx.device, +R_SECONDARY ,0 );mutex_unlock (&adm_ctx.resource->adm_mutex);genl_lock ();
@@ -1933,7 +1935,7 @@ int drbd_adm_attach(struct sk_buff *skb, struct genl_info *info)drbd_flush_workqueue (&connection->sender_work); rv =_drbd_request_state (device,NS (disk,D_ATTACHING ),CS_VERBOSE ); - retcode = rv;/* FIXME: Type mismatch. */ + retcode = (enum drbd_ret_code )rv;drbd_resume_io (device);if (rv <SS_SUCCESS ) goto fail;
@@ -2684,7 +2686,8 @@ int drbd_adm_connect(struct sk_buff *skb, struct genl_info *info) }rcu_read_unlock (); - retcode =conn_request_state (connection,NS (conn,C_UNCONNECTED ),CS_VERBOSE ); + retcode = (enum drbd_ret_code )conn_request_state (connection, +NS (conn,C_UNCONNECTED ),CS_VERBOSE );conn_reconfig_done (connection);mutex_unlock (&adm_ctx.resource->adm_mutex);
@@ -2790,7 +2793,7 @@ int drbd_adm_disconnect(struct sk_buff *skb, struct genl_info *info)mutex_lock (&adm_ctx.resource->adm_mutex); rv =conn_try_disconnect (connection, parms.force_disconnect);if (rv <SS_SUCCESS ) - retcode = rv;/* FIXME: Type mismatch. */ + retcode = (enum drbd_ret_code )rv;else retcode =NO_ERROR ;mutex_unlock (&adm_ctx.resource->adm_mutex);
drivers/mmc/host/rtsx_pci_sdmmc.c +20 -10
@@ -49,10 +49,7 @@ struct realtek_pci_sdmmc {bool double_clk;bool eject;bool initial_mode; -int power_state; -#define SDMMC_POWER_ON 1 -#define SDMMC_POWER_OFF 0 - +int prev_power_state;int sg_count;s32 cookie;int cookie_sg_count;
@@ -914,14 +911,21 @@ static int sd_set_bus_width(struct realtek_pci_sdmmc *host,return err; } -static int sd_power_on (struct realtek_pci_sdmmc *host) +static int sd_power_on (struct realtek_pci_sdmmc *host,unsigned char power_mode) {struct rtsx_pcr *pcr = host->pcr;int err; -if (host->power_state ==SDMMC_POWER_ON ) +if (host->prev_power_state ==MMC_POWER_ON )return 0 ; +if (host->prev_power_state ==MMC_POWER_UP ) { +rtsx_pci_write_register (pcr,SD_BUS_STAT ,SD_CLK_TOGGLE_EN ,0 ); + goto finish; + } + +msleep (100 ); +rtsx_pci_init_cmd (pcr);rtsx_pci_add_cmd (pcr,WRITE_REG_CMD ,CARD_SELECT ,0x07 ,SD_MOD_SEL ); rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SHARE_MODE,
@@ -940,11 +944,17 @@ static int sd_power_on(struct realtek_pci_sdmmc *host)if (err <0 )return err; +mdelay (1 ); + err =rtsx_pci_write_register (pcr,CARD_OE ,SD_OUTPUT_EN ,SD_OUTPUT_EN );if (err <0 )return err; - host->power_state =SDMMC_POWER_ON ; +/* send at least 74 clocks */ +rtsx_pci_write_register (pcr,SD_BUS_STAT ,SD_CLK_TOGGLE_EN ,SD_CLK_TOGGLE_EN ); + +finish: + host->prev_power_state = power_mode;return 0 ; }
@@ -953,7 +963,7 @@ static int sd_power_off(struct realtek_pci_sdmmc *host)struct rtsx_pcr *pcr = host->pcr;int err; - host->power_state =SDMMC_POWER_OFF ; + host->prev_power_state =MMC_POWER_OFF ;rtsx_pci_init_cmd (pcr);
@@ -979,7 +989,7 @@ static int sd_set_power_mode(struct realtek_pci_sdmmc *host,if (power_mode ==MMC_POWER_OFF ) err =sd_power_off (host);else - err =sd_power_on (host); + err =sd_power_on (host, power_mode);return err; }
@@ -1417,7 +1427,7 @@ static int rtsx_pci_sdmmc_drv_probe(struct platform_device *pdev) host->mmc = mmc; host->pdev = pdev; host->cookie =-1 ; - host->power_state =SDMMC_POWER_OFF ; + host->prev_power_state =MMC_POWER_OFF ;INIT_WORK (&host->work, sd_request);platform_set_drvdata (pdev, host); pcr->slots[RTSX_SD_CARD ].p_dev = pdev;
drivers/net/can/grcan.c +18 -20
@@ -245,7 +245,7 @@ struct grcan_device_config { .rxsize = GRCAN_DEFAULT_BUFFER_SIZE, \ } -#define GRCAN_TXBUG_SAFE_GRLIB_VERSION 0x4100 +#define GRCAN_TXBUG_SAFE_GRLIB_VERSION 4100#define GRLIB_VERSION_MASK 0xffff/* GRCAN private data structure */
@@ -1141,7 +1141,7 @@ static int grcan_close(struct net_device *dev)return 0 ; } -static int grcan_transmit_catch_up (struct net_device *dev,int budget) +static void grcan_transmit_catch_up (struct net_device *dev) {struct grcan_priv *priv =netdev_priv (dev);unsigned long flags;
@@ -1149,7 +1149,7 @@ static int grcan_transmit_catch_up(struct net_device *dev, int budget)spin_lock_irqsave (&priv->lock, flags); - work_done =catch_up_echo_skb (dev, budget, true); + work_done =catch_up_echo_skb (dev,-1 , true);if (work_done) {if (!priv->resetting && !priv->closing && !(priv->can.ctrlmode &CAN_CTRLMODE_LISTENONLY ))
@@ -1163,8 +1163,6 @@ static int grcan_transmit_catch_up(struct net_device *dev, int budget) }spin_unlock_irqrestore (&priv->lock, flags); - -return work_done; }static int grcan_receive (struct net_device *dev,int budget)
@@ -1246,19 +1244,13 @@ static int grcan_poll(struct napi_struct *napi, int budget)struct net_device *dev = priv->dev;struct grcan_registers __iomem *regs = priv->regs;unsigned long flags; -int tx_work_done, rx_work_done; -int rx_budget = budget /2 ; -int tx_budget = budget - rx_budget; +int work_done; -/* Half of the budget for receiveing messages */ - rx_work_done =grcan_receive (dev, rx_budget); + work_done =grcan_receive (dev, budget); -/* Half of the budget for transmitting messages as that can trigger echo -* frames being received -*/ - tx_work_done =grcan_transmit_catch_up (dev, tx_budget); +grcan_transmit_catch_up (dev); -if (rx_work_done < rx_budget && tx_work_done < tx_budget) { +if (work_done < budget) {napi_complete (napi);/* Guarantee no interference with a running reset that otherwise
@@ -1275,7 +1267,7 @@ static int grcan_poll(struct napi_struct *napi, int budget)spin_unlock_irqrestore (&priv->lock, flags); } -return rx_work_done + tx_work_done; +return work_done; }/* Work tx bug by waiting while for the risky situation to clear. If that fails,
@@ -1665,6 +1657,7 @@ static int grcan_setup_netdev(struct platform_device *ofdev,static int grcan_probe (struct platform_device *ofdev) {struct device_node *np = ofdev->dev.of_node; +struct device_node *sysid_parent;struct resource *res;u32 sysid, ambafreq;int irq, err;
@@ -1674,10 +1667,15 @@ static int grcan_probe(struct platform_device *ofdev)/* Compare GRLIB version number with the first that does not * have the tx bug (see start_xmit) */ - err =of_property_read_u32 (np,"systemid" , &sysid); -if (!err && ((sysid &GRLIB_VERSION_MASK ) - >=GRCAN_TXBUG_SAFE_GRLIB_VERSION )) - txbug = false; + sysid_parent =of_find_node_by_path ("/ambapp0" ); +if (sysid_parent) { +of_node_get (sysid_parent); + err =of_property_read_u32 (sysid_parent,"systemid" , &sysid); +if (!err && ((sysid &GRLIB_VERSION_MASK ) >= +GRCAN_TXBUG_SAFE_GRLIB_VERSION )) + txbug = false; +of_node_put (sysid_parent); + } err =of_property_read_u32 (np,"freq" , &ambafreq);if (err) {
include/net/bluetooth/hci_core.h +3 -0
@@ -32,6 +32,9 @@/* HCI priority */ #define HCI_PRIO_MAX 7 +/* HCI maximum id value */ +#define HCI_MAX_ID 10000 +/* HCI Core structures */ struct inquiry_data {bdaddr_t bdaddr;
mm/userfaultfd.c +3 -0
@@ -50,6 +50,8 @@ static int mcopy_atomic_pte(struct mm_struct *dst_mm,/* don't free the page */ goto out; } + +flush_dcache_page (page); }else { page = *pagep; *pagep =NULL ;
@@ -267,6 +269,7 @@ static __always_inline ssize_t __mcopy_atomic(struct mm_struct *dst_mm, err = -EFAULT ; goto out; } +flush_dcache_page (page); goto retry; }else BUG_ON (page);
net/bluetooth/hci_core.c +3 -3
@@ -3064,10 +3064,10 @@ int hci_register_dev(struct hci_dev *hdev)*/ switch (hdev->dev_type) {case HCI_PRIMARY : - id =ida_simple_get (&hci_index_ida,0 ,0 ,GFP_KERNEL ); + id =ida_simple_get (&hci_index_ida,0 ,HCI_MAX_ID ,GFP_KERNEL );break ;case HCI_AMP : - id =ida_simple_get (&hci_index_ida,1 ,0 ,GFP_KERNEL ); + id =ida_simple_get (&hci_index_ida,1 ,HCI_MAX_ID ,GFP_KERNEL );break ;default :return -EINVAL ;
@@ -3076,7 +3076,7 @@ int hci_register_dev(struct hci_dev *hdev)if (id <0 )return id; -sprintf (hdev->name,"hci%d" , id); +snprintf (hdev->name,sizeof (hdev->name),"hci%d" , id); hdev->id = id;BT_DBG ("%p name %s bus %d" , hdev, hdev->name, hdev->bus);