From: David S. Miller Date: Mon, 12 May 2014 17:19:14 +0000 (-0400) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5f013c9bc70214dcacd5fbed5a06c217d6ff9c59;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Merge git://git./linux/kernel/git/davem/net Conflicts: drivers/net/ethernet/altera/altera_sgdma.c net/netlink/af_netlink.c net/sched/cls_api.c net/sched/sch_api.c The netlink conflict dealt with moving to netlink_capable() and netlink_ns_capable() in the 'net' tree vs. supporting 'tc' operations in non-init namespaces. These were simple transformations from netlink_capable to netlink_ns_capable. The Altera driver conflict was simply code removal overlapping some void pointer cast cleanups in net-next. Signed-off-by: David S. Miller --- 5f013c9bc70214dcacd5fbed5a06c217d6ff9c59 diff --cc drivers/net/bonding/bond_sysfs.c index 5a59b85cdfc2,5f6babcfc26e..39c4d8d61074 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c @@@ -362,10 -534,24 +362,10 @@@ static ssize_t bonding_show_min_links(s { struct bonding *bond = to_bond(d); - return sprintf(buf, "%d\n", bond->params.min_links); + return sprintf(buf, "%u\n", bond->params.min_links); } - -static ssize_t bonding_store_min_links(struct device *d, - struct device_attribute *attr, - const char *buf, size_t count) -{ - struct bonding *bond = to_bond(d); - int ret; - - ret = bond_opt_tryset_rtnl(bond, BOND_OPT_MINLINKS, (char *)buf); - if (!ret) - ret = count; - - return ret; -} static DEVICE_ATTR(min_links, S_IRUGO | S_IWUSR, - bonding_show_min_links, bonding_store_min_links); + bonding_show_min_links, bonding_sysfs_store_option); static ssize_t bonding_show_ad_select(struct device *d, struct device_attribute *attr, diff --cc drivers/net/can/c_can/c_can_pci.c index 7ab384f59e7e,fe5f6303b584..58f71e1fcc4e --- a/drivers/net/can/c_can/c_can_pci.c +++ b/drivers/net/can/c_can/c_can_pci.c @@@ -115,11 -84,13 +115,14 @@@ static int c_can_pci_probe(struct pci_d goto out_disable_device; } - pci_set_master(pdev); - pci_enable_msi(pdev); + ret = pci_enable_msi(pdev); + if (!ret) { + dev_info(&pdev->dev, "MSI enabled\n"); + pci_set_master(pdev); + } - addr = pci_iomap(pdev, 0, pci_resource_len(pdev, 0)); + addr = pci_iomap(pdev, c_can_pci_data->bar, + pci_resource_len(pdev, c_can_pci_data->bar)); if (!addr) { dev_err(&pdev->dev, "device has no PCI memory resources, " diff --cc drivers/net/ethernet/intel/e1000e/ich8lan.c index a2901139b209,f0bbd4246d71..5f5539561661 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c @@@ -1318,11 -1331,13 +1331,14 @@@ static s32 e1000_check_for_copper_link_ * aggressive resulting in many collisions. To avoid this, increase * the IPG and reduce Rx latency in the PHY. */ - if ((hw->mac.type == e1000_pch2lan) && link) { + if (((hw->mac.type == e1000_pch2lan) || + (hw->mac.type == e1000_pch_lpt)) && link) { u32 reg; + reg = er32(STATUS); if (!(reg & (E1000_STATUS_FD | E1000_STATUS_SPEED_MASK))) { + u16 emi_addr; + reg = er32(TIPG); reg &= ~E1000_TIPG_IPGT_MASK; reg |= 0xFF; diff --cc net/netlink/af_netlink.c index 92f4b6915e89,81dca96d2be6..e0ccd84d4d67 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@@ -1445,8 -1492,8 +1510,8 @@@ static int netlink_bind(struct socket * return -EINVAL; /* Only superuser is allowed to listen multicasts */ - if (nladdr->nl_groups) { + if (groups) { - if (!netlink_capable(sock, NL_CFG_F_NONROOT_RECV)) + if (!netlink_allowed(sock, NL_CFG_F_NONROOT_RECV)) return -EPERM; err = netlink_realloc_groups(sk); if (err) diff --cc net/sched/cls_api.c index 1a4a20267787,bdbdb1a7920a..45527e6b52db --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@@ -134,8 -134,7 +134,8 @@@ static int tc_ctl_tfilter(struct sk_buf int err; int tp_created = 0; - if ((n->nlmsg_type != RTM_GETTFILTER) && !netlink_capable(skb, CAP_NET_ADMIN)) + if ((n->nlmsg_type != RTM_GETTFILTER) && - !ns_capable(net->user_ns, CAP_NET_ADMIN)) ++ !netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) return -EPERM; replay: diff --cc net/sched/sch_api.c index 86f8edfd6b8a,400769014bbd..fd14df56e5ff --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@@ -1084,8 -1084,7 +1084,8 @@@ static int tc_get_qdisc(struct sk_buff struct Qdisc *p = NULL; int err; - if ((n->nlmsg_type != RTM_GETQDISC) && !netlink_capable(skb, CAP_NET_ADMIN)) + if ((n->nlmsg_type != RTM_GETQDISC) && - !ns_capable(net->user_ns, CAP_NET_ADMIN)) ++ !netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) return -EPERM; err = nlmsg_parse(n, sizeof(*tcm), tca, TCA_MAX, NULL); @@@ -1152,7 -1151,7 +1152,7 @@@ static int tc_modify_qdisc(struct sk_bu struct Qdisc *q, *p; int err; - if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) - if (!netlink_capable(skb, CAP_NET_ADMIN)) ++ if (!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) return -EPERM; replay: @@@ -1491,8 -1490,7 +1491,8 @@@ static int tc_ctl_tclass(struct sk_buf u32 qid; int err; - if ((n->nlmsg_type != RTM_GETTCLASS) && !netlink_capable(skb, CAP_NET_ADMIN)) + if ((n->nlmsg_type != RTM_GETTCLASS) && - !ns_capable(net->user_ns, CAP_NET_ADMIN)) ++ !netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) return -EPERM; err = nlmsg_parse(n, sizeof(*tcm), tca, TCA_MAX, NULL); diff --cc net/wireless/scan.c index 0f5da18cc619,88f108edfb58..e7329bb6a323 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@@ -284,14 -284,22 +284,22 @@@ void cfg80211_sched_scan_results(struc } EXPORT_SYMBOL(cfg80211_sched_scan_results); - void cfg80211_sched_scan_stopped(struct wiphy *wiphy) + void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy) { - struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); + ASSERT_RTNL(); + trace_cfg80211_sched_scan_stopped(wiphy); - rtnl_lock(); __cfg80211_stop_sched_scan(rdev, true); + } + EXPORT_SYMBOL(cfg80211_sched_scan_stopped_rtnl); + + void cfg80211_sched_scan_stopped(struct wiphy *wiphy) + { + rtnl_lock(); + cfg80211_sched_scan_stopped_rtnl(wiphy); rtnl_unlock(); } EXPORT_SYMBOL(cfg80211_sched_scan_stopped);