forked from Minki/linux
Merge branch 'from-linus' into upstream
This commit is contained in:
commit
71bfe47f02
5
.gitignore
vendored
5
.gitignore
vendored
@ -30,6 +30,11 @@ include/config
|
||||
include/linux/autoconf.h
|
||||
include/linux/compile.h
|
||||
include/linux/version.h
|
||||
include/linux/utsrelease.h
|
||||
|
||||
# stgit generated dirs
|
||||
patches-*
|
||||
|
||||
# quilt's files
|
||||
patches
|
||||
series
|
||||
|
@ -51,8 +51,6 @@ Debugging Information
|
||||
|
||||
References
|
||||
|
||||
IETF IP over InfiniBand (ipoib) Working Group
|
||||
http://ietf.org/html.charters/ipoib-charter.html
|
||||
Transmission of IP over InfiniBand (IPoIB) (RFC 4391)
|
||||
http://ietf.org/rfc/rfc4391.txt
|
||||
IP over InfiniBand (IPoIB) Architecture (RFC 4392)
|
||||
|
@ -59,7 +59,7 @@ bind to an interface (or perhaps several) using an ioctl call. You
|
||||
would issue more ioctls to the device to communicate to it using
|
||||
control, bulk, or other kinds of USB transfers. The IOCTLs are
|
||||
listed in the <linux/usbdevice_fs.h> file, and at this writing the
|
||||
source code (linux/drivers/usb/devio.c) is the primary reference
|
||||
source code (linux/drivers/usb/core/devio.c) is the primary reference
|
||||
for how to access devices through those files.
|
||||
|
||||
Note that since by default these BBB/DDD files are writable only by
|
||||
|
@ -5,8 +5,7 @@ For USB help other than the readme files that are located in
|
||||
Documentation/usb/*, see the following:
|
||||
|
||||
Linux-USB project: http://www.linux-usb.org
|
||||
mirrors at http://www.suse.cz/development/linux-usb/
|
||||
and http://usb.in.tum.de/linux-usb/
|
||||
mirrors at http://usb.in.tum.de/linux-usb/
|
||||
and http://it.linux-usb.org
|
||||
Linux USB Guide: http://linux-usb.sourceforge.net
|
||||
Linux-USB device overview (working devices and drivers):
|
||||
|
@ -214,6 +214,12 @@ W: http://acpi.sourceforge.net/
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git
|
||||
S: Maintained
|
||||
|
||||
ACPI PCI HOTPLUG DRIVER
|
||||
P: Kristen Carlson Accardi
|
||||
M: kristen.c.accardi@intel.com
|
||||
L: pcihpd-discuss@lists.sourceforge.net
|
||||
S: Maintained
|
||||
|
||||
AD1816 SOUND DRIVER
|
||||
P: Thorsten Knabe
|
||||
M: Thorsten Knabe <linux@thorsten-knabe.de>
|
||||
|
5
Makefile
5
Makefile
@ -310,8 +310,8 @@ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
|
||||
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
||||
-fno-strict-aliasing -fno-common
|
||||
# Force gcc to behave correct even for buggy distributions
|
||||
CFLAGS += $(call cc-option, -fno-stack-protector-all \
|
||||
-fno-stack-protector)
|
||||
CFLAGS += $(call cc-option, -fno-stack-protector)
|
||||
|
||||
AFLAGS := -D__ASSEMBLY__
|
||||
|
||||
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
|
||||
@ -368,6 +368,7 @@ endif
|
||||
|
||||
no-dot-config-targets := clean mrproper distclean \
|
||||
cscope TAGS tags help %docs check% \
|
||||
include/linux/version.h headers_% \
|
||||
kernelrelease kernelversion
|
||||
|
||||
config-targets := 0
|
||||
|
@ -95,7 +95,8 @@ static void gic_set_cpu(unsigned int irq, cpumask_t mask_val)
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct irqchip gic_chip = {
|
||||
static struct irq_chip gic_chip = {
|
||||
.name = "GIC",
|
||||
.ack = gic_ack_irq,
|
||||
.mask = gic_mask_irq,
|
||||
.unmask = gic_unmask_irq,
|
||||
|
@ -204,7 +204,8 @@ static void locomo_unmask_irq(unsigned int irq)
|
||||
locomo_writel(r, mapbase + LOCOMO_ICR);
|
||||
}
|
||||
|
||||
static struct irqchip locomo_chip = {
|
||||
static struct irq_chip locomo_chip = {
|
||||
.name = "LOCOMO",
|
||||
.ack = locomo_ack_irq,
|
||||
.mask = locomo_mask_irq,
|
||||
.unmask = locomo_unmask_irq,
|
||||
@ -249,7 +250,8 @@ static void locomo_key_unmask_irq(unsigned int irq)
|
||||
locomo_writel(r, mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC);
|
||||
}
|
||||
|
||||
static struct irqchip locomo_key_chip = {
|
||||
static struct irq_chip locomo_key_chip = {
|
||||
.name = "LOCOMO-key",
|
||||
.ack = locomo_key_ack_irq,
|
||||
.mask = locomo_key_mask_irq,
|
||||
.unmask = locomo_key_unmask_irq,
|
||||
@ -312,7 +314,8 @@ static void locomo_gpio_unmask_irq(unsigned int irq)
|
||||
locomo_writel(r, mapbase + LOCOMO_GIE);
|
||||
}
|
||||
|
||||
static struct irqchip locomo_gpio_chip = {
|
||||
static struct irq_chip locomo_gpio_chip = {
|
||||
.name = "LOCOMO-gpio",
|
||||
.ack = locomo_gpio_ack_irq,
|
||||
.mask = locomo_gpio_mask_irq,
|
||||
.unmask = locomo_gpio_unmask_irq,
|
||||
@ -357,7 +360,8 @@ static void locomo_lt_unmask_irq(unsigned int irq)
|
||||
locomo_writel(r, mapbase + LOCOMO_LTINT);
|
||||
}
|
||||
|
||||
static struct irqchip locomo_lt_chip = {
|
||||
static struct irq_chip locomo_lt_chip = {
|
||||
.name = "LOCOMO-lt",
|
||||
.ack = locomo_lt_ack_irq,
|
||||
.mask = locomo_lt_mask_irq,
|
||||
.unmask = locomo_lt_unmask_irq,
|
||||
@ -418,7 +422,8 @@ static void locomo_spi_unmask_irq(unsigned int irq)
|
||||
locomo_writel(r, mapbase + LOCOMO_SPIIE);
|
||||
}
|
||||
|
||||
static struct irqchip locomo_spi_chip = {
|
||||
static struct irq_chip locomo_spi_chip = {
|
||||
.name = "LOCOMO-spi",
|
||||
.ack = locomo_spi_ack_irq,
|
||||
.mask = locomo_spi_mask_irq,
|
||||
.unmask = locomo_spi_unmask_irq,
|
||||
|
@ -272,7 +272,8 @@ static int sa1111_wake_lowirq(unsigned int irq, unsigned int on)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irqchip sa1111_low_chip = {
|
||||
static struct irq_chip sa1111_low_chip = {
|
||||
.name = "SA1111-l",
|
||||
.ack = sa1111_ack_irq,
|
||||
.mask = sa1111_mask_lowirq,
|
||||
.unmask = sa1111_unmask_lowirq,
|
||||
@ -368,7 +369,8 @@ static int sa1111_wake_highirq(unsigned int irq, unsigned int on)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irqchip sa1111_high_chip = {
|
||||
static struct irq_chip sa1111_high_chip = {
|
||||
.name = "SA1111-h",
|
||||
.ack = sa1111_ack_irq,
|
||||
.mask = sa1111_mask_highirq,
|
||||
.unmask = sa1111_unmask_highirq,
|
||||
|
@ -39,7 +39,8 @@ static void vic_unmask_irq(unsigned int irq)
|
||||
writel(1 << irq, base + VIC_INT_ENABLE);
|
||||
}
|
||||
|
||||
static struct irqchip vic_chip = {
|
||||
static struct irq_chip vic_chip = {
|
||||
.name = "VIC",
|
||||
.ack = vic_mask_irq,
|
||||
.mask = vic_mask_irq,
|
||||
.unmask = vic_unmask_irq,
|
||||
|
@ -470,7 +470,8 @@ static void ecard_irq_mask(unsigned int irqnr)
|
||||
}
|
||||
}
|
||||
|
||||
static struct irqchip ecard_chip = {
|
||||
static struct irq_chip ecard_chip = {
|
||||
.name = "ECARD",
|
||||
.ack = ecard_irq_mask,
|
||||
.mask = ecard_irq_mask,
|
||||
.unmask = ecard_irq_unmask,
|
||||
|
@ -77,6 +77,7 @@ int show_interrupts(struct seq_file *p, void *v)
|
||||
seq_printf(p, "%3d: ", i);
|
||||
for_each_present_cpu(cpu)
|
||||
seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]);
|
||||
seq_printf(p, " %10s", irq_desc[i].chip->name ? : "-");
|
||||
seq_printf(p, " %s", action->name);
|
||||
for (action = action->next; action; action = action->next)
|
||||
seq_printf(p, ", %s", action->name);
|
||||
|
@ -327,7 +327,8 @@ static int gpio_irq_type(unsigned pin, unsigned type)
|
||||
return (type == IRQT_BOTHEDGE) ? 0 : -EINVAL;
|
||||
}
|
||||
|
||||
static struct irqchip gpio_irqchip = {
|
||||
static struct irq_chip gpio_irqchip = {
|
||||
.name = "GPIO",
|
||||
.mask = gpio_irq_mask,
|
||||
.unmask = gpio_irq_unmask,
|
||||
.set_type = gpio_irq_type,
|
||||
|
@ -114,7 +114,8 @@ void at91_irq_resume(void)
|
||||
#define at91_aic_set_wake NULL
|
||||
#endif
|
||||
|
||||
static struct irqchip at91_aic_chip = {
|
||||
static struct irq_chip at91_aic_chip = {
|
||||
.name = "AIC",
|
||||
.ack = at91_aic_mask_irq,
|
||||
.mask = at91_aic_mask_irq,
|
||||
.unmask = at91_aic_unmask_irq,
|
||||
|
@ -204,13 +204,15 @@ imx_gpiod_demux_handler(unsigned int irq_unused, struct irqdesc *desc,
|
||||
imx_gpio_handler(mask, irq, desc, regs);
|
||||
}
|
||||
|
||||
static struct irqchip imx_internal_chip = {
|
||||
static struct irq_chip imx_internal_chip = {
|
||||
.name = "MPU",
|
||||
.ack = imx_mask_irq,
|
||||
.mask = imx_mask_irq,
|
||||
.unmask = imx_unmask_irq,
|
||||
};
|
||||
|
||||
static struct irqchip imx_gpio_chip = {
|
||||
static struct irq_chip imx_gpio_chip = {
|
||||
.name = "GPIO",
|
||||
.ack = imx_gpio_ack_irq,
|
||||
.mask = imx_gpio_mask_irq,
|
||||
.unmask = imx_gpio_unmask_irq,
|
||||
|
@ -161,7 +161,8 @@ static void sc_unmask_irq(unsigned int irq)
|
||||
writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_SET);
|
||||
}
|
||||
|
||||
static struct irqchip sc_chip = {
|
||||
static struct irq_chip sc_chip = {
|
||||
.name = "SC",
|
||||
.ack = sc_mask_irq,
|
||||
.mask = sc_mask_irq,
|
||||
.unmask = sc_unmask_irq,
|
||||
|
@ -156,7 +156,8 @@ static void cic_unmask_irq(unsigned int irq)
|
||||
cic_writel(1 << irq, INTCP_VA_CIC_BASE + IRQ_ENABLE_SET);
|
||||
}
|
||||
|
||||
static struct irqchip cic_chip = {
|
||||
static struct irq_chip cic_chip = {
|
||||
.name = "CIC",
|
||||
.ack = cic_mask_irq,
|
||||
.mask = cic_mask_irq,
|
||||
.unmask = cic_unmask_irq,
|
||||
@ -174,7 +175,8 @@ static void pic_unmask_irq(unsigned int irq)
|
||||
pic_writel(1 << irq, INTCP_VA_PIC_BASE + IRQ_ENABLE_SET);
|
||||
}
|
||||
|
||||
static struct irqchip pic_chip = {
|
||||
static struct irq_chip pic_chip = {
|
||||
.name = "PIC",
|
||||
.ack = pic_mask_irq,
|
||||
.mask = pic_mask_irq,
|
||||
.unmask = pic_unmask_irq,
|
||||
@ -192,7 +194,8 @@ static void sic_unmask_irq(unsigned int irq)
|
||||
sic_writel(1 << irq, INTCP_VA_SIC_BASE + IRQ_ENABLE_SET);
|
||||
}
|
||||
|
||||
static struct irqchip sic_chip = {
|
||||
static struct irq_chip sic_chip = {
|
||||
.name = "SIC",
|
||||
.ack = sic_mask_irq,
|
||||
.mask = sic_mask_irq,
|
||||
.unmask = sic_unmask_irq,
|
||||
|
@ -52,7 +52,8 @@ iop321_irq_unmask (unsigned int irq)
|
||||
intctl_write(iop321_mask);
|
||||
}
|
||||
|
||||
struct irqchip ext_chip = {
|
||||
struct irq_chip ext_chip = {
|
||||
.name = "IOP",
|
||||
.ack = iop321_irq_mask,
|
||||
.mask = iop321_irq_mask,
|
||||
.unmask = iop321_irq_unmask,
|
||||
|
@ -77,13 +77,15 @@ iop331_irq_unmask2(unsigned int irq)
|
||||
intctl_write1(iop331_mask1);
|
||||
}
|
||||
|
||||
struct irqchip iop331_irqchip1 = {
|
||||
struct irq_chip iop331_irqchip1 = {
|
||||
.name = "IOP-1",
|
||||
.ack = iop331_irq_mask1,
|
||||
.mask = iop331_irq_mask1,
|
||||
.unmask = iop331_irq_unmask1,
|
||||
};
|
||||
|
||||
struct irqchip iop331_irqchip2 = {
|
||||
struct irq_chip iop331_irqchip2 = {
|
||||
.name = "IOP-2",
|
||||
.ack = iop331_irq_mask2,
|
||||
.mask = iop331_irq_mask2,
|
||||
.unmask = iop331_irq_unmask2,
|
||||
|
@ -63,7 +63,8 @@ static void kev7a400_unmask_cpld_irq (u32 irq)
|
||||
CPLD_WR_PB_INT_MASK = CPLD_IRQ_mask;
|
||||
}
|
||||
|
||||
static struct irqchip kev7a400_cpld_chip = {
|
||||
static struct irq_chip kev7a400_cpld_chip = {
|
||||
.name = "CPLD",
|
||||
.ack = kev7a400_ack_cpld_irq,
|
||||
.mask = kev7a400_mask_cpld_irq,
|
||||
.unmask = kev7a400_unmask_cpld_irq,
|
||||
|
@ -200,7 +200,8 @@ static void lh7a40x_unmask_cpld_irq (u32 irq)
|
||||
}
|
||||
}
|
||||
|
||||
static struct irqchip lpd7a40x_cpld_chip = {
|
||||
static struct irq_chip lpd7a40x_cpld_chip = {
|
||||
.name = "CPLD",
|
||||
.ack = lh7a40x_ack_cpld_irq,
|
||||
.mask = lh7a40x_mask_cpld_irq,
|
||||
.unmask = lh7a40x_unmask_cpld_irq,
|
||||
|
@ -43,7 +43,8 @@ lh7a400_unmask_cpld_irq (u32 irq)
|
||||
}
|
||||
|
||||
static struct
|
||||
irqchip lh7a400_cpld_chip = {
|
||||
irq_chip lh7a400_cpld_chip = {
|
||||
.name = "CPLD",
|
||||
.ack = lh7a400_ack_cpld_irq,
|
||||
.mask = lh7a400_mask_cpld_irq,
|
||||
.unmask = lh7a400_unmask_cpld_irq,
|
||||
|
@ -38,13 +38,15 @@ static void lh7a400_ack_gpio_irq (u32 irq)
|
||||
INTC_INTENC = (1 << irq);
|
||||
}
|
||||
|
||||
static struct irqchip lh7a400_internal_chip = {
|
||||
static struct irq_chip lh7a400_internal_chip = {
|
||||
.name = "MPU",
|
||||
.ack = lh7a400_mask_irq, /* Level triggering -> mask is ack */
|
||||
.mask = lh7a400_mask_irq,
|
||||
.unmask = lh7a400_unmask_irq,
|
||||
};
|
||||
|
||||
static struct irqchip lh7a400_gpio_chip = {
|
||||
static struct irq_chip lh7a400_gpio_chip = {
|
||||
.name = "GPIO",
|
||||
.ack = lh7a400_ack_gpio_irq,
|
||||
.mask = lh7a400_mask_irq,
|
||||
.unmask = lh7a400_unmask_irq,
|
||||
|
@ -76,25 +76,29 @@ static void lh7a404_vic2_ack_gpio_irq (u32 irq)
|
||||
VIC2_INTENCLR = (1 << irq);
|
||||
}
|
||||
|
||||
static struct irqchip lh7a404_vic1_chip = {
|
||||
static struct irq_chip lh7a404_vic1_chip = {
|
||||
.name = "VIC1",
|
||||
.ack = lh7a404_vic1_mask_irq, /* Because level-triggered */
|
||||
.mask = lh7a404_vic1_mask_irq,
|
||||
.unmask = lh7a404_vic1_unmask_irq,
|
||||
};
|
||||
|
||||
static struct irqchip lh7a404_vic2_chip = {
|
||||
static struct irq_chip lh7a404_vic2_chip = {
|
||||
.name = "VIC2",
|
||||
.ack = lh7a404_vic2_mask_irq, /* Because level-triggered */
|
||||
.mask = lh7a404_vic2_mask_irq,
|
||||
.unmask = lh7a404_vic2_unmask_irq,
|
||||
};
|
||||
|
||||
static struct irqchip lh7a404_gpio_vic1_chip = {
|
||||
static struct irq_chip lh7a404_gpio_vic1_chip = {
|
||||
.name = "GPIO-VIC1",
|
||||
.ack = lh7a404_vic1_ack_gpio_irq,
|
||||
.mask = lh7a404_vic1_mask_irq,
|
||||
.unmask = lh7a404_vic1_unmask_irq,
|
||||
};
|
||||
|
||||
static struct irqchip lh7a404_gpio_vic2_chip = {
|
||||
static struct irq_chip lh7a404_gpio_vic2_chip = {
|
||||
.name = "GPIO-VIC2",
|
||||
.ack = lh7a404_vic2_ack_gpio_irq,
|
||||
.mask = lh7a404_vic2_mask_irq,
|
||||
.unmask = lh7a404_vic2_unmask_irq,
|
||||
|
@ -50,7 +50,8 @@ static void lh7a40x_unmask_cpld_irq (u32 irq)
|
||||
}
|
||||
}
|
||||
|
||||
static struct irqchip lh7a40x_cpld_chip = {
|
||||
static struct irq_chip lh7a40x_cpld_chip = {
|
||||
.name = "CPLD",
|
||||
.ack = lh7a40x_ack_cpld_irq,
|
||||
.mask = lh7a40x_mask_cpld_irq,
|
||||
.unmask = lh7a40x_unmask_cpld_irq,
|
||||
|
@ -106,14 +106,16 @@ void innovator_fpga_IRQ_demux(unsigned int irq, struct irqdesc *desc,
|
||||
}
|
||||
}
|
||||
|
||||
static struct irqchip omap_fpga_irq_ack = {
|
||||
static struct irq_chip omap_fpga_irq_ack = {
|
||||
.name = "FPGA-ack",
|
||||
.ack = fpga_mask_ack_irq,
|
||||
.mask = fpga_mask_irq,
|
||||
.unmask = fpga_unmask_irq,
|
||||
};
|
||||
|
||||
|
||||
static struct irqchip omap_fpga_irq = {
|
||||
static struct irq_chip omap_fpga_irq = {
|
||||
.name = "FPGA",
|
||||
.ack = fpga_ack_irq,
|
||||
.mask = fpga_mask_irq,
|
||||
.unmask = fpga_unmask_irq,
|
||||
|
@ -168,7 +168,8 @@ static struct omap_irq_bank omap1610_irq_banks[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct irqchip omap_irq_chip = {
|
||||
static struct irq_chip omap_irq_chip = {
|
||||
.name = "MPU",
|
||||
.ack = omap_mask_ack_irq,
|
||||
.mask = omap_mask_irq,
|
||||
.unmask = omap_unmask_irq,
|
||||
|
@ -94,7 +94,8 @@ static void omap_mask_ack_irq(unsigned int irq)
|
||||
omap_ack_irq(irq);
|
||||
}
|
||||
|
||||
static struct irqchip omap_irq_chip = {
|
||||
static struct irq_chip omap_irq_chip = {
|
||||
.name = "INTC",
|
||||
.ack = omap_mask_ack_irq,
|
||||
.mask = omap_mask_irq,
|
||||
.unmask = omap_unmask_irq,
|
||||
|
@ -39,7 +39,8 @@ static void pxa_unmask_low_irq(unsigned int irq)
|
||||
ICMR |= (1 << (irq + PXA_IRQ_SKIP));
|
||||
}
|
||||
|
||||
static struct irqchip pxa_internal_chip_low = {
|
||||
static struct irq_chip pxa_internal_chip_low = {
|
||||
.name = "SC",
|
||||
.ack = pxa_mask_low_irq,
|
||||
.mask = pxa_mask_low_irq,
|
||||
.unmask = pxa_unmask_low_irq,
|
||||
@ -61,7 +62,8 @@ static void pxa_unmask_high_irq(unsigned int irq)
|
||||
ICMR2 |= (1 << (irq - 32 + PXA_IRQ_SKIP));
|
||||
}
|
||||
|
||||
static struct irqchip pxa_internal_chip_high = {
|
||||
static struct irq_chip pxa_internal_chip_high = {
|
||||
.name = "SC-hi",
|
||||
.ack = pxa_mask_high_irq,
|
||||
.mask = pxa_mask_high_irq,
|
||||
.unmask = pxa_unmask_high_irq,
|
||||
@ -129,7 +131,8 @@ static void pxa_ack_low_gpio(unsigned int irq)
|
||||
GEDR0 = (1 << (irq - IRQ_GPIO0));
|
||||
}
|
||||
|
||||
static struct irqchip pxa_low_gpio_chip = {
|
||||
static struct irq_chip pxa_low_gpio_chip = {
|
||||
.name = "GPIO-l",
|
||||
.ack = pxa_ack_low_gpio,
|
||||
.mask = pxa_mask_low_irq,
|
||||
.unmask = pxa_unmask_low_irq,
|
||||
@ -237,7 +240,8 @@ static void pxa_unmask_muxed_gpio(unsigned int irq)
|
||||
GFER(gpio) = GPIO_IRQ_falling_edge[idx] & GPIO_IRQ_mask[idx];
|
||||
}
|
||||
|
||||
static struct irqchip pxa_muxed_gpio_chip = {
|
||||
static struct irq_chip pxa_muxed_gpio_chip = {
|
||||
.name = "GPIO",
|
||||
.ack = pxa_ack_muxed_gpio,
|
||||
.mask = pxa_mask_muxed_gpio,
|
||||
.unmask = pxa_unmask_muxed_gpio,
|
||||
|
@ -68,7 +68,8 @@ static void lpd270_unmask_irq(unsigned int irq)
|
||||
__raw_writew(lpd270_irq_enabled, LPD270_INT_MASK);
|
||||
}
|
||||
|
||||
static struct irqchip lpd270_irq_chip = {
|
||||
static struct irq_chip lpd270_irq_chip = {
|
||||
.name = "CPLD",
|
||||
.ack = lpd270_mask_irq,
|
||||
.mask = lpd270_mask_irq,
|
||||
.unmask = lpd270_unmask_irq,
|
||||
|
@ -78,7 +78,8 @@ static void lubbock_unmask_irq(unsigned int irq)
|
||||
LUB_IRQ_MASK_EN = (lubbock_irq_enabled |= (1 << lubbock_irq));
|
||||
}
|
||||
|
||||
static struct irqchip lubbock_irq_chip = {
|
||||
static struct irq_chip lubbock_irq_chip = {
|
||||
.name = "FPGA",
|
||||
.ack = lubbock_mask_irq,
|
||||
.mask = lubbock_mask_irq,
|
||||
.unmask = lubbock_unmask_irq,
|
||||
|
@ -64,7 +64,8 @@ static void mainstone_unmask_irq(unsigned int irq)
|
||||
MST_INTMSKENA = (mainstone_irq_enabled |= (1 << mainstone_irq));
|
||||
}
|
||||
|
||||
static struct irqchip mainstone_irq_chip = {
|
||||
static struct irq_chip mainstone_irq_chip = {
|
||||
.name = "FPGA",
|
||||
.ack = mainstone_mask_irq,
|
||||
.mask = mainstone_mask_irq,
|
||||
.unmask = mainstone_unmask_irq,
|
||||
|
@ -95,7 +95,8 @@ static int sa1100_low_gpio_wake(unsigned int irq, unsigned int on)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irqchip sa1100_low_gpio_chip = {
|
||||
static struct irq_chip sa1100_low_gpio_chip = {
|
||||
.name = "GPIO-l",
|
||||
.ack = sa1100_low_gpio_ack,
|
||||
.mask = sa1100_low_gpio_mask,
|
||||
.unmask = sa1100_low_gpio_unmask,
|
||||
@ -178,7 +179,8 @@ static int sa1100_high_gpio_wake(unsigned int irq, unsigned int on)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irqchip sa1100_high_gpio_chip = {
|
||||
static struct irq_chip sa1100_high_gpio_chip = {
|
||||
.name = "GPIO-h",
|
||||
.ack = sa1100_high_gpio_ack,
|
||||
.mask = sa1100_high_gpio_mask,
|
||||
.unmask = sa1100_high_gpio_unmask,
|
||||
@ -215,7 +217,8 @@ static int sa1100_set_wake(unsigned int irq, unsigned int on)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static struct irqchip sa1100_normal_chip = {
|
||||
static struct irq_chip sa1100_normal_chip = {
|
||||
.name = "SC",
|
||||
.ack = sa1100_mask_irq,
|
||||
.mask = sa1100_mask_irq,
|
||||
.unmask = sa1100_unmask_irq,
|
||||
|
@ -69,7 +69,8 @@ static irqreturn_t bogus_int(int irq, void *dev_id, struct pt_regs *regs)
|
||||
|
||||
static struct irqaction cascade;
|
||||
|
||||
static struct irqchip fb_chip = {
|
||||
static struct irq_chip fb_chip = {
|
||||
.name = "XT-PIC",
|
||||
.ack = shark_ack_8259A_irq,
|
||||
.mask = shark_disable_8259A_irq,
|
||||
.unmask = shark_enable_8259A_irq,
|
||||
|
@ -69,7 +69,8 @@ static void sic_unmask_irq(unsigned int irq)
|
||||
writel(1 << irq, VA_SIC_BASE + SIC_IRQ_ENABLE_SET);
|
||||
}
|
||||
|
||||
static struct irqchip sic_chip = {
|
||||
static struct irq_chip sic_chip = {
|
||||
.name = "SIC",
|
||||
.ack = sic_mask_irq,
|
||||
.mask = sic_mask_irq,
|
||||
.unmask = sic_unmask_irq,
|
||||
|
@ -944,7 +944,8 @@ static void mpuio_unmask_irq(unsigned int irq)
|
||||
_set_gpio_irqenable(bank, gpio, 1);
|
||||
}
|
||||
|
||||
static struct irqchip gpio_irq_chip = {
|
||||
static struct irq_chip gpio_irq_chip = {
|
||||
.name = "GPIO",
|
||||
.ack = gpio_ack_irq,
|
||||
.mask = gpio_mask_irq,
|
||||
.unmask = gpio_unmask_irq,
|
||||
@ -952,10 +953,11 @@ static struct irqchip gpio_irq_chip = {
|
||||
.set_wake = gpio_wake_enable,
|
||||
};
|
||||
|
||||
static struct irqchip mpuio_irq_chip = {
|
||||
static struct irq_chip mpuio_irq_chip = {
|
||||
.name = "MPUIO",
|
||||
.ack = mpuio_ack_irq,
|
||||
.mask = mpuio_mask_irq,
|
||||
.unmask = mpuio_unmask_irq
|
||||
.unmask = mpuio_unmask_irq
|
||||
};
|
||||
|
||||
static int initialized;
|
||||
|
@ -151,7 +151,7 @@ static void
|
||||
simscsi_sg_readwrite (struct scsi_cmnd *sc, int mode, unsigned long offset)
|
||||
{
|
||||
int list_len = sc->use_sg;
|
||||
struct scatterlist *sl = (struct scatterlist *)sc->buffer;
|
||||
struct scatterlist *sl = (struct scatterlist *)sc->request_buffer;
|
||||
struct disk_stat stat;
|
||||
struct disk_req req;
|
||||
|
||||
@ -244,7 +244,7 @@ static void simscsi_fillresult(struct scsi_cmnd *sc, char *buf, unsigned len)
|
||||
|
||||
if (scatterlen == 0)
|
||||
memcpy(sc->request_buffer, buf, len);
|
||||
else for (slp = (struct scatterlist *)sc->buffer; scatterlen-- > 0 && len > 0; slp++) {
|
||||
else for (slp = (struct scatterlist *)sc->request_buffer; scatterlen-- > 0 && len > 0; slp++) {
|
||||
unsigned thislen = min(len, slp->length);
|
||||
|
||||
memcpy(page_address(slp->page) + slp->offset, buf, thislen);
|
||||
|
@ -632,7 +632,7 @@ kern_memory_descriptor (unsigned long phys_addr)
|
||||
if (phys_addr - md->start < (md->num_pages << EFI_PAGE_SHIFT))
|
||||
return md;
|
||||
}
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static efi_memory_desc_t *
|
||||
@ -652,7 +652,7 @@ efi_memory_descriptor (unsigned long phys_addr)
|
||||
if (phys_addr - md->phys_addr < (md->num_pages << EFI_PAGE_SHIFT))
|
||||
return md;
|
||||
}
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
u32
|
||||
@ -923,7 +923,7 @@ find_memmap_space (void)
|
||||
void
|
||||
efi_memmap_init(unsigned long *s, unsigned long *e)
|
||||
{
|
||||
struct kern_memdesc *k, *prev = 0;
|
||||
struct kern_memdesc *k, *prev = NULL;
|
||||
u64 contig_low=0, contig_high=0;
|
||||
u64 as, ae, lim;
|
||||
void *efi_map_start, *efi_map_end, *p, *q;
|
||||
|
@ -853,7 +853,6 @@ END(__ia64_init_fpu)
|
||||
*/
|
||||
GLOBAL_ENTRY(ia64_switch_mode_phys)
|
||||
{
|
||||
alloc r2=ar.pfs,0,0,0,0
|
||||
rsm psr.i | psr.ic // disable interrupts and interrupt collection
|
||||
mov r15=ip
|
||||
}
|
||||
@ -902,7 +901,6 @@ END(ia64_switch_mode_phys)
|
||||
*/
|
||||
GLOBAL_ENTRY(ia64_switch_mode_virt)
|
||||
{
|
||||
alloc r2=ar.pfs,0,0,0,0
|
||||
rsm psr.i | psr.ic // disable interrupts and interrupt collection
|
||||
mov r15=ip
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ EXPORT_SYMBOL(__udivdi3);
|
||||
EXPORT_SYMBOL(__moddi3);
|
||||
EXPORT_SYMBOL(__umoddi3);
|
||||
|
||||
#if defined(CONFIG_MD_RAID5) || defined(CONFIG_MD_RAID5_MODULE)
|
||||
#if defined(CONFIG_MD_RAID456) || defined(CONFIG_MD_RAID456_MODULE)
|
||||
extern void xor_ia64_2(void);
|
||||
extern void xor_ia64_3(void);
|
||||
extern void xor_ia64_4(void);
|
||||
|
@ -217,12 +217,7 @@ GLOBAL_ENTRY(ia64_pal_call_phys_stacked)
|
||||
.body
|
||||
;;
|
||||
ld8 loc2 = [loc2] // loc2 <- entry point
|
||||
mov out0 = in0 // first argument
|
||||
mov out1 = in1 // copy arg2
|
||||
mov out2 = in2 // copy arg3
|
||||
mov out3 = in3 // copy arg3
|
||||
;;
|
||||
mov loc3 = psr // save psr
|
||||
mov loc3 = psr // save psr
|
||||
;;
|
||||
mov loc4=ar.rsc // save RSE configuration
|
||||
dep.z loc2=loc2,0,61 // convert pal entry point to physical
|
||||
@ -236,18 +231,23 @@ GLOBAL_ENTRY(ia64_pal_call_phys_stacked)
|
||||
;;
|
||||
andcm r16=loc3,r16 // removes bits to clear from psr
|
||||
br.call.sptk.many rp=ia64_switch_mode_phys
|
||||
.ret6:
|
||||
|
||||
mov out0 = in0 // first argument
|
||||
mov out1 = in1 // copy arg2
|
||||
mov out2 = in2 // copy arg3
|
||||
mov out3 = in3 // copy arg3
|
||||
mov loc5 = r19
|
||||
mov loc6 = r20
|
||||
|
||||
br.call.sptk.many rp=b7 // now make the call
|
||||
.ret7:
|
||||
|
||||
mov ar.rsc=0 // put RSE in enforced lazy, LE mode
|
||||
mov r16=loc3 // r16= original psr
|
||||
mov r19=loc5
|
||||
mov r20=loc6
|
||||
br.call.sptk.many rp=ia64_switch_mode_virt // return to virtual mode
|
||||
|
||||
.ret8: mov psr.l = loc3 // restore init PSR
|
||||
mov psr.l = loc3 // restore init PSR
|
||||
mov ar.pfs = loc1
|
||||
mov rp = loc0
|
||||
;;
|
||||
|
@ -566,29 +566,23 @@ version_info(char *page)
|
||||
pal_version_u_t min_ver, cur_ver;
|
||||
char *p = page;
|
||||
|
||||
/* The PAL_VERSION call is advertised as being able to support
|
||||
* both physical and virtual mode calls. This seems to be a documentation
|
||||
* bug rather than firmware bug. In fact, it does only support physical mode.
|
||||
* So now the code reflects this fact and the pal_version() has been updated
|
||||
* accordingly.
|
||||
*/
|
||||
if (ia64_pal_version(&min_ver, &cur_ver) != 0) return 0;
|
||||
if (ia64_pal_version(&min_ver, &cur_ver) != 0)
|
||||
return 0;
|
||||
|
||||
p += sprintf(p,
|
||||
"PAL_vendor : 0x%02x (min=0x%02x)\n"
|
||||
"PAL_A : %x.%x.%x (min=%x.%x.%x)\n"
|
||||
"PAL_B : %x.%x.%x (min=%x.%x.%x)\n",
|
||||
cur_ver.pal_version_s.pv_pal_vendor, min_ver.pal_version_s.pv_pal_vendor,
|
||||
|
||||
cur_ver.pal_version_s.pv_pal_a_model>>4,
|
||||
cur_ver.pal_version_s.pv_pal_a_model&0xf, cur_ver.pal_version_s.pv_pal_a_rev,
|
||||
min_ver.pal_version_s.pv_pal_a_model>>4,
|
||||
min_ver.pal_version_s.pv_pal_a_model&0xf, min_ver.pal_version_s.pv_pal_a_rev,
|
||||
|
||||
cur_ver.pal_version_s.pv_pal_b_model>>4,
|
||||
cur_ver.pal_version_s.pv_pal_b_model&0xf, cur_ver.pal_version_s.pv_pal_b_rev,
|
||||
min_ver.pal_version_s.pv_pal_b_model>>4,
|
||||
min_ver.pal_version_s.pv_pal_b_model&0xf, min_ver.pal_version_s.pv_pal_b_rev);
|
||||
"PAL_A : %02x.%02x (min=%02x.%02x)\n"
|
||||
"PAL_B : %02x.%02x (min=%02x.%02x)\n",
|
||||
cur_ver.pal_version_s.pv_pal_vendor,
|
||||
min_ver.pal_version_s.pv_pal_vendor,
|
||||
cur_ver.pal_version_s.pv_pal_a_model,
|
||||
cur_ver.pal_version_s.pv_pal_a_rev,
|
||||
min_ver.pal_version_s.pv_pal_a_model,
|
||||
min_ver.pal_version_s.pv_pal_a_rev,
|
||||
cur_ver.pal_version_s.pv_pal_b_model,
|
||||
cur_ver.pal_version_s.pv_pal_b_rev,
|
||||
min_ver.pal_version_s.pv_pal_b_model,
|
||||
min_ver.pal_version_s.pv_pal_b_rev);
|
||||
return p - page;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ lib-y := __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \
|
||||
lib-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o
|
||||
lib-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o
|
||||
lib-$(CONFIG_PERFMON) += carta_random.o
|
||||
lib-$(CONFIG_MD_RAID5) += xor.o
|
||||
lib-$(CONFIG_MD_RAID456) += xor.o
|
||||
|
||||
AFLAGS___divdi3.o =
|
||||
AFLAGS___udivdi3.o = -DUNSIGNED
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#ifdef CONFIG_VIRTUAL_MEM_MAP
|
||||
static unsigned long num_dma_physpages;
|
||||
static unsigned long max_gap;
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -45,9 +46,15 @@ show_mem (void)
|
||||
|
||||
printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
|
||||
i = max_mapnr;
|
||||
while (i-- > 0) {
|
||||
if (!pfn_valid(i))
|
||||
for (i = 0; i < max_mapnr; i++) {
|
||||
if (!pfn_valid(i)) {
|
||||
#ifdef CONFIG_VIRTUAL_MEM_MAP
|
||||
if (max_gap < LARGE_GAP)
|
||||
continue;
|
||||
i = vmemmap_find_next_valid_pfn(0, i) - 1;
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
total++;
|
||||
if (PageReserved(mem_map+i))
|
||||
reserved++;
|
||||
@ -234,7 +241,6 @@ paging_init (void)
|
||||
unsigned long zones_size[MAX_NR_ZONES];
|
||||
#ifdef CONFIG_VIRTUAL_MEM_MAP
|
||||
unsigned long zholes_size[MAX_NR_ZONES];
|
||||
unsigned long max_gap;
|
||||
#endif
|
||||
|
||||
/* initialize mem_map[] */
|
||||
@ -266,7 +272,6 @@ paging_init (void)
|
||||
}
|
||||
}
|
||||
|
||||
max_gap = 0;
|
||||
efi_memmap_walk(find_largest_hole, (u64 *)&max_gap);
|
||||
if (max_gap < LARGE_GAP) {
|
||||
vmem_map = (struct page *) 0;
|
||||
@ -277,7 +282,8 @@ paging_init (void)
|
||||
|
||||
/* allocate virtual_mem_map */
|
||||
|
||||
map_size = PAGE_ALIGN(max_low_pfn * sizeof(struct page));
|
||||
map_size = PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) *
|
||||
sizeof(struct page));
|
||||
vmalloc_end -= map_size;
|
||||
vmem_map = (struct page *) vmalloc_end;
|
||||
efi_memmap_walk(create_mem_map_page_table, NULL);
|
||||
|
@ -534,68 +534,6 @@ void __cpuinit *per_cpu_init(void)
|
||||
}
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
#ifdef CONFIG_VIRTUAL_MEM_MAP
|
||||
static inline int find_next_valid_pfn_for_pgdat(pg_data_t *pgdat, int i)
|
||||
{
|
||||
unsigned long end_address, hole_next_pfn;
|
||||
unsigned long stop_address;
|
||||
|
||||
end_address = (unsigned long) &vmem_map[pgdat->node_start_pfn + i];
|
||||
end_address = PAGE_ALIGN(end_address);
|
||||
|
||||
stop_address = (unsigned long) &vmem_map[
|
||||
pgdat->node_start_pfn + pgdat->node_spanned_pages];
|
||||
|
||||
do {
|
||||
pgd_t *pgd;
|
||||
pud_t *pud;
|
||||
pmd_t *pmd;
|
||||
pte_t *pte;
|
||||
|
||||
pgd = pgd_offset_k(end_address);
|
||||
if (pgd_none(*pgd)) {
|
||||
end_address += PGDIR_SIZE;
|
||||
continue;
|
||||
}
|
||||
|
||||
pud = pud_offset(pgd, end_address);
|
||||
if (pud_none(*pud)) {
|
||||
end_address += PUD_SIZE;
|
||||
continue;
|
||||
}
|
||||
|
||||
pmd = pmd_offset(pud, end_address);
|
||||
if (pmd_none(*pmd)) {
|
||||
end_address += PMD_SIZE;
|
||||
continue;
|
||||
}
|
||||
|
||||
pte = pte_offset_kernel(pmd, end_address);
|
||||
retry_pte:
|
||||
if (pte_none(*pte)) {
|
||||
end_address += PAGE_SIZE;
|
||||
pte++;
|
||||
if ((end_address < stop_address) &&
|
||||
(end_address != ALIGN(end_address, 1UL << PMD_SHIFT)))
|
||||
goto retry_pte;
|
||||
continue;
|
||||
}
|
||||
/* Found next valid vmem_map page */
|
||||
break;
|
||||
} while (end_address < stop_address);
|
||||
|
||||
end_address = min(end_address, stop_address);
|
||||
end_address = end_address - (unsigned long) vmem_map + sizeof(struct page) - 1;
|
||||
hole_next_pfn = end_address / sizeof(struct page);
|
||||
return hole_next_pfn - pgdat->node_start_pfn;
|
||||
}
|
||||
#else
|
||||
static inline int find_next_valid_pfn_for_pgdat(pg_data_t *pgdat, int i)
|
||||
{
|
||||
return i + 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* show_mem - give short summary of memory stats
|
||||
*
|
||||
@ -625,7 +563,8 @@ void show_mem(void)
|
||||
if (pfn_valid(pgdat->node_start_pfn + i))
|
||||
page = pfn_to_page(pgdat->node_start_pfn + i);
|
||||
else {
|
||||
i = find_next_valid_pfn_for_pgdat(pgdat, i) - 1;
|
||||
i = vmemmap_find_next_valid_pfn(pgdat->node_id,
|
||||
i) - 1;
|
||||
continue;
|
||||
}
|
||||
if (PageReserved(page))
|
||||
@ -751,7 +690,8 @@ void __init paging_init(void)
|
||||
efi_memmap_walk(filter_rsvd_memory, count_node_pages);
|
||||
|
||||
#ifdef CONFIG_VIRTUAL_MEM_MAP
|
||||
vmalloc_end -= PAGE_ALIGN(max_low_pfn * sizeof(struct page));
|
||||
vmalloc_end -= PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) *
|
||||
sizeof(struct page));
|
||||
vmem_map = (struct page *) vmalloc_end;
|
||||
efi_memmap_walk(create_mem_map_page_table, NULL);
|
||||
printk("Virtual mem_map starts at 0x%p\n", vmem_map);
|
||||
|
@ -415,6 +415,61 @@ ia64_mmu_init (void *my_cpu_data)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_VIRTUAL_MEM_MAP
|
||||
int vmemmap_find_next_valid_pfn(int node, int i)
|
||||
{
|
||||
unsigned long end_address, hole_next_pfn;
|
||||
unsigned long stop_address;
|
||||
pg_data_t *pgdat = NODE_DATA(node);
|
||||
|
||||
end_address = (unsigned long) &vmem_map[pgdat->node_start_pfn + i];
|
||||
end_address = PAGE_ALIGN(end_address);
|
||||
|
||||
stop_address = (unsigned long) &vmem_map[
|
||||
pgdat->node_start_pfn + pgdat->node_spanned_pages];
|
||||
|
||||
do {
|
||||
pgd_t *pgd;
|
||||
pud_t *pud;
|
||||
pmd_t *pmd;
|
||||
pte_t *pte;
|
||||
|
||||
pgd = pgd_offset_k(end_address);
|
||||
if (pgd_none(*pgd)) {
|
||||
end_address += PGDIR_SIZE;
|
||||
continue;
|
||||
}
|
||||
|
||||
pud = pud_offset(pgd, end_address);
|
||||
if (pud_none(*pud)) {
|
||||
end_address += PUD_SIZE;
|
||||
continue;
|
||||
}
|
||||
|
||||
pmd = pmd_offset(pud, end_address);
|
||||
if (pmd_none(*pmd)) {
|
||||
end_address += PMD_SIZE;
|
||||
continue;
|
||||
}
|
||||
|
||||
pte = pte_offset_kernel(pmd, end_address);
|
||||
retry_pte:
|
||||
if (pte_none(*pte)) {
|
||||
end_address += PAGE_SIZE;
|
||||
pte++;
|
||||
if ((end_address < stop_address) &&
|
||||
(end_address != ALIGN(end_address, 1UL << PMD_SHIFT)))
|
||||
goto retry_pte;
|
||||
continue;
|
||||
}
|
||||
/* Found next valid vmem_map page */
|
||||
break;
|
||||
} while (end_address < stop_address);
|
||||
|
||||
end_address = min(end_address, stop_address);
|
||||
end_address = end_address - (unsigned long) vmem_map + sizeof(struct page) - 1;
|
||||
hole_next_pfn = end_address / sizeof(struct page);
|
||||
return hole_next_pfn - pgdat->node_start_pfn;
|
||||
}
|
||||
|
||||
int __init
|
||||
create_mem_map_page_table (u64 start, u64 end, void *arg)
|
||||
|
@ -32,7 +32,7 @@ ioremap (unsigned long offset, unsigned long size)
|
||||
*/
|
||||
attr = kern_mem_attribute(offset, size);
|
||||
if (attr & EFI_MEMORY_WB)
|
||||
return phys_to_virt(offset);
|
||||
return (void __iomem *) phys_to_virt(offset);
|
||||
else if (attr & EFI_MEMORY_UC)
|
||||
return __ioremap(offset, size);
|
||||
|
||||
@ -43,7 +43,7 @@ ioremap (unsigned long offset, unsigned long size)
|
||||
gran_base = GRANULEROUNDDOWN(offset);
|
||||
gran_size = GRANULEROUNDUP(offset + size) - gran_base;
|
||||
if (efi_mem_attribute(gran_base, gran_size) & EFI_MEMORY_WB)
|
||||
return phys_to_virt(offset);
|
||||
return (void __iomem *) phys_to_virt(offset);
|
||||
|
||||
return __ioremap(offset, size);
|
||||
}
|
||||
@ -53,7 +53,7 @@ void __iomem *
|
||||
ioremap_nocache (unsigned long offset, unsigned long size)
|
||||
{
|
||||
if (kern_mem_attribute(offset, size) & EFI_MEMORY_WB)
|
||||
return 0;
|
||||
return NULL;
|
||||
|
||||
return __ioremap(offset, size);
|
||||
}
|
||||
|
@ -480,7 +480,7 @@ xpc_activating(void *__partid)
|
||||
partid_t partid = (u64) __partid;
|
||||
struct xpc_partition *part = &xpc_partitions[partid];
|
||||
unsigned long irq_flags;
|
||||
struct sched_param param = { sched_priority: MAX_RT_PRIO - 1 };
|
||||
struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
|
||||
int ret;
|
||||
|
||||
|
||||
|
@ -74,7 +74,7 @@ tioce_mmr_war_pre(struct tioce_kernel *kern, void *mmr_addr)
|
||||
else
|
||||
mmr_war_offset = 0x158;
|
||||
|
||||
readq_relaxed((void *)(mmr_base + mmr_war_offset));
|
||||
readq_relaxed((void __iomem *)(mmr_base + mmr_war_offset));
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,8 +92,8 @@ tioce_mmr_war_post(struct tioce_kernel *kern, void *mmr_addr)
|
||||
|
||||
if (mmr_offset < 0x45000) {
|
||||
if (mmr_offset == 0x100)
|
||||
readq_relaxed((void *)(mmr_base + 0x38));
|
||||
readq_relaxed((void *)(mmr_base + 0xb050));
|
||||
readq_relaxed((void __iomem *)(mmr_base + 0x38));
|
||||
readq_relaxed((void __iomem *)(mmr_base + 0xb050));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -513,6 +513,7 @@ END(stub_rt_sigreturn)
|
||||
swapgs
|
||||
1: incl %gs:pda_irqcount # RED-PEN should check preempt count
|
||||
cmoveq %gs:pda_irqstackptr,%rsp
|
||||
push %rbp # backlink for old unwinder
|
||||
/*
|
||||
* We entered an interrupt context - irqs are off:
|
||||
*/
|
||||
@ -1139,18 +1140,21 @@ ENTRY(machine_check)
|
||||
END(machine_check)
|
||||
#endif
|
||||
|
||||
/* Call softirq on interrupt stack. Interrupts are off. */
|
||||
ENTRY(call_softirq)
|
||||
CFI_STARTPROC
|
||||
movq %gs:pda_irqstackptr,%rax
|
||||
movq %rsp,%rdx
|
||||
CFI_DEF_CFA_REGISTER rdx
|
||||
push %rbp
|
||||
CFI_ADJUST_CFA_OFFSET 8
|
||||
CFI_REL_OFFSET rbp,0
|
||||
mov %rsp,%rbp
|
||||
CFI_DEF_CFA_REGISTER rbp
|
||||
incl %gs:pda_irqcount
|
||||
cmove %rax,%rsp
|
||||
pushq %rdx
|
||||
/*todo CFI_DEF_CFA_EXPRESSION ...*/
|
||||
cmove %gs:pda_irqstackptr,%rsp
|
||||
push %rbp # backlink for old unwinder
|
||||
call __do_softirq
|
||||
popq %rsp
|
||||
leaveq
|
||||
CFI_DEF_CFA_REGISTER rsp
|
||||
CFI_ADJUST_CFA_OFFSET -8
|
||||
decl %gs:pda_irqcount
|
||||
ret
|
||||
CFI_ENDPROC
|
||||
|
@ -92,5 +92,7 @@ void __init no_iommu_init(void)
|
||||
{
|
||||
if (dma_ops)
|
||||
return;
|
||||
|
||||
force_iommu = 0; /* no HW IOMMU */
|
||||
dma_ops = &nommu_dma_ops;
|
||||
}
|
||||
|
@ -58,8 +58,8 @@ struct dock_dependent_device {
|
||||
};
|
||||
|
||||
#define DOCK_DOCKING 0x00000001
|
||||
#define DOCK_EVENT KOBJ_DOCK
|
||||
#define UNDOCK_EVENT KOBJ_UNDOCK
|
||||
#define DOCK_EVENT 3
|
||||
#define UNDOCK_EVENT 2
|
||||
|
||||
static struct dock_station *dock_station;
|
||||
|
||||
@ -322,11 +322,10 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event)
|
||||
|
||||
static void dock_event(struct dock_station *ds, u32 event, int num)
|
||||
{
|
||||
struct acpi_device *device;
|
||||
|
||||
device = dock_create_acpi_device(ds->handle);
|
||||
if (device)
|
||||
kobject_uevent(&device->kobj, num);
|
||||
/*
|
||||
* we don't do events until someone tells me that
|
||||
* they would like to have them.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -374,7 +374,12 @@ scdrv_init(void)
|
||||
struct sysctl_data_s *scd;
|
||||
void *salbuf;
|
||||
dev_t first_dev, dev;
|
||||
nasid_t event_nasid = ia64_sn_get_console_nasid();
|
||||
nasid_t event_nasid;
|
||||
|
||||
if (!ia64_platform_is("sn2"))
|
||||
return -ENODEV;
|
||||
|
||||
event_nasid = ia64_sn_get_console_nasid();
|
||||
|
||||
if (alloc_chrdev_region(&first_dev, 0, num_cnodes,
|
||||
SYSCTL_BASENAME) < 0) {
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <net/arp.h>
|
||||
#include <net/neighbour.h>
|
||||
#include <net/route.h>
|
||||
#include <net/netevent.h>
|
||||
#include <rdma/ib_addr.h>
|
||||
|
||||
MODULE_AUTHOR("Sean Hefty");
|
||||
@ -326,25 +327,22 @@ void rdma_addr_cancel(struct rdma_dev_addr *addr)
|
||||
}
|
||||
EXPORT_SYMBOL(rdma_addr_cancel);
|
||||
|
||||
static int addr_arp_recv(struct sk_buff *skb, struct net_device *dev,
|
||||
struct packet_type *pkt, struct net_device *orig_dev)
|
||||
static int netevent_callback(struct notifier_block *self, unsigned long event,
|
||||
void *ctx)
|
||||
{
|
||||
struct arphdr *arp_hdr;
|
||||
if (event == NETEVENT_NEIGH_UPDATE) {
|
||||
struct neighbour *neigh = ctx;
|
||||
|
||||
arp_hdr = (struct arphdr *) skb->nh.raw;
|
||||
|
||||
if (arp_hdr->ar_op == htons(ARPOP_REQUEST) ||
|
||||
arp_hdr->ar_op == htons(ARPOP_REPLY))
|
||||
set_timeout(jiffies);
|
||||
|
||||
kfree_skb(skb);
|
||||
if (neigh->dev->type == ARPHRD_INFINIBAND &&
|
||||
(neigh->nud_state & NUD_VALID)) {
|
||||
set_timeout(jiffies);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct packet_type addr_arp = {
|
||||
.type = __constant_htons(ETH_P_ARP),
|
||||
.func = addr_arp_recv,
|
||||
.af_packet_priv = (void*) 1,
|
||||
static struct notifier_block nb = {
|
||||
.notifier_call = netevent_callback
|
||||
};
|
||||
|
||||
static int addr_init(void)
|
||||
@ -353,13 +351,13 @@ static int addr_init(void)
|
||||
if (!addr_wq)
|
||||
return -ENOMEM;
|
||||
|
||||
dev_add_pack(&addr_arp);
|
||||
register_netevent_notifier(&nb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void addr_cleanup(void)
|
||||
{
|
||||
dev_remove_pack(&addr_arp);
|
||||
unregister_netevent_notifier(&nb);
|
||||
destroy_workqueue(addr_wq);
|
||||
}
|
||||
|
||||
|
@ -975,8 +975,10 @@ int ib_send_cm_req(struct ib_cm_id *cm_id,
|
||||
|
||||
cm_id_priv->timewait_info = cm_create_timewait_info(cm_id_priv->
|
||||
id.local_id);
|
||||
if (IS_ERR(cm_id_priv->timewait_info))
|
||||
if (IS_ERR(cm_id_priv->timewait_info)) {
|
||||
ret = PTR_ERR(cm_id_priv->timewait_info);
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = cm_init_av_by_path(param->primary_path, &cm_id_priv->av);
|
||||
if (ret)
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <linux/kref.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/completion.h>
|
||||
|
||||
#include <rdma/ib_verbs.h>
|
||||
#include <rdma/ib_user_verbs.h>
|
||||
@ -69,6 +70,7 @@
|
||||
|
||||
struct ib_uverbs_device {
|
||||
struct kref ref;
|
||||
struct completion comp;
|
||||
int devnum;
|
||||
struct cdev *dev;
|
||||
struct class_device *class_dev;
|
||||
|
@ -122,7 +122,7 @@ static void ib_uverbs_release_dev(struct kref *ref)
|
||||
struct ib_uverbs_device *dev =
|
||||
container_of(ref, struct ib_uverbs_device, ref);
|
||||
|
||||
kfree(dev);
|
||||
complete(&dev->comp);
|
||||
}
|
||||
|
||||
void ib_uverbs_release_ucq(struct ib_uverbs_file *file,
|
||||
@ -740,6 +740,7 @@ static void ib_uverbs_add_one(struct ib_device *device)
|
||||
return;
|
||||
|
||||
kref_init(&uverbs_dev->ref);
|
||||
init_completion(&uverbs_dev->comp);
|
||||
|
||||
spin_lock(&map_lock);
|
||||
uverbs_dev->devnum = find_first_zero_bit(dev_map, IB_UVERBS_MAX_DEVICES);
|
||||
@ -793,6 +794,8 @@ err_cdev:
|
||||
|
||||
err:
|
||||
kref_put(&uverbs_dev->ref, ib_uverbs_release_dev);
|
||||
wait_for_completion(&uverbs_dev->comp);
|
||||
kfree(uverbs_dev);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -812,7 +815,10 @@ static void ib_uverbs_remove_one(struct ib_device *device)
|
||||
spin_unlock(&map_lock);
|
||||
|
||||
clear_bit(uverbs_dev->devnum, dev_map);
|
||||
|
||||
kref_put(&uverbs_dev->ref, ib_uverbs_release_dev);
|
||||
wait_for_completion(&uverbs_dev->comp);
|
||||
kfree(uverbs_dev);
|
||||
}
|
||||
|
||||
static int uverbs_event_get_sb(struct file_system_type *fs_type, int flags,
|
||||
|
@ -108,14 +108,15 @@ void mthca_alloc_cleanup(struct mthca_alloc *alloc)
|
||||
* serialize access to the array.
|
||||
*/
|
||||
|
||||
#define MTHCA_ARRAY_MASK (PAGE_SIZE / sizeof (void *) - 1)
|
||||
|
||||
void *mthca_array_get(struct mthca_array *array, int index)
|
||||
{
|
||||
int p = (index * sizeof (void *)) >> PAGE_SHIFT;
|
||||
|
||||
if (array->page_list[p].page) {
|
||||
int i = index & (PAGE_SIZE / sizeof (void *) - 1);
|
||||
return array->page_list[p].page[i];
|
||||
} else
|
||||
if (array->page_list[p].page)
|
||||
return array->page_list[p].page[index & MTHCA_ARRAY_MASK];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -130,8 +131,7 @@ int mthca_array_set(struct mthca_array *array, int index, void *value)
|
||||
if (!array->page_list[p].page)
|
||||
return -ENOMEM;
|
||||
|
||||
array->page_list[p].page[index & (PAGE_SIZE / sizeof (void *) - 1)] =
|
||||
value;
|
||||
array->page_list[p].page[index & MTHCA_ARRAY_MASK] = value;
|
||||
++array->page_list[p].used;
|
||||
|
||||
return 0;
|
||||
@ -144,7 +144,8 @@ void mthca_array_clear(struct mthca_array *array, int index)
|
||||
if (--array->page_list[p].used == 0) {
|
||||
free_page((unsigned long) array->page_list[p].page);
|
||||
array->page_list[p].page = NULL;
|
||||
}
|
||||
} else
|
||||
array->page_list[p].page[index & MTHCA_ARRAY_MASK] = NULL;
|
||||
|
||||
if (array->page_list[p].used < 0)
|
||||
pr_debug("Array %p index %d page %d with ref count %d < 0\n",
|
||||
|
@ -6,8 +6,7 @@ config INFINIBAND_IPOIB
|
||||
transports IP packets over InfiniBand so you can use your IB
|
||||
device as a fancy NIC.
|
||||
|
||||
The IPoIB protocol is defined by the IETF ipoib working
|
||||
group: <http://www.ietf.org/html.charters/ipoib-charter.html>.
|
||||
See Documentation/infiniband/ipoib.txt for more information
|
||||
|
||||
config INFINIBAND_IPOIB_DEBUG
|
||||
bool "IP-over-InfiniBand debugging" if EMBEDDED
|
||||
|
@ -77,6 +77,14 @@ MODULE_PARM_DESC(topspin_workarounds,
|
||||
|
||||
static const u8 topspin_oui[3] = { 0x00, 0x05, 0xad };
|
||||
|
||||
static int mellanox_workarounds = 1;
|
||||
|
||||
module_param(mellanox_workarounds, int, 0444);
|
||||
MODULE_PARM_DESC(mellanox_workarounds,
|
||||
"Enable workarounds for Mellanox SRP target bugs if != 0");
|
||||
|
||||
static const u8 mellanox_oui[3] = { 0x00, 0x02, 0xc9 };
|
||||
|
||||
static void srp_add_one(struct ib_device *device);
|
||||
static void srp_remove_one(struct ib_device *device);
|
||||
static void srp_completion(struct ib_cq *cq, void *target_ptr);
|
||||
@ -526,8 +534,10 @@ static int srp_reconnect_target(struct srp_target_port *target)
|
||||
while (ib_poll_cq(target->cq, 1, &wc) > 0)
|
||||
; /* nothing */
|
||||
|
||||
spin_lock_irq(target->scsi_host->host_lock);
|
||||
list_for_each_entry_safe(req, tmp, &target->req_queue, list)
|
||||
srp_reset_req(target, req);
|
||||
spin_unlock_irq(target->scsi_host->host_lock);
|
||||
|
||||
target->rx_head = 0;
|
||||
target->tx_head = 0;
|
||||
@ -567,7 +577,7 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int srp_map_fmr(struct srp_device *dev, struct scatterlist *scat,
|
||||
static int srp_map_fmr(struct srp_target_port *target, struct scatterlist *scat,
|
||||
int sg_cnt, struct srp_request *req,
|
||||
struct srp_direct_buf *buf)
|
||||
{
|
||||
@ -577,10 +587,15 @@ static int srp_map_fmr(struct srp_device *dev, struct scatterlist *scat,
|
||||
int page_cnt;
|
||||
int i, j;
|
||||
int ret;
|
||||
struct srp_device *dev = target->srp_host->dev;
|
||||
|
||||
if (!dev->fmr_pool)
|
||||
return -ENODEV;
|
||||
|
||||
if ((sg_dma_address(&scat[0]) & ~dev->fmr_page_mask) &&
|
||||
mellanox_workarounds && !memcmp(&target->ioc_guid, mellanox_oui, 3))
|
||||
return -EINVAL;
|
||||
|
||||
len = page_cnt = 0;
|
||||
for (i = 0; i < sg_cnt; ++i) {
|
||||
if (sg_dma_address(&scat[i]) & ~dev->fmr_page_mask) {
|
||||
@ -683,7 +698,7 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_target_port *target,
|
||||
buf->va = cpu_to_be64(sg_dma_address(scat));
|
||||
buf->key = cpu_to_be32(target->srp_host->dev->mr->rkey);
|
||||
buf->len = cpu_to_be32(sg_dma_len(scat));
|
||||
} else if (srp_map_fmr(target->srp_host->dev, scat, count, req,
|
||||
} else if (srp_map_fmr(target, scat, count, req,
|
||||
(void *) cmd->add_data)) {
|
||||
/*
|
||||
* FMR mapping failed, and the scatterlist has more
|
||||
|
@ -526,7 +526,9 @@ static int dvb_frontend_thread(void *data)
|
||||
fepriv->delay = 3*HZ;
|
||||
fepriv->status = 0;
|
||||
fepriv->wakeup = 0;
|
||||
fepriv->reinitialise = 1;
|
||||
fepriv->reinitialise = 0;
|
||||
|
||||
dvb_frontend_init(fe);
|
||||
|
||||
while (1) {
|
||||
up(&fepriv->sem); /* is locked when we enter the thread... */
|
||||
@ -1013,17 +1015,18 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
|
||||
return ret;
|
||||
|
||||
if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
|
||||
|
||||
/* normal tune mode when opened R/W */
|
||||
fepriv->tune_mode_flags &= ~FE_TUNE_MODE_ONESHOT;
|
||||
fepriv->tone = -1;
|
||||
fepriv->voltage = -1;
|
||||
|
||||
ret = dvb_frontend_start (fe);
|
||||
if (ret)
|
||||
dvb_generic_release (inode, file);
|
||||
|
||||
/* empty event queue */
|
||||
fepriv->events.eventr = fepriv->events.eventw = 0;
|
||||
|
||||
/* normal tune mode when opened R/W */
|
||||
fepriv->tune_mode_flags &= ~FE_TUNE_MODE_ONESHOT;
|
||||
fepriv->tone = -1;
|
||||
fepriv->voltage = -1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -194,11 +194,11 @@ struct dvb_pll_desc dvb_pll_tda665x = {
|
||||
{ 253834000, 36249333, 166667, 0xca, 0x62 /* 011 0 0 0 10 */ },
|
||||
{ 383834000, 36249333, 166667, 0xca, 0xa2 /* 101 0 0 0 10 */ },
|
||||
{ 443834000, 36249333, 166667, 0xca, 0xc2 /* 110 0 0 0 10 */ },
|
||||
{ 444000000, 36249333, 166667, 0xca, 0xc3 /* 110 0 0 0 11 */ },
|
||||
{ 583834000, 36249333, 166667, 0xca, 0x63 /* 011 0 0 0 11 */ },
|
||||
{ 793834000, 36249333, 166667, 0xca, 0xa3 /* 101 0 0 0 11 */ },
|
||||
{ 444834000, 36249333, 166667, 0xca, 0xc3 /* 110 0 0 0 11 */ },
|
||||
{ 861000000, 36249333, 166667, 0xca, 0xe3 /* 111 0 0 0 11 */ },
|
||||
{ 444000000, 36249333, 166667, 0xca, 0xc4 /* 110 0 0 1 00 */ },
|
||||
{ 583834000, 36249333, 166667, 0xca, 0x64 /* 011 0 0 1 00 */ },
|
||||
{ 793834000, 36249333, 166667, 0xca, 0xa4 /* 101 0 0 1 00 */ },
|
||||
{ 444834000, 36249333, 166667, 0xca, 0xc4 /* 110 0 0 1 00 */ },
|
||||
{ 861000000, 36249333, 166667, 0xca, 0xe4 /* 111 0 0 1 00 */ },
|
||||
}
|
||||
};
|
||||
EXPORT_SYMBOL(dvb_pll_tda665x);
|
||||
@ -613,7 +613,21 @@ static struct dvb_tuner_ops dvb_pll_tuner_ops = {
|
||||
|
||||
int dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, struct dvb_pll_desc *desc)
|
||||
{
|
||||
u8 b1 [] = { 0 };
|
||||
struct i2c_msg msg = { .addr = pll_addr, .flags = I2C_M_RD, .buf = b1, .len = 1 };
|
||||
struct dvb_pll_priv *priv = NULL;
|
||||
int ret;
|
||||
|
||||
if (i2c != NULL) {
|
||||
if (fe->ops.i2c_gate_ctrl)
|
||||
fe->ops.i2c_gate_ctrl(fe, 1);
|
||||
|
||||
ret = i2c_transfer (i2c, &msg, 1);
|
||||
if (ret != 1)
|
||||
return -1;
|
||||
if (fe->ops.i2c_gate_ctrl)
|
||||
fe->ops.i2c_gate_ctrl(fe, 0);
|
||||
}
|
||||
|
||||
priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL);
|
||||
if (priv == NULL)
|
||||
|
@ -2203,8 +2203,8 @@ static int frontend_init(struct av7110 *av7110)
|
||||
av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params;
|
||||
|
||||
/* set TDA9819 into DVB mode */
|
||||
saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD)
|
||||
saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF)
|
||||
saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD)
|
||||
saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF)
|
||||
|
||||
/* tuner on this needs a slower i2c bus speed */
|
||||
av7110->dev->i2c_bitrate = SAA7146_I2C_BUS_BIT_RATE_240;
|
||||
|
@ -272,8 +272,8 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh)
|
||||
if (ves1820_writereg(dev, 0x09, 0x0f, 0x60))
|
||||
dprintk(1, "setting band in demodulator failed.\n");
|
||||
} else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) {
|
||||
saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9198 pin9(STD)
|
||||
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9198 pin30(VIF)
|
||||
saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9819 pin9(STD)
|
||||
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9819 pin30(VIF)
|
||||
}
|
||||
if (i2c_writereg(av7110, 0x48, 0x02, 0xd0) != 1)
|
||||
dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num);
|
||||
@ -308,8 +308,8 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh)
|
||||
if (ves1820_writereg(dev, 0x09, 0x0f, 0x20))
|
||||
dprintk(1, "setting band in demodulator failed.\n");
|
||||
} else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) {
|
||||
saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD)
|
||||
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF)
|
||||
saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD)
|
||||
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF)
|
||||
}
|
||||
}
|
||||
|
||||
@ -750,8 +750,8 @@ int av7110_init_analog_module(struct av7110 *av7110)
|
||||
if (ves1820_writereg(av7110->dev, 0x09, 0x0f, 0x20))
|
||||
dprintk(1, "setting band in demodulator failed.\n");
|
||||
} else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) {
|
||||
saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD)
|
||||
saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF)
|
||||
saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD)
|
||||
saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF)
|
||||
}
|
||||
|
||||
/* init the saa7113 */
|
||||
|
@ -1303,6 +1303,9 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio
|
||||
budget_av->budget.dvb_adapter.priv = budget_av;
|
||||
frontend_init(budget_av);
|
||||
ciintf_init(budget_av);
|
||||
|
||||
ttpci_budget_init_hooks(&budget_av->budget);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1101,6 +1101,8 @@ static int budget_ci_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio
|
||||
budget_ci->budget.dvb_adapter.priv = budget_ci;
|
||||
frontend_init(budget_ci);
|
||||
|
||||
ttpci_budget_init_hooks(&budget_ci->budget);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -63,9 +63,6 @@ static int stop_ts_capture(struct budget *budget)
|
||||
{
|
||||
dprintk(2, "budget: %p\n", budget);
|
||||
|
||||
if (--budget->feeding)
|
||||
return budget->feeding;
|
||||
|
||||
saa7146_write(budget->dev, MC1, MASK_20); // DMA3 off
|
||||
SAA7146_IER_DISABLE(budget->dev, MASK_10);
|
||||
return 0;
|
||||
@ -77,8 +74,8 @@ static int start_ts_capture(struct budget *budget)
|
||||
|
||||
dprintk(2, "budget: %p\n", budget);
|
||||
|
||||
if (budget->feeding)
|
||||
return ++budget->feeding;
|
||||
if (!budget->feeding || !budget->fe_synced)
|
||||
return 0;
|
||||
|
||||
saa7146_write(dev, MC1, MASK_20); // DMA3 off
|
||||
|
||||
@ -139,7 +136,33 @@ static int start_ts_capture(struct budget *budget)
|
||||
SAA7146_IER_ENABLE(budget->dev, MASK_10); /* VPE */
|
||||
saa7146_write(dev, MC1, (MASK_04 | MASK_20)); /* DMA3 on */
|
||||
|
||||
return ++budget->feeding;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int budget_read_fe_status(struct dvb_frontend *fe, fe_status_t *status)
|
||||
{
|
||||
struct budget *budget = (struct budget *) fe->dvb->priv;
|
||||
int synced;
|
||||
int ret;
|
||||
|
||||
if (budget->read_fe_status)
|
||||
ret = budget->read_fe_status(fe, status);
|
||||
else
|
||||
ret = -EINVAL;
|
||||
|
||||
if (!ret) {
|
||||
synced = (*status & FE_HAS_LOCK);
|
||||
if (synced != budget->fe_synced) {
|
||||
budget->fe_synced = synced;
|
||||
spin_lock(&budget->feedlock);
|
||||
if (synced)
|
||||
start_ts_capture(budget);
|
||||
else
|
||||
stop_ts_capture(budget);
|
||||
spin_unlock(&budget->feedlock);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void vpeirq(unsigned long data)
|
||||
@ -267,7 +290,7 @@ static int budget_start_feed(struct dvb_demux_feed *feed)
|
||||
{
|
||||
struct dvb_demux *demux = feed->demux;
|
||||
struct budget *budget = (struct budget *) demux->priv;
|
||||
int status;
|
||||
int status = 0;
|
||||
|
||||
dprintk(2, "budget: %p\n", budget);
|
||||
|
||||
@ -276,7 +299,8 @@ static int budget_start_feed(struct dvb_demux_feed *feed)
|
||||
|
||||
spin_lock(&budget->feedlock);
|
||||
feed->pusi_seen = 0; /* have a clean section start */
|
||||
status = start_ts_capture(budget);
|
||||
if (budget->feeding++ == 0)
|
||||
status = start_ts_capture(budget);
|
||||
spin_unlock(&budget->feedlock);
|
||||
return status;
|
||||
}
|
||||
@ -285,12 +309,13 @@ static int budget_stop_feed(struct dvb_demux_feed *feed)
|
||||
{
|
||||
struct dvb_demux *demux = feed->demux;
|
||||
struct budget *budget = (struct budget *) demux->priv;
|
||||
int status;
|
||||
int status = 0;
|
||||
|
||||
dprintk(2, "budget: %p\n", budget);
|
||||
|
||||
spin_lock(&budget->feedlock);
|
||||
status = stop_ts_capture(budget);
|
||||
if (--budget->feeding == 0)
|
||||
status = stop_ts_capture(budget);
|
||||
spin_unlock(&budget->feedlock);
|
||||
return status;
|
||||
}
|
||||
@ -470,6 +495,14 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ttpci_budget_init_hooks(struct budget *budget)
|
||||
{
|
||||
if (budget->dvb_frontend && !budget->read_fe_status) {
|
||||
budget->read_fe_status = budget->dvb_frontend->ops.read_status;
|
||||
budget->dvb_frontend->ops.read_status = budget_read_fe_status;
|
||||
}
|
||||
}
|
||||
|
||||
int ttpci_budget_deinit(struct budget *budget)
|
||||
{
|
||||
struct saa7146_dev *dev = budget->dev;
|
||||
@ -508,11 +541,8 @@ void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port)
|
||||
spin_lock(&budget->feedlock);
|
||||
budget->video_port = video_port;
|
||||
if (budget->feeding) {
|
||||
int oldfeeding = budget->feeding;
|
||||
budget->feeding = 1;
|
||||
stop_ts_capture(budget);
|
||||
start_ts_capture(budget);
|
||||
budget->feeding = oldfeeding;
|
||||
}
|
||||
spin_unlock(&budget->feedlock);
|
||||
}
|
||||
@ -520,6 +550,7 @@ void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port)
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_debiread);
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_debiwrite);
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_init);
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_init_hooks);
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_deinit);
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_irq10_handler);
|
||||
EXPORT_SYMBOL_GPL(ttpci_budget_set_video_port);
|
||||
|
@ -617,6 +617,8 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte
|
||||
budget->dvb_adapter.priv = budget;
|
||||
frontend_init(budget);
|
||||
|
||||
ttpci_budget_init_hooks(budget);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -375,9 +375,6 @@ static void frontend_init(struct budget *budget)
|
||||
if (budget->dvb_frontend) {
|
||||
budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
|
||||
budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
|
||||
budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
|
||||
budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
|
||||
budget->dvb_frontend->ops.set_tone = budget_set_tone;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -474,6 +471,8 @@ static int budget_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_
|
||||
budget->dvb_adapter.priv = budget;
|
||||
frontend_init(budget);
|
||||
|
||||
ttpci_budget_init_hooks(budget);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -52,9 +52,6 @@ struct budget {
|
||||
struct dmx_frontend hw_frontend;
|
||||
struct dmx_frontend mem_frontend;
|
||||
|
||||
int fe_synced;
|
||||
struct mutex pid_mutex;
|
||||
|
||||
int ci_present;
|
||||
int video_port;
|
||||
|
||||
@ -74,6 +71,9 @@ struct budget {
|
||||
|
||||
struct dvb_adapter dvb_adapter;
|
||||
struct dvb_frontend *dvb_frontend;
|
||||
int (*read_fe_status)(struct dvb_frontend *fe, fe_status_t *status);
|
||||
int fe_synced;
|
||||
|
||||
void *priv;
|
||||
};
|
||||
|
||||
@ -106,6 +106,7 @@ static struct saa7146_pci_extension_data x_var = { \
|
||||
extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
|
||||
struct saa7146_pci_extension_data *info,
|
||||
struct module *owner);
|
||||
extern void ttpci_budget_init_hooks(struct budget *budget);
|
||||
extern int ttpci_budget_deinit(struct budget *budget);
|
||||
extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr);
|
||||
extern void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port);
|
||||
|
@ -145,7 +145,7 @@ config VIDEO_SAA5246A
|
||||
|
||||
config VIDEO_SAA5249
|
||||
tristate "SAA5249 Teletext processor"
|
||||
depends on VIDEO_DEV && I2C
|
||||
depends on VIDEO_DEV && I2C && VIDEO_V4L1
|
||||
help
|
||||
Support for I2C bus based teletext using the SAA5249 chip. At the
|
||||
moment this is only useful on some European WinTV cards.
|
||||
@ -155,7 +155,7 @@ config VIDEO_SAA5249
|
||||
|
||||
config TUNER_3036
|
||||
tristate "SAB3036 tuner"
|
||||
depends on VIDEO_DEV && I2C
|
||||
depends on VIDEO_DEV && I2C && VIDEO_V4L1
|
||||
help
|
||||
Say Y here to include support for Philips SAB3036 compatible tuners.
|
||||
If in doubt, say N.
|
||||
|
@ -1,6 +1,6 @@
|
||||
config VIDEO_BT848
|
||||
tristate "BT848 Video For Linux"
|
||||
depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L2
|
||||
depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L1
|
||||
select I2C_ALGOBIT
|
||||
select FW_LOADER
|
||||
select VIDEO_BTCX
|
||||
|
@ -3923,7 +3923,12 @@ static int __devinit bttv_register_video(struct bttv *btv)
|
||||
goto err;
|
||||
printk(KERN_INFO "bttv%d: registered device video%d\n",
|
||||
btv->c.nr,btv->video_dev->minor & 0x1f);
|
||||
video_device_create_file(btv->video_dev, &class_device_attr_card);
|
||||
if (class_device_create_file(&btv->video_dev->class_dev,
|
||||
&class_device_attr_card)<0) {
|
||||
printk(KERN_ERR "bttv%d: class_device_create_file 'card' "
|
||||
"failed\n", btv->c.nr);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* vbi */
|
||||
btv->vbi_dev = vdev_init(btv, &bttv_vbi_template, "vbi");
|
||||
@ -4287,6 +4292,8 @@ static struct pci_driver bttv_pci_driver = {
|
||||
|
||||
static int bttv_init_module(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
bttv_num = 0;
|
||||
|
||||
printk(KERN_INFO "bttv: driver version %d.%d.%d loaded\n",
|
||||
@ -4308,7 +4315,11 @@ static int bttv_init_module(void)
|
||||
|
||||
bttv_check_chipset();
|
||||
|
||||
bus_register(&bttv_sub_bus_type);
|
||||
ret = bus_register(&bttv_sub_bus_type);
|
||||
if (ret < 0) {
|
||||
printk(KERN_WARNING "bttv: bus_register error: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
return pci_register_driver(&bttv_pci_driver);
|
||||
}
|
||||
|
||||
|
@ -31,11 +31,16 @@
|
||||
#include <asm/io.h>
|
||||
#include "bttvp.h"
|
||||
|
||||
/* Offset from line sync pulse leading edge (0H) in 1 / sampling_rate:
|
||||
bt8x8 /HRESET pulse starts at 0H and has length 64 / fCLKx1 (E|O_VTC
|
||||
HSFMT = 0). VBI_HDELAY (always 0) is an offset from the trailing edge
|
||||
of /HRESET in 1 / fCLKx1, and the sampling_rate tvnorm->Fsc is fCLKx2. */
|
||||
#define VBI_OFFSET ((64 + 0) * 2)
|
||||
/* Offset from line sync pulse leading edge (0H) to start of VBI capture,
|
||||
in fCLKx2 pixels. According to the datasheet, VBI capture starts
|
||||
VBI_HDELAY fCLKx1 pixels from the tailing edgeof /HRESET, and /HRESET
|
||||
is 64 fCLKx1 pixels wide. VBI_HDELAY is set to 0, so this should be
|
||||
(64 + 0) * 2 = 128 fCLKx2 pixels. But it's not! The datasheet is
|
||||
Just Plain Wrong. The real value appears to be different for
|
||||
different revisions of the bt8x8 chips, and to be affected by the
|
||||
horizontal scaling factor. Experimentally, the value is measured
|
||||
to be about 244. */
|
||||
#define VBI_OFFSET 244
|
||||
|
||||
#define VBI_DEFLINES 16
|
||||
#define VBI_MAXLINES 32
|
||||
|
@ -490,6 +490,23 @@ static inline int put_v4l2_input(struct v4l2_input *kp, struct v4l2_input __user
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct video_code32
|
||||
{
|
||||
char loadwhat[16]; /* name or tag of file being passed */
|
||||
compat_int_t datasize;
|
||||
unsigned char *data;
|
||||
};
|
||||
|
||||
static inline int microcode32(struct video_code *kp, struct video_code32 __user *up)
|
||||
{
|
||||
if(!access_ok(VERIFY_READ, up, sizeof(struct video_code32)) ||
|
||||
copy_from_user(kp->loadwhat, up->loadwhat, sizeof (up->loadwhat)) ||
|
||||
get_user(kp->datasize, &up->datasize) ||
|
||||
copy_from_user(kp->data, up->data, up->datasize))
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define VIDIOCGTUNER32 _IOWR('v',4, struct video_tuner32)
|
||||
#define VIDIOCSTUNER32 _IOW('v',5, struct video_tuner32)
|
||||
#define VIDIOCGWIN32 _IOR('v',9, struct video_window32)
|
||||
@ -498,6 +515,7 @@ static inline int put_v4l2_input(struct v4l2_input *kp, struct v4l2_input __user
|
||||
#define VIDIOCSFBUF32 _IOW('v',12, struct video_buffer32)
|
||||
#define VIDIOCGFREQ32 _IOR('v',14, u32)
|
||||
#define VIDIOCSFREQ32 _IOW('v',15, u32)
|
||||
#define VIDIOCSMICROCODE32 _IOW('v',27, struct video_code32)
|
||||
|
||||
/* VIDIOC_ENUMINPUT32 is VIDIOC_ENUMINPUT minus 4 bytes of padding alignement */
|
||||
#define VIDIOC_ENUMINPUT32 VIDIOC_ENUMINPUT - _IOC(0, 0, 0, 4)
|
||||
@ -590,6 +608,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg
|
||||
struct video_tuner vt;
|
||||
struct video_buffer vb;
|
||||
struct video_window vw;
|
||||
struct video_code vc;
|
||||
struct v4l2_format v2f;
|
||||
struct v4l2_buffer v2b;
|
||||
struct v4l2_framebuffer v2fb;
|
||||
@ -628,6 +647,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg
|
||||
case VIDIOC_G_INPUT32: cmd = VIDIOC_G_INPUT; break;
|
||||
case VIDIOC_S_INPUT32: cmd = VIDIOC_S_INPUT; break;
|
||||
case VIDIOC_TRY_FMT32: cmd = VIDIOC_TRY_FMT; break;
|
||||
case VIDIOCSMICROCODE32: cmd = VIDIOCSMICROCODE; break;
|
||||
};
|
||||
|
||||
switch(cmd) {
|
||||
@ -703,6 +723,10 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg
|
||||
case VIDIOC_G_FBUF:
|
||||
case VIDIOC_G_INPUT:
|
||||
compatible_arg = 0;
|
||||
case VIDIOCSMICROCODE:
|
||||
err = microcode32(&karg.vc, up);
|
||||
compatible_arg = 0;
|
||||
break;
|
||||
};
|
||||
|
||||
if(err)
|
||||
|
@ -1,6 +1,6 @@
|
||||
config VIDEO_CPIA2
|
||||
tristate "CPiA2 Video For Linux"
|
||||
depends on VIDEO_DEV && USB
|
||||
depends on VIDEO_DEV && USB && VIDEO_V4L1
|
||||
---help---
|
||||
This is the video4linux driver for cameras based on Vision's CPiA2
|
||||
(Colour Processor Interface ASIC), such as the Digital Blue QX5
|
||||
|
@ -89,7 +89,7 @@ static void cx88_ir_handle_key(struct cx88_IR *ir)
|
||||
|
||||
auxgpio = cx_read(MO_GP1_IO);
|
||||
/* Take out the parity part */
|
||||
gpio+=(gpio & 0x7fd) + (auxgpio & 0xef);
|
||||
gpio=(gpio & 0x7fd) + (auxgpio & 0xef);
|
||||
} else
|
||||
auxgpio = gpio;
|
||||
|
||||
|
@ -1180,7 +1180,6 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
|
||||
V4L2_CAP_READWRITE |
|
||||
V4L2_CAP_STREAMING |
|
||||
V4L2_CAP_VBI_CAPTURE |
|
||||
V4L2_CAP_VIDEO_OVERLAY |
|
||||
0;
|
||||
if (UNSET != core->tuner_type)
|
||||
cap->capabilities |= V4L2_CAP_TUNER;
|
||||
@ -1226,7 +1225,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
|
||||
struct v4l2_format *f = arg;
|
||||
return cx8800_try_fmt(dev,fh,f);
|
||||
}
|
||||
#ifdef HAVE_V4L1
|
||||
#ifdef CONFIG_V4L1_COMPAT
|
||||
/* --- streaming capture ------------------------------------- */
|
||||
case VIDIOCGMBUF:
|
||||
{
|
||||
@ -1585,7 +1584,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
|
||||
*id = 0;
|
||||
return 0;
|
||||
}
|
||||
#ifdef HAVE_V4L1
|
||||
#ifdef CONFIG_V4L1_COMPAT
|
||||
case VIDIOCSTUNER:
|
||||
{
|
||||
struct video_tuner *v = arg;
|
||||
|
@ -362,7 +362,7 @@ int msp_sleep(struct msp_state *state, int timeout)
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
#ifdef CONFIG_VIDEO_V4L1
|
||||
static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode)
|
||||
{
|
||||
if (rxsubchans == V4L2_TUNER_SUB_MONO)
|
||||
@ -384,6 +384,7 @@ static int msp_mode_v4l1_to_v4l2(int mode)
|
||||
return V4L2_TUNER_MODE_LANG1;
|
||||
return V4L2_TUNER_MODE_MONO;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int msp_get_ctrl(struct i2c_client *client, struct v4l2_control *ctrl)
|
||||
{
|
||||
@ -509,6 +510,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
|
||||
/* --- v4l ioctls --- */
|
||||
/* take care: bttv does userspace copying, we'll get a
|
||||
kernel pointer here... */
|
||||
#ifdef CONFIG_VIDEO_V4L1
|
||||
case VIDIOCGAUDIO:
|
||||
{
|
||||
struct video_audio *va = arg;
|
||||
@ -577,6 +579,12 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
|
||||
}
|
||||
|
||||
case VIDIOCSFREQ:
|
||||
{
|
||||
/* new channel -- kick audio carrier scan */
|
||||
msp_wake_thread(client);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case VIDIOC_S_FREQUENCY:
|
||||
{
|
||||
/* new channel -- kick audio carrier scan */
|
||||
|
@ -852,7 +852,6 @@ unsigned long pvr2_hdw_get_sn(struct pvr2_hdw *hdw)
|
||||
return hdw->serial_number;
|
||||
}
|
||||
|
||||
|
||||
int pvr2_hdw_get_unit_number(struct pvr2_hdw *hdw)
|
||||
{
|
||||
return hdw->unit_number;
|
||||
@ -2318,7 +2317,6 @@ void pvr2_hdw_poll_trigger_unlocked(struct pvr2_hdw *hdw)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Return name for this driver instance */
|
||||
const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *hdw)
|
||||
{
|
||||
@ -2542,6 +2540,10 @@ static void pvr2_ctl_timeout(unsigned long data)
|
||||
}
|
||||
|
||||
|
||||
/* Issue a command and get a response from the device. This extended
|
||||
version includes a probe flag (which if set means that device errors
|
||||
should not be logged or treated as fatal) and a timeout in jiffies.
|
||||
This can be used to non-lethally probe the health of endpoint 1. */
|
||||
static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
|
||||
unsigned int timeout,int probe_fl,
|
||||
void *write_data,unsigned int write_len,
|
||||
@ -2970,6 +2972,7 @@ int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *hdw)
|
||||
}
|
||||
|
||||
|
||||
/* Stop / start video stream transport */
|
||||
static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl)
|
||||
{
|
||||
int status;
|
||||
@ -3068,6 +3071,7 @@ int pvr2_hdw_gpio_chg_out(struct pvr2_hdw *hdw,u32 msk,u32 val)
|
||||
}
|
||||
|
||||
|
||||
/* Find I2C address of eeprom */
|
||||
static int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw)
|
||||
{
|
||||
int result;
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state);
|
||||
|
||||
#define BUFFER_SIG 0x47653271
|
||||
|
||||
// #define SANITY_CHECK_BUFFERS
|
||||
@ -515,6 +517,10 @@ void pvr2_stream_set_callback(struct pvr2_stream *sp,
|
||||
}
|
||||
|
||||
/* Query / set the nominal buffer count */
|
||||
int pvr2_stream_get_buffer_count(struct pvr2_stream *sp)
|
||||
{
|
||||
return sp->buffer_target_count;
|
||||
}
|
||||
|
||||
int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt)
|
||||
{
|
||||
@ -553,7 +559,6 @@ int pvr2_stream_get_ready_count(struct pvr2_stream *sp)
|
||||
return sp->r_count;
|
||||
}
|
||||
|
||||
|
||||
void pvr2_stream_kill(struct pvr2_stream *sp)
|
||||
{
|
||||
struct pvr2_buffer *bp;
|
||||
@ -607,7 +612,6 @@ int pvr2_buffer_queue(struct pvr2_buffer *bp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt)
|
||||
{
|
||||
int ret = 0;
|
||||
@ -646,7 +650,6 @@ int pvr2_buffer_get_status(struct pvr2_buffer *bp)
|
||||
return bp->status;
|
||||
}
|
||||
|
||||
|
||||
int pvr2_buffer_get_id(struct pvr2_buffer *bp)
|
||||
{
|
||||
return bp->id;
|
||||
|
@ -47,6 +47,7 @@ void pvr2_stream_set_callback(struct pvr2_stream *,
|
||||
void *data);
|
||||
|
||||
/* Query / set the nominal buffer count */
|
||||
int pvr2_stream_get_buffer_count(struct pvr2_stream *);
|
||||
int pvr2_stream_set_buffer_count(struct pvr2_stream *,unsigned int);
|
||||
|
||||
/* Get a pointer to a buffer that is either idle, ready, or is specified
|
||||
@ -58,6 +59,7 @@ struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id);
|
||||
/* Find out how many buffers are idle or ready */
|
||||
int pvr2_stream_get_ready_count(struct pvr2_stream *);
|
||||
|
||||
|
||||
/* Kill all pending buffers and throw away any ready buffers as well */
|
||||
void pvr2_stream_kill(struct pvr2_stream *);
|
||||
|
||||
|
@ -213,7 +213,9 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp)
|
||||
" pvr2_ioread_setup (tear-down) id=%p",cp);
|
||||
pvr2_ioread_stop(cp);
|
||||
pvr2_stream_kill(cp->stream);
|
||||
pvr2_stream_set_buffer_count(cp->stream,0);
|
||||
if (pvr2_stream_get_buffer_count(cp->stream)) {
|
||||
pvr2_stream_set_buffer_count(cp->stream,0);
|
||||
}
|
||||
cp->stream = NULL;
|
||||
}
|
||||
if (sp) {
|
||||
@ -251,7 +253,6 @@ int pvr2_ioread_set_enabled(struct pvr2_ioread *cp,int fl)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp)
|
||||
{
|
||||
int stat;
|
||||
|
@ -44,12 +44,16 @@ struct pvr2_sysfs {
|
||||
struct kobj_type ktype;
|
||||
struct class_device_attribute attr_v4l_minor_number;
|
||||
struct class_device_attribute attr_unit_number;
|
||||
int v4l_minor_number_created_ok;
|
||||
int unit_number_created_ok;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_VIDEO_PVRUSB2_DEBUGIFC
|
||||
struct pvr2_sysfs_debugifc {
|
||||
struct class_device_attribute attr_debugcmd;
|
||||
struct class_device_attribute attr_debuginfo;
|
||||
int debugcmd_created_ok;
|
||||
int debuginfo_created_ok;
|
||||
};
|
||||
#endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */
|
||||
|
||||
@ -67,6 +71,7 @@ struct pvr2_sysfs_ctl_item {
|
||||
struct pvr2_sysfs_ctl_item *item_next;
|
||||
struct attribute *attr_gen[7];
|
||||
struct attribute_group grp;
|
||||
int created_ok;
|
||||
char name[80];
|
||||
};
|
||||
|
||||
@ -487,6 +492,7 @@ static void pvr2_sysfs_add_control(struct pvr2_sysfs *sfp,int ctl_id)
|
||||
struct pvr2_sysfs_func_set *fp;
|
||||
struct pvr2_ctrl *cptr;
|
||||
unsigned int cnt,acnt;
|
||||
int ret;
|
||||
|
||||
if ((ctl_id < 0) || (ctl_id >= (sizeof(funcs)/sizeof(funcs[0])))) {
|
||||
return;
|
||||
@ -589,7 +595,13 @@ static void pvr2_sysfs_add_control(struct pvr2_sysfs *sfp,int ctl_id)
|
||||
cip->grp.name = cip->name;
|
||||
cip->grp.attrs = cip->attr_gen;
|
||||
|
||||
sysfs_create_group(&sfp->class_dev->kobj,&cip->grp);
|
||||
ret = sysfs_create_group(&sfp->class_dev->kobj,&cip->grp);
|
||||
if (ret) {
|
||||
printk(KERN_WARNING "%s: sysfs_create_group error: %d\n",
|
||||
__FUNCTION__, ret);
|
||||
return;
|
||||
}
|
||||
cip->created_ok = !0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_VIDEO_PVRUSB2_DEBUGIFC
|
||||
@ -600,6 +612,8 @@ static ssize_t debugcmd_store(struct class_device *,const char *,size_t count);
|
||||
static void pvr2_sysfs_add_debugifc(struct pvr2_sysfs *sfp)
|
||||
{
|
||||
struct pvr2_sysfs_debugifc *dip;
|
||||
int ret;
|
||||
|
||||
dip = kmalloc(sizeof(*dip),GFP_KERNEL);
|
||||
if (!dip) return;
|
||||
memset(dip,0,sizeof(*dip));
|
||||
@ -613,17 +627,34 @@ static void pvr2_sysfs_add_debugifc(struct pvr2_sysfs *sfp)
|
||||
dip->attr_debuginfo.attr.mode = S_IRUGO;
|
||||
dip->attr_debuginfo.show = debuginfo_show;
|
||||
sfp->debugifc = dip;
|
||||
class_device_create_file(sfp->class_dev,&dip->attr_debugcmd);
|
||||
class_device_create_file(sfp->class_dev,&dip->attr_debuginfo);
|
||||
ret = class_device_create_file(sfp->class_dev,&dip->attr_debugcmd);
|
||||
if (ret < 0) {
|
||||
printk(KERN_WARNING "%s: class_device_create_file error: %d\n",
|
||||
__FUNCTION__, ret);
|
||||
} else {
|
||||
dip->debugcmd_created_ok = !0;
|
||||
}
|
||||
ret = class_device_create_file(sfp->class_dev,&dip->attr_debuginfo);
|
||||
if (ret < 0) {
|
||||
printk(KERN_WARNING "%s: class_device_create_file error: %d\n",
|
||||
__FUNCTION__, ret);
|
||||
} else {
|
||||
dip->debuginfo_created_ok = !0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void pvr2_sysfs_tear_down_debugifc(struct pvr2_sysfs *sfp)
|
||||
{
|
||||
if (!sfp->debugifc) return;
|
||||
class_device_remove_file(sfp->class_dev,
|
||||
&sfp->debugifc->attr_debuginfo);
|
||||
class_device_remove_file(sfp->class_dev,&sfp->debugifc->attr_debugcmd);
|
||||
if (sfp->debugifc->debuginfo_created_ok) {
|
||||
class_device_remove_file(sfp->class_dev,
|
||||
&sfp->debugifc->attr_debuginfo);
|
||||
}
|
||||
if (sfp->debugifc->debugcmd_created_ok) {
|
||||
class_device_remove_file(sfp->class_dev,
|
||||
&sfp->debugifc->attr_debugcmd);
|
||||
}
|
||||
kfree(sfp->debugifc);
|
||||
sfp->debugifc = NULL;
|
||||
}
|
||||
@ -645,7 +676,9 @@ static void pvr2_sysfs_tear_down_controls(struct pvr2_sysfs *sfp)
|
||||
struct pvr2_sysfs_ctl_item *cip1,*cip2;
|
||||
for (cip1 = sfp->item_first; cip1; cip1 = cip2) {
|
||||
cip2 = cip1->item_next;
|
||||
sysfs_remove_group(&sfp->class_dev->kobj,&cip1->grp);
|
||||
if (cip1->created_ok) {
|
||||
sysfs_remove_group(&sfp->class_dev->kobj,&cip1->grp);
|
||||
}
|
||||
pvr2_sysfs_trace("Destroying pvr2_sysfs_ctl_item id=%p",cip1);
|
||||
kfree(cip1);
|
||||
}
|
||||
@ -675,8 +708,14 @@ static void class_dev_destroy(struct pvr2_sysfs *sfp)
|
||||
pvr2_sysfs_tear_down_debugifc(sfp);
|
||||
#endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */
|
||||
pvr2_sysfs_tear_down_controls(sfp);
|
||||
class_device_remove_file(sfp->class_dev,&sfp->attr_v4l_minor_number);
|
||||
class_device_remove_file(sfp->class_dev,&sfp->attr_unit_number);
|
||||
if (sfp->v4l_minor_number_created_ok) {
|
||||
class_device_remove_file(sfp->class_dev,
|
||||
&sfp->attr_v4l_minor_number);
|
||||
}
|
||||
if (sfp->unit_number_created_ok) {
|
||||
class_device_remove_file(sfp->class_dev,
|
||||
&sfp->attr_unit_number);
|
||||
}
|
||||
pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev);
|
||||
sfp->class_dev->class_data = NULL;
|
||||
class_device_unregister(sfp->class_dev);
|
||||
@ -709,6 +748,8 @@ static void class_dev_create(struct pvr2_sysfs *sfp,
|
||||
{
|
||||
struct usb_device *usb_dev;
|
||||
struct class_device *class_dev;
|
||||
int ret;
|
||||
|
||||
usb_dev = pvr2_hdw_get_dev(sfp->channel.hdw);
|
||||
if (!usb_dev) return;
|
||||
class_dev = kmalloc(sizeof(*class_dev),GFP_KERNEL);
|
||||
@ -733,20 +774,40 @@ static void class_dev_create(struct pvr2_sysfs *sfp,
|
||||
|
||||
sfp->class_dev = class_dev;
|
||||
class_dev->class_data = sfp;
|
||||
class_device_register(class_dev);
|
||||
ret = class_device_register(class_dev);
|
||||
if (ret) {
|
||||
printk(KERN_ERR "%s: class_device_register failed\n",
|
||||
__FUNCTION__);
|
||||
kfree(class_dev);
|
||||
return;
|
||||
}
|
||||
|
||||
sfp->attr_v4l_minor_number.attr.owner = THIS_MODULE;
|
||||
sfp->attr_v4l_minor_number.attr.name = "v4l_minor_number";
|
||||
sfp->attr_v4l_minor_number.attr.mode = S_IRUGO;
|
||||
sfp->attr_v4l_minor_number.show = v4l_minor_number_show;
|
||||
sfp->attr_v4l_minor_number.store = NULL;
|
||||
class_device_create_file(sfp->class_dev,&sfp->attr_v4l_minor_number);
|
||||
ret = class_device_create_file(sfp->class_dev,
|
||||
&sfp->attr_v4l_minor_number);
|
||||
if (ret < 0) {
|
||||
printk(KERN_WARNING "%s: class_device_create_file error: %d\n",
|
||||
__FUNCTION__, ret);
|
||||
} else {
|
||||
sfp->v4l_minor_number_created_ok = !0;
|
||||
}
|
||||
|
||||
sfp->attr_unit_number.attr.owner = THIS_MODULE;
|
||||
sfp->attr_unit_number.attr.name = "unit_number";
|
||||
sfp->attr_unit_number.attr.mode = S_IRUGO;
|
||||
sfp->attr_unit_number.show = unit_number_show;
|
||||
sfp->attr_unit_number.store = NULL;
|
||||
class_device_create_file(sfp->class_dev,&sfp->attr_unit_number);
|
||||
ret = class_device_create_file(sfp->class_dev,&sfp->attr_unit_number);
|
||||
if (ret < 0) {
|
||||
printk(KERN_WARNING "%s: class_device_create_file error: %d\n",
|
||||
__FUNCTION__, ret);
|
||||
} else {
|
||||
sfp->unit_number_created_ok = !0;
|
||||
}
|
||||
|
||||
pvr2_sysfs_add_controls(sfp);
|
||||
#ifdef CONFIG_VIDEO_PVRUSB2_DEBUGIFC
|
||||
|
@ -997,9 +997,9 @@ static int saa7134_alsa_init(void)
|
||||
struct saa7134_dev *dev = NULL;
|
||||
struct list_head *list;
|
||||
|
||||
if (!dmasound_init && !dmasound_exit) {
|
||||
dmasound_init = alsa_device_init;
|
||||
dmasound_exit = alsa_device_exit;
|
||||
if (!saa7134_dmasound_init && !saa7134_dmasound_exit) {
|
||||
saa7134_dmasound_init = alsa_device_init;
|
||||
saa7134_dmasound_exit = alsa_device_exit;
|
||||
} else {
|
||||
printk(KERN_WARNING "saa7134 ALSA: can't load, DMA sound handler already assigned (probably to OSS)\n");
|
||||
return -EBUSY;
|
||||
@ -1036,8 +1036,8 @@ static void saa7134_alsa_exit(void)
|
||||
snd_card_free(snd_saa7134_cards[idx]);
|
||||
}
|
||||
|
||||
dmasound_init = NULL;
|
||||
dmasound_exit = NULL;
|
||||
saa7134_dmasound_init = NULL;
|
||||
saa7134_dmasound_exit = NULL;
|
||||
printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n");
|
||||
|
||||
return;
|
||||
|
@ -95,8 +95,8 @@ LIST_HEAD(saa7134_devlist);
|
||||
static LIST_HEAD(mops_list);
|
||||
static unsigned int saa7134_devcount;
|
||||
|
||||
int (*dmasound_init)(struct saa7134_dev *dev);
|
||||
int (*dmasound_exit)(struct saa7134_dev *dev);
|
||||
int (*saa7134_dmasound_init)(struct saa7134_dev *dev);
|
||||
int (*saa7134_dmasound_exit)(struct saa7134_dev *dev);
|
||||
|
||||
#define dprintk(fmt, arg...) if (core_debug) \
|
||||
printk(KERN_DEBUG "%s/core: " fmt, dev->name , ## arg)
|
||||
@ -1008,8 +1008,8 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
|
||||
/* check for signal */
|
||||
saa7134_irq_video_intl(dev);
|
||||
|
||||
if (dmasound_init && !dev->dmasound.priv_data) {
|
||||
dmasound_init(dev);
|
||||
if (saa7134_dmasound_init && !dev->dmasound.priv_data) {
|
||||
saa7134_dmasound_init(dev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -1036,8 +1036,8 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev)
|
||||
struct saa7134_mpeg_ops *mops;
|
||||
|
||||
/* Release DMA sound modules if present */
|
||||
if (dmasound_exit && dev->dmasound.priv_data) {
|
||||
dmasound_exit(dev);
|
||||
if (saa7134_dmasound_exit && dev->dmasound.priv_data) {
|
||||
saa7134_dmasound_exit(dev);
|
||||
}
|
||||
|
||||
/* debugging ... */
|
||||
@ -1169,8 +1169,8 @@ EXPORT_SYMBOL(saa7134_boards);
|
||||
|
||||
/* ----------------- for the DMA sound modules --------------- */
|
||||
|
||||
EXPORT_SYMBOL(dmasound_init);
|
||||
EXPORT_SYMBOL(dmasound_exit);
|
||||
EXPORT_SYMBOL(saa7134_dmasound_init);
|
||||
EXPORT_SYMBOL(saa7134_dmasound_exit);
|
||||
EXPORT_SYMBOL(saa7134_pgtable_free);
|
||||
EXPORT_SYMBOL(saa7134_pgtable_build);
|
||||
EXPORT_SYMBOL(saa7134_pgtable_alloc);
|
||||
|
@ -993,9 +993,9 @@ static int saa7134_oss_init(void)
|
||||
struct saa7134_dev *dev = NULL;
|
||||
struct list_head *list;
|
||||
|
||||
if (!dmasound_init && !dmasound_exit) {
|
||||
dmasound_init = oss_device_init;
|
||||
dmasound_exit = oss_device_exit;
|
||||
if (!saa7134_dmasound_init && !saa7134_dmasound_exit) {
|
||||
saa7134_dmasound_init = oss_device_init;
|
||||
saa7134_dmasound_exit = oss_device_exit;
|
||||
} else {
|
||||
printk(KERN_WARNING "saa7134 OSS: can't load, DMA sound handler already assigned (probably to ALSA)\n");
|
||||
return -EBUSY;
|
||||
@ -1037,8 +1037,8 @@ static void saa7134_oss_exit(void)
|
||||
|
||||
}
|
||||
|
||||
dmasound_init = NULL;
|
||||
dmasound_exit = NULL;
|
||||
saa7134_dmasound_init = NULL;
|
||||
saa7134_dmasound_exit = NULL;
|
||||
|
||||
printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n");
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
static unsigned int video_debug = 0;
|
||||
static unsigned int gbuffers = 8;
|
||||
static unsigned int noninterlaced = 0;
|
||||
static unsigned int noninterlaced = 1;
|
||||
static unsigned int gbufsize = 720*576*4;
|
||||
static unsigned int gbufsize_max = 720*576*4;
|
||||
module_param(video_debug, int, 0644);
|
||||
@ -48,7 +48,7 @@ MODULE_PARM_DESC(video_debug,"enable debug messages [video]");
|
||||
module_param(gbuffers, int, 0444);
|
||||
MODULE_PARM_DESC(gbuffers,"number of capture buffers, range 2-32");
|
||||
module_param(noninterlaced, int, 0644);
|
||||
MODULE_PARM_DESC(noninterlaced,"video input is noninterlaced");
|
||||
MODULE_PARM_DESC(noninterlaced,"capture non interlaced video");
|
||||
|
||||
#define dprintk(fmt, arg...) if (video_debug) \
|
||||
printk(KERN_DEBUG "%s/video: " fmt, dev->name , ## arg)
|
||||
@ -2087,7 +2087,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
|
||||
struct v4l2_format *f = arg;
|
||||
return saa7134_try_fmt(dev,fh,f);
|
||||
}
|
||||
#ifdef HAVE_V4L1
|
||||
#ifdef CONFIG_V4L1_COMPAT
|
||||
case VIDIOCGMBUF:
|
||||
{
|
||||
struct video_mbuf *mbuf = arg;
|
||||
|
@ -586,8 +586,8 @@ void saa7134_dma_free(struct videobuf_queue *q,struct saa7134_buf *buf);
|
||||
|
||||
int saa7134_set_dmabits(struct saa7134_dev *dev);
|
||||
|
||||
extern int (*dmasound_init)(struct saa7134_dev *dev);
|
||||
extern int (*dmasound_exit)(struct saa7134_dev *dev);
|
||||
extern int (*saa7134_dmasound_init)(struct saa7134_dev *dev);
|
||||
extern int (*saa7134_dmasound_exit)(struct saa7134_dev *dev);
|
||||
|
||||
|
||||
/* ----------------------------------------------------------- */
|
||||
|
@ -2181,7 +2181,6 @@ static struct pci_device_id stradis_pci_tbl[] = {
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, stradis_pci_tbl);
|
||||
|
||||
static struct pci_driver stradis_driver = {
|
||||
.name = "stradis",
|
||||
|
@ -196,14 +196,6 @@ static void set_type(struct i2c_client *c, unsigned int type,
|
||||
i2c_master_send(c, buffer, 4);
|
||||
default_tuner_init(c);
|
||||
break;
|
||||
case TUNER_LG_TDVS_H06XF:
|
||||
/* Set the Auxiliary Byte. */
|
||||
buffer[2] &= ~0x20;
|
||||
buffer[2] |= 0x18;
|
||||
buffer[3] = 0x20;
|
||||
i2c_master_send(c, buffer, 4);
|
||||
default_tuner_init(c);
|
||||
break;
|
||||
case TUNER_PHILIPS_TD1316:
|
||||
buffer[0] = 0x0b;
|
||||
buffer[1] = 0xdc;
|
||||
@ -598,6 +590,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
|
||||
if (t->standby)
|
||||
t->standby (client);
|
||||
break;
|
||||
#ifdef CONFIG_VIDEO_V4L1
|
||||
case VIDIOCSAUDIO:
|
||||
if (check_mode(t, "VIDIOCSAUDIO") == EINVAL)
|
||||
return 0;
|
||||
@ -607,17 +600,6 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
|
||||
/* Should be implemented, since bttv calls it */
|
||||
tuner_dbg("VIDIOCSAUDIO not implemented.\n");
|
||||
break;
|
||||
case TDA9887_SET_CONFIG:
|
||||
if (t->type == TUNER_TDA9887) {
|
||||
int *i = arg;
|
||||
|
||||
t->tda9887_config = *i;
|
||||
set_freq(client, t->tv_freq);
|
||||
}
|
||||
break;
|
||||
/* --- v4l ioctls --- */
|
||||
/* take care: bttv does userspace copying, we'll get a
|
||||
kernel pointer here... */
|
||||
case VIDIOCSCHAN:
|
||||
{
|
||||
static const v4l2_std_id map[] = {
|
||||
@ -701,7 +683,18 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
|
||||
? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
case TDA9887_SET_CONFIG:
|
||||
if (t->type == TUNER_TDA9887) {
|
||||
int *i = arg;
|
||||
|
||||
t->tda9887_config = *i;
|
||||
set_freq(client, t->tv_freq);
|
||||
}
|
||||
break;
|
||||
/* --- v4l ioctls --- */
|
||||
/* take care: bttv does userspace copying, we'll get a
|
||||
kernel pointer here... */
|
||||
case VIDIOC_S_STD:
|
||||
{
|
||||
v4l2_std_id *id = arg;
|
||||
|
@ -339,7 +339,20 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
|
||||
if (4 != (rc = i2c_master_send(c,buffer,4)))
|
||||
tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc);
|
||||
|
||||
if (t->type == TUNER_MICROTUNE_4042FI5) {
|
||||
switch (t->type) {
|
||||
case TUNER_LG_TDVS_H06XF:
|
||||
/* Set the Auxiliary Byte. */
|
||||
buffer[0] = buffer[2];
|
||||
buffer[0] &= ~0x20;
|
||||
buffer[0] |= 0x18;
|
||||
buffer[1] = 0x20;
|
||||
tuner_dbg("tv 0x%02x 0x%02x\n",buffer[0],buffer[1]);
|
||||
|
||||
if (2 != (rc = i2c_master_send(c,buffer,2)))
|
||||
tuner_warn("i2c i/o error: rc == %d (should be 2)\n",rc);
|
||||
break;
|
||||
case TUNER_MICROTUNE_4042FI5:
|
||||
{
|
||||
// FIXME - this may also work for other tuners
|
||||
unsigned long timeout = jiffies + msecs_to_jiffies(1);
|
||||
u8 status_byte = 0;
|
||||
@ -364,10 +377,12 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
|
||||
buffer[2] = config;
|
||||
buffer[3] = cb;
|
||||
tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n",
|
||||
buffer[0],buffer[1],buffer[2],buffer[3]);
|
||||
buffer[0],buffer[1],buffer[2],buffer[3]);
|
||||
|
||||
if (4 != (rc = i2c_master_send(c,buffer,4)))
|
||||
tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ config VIDEO_USBVIDEO
|
||||
|
||||
config USB_VICAM
|
||||
tristate "USB 3com HomeConnect (aka vicam) support (EXPERIMENTAL)"
|
||||
depends on USB && VIDEO_V4L1 && EXPERIMENTAL
|
||||
depends on USB && VIDEO_DEV && VIDEO_V4L1 && EXPERIMENTAL
|
||||
select VIDEO_USBVIDEO
|
||||
---help---
|
||||
Say Y here if you have 3com homeconnect camera (vicam).
|
||||
@ -13,7 +13,7 @@ config USB_VICAM
|
||||
|
||||
config USB_IBMCAM
|
||||
tristate "USB IBM (Xirlink) C-it Camera support"
|
||||
depends on USB && VIDEO_V4L1
|
||||
depends on USB && VIDEO_DEV && VIDEO_V4L1
|
||||
select VIDEO_USBVIDEO
|
||||
---help---
|
||||
Say Y here if you want to connect a IBM "C-It" camera, also known as
|
||||
@ -28,7 +28,7 @@ config USB_IBMCAM
|
||||
|
||||
config USB_KONICAWC
|
||||
tristate "USB Konica Webcam support"
|
||||
depends on USB && VIDEO_V4L1
|
||||
depends on USB && VIDEO_DEV && VIDEO_V4L1
|
||||
select VIDEO_USBVIDEO
|
||||
---help---
|
||||
Say Y here if you want support for webcams based on a Konica
|
||||
@ -39,7 +39,7 @@ config USB_KONICAWC
|
||||
|
||||
config USB_QUICKCAM_MESSENGER
|
||||
tristate "USB Logitech Quickcam Messenger"
|
||||
depends on USB && VIDEO_DEV
|
||||
depends on USB && VIDEO_DEV && VIDEO_V4L1
|
||||
select VIDEO_USBVIDEO
|
||||
---help---
|
||||
Say Y or M here to enable support for the USB Logitech Quickcam
|
||||
|
@ -202,7 +202,7 @@ static char *v4l2_memory_names[] = {
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* debug help functions */
|
||||
|
||||
#ifdef HAVE_V4L1
|
||||
#ifdef CONFIG_V4L1_COMPAT
|
||||
static const char *v4l1_ioctls[] = {
|
||||
[_IOC_NR(VIDIOCGCAP)] = "VIDIOCGCAP",
|
||||
[_IOC_NR(VIDIOCGCHAN)] = "VIDIOCGCHAN",
|
||||
@ -301,7 +301,7 @@ static const char *v4l2_ioctls[] = {
|
||||
#define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls)
|
||||
|
||||
static const char *v4l2_int_ioctls[] = {
|
||||
#ifdef HAVE_VIDEO_DECODER
|
||||
#ifdef CONFIG_V4L1_COMPAT
|
||||
[_IOC_NR(DECODER_GET_CAPABILITIES)] = "DECODER_GET_CAPABILITIES",
|
||||
[_IOC_NR(DECODER_GET_STATUS)] = "DECODER_GET_STATUS",
|
||||
[_IOC_NR(DECODER_SET_NORM)] = "DECODER_SET_NORM",
|
||||
@ -367,7 +367,7 @@ void v4l_printk_ioctl(unsigned int cmd)
|
||||
(_IOC_NR(cmd) < V4L2_INT_IOCTLS) ?
|
||||
v4l2_int_ioctls[_IOC_NR(cmd)] : "UNKNOWN", dir, cmd);
|
||||
break;
|
||||
#ifdef HAVE_V4L1
|
||||
#ifdef CONFIG_V4L1_COMPAT
|
||||
case 'v':
|
||||
printk("v4l1 ioctl %s, dir=%s (0x%08x)\n",
|
||||
(_IOC_NR(cmd) < V4L1_IOCTLS) ?
|
||||
@ -414,6 +414,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
|
||||
printk ("%s: tuner type=%d\n", s, *p);
|
||||
break;
|
||||
}
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
case DECODER_SET_VBI_BYPASS:
|
||||
case DECODER_ENABLE_OUTPUT:
|
||||
case DECODER_GET_STATUS:
|
||||
@ -424,6 +425,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
|
||||
case VIDIOCCAPTURE:
|
||||
case VIDIOCSYNC:
|
||||
case VIDIOCSWRITEMODE:
|
||||
#endif
|
||||
case TUNER_SET_TYPE_ADDR:
|
||||
case TUNER_SET_STANDBY:
|
||||
case TDA9887_SET_CONFIG:
|
||||
@ -755,6 +757,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
|
||||
p->afc);
|
||||
break;
|
||||
}
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
case VIDIOCGVBIFMT:
|
||||
case VIDIOCSVBIFMT:
|
||||
{
|
||||
@ -924,6 +927,14 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
|
||||
p->clipcount);
|
||||
break;
|
||||
}
|
||||
case VIDIOCGFREQ:
|
||||
case VIDIOCSFREQ:
|
||||
{
|
||||
unsigned long *p=arg;
|
||||
printk ("%s: value=%lu\n", s, *p);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case VIDIOC_INT_AUDIO_CLOCK_FREQ:
|
||||
case VIDIOC_INT_I2S_CLOCK_FREQ:
|
||||
case VIDIOC_INT_S_STANDBY:
|
||||
@ -933,13 +944,6 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
|
||||
printk ("%s: value=%d\n", s, *p);
|
||||
break;
|
||||
}
|
||||
case VIDIOCGFREQ:
|
||||
case VIDIOCSFREQ:
|
||||
{
|
||||
unsigned long *p=arg;
|
||||
printk ("%s: value=%lu\n", s, *p);
|
||||
break;
|
||||
}
|
||||
case VIDIOC_G_STD:
|
||||
case VIDIOC_S_STD:
|
||||
case VIDIOC_QUERYSTD:
|
||||
|
@ -760,7 +760,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
|
||||
ret=vfd->vidioc_overlay(file, fh, *i);
|
||||
break;
|
||||
}
|
||||
#ifdef HAVE_V4L1
|
||||
#ifdef CONFIG_V4L1_COMPAT
|
||||
/* --- streaming capture ------------------------------------- */
|
||||
case VIDIOCGMBUF:
|
||||
{
|
||||
@ -1512,6 +1512,7 @@ int video_register_device(struct video_device *vfd, int type, int nr)
|
||||
int i=0;
|
||||
int base;
|
||||
int end;
|
||||
int ret;
|
||||
char *name_base;
|
||||
|
||||
switch(type)
|
||||
@ -1537,6 +1538,8 @@ int video_register_device(struct video_device *vfd, int type, int nr)
|
||||
name_base = "radio";
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "%s called with unknown type: %d\n",
|
||||
__FUNCTION__, type);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1571,9 +1574,18 @@ int video_register_device(struct video_device *vfd, int type, int nr)
|
||||
vfd->class_dev.class = &video_class;
|
||||
vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor);
|
||||
sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base);
|
||||
class_device_register(&vfd->class_dev);
|
||||
class_device_create_file(&vfd->class_dev,
|
||||
&class_device_attr_name);
|
||||
ret = class_device_register(&vfd->class_dev);
|
||||
if (ret < 0) {
|
||||
printk(KERN_ERR "%s: class_device_register failed\n",
|
||||
__FUNCTION__);
|
||||
goto fail_minor;
|
||||
}
|
||||
ret = class_device_create_file(&vfd->class_dev, &class_device_attr_name);
|
||||
if (ret < 0) {
|
||||
printk(KERN_ERR "%s: class_device_create_file 'name' failed\n",
|
||||
__FUNCTION__);
|
||||
goto fail_classdev;
|
||||
}
|
||||
|
||||
#if 1
|
||||
/* needed until all drivers are fixed */
|
||||
@ -1583,6 +1595,15 @@ int video_register_device(struct video_device *vfd, int type, int nr)
|
||||
"http://lwn.net/Articles/36850/\n", vfd->name);
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
fail_classdev:
|
||||
class_device_unregister(&vfd->class_dev);
|
||||
fail_minor:
|
||||
mutex_lock(&videodev_lock);
|
||||
video_device[vfd->minor] = NULL;
|
||||
vfd->minor = -1;
|
||||
mutex_unlock(&videodev_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -986,7 +986,7 @@ static int vidioc_dqbuf (struct file *file, void *priv, struct v4l2_buffer *p)
|
||||
file->f_flags & O_NONBLOCK));
|
||||
}
|
||||
|
||||
#ifdef HAVE_V4L1
|
||||
#ifdef CONFIG_V4L1_COMPAT
|
||||
static int vidiocgmbuf (struct file *file, void *priv, struct video_mbuf *mbuf)
|
||||
{
|
||||
struct vivi_fh *fh=priv;
|
||||
@ -1328,7 +1328,7 @@ static struct video_device vivi = {
|
||||
.vidioc_s_ctrl = vidioc_s_ctrl,
|
||||
.vidioc_streamon = vidioc_streamon,
|
||||
.vidioc_streamoff = vidioc_streamoff,
|
||||
#ifdef HAVE_V4L1
|
||||
#ifdef CONFIG_V4L1_COMPAT
|
||||
.vidiocgmbuf = vidiocgmbuf,
|
||||
#endif
|
||||
.tvnorms = tvnorms,
|
||||
|
@ -29,7 +29,7 @@ config ATALK
|
||||
even politically correct people are allowed to say Y here.
|
||||
|
||||
config DEV_APPLETALK
|
||||
bool "Appletalk interfaces support"
|
||||
tristate "Appletalk interfaces support"
|
||||
depends on ATALK
|
||||
help
|
||||
AppleTalk is the protocol that Apple computers can use to communicate
|
||||
|
@ -3127,7 +3127,7 @@ e1000_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
break;
|
||||
}
|
||||
|
||||
/* NOTE: dev_alloc_skb reserves 16 bytes, and typically NET_IP_ALIGN
|
||||
/* NOTE: netdev_alloc_skb reserves 16 bytes, and typically NET_IP_ALIGN
|
||||
* means we reserve 2 more, this pushes us to allocate from the next
|
||||
* larger slab size
|
||||
* i.e. RXBUFFER_2048 --> size-4096 slab */
|
||||
@ -3708,7 +3708,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
|
||||
#define E1000_CB_LENGTH 256
|
||||
if (length < E1000_CB_LENGTH) {
|
||||
struct sk_buff *new_skb =
|
||||
dev_alloc_skb(length + NET_IP_ALIGN);
|
||||
netdev_alloc_skb(netdev, length + NET_IP_ALIGN);
|
||||
if (new_skb) {
|
||||
skb_reserve(new_skb, NET_IP_ALIGN);
|
||||
new_skb->dev = netdev;
|
||||
@ -3979,7 +3979,7 @@ e1000_alloc_rx_buffers(struct e1000_adapter *adapter,
|
||||
|
||||
while (cleaned_count--) {
|
||||
if (!(skb = buffer_info->skb))
|
||||
skb = dev_alloc_skb(bufsz);
|
||||
skb = netdev_alloc_skb(netdev, bufsz);
|
||||
else {
|
||||
skb_trim(skb, 0);
|
||||
goto map_skb;
|
||||
@ -3997,7 +3997,7 @@ e1000_alloc_rx_buffers(struct e1000_adapter *adapter,
|
||||
DPRINTK(RX_ERR, ERR, "skb align check failed: %u bytes "
|
||||
"at %p\n", bufsz, skb->data);
|
||||
/* Try again, without freeing the previous */
|
||||
skb = dev_alloc_skb(bufsz);
|
||||
skb = netdev_alloc_skb(netdev, bufsz);
|
||||
/* Failed allocation, critical failure */
|
||||
if (!skb) {
|
||||
dev_kfree_skb(oldskb);
|
||||
@ -4121,7 +4121,8 @@ e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
|
||||
rx_desc->read.buffer_addr[j+1] = ~0;
|
||||
}
|
||||
|
||||
skb = dev_alloc_skb(adapter->rx_ps_bsize0 + NET_IP_ALIGN);
|
||||
skb = netdev_alloc_skb(netdev,
|
||||
adapter->rx_ps_bsize0 + NET_IP_ALIGN);
|
||||
|
||||
if (unlikely(!skb)) {
|
||||
adapter->alloc_rx_buff_failed++;
|
||||
|
@ -177,6 +177,7 @@ struct myri10ge_priv {
|
||||
struct work_struct watchdog_work;
|
||||
struct timer_list watchdog_timer;
|
||||
int watchdog_tx_done;
|
||||
int watchdog_tx_req;
|
||||
int watchdog_resets;
|
||||
int tx_linearized;
|
||||
int pause;
|
||||
@ -448,6 +449,7 @@ static int myri10ge_load_hotplug_firmware(struct myri10ge_priv *mgp, u32 * size)
|
||||
struct mcp_gen_header *hdr;
|
||||
size_t hdr_offset;
|
||||
int status;
|
||||
unsigned i;
|
||||
|
||||
if ((status = request_firmware(&fw, mgp->fw_name, dev)) < 0) {
|
||||
dev_err(dev, "Unable to load %s firmware image via hotplug\n",
|
||||
@ -479,18 +481,12 @@ static int myri10ge_load_hotplug_firmware(struct myri10ge_priv *mgp, u32 * size)
|
||||
goto abort_with_fw;
|
||||
|
||||
crc = crc32(~0, fw->data, fw->size);
|
||||
if (mgp->tx.boundary == 2048) {
|
||||
/* Avoid PCI burst on chipset with unaligned completions. */
|
||||
int i;
|
||||
__iomem u32 *ptr = (__iomem u32 *) (mgp->sram +
|
||||
MYRI10GE_FW_OFFSET);
|
||||
for (i = 0; i < fw->size / 4; i++) {
|
||||
__raw_writel(((u32 *) fw->data)[i], ptr + i);
|
||||
wmb();
|
||||
}
|
||||
} else {
|
||||
myri10ge_pio_copy(mgp->sram + MYRI10GE_FW_OFFSET, fw->data,
|
||||
fw->size);
|
||||
for (i = 0; i < fw->size; i += 256) {
|
||||
myri10ge_pio_copy(mgp->sram + MYRI10GE_FW_OFFSET + i,
|
||||
fw->data + i,
|
||||
min(256U, (unsigned)(fw->size - i)));
|
||||
mb();
|
||||
readb(mgp->sram);
|
||||
}
|
||||
/* corruption checking is good for parity recovery and buggy chipset */
|
||||
memcpy_fromio(fw->data, mgp->sram + MYRI10GE_FW_OFFSET, fw->size);
|
||||
@ -2547,7 +2543,8 @@ static void myri10ge_watchdog_timer(unsigned long arg)
|
||||
|
||||
mgp = (struct myri10ge_priv *)arg;
|
||||
if (mgp->tx.req != mgp->tx.done &&
|
||||
mgp->tx.done == mgp->watchdog_tx_done)
|
||||
mgp->tx.done == mgp->watchdog_tx_done &&
|
||||
mgp->watchdog_tx_req != mgp->watchdog_tx_done)
|
||||
/* nic seems like it might be stuck.. */
|
||||
schedule_work(&mgp->watchdog_work);
|
||||
else
|
||||
@ -2556,6 +2553,7 @@ static void myri10ge_watchdog_timer(unsigned long arg)
|
||||
jiffies + myri10ge_watchdog_timeout * HZ);
|
||||
|
||||
mgp->watchdog_tx_done = mgp->tx.done;
|
||||
mgp->watchdog_tx_req = mgp->tx.req;
|
||||
}
|
||||
|
||||
static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
@ -419,9 +419,8 @@ void phy_start_machine(struct phy_device *phydev,
|
||||
|
||||
/* phy_stop_machine
|
||||
*
|
||||
* description: Stops the state machine timer, sets the state to
|
||||
* UP (unless it wasn't up yet), and then frees the interrupt,
|
||||
* if it is in use. This function must be called BEFORE
|
||||
* description: Stops the state machine timer, sets the state to UP
|
||||
* (unless it wasn't up yet). This function must be called BEFORE
|
||||
* phy_detach.
|
||||
*/
|
||||
void phy_stop_machine(struct phy_device *phydev)
|
||||
@ -433,9 +432,6 @@ void phy_stop_machine(struct phy_device *phydev)
|
||||
phydev->state = PHY_UP;
|
||||
spin_unlock(&phydev->lock);
|
||||
|
||||
if (phydev->irq != PHY_POLL)
|
||||
phy_stop_interrupts(phydev);
|
||||
|
||||
phydev->adjust_state = NULL;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user