diff options
| -rw-r--r-- | arch/sparc64/Makefile | 5 | ||||
| -rw-r--r-- | drivers/acpi/processor_idle.c | 20 | ||||
| -rw-r--r-- | drivers/media/video/saa7134/saa7134-alsa.c | 3 | ||||
| -rw-r--r-- | drivers/media/video/saa7134/saa7134-oss.c | 3 | ||||
| -rw-r--r-- | drivers/scsi/scsi_scan.c | 48 | ||||
| -rw-r--r-- | drivers/scsi/scsi_transport_fc.c | 59 | ||||
| -rw-r--r-- | drivers/usb/core/usb.c | 9 | ||||
| -rw-r--r-- | drivers/usb/storage/scsiglue.c | 4 | ||||
| -rw-r--r-- | fs/relayfs/relay.c | 8 | ||||
| -rw-r--r-- | include/linux/irq.h | 2 | ||||
| -rw-r--r-- | include/linux/relayfs_fs.h | 5 | ||||
| -rw-r--r-- | include/scsi/scsi_transport_fc.h | 11 | ||||
| -rw-r--r-- | init/Kconfig | 1 | ||||
| -rw-r--r-- | net/8021q/vlan.c | 6 | ||||
| -rw-r--r-- | net/dccp/ipv4.c | 2 | ||||
| -rw-r--r-- | net/ipv6/addrconf.c | 5 | ||||
| -rw-r--r-- | net/netrom/nr_in.c | 6 | ||||
| -rw-r--r-- | net/xfrm/xfrm_policy.c | 30 |
18 files changed, 182 insertions, 45 deletions
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile index 43fe382da078..cad10c5b83d3 100644 --- a/arch/sparc64/Makefile +++ b/arch/sparc64/Makefile | |||
| @@ -17,7 +17,6 @@ CC := $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then | |||
| 17 | NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow) | 17 | NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow) |
| 18 | NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi) | 18 | NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi) |
| 19 | UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; ) | 19 | UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; ) |
| 20 | INLINE_LIMIT := $(call cc-option-yn, -m64 -finline-limit=100000) | ||
| 21 | 20 | ||
| 22 | export NEW_GCC | 21 | export NEW_GCC |
| 23 | 22 | ||
| @@ -49,10 +48,6 @@ else | |||
| 49 | AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) | 48 | AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) |
| 50 | endif | 49 | endif |
| 51 | 50 | ||
| 52 | ifeq ($(INLINE_LIMIT),y) | ||
| 53 | CFLAGS := $(CFLAGS) -finline-limit=100000 | ||
| 54 | endif | ||
| 55 | |||
| 56 | ifeq ($(CONFIG_MCOUNT),y) | 51 | ifeq ($(CONFIG_MCOUNT),y) |
| 57 | CFLAGS := $(CFLAGS) -pg | 52 | CFLAGS := $(CFLAGS) -pg |
| 58 | endif | 53 | endif |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 5f51057518b0..807b0df308f1 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
| @@ -274,8 +274,6 @@ static void acpi_processor_idle(void) | |||
| 274 | } | 274 | } |
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | cx->usage++; | ||
| 278 | |||
| 279 | #ifdef CONFIG_HOTPLUG_CPU | 277 | #ifdef CONFIG_HOTPLUG_CPU |
| 280 | /* | 278 | /* |
| 281 | * Check for P_LVL2_UP flag before entering C2 and above on | 279 | * Check for P_LVL2_UP flag before entering C2 and above on |
| @@ -283,9 +281,12 @@ static void acpi_processor_idle(void) | |||
| 283 | * detection phase, to work cleanly with logical CPU hotplug. | 281 | * detection phase, to work cleanly with logical CPU hotplug. |
| 284 | */ | 282 | */ |
| 285 | if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && | 283 | if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && |
| 286 | !pr->flags.has_cst && acpi_fadt.plvl2_up) | 284 | !pr->flags.has_cst && !acpi_fadt.plvl2_up) |
| 287 | cx->type = ACPI_STATE_C1; | 285 | cx = &pr->power.states[ACPI_STATE_C1]; |
| 288 | #endif | 286 | #endif |
| 287 | |||
| 288 | cx->usage++; | ||
| 289 | |||
| 289 | /* | 290 | /* |
| 290 | * Sleep: | 291 | * Sleep: |
| 291 | * ------ | 292 | * ------ |
| @@ -386,6 +387,15 @@ static void acpi_processor_idle(void) | |||
| 386 | 387 | ||
| 387 | next_state = pr->power.state; | 388 | next_state = pr->power.state; |
| 388 | 389 | ||
| 390 | #ifdef CONFIG_HOTPLUG_CPU | ||
| 391 | /* Don't do promotion/demotion */ | ||
| 392 | if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) && | ||
| 393 | !pr->flags.has_cst && !acpi_fadt.plvl2_up) { | ||
| 394 | next_state = cx; | ||
| 395 | goto end; | ||
| 396 | } | ||
| 397 | #endif | ||
| 398 | |||
| 389 | /* | 399 | /* |
| 390 | * Promotion? | 400 | * Promotion? |
| 391 | * ---------- | 401 | * ---------- |
| @@ -557,7 +567,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) | |||
| 557 | * Check for P_LVL2_UP flag before entering C2 and above on | 567 | * Check for P_LVL2_UP flag before entering C2 and above on |
| 558 | * an SMP system. | 568 | * an SMP system. |
| 559 | */ | 569 | */ |
| 560 | if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up) | 570 | if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up) |
| 561 | return_VALUE(-ENODEV); | 571 | return_VALUE(-ENODEV); |
| 562 | #endif | 572 | #endif |
| 563 | 573 | ||
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index 953d5fec82d5..6752dd1c1e8a 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
| @@ -1028,7 +1028,8 @@ static void saa7134_alsa_exit(void) | |||
| 1028 | return; | 1028 | return; |
| 1029 | } | 1029 | } |
| 1030 | 1030 | ||
| 1031 | module_init(saa7134_alsa_init); | 1031 | /* We initialize this late, to make sure the sound system is up and running */ |
| 1032 | late_initcall(saa7134_alsa_init); | ||
| 1032 | module_exit(saa7134_alsa_exit); | 1033 | module_exit(saa7134_alsa_exit); |
| 1033 | MODULE_LICENSE("GPL"); | 1034 | MODULE_LICENSE("GPL"); |
| 1034 | MODULE_AUTHOR("Ricardo Cerqueira"); | 1035 | MODULE_AUTHOR("Ricardo Cerqueira"); |
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c index 513a699a6df2..c450d57b2949 100644 --- a/drivers/media/video/saa7134/saa7134-oss.c +++ b/drivers/media/video/saa7134/saa7134-oss.c | |||
| @@ -1002,7 +1002,8 @@ static void saa7134_oss_exit(void) | |||
| 1002 | return; | 1002 | return; |
| 1003 | } | 1003 | } |
| 1004 | 1004 | ||
| 1005 | module_init(saa7134_oss_init); | 1005 | /* We initialize this late, to make sure the sound system is up and running */ |
| 1006 | late_initcall(saa7134_oss_init); | ||
| 1006 | module_exit(saa7134_oss_exit); | 1007 | module_exit(saa7134_oss_exit); |
| 1007 | MODULE_LICENSE("GPL"); | 1008 | MODULE_LICENSE("GPL"); |
| 1008 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); | 1009 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 94e5167f260d..e36c21e06d31 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
| @@ -400,6 +400,35 @@ static struct scsi_target *scsi_alloc_target(struct device *parent, | |||
| 400 | return found_target; | 400 | return found_target; |
| 401 | } | 401 | } |
| 402 | 402 | ||
| 403 | struct work_queue_wrapper { | ||
| 404 | struct work_struct work; | ||
| 405 | struct scsi_target *starget; | ||
| 406 | }; | ||
| 407 | |||
| 408 | static void scsi_target_reap_work(void *data) { | ||
| 409 | struct work_queue_wrapper *wqw = (struct work_queue_wrapper *)data; | ||
| 410 | struct scsi_target *starget = wqw->starget; | ||
| 411 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); | ||
| 412 | unsigned long flags; | ||
| 413 | |||
| 414 | kfree(wqw); | ||
| 415 | |||
| 416 | spin_lock_irqsave(shost->host_lock, flags); | ||
| 417 | |||
| 418 | if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { | ||
| 419 | list_del_init(&starget->siblings); | ||
| 420 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
| 421 | device_del(&starget->dev); | ||
| 422 | transport_unregister_device(&starget->dev); | ||
| 423 | put_device(&starget->dev); | ||
| 424 | return; | ||
| 425 | |||
| 426 | } | ||
| 427 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
| 428 | |||
| 429 | return; | ||
| 430 | } | ||
| 431 | |||
| 403 | /** | 432 | /** |
| 404 | * scsi_target_reap - check to see if target is in use and destroy if not | 433 | * scsi_target_reap - check to see if target is in use and destroy if not |
| 405 | * | 434 | * |
| @@ -411,19 +440,18 @@ static struct scsi_target *scsi_alloc_target(struct device *parent, | |||
| 411 | */ | 440 | */ |
| 412 | void scsi_target_reap(struct scsi_target *starget) | 441 | void scsi_target_reap(struct scsi_target *starget) |
| 413 | { | 442 | { |
| 414 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); | 443 | struct work_queue_wrapper *wqw = |
| 415 | unsigned long flags; | 444 | kzalloc(sizeof(struct work_queue_wrapper), GFP_ATOMIC); |
| 416 | spin_lock_irqsave(shost->host_lock, flags); | ||
| 417 | 445 | ||
| 418 | if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { | 446 | if (!wqw) { |
| 419 | list_del_init(&starget->siblings); | 447 | starget_printk(KERN_ERR, starget, |
| 420 | spin_unlock_irqrestore(shost->host_lock, flags); | 448 | "Failed to allocate memory in scsi_reap_target()\n"); |
| 421 | device_del(&starget->dev); | ||
| 422 | transport_unregister_device(&starget->dev); | ||
| 423 | put_device(&starget->dev); | ||
| 424 | return; | 449 | return; |
| 425 | } | 450 | } |
| 426 | spin_unlock_irqrestore(shost->host_lock, flags); | 451 | |
| 452 | INIT_WORK(&wqw->work, scsi_target_reap_work, wqw); | ||
| 453 | wqw->starget = starget; | ||
| 454 | schedule_work(&wqw->work); | ||
| 427 | } | 455 | } |
| 428 | 456 | ||
| 429 | /** | 457 | /** |
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 6cd5931d9a54..2a1a99a2ef56 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c | |||
| @@ -105,6 +105,7 @@ static struct { | |||
| 105 | { FC_PORTSTATE_LINKDOWN, "Linkdown" }, | 105 | { FC_PORTSTATE_LINKDOWN, "Linkdown" }, |
| 106 | { FC_PORTSTATE_ERROR, "Error" }, | 106 | { FC_PORTSTATE_ERROR, "Error" }, |
| 107 | { FC_PORTSTATE_LOOPBACK, "Loopback" }, | 107 | { FC_PORTSTATE_LOOPBACK, "Loopback" }, |
| 108 | { FC_PORTSTATE_DELETED, "Deleted" }, | ||
| 108 | }; | 109 | }; |
| 109 | fc_enum_name_search(port_state, fc_port_state, fc_port_state_names) | 110 | fc_enum_name_search(port_state, fc_port_state, fc_port_state_names) |
| 110 | #define FC_PORTSTATE_MAX_NAMELEN 20 | 111 | #define FC_PORTSTATE_MAX_NAMELEN 20 |
| @@ -211,6 +212,7 @@ fc_bitfield_name_search(remote_port_roles, fc_remote_port_role_names) | |||
| 211 | #define FC_MGMTSRVR_PORTID 0x00000a | 212 | #define FC_MGMTSRVR_PORTID 0x00000a |
| 212 | 213 | ||
| 213 | 214 | ||
| 215 | static void fc_shost_remove_rports(void *data); | ||
| 214 | static void fc_timeout_deleted_rport(void *data); | 216 | static void fc_timeout_deleted_rport(void *data); |
| 215 | static void fc_scsi_scan_rport(void *data); | 217 | static void fc_scsi_scan_rport(void *data); |
| 216 | static void fc_rport_terminate(struct fc_rport *rport); | 218 | static void fc_rport_terminate(struct fc_rport *rport); |
| @@ -318,6 +320,8 @@ static int fc_host_setup(struct transport_container *tc, struct device *dev, | |||
| 318 | fc_host_next_rport_number(shost) = 0; | 320 | fc_host_next_rport_number(shost) = 0; |
| 319 | fc_host_next_target_id(shost) = 0; | 321 | fc_host_next_target_id(shost) = 0; |
| 320 | 322 | ||
| 323 | fc_host_flags(shost) = 0; | ||
| 324 | INIT_WORK(&fc_host_rport_del_work(shost), fc_shost_remove_rports, shost); | ||
| 321 | return 0; | 325 | return 0; |
| 322 | } | 326 | } |
| 323 | 327 | ||
| @@ -387,6 +391,7 @@ show_fc_rport_##field (struct class_device *cdev, char *buf) \ | |||
| 387 | struct fc_internal *i = to_fc_internal(shost->transportt); \ | 391 | struct fc_internal *i = to_fc_internal(shost->transportt); \ |
| 388 | if ((i->f->get_rport_##field) && \ | 392 | if ((i->f->get_rport_##field) && \ |
| 389 | !((rport->port_state == FC_PORTSTATE_BLOCKED) || \ | 393 | !((rport->port_state == FC_PORTSTATE_BLOCKED) || \ |
| 394 | (rport->port_state == FC_PORTSTATE_DELETED) || \ | ||
| 390 | (rport->port_state == FC_PORTSTATE_NOTPRESENT))) \ | 395 | (rport->port_state == FC_PORTSTATE_NOTPRESENT))) \ |
| 391 | i->f->get_rport_##field(rport); \ | 396 | i->f->get_rport_##field(rport); \ |
| 392 | return snprintf(buf, sz, format_string, cast rport->field); \ | 397 | return snprintf(buf, sz, format_string, cast rport->field); \ |
| @@ -402,6 +407,7 @@ store_fc_rport_##field(struct class_device *cdev, const char *buf, \ | |||
| 402 | struct Scsi_Host *shost = rport_to_shost(rport); \ | 407 | struct Scsi_Host *shost = rport_to_shost(rport); \ |
| 403 | struct fc_internal *i = to_fc_internal(shost->transportt); \ | 408 | struct fc_internal *i = to_fc_internal(shost->transportt); \ |
| 404 | if ((rport->port_state == FC_PORTSTATE_BLOCKED) || \ | 409 | if ((rport->port_state == FC_PORTSTATE_BLOCKED) || \ |
| 410 | (rport->port_state == FC_PORTSTATE_DELETED) || \ | ||
| 405 | (rport->port_state == FC_PORTSTATE_NOTPRESENT)) \ | 411 | (rport->port_state == FC_PORTSTATE_NOTPRESENT)) \ |
| 406 | return -EBUSY; \ | 412 | return -EBUSY; \ |
| 407 | val = simple_strtoul(buf, NULL, 0); \ | 413 | val = simple_strtoul(buf, NULL, 0); \ |
| @@ -519,6 +525,7 @@ store_fc_rport_dev_loss_tmo(struct class_device *cdev, const char *buf, | |||
| 519 | struct Scsi_Host *shost = rport_to_shost(rport); | 525 | struct Scsi_Host *shost = rport_to_shost(rport); |
| 520 | struct fc_internal *i = to_fc_internal(shost->transportt); | 526 | struct fc_internal *i = to_fc_internal(shost->transportt); |
| 521 | if ((rport->port_state == FC_PORTSTATE_BLOCKED) || | 527 | if ((rport->port_state == FC_PORTSTATE_BLOCKED) || |
| 528 | (rport->port_state == FC_PORTSTATE_DELETED) || | ||
| 522 | (rport->port_state == FC_PORTSTATE_NOTPRESENT)) | 529 | (rport->port_state == FC_PORTSTATE_NOTPRESENT)) |
| 523 | return -EBUSY; | 530 | return -EBUSY; |
| 524 | val = simple_strtoul(buf, NULL, 0); | 531 | val = simple_strtoul(buf, NULL, 0); |
| @@ -1769,7 +1776,7 @@ fc_timeout_deleted_rport(void *data) | |||
| 1769 | rport->maxframe_size = -1; | 1776 | rport->maxframe_size = -1; |
| 1770 | rport->supported_classes = FC_COS_UNSPECIFIED; | 1777 | rport->supported_classes = FC_COS_UNSPECIFIED; |
| 1771 | rport->roles = FC_RPORT_ROLE_UNKNOWN; | 1778 | rport->roles = FC_RPORT_ROLE_UNKNOWN; |
| 1772 | rport->port_state = FC_PORTSTATE_NOTPRESENT; | 1779 | rport->port_state = FC_PORTSTATE_DELETED; |
| 1773 | 1780 | ||
| 1774 | /* remove the identifiers that aren't used in the consisting binding */ | 1781 | /* remove the identifiers that aren't used in the consisting binding */ |
| 1775 | switch (fc_host_tgtid_bind_type(shost)) { | 1782 | switch (fc_host_tgtid_bind_type(shost)) { |
| @@ -1789,14 +1796,23 @@ fc_timeout_deleted_rport(void *data) | |||
| 1789 | break; | 1796 | break; |
| 1790 | } | 1797 | } |
| 1791 | 1798 | ||
| 1792 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
| 1793 | |||
| 1794 | /* | 1799 | /* |
| 1795 | * As this only occurs if the remote port (scsi target) | 1800 | * As this only occurs if the remote port (scsi target) |
| 1796 | * went away and didn't come back - we'll remove | 1801 | * went away and didn't come back - we'll remove |
| 1797 | * all attached scsi devices. | 1802 | * all attached scsi devices. |
| 1803 | * | ||
| 1804 | * We'll schedule the shost work item to perform the actual removal | ||
| 1805 | * to avoid recursion in the different flush calls if we perform | ||
| 1806 | * the removal in each target - and there are lots of targets | ||
| 1807 | * whose timeouts fire at the same time. | ||
| 1798 | */ | 1808 | */ |
| 1799 | fc_rport_tgt_remove(rport); | 1809 | |
| 1810 | if ( !(fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED)) { | ||
| 1811 | fc_host_flags(shost) |= FC_SHOST_RPORT_DEL_SCHEDULED; | ||
| 1812 | scsi_queue_work(shost, &fc_host_rport_del_work(shost)); | ||
| 1813 | } | ||
| 1814 | |||
| 1815 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
| 1800 | } | 1816 | } |
| 1801 | 1817 | ||
| 1802 | /** | 1818 | /** |
| @@ -1818,6 +1834,41 @@ fc_scsi_scan_rport(void *data) | |||
| 1818 | } | 1834 | } |
| 1819 | 1835 | ||
| 1820 | 1836 | ||
| 1837 | /** | ||
| 1838 | * fc_shost_remove_rports - called to remove all rports that are marked | ||
| 1839 | * as in a deleted (not connected) state. | ||
| 1840 | * | ||
| 1841 | * @data: shost whose rports are to be looked at | ||
| 1842 | **/ | ||
| 1843 | static void | ||
| 1844 | fc_shost_remove_rports(void *data) | ||
| 1845 | { | ||
| 1846 | struct Scsi_Host *shost = (struct Scsi_Host *)data; | ||
| 1847 | struct fc_rport *rport, *next_rport; | ||
| 1848 | unsigned long flags; | ||
| 1849 | |||
| 1850 | spin_lock_irqsave(shost->host_lock, flags); | ||
| 1851 | while (fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED) { | ||
| 1852 | |||
| 1853 | fc_host_flags(shost) &= ~FC_SHOST_RPORT_DEL_SCHEDULED; | ||
| 1854 | |||
| 1855 | restart_search: | ||
| 1856 | list_for_each_entry_safe(rport, next_rport, | ||
| 1857 | &fc_host_rport_bindings(shost), peers) { | ||
| 1858 | if (rport->port_state == FC_PORTSTATE_DELETED) { | ||
| 1859 | rport->port_state = FC_PORTSTATE_NOTPRESENT; | ||
| 1860 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
| 1861 | fc_rport_tgt_remove(rport); | ||
| 1862 | spin_lock_irqsave(shost->host_lock, flags); | ||
| 1863 | goto restart_search; | ||
| 1864 | } | ||
| 1865 | } | ||
| 1866 | |||
| 1867 | } | ||
| 1868 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
| 1869 | } | ||
| 1870 | |||
| 1871 | |||
| 1821 | MODULE_AUTHOR("Martin Hicks"); | 1872 | MODULE_AUTHOR("Martin Hicks"); |
| 1822 | MODULE_DESCRIPTION("FC Transport Attributes"); | 1873 | MODULE_DESCRIPTION("FC Transport Attributes"); |
| 1823 | MODULE_LICENSE("GPL"); | 1874 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index e197ce9353de..e80ef9467825 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
| @@ -1432,7 +1432,8 @@ static int usb_generic_suspend(struct device *dev, pm_message_t message) | |||
| 1432 | mark_quiesced(intf); | 1432 | mark_quiesced(intf); |
| 1433 | } else { | 1433 | } else { |
| 1434 | // FIXME else if there's no suspend method, disconnect... | 1434 | // FIXME else if there's no suspend method, disconnect... |
| 1435 | dev_warn(dev, "no %s?\n", "suspend"); | 1435 | dev_warn(dev, "no suspend for driver %s?\n", driver->name); |
| 1436 | mark_quiesced(intf); | ||
| 1436 | status = 0; | 1437 | status = 0; |
| 1437 | } | 1438 | } |
| 1438 | return status; | 1439 | return status; |
| @@ -1460,8 +1461,10 @@ static int usb_generic_resume(struct device *dev) | |||
| 1460 | } | 1461 | } |
| 1461 | 1462 | ||
| 1462 | if ((dev->driver == NULL) || | 1463 | if ((dev->driver == NULL) || |
| 1463 | (dev->driver_data == &usb_generic_driver_data)) | 1464 | (dev->driver_data == &usb_generic_driver_data)) { |
| 1465 | dev->power.power_state.event = PM_EVENT_FREEZE; | ||
| 1464 | return 0; | 1466 | return 0; |
| 1467 | } | ||
| 1465 | 1468 | ||
| 1466 | intf = to_usb_interface(dev); | 1469 | intf = to_usb_interface(dev); |
| 1467 | driver = to_usb_driver(dev->driver); | 1470 | driver = to_usb_driver(dev->driver); |
| @@ -1481,7 +1484,7 @@ static int usb_generic_resume(struct device *dev) | |||
| 1481 | mark_quiesced(intf); | 1484 | mark_quiesced(intf); |
| 1482 | } | 1485 | } |
| 1483 | } else | 1486 | } else |
| 1484 | dev_warn(dev, "no %s?\n", "resume"); | 1487 | dev_warn(dev, "no resume for driver %s?\n", driver->name); |
| 1485 | return 0; | 1488 | return 0; |
| 1486 | } | 1489 | } |
| 1487 | 1490 | ||
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 4837524eada7..4ef5527028c5 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c | |||
| @@ -109,7 +109,7 @@ static int slave_configure(struct scsi_device *sdev) | |||
| 109 | * data comes from. | 109 | * data comes from. |
| 110 | */ | 110 | */ |
| 111 | if (sdev->scsi_level < SCSI_2) | 111 | if (sdev->scsi_level < SCSI_2) |
| 112 | sdev->scsi_level = SCSI_2; | 112 | sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2; |
| 113 | 113 | ||
| 114 | /* According to the technical support people at Genesys Logic, | 114 | /* According to the technical support people at Genesys Logic, |
| 115 | * devices using their chips have problems transferring more than | 115 | * devices using their chips have problems transferring more than |
| @@ -162,7 +162,7 @@ static int slave_configure(struct scsi_device *sdev) | |||
| 162 | * a Get-Max-LUN request, we won't lose much by setting the | 162 | * a Get-Max-LUN request, we won't lose much by setting the |
| 163 | * revision level down to 2. The only devices that would be | 163 | * revision level down to 2. The only devices that would be |
| 164 | * affected are those with sparse LUNs. */ | 164 | * affected are those with sparse LUNs. */ |
| 165 | sdev->scsi_level = SCSI_2; | 165 | sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2; |
| 166 | 166 | ||
| 167 | /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable | 167 | /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable |
| 168 | * Hardware Error) when any low-level error occurs, | 168 | * Hardware Error) when any low-level error occurs, |
diff --git a/fs/relayfs/relay.c b/fs/relayfs/relay.c index 16446a15c96d..2a6f7f12b7f9 100644 --- a/fs/relayfs/relay.c +++ b/fs/relayfs/relay.c | |||
| @@ -333,8 +333,7 @@ size_t relay_switch_subbuf(struct rchan_buf *buf, size_t length) | |||
| 333 | return length; | 333 | return length; |
| 334 | 334 | ||
| 335 | toobig: | 335 | toobig: |
| 336 | printk(KERN_WARNING "relayfs: event too large (%Zd)\n", length); | 336 | buf->chan->last_toobig = length; |
| 337 | WARN_ON(1); | ||
| 338 | return 0; | 337 | return 0; |
| 339 | } | 338 | } |
| 340 | 339 | ||
| @@ -399,6 +398,11 @@ void relay_close(struct rchan *chan) | |||
| 399 | relay_close_buf(chan->buf[i]); | 398 | relay_close_buf(chan->buf[i]); |
| 400 | } | 399 | } |
| 401 | 400 | ||
| 401 | if (chan->last_toobig) | ||
| 402 | printk(KERN_WARNING "relayfs: one or more items not logged " | ||
| 403 | "[item size (%Zd) > sub-buffer size (%Zd)]\n", | ||
| 404 | chan->last_toobig, chan->subbuf_size); | ||
| 405 | |||
| 402 | kref_put(&chan->kref, relay_destroy_channel); | 406 | kref_put(&chan->kref, relay_destroy_channel); |
| 403 | } | 407 | } |
| 404 | 408 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index c516382fbec2..f04ba20712a2 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
| 13 | #include <asm/smp.h> /* cpu_online_map */ | 13 | #include <linux/smp.h> |
| 14 | 14 | ||
| 15 | #if !defined(CONFIG_ARCH_S390) | 15 | #if !defined(CONFIG_ARCH_S390) |
| 16 | 16 | ||
diff --git a/include/linux/relayfs_fs.h b/include/linux/relayfs_fs.h index cfafc3e76bc2..fb7e80737325 100644 --- a/include/linux/relayfs_fs.h +++ b/include/linux/relayfs_fs.h | |||
| @@ -20,9 +20,9 @@ | |||
| 20 | #include <linux/kref.h> | 20 | #include <linux/kref.h> |
| 21 | 21 | ||
| 22 | /* | 22 | /* |
| 23 | * Tracks changes to rchan_buf struct | 23 | * Tracks changes to rchan/rchan_buf structs |
| 24 | */ | 24 | */ |
| 25 | #define RELAYFS_CHANNEL_VERSION 5 | 25 | #define RELAYFS_CHANNEL_VERSION 6 |
| 26 | 26 | ||
| 27 | /* | 27 | /* |
| 28 | * Per-cpu relay channel buffer | 28 | * Per-cpu relay channel buffer |
| @@ -60,6 +60,7 @@ struct rchan | |||
| 60 | struct rchan_callbacks *cb; /* client callbacks */ | 60 | struct rchan_callbacks *cb; /* client callbacks */ |
| 61 | struct kref kref; /* channel refcount */ | 61 | struct kref kref; /* channel refcount */ |
| 62 | void *private_data; /* for user-defined data */ | 62 | void *private_data; /* for user-defined data */ |
| 63 | size_t last_toobig; /* tried to log event > subbuf size */ | ||
| 63 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ | 64 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ |
| 64 | }; | 65 | }; |
| 65 | 66 | ||
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index fac547d32a98..394f14a5b7cb 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
| @@ -79,6 +79,7 @@ enum fc_port_state { | |||
| 79 | FC_PORTSTATE_LINKDOWN, | 79 | FC_PORTSTATE_LINKDOWN, |
| 80 | FC_PORTSTATE_ERROR, | 80 | FC_PORTSTATE_ERROR, |
| 81 | FC_PORTSTATE_LOOPBACK, | 81 | FC_PORTSTATE_LOOPBACK, |
| 82 | FC_PORTSTATE_DELETED, | ||
| 82 | }; | 83 | }; |
| 83 | 84 | ||
| 84 | 85 | ||
| @@ -325,8 +326,14 @@ struct fc_host_attrs { | |||
| 325 | struct list_head rport_bindings; | 326 | struct list_head rport_bindings; |
| 326 | u32 next_rport_number; | 327 | u32 next_rport_number; |
| 327 | u32 next_target_id; | 328 | u32 next_target_id; |
| 329 | u8 flags; | ||
| 330 | struct work_struct rport_del_work; | ||
| 328 | }; | 331 | }; |
| 329 | 332 | ||
| 333 | /* values for struct fc_host_attrs "flags" field: */ | ||
| 334 | #define FC_SHOST_RPORT_DEL_SCHEDULED 0x01 | ||
| 335 | |||
| 336 | |||
| 330 | #define fc_host_node_name(x) \ | 337 | #define fc_host_node_name(x) \ |
| 331 | (((struct fc_host_attrs *)(x)->shost_data)->node_name) | 338 | (((struct fc_host_attrs *)(x)->shost_data)->node_name) |
| 332 | #define fc_host_port_name(x) \ | 339 | #define fc_host_port_name(x) \ |
| @@ -365,6 +372,10 @@ struct fc_host_attrs { | |||
| 365 | (((struct fc_host_attrs *)(x)->shost_data)->next_rport_number) | 372 | (((struct fc_host_attrs *)(x)->shost_data)->next_rport_number) |
| 366 | #define fc_host_next_target_id(x) \ | 373 | #define fc_host_next_target_id(x) \ |
| 367 | (((struct fc_host_attrs *)(x)->shost_data)->next_target_id) | 374 | (((struct fc_host_attrs *)(x)->shost_data)->next_target_id) |
| 375 | #define fc_host_flags(x) \ | ||
| 376 | (((struct fc_host_attrs *)(x)->shost_data)->flags) | ||
| 377 | #define fc_host_rport_del_work(x) \ | ||
| 378 | (((struct fc_host_attrs *)(x)->shost_data)->rport_del_work) | ||
| 368 | 379 | ||
| 369 | 380 | ||
| 370 | /* The functions by which the transport class and the driver communicate */ | 381 | /* The functions by which the transport class and the driver communicate */ |
diff --git a/init/Kconfig b/init/Kconfig index 6c5dbedc6e96..9fc0759fa942 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
| @@ -260,7 +260,6 @@ config CC_OPTIMIZE_FOR_SIZE | |||
| 260 | bool "Optimize for size (Look out for broken compilers!)" | 260 | bool "Optimize for size (Look out for broken compilers!)" |
| 261 | default y | 261 | default y |
| 262 | depends on ARM || H8300 || EXPERIMENTAL | 262 | depends on ARM || H8300 || EXPERIMENTAL |
| 263 | depends on !SPARC64 | ||
| 264 | help | 263 | help |
| 265 | Enabling this option will pass "-Os" instead of "-O2" to gcc | 264 | Enabling this option will pass "-Os" instead of "-O2" to gcc |
| 266 | resulting in a smaller kernel. | 265 | resulting in a smaller kernel. |
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 91e412b0ab00..67465b65abe4 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
| @@ -753,6 +753,8 @@ static int vlan_ioctl_handler(void __user *arg) | |||
| 753 | break; | 753 | break; |
| 754 | case GET_VLAN_REALDEV_NAME_CMD: | 754 | case GET_VLAN_REALDEV_NAME_CMD: |
| 755 | err = vlan_dev_get_realdev_name(args.device1, args.u.device2); | 755 | err = vlan_dev_get_realdev_name(args.device1, args.u.device2); |
| 756 | if (err) | ||
| 757 | goto out; | ||
| 756 | if (copy_to_user(arg, &args, | 758 | if (copy_to_user(arg, &args, |
| 757 | sizeof(struct vlan_ioctl_args))) { | 759 | sizeof(struct vlan_ioctl_args))) { |
| 758 | err = -EFAULT; | 760 | err = -EFAULT; |
| @@ -761,6 +763,8 @@ static int vlan_ioctl_handler(void __user *arg) | |||
| 761 | 763 | ||
| 762 | case GET_VLAN_VID_CMD: | 764 | case GET_VLAN_VID_CMD: |
| 763 | err = vlan_dev_get_vid(args.device1, &vid); | 765 | err = vlan_dev_get_vid(args.device1, &vid); |
| 766 | if (err) | ||
| 767 | goto out; | ||
| 764 | args.u.VID = vid; | 768 | args.u.VID = vid; |
| 765 | if (copy_to_user(arg, &args, | 769 | if (copy_to_user(arg, &args, |
| 766 | sizeof(struct vlan_ioctl_args))) { | 770 | sizeof(struct vlan_ioctl_args))) { |
| @@ -774,7 +778,7 @@ static int vlan_ioctl_handler(void __user *arg) | |||
| 774 | __FUNCTION__, args.cmd); | 778 | __FUNCTION__, args.cmd); |
| 775 | return -EINVAL; | 779 | return -EINVAL; |
| 776 | }; | 780 | }; |
| 777 | 781 | out: | |
| 778 | return err; | 782 | return err; |
| 779 | } | 783 | } |
| 780 | 784 | ||
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index ca03521112c5..656e13e38cfb 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
| @@ -1251,7 +1251,7 @@ static int dccp_v4_destroy_sock(struct sock *sk) | |||
| 1251 | struct dccp_sock *dp = dccp_sk(sk); | 1251 | struct dccp_sock *dp = dccp_sk(sk); |
| 1252 | 1252 | ||
| 1253 | /* | 1253 | /* |
| 1254 | * DCCP doesn't use sk_qrite_queue, just sk_send_head | 1254 | * DCCP doesn't use sk_write_queue, just sk_send_head |
| 1255 | * for retransmissions | 1255 | * for retransmissions |
| 1256 | */ | 1256 | */ |
| 1257 | if (sk->sk_send_head != NULL) { | 1257 | if (sk->sk_send_head != NULL) { |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index fd03c3944366..510220f2ae8b 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -639,8 +639,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) | |||
| 639 | } | 639 | } |
| 640 | #endif | 640 | #endif |
| 641 | 641 | ||
| 642 | for (ifap = &idev->addr_list; (ifa=*ifap) != NULL; | 642 | for (ifap = &idev->addr_list; (ifa=*ifap) != NULL;) { |
| 643 | ifap = &ifa->if_next) { | ||
| 644 | if (ifa == ifp) { | 643 | if (ifa == ifp) { |
| 645 | *ifap = ifa->if_next; | 644 | *ifap = ifa->if_next; |
| 646 | __in6_ifa_put(ifp); | 645 | __in6_ifa_put(ifp); |
| @@ -648,6 +647,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) | |||
| 648 | if (!(ifp->flags & IFA_F_PERMANENT) || onlink > 0) | 647 | if (!(ifp->flags & IFA_F_PERMANENT) || onlink > 0) |
| 649 | break; | 648 | break; |
| 650 | deleted = 1; | 649 | deleted = 1; |
| 650 | continue; | ||
| 651 | } else if (ifp->flags & IFA_F_PERMANENT) { | 651 | } else if (ifp->flags & IFA_F_PERMANENT) { |
| 652 | if (ipv6_prefix_equal(&ifa->addr, &ifp->addr, | 652 | if (ipv6_prefix_equal(&ifa->addr, &ifp->addr, |
| 653 | ifp->prefix_len)) { | 653 | ifp->prefix_len)) { |
| @@ -671,6 +671,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) | |||
| 671 | } | 671 | } |
| 672 | } | 672 | } |
| 673 | } | 673 | } |
| 674 | ifap = &ifa->if_next; | ||
| 674 | } | 675 | } |
| 675 | write_unlock_bh(&idev->lock); | 676 | write_unlock_bh(&idev->lock); |
| 676 | 677 | ||
diff --git a/net/netrom/nr_in.c b/net/netrom/nr_in.c index 004e8599b8fe..a7d88b5ad756 100644 --- a/net/netrom/nr_in.c +++ b/net/netrom/nr_in.c | |||
| @@ -99,7 +99,7 @@ static int nr_state1_machine(struct sock *sk, struct sk_buff *skb, | |||
| 99 | break; | 99 | break; |
| 100 | 100 | ||
| 101 | case NR_RESET: | 101 | case NR_RESET: |
| 102 | if (sysctl_netrom_reset_circuit); | 102 | if (sysctl_netrom_reset_circuit) |
| 103 | nr_disconnect(sk, ECONNRESET); | 103 | nr_disconnect(sk, ECONNRESET); |
| 104 | break; | 104 | break; |
| 105 | 105 | ||
| @@ -130,7 +130,7 @@ static int nr_state2_machine(struct sock *sk, struct sk_buff *skb, | |||
| 130 | break; | 130 | break; |
| 131 | 131 | ||
| 132 | case NR_RESET: | 132 | case NR_RESET: |
| 133 | if (sysctl_netrom_reset_circuit); | 133 | if (sysctl_netrom_reset_circuit) |
| 134 | nr_disconnect(sk, ECONNRESET); | 134 | nr_disconnect(sk, ECONNRESET); |
| 135 | break; | 135 | break; |
| 136 | 136 | ||
| @@ -265,7 +265,7 @@ static int nr_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype | |||
| 265 | break; | 265 | break; |
| 266 | 266 | ||
| 267 | case NR_RESET: | 267 | case NR_RESET: |
| 268 | if (sysctl_netrom_reset_circuit); | 268 | if (sysctl_netrom_reset_circuit) |
| 269 | nr_disconnect(sk, ECONNRESET); | 269 | nr_disconnect(sk, ECONNRESET); |
| 270 | break; | 270 | break; |
| 271 | 271 | ||
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 54a4be6a7d26..d19e274b9c4a 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
| @@ -346,6 +346,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) | |||
| 346 | struct xfrm_policy *pol, **p; | 346 | struct xfrm_policy *pol, **p; |
| 347 | struct xfrm_policy *delpol = NULL; | 347 | struct xfrm_policy *delpol = NULL; |
| 348 | struct xfrm_policy **newpos = NULL; | 348 | struct xfrm_policy **newpos = NULL; |
| 349 | struct dst_entry *gc_list; | ||
| 349 | 350 | ||
| 350 | write_lock_bh(&xfrm_policy_lock); | 351 | write_lock_bh(&xfrm_policy_lock); |
| 351 | for (p = &xfrm_policy_list[dir]; (pol=*p)!=NULL;) { | 352 | for (p = &xfrm_policy_list[dir]; (pol=*p)!=NULL;) { |
| @@ -381,9 +382,36 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) | |||
| 381 | xfrm_pol_hold(policy); | 382 | xfrm_pol_hold(policy); |
| 382 | write_unlock_bh(&xfrm_policy_lock); | 383 | write_unlock_bh(&xfrm_policy_lock); |
| 383 | 384 | ||
| 384 | if (delpol) { | 385 | if (delpol) |
| 385 | xfrm_policy_kill(delpol); | 386 | xfrm_policy_kill(delpol); |
| 387 | |||
| 388 | read_lock_bh(&xfrm_policy_lock); | ||
| 389 | gc_list = NULL; | ||
| 390 | for (policy = policy->next; policy; policy = policy->next) { | ||
| 391 | struct dst_entry *dst; | ||
| 392 | |||
| 393 | write_lock(&policy->lock); | ||
| 394 | dst = policy->bundles; | ||
| 395 | if (dst) { | ||
| 396 | struct dst_entry *tail = dst; | ||
| 397 | while (tail->next) | ||
| 398 | tail = tail->next; | ||
| 399 | tail->next = gc_list; | ||
| 400 | gc_list = dst; | ||
| 401 | |||
| 402 | policy->bundles = NULL; | ||
| 403 | } | ||
| 404 | write_unlock(&policy->lock); | ||
| 386 | } | 405 | } |
| 406 | read_unlock_bh(&xfrm_policy_lock); | ||
| 407 | |||
| 408 | while (gc_list) { | ||
| 409 | struct dst_entry *dst = gc_list; | ||
| 410 | |||
| 411 | gc_list = dst->next; | ||
| 412 | dst_free(dst); | ||
| 413 | } | ||
| 414 | |||
| 387 | return 0; | 415 | return 0; |
| 388 | } | 416 | } |
| 389 | EXPORT_SYMBOL(xfrm_policy_insert); | 417 | EXPORT_SYMBOL(xfrm_policy_insert); |
