mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
2458 lines
81 KiB
Diff
2458 lines
81 KiB
Diff
diff --git a/Documentation/scheduler/sched-rt-group.txt b/Documentation/scheduler/sched-rt-group.txt
|
|
index 1df7f9c..86eabe6 100644
|
|
--- a/Documentation/scheduler/sched-rt-group.txt
|
|
+++ b/Documentation/scheduler/sched-rt-group.txt
|
|
@@ -73,7 +73,7 @@ The remaining CPU time will be used for user input and other tasks. Because
|
|
realtime tasks have explicitly allocated the CPU time they need to perform
|
|
their tasks, buffer underruns in the graphics or audio can be eliminated.
|
|
|
|
-NOTE: the above example is not fully implemented as of yet (2.6.25). We still
|
|
+NOTE: the above example is not fully implemented yet. We still
|
|
lack an EDF scheduler to make non-uniform periods usable.
|
|
|
|
|
|
@@ -140,14 +140,15 @@ The other option is:
|
|
|
|
.o CONFIG_CGROUP_SCHED (aka "Basis for grouping tasks" = "Control groups")
|
|
|
|
-This uses the /cgroup virtual file system and "/cgroup/<cgroup>/cpu.rt_runtime_us"
|
|
-to control the CPU time reserved for each control group instead.
|
|
+This uses the /cgroup virtual file system and
|
|
+"/cgroup/<cgroup>/cpu.rt_runtime_us" to control the CPU time reserved for each
|
|
+control group instead.
|
|
|
|
For more information on working with control groups, you should read
|
|
Documentation/cgroups/cgroups.txt as well.
|
|
|
|
-Group settings are checked against the following limits in order to keep the configuration
|
|
-schedulable:
|
|
+Group settings are checked against the following limits in order to keep the
|
|
+configuration schedulable:
|
|
|
|
\Sum_{i} runtime_{i} / global_period <= global_runtime / global_period
|
|
|
|
@@ -189,7 +190,7 @@ Implementing SCHED_EDF might take a while to complete. Priority Inheritance is
|
|
the biggest challenge as the current linux PI infrastructure is geared towards
|
|
the limited static priority levels 0-99. With deadline scheduling you need to
|
|
do deadline inheritance (since priority is inversely proportional to the
|
|
-deadline delta (deadline - now).
|
|
+deadline delta (deadline - now)).
|
|
|
|
This means the whole PI machinery will have to be reworked - and that is one of
|
|
the most complex pieces of code we have.
|
|
diff --git a/Makefile b/Makefile
|
|
index be0abac..05512c3 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -1,7 +1,7 @@
|
|
VERSION = 2
|
|
PATCHLEVEL = 6
|
|
SUBLEVEL = 31
|
|
-EXTRAVERSION = -rc3
|
|
+EXTRAVERSION = -rc3-git4
|
|
NAME = Man-Eating Seals of Antiquity
|
|
|
|
# *DOCUMENTATION*
|
|
@@ -343,7 +343,8 @@ KBUILD_CPPFLAGS := -D__KERNEL__
|
|
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
|
-fno-strict-aliasing -fno-common \
|
|
-Werror-implicit-function-declaration \
|
|
- -Wno-format-security
|
|
+ -Wno-format-security \
|
|
+ -fno-delete-null-pointer-checks
|
|
KBUILD_AFLAGS := -D__ASSEMBLY__
|
|
|
|
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
|
|
diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
|
|
index 0c26157..b6395ad 100644
|
|
--- a/arch/ia64/include/asm/fpu.h
|
|
+++ b/arch/ia64/include/asm/fpu.h
|
|
@@ -6,6 +6,8 @@
|
|
* David Mosberger-Tang <davidm@hpl.hp.com>
|
|
*/
|
|
|
|
+#include <linux/types.h>
|
|
+
|
|
/* floating point status register: */
|
|
#define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */
|
|
#define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */
|
|
diff --git a/arch/ia64/include/asm/xen/hypervisor.h b/arch/ia64/include/asm/xen/hypervisor.h
|
|
index e425227..88afb54 100644
|
|
--- a/arch/ia64/include/asm/xen/hypervisor.h
|
|
+++ b/arch/ia64/include/asm/xen/hypervisor.h
|
|
@@ -33,6 +33,7 @@
|
|
#ifndef _ASM_IA64_XEN_HYPERVISOR_H
|
|
#define _ASM_IA64_XEN_HYPERVISOR_H
|
|
|
|
+#include <linux/err.h>
|
|
#include <xen/interface/xen.h>
|
|
#include <xen/interface/version.h> /* to compile feature.c */
|
|
#include <xen/features.h> /* to comiple xen-netfront.c */
|
|
diff --git a/arch/ia64/kernel/dma-mapping.c b/arch/ia64/kernel/dma-mapping.c
|
|
index 086a2ae..39a3cd0 100644
|
|
--- a/arch/ia64/kernel/dma-mapping.c
|
|
+++ b/arch/ia64/kernel/dma-mapping.c
|
|
@@ -6,6 +6,14 @@ int iommu_detected __read_mostly;
|
|
struct dma_map_ops *dma_ops;
|
|
EXPORT_SYMBOL(dma_ops);
|
|
|
|
+#define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16)
|
|
+
|
|
+static int __init dma_init(void)
|
|
+{
|
|
+ dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
|
|
+}
|
|
+fs_initcall(dma_init);
|
|
+
|
|
struct dma_map_ops *dma_get_ops(struct device *dev)
|
|
{
|
|
return dma_ops;
|
|
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
|
|
index 9fa2c7d..ef14988 100644
|
|
--- a/arch/powerpc/kernel/ptrace.c
|
|
+++ b/arch/powerpc/kernel/ptrace.c
|
|
@@ -736,15 +736,16 @@ void user_disable_single_step(struct task_struct *task)
|
|
{
|
|
struct pt_regs *regs = task->thread.regs;
|
|
|
|
-
|
|
-#if defined(CONFIG_BOOKE)
|
|
- /* If DAC then do not single step, skip */
|
|
- if (task->thread.dabr)
|
|
- return;
|
|
-#endif
|
|
-
|
|
if (regs != NULL) {
|
|
-#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
|
|
+#if defined(CONFIG_BOOKE)
|
|
+ /* If DAC don't clear DBCRO_IDM or MSR_DE */
|
|
+ if (task->thread.dabr)
|
|
+ task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT);
|
|
+ else {
|
|
+ task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM);
|
|
+ regs->msr &= ~MSR_DE;
|
|
+ }
|
|
+#elif defined(CONFIG_40x)
|
|
task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM);
|
|
regs->msr &= ~MSR_DE;
|
|
#else
|
|
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S
|
|
index ef36cbb..ea4d646 100644
|
|
--- a/arch/powerpc/kernel/vector.S
|
|
+++ b/arch/powerpc/kernel/vector.S
|
|
@@ -80,10 +80,10 @@ _GLOBAL(load_up_altivec)
|
|
mtvscr vr0
|
|
REST_32VRS(0,r4,r5)
|
|
#ifndef CONFIG_SMP
|
|
- /* Update last_task_used_math to 'current' */
|
|
+ /* Update last_task_used_altivec to 'current' */
|
|
subi r4,r5,THREAD /* Back to 'current' */
|
|
fromreal(r4)
|
|
- PPC_STL r4,ADDROFF(last_task_used_math)(r3)
|
|
+ PPC_STL r4,ADDROFF(last_task_used_altivec)(r3)
|
|
#endif /* CONFIG_SMP */
|
|
/* restore registers and return */
|
|
blr
|
|
@@ -172,7 +172,7 @@ _GLOBAL(load_up_vsx)
|
|
oris r12,r12,MSR_VSX@h
|
|
std r12,_MSR(r1)
|
|
#ifndef CONFIG_SMP
|
|
- /* Update last_task_used_math to 'current' */
|
|
+ /* Update last_task_used_vsx to 'current' */
|
|
ld r4,PACACURRENT(r13)
|
|
std r4,0(r3)
|
|
#endif /* CONFIG_SMP */
|
|
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
|
|
index daf866e..330ee80 100644
|
|
--- a/arch/x86/include/asm/io_apic.h
|
|
+++ b/arch/x86/include/asm/io_apic.h
|
|
@@ -161,6 +161,7 @@ extern int io_apic_set_pci_routing(struct device *dev, int irq,
|
|
struct io_apic_irq_attr *irq_attr);
|
|
extern int (*ioapic_renumber_irq)(int ioapic, int irq);
|
|
extern void ioapic_init_mappings(void);
|
|
+extern void ioapic_insert_resources(void);
|
|
|
|
extern struct IO_APIC_route_entry **alloc_ioapic_entries(void);
|
|
extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries);
|
|
@@ -180,6 +181,7 @@ extern void ioapic_write_entry(int apic, int pin,
|
|
#define io_apic_assign_pci_irqs 0
|
|
static const int timer_through_8259 = 0;
|
|
static inline void ioapic_init_mappings(void) { }
|
|
+static inline void ioapic_insert_resources(void) { }
|
|
|
|
static inline void probe_nr_irqs_gsi(void) { }
|
|
#endif
|
|
diff --git a/arch/x86/include/asm/lguest_hcall.h b/arch/x86/include/asm/lguest_hcall.h
|
|
index d31c4a6..33600a6 100644
|
|
--- a/arch/x86/include/asm/lguest_hcall.h
|
|
+++ b/arch/x86/include/asm/lguest_hcall.h
|
|
@@ -30,7 +30,7 @@
|
|
#include <asm/hw_irq.h>
|
|
#include <asm/kvm_para.h>
|
|
|
|
-/*G:031 But first, how does our Guest contact the Host to ask for privileged
|
|
+/*G:030 But first, how does our Guest contact the Host to ask for privileged
|
|
* operations? There are two ways: the direct way is to make a "hypercall",
|
|
* to make requests of the Host Itself.
|
|
*
|
|
diff --git a/arch/x86/kernel/apic/es7000_32.c b/arch/x86/kernel/apic/es7000_32.c
|
|
index 69328ac..8952a58 100644
|
|
--- a/arch/x86/kernel/apic/es7000_32.c
|
|
+++ b/arch/x86/kernel/apic/es7000_32.c
|
|
@@ -652,7 +652,8 @@ static int es7000_mps_oem_check_cluster(struct mpc_table *mpc, char *oem,
|
|
return ret && es7000_apic_is_cluster();
|
|
}
|
|
|
|
-struct apic apic_es7000_cluster = {
|
|
+/* We've been warned by a false positive warning.Use __refdata to keep calm. */
|
|
+struct apic __refdata apic_es7000_cluster = {
|
|
|
|
.name = "es7000",
|
|
.probe = probe_es7000,
|
|
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
|
|
index 90b5e6e..2284a48 100644
|
|
--- a/arch/x86/kernel/apic/io_apic.c
|
|
+++ b/arch/x86/kernel/apic/io_apic.c
|
|
@@ -4181,28 +4181,20 @@ fake_ioapic_page:
|
|
}
|
|
}
|
|
|
|
-static int __init ioapic_insert_resources(void)
|
|
+void __init ioapic_insert_resources(void)
|
|
{
|
|
int i;
|
|
struct resource *r = ioapic_resources;
|
|
|
|
if (!r) {
|
|
- if (nr_ioapics > 0) {
|
|
+ if (nr_ioapics > 0)
|
|
printk(KERN_ERR
|
|
"IO APIC resources couldn't be allocated.\n");
|
|
- return -1;
|
|
- }
|
|
- return 0;
|
|
+ return;
|
|
}
|
|
|
|
for (i = 0; i < nr_ioapics; i++) {
|
|
insert_resource(&iomem_resource, r);
|
|
r++;
|
|
}
|
|
-
|
|
- return 0;
|
|
}
|
|
-
|
|
-/* Insert the IO APIC resources after PCI initialization has occured to handle
|
|
- * IO APICS that are mapped in on a BAR in PCI space. */
|
|
-late_initcall(ioapic_insert_resources);
|
|
diff --git a/arch/x86/kernel/apic/numaq_32.c b/arch/x86/kernel/apic/numaq_32.c
|
|
index 533e59c..ca96e68 100644
|
|
--- a/arch/x86/kernel/apic/numaq_32.c
|
|
+++ b/arch/x86/kernel/apic/numaq_32.c
|
|
@@ -493,7 +493,8 @@ static void numaq_setup_portio_remap(void)
|
|
(u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD);
|
|
}
|
|
|
|
-struct apic apic_numaq = {
|
|
+/* Use __refdata to keep false positive warning calm. */
|
|
+struct apic __refdata apic_numaq = {
|
|
|
|
.name = "NUMAQ",
|
|
.probe = probe_numaq,
|
|
diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c
|
|
index 4f9c55f..03801f2 100644
|
|
--- a/arch/x86/kernel/pvclock.c
|
|
+++ b/arch/x86/kernel/pvclock.c
|
|
@@ -60,7 +60,7 @@ static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift)
|
|
"adc %5,%%edx ; "
|
|
: "=A" (product), "=r" (tmp1), "=r" (tmp2)
|
|
: "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
|
|
-#elif __x86_64__
|
|
+#elif defined(__x86_64__)
|
|
__asm__ (
|
|
"mul %%rdx ; shrd $32,%%rdx,%%rax"
|
|
: "=a" (product) : "0" (delta), "d" ((u64)mul_frac) );
|
|
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
|
|
index 7bc65f0..f2bf1f7 100644
|
|
--- a/arch/x86/lguest/boot.c
|
|
+++ b/arch/x86/lguest/boot.c
|
|
@@ -379,6 +379,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
|
|
|
|
native_cpuid(ax, bx, cx, dx);
|
|
switch (function) {
|
|
+ case 0: /* ID and highest CPUID. Futureproof a little by sticking to
|
|
+ * older ones. */
|
|
+ if (*ax > 5)
|
|
+ *ax = 5;
|
|
+ break;
|
|
case 1: /* Basic feature request. */
|
|
/* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */
|
|
*cx &= 0x00002201;
|
|
@@ -1079,7 +1084,7 @@ static unsigned lguest_patch(u8 type, u16 clobber, void *ibuf,
|
|
return insn_len;
|
|
}
|
|
|
|
-/*G:030 Once we get to lguest_init(), we know we're a Guest. The various
|
|
+/*G:029 Once we get to lguest_init(), we know we're a Guest. The various
|
|
* pv_ops structures in the kernel provide points for (almost) every routine we
|
|
* have to override to avoid privileged instructions. */
|
|
__init void lguest_init(void)
|
|
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
|
|
index 85307cc..bfae139 100644
|
|
--- a/arch/x86/mm/fault.c
|
|
+++ b/arch/x86/mm/fault.c
|
|
@@ -697,7 +697,7 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code,
|
|
if (!printk_ratelimit())
|
|
return;
|
|
|
|
- printk(KERN_CONT "%s%s[%d]: segfault at %lx ip %p sp %p error %lx",
|
|
+ printk("%s%s[%d]: segfault at %lx ip %p sp %p error %lx",
|
|
task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG,
|
|
tsk->comm, task_pid_nr(tsk), address,
|
|
(void *)regs->ip, (void *)regs->sp, error_code);
|
|
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
|
|
index 0fb56db..52e62e5 100644
|
|
--- a/arch/x86/pci/i386.c
|
|
+++ b/arch/x86/pci/i386.c
|
|
@@ -35,6 +35,7 @@
|
|
#include <asm/pat.h>
|
|
#include <asm/e820.h>
|
|
#include <asm/pci_x86.h>
|
|
+#include <asm/io_apic.h>
|
|
|
|
|
|
static int
|
|
@@ -227,6 +228,12 @@ void __init pcibios_resource_survey(void)
|
|
pcibios_allocate_resources(1);
|
|
|
|
e820_reserve_resources_late();
|
|
+ /*
|
|
+ * Insert the IO APIC resources after PCI initialization has
|
|
+ * occured to handle IO APICS that are mapped in on a BAR in
|
|
+ * PCI space, but before trying to assign unassigned pci res.
|
|
+ */
|
|
+ ioapic_insert_resources();
|
|
}
|
|
|
|
/**
|
|
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
|
|
index 15a2303..336eb1e 100644
|
|
--- a/drivers/ata/ahci.c
|
|
+++ b/drivers/ata/ahci.c
|
|
@@ -513,6 +513,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
|
{ PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */
|
|
{ PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */
|
|
{ PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */
|
|
+ { PCI_VDEVICE(INTEL, 0x3a22), board_ahci }, /* ICH10 */
|
|
{ PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */
|
|
{ PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */
|
|
{ PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */
|
|
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
|
|
index 045a486..2c6aeda 100644
|
|
--- a/drivers/ata/libata-core.c
|
|
+++ b/drivers/ata/libata-core.c
|
|
@@ -3392,17 +3392,27 @@ int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel)
|
|
|
|
static int ata_dev_set_mode(struct ata_device *dev)
|
|
{
|
|
+ struct ata_port *ap = dev->link->ap;
|
|
struct ata_eh_context *ehc = &dev->link->eh_context;
|
|
+ const bool nosetxfer = dev->horkage & ATA_HORKAGE_NOSETXFER;
|
|
const char *dev_err_whine = "";
|
|
int ign_dev_err = 0;
|
|
- unsigned int err_mask;
|
|
+ unsigned int err_mask = 0;
|
|
int rc;
|
|
|
|
dev->flags &= ~ATA_DFLAG_PIO;
|
|
if (dev->xfer_shift == ATA_SHIFT_PIO)
|
|
dev->flags |= ATA_DFLAG_PIO;
|
|
|
|
- err_mask = ata_dev_set_xfermode(dev);
|
|
+ if (nosetxfer && ap->flags & ATA_FLAG_SATA && ata_id_is_sata(dev->id))
|
|
+ dev_err_whine = " (SET_XFERMODE skipped)";
|
|
+ else {
|
|
+ if (nosetxfer)
|
|
+ ata_dev_printk(dev, KERN_WARNING,
|
|
+ "NOSETXFER but PATA detected - can't "
|
|
+ "skip SETXFER, might malfunction\n");
|
|
+ err_mask = ata_dev_set_xfermode(dev);
|
|
+ }
|
|
|
|
if (err_mask & ~AC_ERR_DEV)
|
|
goto fail;
|
|
@@ -4297,6 +4307,12 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
|
|
/* Devices which aren't very happy with higher link speeds */
|
|
{ "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, },
|
|
|
|
+ /*
|
|
+ * Devices which choke on SETXFER. Applies only if both the
|
|
+ * device and controller are SATA.
|
|
+ */
|
|
+ { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER },
|
|
+
|
|
/* End Marker */
|
|
{ }
|
|
};
|
|
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
|
|
index fa22f94..1a07c06 100644
|
|
--- a/drivers/ata/libata-eh.c
|
|
+++ b/drivers/ata/libata-eh.c
|
|
@@ -2517,6 +2517,10 @@ int ata_eh_reset(struct ata_link *link, int classify,
|
|
|
|
ata_eh_about_to_do(link, NULL, ATA_EH_RESET);
|
|
rc = ata_do_reset(link, reset, classes, deadline, true);
|
|
+ if (rc) {
|
|
+ failed_link = link;
|
|
+ goto fail;
|
|
+ }
|
|
}
|
|
} else {
|
|
if (verbose)
|
|
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c
|
|
index 4b27617..8561a9f 100644
|
|
--- a/drivers/ata/pata_at91.c
|
|
+++ b/drivers/ata/pata_at91.c
|
|
@@ -312,11 +312,12 @@ err_ide_ioremap:
|
|
static int __devexit pata_at91_remove(struct platform_device *pdev)
|
|
{
|
|
struct ata_host *host = dev_get_drvdata(&pdev->dev);
|
|
- struct at91_ide_info *info = host->private_data;
|
|
+ struct at91_ide_info *info;
|
|
struct device *dev = &pdev->dev;
|
|
|
|
if (!host)
|
|
return 0;
|
|
+ info = host->private_data;
|
|
|
|
ata_host_detach(host);
|
|
|
|
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
|
|
index 43db3ea..fbeefb6 100644
|
|
--- a/drivers/block/virtio_blk.c
|
|
+++ b/drivers/block/virtio_blk.c
|
|
@@ -213,7 +213,7 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode,
|
|
* Only allow the generic SCSI ioctls if the host can support it.
|
|
*/
|
|
if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI))
|
|
- return -ENOIOCTLCMD;
|
|
+ return -ENOTTY;
|
|
|
|
return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
|
|
}
|
|
@@ -360,6 +360,9 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
|
|
blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2);
|
|
blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2);
|
|
|
|
+ /* No need to bounce any requests */
|
|
+ blk_queue_bounce_limit(vblk->disk->queue, BLK_BOUNCE_ANY);
|
|
+
|
|
/* No real sector limit. */
|
|
blk_queue_max_sectors(vblk->disk->queue, -1U);
|
|
|
|
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
|
|
index 94a5d50..ff47907 100644
|
|
--- a/drivers/char/n_tty.c
|
|
+++ b/drivers/char/n_tty.c
|
|
@@ -1331,9 +1331,6 @@ handle_newline:
|
|
|
|
static void n_tty_write_wakeup(struct tty_struct *tty)
|
|
{
|
|
- /* Write out any echoed characters that are still pending */
|
|
- process_echoes(tty);
|
|
-
|
|
if (tty->fasync && test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags))
|
|
kill_fasync(&tty->fasync, SIGIO, POLL_OUT);
|
|
}
|
|
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
|
|
index 574f1c7..280b41c 100644
|
|
--- a/drivers/char/nozomi.c
|
|
+++ b/drivers/char/nozomi.c
|
|
@@ -828,7 +828,7 @@ static int receive_data(enum port_type index, struct nozomi *dc)
|
|
struct port *port = &dc->port[index];
|
|
void __iomem *addr = port->dl_addr[port->toggle_dl];
|
|
struct tty_struct *tty = tty_port_tty_get(&port->port);
|
|
- int i;
|
|
+ int i, ret;
|
|
|
|
if (unlikely(!tty)) {
|
|
DBG1("tty not open for port: %d?", index);
|
|
@@ -844,12 +844,14 @@ static int receive_data(enum port_type index, struct nozomi *dc)
|
|
|
|
/* disable interrupt in downlink... */
|
|
disable_transmit_dl(index, dc);
|
|
- return 0;
|
|
+ ret = 0;
|
|
+ goto put;
|
|
}
|
|
|
|
if (unlikely(size == 0)) {
|
|
dev_err(&dc->pdev->dev, "size == 0?\n");
|
|
- return 1;
|
|
+ ret = 1;
|
|
+ goto put;
|
|
}
|
|
|
|
tty_buffer_request_room(tty, size);
|
|
@@ -871,8 +873,10 @@ static int receive_data(enum port_type index, struct nozomi *dc)
|
|
}
|
|
|
|
set_bit(index, &dc->flip);
|
|
+ ret = 1;
|
|
+put:
|
|
tty_kref_put(tty);
|
|
- return 1;
|
|
+ return ret;
|
|
}
|
|
|
|
/* Debug for interrupts */
|
|
diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c
|
|
index 0ef0dc9..acd76b7 100644
|
|
--- a/drivers/char/tty_ldisc.c
|
|
+++ b/drivers/char/tty_ldisc.c
|
|
@@ -790,17 +790,20 @@ void tty_ldisc_hangup(struct tty_struct *tty)
|
|
* N_TTY.
|
|
*/
|
|
if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) {
|
|
- /* Avoid racing set_ldisc */
|
|
+ /* Avoid racing set_ldisc or tty_ldisc_release */
|
|
mutex_lock(&tty->ldisc_mutex);
|
|
- /* Switch back to N_TTY */
|
|
- tty_ldisc_halt(tty);
|
|
- tty_ldisc_wait_idle(tty);
|
|
- tty_ldisc_reinit(tty);
|
|
- /* At this point we have a closed ldisc and we want to
|
|
- reopen it. We could defer this to the next open but
|
|
- it means auditing a lot of other paths so this is a FIXME */
|
|
- WARN_ON(tty_ldisc_open(tty, tty->ldisc));
|
|
- tty_ldisc_enable(tty);
|
|
+ if (tty->ldisc) { /* Not yet closed */
|
|
+ /* Switch back to N_TTY */
|
|
+ tty_ldisc_halt(tty);
|
|
+ tty_ldisc_wait_idle(tty);
|
|
+ tty_ldisc_reinit(tty);
|
|
+ /* At this point we have a closed ldisc and we want to
|
|
+ reopen it. We could defer this to the next open but
|
|
+ it means auditing a lot of other paths so this is
|
|
+ a FIXME */
|
|
+ WARN_ON(tty_ldisc_open(tty, tty->ldisc));
|
|
+ tty_ldisc_enable(tty);
|
|
+ }
|
|
mutex_unlock(&tty->ldisc_mutex);
|
|
tty_reset_termios(tty);
|
|
}
|
|
@@ -865,6 +868,7 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty)
|
|
|
|
tty_ldisc_wait_idle(tty);
|
|
|
|
+ mutex_lock(&tty->ldisc_mutex);
|
|
/*
|
|
* Now kill off the ldisc
|
|
*/
|
|
@@ -875,6 +879,7 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty)
|
|
|
|
/* Ensure the next open requests the N_TTY ldisc */
|
|
tty_set_termios_ldisc(tty, N_TTY);
|
|
+ mutex_unlock(&tty->ldisc_mutex);
|
|
|
|
/* This will need doing differently if we need to lock */
|
|
if (o_tty)
|
|
diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c
|
|
index 4e862a7..9769b11 100644
|
|
--- a/drivers/char/tty_port.c
|
|
+++ b/drivers/char/tty_port.c
|
|
@@ -267,7 +267,7 @@ int tty_port_block_til_ready(struct tty_port *port,
|
|
if (retval == 0)
|
|
port->flags |= ASYNC_NORMAL_ACTIVE;
|
|
spin_unlock_irqrestore(&port->lock, flags);
|
|
- return 0;
|
|
+ return retval;
|
|
|
|
}
|
|
EXPORT_SYMBOL(tty_port_block_til_ready);
|
|
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
|
|
index 7947bd1..404f4c1 100644
|
|
--- a/drivers/char/vt.c
|
|
+++ b/drivers/char/vt.c
|
|
@@ -770,14 +770,12 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */
|
|
visual_init(vc, currcons, 1);
|
|
if (!*vc->vc_uni_pagedir_loc)
|
|
con_set_default_unimap(vc);
|
|
- if (!vc->vc_kmalloced)
|
|
- vc->vc_screenbuf = kmalloc(vc->vc_screenbuf_size, GFP_KERNEL);
|
|
+ vc->vc_screenbuf = kmalloc(vc->vc_screenbuf_size, GFP_KERNEL);
|
|
if (!vc->vc_screenbuf) {
|
|
kfree(vc);
|
|
vc_cons[currcons].d = NULL;
|
|
return -ENOMEM;
|
|
}
|
|
- vc->vc_kmalloced = 1;
|
|
vc_init(vc, vc->vc_rows, vc->vc_cols, 1);
|
|
vcs_make_sysfs(currcons);
|
|
atomic_notifier_call_chain(&vt_notifier_list, VT_ALLOCATE, ¶m);
|
|
@@ -913,10 +911,8 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
|
|
if (new_scr_end > new_origin)
|
|
scr_memsetw((void *)new_origin, vc->vc_video_erase_char,
|
|
new_scr_end - new_origin);
|
|
- if (vc->vc_kmalloced)
|
|
- kfree(vc->vc_screenbuf);
|
|
+ kfree(vc->vc_screenbuf);
|
|
vc->vc_screenbuf = newscreen;
|
|
- vc->vc_kmalloced = 1;
|
|
vc->vc_screenbuf_size = new_screen_size;
|
|
set_origin(vc);
|
|
|
|
@@ -995,8 +991,7 @@ void vc_deallocate(unsigned int currcons)
|
|
vc->vc_sw->con_deinit(vc);
|
|
put_pid(vc->vt_pid);
|
|
module_put(vc->vc_sw->owner);
|
|
- if (vc->vc_kmalloced)
|
|
- kfree(vc->vc_screenbuf);
|
|
+ kfree(vc->vc_screenbuf);
|
|
if (currcons >= MIN_NR_CONSOLES)
|
|
kfree(vc);
|
|
vc_cons[currcons].d = NULL;
|
|
@@ -2881,7 +2876,6 @@ static int __init con_init(void)
|
|
INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
|
|
visual_init(vc, currcons, 1);
|
|
vc->vc_screenbuf = kzalloc(vc->vc_screenbuf_size, GFP_NOWAIT);
|
|
- vc->vc_kmalloced = 0;
|
|
vc_init(vc, vc->vc_rows, vc->vc_cols,
|
|
currcons || !vc->vc_sw->con_save_screen);
|
|
}
|
|
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
|
|
index 2960b6d..9903f27 100644
|
|
--- a/drivers/gpu/drm/drm_debugfs.c
|
|
+++ b/drivers/gpu/drm/drm_debugfs.c
|
|
@@ -101,6 +101,10 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count,
|
|
continue;
|
|
|
|
tmp = kmalloc(sizeof(struct drm_info_node), GFP_KERNEL);
|
|
+ if (tmp == NULL) {
|
|
+ ret = -1;
|
|
+ goto fail;
|
|
+ }
|
|
ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO,
|
|
root, tmp, &drm_debugfs_fops);
|
|
if (!ent) {
|
|
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
|
|
index 8104eca..ffe8f43 100644
|
|
--- a/drivers/gpu/drm/drm_gem.c
|
|
+++ b/drivers/gpu/drm/drm_gem.c
|
|
@@ -134,26 +134,29 @@ drm_gem_object_alloc(struct drm_device *dev, size_t size)
|
|
BUG_ON((size & (PAGE_SIZE - 1)) != 0);
|
|
|
|
obj = kzalloc(sizeof(*obj), GFP_KERNEL);
|
|
+ if (!obj)
|
|
+ goto free;
|
|
|
|
obj->dev = dev;
|
|
obj->filp = shmem_file_setup("drm mm object", size, VM_NORESERVE);
|
|
- if (IS_ERR(obj->filp)) {
|
|
- kfree(obj);
|
|
- return NULL;
|
|
- }
|
|
+ if (IS_ERR(obj->filp))
|
|
+ goto free;
|
|
|
|
kref_init(&obj->refcount);
|
|
kref_init(&obj->handlecount);
|
|
obj->size = size;
|
|
if (dev->driver->gem_init_object != NULL &&
|
|
dev->driver->gem_init_object(obj) != 0) {
|
|
- fput(obj->filp);
|
|
- kfree(obj);
|
|
- return NULL;
|
|
+ goto fput;
|
|
}
|
|
atomic_inc(&dev->object_count);
|
|
atomic_add(obj->size, &dev->object_memory);
|
|
return obj;
|
|
+fput:
|
|
+ fput(obj->filp);
|
|
+free:
|
|
+ kfree(obj);
|
|
+ return NULL;
|
|
}
|
|
EXPORT_SYMBOL(drm_gem_object_alloc);
|
|
|
|
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
|
|
index 155a5bb..55bb8a8 100644
|
|
--- a/drivers/gpu/drm/drm_stub.c
|
|
+++ b/drivers/gpu/drm/drm_stub.c
|
|
@@ -489,7 +489,7 @@ int drm_put_minor(struct drm_minor **minor_p)
|
|
*/
|
|
void drm_put_dev(struct drm_device *dev)
|
|
{
|
|
- struct drm_driver *driver = dev->driver;
|
|
+ struct drm_driver *driver;
|
|
struct drm_map_list *r_list, *list_temp;
|
|
|
|
DRM_DEBUG("\n");
|
|
@@ -498,6 +498,7 @@ void drm_put_dev(struct drm_device *dev)
|
|
DRM_ERROR("cleanup called no dev\n");
|
|
return;
|
|
}
|
|
+ driver = dev->driver;
|
|
|
|
drm_vblank_cleanup(dev);
|
|
|
|
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
|
|
index 40b7503..fe949a1 100644
|
|
--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
|
|
+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
|
|
@@ -327,7 +327,7 @@ ssize_t ttm_bo_io(struct ttm_bo_device *bdev, struct file *filp,
|
|
goto out_unref;
|
|
|
|
kmap_offset = dev_offset - bo->vm_node->start;
|
|
- if (unlikely(kmap_offset) >= bo->num_pages) {
|
|
+ if (unlikely(kmap_offset >= bo->num_pages)) {
|
|
ret = -EFBIG;
|
|
goto out_unref;
|
|
}
|
|
@@ -401,7 +401,7 @@ ssize_t ttm_bo_fbdev_io(struct ttm_buffer_object *bo, const char __user *wbuf,
|
|
bool dummy;
|
|
|
|
kmap_offset = (*f_pos >> PAGE_SHIFT);
|
|
- if (unlikely(kmap_offset) >= bo->num_pages)
|
|
+ if (unlikely(kmap_offset >= bo->num_pages))
|
|
return -EFBIG;
|
|
|
|
page_offset = *f_pos & ~PAGE_MASK;
|
|
diff --git a/drivers/gpu/drm/via/via_irq.c b/drivers/gpu/drm/via/via_irq.c
|
|
index c248c1d..5935b88 100644
|
|
--- a/drivers/gpu/drm/via/via_irq.c
|
|
+++ b/drivers/gpu/drm/via/via_irq.c
|
|
@@ -183,7 +183,7 @@ int via_enable_vblank(struct drm_device *dev, int crtc)
|
|
}
|
|
|
|
status = VIA_READ(VIA_REG_INTERRUPT);
|
|
- VIA_WRITE(VIA_REG_INTERRUPT, status & VIA_IRQ_VBLANK_ENABLE);
|
|
+ VIA_WRITE(VIA_REG_INTERRUPT, status | VIA_IRQ_VBLANK_ENABLE);
|
|
|
|
VIA_WRITE8(0x83d4, 0x11);
|
|
VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) | 0x30);
|
|
@@ -194,6 +194,10 @@ int via_enable_vblank(struct drm_device *dev, int crtc)
|
|
void via_disable_vblank(struct drm_device *dev, int crtc)
|
|
{
|
|
drm_via_private_t *dev_priv = dev->dev_private;
|
|
+ u32 status;
|
|
+
|
|
+ status = VIA_READ(VIA_REG_INTERRUPT);
|
|
+ VIA_WRITE(VIA_REG_INTERRUPT, status & ~VIA_IRQ_VBLANK_ENABLE);
|
|
|
|
VIA_WRITE8(0x83d4, 0x11);
|
|
VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) & ~0x30);
|
|
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
|
|
index 3fae3a9..c89687a 100644
|
|
--- a/drivers/i2c/busses/i2c-davinci.c
|
|
+++ b/drivers/i2c/busses/i2c-davinci.c
|
|
@@ -187,6 +187,11 @@ static int i2c_davinci_init(struct davinci_i2c_dev *dev)
|
|
davinci_i2c_write_reg(dev, DAVINCI_I2C_CLKH_REG, clkh);
|
|
davinci_i2c_write_reg(dev, DAVINCI_I2C_CLKL_REG, clkl);
|
|
|
|
+ /* Respond at reserved "SMBus Host" slave address" (and zero);
|
|
+ * we seem to have no option to not respond...
|
|
+ */
|
|
+ davinci_i2c_write_reg(dev, DAVINCI_I2C_OAR_REG, 0x08);
|
|
+
|
|
dev_dbg(dev->dev, "input_clock = %d, CLK = %d\n", input_clock, clk);
|
|
dev_dbg(dev->dev, "PSC = %d\n",
|
|
davinci_i2c_read_reg(dev, DAVINCI_I2C_PSC_REG));
|
|
@@ -387,7 +392,7 @@ static void terminate_write(struct davinci_i2c_dev *dev)
|
|
davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, w);
|
|
|
|
if (!dev->terminate)
|
|
- dev_err(dev->dev, "TDR IRQ while no data to send\n");
|
|
+ dev_dbg(dev->dev, "TDR IRQ while no data to send\n");
|
|
}
|
|
|
|
/*
|
|
@@ -473,9 +478,14 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
|
|
break;
|
|
|
|
case DAVINCI_I2C_IVR_AAS:
|
|
- dev_warn(dev->dev, "Address as slave interrupt\n");
|
|
- }/* switch */
|
|
- }/* while */
|
|
+ dev_dbg(dev->dev, "Address as slave interrupt\n");
|
|
+ break;
|
|
+
|
|
+ default:
|
|
+ dev_warn(dev->dev, "Unrecognized irq stat %d\n", stat);
|
|
+ break;
|
|
+ }
|
|
+ }
|
|
|
|
return count ? IRQ_HANDLED : IRQ_NONE;
|
|
}
|
|
@@ -505,7 +515,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
|
|
return -ENODEV;
|
|
}
|
|
|
|
- ioarea = request_mem_region(mem->start, (mem->end - mem->start) + 1,
|
|
+ ioarea = request_mem_region(mem->start, resource_size(mem),
|
|
pdev->name);
|
|
if (!ioarea) {
|
|
dev_err(&pdev->dev, "I2C region already claimed\n");
|
|
@@ -523,7 +533,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
|
|
dev->irq = irq->start;
|
|
platform_set_drvdata(pdev, dev);
|
|
|
|
- dev->clk = clk_get(&pdev->dev, "I2CCLK");
|
|
+ dev->clk = clk_get(&pdev->dev, NULL);
|
|
if (IS_ERR(dev->clk)) {
|
|
r = -ENODEV;
|
|
goto err_free_mem;
|
|
@@ -568,7 +578,7 @@ err_free_mem:
|
|
put_device(&pdev->dev);
|
|
kfree(dev);
|
|
err_release_region:
|
|
- release_mem_region(mem->start, (mem->end - mem->start) + 1);
|
|
+ release_mem_region(mem->start, resource_size(mem));
|
|
|
|
return r;
|
|
}
|
|
@@ -591,7 +601,7 @@ static int davinci_i2c_remove(struct platform_device *pdev)
|
|
kfree(dev);
|
|
|
|
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
- release_mem_region(mem->start, (mem->end - mem->start) + 1);
|
|
+ release_mem_region(mem->start, resource_size(mem));
|
|
return 0;
|
|
}
|
|
|
|
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
|
|
index ad8d201..fdd8327 100644
|
|
--- a/drivers/i2c/busses/i2c-omap.c
|
|
+++ b/drivers/i2c/busses/i2c-omap.c
|
|
@@ -806,7 +806,7 @@ omap_i2c_probe(struct platform_device *pdev)
|
|
return -ENODEV;
|
|
}
|
|
|
|
- ioarea = request_mem_region(mem->start, (mem->end - mem->start) + 1,
|
|
+ ioarea = request_mem_region(mem->start, resource_size(mem),
|
|
pdev->name);
|
|
if (!ioarea) {
|
|
dev_err(&pdev->dev, "I2C region already claimed\n");
|
|
@@ -905,7 +905,7 @@ err_free_mem:
|
|
platform_set_drvdata(pdev, NULL);
|
|
kfree(dev);
|
|
err_release_region:
|
|
- release_mem_region(mem->start, (mem->end - mem->start) + 1);
|
|
+ release_mem_region(mem->start, resource_size(mem));
|
|
|
|
return r;
|
|
}
|
|
@@ -925,7 +925,7 @@ omap_i2c_remove(struct platform_device *pdev)
|
|
iounmap(dev->base);
|
|
kfree(dev);
|
|
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
- release_mem_region(mem->start, (mem->end - mem->start) + 1);
|
|
+ release_mem_region(mem->start, resource_size(mem));
|
|
return 0;
|
|
}
|
|
|
|
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
|
|
index 1c01083..4f3d99c 100644
|
|
--- a/drivers/i2c/busses/i2c-sh_mobile.c
|
|
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
|
|
@@ -563,7 +563,7 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
|
|
goto err_irq;
|
|
}
|
|
|
|
- size = (res->end - res->start) + 1;
|
|
+ size = resource_size(res);
|
|
|
|
pd->reg = ioremap(res->start, size);
|
|
if (pd->reg == NULL) {
|
|
diff --git a/drivers/i2c/busses/i2c-simtec.c b/drivers/i2c/busses/i2c-simtec.c
|
|
index 042fda2..6407f47 100644
|
|
--- a/drivers/i2c/busses/i2c-simtec.c
|
|
+++ b/drivers/i2c/busses/i2c-simtec.c
|
|
@@ -92,7 +92,7 @@ static int simtec_i2c_probe(struct platform_device *dev)
|
|
goto err;
|
|
}
|
|
|
|
- size = (res->end-res->start)+1;
|
|
+ size = resource_size(res);
|
|
|
|
pd->ioarea = request_mem_region(res->start, size, dev->name);
|
|
if (pd->ioarea == NULL) {
|
|
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h
|
|
index 9c31382..01c5919 100644
|
|
--- a/drivers/lguest/lg.h
|
|
+++ b/drivers/lguest/lg.h
|
|
@@ -38,8 +38,6 @@ struct lguest_pages
|
|
#define CHANGED_GDT_TLS 4 /* Actually a subset of CHANGED_GDT */
|
|
#define CHANGED_ALL 3
|
|
|
|
-struct lguest;
|
|
-
|
|
struct lg_cpu {
|
|
unsigned int id;
|
|
struct lguest *lg;
|
|
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
|
|
index 8ae72ec..0e2ba21 100644
|
|
--- a/drivers/net/8139too.c
|
|
+++ b/drivers/net/8139too.c
|
|
@@ -908,6 +908,7 @@ static const struct net_device_ops rtl8139_netdev_ops = {
|
|
.ndo_open = rtl8139_open,
|
|
.ndo_stop = rtl8139_close,
|
|
.ndo_get_stats = rtl8139_get_stats,
|
|
+ .ndo_change_mtu = eth_change_mtu,
|
|
.ndo_validate_addr = eth_validate_addr,
|
|
.ndo_set_mac_address = rtl8139_set_mac_address,
|
|
.ndo_start_xmit = rtl8139_start_xmit,
|
|
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c
|
|
index 6f42ad7..3fe0987 100644
|
|
--- a/drivers/net/arm/ixp4xx_eth.c
|
|
+++ b/drivers/net/arm/ixp4xx_eth.c
|
|
@@ -1142,7 +1142,9 @@ static const struct net_device_ops ixp4xx_netdev_ops = {
|
|
.ndo_start_xmit = eth_xmit,
|
|
.ndo_set_multicast_list = eth_set_mcast_list,
|
|
.ndo_do_ioctl = eth_ioctl,
|
|
-
|
|
+ .ndo_change_mtu = eth_change_mtu,
|
|
+ .ndo_set_mac_address = eth_mac_addr,
|
|
+ .ndo_validate_addr = eth_validate_addr,
|
|
};
|
|
|
|
static int __devinit eth_init_one(struct platform_device *pdev)
|
|
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
|
|
index c734b19..204db96 100644
|
|
--- a/drivers/net/atlx/atl2.c
|
|
+++ b/drivers/net/atlx/atl2.c
|
|
@@ -2071,7 +2071,7 @@ static int atl2_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
|
|
if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE))
|
|
return -EOPNOTSUPP;
|
|
|
|
- if (wol->wolopts & (WAKE_MCAST|WAKE_BCAST|WAKE_MCAST))
|
|
+ if (wol->wolopts & (WAKE_UCAST | WAKE_BCAST | WAKE_MCAST))
|
|
return -EOPNOTSUPP;
|
|
|
|
/* these settings will always override what we currently have */
|
|
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
|
|
index 3eee666..55445f9 100644
|
|
--- a/drivers/net/cs89x0.c
|
|
+++ b/drivers/net/cs89x0.c
|
|
@@ -1524,6 +1524,7 @@ static void net_timeout(struct net_device *dev)
|
|
static int net_send_packet(struct sk_buff *skb, struct net_device *dev)
|
|
{
|
|
struct net_local *lp = netdev_priv(dev);
|
|
+ unsigned long flags;
|
|
|
|
if (net_debug > 3) {
|
|
printk("%s: sent %d byte packet of type %x\n",
|
|
@@ -1535,7 +1536,7 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev)
|
|
ask the chip to start transmitting before the
|
|
whole packet has been completely uploaded. */
|
|
|
|
- spin_lock_irq(&lp->lock);
|
|
+ spin_lock_irqsave(&lp->lock, flags);
|
|
netif_stop_queue(dev);
|
|
|
|
/* initiate a transmit sequence */
|
|
@@ -1549,13 +1550,13 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev)
|
|
* we're waiting for TxOk, so return 1 and requeue this packet.
|
|
*/
|
|
|
|
- spin_unlock_irq(&lp->lock);
|
|
+ spin_unlock_irqrestore(&lp->lock, flags);
|
|
if (net_debug) printk("cs89x0: Tx buffer not free!\n");
|
|
return NETDEV_TX_BUSY;
|
|
}
|
|
/* Write the contents of the packet */
|
|
writewords(dev->base_addr, TX_FRAME_PORT,skb->data,(skb->len+1) >>1);
|
|
- spin_unlock_irq(&lp->lock);
|
|
+ spin_unlock_irqrestore(&lp->lock, flags);
|
|
lp->stats.tx_bytes += skb->len;
|
|
dev->trans_start = jiffies;
|
|
dev_kfree_skb (skb);
|
|
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
|
|
index 147c4b0..e8d46cc 100644
|
|
--- a/drivers/net/ehea/ehea_main.c
|
|
+++ b/drivers/net/ehea/ehea_main.c
|
|
@@ -3080,7 +3080,9 @@ static const struct net_device_ops ehea_netdev_ops = {
|
|
.ndo_poll_controller = ehea_netpoll,
|
|
#endif
|
|
.ndo_get_stats = ehea_get_stats,
|
|
+ .ndo_change_mtu = eth_change_mtu,
|
|
.ndo_set_mac_address = ehea_set_mac_addr,
|
|
+ .ndo_validate_addr = eth_validate_addr,
|
|
.ndo_set_multicast_list = ehea_set_multicast_list,
|
|
.ndo_change_mtu = ehea_change_mtu,
|
|
.ndo_vlan_rx_register = ehea_vlan_rx_register,
|
|
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
|
|
index 0f19b74..d4b9807 100644
|
|
--- a/drivers/net/fec.c
|
|
+++ b/drivers/net/fec.c
|
|
@@ -1642,6 +1642,7 @@ static const struct net_device_ops fec_netdev_ops = {
|
|
.ndo_stop = fec_enet_close,
|
|
.ndo_start_xmit = fec_enet_start_xmit,
|
|
.ndo_set_multicast_list = set_multicast_list,
|
|
+ .ndo_change_mtu = eth_change_mtu,
|
|
.ndo_validate_addr = eth_validate_addr,
|
|
.ndo_tx_timeout = fec_timeout,
|
|
.ndo_set_mac_address = fec_set_mac_address,
|
|
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
|
|
index 4ae1d25..43d813e 100644
|
|
--- a/drivers/net/gianfar.c
|
|
+++ b/drivers/net/gianfar.c
|
|
@@ -156,6 +156,8 @@ static const struct net_device_ops gfar_netdev_ops = {
|
|
.ndo_tx_timeout = gfar_timeout,
|
|
.ndo_do_ioctl = gfar_ioctl,
|
|
.ndo_vlan_rx_register = gfar_vlan_rx_register,
|
|
+ .ndo_set_mac_address = eth_mac_addr,
|
|
+ .ndo_validate_addr = eth_validate_addr,
|
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
|
.ndo_poll_controller = gfar_netpoll,
|
|
#endif
|
|
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
|
|
index be48029..adb09d3 100644
|
|
--- a/drivers/net/igb/igb_main.c
|
|
+++ b/drivers/net/igb/igb_main.c
|
|
@@ -127,14 +127,48 @@ static void igb_restore_vlan(struct igb_adapter *);
|
|
static void igb_ping_all_vfs(struct igb_adapter *);
|
|
static void igb_msg_task(struct igb_adapter *);
|
|
static int igb_rcv_msg_from_vf(struct igb_adapter *, u32);
|
|
-static inline void igb_set_rah_pool(struct e1000_hw *, int , int);
|
|
static void igb_set_mc_list_pools(struct igb_adapter *, int, u16);
|
|
static void igb_vmm_control(struct igb_adapter *);
|
|
-static inline void igb_set_vmolr(struct e1000_hw *, int);
|
|
-static inline int igb_set_vf_rlpml(struct igb_adapter *, int, int);
|
|
static int igb_set_vf_mac(struct igb_adapter *adapter, int, unsigned char *);
|
|
static void igb_restore_vf_multicasts(struct igb_adapter *adapter);
|
|
|
|
+static inline void igb_set_vmolr(struct e1000_hw *hw, int vfn)
|
|
+{
|
|
+ u32 reg_data;
|
|
+
|
|
+ reg_data = rd32(E1000_VMOLR(vfn));
|
|
+ reg_data |= E1000_VMOLR_BAM | /* Accept broadcast */
|
|
+ E1000_VMOLR_ROPE | /* Accept packets matched in UTA */
|
|
+ E1000_VMOLR_ROMPE | /* Accept packets matched in MTA */
|
|
+ E1000_VMOLR_AUPE | /* Accept untagged packets */
|
|
+ E1000_VMOLR_STRVLAN; /* Strip vlan tags */
|
|
+ wr32(E1000_VMOLR(vfn), reg_data);
|
|
+}
|
|
+
|
|
+static inline int igb_set_vf_rlpml(struct igb_adapter *adapter, int size,
|
|
+ int vfn)
|
|
+{
|
|
+ struct e1000_hw *hw = &adapter->hw;
|
|
+ u32 vmolr;
|
|
+
|
|
+ vmolr = rd32(E1000_VMOLR(vfn));
|
|
+ vmolr &= ~E1000_VMOLR_RLPML_MASK;
|
|
+ vmolr |= size | E1000_VMOLR_LPE;
|
|
+ wr32(E1000_VMOLR(vfn), vmolr);
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+
|
|
+static inline void igb_set_rah_pool(struct e1000_hw *hw, int pool, int entry)
|
|
+{
|
|
+ u32 reg_data;
|
|
+
|
|
+ reg_data = rd32(E1000_RAH(entry));
|
|
+ reg_data &= ~E1000_RAH_POOL_MASK;
|
|
+ reg_data |= E1000_RAH_POOL_1 << pool;;
|
|
+ wr32(E1000_RAH(entry), reg_data);
|
|
+}
|
|
+
|
|
#ifdef CONFIG_PM
|
|
static int igb_suspend(struct pci_dev *, pm_message_t);
|
|
static int igb_resume(struct pci_dev *);
|
|
@@ -5418,43 +5452,6 @@ static void igb_io_resume(struct pci_dev *pdev)
|
|
igb_get_hw_control(adapter);
|
|
}
|
|
|
|
-static inline void igb_set_vmolr(struct e1000_hw *hw, int vfn)
|
|
-{
|
|
- u32 reg_data;
|
|
-
|
|
- reg_data = rd32(E1000_VMOLR(vfn));
|
|
- reg_data |= E1000_VMOLR_BAM | /* Accept broadcast */
|
|
- E1000_VMOLR_ROPE | /* Accept packets matched in UTA */
|
|
- E1000_VMOLR_ROMPE | /* Accept packets matched in MTA */
|
|
- E1000_VMOLR_AUPE | /* Accept untagged packets */
|
|
- E1000_VMOLR_STRVLAN; /* Strip vlan tags */
|
|
- wr32(E1000_VMOLR(vfn), reg_data);
|
|
-}
|
|
-
|
|
-static inline int igb_set_vf_rlpml(struct igb_adapter *adapter, int size,
|
|
- int vfn)
|
|
-{
|
|
- struct e1000_hw *hw = &adapter->hw;
|
|
- u32 vmolr;
|
|
-
|
|
- vmolr = rd32(E1000_VMOLR(vfn));
|
|
- vmolr &= ~E1000_VMOLR_RLPML_MASK;
|
|
- vmolr |= size | E1000_VMOLR_LPE;
|
|
- wr32(E1000_VMOLR(vfn), vmolr);
|
|
-
|
|
- return 0;
|
|
-}
|
|
-
|
|
-static inline void igb_set_rah_pool(struct e1000_hw *hw, int pool, int entry)
|
|
-{
|
|
- u32 reg_data;
|
|
-
|
|
- reg_data = rd32(E1000_RAH(entry));
|
|
- reg_data &= ~E1000_RAH_POOL_MASK;
|
|
- reg_data |= E1000_RAH_POOL_1 << pool;;
|
|
- wr32(E1000_RAH(entry), reg_data);
|
|
-}
|
|
-
|
|
static void igb_set_mc_list_pools(struct igb_adapter *adapter,
|
|
int entry_count, u16 total_rar_filters)
|
|
{
|
|
diff --git a/drivers/net/isa-skeleton.c b/drivers/net/isa-skeleton.c
|
|
index 73585fd..d12377b 100644
|
|
--- a/drivers/net/isa-skeleton.c
|
|
+++ b/drivers/net/isa-skeleton.c
|
|
@@ -430,7 +430,8 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev)
|
|
* hardware interrupt handler. Queue flow control is
|
|
* thus managed under this lock as well.
|
|
*/
|
|
- spin_lock_irq(&np->lock);
|
|
+ unsigned long flags;
|
|
+ spin_lock_irqsave(&np->lock, flags);
|
|
|
|
add_to_tx_ring(np, skb, length);
|
|
dev->trans_start = jiffies;
|
|
@@ -446,7 +447,7 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev)
|
|
* is when the transmit statistics are updated.
|
|
*/
|
|
|
|
- spin_unlock_irq(&np->lock);
|
|
+ spin_unlock_irqrestore(&np->lock, flags);
|
|
#else
|
|
/* This is the case for older hardware which takes
|
|
* a single transmit buffer at a time, and it is
|
|
diff --git a/drivers/net/mlx4/cmd.c b/drivers/net/mlx4/cmd.c
|
|
index 2845a05..65ec77d 100644
|
|
--- a/drivers/net/mlx4/cmd.c
|
|
+++ b/drivers/net/mlx4/cmd.c
|
|
@@ -80,7 +80,9 @@ enum {
|
|
/* Bad management packet (silently discarded): */
|
|
CMD_STAT_BAD_PKT = 0x30,
|
|
/* More outstanding CQEs in CQ than new CQ size: */
|
|
- CMD_STAT_BAD_SIZE = 0x40
|
|
+ CMD_STAT_BAD_SIZE = 0x40,
|
|
+ /* Multi Function device support required: */
|
|
+ CMD_STAT_MULTI_FUNC_REQ = 0x50,
|
|
};
|
|
|
|
enum {
|
|
@@ -128,6 +130,7 @@ static int mlx4_status_to_errno(u8 status)
|
|
[CMD_STAT_LAM_NOT_PRE] = -EAGAIN,
|
|
[CMD_STAT_BAD_PKT] = -EINVAL,
|
|
[CMD_STAT_BAD_SIZE] = -ENOMEM,
|
|
+ [CMD_STAT_MULTI_FUNC_REQ] = -EACCES,
|
|
};
|
|
|
|
if (status >= ARRAY_SIZE(trans_table) ||
|
|
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
|
|
index 018348c..dac621b 100644
|
|
--- a/drivers/net/mlx4/main.c
|
|
+++ b/drivers/net/mlx4/main.c
|
|
@@ -729,7 +729,10 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
|
|
|
|
err = mlx4_QUERY_FW(dev);
|
|
if (err) {
|
|
- mlx4_err(dev, "QUERY_FW command failed, aborting.\n");
|
|
+ if (err == -EACCES)
|
|
+ mlx4_info(dev, "non-primary physical function, skipping.\n");
|
|
+ else
|
|
+ mlx4_err(dev, "QUERY_FW command failed, aborting.\n");
|
|
return err;
|
|
}
|
|
|
|
@@ -1285,6 +1288,7 @@ static struct pci_device_id mlx4_pci_table[] = {
|
|
{ PCI_VDEVICE(MELLANOX, 0x6750) }, /* MT25408 "Hermon" EN 10GigE PCIe gen2 */
|
|
{ PCI_VDEVICE(MELLANOX, 0x6372) }, /* MT25458 ConnectX EN 10GBASE-T 10GigE */
|
|
{ PCI_VDEVICE(MELLANOX, 0x675a) }, /* MT25458 ConnectX EN 10GBASE-T+Gen2 10GigE */
|
|
+ { PCI_VDEVICE(MELLANOX, 0x6764) }, /* MT26468 ConnectX EN 10GigE PCIe gen2*/
|
|
{ 0, }
|
|
};
|
|
|
|
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
|
|
index eba937c..b10fedd 100644
|
|
--- a/drivers/net/phy/phy_device.c
|
|
+++ b/drivers/net/phy/phy_device.c
|
|
@@ -134,8 +134,10 @@ int phy_scan_fixups(struct phy_device *phydev)
|
|
|
|
err = fixup->run(phydev);
|
|
|
|
- if (err < 0)
|
|
+ if (err < 0) {
|
|
+ mutex_unlock(&phy_fixup_lock);
|
|
return err;
|
|
+ }
|
|
}
|
|
}
|
|
mutex_unlock(&phy_fixup_lock);
|
|
diff --git a/drivers/net/plip.c b/drivers/net/plip.c
|
|
index 7a62f78..2ca8b0d 100644
|
|
--- a/drivers/net/plip.c
|
|
+++ b/drivers/net/plip.c
|
|
@@ -270,6 +270,9 @@ static const struct net_device_ops plip_netdev_ops = {
|
|
.ndo_stop = plip_close,
|
|
.ndo_start_xmit = plip_tx_packet,
|
|
.ndo_do_ioctl = plip_ioctl,
|
|
+ .ndo_change_mtu = eth_change_mtu,
|
|
+ .ndo_set_mac_address = eth_mac_addr,
|
|
+ .ndo_validate_addr = eth_validate_addr,
|
|
};
|
|
|
|
/* Entry point of PLIP driver.
|
|
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c
|
|
index 17c116b..6de8399 100644
|
|
--- a/drivers/net/ppp_async.c
|
|
+++ b/drivers/net/ppp_async.c
|
|
@@ -356,6 +356,7 @@ ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf,
|
|
if (!skb_queue_empty(&ap->rqueue))
|
|
tasklet_schedule(&ap->tsk);
|
|
ap_put(ap);
|
|
+ tty_unthrottle(tty);
|
|
}
|
|
|
|
static void
|
|
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c
|
|
index aa3d39f..d2fa2db 100644
|
|
--- a/drivers/net/ppp_synctty.c
|
|
+++ b/drivers/net/ppp_synctty.c
|
|
@@ -397,6 +397,7 @@ ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf,
|
|
if (!skb_queue_empty(&ap->rqueue))
|
|
tasklet_schedule(&ap->tsk);
|
|
sp_put(ap);
|
|
+ tty_unthrottle(tty);
|
|
}
|
|
|
|
static void
|
|
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
|
|
index d1a5fb4..a3932c9 100644
|
|
--- a/drivers/net/ps3_gelic_net.c
|
|
+++ b/drivers/net/ps3_gelic_net.c
|
|
@@ -1411,6 +1411,7 @@ static const struct net_device_ops gelic_netdevice_ops = {
|
|
.ndo_set_multicast_list = gelic_net_set_multi,
|
|
.ndo_change_mtu = gelic_net_change_mtu,
|
|
.ndo_tx_timeout = gelic_net_tx_timeout,
|
|
+ .ndo_set_mac_address = eth_mac_addr,
|
|
.ndo_validate_addr = eth_validate_addr,
|
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
|
.ndo_poll_controller = gelic_net_poll_controller,
|
|
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c
|
|
index b6b3ca9..6932b08 100644
|
|
--- a/drivers/net/ps3_gelic_wireless.c
|
|
+++ b/drivers/net/ps3_gelic_wireless.c
|
|
@@ -2707,6 +2707,7 @@ static const struct net_device_ops gelic_wl_netdevice_ops = {
|
|
.ndo_set_multicast_list = gelic_net_set_multi,
|
|
.ndo_change_mtu = gelic_net_change_mtu,
|
|
.ndo_tx_timeout = gelic_net_tx_timeout,
|
|
+ .ndo_set_mac_address = eth_mac_addr,
|
|
.ndo_validate_addr = eth_validate_addr,
|
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
|
.ndo_poll_controller = gelic_net_poll_controller,
|
|
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
|
|
index fdcbaf8..1c70e99 100644
|
|
--- a/drivers/net/smc91x.c
|
|
+++ b/drivers/net/smc91x.c
|
|
@@ -1774,6 +1774,7 @@ static const struct net_device_ops smc_netdev_ops = {
|
|
.ndo_start_xmit = smc_hard_start_xmit,
|
|
.ndo_tx_timeout = smc_timeout,
|
|
.ndo_set_multicast_list = smc_set_multicast_list,
|
|
+ .ndo_change_mtu = eth_change_mtu,
|
|
.ndo_validate_addr = eth_validate_addr,
|
|
.ndo_set_mac_address = eth_mac_addr,
|
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
|
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
|
|
index 66067f9..94b6d26 100644
|
|
--- a/drivers/net/smsc911x.c
|
|
+++ b/drivers/net/smsc911x.c
|
|
@@ -1779,6 +1779,7 @@ static const struct net_device_ops smsc911x_netdev_ops = {
|
|
.ndo_get_stats = smsc911x_get_stats,
|
|
.ndo_set_multicast_list = smsc911x_set_multicast_list,
|
|
.ndo_do_ioctl = smsc911x_do_ioctl,
|
|
+ .ndo_change_mtu = eth_change_mtu,
|
|
.ndo_validate_addr = eth_validate_addr,
|
|
.ndo_set_mac_address = smsc911x_set_mac_address,
|
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
|
diff --git a/drivers/net/sunvnet.c b/drivers/net/sunvnet.c
|
|
index a82fb2a..f1e5e45 100644
|
|
--- a/drivers/net/sunvnet.c
|
|
+++ b/drivers/net/sunvnet.c
|
|
@@ -1016,7 +1016,9 @@ static const struct net_device_ops vnet_ops = {
|
|
.ndo_open = vnet_open,
|
|
.ndo_stop = vnet_close,
|
|
.ndo_set_multicast_list = vnet_set_rx_mode,
|
|
+ .ndo_change_mtu = eth_change_mtu,
|
|
.ndo_set_mac_address = vnet_set_mac_addr,
|
|
+ .ndo_validate_addr = eth_validate_addr,
|
|
.ndo_tx_timeout = vnet_tx_timeout,
|
|
.ndo_change_mtu = vnet_change_mtu,
|
|
.ndo_start_xmit = vnet_start_xmit,
|
|
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
|
|
index e013147..1f9ec29 100644
|
|
--- a/drivers/net/usb/kaweth.c
|
|
+++ b/drivers/net/usb/kaweth.c
|
|
@@ -999,6 +999,9 @@ static const struct net_device_ops kaweth_netdev_ops = {
|
|
.ndo_tx_timeout = kaweth_tx_timeout,
|
|
.ndo_set_multicast_list = kaweth_set_rx_mode,
|
|
.ndo_get_stats = kaweth_netdev_stats,
|
|
+ .ndo_change_mtu = eth_change_mtu,
|
|
+ .ndo_set_mac_address = eth_mac_addr,
|
|
+ .ndo_validate_addr = eth_validate_addr,
|
|
};
|
|
|
|
static int kaweth_probe(
|
|
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
|
|
index 73acbd2..631d269 100644
|
|
--- a/drivers/net/usb/pegasus.c
|
|
+++ b/drivers/net/usb/pegasus.c
|
|
@@ -1493,6 +1493,9 @@ static const struct net_device_ops pegasus_netdev_ops = {
|
|
.ndo_set_multicast_list = pegasus_set_multicast,
|
|
.ndo_get_stats = pegasus_netdev_stats,
|
|
.ndo_tx_timeout = pegasus_tx_timeout,
|
|
+ .ndo_change_mtu = eth_change_mtu,
|
|
+ .ndo_set_mac_address = eth_mac_addr,
|
|
+ .ndo_validate_addr = eth_validate_addr,
|
|
};
|
|
|
|
static struct usb_driver pegasus_driver = {
|
|
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
|
|
index d3489a3..88c30a5 100644
|
|
--- a/drivers/net/via-rhine.c
|
|
+++ b/drivers/net/via-rhine.c
|
|
@@ -621,6 +621,7 @@ static const struct net_device_ops rhine_netdev_ops = {
|
|
.ndo_start_xmit = rhine_start_tx,
|
|
.ndo_get_stats = rhine_get_stats,
|
|
.ndo_set_multicast_list = rhine_set_rx_mode,
|
|
+ .ndo_change_mtu = eth_change_mtu,
|
|
.ndo_validate_addr = eth_validate_addr,
|
|
.ndo_set_mac_address = eth_mac_addr,
|
|
.ndo_do_ioctl = netdev_ioctl,
|
|
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
|
|
index 345593c..a370e51 100644
|
|
--- a/drivers/net/wireless/orinoco/main.c
|
|
+++ b/drivers/net/wireless/orinoco/main.c
|
|
@@ -2521,6 +2521,8 @@ static const struct net_device_ops orinoco_netdev_ops = {
|
|
.ndo_start_xmit = orinoco_xmit,
|
|
.ndo_set_multicast_list = orinoco_set_multicast_list,
|
|
.ndo_change_mtu = orinoco_change_mtu,
|
|
+ .ndo_set_mac_address = eth_mac_addr,
|
|
+ .ndo_validate_addr = eth_validate_addr,
|
|
.ndo_tx_timeout = orinoco_tx_timeout,
|
|
.ndo_get_stats = orinoco_get_stats,
|
|
};
|
|
@@ -2555,7 +2557,6 @@ struct net_device
|
|
priv->wireless_data.spy_data = &priv->spy_data;
|
|
dev->wireless_data = &priv->wireless_data;
|
|
#endif
|
|
- /* we use the default eth_mac_addr for setting the MAC addr */
|
|
|
|
/* Reserve space in skb for the SNAP header */
|
|
dev->hard_header_len += ENCAPS_OVERHEAD;
|
|
diff --git a/drivers/serial/bfin_sport_uart.c b/drivers/serial/bfin_sport_uart.c
|
|
index 34b4ae0..c108b1a 100644
|
|
--- a/drivers/serial/bfin_sport_uart.c
|
|
+++ b/drivers/serial/bfin_sport_uart.c
|
|
@@ -236,7 +236,6 @@ static int sport_startup(struct uart_port *port)
|
|
int retval;
|
|
|
|
pr_debug("%s enter\n", __func__);
|
|
- memset(buffer, 20, '\0');
|
|
snprintf(buffer, 20, "%s rx", up->name);
|
|
retval = request_irq(up->rx_irq, sport_uart_rx_irq, IRQF_SAMPLE_RANDOM, buffer, up);
|
|
if (retval) {
|
|
diff --git a/drivers/serial/msm_serial.c b/drivers/serial/msm_serial.c
|
|
index 698048f..f7c24ba 100644
|
|
--- a/drivers/serial/msm_serial.c
|
|
+++ b/drivers/serial/msm_serial.c
|
|
@@ -730,7 +730,6 @@ static int __devexit msm_serial_remove(struct platform_device *pdev)
|
|
}
|
|
|
|
static struct platform_driver msm_platform_driver = {
|
|
- .probe = msm_serial_probe,
|
|
.remove = msm_serial_remove,
|
|
.driver = {
|
|
.name = "msm_serial",
|
|
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
|
|
index 8afcf08..3b54b39 100644
|
|
--- a/drivers/video/Kconfig
|
|
+++ b/drivers/video/Kconfig
|
|
@@ -1119,12 +1119,13 @@ config FB_CARILLO_RANCH
|
|
|
|
config FB_INTEL
|
|
tristate "Intel 830M/845G/852GM/855GM/865G/915G/945G/945GM/965G/965GM support (EXPERIMENTAL)"
|
|
- depends on EXPERIMENTAL && FB && PCI && X86 && AGP_INTEL
|
|
+ depends on EXPERIMENTAL && FB && PCI && X86 && AGP_INTEL && EMBEDDED
|
|
select FB_MODE_HELPERS
|
|
select FB_CFB_FILLRECT
|
|
select FB_CFB_COPYAREA
|
|
select FB_CFB_IMAGEBLIT
|
|
select FB_BOOT_VESA_SUPPORT if FB_INTEL = y
|
|
+ depends on !DRM_I915
|
|
help
|
|
This driver supports the on-board graphics built in to the Intel
|
|
830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM/965G/965GM chipsets.
|
|
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
|
|
index 193c8f0..bcec78f 100644
|
|
--- a/drivers/virtio/virtio_pci.c
|
|
+++ b/drivers/virtio/virtio_pci.c
|
|
@@ -669,7 +669,7 @@ static int __init virtio_pci_init(void)
|
|
|
|
err = pci_register_driver(&virtio_pci_driver);
|
|
if (err)
|
|
- device_unregister(virtio_pci_root);
|
|
+ root_device_unregister(virtio_pci_root);
|
|
|
|
return err;
|
|
}
|
|
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
|
|
index 205ec95..eb507c4 100644
|
|
--- a/fs/dlm/lock.c
|
|
+++ b/fs/dlm/lock.c
|
|
@@ -435,7 +435,7 @@ static int search_rsb(struct dlm_ls *ls, char *name, int len, int b,
|
|
static int find_rsb(struct dlm_ls *ls, char *name, int namelen,
|
|
unsigned int flags, struct dlm_rsb **r_ret)
|
|
{
|
|
- struct dlm_rsb *r, *tmp;
|
|
+ struct dlm_rsb *r = NULL, *tmp;
|
|
uint32_t hash, bucket;
|
|
int error = -EINVAL;
|
|
|
|
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
|
|
index cdb580a..618a60f 100644
|
|
--- a/fs/dlm/lowcomms.c
|
|
+++ b/fs/dlm/lowcomms.c
|
|
@@ -902,7 +902,7 @@ static void tcp_connect_to_sock(struct connection *con)
|
|
int result = -EHOSTUNREACH;
|
|
struct sockaddr_storage saddr, src_addr;
|
|
int addr_len;
|
|
- struct socket *sock;
|
|
+ struct socket *sock = NULL;
|
|
|
|
if (con->nodeid == 0) {
|
|
log_print("attempt to connect sock 0 foiled");
|
|
@@ -962,6 +962,8 @@ out_err:
|
|
if (con->sock) {
|
|
sock_release(con->sock);
|
|
con->sock = NULL;
|
|
+ } else if (sock) {
|
|
+ sock_release(sock);
|
|
}
|
|
/*
|
|
* Some errors are fatal and this list might need adjusting. For other
|
|
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c
|
|
index 894a32d..16f682e 100644
|
|
--- a/fs/dlm/plock.c
|
|
+++ b/fs/dlm/plock.c
|
|
@@ -353,7 +353,7 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count,
|
|
{
|
|
struct dlm_plock_info info;
|
|
struct plock_op *op;
|
|
- int found = 0;
|
|
+ int found = 0, do_callback = 0;
|
|
|
|
if (count != sizeof(info))
|
|
return -EINVAL;
|
|
@@ -366,21 +366,24 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count,
|
|
|
|
spin_lock(&ops_lock);
|
|
list_for_each_entry(op, &recv_list, list) {
|
|
- if (op->info.fsid == info.fsid && op->info.number == info.number &&
|
|
+ if (op->info.fsid == info.fsid &&
|
|
+ op->info.number == info.number &&
|
|
op->info.owner == info.owner) {
|
|
+ struct plock_xop *xop = (struct plock_xop *)op;
|
|
list_del_init(&op->list);
|
|
- found = 1;
|
|
- op->done = 1;
|
|
memcpy(&op->info, &info, sizeof(info));
|
|
+ if (xop->callback)
|
|
+ do_callback = 1;
|
|
+ else
|
|
+ op->done = 1;
|
|
+ found = 1;
|
|
break;
|
|
}
|
|
}
|
|
spin_unlock(&ops_lock);
|
|
|
|
if (found) {
|
|
- struct plock_xop *xop;
|
|
- xop = (struct plock_xop *)op;
|
|
- if (xop->callback)
|
|
+ if (do_callback)
|
|
dlm_plock_callback(op);
|
|
else
|
|
wake_up(&recv_wq);
|
|
diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h
|
|
index 98d6ef1..148d55c 100644
|
|
--- a/fs/gfs2/trace_gfs2.h
|
|
+++ b/fs/gfs2/trace_gfs2.h
|
|
@@ -1,12 +1,11 @@
|
|
+#undef TRACE_SYSTEM
|
|
+#define TRACE_SYSTEM gfs2
|
|
+
|
|
#if !defined(_TRACE_GFS2_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_GFS2_H
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
-#undef TRACE_SYSTEM
|
|
-#define TRACE_SYSTEM gfs2
|
|
-#define TRACE_INCLUDE_FILE trace_gfs2
|
|
-
|
|
#include <linux/fs.h>
|
|
#include <linux/buffer_head.h>
|
|
#include <linux/dlmconstants.h>
|
|
@@ -403,5 +402,6 @@ TRACE_EVENT(gfs2_block_alloc,
|
|
/* This part must be outside protection */
|
|
#undef TRACE_INCLUDE_PATH
|
|
#define TRACE_INCLUDE_PATH .
|
|
+#define TRACE_INCLUDE_FILE trace_gfs2
|
|
#include <trace/define_trace.h>
|
|
|
|
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
|
|
index 45c1867..7174818 100644
|
|
--- a/include/drm/drm_pciids.h
|
|
+++ b/include/drm/drm_pciids.h
|
|
@@ -43,6 +43,7 @@
|
|
{0x1002, 0x4A4F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x4A50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x4A54, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \
|
|
+ {0x1002, 0x4B48, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x4B49, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x4B4A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x4B4B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \
|
|
@@ -262,6 +263,7 @@
|
|
{0x1002, 0x9440, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x9441, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x9442, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \
|
|
+ {0x1002, 0x9443, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x9444, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x9446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x944A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
|
@@ -346,12 +348,12 @@
|
|
{0x1002, 0x9599, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV635|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x959B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x95C0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \
|
|
+ {0x1002, 0x95C2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
|
+ {0x1002, 0x95C4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x95C5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x95C6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x95C7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x95C9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \
|
|
- {0x1002, 0x95C2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
|
- {0x1002, 0x95C4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x95CC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x95CD, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \
|
|
{0x1002, 0x95CE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \
|
|
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
|
|
index 20a100f..3a1dbba 100644
|
|
--- a/include/linux/clockchips.h
|
|
+++ b/include/linux/clockchips.h
|
|
@@ -143,12 +143,3 @@ extern void clockevents_notify(unsigned long reason, void *arg);
|
|
#endif
|
|
|
|
#endif
|
|
-
|
|
-#ifdef CONFIG_GENERIC_CLOCKEVENTS
|
|
-extern ktime_t clockevents_get_next_event(int cpu);
|
|
-#else
|
|
-static inline ktime_t clockevents_get_next_event(int cpu)
|
|
-{
|
|
- return (ktime_t) { .tv64 = KTIME_MAX };
|
|
-}
|
|
-#endif
|
|
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
|
|
index d71f7c0..38fe59d 100644
|
|
--- a/include/linux/console_struct.h
|
|
+++ b/include/linux/console_struct.h
|
|
@@ -89,7 +89,6 @@ struct vc_data {
|
|
unsigned int vc_need_wrap : 1;
|
|
unsigned int vc_can_do_color : 1;
|
|
unsigned int vc_report_mouse : 2;
|
|
- unsigned int vc_kmalloced : 1;
|
|
unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */
|
|
unsigned char vc_utf_count;
|
|
int vc_utf_char;
|
|
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
|
|
index 54648e6..4759917 100644
|
|
--- a/include/linux/hrtimer.h
|
|
+++ b/include/linux/hrtimer.h
|
|
@@ -448,7 +448,7 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
|
|
|
|
static inline void timer_stats_account_hrtimer(struct hrtimer *timer)
|
|
{
|
|
- if (likely(!timer->start_pid))
|
|
+ if (likely(!timer->start_site))
|
|
return;
|
|
timer_stats_update_stats(timer, timer->start_pid, timer->start_site,
|
|
timer->function, timer->start_comm, 0);
|
|
diff --git a/include/linux/lguest.h b/include/linux/lguest.h
|
|
index 7bc1440..dbf2479 100644
|
|
--- a/include/linux/lguest.h
|
|
+++ b/include/linux/lguest.h
|
|
@@ -11,7 +11,7 @@
|
|
#define LG_CLOCK_MIN_DELTA 100UL
|
|
#define LG_CLOCK_MAX_DELTA ULONG_MAX
|
|
|
|
-/*G:032 The second method of communicating with the Host is to via "struct
|
|
+/*G:031 The second method of communicating with the Host is to via "struct
|
|
* lguest_data". Once the Guest's initialization hypercall tells the Host where
|
|
* this is, the Guest and Host both publish information in it. :*/
|
|
struct lguest_data
|
|
diff --git a/include/linux/libata.h b/include/linux/libata.h
|
|
index 3d501db..79b6d7f 100644
|
|
--- a/include/linux/libata.h
|
|
+++ b/include/linux/libata.h
|
|
@@ -385,6 +385,7 @@ enum {
|
|
not multiple of 16 bytes */
|
|
ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firmware update warning */
|
|
ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */
|
|
+ ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */
|
|
|
|
/* DMA mask for user DMA control: User visible values; DO NOT
|
|
renumber */
|
|
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
|
|
index b47b3f0..f2c69a2 100644
|
|
--- a/include/linux/skbuff.h
|
|
+++ b/include/linux/skbuff.h
|
|
@@ -1342,12 +1342,12 @@ static inline int skb_network_offset(const struct sk_buff *skb)
|
|
* shifting the start of the packet by 2 bytes. Drivers should do this
|
|
* with:
|
|
*
|
|
- * skb_reserve(NET_IP_ALIGN);
|
|
+ * skb_reserve(skb, NET_IP_ALIGN);
|
|
*
|
|
* The downside to this alignment of the IP header is that the DMA is now
|
|
* unaligned. On some architectures the cost of an unaligned DMA is high
|
|
* and this cost outweighs the gains made by aligning the IP header.
|
|
- *
|
|
+ *
|
|
* Since this trade off varies between architectures, we allow NET_IP_ALIGN
|
|
* to be overridden.
|
|
*/
|
|
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
|
|
index cec79ad..9c543d6 100644
|
|
--- a/include/linux/virtio_net.h
|
|
+++ b/include/linux/virtio_net.h
|
|
@@ -27,6 +27,7 @@
|
|
#define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */
|
|
#define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */
|
|
#define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */
|
|
+#define VIRTIO_NET_F_CTRL_RX_EXTRA 20 /* Extra RX mode control support */
|
|
|
|
#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */
|
|
|
|
@@ -81,14 +82,19 @@ typedef __u8 virtio_net_ctrl_ack;
|
|
#define VIRTIO_NET_ERR 1
|
|
|
|
/*
|
|
- * Control the RX mode, ie. promisucous and allmulti. PROMISC and
|
|
- * ALLMULTI commands require an "out" sg entry containing a 1 byte
|
|
- * state value, zero = disable, non-zero = enable. These commands
|
|
- * are supported with the VIRTIO_NET_F_CTRL_RX feature.
|
|
+ * Control the RX mode, ie. promisucous, allmulti, etc...
|
|
+ * All commands require an "out" sg entry containing a 1 byte
|
|
+ * state value, zero = disable, non-zero = enable. Commands
|
|
+ * 0 and 1 are supported with the VIRTIO_NET_F_CTRL_RX feature.
|
|
+ * Commands 2-5 are added with VIRTIO_NET_F_CTRL_RX_EXTRA.
|
|
*/
|
|
#define VIRTIO_NET_CTRL_RX 0
|
|
#define VIRTIO_NET_CTRL_RX_PROMISC 0
|
|
#define VIRTIO_NET_CTRL_RX_ALLMULTI 1
|
|
+ #define VIRTIO_NET_CTRL_RX_ALLUNI 2
|
|
+ #define VIRTIO_NET_CTRL_RX_NOMULTI 3
|
|
+ #define VIRTIO_NET_CTRL_RX_NOUNI 4
|
|
+ #define VIRTIO_NET_CTRL_RX_NOBCAST 5
|
|
|
|
/*
|
|
* Control the MAC filter table.
|
|
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
|
|
index d6b05f4..9a74b46 100644
|
|
--- a/include/trace/events/block.h
|
|
+++ b/include/trace/events/block.h
|
|
@@ -1,3 +1,6 @@
|
|
+#undef TRACE_SYSTEM
|
|
+#define TRACE_SYSTEM block
|
|
+
|
|
#if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_BLOCK_H
|
|
|
|
@@ -5,9 +8,6 @@
|
|
#include <linux/blkdev.h>
|
|
#include <linux/tracepoint.h>
|
|
|
|
-#undef TRACE_SYSTEM
|
|
-#define TRACE_SYSTEM block
|
|
-
|
|
TRACE_EVENT(block_rq_abort,
|
|
|
|
TP_PROTO(struct request_queue *q, struct request *rq),
|
|
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
|
|
index dfbc9b0..7d8b5bc 100644
|
|
--- a/include/trace/events/ext4.h
|
|
+++ b/include/trace/events/ext4.h
|
|
@@ -1,9 +1,9 @@
|
|
-#if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
-#define _TRACE_EXT4_H
|
|
-
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM ext4
|
|
|
|
+#if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
+#define _TRACE_EXT4_H
|
|
+
|
|
#include <linux/writeback.h>
|
|
#include "../../../fs/ext4/ext4.h"
|
|
#include "../../../fs/ext4/mballoc.h"
|
|
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
|
|
index b0c7ede..1cb0c3a 100644
|
|
--- a/include/trace/events/irq.h
|
|
+++ b/include/trace/events/irq.h
|
|
@@ -1,12 +1,12 @@
|
|
+#undef TRACE_SYSTEM
|
|
+#define TRACE_SYSTEM irq
|
|
+
|
|
#if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_IRQ_H
|
|
|
|
#include <linux/tracepoint.h>
|
|
#include <linux/interrupt.h>
|
|
|
|
-#undef TRACE_SYSTEM
|
|
-#define TRACE_SYSTEM irq
|
|
-
|
|
#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq }
|
|
#define show_softirq_name(val) \
|
|
__print_symbolic(val, \
|
|
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h
|
|
index 845b0b4..10813fa 100644
|
|
--- a/include/trace/events/jbd2.h
|
|
+++ b/include/trace/events/jbd2.h
|
|
@@ -1,12 +1,12 @@
|
|
+#undef TRACE_SYSTEM
|
|
+#define TRACE_SYSTEM jbd2
|
|
+
|
|
#if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_JBD2_H
|
|
|
|
#include <linux/jbd2.h>
|
|
#include <linux/tracepoint.h>
|
|
|
|
-#undef TRACE_SYSTEM
|
|
-#define TRACE_SYSTEM jbd2
|
|
-
|
|
TRACE_EVENT(jbd2_checkpoint,
|
|
|
|
TP_PROTO(journal_t *journal, int result),
|
|
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h
|
|
index 9baba50..1493c54 100644
|
|
--- a/include/trace/events/kmem.h
|
|
+++ b/include/trace/events/kmem.h
|
|
@@ -1,12 +1,12 @@
|
|
+#undef TRACE_SYSTEM
|
|
+#define TRACE_SYSTEM kmem
|
|
+
|
|
#if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_KMEM_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/tracepoint.h>
|
|
|
|
-#undef TRACE_SYSTEM
|
|
-#define TRACE_SYSTEM kmem
|
|
-
|
|
/*
|
|
* The order of these masks is important. Matching masks will be seen
|
|
* first and the left over flags will end up showing by themselves.
|
|
diff --git a/include/trace/events/lockdep.h b/include/trace/events/lockdep.h
|
|
index 0e956c9..bcf1d20 100644
|
|
--- a/include/trace/events/lockdep.h
|
|
+++ b/include/trace/events/lockdep.h
|
|
@@ -1,12 +1,12 @@
|
|
+#undef TRACE_SYSTEM
|
|
+#define TRACE_SYSTEM lockdep
|
|
+
|
|
#if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_LOCKDEP_H
|
|
|
|
#include <linux/lockdep.h>
|
|
#include <linux/tracepoint.h>
|
|
|
|
-#undef TRACE_SYSTEM
|
|
-#define TRACE_SYSTEM lockdep
|
|
-
|
|
#ifdef CONFIG_LOCKDEP
|
|
|
|
TRACE_EVENT(lock_acquire,
|
|
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
|
|
index 24ab5bc..8949bb7 100644
|
|
--- a/include/trace/events/sched.h
|
|
+++ b/include/trace/events/sched.h
|
|
@@ -1,12 +1,12 @@
|
|
+#undef TRACE_SYSTEM
|
|
+#define TRACE_SYSTEM sched
|
|
+
|
|
#if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_SCHED_H
|
|
|
|
#include <linux/sched.h>
|
|
#include <linux/tracepoint.h>
|
|
|
|
-#undef TRACE_SYSTEM
|
|
-#define TRACE_SYSTEM sched
|
|
-
|
|
/*
|
|
* Tracepoint for calling kthread_stop, performed to end a kthread:
|
|
*/
|
|
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h
|
|
index 1e8fabb..e499863 100644
|
|
--- a/include/trace/events/skb.h
|
|
+++ b/include/trace/events/skb.h
|
|
@@ -1,12 +1,12 @@
|
|
+#undef TRACE_SYSTEM
|
|
+#define TRACE_SYSTEM skb
|
|
+
|
|
#if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_SKB_H
|
|
|
|
#include <linux/skbuff.h>
|
|
#include <linux/tracepoint.h>
|
|
|
|
-#undef TRACE_SYSTEM
|
|
-#define TRACE_SYSTEM skb
|
|
-
|
|
/*
|
|
* Tracepoint for free an sk_buff:
|
|
*/
|
|
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h
|
|
index 035f1bf..fcfd9a1 100644
|
|
--- a/include/trace/events/workqueue.h
|
|
+++ b/include/trace/events/workqueue.h
|
|
@@ -1,3 +1,6 @@
|
|
+#undef TRACE_SYSTEM
|
|
+#define TRACE_SYSTEM workqueue
|
|
+
|
|
#if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_WORKQUEUE_H
|
|
|
|
@@ -5,9 +8,6 @@
|
|
#include <linux/sched.h>
|
|
#include <linux/tracepoint.h>
|
|
|
|
-#undef TRACE_SYSTEM
|
|
-#define TRACE_SYSTEM workqueue
|
|
-
|
|
TRACE_EVENT(workqueue_insertion,
|
|
|
|
TP_PROTO(struct task_struct *wq_thread, struct work_struct *work),
|
|
diff --git a/kernel/futex.c b/kernel/futex.c
|
|
index 794c862..0672ff8 100644
|
|
--- a/kernel/futex.c
|
|
+++ b/kernel/futex.c
|
|
@@ -247,6 +247,7 @@ again:
|
|
if (err < 0)
|
|
return err;
|
|
|
|
+ page = compound_head(page);
|
|
lock_page(page);
|
|
if (!page->mapping) {
|
|
unlock_page(page);
|
|
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
|
|
index 9002958..49da79a 100644
|
|
--- a/kernel/hrtimer.c
|
|
+++ b/kernel/hrtimer.c
|
|
@@ -191,6 +191,46 @@ struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer,
|
|
}
|
|
}
|
|
|
|
+
|
|
+/*
|
|
+ * Get the preferred target CPU for NOHZ
|
|
+ */
|
|
+static int hrtimer_get_target(int this_cpu, int pinned)
|
|
+{
|
|
+#ifdef CONFIG_NO_HZ
|
|
+ if (!pinned && get_sysctl_timer_migration() && idle_cpu(this_cpu)) {
|
|
+ int preferred_cpu = get_nohz_load_balancer();
|
|
+
|
|
+ if (preferred_cpu >= 0)
|
|
+ return preferred_cpu;
|
|
+ }
|
|
+#endif
|
|
+ return this_cpu;
|
|
+}
|
|
+
|
|
+/*
|
|
+ * With HIGHRES=y we do not migrate the timer when it is expiring
|
|
+ * before the next event on the target cpu because we cannot reprogram
|
|
+ * the target cpu hardware and we would cause it to fire late.
|
|
+ *
|
|
+ * Called with cpu_base->lock of target cpu held.
|
|
+ */
|
|
+static int
|
|
+hrtimer_check_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base)
|
|
+{
|
|
+#ifdef CONFIG_HIGH_RES_TIMERS
|
|
+ ktime_t expires;
|
|
+
|
|
+ if (!new_base->cpu_base->hres_active)
|
|
+ return 0;
|
|
+
|
|
+ expires = ktime_sub(hrtimer_get_expires(timer), new_base->offset);
|
|
+ return expires.tv64 <= new_base->cpu_base->expires_next.tv64;
|
|
+#else
|
|
+ return 0;
|
|
+#endif
|
|
+}
|
|
+
|
|
/*
|
|
* Switch the timer base to the current CPU when possible.
|
|
*/
|
|
@@ -200,16 +240,8 @@ switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base,
|
|
{
|
|
struct hrtimer_clock_base *new_base;
|
|
struct hrtimer_cpu_base *new_cpu_base;
|
|
- int cpu, preferred_cpu = -1;
|
|
-
|
|
- cpu = smp_processor_id();
|
|
-#if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP)
|
|
- if (!pinned && get_sysctl_timer_migration() && idle_cpu(cpu)) {
|
|
- preferred_cpu = get_nohz_load_balancer();
|
|
- if (preferred_cpu >= 0)
|
|
- cpu = preferred_cpu;
|
|
- }
|
|
-#endif
|
|
+ int this_cpu = smp_processor_id();
|
|
+ int cpu = hrtimer_get_target(this_cpu, pinned);
|
|
|
|
again:
|
|
new_cpu_base = &per_cpu(hrtimer_bases, cpu);
|
|
@@ -217,7 +249,7 @@ again:
|
|
|
|
if (base != new_base) {
|
|
/*
|
|
- * We are trying to schedule the timer on the local CPU.
|
|
+ * We are trying to move timer to new_base.
|
|
* However we can't change timer's base while it is running,
|
|
* so we keep it on the same CPU. No hassle vs. reprogramming
|
|
* the event source in the high resolution case. The softirq
|
|
@@ -233,38 +265,12 @@ again:
|
|
spin_unlock(&base->cpu_base->lock);
|
|
spin_lock(&new_base->cpu_base->lock);
|
|
|
|
- /* Optimized away for NOHZ=n SMP=n */
|
|
- if (cpu == preferred_cpu) {
|
|
- /* Calculate clock monotonic expiry time */
|
|
-#ifdef CONFIG_HIGH_RES_TIMERS
|
|
- ktime_t expires = ktime_sub(hrtimer_get_expires(timer),
|
|
- new_base->offset);
|
|
-#else
|
|
- ktime_t expires = hrtimer_get_expires(timer);
|
|
-#endif
|
|
-
|
|
- /*
|
|
- * Get the next event on target cpu from the
|
|
- * clock events layer.
|
|
- * This covers the highres=off nohz=on case as well.
|
|
- */
|
|
- ktime_t next = clockevents_get_next_event(cpu);
|
|
-
|
|
- ktime_t delta = ktime_sub(expires, next);
|
|
-
|
|
- /*
|
|
- * We do not migrate the timer when it is expiring
|
|
- * before the next event on the target cpu because
|
|
- * we cannot reprogram the target cpu hardware and
|
|
- * we would cause it to fire late.
|
|
- */
|
|
- if (delta.tv64 < 0) {
|
|
- cpu = smp_processor_id();
|
|
- spin_unlock(&new_base->cpu_base->lock);
|
|
- spin_lock(&base->cpu_base->lock);
|
|
- timer->base = base;
|
|
- goto again;
|
|
- }
|
|
+ if (cpu != this_cpu && hrtimer_check_target(timer, new_base)) {
|
|
+ cpu = this_cpu;
|
|
+ spin_unlock(&new_base->cpu_base->lock);
|
|
+ spin_lock(&base->cpu_base->lock);
|
|
+ timer->base = base;
|
|
+ goto again;
|
|
}
|
|
timer->base = new_base;
|
|
}
|
|
@@ -1276,14 +1282,22 @@ void hrtimer_interrupt(struct clock_event_device *dev)
|
|
|
|
expires_next.tv64 = KTIME_MAX;
|
|
|
|
+ spin_lock(&cpu_base->lock);
|
|
+ /*
|
|
+ * We set expires_next to KTIME_MAX here with cpu_base->lock
|
|
+ * held to prevent that a timer is enqueued in our queue via
|
|
+ * the migration code. This does not affect enqueueing of
|
|
+ * timers which run their callback and need to be requeued on
|
|
+ * this CPU.
|
|
+ */
|
|
+ cpu_base->expires_next.tv64 = KTIME_MAX;
|
|
+
|
|
base = cpu_base->clock_base;
|
|
|
|
for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) {
|
|
ktime_t basenow;
|
|
struct rb_node *node;
|
|
|
|
- spin_lock(&cpu_base->lock);
|
|
-
|
|
basenow = ktime_add(now, base->offset);
|
|
|
|
while ((node = base->first)) {
|
|
@@ -1316,11 +1330,15 @@ void hrtimer_interrupt(struct clock_event_device *dev)
|
|
|
|
__run_hrtimer(timer);
|
|
}
|
|
- spin_unlock(&cpu_base->lock);
|
|
base++;
|
|
}
|
|
|
|
+ /*
|
|
+ * Store the new expiry value so the migration code can verify
|
|
+ * against it.
|
|
+ */
|
|
cpu_base->expires_next = expires_next;
|
|
+ spin_unlock(&cpu_base->lock);
|
|
|
|
/* Reprogramming necessary ? */
|
|
if (expires_next.tv64 != KTIME_MAX) {
|
|
diff --git a/kernel/sched.c b/kernel/sched.c
|
|
index 01f55ad..98972d3 100644
|
|
--- a/kernel/sched.c
|
|
+++ b/kernel/sched.c
|
|
@@ -493,6 +493,7 @@ struct rt_rq {
|
|
#endif
|
|
#ifdef CONFIG_SMP
|
|
unsigned long rt_nr_migratory;
|
|
+ unsigned long rt_nr_total;
|
|
int overloaded;
|
|
struct plist_head pushable_tasks;
|
|
#endif
|
|
@@ -2571,15 +2572,37 @@ static void __sched_fork(struct task_struct *p)
|
|
p->se.avg_wakeup = sysctl_sched_wakeup_granularity;
|
|
|
|
#ifdef CONFIG_SCHEDSTATS
|
|
- p->se.wait_start = 0;
|
|
- p->se.sum_sleep_runtime = 0;
|
|
- p->se.sleep_start = 0;
|
|
- p->se.block_start = 0;
|
|
- p->se.sleep_max = 0;
|
|
- p->se.block_max = 0;
|
|
- p->se.exec_max = 0;
|
|
- p->se.slice_max = 0;
|
|
- p->se.wait_max = 0;
|
|
+ p->se.wait_start = 0;
|
|
+ p->se.wait_max = 0;
|
|
+ p->se.wait_count = 0;
|
|
+ p->se.wait_sum = 0;
|
|
+
|
|
+ p->se.sleep_start = 0;
|
|
+ p->se.sleep_max = 0;
|
|
+ p->se.sum_sleep_runtime = 0;
|
|
+
|
|
+ p->se.block_start = 0;
|
|
+ p->se.block_max = 0;
|
|
+ p->se.exec_max = 0;
|
|
+ p->se.slice_max = 0;
|
|
+
|
|
+ p->se.nr_migrations_cold = 0;
|
|
+ p->se.nr_failed_migrations_affine = 0;
|
|
+ p->se.nr_failed_migrations_running = 0;
|
|
+ p->se.nr_failed_migrations_hot = 0;
|
|
+ p->se.nr_forced_migrations = 0;
|
|
+ p->se.nr_forced2_migrations = 0;
|
|
+
|
|
+ p->se.nr_wakeups = 0;
|
|
+ p->se.nr_wakeups_sync = 0;
|
|
+ p->se.nr_wakeups_migrate = 0;
|
|
+ p->se.nr_wakeups_local = 0;
|
|
+ p->se.nr_wakeups_remote = 0;
|
|
+ p->se.nr_wakeups_affine = 0;
|
|
+ p->se.nr_wakeups_affine_attempts = 0;
|
|
+ p->se.nr_wakeups_passive = 0;
|
|
+ p->se.nr_wakeups_idle = 0;
|
|
+
|
|
#endif
|
|
|
|
INIT_LIST_HEAD(&p->rt.run_list);
|
|
@@ -9074,7 +9097,7 @@ static void init_rt_rq(struct rt_rq *rt_rq, struct rq *rq)
|
|
#ifdef CONFIG_SMP
|
|
rt_rq->rt_nr_migratory = 0;
|
|
rt_rq->overloaded = 0;
|
|
- plist_head_init(&rq->rt.pushable_tasks, &rq->lock);
|
|
+ plist_head_init(&rt_rq->pushable_tasks, &rq->lock);
|
|
#endif
|
|
|
|
rt_rq->rt_time = 0;
|
|
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
|
|
index ba7fd6e..7c248dc 100644
|
|
--- a/kernel/sched_fair.c
|
|
+++ b/kernel/sched_fair.c
|
|
@@ -687,7 +687,8 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
|
|
* all of which have the same weight.
|
|
*/
|
|
if (sched_feat(NORMALIZED_SLEEPER) &&
|
|
- task_of(se)->policy != SCHED_IDLE)
|
|
+ (!entity_is_task(se) ||
|
|
+ task_of(se)->policy != SCHED_IDLE))
|
|
thresh = calc_delta_fair(thresh, se);
|
|
|
|
vruntime -= thresh;
|
|
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
|
|
index 9bf0d2a..3918e01 100644
|
|
--- a/kernel/sched_rt.c
|
|
+++ b/kernel/sched_rt.c
|
|
@@ -10,6 +10,8 @@ static inline struct task_struct *rt_task_of(struct sched_rt_entity *rt_se)
|
|
|
|
#ifdef CONFIG_RT_GROUP_SCHED
|
|
|
|
+#define rt_entity_is_task(rt_se) (!(rt_se)->my_q)
|
|
+
|
|
static inline struct rq *rq_of_rt_rq(struct rt_rq *rt_rq)
|
|
{
|
|
return rt_rq->rq;
|
|
@@ -22,6 +24,8 @@ static inline struct rt_rq *rt_rq_of_se(struct sched_rt_entity *rt_se)
|
|
|
|
#else /* CONFIG_RT_GROUP_SCHED */
|
|
|
|
+#define rt_entity_is_task(rt_se) (1)
|
|
+
|
|
static inline struct rq *rq_of_rt_rq(struct rt_rq *rt_rq)
|
|
{
|
|
return container_of(rt_rq, struct rq, rt);
|
|
@@ -73,7 +77,7 @@ static inline void rt_clear_overload(struct rq *rq)
|
|
|
|
static void update_rt_migration(struct rt_rq *rt_rq)
|
|
{
|
|
- if (rt_rq->rt_nr_migratory && (rt_rq->rt_nr_running > 1)) {
|
|
+ if (rt_rq->rt_nr_migratory && rt_rq->rt_nr_total > 1) {
|
|
if (!rt_rq->overloaded) {
|
|
rt_set_overload(rq_of_rt_rq(rt_rq));
|
|
rt_rq->overloaded = 1;
|
|
@@ -86,6 +90,12 @@ static void update_rt_migration(struct rt_rq *rt_rq)
|
|
|
|
static void inc_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
|
|
{
|
|
+ if (!rt_entity_is_task(rt_se))
|
|
+ return;
|
|
+
|
|
+ rt_rq = &rq_of_rt_rq(rt_rq)->rt;
|
|
+
|
|
+ rt_rq->rt_nr_total++;
|
|
if (rt_se->nr_cpus_allowed > 1)
|
|
rt_rq->rt_nr_migratory++;
|
|
|
|
@@ -94,6 +104,12 @@ static void inc_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
|
|
|
|
static void dec_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
|
|
{
|
|
+ if (!rt_entity_is_task(rt_se))
|
|
+ return;
|
|
+
|
|
+ rt_rq = &rq_of_rt_rq(rt_rq)->rt;
|
|
+
|
|
+ rt_rq->rt_nr_total--;
|
|
if (rt_se->nr_cpus_allowed > 1)
|
|
rt_rq->rt_nr_migratory--;
|
|
|
|
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
|
|
index 1ad6dd4..a6dcd67 100644
|
|
--- a/kernel/time/clockevents.c
|
|
+++ b/kernel/time/clockevents.c
|
|
@@ -254,15 +254,4 @@ void clockevents_notify(unsigned long reason, void *arg)
|
|
spin_unlock(&clockevents_lock);
|
|
}
|
|
EXPORT_SYMBOL_GPL(clockevents_notify);
|
|
-
|
|
-ktime_t clockevents_get_next_event(int cpu)
|
|
-{
|
|
- struct tick_device *td;
|
|
- struct clock_event_device *dev;
|
|
-
|
|
- td = &per_cpu(tick_cpu_device, cpu);
|
|
- dev = td->evtdev;
|
|
-
|
|
- return dev->next_event;
|
|
-}
|
|
#endif
|
|
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
|
|
index bce9e01..4521c77 100644
|
|
--- a/kernel/trace/ftrace.c
|
|
+++ b/kernel/trace/ftrace.c
|
|
@@ -768,7 +768,7 @@ static struct tracer_stat function_stats __initdata = {
|
|
.stat_show = function_stat_show
|
|
};
|
|
|
|
-static void ftrace_profile_debugfs(struct dentry *d_tracer)
|
|
+static __init void ftrace_profile_debugfs(struct dentry *d_tracer)
|
|
{
|
|
struct ftrace_profile_stat *stat;
|
|
struct dentry *entry;
|
|
@@ -786,7 +786,6 @@ static void ftrace_profile_debugfs(struct dentry *d_tracer)
|
|
* The files created are permanent, if something happens
|
|
* we still do not free memory.
|
|
*/
|
|
- kfree(stat);
|
|
WARN(1,
|
|
"Could not allocate stat file for cpu %d\n",
|
|
cpu);
|
|
@@ -813,7 +812,7 @@ static void ftrace_profile_debugfs(struct dentry *d_tracer)
|
|
}
|
|
|
|
#else /* CONFIG_FUNCTION_PROFILER */
|
|
-static void ftrace_profile_debugfs(struct dentry *d_tracer)
|
|
+static __init void ftrace_profile_debugfs(struct dentry *d_tracer)
|
|
{
|
|
}
|
|
#endif /* CONFIG_FUNCTION_PROFILER */
|
|
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c
|
|
index 7402144..75ef000 100644
|
|
--- a/kernel/trace/trace_functions.c
|
|
+++ b/kernel/trace/trace_functions.c
|
|
@@ -363,7 +363,7 @@ ftrace_trace_onoff_callback(char *glob, char *cmd, char *param, int enable)
|
|
out_reg:
|
|
ret = register_ftrace_function_probe(glob, ops, count);
|
|
|
|
- return ret;
|
|
+ return ret < 0 ? ret : 0;
|
|
}
|
|
|
|
static struct ftrace_func_command ftrace_traceon_cmd = {
|
|
diff --git a/net/core/sock.c b/net/core/sock.c
|
|
index 6354863..ba5d211 100644
|
|
--- a/net/core/sock.c
|
|
+++ b/net/core/sock.c
|
|
@@ -939,8 +939,23 @@ static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority,
|
|
struct kmem_cache *slab;
|
|
|
|
slab = prot->slab;
|
|
- if (slab != NULL)
|
|
- sk = kmem_cache_alloc(slab, priority);
|
|
+ if (slab != NULL) {
|
|
+ sk = kmem_cache_alloc(slab, priority & ~__GFP_ZERO);
|
|
+ if (!sk)
|
|
+ return sk;
|
|
+ if (priority & __GFP_ZERO) {
|
|
+ /*
|
|
+ * caches using SLAB_DESTROY_BY_RCU should let
|
|
+ * sk_node.next un-modified. Special care is taken
|
|
+ * when initializing object to zero.
|
|
+ */
|
|
+ if (offsetof(struct sock, sk_node.next) != 0)
|
|
+ memset(sk, 0, offsetof(struct sock, sk_node.next));
|
|
+ memset(&sk->sk_node.pprev, 0,
|
|
+ prot->obj_size - offsetof(struct sock,
|
|
+ sk_node.pprev));
|
|
+ }
|
|
+ }
|
|
else
|
|
sk = kmalloc(prot->obj_size, priority);
|
|
|
|
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
|
|
index 44e2a3d..cb4a0f4 100644
|
|
--- a/net/ipv4/ip_gre.c
|
|
+++ b/net/ipv4/ip_gre.c
|
|
@@ -735,10 +735,10 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
}
|
|
|
|
tos = tiph->tos;
|
|
- if (tos&1) {
|
|
+ if (tos == 1) {
|
|
+ tos = 0;
|
|
if (skb->protocol == htons(ETH_P_IP))
|
|
tos = old_iph->tos;
|
|
- tos &= ~1;
|
|
}
|
|
|
|
{
|
|
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
|
|
index 2470262..7d08210 100644
|
|
--- a/net/ipv4/ip_output.c
|
|
+++ b/net/ipv4/ip_output.c
|
|
@@ -1243,7 +1243,6 @@ int ip_push_pending_frames(struct sock *sk)
|
|
skb->len += tmp_skb->len;
|
|
skb->data_len += tmp_skb->len;
|
|
skb->truesize += tmp_skb->truesize;
|
|
- __sock_put(tmp_skb->sk);
|
|
tmp_skb->destructor = NULL;
|
|
tmp_skb->sk = NULL;
|
|
}
|
|
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
|
|
index 7c76e3d..87f8419 100644
|
|
--- a/net/ipv6/ip6_output.c
|
|
+++ b/net/ipv6/ip6_output.c
|
|
@@ -1484,7 +1484,6 @@ int ip6_push_pending_frames(struct sock *sk)
|
|
skb->len += tmp_skb->len;
|
|
skb->data_len += tmp_skb->len;
|
|
skb->truesize += tmp_skb->truesize;
|
|
- __sock_put(tmp_skb->sk);
|
|
tmp_skb->destructor = NULL;
|
|
tmp_skb->sk = NULL;
|
|
}
|
|
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
|
|
index 68e5230..98b7327 100644
|
|
--- a/net/ipv6/sit.c
|
|
+++ b/net/ipv6/sit.c
|
|
@@ -1018,6 +1018,7 @@ static void ipip6_tunnel_setup(struct net_device *dev)
|
|
dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr);
|
|
dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr);
|
|
dev->flags = IFF_NOARP;
|
|
+ dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
|
|
dev->iflink = 0;
|
|
dev->addr_len = 4;
|
|
dev->features |= NETIF_F_NETNS_LOCAL;
|
|
diff --git a/samples/trace_events/trace-events-sample.h b/samples/trace_events/trace-events-sample.h
|
|
index 9977a75..f24ae37 100644
|
|
--- a/samples/trace_events/trace-events-sample.h
|
|
+++ b/samples/trace_events/trace-events-sample.h
|
|
@@ -1,21 +1,4 @@
|
|
/*
|
|
- * Notice that this file is not protected like a normal header.
|
|
- * We also must allow for rereading of this file. The
|
|
- *
|
|
- * || defined(TRACE_HEADER_MULTI_READ)
|
|
- *
|
|
- * serves this purpose.
|
|
- */
|
|
-#if !defined(_TRACE_EVENT_SAMPLE_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
-#define _TRACE_EVENT_SAMPLE_H
|
|
-
|
|
-/*
|
|
- * All trace headers should include tracepoint.h, until we finally
|
|
- * make it into a standard header.
|
|
- */
|
|
-#include <linux/tracepoint.h>
|
|
-
|
|
-/*
|
|
* If TRACE_SYSTEM is defined, that will be the directory created
|
|
* in the ftrace directory under /debugfs/tracing/events/<system>
|
|
*
|
|
@@ -34,11 +17,31 @@
|
|
* #define TRACE_INCLUDE_FILE trace-events-sample
|
|
*
|
|
* As we do an the bottom of this file.
|
|
+ *
|
|
+ * Notice that TRACE_SYSTEM should be defined outside of #if
|
|
+ * protection, just like TRACE_INCLUDE_FILE.
|
|
*/
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM sample
|
|
|
|
/*
|
|
+ * Notice that this file is not protected like a normal header.
|
|
+ * We also must allow for rereading of this file. The
|
|
+ *
|
|
+ * || defined(TRACE_HEADER_MULTI_READ)
|
|
+ *
|
|
+ * serves this purpose.
|
|
+ */
|
|
+#if !defined(_TRACE_EVENT_SAMPLE_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
+#define _TRACE_EVENT_SAMPLE_H
|
|
+
|
|
+/*
|
|
+ * All trace headers should include tracepoint.h, until we finally
|
|
+ * make it into a standard header.
|
|
+ */
|
|
+#include <linux/tracepoint.h>
|
|
+
|
|
+/*
|
|
* The TRACE_EVENT macro is broken up into 5 parts.
|
|
*
|
|
* name: name of the trace point. This is also how to enable the tracepoint.
|
|
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c
|
|
index 108b643..6205f37 100644
|
|
--- a/sound/arm/pxa2xx-pcm-lib.c
|
|
+++ b/sound/arm/pxa2xx-pcm-lib.c
|
|
@@ -75,7 +75,7 @@ int __pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream)
|
|
{
|
|
struct pxa2xx_runtime_data *rtd = substream->runtime->private_data;
|
|
|
|
- if (rtd && rtd->params)
|
|
+ if (rtd && rtd->params && rtd->params->drcmr)
|
|
*rtd->params->drcmr = 0;
|
|
|
|
snd_pcm_set_runtime_buffer(substream, NULL);
|
|
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
|
index bbb9b42..7e99763 100644
|
|
--- a/sound/pci/hda/patch_realtek.c
|
|
+++ b/sound/pci/hda/patch_realtek.c
|
|
@@ -4505,6 +4505,12 @@ static int alc880_parse_auto_config(struct hda_codec *codec)
|
|
&dig_nid, 1);
|
|
if (err < 0)
|
|
continue;
|
|
+ if (dig_nid > 0x7f) {
|
|
+ printk(KERN_ERR "alc880_auto: invalid dig_nid "
|
|
+ "connection 0x%x for NID 0x%x\n", dig_nid,
|
|
+ spec->autocfg.dig_out_pins[i]);
|
|
+ continue;
|
|
+ }
|
|
if (!i)
|
|
spec->multiout.dig_out_nid = dig_nid;
|
|
else {
|
|
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
|
|
index 235a71e..b5ca02e 100644
|
|
--- a/sound/pci/riptide/riptide.c
|
|
+++ b/sound/pci/riptide/riptide.c
|
|
@@ -2197,9 +2197,12 @@ static int __init alsa_card_riptide_init(void)
|
|
if (err < 0)
|
|
return err;
|
|
#if defined(SUPPORT_JOYSTICK)
|
|
- pci_register_driver(&joystick_driver);
|
|
+ err = pci_register_driver(&joystick_driver);
|
|
+ /* On failure unregister formerly registered audio driver */
|
|
+ if (err < 0)
|
|
+ pci_unregister_driver(&driver);
|
|
#endif
|
|
- return 0;
|
|
+ return err;
|
|
}
|
|
|
|
static void __exit alsa_card_riptide_exit(void)
|
|
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
|
|
index c7b9023..44b9cdc 100644
|
|
--- a/sound/usb/usbaudio.c
|
|
+++ b/sound/usb/usbaudio.c
|
|
@@ -2661,7 +2661,7 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
|
|
struct usb_interface_descriptor *altsd;
|
|
int i, altno, err, stream;
|
|
int format;
|
|
- struct audioformat *fp;
|
|
+ struct audioformat *fp = NULL;
|
|
unsigned char *fmt, *csep;
|
|
int num;
|
|
|
|
@@ -2734,6 +2734,18 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
|
|
continue;
|
|
}
|
|
|
|
+ /*
|
|
+ * Blue Microphones workaround: The last altsetting is identical
|
|
+ * with the previous one, except for a larger packet size, but
|
|
+ * is actually a mislabeled two-channel setting; ignore it.
|
|
+ */
|
|
+ if (fmt[4] == 1 && fmt[5] == 2 && altno == 2 && num == 3 &&
|
|
+ fp && fp->altsetting == 1 && fp->channels == 1 &&
|
|
+ fp->format == SNDRV_PCM_FORMAT_S16_LE &&
|
|
+ le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize) ==
|
|
+ fp->maxpacksize * 2)
|
|
+ continue;
|
|
+
|
|
csep = snd_usb_find_desc(alts->endpoint[0].extra, alts->endpoint[0].extralen, NULL, USB_DT_CS_ENDPOINT);
|
|
/* Creamware Noah has this descriptor after the 2nd endpoint */
|
|
if (!csep && altsd->bNumEndpoints >= 2)
|