Skip to content

Commit 64c2723

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/marvell/mvneta.c The mvneta.c conflict is a case of overlapping changes, a conversion to devm_ioremap_resource() vs. a conversion to netdev_alloc_pcpu_stats. Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 77a9939 + 49d8137 commit 64c2723

File tree

48 files changed

+527
-267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+527
-267
lines changed

MAINTAINERS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,8 +1839,8 @@ F: net/bluetooth/
18391839
F: include/net/bluetooth/
18401840

18411841
BONDING DRIVER
1842-
M: Jay Vosburgh <fubar@us.ibm.com>
1843-
M: Veaceslav Falico <vfalico@redhat.com>
1842+
M: Jay Vosburgh <j.vosburgh@gmail.com>
1843+
M: Veaceslav Falico <vfalico@gmail.com>
18441844
M: Andy Gospodarek <andy@greyhouse.net>
18451845
L: netdev@vger.kernel.org
18461846
W: http://sourceforge.net/projects/bonding/
@@ -6019,6 +6019,7 @@ F: include/uapi/linux/net.h
60196019
F: include/uapi/linux/netdevice.h
60206020
F: tools/net/
60216021
F: tools/testing/selftests/net/
6022+
F: lib/random32.c
60226023

60236024
NETWORKING [IPv4/IPv6]
60246025
M: "David S. Miller" <davem@davemloft.net>

arch/x86/include/asm/pgtable.h

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -445,20 +445,10 @@ static inline int pte_same(pte_t a, pte_t b)
445445
return a.pte == b.pte;
446446
}
447447

448-
static inline int pteval_present(pteval_t pteval)
449-
{
450-
/*
451-
* Yes Linus, _PAGE_PROTNONE == _PAGE_NUMA. Expressing it this
452-
* way clearly states that the intent is that protnone and numa
453-
* hinting ptes are considered present for the purposes of
454-
* pagetable operations like zapping, protection changes, gup etc.
455-
*/
456-
return pteval & (_PAGE_PRESENT | _PAGE_PROTNONE | _PAGE_NUMA);
457-
}
458-
459448
static inline int pte_present(pte_t a)
460449
{
461-
return pteval_present(pte_flags(a));
450+
return pte_flags(a) & (_PAGE_PRESENT | _PAGE_PROTNONE |
451+
_PAGE_NUMA);
462452
}
463453

464454
#define pte_accessible pte_accessible

arch/x86/include/asm/topology.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ static inline void setup_node_to_cpumask_map(void) { }
119119

120120
extern const struct cpumask *cpu_coregroup_mask(int cpu);
121121

122-
#ifdef ENABLE_TOPO_DEFINES
123122
#define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id)
124123
#define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
124+
125+
#ifdef ENABLE_TOPO_DEFINES
125126
#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
126127
#define topology_thread_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
127128
#endif

