aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/ManagementStyle2
-rw-r--r--Documentation/kernel-parameters.txt23
-rw-r--r--Documentation/video4linux/cx2341x/fw-encoder-api.txt4
-rw-r--r--arch/mips/kernel/cpu-probe.c9
-rw-r--r--arch/mips/kernel/rtlx.c4
-rw-r--r--arch/mips/kernel/scall64-n32.S2
-rw-r--r--arch/mips/kernel/time.c1
-rw-r--r--arch/mips/mips-boards/malta/malta_int.c2
-rw-r--r--arch/mips/mm/tlbex.c26
-rw-r--r--block/ll_rw_blk.c23
-rw-r--r--drivers/kvm/kvm.h10
-rw-r--r--drivers/kvm/mmu.c5
-rw-r--r--drivers/md/dm-bio-list.h3
-rw-r--r--drivers/media/video/cx88/cx88-mpeg.c2
-rw-r--r--drivers/media/video/ivtv/ivtv-fileops.c6
-rw-r--r--drivers/media/video/ivtv/ivtv-ioctl.c17
-rw-r--r--drivers/media/video/pwc/pwc-if.c2
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c12
-rw-r--r--drivers/media/video/saa7191.c4
-rw-r--r--drivers/usb/core/quirks.c6
-rw-r--r--drivers/usb/storage/scsiglue.c13
-rw-r--r--drivers/usb/storage/usb.c27
-rw-r--r--drivers/video/aty/ati_ids.h12
-rw-r--r--drivers/video/aty/radeon_base.c6
-rw-r--r--include/asm-mips/mach-generic/ide.h31
-rw-r--r--include/media/v4l2-dev.h5
-rw-r--r--net/sunrpc/svcsock.c2
27 files changed, 168 insertions, 91 deletions
diff --git a/Documentation/ManagementStyle b/Documentation/ManagementStyle
index cbbebfb51ffe..49a8efa5afeb 100644
--- a/Documentation/ManagementStyle
+++ b/Documentation/ManagementStyle
@@ -166,7 +166,7 @@ To solve this problem, you really only have two options:
166The option of being unfailingly polite really doesn't exist. Nobody will 166The option of being unfailingly polite really doesn't exist. Nobody will
167trust somebody who is so clearly hiding his true character. 167trust somebody who is so clearly hiding his true character.
168 168
169(*) Paul Simon sang "Fifty Ways to Lose Your Lover", because quite 169(*) Paul Simon sang "Fifty Ways to Leave Your Lover", because quite
170frankly, "A Million Ways to Tell a Developer He Is a D*ckhead" doesn't 170frankly, "A Million Ways to Tell a Developer He Is a D*ckhead" doesn't
171scan nearly as well. But I'm sure he thought about it. 171scan nearly as well. But I'm sure he thought about it.
172 172
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index b41cde31d112..586b6f85d4e0 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1,5 +1,5 @@
1 Kernel Parameters 1 Kernel Parameters
2 ~~~~~~~~~~~~~~~~~ 2 ~~~~~~~~~~~~~~~~~
3 3
4The following is a consolidated list of the kernel parameters as implemented 4The following is a consolidated list of the kernel parameters as implemented
5(mostly) by the __setup() macro and sorted into English Dictionary order 5(mostly) by the __setup() macro and sorted into English Dictionary order
@@ -468,9 +468,6 @@ and is between 256 and 4096 characters. It is defined in the file
468 Format: 468 Format:
469 <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>] 469 <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>]
470 470
471 cpia_pp= [HW,PPT]
472 Format: { parport<nr> | auto | none }
473
474 crashkernel=nn[KMG]@ss[KMG] 471 crashkernel=nn[KMG]@ss[KMG]
475 [KNL] Reserve a chunk of physical memory to 472 [KNL] Reserve a chunk of physical memory to
476 hold a kernel to switch to with kexec on panic. 473 hold a kernel to switch to with kexec on panic.
@@ -1465,7 +1462,7 @@ and is between 256 and 4096 characters. It is defined in the file
1465 1462
1466 reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode 1463 reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode
1467 Format: <reboot_mode>[,<reboot_mode2>[,...]] 1464 Format: <reboot_mode>[,<reboot_mode2>[,...]]
1468 See arch/*/kernel/reboot.c or arch/*/kernel/process.c 1465 See arch/*/kernel/reboot.c or arch/*/kernel/process.c
1469 1466
1470 reserve= [KNL,BUGS] Force the kernel to ignore some iomem area 1467 reserve= [KNL,BUGS] Force the kernel to ignore some iomem area
1471 1468
@@ -1553,12 +1550,12 @@ and is between 256 and 4096 characters. It is defined in the file
1553 1550
1554 selinux_compat_net = 1551 selinux_compat_net =
1555 [SELINUX] Set initial selinux_compat_net flag value. 1552 [SELINUX] Set initial selinux_compat_net flag value.
1556 Format: { "0" | "1" } 1553 Format: { "0" | "1" }
1557 0 -- use new secmark-based packet controls 1554 0 -- use new secmark-based packet controls
1558 1 -- use legacy packet controls 1555 1 -- use legacy packet controls
1559 Default value is 0 (preferred). 1556 Default value is 0 (preferred).
1560 Value can be changed at runtime via 1557 Value can be changed at runtime via
1561 /selinux/compat_net. 1558 /selinux/compat_net.
1562 1559
1563 serialnumber [BUGS=X86-32] 1560 serialnumber [BUGS=X86-32]
1564 1561
@@ -1957,7 +1954,7 @@ and is between 256 and 4096 characters. It is defined in the file
1957 norandmaps Don't use address space randomization 1954 norandmaps Don't use address space randomization
1958 Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space 1955 Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space
1959 1956
1960 unwind_debug=N N > 0 will enable dwarf2 unwinder debugging 1957 unwind_debug=N N > 0 will enable dwarf2 unwinder debugging
1961 This is useful to get more information why 1958 This is useful to get more information why
1962 you got a "dwarf2 unwinder stuck" 1959 you got a "dwarf2 unwinder stuck"
1963 1960
diff --git a/Documentation/video4linux/cx2341x/fw-encoder-api.txt b/Documentation/video4linux/cx2341x/fw-encoder-api.txt
index 5dd3109a8b3f..5a27af2ee1c6 100644
--- a/Documentation/video4linux/cx2341x/fw-encoder-api.txt
+++ b/Documentation/video4linux/cx2341x/fw-encoder-api.txt
@@ -407,8 +407,10 @@ Description
407 u32 length; // Length of this frame 407 u32 length; // Length of this frame
408 u32 offset_low; // Offset in the file of the 408 u32 offset_low; // Offset in the file of the
409 u32 offset_high; // start of this frame 409 u32 offset_high; // start of this frame
410 u32 mask1; // Bits 0-1 are the type mask: 410 u32 mask1; // Bits 0-2 are the type mask:
411 // 1=I, 2=P, 4=B 411 // 1=I, 2=P, 4=B
412 // 0=End of Program Index, other fields
413 // are invalid.
412 u32 pts; // The PTS of the frame 414 u32 pts; // The PTS of the frame
413 u32 mask2; // Bit 0 is bit 32 of the pts. 415 u32 mask2; // Bit 0 is bit 32 of the pts.
414 }; 416 };
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 06448a9656dc..3e004161ebd5 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -199,7 +199,14 @@ static inline void check_wait(void)
199 if ((c->processor_id & 0xff) <= 0x64) 199 if ((c->processor_id & 0xff) <= 0x64)
200 break; 200 break;
201 201
202 cpu_wait = r4k_wait; 202 /*
203 * Another rev is incremeting c0_count at a reduced clock
204 * rate while in WAIT mode. So we basically have the choice
205 * between using the cp0 timer as clocksource or avoiding
206 * the WAIT instruction. Until more details are known,
207 * disable the use of WAIT for 20Kc entirely.
208 cpu_wait = r4k_wait;
209 */
203 break; 210 break;
204 case CPU_RM9000: 211 case CPU_RM9000:
205 if ((c->processor_id & 0x00ff) >= 0x40) 212 if ((c->processor_id & 0x00ff) >= 0x40)
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index aab89e97abb5..1ba00c15505b 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -56,8 +56,6 @@ static struct chan_waitqueues {
56 struct mutex mutex; 56 struct mutex mutex;
57} channel_wqs[RTLX_CHANNELS]; 57} channel_wqs[RTLX_CHANNELS];
58 58
59static struct irqaction irq;
60static int irq_num;
61static struct vpe_notifications notify; 59static struct vpe_notifications notify;
62static int sp_stopping = 0; 60static int sp_stopping = 0;
63 61
@@ -111,7 +109,7 @@ static void __used dump_rtlx(void)
111static int rtlx_init(struct rtlx_info *rtlxi) 109static int rtlx_init(struct rtlx_info *rtlxi)
112{ 110{
113 if (rtlxi->id != RTLX_ID) { 111 if (rtlxi->id != RTLX_ID) {
114 printk(KERN_ERR "no valid RTLX id at 0x%p 0x%x\n", rtlxi, rtlxi->id); 112 printk(KERN_ERR "no valid RTLX id at 0x%p 0x%lx\n", rtlxi, rtlxi->id);
115 return -ENOEXEC; 113 return -ENOEXEC;
116 } 114 }
117 115
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 53d7a977193c..118be24224f2 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -375,7 +375,7 @@ EXPORT(sysn32_call_table)
375 PTR sys_mkdirat 375 PTR sys_mkdirat
376 PTR sys_mknodat 376 PTR sys_mknodat
377 PTR sys_fchownat 377 PTR sys_fchownat
378 PTR sys_futimesat /* 6255 */ 378 PTR compat_sys_futimesat /* 6255 */
379 PTR sys_newfstatat 379 PTR sys_newfstatat
380 PTR sys_unlinkat 380 PTR sys_unlinkat
381 PTR sys_renameat 381 PTR sys_renameat
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index d48d1d5bea0a..9a5596bf8571 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/param.h> 18#include <linux/param.h>
19#include <linux/profile.h>
19#include <linux/time.h> 20#include <linux/time.h>
20#include <linux/timex.h> 21#include <linux/timex.h>
21#include <linux/smp.h> 22#include <linux/smp.h>
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 97aeb8c4e601..b73f21823c5e 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -256,7 +256,7 @@ asmlinkage void plat_irq_dispatch(void)
256 256
257 if (irq == MIPSCPU_INT_I8259A) 257 if (irq == MIPSCPU_INT_I8259A)
258 malta_hw0_irqdispatch(); 258 malta_hw0_irqdispatch();
259 else if (irq > 0) 259 else if (irq >= 0)
260 do_IRQ(MIPS_CPU_IRQ_BASE + irq); 260 do_IRQ(MIPS_CPU_IRQ_BASE + irq);
261 else 261 else
262 spurious_interrupt(); 262 spurious_interrupt();
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 9cb39644b6f1..6c425b052442 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -58,6 +58,21 @@ static __init int __maybe_unused r10000_llsc_war(void)
58} 58}
59 59
60/* 60/*
61 * Found by experiment: At least some revisions of the 4kc throw under
62 * some circumstances a machine check exception, triggered by invalid
63 * values in the index register. Delaying the tlbp instruction until
64 * after the next branch, plus adding an additional nop in front of
65 * tlbwi/tlbwr avoids the invalid index register values. Nobody knows
66 * why; it's not an issue caused by the core RTL.
67 *
68 */
69static __init int __attribute__((unused)) m4kc_tlbp_war(void)
70{
71 return (current_cpu_data.processor_id & 0xffff00) ==
72 (PRID_COMP_MIPS | PRID_IMP_4KC);
73}
74
75/*
61 * A little micro-assembler, intended for TLB refill handler 76 * A little micro-assembler, intended for TLB refill handler
62 * synthesizing. It is intentionally kept simple, does only support 77 * synthesizing. It is intentionally kept simple, does only support
63 * a subset of instructions, and does not try to hide pipeline effects 78 * a subset of instructions, and does not try to hide pipeline effects
@@ -894,6 +909,8 @@ static __init void build_tlb_write_entry(u32 **p, struct label **l,
894 case CPU_20KC: 909 case CPU_20KC:
895 case CPU_25KF: 910 case CPU_25KF:
896 case CPU_LOONGSON2: 911 case CPU_LOONGSON2:
912 if (m4kc_tlbp_war())
913 i_nop(p);
897 tlbw(p); 914 tlbw(p);
898 break; 915 break;
899 916
@@ -1705,7 +1722,8 @@ build_r4000_tlbchange_handler_head(u32 **p, struct label **l,
1705 l_smp_pgtable_change(l, *p); 1722 l_smp_pgtable_change(l, *p);
1706# endif 1723# endif
1707 iPTE_LW(p, l, pte, ptr); /* get even pte */ 1724 iPTE_LW(p, l, pte, ptr); /* get even pte */
1708 build_tlb_probe_entry(p); 1725 if (!m4kc_tlbp_war())
1726 build_tlb_probe_entry(p);
1709} 1727}
1710 1728
1711static void __init 1729static void __init
@@ -1747,6 +1765,8 @@ static void __init build_r4000_tlb_load_handler(void)
1747 1765
1748 build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1); 1766 build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1);
1749 build_pte_present(&p, &l, &r, K0, K1, label_nopage_tlbl); 1767 build_pte_present(&p, &l, &r, K0, K1, label_nopage_tlbl);
1768 if (m4kc_tlbp_war())
1769 build_tlb_probe_entry(&p);
1750 build_make_valid(&p, &r, K0, K1); 1770 build_make_valid(&p, &r, K0, K1);
1751 build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1); 1771 build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1);
1752 1772
@@ -1781,6 +1801,8 @@ static void __init build_r4000_tlb_store_handler(void)
1781 1801
1782 build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1); 1802 build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1);
1783 build_pte_writable(&p, &l, &r, K0, K1, label_nopage_tlbs); 1803 build_pte_writable(&p, &l, &r, K0, K1, label_nopage_tlbs);
1804 if (m4kc_tlbp_war())
1805 build_tlb_probe_entry(&p);
1784 build_make_write(&p, &r, K0, K1); 1806 build_make_write(&p, &r, K0, K1);
1785 build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1); 1807 build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1);
1786 1808
@@ -1815,6 +1837,8 @@ static void __init build_r4000_tlb_modify_handler(void)
1815 1837
1816 build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1); 1838 build_r4000_tlbchange_handler_head(&p, &l, &r, K0, K1);
1817 build_pte_modifiable(&p, &l, &r, K0, K1, label_nopage_tlbm); 1839 build_pte_modifiable(&p, &l, &r, K0, K1, label_nopage_tlbm);
1840 if (m4kc_tlbp_war())
1841 build_tlb_probe_entry(&p);
1818 /* Present and writable bits set, set accessed and dirty bits. */ 1842 /* Present and writable bits set, set accessed and dirty bits. */
1819 build_make_write(&p, &r, K0, K1); 1843 build_make_write(&p, &r, K0, K1);
1820 build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1); 1844 build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1);
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index a15845c164f2..ed39313c4085 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1075,12 +1075,6 @@ void blk_queue_end_tag(struct request_queue *q, struct request *rq)
1075 */ 1075 */
1076 return; 1076 return;
1077 1077
1078 if (unlikely(!__test_and_clear_bit(tag, bqt->tag_map))) {
1079 printk(KERN_ERR "%s: attempt to clear non-busy tag (%d)\n",
1080 __FUNCTION__, tag);
1081 return;
1082 }
1083
1084 list_del_init(&rq->queuelist); 1078 list_del_init(&rq->queuelist);
1085 rq->cmd_flags &= ~REQ_QUEUED; 1079 rq->cmd_flags &= ~REQ_QUEUED;
1086 rq->tag = -1; 1080 rq->tag = -1;
@@ -1090,6 +1084,19 @@ void blk_queue_end_tag(struct request_queue *q, struct request *rq)
1090 __FUNCTION__, tag); 1084 __FUNCTION__, tag);
1091 1085
1092 bqt->tag_index[tag] = NULL; 1086 bqt->tag_index[tag] = NULL;
1087
1088 /*
1089 * We use test_and_clear_bit's memory ordering properties here.
1090 * The tag_map bit acts as a lock for tag_index[bit], so we need
1091 * a barrer before clearing the bit (precisely: release semantics).
1092 * Could use clear_bit_unlock when it is merged.
1093 */
1094 if (unlikely(!test_and_clear_bit(tag, bqt->tag_map))) {
1095 printk(KERN_ERR "%s: attempt to clear non-busy tag (%d)\n",
1096 __FUNCTION__, tag);
1097 return;
1098 }
1099
1093 bqt->busy--; 1100 bqt->busy--;
1094} 1101}
1095 1102
@@ -1136,6 +1143,10 @@ int blk_queue_start_tag(struct request_queue *q, struct request *rq)
1136 return 1; 1143 return 1;
1137 1144
1138 } while (test_and_set_bit(tag, bqt->tag_map)); 1145 } while (test_and_set_bit(tag, bqt->tag_map));
1146 /*
1147 * We rely on test_and_set_bit providing lock memory ordering semantics
1148 * (could use test_and_set_bit_lock when it is merged).
1149 */
1139 1150
1140 rq->cmd_flags |= REQ_QUEUED; 1151 rq->cmd_flags |= REQ_QUEUED;
1141 rq->tag = tag; 1152 rq->tag = tag;
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 3ac9cbce3369..336be86c6f5a 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -619,7 +619,7 @@ unsigned long segment_base(u16 selector);
619void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, 619void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
620 const u8 *old, const u8 *new, int bytes); 620 const u8 *old, const u8 *new, int bytes);
621int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva); 621int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva);
622void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu); 622void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu);
623int kvm_mmu_load(struct kvm_vcpu *vcpu); 623int kvm_mmu_load(struct kvm_vcpu *vcpu);
624void kvm_mmu_unload(struct kvm_vcpu *vcpu); 624void kvm_mmu_unload(struct kvm_vcpu *vcpu);
625 625
@@ -628,11 +628,15 @@ int kvm_hypercall(struct kvm_vcpu *vcpu, struct kvm_run *run);
628static inline int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, 628static inline int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva,
629 u32 error_code) 629 u32 error_code)
630{ 630{
631 if (unlikely(vcpu->kvm->n_free_mmu_pages < KVM_MIN_FREE_MMU_PAGES))
632 kvm_mmu_free_some_pages(vcpu);
633 return vcpu->mmu.page_fault(vcpu, gva, error_code); 631 return vcpu->mmu.page_fault(vcpu, gva, error_code);
634} 632}
635 633
634static inline void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu)
635{
636 if (unlikely(vcpu->kvm->n_free_mmu_pages < KVM_MIN_FREE_MMU_PAGES))
637 __kvm_mmu_free_some_pages(vcpu);
638}
639
636static inline int kvm_mmu_reload(struct kvm_vcpu *vcpu) 640static inline int kvm_mmu_reload(struct kvm_vcpu *vcpu)
637{ 641{
638 if (likely(vcpu->mmu.root_hpa != INVALID_PAGE)) 642 if (likely(vcpu->mmu.root_hpa != INVALID_PAGE))
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index 1a87ba9d5156..23965aa5ee78 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -273,12 +273,14 @@ static int mmu_topup_memory_caches(struct kvm_vcpu *vcpu)
273 int r; 273 int r;
274 274
275 r = __mmu_topup_memory_caches(vcpu, GFP_NOWAIT); 275 r = __mmu_topup_memory_caches(vcpu, GFP_NOWAIT);
276 kvm_mmu_free_some_pages(vcpu);
276 if (r < 0) { 277 if (r < 0) {
277 spin_unlock(&vcpu->kvm->lock); 278 spin_unlock(&vcpu->kvm->lock);
278 kvm_arch_ops->vcpu_put(vcpu); 279 kvm_arch_ops->vcpu_put(vcpu);
279 r = __mmu_topup_memory_caches(vcpu, GFP_KERNEL); 280 r = __mmu_topup_memory_caches(vcpu, GFP_KERNEL);
280 kvm_arch_ops->vcpu_load(vcpu); 281 kvm_arch_ops->vcpu_load(vcpu);
281 spin_lock(&vcpu->kvm->lock); 282 spin_lock(&vcpu->kvm->lock);
283 kvm_mmu_free_some_pages(vcpu);
282 } 284 }
283 return r; 285 return r;
284} 286}
@@ -1208,7 +1210,7 @@ int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva)
1208 return kvm_mmu_unprotect_page(vcpu, gpa >> PAGE_SHIFT); 1210 return kvm_mmu_unprotect_page(vcpu, gpa >> PAGE_SHIFT);
1209} 1211}
1210 1212
1211void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu) 1213void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu)
1212{ 1214{
1213 while (vcpu->kvm->n_free_mmu_pages < KVM_REFILL_PAGES) { 1215 while (vcpu->kvm->n_free_mmu_pages < KVM_REFILL_PAGES) {
1214 struct kvm_mmu_page *page; 1216 struct kvm_mmu_page *page;
@@ -1218,7 +1220,6 @@ void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu)
1218 kvm_mmu_zap_page(vcpu->kvm, page); 1220 kvm_mmu_zap_page(vcpu->kvm, page);
1219 } 1221 }
1220} 1222}
1221EXPORT_SYMBOL_GPL(kvm_mmu_free_some_pages);
1222 1223
1223static void free_mmu_pages(struct kvm_vcpu *vcpu) 1224static void free_mmu_pages(struct kvm_vcpu *vcpu)
1224{ 1225{
diff --git a/drivers/md/dm-bio-list.h b/drivers/md/dm-bio-list.h
index 16ee3b018b3a..3f7b827649e3 100644
--- a/drivers/md/dm-bio-list.h
+++ b/drivers/md/dm-bio-list.h
@@ -9,6 +9,8 @@
9 9
10#include <linux/bio.h> 10#include <linux/bio.h>
11 11
12#ifdef CONFIG_BLOCK
13
12struct bio_list { 14struct bio_list {
13 struct bio *head; 15 struct bio *head;
14 struct bio *tail; 16 struct bio *tail;
@@ -106,4 +108,5 @@ static inline struct bio *bio_list_get(struct bio_list *bl)
106 return bio; 108 return bio;
107} 109}
108 110
111#endif /* CONFIG_BLOCK */
109#endif 112#endif
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c
index 317a2a3f9cc1..da7a6b591a67 100644
--- a/drivers/media/video/cx88/cx88-mpeg.c
+++ b/drivers/media/video/cx88/cx88-mpeg.c
@@ -580,7 +580,7 @@ struct cx8802_dev * cx8802_get_device(struct inode *inode)
580 580
581 list_for_each(list,&cx8802_devlist) { 581 list_for_each(list,&cx8802_devlist) {
582 h = list_entry(list, struct cx8802_dev, devlist); 582 h = list_entry(list, struct cx8802_dev, devlist);
583 if (h->mpeg_dev->minor == minor) 583 if (h->mpeg_dev && h->mpeg_dev->minor == minor)
584 return h; 584 return h;
585 } 585 }
586 586
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c
index 5dd519caf81d..0285c4a830eb 100644
--- a/drivers/media/video/ivtv/ivtv-fileops.c
+++ b/drivers/media/video/ivtv/ivtv-fileops.c
@@ -190,7 +190,9 @@ static void ivtv_update_pgm_info(struct ivtv *itv)
190 int idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num; 190 int idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num;
191 struct v4l2_enc_idx_entry *e = itv->pgm_info + idx; 191 struct v4l2_enc_idx_entry *e = itv->pgm_info + idx;
192 u32 addr = itv->pgm_info_offset + 4 + idx * 24; 192 u32 addr = itv->pgm_info_offset + 4 + idx * 24;
193 const int mapping[] = { V4L2_ENC_IDX_FRAME_P, V4L2_ENC_IDX_FRAME_I, V4L2_ENC_IDX_FRAME_B, 0 }; 193 const int mapping[8] = { -1, V4L2_ENC_IDX_FRAME_I, V4L2_ENC_IDX_FRAME_P, -1,
194 V4L2_ENC_IDX_FRAME_B, -1, -1, -1 };
195 // 1=I, 2=P, 4=B
194 196
195 e->offset = read_enc(addr + 4) + ((u64)read_enc(addr + 8) << 32); 197 e->offset = read_enc(addr + 4) + ((u64)read_enc(addr + 8) << 32);
196 if (e->offset > itv->mpg_data_received) { 198 if (e->offset > itv->mpg_data_received) {
@@ -199,7 +201,7 @@ static void ivtv_update_pgm_info(struct ivtv *itv)
199 e->offset += itv->vbi_data_inserted; 201 e->offset += itv->vbi_data_inserted;
200 e->length = read_enc(addr); 202 e->length = read_enc(addr);
201 e->pts = read_enc(addr + 16) + ((u64)(read_enc(addr + 20) & 1) << 32); 203 e->pts = read_enc(addr + 16) + ((u64)(read_enc(addr + 20) & 1) << 32);
202 e->flags = mapping[read_enc(addr + 12) & 3]; 204 e->flags = mapping[read_enc(addr + 12) & 7];
203 i++; 205 i++;
204 } 206 }
205 itv->pgm_info_write_idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num; 207 itv->pgm_info_write_idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num;
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c
index 5977a79619c2..dfe0aedc60fd 100644
--- a/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -1099,14 +1099,21 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
1099 1099
1100 case VIDIOC_G_ENC_INDEX: { 1100 case VIDIOC_G_ENC_INDEX: {
1101 struct v4l2_enc_idx *idx = arg; 1101 struct v4l2_enc_idx *idx = arg;
1102 struct v4l2_enc_idx_entry *e = idx->entry;
1103 int entries;
1102 int i; 1104 int i;
1103 1105
1104 idx->entries = (itv->pgm_info_write_idx + IVTV_MAX_PGM_INDEX - itv->pgm_info_read_idx) % 1106 entries = (itv->pgm_info_write_idx + IVTV_MAX_PGM_INDEX - itv->pgm_info_read_idx) %
1105 IVTV_MAX_PGM_INDEX; 1107 IVTV_MAX_PGM_INDEX;
1106 if (idx->entries > V4L2_ENC_IDX_ENTRIES) 1108 if (entries > V4L2_ENC_IDX_ENTRIES)
1107 idx->entries = V4L2_ENC_IDX_ENTRIES; 1109 entries = V4L2_ENC_IDX_ENTRIES;
1108 for (i = 0; i < idx->entries; i++) { 1110 idx->entries = 0;
1109 idx->entry[i] = itv->pgm_info[(itv->pgm_info_read_idx + i) % IVTV_MAX_PGM_INDEX]; 1111 for (i = 0; i < entries; i++) {
1112 *e = itv->pgm_info[(itv->pgm_info_read_idx + i) % IVTV_MAX_PGM_INDEX];
1113 if ((e->flags & V4L2_ENC_IDX_FRAME_MASK) <= V4L2_ENC_IDX_FRAME_B) {
1114 idx->entries++;
1115 e++;
1116 }
1110 } 1117 }
1111 itv->pgm_info_read_idx = (itv->pgm_info_read_idx + idx->entries) % IVTV_MAX_PGM_INDEX; 1118 itv->pgm_info_read_idx = (itv->pgm_info_read_idx + idx->entries) % IVTV_MAX_PGM_INDEX;
1112 break; 1119 break;
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 3d81966d8c42..931b274bffca 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -1243,7 +1243,7 @@ static int pwc_video_close(struct inode *inode, struct file *file)
1243 PWC_ERROR("Failed to power down camera (%d)\n", i); 1243 PWC_ERROR("Failed to power down camera (%d)\n", i);
1244 } 1244 }
1245 pdev->vopen--; 1245 pdev->vopen--;
1246 PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", i); 1246 PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", pdev->vopen);
1247 } else { 1247 } else {
1248 pwc_cleanup(pdev); 1248 pwc_cleanup(pdev);
1249 /* Free memory (don't set pdev to 0 just yet) */ 1249 /* Free memory (don't set pdev to 0 just yet) */
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index 8ec83bd70094..25ec16810818 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -1537,18 +1537,18 @@ struct saa7134_board saa7134_boards[] = {
1537 },{ 1537 },{
1538 .name = name_comp1, 1538 .name = name_comp1,
1539 .vmux = 0, 1539 .vmux = 0,
1540 .amux = LINE2, 1540 .amux = LINE1,
1541 .gpio = 0x00, 1541 .gpio = 0x02,
1542 },{ 1542 },{
1543 .name = name_comp2, 1543 .name = name_comp2,
1544 .vmux = 3, 1544 .vmux = 3,
1545 .amux = LINE2, 1545 .amux = LINE1,
1546 .gpio = 0x00, 1546 .gpio = 0x02,
1547 },{ 1547 },{
1548 .name = name_svideo, 1548 .name = name_svideo,
1549 .vmux = 8, 1549 .vmux = 8,
1550 .amux = LINE2, 1550 .amux = LINE1,
1551 .gpio = 0x00, 1551 .gpio = 0x02,
1552 }}, 1552 }},
1553 .radio = { 1553 .radio = {
1554 .name = name_radio, 1554 .name = name_radio,
diff --git a/drivers/media/video/saa7191.c b/drivers/media/video/saa7191.c
index 8615a6081a5d..b4018cce3285 100644
--- a/drivers/media/video/saa7191.c
+++ b/drivers/media/video/saa7191.c
@@ -130,7 +130,7 @@ static int saa7191_write_reg(struct i2c_client *client, u8 reg,
130 130
131/* the first byte of data must be the first subaddress number (register) */ 131/* the first byte of data must be the first subaddress number (register) */
132static int saa7191_write_block(struct i2c_client *client, 132static int saa7191_write_block(struct i2c_client *client,
133 u8 length, u8 *data) 133 u8 length, const u8 *data)
134{ 134{
135 int i; 135 int i;
136 int ret; 136 int ret;
@@ -592,7 +592,7 @@ static int saa7191_attach(struct i2c_adapter *adap, int addr, int kind)
592 if (err) 592 if (err)
593 goto out_free_decoder; 593 goto out_free_decoder;
594 594
595 err = saa7191_write_block(client, sizeof(initseq), (u8 *)initseq); 595 err = saa7191_write_block(client, sizeof(initseq), initseq);
596 if (err) { 596 if (err) {
597 printk(KERN_ERR "SAA7191 initialization failed\n"); 597 printk(KERN_ERR "SAA7191 initialization failed\n");
598 goto out_detach_client; 598 goto out_detach_client;
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 7f17d0fd76c0..ebf3dc20110a 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -152,4 +152,10 @@ void usb_detect_quirks(struct usb_device *udev)
152 /* do any special quirk handling here if needed */ 152 /* do any special quirk handling here if needed */
153 if (udev->quirks & USB_QUIRK_NO_AUTOSUSPEND) 153 if (udev->quirks & USB_QUIRK_NO_AUTOSUSPEND)
154 usb_autosuspend_quirk(udev); 154 usb_autosuspend_quirk(udev);
155
156 /* By default, disable autosuspend for all non-hubs */
157#ifdef CONFIG_USB_SUSPEND
158 if (udev->descriptor.bDeviceClass != USB_CLASS_HUB)
159 udev->autosuspend_delay = -1;
160#endif
155} 161}
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 47e56079925d..1ba19eaa1970 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -285,15 +285,10 @@ static int device_reset(struct scsi_cmnd *srb)
285 285
286 US_DEBUGP("%s called\n", __FUNCTION__); 286 US_DEBUGP("%s called\n", __FUNCTION__);
287 287
288 result = usb_autopm_get_interface(us->pusb_intf); 288 /* lock the device pointers and do the reset */
289 if (result == 0) { 289 mutex_lock(&(us->dev_mutex));
290 290 result = us->transport_reset(us);
291 /* lock the device pointers and do the reset */ 291 mutex_unlock(&us->dev_mutex);
292 mutex_lock(&(us->dev_mutex));
293 result = us->transport_reset(us);
294 mutex_unlock(&us->dev_mutex);
295 usb_autopm_put_interface(us->pusb_intf);
296 }
297 292
298 return result < 0 ? FAILED : SUCCESS; 293 return result < 0 ? FAILED : SUCCESS;
299} 294}
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 25e557d4fe6b..59181667066c 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -184,14 +184,16 @@ static int storage_suspend(struct usb_interface *iface, pm_message_t message)
184{ 184{
185 struct us_data *us = usb_get_intfdata(iface); 185 struct us_data *us = usb_get_intfdata(iface);
186 186
187 US_DEBUGP("%s\n", __FUNCTION__);
188
189 /* Wait until no command is running */ 187 /* Wait until no command is running */
190 mutex_lock(&us->dev_mutex); 188 mutex_lock(&us->dev_mutex);
191 189
190 US_DEBUGP("%s\n", __FUNCTION__);
192 if (us->suspend_resume_hook) 191 if (us->suspend_resume_hook)
193 (us->suspend_resume_hook)(us, US_SUSPEND); 192 (us->suspend_resume_hook)(us, US_SUSPEND);
194 193
194 /* When runtime PM is working, we'll set a flag to indicate
195 * whether we should autoresume when a SCSI request arrives. */
196
195 mutex_unlock(&us->dev_mutex); 197 mutex_unlock(&us->dev_mutex);
196 return 0; 198 return 0;
197} 199}
@@ -200,11 +202,13 @@ static int storage_resume(struct usb_interface *iface)
200{ 202{
201 struct us_data *us = usb_get_intfdata(iface); 203 struct us_data *us = usb_get_intfdata(iface);
202 204
203 US_DEBUGP("%s\n", __FUNCTION__); 205 mutex_lock(&us->dev_mutex);
204 206
207 US_DEBUGP("%s\n", __FUNCTION__);
205 if (us->suspend_resume_hook) 208 if (us->suspend_resume_hook)
206 (us->suspend_resume_hook)(us, US_RESUME); 209 (us->suspend_resume_hook)(us, US_RESUME);
207 210
211 mutex_unlock(&us->dev_mutex);
208 return 0; 212 return 0;
209} 213}
210 214
@@ -302,7 +306,6 @@ static int usb_stor_control_thread(void * __us)
302{ 306{
303 struct us_data *us = (struct us_data *)__us; 307 struct us_data *us = (struct us_data *)__us;
304 struct Scsi_Host *host = us_to_host(us); 308 struct Scsi_Host *host = us_to_host(us);
305 int autopm_rc;
306 309
307 for(;;) { 310 for(;;) {
308 US_DEBUGP("*** thread sleeping.\n"); 311 US_DEBUGP("*** thread sleeping.\n");
@@ -311,9 +314,6 @@ static int usb_stor_control_thread(void * __us)
311 314
312 US_DEBUGP("*** thread awakened.\n"); 315 US_DEBUGP("*** thread awakened.\n");
313 316
314 /* Autoresume the device */
315 autopm_rc = usb_autopm_get_interface(us->pusb_intf);
316
317 /* lock the device pointers */ 317 /* lock the device pointers */
318 mutex_lock(&(us->dev_mutex)); 318 mutex_lock(&(us->dev_mutex));
319 319
@@ -372,12 +372,6 @@ static int usb_stor_control_thread(void * __us)
372 us->srb->result = SAM_STAT_GOOD; 372 us->srb->result = SAM_STAT_GOOD;
373 } 373 }
374 374
375 /* Did the autoresume fail? */
376 else if (autopm_rc < 0) {
377 US_DEBUGP("Could not wake device\n");
378 us->srb->result = DID_ERROR << 16;
379 }
380
381 /* we've got a command, let's do it! */ 375 /* we've got a command, let's do it! */
382 else { 376 else {
383 US_DEBUG(usb_stor_show_command(us->srb)); 377 US_DEBUG(usb_stor_show_command(us->srb));
@@ -420,10 +414,6 @@ SkipForAbort:
420 414
421 /* unlock the device pointers */ 415 /* unlock the device pointers */
422 mutex_unlock(&us->dev_mutex); 416 mutex_unlock(&us->dev_mutex);
423
424 /* Start an autosuspend */
425 if (autopm_rc == 0)
426 usb_autopm_put_interface(us->pusb_intf);
427 } /* for (;;) */ 417 } /* for (;;) */
428 418
429 /* Wait until we are told to stop */ 419 /* Wait until we are told to stop */
@@ -941,7 +931,6 @@ retry:
941 /* Should we unbind if no devices were detected? */ 931 /* Should we unbind if no devices were detected? */
942 } 932 }
943 933
944 usb_autopm_put_interface(us->pusb_intf);
945 complete_and_exit(&us->scanning_done, 0); 934 complete_and_exit(&us->scanning_done, 0);
946} 935}
947 936
@@ -1027,7 +1016,6 @@ static int storage_probe(struct usb_interface *intf,
1027 goto BadDevice; 1016 goto BadDevice;
1028 } 1017 }
1029 1018
1030 usb_autopm_get_interface(intf); /* dropped in the scanning thread */
1031 wake_up_process(th); 1019 wake_up_process(th);
1032 1020
1033 return 0; 1021 return 0;
@@ -1065,7 +1053,6 @@ static struct usb_driver usb_storage_driver = {
1065 .pre_reset = storage_pre_reset, 1053 .pre_reset = storage_pre_reset,
1066 .post_reset = storage_post_reset, 1054 .post_reset = storage_post_reset,
1067 .id_table = storage_usb_ids, 1055 .id_table = storage_usb_ids,
1068 .supports_autosuspend = 1,
1069}; 1056};
1070 1057
1071static int __init usb_stor_init(void) 1058static int __init usb_stor_init(void)
diff --git a/drivers/video/aty/ati_ids.h b/drivers/video/aty/ati_ids.h
index 685a754991c6..dca2eb8f2dde 100644
--- a/drivers/video/aty/ati_ids.h
+++ b/drivers/video/aty/ati_ids.h
@@ -192,6 +192,12 @@
192#define PCI_CHIP_RS300_5835 0x5835 192#define PCI_CHIP_RS300_5835 0x5835
193#define PCI_CHIP_RS300_5836 0x5836 193#define PCI_CHIP_RS300_5836 0x5836
194#define PCI_CHIP_RS300_5837 0x5837 194#define PCI_CHIP_RS300_5837 0x5837
195#define PCI_CHIP_RS480_5955 0x5955
196#define PCI_CHIP_RV280_5960 0x5960
197#define PCI_CHIP_RV280_5961 0x5961
198#define PCI_CHIP_RV280_5962 0x5962
199#define PCI_CHIP_RV280_5964 0x5964
200#define PCI_CHIP_RS482_5975 0x5975
195#define PCI_CHIP_RV370_5B60 0x5B60 201#define PCI_CHIP_RV370_5B60 0x5B60
196#define PCI_CHIP_RV370_5B61 0x5B61 202#define PCI_CHIP_RV370_5B61 0x5B61
197#define PCI_CHIP_RV370_5B62 0x5B62 203#define PCI_CHIP_RV370_5B62 0x5B62
@@ -200,14 +206,8 @@
200#define PCI_CHIP_RV370_5B65 0x5B65 206#define PCI_CHIP_RV370_5B65 0x5B65
201#define PCI_CHIP_RV370_5B66 0x5B66 207#define PCI_CHIP_RV370_5B66 0x5B66
202#define PCI_CHIP_RV370_5B67 0x5B67 208#define PCI_CHIP_RV370_5B67 0x5B67
203#define PCI_CHIP_RV280_5960 0x5960
204#define PCI_CHIP_RV280_5961 0x5961
205#define PCI_CHIP_RV280_5962 0x5962
206#define PCI_CHIP_RV280_5964 0x5964
207#define PCI_CHIP_RS485_5975 0x5975
208#define PCI_CHIP_RV280_5C61 0x5C61 209#define PCI_CHIP_RV280_5C61 0x5C61
209#define PCI_CHIP_RV280_5C63 0x5C63 210#define PCI_CHIP_RV280_5C63 0x5C63
210#define PCI_CHIP_R423_5D57 0x5D57 211#define PCI_CHIP_R423_5D57 0x5D57
211#define PCI_CHIP_RS350_7834 0x7834 212#define PCI_CHIP_RS350_7834 0x7834
212#define PCI_CHIP_RS350_7835 0x7835 213#define PCI_CHIP_RS350_7835 0x7835
213#define PCI_CHIP_RS480_5955 0x5955
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 47ca62fe7c3e..4b747bdaeea6 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -102,6 +102,7 @@
102static struct pci_device_id radeonfb_pci_table[] = { 102static struct pci_device_id radeonfb_pci_table[] = {
103 /* Radeon Xpress 200m */ 103 /* Radeon Xpress 200m */
104 CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), 104 CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
105 CHIP_DEF(PCI_CHIP_RS482_5975, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
105 /* Mobility M6 */ 106 /* Mobility M6 */
106 CHIP_DEF(PCI_CHIP_RADEON_LY, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), 107 CHIP_DEF(PCI_CHIP_RADEON_LY, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
107 CHIP_DEF(PCI_CHIP_RADEON_LZ, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), 108 CHIP_DEF(PCI_CHIP_RADEON_LZ, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
@@ -153,8 +154,6 @@ static struct pci_device_id radeonfb_pci_table[] = {
153 /* Mobility 9200 (M9+) */ 154 /* Mobility 9200 (M9+) */
154 CHIP_DEF(PCI_CHIP_RV280_5C61, RV280, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), 155 CHIP_DEF(PCI_CHIP_RV280_5C61, RV280, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
155 CHIP_DEF(PCI_CHIP_RV280_5C63, RV280, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), 156 CHIP_DEF(PCI_CHIP_RV280_5C63, RV280, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
156 /*Mobility Xpress 200 */
157 CHIP_DEF(PCI_CHIP_RS485_5975, R300, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
158 /* 9200 */ 157 /* 9200 */
159 CHIP_DEF(PCI_CHIP_RV280_5960, RV280, CHIP_HAS_CRTC2), 158 CHIP_DEF(PCI_CHIP_RV280_5960, RV280, CHIP_HAS_CRTC2),
160 CHIP_DEF(PCI_CHIP_RV280_5961, RV280, CHIP_HAS_CRTC2), 159 CHIP_DEF(PCI_CHIP_RV280_5961, RV280, CHIP_HAS_CRTC2),
@@ -1285,7 +1284,8 @@ static void radeon_write_pll_regs(struct radeonfb_info *rinfo, struct radeon_reg
1285 if (rinfo->family == CHIP_FAMILY_R300 || 1284 if (rinfo->family == CHIP_FAMILY_R300 ||
1286 rinfo->family == CHIP_FAMILY_RS300 || 1285 rinfo->family == CHIP_FAMILY_RS300 ||
1287 rinfo->family == CHIP_FAMILY_R350 || 1286 rinfo->family == CHIP_FAMILY_R350 ||
1288 rinfo->family == CHIP_FAMILY_RV350) { 1287 rinfo->family == CHIP_FAMILY_RV350 ||
1288 rinfo->family == CHIP_FAMILY_RV380 ) {
1289 if (mode->ppll_ref_div & R300_PPLL_REF_DIV_ACC_MASK) { 1289 if (mode->ppll_ref_div & R300_PPLL_REF_DIV_ACC_MASK) {
1290 /* When restoring console mode, use saved PPLL_REF_DIV 1290 /* When restoring console mode, use saved PPLL_REF_DIV
1291 * setting. 1291 * setting.
diff --git a/include/asm-mips/mach-generic/ide.h b/include/asm-mips/mach-generic/ide.h
index 2b928577be5d..a77128362a7d 100644
--- a/include/asm-mips/mach-generic/ide.h
+++ b/include/asm-mips/mach-generic/ide.h
@@ -29,6 +29,35 @@
29 29
30#define IDE_ARCH_OBSOLETE_DEFAULTS 30#define IDE_ARCH_OBSOLETE_DEFAULTS
31 31
32static __inline__ int ide_probe_legacy(void)
33{
34#ifdef CONFIG_PCI
35 struct pci_dev *dev;
36 /*
37 * This can be called on the ide_setup() path, super-early in
38 * boot. But the down_read() will enable local interrupts,
39 * which can cause some machines to crash. So here we detect
40 * and flag that situation and bail out early.
41 */
42 if (no_pci_devices())
43 return 0;
44 dev = pci_get_class(PCI_CLASS_BRIDGE_EISA << 8, NULL);
45 if (dev)
46 goto found;
47 dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL);
48 if (dev)
49 goto found;
50 return 0;
51found:
52 pci_dev_put(dev);
53 return 1;
54#elif defined(CONFIG_EISA) || defined(CONFIG_ISA)
55 return 1;
56#else
57 return 0;
58#endif
59}
60
32static __inline__ int ide_default_irq(unsigned long base) 61static __inline__ int ide_default_irq(unsigned long base)
33{ 62{
34 switch (base) { 63 switch (base) {
@@ -45,6 +74,8 @@ static __inline__ int ide_default_irq(unsigned long base)
45 74
46static __inline__ unsigned long ide_default_io_base(int index) 75static __inline__ unsigned long ide_default_io_base(int index)
47{ 76{
77 if (!ide_probe_legacy())
78 return 0;
48 /* 79 /*
49 * If PCI is present then it is not safe to poke around 80 * If PCI is present then it is not safe to poke around
50 * the other legacy IDE ports. Only 0x1f0 and 0x170 are 81 * the other legacy IDE ports. Only 0x1f0 and 0x170 are
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index d62847f846c2..17f8f3a2f0a3 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -337,6 +337,9 @@ void *priv;
337 struct class_device class_dev; /* sysfs */ 337 struct class_device class_dev; /* sysfs */
338}; 338};
339 339
340/* Class-dev to video-device */
341#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
342
340/* Version 2 functions */ 343/* Version 2 functions */
341extern int video_register_device(struct video_device *vfd, int type, int nr); 344extern int video_register_device(struct video_device *vfd, int type, int nr);
342void video_unregister_device(struct video_device *); 345void video_unregister_device(struct video_device *);
@@ -354,11 +357,9 @@ extern int video_usercopy(struct inode *inode, struct file *file,
354 int (*func)(struct inode *inode, struct file *file, 357 int (*func)(struct inode *inode, struct file *file,
355 unsigned int cmd, void *arg)); 358 unsigned int cmd, void *arg));
356 359
357
358#ifdef CONFIG_VIDEO_V4L1_COMPAT 360#ifdef CONFIG_VIDEO_V4L1_COMPAT
359#include <linux/mm.h> 361#include <linux/mm.h>
360 362
361#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
362static inline int __must_check 363static inline int __must_check
363video_device_create_file(struct video_device *vfd, 364video_device_create_file(struct video_device *vfd,
364 struct class_device_attribute *attr) 365 struct class_device_attribute *attr)
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 12ff5da8160e..1a899924023f 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1592,7 +1592,7 @@ svc_age_temp_sockets(unsigned long closure)
1592 1592
1593 if (!test_and_set_bit(SK_OLD, &svsk->sk_flags)) 1593 if (!test_and_set_bit(SK_OLD, &svsk->sk_flags))
1594 continue; 1594 continue;
1595 if (atomic_read(&svsk->sk_inuse) || test_bit(SK_BUSY, &svsk->sk_flags)) 1595 if (atomic_read(&svsk->sk_inuse) > 1 || test_bit(SK_BUSY, &svsk->sk_flags))
1596 continue; 1596 continue;
1597 atomic_inc(&svsk->sk_inuse); 1597 atomic_inc(&svsk->sk_inuse);
1598 list_move(le, &to_be_aged); 1598 list_move(le, &to_be_aged);