diff --git a/[refs] b/[refs] index 8aa0eb975ee9..7f086ae46269 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2655e2cee2d77459fcb7e10228259e4ee0328697 +refs/heads/master: cacd40e07c5ad7068221b3910098f1d364e74e45 diff --git a/trunk/Documentation/local_ops.txt b/trunk/Documentation/local_ops.txt index 1a45f11e645e..4269a1105b37 100644 --- a/trunk/Documentation/local_ops.txt +++ b/trunk/Documentation/local_ops.txt @@ -45,29 +45,6 @@ long fails. The definition looks like : typedef struct { atomic_long_t a; } local_t; -* Rules to follow when using local atomic operations - -- Variables touched by local ops must be per cpu variables. -- _Only_ the CPU owner of these variables must write to them. -- This CPU can use local ops from any context (process, irq, softirq, nmi, ...) - to update its local_t variables. -- Preemption (or interrupts) must be disabled when using local ops in - process context to make sure the process won't be migrated to a - different CPU between getting the per-cpu variable and doing the - actual local op. -- When using local ops in interrupt context, no special care must be - taken on a mainline kernel, since they will run on the local CPU with - preemption already disabled. I suggest, however, to explicitly - disable preemption anyway to make sure it will still work correctly on - -rt kernels. -- Reading the local cpu variable will provide the current copy of the - variable. -- Reads of these variables can be done from any CPU, because updates to - "long", aligned, variables are always atomic. Since no memory - synchronization is done by the writer CPU, an outdated copy of the - variable can be read when reading some _other_ cpu's variables. - - * Rules to follow when using local atomic operations - Variables touched by local ops must be per cpu variables. diff --git a/trunk/Documentation/video4linux/CARDLIST.em28xx b/trunk/Documentation/video4linux/CARDLIST.em28xx index 37f0e3cedf43..a3026689bbe6 100644 --- a/trunk/Documentation/video4linux/CARDLIST.em28xx +++ b/trunk/Documentation/video4linux/CARDLIST.em28xx @@ -8,7 +8,4 @@ 7 -> Leadtek Winfast USB II (em2800) 8 -> Kworld USB2800 (em2800) 9 -> Pinnacle Dazzle DVC 90 (em2820/em2840) [2304:0207] - 10 -> Hauppauge WinTV HVR 900 (em2880) - 11 -> Terratec Hybrid XS (em2880) 12 -> Kworld PVR TV 2800 RF (em2820/em2840) - 13 -> Terratec Prodigy XS (em2880) diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 1c7c229a0926..6c0e44bbf601 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -2549,7 +2549,7 @@ S: Supported MISCELLANEOUS MCA-SUPPORT P: James Bottomley -M: James.Bottomley@HansenPartnership.com +M: jejb@steeleye.com L: linux-kernel@vger.kernel.org S: Maintained @@ -3301,11 +3301,9 @@ S: Maintained SCSI SUBSYSTEM P: James E.J. Bottomley -M: James.Bottomley@HansenPartnership.com +M: James.Bottomley@SteelEye.com L: linux-scsi@vger.kernel.org T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git -T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git -T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-pending-2.6.git S: Maintained SCSI TAPE DRIVER diff --git a/trunk/Makefile b/trunk/Makefile index cb740d4d4e8c..188c3b6b3fa9 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -528,22 +528,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments -# But warn user when we do so -warn-assign = \ -$(warning "WARNING: Appending $$K$(1) ($(K$(1))) from $(origin K$(1)) to kernel $$$(1)") - -ifneq ($(KCPPFLAGS),) - $(call warn-assign,CPPFLAGS) - KBUILD_CPPFLAGS += $(KCPPFLAGS) -endif -ifneq ($(KAFLAGS),) - $(call warn-assign,AFLAGS) - KBUILD_AFLAGS += $(KAFLAGS) -endif -ifneq ($(KCFLAGS),) - $(call warn-assign,CFLAGS) - KBUILD_CFLAGS += $(KCFLAGS) -endif +KBUILD_CPPFLAGS += $(CPPFLAGS) +KBUILD_AFLAGS += $(AFLAGS) +KBUILD_CFLAGS += $(CFLAGS) # Use --build-id when available. LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ diff --git a/trunk/arch/s390/kernel/early.c b/trunk/arch/s390/kernel/early.c index 8bf4ae1150be..e6289ee74ecd 100644 --- a/trunk/arch/s390/kernel/early.c +++ b/trunk/arch/s390/kernel/early.c @@ -200,13 +200,11 @@ static noinline __init void find_memory_chunks(unsigned long memsize) cc = __tprot(addr); while (cc == old_cc) { addr += CHUNK_INCR; - if (addr >= memsize) - break; + cc = __tprot(addr); #ifndef CONFIG_64BIT if (addr == ADDR2G) break; #endif - cc = __tprot(addr); } if (old_addr != addr && diff --git a/trunk/arch/s390/kernel/process.c b/trunk/arch/s390/kernel/process.c index 29f7884b4ffa..96492cf2d491 100644 --- a/trunk/arch/s390/kernel/process.c +++ b/trunk/arch/s390/kernel/process.c @@ -92,7 +92,6 @@ EXPORT_SYMBOL(unregister_idle_notifier); void do_monitor_call(struct pt_regs *regs, long interruption_code) { -#ifdef CONFIG_SMP struct s390_idle_data *idle; idle = &__get_cpu_var(s390_idle); @@ -100,7 +99,7 @@ void do_monitor_call(struct pt_regs *regs, long interruption_code) idle->idle_time += get_clock() - idle->idle_enter; idle->in_idle = 0; spin_unlock(&idle->lock); -#endif + /* disable monitor call class 0 */ __ctl_clear_bit(8, 15); @@ -115,9 +114,7 @@ extern void s390_handle_mcck(void); static void default_idle(void) { int cpu, rc; -#ifdef CONFIG_SMP struct s390_idle_data *idle; -#endif /* CPU is going idle. */ cpu = smp_processor_id(); @@ -154,14 +151,13 @@ static void default_idle(void) s390_handle_mcck(); return; } -#ifdef CONFIG_SMP + idle = &__get_cpu_var(s390_idle); spin_lock(&idle->lock); idle->idle_count++; idle->in_idle = 1; idle->idle_enter = get_clock(); spin_unlock(&idle->lock); -#endif trace_hardirqs_on(); /* Wait for external, I/O or machine check interrupt. */ __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT | diff --git a/trunk/arch/s390/kernel/smp.c b/trunk/arch/s390/kernel/smp.c index b05ae8584258..1d97fe1c0e53 100644 --- a/trunk/arch/s390/kernel/smp.c +++ b/trunk/arch/s390/kernel/smp.c @@ -788,14 +788,14 @@ static ssize_t show_idle_time(struct sys_device *dev, char *buf) } new_time = idle->idle_time; spin_unlock_irq(&idle->lock); - return sprintf(buf, "%llu\n", new_time >> 12); + return sprintf(buf, "%llu us\n", new_time >> 12); } -static SYSDEV_ATTR(idle_time_us, 0444, show_idle_time, NULL); +static SYSDEV_ATTR(idle_time, 0444, show_idle_time, NULL); static struct attribute *cpu_attrs[] = { &attr_capability.attr, &attr_idle_count.attr, - &attr_idle_time_us.attr, + &attr_idle_time.attr, NULL, }; diff --git a/trunk/arch/s390/kernel/time.c b/trunk/arch/s390/kernel/time.c index a963fe81359e..48dae49bc1ec 100644 --- a/trunk/arch/s390/kernel/time.c +++ b/trunk/arch/s390/kernel/time.c @@ -307,7 +307,7 @@ static cycle_t read_tod_clock(void) static struct clocksource clocksource_tod = { .name = "tod", - .rating = 400, + .rating = 100, .read = read_tod_clock, .mask = -1ULL, .mult = 1000, diff --git a/trunk/arch/um/Makefile b/trunk/arch/um/Makefile index 768a5d14b755..82c2ac48040d 100644 --- a/trunk/arch/um/Makefile +++ b/trunk/arch/um/Makefile @@ -70,12 +70,9 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) # in KBUILD_CFLAGS. Otherwise, it would cause ld to complain about the two different # errnos. # These apply to kernelspace only. -# -# strip leading and trailing whitespace to make the USER_CFLAGS removal of these -# defines more robust -KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ - -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)) +KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ + -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) KBUILD_CFLAGS += $(KERNEL_DEFINES) KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,) diff --git a/trunk/arch/um/drivers/ubd_kern.c b/trunk/arch/um/drivers/ubd_kern.c index 7e6cdde62ead..e184b44b1011 100644 --- a/trunk/arch/um/drivers/ubd_kern.c +++ b/trunk/arch/um/drivers/ubd_kern.c @@ -705,7 +705,7 @@ static int ubd_add(int n, char **error_out) ubd_dev->size = ROUND_BLOCK(ubd_dev->size); INIT_LIST_HEAD(&ubd_dev->restart); - sg_init_table(ubd_dev->sg, MAX_SG); + sg_init_table(&ubd_dev->sg, MAX_SG); err = -ENOMEM; ubd_dev->queue = blk_init_queue(do_ubd_request, &ubd_dev->lock); diff --git a/trunk/arch/x86/boot/pmjump.S b/trunk/arch/x86/boot/pmjump.S index fa6bed1fac14..2e559233725a 100644 --- a/trunk/arch/x86/boot/pmjump.S +++ b/trunk/arch/x86/boot/pmjump.S @@ -28,19 +28,17 @@ * void protected_mode_jump(u32 entrypoint, u32 bootparams); */ protected_mode_jump: + xorl %ebx, %ebx # Flag to indicate this is a boot movl %edx, %esi # Pointer to boot_params table movl %eax, 2f # Patch ljmpl instruction + jmp 1f # Short jump to flush instruction q. +1: movw $__BOOT_DS, %cx - xorl %ebx, %ebx # Per the 32-bit boot protocol - xorl %ebp, %ebp # Per the 32-bit boot protocol - xorl %edi, %edi # Per the 32-bit boot protocol movl %cr0, %edx orb $1, %dl # Protected mode (PE) bit movl %edx, %cr0 - jmp 1f # Short jump to serialize on 386/486 -1: movw %cx, %ds movw %cx, %es diff --git a/trunk/arch/x86/lguest/boot.c b/trunk/arch/x86/lguest/boot.c index 92c56117eae5..a55b0902f9d3 100644 --- a/trunk/arch/x86/lguest/boot.c +++ b/trunk/arch/x86/lguest/boot.c @@ -93,7 +93,38 @@ struct lguest_data lguest_data = { }; static cycle_t clock_base; -/*G:037 async_hcall() is pretty simple: I'm quite proud of it really. We have a +/*G:035 Notice the lazy_hcall() above, rather than hcall(). This is our first + * real optimization trick! + * + * When lazy_mode is set, it means we're allowed to defer all hypercalls and do + * them as a batch when lazy_mode is eventually turned off. Because hypercalls + * are reasonably expensive, batching them up makes sense. For example, a + * large munmap might update dozens of page table entries: that code calls + * paravirt_enter_lazy_mmu(), does the dozen updates, then calls + * lguest_leave_lazy_mode(). + * + * So, when we're in lazy mode, we call async_hypercall() to store the call for + * future processing. When lazy mode is turned off we issue a hypercall to + * flush the stored calls. + */ +static void lguest_leave_lazy_mode(void) +{ + paravirt_leave_lazy(paravirt_get_lazy_mode()); + hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); +} + +static void lazy_hcall(unsigned long call, + unsigned long arg1, + unsigned long arg2, + unsigned long arg3) +{ + if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) + hcall(call, arg1, arg2, arg3); + else + async_hcall(call, arg1, arg2, arg3); +} + +/* async_hcall() is pretty simple: I'm quite proud of it really. We have a * ring buffer of stored hypercalls which the Host will run though next time we * do a normal hypercall. Each entry in the ring has 4 slots for the hypercall * arguments, and a "hcall_status" word which is 0 if the call is ready to go, @@ -103,8 +134,8 @@ static cycle_t clock_base; * full and we just make the hypercall directly. This has the nice side * effect of causing the Host to run all the stored calls in the ring buffer * which empties it for next time! */ -static void async_hcall(unsigned long call, unsigned long arg1, - unsigned long arg2, unsigned long arg3) +void async_hcall(unsigned long call, + unsigned long arg1, unsigned long arg2, unsigned long arg3) { /* Note: This code assumes we're uniprocessor. */ static unsigned int next_call; @@ -130,37 +161,7 @@ static void async_hcall(unsigned long call, unsigned long arg1, } local_irq_restore(flags); } - -/*G:035 Notice the lazy_hcall() above, rather than hcall(). This is our first - * real optimization trick! - * - * When lazy_mode is set, it means we're allowed to defer all hypercalls and do - * them as a batch when lazy_mode is eventually turned off. Because hypercalls - * are reasonably expensive, batching them up makes sense. For example, a - * large munmap might update dozens of page table entries: that code calls - * paravirt_enter_lazy_mmu(), does the dozen updates, then calls - * lguest_leave_lazy_mode(). - * - * So, when we're in lazy mode, we call async_hcall() to store the call for - * future processing. */ -static void lazy_hcall(unsigned long call, - unsigned long arg1, - unsigned long arg2, - unsigned long arg3) -{ - if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) - hcall(call, arg1, arg2, arg3); - else - async_hcall(call, arg1, arg2, arg3); -} - -/* When lazy mode is turned off reset the per-cpu lazy mode variable and then - * issue a hypercall to flush any stored calls. */ -static void lguest_leave_lazy_mode(void) -{ - paravirt_leave_lazy(paravirt_get_lazy_mode()); - hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); -} +/*:*/ /*G:033 * After that diversion we return to our first native-instruction diff --git a/trunk/drivers/ata/ata_piix.c b/trunk/drivers/ata/ata_piix.c index f08cca21702c..a4b2cb29f46c 100644 --- a/trunk/drivers/ata/ata_piix.c +++ b/trunk/drivers/ata/ata_piix.c @@ -621,7 +621,6 @@ struct ich_laptop { static const struct ich_laptop ich_laptop[] = { /* devid, subvendor, subdev */ { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */ - { 0x27DF, 0x1025, 0x0102 }, /* ICH7 on Acer 5602aWLMi */ { 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */ { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ { 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */ diff --git a/trunk/drivers/block/paride/pt.c b/trunk/drivers/block/paride/pt.c index b91accf12656..9f4e67ee1eb0 100644 --- a/trunk/drivers/block/paride/pt.c +++ b/trunk/drivers/block/paride/pt.c @@ -664,7 +664,7 @@ static int pt_open(struct inode *inode, struct file *file) goto out; err = -EROFS; - if ((!(tape->flags & PT_WRITE_OK)) && (file->f_mode & 2)) + if ((!tape->flags & PT_WRITE_OK) && (file->f_mode & 2)) goto out; if (!(iminor(inode) & 128)) diff --git a/trunk/drivers/char/virtio_console.c b/trunk/drivers/char/virtio_console.c index e34da5c97196..100e8a201e3a 100644 --- a/trunk/drivers/char/virtio_console.c +++ b/trunk/drivers/char/virtio_console.c @@ -141,7 +141,7 @@ int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)) * never remove the console device we never need this pointer again. * * Finally we put our input buffer in the input queue, ready to receive. */ -static int __devinit virtcons_probe(struct virtio_device *dev) +static int virtcons_probe(struct virtio_device *dev) { int err; struct hvc_struct *hvc; diff --git a/trunk/drivers/ide/Kconfig b/trunk/drivers/ide/Kconfig index d1e8df187222..6eaece96524e 100644 --- a/trunk/drivers/ide/Kconfig +++ b/trunk/drivers/ide/Kconfig @@ -152,22 +152,9 @@ config BLK_DEV_IDEDISK If unsure, say Y. config IDEDISK_MULTI_MODE - bool "Use multiple sector mode for Programmed Input/Output by default" - help - This setting is irrelevant for most IDE disks, with direct memory - access, to which multiple sector mode does not apply. Multiple sector - mode is a feature of most modern IDE hard drives, permitting the - transfer of multiple sectors per Programmed Input/Output interrupt, - rather than the usual one sector per interrupt. When this feature is - enabled, it can reduce operating system overhead for disk Programmed - Input/Output. On some systems, it also can increase the data - throughput of Programmed Input/Output. Some drives, however, seemed - to run slower with multiple sector mode enabled. Some drives claimed - to support multiple sector mode, but lost data at some settings. - Under rare circumstances, such failures could result in massive - filesystem corruption. - - If you get the following error, try to say Y here: + bool "Use multi-mode by default" + help + If you get this error, try to say Y here: hda: set_multmode: status=0x51 { DriveReady SeekComplete Error } hda: set_multmode: error=0x04 { DriveStatusError } @@ -393,10 +380,9 @@ config IDEPCI_SHARE_IRQ config IDEPCI_PCIBUS_ORDER def_bool BLK_DEV_IDE=y && BLK_DEV_IDEPCI -# TODO: split it on per host driver config options (or module parameters) config BLK_DEV_OFFBOARD bool "Boot off-board chipsets first support" - depends on BLK_DEV_IDEPCI && (BLK_DEV_AEC62XX || BLK_DEV_GENERIC || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_PDC202XX_NEW || BLK_DEV_PDC202XX_OLD || BLK_DEV_TC86C001) + depends on BLK_DEV_IDEPCI help Normally, IDE controllers built into the motherboard (on-board controllers) are assigned to ide0 and ide1 while those on add-in PCI diff --git a/trunk/drivers/ide/ide-dma.c b/trunk/drivers/ide/ide-dma.c index e3add70b9cd8..428f7a8a00b6 100644 --- a/trunk/drivers/ide/ide-dma.c +++ b/trunk/drivers/ide/ide-dma.c @@ -340,7 +340,7 @@ static int config_drive_for_dma (ide_drive_t *drive) if (drive->media != ide_disk) { if (hwif->host_flags & IDE_HFLAG_NO_ATAPI_DMA) - return 0; + return -1; } /* @@ -752,8 +752,7 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode) mode = XFER_MW_DMA_1; } - printk(KERN_DEBUG "%s: %s mode selected\n", drive->name, - mode ? ide_xfer_verbose(mode) : "no DMA"); + printk(KERN_DEBUG "%s: selected mode 0x%x\n", drive->name, mode); return min(mode, req_mode); } diff --git a/trunk/drivers/ide/ide-io.c b/trunk/drivers/ide/ide-io.c index 755011827afa..c89f0d3058e9 100644 --- a/trunk/drivers/ide/ide-io.c +++ b/trunk/drivers/ide/ide-io.c @@ -340,8 +340,6 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) if (args) { args[0] = stat; args[1] = err; - /* be sure we're looking at the low order bits */ - hwif->OUTB(drive->ctl & ~0x80, IDE_CONTROL_REG); args[2] = hwif->INB(IDE_NSECTOR_REG); args[3] = hwif->INB(IDE_SECTOR_REG); args[4] = hwif->INB(IDE_LCYL_REG); @@ -656,8 +654,7 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive) int retries = 10; local_irq_enable_in_hardirq(); - if (rq->cmd_type == REQ_TYPE_ATA_CMD && - (stat & DRQ_STAT) && args && args[3]) { + if ((stat & DRQ_STAT) && args && args[3]) { u8 io_32bit = drive->io_32bit; drive->io_32bit = 0; hwif->ata_input_data(drive, &args[4], args[3] * SECTOR_WORDS); diff --git a/trunk/drivers/ide/ide-iops.c b/trunk/drivers/ide/ide-iops.c index e17a9ee120ea..dcda0f109df5 100644 --- a/trunk/drivers/ide/ide-iops.c +++ b/trunk/drivers/ide/ide-iops.c @@ -403,12 +403,8 @@ void ide_fix_driveid (struct hd_driveid *id) #endif } -/* - * ide_fixstring() cleans up and (optionally) byte-swaps a text string, - * removing leading/trailing blanks and compressing internal blanks. - * It is primarily used to tidy up the model name/number fields as - * returned by the WIN_[P]IDENTIFY commands. - */ +/* FIXME: exported for use by the USB storage (isd200.c) code only */ +EXPORT_SYMBOL(ide_fix_driveid); void ide_fixstring (u8 *s, const int bytecount, const int byteswap) { diff --git a/trunk/drivers/ide/ide-probe.c b/trunk/drivers/ide/ide-probe.c index 56fb0b843429..6a6f2e066b46 100644 --- a/trunk/drivers/ide/ide-probe.c +++ b/trunk/drivers/ide/ide-probe.c @@ -172,12 +172,11 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) ide_fixstring(id->fw_rev, sizeof(id->fw_rev), bswap); ide_fixstring(id->serial_no, sizeof(id->serial_no), bswap); - /* we depend on this a lot! */ - id->model[sizeof(id->model)-1] = '\0'; - if (strstr(id->model, "E X A B Y T E N E S T")) goto err_misc; + /* we depend on this a lot! */ + id->model[sizeof(id->model)-1] = '\0'; printk("%s: %s, ", drive->name, id->model); drive->present = 1; drive->dead = 0; diff --git a/trunk/drivers/ide/ide-taskfile.c b/trunk/drivers/ide/ide-taskfile.c index 2b60f1b0437e..d066546f2831 100644 --- a/trunk/drivers/ide/ide-taskfile.c +++ b/trunk/drivers/ide/ide-taskfile.c @@ -471,7 +471,6 @@ static int ide_diag_taskfile(ide_drive_t *drive, ide_task_t *args, unsigned long struct request rq; memset(&rq, 0, sizeof(rq)); - rq.ref_count = 1; rq.cmd_type = REQ_TYPE_ATA_TASKFILE; rq.buffer = buf; @@ -512,7 +511,6 @@ int ide_raw_taskfile (ide_drive_t *drive, ide_task_t *args, u8 *buf) EXPORT_SYMBOL(ide_raw_taskfile); -#ifdef CONFIG_IDE_TASK_IOCTL int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) { ide_task_request_t *req_task; @@ -662,7 +660,6 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) return err; } -#endif int ide_wait_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors, u8 *buf) { diff --git a/trunk/drivers/ide/pci/piix.c b/trunk/drivers/ide/pci/piix.c index 63625a0be712..9329d4a810e5 100644 --- a/trunk/drivers/ide/pci/piix.c +++ b/trunk/drivers/ide/pci/piix.c @@ -302,7 +302,6 @@ struct ich_laptop { static const struct ich_laptop ich_laptop[] = { /* devid, subvendor, subdev */ - { 0x27DF, 0x1025, 0x0102 }, /* ICH7 on Acer 5602aWLMi */ { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */ { 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */ { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ diff --git a/trunk/drivers/isdn/hisax/Kconfig b/trunk/drivers/isdn/hisax/Kconfig index 7832d8ba8e44..a3b945ac3256 100644 --- a/trunk/drivers/isdn/hisax/Kconfig +++ b/trunk/drivers/isdn/hisax/Kconfig @@ -109,7 +109,7 @@ config HISAX_16_3 config HISAX_TELESPCI bool "Teles PCI" - depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) help This enables HiSax support for the Teles PCI. See on how to configure it. @@ -237,7 +237,7 @@ config HISAX_MIC config HISAX_NETJET bool "NETjet card" - depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) help This enables HiSax support for the NetJet from Traverse Technologies. @@ -248,7 +248,7 @@ config HISAX_NETJET config HISAX_NETJET_U bool "NETspider U card" - depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) help This enables HiSax support for the Netspider U interface ISDN card from Traverse Technologies. @@ -287,7 +287,7 @@ config HISAX_HSTSAPHIR config HISAX_BKM_A4T bool "Telekom A4T card" - depends on PCI && PCI_LEGACY + depends on PCI help This enables HiSax support for the Telekom A4T card. @@ -297,7 +297,7 @@ config HISAX_BKM_A4T config HISAX_SCT_QUADRO bool "Scitel Quadro card" - depends on PCI && PCI_LEGACY + depends on PCI help This enables HiSax support for the Scitel Quadro card. @@ -316,7 +316,7 @@ config HISAX_GAZEL config HISAX_HFC_PCI bool "HFC PCI-Bus cards" - depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) help This enables HiSax support for the HFC-S PCI 2BDS0 based cards. @@ -325,7 +325,7 @@ config HISAX_HFC_PCI config HISAX_W6692 bool "Winbond W6692 based cards" - depends on PCI && PCI_LEGACY + depends on PCI help This enables HiSax support for Winbond W6692 based PCI ISDN cards. @@ -341,7 +341,7 @@ config HISAX_HFC_SX config HISAX_ENTERNOW_PCI bool "Formula-n enter:now PCI card" - depends on HISAX_NETJET && PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) + depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) help This enables HiSax support for the Formula-n enter:now PCI ISDN card. @@ -411,7 +411,7 @@ config HISAX_HFC4S8S config HISAX_FRITZ_PCIPNP tristate "AVM Fritz!Card PCI/PCIv2/PnP support (EXPERIMENTAL)" - depends on PCI && PCI_LEGACY && EXPERIMENTAL + depends on PCI && EXPERIMENTAL help This enables the driver for the AVM Fritz!Card PCI, Fritz!Card PCI v2 and Fritz!Card PnP. diff --git a/trunk/drivers/isdn/hisax/avm_pci.c b/trunk/drivers/isdn/hisax/avm_pci.c index 035d158779df..f8b79783c8b3 100644 --- a/trunk/drivers/isdn/hisax/avm_pci.c +++ b/trunk/drivers/isdn/hisax/avm_pci.c @@ -830,7 +830,7 @@ static int __devinit avm_pnp_setup(struct IsdnCardState *cs) #endif /* __ISAPNP__ */ -#ifndef CONFIG_PCI_LEGACY +#ifndef CONFIG_PCI static int __devinit avm_pci_setup(struct IsdnCardState *cs) { @@ -872,7 +872,7 @@ static int __devinit avm_pci_setup(struct IsdnCardState *cs) return (1); } -#endif /* CONFIG_PCI_LEGACY */ +#endif /* CONFIG_PCI */ int __devinit setup_avm_pcipnp(struct IsdnCard *card) diff --git a/trunk/drivers/isdn/hisax/diva.c b/trunk/drivers/isdn/hisax/diva.c index 2d670856d141..826745078746 100644 --- a/trunk/drivers/isdn/hisax/diva.c +++ b/trunk/drivers/isdn/hisax/diva.c @@ -1148,7 +1148,7 @@ static int __devinit setup_diva_isapnp(struct IsdnCard *card) #endif /* ISAPNP */ -#ifdef CONFIG_PCI_LEGACY +#ifdef CONFIG_PCI static struct pci_dev *dev_diva __devinitdata = NULL; static struct pci_dev *dev_diva_u __devinitdata = NULL; static struct pci_dev *dev_diva201 __devinitdata = NULL; @@ -1229,14 +1229,14 @@ static int __devinit setup_diva_pci(struct IsdnCard *card) return (1); /* card found */ } -#else /* if !CONFIG_PCI_LEGACY */ +#else /* if !CONFIG_PCI */ static int __devinit setup_diva_pci(struct IsdnCard *card) { return (-1); /* card not found; continue search */ } -#endif /* CONFIG_PCI_LEGACY */ +#endif /* CONFIG_PCI */ int __devinit setup_diva(struct IsdnCard *card) diff --git a/trunk/drivers/isdn/hisax/elsa.c b/trunk/drivers/isdn/hisax/elsa.c index d272d8ce6537..948a9b290fd1 100644 --- a/trunk/drivers/isdn/hisax/elsa.c +++ b/trunk/drivers/isdn/hisax/elsa.c @@ -883,7 +883,7 @@ setup_elsa_isa(struct IsdnCard *card) val += 'A' - 3; if (val == 'B' || val == 'C') val ^= 1; - if ((cs->subtyp == ELSA_PCFPRO) && (val == 'G')) + if ((cs->subtyp == ELSA_PCFPRO) && (val = 'G')) val = 'C'; printk(KERN_INFO "Elsa: %s found at %#lx Rev.:%c IRQ %d\n", @@ -1025,7 +1025,7 @@ setup_elsa_pcmcia(struct IsdnCard *card) cs->irq); } -#ifdef CONFIG_PCI_LEGACY +#ifdef CONFIG_PCI static struct pci_dev *dev_qs1000 __devinitdata = NULL; static struct pci_dev *dev_qs3000 __devinitdata = NULL; @@ -1093,7 +1093,7 @@ setup_elsa_pci(struct IsdnCard *card) { return (1); } -#endif /* CONFIG_PCI_LEGACY */ +#endif /* CONFIG_PCI */ static int __devinit setup_elsa_common(struct IsdnCard *card) diff --git a/trunk/drivers/isdn/hisax/gazel.c b/trunk/drivers/isdn/hisax/gazel.c index f66620ad8e7c..3efa719b6d29 100644 --- a/trunk/drivers/isdn/hisax/gazel.c +++ b/trunk/drivers/isdn/hisax/gazel.c @@ -532,7 +532,6 @@ setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs) return (0); } -#ifdef CONFIG_PCI_LEGACY static struct pci_dev *dev_tel __devinitdata = NULL; static int __devinit @@ -621,7 +620,6 @@ setup_gazelpci(struct IsdnCardState *cs) return (0); } -#endif /* CONFIG_PCI_LEGACY */ int __devinit setup_gazel(struct IsdnCard *card) @@ -641,7 +639,7 @@ setup_gazel(struct IsdnCard *card) return (0); } else { -#ifdef CONFIG_PCI_LEGACY +#ifdef CONFIG_PCI if (setup_gazelpci(cs)) return (0); #else diff --git a/trunk/drivers/isdn/hisax/niccy.c b/trunk/drivers/isdn/hisax/niccy.c index bd9921128aa8..e5918c6fe73d 100644 --- a/trunk/drivers/isdn/hisax/niccy.c +++ b/trunk/drivers/isdn/hisax/niccy.c @@ -223,6 +223,7 @@ static int niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg) return 0; } +static struct pci_dev *niccy_dev __devinitdata = NULL; #ifdef __ISAPNP__ static struct pnp_card *pnp_c __devinitdata = NULL; #endif @@ -298,9 +299,7 @@ int __devinit setup_niccy(struct IsdnCard *card) return 0; } } else { -#ifdef CONFIG_PCI_LEGACY - static struct pci_dev *niccy_dev __devinitdata; - +#ifdef CONFIG_PCI u_int pci_ioaddr; cs->subtyp = 0; if ((niccy_dev = pci_find_device(PCI_VENDOR_ID_SATSAGEM, @@ -357,7 +356,7 @@ int __devinit setup_niccy(struct IsdnCard *card) printk(KERN_WARNING "Niccy: io0 0 and NO_PCI_BIOS\n"); printk(KERN_WARNING "Niccy: unable to config NICCY PCI\n"); return 0; -#endif /* CONFIG_PCI_LEGACY */ +#endif /* CONFIG_PCI */ } printk(KERN_INFO "HiSax: %s %s config irq:%d data:0x%X ale:0x%X\n", CardType[cs->typ], (cs->subtyp == 1) ? "PnP" : "PCI", diff --git a/trunk/drivers/isdn/hisax/sedlbauer.c b/trunk/drivers/isdn/hisax/sedlbauer.c index 95425f3d2220..03dfc32166a0 100644 --- a/trunk/drivers/isdn/hisax/sedlbauer.c +++ b/trunk/drivers/isdn/hisax/sedlbauer.c @@ -600,7 +600,7 @@ setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt) } #endif /* __ISAPNP__ */ -#ifdef CONFIG_PCI_LEGACY +#ifdef CONFIG_PCI static struct pci_dev *dev_sedl __devinitdata = NULL; static int __devinit @@ -675,7 +675,7 @@ setup_sedlbauer_pci(struct IsdnCard *card) return (1); } -#endif /* CONFIG_PCI_LEGACY */ +#endif /* CONFIG_PCI */ int __devinit setup_sedlbauer(struct IsdnCard *card) diff --git a/trunk/drivers/leds/leds-gpio.c b/trunk/drivers/leds/leds-gpio.c index 99bc50059d35..47d90db280ce 100644 --- a/trunk/drivers/leds/leds-gpio.c +++ b/trunk/drivers/leds/leds-gpio.c @@ -60,7 +60,7 @@ static void gpio_led_set(struct led_classdev *led_cdev, gpio_set_value(led_dat->gpio, level); } -static int gpio_led_probe(struct platform_device *pdev) +static int __init gpio_led_probe(struct platform_device *pdev) { struct gpio_led_platform_data *pdata = pdev->dev.platform_data; struct gpio_led *cur_led; @@ -93,13 +93,13 @@ static int gpio_led_probe(struct platform_device *pdev) gpio_direction_output(led_dat->gpio, led_dat->active_low); - INIT_WORK(&led_dat->work, gpio_led_work); - ret = led_classdev_register(&pdev->dev, &led_dat->cdev); if (ret < 0) { gpio_free(led_dat->gpio); goto err; } + + INIT_WORK(&led_dat->work, gpio_led_work); } platform_set_drvdata(pdev, leds_data); @@ -110,17 +110,17 @@ static int gpio_led_probe(struct platform_device *pdev) if (i > 0) { for (i = i - 1; i >= 0; i--) { led_classdev_unregister(&leds_data[i].cdev); - cancel_work_sync(&leds_data[i].work); gpio_free(leds_data[i].gpio); } } + flush_scheduled_work(); kfree(leds_data); return ret; } -static int __devexit gpio_led_remove(struct platform_device *pdev) +static int __exit gpio_led_remove(struct platform_device *pdev) { int i; struct gpio_led_platform_data *pdata = pdev->dev.platform_data; @@ -130,10 +130,9 @@ static int __devexit gpio_led_remove(struct platform_device *pdev) for (i = 0; i < pdata->num_leds; i++) { led_classdev_unregister(&leds_data[i].cdev); - cancel_work_sync(&leds_data[i].work); gpio_free(leds_data[i].gpio); } - + kfree(leds_data); return 0; @@ -145,7 +144,7 @@ static int gpio_led_suspend(struct platform_device *pdev, pm_message_t state) struct gpio_led_platform_data *pdata = pdev->dev.platform_data; struct gpio_led_data *leds_data; int i; - + leds_data = platform_get_drvdata(pdev); for (i = 0; i < pdata->num_leds; i++) @@ -173,8 +172,7 @@ static int gpio_led_resume(struct platform_device *pdev) #endif static struct platform_driver gpio_led_driver = { - .probe = gpio_led_probe, - .remove = __devexit_p(gpio_led_remove), + .remove = __exit_p(gpio_led_remove), .suspend = gpio_led_suspend, .resume = gpio_led_resume, .driver = { @@ -185,7 +183,7 @@ static struct platform_driver gpio_led_driver = { static int __init gpio_led_init(void) { - return platform_driver_register(&gpio_led_driver); + return platform_driver_probe(&gpio_led_driver, gpio_led_probe); } static void __exit gpio_led_exit(void) diff --git a/trunk/drivers/md/raid5.c b/trunk/drivers/md/raid5.c index 82af3465a900..80a67d789b72 100644 --- a/trunk/drivers/md/raid5.c +++ b/trunk/drivers/md/raid5.c @@ -2624,13 +2624,6 @@ static void handle_stripe5(struct stripe_head *sh) s.expanded = test_bit(STRIPE_EXPAND_READY, &sh->state); /* Now to look around and see what can be done */ - /* clean-up completed biofill operations */ - if (test_bit(STRIPE_OP_BIOFILL, &sh->ops.complete)) { - clear_bit(STRIPE_OP_BIOFILL, &sh->ops.pending); - clear_bit(STRIPE_OP_BIOFILL, &sh->ops.ack); - clear_bit(STRIPE_OP_BIOFILL, &sh->ops.complete); - } - rcu_read_lock(); for (i=disks; i--; ) { mdk_rdev_t *rdev; @@ -2904,6 +2897,13 @@ static void handle_stripe6(struct stripe_head *sh, struct page *tmp_page) s.expanded = test_bit(STRIPE_EXPAND_READY, &sh->state); /* Now to look around and see what can be done */ + /* clean-up completed biofill operations */ + if (test_bit(STRIPE_OP_BIOFILL, &sh->ops.complete)) { + clear_bit(STRIPE_OP_BIOFILL, &sh->ops.pending); + clear_bit(STRIPE_OP_BIOFILL, &sh->ops.ack); + clear_bit(STRIPE_OP_BIOFILL, &sh->ops.complete); + } + rcu_read_lock(); for (i=disks; i--; ) { mdk_rdev_t *rdev; diff --git a/trunk/drivers/media/Kconfig b/trunk/drivers/media/Kconfig index 1604f0490404..dd9bd4310c84 100644 --- a/trunk/drivers/media/Kconfig +++ b/trunk/drivers/media/Kconfig @@ -151,7 +151,6 @@ config VIDEO_IR_I2C config VIDEO_IR tristate - depends on INPUT select VIDEO_IR_I2C if I2C config VIDEO_TVEEPROM diff --git a/trunk/drivers/media/common/saa7146_core.c b/trunk/drivers/media/common/saa7146_core.c index 7d04a6fd1acb..cb034ead95ab 100644 --- a/trunk/drivers/media/common/saa7146_core.c +++ b/trunk/drivers/media/common/saa7146_core.c @@ -59,89 +59,43 @@ void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data) } /* This DEBI code is based on the saa7146 Stradis driver by Nathan Laredo */ -static inline int saa7146_wait_for_debi_done_sleep(struct saa7146_dev *dev, - unsigned long us1, unsigned long us2) +int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop) { - unsigned long timeout; + unsigned long start; int err; /* wait for registers to be programmed */ - timeout = jiffies + usecs_to_jiffies(us1); + start = jiffies; while (1) { - err = time_after(jiffies, timeout); + err = time_after(jiffies, start + HZ/20); if (saa7146_read(dev, MC2) & 2) break; if (err) { - printk(KERN_ERR "%s: %s timed out while waiting for " - "registers getting programmed\n", - dev->name, __FUNCTION__); + DEB_S(("timed out while waiting for registers getting programmed\n")); return -ETIMEDOUT; } - msleep(1); + if (nobusyloop) + msleep(1); } /* wait for transfer to complete */ - timeout = jiffies + usecs_to_jiffies(us2); + start = jiffies; while (1) { - err = time_after(jiffies, timeout); + err = time_after(jiffies, start + HZ/4); if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S)) break; saa7146_read(dev, MC2); if (err) { - DEB_S(("%s: %s timed out while waiting for transfer " - "completion\n", dev->name, __FUNCTION__)); + DEB_S(("timed out while waiting for transfer completion\n")); return -ETIMEDOUT; } - msleep(1); + if (nobusyloop) + msleep(1); } return 0; } -static inline int saa7146_wait_for_debi_done_busyloop(struct saa7146_dev *dev, - unsigned long us1, unsigned long us2) -{ - unsigned long loops; - - /* wait for registers to be programmed */ - loops = us1; - while (1) { - if (saa7146_read(dev, MC2) & 2) - break; - if (!loops--) { - printk(KERN_ERR "%s: %s timed out while waiting for " - "registers getting programmed\n", - dev->name, __FUNCTION__); - return -ETIMEDOUT; - } - udelay(1); - } - - /* wait for transfer to complete */ - loops = us2 / 5; - while (1) { - if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S)) - break; - saa7146_read(dev, MC2); - if (!loops--) { - DEB_S(("%s: %s timed out while waiting for transfer " - "completion\n", dev->name, __FUNCTION__)); - return -ETIMEDOUT; - } - udelay(5); - } - - return 0; -} - -int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop) -{ - if (nobusyloop) - return saa7146_wait_for_debi_done_sleep(dev, 50000, 250000); - else - return saa7146_wait_for_debi_done_busyloop(dev, 50000, 250000); -} - /**************************************************************************** * general helper functions ****************************************************************************/ diff --git a/trunk/drivers/media/dvb/frontends/mt2131.c b/trunk/drivers/media/dvb/frontends/mt2131.c index 13cf16668171..4b93931de4e1 100644 --- a/trunk/drivers/media/dvb/frontends/mt2131.c +++ b/trunk/drivers/media/dvb/frontends/mt2131.c @@ -116,7 +116,7 @@ static int mt2131_set_params(struct dvb_frontend *fe, f_lo1 = (f_lo1 / 250) * 250; f_lo2 = f_lo1 - freq - MT2131_IF2; - priv->frequency = (f_lo1 - f_lo2 - MT2131_IF2) * 1000; + priv->frequency = (f_lo1 - f_lo2 - MT2131_IF2) * 1000, /* Frequency LO1 = 16MHz * (DIV1 + NUM1/8192 ) */ num1 = f_lo1 * 64 / (MT2131_FREF / 128); diff --git a/trunk/drivers/media/dvb/frontends/s5h1409.c b/trunk/drivers/media/dvb/frontends/s5h1409.c index 8dee7ec9456a..30e8a705fad4 100644 --- a/trunk/drivers/media/dvb/frontends/s5h1409.c +++ b/trunk/drivers/media/dvb/frontends/s5h1409.c @@ -42,9 +42,6 @@ struct s5h1409_state { fe_modulation_t current_modulation; u32 current_frequency; - - u32 is_qam_locked; - u32 qam_state; }; static int debug = 0; @@ -97,7 +94,6 @@ static struct init_tab { { 0xac, 0x1003, }, { 0xad, 0x103f, }, { 0xe2, 0x0100, }, - { 0xe3, 0x0000, }, { 0x28, 0x1010, }, { 0xb1, 0x000e, }, }; @@ -339,8 +335,6 @@ static int s5h1409_softreset(struct dvb_frontend* fe) s5h1409_writereg(state, 0xf5, 0); s5h1409_writereg(state, 0xf5, 1); - state->is_qam_locked = 0; - state->qam_state = 0; return 0; } @@ -355,11 +349,6 @@ static int s5h1409_set_if_freq(struct dvb_frontend* fe, int KHz) s5h1409_writereg(state, 0x87, 0x01be); s5h1409_writereg(state, 0x88, 0x0436); s5h1409_writereg(state, 0x89, 0x054d); - } else - if (KHz == 4000) { - s5h1409_writereg(state, 0x87, 0x014b); - s5h1409_writereg(state, 0x88, 0x0cb5); - s5h1409_writereg(state, 0x89, 0x03e2); } else { printk("%s() Invalid arg = %d KHz\n", __FUNCTION__, KHz); ret = -1; @@ -372,7 +361,7 @@ static int s5h1409_set_spectralinversion(struct dvb_frontend* fe, int inverted) { struct s5h1409_state* state = fe->demodulator_priv; - dprintk("%s(%d)\n", __FUNCTION__, inverted); + dprintk("%s()\n", __FUNCTION__); if(inverted == 1) return s5h1409_writereg(state, 0x1b, 0x1101); /* Inverted */ @@ -393,10 +382,14 @@ static int s5h1409_enable_modulation(struct dvb_frontend* fe, s5h1409_writereg(state, 0xf4, 0); break; case QAM_64: + dprintk("%s() QAM_64\n", __FUNCTION__); + s5h1409_writereg(state, 0xf4, 1); + s5h1409_writereg(state, 0x85, 0x100); + break; case QAM_256: - dprintk("%s() QAM_AUTO (64/256)\n", __FUNCTION__); + dprintk("%s() QAM_256\n", __FUNCTION__); s5h1409_writereg(state, 0xf4, 1); - s5h1409_writereg(state, 0x85, 0x110); + s5h1409_writereg(state, 0x85, 0x101); break; default: dprintk("%s() Invalid modulation\n", __FUNCTION__); @@ -430,7 +423,7 @@ static int s5h1409_set_gpio(struct dvb_frontend* fe, int enable) if (enable) return s5h1409_writereg(state, 0xe3, 0x1100); else - return s5h1409_writereg(state, 0xe3, 0x1000); + return s5h1409_writereg(state, 0xe3, 0); } static int s5h1409_sleep(struct dvb_frontend* fe, int enable) @@ -451,66 +444,6 @@ static int s5h1409_register_reset(struct dvb_frontend* fe) return s5h1409_writereg(state, 0xfa, 0); } -static void s5h1409_set_qam_amhum_mode(struct dvb_frontend *fe) -{ - struct s5h1409_state *state = fe->demodulator_priv; - u16 reg; - - if (state->is_qam_locked) - return; - - /* QAM EQ lock check */ - reg = s5h1409_readreg(state, 0xf0); - - if ((reg >> 13) & 0x1) { - - state->is_qam_locked = 1; - reg &= 0xff; - - s5h1409_writereg(state, 0x96, 0x00c); - if ((reg < 0x38) || (reg > 0x68) ) { - s5h1409_writereg(state, 0x93, 0x3332); - s5h1409_writereg(state, 0x9e, 0x2c37); - } else { - s5h1409_writereg(state, 0x93, 0x3130); - s5h1409_writereg(state, 0x9e, 0x2836); - } - - } else { - s5h1409_writereg(state, 0x96, 0x0008); - s5h1409_writereg(state, 0x93, 0x3332); - s5h1409_writereg(state, 0x9e, 0x2c37); - } -} - -static void s5h1409_set_qam_interleave_mode(struct dvb_frontend *fe) -{ - struct s5h1409_state *state = fe->demodulator_priv; - u16 reg, reg1, reg2; - - reg = s5h1409_readreg(state, 0xf1); - - /* Master lock */ - if ((reg >> 15) & 0x1) { - if (state->qam_state != 2) { - state->qam_state = 2; - reg1 = s5h1409_readreg(state, 0xb2); - reg2 = s5h1409_readreg(state, 0xad); - - s5h1409_writereg(state, 0x96, 0x20); - s5h1409_writereg(state, 0xad, - ( ((reg1 & 0xf000) >> 4) | (reg2 & 0xf0ff)) ); - s5h1409_writereg(state, 0xab, 0x1100); - } - } else { - if (state->qam_state != 1) { - state->qam_state = 1; - s5h1409_writereg(state, 0x96, 0x08); - s5h1409_writereg(state, 0xab, 0x1101); - } - } -} - /* Talk to the demod, set the FEC, GUARD, QAM settings etc */ static int s5h1409_set_frontend (struct dvb_frontend* fe, struct dvb_frontend_parameters *p) @@ -525,21 +458,12 @@ static int s5h1409_set_frontend (struct dvb_frontend* fe, s5h1409_enable_modulation(fe, p->u.vsb.modulation); - /* Allow the demod to settle */ - msleep(100); - if (fe->ops.tuner_ops.set_params) { if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); fe->ops.tuner_ops.set_params(fe, p); if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); } - /* Optimize the demod for QAM */ - if (p->u.vsb.modulation != VSB_8) { - s5h1409_set_qam_amhum_mode(fe); - s5h1409_set_qam_interleave_mode(fe); - } - return 0; } @@ -571,8 +495,8 @@ static int s5h1409_init (struct dvb_frontend* fe) s5h1409_set_gpio(fe, state->config->gpio); s5h1409_softreset(fe); - /* Note: Leaving the I2C gate closed. */ - s5h1409_i2c_gate_ctrl(fe, 0); + /* Note: Leaving the I2C gate open here. */ + s5h1409_i2c_gate_ctrl(fe, 1); return 0; } diff --git a/trunk/drivers/media/dvb/frontends/stv0297.c b/trunk/drivers/media/dvb/frontends/stv0297.c index 7c23775f77db..17e5cb561cd8 100644 --- a/trunk/drivers/media/dvb/frontends/stv0297.c +++ b/trunk/drivers/media/dvb/frontends/stv0297.c @@ -358,23 +358,11 @@ static int stv0297_read_ber(struct dvb_frontend *fe, u32 * ber) static int stv0297_read_signal_strength(struct dvb_frontend *fe, u16 * strength) { struct stv0297_state *state = fe->demodulator_priv; - u8 STRENGTH[3]; - u16 tmp; - - stv0297_readregs(state, 0x41, STRENGTH, 3); - tmp = (STRENGTH[1] & 0x03) << 8 | STRENGTH[0]; - if (STRENGTH[2] & 0x20) { - if (tmp < 0x200) - tmp = 0; - else - tmp = tmp - 0x200; - } else { - if (tmp > 0x1ff) - tmp = 0; - else - tmp = 0x1ff - tmp; - } - *strength = (tmp << 7) | (tmp >> 2); + u8 STRENGTH[2]; + + stv0297_readregs(state, 0x41, STRENGTH, 2); + *strength = (STRENGTH[1] & 0x03) << 8 | STRENGTH[0]; + return 0; } diff --git a/trunk/drivers/media/dvb/frontends/tda10021.c b/trunk/drivers/media/dvb/frontends/tda10021.c index 45137d2ebfb9..4cd9e82c4669 100644 --- a/trunk/drivers/media/dvb/frontends/tda10021.c +++ b/trunk/drivers/media/dvb/frontends/tda10021.c @@ -301,8 +301,6 @@ static int tda10021_read_ber(struct dvb_frontend* fe, u32* ber) u32 _ber = tda10021_readreg(state, 0x14) | (tda10021_readreg(state, 0x15) << 8) | ((tda10021_readreg(state, 0x16) & 0x0f) << 16); - _tda10021_writereg(state, 0x10, (tda10021_readreg(state, 0x10) & ~0xc0) - | (tda10021_inittab[0x10] & 0xc0)); *ber = 10 * _ber; return 0; @@ -312,11 +310,7 @@ static int tda10021_read_signal_strength(struct dvb_frontend* fe, u16* strength) { struct tda10021_state* state = fe->demodulator_priv; - u8 config = tda10021_readreg(state, 0x02); u8 gain = tda10021_readreg(state, 0x17); - if (config & 0x02) - /* the agc value is inverted */ - gain = ~gain; *strength = (gain << 8) | gain; return 0; diff --git a/trunk/drivers/media/dvb/frontends/ves1820.c b/trunk/drivers/media/dvb/frontends/ves1820.c index 60433b5011fd..066b73b75698 100644 --- a/trunk/drivers/media/dvb/frontends/ves1820.c +++ b/trunk/drivers/media/dvb/frontends/ves1820.c @@ -47,7 +47,7 @@ struct ves1820_state { static int verbose; static u8 ves1820_inittab[] = { - 0x69, 0x6A, 0x93, 0x1A, 0x12, 0x46, 0x26, 0x1A, + 0x69, 0x6A, 0x93, 0x12, 0x12, 0x46, 0x26, 0x1A, 0x43, 0x6A, 0xAA, 0xAA, 0x1E, 0x85, 0x43, 0x20, 0xE0, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, diff --git a/trunk/drivers/media/dvb/ttpci/Kconfig b/trunk/drivers/media/dvb/ttpci/Kconfig index 54b91f26ca63..6d53289b3276 100644 --- a/trunk/drivers/media/dvb/ttpci/Kconfig +++ b/trunk/drivers/media/dvb/ttpci/Kconfig @@ -84,7 +84,7 @@ config DVB_BUDGET config DVB_BUDGET_CI tristate "Budget cards with onboard CI connector" - depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 && INPUT + depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 select VIDEO_SAA7146 select DVB_STV0297 if !DVB_FE_CUSTOMISE select DVB_STV0299 if !DVB_FE_CUSTOMISE diff --git a/trunk/drivers/media/video/Kconfig b/trunk/drivers/media/video/Kconfig index c9f14bfc8544..2e571eb9313a 100644 --- a/trunk/drivers/media/video/Kconfig +++ b/trunk/drivers/media/video/Kconfig @@ -363,7 +363,7 @@ endmenu # encoder / decoder chips config VIDEO_VIVI tristate "Virtual Video Driver" - depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 + depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 && PCI select VIDEOBUF_VMALLOC default n ---help--- diff --git a/trunk/drivers/media/video/bt8xx/bttv-driver.c b/trunk/drivers/media/video/bt8xx/bttv-driver.c index a88b56e6ca05..9feeb636ff9b 100644 --- a/trunk/drivers/media/video/bt8xx/bttv-driver.c +++ b/trunk/drivers/media/video/bt8xx/bttv-driver.c @@ -2881,6 +2881,10 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, if (NULL == fmt) return -EINVAL; mutex_lock(&fh->cap.lock); + if (fmt->depth != pic->depth) { + retval = -EINVAL; + goto fh_unlock_and_return; + } if (fmt->flags & FORMAT_FLAGS_RAW) { /* VIDIOCMCAPTURE uses gbufsize, not RAW_BPL * RAW_LINES * 2. F1 is stored at offset 0, F2 @@ -3113,8 +3117,6 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, vm->width,vm->height,field); if (0 != retval) goto fh_unlock_and_return; - btv->init.width = vm->width; - btv->init.height = vm->height; spin_lock_irqsave(&btv->s_lock,flags); buffer_queue(&fh->cap,&buf->vb); spin_unlock_irqrestore(&btv->s_lock,flags); diff --git a/trunk/drivers/media/video/cafe_ccic.c b/trunk/drivers/media/video/cafe_ccic.c index 7ae499c9c54c..b63cab336920 100644 --- a/trunk/drivers/media/video/cafe_ccic.c +++ b/trunk/drivers/media/video/cafe_ccic.c @@ -3,9 +3,6 @@ * multifunction chip. Currently works with the Omnivision OV7670 * sensor. * - * The data sheet for this device can be found at: - * http://www.marvell.com/products/pcconn/88ALP01.jsp - * * Copyright 2006 One Laptop Per Child Association, Inc. * Copyright 2006-7 Jonathan Corbet * @@ -2235,16 +2232,13 @@ static int cafe_pci_suspend(struct pci_dev *pdev, pm_message_t state) { struct cafe_camera *cam = cafe_find_by_pdev(pdev); int ret; - enum cafe_state cstate; ret = pci_save_state(pdev); if (ret) return ret; - cstate = cam->state; /* HACK - stop_dma sets to idle */ cafe_ctlr_stop_dma(cam); cafe_ctlr_power_down(cam); pci_disable_device(pdev); - cam->state = cstate; return 0; } diff --git a/trunk/drivers/media/video/cx23885/Kconfig b/trunk/drivers/media/video/cx23885/Kconfig index d8b1ccb44913..72004a07b2d5 100644 --- a/trunk/drivers/media/video/cx23885/Kconfig +++ b/trunk/drivers/media/video/cx23885/Kconfig @@ -1,6 +1,6 @@ config VIDEO_CX23885 tristate "Conexant cx23885 (2388x successor) support" - depends on DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT + depends on DVB_CORE && VIDEO_DEV && PCI && I2C select I2C_ALGOBIT select FW_LOADER select VIDEO_BTCX diff --git a/trunk/drivers/media/video/cx88/Kconfig b/trunk/drivers/media/video/cx88/Kconfig index ceb31d4a2512..eeb5224ca101 100644 --- a/trunk/drivers/media/video/cx88/Kconfig +++ b/trunk/drivers/media/video/cx88/Kconfig @@ -1,6 +1,6 @@ config VIDEO_CX88 tristate "Conexant 2388x (bt878 successor) support" - depends on VIDEO_DEV && PCI && I2C && INPUT + depends on VIDEO_DEV && PCI && I2C select I2C_ALGOBIT select FW_LOADER select VIDEO_BTCX diff --git a/trunk/drivers/media/video/em28xx/Kconfig b/trunk/drivers/media/video/em28xx/Kconfig index c1127802ad9c..5b6a40371602 100644 --- a/trunk/drivers/media/video/em28xx/Kconfig +++ b/trunk/drivers/media/video/em28xx/Kconfig @@ -1,6 +1,6 @@ config VIDEO_EM28XX tristate "Empia EM2800/2820/2840 USB video capture support" - depends on VIDEO_V4L1 && I2C && INPUT + depends on VIDEO_V4L1 && I2C select VIDEO_TUNER select VIDEO_TVEEPROM select VIDEO_IR diff --git a/trunk/drivers/media/video/em28xx/em28xx-i2c.c b/trunk/drivers/media/video/em28xx/em28xx-i2c.c index e3a4aa7a9df4..997d067e32e0 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-i2c.c +++ b/trunk/drivers/media/video/em28xx/em28xx-i2c.c @@ -416,10 +416,8 @@ static int attach_inform(struct i2c_client *client) struct em28xx *dev = client->adapter->algo_data; switch (client->addr << 1) { - case 0x86: - case 0x84: - case 0x96: - case 0x94: + case 0x43: + case 0x4b: { struct tuner_setup tun_setup; diff --git a/trunk/drivers/media/video/em28xx/em28xx-video.c b/trunk/drivers/media/video/em28xx/em28xx-video.c index 2529c298b862..a4c2a907124a 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-video.c +++ b/trunk/drivers/media/video/em28xx/em28xx-video.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/planb.c b/trunk/drivers/media/video/planb.c index 36047d4e70f6..ce4b2f9791ee 100644 --- a/trunk/drivers/media/video/planb.c +++ b/trunk/drivers/media/video/planb.c @@ -91,6 +91,7 @@ static void planb_close(struct video_device *); static int planb_ioctl(struct video_device *, unsigned int, void *); static int planb_init_done(struct video_device *); static int planb_mmap(struct video_device *, const char *, unsigned long); +static void planb_irq(int, void *); static void release_planb(void); int init_planbs(struct video_init *); @@ -1314,7 +1315,7 @@ static volatile struct dbdma_cmd *setup_grab_cmd(int fr, struct planb *pb) return c1; } -static irqreturn_t planb_irq(int irq, void *dev_id) +static void planb_irq(int irq, void *dev_id) { unsigned int stat, astat; struct planb *pb = (struct planb *)dev_id; @@ -1357,14 +1358,13 @@ static irqreturn_t planb_irq(int irq, void *dev_id) pb->frame_stat[fr] = GBUFFER_DONE; pb->grabbing--; wake_up_interruptible(&pb->capq); - return IRQ_HANDLED; + return; } /* incorrect interrupts? */ pb->intr_mask = PLANB_CLR_IRQ; out_le32(&pb->planb_base->intr_stat, PLANB_CLR_IRQ); printk(KERN_ERR "PlanB: IRQ lockup, cleared intrrupts" " unconditionally\n"); - return IRQ_HANDLED; } /******************************* @@ -2090,7 +2090,7 @@ static int init_planb(struct planb *pb) /* clear interrupt mask */ pb->intr_mask = PLANB_CLR_IRQ; - result = request_irq(pb->irq, planb_irq, 0, "PlanB", pb); + result = request_irq(pb->irq, planb_irq, 0, "PlanB", (void *)pb); if (result < 0) { if (result==-EINVAL) printk(KERN_ERR "PlanB: Bad irq number (%d) " diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-ctrl.c index 46f156fb108c..f569b00201dd 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-ctrl.c @@ -410,7 +410,7 @@ static int parse_mtoken(const char *ptr,unsigned int len, int msk; *valptr = 0; for (idx = 0, msk = 1; valid_bits; idx++, msk <<= 1) { - if (!(msk & valid_bits)) continue; + if (!msk & valid_bits) continue; valid_bits &= ~msk; if (!names[idx]) continue; slen = strlen(names[idx]); diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-main.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-main.c index 11b3b2e84b90..ca9e2789c8ca 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-main.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-main.c @@ -136,13 +136,14 @@ static int __init pvr_init(void) static void __exit pvr_exit(void) { - pvr2_trace(PVR2_TRACE_INIT,"pvr_exit"); - usb_deregister(&pvr_driver); + pvr2_trace(PVR2_TRACE_INIT,"pvr_exit"); #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS pvr2_sysfs_class_destroy(class_ptr); #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ + + usb_deregister(&pvr_driver); } module_init(pvr_init); diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-sysfs.c index 3c57a7d8200b..2ee3c3049e8f 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-sysfs.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-sysfs.c @@ -905,6 +905,13 @@ struct pvr2_sysfs *pvr2_sysfs_create(struct pvr2_context *mp, } +static int pvr2_sysfs_hotplug(struct device *d, + struct kobj_uevent_env *env) +{ + /* Even though we don't do anything here, we still need this function + because sysfs will still try to call it. */ + return 0; +} struct pvr2_sysfs_class *pvr2_sysfs_class_create(void) { @@ -915,6 +922,7 @@ struct pvr2_sysfs_class *pvr2_sysfs_class_create(void) clp->class.name = "pvrusb2"; clp->class.class_release = pvr2_sysfs_class_release; clp->class.dev_release = pvr2_sysfs_release; + clp->class.dev_uevent = pvr2_sysfs_hotplug; if (class_register(&clp->class)) { pvr2_sysfs_trace( "Registration failed for pvr2_sysfs_class id=%p",clp); diff --git a/trunk/drivers/media/video/saa7134/Kconfig b/trunk/drivers/media/video/saa7134/Kconfig index 3aa8cb2b860a..d6d8d660196d 100644 --- a/trunk/drivers/media/video/saa7134/Kconfig +++ b/trunk/drivers/media/video/saa7134/Kconfig @@ -1,6 +1,6 @@ config VIDEO_SAA7134 tristate "Philips SAA7134 support" - depends on VIDEO_DEV && PCI && I2C && INPUT + depends on VIDEO_DEV && PCI && I2C select VIDEOBUF_DMA_SG select VIDEO_IR select VIDEO_TUNER diff --git a/trunk/drivers/media/video/saa7134/saa7134-alsa.c b/trunk/drivers/media/video/saa7134/saa7134-alsa.c index b9c5cf7dc849..c6f7279669c1 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-alsa.c +++ b/trunk/drivers/media/video/saa7134/saa7134-alsa.c @@ -543,10 +543,8 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, V4L functions, and force ALSA to use that as the DMA area */ substream->runtime->dma_area = dev->dmasound.dma.vmalloc; - substream->runtime->dma_bytes = dev->dmasound.bufsize; - substream->runtime->dma_addr = 0; - return 0; + return 1; } @@ -653,17 +651,6 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream) return 0; } -/* - * page callback (needed for mmap) - */ - -static struct page *snd_card_saa7134_page(struct snd_pcm_substream *substream, - unsigned long offset) -{ - void *pageptr = substream->runtime->dma_area + offset; - return vmalloc_to_page(pageptr); -} - /* * ALSA capture callbacks definition */ @@ -677,7 +664,6 @@ static struct snd_pcm_ops snd_card_saa7134_capture_ops = { .prepare = snd_card_saa7134_capture_prepare, .trigger = snd_card_saa7134_capture_trigger, .pointer = snd_card_saa7134_capture_pointer, - .page = snd_card_saa7134_page, }; /* diff --git a/trunk/drivers/media/video/saa7134/saa7134-cards.c b/trunk/drivers/media/video/saa7134/saa7134-cards.c index 4f3dad9ae6d6..a4c192fb4e41 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-cards.c +++ b/trunk/drivers/media/video/saa7134/saa7134-cards.c @@ -2996,11 +2996,11 @@ struct saa7134_board saa7134_boards[] = { },{ .name = name_comp1, .vmux = 0, - .amux = LINE1, + .amux = LINE2, },{ .name = name_svideo, .vmux = 8, - .amux = LINE1, + .amux = LINE2, }}, }, [SAA7134_BOARD_FLYDVBS_LR300] = { diff --git a/trunk/drivers/media/video/tuner-core.c b/trunk/drivers/media/video/tuner-core.c index 9e99f3636d3d..6a777604f070 100644 --- a/trunk/drivers/media/video/tuner-core.c +++ b/trunk/drivers/media/video/tuner-core.c @@ -30,7 +30,7 @@ /* standard i2c insmod options */ static unsigned short normal_i2c[] = { -#if defined(CONFIG_TUNER_TEA5761) || (defined(CONFIG_TUNER_TEA5761_MODULE) && defined(MODULE)) +#ifdef CONFIG_TUNER_TEA5761 0x10, #endif 0x42, 0x43, 0x4a, 0x4b, /* tda8290 */ @@ -292,6 +292,7 @@ static void set_type(struct i2c_client *c, unsigned int type, } t->mode_mask = T_RADIO; break; +#ifdef CONFIG_TUNER_TEA5761 case TUNER_TEA5761: if (tea5761_attach(&t->fe, t->i2c.adapter, t->i2c.addr) == NULL) { t->type = TUNER_ABSENT; @@ -300,6 +301,7 @@ static void set_type(struct i2c_client *c, unsigned int type, } t->mode_mask = T_RADIO; break; +#endif case TUNER_PHILIPS_FMD1216ME_MK3: buffer[0] = 0x0b; buffer[1] = 0xdc; @@ -592,6 +594,7 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) /* autodetection code based on the i2c addr */ if (!no_autodetect) { switch (addr) { +#ifdef CONFIG_TUNER_TEA5761 case 0x10: if (tea5761_autodetection(t->i2c.adapter, t->i2c.addr) != EINVAL) { t->type = TUNER_TEA5761; @@ -603,6 +606,7 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) goto register_client; } break; +#endif case 0x42: case 0x43: case 0x4a: diff --git a/trunk/drivers/media/video/tvp5150.c b/trunk/drivers/media/video/tvp5150.c index 25d0aef88ef5..e2f1c972754b 100644 --- a/trunk/drivers/media/video/tvp5150.c +++ b/trunk/drivers/media/video/tvp5150.c @@ -799,10 +799,10 @@ static inline void tvp5150_reset(struct i2c_client *c) tvp5150_write_inittab(c, tvp5150_init_enable); /* Initialize image preferences */ - tvp5150_write(c, TVP5150_BRIGHT_CTL, decoder->bright); - tvp5150_write(c, TVP5150_CONTRAST_CTL, decoder->contrast); - tvp5150_write(c, TVP5150_SATURATION_CTL, decoder->contrast); - tvp5150_write(c, TVP5150_HUE_CTL, decoder->hue); + tvp5150_write(c, TVP5150_BRIGHT_CTL, decoder->bright >> 8); + tvp5150_write(c, TVP5150_CONTRAST_CTL, decoder->contrast >> 8); + tvp5150_write(c, TVP5150_SATURATION_CTL, decoder->contrast >> 8); + tvp5150_write(c, TVP5150_HUE_CTL, (decoder->hue - 32768) >> 8); tvp5150_set_std(c, decoder->norm); }; @@ -1077,10 +1077,10 @@ static int tvp5150_detect_client(struct i2c_adapter *adapter, core->norm = V4L2_STD_ALL; /* Default is autodetect */ core->route.input = TVP5150_COMPOSITE1; core->enable = 1; - core->bright = 128; - core->contrast = 128; - core->hue = 0; - core->sat = 128; + core->bright = 32768; + core->contrast = 32768; + core->hue = 32768; + core->sat = 32768; if (rv) { kfree(c); diff --git a/trunk/drivers/message/i2o/i2o_block.c b/trunk/drivers/message/i2o/i2o_block.c index e4ad7a1c4fbd..682406168de9 100644 --- a/trunk/drivers/message/i2o/i2o_block.c +++ b/trunk/drivers/message/i2o/i2o_block.c @@ -1077,8 +1077,8 @@ static int i2o_block_probe(struct device *dev) blk_queue_max_sectors(queue, max_sectors); blk_queue_max_hw_segments(queue, i2o_sg_tablesize(c, body_size)); - osm_debug("max sectors = %d\n", queue->max_sectors); - osm_debug("phys segments = %d\n", queue->max_phys_segments); + osm_debug("max sectors = %d\n", queue->max_phys_segments); + osm_debug("phys segments = %d\n", queue->max_sectors); osm_debug("max hw segments = %d\n", queue->max_hw_segments); /* diff --git a/trunk/drivers/net/sunhme.c b/trunk/drivers/net/sunhme.c index 120c8affe83d..c20a3bd21bb2 100644 --- a/trunk/drivers/net/sunhme.c +++ b/trunk/drivers/net/sunhme.c @@ -3143,8 +3143,8 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, dev->irq = pdev->irq; dev->dma = 0; - /* Happy Meal can do it all... */ - dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; + /* Happy Meal can do it all... except VLAN. */ + dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_VLAN_CHALLENGED; #if defined(CONFIG_SBUS) && defined(CONFIG_PCI) /* Hook up PCI register/dma accessors. */ diff --git a/trunk/drivers/net/tg3.c b/trunk/drivers/net/tg3.c index cad519910767..09440d783e65 100644 --- a/trunk/drivers/net/tg3.c +++ b/trunk/drivers/net/tg3.c @@ -7365,6 +7365,10 @@ static int tg3_open(struct net_device *dev) } else if (pci_enable_msi(tp->pdev) == 0) { u32 msi_mode; + /* Hardware bug - MSI won't work if INTX disabled. */ + if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) + pci_intx(tp->pdev, 1); + msi_mode = tr32(MSGINT_MODE); tw32(MSGINT_MODE, msi_mode | MSGINT_MODE_ENABLE); tp->tg3_flags2 |= TG3_FLG2_USING_MSI; @@ -12677,6 +12681,11 @@ static int tg3_resume(struct pci_dev *pdev) if (err) return err; + /* Hardware bug - MSI won't work if INTX disabled. */ + if ((tp->tg3_flags2 & TG3_FLG2_5780_CLASS) && + (tp->tg3_flags2 & TG3_FLG2_USING_MSI)) + pci_intx(tp->pdev, 1); + netif_device_attach(dev); tg3_full_lock(tp, 0); diff --git a/trunk/drivers/pci/Kconfig b/trunk/drivers/pci/Kconfig index e1ca42591ac4..7a1d6d512837 100644 --- a/trunk/drivers/pci/Kconfig +++ b/trunk/drivers/pci/Kconfig @@ -21,17 +21,6 @@ config PCI_MSI If you don't know what to do here, say N. -config PCI_LEGACY - bool "Enable deprecated pci_find_* API" - depends on PCI - default y - help - Say Y here if you want to include support for the deprecated - pci_find_slot() and pci_find_device() APIs. Most drivers have - been converted over to using the proper hotplug APIs, so this - option serves to include/exclude only a few drivers that are - still using this API. - config PCI_DEBUG bool "PCI Debugging" depends on PCI && DEBUG_KERNEL diff --git a/trunk/drivers/pci/hotplug/Kconfig b/trunk/drivers/pci/hotplug/Kconfig index a64449d489d6..63d62752fb91 100644 --- a/trunk/drivers/pci/hotplug/Kconfig +++ b/trunk/drivers/pci/hotplug/Kconfig @@ -41,7 +41,7 @@ config HOTPLUG_PCI_FAKE config HOTPLUG_PCI_COMPAQ tristate "Compaq PCI Hotplug driver" - depends on X86 && PCI_BIOS && PCI_LEGACY + depends on X86 && PCI_BIOS help Say Y here if you have a motherboard with a Compaq PCI Hotplug controller. @@ -63,7 +63,7 @@ config HOTPLUG_PCI_COMPAQ_NVRAM config HOTPLUG_PCI_IBM tristate "IBM PCI Hotplug driver" - depends on X86_IO_APIC && X86 && PCI_BIOS && PCI_LEGACY + depends on X86_IO_APIC && X86 && PCI_BIOS help Say Y here if you have a motherboard with a IBM PCI Hotplug controller. @@ -119,7 +119,7 @@ config HOTPLUG_PCI_CPCI_ZT5550 config HOTPLUG_PCI_CPCI_GENERIC tristate "Generic port I/O CompactPCI Hotplug driver" - depends on HOTPLUG_PCI_CPCI && X86 && PCI_LEGACY + depends on HOTPLUG_PCI_CPCI && X86 help Say Y here if you have a CompactPCI system card that exposes the #ENUM hotswap signal as a bit in a system register that can be read through diff --git a/trunk/drivers/pci/hotplug/cpqphp_ctrl.c b/trunk/drivers/pci/hotplug/cpqphp_ctrl.c index 856d57b4d604..3ef0a4875a62 100644 --- a/trunk/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/trunk/drivers/pci/hotplug/cpqphp_ctrl.c @@ -1931,14 +1931,16 @@ void cpqhp_pushbutton_thread(unsigned long slot) return ; } - if (cpqhp_process_SS(ctrl, func) != 0) { - amber_LED_on(ctrl, hp_slot); - green_LED_on(ctrl, hp_slot); - - set_SOGO(ctrl); + if (func != NULL && ctrl != NULL) { + if (cpqhp_process_SS(ctrl, func) != 0) { + amber_LED_on (ctrl, hp_slot); + green_LED_on (ctrl, hp_slot); + + set_SOGO(ctrl); - /* Wait for SOBS to be unset */ - wait_for_ctrl_irq(ctrl); + /* Wait for SOBS to be unset */ + wait_for_ctrl_irq (ctrl); + } } p_slot->state = STATIC_STATE; diff --git a/trunk/drivers/pci/msi.c b/trunk/drivers/pci/msi.c index 07c9f09c856d..87e01615053d 100644 --- a/trunk/drivers/pci/msi.c +++ b/trunk/drivers/pci/msi.c @@ -224,12 +224,6 @@ static struct msi_desc* alloc_msi_entry(void) return entry; } -static void pci_intx_for_msi(struct pci_dev *dev, int enable) -{ - if (!(dev->dev_flags & PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG)) - pci_intx(dev, enable); -} - #ifdef CONFIG_PM static void __pci_restore_msi_state(struct pci_dev *dev) { @@ -243,7 +237,7 @@ static void __pci_restore_msi_state(struct pci_dev *dev) entry = get_irq_msi(dev->irq); pos = entry->msi_attrib.pos; - pci_intx_for_msi(dev, 0); + pci_intx(dev, 0); /* disable intx */ msi_set_enable(dev, 0); write_msi_msg(dev->irq, &entry->msg); if (entry->msi_attrib.maskbit) @@ -266,7 +260,7 @@ static void __pci_restore_msix_state(struct pci_dev *dev) return; /* route the table */ - pci_intx_for_msi(dev, 0); + pci_intx(dev, 0); /* disable intx */ msix_set_enable(dev, 0); list_for_each_entry(entry, &dev->msi_list, list) { @@ -349,7 +343,7 @@ static int msi_capability_init(struct pci_dev *dev) } /* Set MSI enabled bits */ - pci_intx_for_msi(dev, 0); + pci_intx(dev, 0); /* disable intx */ msi_set_enable(dev, 1); dev->msi_enabled = 1; @@ -439,7 +433,7 @@ static int msix_capability_init(struct pci_dev *dev, i++; } /* Set MSI-X enabled bits */ - pci_intx_for_msi(dev, 0); + pci_intx(dev, 0); /* disable intx */ msix_set_enable(dev, 1); dev->msix_enabled = 1; @@ -534,7 +528,7 @@ void pci_disable_msi(struct pci_dev* dev) return; msi_set_enable(dev, 0); - pci_intx_for_msi(dev, 1); + pci_intx(dev, 1); /* enable intx */ dev->msi_enabled = 0; BUG_ON(list_empty(&dev->msi_list)); @@ -646,7 +640,7 @@ void pci_disable_msix(struct pci_dev* dev) return; msix_set_enable(dev, 0); - pci_intx_for_msi(dev, 1); + pci_intx(dev, 1); /* enable intx */ dev->msix_enabled = 0; msix_free_all_irqs(dev); diff --git a/trunk/drivers/pci/pci-driver.c b/trunk/drivers/pci/pci-driver.c index 6d1a21611818..6e2760b6c20a 100644 --- a/trunk/drivers/pci/pci-driver.c +++ b/trunk/drivers/pci/pci-driver.c @@ -143,8 +143,8 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, * system is in its list of supported devices. Returns the matching * pci_device_id structure or %NULL if there is no match. */ -static const struct pci_device_id *pci_match_device(struct pci_driver *drv, - struct pci_dev *dev) +const struct pci_device_id *pci_match_device(struct pci_driver *drv, + struct pci_dev *dev) { struct pci_dynid *dynid; @@ -559,6 +559,7 @@ static int __init pci_driver_init(void) postcore_initcall(pci_driver_init); EXPORT_SYMBOL(pci_match_id); +EXPORT_SYMBOL(pci_match_device); EXPORT_SYMBOL(__pci_register_driver); EXPORT_SYMBOL(pci_unregister_driver); EXPORT_SYMBOL(pci_dev_driver); diff --git a/trunk/drivers/pci/quirks.c b/trunk/drivers/pci/quirks.c index 26cc4dcf4f0e..d0bb5b9d2120 100644 --- a/trunk/drivers/pci/quirks.c +++ b/trunk/drivers/pci/quirks.c @@ -1621,8 +1621,12 @@ static void __init quirk_disable_all_msi(struct pci_dev *dev) printk(KERN_WARNING "PCI: MSI quirk detected. MSI deactivated.\n"); } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_disable_all_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX, quirk_disable_all_msi); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RD580, quirk_disable_all_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RX790, quirk_disable_all_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS690, quirk_disable_all_msi); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); /* Disable MSI on chipsets that are known to not support it */ @@ -1674,9 +1678,6 @@ static void __devinit quirk_msi_ht_cap(struct pci_dev *dev) } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE, quirk_msi_ht_cap); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, - PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB, - quirk_msi_ht_cap); /* The nVidia CK804 chipset may have 2 HT MSI mappings. * MSI are supported if the MSI capability set in any of these mappings. @@ -1704,48 +1705,4 @@ static void __devinit quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev) } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, quirk_nvidia_ck804_msi_ht_cap); - -static void __devinit quirk_msi_intx_disable_bug(struct pci_dev *dev) -{ - dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG; -} -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, - PCI_DEVICE_ID_TIGON3_5780, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, - PCI_DEVICE_ID_TIGON3_5780S, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, - PCI_DEVICE_ID_TIGON3_5714, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, - PCI_DEVICE_ID_TIGON3_5714S, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, - PCI_DEVICE_ID_TIGON3_5715, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, - PCI_DEVICE_ID_TIGON3_5715S, - quirk_msi_intx_disable_bug); - -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4390, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4391, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4392, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4393, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4394, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4395, - quirk_msi_intx_disable_bug); - -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4373, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4374, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375, - quirk_msi_intx_disable_bug); - #endif /* CONFIG_PCI_MSI */ diff --git a/trunk/drivers/pci/search.c b/trunk/drivers/pci/search.c index 8541034021f0..b001b5922e33 100644 --- a/trunk/drivers/pci/search.c +++ b/trunk/drivers/pci/search.c @@ -113,8 +113,6 @@ pci_find_next_bus(const struct pci_bus *from) return b; } -#ifdef CONFIG_PCI_LEGACY - /** * pci_find_slot - locate PCI device from a given PCI slot * @bus: number of PCI bus on which desired PCI device resides @@ -139,8 +137,6 @@ pci_find_slot(unsigned int bus, unsigned int devfn) return NULL; } -#endif /* CONFIG_PCI_LEGACY */ - /** * pci_get_slot - locate PCI device for a given PCI slot * @bus: PCI bus on which desired PCI device resides @@ -204,7 +200,6 @@ struct pci_dev * pci_get_bus_and_slot(unsigned int bus, unsigned int devfn) return NULL; } -#ifdef CONFIG_PCI_LEGACY /** * pci_find_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id * @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids @@ -283,7 +278,6 @@ pci_find_device(unsigned int vendor, unsigned int device, const struct pci_dev * { return pci_find_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from); } -#endif /* CONFIG_PCI_LEGACY */ /** * pci_get_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id @@ -474,11 +468,8 @@ int pci_dev_present(const struct pci_device_id *ids) EXPORT_SYMBOL(pci_dev_present); EXPORT_SYMBOL(pci_find_present); -#ifdef CONFIG_PCI_LEGACY EXPORT_SYMBOL(pci_find_device); EXPORT_SYMBOL(pci_find_slot); -#endif /* CONFIG_PCI_LEGACY */ - /* For boot time work */ EXPORT_SYMBOL(pci_find_bus); EXPORT_SYMBOL(pci_find_next_bus); diff --git a/trunk/drivers/rtc/rtc-m48t59.c b/trunk/drivers/rtc/rtc-m48t59.c index 2bad1637330a..bf60d35f580b 100644 --- a/trunk/drivers/rtc/rtc-m48t59.c +++ b/trunk/drivers/rtc/rtc-m48t59.c @@ -464,7 +464,7 @@ static int __devexit m48t59_rtc_remove(struct platform_device *pdev) return 0; } -static struct platform_driver m48t59_rtc_driver = { +static struct platform_driver m48t59_rtc_platdrv = { .driver = { .name = "rtc-m48t59", .owner = THIS_MODULE, @@ -475,12 +475,12 @@ static struct platform_driver m48t59_rtc_driver = { static int __init m48t59_rtc_init(void) { - return platform_driver_register(&m48t59_rtc_driver); + return platform_driver_register(&m48t59_rtc_platdrv); } static void __exit m48t59_rtc_exit(void) { - platform_driver_unregister(&m48t59_rtc_driver); + platform_driver_unregister(&m48t59_rtc_platdrv); } module_init(m48t59_rtc_init); diff --git a/trunk/drivers/s390/block/dcssblk.c b/trunk/drivers/s390/block/dcssblk.c index 5e083d1f57e7..859f870552e3 100644 --- a/trunk/drivers/s390/block/dcssblk.c +++ b/trunk/drivers/s390/block/dcssblk.c @@ -193,12 +193,6 @@ dcssblk_segment_warn(int rc, char* seg_name) } } -static void dcssblk_unregister_callback(struct device *dev) -{ - device_unregister(dev); - put_device(dev); -} - /* * device attribute for switching shared/nonshared (exclusive) * operation (show + store) @@ -282,7 +276,8 @@ dcssblk_shared_store(struct device *dev, struct device_attribute *attr, const ch blk_cleanup_queue(dev_info->dcssblk_queue); dev_info->gd->queue = NULL; put_disk(dev_info->gd); - rc = device_schedule_callback(dev, dcssblk_unregister_callback); + device_unregister(dev); + put_device(dev); out: up_write(&dcssblk_devices_sem); return rc; diff --git a/trunk/drivers/s390/cio/cmf.c b/trunk/drivers/s390/cio/cmf.c index f4c132ab39ed..725b0dd14269 100644 --- a/trunk/drivers/s390/cio/cmf.c +++ b/trunk/drivers/s390/cio/cmf.c @@ -343,10 +343,10 @@ static int cmf_copy_block(struct ccw_device *cdev) if (sch->schib.scsw.fctl & SCSW_FCTL_START_FUNC) { /* Don't copy if a start function is in progress. */ - if ((!(sch->schib.scsw.actl & SCSW_ACTL_SUSPENDED)) && + if ((!sch->schib.scsw.actl & SCSW_ACTL_SUSPENDED) && (sch->schib.scsw.actl & (SCSW_ACTL_DEVACT | SCSW_ACTL_SCHACT)) && - (!(sch->schib.scsw.stctl & SCSW_STCTL_SEC_STATUS))) + (!sch->schib.scsw.stctl & SCSW_STCTL_SEC_STATUS)) return -EBUSY; } cmb_data = cdev->private->cmb; diff --git a/trunk/drivers/s390/cio/device.c b/trunk/drivers/s390/cio/device.c index 74f6b539974a..7ee57f084a89 100644 --- a/trunk/drivers/s390/cio/device.c +++ b/trunk/drivers/s390/cio/device.c @@ -738,7 +738,7 @@ static int io_subchannel_initialize_dev(struct subchannel *sch, atomic_set(&cdev->private->onoff, 0); cdev->dev.parent = &sch->dev; cdev->dev.release = ccw_device_release; - INIT_WORK(&cdev->private->kick_work, NULL); + INIT_LIST_HEAD(&cdev->private->kick_work.entry); cdev->dev.groups = ccwdev_attr_groups; /* Do first half of device_register. */ device_initialize(&cdev->dev); diff --git a/trunk/drivers/s390/net/smsgiucv.c b/trunk/drivers/s390/net/smsgiucv.c index 47bb47b48581..3ccca5871fdf 100644 --- a/trunk/drivers/s390/net/smsgiucv.c +++ b/trunk/drivers/s390/net/smsgiucv.c @@ -148,10 +148,6 @@ static int __init smsg_init(void) { int rc; - if (!MACHINE_IS_VM) { - rc = -EPROTONOSUPPORT; - goto out; - } rc = driver_register(&smsg_driver); if (rc != 0) goto out; diff --git a/trunk/drivers/scsi/Kconfig b/trunk/drivers/scsi/Kconfig index a6676be87843..86cf10efb0c1 100644 --- a/trunk/drivers/scsi/Kconfig +++ b/trunk/drivers/scsi/Kconfig @@ -725,7 +725,7 @@ config SCSI_FD_MCS config SCSI_GDTH tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support" - depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API && PCI_LEGACY + depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API ---help--- Formerly called GDT SCSI Disk Array Controller Support. diff --git a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c index 5f2396c03958..22d91ee173c5 100644 --- a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -556,7 +556,7 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, unsigned long timeout) { u64 *crq_as_u64 = (u64 *) &evt_struct->crq; - int request_status = 0; + int request_status; int rc; /* If we have exhausted our request limit, just fail this request, @@ -574,13 +574,6 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, if (request_status < -1) goto send_error; /* Otherwise, we may have run out of requests. */ - /* If request limit was 0 when we started the adapter is in the - * process of performing a login with the server adapter, or - * we may have run out of requests. - */ - else if (request_status == -1 && - evt_struct->iu.srp.login_req.opcode != SRP_LOGIN_REQ) - goto send_busy; /* Abort and reset calls should make it through. * Nothing except abort and reset should use the last two * slots unless we had two or less to begin with. @@ -640,8 +633,7 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev); free_event_struct(&hostdata->pool, evt_struct); - if (request_status != -1) - atomic_inc(&hostdata->request_limit); + atomic_inc(&hostdata->request_limit); return SCSI_MLQUEUE_HOST_BUSY; send_error: @@ -935,11 +927,10 @@ static int send_srp_login(struct ibmvscsi_host_data *hostdata) login->req_buf_fmt = SRP_BUF_FORMAT_DIRECT | SRP_BUF_FORMAT_INDIRECT; spin_lock_irqsave(hostdata->host->host_lock, flags); - /* Start out with a request limit of 0, since this is negotiated in - * the login request we are just sending and login requests always - * get sent by the driver regardless of request_limit. + /* Start out with a request limit of 1, since this is negotiated in + * the login request we are just sending */ - atomic_set(&hostdata->request_limit, 0); + atomic_set(&hostdata->request_limit, 1); rc = ibmvscsi_send_srp_event(evt_struct, hostdata, init_timeout * 2); spin_unlock_irqrestore(hostdata->host->host_lock, flags); diff --git a/trunk/drivers/scsi/lpfc/lpfc_scsi.c b/trunk/drivers/scsi/lpfc/lpfc_scsi.c index 4e46045dea6d..c0755565fae9 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_scsi.c +++ b/trunk/drivers/scsi/lpfc/lpfc_scsi.c @@ -682,7 +682,6 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb; struct lpfc_iocbq *piocbq = &(lpfc_cmd->cur_iocbq); int datadir = scsi_cmnd->sc_data_direction; - char tag[2]; lpfc_cmd->fcp_rsp->rspSnsLen = 0; /* clear task management bits */ @@ -693,8 +692,8 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, memcpy(&fcp_cmnd->fcpCdb[0], scsi_cmnd->cmnd, 16); - if (scsi_populate_tag_msg(scsi_cmnd, tag)) { - switch (tag[0]) { + if (scsi_cmnd->device->tagged_supported) { + switch (scsi_cmnd->tag) { case HEAD_OF_QUEUE_TAG: fcp_cmnd->fcpCntl1 = HEAD_OF_Q; break; diff --git a/trunk/drivers/scsi/osst.c b/trunk/drivers/scsi/osst.c index abef7048f25b..4652ad22516b 100644 --- a/trunk/drivers/scsi/osst.c +++ b/trunk/drivers/scsi/osst.c @@ -593,11 +593,10 @@ static int osst_verify_frame(struct osst_tape * STp, int frame_seq_number, int q if (aux->frame_type != OS_FRAME_TYPE_DATA && aux->frame_type != OS_FRAME_TYPE_EOD && aux->frame_type != OS_FRAME_TYPE_MARKER) { - if (!quiet) { + if (!quiet) #if DEBUG printk(OSST_DEB_MSG "%s:D: Skipping frame, frame type %x\n", name, aux->frame_type); #endif - } goto err_out; } if (aux->frame_type == OS_FRAME_TYPE_EOD && @@ -607,12 +606,11 @@ static int osst_verify_frame(struct osst_tape * STp, int frame_seq_number, int q goto err_out; } if (frame_seq_number != -1 && ntohl(aux->frame_seq_num) != frame_seq_number) { - if (!quiet) { + if (!quiet) #if DEBUG printk(OSST_DEB_MSG "%s:D: Skipping frame, sequence number %u (expected %d)\n", name, ntohl(aux->frame_seq_num), frame_seq_number); #endif - } goto err_out; } if (aux->frame_type == OS_FRAME_TYPE_MARKER) { diff --git a/trunk/drivers/serial/8250_early.c b/trunk/drivers/serial/8250_early.c index 1f16de719962..4d4c9f01be8d 100644 --- a/trunk/drivers/serial/8250_early.c +++ b/trunk/drivers/serial/8250_early.c @@ -76,7 +76,7 @@ static void __init wait_for_xmitr(struct uart_port *port) } } -static void __init serial_putc(struct uart_port *port, int c) +static void __init putc(struct uart_port *port, int c) { wait_for_xmitr(port); serial_out(port, UART_TX, c); @@ -91,7 +91,7 @@ static void __init early_serial8250_write(struct console *console, const char *s ier = serial_in(port, UART_IER); serial_out(port, UART_IER, 0); - uart_console_write(port, s, count, serial_putc); + uart_console_write(port, s, count, putc); /* Wait for transmitter to become empty and restore the IER */ wait_for_xmitr(port); diff --git a/trunk/drivers/serial/8250_pci.c b/trunk/drivers/serial/8250_pci.c index ceb03c9e749f..0e357562ce9e 100644 --- a/trunk/drivers/serial/8250_pci.c +++ b/trunk/drivers/serial/8250_pci.c @@ -1986,7 +1986,6 @@ static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state) static int pciserial_resume_one(struct pci_dev *dev) { - int err; struct serial_private *priv = pci_get_drvdata(dev); pci_set_power_state(dev, PCI_D0); @@ -1996,9 +1995,7 @@ static int pciserial_resume_one(struct pci_dev *dev) /* * The device may have been disabled. Re-enable it. */ - err = pci_enable_device(dev); - if (err) - return err; + pci_enable_device(dev); pciserial_resume_ports(priv); } diff --git a/trunk/drivers/telephony/phonedev.c b/trunk/drivers/telephony/phonedev.c index bcea8d9b718c..4d8c2a5b3297 100644 --- a/trunk/drivers/telephony/phonedev.c +++ b/trunk/drivers/telephony/phonedev.c @@ -120,8 +120,9 @@ int phone_register_device(struct phone_device *p, int unit) void phone_unregister_device(struct phone_device *pfd) { mutex_lock(&phone_lock); - if (likely(phone_device[pfd->minor] == pfd)) - phone_device[pfd->minor] = NULL; + if (phone_device[pfd->minor] != pfd) + panic("phone: bad unregister"); + phone_device[pfd->minor] = NULL; mutex_unlock(&phone_lock); } diff --git a/trunk/fs/afs/vlocation.c b/trunk/fs/afs/vlocation.c index 849fc3160cb5..7b4bbe48112d 100644 --- a/trunk/fs/afs/vlocation.c +++ b/trunk/fs/afs/vlocation.c @@ -382,7 +382,7 @@ struct afs_vlocation *afs_vlocation_lookup(struct afs_cell *cell, cell->name, key_serial(key), (int) namesz, (int) namesz, name, namesz); - if (namesz >= sizeof(vl->vldb.name)) { + if (namesz > sizeof(vl->vldb.name)) { _leave(" = -ENAMETOOLONG"); return ERR_PTR(-ENAMETOOLONG); } diff --git a/trunk/fs/ecryptfs/crypto.c b/trunk/fs/ecryptfs/crypto.c index bbed2fd40fdc..9d70289f7df3 100644 --- a/trunk/fs/ecryptfs/crypto.c +++ b/trunk/fs/ecryptfs/crypto.c @@ -115,29 +115,11 @@ static int ecryptfs_calculate_md5(char *dst, } crypt_stat->hash_tfm = desc.tfm; } - rc = crypto_hash_init(&desc); - if (rc) { - printk(KERN_ERR - "%s: Error initializing crypto hash; rc = [%d]\n", - __FUNCTION__, rc); - goto out; - } - rc = crypto_hash_update(&desc, &sg, len); - if (rc) { - printk(KERN_ERR - "%s: Error updating crypto hash; rc = [%d]\n", - __FUNCTION__, rc); - goto out; - } - rc = crypto_hash_final(&desc, dst); - if (rc) { - printk(KERN_ERR - "%s: Error finalizing crypto hash; rc = [%d]\n", - __FUNCTION__, rc); - goto out; - } -out: + crypto_hash_init(&desc); + crypto_hash_update(&desc, &sg, len); + crypto_hash_final(&desc, dst); mutex_unlock(&crypt_stat->cs_hash_tfm_mutex); +out: return rc; } @@ -522,6 +504,7 @@ int ecryptfs_encrypt_page(struct page *page) "\n", rc); goto out; } + extent_offset++; } out: kfree(enc_extent_virt); @@ -657,6 +640,7 @@ int ecryptfs_decrypt_page(struct page *page) "rc = [%d]\n", __FUNCTION__, rc); goto out; } + extent_offset++; } out: kfree(enc_extent_virt); diff --git a/trunk/include/asm-arm26/irq_regs.h b/trunk/include/asm-arm26/irq_regs.h new file mode 100644 index 000000000000..3dd9c0b70270 --- /dev/null +++ b/trunk/include/asm-arm26/irq_regs.h @@ -0,0 +1 @@ +#include diff --git a/trunk/include/asm-m68knommu/unistd.h b/trunk/include/asm-m68knommu/unistd.h index 27c2f9bb4dbd..eb1b566793fe 100644 --- a/trunk/include/asm-m68knommu/unistd.h +++ b/trunk/include/asm-m68knommu/unistd.h @@ -185,8 +185,8 @@ #define __NR_rt_sigtimedwait 177 #define __NR_rt_sigqueueinfo 178 #define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 +#define __NR_pread 180 +#define __NR_pwrite 181 #define __NR_lchown 182 #define __NR_getcwd 183 #define __NR_capget 184 diff --git a/trunk/include/asm-powerpc/commproc.h b/trunk/include/asm-powerpc/commproc.h index a2328b8addd8..0307c84a5c1d 100644 --- a/trunk/include/asm-powerpc/commproc.h +++ b/trunk/include/asm-powerpc/commproc.h @@ -91,7 +91,7 @@ extern uint m8xx_cpm_hostalloc(uint size); extern int m8xx_cpm_hostfree(uint start); extern void m8xx_cpm_hostdump(void); -extern void cpm_load_patch(cpm8xx_t *cp); +extern void cpm_load_patch(volatile immap_t *immr); /* Buffer descriptors used by many of the CPM protocols. */ diff --git a/trunk/include/asm-x86/lguest_hcall.h b/trunk/include/asm-x86/lguest_hcall.h index 2091779e91fb..9c5092b6aa9f 100644 --- a/trunk/include/asm-x86/lguest_hcall.h +++ b/trunk/include/asm-x86/lguest_hcall.h @@ -54,6 +54,9 @@ hcall(unsigned long call, } /*:*/ +void async_hcall(unsigned long call, + unsigned long arg1, unsigned long arg2, unsigned long arg3); + /* Can't use our min() macro here: needs to be a constant */ #define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32) diff --git a/trunk/include/linux/futex.h b/trunk/include/linux/futex.h index 92d420fe03f8..99650353adfa 100644 --- a/trunk/include/linux/futex.h +++ b/trunk/include/linux/futex.h @@ -149,6 +149,10 @@ union futex_key { int offset; } both; }; +int get_futex_key(u32 __user *uaddr, struct rw_semaphore *shared, + union futex_key *key); +void get_futex_key_refs(union futex_key *key); +void drop_futex_key_refs(union futex_key *key); #ifdef CONFIG_FUTEX extern void exit_robust_list(struct task_struct *curr); diff --git a/trunk/include/linux/ide.h b/trunk/include/linux/ide.h index dc75ccbcf991..4ed4777bba67 100644 --- a/trunk/include/linux/ide.h +++ b/trunk/include/linux/ide.h @@ -1031,7 +1031,14 @@ ide_startstop_t __ide_abort(ide_drive_t *, struct request *); extern ide_startstop_t ide_abort(ide_drive_t *, const char *); extern void ide_fix_driveid(struct hd_driveid *); - +/* + * ide_fixstring() cleans up and (optionally) byte-swaps a text string, + * removing leading/trailing blanks and compressing internal blanks. + * It is primarily used to tidy up the model name/number fields as + * returned by the WIN_[P]IDENTIFY commands. + * + * (s, bytecount, byteswap) + */ extern void ide_fixstring(u8 *, const int, const int); int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); diff --git a/trunk/include/linux/kallsyms.h b/trunk/include/linux/kallsyms.h index 82de2fb62cb7..f73de6fb5c68 100644 --- a/trunk/include/linux/kallsyms.h +++ b/trunk/include/linux/kallsyms.h @@ -6,7 +6,6 @@ #define _LINUX_KALLSYMS_H #include -#include #define KSYM_NAME_LEN 128 #define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + (KSYM_NAME_LEN - 1) + \ diff --git a/trunk/include/linux/pci.h b/trunk/include/linux/pci.h index 0dd93bb62fbe..5d2281f661f7 100644 --- a/trunk/include/linux/pci.h +++ b/trunk/include/linux/pci.h @@ -109,14 +109,6 @@ enum pcie_reset_state { pcie_hot_reset = (__force pcie_reset_state_t) 3 }; -typedef unsigned short __bitwise pci_dev_flags_t; -enum pci_dev_flags { - /* INTX_DISABLE in PCI_COMMAND register disables MSI - * generation too. - */ - PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1, -}; - typedef unsigned short __bitwise pci_bus_flags_t; enum pci_bus_flags { PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, @@ -193,7 +185,6 @@ struct pci_dev { unsigned int msix_enabled:1; unsigned int is_managed:1; unsigned int is_pcie:1; - pci_dev_flags_t dev_flags; atomic_t enable_cnt; /* pci_enable_device has been called */ u32 saved_config_space[16]; /* config space saved at suspend time */ @@ -488,11 +479,8 @@ extern void pci_sort_breadthfirst(void); /* Generic PCI functions exported to card drivers */ -#ifdef CONFIG_PCI_LEGACY struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn); -#endif /* CONFIG_PCI_LEGACY */ - int pci_find_capability (struct pci_dev *dev, int cap); int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); int pci_find_ext_capability (struct pci_dev *dev, int cap); @@ -634,6 +622,7 @@ static inline int __must_check pci_register_driver(struct pci_driver *driver) void pci_unregister_driver(struct pci_driver *); void pci_remove_behind_bridge(struct pci_dev *); struct pci_driver *pci_dev_driver(const struct pci_dev *); +const struct pci_device_id *pci_match_device(struct pci_driver *drv, struct pci_dev *dev); const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); @@ -762,6 +751,7 @@ static inline void pci_unregister_driver(struct pci_driver *drv) { } static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } +static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } /* Power management related routines */ static inline int pci_save_state(struct pci_dev *dev) { return 0; } diff --git a/trunk/include/linux/pci_ids.h b/trunk/include/linux/pci_ids.h index fbe19648bf91..e44aac8cf5ff 100644 --- a/trunk/include/linux/pci_ids.h +++ b/trunk/include/linux/pci_ids.h @@ -360,6 +360,9 @@ #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 #define PCI_DEVICE_ID_ATI_RS480 0x5950 +#define PCI_DEVICE_ID_ATI_RD580 0x5952 +#define PCI_DEVICE_ID_ATI_RX790 0x5957 +#define PCI_DEVICE_ID_ATI_RS690 0x7910 /* ATI IXP Chipset */ #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 @@ -1433,8 +1436,8 @@ #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 -#define PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB 0x0036 #define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103 +#define PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX 0x0104 #define PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE 0x0132 #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 diff --git a/trunk/kernel/futex.c b/trunk/kernel/futex.c index 9dc591ab681a..32710451dc20 100644 --- a/trunk/kernel/futex.c +++ b/trunk/kernel/futex.c @@ -181,8 +181,8 @@ static inline int match_futex(union futex_key *key1, union futex_key *key2) * For other futexes, it points to ¤t->mm->mmap_sem and * caller must have taken the reader lock. but NOT any spinlocks. */ -static int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared, - union futex_key *key) +int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared, + union futex_key *key) { unsigned long address = (unsigned long)uaddr; struct mm_struct *mm = current->mm; @@ -268,13 +268,14 @@ static int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared, } return err; } +EXPORT_SYMBOL_GPL(get_futex_key); /* * Take a reference to the resource addressed by a key. * Can be called while holding spinlocks. * */ -static void get_futex_key_refs(union futex_key *key) +inline void get_futex_key_refs(union futex_key *key) { if (key->both.ptr == 0) return; @@ -287,12 +288,13 @@ static void get_futex_key_refs(union futex_key *key) break; } } +EXPORT_SYMBOL_GPL(get_futex_key_refs); /* * Drop a reference to the resource addressed by a key. * The hash bucket spinlock must not be held. */ -static void drop_futex_key_refs(union futex_key *key) +void drop_futex_key_refs(union futex_key *key) { if (!key->both.ptr) return; @@ -305,6 +307,7 @@ static void drop_futex_key_refs(union futex_key *key) break; } } +EXPORT_SYMBOL_GPL(drop_futex_key_refs); static u32 cmpxchg_futex_value_locked(u32 __user *uaddr, u32 uval, u32 newval) { diff --git a/trunk/kernel/sysctl_check.c b/trunk/kernel/sysctl_check.c index 5a2f2b2bf888..ed6fe51df77a 100644 --- a/trunk/kernel/sysctl_check.c +++ b/trunk/kernel/sysctl_check.c @@ -1432,7 +1432,6 @@ static void set_fail(const char **fail, struct ctl_table *table, const char *str printk(KERN_ERR "sysctl table check failed: "); sysctl_print_path(table); printk(" %s\n", *fail); - dump_stack(); } *fail = str; } diff --git a/trunk/kernel/time/tick-broadcast.c b/trunk/kernel/time/tick-broadcast.c index aa82d7bf478a..8cfb8b2ce773 100644 --- a/trunk/kernel/time/tick-broadcast.c +++ b/trunk/kernel/time/tick-broadcast.c @@ -508,7 +508,7 @@ static void tick_broadcast_clear_oneshot(int cpu) } /** - * tick_broadcast_setup_oneshot - setup the broadcast device + * tick_broadcast_setup_highres - setup the broadcast device for highres */ void tick_broadcast_setup_oneshot(struct clock_event_device *bc) { diff --git a/trunk/kernel/time/tick-sched.c b/trunk/kernel/time/tick-sched.c index 27a2338deb4a..5997456ebbc9 100644 --- a/trunk/kernel/time/tick-sched.c +++ b/trunk/kernel/time/tick-sched.c @@ -321,7 +321,7 @@ ktime_t tick_nohz_get_sleep_length(void) } /** - * tick_nohz_restart_sched_tick - restart the idle tick from the idle task + * nohz_restart_sched_tick - restart the idle tick from the idle task * * Restart the idle tick when the CPU is woken up from idle */ diff --git a/trunk/kernel/timer.c b/trunk/kernel/timer.c index 00e44e2afd67..fb4e67d5dd60 100644 --- a/trunk/kernel/timer.c +++ b/trunk/kernel/timer.c @@ -790,7 +790,7 @@ static unsigned long cmp_next_hrtimer_event(unsigned long now, } /** - * get_next_timer_interrupt - return the jiffy of the next pending timer + * next_timer_interrupt - return the jiffy of the next pending timer * @now: current time (in jiffies) */ unsigned long get_next_timer_interrupt(unsigned long now) diff --git a/trunk/lib/bitmap.c b/trunk/lib/bitmap.c index 2c9242e3fed0..26ebafa8c41d 100644 --- a/trunk/lib/bitmap.c +++ b/trunk/lib/bitmap.c @@ -469,10 +469,6 @@ int bitmap_scnlistprintf(char *buf, unsigned int buflen, /* current bit is 'cur', most recently seen range is [rbot, rtop] */ int cur, rbot, rtop; - if (buflen == 0) - return 0; - buf[0] = 0; - rbot = cur = find_first_bit(maskp, nmaskbits); while (cur < nmaskbits) { rtop = cur; diff --git a/trunk/mm/memory.c b/trunk/mm/memory.c index 9791e4786843..eefd5b68bc42 100644 --- a/trunk/mm/memory.c +++ b/trunk/mm/memory.c @@ -2748,3 +2748,4 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in return buf - old_buf; } +EXPORT_SYMBOL_GPL(access_process_vm); diff --git a/trunk/mm/slub.c b/trunk/mm/slub.c index 84f59fde1a10..bcdb2c8941a5 100644 --- a/trunk/mm/slub.c +++ b/trunk/mm/slub.c @@ -1511,8 +1511,26 @@ static void *__slab_alloc(struct kmem_cache *s, if (new) { c = get_cpu_slab(s, smp_processor_id()); - if (c->page) + if (c->page) { + /* + * Someone else populated the cpu_slab while we + * enabled interrupts, or we have gotten scheduled + * on another cpu. The page may not be on the + * requested node even if __GFP_THISNODE was + * specified. So we need to recheck. + */ + if (node_match(c, node)) { + /* + * Current cpuslab is acceptable and we + * want the current one since its cache hot + */ + discard_slab(s, new); + slab_lock(c->page); + goto load_freelist; + } + /* New slab does not fit our expectations */ flush_slab(s, c); + } slab_lock(new); SetSlabFrozen(new); c->page = new;