From fcc43dfce0489cf34723728d1f988a536ed027ce Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 3 Sep 2007 09:43:54 +0100 Subject: [PATCH] --- yaml --- r: 64939 b: refs/heads/master c: a53d6fb83efc75bbd7876459e6e1291c4925103d h: refs/heads/master i: 64937: 2c7283d5a47ab46996b8db345c28966d6c14da50 64935: 4b8b786ca936ba67735c31aa2839f598c6ed00df v: v3 --- [refs] | 2 +- trunk/Documentation/ManagementStyle | 2 +- trunk/Documentation/kernel-parameters.txt | 23 ++++++++------ .../video4linux/cx2341x/fw-encoder-api.txt | 4 +-- trunk/arch/arm/mach-realview/realview_eb.c | 2 +- trunk/arch/mips/kernel/cpu-probe.c | 9 +----- trunk/arch/mips/kernel/rtlx.c | 4 ++- trunk/arch/mips/kernel/scall64-n32.S | 2 +- trunk/arch/mips/kernel/time.c | 1 - trunk/arch/mips/mips-boards/malta/malta_int.c | 2 +- trunk/arch/mips/mm/tlbex.c | 26 +--------------- trunk/block/ll_rw_blk.c | 23 ++++---------- trunk/drivers/kvm/kvm.h | 10 ++---- trunk/drivers/kvm/mmu.c | 5 ++- trunk/drivers/md/dm-bio-list.h | 3 -- trunk/drivers/media/video/cx88/cx88-mpeg.c | 2 +- trunk/drivers/media/video/ivtv/ivtv-fileops.c | 6 ++-- trunk/drivers/media/video/ivtv/ivtv-ioctl.c | 17 +++------- trunk/drivers/media/video/pwc/pwc-if.c | 2 +- .../media/video/saa7134/saa7134-cards.c | 12 +++---- trunk/drivers/media/video/saa7191.c | 4 +-- trunk/drivers/usb/core/quirks.c | 6 ---- trunk/drivers/usb/storage/scsiglue.c | 13 +++++--- trunk/drivers/usb/storage/usb.c | 27 +++++++++++----- trunk/drivers/video/aty/ati_ids.h | 12 +++---- trunk/drivers/video/aty/radeon_base.c | 6 ++-- trunk/include/asm-mips/mach-generic/ide.h | 31 ------------------- trunk/include/media/v4l2-dev.h | 5 ++- trunk/net/sunrpc/svcsock.c | 2 +- 29 files changed, 93 insertions(+), 170 deletions(-) diff --git a/[refs] b/[refs] index 8d4790ae81f1..7a96ae1175e3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7eeac505d912cfe5805290f8f9e293b134e00237 +refs/heads/master: a53d6fb83efc75bbd7876459e6e1291c4925103d diff --git a/trunk/Documentation/ManagementStyle b/trunk/Documentation/ManagementStyle index 49a8efa5afeb..cbbebfb51ffe 100644 --- a/trunk/Documentation/ManagementStyle +++ b/trunk/Documentation/ManagementStyle @@ -166,7 +166,7 @@ To solve this problem, you really only have two options: The option of being unfailingly polite really doesn't exist. Nobody will trust somebody who is so clearly hiding his true character. -(*) Paul Simon sang "Fifty Ways to Leave Your Lover", because quite +(*) Paul Simon sang "Fifty Ways to Lose Your Lover", because quite frankly, "A Million Ways to Tell a Developer He Is a D*ckhead" doesn't scan nearly as well. But I'm sure he thought about it. diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index 586b6f85d4e0..b41cde31d112 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -1,5 +1,5 @@ - Kernel Parameters - ~~~~~~~~~~~~~~~~~ + Kernel Parameters + ~~~~~~~~~~~~~~~~~ The following is a consolidated list of the kernel parameters as implemented (mostly) by the __setup() macro and sorted into English Dictionary order @@ -468,6 +468,9 @@ and is between 256 and 4096 characters. It is defined in the file Format: ,,,[,] + cpia_pp= [HW,PPT] + Format: { parport | auto | none } + crashkernel=nn[KMG]@ss[KMG] [KNL] Reserve a chunk of physical memory to hold a kernel to switch to with kexec on panic. @@ -1462,7 +1465,7 @@ and is between 256 and 4096 characters. It is defined in the file reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode Format: [,[,...]] - See arch/*/kernel/reboot.c or arch/*/kernel/process.c + See arch/*/kernel/reboot.c or arch/*/kernel/process.c reserve= [KNL,BUGS] Force the kernel to ignore some iomem area @@ -1550,12 +1553,12 @@ and is between 256 and 4096 characters. It is defined in the file selinux_compat_net = [SELINUX] Set initial selinux_compat_net flag value. - Format: { "0" | "1" } - 0 -- use new secmark-based packet controls - 1 -- use legacy packet controls - Default value is 0 (preferred). - Value can be changed at runtime via - /selinux/compat_net. + Format: { "0" | "1" } + 0 -- use new secmark-based packet controls + 1 -- use legacy packet controls + Default value is 0 (preferred). + Value can be changed at runtime via + /selinux/compat_net. serialnumber [BUGS=X86-32] @@ -1954,7 +1957,7 @@ and is between 256 and 4096 characters. It is defined in the file norandmaps Don't use address space randomization Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space - unwind_debug=N N > 0 will enable dwarf2 unwinder debugging + unwind_debug=N N > 0 will enable dwarf2 unwinder debugging This is useful to get more information why you got a "dwarf2 unwinder stuck" diff --git a/trunk/Documentation/video4linux/cx2341x/fw-encoder-api.txt b/trunk/Documentation/video4linux/cx2341x/fw-encoder-api.txt index 5a27af2ee1c6..5dd3109a8b3f 100644 --- a/trunk/Documentation/video4linux/cx2341x/fw-encoder-api.txt +++ b/trunk/Documentation/video4linux/cx2341x/fw-encoder-api.txt @@ -407,10 +407,8 @@ Description u32 length; // Length of this frame u32 offset_low; // Offset in the file of the u32 offset_high; // start of this frame - u32 mask1; // Bits 0-2 are the type mask: + u32 mask1; // Bits 0-1 are the type mask: // 1=I, 2=P, 4=B - // 0=End of Program Index, other fields - // are invalid. u32 pts; // The PTS of the frame u32 mask2; // Bit 0 is bit 32 of the pts. }; diff --git a/trunk/arch/arm/mach-realview/realview_eb.c b/trunk/arch/arm/mach-realview/realview_eb.c index 3dba666151db..ecec2f85c4cd 100644 --- a/trunk/arch/arm/mach-realview/realview_eb.c +++ b/trunk/arch/arm/mach-realview/realview_eb.c @@ -165,7 +165,7 @@ static void __init gic_init_irq(void) #endif gic_dist_init(0, __io_address(REALVIEW_GIC_DIST_BASE), 29); gic_cpu_init(0, __io_address(REALVIEW_GIC_CPU_BASE)); -#ifdef CONFIG_REALVIEW_MPCORE +#if defined(CONFIG_REALVIEW_MPCORE) && !defined(CONFIG_REALVIEW_MPCORE_REVB) gic_dist_init(1, __io_address(REALVIEW_GIC1_DIST_BASE), 64); gic_cpu_init(1, __io_address(REALVIEW_GIC1_CPU_BASE)); gic_cascade_irq(1, IRQ_EB_IRQ1); diff --git a/trunk/arch/mips/kernel/cpu-probe.c b/trunk/arch/mips/kernel/cpu-probe.c index 3e004161ebd5..06448a9656dc 100644 --- a/trunk/arch/mips/kernel/cpu-probe.c +++ b/trunk/arch/mips/kernel/cpu-probe.c @@ -199,14 +199,7 @@ static inline void check_wait(void) if ((c->processor_id & 0xff) <= 0x64) break; - /* - * Another rev is incremeting c0_count at a reduced clock - * rate while in WAIT mode. So we basically have the choice - * between using the cp0 timer as clocksource or avoiding - * the WAIT instruction. Until more details are known, - * disable the use of WAIT for 20Kc entirely. - cpu_wait = r4k_wait; - */ + cpu_wait = r4k_wait; break; case CPU_RM9000: if ((c->processor_id & 0x00ff) >= 0x40) diff --git a/trunk/arch/mips/kernel/rtlx.c b/trunk/arch/mips/kernel/rtlx.c index 1ba00c15505b..aab89e97abb5 100644 --- a/trunk/arch/mips/kernel/rtlx.c +++ b/trunk/arch/mips/kernel/rtlx.c @@ -56,6 +56,8 @@ static struct chan_waitqueues { struct mutex mutex; } channel_wqs[RTLX_CHANNELS]; +static struct irqaction irq; +static int irq_num; static struct vpe_notifications notify; static int sp_stopping = 0; @@ -109,7 +111,7 @@ static void __used dump_rtlx(void) static int rtlx_init(struct rtlx_info *rtlxi) { if (rtlxi->id != RTLX_ID) { - printk(KERN_ERR "no valid RTLX id at 0x%p 0x%lx\n", rtlxi, rtlxi->id); + printk(KERN_ERR "no valid RTLX id at 0x%p 0x%x\n", rtlxi, rtlxi->id); return -ENOEXEC; } diff --git a/trunk/arch/mips/kernel/scall64-n32.S b/trunk/arch/mips/kernel/scall64-n32.S index 118be24224f2..53d7a977193c 100644 --- a/trunk/arch/mips/kernel/scall64-n32.S +++ b/trunk/arch/mips/kernel/scall64-n32.S @@ -375,7 +375,7 @@ EXPORT(sysn32_call_table) PTR sys_mkdirat PTR sys_mknodat PTR sys_fchownat - PTR compat_sys_futimesat /* 6255 */ + PTR sys_futimesat /* 6255 */ PTR sys_newfstatat PTR sys_unlinkat PTR sys_renameat diff --git a/trunk/arch/mips/kernel/time.c b/trunk/arch/mips/kernel/time.c index 9a5596bf8571..d48d1d5bea0a 100644 --- a/trunk/arch/mips/kernel/time.c +++ b/trunk/arch/mips/kernel/time.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/mips/mips-boards/malta/malta_int.c b/trunk/arch/mips/mips-boards/malta/malta_int.c index b73f21823c5e..97aeb8c4e601 100644 --- a/trunk/arch/mips/mips-boards/malta/malta_int.c +++ b/trunk/arch/mips/mips-boards/malta/malta_int.c @@ -256,7 +256,7 @@ asmlinkage void plat_irq_dispatch(void) if (irq == MIPSCPU_INT_I8259A) malta_hw0_irqdispatch(); - else if (irq >= 0) + else if (irq > 0) do_IRQ(MIPS_CPU_IRQ_BASE + irq); else spurious_interrupt(); diff --git a/trunk/arch/mips/mm/tlbex.c b/trunk/arch/mips/mm/tlbex.c index 6c425b052442..9cb39644b6f1 100644 --- a/trunk/arch/mips/mm/tlbex.c +++ b/trunk/arch/mips/mm/tlbex.c @@ -57,21 +57,6 @@ static __init int __maybe_unused r10000_llsc_war(void) return R10000_LLSC_WAR; } -/* - * Found by experiment: At least some revisions of the 4kc throw under - * some circumstances a machine check exception, triggered by invalid - * values in the index register. Delaying the tlbp instruction until - * after the next branch, plus adding an additional nop in front of - * tlbwi/tlbwr avoids the invalid index register values. Nobody knows - * why; it's not an issue caused by the core RTL. - * - */ -static __init int __attribute__((unused)) m4kc_tlbp_war(void) -{ - return (current_cpu_data.processor_id & 0xffff00) == - (PRID_COMP_MIPS | PRID_IMP_4KC); -} - /* * A little micro-assembler, intended for TLB refill handler * synthesizing. It is intentionally kept simple, does only support @@ -909,8 +894,6 @@ static __init void build_tlb_write_entry(u32 **p, struct label **l, case CPU_20KC: case CPU_25KF: case CPU_LOONGSON2: - if (m4kc_tlbp_war()) - i_nop(p); tlbw(p); break; @@ -1722,8 +1705,7 @@ build_r4000_tlbchange_handler_head(u32 **p, struct label **l, l_smp_pgtable_change(l, *p); # endif iPTE_LW(p, l, pte, ptr); /* get even pte */ - if (!m4kc_tlbp_war()) - build_tlb_probe_entry(p); + build_tlb_probe_entry(p); } static void __init @@ -1765,8 +1747,6 @@ static void __init build_r4000_tlb_load_handler(void) build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1); build_pte_present(&p, &l, &r, K0, K1, label_nopage_tlbl); - if (m4kc_tlbp_war()) - build_tlb_probe_entry(&p); build_make_valid(&p, &r, K0, K1); build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1); @@ -1801,8 +1781,6 @@ static void __init build_r4000_tlb_store_handler(void) build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1); build_pte_writable(&p, &l, &r, K0, K1, label_nopage_tlbs); - if (m4kc_tlbp_war()) - build_tlb_probe_entry(&p); build_make_write(&p, &r, K0, K1); build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1); @@ -1837,8 +1815,6 @@ static void __init build_r4000_tlb_modify_handler(void) build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1); build_pte_modifiable(&p, &l, &r, K0, K1, label_nopage_tlbm); - if (m4kc_tlbp_war()) - build_tlb_probe_entry(&p); /* Present and writable bits set, set accessed and dirty bits. */ build_make_write(&p, &r, K0, K1); build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1); diff --git a/trunk/block/ll_rw_blk.c b/trunk/block/ll_rw_blk.c index ed39313c4085..a15845c164f2 100644 --- a/trunk/block/ll_rw_blk.c +++ b/trunk/block/ll_rw_blk.c @@ -1075,6 +1075,12 @@ void blk_queue_end_tag(struct request_queue *q, struct request *rq) */ return; + if (unlikely(!__test_and_clear_bit(tag, bqt->tag_map))) { + printk(KERN_ERR "%s: attempt to clear non-busy tag (%d)\n", + __FUNCTION__, tag); + return; + } + list_del_init(&rq->queuelist); rq->cmd_flags &= ~REQ_QUEUED; rq->tag = -1; @@ -1084,19 +1090,6 @@ void blk_queue_end_tag(struct request_queue *q, struct request *rq) __FUNCTION__, tag); bqt->tag_index[tag] = NULL; - - /* - * We use test_and_clear_bit's memory ordering properties here. - * The tag_map bit acts as a lock for tag_index[bit], so we need - * a barrer before clearing the bit (precisely: release semantics). - * Could use clear_bit_unlock when it is merged. - */ - if (unlikely(!test_and_clear_bit(tag, bqt->tag_map))) { - printk(KERN_ERR "%s: attempt to clear non-busy tag (%d)\n", - __FUNCTION__, tag); - return; - } - bqt->busy--; } @@ -1143,10 +1136,6 @@ int blk_queue_start_tag(struct request_queue *q, struct request *rq) return 1; } while (test_and_set_bit(tag, bqt->tag_map)); - /* - * We rely on test_and_set_bit providing lock memory ordering semantics - * (could use test_and_set_bit_lock when it is merged). - */ rq->cmd_flags |= REQ_QUEUED; rq->tag = tag; diff --git a/trunk/drivers/kvm/kvm.h b/trunk/drivers/kvm/kvm.h index 336be86c6f5a..3ac9cbce3369 100644 --- a/trunk/drivers/kvm/kvm.h +++ b/trunk/drivers/kvm/kvm.h @@ -619,7 +619,7 @@ unsigned long segment_base(u16 selector); void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, const u8 *old, const u8 *new, int bytes); int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva); -void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu); +void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu); int kvm_mmu_load(struct kvm_vcpu *vcpu); void kvm_mmu_unload(struct kvm_vcpu *vcpu); @@ -627,14 +627,10 @@ int kvm_hypercall(struct kvm_vcpu *vcpu, struct kvm_run *run); static inline int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, u32 error_code) -{ - return vcpu->mmu.page_fault(vcpu, gva, error_code); -} - -static inline void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu) { if (unlikely(vcpu->kvm->n_free_mmu_pages < KVM_MIN_FREE_MMU_PAGES)) - __kvm_mmu_free_some_pages(vcpu); + kvm_mmu_free_some_pages(vcpu); + return vcpu->mmu.page_fault(vcpu, gva, error_code); } static inline int kvm_mmu_reload(struct kvm_vcpu *vcpu) diff --git a/trunk/drivers/kvm/mmu.c b/trunk/drivers/kvm/mmu.c index 23965aa5ee78..1a87ba9d5156 100644 --- a/trunk/drivers/kvm/mmu.c +++ b/trunk/drivers/kvm/mmu.c @@ -273,14 +273,12 @@ static int mmu_topup_memory_caches(struct kvm_vcpu *vcpu) int r; r = __mmu_topup_memory_caches(vcpu, GFP_NOWAIT); - kvm_mmu_free_some_pages(vcpu); if (r < 0) { spin_unlock(&vcpu->kvm->lock); kvm_arch_ops->vcpu_put(vcpu); r = __mmu_topup_memory_caches(vcpu, GFP_KERNEL); kvm_arch_ops->vcpu_load(vcpu); spin_lock(&vcpu->kvm->lock); - kvm_mmu_free_some_pages(vcpu); } return r; } @@ -1210,7 +1208,7 @@ int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva) return kvm_mmu_unprotect_page(vcpu, gpa >> PAGE_SHIFT); } -void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu) +void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu) { while (vcpu->kvm->n_free_mmu_pages < KVM_REFILL_PAGES) { struct kvm_mmu_page *page; @@ -1220,6 +1218,7 @@ void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu) kvm_mmu_zap_page(vcpu->kvm, page); } } +EXPORT_SYMBOL_GPL(kvm_mmu_free_some_pages); static void free_mmu_pages(struct kvm_vcpu *vcpu) { diff --git a/trunk/drivers/md/dm-bio-list.h b/trunk/drivers/md/dm-bio-list.h index 3f7b827649e3..16ee3b018b3a 100644 --- a/trunk/drivers/md/dm-bio-list.h +++ b/trunk/drivers/md/dm-bio-list.h @@ -9,8 +9,6 @@ #include -#ifdef CONFIG_BLOCK - struct bio_list { struct bio *head; struct bio *tail; @@ -108,5 +106,4 @@ static inline struct bio *bio_list_get(struct bio_list *bl) return bio; } -#endif /* CONFIG_BLOCK */ #endif diff --git a/trunk/drivers/media/video/cx88/cx88-mpeg.c b/trunk/drivers/media/video/cx88/cx88-mpeg.c index da7a6b591a67..317a2a3f9cc1 100644 --- a/trunk/drivers/media/video/cx88/cx88-mpeg.c +++ b/trunk/drivers/media/video/cx88/cx88-mpeg.c @@ -580,7 +580,7 @@ struct cx8802_dev * cx8802_get_device(struct inode *inode) list_for_each(list,&cx8802_devlist) { h = list_entry(list, struct cx8802_dev, devlist); - if (h->mpeg_dev && h->mpeg_dev->minor == minor) + if (h->mpeg_dev->minor == minor) return h; } diff --git a/trunk/drivers/media/video/ivtv/ivtv-fileops.c b/trunk/drivers/media/video/ivtv/ivtv-fileops.c index 0285c4a830eb..5dd519caf81d 100644 --- a/trunk/drivers/media/video/ivtv/ivtv-fileops.c +++ b/trunk/drivers/media/video/ivtv/ivtv-fileops.c @@ -190,9 +190,7 @@ static void ivtv_update_pgm_info(struct ivtv *itv) int idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num; struct v4l2_enc_idx_entry *e = itv->pgm_info + idx; u32 addr = itv->pgm_info_offset + 4 + idx * 24; - const int mapping[8] = { -1, V4L2_ENC_IDX_FRAME_I, V4L2_ENC_IDX_FRAME_P, -1, - V4L2_ENC_IDX_FRAME_B, -1, -1, -1 }; - // 1=I, 2=P, 4=B + const int mapping[] = { V4L2_ENC_IDX_FRAME_P, V4L2_ENC_IDX_FRAME_I, V4L2_ENC_IDX_FRAME_B, 0 }; e->offset = read_enc(addr + 4) + ((u64)read_enc(addr + 8) << 32); if (e->offset > itv->mpg_data_received) { @@ -201,7 +199,7 @@ static void ivtv_update_pgm_info(struct ivtv *itv) e->offset += itv->vbi_data_inserted; e->length = read_enc(addr); e->pts = read_enc(addr + 16) + ((u64)(read_enc(addr + 20) & 1) << 32); - e->flags = mapping[read_enc(addr + 12) & 7]; + e->flags = mapping[read_enc(addr + 12) & 3]; i++; } itv->pgm_info_write_idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num; diff --git a/trunk/drivers/media/video/ivtv/ivtv-ioctl.c b/trunk/drivers/media/video/ivtv/ivtv-ioctl.c index dfe0aedc60fd..5977a79619c2 100644 --- a/trunk/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/trunk/drivers/media/video/ivtv/ivtv-ioctl.c @@ -1099,21 +1099,14 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void case VIDIOC_G_ENC_INDEX: { struct v4l2_enc_idx *idx = arg; - struct v4l2_enc_idx_entry *e = idx->entry; - int entries; int i; - entries = (itv->pgm_info_write_idx + IVTV_MAX_PGM_INDEX - itv->pgm_info_read_idx) % + idx->entries = (itv->pgm_info_write_idx + IVTV_MAX_PGM_INDEX - itv->pgm_info_read_idx) % IVTV_MAX_PGM_INDEX; - if (entries > V4L2_ENC_IDX_ENTRIES) - entries = V4L2_ENC_IDX_ENTRIES; - idx->entries = 0; - for (i = 0; i < entries; i++) { - *e = itv->pgm_info[(itv->pgm_info_read_idx + i) % IVTV_MAX_PGM_INDEX]; - if ((e->flags & V4L2_ENC_IDX_FRAME_MASK) <= V4L2_ENC_IDX_FRAME_B) { - idx->entries++; - e++; - } + if (idx->entries > V4L2_ENC_IDX_ENTRIES) + idx->entries = V4L2_ENC_IDX_ENTRIES; + for (i = 0; i < idx->entries; i++) { + idx->entry[i] = itv->pgm_info[(itv->pgm_info_read_idx + i) % IVTV_MAX_PGM_INDEX]; } itv->pgm_info_read_idx = (itv->pgm_info_read_idx + idx->entries) % IVTV_MAX_PGM_INDEX; break; diff --git a/trunk/drivers/media/video/pwc/pwc-if.c b/trunk/drivers/media/video/pwc/pwc-if.c index 931b274bffca..3d81966d8c42 100644 --- a/trunk/drivers/media/video/pwc/pwc-if.c +++ b/trunk/drivers/media/video/pwc/pwc-if.c @@ -1243,7 +1243,7 @@ static int pwc_video_close(struct inode *inode, struct file *file) PWC_ERROR("Failed to power down camera (%d)\n", i); } pdev->vopen--; - PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", pdev->vopen); + PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", i); } else { pwc_cleanup(pdev); /* Free memory (don't set pdev to 0 just yet) */ diff --git a/trunk/drivers/media/video/saa7134/saa7134-cards.c b/trunk/drivers/media/video/saa7134/saa7134-cards.c index 25ec16810818..8ec83bd70094 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-cards.c +++ b/trunk/drivers/media/video/saa7134/saa7134-cards.c @@ -1537,18 +1537,18 @@ struct saa7134_board saa7134_boards[] = { },{ .name = name_comp1, .vmux = 0, - .amux = LINE1, - .gpio = 0x02, + .amux = LINE2, + .gpio = 0x00, },{ .name = name_comp2, .vmux = 3, - .amux = LINE1, - .gpio = 0x02, + .amux = LINE2, + .gpio = 0x00, },{ .name = name_svideo, .vmux = 8, - .amux = LINE1, - .gpio = 0x02, + .amux = LINE2, + .gpio = 0x00, }}, .radio = { .name = name_radio, diff --git a/trunk/drivers/media/video/saa7191.c b/trunk/drivers/media/video/saa7191.c index b4018cce3285..8615a6081a5d 100644 --- a/trunk/drivers/media/video/saa7191.c +++ b/trunk/drivers/media/video/saa7191.c @@ -130,7 +130,7 @@ static int saa7191_write_reg(struct i2c_client *client, u8 reg, /* the first byte of data must be the first subaddress number (register) */ static int saa7191_write_block(struct i2c_client *client, - u8 length, const u8 *data) + u8 length, u8 *data) { int i; int ret; @@ -592,7 +592,7 @@ static int saa7191_attach(struct i2c_adapter *adap, int addr, int kind) if (err) goto out_free_decoder; - err = saa7191_write_block(client, sizeof(initseq), initseq); + err = saa7191_write_block(client, sizeof(initseq), (u8 *)initseq); if (err) { printk(KERN_ERR "SAA7191 initialization failed\n"); goto out_detach_client; diff --git a/trunk/drivers/usb/core/quirks.c b/trunk/drivers/usb/core/quirks.c index ebf3dc20110a..7f17d0fd76c0 100644 --- a/trunk/drivers/usb/core/quirks.c +++ b/trunk/drivers/usb/core/quirks.c @@ -152,10 +152,4 @@ void usb_detect_quirks(struct usb_device *udev) /* do any special quirk handling here if needed */ if (udev->quirks & USB_QUIRK_NO_AUTOSUSPEND) usb_autosuspend_quirk(udev); - - /* By default, disable autosuspend for all non-hubs */ -#ifdef CONFIG_USB_SUSPEND - if (udev->descriptor.bDeviceClass != USB_CLASS_HUB) - udev->autosuspend_delay = -1; -#endif } diff --git a/trunk/drivers/usb/storage/scsiglue.c b/trunk/drivers/usb/storage/scsiglue.c index 1ba19eaa1970..47e56079925d 100644 --- a/trunk/drivers/usb/storage/scsiglue.c +++ b/trunk/drivers/usb/storage/scsiglue.c @@ -285,10 +285,15 @@ static int device_reset(struct scsi_cmnd *srb) US_DEBUGP("%s called\n", __FUNCTION__); - /* lock the device pointers and do the reset */ - mutex_lock(&(us->dev_mutex)); - result = us->transport_reset(us); - mutex_unlock(&us->dev_mutex); + result = usb_autopm_get_interface(us->pusb_intf); + if (result == 0) { + + /* lock the device pointers and do the reset */ + mutex_lock(&(us->dev_mutex)); + result = us->transport_reset(us); + mutex_unlock(&us->dev_mutex); + usb_autopm_put_interface(us->pusb_intf); + } return result < 0 ? FAILED : SUCCESS; } diff --git a/trunk/drivers/usb/storage/usb.c b/trunk/drivers/usb/storage/usb.c index 59181667066c..25e557d4fe6b 100644 --- a/trunk/drivers/usb/storage/usb.c +++ b/trunk/drivers/usb/storage/usb.c @@ -184,16 +184,14 @@ static int storage_suspend(struct usb_interface *iface, pm_message_t message) { struct us_data *us = usb_get_intfdata(iface); + US_DEBUGP("%s\n", __FUNCTION__); + /* Wait until no command is running */ mutex_lock(&us->dev_mutex); - US_DEBUGP("%s\n", __FUNCTION__); if (us->suspend_resume_hook) (us->suspend_resume_hook)(us, US_SUSPEND); - /* When runtime PM is working, we'll set a flag to indicate - * whether we should autoresume when a SCSI request arrives. */ - mutex_unlock(&us->dev_mutex); return 0; } @@ -202,13 +200,11 @@ static int storage_resume(struct usb_interface *iface) { struct us_data *us = usb_get_intfdata(iface); - mutex_lock(&us->dev_mutex); - US_DEBUGP("%s\n", __FUNCTION__); + if (us->suspend_resume_hook) (us->suspend_resume_hook)(us, US_RESUME); - mutex_unlock(&us->dev_mutex); return 0; } @@ -306,6 +302,7 @@ static int usb_stor_control_thread(void * __us) { struct us_data *us = (struct us_data *)__us; struct Scsi_Host *host = us_to_host(us); + int autopm_rc; for(;;) { US_DEBUGP("*** thread sleeping.\n"); @@ -314,6 +311,9 @@ static int usb_stor_control_thread(void * __us) US_DEBUGP("*** thread awakened.\n"); + /* Autoresume the device */ + autopm_rc = usb_autopm_get_interface(us->pusb_intf); + /* lock the device pointers */ mutex_lock(&(us->dev_mutex)); @@ -372,6 +372,12 @@ static int usb_stor_control_thread(void * __us) us->srb->result = SAM_STAT_GOOD; } + /* Did the autoresume fail? */ + else if (autopm_rc < 0) { + US_DEBUGP("Could not wake device\n"); + us->srb->result = DID_ERROR << 16; + } + /* we've got a command, let's do it! */ else { US_DEBUG(usb_stor_show_command(us->srb)); @@ -414,6 +420,10 @@ static int usb_stor_control_thread(void * __us) /* unlock the device pointers */ mutex_unlock(&us->dev_mutex); + + /* Start an autosuspend */ + if (autopm_rc == 0) + usb_autopm_put_interface(us->pusb_intf); } /* for (;;) */ /* Wait until we are told to stop */ @@ -931,6 +941,7 @@ static int usb_stor_scan_thread(void * __us) /* Should we unbind if no devices were detected? */ } + usb_autopm_put_interface(us->pusb_intf); complete_and_exit(&us->scanning_done, 0); } @@ -1016,6 +1027,7 @@ static int storage_probe(struct usb_interface *intf, goto BadDevice; } + usb_autopm_get_interface(intf); /* dropped in the scanning thread */ wake_up_process(th); return 0; @@ -1053,6 +1065,7 @@ static struct usb_driver usb_storage_driver = { .pre_reset = storage_pre_reset, .post_reset = storage_post_reset, .id_table = storage_usb_ids, + .supports_autosuspend = 1, }; static int __init usb_stor_init(void) diff --git a/trunk/drivers/video/aty/ati_ids.h b/trunk/drivers/video/aty/ati_ids.h index dca2eb8f2dde..685a754991c6 100644 --- a/trunk/drivers/video/aty/ati_ids.h +++ b/trunk/drivers/video/aty/ati_ids.h @@ -192,12 +192,6 @@ #define PCI_CHIP_RS300_5835 0x5835 #define PCI_CHIP_RS300_5836 0x5836 #define PCI_CHIP_RS300_5837 0x5837 -#define PCI_CHIP_RS480_5955 0x5955 -#define PCI_CHIP_RV280_5960 0x5960 -#define PCI_CHIP_RV280_5961 0x5961 -#define PCI_CHIP_RV280_5962 0x5962 -#define PCI_CHIP_RV280_5964 0x5964 -#define PCI_CHIP_RS482_5975 0x5975 #define PCI_CHIP_RV370_5B60 0x5B60 #define PCI_CHIP_RV370_5B61 0x5B61 #define PCI_CHIP_RV370_5B62 0x5B62 @@ -206,8 +200,14 @@ #define PCI_CHIP_RV370_5B65 0x5B65 #define PCI_CHIP_RV370_5B66 0x5B66 #define PCI_CHIP_RV370_5B67 0x5B67 +#define PCI_CHIP_RV280_5960 0x5960 +#define PCI_CHIP_RV280_5961 0x5961 +#define PCI_CHIP_RV280_5962 0x5962 +#define PCI_CHIP_RV280_5964 0x5964 +#define PCI_CHIP_RS485_5975 0x5975 #define PCI_CHIP_RV280_5C61 0x5C61 #define PCI_CHIP_RV280_5C63 0x5C63 #define PCI_CHIP_R423_5D57 0x5D57 #define PCI_CHIP_RS350_7834 0x7834 #define PCI_CHIP_RS350_7835 0x7835 +#define PCI_CHIP_RS480_5955 0x5955 diff --git a/trunk/drivers/video/aty/radeon_base.c b/trunk/drivers/video/aty/radeon_base.c index 4b747bdaeea6..47ca62fe7c3e 100644 --- a/trunk/drivers/video/aty/radeon_base.c +++ b/trunk/drivers/video/aty/radeon_base.c @@ -102,7 +102,6 @@ static struct pci_device_id radeonfb_pci_table[] = { /* Radeon Xpress 200m */ CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), - CHIP_DEF(PCI_CHIP_RS482_5975, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), /* Mobility M6 */ CHIP_DEF(PCI_CHIP_RADEON_LY, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), CHIP_DEF(PCI_CHIP_RADEON_LZ, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), @@ -154,6 +153,8 @@ static struct pci_device_id radeonfb_pci_table[] = { /* Mobility 9200 (M9+) */ CHIP_DEF(PCI_CHIP_RV280_5C61, RV280, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), CHIP_DEF(PCI_CHIP_RV280_5C63, RV280, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), + /*Mobility Xpress 200 */ + CHIP_DEF(PCI_CHIP_RS485_5975, R300, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), /* 9200 */ CHIP_DEF(PCI_CHIP_RV280_5960, RV280, CHIP_HAS_CRTC2), CHIP_DEF(PCI_CHIP_RV280_5961, RV280, CHIP_HAS_CRTC2), @@ -1284,8 +1285,7 @@ static void radeon_write_pll_regs(struct radeonfb_info *rinfo, struct radeon_reg if (rinfo->family == CHIP_FAMILY_R300 || rinfo->family == CHIP_FAMILY_RS300 || rinfo->family == CHIP_FAMILY_R350 || - rinfo->family == CHIP_FAMILY_RV350 || - rinfo->family == CHIP_FAMILY_RV380 ) { + rinfo->family == CHIP_FAMILY_RV350) { if (mode->ppll_ref_div & R300_PPLL_REF_DIV_ACC_MASK) { /* When restoring console mode, use saved PPLL_REF_DIV * setting. diff --git a/trunk/include/asm-mips/mach-generic/ide.h b/trunk/include/asm-mips/mach-generic/ide.h index a77128362a7d..2b928577be5d 100644 --- a/trunk/include/asm-mips/mach-generic/ide.h +++ b/trunk/include/asm-mips/mach-generic/ide.h @@ -29,35 +29,6 @@ #define IDE_ARCH_OBSOLETE_DEFAULTS -static __inline__ int ide_probe_legacy(void) -{ -#ifdef CONFIG_PCI - struct pci_dev *dev; - /* - * This can be called on the ide_setup() path, super-early in - * boot. But the down_read() will enable local interrupts, - * which can cause some machines to crash. So here we detect - * and flag that situation and bail out early. - */ - if (no_pci_devices()) - return 0; - dev = pci_get_class(PCI_CLASS_BRIDGE_EISA << 8, NULL); - if (dev) - goto found; - dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL); - if (dev) - goto found; - return 0; -found: - pci_dev_put(dev); - return 1; -#elif defined(CONFIG_EISA) || defined(CONFIG_ISA) - return 1; -#else - return 0; -#endif -} - static __inline__ int ide_default_irq(unsigned long base) { switch (base) { @@ -74,8 +45,6 @@ static __inline__ int ide_default_irq(unsigned long base) static __inline__ unsigned long ide_default_io_base(int index) { - if (!ide_probe_legacy()) - return 0; /* * If PCI is present then it is not safe to poke around * the other legacy IDE ports. Only 0x1f0 and 0x170 are diff --git a/trunk/include/media/v4l2-dev.h b/trunk/include/media/v4l2-dev.h index 17f8f3a2f0a3..d62847f846c2 100644 --- a/trunk/include/media/v4l2-dev.h +++ b/trunk/include/media/v4l2-dev.h @@ -337,9 +337,6 @@ void *priv; struct class_device class_dev; /* sysfs */ }; -/* Class-dev to video-device */ -#define to_video_device(cd) container_of(cd, struct video_device, class_dev) - /* Version 2 functions */ extern int video_register_device(struct video_device *vfd, int type, int nr); void video_unregister_device(struct video_device *); @@ -357,9 +354,11 @@ extern int video_usercopy(struct inode *inode, struct file *file, int (*func)(struct inode *inode, struct file *file, unsigned int cmd, void *arg)); + #ifdef CONFIG_VIDEO_V4L1_COMPAT #include +#define to_video_device(cd) container_of(cd, struct video_device, class_dev) static inline int __must_check video_device_create_file(struct video_device *vfd, struct class_device_attribute *attr) diff --git a/trunk/net/sunrpc/svcsock.c b/trunk/net/sunrpc/svcsock.c index 1a899924023f..12ff5da8160e 100644 --- a/trunk/net/sunrpc/svcsock.c +++ b/trunk/net/sunrpc/svcsock.c @@ -1592,7 +1592,7 @@ svc_age_temp_sockets(unsigned long closure) if (!test_and_set_bit(SK_OLD, &svsk->sk_flags)) continue; - if (atomic_read(&svsk->sk_inuse) > 1 || test_bit(SK_BUSY, &svsk->sk_flags)) + if (atomic_read(&svsk->sk_inuse) || test_bit(SK_BUSY, &svsk->sk_flags)) continue; atomic_inc(&svsk->sk_inuse); list_move(le, &to_be_aged);