diff options
43 files changed, 299 insertions, 586 deletions
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist index 2270efa10153..bfbb2718a279 100644 --- a/Documentation/SubmitChecklist +++ b/Documentation/SubmitChecklist | |||
@@ -72,3 +72,7 @@ kernel patches. | |||
72 | 72 | ||
73 | If the new code is substantial, addition of subsystem-specific fault | 73 | If the new code is substantial, addition of subsystem-specific fault |
74 | injection might be appropriate. | 74 | injection might be appropriate. |
75 | |||
76 | 22: Newly-added code has been compiled with `gcc -W'. This will generate | ||
77 | lots of noise, but is good for finding bugs like "warning: comparison | ||
78 | between signed and unsigned". | ||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index fc532395d116..0ba6af02cdaf 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -318,3 +318,10 @@ Why: /proc/acpi/button has been replaced by events to the input layer | |||
318 | Who: Len Brown <len.brown@intel.com> | 318 | Who: Len Brown <len.brown@intel.com> |
319 | 319 | ||
320 | --------------------------- | 320 | --------------------------- |
321 | |||
322 | What: JFFS (version 1) | ||
323 | When: 2.6.21 | ||
324 | Why: Unmaintained for years, superceded by JFFS2 for years. | ||
325 | Who: Jeff Garzik <jeff@garzik.org> | ||
326 | |||
327 | --------------------------- | ||
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt index 5af6676a88f0..073306818347 100644 --- a/Documentation/kdump/kdump.txt +++ b/Documentation/kdump/kdump.txt | |||
@@ -17,7 +17,7 @@ You can use common Linux commands, such as cp and scp, to copy the | |||
17 | memory image to a dump file on the local disk, or across the network to | 17 | memory image to a dump file on the local disk, or across the network to |
18 | a remote system. | 18 | a remote system. |
19 | 19 | ||
20 | Kdump and kexec are currently supported on the x86, x86_64, ppc64 and IA64 | 20 | Kdump and kexec are currently supported on the x86, x86_64, ppc64 and ia64 |
21 | architectures. | 21 | architectures. |
22 | 22 | ||
23 | When the system kernel boots, it reserves a small section of memory for | 23 | When the system kernel boots, it reserves a small section of memory for |
@@ -61,7 +61,12 @@ Install kexec-tools | |||
61 | 61 | ||
62 | 2) Download the kexec-tools user-space package from the following URL: | 62 | 2) Download the kexec-tools user-space package from the following URL: |
63 | 63 | ||
64 | http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/kexec-tools-testing-20061214.tar.gz | 64 | http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/kexec-tools-testing.tar.gz |
65 | |||
66 | This is a symlink to the latest version, which at the time of writing is | ||
67 | 20061214, the only release of kexec-tools-testing so far. As other versions | ||
68 | are made released, the older onese will remain available at | ||
69 | http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/ | ||
65 | 70 | ||
66 | Note: Latest kexec-tools-testing git tree is available at | 71 | Note: Latest kexec-tools-testing git tree is available at |
67 | 72 | ||
@@ -71,11 +76,11 @@ http://www.kernel.org/git/?p=linux/kernel/git/horms/kexec-tools-testing.git;a=su | |||
71 | 76 | ||
72 | 3) Unpack the tarball with the tar command, as follows: | 77 | 3) Unpack the tarball with the tar command, as follows: |
73 | 78 | ||
74 | tar xvpzf kexec-tools-testing-20061214.tar.gz | 79 | tar xvpzf kexec-tools-testing.tar.gz |
75 | 80 | ||
76 | 4) Change to the kexec-tools-1.101 directory, as follows: | 81 | 4) Change to the kexec-tools directory, as follows: |
77 | 82 | ||
78 | cd kexec-tools-testing-20061214 | 83 | cd kexec-tools-testing-VERSION |
79 | 84 | ||
80 | 5) Configure the package, as follows: | 85 | 5) Configure the package, as follows: |
81 | 86 | ||
@@ -224,7 +229,23 @@ Dump-capture kernel config options (Arch Dependent, ppc64) | |||
224 | 229 | ||
225 | Dump-capture kernel config options (Arch Dependent, ia64) | 230 | Dump-capture kernel config options (Arch Dependent, ia64) |
226 | ---------------------------------------------------------- | 231 | ---------------------------------------------------------- |
227 | (To be filled) | 232 | |
233 | - No specific options are required to create a dump-capture kernel | ||
234 | for ia64, other than those specified in the arch idependent section | ||
235 | above. This means that it is possible to use the system kernel | ||
236 | as a dump-capture kernel if desired. | ||
237 | |||
238 | The crashkernel region can be automatically placed by the system | ||
239 | kernel at run time. This is done by specifying the base address as 0, | ||
240 | or omitting it all together. | ||
241 | |||
242 | crashkernel=256M@0 | ||
243 | or | ||
244 | crashkernel=256M | ||
245 | |||
246 | If the start address is specified, note that the start address of the | ||
247 | kernel will be aligned to 64Mb, so if the start address is not then | ||
248 | any space below the alignment point will be wasted. | ||
228 | 249 | ||
229 | 250 | ||
230 | Boot into System Kernel | 251 | Boot into System Kernel |
@@ -243,6 +264,10 @@ Boot into System Kernel | |||
243 | 264 | ||
244 | On ppc64, use "crashkernel=128M@32M". | 265 | On ppc64, use "crashkernel=128M@32M". |
245 | 266 | ||
267 | On ia64, 256M@256M is a generous value that typically works. | ||
268 | The region may be automatically placed on ia64, see the | ||
269 | dump-capture kernel config option notes above. | ||
270 | |||
246 | Load the Dump-capture Kernel | 271 | Load the Dump-capture Kernel |
247 | ============================ | 272 | ============================ |
248 | 273 | ||
@@ -261,7 +286,8 @@ For x86_64: | |||
261 | For ppc64: | 286 | For ppc64: |
262 | - Use vmlinux | 287 | - Use vmlinux |
263 | For ia64: | 288 | For ia64: |
264 | (To be filled) | 289 | - Use vmlinux or vmlinuz.gz |
290 | |||
265 | 291 | ||
266 | If you are using a uncompressed vmlinux image then use following command | 292 | If you are using a uncompressed vmlinux image then use following command |
267 | to load dump-capture kernel. | 293 | to load dump-capture kernel. |
@@ -277,18 +303,19 @@ to load dump-capture kernel. | |||
277 | --initrd=<initrd-for-dump-capture-kernel> \ | 303 | --initrd=<initrd-for-dump-capture-kernel> \ |
278 | --append="root=<root-dev> <arch-specific-options>" | 304 | --append="root=<root-dev> <arch-specific-options>" |
279 | 305 | ||
306 | Please note, that --args-linux does not need to be specified for ia64. | ||
307 | It is planned to make this a no-op on that architecture, but for now | ||
308 | it should be omitted | ||
309 | |||
280 | Following are the arch specific command line options to be used while | 310 | Following are the arch specific command line options to be used while |
281 | loading dump-capture kernel. | 311 | loading dump-capture kernel. |
282 | 312 | ||
283 | For i386 and x86_64: | 313 | For i386, x86_64 and ia64: |
284 | "init 1 irqpoll maxcpus=1" | 314 | "init 1 irqpoll maxcpus=1" |
285 | 315 | ||
286 | For ppc64: | 316 | For ppc64: |
287 | "init 1 maxcpus=1 noirqdistrib" | 317 | "init 1 maxcpus=1 noirqdistrib" |
288 | 318 | ||
289 | For IA64 | ||
290 | (To be filled) | ||
291 | |||
292 | 319 | ||
293 | Notes on loading the dump-capture kernel: | 320 | Notes on loading the dump-capture kernel: |
294 | 321 | ||
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index a5e34d655965..1a6f8bb8881c 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -310,13 +310,7 @@ static int __init setup_nmi_watchdog(char *str) | |||
310 | 310 | ||
311 | if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE)) | 311 | if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE)) |
312 | return 0; | 312 | return 0; |
313 | /* | 313 | |
314 | * If any other x86 CPU has a local APIC, then | ||
315 | * please test the NMI stuff there and send me the | ||
316 | * missing bits. Right now Intel P6/P4 and AMD K7 only. | ||
317 | */ | ||
318 | if ((nmi == NMI_LOCAL_APIC) && (nmi_known_cpu() == 0)) | ||
319 | return 0; /* no lapic support */ | ||
320 | nmi_watchdog = nmi; | 314 | nmi_watchdog = nmi; |
321 | return 1; | 315 | return 1; |
322 | } | 316 | } |
diff --git a/arch/i386/kernel/paravirt.c b/arch/i386/kernel/paravirt.c index 3dceab5828f1..e55fd05da0f5 100644 --- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c | |||
@@ -566,4 +566,11 @@ struct paravirt_ops paravirt_ops = { | |||
566 | .irq_enable_sysexit = native_irq_enable_sysexit, | 566 | .irq_enable_sysexit = native_irq_enable_sysexit, |
567 | .iret = native_iret, | 567 | .iret = native_iret, |
568 | }; | 568 | }; |
569 | EXPORT_SYMBOL(paravirt_ops); | 569 | |
570 | /* | ||
571 | * NOTE: CONFIG_PARAVIRT is experimental and the paravirt_ops | ||
572 | * semantics are subject to change. Hence we only do this | ||
573 | * internal-only export of this, until it gets sorted out and | ||
574 | * all lowlevel CPU ops used by modules are separately exported. | ||
575 | */ | ||
576 | EXPORT_SYMBOL_GPL(paravirt_ops); | ||
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 186aebbae32d..9cb42ecb7f89 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -302,8 +302,6 @@ int __init setup_nmi_watchdog(char *str) | |||
302 | if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE)) | 302 | if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE)) |
303 | return 0; | 303 | return 0; |
304 | 304 | ||
305 | if ((nmi == NMI_LOCAL_APIC) && (nmi_known_cpu() == 0)) | ||
306 | return 0; /* no lapic support */ | ||
307 | nmi_watchdog = nmi; | 305 | nmi_watchdog = nmi; |
308 | return 1; | 306 | return 1; |
309 | } | 307 | } |
diff --git a/block/elevator.c b/block/elevator.c index 536be740ba4e..f6dafa8c7c4d 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -590,6 +590,12 @@ void elv_insert(request_queue_t *q, struct request *rq, int where) | |||
590 | */ | 590 | */ |
591 | rq->cmd_flags |= REQ_SOFTBARRIER; | 591 | rq->cmd_flags |= REQ_SOFTBARRIER; |
592 | 592 | ||
593 | /* | ||
594 | * Most requeues happen because of a busy condition, | ||
595 | * don't force unplug of the queue for that case. | ||
596 | */ | ||
597 | unplug_it = 0; | ||
598 | |||
593 | if (q->ordseq == 0) { | 599 | if (q->ordseq == 0) { |
594 | list_add(&rq->queuelist, &q->queue_head); | 600 | list_add(&rq->queuelist, &q->queue_head); |
595 | break; | 601 | break; |
@@ -604,11 +610,6 @@ void elv_insert(request_queue_t *q, struct request *rq, int where) | |||
604 | } | 610 | } |
605 | 611 | ||
606 | list_add_tail(&rq->queuelist, pos); | 612 | list_add_tail(&rq->queuelist, pos); |
607 | /* | ||
608 | * most requeues happen because of a busy condition, don't | ||
609 | * force unplug of the queue for that case. | ||
610 | */ | ||
611 | unplug_it = 0; | ||
612 | break; | 613 | break; |
613 | 614 | ||
614 | default: | 615 | default: |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 36b37d755dbc..3d54680d0333 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -1677,8 +1677,6 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) | |||
1677 | struct acpi_video_device *video_device = data; | 1677 | struct acpi_video_device *video_device = data; |
1678 | struct acpi_device *device = NULL; | 1678 | struct acpi_device *device = NULL; |
1679 | 1679 | ||
1680 | |||
1681 | printk("video device notify\n"); | ||
1682 | if (!video_device) | 1680 | if (!video_device) |
1683 | return; | 1681 | return; |
1684 | 1682 | ||
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 4dc10105d610..f96446c358ba 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
@@ -1845,7 +1845,7 @@ static u16 __devinit read_bia (const hrz_dev * dev, u16 addr) | |||
1845 | 1845 | ||
1846 | /********** initialise a card **********/ | 1846 | /********** initialise a card **********/ |
1847 | 1847 | ||
1848 | static int __init hrz_init (hrz_dev * dev) { | 1848 | static int __devinit hrz_init (hrz_dev * dev) { |
1849 | int onefivefive; | 1849 | int onefivefive; |
1850 | 1850 | ||
1851 | u16 chan; | 1851 | u16 chan; |
diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c index 448d5083c381..4fac2bdf6215 100644 --- a/drivers/char/tlclk.c +++ b/drivers/char/tlclk.c | |||
@@ -186,6 +186,7 @@ static int got_event; /* if events processing have been done */ | |||
186 | static void switchover_timeout(unsigned long data); | 186 | static void switchover_timeout(unsigned long data); |
187 | static struct timer_list switchover_timer = | 187 | static struct timer_list switchover_timer = |
188 | TIMER_INITIALIZER(switchover_timeout , 0, 0); | 188 | TIMER_INITIALIZER(switchover_timeout , 0, 0); |
189 | static unsigned long tlclk_timer_data; | ||
189 | 190 | ||
190 | static struct tlclk_alarms *alarm_events; | 191 | static struct tlclk_alarms *alarm_events; |
191 | 192 | ||
@@ -197,10 +198,19 @@ static irqreturn_t tlclk_interrupt(int irq, void *dev_id); | |||
197 | 198 | ||
198 | static DECLARE_WAIT_QUEUE_HEAD(wq); | 199 | static DECLARE_WAIT_QUEUE_HEAD(wq); |
199 | 200 | ||
201 | static unsigned long useflags; | ||
202 | static DEFINE_MUTEX(tlclk_mutex); | ||
203 | |||
200 | static int tlclk_open(struct inode *inode, struct file *filp) | 204 | static int tlclk_open(struct inode *inode, struct file *filp) |
201 | { | 205 | { |
202 | int result; | 206 | int result; |
203 | 207 | ||
208 | if (test_and_set_bit(0, &useflags)) | ||
209 | return -EBUSY; | ||
210 | /* this legacy device is always one per system and it doesn't | ||
211 | * know how to handle multiple concurrent clients. | ||
212 | */ | ||
213 | |||
204 | /* Make sure there is no interrupt pending while | 214 | /* Make sure there is no interrupt pending while |
205 | * initialising interrupt handler */ | 215 | * initialising interrupt handler */ |
206 | inb(TLCLK_REG6); | 216 | inb(TLCLK_REG6); |
@@ -221,6 +231,7 @@ static int tlclk_open(struct inode *inode, struct file *filp) | |||
221 | static int tlclk_release(struct inode *inode, struct file *filp) | 231 | static int tlclk_release(struct inode *inode, struct file *filp) |
222 | { | 232 | { |
223 | free_irq(telclk_interrupt, tlclk_interrupt); | 233 | free_irq(telclk_interrupt, tlclk_interrupt); |
234 | clear_bit(0, &useflags); | ||
224 | 235 | ||
225 | return 0; | 236 | return 0; |
226 | } | 237 | } |
@@ -230,26 +241,25 @@ static ssize_t tlclk_read(struct file *filp, char __user *buf, size_t count, | |||
230 | { | 241 | { |
231 | if (count < sizeof(struct tlclk_alarms)) | 242 | if (count < sizeof(struct tlclk_alarms)) |
232 | return -EIO; | 243 | return -EIO; |
244 | if (mutex_lock_interruptible(&tlclk_mutex)) | ||
245 | return -EINTR; | ||
246 | |||
233 | 247 | ||
234 | wait_event_interruptible(wq, got_event); | 248 | wait_event_interruptible(wq, got_event); |
235 | if (copy_to_user(buf, alarm_events, sizeof(struct tlclk_alarms))) | 249 | if (copy_to_user(buf, alarm_events, sizeof(struct tlclk_alarms))) { |
250 | mutex_unlock(&tlclk_mutex); | ||
236 | return -EFAULT; | 251 | return -EFAULT; |
252 | } | ||
237 | 253 | ||
238 | memset(alarm_events, 0, sizeof(struct tlclk_alarms)); | 254 | memset(alarm_events, 0, sizeof(struct tlclk_alarms)); |
239 | got_event = 0; | 255 | got_event = 0; |
240 | 256 | ||
257 | mutex_unlock(&tlclk_mutex); | ||
241 | return sizeof(struct tlclk_alarms); | 258 | return sizeof(struct tlclk_alarms); |
242 | } | 259 | } |
243 | 260 | ||
244 | static ssize_t tlclk_write(struct file *filp, const char __user *buf, size_t count, | ||
245 | loff_t *f_pos) | ||
246 | { | ||
247 | return 0; | ||
248 | } | ||
249 | |||
250 | static const struct file_operations tlclk_fops = { | 261 | static const struct file_operations tlclk_fops = { |
251 | .read = tlclk_read, | 262 | .read = tlclk_read, |
252 | .write = tlclk_write, | ||
253 | .open = tlclk_open, | 263 | .open = tlclk_open, |
254 | .release = tlclk_release, | 264 | .release = tlclk_release, |
255 | 265 | ||
@@ -540,7 +550,7 @@ static ssize_t store_select_amcb1_transmit_clock(struct device *d, | |||
540 | SET_PORT_BITS(TLCLK_REG3, 0xf8, 0x7); | 550 | SET_PORT_BITS(TLCLK_REG3, 0xf8, 0x7); |
541 | switch (val) { | 551 | switch (val) { |
542 | case CLK_8_592MHz: | 552 | case CLK_8_592MHz: |
543 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 1); | 553 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 2); |
544 | break; | 554 | break; |
545 | case CLK_11_184MHz: | 555 | case CLK_11_184MHz: |
546 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 0); | 556 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 0); |
@@ -549,7 +559,7 @@ static ssize_t store_select_amcb1_transmit_clock(struct device *d, | |||
549 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 3); | 559 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 3); |
550 | break; | 560 | break; |
551 | case CLK_44_736MHz: | 561 | case CLK_44_736MHz: |
552 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 2); | 562 | SET_PORT_BITS(TLCLK_REG0, 0xfc, 1); |
553 | break; | 563 | break; |
554 | } | 564 | } |
555 | } else | 565 | } else |
@@ -839,11 +849,13 @@ static void __exit tlclk_cleanup(void) | |||
839 | 849 | ||
840 | static void switchover_timeout(unsigned long data) | 850 | static void switchover_timeout(unsigned long data) |
841 | { | 851 | { |
842 | if ((data & 1)) { | 852 | unsigned long flags = *(unsigned long *) data; |
843 | if ((inb(TLCLK_REG1) & 0x08) != (data & 0x08)) | 853 | |
854 | if ((flags & 1)) { | ||
855 | if ((inb(TLCLK_REG1) & 0x08) != (flags & 0x08)) | ||
844 | alarm_events->switchover_primary++; | 856 | alarm_events->switchover_primary++; |
845 | } else { | 857 | } else { |
846 | if ((inb(TLCLK_REG1) & 0x08) != (data & 0x08)) | 858 | if ((inb(TLCLK_REG1) & 0x08) != (flags & 0x08)) |
847 | alarm_events->switchover_secondary++; | 859 | alarm_events->switchover_secondary++; |
848 | } | 860 | } |
849 | 861 | ||
@@ -901,8 +913,9 @@ static irqreturn_t tlclk_interrupt(int irq, void *dev_id) | |||
901 | 913 | ||
902 | /* TIMEOUT in ~10ms */ | 914 | /* TIMEOUT in ~10ms */ |
903 | switchover_timer.expires = jiffies + msecs_to_jiffies(10); | 915 | switchover_timer.expires = jiffies + msecs_to_jiffies(10); |
904 | switchover_timer.data = inb(TLCLK_REG1); | 916 | tlclk_timer_data = inb(TLCLK_REG1); |
905 | add_timer(&switchover_timer); | 917 | switchover_timer.data = (unsigned long) &tlclk_timer_data; |
918 | mod_timer(&switchover_timer, switchover_timer.expires); | ||
906 | } else { | 919 | } else { |
907 | got_event = 1; | 920 | got_event = 1; |
908 | wake_up(&wq); | 921 | wake_up(&wq); |
diff --git a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c index 93995b658d94..6074c897f51c 100644 --- a/drivers/infiniband/hw/ehca/ehca_cq.c +++ b/drivers/infiniband/hw/ehca/ehca_cq.c | |||
@@ -344,8 +344,11 @@ int ehca_destroy_cq(struct ib_cq *cq) | |||
344 | unsigned long flags; | 344 | unsigned long flags; |
345 | 345 | ||
346 | spin_lock_irqsave(&ehca_cq_idr_lock, flags); | 346 | spin_lock_irqsave(&ehca_cq_idr_lock, flags); |
347 | while (my_cq->nr_callbacks) | 347 | while (my_cq->nr_callbacks) { |
348 | spin_unlock_irqrestore(&ehca_cq_idr_lock, flags); | ||
348 | yield(); | 349 | yield(); |
350 | spin_lock_irqsave(&ehca_cq_idr_lock, flags); | ||
351 | } | ||
349 | 352 | ||
350 | idr_remove(&ehca_cq_idr, my_cq->token); | 353 | idr_remove(&ehca_cq_idr, my_cq->token); |
351 | spin_unlock_irqrestore(&ehca_cq_idr_lock, flags); | 354 | spin_unlock_irqrestore(&ehca_cq_idr_lock, flags); |
diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c index e7209afb4250..c069be8cbcb2 100644 --- a/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/drivers/infiniband/hw/ehca/ehca_irq.c | |||
@@ -440,7 +440,8 @@ void ehca_tasklet_eq(unsigned long data) | |||
440 | cq = idr_find(&ehca_cq_idr, token); | 440 | cq = idr_find(&ehca_cq_idr, token); |
441 | 441 | ||
442 | if (cq == NULL) { | 442 | if (cq == NULL) { |
443 | spin_unlock(&ehca_cq_idr_lock); | 443 | spin_unlock_irqrestore(&ehca_cq_idr_lock, |
444 | flags); | ||
444 | break; | 445 | break; |
445 | } | 446 | } |
446 | 447 | ||
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index cdecbf5911c8..72611fd15103 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
@@ -1621,18 +1621,30 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) | |||
1621 | switch (token) { | 1621 | switch (token) { |
1622 | case SRP_OPT_ID_EXT: | 1622 | case SRP_OPT_ID_EXT: |
1623 | p = match_strdup(args); | 1623 | p = match_strdup(args); |
1624 | if (!p) { | ||
1625 | ret = -ENOMEM; | ||
1626 | goto out; | ||
1627 | } | ||
1624 | target->id_ext = cpu_to_be64(simple_strtoull(p, NULL, 16)); | 1628 | target->id_ext = cpu_to_be64(simple_strtoull(p, NULL, 16)); |
1625 | kfree(p); | 1629 | kfree(p); |
1626 | break; | 1630 | break; |
1627 | 1631 | ||
1628 | case SRP_OPT_IOC_GUID: | 1632 | case SRP_OPT_IOC_GUID: |
1629 | p = match_strdup(args); | 1633 | p = match_strdup(args); |
1634 | if (!p) { | ||
1635 | ret = -ENOMEM; | ||
1636 | goto out; | ||
1637 | } | ||
1630 | target->ioc_guid = cpu_to_be64(simple_strtoull(p, NULL, 16)); | 1638 | target->ioc_guid = cpu_to_be64(simple_strtoull(p, NULL, 16)); |
1631 | kfree(p); | 1639 | kfree(p); |
1632 | break; | 1640 | break; |
1633 | 1641 | ||
1634 | case SRP_OPT_DGID: | 1642 | case SRP_OPT_DGID: |
1635 | p = match_strdup(args); | 1643 | p = match_strdup(args); |
1644 | if (!p) { | ||
1645 | ret = -ENOMEM; | ||
1646 | goto out; | ||
1647 | } | ||
1636 | if (strlen(p) != 32) { | 1648 | if (strlen(p) != 32) { |
1637 | printk(KERN_WARNING PFX "bad dest GID parameter '%s'\n", p); | 1649 | printk(KERN_WARNING PFX "bad dest GID parameter '%s'\n", p); |
1638 | kfree(p); | 1650 | kfree(p); |
@@ -1656,6 +1668,10 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) | |||
1656 | 1668 | ||
1657 | case SRP_OPT_SERVICE_ID: | 1669 | case SRP_OPT_SERVICE_ID: |
1658 | p = match_strdup(args); | 1670 | p = match_strdup(args); |
1671 | if (!p) { | ||
1672 | ret = -ENOMEM; | ||
1673 | goto out; | ||
1674 | } | ||
1659 | target->service_id = cpu_to_be64(simple_strtoull(p, NULL, 16)); | 1675 | target->service_id = cpu_to_be64(simple_strtoull(p, NULL, 16)); |
1660 | kfree(p); | 1676 | kfree(p); |
1661 | break; | 1677 | break; |
@@ -1693,6 +1709,10 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) | |||
1693 | 1709 | ||
1694 | case SRP_OPT_INITIATOR_EXT: | 1710 | case SRP_OPT_INITIATOR_EXT: |
1695 | p = match_strdup(args); | 1711 | p = match_strdup(args); |
1712 | if (!p) { | ||
1713 | ret = -ENOMEM; | ||
1714 | goto out; | ||
1715 | } | ||
1696 | target->initiator_ext = cpu_to_be64(simple_strtoull(p, NULL, 16)); | 1716 | target->initiator_ext = cpu_to_be64(simple_strtoull(p, NULL, 16)); |
1697 | kfree(p); | 1717 | kfree(p); |
1698 | break; | 1718 | break; |
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 67c1154960f0..be4651abe72c 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -272,7 +272,9 @@ static void kvm_free_physmem(struct kvm *kvm) | |||
272 | 272 | ||
273 | static void kvm_free_vcpu(struct kvm_vcpu *vcpu) | 273 | static void kvm_free_vcpu(struct kvm_vcpu *vcpu) |
274 | { | 274 | { |
275 | vcpu_load(vcpu->kvm, vcpu_slot(vcpu)); | ||
275 | kvm_mmu_destroy(vcpu); | 276 | kvm_mmu_destroy(vcpu); |
277 | vcpu_put(vcpu); | ||
276 | kvm_arch_ops->vcpu_free(vcpu); | 278 | kvm_arch_ops->vcpu_free(vcpu); |
277 | } | 279 | } |
278 | 280 | ||
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h index 2dbf4307ed9e..6bc41950fbb3 100644 --- a/drivers/kvm/paging_tmpl.h +++ b/drivers/kvm/paging_tmpl.h | |||
@@ -274,7 +274,7 @@ static int FNAME(fix_write_pf)(struct kvm_vcpu *vcpu, | |||
274 | struct kvm_mmu_page *page; | 274 | struct kvm_mmu_page *page; |
275 | 275 | ||
276 | if (is_writeble_pte(*shadow_ent)) | 276 | if (is_writeble_pte(*shadow_ent)) |
277 | return 0; | 277 | return !user || (*shadow_ent & PT_USER_MASK); |
278 | 278 | ||
279 | writable_shadow = *shadow_ent & PT_SHADOW_WRITABLE_MASK; | 279 | writable_shadow = *shadow_ent & PT_SHADOW_WRITABLE_MASK; |
280 | if (user) { | 280 | if (user) { |
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 714f6a7841cd..7397bfbbcb1c 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -1407,7 +1407,8 @@ static int svm_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
1407 | int r; | 1407 | int r; |
1408 | 1408 | ||
1409 | again: | 1409 | again: |
1410 | do_interrupt_requests(vcpu, kvm_run); | 1410 | if (!vcpu->mmio_read_completed) |
1411 | do_interrupt_requests(vcpu, kvm_run); | ||
1411 | 1412 | ||
1412 | clgi(); | 1413 | clgi(); |
1413 | 1414 | ||
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 0aa2659f6ae5..27f2751c3baa 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -1717,7 +1717,8 @@ again: | |||
1717 | vmcs_writel(HOST_GS_BASE, segment_base(gs_sel)); | 1717 | vmcs_writel(HOST_GS_BASE, segment_base(gs_sel)); |
1718 | #endif | 1718 | #endif |
1719 | 1719 | ||
1720 | do_interrupt_requests(vcpu, kvm_run); | 1720 | if (!vcpu->mmio_read_completed) |
1721 | do_interrupt_requests(vcpu, kvm_run); | ||
1721 | 1722 | ||
1722 | if (vcpu->guest_debug.enabled) | 1723 | if (vcpu->guest_debug.enabled) |
1723 | kvm_guest_debug_pre(vcpu); | 1724 | kvm_guest_debug_pre(vcpu); |
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index be70795b4822..7513cddb929f 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #define ModRM (1<<6) | 61 | #define ModRM (1<<6) |
62 | /* Destination is only written; never read. */ | 62 | /* Destination is only written; never read. */ |
63 | #define Mov (1<<7) | 63 | #define Mov (1<<7) |
64 | #define BitOp (1<<8) | ||
64 | 65 | ||
65 | static u8 opcode_table[256] = { | 66 | static u8 opcode_table[256] = { |
66 | /* 0x00 - 0x07 */ | 67 | /* 0x00 - 0x07 */ |
@@ -148,7 +149,7 @@ static u8 opcode_table[256] = { | |||
148 | 0, 0, ByteOp | DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM | 149 | 0, 0, ByteOp | DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM |
149 | }; | 150 | }; |
150 | 151 | ||
151 | static u8 twobyte_table[256] = { | 152 | static u16 twobyte_table[256] = { |
152 | /* 0x00 - 0x0F */ | 153 | /* 0x00 - 0x0F */ |
153 | 0, SrcMem | ModRM | DstReg, 0, 0, 0, 0, ImplicitOps, 0, | 154 | 0, SrcMem | ModRM | DstReg, 0, 0, 0, 0, ImplicitOps, 0, |
154 | 0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0, | 155 | 0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0, |
@@ -180,16 +181,16 @@ static u8 twobyte_table[256] = { | |||
180 | /* 0x90 - 0x9F */ | 181 | /* 0x90 - 0x9F */ |
181 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 182 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
182 | /* 0xA0 - 0xA7 */ | 183 | /* 0xA0 - 0xA7 */ |
183 | 0, 0, 0, DstMem | SrcReg | ModRM, 0, 0, 0, 0, | 184 | 0, 0, 0, DstMem | SrcReg | ModRM | BitOp, 0, 0, 0, 0, |
184 | /* 0xA8 - 0xAF */ | 185 | /* 0xA8 - 0xAF */ |
185 | 0, 0, 0, DstMem | SrcReg | ModRM, 0, 0, 0, 0, | 186 | 0, 0, 0, DstMem | SrcReg | ModRM | BitOp, 0, 0, 0, 0, |
186 | /* 0xB0 - 0xB7 */ | 187 | /* 0xB0 - 0xB7 */ |
187 | ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM, 0, | 188 | ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM, 0, |
188 | DstMem | SrcReg | ModRM, | 189 | DstMem | SrcReg | ModRM | BitOp, |
189 | 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, | 190 | 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, |
190 | DstReg | SrcMem16 | ModRM | Mov, | 191 | DstReg | SrcMem16 | ModRM | Mov, |
191 | /* 0xB8 - 0xBF */ | 192 | /* 0xB8 - 0xBF */ |
192 | 0, 0, DstMem | SrcImmByte | ModRM, DstMem | SrcReg | ModRM, | 193 | 0, 0, DstMem | SrcImmByte | ModRM, DstMem | SrcReg | ModRM | BitOp, |
193 | 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, | 194 | 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, |
194 | DstReg | SrcMem16 | ModRM | Mov, | 195 | DstReg | SrcMem16 | ModRM | Mov, |
195 | /* 0xC0 - 0xCF */ | 196 | /* 0xC0 - 0xCF */ |
@@ -469,7 +470,8 @@ static int read_descriptor(struct x86_emulate_ctxt *ctxt, | |||
469 | int | 470 | int |
470 | x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) | 471 | x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) |
471 | { | 472 | { |
472 | u8 b, d, sib, twobyte = 0, rex_prefix = 0; | 473 | unsigned d; |
474 | u8 b, sib, twobyte = 0, rex_prefix = 0; | ||
473 | u8 modrm, modrm_mod = 0, modrm_reg = 0, modrm_rm = 0; | 475 | u8 modrm, modrm_mod = 0, modrm_reg = 0, modrm_rm = 0; |
474 | unsigned long *override_base = NULL; | 476 | unsigned long *override_base = NULL; |
475 | unsigned int op_bytes, ad_bytes, lock_prefix = 0, rep_prefix = 0, i; | 477 | unsigned int op_bytes, ad_bytes, lock_prefix = 0, rep_prefix = 0, i; |
@@ -726,46 +728,6 @@ done_prefixes: | |||
726 | ; | 728 | ; |
727 | } | 729 | } |
728 | 730 | ||
729 | /* Decode and fetch the destination operand: register or memory. */ | ||
730 | switch (d & DstMask) { | ||
731 | case ImplicitOps: | ||
732 | /* Special instructions do their own operand decoding. */ | ||
733 | goto special_insn; | ||
734 | case DstReg: | ||
735 | dst.type = OP_REG; | ||
736 | if ((d & ByteOp) | ||
737 | && !(twobyte_table && (b == 0xb6 || b == 0xb7))) { | ||
738 | dst.ptr = decode_register(modrm_reg, _regs, | ||
739 | (rex_prefix == 0)); | ||
740 | dst.val = *(u8 *) dst.ptr; | ||
741 | dst.bytes = 1; | ||
742 | } else { | ||
743 | dst.ptr = decode_register(modrm_reg, _regs, 0); | ||
744 | switch ((dst.bytes = op_bytes)) { | ||
745 | case 2: | ||
746 | dst.val = *(u16 *)dst.ptr; | ||
747 | break; | ||
748 | case 4: | ||
749 | dst.val = *(u32 *)dst.ptr; | ||
750 | break; | ||
751 | case 8: | ||
752 | dst.val = *(u64 *)dst.ptr; | ||
753 | break; | ||
754 | } | ||
755 | } | ||
756 | break; | ||
757 | case DstMem: | ||
758 | dst.type = OP_MEM; | ||
759 | dst.ptr = (unsigned long *)cr2; | ||
760 | dst.bytes = (d & ByteOp) ? 1 : op_bytes; | ||
761 | if (!(d & Mov) && /* optimisation - avoid slow emulated read */ | ||
762 | ((rc = ops->read_emulated((unsigned long)dst.ptr, | ||
763 | &dst.val, dst.bytes, ctxt)) != 0)) | ||
764 | goto done; | ||
765 | break; | ||
766 | } | ||
767 | dst.orig_val = dst.val; | ||
768 | |||
769 | /* | 731 | /* |
770 | * Decode and fetch the source operand: register, memory | 732 | * Decode and fetch the source operand: register, memory |
771 | * or immediate. | 733 | * or immediate. |
@@ -838,6 +800,50 @@ done_prefixes: | |||
838 | break; | 800 | break; |
839 | } | 801 | } |
840 | 802 | ||
803 | /* Decode and fetch the destination operand: register or memory. */ | ||
804 | switch (d & DstMask) { | ||
805 | case ImplicitOps: | ||
806 | /* Special instructions do their own operand decoding. */ | ||
807 | goto special_insn; | ||
808 | case DstReg: | ||
809 | dst.type = OP_REG; | ||
810 | if ((d & ByteOp) | ||
811 | && !(twobyte_table && (b == 0xb6 || b == 0xb7))) { | ||
812 | dst.ptr = decode_register(modrm_reg, _regs, | ||
813 | (rex_prefix == 0)); | ||
814 | dst.val = *(u8 *) dst.ptr; | ||
815 | dst.bytes = 1; | ||
816 | } else { | ||
817 | dst.ptr = decode_register(modrm_reg, _regs, 0); | ||
818 | switch ((dst.bytes = op_bytes)) { | ||
819 | case 2: | ||
820 | dst.val = *(u16 *)dst.ptr; | ||
821 | break; | ||
822 | case 4: | ||
823 | dst.val = *(u32 *)dst.ptr; | ||
824 | break; | ||
825 | case 8: | ||
826 | dst.val = *(u64 *)dst.ptr; | ||
827 | break; | ||
828 | } | ||
829 | } | ||
830 | break; | ||
831 | case DstMem: | ||
832 | dst.type = OP_MEM; | ||
833 | dst.ptr = (unsigned long *)cr2; | ||
834 | dst.bytes = (d & ByteOp) ? 1 : op_bytes; | ||
835 | if (d & BitOp) { | ||
836 | dst.ptr += src.val / BITS_PER_LONG; | ||
837 | dst.bytes = sizeof(long); | ||
838 | } | ||
839 | if (!(d & Mov) && /* optimisation - avoid slow emulated read */ | ||
840 | ((rc = ops->read_emulated((unsigned long)dst.ptr, | ||
841 | &dst.val, dst.bytes, ctxt)) != 0)) | ||
842 | goto done; | ||
843 | break; | ||
844 | } | ||
845 | dst.orig_val = dst.val; | ||
846 | |||
841 | if (twobyte) | 847 | if (twobyte) |
842 | goto twobyte_insn; | 848 | goto twobyte_insn; |
843 | 849 | ||
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 39ad9f73d1ec..be10a3a26b5b 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | 40 | ||
41 | #define DRV_NAME "ehea" | 41 | #define DRV_NAME "ehea" |
42 | #define DRV_VERSION "EHEA_0043" | 42 | #define DRV_VERSION "EHEA_0044" |
43 | 43 | ||
44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | 44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ |
45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) | 45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 83fa32f72398..1072e69ef85d 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -558,12 +558,12 @@ static irqreturn_t ehea_qp_aff_irq_handler(int irq, void *param) | |||
558 | u32 qp_token; | 558 | u32 qp_token; |
559 | 559 | ||
560 | eqe = ehea_poll_eq(port->qp_eq); | 560 | eqe = ehea_poll_eq(port->qp_eq); |
561 | ehea_debug("eqe=%p", eqe); | 561 | |
562 | while (eqe) { | 562 | while (eqe) { |
563 | ehea_debug("*eqe=%lx", *(u64*)eqe); | ||
564 | eqe = ehea_poll_eq(port->qp_eq); | ||
565 | qp_token = EHEA_BMASK_GET(EHEA_EQE_QP_TOKEN, eqe->entry); | 563 | qp_token = EHEA_BMASK_GET(EHEA_EQE_QP_TOKEN, eqe->entry); |
566 | ehea_debug("next eqe=%p", eqe); | 564 | ehea_error("QP aff_err: entry=0x%lx, token=0x%x", |
565 | eqe->entry, qp_token); | ||
566 | eqe = ehea_poll_eq(port->qp_eq); | ||
567 | } | 567 | } |
568 | 568 | ||
569 | return IRQ_HANDLED; | 569 | return IRQ_HANDLED; |
@@ -575,8 +575,9 @@ static struct ehea_port *ehea_get_port(struct ehea_adapter *adapter, | |||
575 | int i; | 575 | int i; |
576 | 576 | ||
577 | for (i = 0; i < adapter->num_ports; i++) | 577 | for (i = 0; i < adapter->num_ports; i++) |
578 | if (adapter->port[i]->logical_port_id == logical_port) | 578 | if (adapter->port[i]) |
579 | return adapter->port[i]; | 579 | if (adapter->port[i]->logical_port_id == logical_port) |
580 | return adapter->port[i]; | ||
580 | return NULL; | 581 | return NULL; |
581 | } | 582 | } |
582 | 583 | ||
@@ -642,6 +643,8 @@ int ehea_sense_port_attr(struct ehea_port *port) | |||
642 | break; | 643 | break; |
643 | } | 644 | } |
644 | 645 | ||
646 | port->autoneg = 1; | ||
647 | |||
645 | /* Number of default QPs */ | 648 | /* Number of default QPs */ |
646 | port->num_def_qps = cb0->num_default_qps; | 649 | port->num_def_qps = cb0->num_default_qps; |
647 | 650 | ||
@@ -728,10 +731,7 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed) | |||
728 | } | 731 | } |
729 | } else { | 732 | } else { |
730 | if (hret == H_AUTHORITY) { | 733 | if (hret == H_AUTHORITY) { |
731 | ehea_info("Hypervisor denied setting port speed. Either" | 734 | ehea_info("Hypervisor denied setting port speed"); |
732 | " this partition is not authorized to set " | ||
733 | "port speed or another partition has modified" | ||
734 | " port speed first."); | ||
735 | ret = -EPERM; | 735 | ret = -EPERM; |
736 | } else { | 736 | } else { |
737 | ret = -EIO; | 737 | ret = -EIO; |
@@ -998,7 +998,7 @@ static int ehea_configure_port(struct ehea_port *port) | |||
998 | | EHEA_BMASK_SET(PXLY_RC_JUMBO_FRAME, 1); | 998 | | EHEA_BMASK_SET(PXLY_RC_JUMBO_FRAME, 1); |
999 | 999 | ||
1000 | for (i = 0; i < port->num_def_qps; i++) | 1000 | for (i = 0; i < port->num_def_qps; i++) |
1001 | cb0->default_qpn_arr[i] = port->port_res[i].qp->init_attr.qp_nr; | 1001 | cb0->default_qpn_arr[i] = port->port_res[0].qp->init_attr.qp_nr; |
1002 | 1002 | ||
1003 | if (netif_msg_ifup(port)) | 1003 | if (netif_msg_ifup(port)) |
1004 | ehea_dump(cb0, sizeof(*cb0), "ehea_configure_port"); | 1004 | ehea_dump(cb0, sizeof(*cb0), "ehea_configure_port"); |
@@ -1485,11 +1485,12 @@ out: | |||
1485 | 1485 | ||
1486 | static void ehea_promiscuous_error(u64 hret, int enable) | 1486 | static void ehea_promiscuous_error(u64 hret, int enable) |
1487 | { | 1487 | { |
1488 | ehea_info("Hypervisor denied %sabling promiscuous mode.%s", | 1488 | if (hret == H_AUTHORITY) |
1489 | enable == 1 ? "en" : "dis", | 1489 | ehea_info("Hypervisor denied %sabling promiscuous mode", |
1490 | hret != H_AUTHORITY ? "" : " Another partition owning a " | 1490 | enable == 1 ? "en" : "dis"); |
1491 | "logical port on the same physical port might have altered " | 1491 | else |
1492 | "promiscuous mode first."); | 1492 | ehea_error("failed %sabling promiscuous mode", |
1493 | enable == 1 ? "en" : "dis"); | ||
1493 | } | 1494 | } |
1494 | 1495 | ||
1495 | static void ehea_promiscuous(struct net_device *dev, int enable) | 1496 | static void ehea_promiscuous(struct net_device *dev, int enable) |
@@ -2267,6 +2268,8 @@ static void ehea_tx_watchdog(struct net_device *dev) | |||
2267 | int ehea_sense_adapter_attr(struct ehea_adapter *adapter) | 2268 | int ehea_sense_adapter_attr(struct ehea_adapter *adapter) |
2268 | { | 2269 | { |
2269 | struct hcp_query_ehea *cb; | 2270 | struct hcp_query_ehea *cb; |
2271 | struct device_node *lhea_dn = NULL; | ||
2272 | struct device_node *eth_dn = NULL; | ||
2270 | u64 hret; | 2273 | u64 hret; |
2271 | int ret; | 2274 | int ret; |
2272 | 2275 | ||
@@ -2283,7 +2286,18 @@ int ehea_sense_adapter_attr(struct ehea_adapter *adapter) | |||
2283 | goto out_herr; | 2286 | goto out_herr; |
2284 | } | 2287 | } |
2285 | 2288 | ||
2286 | adapter->num_ports = cb->num_ports; | 2289 | /* Determine the number of available logical ports |
2290 | * by counting the child nodes of the lhea OFDT entry | ||
2291 | */ | ||
2292 | adapter->num_ports = 0; | ||
2293 | lhea_dn = of_find_node_by_name(lhea_dn, "lhea"); | ||
2294 | do { | ||
2295 | eth_dn = of_get_next_child(lhea_dn, eth_dn); | ||
2296 | if (eth_dn) | ||
2297 | adapter->num_ports++; | ||
2298 | } while ( eth_dn ); | ||
2299 | of_node_put(lhea_dn); | ||
2300 | |||
2287 | adapter->max_mc_mac = cb->max_mc_mac - 1; | 2301 | adapter->max_mc_mac = cb->max_mc_mac - 1; |
2288 | ret = 0; | 2302 | ret = 0; |
2289 | 2303 | ||
@@ -2334,8 +2348,6 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2334 | 2348 | ||
2335 | INIT_LIST_HEAD(&port->mc_list->list); | 2349 | INIT_LIST_HEAD(&port->mc_list->list); |
2336 | 2350 | ||
2337 | ehea_set_portspeed(port, EHEA_SPEED_AUTONEG); | ||
2338 | |||
2339 | ret = ehea_sense_port_attr(port); | 2351 | ret = ehea_sense_port_attr(port); |
2340 | if (ret) | 2352 | if (ret) |
2341 | goto out; | 2353 | goto out; |
@@ -2471,14 +2483,16 @@ static int __devinit ehea_probe(struct ibmebus_dev *dev, | |||
2471 | 2483 | ||
2472 | adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle", | 2484 | adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle", |
2473 | NULL); | 2485 | NULL); |
2474 | if (!adapter_handle) { | 2486 | if (adapter_handle) |
2487 | adapter->handle = *adapter_handle; | ||
2488 | |||
2489 | if (!adapter->handle) { | ||
2475 | dev_err(&dev->ofdev.dev, "failed getting handle for adapter" | 2490 | dev_err(&dev->ofdev.dev, "failed getting handle for adapter" |
2476 | " '%s'\n", dev->ofdev.node->full_name); | 2491 | " '%s'\n", dev->ofdev.node->full_name); |
2477 | ret = -ENODEV; | 2492 | ret = -ENODEV; |
2478 | goto out_free_ad; | 2493 | goto out_free_ad; |
2479 | } | 2494 | } |
2480 | 2495 | ||
2481 | adapter->handle = *adapter_handle; | ||
2482 | adapter->pd = EHEA_PD_ID; | 2496 | adapter->pd = EHEA_PD_ID; |
2483 | 2497 | ||
2484 | dev->ofdev.dev.driver_data = adapter; | 2498 | dev->ofdev.dev.driver_data = adapter; |
diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c index 0cfc2bc1a27b..37716e05e808 100644 --- a/drivers/net/ehea/ehea_phyp.c +++ b/drivers/net/ehea/ehea_phyp.c | |||
@@ -94,6 +94,7 @@ static long ehea_plpar_hcall9(unsigned long opcode, | |||
94 | { | 94 | { |
95 | long ret; | 95 | long ret; |
96 | int i, sleep_msecs; | 96 | int i, sleep_msecs; |
97 | u8 cb_cat; | ||
97 | 98 | ||
98 | for (i = 0; i < 5; i++) { | 99 | for (i = 0; i < 5; i++) { |
99 | ret = plpar_hcall9(opcode, outs, | 100 | ret = plpar_hcall9(opcode, outs, |
@@ -106,7 +107,13 @@ static long ehea_plpar_hcall9(unsigned long opcode, | |||
106 | continue; | 107 | continue; |
107 | } | 108 | } |
108 | 109 | ||
109 | if (ret < H_SUCCESS) | 110 | cb_cat = EHEA_BMASK_GET(H_MEHEAPORT_CAT, arg2); |
111 | |||
112 | if ((ret < H_SUCCESS) && !(((ret == H_AUTHORITY) | ||
113 | && (opcode == H_MODIFY_HEA_PORT)) | ||
114 | && (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO) | ||
115 | || (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7) | ||
116 | && (arg3 == H_PORT_CB7_DUCQPN))))) | ||
110 | ehea_error("opcode=%lx ret=%lx" | 117 | ehea_error("opcode=%lx ret=%lx" |
111 | " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" | 118 | " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" |
112 | " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" | 119 | " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" |
@@ -120,7 +127,6 @@ static long ehea_plpar_hcall9(unsigned long opcode, | |||
120 | outs[0], outs[1], outs[2], outs[3], | 127 | outs[0], outs[1], outs[2], outs[3], |
121 | outs[4], outs[5], outs[6], outs[7], | 128 | outs[4], outs[5], outs[6], outs[7], |
122 | outs[8]); | 129 | outs[8]); |
123 | |||
124 | return ret; | 130 | return ret; |
125 | } | 131 | } |
126 | 132 | ||
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 6490acf05305..59324b1693d6 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -63,12 +63,11 @@ | |||
63 | 63 | ||
64 | #include "netxen_nic_hw.h" | 64 | #include "netxen_nic_hw.h" |
65 | 65 | ||
66 | #define NETXEN_NIC_BUILD_NO "4" | 66 | #define NETXEN_NIC_BUILD_NO "2" |
67 | #define _NETXEN_NIC_LINUX_MAJOR 3 | 67 | #define _NETXEN_NIC_LINUX_MAJOR 3 |
68 | #define _NETXEN_NIC_LINUX_MINOR 3 | 68 | #define _NETXEN_NIC_LINUX_MINOR 3 |
69 | #define _NETXEN_NIC_LINUX_SUBVERSION 2 | 69 | #define _NETXEN_NIC_LINUX_SUBVERSION 3 |
70 | #define NETXEN_NIC_LINUX_VERSIONID "3.3.2" "-" NETXEN_NIC_BUILD_NO | 70 | #define NETXEN_NIC_LINUX_VERSIONID "3.3.3" "-" NETXEN_NIC_BUILD_NO |
71 | #define NETXEN_NIC_FW_VERSIONID "3.3.2" | ||
72 | 71 | ||
73 | #define RCV_DESC_RINGSIZE \ | 72 | #define RCV_DESC_RINGSIZE \ |
74 | (sizeof(struct rcv_desc) * adapter->max_rx_desc_count) | 73 | (sizeof(struct rcv_desc) * adapter->max_rx_desc_count) |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index c0c31d1914a7..191e2336e323 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -984,7 +984,8 @@ void netxen_nic_flash_print(struct netxen_adapter *adapter) | |||
984 | _NETXEN_NIC_LINUX_MAJOR, fw_major); | 984 | _NETXEN_NIC_LINUX_MAJOR, fw_major); |
985 | adapter->driver_mismatch = 1; | 985 | adapter->driver_mismatch = 1; |
986 | } | 986 | } |
987 | if (fw_minor != _NETXEN_NIC_LINUX_MINOR) { | 987 | if (fw_minor != _NETXEN_NIC_LINUX_MINOR && |
988 | fw_minor != (_NETXEN_NIC_LINUX_MINOR + 1)) { | ||
988 | printk(KERN_ERR "The mismatch in driver version and firmware " | 989 | printk(KERN_ERR "The mismatch in driver version and firmware " |
989 | "version minor number\n" | 990 | "version minor number\n" |
990 | "Driver version minor number = %d \t" | 991 | "Driver version minor number = %d \t" |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 8a5792fea774..96e1bee19ba0 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -1144,7 +1144,7 @@ static int __init netxen_init_module(void) | |||
1144 | if ((netxen_workq = create_singlethread_workqueue("netxen")) == 0) | 1144 | if ((netxen_workq = create_singlethread_workqueue("netxen")) == 0) |
1145 | return -ENOMEM; | 1145 | return -ENOMEM; |
1146 | 1146 | ||
1147 | return pci_module_init(&netxen_driver); | 1147 | return pci_register_driver(&netxen_driver); |
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | module_init(netxen_init_module); | 1150 | module_init(netxen_init_module); |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index 342f4062de0b..461e8274ef69 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -606,11 +606,14 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
606 | { | 606 | { |
607 | kio_addr_t ioaddr = dev->base_addr; | 607 | kio_addr_t ioaddr = dev->base_addr; |
608 | struct el3_private *priv = netdev_priv(dev); | 608 | struct el3_private *priv = netdev_priv(dev); |
609 | unsigned long flags; | ||
609 | 610 | ||
610 | DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " | 611 | DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " |
611 | "status %4.4x.\n", dev->name, (long)skb->len, | 612 | "status %4.4x.\n", dev->name, (long)skb->len, |
612 | inw(ioaddr + EL3_STATUS)); | 613 | inw(ioaddr + EL3_STATUS)); |
613 | 614 | ||
615 | spin_lock_irqsave(&priv->lock, flags); | ||
616 | |||
614 | priv->stats.tx_bytes += skb->len; | 617 | priv->stats.tx_bytes += skb->len; |
615 | 618 | ||
616 | /* Put out the doubleword header... */ | 619 | /* Put out the doubleword header... */ |
@@ -628,6 +631,7 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
628 | 631 | ||
629 | dev_kfree_skb(skb); | 632 | dev_kfree_skb(skb); |
630 | pop_tx_status(dev); | 633 | pop_tx_status(dev); |
634 | spin_unlock_irqrestore(&priv->lock, flags); | ||
631 | 635 | ||
632 | return 0; | 636 | return 0; |
633 | } | 637 | } |
@@ -729,14 +733,13 @@ static void media_check(unsigned long arg) | |||
729 | 733 | ||
730 | if (!netif_device_present(dev)) goto reschedule; | 734 | if (!netif_device_present(dev)) goto reschedule; |
731 | 735 | ||
732 | EL3WINDOW(1); | ||
733 | /* Check for pending interrupt with expired latency timer: with | 736 | /* Check for pending interrupt with expired latency timer: with |
734 | this, we can limp along even if the interrupt is blocked */ | 737 | this, we can limp along even if the interrupt is blocked */ |
735 | if ((inw(ioaddr + EL3_STATUS) & IntLatch) && | 738 | if ((inw(ioaddr + EL3_STATUS) & IntLatch) && |
736 | (inb(ioaddr + EL3_TIMER) == 0xff)) { | 739 | (inb(ioaddr + EL3_TIMER) == 0xff)) { |
737 | if (!lp->fast_poll) | 740 | if (!lp->fast_poll) |
738 | printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name); | 741 | printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name); |
739 | el3_interrupt(dev->irq, lp); | 742 | el3_interrupt(dev->irq, dev); |
740 | lp->fast_poll = HZ; | 743 | lp->fast_poll = HZ; |
741 | } | 744 | } |
742 | if (lp->fast_poll) { | 745 | if (lp->fast_poll) { |
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index e175f3910b18..9765fa661467 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -286,6 +286,7 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd) | |||
286 | 286 | ||
287 | return 0; | 287 | return 0; |
288 | } | 288 | } |
289 | EXPORT_SYMBOL(phy_ethtool_sset); | ||
289 | 290 | ||
290 | int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) | 291 | int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) |
291 | { | 292 | { |
@@ -302,7 +303,7 @@ int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) | |||
302 | 303 | ||
303 | return 0; | 304 | return 0; |
304 | } | 305 | } |
305 | 306 | EXPORT_SYMBOL(phy_ethtool_gset); | |
306 | 307 | ||
307 | /* Note that this function is currently incompatible with the | 308 | /* Note that this function is currently incompatible with the |
308 | * PHYCONTROL layer. It changes registers without regard to | 309 | * PHYCONTROL layer. It changes registers without regard to |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 250cdbeefdfd..1dd66b8ea0fa 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -556,10 +556,9 @@ static int init_shared_mem(struct s2io_nic *nic) | |||
556 | } | 556 | } |
557 | } | 557 | } |
558 | 558 | ||
559 | nic->ufo_in_band_v = kmalloc((sizeof(u64) * size), GFP_KERNEL); | 559 | nic->ufo_in_band_v = kcalloc(size, sizeof(u64), GFP_KERNEL); |
560 | if (!nic->ufo_in_band_v) | 560 | if (!nic->ufo_in_band_v) |
561 | return -ENOMEM; | 561 | return -ENOMEM; |
562 | memset(nic->ufo_in_band_v, 0, size); | ||
563 | 562 | ||
564 | /* Allocation and initialization of RXDs in Rings */ | 563 | /* Allocation and initialization of RXDs in Rings */ |
565 | size = 0; | 564 | size = 0; |
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index e9e0934380b8..198b9f22fbff 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c | |||
@@ -492,10 +492,10 @@ static int sh_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) | |||
492 | 492 | ||
493 | spin_lock_irq(&rtc->lock); | 493 | spin_lock_irq(&rtc->lock); |
494 | 494 | ||
495 | /* disable alarm interrupt and clear flag */ | 495 | /* disable alarm interrupt and clear the alarm flag */ |
496 | rcr1 = readb(rtc->regbase + RCR1); | 496 | rcr1 = readb(rtc->regbase + RCR1); |
497 | rcr1 &= ~RCR1_AF; | 497 | rcr1 &= ~(RCR1_AF|RCR1_AIE); |
498 | writeb(rcr1 & ~RCR1_AIE, rtc->regbase + RCR1); | 498 | writeb(rcr1, rtc->regbase + RCR1); |
499 | 499 | ||
500 | rtc->rearm_aie = 0; | 500 | rtc->rearm_aie = 0; |
501 | 501 | ||
@@ -510,8 +510,10 @@ static int sh_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) | |||
510 | mon += 1; | 510 | mon += 1; |
511 | sh_rtc_write_alarm_value(rtc, mon, RMONAR); | 511 | sh_rtc_write_alarm_value(rtc, mon, RMONAR); |
512 | 512 | ||
513 | /* Restore interrupt activation status */ | 513 | if (wkalrm->enabled) { |
514 | writeb(rcr1, rtc->regbase + RCR1); | 514 | rcr1 |= RCR1_AIE; |
515 | writeb(rcr1, rtc->regbase + RCR1); | ||
516 | } | ||
515 | 517 | ||
516 | spin_unlock_irq(&rtc->lock); | 518 | spin_unlock_irq(&rtc->lock); |
517 | 519 | ||
diff --git a/drivers/usb/serial/funsoft.c b/drivers/usb/serial/funsoft.c index 31501c9361b9..2bebd63d5ed1 100644 --- a/drivers/usb/serial/funsoft.c +++ b/drivers/usb/serial/funsoft.c | |||
@@ -27,7 +27,7 @@ MODULE_DEVICE_TABLE(usb, id_table); | |||
27 | static int funsoft_ioctl(struct usb_serial_port *port, struct file *file, | 27 | static int funsoft_ioctl(struct usb_serial_port *port, struct file *file, |
28 | unsigned int cmd, unsigned long arg) | 28 | unsigned int cmd, unsigned long arg) |
29 | { | 29 | { |
30 | struct termios t; | 30 | struct ktermios t; |
31 | 31 | ||
32 | dbg("%s - port %d, cmd 0x%04x", __FUNCTION__, port->number, cmd); | 32 | dbg("%s - port %d, cmd 0x%04x", __FUNCTION__, port->number, cmd); |
33 | 33 | ||
diff --git a/fs/block_dev.c b/fs/block_dev.c index 8b18e43b82fe..d9bdf2b3ade2 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -146,7 +146,7 @@ static int blk_end_aio(struct bio *bio, unsigned int bytes_done, int error) | |||
146 | iocb->ki_nbytes = -EIO; | 146 | iocb->ki_nbytes = -EIO; |
147 | 147 | ||
148 | if (atomic_dec_and_test(bio_count)) { | 148 | if (atomic_dec_and_test(bio_count)) { |
149 | if (iocb->ki_nbytes < 0) | 149 | if ((long)iocb->ki_nbytes < 0) |
150 | aio_complete(iocb, iocb->ki_nbytes, 0); | 150 | aio_complete(iocb, iocb->ki_nbytes, 0); |
151 | else | 151 | else |
152 | aio_complete(iocb, iocb->ki_left, 0); | 152 | aio_complete(iocb, iocb->ki_left, 0); |
@@ -190,6 +190,12 @@ static struct page *blk_get_page(unsigned long addr, size_t count, int rw, | |||
190 | return pvec->page[pvec->idx++]; | 190 | return pvec->page[pvec->idx++]; |
191 | } | 191 | } |
192 | 192 | ||
193 | /* return a page back to pvec array */ | ||
194 | static void blk_unget_page(struct page *page, struct pvec *pvec) | ||
195 | { | ||
196 | pvec->page[--pvec->idx] = page; | ||
197 | } | ||
198 | |||
193 | static ssize_t | 199 | static ssize_t |
194 | blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, | 200 | blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, |
195 | loff_t pos, unsigned long nr_segs) | 201 | loff_t pos, unsigned long nr_segs) |
@@ -278,6 +284,8 @@ same_bio: | |||
278 | count = min(count, nbytes); | 284 | count = min(count, nbytes); |
279 | goto same_bio; | 285 | goto same_bio; |
280 | } | 286 | } |
287 | } else { | ||
288 | blk_unget_page(page, &pvec); | ||
281 | } | 289 | } |
282 | 290 | ||
283 | /* bio is ready, submit it */ | 291 | /* bio is ready, submit it */ |
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index 99b6f329ba23..5109f1d5e7ff 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -48,6 +48,11 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | mutex_lock(&inode->i_mutex); | 50 | mutex_lock(&inode->i_mutex); |
51 | |||
52 | mutex_lock(&(REISERFS_I(inode)->i_mmap)); | ||
53 | if (REISERFS_I(inode)->i_flags & i_ever_mapped) | ||
54 | REISERFS_I(inode)->i_flags &= ~i_pack_on_close_mask; | ||
55 | |||
51 | reiserfs_write_lock(inode->i_sb); | 56 | reiserfs_write_lock(inode->i_sb); |
52 | /* freeing preallocation only involves relogging blocks that | 57 | /* freeing preallocation only involves relogging blocks that |
53 | * are already in the current transaction. preallocation gets | 58 | * are already in the current transaction. preallocation gets |
@@ -100,11 +105,24 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp) | |||
100 | err = reiserfs_truncate_file(inode, 0); | 105 | err = reiserfs_truncate_file(inode, 0); |
101 | } | 106 | } |
102 | out: | 107 | out: |
108 | mutex_unlock(&(REISERFS_I(inode)->i_mmap)); | ||
103 | mutex_unlock(&inode->i_mutex); | 109 | mutex_unlock(&inode->i_mutex); |
104 | reiserfs_write_unlock(inode->i_sb); | 110 | reiserfs_write_unlock(inode->i_sb); |
105 | return err; | 111 | return err; |
106 | } | 112 | } |
107 | 113 | ||
114 | static int reiserfs_file_mmap(struct file *file, struct vm_area_struct *vma) | ||
115 | { | ||
116 | struct inode *inode; | ||
117 | |||
118 | inode = file->f_path.dentry->d_inode; | ||
119 | mutex_lock(&(REISERFS_I(inode)->i_mmap)); | ||
120 | REISERFS_I(inode)->i_flags |= i_ever_mapped; | ||
121 | mutex_unlock(&(REISERFS_I(inode)->i_mmap)); | ||
122 | |||
123 | return generic_file_mmap(file, vma); | ||
124 | } | ||
125 | |||
108 | static void reiserfs_vfs_truncate_file(struct inode *inode) | 126 | static void reiserfs_vfs_truncate_file(struct inode *inode) |
109 | { | 127 | { |
110 | reiserfs_truncate_file(inode, 1); | 128 | reiserfs_truncate_file(inode, 1); |
@@ -1527,7 +1545,7 @@ const struct file_operations reiserfs_file_operations = { | |||
1527 | #ifdef CONFIG_COMPAT | 1545 | #ifdef CONFIG_COMPAT |
1528 | .compat_ioctl = reiserfs_compat_ioctl, | 1546 | .compat_ioctl = reiserfs_compat_ioctl, |
1529 | #endif | 1547 | #endif |
1530 | .mmap = generic_file_mmap, | 1548 | .mmap = reiserfs_file_mmap, |
1531 | .open = generic_file_open, | 1549 | .open = generic_file_open, |
1532 | .release = reiserfs_file_release, | 1550 | .release = reiserfs_file_release, |
1533 | .fsync = reiserfs_sync_file, | 1551 | .fsync = reiserfs_sync_file, |
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index f3d1c4a77979..9fcbfe316977 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -1125,6 +1125,7 @@ static void init_inode(struct inode *inode, struct treepath *path) | |||
1125 | REISERFS_I(inode)->i_prealloc_count = 0; | 1125 | REISERFS_I(inode)->i_prealloc_count = 0; |
1126 | REISERFS_I(inode)->i_trans_id = 0; | 1126 | REISERFS_I(inode)->i_trans_id = 0; |
1127 | REISERFS_I(inode)->i_jl = NULL; | 1127 | REISERFS_I(inode)->i_jl = NULL; |
1128 | mutex_init(&(REISERFS_I(inode)->i_mmap)); | ||
1128 | reiserfs_init_acl_access(inode); | 1129 | reiserfs_init_acl_access(inode); |
1129 | reiserfs_init_acl_default(inode); | 1130 | reiserfs_init_acl_default(inode); |
1130 | reiserfs_init_xattr_rwsem(inode); | 1131 | reiserfs_init_xattr_rwsem(inode); |
@@ -1832,6 +1833,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
1832 | REISERFS_I(inode)->i_attrs = | 1833 | REISERFS_I(inode)->i_attrs = |
1833 | REISERFS_I(dir)->i_attrs & REISERFS_INHERIT_MASK; | 1834 | REISERFS_I(dir)->i_attrs & REISERFS_INHERIT_MASK; |
1834 | sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode); | 1835 | sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode); |
1836 | mutex_init(&(REISERFS_I(inode)->i_mmap)); | ||
1835 | reiserfs_init_acl_access(inode); | 1837 | reiserfs_init_acl_access(inode); |
1836 | reiserfs_init_acl_default(inode); | 1838 | reiserfs_init_acl_default(inode); |
1837 | reiserfs_init_xattr_rwsem(inode); | 1839 | reiserfs_init_xattr_rwsem(inode); |
diff --git a/include/asm-ia64/checksum.h b/include/asm-ia64/checksum.h index 2b78582cbd61..97af155057e4 100644 --- a/include/asm-ia64/checksum.h +++ b/include/asm-ia64/checksum.h | |||
@@ -72,8 +72,8 @@ static inline __sum16 csum_fold(__wsum csum) | |||
72 | 72 | ||
73 | #define _HAVE_ARCH_IPV6_CSUM 1 | 73 | #define _HAVE_ARCH_IPV6_CSUM 1 |
74 | struct in6_addr; | 74 | struct in6_addr; |
75 | extern unsigned short int csum_ipv6_magic(struct in6_addr *saddr, | 75 | extern __sum16 csum_ipv6_magic(const struct in6_addr *saddr, |
76 | struct in6_addr *daddr, __u32 len, unsigned short proto, | 76 | const struct in6_addr *daddr, __u32 len, unsigned short proto, |
77 | unsigned int csum); | 77 | __wsum csum); |
78 | 78 | ||
79 | #endif /* _ASM_IA64_CHECKSUM_H */ | 79 | #endif /* _ASM_IA64_CHECKSUM_H */ |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 862e483cce8a..8c634f9df39f 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -129,7 +129,6 @@ header-y += posix_types.h | |||
129 | header-y += ppdev.h | 129 | header-y += ppdev.h |
130 | header-y += prctl.h | 130 | header-y += prctl.h |
131 | header-y += ps2esdi.h | 131 | header-y += ps2esdi.h |
132 | header-y += qic117.h | ||
133 | header-y += qnxtypes.h | 132 | header-y += qnxtypes.h |
134 | header-y += quotaio_v1.h | 133 | header-y += quotaio_v1.h |
135 | header-y += quotaio_v2.h | 134 | header-y += quotaio_v2.h |
diff --git a/include/linux/mtio.h b/include/linux/mtio.h index 8c66151821e3..6f8d2d45a8fb 100644 --- a/include/linux/mtio.h +++ b/include/linux/mtio.h | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/ioctl.h> | 12 | #include <linux/ioctl.h> |
13 | #include <linux/qic117.h> | ||
14 | 13 | ||
15 | /* | 14 | /* |
16 | * Structures and definitions for mag tape io control commands | 15 | * Structures and definitions for mag tape io control commands |
@@ -116,32 +115,6 @@ struct mtget { | |||
116 | #define MT_ISFTAPE_UNKNOWN 0x800000 /* obsolete */ | 115 | #define MT_ISFTAPE_UNKNOWN 0x800000 /* obsolete */ |
117 | #define MT_ISFTAPE_FLAG 0x800000 | 116 | #define MT_ISFTAPE_FLAG 0x800000 |
118 | 117 | ||
119 | struct mt_tape_info { | ||
120 | long t_type; /* device type id (mt_type) */ | ||
121 | char *t_name; /* descriptive name */ | ||
122 | }; | ||
123 | |||
124 | #define MT_TAPE_INFO { \ | ||
125 | {MT_ISUNKNOWN, "Unknown type of tape device"}, \ | ||
126 | {MT_ISQIC02, "Generic QIC-02 tape streamer"}, \ | ||
127 | {MT_ISWT5150, "Wangtek 5150, QIC-150"}, \ | ||
128 | {MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, \ | ||
129 | {MT_ISCMSJ500, "CMS Jumbo 500"}, \ | ||
130 | {MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, \ | ||
131 | {MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, \ | ||
132 | {MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, \ | ||
133 | {MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, \ | ||
134 | {MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, \ | ||
135 | {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, \ | ||
136 | {MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, \ | ||
137 | {MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, \ | ||
138 | {MT_ISEVEREX_FT40A, "Everex FT40A, QIC-40"}, \ | ||
139 | {MT_ISONSTREAM_SC, "OnStream SC-, DI-, DP-, or USB tape drive"}, \ | ||
140 | {MT_ISSCSI1, "Generic SCSI-1 tape"}, \ | ||
141 | {MT_ISSCSI2, "Generic SCSI-2 tape"}, \ | ||
142 | {0, NULL} \ | ||
143 | } | ||
144 | |||
145 | 118 | ||
146 | /* structure for MTIOCPOS - mag tape get position command */ | 119 | /* structure for MTIOCPOS - mag tape get position command */ |
147 | 120 | ||
@@ -150,130 +123,11 @@ struct mtpos { | |||
150 | }; | 123 | }; |
151 | 124 | ||
152 | 125 | ||
153 | /* structure for MTIOCVOLINFO, query information about the volume | ||
154 | * currently positioned at (zftape) | ||
155 | */ | ||
156 | struct mtvolinfo { | ||
157 | unsigned int mt_volno; /* vol-number */ | ||
158 | unsigned int mt_blksz; /* blocksize used when recording */ | ||
159 | unsigned int mt_rawsize; /* raw tape space consumed, in kb */ | ||
160 | unsigned int mt_size; /* volume size after decompression, in kb */ | ||
161 | unsigned int mt_cmpr:1; /* this volume has been compressed */ | ||
162 | }; | ||
163 | |||
164 | /* raw access to a floppy drive, read and write an arbitrary segment. | ||
165 | * For ftape/zftape to support formatting etc. | ||
166 | */ | ||
167 | #define MT_FT_RD_SINGLE 0 | ||
168 | #define MT_FT_RD_AHEAD 1 | ||
169 | #define MT_FT_WR_ASYNC 0 /* start tape only when all buffers are full */ | ||
170 | #define MT_FT_WR_MULTI 1 /* start tape, continue until buffers are empty */ | ||
171 | #define MT_FT_WR_SINGLE 2 /* write a single segment and stop afterwards */ | ||
172 | #define MT_FT_WR_DELETE 3 /* write deleted data marks, one segment at time */ | ||
173 | |||
174 | struct mtftseg | ||
175 | { | ||
176 | unsigned mt_segno; /* the segment to read or write */ | ||
177 | unsigned mt_mode; /* modes for read/write (sync/async etc.) */ | ||
178 | int mt_result; /* result of r/w request, not of the ioctl */ | ||
179 | void __user *mt_data; /* User space buffer: must be 29kb */ | ||
180 | }; | ||
181 | |||
182 | /* get tape capacity (ftape/zftape) | ||
183 | */ | ||
184 | struct mttapesize { | ||
185 | unsigned long mt_capacity; /* entire, uncompressed capacity | ||
186 | * of a cartridge | ||
187 | */ | ||
188 | unsigned long mt_used; /* what has been used so far, raw | ||
189 | * uncompressed amount | ||
190 | */ | ||
191 | }; | ||
192 | |||
193 | /* possible values of the ftfmt_op field | ||
194 | */ | ||
195 | #define FTFMT_SET_PARMS 1 /* set software parms */ | ||
196 | #define FTFMT_GET_PARMS 2 /* get software parms */ | ||
197 | #define FTFMT_FORMAT_TRACK 3 /* start formatting a tape track */ | ||
198 | #define FTFMT_STATUS 4 /* monitor formatting a tape track */ | ||
199 | #define FTFMT_VERIFY 5 /* verify the given segment */ | ||
200 | |||
201 | struct ftfmtparms { | ||
202 | unsigned char ft_qicstd; /* QIC-40/QIC-80/QIC-3010/QIC-3020 */ | ||
203 | unsigned char ft_fmtcode; /* Refer to the QIC specs */ | ||
204 | unsigned char ft_fhm; /* floppy head max */ | ||
205 | unsigned char ft_ftm; /* floppy track max */ | ||
206 | unsigned short ft_spt; /* segments per track */ | ||
207 | unsigned short ft_tpc; /* tracks per cartridge */ | ||
208 | }; | ||
209 | |||
210 | struct ftfmttrack { | ||
211 | unsigned int ft_track; /* track to format */ | ||
212 | unsigned char ft_gap3; /* size of gap3, for FORMAT_TRK */ | ||
213 | }; | ||
214 | |||
215 | struct ftfmtstatus { | ||
216 | unsigned int ft_segment; /* segment currently being formatted */ | ||
217 | }; | ||
218 | |||
219 | struct ftfmtverify { | ||
220 | unsigned int ft_segment; /* segment to verify */ | ||
221 | unsigned long ft_bsm; /* bsm as result of VERIFY cmd */ | ||
222 | }; | ||
223 | |||
224 | struct mtftformat { | ||
225 | unsigned int fmt_op; /* operation to perform */ | ||
226 | union fmt_arg { | ||
227 | struct ftfmtparms fmt_parms; /* format parameters */ | ||
228 | struct ftfmttrack fmt_track; /* ctrl while formatting */ | ||
229 | struct ftfmtstatus fmt_status; | ||
230 | struct ftfmtverify fmt_verify; /* for verifying */ | ||
231 | } fmt_arg; | ||
232 | }; | ||
233 | |||
234 | struct mtftcmd { | ||
235 | unsigned int ft_wait_before; /* timeout to wait for drive to get ready | ||
236 | * before command is sent. Milliseconds | ||
237 | */ | ||
238 | qic117_cmd_t ft_cmd; /* command to send */ | ||
239 | unsigned char ft_parm_cnt; /* zero: no parm is sent. */ | ||
240 | unsigned char ft_parms[3]; /* parameter(s) to send to | ||
241 | * the drive. The parms are nibbles | ||
242 | * driver sends cmd + 2 step pulses */ | ||
243 | unsigned int ft_result_bits; /* if non zero, number of bits | ||
244 | * returned by the tape drive | ||
245 | */ | ||
246 | unsigned int ft_result; /* the result returned by the tape drive*/ | ||
247 | unsigned int ft_wait_after; /* timeout to wait for drive to get ready | ||
248 | * after command is sent. 0: don't wait */ | ||
249 | int ft_status; /* status returned by ready wait | ||
250 | * undefined if timeout was 0. | ||
251 | */ | ||
252 | int ft_error; /* error code if error status was set by | ||
253 | * command | ||
254 | */ | ||
255 | }; | ||
256 | |||
257 | /* mag tape io control commands */ | 126 | /* mag tape io control commands */ |
258 | #define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */ | 127 | #define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */ |
259 | #define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */ | 128 | #define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */ |
260 | #define MTIOCPOS _IOR('m', 3, struct mtpos) /* get tape position */ | 129 | #define MTIOCPOS _IOR('m', 3, struct mtpos) /* get tape position */ |
261 | 130 | ||
262 | /* The next two are used by the QIC-02 driver for runtime reconfiguration. | ||
263 | * See tpqic02.h for struct mtconfiginfo. | ||
264 | */ | ||
265 | #define MTIOCGETCONFIG _IOR('m', 4, struct mtconfiginfo) /* get tape config */ | ||
266 | #define MTIOCSETCONFIG _IOW('m', 5, struct mtconfiginfo) /* set tape config */ | ||
267 | |||
268 | /* the next six are used by the floppy ftape drivers and its frontends | ||
269 | * sorry, but MTIOCTOP commands are write only. | ||
270 | */ | ||
271 | #define MTIOCRDFTSEG _IOWR('m', 6, struct mtftseg) /* read a segment */ | ||
272 | #define MTIOCWRFTSEG _IOWR('m', 7, struct mtftseg) /* write a segment */ | ||
273 | #define MTIOCVOLINFO _IOR('m', 8, struct mtvolinfo) /* info about volume */ | ||
274 | #define MTIOCGETSIZE _IOR('m', 9, struct mttapesize)/* get cartridge size*/ | ||
275 | #define MTIOCFTFORMAT _IOWR('m', 10, struct mtftformat) /* format ftape */ | ||
276 | #define MTIOCFTCMD _IOWR('m', 11, struct mtftcmd) /* send QIC-117 cmd */ | ||
277 | 131 | ||
278 | /* Generic Mag Tape (device independent) status macros for examining | 132 | /* Generic Mag Tape (device independent) status macros for examining |
279 | * mt_gstat -- HP-UX compatible. | 133 | * mt_gstat -- HP-UX compatible. |
diff --git a/include/linux/qic117.h b/include/linux/qic117.h deleted file mode 100644 index 07b537e5d359..000000000000 --- a/include/linux/qic117.h +++ /dev/null | |||
@@ -1,290 +0,0 @@ | |||
1 | #ifndef _QIC117_H | ||
2 | #define _QIC117_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 1993-1996 Bas Laarhoven, | ||
6 | * (C) 1997 Claus-Justus Heine. | ||
7 | |||
8 | This program is free software; you can redistribute it and/or modify | ||
9 | it under the terms of the GNU General Public License as published by | ||
10 | the Free Software Foundation; either version 2, or (at your option) | ||
11 | any later version. | ||
12 | |||
13 | This program is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | GNU General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program; see the file COPYING. If not, write to | ||
20 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | |||
22 | * | ||
23 | * $Source: /homes/cvs/ftape-stacked/include/linux/qic117.h,v $ | ||
24 | * $Revision: 1.2 $ | ||
25 | * $Date: 1997/10/05 19:19:32 $ | ||
26 | * | ||
27 | * This file contains QIC-117 spec. related definitions for the | ||
28 | * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux. | ||
29 | * | ||
30 | * These data were taken from the Quarter-Inch Cartridge | ||
31 | * Drive Standards, Inc. document titled: | ||
32 | * `Common Command Set Interface Specification for Flexible | ||
33 | * Disk Controller Based Minicartridge Tape Drives' | ||
34 | * document QIC-117 Revision J, 28 Aug 96. | ||
35 | * For more information, contact: | ||
36 | * Quarter-Inch Cartridge Drive Standards, Inc. | ||
37 | * 311 East Carrillo Street | ||
38 | * Santa Barbara, California 93101 | ||
39 | * Telephone (805) 963-3853 | ||
40 | * Fax (805) 962-1541 | ||
41 | * WWW http://www.qic.org | ||
42 | * | ||
43 | * Current QIC standard revisions (of interest) are: | ||
44 | * QIC-40-MC, Rev. M, 2 Sep 92. | ||
45 | * QIC-80-MC, Rev. N, 20 Mar 96. | ||
46 | * QIC-80-MC, Rev. K, 15 Dec 94. | ||
47 | * QIC-113, Rev. G, 15 Jun 95. | ||
48 | * QIC-117, Rev. J, 28 Aug 96. | ||
49 | * QIC-122, Rev. B, 6 Mar 91. | ||
50 | * QIC-130, Rev. C, 2 Sep 92. | ||
51 | * QIC-3010-MC, Rev. F, 14 Jun 95. | ||
52 | * QIC-3020-MC, Rev. G, 31 Aug 95. | ||
53 | * QIC-CRF3, Rev. B, 15 Jun 95. | ||
54 | * */ | ||
55 | |||
56 | /* | ||
57 | * QIC-117 common command set rev. J. | ||
58 | * These commands are sent to the tape unit | ||
59 | * as number of pulses over the step line. | ||
60 | */ | ||
61 | |||
62 | typedef enum { | ||
63 | QIC_NO_COMMAND = 0, | ||
64 | QIC_RESET = 1, | ||
65 | QIC_REPORT_NEXT_BIT = 2, | ||
66 | QIC_PAUSE = 3, | ||
67 | QIC_MICRO_STEP_PAUSE = 4, | ||
68 | QIC_ALTERNATE_TIMEOUT = 5, | ||
69 | QIC_REPORT_DRIVE_STATUS = 6, | ||
70 | QIC_REPORT_ERROR_CODE = 7, | ||
71 | QIC_REPORT_DRIVE_CONFIGURATION = 8, | ||
72 | QIC_REPORT_ROM_VERSION = 9, | ||
73 | QIC_LOGICAL_FORWARD = 10, | ||
74 | QIC_PHYSICAL_REVERSE = 11, | ||
75 | QIC_PHYSICAL_FORWARD = 12, | ||
76 | QIC_SEEK_HEAD_TO_TRACK = 13, | ||
77 | QIC_SEEK_LOAD_POINT = 14, | ||
78 | QIC_ENTER_FORMAT_MODE = 15, | ||
79 | QIC_WRITE_REFERENCE_BURST = 16, | ||
80 | QIC_ENTER_VERIFY_MODE = 17, | ||
81 | QIC_STOP_TAPE = 18, | ||
82 | /* commands 19-20: reserved */ | ||
83 | QIC_MICRO_STEP_HEAD_UP = 21, | ||
84 | QIC_MICRO_STEP_HEAD_DOWN = 22, | ||
85 | QIC_SOFT_SELECT = 23, | ||
86 | QIC_SOFT_DESELECT = 24, | ||
87 | QIC_SKIP_REVERSE = 25, | ||
88 | QIC_SKIP_FORWARD = 26, | ||
89 | QIC_SELECT_RATE = 27, | ||
90 | /* command 27, in ccs2: Select Rate or Format */ | ||
91 | QIC_ENTER_DIAGNOSTIC_1 = 28, | ||
92 | QIC_ENTER_DIAGNOSTIC_2 = 29, | ||
93 | QIC_ENTER_PRIMARY_MODE = 30, | ||
94 | /* command 31: vendor unique */ | ||
95 | QIC_REPORT_VENDOR_ID = 32, | ||
96 | QIC_REPORT_TAPE_STATUS = 33, | ||
97 | QIC_SKIP_EXTENDED_REVERSE = 34, | ||
98 | QIC_SKIP_EXTENDED_FORWARD = 35, | ||
99 | QIC_CALIBRATE_TAPE_LENGTH = 36, | ||
100 | QIC_REPORT_FORMAT_SEGMENTS = 37, | ||
101 | QIC_SET_FORMAT_SEGMENTS = 38, | ||
102 | /* commands 39-45: reserved */ | ||
103 | QIC_PHANTOM_SELECT = 46, | ||
104 | QIC_PHANTOM_DESELECT = 47 | ||
105 | } qic117_cmd_t; | ||
106 | |||
107 | typedef enum { | ||
108 | discretional = 0, required, ccs1, ccs2 | ||
109 | } qic_compatibility; | ||
110 | |||
111 | typedef enum { | ||
112 | unused, mode, motion, report | ||
113 | } command_types; | ||
114 | |||
115 | struct qic117_command_table { | ||
116 | char *name; | ||
117 | __u8 mask; | ||
118 | __u8 state; | ||
119 | __u8 cmd_type; | ||
120 | __u8 non_intr; | ||
121 | __u8 level; | ||
122 | }; | ||
123 | |||
124 | #define QIC117_COMMANDS {\ | ||
125 | /* command mask state cmd_type */\ | ||
126 | /* | name | | | non_intr */\ | ||
127 | /* | | | | | | level */\ | ||
128 | /* 0*/ {NULL, 0x00, 0x00, mode, 0, discretional},\ | ||
129 | /* 1*/ {"soft reset", 0x00, 0x00, motion, 1, required},\ | ||
130 | /* 2*/ {"report next bit", 0x00, 0x00, report, 0, required},\ | ||
131 | /* 3*/ {"pause", 0x36, 0x24, motion, 1, required},\ | ||
132 | /* 4*/ {"micro step pause", 0x36, 0x24, motion, 1, required},\ | ||
133 | /* 5*/ {"alternate command timeout", 0x00, 0x00, mode, 0, required},\ | ||
134 | /* 6*/ {"report drive status", 0x00, 0x00, report, 0, required},\ | ||
135 | /* 7*/ {"report error code", 0x01, 0x01, report, 0, required},\ | ||
136 | /* 8*/ {"report drive configuration",0x00, 0x00, report, 0, required},\ | ||
137 | /* 9*/ {"report rom version", 0x00, 0x00, report, 0, required},\ | ||
138 | /*10*/ {"logical forward", 0x37, 0x25, motion, 0, required},\ | ||
139 | /*11*/ {"physical reverse", 0x17, 0x05, motion, 0, required},\ | ||
140 | /*12*/ {"physical forward", 0x17, 0x05, motion, 0, required},\ | ||
141 | /*13*/ {"seek head to track", 0x37, 0x25, motion, 0, required},\ | ||
142 | /*14*/ {"seek load point", 0x17, 0x05, motion, 1, required},\ | ||
143 | /*15*/ {"enter format mode", 0x1f, 0x05, mode, 0, required},\ | ||
144 | /*16*/ {"write reference burst", 0x1f, 0x05, motion, 1, required},\ | ||
145 | /*17*/ {"enter verify mode", 0x37, 0x25, mode, 0, required},\ | ||
146 | /*18*/ {"stop tape", 0x00, 0x00, motion, 1, required},\ | ||
147 | /*19*/ {"reserved (19)", 0x00, 0x00, unused, 0, discretional},\ | ||
148 | /*20*/ {"reserved (20)", 0x00, 0x00, unused, 0, discretional},\ | ||
149 | /*21*/ {"micro step head up", 0x02, 0x00, motion, 0, required},\ | ||
150 | /*22*/ {"micro step head down", 0x02, 0x00, motion, 0, required},\ | ||
151 | /*23*/ {"soft select", 0x00, 0x00, mode, 0, discretional},\ | ||
152 | /*24*/ {"soft deselect", 0x00, 0x00, mode, 0, discretional},\ | ||
153 | /*25*/ {"skip segments reverse", 0x36, 0x24, motion, 1, required},\ | ||
154 | /*26*/ {"skip segments forward", 0x36, 0x24, motion, 1, required},\ | ||
155 | /*27*/ {"select rate or format", 0x03, 0x01, mode, 0, required /* [ccs2] */},\ | ||
156 | /*28*/ {"enter diag mode 1", 0x00, 0x00, mode, 0, discretional},\ | ||
157 | /*29*/ {"enter diag mode 2", 0x00, 0x00, mode, 0, discretional},\ | ||
158 | /*30*/ {"enter primary mode", 0x00, 0x00, mode, 0, required},\ | ||
159 | /*31*/ {"vendor unique (31)", 0x00, 0x00, unused, 0, discretional},\ | ||
160 | /*32*/ {"report vendor id", 0x00, 0x00, report, 0, required},\ | ||
161 | /*33*/ {"report tape status", 0x04, 0x04, report, 0, ccs1},\ | ||
162 | /*34*/ {"skip extended reverse", 0x36, 0x24, motion, 1, ccs1},\ | ||
163 | /*35*/ {"skip extended forward", 0x36, 0x24, motion, 1, ccs1},\ | ||
164 | /*36*/ {"calibrate tape length", 0x17, 0x05, motion, 1, ccs2},\ | ||
165 | /*37*/ {"report format segments", 0x17, 0x05, report, 0, ccs2},\ | ||
166 | /*38*/ {"set format segments", 0x17, 0x05, mode, 0, ccs2},\ | ||
167 | /*39*/ {"reserved (39)", 0x00, 0x00, unused, 0, discretional},\ | ||
168 | /*40*/ {"vendor unique (40)", 0x00, 0x00, unused, 0, discretional},\ | ||
169 | /*41*/ {"vendor unique (41)", 0x00, 0x00, unused, 0, discretional},\ | ||
170 | /*42*/ {"vendor unique (42)", 0x00, 0x00, unused, 0, discretional},\ | ||
171 | /*43*/ {"vendor unique (43)", 0x00, 0x00, unused, 0, discretional},\ | ||
172 | /*44*/ {"vendor unique (44)", 0x00, 0x00, unused, 0, discretional},\ | ||
173 | /*45*/ {"vendor unique (45)", 0x00, 0x00, unused, 0, discretional},\ | ||
174 | /*46*/ {"phantom select", 0x00, 0x00, mode, 0, discretional},\ | ||
175 | /*47*/ {"phantom deselect", 0x00, 0x00, mode, 0, discretional},\ | ||
176 | } | ||
177 | |||
178 | /* | ||
179 | * Status bits returned by QIC_REPORT_DRIVE_STATUS | ||
180 | */ | ||
181 | |||
182 | #define QIC_STATUS_READY 0x01 /* Drive is ready or idle. */ | ||
183 | #define QIC_STATUS_ERROR 0x02 /* Error detected, must read | ||
184 | error code to clear this */ | ||
185 | #define QIC_STATUS_CARTRIDGE_PRESENT 0x04 /* Tape is present */ | ||
186 | #define QIC_STATUS_WRITE_PROTECT 0x08 /* Tape is write protected */ | ||
187 | #define QIC_STATUS_NEW_CARTRIDGE 0x10 /* New cartridge inserted, must | ||
188 | read error status to clear. */ | ||
189 | #define QIC_STATUS_REFERENCED 0x20 /* Cartridge appears to have been | ||
190 | formatted. */ | ||
191 | #define QIC_STATUS_AT_BOT 0x40 /* Cartridge is at physical | ||
192 | beginning of tape. */ | ||
193 | #define QIC_STATUS_AT_EOT 0x80 /* Cartridge is at physical end | ||
194 | of tape. */ | ||
195 | /* | ||
196 | * Status bits returned by QIC_REPORT_DRIVE_CONFIGURATION | ||
197 | */ | ||
198 | |||
199 | #define QIC_CONFIG_RATE_MASK 0x18 | ||
200 | #define QIC_CONFIG_RATE_SHIFT 3 | ||
201 | #define QIC_CONFIG_RATE_250 0 | ||
202 | #define QIC_CONFIG_RATE_500 2 | ||
203 | #define QIC_CONFIG_RATE_1000 3 | ||
204 | #define QIC_CONFIG_RATE_2000 1 | ||
205 | #define QIC_CONFIG_RATE_4000 0 /* since QIC-117 Rev. J */ | ||
206 | |||
207 | #define QIC_CONFIG_LONG 0x40 /* Extra Length Tape Detected */ | ||
208 | #define QIC_CONFIG_80 0x80 /* QIC-80 detected. */ | ||
209 | |||
210 | /* | ||
211 | * Status bits returned by QIC_REPORT_TAPE_STATUS | ||
212 | */ | ||
213 | |||
214 | #define QIC_TAPE_STD_MASK 0x0f | ||
215 | #define QIC_TAPE_QIC40 0x01 | ||
216 | #define QIC_TAPE_QIC80 0x02 | ||
217 | #define QIC_TAPE_QIC3020 0x03 | ||
218 | #define QIC_TAPE_QIC3010 0x04 | ||
219 | |||
220 | #define QIC_TAPE_LEN_MASK 0x70 | ||
221 | #define QIC_TAPE_205FT 0x10 | ||
222 | #define QIC_TAPE_307FT 0x20 | ||
223 | #define QIC_TAPE_VARIABLE 0x30 | ||
224 | #define QIC_TAPE_1100FT 0x40 | ||
225 | #define QIC_TAPE_FLEX 0x60 | ||
226 | |||
227 | #define QIC_TAPE_WIDE 0x80 | ||
228 | |||
229 | /* Define a value (in feet) slightly higher than | ||
230 | * the possible maximum tape length. | ||
231 | */ | ||
232 | #define QIC_TOP_TAPE_LEN 1500 | ||
233 | |||
234 | /* | ||
235 | * Errors: List of error codes, and their severity. | ||
236 | */ | ||
237 | |||
238 | typedef struct { | ||
239 | char *message; /* Text describing the error. */ | ||
240 | unsigned int fatal:1; /* Non-zero if the error is fatal. */ | ||
241 | } ftape_error; | ||
242 | |||
243 | #define QIC117_ERRORS {\ | ||
244 | /* 0*/ { "No error", 0, },\ | ||
245 | /* 1*/ { "Command Received while Drive Not Ready", 0, },\ | ||
246 | /* 2*/ { "Cartridge Not Present or Removed", 1, },\ | ||
247 | /* 3*/ { "Motor Speed Error (not within 1%)", 1, },\ | ||
248 | /* 4*/ { "Motor Speed Fault (jammed, or gross speed error", 1, },\ | ||
249 | /* 5*/ { "Cartridge Write Protected", 1, },\ | ||
250 | /* 6*/ { "Undefined or Reserved Command Code", 1, },\ | ||
251 | /* 7*/ { "Illegal Track Address Specified for Seek", 1, },\ | ||
252 | /* 8*/ { "Illegal Command in Report Subcontext", 0, },\ | ||
253 | /* 9*/ { "Illegal Entry into a Diagnostic Mode", 1, },\ | ||
254 | /*10*/ { "Broken Tape Detected (based on hole sensor)", 1, },\ | ||
255 | /*11*/ { "Warning--Read Gain Setting Error", 1, },\ | ||
256 | /*12*/ { "Command Received While Error Status Pending (obs)", 1, },\ | ||
257 | /*13*/ { "Command Received While New Cartridge Pending", 1, },\ | ||
258 | /*14*/ { "Command Illegal or Undefined in Primary Mode", 1, },\ | ||
259 | /*15*/ { "Command Illegal or Undefined in Format Mode", 1, },\ | ||
260 | /*16*/ { "Command Illegal or Undefined in Verify Mode", 1, },\ | ||
261 | /*17*/ { "Logical Forward Not at Logical BOT or no Format Segments in Format Mode", 1, },\ | ||
262 | /*18*/ { "Logical EOT Before All Segments generated", 1, },\ | ||
263 | /*19*/ { "Command Illegal When Cartridge Not Referenced", 1, },\ | ||
264 | /*20*/ { "Self-Diagnostic Failed (cannot be cleared)", 1, },\ | ||
265 | /*21*/ { "Warning EEPROM Not Initialized, Defaults Set", 1, },\ | ||
266 | /*22*/ { "EEPROM Corrupted or Hardware Failure", 1, },\ | ||
267 | /*23*/ { "Motion Time-out Error", 1, },\ | ||
268 | /*24*/ { "Data Segment Too Long -- Logical Forward or Pause", 1, },\ | ||
269 | /*25*/ { "Transmit Overrun (obs)", 1, },\ | ||
270 | /*26*/ { "Power On Reset Occurred", 0, },\ | ||
271 | /*27*/ { "Software Reset Occurred", 0, },\ | ||
272 | /*28*/ { "Diagnostic Mode 1 Error", 1, },\ | ||
273 | /*29*/ { "Diagnostic Mode 2 Error", 1, },\ | ||
274 | /*30*/ { "Command Received During Non-Interruptible Process", 1, },\ | ||
275 | /*31*/ { "Rate or Format Selection Error", 1, },\ | ||
276 | /*32*/ { "Illegal Command While in High Speed Mode", 1, },\ | ||
277 | /*33*/ { "Illegal Seek Segment Value", 1, },\ | ||
278 | /*34*/ { "Invalid Media", 1, },\ | ||
279 | /*35*/ { "Head Positioning Failure", 1, },\ | ||
280 | /*36*/ { "Write Reference Burst Failure", 1, },\ | ||
281 | /*37*/ { "Prom Code Missing", 1, },\ | ||
282 | /*38*/ { "Invalid Format", 1, },\ | ||
283 | /*39*/ { "EOT/BOT System Failure", 1, },\ | ||
284 | /*40*/ { "Prom A Checksum Error", 1, },\ | ||
285 | /*41*/ { "Drive Wakeup Reset Occurred", 1, },\ | ||
286 | /*42*/ { "Prom B Checksum Error", 1, },\ | ||
287 | /*43*/ { "Illegal Entry into Format Mode", 1, },\ | ||
288 | } | ||
289 | |||
290 | #endif /* _QIC117_H */ | ||
diff --git a/include/linux/reiserfs_fs_i.h b/include/linux/reiserfs_fs_i.h index 5b3b297aa2c5..ce3663fb0101 100644 --- a/include/linux/reiserfs_fs_i.h +++ b/include/linux/reiserfs_fs_i.h | |||
@@ -25,6 +25,7 @@ typedef enum { | |||
25 | i_link_saved_truncate_mask = 0x0020, | 25 | i_link_saved_truncate_mask = 0x0020, |
26 | i_has_xattr_dir = 0x0040, | 26 | i_has_xattr_dir = 0x0040, |
27 | i_data_log = 0x0080, | 27 | i_data_log = 0x0080, |
28 | i_ever_mapped = 0x0100 | ||
28 | } reiserfs_inode_flags; | 29 | } reiserfs_inode_flags; |
29 | 30 | ||
30 | struct reiserfs_inode_info { | 31 | struct reiserfs_inode_info { |
@@ -52,6 +53,7 @@ struct reiserfs_inode_info { | |||
52 | ** flushed */ | 53 | ** flushed */ |
53 | unsigned long i_trans_id; | 54 | unsigned long i_trans_id; |
54 | struct reiserfs_journal_list *i_jl; | 55 | struct reiserfs_journal_list *i_jl; |
56 | struct mutex i_mmap; | ||
55 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL | 57 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL |
56 | struct posix_acl *i_acl_access; | 58 | struct posix_acl *i_acl_access; |
57 | struct posix_acl *i_acl_default; | 59 | struct posix_acl *i_acl_default; |
@@ -279,7 +279,7 @@ static int newseg (struct ipc_namespace *ns, key_t key, int shmflg, size_t size) | |||
279 | if (size < SHMMIN || size > ns->shm_ctlmax) | 279 | if (size < SHMMIN || size > ns->shm_ctlmax) |
280 | return -EINVAL; | 280 | return -EINVAL; |
281 | 281 | ||
282 | if (ns->shm_tot + numpages >= ns->shm_ctlall) | 282 | if (ns->shm_tot + numpages > ns->shm_ctlall) |
283 | return -ENOSPC; | 283 | return -ENOSPC; |
284 | 284 | ||
285 | shp = ipc_rcu_alloc(sizeof(*shp)); | 285 | shp = ipc_rcu_alloc(sizeof(*shp)); |
diff --git a/kernel/profile.c b/kernel/profile.c index a6574a18514e..d6579d511069 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
@@ -331,7 +331,6 @@ out: | |||
331 | local_irq_restore(flags); | 331 | local_irq_restore(flags); |
332 | put_cpu(); | 332 | put_cpu(); |
333 | } | 333 | } |
334 | EXPORT_SYMBOL_GPL(profile_hits); | ||
335 | 334 | ||
336 | static int __devinit profile_cpu_callback(struct notifier_block *info, | 335 | static int __devinit profile_cpu_callback(struct notifier_block *info, |
337 | unsigned long action, void *__cpu) | 336 | unsigned long action, void *__cpu) |
@@ -401,6 +400,8 @@ void profile_hits(int type, void *__pc, unsigned int nr_hits) | |||
401 | } | 400 | } |
402 | #endif /* !CONFIG_SMP */ | 401 | #endif /* !CONFIG_SMP */ |
403 | 402 | ||
403 | EXPORT_SYMBOL_GPL(profile_hits); | ||
404 | |||
404 | void profile_tick(int type) | 405 | void profile_tick(int type) |
405 | { | 406 | { |
406 | struct pt_regs *regs = get_irq_regs(); | 407 | struct pt_regs *regs = get_irq_regs(); |
diff --git a/kernel/sys.c b/kernel/sys.c index c7675c1bfdf2..6e2101dec0fc 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -323,11 +323,18 @@ EXPORT_SYMBOL_GPL(blocking_notifier_chain_unregister); | |||
323 | int blocking_notifier_call_chain(struct blocking_notifier_head *nh, | 323 | int blocking_notifier_call_chain(struct blocking_notifier_head *nh, |
324 | unsigned long val, void *v) | 324 | unsigned long val, void *v) |
325 | { | 325 | { |
326 | int ret; | 326 | int ret = NOTIFY_DONE; |
327 | 327 | ||
328 | down_read(&nh->rwsem); | 328 | /* |
329 | ret = notifier_call_chain(&nh->head, val, v); | 329 | * We check the head outside the lock, but if this access is |
330 | up_read(&nh->rwsem); | 330 | * racy then it does not matter what the result of the test |
331 | * is, we re-check the list after having taken the lock anyway: | ||
332 | */ | ||
333 | if (rcu_dereference(nh->head)) { | ||
334 | down_read(&nh->rwsem); | ||
335 | ret = notifier_call_chain(&nh->head, val, v); | ||
336 | up_read(&nh->rwsem); | ||
337 | } | ||
331 | return ret; | 338 | return ret; |
332 | } | 339 | } |
333 | 340 | ||
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index da9463946556..c2aec0e1090d 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -884,6 +884,10 @@ asmlinkage long sys_mbind(unsigned long start, unsigned long len, | |||
884 | err = get_nodes(&nodes, nmask, maxnode); | 884 | err = get_nodes(&nodes, nmask, maxnode); |
885 | if (err) | 885 | if (err) |
886 | return err; | 886 | return err; |
887 | #ifdef CONFIG_CPUSETS | ||
888 | /* Restrict the nodes to the allowed nodes in the cpuset */ | ||
889 | nodes_and(nodes, nodes, current->mems_allowed); | ||
890 | #endif | ||
887 | return do_mbind(start, len, mode, &nodes, flags); | 891 | return do_mbind(start, len, mode, &nodes, flags); |
888 | } | 892 | } |
889 | 893 | ||
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index 367f8a32a665..0a352e46862f 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c | |||
@@ -322,7 +322,7 @@ static void i_usX2Y_urb_complete(struct urb *urb) | |||
322 | usX2Y_error_urb_status(usX2Y, subs, urb); | 322 | usX2Y_error_urb_status(usX2Y, subs, urb); |
323 | return; | 323 | return; |
324 | } | 324 | } |
325 | if (likely(urb->start_frame == usX2Y->wait_iso_frame)) | 325 | if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF))) |
326 | subs->completed_urb = urb; | 326 | subs->completed_urb = urb; |
327 | else { | 327 | else { |
328 | usX2Y_error_sequence(usX2Y, subs, urb); | 328 | usX2Y_error_sequence(usX2Y, subs, urb); |
diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c index 8f3e35e24e72..a5e7bcd7ca2e 100644 --- a/sound/usb/usx2y/usx2yhwdeppcm.c +++ b/sound/usb/usx2y/usx2yhwdeppcm.c | |||
@@ -243,7 +243,7 @@ static void i_usX2Y_usbpcm_urb_complete(struct urb *urb) | |||
243 | usX2Y_error_urb_status(usX2Y, subs, urb); | 243 | usX2Y_error_urb_status(usX2Y, subs, urb); |
244 | return; | 244 | return; |
245 | } | 245 | } |
246 | if (likely(urb->start_frame == usX2Y->wait_iso_frame)) | 246 | if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF))) |
247 | subs->completed_urb = urb; | 247 | subs->completed_urb = urb; |
248 | else { | 248 | else { |
249 | usX2Y_error_sequence(usX2Y, subs, urb); | 249 | usX2Y_error_sequence(usX2Y, subs, urb); |