arch/x86/xen/mmu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr,
365365
/* Assume pteval_t is equivalent to all the other *val_t types. */
366366
static pteval_t pte_mfn_to_pfn(pteval_t val)
367367
{
368-
if (pteval_present(val)) {
368+
if (val & _PAGE_PRESENT) {
369369
unsigned long mfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT;
370370
unsigned long pfn = mfn_to_pfn(mfn);
371371

@@ -381,7 +381,7 @@ static pteval_t pte_mfn_to_pfn(pteval_t val)
381381

382382
static pteval_t pte_pfn_to_mfn(pteval_t val)
383383
{
384-
if (pteval_present(val)) {
384+
if (val & _PAGE_PRESENT) {
385385
unsigned long pfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT;
386386
pteval_t flags = val & PTE_FLAGS_MASK;
387387
unsigned long mfn;

drivers/gpu/drm/i915/i915_gem_gtt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ void i915_gem_suspend_gtt_mappings(struct drm_device *dev)
842842
dev_priv->gtt.base.clear_range(&dev_priv->gtt.base,
843843
dev_priv->gtt.base.start / PAGE_SIZE,
844844
dev_priv->gtt.base.total / PAGE_SIZE,
845-
false);
845+
true);
846846
}
847847

848848
void i915_gem_restore_gtt_mappings(struct drm_device *dev)

drivers/gpu/drm/nouveau/nouveau_drm.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -866,13 +866,16 @@ static int nouveau_pmops_runtime_suspend(struct device *dev)
866866
struct drm_device *drm_dev = pci_get_drvdata(pdev);
867867
int ret;
868868

869-
if (nouveau_runtime_pm == 0)
870-
return -EINVAL;
869+
if (nouveau_runtime_pm == 0) {
870+
pm_runtime_forbid(dev);
871+
return -EBUSY;
872+
}
871873

872874
/* are we optimus enabled? */
873875
if (nouveau_runtime_pm == -1 && !nouveau_is_optimus() && !nouveau_is_v1_dsm()) {
874876
DRM_DEBUG_DRIVER("failing to power off - not optimus\n");
875-
return -EINVAL;
877+
pm_runtime_forbid(dev);
878+
return -EBUSY;
876879
}
877880

878881
nv_debug_level(SILENT);
@@ -923,12 +926,15 @@ static int nouveau_pmops_runtime_idle(struct device *dev)
923926
struct nouveau_drm *drm = nouveau_drm(drm_dev);
924927
struct drm_crtc *crtc;
925928

926-
if (nouveau_runtime_pm == 0)
929+
if (nouveau_runtime_pm == 0) {
930+
pm_runtime_forbid(dev);
927931
return -EBUSY;
932+
}
928933

929934
/* are we optimus enabled? */
930935
if (nouveau_runtime_pm == -1 && !nouveau_is_optimus() && !nouveau_is_v1_dsm()) {
931936
DRM_DEBUG_DRIVER("failing to power off - not optimus\n");
937+
pm_runtime_forbid(dev);
932938
return -EBUSY;
933939
}
934940

drivers/gpu/drm/radeon/radeon_drv.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,15 @@ static int radeon_pmops_runtime_suspend(struct device *dev)
403403
struct drm_device *drm_dev = pci_get_drvdata(pdev);
404404
int ret;
405405

406-
if (radeon_runtime_pm == 0)
407-
return -EINVAL;
406+
if (radeon_runtime_pm == 0) {
407+
pm_runtime_forbid(dev);
408+
return -EBUSY;
409+
}
408410

409-
if (radeon_runtime_pm == -1 && !radeon_is_px())
410-
return -EINVAL;
411+
if (radeon_runtime_pm == -1 && !radeon_is_px()) {
412+
pm_runtime_forbid(dev);
413+
return -EBUSY;
414+
}
411415

412416
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
413417
drm_kms_helper_poll_disable(drm_dev);
@@ -456,12 +460,15 @@ static int radeon_pmops_runtime_idle(struct device *dev)
456460
struct drm_device *drm_dev = pci_get_drvdata(pdev);
457461
struct drm_crtc *crtc;
458462

459-
if (radeon_runtime_pm == 0)
463+
if (radeon_runtime_pm == 0) {
464+
pm_runtime_forbid(dev);
460465
return -EBUSY;
466+
}
461467

462468
/* are we PX enabled? */
463469
if (radeon_runtime_pm == -1 && !radeon_is_px()) {
464470
DRM_DEBUG_DRIVER("failing to power off - not px\n");
471+
pm_runtime_forbid(dev);
465472
return -EBUSY;
466473
}
467474

drivers/gpu/drm/udl/udl_gem.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,10 @@ void udl_gem_free_object(struct drm_gem_object *gem_obj)
177177
if (obj->vmapping)
178178
udl_gem_vunmap(obj);
179179

180-
if (gem_obj->import_attach)
180+
if (gem_obj->import_attach) {
181181
drm_prime_gem_destroy(gem_obj, obj->sg);
182+
put_device(gem_obj->dev->dev);
183+
}
182184

183185
if (obj->pages)
184186
udl_gem_put_pages(obj);
@@ -256,9 +258,12 @@ struct drm_gem_object *udl_gem_prime_import(struct drm_device *dev,
256258
int ret;
257259

258260
/* need to attach */
261+
get_device(dev->dev);
259262
attach = dma_buf_attach(dma_buf, dev->dev);
260-
if (IS_ERR(attach))
263+
if (IS_ERR(attach)) {
264+
put_device(dev->dev);
261265
return ERR_CAST(attach);
266+
}
262267

263268
get_dma_buf(dma_buf);
264269

@@ -282,6 +287,6 @@ struct drm_gem_object *udl_gem_prime_import(struct drm_device *dev,
282287
fail_detach:
283288
dma_buf_detach(dma_buf, attach);
284289
dma_buf_put(dma_buf);
285-
290+
put_device(dev->dev);
286291
return ERR_PTR(ret);
287292
}

drivers/i2c/busses/i2c-cpm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
#include <linux/i2c.h>
4040
#include <linux/io.h>
4141
#include <linux/dma-mapping.h>
42+
#include <linux/of_address.h>
4243
#include <linux/of_device.h>
44+
#include <linux/of_irq.h>
4345
#include <linux/of_platform.h>
4446
#include <sysdev/fsl_soc.h>
4547
#include <asm/cpm.h>

drivers/input/keyboard/adp5588-keys.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,18 @@ static int adp5588_gpio_get_value(struct gpio_chip *chip, unsigned off)
7676
struct adp5588_kpad *kpad = container_of(chip, struct adp5588_kpad, gc);
7777
unsigned int bank = ADP5588_BANK(kpad->gpiomap[off]);
7878
unsigned int bit = ADP5588_BIT(kpad->gpiomap[off]);
79+
int val;
7980

80-
return !!(adp5588_read(kpad->client, GPIO_DAT_STAT1 + bank) & bit);
81+
mutex_lock(&kpad->gpio_lock);
82+
83+
if (kpad->dir[bank] & bit)
84+
val = kpad->dat_out[bank];
85+
else
86+
val = adp5588_read(kpad->client, GPIO_DAT_STAT1 + bank);
87+
88+
mutex_unlock(&kpad->gpio_lock);
89+
90+
return !!(val & bit);
8191
}
8292

8393
static void adp5588_gpio_set_value(struct gpio_chip *chip,

drivers/input/misc/da9052_onkey.c

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,32 @@ struct da9052_onkey {
2727

2828
static void da9052_onkey_query(struct da9052_onkey *onkey)
2929
{
30-
int key_stat;
30+
int ret;
3131

32-
key_stat = da9052_reg_read(onkey->da9052, DA9052_EVENT_B_REG);
33-
if (key_stat < 0) {
32+
ret = da9052_reg_read(onkey->da9052, DA9052_STATUS_A_REG);
33+
if (ret < 0) {
3434
dev_err(onkey->da9052->dev,
35-
"Failed to read onkey event %d\n", key_stat);
35+
"Failed to read onkey event err=%d\n", ret);
3636
} else {
3737
/*
3838
* Since interrupt for deassertion of ONKEY pin is not
3939
* generated, onkey event state determines the onkey
4040
* button state.
4141
*/
42-
key_stat &= DA9052_EVENTB_ENONKEY;
43-
input_report_key(onkey->input, KEY_POWER, key_stat);
42+
bool pressed = !(ret & DA9052_STATUSA_NONKEY);
43+
44+
input_report_key(onkey->input, KEY_POWER, pressed);
4445
input_sync(onkey->input);
45-
}
4646

47-
/*
48-
* Interrupt is generated only when the ONKEY pin is asserted.
49-
* Hence the deassertion of the pin is simulated through work queue.
50-
*/
51-
if (key_stat)
52-
schedule_delayed_work(&onkey->work, msecs_to_jiffies(50));
47+
/*
48+
* Interrupt is generated only when the ONKEY pin
49+
* is asserted. Hence the deassertion of the pin
50+
* is simulated through work queue.
51+
*/
52+
if (pressed)
53+
schedule_delayed_work(&onkey->work,
54+
msecs_to_jiffies(50));
55+
}
5356
}
5457

5558
static void da9052_onkey_work(struct work_struct *work)

drivers/input/mouse/cypress_ps2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ static int cypress_set_input_params(struct input_dev *input,
409409
__clear_bit(REL_X, input->relbit);
410410
__clear_bit(REL_Y, input->relbit);
411411

412-
__set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
413412
__set_bit(EV_KEY, input->evbit);
414413
__set_bit(BTN_LEFT, input->keybit);
415414
__set_bit(BTN_RIGHT, input->keybit);

drivers/input/mouse/synaptics.c

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,22 @@ static int synaptics_identify(struct psmouse *psmouse)
265265
* Read touchpad resolution and maximum reported coordinates
266266
* Resolution is left zero if touchpad does not support the query
267267
*/
268+
269+
static const int *quirk_min_max;
270+
268271
static int synaptics_resolution(struct psmouse *psmouse)
269272
{
270273
struct synaptics_data *priv = psmouse->private;
271274
unsigned char resp[3];
272275

276+
if (quirk_min_max) {
277+
priv->x_min = quirk_min_max[0];
278+
priv->x_max = quirk_min_max[1];
279+
priv->y_min = quirk_min_max[2];
280+
priv->y_max = quirk_min_max[3];
281+
return 0;
282+
}
283+
273284
if (SYN_ID_MAJOR(priv->identity) < 4)
274285
return 0;
275286

@@ -1485,10 +1496,54 @@ static const struct dmi_system_id olpc_dmi_table[] __initconst = {
14851496
{ }
14861497
};
14871498

1499+
static const struct dmi_system_id min_max_dmi_table[] __initconst = {
1500+
#if defined(CONFIG_DMI)
1501+
{
1502+
/* Lenovo ThinkPad Helix */
1503+
.matches = {
1504+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1505+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Helix"),
1506+
},
1507+
.driver_data = (int []){1024, 5052, 2258, 4832},
1508+
},
1509+
{
1510+
/* Lenovo ThinkPad X240 */
1511+
.matches = {
1512+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1513+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X240"),
1514+
},
1515+
.driver_data = (int []){1232, 5710, 1156, 4696},
1516+
},
1517+
{
1518+
/* Lenovo ThinkPad T440s */
1519+
.matches = {
1520+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1521+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T440"),
1522+
},
1523+
.driver_data = (int []){1024, 5112, 2024, 4832},
1524+
},
1525+
{
1526+
/* Lenovo ThinkPad T540p */
1527+
.matches = {
1528+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1529+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T540"),
1530+
},
1531+
.driver_data = (int []){1024, 5056, 2058, 4832},
1532+
},
1533+
#endif
1534+
{ }
1535+
};
1536+
14881537
void __init synaptics_module_init(void)
14891538
{
1539+
const struct dmi_system_id *min_max_dmi;
1540+
14901541
impaired_toshiba_kbc = dmi_check_system(toshiba_dmi_table);
14911542
broken_olpc_ec = dmi_check_system(olpc_dmi_table);
1543+
1544+
min_max_dmi = dmi_first_match(min_max_dmi_table);
1545+
if (min_max_dmi)
1546+
quirk_min_max = min_max_dmi->driver_data;
14921547
}
14931548

14941549
static int __synaptics_init(struct psmouse *psmouse, bool absolute_mode)

drivers/net/ethernet/broadcom/tg3.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17641,8 +17641,6 @@ static int tg3_init_one(struct pci_dev *pdev,
1764117641

1764217642
tg3_init_bufmgr_config(tp);
1764317643

17644-
features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
17645-
1764617644
/* 5700 B0 chips do not support checksumming correctly due
1764717645
* to hardware bugs.
1764817646
*/
@@ -17674,7 +17672,8 @@ static int tg3_init_one(struct pci_dev *pdev,
1767417672
features |= NETIF_F_TSO_ECN;
1767517673
}
1767617674

17677-
dev->features |= features;
17675+
dev->features |= features | NETIF_F_HW_VLAN_CTAG_TX |
17676+
NETIF_F_HW_VLAN_CTAG_RX;
1767817677
dev->vlan_features |= features;
1767917678

1768017679
/*

0 commit comments

Comments
 (0)