## Automatically generated incremental diff ## From: linux-2.6.13-rc7 ## To: linux-2.6.13 ## Robot: $Id: make-incremental-diff,v 1.12 2004/01/06 07:19:36 hpa Exp $ diff -urN linux-2.6.13-rc7/Makefile linux-2.6.13/Makefile --- linux-2.6.13-rc7/Makefile 2005-08-28 17:04:39.928312217 -0700 +++ linux-2.6.13/Makefile 2005-08-28 17:04:47.145628757 -0700 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 13 -EXTRAVERSION =-rc7 +EXTRAVERSION = NAME=Woozy Numbat # *DOCUMENTATION* diff -urN linux-2.6.13-rc7/arch/arm/mach-ixp4xx/coyote-setup.c linux-2.6.13/arch/arm/mach-ixp4xx/coyote-setup.c --- linux-2.6.13-rc7/arch/arm/mach-ixp4xx/coyote-setup.c 2005-08-28 17:04:39.976314323 -0700 +++ linux-2.6.13/arch/arm/mach-ixp4xx/coyote-setup.c 2005-08-28 17:04:47.192630819 -0700 @@ -36,7 +36,7 @@ static struct resource coyote_flash_resource = { .start = COYOTE_FLASH_BASE, - .end = COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE, + .end = COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE - 1, .flags = IORESOURCE_MEM, }; diff -urN linux-2.6.13-rc7/arch/arm/mach-ixp4xx/gtwx5715-setup.c linux-2.6.13/arch/arm/mach-ixp4xx/gtwx5715-setup.c --- linux-2.6.13-rc7/arch/arm/mach-ixp4xx/gtwx5715-setup.c 2005-08-28 17:04:39.976314323 -0700 +++ linux-2.6.13/arch/arm/mach-ixp4xx/gtwx5715-setup.c 2005-08-28 17:04:47.193630863 -0700 @@ -114,7 +114,7 @@ static struct resource gtwx5715_flash_resource = { .start = GTWX5715_FLASH_BASE, - .end = GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE, + .end = GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE - 1, .flags = IORESOURCE_MEM, }; diff -urN linux-2.6.13-rc7/arch/arm/mach-ixp4xx/ixdp425-setup.c linux-2.6.13/arch/arm/mach-ixp4xx/ixdp425-setup.c --- linux-2.6.13-rc7/arch/arm/mach-ixp4xx/ixdp425-setup.c 2005-08-28 17:04:39.976314323 -0700 +++ linux-2.6.13/arch/arm/mach-ixp4xx/ixdp425-setup.c 2005-08-28 17:04:47.193630863 -0700 @@ -36,7 +36,7 @@ static struct resource ixdp425_flash_resource = { .start = IXDP425_FLASH_BASE, - .end = IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE, + .end = IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE - 1, .flags = IORESOURCE_MEM, }; diff -urN linux-2.6.13-rc7/arch/ia64/pci/pci.c linux-2.6.13/arch/ia64/pci/pci.c --- linux-2.6.13-rc7/arch/ia64/pci/pci.c 2005-08-28 17:04:40.238325814 -0700 +++ linux-2.6.13/arch/ia64/pci/pci.c 2005-08-28 17:04:47.455642354 -0700 @@ -380,6 +380,7 @@ res->start = region->start + offset; res->end = region->end + offset; } +EXPORT_SYMBOL(pcibios_bus_to_resource); static int __devinit is_valid_resource(struct pci_dev *dev, int idx) { diff -urN linux-2.6.13-rc7/arch/ppc/syslib/m8xx_setup.c linux-2.6.13/arch/ppc/syslib/m8xx_setup.c --- linux-2.6.13-rc7/arch/ppc/syslib/m8xx_setup.c 2005-08-28 17:04:40.327329718 -0700 +++ linux-2.6.13/arch/ppc/syslib/m8xx_setup.c 2005-08-28 17:04:47.543646214 -0700 @@ -423,7 +423,7 @@ ppc_md.find_end_of_memory = m8xx_find_end_of_memory; ppc_md.setup_io_mappings = m8xx_map_io; -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) +#if defined(CONFIG_BLK_DEV_MPC8xx_IDE) m8xx_ide_init(); #endif } diff -urN linux-2.6.13-rc7/arch/ppc64/kernel/setup.c linux-2.6.13/arch/ppc64/kernel/setup.c --- linux-2.6.13-rc7/arch/ppc64/kernel/setup.c 2005-08-28 17:04:40.387332349 -0700 +++ linux-2.6.13/arch/ppc64/kernel/setup.c 2005-08-28 17:04:47.602648802 -0700 @@ -706,6 +706,8 @@ local_irq_disable(); while (1) ; } +/* Used by the G5 thermal driver */ +EXPORT_SYMBOL_GPL(machine_power_off); void machine_halt(void) { diff -urN linux-2.6.13-rc7/arch/sparc64/kernel/pci.c linux-2.6.13/arch/sparc64/kernel/pci.c --- linux-2.6.13-rc7/arch/sparc64/kernel/pci.c 2005-06-17 12:48:29.000000000 -0700 +++ linux-2.6.13/arch/sparc64/kernel/pci.c 2005-08-28 17:04:47.640650468 -0700 @@ -540,6 +540,7 @@ pbm->parent->resource_adjust(pdev, res, root); } +EXPORT_SYMBOL(pcibios_bus_to_resource); char * __init pcibios_setup(char *str) { diff -urN linux-2.6.13-rc7/arch/um/drivers/mmapper_kern.c linux-2.6.13/arch/um/drivers/mmapper_kern.c --- linux-2.6.13-rc7/arch/um/drivers/mmapper_kern.c 2005-06-17 12:48:29.000000000 -0700 +++ linux-2.6.13/arch/um/drivers/mmapper_kern.c 2005-08-28 17:04:47.663651477 -0700 @@ -9,19 +9,11 @@ * */ -#include -#include -#include -#include +#include #include #include -#include -#include -#include #include #include -#include -#include #include "mem_user.h" #include "user_util.h" @@ -31,35 +23,22 @@ static char *v_buf = NULL; static ssize_t -mmapper_read(struct file *file, char *buf, size_t count, loff_t *ppos) +mmapper_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - if(*ppos > mmapper_size) - return -EINVAL; - - if(count + *ppos > mmapper_size) - count = count + *ppos - mmapper_size; - - if(count < 0) - return -EINVAL; - - copy_to_user(buf,&v_buf[*ppos],count); - - return count; + return simple_read_from_buffer(buf, count, ppos, v_buf, mmapper_size); } static ssize_t -mmapper_write(struct file *file, const char *buf, size_t count, loff_t *ppos) +mmapper_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - if(*ppos > mmapper_size) + if (*ppos > mmapper_size) return -EINVAL; - if(count + *ppos > mmapper_size) - count = count + *ppos - mmapper_size; - - if(count < 0) - return -EINVAL; + if (count > mmapper_size - *ppos) + count = mmapper_size - *ppos; - copy_from_user(&v_buf[*ppos],buf,count); + if (copy_from_user(&v_buf[*ppos], buf, count)) + return -EFAULT; return count; } @@ -77,7 +56,6 @@ int ret = -EINVAL; int size; - lock_kernel(); if (vma->vm_pgoff != 0) goto out; @@ -92,7 +70,6 @@ goto out; ret = 0; out: - unlock_kernel(); return ret; } diff -urN linux-2.6.13-rc7/arch/x86_64/defconfig linux-2.6.13/arch/x86_64/defconfig --- linux-2.6.13-rc7/arch/x86_64/defconfig 2005-08-28 17:04:40.484336604 -0700 +++ linux-2.6.13/arch/x86_64/defconfig 2005-08-28 17:04:47.699653056 -0700 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.13-rc3 -# Fri Jul 22 16:47:31 2005 +# Linux kernel version: 2.6.13-rc6-git3 +# Fri Aug 12 16:40:34 2005 # CONFIG_X86_64=y CONFIG_64BIT=y @@ -284,10 +284,6 @@ # Network testing # # CONFIG_NET_PKTGEN is not set -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set -CONFIG_NET_POLL_CONTROLLER=y # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set @@ -463,6 +459,7 @@ # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set CONFIG_SCSI_SATA=y +# CONFIG_SCSI_SATA_AHCI is not set # CONFIG_SCSI_SATA_SVW is not set CONFIG_SCSI_ATA_PIIX=y # CONFIG_SCSI_SATA_NV is not set @@ -492,6 +489,7 @@ # CONFIG_SCSI_QLA2300 is not set # CONFIG_SCSI_QLA2322 is not set # CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_QLA24XX is not set # CONFIG_SCSI_LPFC is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set @@ -512,9 +510,11 @@ # # Fusion MPT device support # -# CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set +CONFIG_FUSION=y +CONFIG_FUSION_SPI=y # CONFIG_FUSION_FC is not set +CONFIG_FUSION_MAX_SGE=128 +# CONFIG_FUSION_CTL is not set # # IEEE 1394 (FireWire) support @@ -585,6 +585,7 @@ # CONFIG_ACENIC is not set # CONFIG_DL2K is not set CONFIG_E1000=y +# CONFIG_E1000_NAPI is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set @@ -624,6 +625,10 @@ # CONFIG_NET_FC is not set # CONFIG_SHAPER is not set CONFIG_NETCONSOLE=y +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y # # ISDN subsystem diff -urN linux-2.6.13-rc7/arch/x86_64/kernel/e820.c linux-2.6.13/arch/x86_64/kernel/e820.c --- linux-2.6.13-rc7/arch/x86_64/kernel/e820.c 2005-08-28 17:04:40.489336823 -0700 +++ linux-2.6.13/arch/x86_64/kernel/e820.c 2005-08-28 17:04:47.704653275 -0700 @@ -185,6 +185,40 @@ } /* + * Compute how much memory is missing in a range. + * Unlike the other functions in this file the arguments are in page numbers. + */ +unsigned long __init +e820_hole_size(unsigned long start_pfn, unsigned long end_pfn) +{ + unsigned long ram = 0; + unsigned long start = start_pfn << PAGE_SHIFT; + unsigned long end = end_pfn << PAGE_SHIFT; + int i; + for (i = 0; i < e820.nr_map; i++) { + struct e820entry *ei = &e820.map[i]; + unsigned long last, addr; + + if (ei->type != E820_RAM || + ei->addr+ei->size <= start || + ei->addr >= end) + continue; + + addr = round_up(ei->addr, PAGE_SIZE); + if (addr < start) + addr = start; + + last = round_down(ei->addr + ei->size, PAGE_SIZE); + if (last >= end) + last = end; + + if (last > addr) + ram += last - addr; + } + return ((end - start) - ram) >> PAGE_SHIFT; +} + +/* * Mark e820 reserved areas as busy for the resource manager. */ void __init e820_reserve_resources(void) diff -urN linux-2.6.13-rc7/arch/x86_64/mm/init.c linux-2.6.13/arch/x86_64/mm/init.c --- linux-2.6.13-rc7/arch/x86_64/mm/init.c 2005-08-28 17:04:40.506337569 -0700 +++ linux-2.6.13/arch/x86_64/mm/init.c 2005-08-28 17:04:47.722654065 -0700 @@ -322,18 +322,26 @@ void __init paging_init(void) { { - unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0}; + unsigned long zones_size[MAX_NR_ZONES]; + unsigned long holes[MAX_NR_ZONES]; unsigned int max_dma; + memset(zones_size, 0, sizeof(zones_size)); + memset(holes, 0, sizeof(holes)); + max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; - if (end_pfn < max_dma) + if (end_pfn < max_dma) { zones_size[ZONE_DMA] = end_pfn; - else { + holes[ZONE_DMA] = e820_hole_size(0, end_pfn); + } else { zones_size[ZONE_DMA] = max_dma; + holes[ZONE_DMA] = e820_hole_size(0, max_dma); zones_size[ZONE_NORMAL] = end_pfn - max_dma; + holes[ZONE_NORMAL] = e820_hole_size(max_dma, end_pfn); } - free_area_init(zones_size); + free_area_init_node(0, NODE_DATA(0), zones_size, + __pa(PAGE_OFFSET) >> PAGE_SHIFT, holes); } return; } diff -urN linux-2.6.13-rc7/arch/x86_64/mm/numa.c linux-2.6.13/arch/x86_64/mm/numa.c --- linux-2.6.13-rc7/arch/x86_64/mm/numa.c 2005-08-28 17:04:40.507337612 -0700 +++ linux-2.6.13/arch/x86_64/mm/numa.c 2005-08-28 17:04:47.722654065 -0700 @@ -126,9 +126,11 @@ { unsigned long start_pfn, end_pfn; unsigned long zones[MAX_NR_ZONES]; + unsigned long holes[MAX_NR_ZONES]; unsigned long dma_end_pfn; memset(zones, 0, sizeof(unsigned long) * MAX_NR_ZONES); + memset(holes, 0, sizeof(unsigned long) * MAX_NR_ZONES); start_pfn = node_start_pfn(nodeid); end_pfn = node_end_pfn(nodeid); @@ -139,13 +141,17 @@ dma_end_pfn = __pa(MAX_DMA_ADDRESS) >> PAGE_SHIFT; if (start_pfn < dma_end_pfn) { zones[ZONE_DMA] = dma_end_pfn - start_pfn; + holes[ZONE_DMA] = e820_hole_size(start_pfn, dma_end_pfn); zones[ZONE_NORMAL] = end_pfn - dma_end_pfn; + holes[ZONE_NORMAL] = e820_hole_size(dma_end_pfn, end_pfn); + } else { zones[ZONE_NORMAL] = end_pfn - start_pfn; + holes[ZONE_NORMAL] = e820_hole_size(start_pfn, end_pfn); } free_area_init_node(nodeid, NODE_DATA(nodeid), zones, - start_pfn, NULL); + start_pfn, holes); } void __init numa_init_array(void) diff -urN linux-2.6.13-rc7/drivers/acpi/sleep/poweroff.c linux-2.6.13/drivers/acpi/sleep/poweroff.c --- linux-2.6.13-rc7/drivers/acpi/sleep/poweroff.c 2005-08-28 17:04:40.622342656 -0700 +++ linux-2.6.13/drivers/acpi/sleep/poweroff.c 2005-08-28 17:04:47.837659109 -0700 @@ -55,7 +55,11 @@ static int acpi_shutdown(struct sys_device *x) { - return acpi_sleep_prepare(ACPI_STATE_S5); + if (system_state == SYSTEM_POWER_OFF) { + /* Prepare if we are going to power off the system */ + return acpi_sleep_prepare(ACPI_STATE_S5); + } + return 0; } static struct sysdev_class acpi_sysclass = { diff -urN linux-2.6.13-rc7/drivers/block/cfq-iosched.c linux-2.6.13/drivers/block/cfq-iosched.c --- linux-2.6.13-rc7/drivers/block/cfq-iosched.c 2005-08-28 17:04:40.661344367 -0700 +++ linux-2.6.13/drivers/block/cfq-iosched.c 2005-08-28 17:04:47.876660819 -0700 @@ -47,7 +47,7 @@ /* * disable queueing at the driver/hardware level */ -static int cfq_max_depth = 1; +static int cfq_max_depth = 2; /* * for the hash of cfqq inside the cfqd @@ -385,9 +385,15 @@ return crq2; if (crq2 == NULL) return crq1; - if (cfq_crq_requeued(crq1)) + + if (cfq_crq_requeued(crq1) && !cfq_crq_requeued(crq2)) return crq1; - if (cfq_crq_requeued(crq2)) + else if (cfq_crq_requeued(crq2) && !cfq_crq_requeued(crq1)) + return crq2; + + if (cfq_crq_is_sync(crq1) && !cfq_crq_is_sync(crq2)) + return crq1; + else if (cfq_crq_is_sync(crq2) && !cfq_crq_is_sync(crq1)) return crq2; s1 = crq1->request->sector; @@ -1769,18 +1775,23 @@ cfq_crq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, struct cfq_rq *crq) { - const int sync = cfq_crq_is_sync(crq); + struct cfq_io_context *cic; cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq); - if (sync) { - struct cfq_io_context *cic = crq->io_context; + /* + * we never wait for an async request and we don't allow preemption + * of an async request. so just return early + */ + if (!cfq_crq_is_sync(crq)) + return; - cfq_update_io_thinktime(cfqd, cic); - cfq_update_idle_window(cfqd, cfqq, cic); + cic = crq->io_context; - cic->last_queue = jiffies; - } + cfq_update_io_thinktime(cfqd, cic); + cfq_update_idle_window(cfqd, cfqq, cic); + + cic->last_queue = jiffies; if (cfqq == cfqd->active_queue) { /* diff -urN linux-2.6.13-rc7/drivers/char/vt.c linux-2.6.13/drivers/char/vt.c --- linux-2.6.13-rc7/drivers/char/vt.c 2005-08-28 17:04:40.776349411 -0700 +++ linux-2.6.13/drivers/char/vt.c 2005-08-28 17:04:47.989665776 -0700 @@ -2433,7 +2433,7 @@ int ret = 0; acquire_console_sem(); - if (tty->count == 1) { + if (tty->driver_data == NULL) { ret = vc_allocate(currcons); if (ret == 0) { struct vc_data *vc = vc_cons[currcons].d; diff -urN linux-2.6.13-rc7/drivers/hwmon/adm1026.c linux-2.6.13/drivers/hwmon/adm1026.c --- linux-2.6.13-rc7/drivers/hwmon/adm1026.c 2005-08-28 17:04:40.799350420 -0700 +++ linux-2.6.13/drivers/hwmon/adm1026.c 2005-08-28 17:04:48.011666741 -0700 @@ -325,7 +325,7 @@ int adm1026_detach_client(struct i2c_client *client) { i2c_detach_client(client); - kfree(client); + kfree(i2c_get_clientdata(client)); return 0; } @@ -1691,7 +1691,7 @@ /* Error out and cleanup code */ exitfree: - kfree(new_client); + kfree(data); exit: return err; } diff -urN linux-2.6.13-rc7/drivers/hwmon/adm1031.c linux-2.6.13/drivers/hwmon/adm1031.c --- linux-2.6.13-rc7/drivers/hwmon/adm1031.c 2005-08-28 17:04:40.801350507 -0700 +++ linux-2.6.13/drivers/hwmon/adm1031.c 2005-08-28 17:04:48.013666828 -0700 @@ -834,7 +834,7 @@ return 0; exit_free: - kfree(new_client); + kfree(data); exit: return err; } @@ -845,7 +845,7 @@ if ((ret = i2c_detach_client(client)) != 0) { return ret; } - kfree(client); + kfree(i2c_get_clientdata(client)); return 0; } diff -urN linux-2.6.13-rc7/drivers/hwmon/adm9240.c linux-2.6.13/drivers/hwmon/adm9240.c --- linux-2.6.13-rc7/drivers/hwmon/adm9240.c 2005-08-28 17:04:40.802350551 -0700 +++ linux-2.6.13/drivers/hwmon/adm9240.c 2005-08-28 17:04:48.014666872 -0700 @@ -616,7 +616,7 @@ return 0; exit_free: - kfree(new_client); + kfree(data); exit: return err; } diff -urN linux-2.6.13-rc7/drivers/hwmon/fscpos.c linux-2.6.13/drivers/hwmon/fscpos.c --- linux-2.6.13-rc7/drivers/hwmon/fscpos.c 2005-08-28 17:04:40.807350771 -0700 +++ linux-2.6.13/drivers/hwmon/fscpos.c 2005-08-28 17:04:48.019667091 -0700 @@ -167,7 +167,7 @@ "experience to the module author.\n"); /* Supported value: 2 (clears the status) */ - fscpos_write_value(client, FSCPOS_REG_TEMP_STATE[nr], 2); + fscpos_write_value(client, FSCPOS_REG_TEMP_STATE[nr - 1], 2); return count; } diff -urN linux-2.6.13-rc7/drivers/hwmon/smsc47b397.c linux-2.6.13/drivers/hwmon/smsc47b397.c --- linux-2.6.13-rc7/drivers/hwmon/smsc47b397.c 2005-08-28 17:04:40.827351648 -0700 +++ linux-2.6.13/drivers/hwmon/smsc47b397.c 2005-08-28 17:04:48.039667969 -0700 @@ -298,7 +298,7 @@ return 0; error_free: - kfree(new_client); + kfree(data); error_release: release_region(addr, SMSC_EXTENT); return err; diff -urN linux-2.6.13-rc7/drivers/hwmon/smsc47m1.c linux-2.6.13/drivers/hwmon/smsc47m1.c --- linux-2.6.13-rc7/drivers/hwmon/smsc47m1.c 2005-08-28 17:04:40.828351692 -0700 +++ linux-2.6.13/drivers/hwmon/smsc47m1.c 2005-08-28 17:04:48.040668012 -0700 @@ -495,7 +495,7 @@ return 0; error_free: - kfree(new_client); + kfree(data); error_release: release_region(address, SMSC_EXTENT); return err; diff -urN linux-2.6.13-rc7/drivers/ieee1394/ohci1394.c linux-2.6.13/drivers/ieee1394/ohci1394.c --- linux-2.6.13-rc7/drivers/ieee1394/ohci1394.c 2005-08-28 17:04:40.975358139 -0700 +++ linux-2.6.13/drivers/ieee1394/ohci1394.c 2005-08-28 17:04:48.187674460 -0700 @@ -478,7 +478,6 @@ int num_ports, i; spin_lock_init(&ohci->phy_reg_lock); - spin_lock_init(&ohci->event_lock); /* Put some defaults to these undefined bus options */ buf = reg_read(ohci, OHCI1394_BusOptions); @@ -3402,7 +3401,14 @@ /* We hopefully don't have to pre-allocate IT DMA like we did * for IR DMA above. Allocate it on-demand and mark inactive. */ ohci->it_legacy_context.ohci = NULL; + spin_lock_init(&ohci->event_lock); + /* + * interrupts are disabled, all right, but... due to SA_SHIRQ we + * might get called anyway. We'll see no event, of course, but + * we need to get to that "no event", so enough should be initialized + * by that point. + */ if (request_irq(dev->irq, ohci_irq_handler, SA_SHIRQ, OHCI1394_DRIVER_NAME, ohci)) FAIL(-ENOMEM, "Failed to allocate shared interrupt %d", dev->irq); diff -urN linux-2.6.13-rc7/drivers/infiniband/core/uverbs_main.c linux-2.6.13/drivers/infiniband/core/uverbs_main.c --- linux-2.6.13-rc7/drivers/infiniband/core/uverbs_main.c 2005-08-28 17:04:41.001359279 -0700 +++ linux-2.6.13/drivers/infiniband/core/uverbs_main.c 2005-08-28 17:04:48.214675644 -0700 @@ -130,13 +130,14 @@ list_for_each_entry_safe(uobj, tmp, &context->mr_list, list) { struct ib_mr *mr = idr_find(&ib_uverbs_mr_idr, uobj->id); + struct ib_device *mrdev = mr->device; struct ib_umem_object *memobj; idr_remove(&ib_uverbs_mr_idr, uobj->id); ib_dereg_mr(mr); memobj = container_of(uobj, struct ib_umem_object, uobject); - ib_umem_release_on_close(mr->device, &memobj->umem); + ib_umem_release_on_close(mrdev, &memobj->umem); list_del(&uobj->list); kfree(memobj); diff -urN linux-2.6.13-rc7/drivers/isdn/capi/capifs.c linux-2.6.13/drivers/isdn/capi/capifs.c --- linux-2.6.13-rc7/drivers/isdn/capi/capifs.c 2005-06-17 12:48:29.000000000 -0700 +++ linux-2.6.13/drivers/isdn/capi/capifs.c 2005-08-28 17:04:48.266677925 -0700 @@ -191,8 +191,10 @@ err = register_filesystem(&capifs_fs_type); if (!err) { capifs_mnt = kern_mount(&capifs_fs_type); - if (IS_ERR(capifs_mnt)) + if (IS_ERR(capifs_mnt)) { err = PTR_ERR(capifs_mnt); + unregister_filesystem(&capifs_fs_type); + } } if (!err) printk(KERN_NOTICE "capifs: Rev %s\n", rev); diff -urN linux-2.6.13-rc7/drivers/md/md.c linux-2.6.13/drivers/md/md.c --- linux-2.6.13-rc7/drivers/md/md.c 2005-08-28 17:04:41.137365244 -0700 +++ linux-2.6.13/drivers/md/md.c 2005-08-28 17:04:48.351681653 -0700 @@ -1689,6 +1689,7 @@ mddev->pers = pers[pnum]; spin_unlock(&pers_lock); + mddev->recovery = 0; mddev->resync_max_sectors = mddev->size << 1; /* may be over-ridden by personality */ /* before we start the array running, initialise the bitmap */ @@ -4011,3 +4012,4 @@ EXPORT_SYMBOL(md_check_recovery); MODULE_LICENSE("GPL"); MODULE_ALIAS("md"); +MODULE_ALIAS_BLOCKDEV_MAJOR(MD_MAJOR); diff -urN linux-2.6.13-rc7/drivers/media/dvb/dvb-usb/dibusb-common.c linux-2.6.13/drivers/media/dvb/dvb-usb/dibusb-common.c --- linux-2.6.13-rc7/drivers/media/dvb/dvb-usb/dibusb-common.c 2005-08-28 17:04:41.185367350 -0700 +++ linux-2.6.13/drivers/media/dvb/dvb-usb/dibusb-common.c 2005-08-28 17:04:48.398683714 -0700 @@ -70,13 +70,22 @@ int dibusb2_0_streaming_ctrl(struct dvb_usb_device *d, int onoff) { - u8 b[2]; - b[0] = DIBUSB_REQ_SET_IOCTL; - b[1] = onoff ? DIBUSB_IOCTL_CMD_ENABLE_STREAM : DIBUSB_IOCTL_CMD_DISABLE_STREAM; + u8 b[3] = { 0 }; + int ret; - dvb_usb_generic_write(d,b,3); + if ((ret = dibusb_streaming_ctrl(d,onoff)) < 0) + return ret; - return dibusb_streaming_ctrl(d,onoff); + if (onoff) { + b[0] = DIBUSB_REQ_SET_STREAMING_MODE; + b[1] = 0x00; + if ((ret = dvb_usb_generic_write(d,b,2)) < 0) + return ret; + } + + b[0] = DIBUSB_REQ_SET_IOCTL; + b[1] = onoff ? DIBUSB_IOCTL_CMD_ENABLE_STREAM : DIBUSB_IOCTL_CMD_DISABLE_STREAM; + return dvb_usb_generic_write(d,b,3); } EXPORT_SYMBOL(dibusb2_0_streaming_ctrl); diff -urN linux-2.6.13-rc7/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c linux-2.6.13/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c --- linux-2.6.13-rc7/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c 2005-08-28 17:04:41.189367525 -0700 +++ linux-2.6.13/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c 2005-08-28 17:04:48.402683890 -0700 @@ -23,12 +23,12 @@ */ if (newfeedcount == 0) { deb_ts("stop feeding\n"); + dvb_usb_urb_kill(d); if (d->props.streaming_ctrl != NULL) if ((ret = d->props.streaming_ctrl(d,0))) err("error while stopping stream."); - dvb_usb_urb_kill(d); } d->feedcount = newfeedcount; @@ -44,6 +44,8 @@ * for reception. */ if (d->feedcount == onoff && d->feedcount > 0) { + deb_ts("submitting all URBs\n"); + dvb_usb_urb_submit(d); deb_ts("controlling pid parser\n"); if (d->props.caps & DVB_USB_HAS_PID_FILTER && @@ -59,7 +61,6 @@ return -ENODEV; } - dvb_usb_urb_submit(d); } return 0; } diff -urN linux-2.6.13-rc7/drivers/net/hamradio/6pack.c linux-2.6.13/drivers/net/hamradio/6pack.c --- linux-2.6.13-rc7/drivers/net/hamradio/6pack.c 2005-08-28 17:04:41.433378227 -0700 +++ linux-2.6.13/drivers/net/hamradio/6pack.c 2005-08-28 17:04:48.646694592 -0700 @@ -308,12 +308,6 @@ { struct sockaddr_ax25 *sa = addr; - if (sa->sax25_family != AF_AX25) - return -EINVAL; - - if (!sa->sax25_ndigis) - return -EINVAL; - spin_lock_irq(&dev->xmit_lock); memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN); spin_unlock_irq(&dev->xmit_lock); @@ -668,6 +662,9 @@ netif_start_queue(dev); init_timer(&sp->tx_t); + sp->tx_t.function = sp_xmit_on_air; + sp->tx_t.data = (unsigned long) sp; + init_timer(&sp->resync_t); spin_unlock_bh(&sp->lock); diff -urN linux-2.6.13-rc7/drivers/net/ibm_emac/ibm_emac_core.c linux-2.6.13/drivers/net/ibm_emac/ibm_emac_core.c --- linux-2.6.13-rc7/drivers/net/ibm_emac/ibm_emac_core.c 2005-08-28 17:04:41.439378490 -0700 +++ linux-2.6.13/drivers/net/ibm_emac/ibm_emac_core.c 2005-08-28 17:04:48.651694811 -0700 @@ -1253,7 +1253,7 @@ TAH_MR_CVR | TAH_MR_ST_768 | TAH_MR_TFS_10KB | TAH_MR_DTFP | TAH_MR_DIG); - iounmap(&tahp); + iounmap(tahp); return 0; } diff -urN linux-2.6.13-rc7/drivers/net/tg3.c linux-2.6.13/drivers/net/tg3.c --- linux-2.6.13-rc7/drivers/net/tg3.c 2005-08-28 17:04:41.547383227 -0700 +++ linux-2.6.13/drivers/net/tg3.c 2005-08-28 17:04:48.762699680 -0700 @@ -66,8 +66,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.36" -#define DRV_MODULE_RELDATE "August 19, 2005" +#define DRV_MODULE_VERSION "3.37" +#define DRV_MODULE_RELDATE "August 25, 2005" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -7865,8 +7865,6 @@ err = -EIO; - tg3_abort_hw(tp, 1); - tg3_reset_hw(tp); mac_mode = (tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK) | diff -urN linux-2.6.13-rc7/drivers/pci/setup-bus.c linux-2.6.13/drivers/pci/setup-bus.c --- linux-2.6.13-rc7/drivers/pci/setup-bus.c 2005-08-28 17:04:41.658388096 -0700 +++ linux-2.6.13/drivers/pci/setup-bus.c 2005-08-28 17:04:48.873704548 -0700 @@ -40,7 +40,7 @@ * FIXME: IO should be max 256 bytes. However, since we may * have a P2P bridge below a cardbus bridge, we need 4K. */ -#define CARDBUS_IO_SIZE (4096) +#define CARDBUS_IO_SIZE (256) #define CARDBUS_MEM_SIZE (32*1024*1024) static void __devinit diff -urN linux-2.6.13-rc7/drivers/pci/setup-res.c linux-2.6.13/drivers/pci/setup-res.c --- linux-2.6.13-rc7/drivers/pci/setup-res.c 2005-08-28 17:04:41.658388096 -0700 +++ linux-2.6.13/drivers/pci/setup-res.c 2005-08-28 17:04:48.873704548 -0700 @@ -53,7 +53,9 @@ if (resno < 6) { reg = PCI_BASE_ADDRESS_0 + 4 * resno; } else if (resno == PCI_ROM_RESOURCE) { - new |= res->flags & IORESOURCE_ROM_ENABLE; + if (!(res->flags & IORESOURCE_ROM_ENABLE)) + return; + new |= PCI_ROM_ADDRESS_ENABLE; reg = dev->rom_base_reg; } else { /* Hmm, non-standard resource. */ diff -urN linux-2.6.13-rc7/drivers/s390/cio/qdio.c linux-2.6.13/drivers/s390/cio/qdio.c --- linux-2.6.13-rc7/drivers/s390/cio/qdio.c 2005-08-28 17:04:41.698389850 -0700 +++ linux-2.6.13/drivers/s390/cio/qdio.c 2005-08-28 17:04:48.913706303 -0700 @@ -112,7 +112,7 @@ /***************** SCRUBBER HELPER ROUTINES **********************/ -static inline volatile __u64 +static inline __u64 qdio_get_micros(void) { return (get_clock() >> 10); /* time>>12 is microseconds */ diff -urN linux-2.6.13-rc7/drivers/s390/scsi/zfcp_aux.c linux-2.6.13/drivers/s390/scsi/zfcp_aux.c --- linux-2.6.13-rc7/drivers/s390/scsi/zfcp_aux.c 2005-08-28 17:04:41.720390815 -0700 +++ linux-2.6.13/drivers/s390/scsi/zfcp_aux.c 2005-08-28 17:04:48.935707267 -0700 @@ -1299,13 +1299,10 @@ zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status, u32 d_id) { - struct zfcp_port *port, *tmp_port; + struct zfcp_port *port; int check_wwpn; - scsi_id_t scsi_id; - int found; check_wwpn = !(status & ZFCP_STATUS_PORT_NO_WWPN); - /* * check that there is no port with this WWPN already in list */ @@ -1368,7 +1365,7 @@ } else { snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE, "0x%016llx", wwpn); - port->sysfs_device.parent = &adapter->ccw_device->dev; + port->sysfs_device.parent = &adapter->ccw_device->dev; } port->sysfs_device.release = zfcp_sysfs_port_release; dev_set_drvdata(&port->sysfs_device, port); @@ -1388,24 +1385,8 @@ zfcp_port_get(port); - scsi_id = 1; - found = 0; write_lock_irq(&zfcp_data.config_lock); - list_for_each_entry(tmp_port, &adapter->port_list_head, list) { - if (atomic_test_mask(ZFCP_STATUS_PORT_NO_SCSI_ID, - &tmp_port->status)) - continue; - if (tmp_port->scsi_id != scsi_id) { - found = 1; - break; - } - scsi_id++; - } - port->scsi_id = scsi_id; - if (found) - list_add_tail(&port->list, &tmp_port->list); - else - list_add_tail(&port->list, &adapter->port_list_head); + list_add_tail(&port->list, &adapter->port_list_head); atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status); atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING, &port->status); if (d_id == ZFCP_DID_DIRECTORY_SERVICE) @@ -1427,6 +1408,9 @@ list_del(&port->list); port->adapter->ports--; write_unlock_irq(&zfcp_data.config_lock); + if (port->rport) + fc_remote_port_delete(port->rport); + port->rport = NULL; zfcp_adapter_put(port->adapter); zfcp_sysfs_port_remove_files(&port->sysfs_device, atomic_read(&port->status)); diff -urN linux-2.6.13-rc7/drivers/s390/scsi/zfcp_ccw.c linux-2.6.13/drivers/s390/scsi/zfcp_ccw.c --- linux-2.6.13-rc7/drivers/s390/scsi/zfcp_ccw.c 2005-06-17 12:48:29.000000000 -0700 +++ linux-2.6.13/drivers/s390/scsi/zfcp_ccw.c 2005-08-28 17:04:48.935707267 -0700 @@ -202,9 +202,19 @@ zfcp_ccw_set_offline(struct ccw_device *ccw_device) { struct zfcp_adapter *adapter; + struct zfcp_port *port; + struct fc_rport *rport; down(&zfcp_data.config_sema); adapter = dev_get_drvdata(&ccw_device->dev); + /* might be racy, but we cannot take config_lock due to the fact that + fc_remote_port_delete might sleep */ + list_for_each_entry(port, &adapter->port_list_head, list) + if (port->rport) { + rport = port->rport; + port->rport = NULL; + fc_remote_port_delete(rport); + } zfcp_erp_adapter_shutdown(adapter, 0); zfcp_erp_wait(adapter); zfcp_adapter_scsi_unregister(adapter); diff -urN linux-2.6.13-rc7/drivers/s390/scsi/zfcp_def.h linux-2.6.13/drivers/s390/scsi/zfcp_def.h --- linux-2.6.13-rc7/drivers/s390/scsi/zfcp_def.h 2005-08-28 17:04:41.720390815 -0700 +++ linux-2.6.13/drivers/s390/scsi/zfcp_def.h 2005-08-28 17:04:48.936707311 -0700 @@ -906,6 +906,7 @@ */ struct zfcp_port { struct device sysfs_device; /* sysfs device */ + struct fc_rport *rport; /* rport of fc transport class */ struct list_head list; /* list of remote ports */ atomic_t refcount; /* reference count */ wait_queue_head_t remove_wq; /* can be used to wait for @@ -916,7 +917,6 @@ list */ u32 units; /* # of logical units in list */ atomic_t status; /* status of this remote port */ - scsi_id_t scsi_id; /* own SCSI ID */ wwn_t wwnn; /* WWNN if known */ wwn_t wwpn; /* WWPN */ fc_id_t d_id; /* D_ID */ diff -urN linux-2.6.13-rc7/drivers/s390/scsi/zfcp_erp.c linux-2.6.13/drivers/s390/scsi/zfcp_erp.c --- linux-2.6.13-rc7/drivers/s390/scsi/zfcp_erp.c 2005-08-28 17:04:41.723390947 -0700 +++ linux-2.6.13/drivers/s390/scsi/zfcp_erp.c 2005-08-28 17:04:48.938707399 -0700 @@ -3360,13 +3360,32 @@ if ((result == ZFCP_ERP_SUCCEEDED) && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY, &unit->status)) - && (!unit->device)) - scsi_add_device(unit->port->adapter->scsi_host, 0, - unit->port->scsi_id, unit->scsi_lun); + && !unit->device + && port->rport) + scsi_add_device(port->adapter->scsi_host, 0, + port->rport->scsi_target_id, + unit->scsi_lun); zfcp_unit_put(unit); break; case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: case ZFCP_ERP_ACTION_REOPEN_PORT: + if ((result == ZFCP_ERP_SUCCEEDED) + && !atomic_test_mask(ZFCP_STATUS_PORT_NO_WWPN, + &port->status) + && !port->rport) { + struct fc_rport_identifiers ids; + ids.node_name = port->wwnn; + ids.port_name = port->wwpn; + ids.port_id = port->d_id; + ids.roles = FC_RPORT_ROLE_FCP_TARGET; + port->rport = + fc_remote_port_add(adapter->scsi_host, 0, &ids); + if (!port->rport) + ZFCP_LOG_NORMAL("failed registration of rport" + "(adapter %s, wwpn=0x%016Lx)\n", + zfcp_get_busid_by_port(port), + port->wwpn); + } zfcp_port_put(port); break; case ZFCP_ERP_ACTION_REOPEN_ADAPTER: diff -urN linux-2.6.13-rc7/drivers/s390/scsi/zfcp_ext.h linux-2.6.13/drivers/s390/scsi/zfcp_ext.h --- linux-2.6.13-rc7/drivers/s390/scsi/zfcp_ext.h 2005-08-28 17:04:41.723390947 -0700 +++ linux-2.6.13/drivers/s390/scsi/zfcp_ext.h 2005-08-28 17:04:48.939707443 -0700 @@ -143,6 +143,8 @@ struct scsi_cmnd *, struct timer_list *); extern int zfcp_scsi_command_sync(struct zfcp_unit *, struct scsi_cmnd *, struct timer_list *); +extern void zfcp_set_fc_host_attrs(struct zfcp_adapter *); +extern void zfcp_set_fc_rport_attrs(struct zfcp_port *); extern struct scsi_transport_template *zfcp_transport_template; extern struct fc_function_template zfcp_transport_functions; diff -urN linux-2.6.13-rc7/drivers/s390/scsi/zfcp_fsf.c linux-2.6.13/drivers/s390/scsi/zfcp_fsf.c --- linux-2.6.13-rc7/drivers/s390/scsi/zfcp_fsf.c 2005-08-28 17:04:41.729391210 -0700 +++ linux-2.6.13/drivers/s390/scsi/zfcp_fsf.c 2005-08-28 17:04:48.945707706 -0700 @@ -2062,6 +2062,7 @@ zfcp_erp_adapter_shutdown(adapter, 0); return -EIO; } + zfcp_set_fc_host_attrs(adapter); return 0; } diff -urN linux-2.6.13-rc7/drivers/s390/scsi/zfcp_scsi.c linux-2.6.13/drivers/s390/scsi/zfcp_scsi.c --- linux-2.6.13-rc7/drivers/s390/scsi/zfcp_scsi.c 2005-08-28 17:04:41.731391298 -0700 +++ linux-2.6.13/drivers/s390/scsi/zfcp_scsi.c 2005-08-28 17:04:48.946707750 -0700 @@ -389,7 +389,7 @@ struct zfcp_unit *unit, *retval = NULL; list_for_each_entry(port, &adapter->port_list_head, list) { - if (id != port->scsi_id) + if (!port->rport || (id != port->rport->scsi_target_id)) continue; list_for_each_entry(unit, &port->unit_list_head, list) { if (lun == unit->scsi_lun) { @@ -408,7 +408,7 @@ struct zfcp_port *port; list_for_each_entry(port, &adapter->port_list_head, list) { - if (id == port->scsi_id) + if (port->rport && (id == port->rport->scsi_target_id)) return port; } return (struct zfcp_port *) NULL; @@ -634,7 +634,6 @@ { int retval; struct zfcp_unit *unit = (struct zfcp_unit *) scpnt->device->hostdata; - struct Scsi_Host *scsi_host = scpnt->device->host; if (!unit) { ZFCP_LOG_NORMAL("bug: Tried reset for nonexistent unit\n"); @@ -729,7 +728,6 @@ { int retval = 0; struct zfcp_unit *unit; - struct Scsi_Host *scsi_host = scpnt->device->host; unit = (struct zfcp_unit *) scpnt->device->hostdata; ZFCP_LOG_NORMAL("bus reset because of problems with " @@ -753,7 +751,6 @@ { int retval = 0; struct zfcp_unit *unit; - struct Scsi_Host *scsi_host = scpnt->device->host; unit = (struct zfcp_unit *) scpnt->device->hostdata; ZFCP_LOG_NORMAL("host reset because of problems with " @@ -833,6 +830,7 @@ shost = adapter->scsi_host; if (!shost) return; + fc_remove_host(shost); scsi_remove_host(shost); scsi_host_put(shost); adapter->scsi_host = NULL; @@ -906,6 +904,18 @@ read_unlock_irqrestore(&zfcp_data.config_lock, flags); } +void +zfcp_set_fc_host_attrs(struct zfcp_adapter *adapter) +{ + struct Scsi_Host *shost = adapter->scsi_host; + + fc_host_node_name(shost) = adapter->wwnn; + fc_host_port_name(shost) = adapter->wwpn; + strncpy(fc_host_serial_number(shost), adapter->serial_number, + min(FC_SERIAL_NUMBER_SIZE, 32)); + fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3; +} + struct fc_function_template zfcp_transport_functions = { .get_starget_port_id = zfcp_get_port_id, .get_starget_port_name = zfcp_get_port_name, @@ -913,6 +923,11 @@ .show_starget_port_id = 1, .show_starget_port_name = 1, .show_starget_node_name = 1, + .show_rport_supported_classes = 1, + .show_host_node_name = 1, + .show_host_port_name = 1, + .show_host_supported_classes = 1, + .show_host_serial_number = 1, }; /** diff -urN linux-2.6.13-rc7/drivers/s390/scsi/zfcp_sysfs_port.c linux-2.6.13/drivers/s390/scsi/zfcp_sysfs_port.c --- linux-2.6.13-rc7/drivers/s390/scsi/zfcp_sysfs_port.c 2005-08-28 17:04:41.732391341 -0700 +++ linux-2.6.13/drivers/s390/scsi/zfcp_sysfs_port.c 2005-08-28 17:04:48.947707794 -0700 @@ -67,7 +67,6 @@ ZFCP_DEFINE_PORT_ATTR(status, "0x%08x\n", atomic_read(&port->status)); ZFCP_DEFINE_PORT_ATTR(wwnn, "0x%016llx\n", port->wwnn); ZFCP_DEFINE_PORT_ATTR(d_id, "0x%06x\n", port->d_id); -ZFCP_DEFINE_PORT_ATTR(scsi_id, "0x%x\n", port->scsi_id); ZFCP_DEFINE_PORT_ATTR(in_recovery, "%d\n", atomic_test_mask (ZFCP_STATUS_COMMON_ERP_INUSE, &port->status)); ZFCP_DEFINE_PORT_ATTR(access_denied, "%d\n", atomic_test_mask @@ -263,7 +262,6 @@ static struct attribute *zfcp_port_no_ns_attrs[] = { &dev_attr_unit_add.attr, &dev_attr_unit_remove.attr, - &dev_attr_scsi_id.attr, NULL }; diff -urN linux-2.6.13-rc7/drivers/scsi/sg.c linux-2.6.13/drivers/scsi/sg.c --- linux-2.6.13-rc7/drivers/scsi/sg.c 2005-08-28 17:04:42.209412263 -0700 +++ linux-2.6.13/drivers/scsi/sg.c 2005-08-28 17:04:49.424728715 -0700 @@ -2971,23 +2971,22 @@ { struct sg_proc_deviter * it = kmalloc(sizeof(*it), GFP_KERNEL); + s->private = it; if (! it) return NULL; + if (NULL == sg_dev_arr) - goto err1; + return NULL; it->index = *pos; it->max = sg_last_dev(); if (it->index >= it->max) - goto err1; + return NULL; return it; -err1: - kfree(it); - return NULL; } static void * dev_seq_next(struct seq_file *s, void *v, loff_t *pos) { - struct sg_proc_deviter * it = (struct sg_proc_deviter *) v; + struct sg_proc_deviter * it = s->private; *pos = ++it->index; return (it->index < it->max) ? it : NULL; @@ -2995,7 +2994,7 @@ static void dev_seq_stop(struct seq_file *s, void *v) { - kfree (v); + kfree(s->private); } static int sg_proc_open_dev(struct inode *inode, struct file *file) diff -urN linux-2.6.13-rc7/fs/cifs/file.c linux-2.6.13/fs/cifs/file.c --- linux-2.6.13-rc7/fs/cifs/file.c 2005-06-17 12:48:29.000000000 -0700 +++ linux-2.6.13/fs/cifs/file.c 2005-08-28 17:04:49.671739548 -0700 @@ -643,7 +643,7 @@ netfid, length, pfLock->fl_start, numUnlock, numLock, lockType, wait_flag); - if (rc == 0 && (pfLock->fl_flags & FL_POSIX)) + if (pfLock->fl_flags & FL_POSIX) posix_lock_file_wait(file, pfLock); FreeXid(xid); return rc; diff -urN linux-2.6.13-rc7/fs/hppfs/hppfs_kern.c linux-2.6.13/fs/hppfs/hppfs_kern.c --- linux-2.6.13-rc7/fs/hppfs/hppfs_kern.c 2005-08-28 17:04:42.491424631 -0700 +++ linux-2.6.13/fs/hppfs/hppfs_kern.c 2005-08-28 17:04:49.703740952 -0700 @@ -38,7 +38,7 @@ static inline struct hppfs_inode_info *HPPFS_I(struct inode *inode) { - return(list_entry(inode, struct hppfs_inode_info, vfs_inode)); + return container_of(inode, struct hppfs_inode_info, vfs_inode); } #define HPPFS_SUPER_MAGIC 0xb00000ee @@ -662,42 +662,36 @@ { struct file *proc_file; struct dentry *proc_dentry; - int (*readlink)(struct dentry *, char *, int); - int err, n; + int ret; proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry; proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY); - err = PTR_ERR(proc_dentry); - if(IS_ERR(proc_dentry)) - return(err); + if (IS_ERR(proc_file)) + return PTR_ERR(proc_file); - readlink = proc_dentry->d_inode->i_op->readlink; - n = (*readlink)(proc_dentry, buffer, buflen); + ret = proc_dentry->d_inode->i_op->readlink(proc_dentry, buffer, buflen); fput(proc_file); - return(n); + return ret; } -static int hppfs_follow_link(struct dentry *dentry, struct nameidata *nd) +static void* hppfs_follow_link(struct dentry *dentry, struct nameidata *nd) { struct file *proc_file; struct dentry *proc_dentry; - int (*follow_link)(struct dentry *, struct nameidata *); - int err, n; + void *ret; proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry; proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY); - err = PTR_ERR(proc_dentry); - if(IS_ERR(proc_dentry)) - return(err); + if (IS_ERR(proc_file)) + return proc_file; - follow_link = proc_dentry->d_inode->i_op->follow_link; - n = (*follow_link)(proc_dentry, nd); + ret = proc_dentry->d_inode->i_op->follow_link(proc_dentry, nd); fput(proc_file); - return(n); + return ret; } static struct inode_operations hppfs_dir_iops = { diff -urN linux-2.6.13-rc7/fs/inotify.c linux-2.6.13/fs/inotify.c --- linux-2.6.13-rc7/fs/inotify.c 2005-08-28 17:04:42.494424763 -0700 +++ linux-2.6.13/fs/inotify.c 2005-08-28 17:04:49.706741083 -0700 @@ -353,7 +353,7 @@ do { if (unlikely(!idr_pre_get(&dev->idr, GFP_KERNEL))) return -ENOSPC; - ret = idr_get_new_above(&dev->idr, watch, dev->last_wd, &watch->wd); + ret = idr_get_new_above(&dev->idr, watch, dev->last_wd+1, &watch->wd); } while (ret == -EAGAIN); return ret; diff -urN linux-2.6.13-rc7/fs/sysfs/inode.c linux-2.6.13/fs/sysfs/inode.c --- linux-2.6.13-rc7/fs/sysfs/inode.c 2005-08-28 17:04:42.700433798 -0700 +++ linux-2.6.13/fs/sysfs/inode.c 2005-08-28 17:04:49.910750031 -0700 @@ -228,6 +228,10 @@ struct sysfs_dirent * sd; struct sysfs_dirent * parent_sd = dir->d_fsdata; + if (dir->d_inode == NULL) + /* no inode means this hasn't been made visible yet */ + return; + down(&dir->d_inode->i_sem); list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { if (!sd->s_element) diff -urN linux-2.6.13-rc7/include/asm-m68k/page.h linux-2.6.13/include/asm-m68k/page.h --- linux-2.6.13-rc7/include/asm-m68k/page.h 2005-06-17 12:48:29.000000000 -0700 +++ linux-2.6.13/include/asm-m68k/page.h 2005-08-28 17:04:50.134759855 -0700 @@ -138,13 +138,13 @@ #define __pa(vaddr) ((unsigned long)(vaddr)+m68k_memoffset) #define __va(paddr) ((void *)((unsigned long)(paddr)-m68k_memoffset)) #else -#define __pa(vaddr) virt_to_phys((void *)vaddr) -#define __va(paddr) phys_to_virt((unsigned long)paddr) +#define __pa(vaddr) virt_to_phys((void *)(vaddr)) +#define __va(paddr) phys_to_virt((unsigned long)(paddr)) #endif #else /* !CONFIG_SUN3 */ /* This #define is a horrible hack to suppress lots of warnings. --m */ -#define __pa(x) ___pa((unsigned long)x) +#define __pa(x) ___pa((unsigned long)(x)) static inline unsigned long ___pa(unsigned long x) { if(x == 0) diff -urN linux-2.6.13-rc7/include/asm-ppc64/bug.h linux-2.6.13/include/asm-ppc64/bug.h --- linux-2.6.13-rc7/include/asm-ppc64/bug.h 2005-06-17 12:48:29.000000000 -0700 +++ linux-2.6.13/include/asm-ppc64/bug.h 2005-08-28 17:04:50.151760601 -0700 @@ -43,8 +43,8 @@ ".section __bug_table,\"a\"\n\t" \ " .llong 1b,%1,%2,%3\n" \ ".previous" \ - : : "r" (x), "i" (__LINE__), "i" (__FILE__), \ - "i" (__FUNCTION__)); \ + : : "r" ((long long)(x)), "i" (__LINE__), \ + "i" (__FILE__), "i" (__FUNCTION__)); \ } while (0) #define WARN_ON(x) do { \ @@ -53,7 +53,8 @@ ".section __bug_table,\"a\"\n\t" \ " .llong 1b,%1,%2,%3\n" \ ".previous" \ - : : "r" (x), "i" (__LINE__ + BUG_WARNING_TRAP), \ + : : "r" ((long long)(x)), \ + "i" (__LINE__ + BUG_WARNING_TRAP), \ "i" (__FILE__), "i" (__FUNCTION__)); \ } while (0) diff -urN linux-2.6.13-rc7/include/asm-x86_64/e820.h linux-2.6.13/include/asm-x86_64/e820.h --- linux-2.6.13-rc7/include/asm-x86_64/e820.h 2005-06-17 12:48:29.000000000 -0700 +++ linux-2.6.13/include/asm-x86_64/e820.h 2005-08-28 17:04:50.203762882 -0700 @@ -51,6 +51,8 @@ extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end); extern void e820_setup_gap(void); +extern unsigned long e820_hole_size(unsigned long start_pfn, + unsigned long end_pfn); extern void __init parse_memopt(char *p, char **end); diff -urN linux-2.6.13-rc7/kernel/cpuset.c linux-2.6.13/kernel/cpuset.c --- linux-2.6.13-rc7/kernel/cpuset.c 2005-08-28 17:04:43.167454281 -0700 +++ linux-2.6.13/kernel/cpuset.c 2005-08-28 17:04:50.373770338 -0700 @@ -627,6 +627,14 @@ * Call with cpuset_sem held. May nest a call to the * lock_cpu_hotplug()/unlock_cpu_hotplug() pair. */ + +/* + * Hack to avoid 2.6.13 partial node dynamic sched domain bug. + * Disable letting 'cpu_exclusive' cpusets define dynamic sched + * domains, until the sched domain can handle partial nodes. + * Remove this #if hackery when sched domains fixed. + */ +#if 0 static void update_cpu_domains(struct cpuset *cur) { struct cpuset *c, *par = cur->parent; @@ -636,23 +644,6 @@ return; /* - * Hack to avoid 2.6.13 partial node dynamic sched domain bug. - * Require the 'cpu_exclusive' cpuset to include all (or none) - * of the CPUs on each node, or return w/o changing sched domains. - * Remove this hack when dynamic sched domains fixed. - */ - { - int i, j; - - for_each_cpu_mask(i, cur->cpus_allowed) { - for_each_cpu_mask(j, node_to_cpumask(cpu_to_node(i))) { - if (!cpu_isset(j, cur->cpus_allowed)) - return; - } - } - } - - /* * Get all cpus from parent's cpus_allowed not part of exclusive * children */ @@ -684,6 +675,11 @@ partition_sched_domains(&pspan, &cspan); unlock_cpu_hotplug(); } +#else +static void update_cpu_domains(struct cpuset *cur) +{ +} +#endif static int update_cpumask(struct cpuset *cs, char *buf) { diff -urN linux-2.6.13-rc7/lib/idr.c linux-2.6.13/lib/idr.c --- linux-2.6.13-rc7/lib/idr.c 2005-08-28 17:04:43.196455553 -0700 +++ linux-2.6.13/lib/idr.c 2005-08-28 17:04:50.401771566 -0700 @@ -207,7 +207,7 @@ } /** - * idr_get_new_above - allocate new idr entry above a start id + * idr_get_new_above - allocate new idr entry above or equal to a start id * @idp: idr handle * @ptr: pointer you want associated with the ide * @start_id: id to start search at diff -urN linux-2.6.13-rc7/net/ipv4/fib_trie.c linux-2.6.13/net/ipv4/fib_trie.c --- linux-2.6.13-rc7/net/ipv4/fib_trie.c 2005-08-28 17:04:43.264458535 -0700 +++ linux-2.6.13/net/ipv4/fib_trie.c 2005-08-28 17:04:50.467774460 -0700 @@ -1333,9 +1333,9 @@ } static inline int check_leaf(struct trie *t, struct leaf *l, t_key key, int *plen, const struct flowi *flp, - struct fib_result *res, int *err) + struct fib_result *res) { - int i; + int err, i; t_key mask; struct leaf_info *li; struct hlist_head *hhead = &l->list; @@ -1348,18 +1348,18 @@ if (l->key != (key & mask)) continue; - if (((*err) = fib_semantic_match(&li->falh, flp, res, l->key, mask, i)) == 0) { + if ((err = fib_semantic_match(&li->falh, flp, res, l->key, mask, i)) <= 0) { *plen = i; #ifdef CONFIG_IP_FIB_TRIE_STATS t->stats.semantic_match_passed++; #endif - return 1; + return err; } #ifdef CONFIG_IP_FIB_TRIE_STATS t->stats.semantic_match_miss++; #endif } - return 0; + return 1; } static int @@ -1386,7 +1386,7 @@ /* Just a leaf? */ if (IS_LEAF(n)) { - if (check_leaf(t, (struct leaf *)n, key, &plen, flp, res, &ret)) + if ((ret = check_leaf(t, (struct leaf *)n, key, &plen, flp, res)) <= 0) goto found; goto failed; } @@ -1508,7 +1508,7 @@ continue; } if (IS_LEAF(n)) { - if (check_leaf(t, (struct leaf *)n, key, &plen, flp, res, &ret)) + if ((ret = check_leaf(t, (struct leaf *)n, key, &plen, flp, res)) <= 0) goto found; } backtrace: