diff options
56 files changed, 389 insertions, 177 deletions
@@ -1,8 +1,8 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 17 | 3 | SUBLEVEL = 17 |
4 | EXTRAVERSION =-rc4 | 4 | EXTRAVERSION =-rc5 |
5 | NAME=Sliding Snow Leopard | 5 | NAME=Lordi Rules |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
8 | # To see a list of typical targets execute "make help" | 8 | # To see a list of typical targets execute "make help" |
diff --git a/arch/i386/power/cpu.c b/arch/i386/power/cpu.c index 50a0bef8c85f..79b2370c7fac 100644 --- a/arch/i386/power/cpu.c +++ b/arch/i386/power/cpu.c | |||
@@ -92,7 +92,7 @@ void __restore_processor_state(struct saved_context *ctxt) | |||
92 | write_cr4(ctxt->cr4); | 92 | write_cr4(ctxt->cr4); |
93 | write_cr3(ctxt->cr3); | 93 | write_cr3(ctxt->cr3); |
94 | write_cr2(ctxt->cr2); | 94 | write_cr2(ctxt->cr2); |
95 | write_cr2(ctxt->cr0); | 95 | write_cr0(ctxt->cr0); |
96 | 96 | ||
97 | /* | 97 | /* |
98 | * now restore the descriptor tables to their proper values | 98 | * now restore the descriptor tables to their proper values |
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S index cf56a1d499ff..26ed1f5ef16e 100644 --- a/arch/powerpc/kernel/systbl.S +++ b/arch/powerpc/kernel/systbl.S | |||
@@ -338,6 +338,8 @@ SYSCALL(symlinkat) | |||
338 | SYSCALL(readlinkat) | 338 | SYSCALL(readlinkat) |
339 | SYSCALL(fchmodat) | 339 | SYSCALL(fchmodat) |
340 | SYSCALL(faccessat) | 340 | SYSCALL(faccessat) |
341 | COMPAT_SYS(get_robust_list) | ||
342 | COMPAT_SYS(set_robust_list) | ||
341 | 343 | ||
342 | /* | 344 | /* |
343 | * please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c | 345 | * please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c |
diff --git a/arch/powerpc/platforms/cell/spu_callbacks.c b/arch/powerpc/platforms/cell/spu_callbacks.c index 95b36430aa0f..b47fcc5ddb78 100644 --- a/arch/powerpc/platforms/cell/spu_callbacks.c +++ b/arch/powerpc/platforms/cell/spu_callbacks.c | |||
@@ -258,6 +258,7 @@ void *spu_syscall_table[] = { | |||
258 | [__NR_futex] sys_futex, | 258 | [__NR_futex] sys_futex, |
259 | [__NR_sched_setaffinity] sys_sched_setaffinity, | 259 | [__NR_sched_setaffinity] sys_sched_setaffinity, |
260 | [__NR_sched_getaffinity] sys_sched_getaffinity, | 260 | [__NR_sched_getaffinity] sys_sched_getaffinity, |
261 | [224] sys_ni_syscall, | ||
261 | [__NR_tuxcall] sys_ni_syscall, | 262 | [__NR_tuxcall] sys_ni_syscall, |
262 | [226] sys_ni_syscall, | 263 | [226] sys_ni_syscall, |
263 | [__NR_io_setup] sys_io_setup, | 264 | [__NR_io_setup] sys_io_setup, |
@@ -332,19 +333,21 @@ void *spu_syscall_table[] = { | |||
332 | [__NR_readlinkat] sys_readlinkat, | 333 | [__NR_readlinkat] sys_readlinkat, |
333 | [__NR_fchmodat] sys_fchmodat, | 334 | [__NR_fchmodat] sys_fchmodat, |
334 | [__NR_faccessat] sys_faccessat, | 335 | [__NR_faccessat] sys_faccessat, |
336 | [__NR_get_robust_list] sys_get_robust_list, | ||
337 | [__NR_set_robust_list] sys_set_robust_list, | ||
335 | }; | 338 | }; |
336 | 339 | ||
337 | long spu_sys_callback(struct spu_syscall_block *s) | 340 | long spu_sys_callback(struct spu_syscall_block *s) |
338 | { | 341 | { |
339 | long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6); | 342 | long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6); |
340 | 343 | ||
341 | syscall = spu_syscall_table[s->nr_ret]; | ||
342 | |||
343 | if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) { | 344 | if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) { |
344 | pr_debug("%s: invalid syscall #%ld", __FUNCTION__, s->nr_ret); | 345 | pr_debug("%s: invalid syscall #%ld", __FUNCTION__, s->nr_ret); |
345 | return -ENOSYS; | 346 | return -ENOSYS; |
346 | } | 347 | } |
347 | 348 | ||
349 | syscall = spu_syscall_table[s->nr_ret]; | ||
350 | |||
348 | #ifdef DEBUG | 351 | #ifdef DEBUG |
349 | print_symbol(KERN_DEBUG "SPU-syscall %s:", (unsigned long)syscall); | 352 | print_symbol(KERN_DEBUG "SPU-syscall %s:", (unsigned long)syscall); |
350 | printk("syscall%ld(%lx, %lx, %lx, %lx, %lx, %lx)\n", | 353 | printk("syscall%ld(%lx, %lx, %lx, %lx, %lx, %lx)\n", |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index ce19ad4e92ec..2a6c6efb6865 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -272,7 +272,7 @@ static inline void stop_hz_timer(void) | |||
272 | next = next_timer_interrupt(); | 272 | next = next_timer_interrupt(); |
273 | do { | 273 | do { |
274 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | 274 | seq = read_seqbegin_irqsave(&xtime_lock, flags); |
275 | timer = (__u64 next) - (__u64 jiffies) + jiffies_64; | 275 | timer = ((__u64) next) - ((__u64) jiffies) + jiffies_64; |
276 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); | 276 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); |
277 | todval = -1ULL; | 277 | todval = -1ULL; |
278 | /* Be careful about overflows. */ | 278 | /* Be careful about overflows. */ |
diff --git a/arch/sparc64/kernel/pci_iommu.c b/arch/sparc64/kernel/pci_iommu.c index 8efbc139769d..82e5455134c6 100644 --- a/arch/sparc64/kernel/pci_iommu.c +++ b/arch/sparc64/kernel/pci_iommu.c | |||
@@ -218,7 +218,7 @@ static inline void iommu_free_ctx(struct pci_iommu *iommu, int ctx) | |||
218 | * DMA for PCI device PDEV. Return non-NULL cpu-side address if | 218 | * DMA for PCI device PDEV. Return non-NULL cpu-side address if |
219 | * successful and set *DMA_ADDRP to the PCI side dma address. | 219 | * successful and set *DMA_ADDRP to the PCI side dma address. |
220 | */ | 220 | */ |
221 | static void *pci_4u_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp) | 221 | static void *pci_4u_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp, gfp_t gfp) |
222 | { | 222 | { |
223 | struct pcidev_cookie *pcp; | 223 | struct pcidev_cookie *pcp; |
224 | struct pci_iommu *iommu; | 224 | struct pci_iommu *iommu; |
@@ -232,7 +232,7 @@ static void *pci_4u_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr | |||
232 | if (order >= 10) | 232 | if (order >= 10) |
233 | return NULL; | 233 | return NULL; |
234 | 234 | ||
235 | first_page = __get_free_pages(GFP_ATOMIC, order); | 235 | first_page = __get_free_pages(gfp, order); |
236 | if (first_page == 0UL) | 236 | if (first_page == 0UL) |
237 | return NULL; | 237 | return NULL; |
238 | memset((char *)first_page, 0, PAGE_SIZE << order); | 238 | memset((char *)first_page, 0, PAGE_SIZE << order); |
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index 9e94db2573a2..2b7a1f316a93 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -154,7 +154,7 @@ static void pci_arena_free(struct pci_iommu_arena *arena, unsigned long base, un | |||
154 | __clear_bit(i, arena->map); | 154 | __clear_bit(i, arena->map); |
155 | } | 155 | } |
156 | 156 | ||
157 | static void *pci_4v_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp) | 157 | static void *pci_4v_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp, gfp_t gfp) |
158 | { | 158 | { |
159 | struct pcidev_cookie *pcp; | 159 | struct pcidev_cookie *pcp; |
160 | struct pci_iommu *iommu; | 160 | struct pci_iommu *iommu; |
@@ -169,7 +169,7 @@ static void *pci_4v_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr | |||
169 | 169 | ||
170 | npages = size >> IO_PAGE_SHIFT; | 170 | npages = size >> IO_PAGE_SHIFT; |
171 | 171 | ||
172 | first_page = __get_free_pages(GFP_ATOMIC, order); | 172 | first_page = __get_free_pages(gfp, order); |
173 | if (unlikely(first_page == 0UL)) | 173 | if (unlikely(first_page == 0UL)) |
174 | return NULL; | 174 | return NULL; |
175 | 175 | ||
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index eac48bec1479..7eb36c53f4b7 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -3452,7 +3452,12 @@ void end_that_request_last(struct request *req, int uptodate) | |||
3452 | if (unlikely(laptop_mode) && blk_fs_request(req)) | 3452 | if (unlikely(laptop_mode) && blk_fs_request(req)) |
3453 | laptop_io_completion(); | 3453 | laptop_io_completion(); |
3454 | 3454 | ||
3455 | if (disk && blk_fs_request(req)) { | 3455 | /* |
3456 | * Account IO completion. bar_rq isn't accounted as a normal | ||
3457 | * IO on queueing nor completion. Accounting the containing | ||
3458 | * request is enough. | ||
3459 | */ | ||
3460 | if (disk && blk_fs_request(req) && req != &req->q->bar_rq) { | ||
3456 | unsigned long duration = jiffies - req->start_time; | 3461 | unsigned long duration = jiffies - req->start_time; |
3457 | const int rw = rq_data_dir(req); | 3462 | const int rw = rq_data_dir(req); |
3458 | 3463 | ||
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index f07637a8f88f..a88b94a82b14 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -398,7 +398,7 @@ int tty_insert_flip_string_flags(struct tty_struct *tty, | |||
398 | while (unlikely(size > copied)); | 398 | while (unlikely(size > copied)); |
399 | return copied; | 399 | return copied; |
400 | } | 400 | } |
401 | EXPORT_SYMBOL_GPL(tty_insert_flip_string_flags); | 401 | EXPORT_SYMBOL(tty_insert_flip_string_flags); |
402 | 402 | ||
403 | void tty_schedule_flip(struct tty_struct *tty) | 403 | void tty_schedule_flip(struct tty_struct *tty) |
404 | { | 404 | { |
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index 3697edafd6d2..dddcdae736ac 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
@@ -1905,19 +1905,19 @@ static void __exit infinipath_cleanup(void) | |||
1905 | } else | 1905 | } else |
1906 | ipath_dbg("irq is 0, not doing free_irq " | 1906 | ipath_dbg("irq is 0, not doing free_irq " |
1907 | "for unit %u\n", dd->ipath_unit); | 1907 | "for unit %u\n", dd->ipath_unit); |
1908 | dd->pcidev = NULL; | ||
1909 | } | ||
1910 | 1908 | ||
1911 | /* | 1909 | /* |
1912 | * we check for NULL here, because it's outside the kregbase | 1910 | * we check for NULL here, because it's outside |
1913 | * check, and we need to call it after the free_irq. Thus | 1911 | * the kregbase check, and we need to call it |
1914 | * it's possible that the function pointers were never | 1912 | * after the free_irq. Thus it's possible that |
1915 | * initialized. | 1913 | * the function pointers were never initialized. |
1916 | */ | 1914 | */ |
1917 | if (dd->ipath_f_cleanup) | 1915 | if (dd->ipath_f_cleanup) |
1918 | /* clean up chip-specific stuff */ | 1916 | /* clean up chip-specific stuff */ |
1919 | dd->ipath_f_cleanup(dd); | 1917 | dd->ipath_f_cleanup(dd); |
1920 | 1918 | ||
1919 | dd->pcidev = NULL; | ||
1920 | } | ||
1921 | spin_lock_irqsave(&ipath_devs_lock, flags); | 1921 | spin_lock_irqsave(&ipath_devs_lock, flags); |
1922 | } | 1922 | } |
1923 | 1923 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_eeprom.c b/drivers/infiniband/hw/ipath/ipath_eeprom.c index f11a900e8cd7..a2f1ceafcca9 100644 --- a/drivers/infiniband/hw/ipath/ipath_eeprom.c +++ b/drivers/infiniband/hw/ipath/ipath_eeprom.c | |||
@@ -505,11 +505,10 @@ static u8 flash_csum(struct ipath_flash *ifp, int adjust) | |||
505 | * ipath_get_guid - get the GUID from the i2c device | 505 | * ipath_get_guid - get the GUID from the i2c device |
506 | * @dd: the infinipath device | 506 | * @dd: the infinipath device |
507 | * | 507 | * |
508 | * When we add the multi-chip support, we will probably have to add | 508 | * We have the capability to use the ipath_nguid field, and get |
509 | * the ability to use the number of guids field, and get the guid from | 509 | * the guid from the first chip's flash, to use for all of them. |
510 | * the first chip's flash, to use for all of them. | ||
511 | */ | 510 | */ |
512 | void ipath_get_guid(struct ipath_devdata *dd) | 511 | void ipath_get_eeprom_info(struct ipath_devdata *dd) |
513 | { | 512 | { |
514 | void *buf; | 513 | void *buf; |
515 | struct ipath_flash *ifp; | 514 | struct ipath_flash *ifp; |
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index c347191f02bf..ada267e41f6c 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c | |||
@@ -139,7 +139,7 @@ static int ipath_get_base_info(struct ipath_portdata *pd, | |||
139 | kinfo->spi_piosize = dd->ipath_ibmaxlen; | 139 | kinfo->spi_piosize = dd->ipath_ibmaxlen; |
140 | kinfo->spi_mtu = dd->ipath_ibmaxlen; /* maxlen, not ibmtu */ | 140 | kinfo->spi_mtu = dd->ipath_ibmaxlen; /* maxlen, not ibmtu */ |
141 | kinfo->spi_port = pd->port_port; | 141 | kinfo->spi_port = pd->port_port; |
142 | kinfo->spi_sw_version = IPATH_USER_SWVERSION; | 142 | kinfo->spi_sw_version = IPATH_KERN_SWVERSION; |
143 | kinfo->spi_hw_version = dd->ipath_revision; | 143 | kinfo->spi_hw_version = dd->ipath_revision; |
144 | 144 | ||
145 | if (copy_to_user(ubase, kinfo, sizeof(*kinfo))) | 145 | if (copy_to_user(ubase, kinfo, sizeof(*kinfo))) |
@@ -1224,6 +1224,10 @@ static unsigned int ipath_poll(struct file *fp, | |||
1224 | 1224 | ||
1225 | if (tail == head) { | 1225 | if (tail == head) { |
1226 | set_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag); | 1226 | set_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag); |
1227 | if(dd->ipath_rhdrhead_intr_off) /* arm rcv interrupt */ | ||
1228 | (void)ipath_write_ureg(dd, ur_rcvhdrhead, | ||
1229 | dd->ipath_rhdrhead_intr_off | ||
1230 | | head, pd->port_port); | ||
1227 | poll_wait(fp, &pd->port_wait, pt); | 1231 | poll_wait(fp, &pd->port_wait, pt); |
1228 | 1232 | ||
1229 | if (test_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag)) { | 1233 | if (test_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag)) { |
diff --git a/drivers/infiniband/hw/ipath/ipath_ht400.c b/drivers/infiniband/hw/ipath/ipath_ht400.c index 4652435998f3..fac0a2b74de2 100644 --- a/drivers/infiniband/hw/ipath/ipath_ht400.c +++ b/drivers/infiniband/hw/ipath/ipath_ht400.c | |||
@@ -607,7 +607,12 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name, | |||
607 | case 4: /* Ponderosa is one of the bringup boards */ | 607 | case 4: /* Ponderosa is one of the bringup boards */ |
608 | n = "Ponderosa"; | 608 | n = "Ponderosa"; |
609 | break; | 609 | break; |
610 | case 5: /* HT-460 original production board */ | 610 | case 5: |
611 | /* | ||
612 | * HT-460 original production board; two production levels, with | ||
613 | * different serial number ranges. See ipath_ht_early_init() for | ||
614 | * case where we enable IPATH_GPIO_INTR for later serial # range. | ||
615 | */ | ||
611 | n = "InfiniPath_HT-460"; | 616 | n = "InfiniPath_HT-460"; |
612 | break; | 617 | break; |
613 | case 6: | 618 | case 6: |
@@ -642,7 +647,7 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name, | |||
642 | if (n) | 647 | if (n) |
643 | snprintf(name, namelen, "%s", n); | 648 | snprintf(name, namelen, "%s", n); |
644 | 649 | ||
645 | if (dd->ipath_majrev != 3 || dd->ipath_minrev != 2) { | 650 | if (dd->ipath_majrev != 3 || (dd->ipath_minrev < 2 || dd->ipath_minrev > 3)) { |
646 | /* | 651 | /* |
647 | * This version of the driver only supports the HT-400 | 652 | * This version of the driver only supports the HT-400 |
648 | * Rev 3.2 | 653 | * Rev 3.2 |
@@ -1520,6 +1525,18 @@ static int ipath_ht_early_init(struct ipath_devdata *dd) | |||
1520 | */ | 1525 | */ |
1521 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, | 1526 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, |
1522 | INFINIPATH_S_ABORT); | 1527 | INFINIPATH_S_ABORT); |
1528 | |||
1529 | ipath_get_eeprom_info(dd); | ||
1530 | if(dd->ipath_boardrev == 5 && dd->ipath_serial[0] == '1' && | ||
1531 | dd->ipath_serial[1] == '2' && dd->ipath_serial[2] == '8') { | ||
1532 | /* | ||
1533 | * Later production HT-460 has same changes as HT-465, so | ||
1534 | * can use GPIO interrupts. They have serial #'s starting | ||
1535 | * with 128, rather than 112. | ||
1536 | */ | ||
1537 | dd->ipath_flags |= IPATH_GPIO_INTR; | ||
1538 | dd->ipath_flags &= ~IPATH_POLL_RX_INTR; | ||
1539 | } | ||
1523 | return 0; | 1540 | return 0; |
1524 | } | 1541 | } |
1525 | 1542 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c index 16f640e1c16e..dc83250d26a6 100644 --- a/drivers/infiniband/hw/ipath/ipath_init_chip.c +++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c | |||
@@ -879,7 +879,6 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit) | |||
879 | 879 | ||
880 | done: | 880 | done: |
881 | if (!ret) { | 881 | if (!ret) { |
882 | ipath_get_guid(dd); | ||
883 | *dd->ipath_statusp |= IPATH_STATUS_CHIP_PRESENT; | 882 | *dd->ipath_statusp |= IPATH_STATUS_CHIP_PRESENT; |
884 | if (!dd->ipath_f_intrsetup(dd)) { | 883 | if (!dd->ipath_f_intrsetup(dd)) { |
885 | /* now we can enable all interrupts from the chip */ | 884 | /* now we can enable all interrupts from the chip */ |
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index e6507f8115bc..5d92d57b6f54 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h | |||
@@ -650,7 +650,7 @@ u32 __iomem *ipath_getpiobuf(struct ipath_devdata *, u32 *); | |||
650 | void ipath_init_pe800_funcs(struct ipath_devdata *); | 650 | void ipath_init_pe800_funcs(struct ipath_devdata *); |
651 | /* init HT-400-specific func */ | 651 | /* init HT-400-specific func */ |
652 | void ipath_init_ht400_funcs(struct ipath_devdata *); | 652 | void ipath_init_ht400_funcs(struct ipath_devdata *); |
653 | void ipath_get_guid(struct ipath_devdata *); | 653 | void ipath_get_eeprom_info(struct ipath_devdata *); |
654 | u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg); | 654 | u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg); |
655 | 655 | ||
656 | /* | 656 | /* |
diff --git a/drivers/infiniband/hw/ipath/ipath_keys.c b/drivers/infiniband/hw/ipath/ipath_keys.c index aa33b0e9f2f6..5ae8761f9dd2 100644 --- a/drivers/infiniband/hw/ipath/ipath_keys.c +++ b/drivers/infiniband/hw/ipath/ipath_keys.c | |||
@@ -136,9 +136,7 @@ int ipath_lkey_ok(struct ipath_lkey_table *rkt, struct ipath_sge *isge, | |||
136 | ret = 1; | 136 | ret = 1; |
137 | goto bail; | 137 | goto bail; |
138 | } | 138 | } |
139 | spin_lock(&rkt->lock); | ||
140 | mr = rkt->table[(sge->lkey >> (32 - ib_ipath_lkey_table_size))]; | 139 | mr = rkt->table[(sge->lkey >> (32 - ib_ipath_lkey_table_size))]; |
141 | spin_unlock(&rkt->lock); | ||
142 | if (unlikely(mr == NULL || mr->lkey != sge->lkey)) { | 140 | if (unlikely(mr == NULL || mr->lkey != sge->lkey)) { |
143 | ret = 0; | 141 | ret = 0; |
144 | goto bail; | 142 | goto bail; |
@@ -184,8 +182,6 @@ bail: | |||
184 | * @acc: access flags | 182 | * @acc: access flags |
185 | * | 183 | * |
186 | * Return 1 if successful, otherwise 0. | 184 | * Return 1 if successful, otherwise 0. |
187 | * | ||
188 | * The QP r_rq.lock should be held. | ||
189 | */ | 185 | */ |
190 | int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss, | 186 | int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss, |
191 | u32 len, u64 vaddr, u32 rkey, int acc) | 187 | u32 len, u64 vaddr, u32 rkey, int acc) |
@@ -196,9 +192,7 @@ int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss, | |||
196 | size_t off; | 192 | size_t off; |
197 | int ret; | 193 | int ret; |
198 | 194 | ||
199 | spin_lock(&rkt->lock); | ||
200 | mr = rkt->table[(rkey >> (32 - ib_ipath_lkey_table_size))]; | 195 | mr = rkt->table[(rkey >> (32 - ib_ipath_lkey_table_size))]; |
201 | spin_unlock(&rkt->lock); | ||
202 | if (unlikely(mr == NULL || mr->lkey != rkey)) { | 196 | if (unlikely(mr == NULL || mr->lkey != rkey)) { |
203 | ret = 0; | 197 | ret = 0; |
204 | goto bail; | 198 | goto bail; |
diff --git a/drivers/infiniband/hw/ipath/ipath_layer.c b/drivers/infiniband/hw/ipath/ipath_layer.c index 9cb5258ffed9..9ec4ac77b87f 100644 --- a/drivers/infiniband/hw/ipath/ipath_layer.c +++ b/drivers/infiniband/hw/ipath/ipath_layer.c | |||
@@ -872,12 +872,13 @@ static void copy_io(u32 __iomem *piobuf, struct ipath_sge_state *ss, | |||
872 | update_sge(ss, len); | 872 | update_sge(ss, len); |
873 | length -= len; | 873 | length -= len; |
874 | } | 874 | } |
875 | /* Update address before sending packet. */ | ||
876 | update_sge(ss, length); | ||
875 | /* must flush early everything before trigger word */ | 877 | /* must flush early everything before trigger word */ |
876 | ipath_flush_wc(); | 878 | ipath_flush_wc(); |
877 | __raw_writel(last, piobuf); | 879 | __raw_writel(last, piobuf); |
878 | /* be sure trigger word is written */ | 880 | /* be sure trigger word is written */ |
879 | ipath_flush_wc(); | 881 | ipath_flush_wc(); |
880 | update_sge(ss, length); | ||
881 | } | 882 | } |
882 | 883 | ||
883 | /** | 884 | /** |
@@ -943,17 +944,18 @@ int ipath_verbs_send(struct ipath_devdata *dd, u32 hdrwords, | |||
943 | if (likely(ss->num_sge == 1 && len <= ss->sge.length && | 944 | if (likely(ss->num_sge == 1 && len <= ss->sge.length && |
944 | !((unsigned long)ss->sge.vaddr & (sizeof(u32) - 1)))) { | 945 | !((unsigned long)ss->sge.vaddr & (sizeof(u32) - 1)))) { |
945 | u32 w; | 946 | u32 w; |
947 | u32 *addr = (u32 *) ss->sge.vaddr; | ||
946 | 948 | ||
949 | /* Update address before sending packet. */ | ||
950 | update_sge(ss, len); | ||
947 | /* Need to round up for the last dword in the packet. */ | 951 | /* Need to round up for the last dword in the packet. */ |
948 | w = (len + 3) >> 2; | 952 | w = (len + 3) >> 2; |
949 | __iowrite32_copy(piobuf, ss->sge.vaddr, w - 1); | 953 | __iowrite32_copy(piobuf, addr, w - 1); |
950 | /* must flush early everything before trigger word */ | 954 | /* must flush early everything before trigger word */ |
951 | ipath_flush_wc(); | 955 | ipath_flush_wc(); |
952 | __raw_writel(((u32 *) ss->sge.vaddr)[w - 1], | 956 | __raw_writel(addr[w - 1], piobuf + w - 1); |
953 | piobuf + w - 1); | ||
954 | /* be sure trigger word is written */ | 957 | /* be sure trigger word is written */ |
955 | ipath_flush_wc(); | 958 | ipath_flush_wc(); |
956 | update_sge(ss, len); | ||
957 | ret = 0; | 959 | ret = 0; |
958 | goto bail; | 960 | goto bail; |
959 | } | 961 | } |
diff --git a/drivers/infiniband/hw/ipath/ipath_pe800.c b/drivers/infiniband/hw/ipath/ipath_pe800.c index 6318067ab5ec..02e8c75b24f6 100644 --- a/drivers/infiniband/hw/ipath/ipath_pe800.c +++ b/drivers/infiniband/hw/ipath/ipath_pe800.c | |||
@@ -1180,6 +1180,8 @@ static int ipath_pe_early_init(struct ipath_devdata *dd) | |||
1180 | */ | 1180 | */ |
1181 | dd->ipath_rhdrhead_intr_off = 1ULL<<32; | 1181 | dd->ipath_rhdrhead_intr_off = 1ULL<<32; |
1182 | 1182 | ||
1183 | ipath_get_eeprom_info(dd); | ||
1184 | |||
1183 | return 0; | 1185 | return 0; |
1184 | } | 1186 | } |
1185 | 1187 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c index 18890716db1e..9f8855d970c8 100644 --- a/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/drivers/infiniband/hw/ipath/ipath_qp.c | |||
@@ -375,10 +375,10 @@ static void ipath_error_qp(struct ipath_qp *qp) | |||
375 | 375 | ||
376 | spin_lock(&dev->pending_lock); | 376 | spin_lock(&dev->pending_lock); |
377 | /* XXX What if its already removed by the timeout code? */ | 377 | /* XXX What if its already removed by the timeout code? */ |
378 | if (qp->timerwait.next != LIST_POISON1) | 378 | if (!list_empty(&qp->timerwait)) |
379 | list_del(&qp->timerwait); | 379 | list_del_init(&qp->timerwait); |
380 | if (qp->piowait.next != LIST_POISON1) | 380 | if (!list_empty(&qp->piowait)) |
381 | list_del(&qp->piowait); | 381 | list_del_init(&qp->piowait); |
382 | spin_unlock(&dev->pending_lock); | 382 | spin_unlock(&dev->pending_lock); |
383 | 383 | ||
384 | wc.status = IB_WC_WR_FLUSH_ERR; | 384 | wc.status = IB_WC_WR_FLUSH_ERR; |
@@ -427,6 +427,7 @@ static void ipath_error_qp(struct ipath_qp *qp) | |||
427 | int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | 427 | int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, |
428 | int attr_mask) | 428 | int attr_mask) |
429 | { | 429 | { |
430 | struct ipath_ibdev *dev = to_idev(ibqp->device); | ||
430 | struct ipath_qp *qp = to_iqp(ibqp); | 431 | struct ipath_qp *qp = to_iqp(ibqp); |
431 | enum ib_qp_state cur_state, new_state; | 432 | enum ib_qp_state cur_state, new_state; |
432 | unsigned long flags; | 433 | unsigned long flags; |
@@ -443,6 +444,19 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
443 | attr_mask)) | 444 | attr_mask)) |
444 | goto inval; | 445 | goto inval; |
445 | 446 | ||
447 | if (attr_mask & IB_QP_AV) | ||
448 | if (attr->ah_attr.dlid == 0 || | ||
449 | attr->ah_attr.dlid >= IPS_MULTICAST_LID_BASE) | ||
450 | goto inval; | ||
451 | |||
452 | if (attr_mask & IB_QP_PKEY_INDEX) | ||
453 | if (attr->pkey_index >= ipath_layer_get_npkeys(dev->dd)) | ||
454 | goto inval; | ||
455 | |||
456 | if (attr_mask & IB_QP_MIN_RNR_TIMER) | ||
457 | if (attr->min_rnr_timer > 31) | ||
458 | goto inval; | ||
459 | |||
446 | switch (new_state) { | 460 | switch (new_state) { |
447 | case IB_QPS_RESET: | 461 | case IB_QPS_RESET: |
448 | ipath_reset_qp(qp); | 462 | ipath_reset_qp(qp); |
@@ -457,13 +471,8 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
457 | 471 | ||
458 | } | 472 | } |
459 | 473 | ||
460 | if (attr_mask & IB_QP_PKEY_INDEX) { | 474 | if (attr_mask & IB_QP_PKEY_INDEX) |
461 | struct ipath_ibdev *dev = to_idev(ibqp->device); | ||
462 | |||
463 | if (attr->pkey_index >= ipath_layer_get_npkeys(dev->dd)) | ||
464 | goto inval; | ||
465 | qp->s_pkey_index = attr->pkey_index; | 475 | qp->s_pkey_index = attr->pkey_index; |
466 | } | ||
467 | 476 | ||
468 | if (attr_mask & IB_QP_DEST_QPN) | 477 | if (attr_mask & IB_QP_DEST_QPN) |
469 | qp->remote_qpn = attr->dest_qp_num; | 478 | qp->remote_qpn = attr->dest_qp_num; |
@@ -479,12 +488,8 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
479 | if (attr_mask & IB_QP_ACCESS_FLAGS) | 488 | if (attr_mask & IB_QP_ACCESS_FLAGS) |
480 | qp->qp_access_flags = attr->qp_access_flags; | 489 | qp->qp_access_flags = attr->qp_access_flags; |
481 | 490 | ||
482 | if (attr_mask & IB_QP_AV) { | 491 | if (attr_mask & IB_QP_AV) |
483 | if (attr->ah_attr.dlid == 0 || | ||
484 | attr->ah_attr.dlid >= IPS_MULTICAST_LID_BASE) | ||
485 | goto inval; | ||
486 | qp->remote_ah_attr = attr->ah_attr; | 492 | qp->remote_ah_attr = attr->ah_attr; |
487 | } | ||
488 | 493 | ||
489 | if (attr_mask & IB_QP_PATH_MTU) | 494 | if (attr_mask & IB_QP_PATH_MTU) |
490 | qp->path_mtu = attr->path_mtu; | 495 | qp->path_mtu = attr->path_mtu; |
@@ -499,11 +504,8 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
499 | qp->s_rnr_retry_cnt = qp->s_rnr_retry; | 504 | qp->s_rnr_retry_cnt = qp->s_rnr_retry; |
500 | } | 505 | } |
501 | 506 | ||
502 | if (attr_mask & IB_QP_MIN_RNR_TIMER) { | 507 | if (attr_mask & IB_QP_MIN_RNR_TIMER) |
503 | if (attr->min_rnr_timer > 31) | ||
504 | goto inval; | ||
505 | qp->s_min_rnr_timer = attr->min_rnr_timer; | 508 | qp->s_min_rnr_timer = attr->min_rnr_timer; |
506 | } | ||
507 | 509 | ||
508 | if (attr_mask & IB_QP_QKEY) | 510 | if (attr_mask & IB_QP_QKEY) |
509 | qp->qkey = attr->qkey; | 511 | qp->qkey = attr->qkey; |
@@ -710,10 +712,8 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
710 | init_attr->qp_type == IB_QPT_RC ? | 712 | init_attr->qp_type == IB_QPT_RC ? |
711 | ipath_do_rc_send : ipath_do_uc_send, | 713 | ipath_do_rc_send : ipath_do_uc_send, |
712 | (unsigned long)qp); | 714 | (unsigned long)qp); |
713 | qp->piowait.next = LIST_POISON1; | 715 | INIT_LIST_HEAD(&qp->piowait); |
714 | qp->piowait.prev = LIST_POISON2; | 716 | INIT_LIST_HEAD(&qp->timerwait); |
715 | qp->timerwait.next = LIST_POISON1; | ||
716 | qp->timerwait.prev = LIST_POISON2; | ||
717 | qp->state = IB_QPS_RESET; | 717 | qp->state = IB_QPS_RESET; |
718 | qp->s_wq = swq; | 718 | qp->s_wq = swq; |
719 | qp->s_size = init_attr->cap.max_send_wr + 1; | 719 | qp->s_size = init_attr->cap.max_send_wr + 1; |
@@ -734,7 +734,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
734 | ipath_reset_qp(qp); | 734 | ipath_reset_qp(qp); |
735 | 735 | ||
736 | /* Tell the core driver that the kernel SMA is present. */ | 736 | /* Tell the core driver that the kernel SMA is present. */ |
737 | if (qp->ibqp.qp_type == IB_QPT_SMI) | 737 | if (init_attr->qp_type == IB_QPT_SMI) |
738 | ipath_layer_set_verbs_flags(dev->dd, | 738 | ipath_layer_set_verbs_flags(dev->dd, |
739 | IPATH_VERBS_KERNEL_SMA); | 739 | IPATH_VERBS_KERNEL_SMA); |
740 | break; | 740 | break; |
@@ -783,10 +783,10 @@ int ipath_destroy_qp(struct ib_qp *ibqp) | |||
783 | 783 | ||
784 | /* Make sure the QP isn't on the timeout list. */ | 784 | /* Make sure the QP isn't on the timeout list. */ |
785 | spin_lock_irqsave(&dev->pending_lock, flags); | 785 | spin_lock_irqsave(&dev->pending_lock, flags); |
786 | if (qp->timerwait.next != LIST_POISON1) | 786 | if (!list_empty(&qp->timerwait)) |
787 | list_del(&qp->timerwait); | 787 | list_del_init(&qp->timerwait); |
788 | if (qp->piowait.next != LIST_POISON1) | 788 | if (!list_empty(&qp->piowait)) |
789 | list_del(&qp->piowait); | 789 | list_del_init(&qp->piowait); |
790 | spin_unlock_irqrestore(&dev->pending_lock, flags); | 790 | spin_unlock_irqrestore(&dev->pending_lock, flags); |
791 | 791 | ||
792 | /* | 792 | /* |
@@ -855,10 +855,10 @@ void ipath_sqerror_qp(struct ipath_qp *qp, struct ib_wc *wc) | |||
855 | 855 | ||
856 | spin_lock(&dev->pending_lock); | 856 | spin_lock(&dev->pending_lock); |
857 | /* XXX What if its already removed by the timeout code? */ | 857 | /* XXX What if its already removed by the timeout code? */ |
858 | if (qp->timerwait.next != LIST_POISON1) | 858 | if (!list_empty(&qp->timerwait)) |
859 | list_del(&qp->timerwait); | 859 | list_del_init(&qp->timerwait); |
860 | if (qp->piowait.next != LIST_POISON1) | 860 | if (!list_empty(&qp->piowait)) |
861 | list_del(&qp->piowait); | 861 | list_del_init(&qp->piowait); |
862 | spin_unlock(&dev->pending_lock); | 862 | spin_unlock(&dev->pending_lock); |
863 | 863 | ||
864 | ipath_cq_enter(to_icq(qp->ibqp.send_cq), wc, 1); | 864 | ipath_cq_enter(to_icq(qp->ibqp.send_cq), wc, 1); |
diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c index a4055ca00614..493b1821a934 100644 --- a/drivers/infiniband/hw/ipath/ipath_rc.c +++ b/drivers/infiniband/hw/ipath/ipath_rc.c | |||
@@ -57,7 +57,7 @@ static void ipath_init_restart(struct ipath_qp *qp, struct ipath_swqe *wqe) | |||
57 | qp->s_len = wqe->length - len; | 57 | qp->s_len = wqe->length - len; |
58 | dev = to_idev(qp->ibqp.device); | 58 | dev = to_idev(qp->ibqp.device); |
59 | spin_lock(&dev->pending_lock); | 59 | spin_lock(&dev->pending_lock); |
60 | if (qp->timerwait.next == LIST_POISON1) | 60 | if (list_empty(&qp->timerwait)) |
61 | list_add_tail(&qp->timerwait, | 61 | list_add_tail(&qp->timerwait, |
62 | &dev->pending[dev->pending_index]); | 62 | &dev->pending[dev->pending_index]); |
63 | spin_unlock(&dev->pending_lock); | 63 | spin_unlock(&dev->pending_lock); |
@@ -356,7 +356,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp, | |||
356 | if ((int)(qp->s_psn - qp->s_next_psn) > 0) | 356 | if ((int)(qp->s_psn - qp->s_next_psn) > 0) |
357 | qp->s_next_psn = qp->s_psn; | 357 | qp->s_next_psn = qp->s_psn; |
358 | spin_lock(&dev->pending_lock); | 358 | spin_lock(&dev->pending_lock); |
359 | if (qp->timerwait.next == LIST_POISON1) | 359 | if (list_empty(&qp->timerwait)) |
360 | list_add_tail(&qp->timerwait, | 360 | list_add_tail(&qp->timerwait, |
361 | &dev->pending[dev->pending_index]); | 361 | &dev->pending[dev->pending_index]); |
362 | spin_unlock(&dev->pending_lock); | 362 | spin_unlock(&dev->pending_lock); |
@@ -726,8 +726,8 @@ void ipath_restart_rc(struct ipath_qp *qp, u32 psn, struct ib_wc *wc) | |||
726 | */ | 726 | */ |
727 | dev = to_idev(qp->ibqp.device); | 727 | dev = to_idev(qp->ibqp.device); |
728 | spin_lock(&dev->pending_lock); | 728 | spin_lock(&dev->pending_lock); |
729 | if (qp->timerwait.next != LIST_POISON1) | 729 | if (!list_empty(&qp->timerwait)) |
730 | list_del(&qp->timerwait); | 730 | list_del_init(&qp->timerwait); |
731 | spin_unlock(&dev->pending_lock); | 731 | spin_unlock(&dev->pending_lock); |
732 | 732 | ||
733 | if (wqe->wr.opcode == IB_WR_RDMA_READ) | 733 | if (wqe->wr.opcode == IB_WR_RDMA_READ) |
@@ -886,8 +886,8 @@ static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode) | |||
886 | * just won't find anything to restart if we ACK everything. | 886 | * just won't find anything to restart if we ACK everything. |
887 | */ | 887 | */ |
888 | spin_lock(&dev->pending_lock); | 888 | spin_lock(&dev->pending_lock); |
889 | if (qp->timerwait.next != LIST_POISON1) | 889 | if (!list_empty(&qp->timerwait)) |
890 | list_del(&qp->timerwait); | 890 | list_del_init(&qp->timerwait); |
891 | spin_unlock(&dev->pending_lock); | 891 | spin_unlock(&dev->pending_lock); |
892 | 892 | ||
893 | /* | 893 | /* |
@@ -1194,8 +1194,7 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev, | |||
1194 | IB_WR_RDMA_READ)) | 1194 | IB_WR_RDMA_READ)) |
1195 | goto ack_done; | 1195 | goto ack_done; |
1196 | spin_lock(&dev->pending_lock); | 1196 | spin_lock(&dev->pending_lock); |
1197 | if (qp->s_rnr_timeout == 0 && | 1197 | if (qp->s_rnr_timeout == 0 && !list_empty(&qp->timerwait)) |
1198 | qp->timerwait.next != LIST_POISON1) | ||
1199 | list_move_tail(&qp->timerwait, | 1198 | list_move_tail(&qp->timerwait, |
1200 | &dev->pending[dev->pending_index]); | 1199 | &dev->pending[dev->pending_index]); |
1201 | spin_unlock(&dev->pending_lock); | 1200 | spin_unlock(&dev->pending_lock); |
diff --git a/drivers/infiniband/hw/ipath/ipath_ruc.c b/drivers/infiniband/hw/ipath/ipath_ruc.c index eb81424b3c5b..d38f4f3cfd1d 100644 --- a/drivers/infiniband/hw/ipath/ipath_ruc.c +++ b/drivers/infiniband/hw/ipath/ipath_ruc.c | |||
@@ -435,7 +435,7 @@ void ipath_no_bufs_available(struct ipath_qp *qp, struct ipath_ibdev *dev) | |||
435 | unsigned long flags; | 435 | unsigned long flags; |
436 | 436 | ||
437 | spin_lock_irqsave(&dev->pending_lock, flags); | 437 | spin_lock_irqsave(&dev->pending_lock, flags); |
438 | if (qp->piowait.next == LIST_POISON1) | 438 | if (list_empty(&qp->piowait)) |
439 | list_add_tail(&qp->piowait, &dev->piowait); | 439 | list_add_tail(&qp->piowait, &dev->piowait); |
440 | spin_unlock_irqrestore(&dev->pending_lock, flags); | 440 | spin_unlock_irqrestore(&dev->pending_lock, flags); |
441 | /* | 441 | /* |
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index cb9e387c301f..28fdbdaa789d 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -464,7 +464,7 @@ static void ipath_ib_timer(void *arg) | |||
464 | last = &dev->pending[dev->pending_index]; | 464 | last = &dev->pending[dev->pending_index]; |
465 | while (!list_empty(last)) { | 465 | while (!list_empty(last)) { |
466 | qp = list_entry(last->next, struct ipath_qp, timerwait); | 466 | qp = list_entry(last->next, struct ipath_qp, timerwait); |
467 | list_del(&qp->timerwait); | 467 | list_del_init(&qp->timerwait); |
468 | qp->timer_next = resend; | 468 | qp->timer_next = resend; |
469 | resend = qp; | 469 | resend = qp; |
470 | atomic_inc(&qp->refcount); | 470 | atomic_inc(&qp->refcount); |
@@ -474,7 +474,7 @@ static void ipath_ib_timer(void *arg) | |||
474 | qp = list_entry(last->next, struct ipath_qp, timerwait); | 474 | qp = list_entry(last->next, struct ipath_qp, timerwait); |
475 | if (--qp->s_rnr_timeout == 0) { | 475 | if (--qp->s_rnr_timeout == 0) { |
476 | do { | 476 | do { |
477 | list_del(&qp->timerwait); | 477 | list_del_init(&qp->timerwait); |
478 | tasklet_hi_schedule(&qp->s_task); | 478 | tasklet_hi_schedule(&qp->s_task); |
479 | if (list_empty(last)) | 479 | if (list_empty(last)) |
480 | break; | 480 | break; |
@@ -554,7 +554,7 @@ static int ipath_ib_piobufavail(void *arg) | |||
554 | while (!list_empty(&dev->piowait)) { | 554 | while (!list_empty(&dev->piowait)) { |
555 | qp = list_entry(dev->piowait.next, struct ipath_qp, | 555 | qp = list_entry(dev->piowait.next, struct ipath_qp, |
556 | piowait); | 556 | piowait); |
557 | list_del(&qp->piowait); | 557 | list_del_init(&qp->piowait); |
558 | tasklet_hi_schedule(&qp->s_task); | 558 | tasklet_hi_schedule(&qp->s_task); |
559 | } | 559 | } |
560 | spin_unlock_irqrestore(&dev->pending_lock, flags); | 560 | spin_unlock_irqrestore(&dev->pending_lock, flags); |
@@ -951,6 +951,7 @@ static void *ipath_register_ib_device(int unit, struct ipath_devdata *dd) | |||
951 | idev->dd = dd; | 951 | idev->dd = dd; |
952 | 952 | ||
953 | strlcpy(dev->name, "ipath%d", IB_DEVICE_NAME_MAX); | 953 | strlcpy(dev->name, "ipath%d", IB_DEVICE_NAME_MAX); |
954 | dev->owner = THIS_MODULE; | ||
954 | dev->node_guid = ipath_layer_get_guid(dd); | 955 | dev->node_guid = ipath_layer_get_guid(dd); |
955 | dev->uverbs_abi_ver = IPATH_UVERBS_ABI_VERSION; | 956 | dev->uverbs_abi_ver = IPATH_UVERBS_ABI_VERSION; |
956 | dev->uverbs_cmd_mask = | 957 | dev->uverbs_cmd_mask = |
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 678f4dbbea1d..cb8c6317e4e5 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -331,13 +331,14 @@ static int raid0_run (mddev_t *mddev) | |||
331 | goto out_free_conf; | 331 | goto out_free_conf; |
332 | size = conf->strip_zone[cur].size; | 332 | size = conf->strip_zone[cur].size; |
333 | 333 | ||
334 | for (i=0; i< nb_zone; i++) { | 334 | conf->hash_table[0] = conf->strip_zone + cur; |
335 | conf->hash_table[i] = conf->strip_zone + cur; | 335 | for (i=1; i< nb_zone; i++) { |
336 | while (size <= conf->hash_spacing) { | 336 | while (size <= conf->hash_spacing) { |
337 | cur++; | 337 | cur++; |
338 | size += conf->strip_zone[cur].size; | 338 | size += conf->strip_zone[cur].size; |
339 | } | 339 | } |
340 | size -= conf->hash_spacing; | 340 | size -= conf->hash_spacing; |
341 | conf->hash_table[i] = conf->strip_zone + cur; | ||
341 | } | 342 | } |
342 | if (conf->preshift) { | 343 | if (conf->preshift) { |
343 | conf->hash_spacing >>= conf->preshift; | 344 | conf->hash_spacing >>= conf->preshift; |
diff --git a/drivers/media/common/Kconfig b/drivers/media/common/Kconfig index 9c45b983e0de..1a04db4552da 100644 --- a/drivers/media/common/Kconfig +++ b/drivers/media/common/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config VIDEO_SAA7146 | 1 | config VIDEO_SAA7146 |
2 | tristate | 2 | tristate |
3 | select I2C | 3 | depends on I2C |
4 | 4 | ||
5 | config VIDEO_SAA7146_VV | 5 | config VIDEO_SAA7146_VV |
6 | tristate | 6 | tristate |
diff --git a/drivers/media/dvb/Kconfig b/drivers/media/dvb/Kconfig index 3f0ec6be03ae..a97c8f5e9a5d 100644 --- a/drivers/media/dvb/Kconfig +++ b/drivers/media/dvb/Kconfig | |||
@@ -22,26 +22,26 @@ config DVB | |||
22 | source "drivers/media/dvb/dvb-core/Kconfig" | 22 | source "drivers/media/dvb/dvb-core/Kconfig" |
23 | 23 | ||
24 | comment "Supported SAA7146 based PCI Adapters" | 24 | comment "Supported SAA7146 based PCI Adapters" |
25 | depends on DVB_CORE && PCI | 25 | depends on DVB_CORE && PCI && I2C |
26 | source "drivers/media/dvb/ttpci/Kconfig" | 26 | source "drivers/media/dvb/ttpci/Kconfig" |
27 | 27 | ||
28 | comment "Supported USB Adapters" | 28 | comment "Supported USB Adapters" |
29 | depends on DVB_CORE && USB | 29 | depends on DVB_CORE && USB && I2C |
30 | source "drivers/media/dvb/dvb-usb/Kconfig" | 30 | source "drivers/media/dvb/dvb-usb/Kconfig" |
31 | source "drivers/media/dvb/ttusb-budget/Kconfig" | 31 | source "drivers/media/dvb/ttusb-budget/Kconfig" |
32 | source "drivers/media/dvb/ttusb-dec/Kconfig" | 32 | source "drivers/media/dvb/ttusb-dec/Kconfig" |
33 | source "drivers/media/dvb/cinergyT2/Kconfig" | 33 | source "drivers/media/dvb/cinergyT2/Kconfig" |
34 | 34 | ||
35 | comment "Supported FlexCopII (B2C2) Adapters" | 35 | comment "Supported FlexCopII (B2C2) Adapters" |
36 | depends on DVB_CORE && (PCI || USB) | 36 | depends on DVB_CORE && (PCI || USB) && I2C |
37 | source "drivers/media/dvb/b2c2/Kconfig" | 37 | source "drivers/media/dvb/b2c2/Kconfig" |
38 | 38 | ||
39 | comment "Supported BT878 Adapters" | 39 | comment "Supported BT878 Adapters" |
40 | depends on DVB_CORE && PCI | 40 | depends on DVB_CORE && PCI && I2C |
41 | source "drivers/media/dvb/bt8xx/Kconfig" | 41 | source "drivers/media/dvb/bt8xx/Kconfig" |
42 | 42 | ||
43 | comment "Supported Pluto2 Adapters" | 43 | comment "Supported Pluto2 Adapters" |
44 | depends on DVB_CORE && PCI | 44 | depends on DVB_CORE && PCI && I2C |
45 | source "drivers/media/dvb/pluto2/Kconfig" | 45 | source "drivers/media/dvb/pluto2/Kconfig" |
46 | 46 | ||
47 | comment "Supported DVB Frontends" | 47 | comment "Supported DVB Frontends" |
diff --git a/drivers/media/dvb/b2c2/Kconfig b/drivers/media/dvb/b2c2/Kconfig index 2963605c0ecc..d7f1fd5b7b02 100644 --- a/drivers/media/dvb/b2c2/Kconfig +++ b/drivers/media/dvb/b2c2/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config DVB_B2C2_FLEXCOP | 1 | config DVB_B2C2_FLEXCOP |
2 | tristate "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters" | 2 | tristate "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters" |
3 | depends on DVB_CORE | 3 | depends on DVB_CORE && I2C |
4 | select DVB_STV0299 | 4 | select DVB_STV0299 |
5 | select DVB_MT352 | 5 | select DVB_MT352 |
6 | select DVB_MT312 | 6 | select DVB_MT312 |
@@ -16,7 +16,7 @@ config DVB_B2C2_FLEXCOP | |||
16 | 16 | ||
17 | config DVB_B2C2_FLEXCOP_PCI | 17 | config DVB_B2C2_FLEXCOP_PCI |
18 | tristate "Technisat/B2C2 Air/Sky/Cable2PC PCI" | 18 | tristate "Technisat/B2C2 Air/Sky/Cable2PC PCI" |
19 | depends on DVB_B2C2_FLEXCOP && PCI | 19 | depends on DVB_B2C2_FLEXCOP && PCI && I2C |
20 | help | 20 | help |
21 | Support for the Air/Sky/CableStar2 PCI card (DVB/ATSC) by Technisat/B2C2. | 21 | Support for the Air/Sky/CableStar2 PCI card (DVB/ATSC) by Technisat/B2C2. |
22 | 22 | ||
@@ -24,7 +24,7 @@ config DVB_B2C2_FLEXCOP_PCI | |||
24 | 24 | ||
25 | config DVB_B2C2_FLEXCOP_USB | 25 | config DVB_B2C2_FLEXCOP_USB |
26 | tristate "Technisat/B2C2 Air/Sky/Cable2PC USB" | 26 | tristate "Technisat/B2C2 Air/Sky/Cable2PC USB" |
27 | depends on DVB_B2C2_FLEXCOP && USB | 27 | depends on DVB_B2C2_FLEXCOP && USB && I2C |
28 | help | 28 | help |
29 | Support for the Air/Sky/Cable2PC USB1.1 box (DVB/ATSC) by Technisat/B2C2, | 29 | Support for the Air/Sky/Cable2PC USB1.1 box (DVB/ATSC) by Technisat/B2C2, |
30 | 30 | ||
diff --git a/drivers/media/dvb/bt8xx/Kconfig b/drivers/media/dvb/bt8xx/Kconfig index f28d721b8bb5..f394002118f8 100644 --- a/drivers/media/dvb/bt8xx/Kconfig +++ b/drivers/media/dvb/bt8xx/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config DVB_BT8XX | 1 | config DVB_BT8XX |
2 | tristate "BT8xx based PCI cards" | 2 | tristate "BT8xx based PCI cards" |
3 | depends on DVB_CORE && PCI && VIDEO_BT848 | 3 | depends on DVB_CORE && PCI && I2C && VIDEO_BT848 |
4 | select DVB_MT352 | 4 | select DVB_MT352 |
5 | select DVB_SP887X | 5 | select DVB_SP887X |
6 | select DVB_NXT6000 | 6 | select DVB_NXT6000 |
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c index baa8227ef87c..ccc7b2eb4a2d 100644 --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c | |||
@@ -115,7 +115,7 @@ static int is_pci_slot_eq(struct pci_dev* adev, struct pci_dev* bdev) | |||
115 | return 0; | 115 | return 0; |
116 | } | 116 | } |
117 | 117 | ||
118 | static struct bt878 __init *dvb_bt8xx_878_match(unsigned int bttv_nr, struct pci_dev* bttv_pci_dev) | 118 | static struct bt878 __devinit *dvb_bt8xx_878_match(unsigned int bttv_nr, struct pci_dev* bttv_pci_dev) |
119 | { | 119 | { |
120 | unsigned int card_nr; | 120 | unsigned int card_nr; |
121 | 121 | ||
@@ -709,7 +709,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) | |||
709 | } | 709 | } |
710 | } | 710 | } |
711 | 711 | ||
712 | static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type) | 712 | static int __devinit dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type) |
713 | { | 713 | { |
714 | int result; | 714 | int result; |
715 | 715 | ||
@@ -794,7 +794,7 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type) | |||
794 | return 0; | 794 | return 0; |
795 | } | 795 | } |
796 | 796 | ||
797 | static int dvb_bt8xx_probe(struct bttv_sub_device *sub) | 797 | static int __devinit dvb_bt8xx_probe(struct bttv_sub_device *sub) |
798 | { | 798 | { |
799 | struct dvb_bt8xx_card *card; | 799 | struct dvb_bt8xx_card *card; |
800 | struct pci_dev* bttv_pci_dev; | 800 | struct pci_dev* bttv_pci_dev; |
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index d3df12039b06..e388fb1567d6 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config DVB_USB | 1 | config DVB_USB |
2 | tristate "Support for various USB DVB devices" | 2 | tristate "Support for various USB DVB devices" |
3 | depends on DVB_CORE && USB | 3 | depends on DVB_CORE && USB && I2C |
4 | select FW_LOADER | 4 | select FW_LOADER |
5 | help | 5 | help |
6 | By enabling this you will be able to choose the various supported | 6 | By enabling this you will be able to choose the various supported |
diff --git a/drivers/media/dvb/pluto2/Kconfig b/drivers/media/dvb/pluto2/Kconfig index 84f8f9f52869..7d8e6e87bdbb 100644 --- a/drivers/media/dvb/pluto2/Kconfig +++ b/drivers/media/dvb/pluto2/Kconfig | |||
@@ -1,7 +1,6 @@ | |||
1 | config DVB_PLUTO2 | 1 | config DVB_PLUTO2 |
2 | tristate "Pluto2 cards" | 2 | tristate "Pluto2 cards" |
3 | depends on DVB_CORE && PCI | 3 | depends on DVB_CORE && PCI && I2C |
4 | select I2C | ||
5 | select I2C_ALGOBIT | 4 | select I2C_ALGOBIT |
6 | select DVB_TDA1004X | 5 | select DVB_TDA1004X |
7 | help | 6 | help |
diff --git a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig index c26e23291511..b5ac7dfde52f 100644 --- a/drivers/media/dvb/ttpci/Kconfig +++ b/drivers/media/dvb/ttpci/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config DVB_AV7110 | 1 | config DVB_AV7110 |
2 | tristate "AV7110 cards" | 2 | tristate "AV7110 cards" |
3 | depends on DVB_CORE && PCI && VIDEO_V4L1 | 3 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 |
4 | select FW_LOADER | 4 | select FW_LOADER |
5 | select VIDEO_SAA7146_VV | 5 | select VIDEO_SAA7146_VV |
6 | select DVB_VES1820 | 6 | select DVB_VES1820 |
@@ -58,7 +58,7 @@ config DVB_AV7110_OSD | |||
58 | 58 | ||
59 | config DVB_BUDGET | 59 | config DVB_BUDGET |
60 | tristate "Budget cards" | 60 | tristate "Budget cards" |
61 | depends on DVB_CORE && PCI && VIDEO_V4L1 | 61 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 |
62 | select VIDEO_SAA7146 | 62 | select VIDEO_SAA7146 |
63 | select DVB_STV0299 | 63 | select DVB_STV0299 |
64 | select DVB_VES1X93 | 64 | select DVB_VES1X93 |
@@ -79,7 +79,7 @@ config DVB_BUDGET | |||
79 | 79 | ||
80 | config DVB_BUDGET_CI | 80 | config DVB_BUDGET_CI |
81 | tristate "Budget cards with onboard CI connector" | 81 | tristate "Budget cards with onboard CI connector" |
82 | depends on DVB_CORE && PCI && VIDEO_V4L1 | 82 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 |
83 | select VIDEO_SAA7146 | 83 | select VIDEO_SAA7146 |
84 | select DVB_STV0297 | 84 | select DVB_STV0297 |
85 | select DVB_STV0299 | 85 | select DVB_STV0299 |
@@ -99,7 +99,7 @@ config DVB_BUDGET_CI | |||
99 | 99 | ||
100 | config DVB_BUDGET_AV | 100 | config DVB_BUDGET_AV |
101 | tristate "Budget cards with analog video inputs" | 101 | tristate "Budget cards with analog video inputs" |
102 | depends on DVB_CORE && PCI && VIDEO_V4L1 | 102 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 |
103 | select VIDEO_SAA7146_VV | 103 | select VIDEO_SAA7146_VV |
104 | select DVB_STV0299 | 104 | select DVB_STV0299 |
105 | select DVB_TDA1004X | 105 | select DVB_TDA1004X |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 7124e534cc7f..6b4197018561 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -170,7 +170,7 @@ config VIDEO_VINO | |||
170 | 170 | ||
171 | config VIDEO_STRADIS | 171 | config VIDEO_STRADIS |
172 | tristate "Stradis 4:2:2 MPEG-2 video driver (EXPERIMENTAL)" | 172 | tristate "Stradis 4:2:2 MPEG-2 video driver (EXPERIMENTAL)" |
173 | depends on EXPERIMENTAL && PCI && VIDEO_V4L1 | 173 | depends on EXPERIMENTAL && PCI && VIDEO_V4L1 && !PPC64 |
174 | help | 174 | help |
175 | Say Y here to enable support for the Stradis 4:2:2 MPEG-2 video | 175 | Say Y here to enable support for the Stradis 4:2:2 MPEG-2 video |
176 | driver for PCI. There is a product page at | 176 | driver for PCI. There is a product page at |
@@ -178,7 +178,7 @@ config VIDEO_STRADIS | |||
178 | 178 | ||
179 | config VIDEO_ZORAN | 179 | config VIDEO_ZORAN |
180 | tristate "Zoran ZR36057/36067 Video For Linux" | 180 | tristate "Zoran ZR36057/36067 Video For Linux" |
181 | depends on PCI && I2C_ALGOBIT && VIDEO_V4L1 | 181 | depends on PCI && I2C_ALGOBIT && VIDEO_V4L1 && !PPC64 |
182 | help | 182 | help |
183 | Say Y for support for MJPEG capture cards based on the Zoran | 183 | Say Y for support for MJPEG capture cards based on the Zoran |
184 | 36057/36067 PCI controller chipset. This includes the Iomega | 184 | 36057/36067 PCI controller chipset. This includes the Iomega |
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile index 9debef9be8c8..e5bf2687b76d 100644 --- a/drivers/media/video/Makefile +++ b/drivers/media/video/Makefile | |||
@@ -11,7 +11,10 @@ tuner-objs := tuner-core.o tuner-types.o tuner-simple.o \ | |||
11 | msp3400-objs := msp3400-driver.o msp3400-kthreads.o | 11 | msp3400-objs := msp3400-driver.o msp3400-kthreads.o |
12 | 12 | ||
13 | obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o compat_ioctl32.o | 13 | obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o compat_ioctl32.o |
14 | obj-$(CONFIG_VIDEO_V4L1_COMPAT) += v4l1-compat.o | 14 | |
15 | ifeq ($(CONFIG_VIDEO_V4L1_COMPAT),y) | ||
16 | obj-$(CONFIG_VIDEO_DEV) += v4l1-compat.o | ||
17 | endif | ||
15 | 18 | ||
16 | obj-$(CONFIG_VIDEO_BT848) += bt8xx/ | 19 | obj-$(CONFIG_VIDEO_BT848) += bt8xx/ |
17 | obj-$(CONFIG_VIDEO_BT848) += tvaudio.o tda7432.o tda9875.o ir-kbd-i2c.o | 20 | obj-$(CONFIG_VIDEO_BT848) += tvaudio.o tda7432.o tda9875.o ir-kbd-i2c.o |
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index e39cc05c64c2..587458b370b9 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c | |||
@@ -353,7 +353,7 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) | |||
353 | */ | 353 | */ |
354 | printk(KERN_ERR "%s: unable to select block size for " | 354 | printk(KERN_ERR "%s: unable to select block size for " |
355 | "writing (rb%u wb%u rp%u wp%u)\n", | 355 | "writing (rb%u wb%u rp%u wp%u)\n", |
356 | md->disk->disk_name, | 356 | mmc_card_id(card), |
357 | 1 << card->csd.read_blkbits, | 357 | 1 << card->csd.read_blkbits, |
358 | 1 << card->csd.write_blkbits, | 358 | 1 << card->csd.write_blkbits, |
359 | card->csd.read_partial, | 359 | card->csd.read_partial, |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 5ca99e26660a..54161aef3cac 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -55,8 +55,8 @@ | |||
55 | 55 | ||
56 | #define DRV_MODULE_NAME "bnx2" | 56 | #define DRV_MODULE_NAME "bnx2" |
57 | #define PFX DRV_MODULE_NAME ": " | 57 | #define PFX DRV_MODULE_NAME ": " |
58 | #define DRV_MODULE_VERSION "1.4.39" | 58 | #define DRV_MODULE_VERSION "1.4.40" |
59 | #define DRV_MODULE_RELDATE "March 22, 2006" | 59 | #define DRV_MODULE_RELDATE "May 22, 2006" |
60 | 60 | ||
61 | #define RUN_AT(x) (jiffies + (x)) | 61 | #define RUN_AT(x) (jiffies + (x)) |
62 | 62 | ||
@@ -2945,7 +2945,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
2945 | int buf_size) | 2945 | int buf_size) |
2946 | { | 2946 | { |
2947 | u32 written, offset32, len32; | 2947 | u32 written, offset32, len32; |
2948 | u8 *buf, start[4], end[4]; | 2948 | u8 *buf, start[4], end[4], *flash_buffer = NULL; |
2949 | int rc = 0; | 2949 | int rc = 0; |
2950 | int align_start, align_end; | 2950 | int align_start, align_end; |
2951 | 2951 | ||
@@ -2985,12 +2985,19 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
2985 | memcpy(buf + align_start, data_buf, buf_size); | 2985 | memcpy(buf + align_start, data_buf, buf_size); |
2986 | } | 2986 | } |
2987 | 2987 | ||
2988 | if (bp->flash_info->buffered == 0) { | ||
2989 | flash_buffer = kmalloc(264, GFP_KERNEL); | ||
2990 | if (flash_buffer == NULL) { | ||
2991 | rc = -ENOMEM; | ||
2992 | goto nvram_write_end; | ||
2993 | } | ||
2994 | } | ||
2995 | |||
2988 | written = 0; | 2996 | written = 0; |
2989 | while ((written < len32) && (rc == 0)) { | 2997 | while ((written < len32) && (rc == 0)) { |
2990 | u32 page_start, page_end, data_start, data_end; | 2998 | u32 page_start, page_end, data_start, data_end; |
2991 | u32 addr, cmd_flags; | 2999 | u32 addr, cmd_flags; |
2992 | int i; | 3000 | int i; |
2993 | u8 flash_buffer[264]; | ||
2994 | 3001 | ||
2995 | /* Find the page_start addr */ | 3002 | /* Find the page_start addr */ |
2996 | page_start = offset32 + written; | 3003 | page_start = offset32 + written; |
@@ -3061,7 +3068,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
3061 | } | 3068 | } |
3062 | 3069 | ||
3063 | /* Loop to write the new data from data_start to data_end */ | 3070 | /* Loop to write the new data from data_start to data_end */ |
3064 | for (addr = data_start; addr < data_end; addr += 4, i++) { | 3071 | for (addr = data_start; addr < data_end; addr += 4, i += 4) { |
3065 | if ((addr == page_end - 4) || | 3072 | if ((addr == page_end - 4) || |
3066 | ((bp->flash_info->buffered) && | 3073 | ((bp->flash_info->buffered) && |
3067 | (addr == data_end - 4))) { | 3074 | (addr == data_end - 4))) { |
@@ -3109,6 +3116,9 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
3109 | } | 3116 | } |
3110 | 3117 | ||
3111 | nvram_write_end: | 3118 | nvram_write_end: |
3119 | if (bp->flash_info->buffered == 0) | ||
3120 | kfree(flash_buffer); | ||
3121 | |||
3112 | if (align_start || align_end) | 3122 | if (align_start || align_end) |
3113 | kfree(buf); | 3123 | kfree(buf); |
3114 | return rc; | 3124 | return rc; |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 60779ebf2ff6..959109609d85 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -979,6 +979,7 @@ static int sky2_rx_start(struct sky2_port *sky2) | |||
979 | struct sky2_hw *hw = sky2->hw; | 979 | struct sky2_hw *hw = sky2->hw; |
980 | unsigned rxq = rxqaddr[sky2->port]; | 980 | unsigned rxq = rxqaddr[sky2->port]; |
981 | int i; | 981 | int i; |
982 | unsigned thresh; | ||
982 | 983 | ||
983 | sky2->rx_put = sky2->rx_next = 0; | 984 | sky2->rx_put = sky2->rx_next = 0; |
984 | sky2_qset(hw, rxq); | 985 | sky2_qset(hw, rxq); |
@@ -1003,9 +1004,21 @@ static int sky2_rx_start(struct sky2_port *sky2) | |||
1003 | sky2_rx_add(sky2, re->mapaddr); | 1004 | sky2_rx_add(sky2, re->mapaddr); |
1004 | } | 1005 | } |
1005 | 1006 | ||
1006 | /* Truncate oversize frames */ | 1007 | |
1007 | sky2_write16(hw, SK_REG(sky2->port, RX_GMF_TR_THR), sky2->rx_bufsize - 8); | 1008 | /* |
1008 | sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_ON); | 1009 | * The receiver hangs if it receives frames larger than the |
1010 | * packet buffer. As a workaround, truncate oversize frames, but | ||
1011 | * the register is limited to 9 bits, so if you do frames > 2052 | ||
1012 | * you better get the MTU right! | ||
1013 | */ | ||
1014 | thresh = (sky2->rx_bufsize - 8) / sizeof(u32); | ||
1015 | if (thresh > 0x1ff) | ||
1016 | sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_OFF); | ||
1017 | else { | ||
1018 | sky2_write16(hw, SK_REG(sky2->port, RX_GMF_TR_THR), thresh); | ||
1019 | sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_ON); | ||
1020 | } | ||
1021 | |||
1009 | 1022 | ||
1010 | /* Tell chip about available buffers */ | 1023 | /* Tell chip about available buffers */ |
1011 | sky2_write16(hw, Y2_QADDR(rxq, PREF_UNIT_PUT_IDX), sky2->rx_put); | 1024 | sky2_write16(hw, Y2_QADDR(rxq, PREF_UNIT_PUT_IDX), sky2->rx_put); |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index e1b33a25a25f..49ad60b72657 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -69,8 +69,8 @@ | |||
69 | 69 | ||
70 | #define DRV_MODULE_NAME "tg3" | 70 | #define DRV_MODULE_NAME "tg3" |
71 | #define PFX DRV_MODULE_NAME ": " | 71 | #define PFX DRV_MODULE_NAME ": " |
72 | #define DRV_MODULE_VERSION "3.57" | 72 | #define DRV_MODULE_VERSION "3.58" |
73 | #define DRV_MODULE_RELDATE "Apr 28, 2006" | 73 | #define DRV_MODULE_RELDATE "May 22, 2006" |
74 | 74 | ||
75 | #define TG3_DEF_MAC_MODE 0 | 75 | #define TG3_DEF_MAC_MODE 0 |
76 | #define TG3_DEF_RX_MODE 0 | 76 | #define TG3_DEF_RX_MODE 0 |
@@ -6488,6 +6488,10 @@ static void tg3_periodic_fetch_stats(struct tg3 *tp) | |||
6488 | TG3_STAT_ADD32(&sp->rx_frame_too_long_errors, MAC_RX_STATS_FRAME_TOO_LONG); | 6488 | TG3_STAT_ADD32(&sp->rx_frame_too_long_errors, MAC_RX_STATS_FRAME_TOO_LONG); |
6489 | TG3_STAT_ADD32(&sp->rx_jabbers, MAC_RX_STATS_JABBERS); | 6489 | TG3_STAT_ADD32(&sp->rx_jabbers, MAC_RX_STATS_JABBERS); |
6490 | TG3_STAT_ADD32(&sp->rx_undersize_packets, MAC_RX_STATS_UNDERSIZE); | 6490 | TG3_STAT_ADD32(&sp->rx_undersize_packets, MAC_RX_STATS_UNDERSIZE); |
6491 | |||
6492 | TG3_STAT_ADD32(&sp->rxbds_empty, RCVLPC_NO_RCV_BD_CNT); | ||
6493 | TG3_STAT_ADD32(&sp->rx_discards, RCVLPC_IN_DISCARDS_CNT); | ||
6494 | TG3_STAT_ADD32(&sp->rx_errors, RCVLPC_IN_ERRORS_CNT); | ||
6491 | } | 6495 | } |
6492 | 6496 | ||
6493 | static void tg3_timer(unsigned long __opaque) | 6497 | static void tg3_timer(unsigned long __opaque) |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 823dfa78c0ba..fa476e7e0a48 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -3643,6 +3643,8 @@ static void ata_pio_block(struct ata_port *ap) | |||
3643 | 3643 | ||
3644 | ata_pio_sector(qc); | 3644 | ata_pio_sector(qc); |
3645 | } | 3645 | } |
3646 | |||
3647 | ata_altstatus(ap); /* flush */ | ||
3646 | } | 3648 | } |
3647 | 3649 | ||
3648 | static void ata_pio_error(struct ata_port *ap) | 3650 | static void ata_pio_error(struct ata_port *ap) |
@@ -3759,11 +3761,14 @@ static void atapi_packet_task(void *_data) | |||
3759 | spin_lock_irqsave(&ap->host_set->lock, flags); | 3761 | spin_lock_irqsave(&ap->host_set->lock, flags); |
3760 | ap->flags &= ~ATA_FLAG_NOINTR; | 3762 | ap->flags &= ~ATA_FLAG_NOINTR; |
3761 | ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1); | 3763 | ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1); |
3764 | ata_altstatus(ap); /* flush */ | ||
3765 | |||
3762 | if (qc->tf.protocol == ATA_PROT_ATAPI_DMA) | 3766 | if (qc->tf.protocol == ATA_PROT_ATAPI_DMA) |
3763 | ap->ops->bmdma_start(qc); /* initiate bmdma */ | 3767 | ap->ops->bmdma_start(qc); /* initiate bmdma */ |
3764 | spin_unlock_irqrestore(&ap->host_set->lock, flags); | 3768 | spin_unlock_irqrestore(&ap->host_set->lock, flags); |
3765 | } else { | 3769 | } else { |
3766 | ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1); | 3770 | ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1); |
3771 | ata_altstatus(ap); /* flush */ | ||
3767 | 3772 | ||
3768 | /* PIO commands are handled by polling */ | 3773 | /* PIO commands are handled by polling */ |
3769 | ap->hsm_task_state = HSM_ST; | 3774 | ap->hsm_task_state = HSM_ST; |
@@ -1116,6 +1116,9 @@ struct bio_pair *bio_split(struct bio *bi, mempool_t *pool, int first_sectors) | |||
1116 | bp->bio1.bi_io_vec = &bp->bv1; | 1116 | bp->bio1.bi_io_vec = &bp->bv1; |
1117 | bp->bio2.bi_io_vec = &bp->bv2; | 1117 | bp->bio2.bi_io_vec = &bp->bv2; |
1118 | 1118 | ||
1119 | bp->bio1.bi_max_vecs = 1; | ||
1120 | bp->bio2.bi_max_vecs = 1; | ||
1121 | |||
1119 | bp->bio1.bi_end_io = bio_pair_end_1; | 1122 | bp->bio1.bi_end_io = bio_pair_end_1; |
1120 | bp->bio2.bi_end_io = bio_pair_end_2; | 1123 | bp->bio2.bi_end_io = bio_pair_end_2; |
1121 | 1124 | ||
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index f28696f235c4..2b220dd6b4e7 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c | |||
@@ -542,7 +542,7 @@ add_failed: | |||
542 | static int metapage_releasepage(struct page *page, gfp_t gfp_mask) | 542 | static int metapage_releasepage(struct page *page, gfp_t gfp_mask) |
543 | { | 543 | { |
544 | struct metapage *mp; | 544 | struct metapage *mp; |
545 | int busy = 0; | 545 | int ret = 1; |
546 | unsigned int offset; | 546 | unsigned int offset; |
547 | 547 | ||
548 | for (offset = 0; offset < PAGE_CACHE_SIZE; offset += PSIZE) { | 548 | for (offset = 0; offset < PAGE_CACHE_SIZE; offset += PSIZE) { |
@@ -552,30 +552,20 @@ static int metapage_releasepage(struct page *page, gfp_t gfp_mask) | |||
552 | continue; | 552 | continue; |
553 | 553 | ||
554 | jfs_info("metapage_releasepage: mp = 0x%p", mp); | 554 | jfs_info("metapage_releasepage: mp = 0x%p", mp); |
555 | if (mp->count || mp->nohomeok) { | 555 | if (mp->count || mp->nohomeok || |
556 | test_bit(META_dirty, &mp->flag)) { | ||
556 | jfs_info("count = %ld, nohomeok = %d", mp->count, | 557 | jfs_info("count = %ld, nohomeok = %d", mp->count, |
557 | mp->nohomeok); | 558 | mp->nohomeok); |
558 | busy = 1; | 559 | ret = 0; |
559 | continue; | 560 | continue; |
560 | } | 561 | } |
561 | wait_on_page_writeback(page); | ||
562 | //WARN_ON(test_bit(META_dirty, &mp->flag)); | ||
563 | if (test_bit(META_dirty, &mp->flag)) { | ||
564 | dump_mem("dirty mp in metapage_releasepage", mp, | ||
565 | sizeof(struct metapage)); | ||
566 | dump_mem("page", page, sizeof(struct page)); | ||
567 | dump_stack(); | ||
568 | } | ||
569 | if (mp->lsn) | 562 | if (mp->lsn) |
570 | remove_from_logsync(mp); | 563 | remove_from_logsync(mp); |
571 | remove_metapage(page, mp); | 564 | remove_metapage(page, mp); |
572 | INCREMENT(mpStat.pagefree); | 565 | INCREMENT(mpStat.pagefree); |
573 | free_metapage(mp); | 566 | free_metapage(mp); |
574 | } | 567 | } |
575 | if (busy) | 568 | return ret; |
576 | return -1; | ||
577 | |||
578 | return 0; | ||
579 | } | 569 | } |
580 | 570 | ||
581 | static void metapage_invalidatepage(struct page *page, unsigned long offset) | 571 | static void metapage_invalidatepage(struct page *page, unsigned long offset) |
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 4e0578121d9a..3eec30000f3f 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -1066,9 +1066,11 @@ exp_pseudoroot(struct auth_domain *clp, struct svc_fh *fhp, | |||
1066 | rv = nfserr_perm; | 1066 | rv = nfserr_perm; |
1067 | else if (IS_ERR(exp)) | 1067 | else if (IS_ERR(exp)) |
1068 | rv = nfserrno(PTR_ERR(exp)); | 1068 | rv = nfserrno(PTR_ERR(exp)); |
1069 | else | 1069 | else { |
1070 | rv = fh_compose(fhp, exp, | 1070 | rv = fh_compose(fhp, exp, |
1071 | fsid_key->ek_dentry, NULL); | 1071 | fsid_key->ek_dentry, NULL); |
1072 | exp_put(exp); | ||
1073 | } | ||
1072 | cache_put(&fsid_key->h, &svc_expkey_cache); | 1074 | cache_put(&fsid_key->h, &svc_expkey_cache); |
1073 | return rv; | 1075 | return rv; |
1074 | } | 1076 | } |
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h index 908acb44cb8a..edde2462bf52 100644 --- a/include/asm-powerpc/unistd.h +++ b/include/asm-powerpc/unistd.h | |||
@@ -321,8 +321,10 @@ | |||
321 | #define __NR_readlinkat 296 | 321 | #define __NR_readlinkat 296 |
322 | #define __NR_fchmodat 297 | 322 | #define __NR_fchmodat 297 |
323 | #define __NR_faccessat 298 | 323 | #define __NR_faccessat 298 |
324 | #define __NR_get_robust_list 299 | ||
325 | #define __NR_set_robust_list 300 | ||
324 | 326 | ||
325 | #define __NR_syscalls 299 | 327 | #define __NR_syscalls 301 |
326 | 328 | ||
327 | #ifdef __KERNEL__ | 329 | #ifdef __KERNEL__ |
328 | #define __NR__exit __NR_exit | 330 | #define __NR__exit __NR_exit |
diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h index c7d5804ba76d..a8d39f23d43b 100644 --- a/include/asm-sparc64/dma-mapping.h +++ b/include/asm-sparc64/dma-mapping.h | |||
@@ -4,7 +4,146 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | 5 | ||
6 | #ifdef CONFIG_PCI | 6 | #ifdef CONFIG_PCI |
7 | #include <asm-generic/dma-mapping.h> | 7 | |
8 | /* we implement the API below in terms of the existing PCI one, | ||
9 | * so include it */ | ||
10 | #include <linux/pci.h> | ||
11 | /* need struct page definitions */ | ||
12 | #include <linux/mm.h> | ||
13 | |||
14 | static inline int | ||
15 | dma_supported(struct device *dev, u64 mask) | ||
16 | { | ||
17 | BUG_ON(dev->bus != &pci_bus_type); | ||
18 | |||
19 | return pci_dma_supported(to_pci_dev(dev), mask); | ||
20 | } | ||
21 | |||
22 | static inline int | ||
23 | dma_set_mask(struct device *dev, u64 dma_mask) | ||
24 | { | ||
25 | BUG_ON(dev->bus != &pci_bus_type); | ||
26 | |||
27 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); | ||
28 | } | ||
29 | |||
30 | static inline void * | ||
31 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | ||
32 | gfp_t flag) | ||
33 | { | ||
34 | BUG_ON(dev->bus != &pci_bus_type); | ||
35 | |||
36 | return pci_iommu_ops->alloc_consistent(to_pci_dev(dev), size, dma_handle, flag); | ||
37 | } | ||
38 | |||
39 | static inline void | ||
40 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | ||
41 | dma_addr_t dma_handle) | ||
42 | { | ||
43 | BUG_ON(dev->bus != &pci_bus_type); | ||
44 | |||
45 | pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle); | ||
46 | } | ||
47 | |||
48 | static inline dma_addr_t | ||
49 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, | ||
50 | enum dma_data_direction direction) | ||
51 | { | ||
52 | BUG_ON(dev->bus != &pci_bus_type); | ||
53 | |||
54 | return pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction); | ||
55 | } | ||
56 | |||
57 | static inline void | ||
58 | dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | ||
59 | enum dma_data_direction direction) | ||
60 | { | ||
61 | BUG_ON(dev->bus != &pci_bus_type); | ||
62 | |||
63 | pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction); | ||
64 | } | ||
65 | |||
66 | static inline dma_addr_t | ||
67 | dma_map_page(struct device *dev, struct page *page, | ||
68 | unsigned long offset, size_t size, | ||
69 | enum dma_data_direction direction) | ||
70 | { | ||
71 | BUG_ON(dev->bus != &pci_bus_type); | ||
72 | |||
73 | return pci_map_page(to_pci_dev(dev), page, offset, size, (int)direction); | ||
74 | } | ||
75 | |||
76 | static inline void | ||
77 | dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, | ||
78 | enum dma_data_direction direction) | ||
79 | { | ||
80 | BUG_ON(dev->bus != &pci_bus_type); | ||
81 | |||
82 | pci_unmap_page(to_pci_dev(dev), dma_address, size, (int)direction); | ||
83 | } | ||
84 | |||
85 | static inline int | ||
86 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | ||
87 | enum dma_data_direction direction) | ||
88 | { | ||
89 | BUG_ON(dev->bus != &pci_bus_type); | ||
90 | |||
91 | return pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction); | ||
92 | } | ||
93 | |||
94 | static inline void | ||
95 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, | ||
96 | enum dma_data_direction direction) | ||
97 | { | ||
98 | BUG_ON(dev->bus != &pci_bus_type); | ||
99 | |||
100 | pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction); | ||
101 | } | ||
102 | |||
103 | static inline void | ||
104 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, | ||
105 | enum dma_data_direction direction) | ||
106 | { | ||
107 | BUG_ON(dev->bus != &pci_bus_type); | ||
108 | |||
109 | pci_dma_sync_single_for_cpu(to_pci_dev(dev), dma_handle, | ||
110 | size, (int)direction); | ||
111 | } | ||
112 | |||
113 | static inline void | ||
114 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, | ||
115 | enum dma_data_direction direction) | ||
116 | { | ||
117 | BUG_ON(dev->bus != &pci_bus_type); | ||
118 | |||
119 | pci_dma_sync_single_for_device(to_pci_dev(dev), dma_handle, | ||
120 | size, (int)direction); | ||
121 | } | ||
122 | |||
123 | static inline void | ||
124 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, | ||
125 | enum dma_data_direction direction) | ||
126 | { | ||
127 | BUG_ON(dev->bus != &pci_bus_type); | ||
128 | |||
129 | pci_dma_sync_sg_for_cpu(to_pci_dev(dev), sg, nelems, (int)direction); | ||
130 | } | ||
131 | |||
132 | static inline void | ||
133 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, | ||
134 | enum dma_data_direction direction) | ||
135 | { | ||
136 | BUG_ON(dev->bus != &pci_bus_type); | ||
137 | |||
138 | pci_dma_sync_sg_for_device(to_pci_dev(dev), sg, nelems, (int)direction); | ||
139 | } | ||
140 | |||
141 | static inline int | ||
142 | dma_mapping_error(dma_addr_t dma_addr) | ||
143 | { | ||
144 | return pci_dma_mapping_error(dma_addr); | ||
145 | } | ||
146 | |||
8 | #else | 147 | #else |
9 | 148 | ||
10 | struct device; | 149 | struct device; |
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h index 7c5a589ea437..e1ea67bc32f2 100644 --- a/include/asm-sparc64/pci.h +++ b/include/asm-sparc64/pci.h | |||
@@ -42,7 +42,7 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
42 | struct pci_dev; | 42 | struct pci_dev; |
43 | 43 | ||
44 | struct pci_iommu_ops { | 44 | struct pci_iommu_ops { |
45 | void *(*alloc_consistent)(struct pci_dev *, size_t, dma_addr_t *); | 45 | void *(*alloc_consistent)(struct pci_dev *, size_t, dma_addr_t *, gfp_t); |
46 | void (*free_consistent)(struct pci_dev *, size_t, void *, dma_addr_t); | 46 | void (*free_consistent)(struct pci_dev *, size_t, void *, dma_addr_t); |
47 | dma_addr_t (*map_single)(struct pci_dev *, void *, size_t, int); | 47 | dma_addr_t (*map_single)(struct pci_dev *, void *, size_t, int); |
48 | void (*unmap_single)(struct pci_dev *, dma_addr_t, size_t, int); | 48 | void (*unmap_single)(struct pci_dev *, dma_addr_t, size_t, int); |
@@ -59,7 +59,7 @@ extern struct pci_iommu_ops *pci_iommu_ops; | |||
59 | */ | 59 | */ |
60 | static inline void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle) | 60 | static inline void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle) |
61 | { | 61 | { |
62 | return pci_iommu_ops->alloc_consistent(hwdev, size, dma_handle); | 62 | return pci_iommu_ops->alloc_consistent(hwdev, size, dma_handle, GFP_ATOMIC); |
63 | } | 63 | } |
64 | 64 | ||
65 | /* Free and unmap a consistent DMA buffer. | 65 | /* Free and unmap a consistent DMA buffer. |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3de2bfb2410f..f813bc8266aa 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -213,6 +213,10 @@ extern int dir_notify_enable; | |||
213 | #define FIBMAP _IO(0x00,1) /* bmap access */ | 213 | #define FIBMAP _IO(0x00,1) /* bmap access */ |
214 | #define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ | 214 | #define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ |
215 | 215 | ||
216 | #define SYNC_FILE_RANGE_WAIT_BEFORE 1 | ||
217 | #define SYNC_FILE_RANGE_WRITE 2 | ||
218 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 | ||
219 | |||
216 | #ifdef __KERNEL__ | 220 | #ifdef __KERNEL__ |
217 | 221 | ||
218 | #include <linux/linkage.h> | 222 | #include <linux/linkage.h> |
@@ -758,9 +762,6 @@ extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); | |||
758 | extern int fcntl_getlease(struct file *filp); | 762 | extern int fcntl_getlease(struct file *filp); |
759 | 763 | ||
760 | /* fs/sync.c */ | 764 | /* fs/sync.c */ |
761 | #define SYNC_FILE_RANGE_WAIT_BEFORE 1 | ||
762 | #define SYNC_FILE_RANGE_WRITE 2 | ||
763 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 | ||
764 | extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte, | 765 | extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte, |
765 | unsigned int flags); | 766 | unsigned int flags); |
766 | 767 | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 3996960fc565..60d49e5456e7 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -52,6 +52,7 @@ struct utimbuf; | |||
52 | struct mq_attr; | 52 | struct mq_attr; |
53 | struct compat_stat; | 53 | struct compat_stat; |
54 | struct compat_timeval; | 54 | struct compat_timeval; |
55 | struct robust_list_head; | ||
55 | 56 | ||
56 | #include <linux/config.h> | 57 | #include <linux/config.h> |
57 | #include <linux/types.h> | 58 | #include <linux/types.h> |
@@ -581,5 +582,10 @@ asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags); | |||
581 | 582 | ||
582 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, | 583 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, |
583 | unsigned int flags); | 584 | unsigned int flags); |
585 | asmlinkage long sys_get_robust_list(int pid, | ||
586 | struct robust_list_head __user **head_ptr, | ||
587 | size_t __user *len_ptr); | ||
588 | asmlinkage long sys_set_robust_list(struct robust_list_head __user *head, | ||
589 | size_t len); | ||
584 | 590 | ||
585 | #endif | 591 | #endif |
diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h index 86aefb1fda5e..c0c895d379ba 100644 --- a/include/net/irda/irlmp.h +++ b/include/net/irda/irlmp.h | |||
@@ -112,7 +112,7 @@ struct lsap_cb { | |||
112 | 112 | ||
113 | struct timer_list watchdog_timer; | 113 | struct timer_list watchdog_timer; |
114 | 114 | ||
115 | IRLMP_STATE lsap_state; /* Connection state */ | 115 | LSAP_STATE lsap_state; /* Connection state */ |
116 | notify_t notify; /* Indication/Confirm entry points */ | 116 | notify_t notify; /* Indication/Confirm entry points */ |
117 | struct qos_info qos; /* QoS for this connection */ | 117 | struct qos_info qos; /* QoS for this connection */ |
118 | 118 | ||
diff --git a/net/bridge/br.c b/net/bridge/br.c index 22d806cf40ca..12da21afb9ca 100644 --- a/net/bridge/br.c +++ b/net/bridge/br.c | |||
@@ -55,7 +55,7 @@ static int __init br_init(void) | |||
55 | 55 | ||
56 | static void __exit br_deinit(void) | 56 | static void __exit br_deinit(void) |
57 | { | 57 | { |
58 | llc_sap_close(br_stp_sap); | 58 | rcu_assign_pointer(br_stp_sap->rcv_func, NULL); |
59 | 59 | ||
60 | #ifdef CONFIG_BRIDGE_NETFILTER | 60 | #ifdef CONFIG_BRIDGE_NETFILTER |
61 | br_netfilter_fini(); | 61 | br_netfilter_fini(); |
@@ -67,6 +67,7 @@ static void __exit br_deinit(void) | |||
67 | 67 | ||
68 | synchronize_net(); | 68 | synchronize_net(); |
69 | 69 | ||
70 | llc_sap_put(br_stp_sap); | ||
70 | br_fdb_get_hook = NULL; | 71 | br_fdb_get_hook = NULL; |
71 | br_fdb_put_hook = NULL; | 72 | br_fdb_put_hook = NULL; |
72 | 73 | ||
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c index cd810f41af1a..95278b22b669 100644 --- a/net/ipv4/ipcomp.c +++ b/net/ipv4/ipcomp.c | |||
@@ -210,7 +210,7 @@ static void ipcomp4_err(struct sk_buff *skb, u32 info) | |||
210 | skb->h.icmph->code != ICMP_FRAG_NEEDED) | 210 | skb->h.icmph->code != ICMP_FRAG_NEEDED) |
211 | return; | 211 | return; |
212 | 212 | ||
213 | spi = ntohl(ntohs(ipch->cpi)); | 213 | spi = htonl(ntohs(ipch->cpi)); |
214 | x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, | 214 | x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, |
215 | spi, IPPROTO_COMP, AF_INET); | 215 | spi, IPPROTO_COMP, AF_INET); |
216 | if (!x) | 216 | if (!x) |
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c b/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c index 355a53a5b6cd..26dfecadb335 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c | |||
@@ -528,14 +528,15 @@ int decode_seq(bitstr_t * bs, field_t * f, char *base, int level) | |||
528 | 528 | ||
529 | /* Decode */ | 529 | /* Decode */ |
530 | if ((err = (Decoders[son->type]) (bs, son, base, | 530 | if ((err = (Decoders[son->type]) (bs, son, base, |
531 | level + 1)) > | 531 | level + 1)) < |
532 | H323_ERROR_STOP) | 532 | H323_ERROR_NONE) |
533 | return err; | 533 | return err; |
534 | 534 | ||
535 | bs->cur = beg + len; | 535 | bs->cur = beg + len; |
536 | bs->bit = 0; | 536 | bs->bit = 0; |
537 | } else if ((err = (Decoders[son->type]) (bs, son, base, | 537 | } else if ((err = (Decoders[son->type]) (bs, son, base, |
538 | level + 1))) | 538 | level + 1)) < |
539 | H323_ERROR_NONE) | ||
539 | return err; | 540 | return err; |
540 | } | 541 | } |
541 | 542 | ||
@@ -554,7 +555,7 @@ int decode_seq(bitstr_t * bs, field_t * f, char *base, int level) | |||
554 | 555 | ||
555 | /* Decode the extension components */ | 556 | /* Decode the extension components */ |
556 | for (opt = 0; opt < bmp2_len; opt++, i++, son++) { | 557 | for (opt = 0; opt < bmp2_len; opt++, i++, son++) { |
557 | if (son->attr & STOP) { | 558 | if (i < f->ub && son->attr & STOP) { |
558 | PRINT("%*.s%s\n", (level + 1) * TAB_SIZE, " ", | 559 | PRINT("%*.s%s\n", (level + 1) * TAB_SIZE, " ", |
559 | son->name); | 560 | son->name); |
560 | return H323_ERROR_STOP; | 561 | return H323_ERROR_STOP; |
@@ -584,8 +585,8 @@ int decode_seq(bitstr_t * bs, field_t * f, char *base, int level) | |||
584 | beg = bs->cur; | 585 | beg = bs->cur; |
585 | 586 | ||
586 | if ((err = (Decoders[son->type]) (bs, son, base, | 587 | if ((err = (Decoders[son->type]) (bs, son, base, |
587 | level + 1)) > | 588 | level + 1)) < |
588 | H323_ERROR_STOP) | 589 | H323_ERROR_NONE) |
589 | return err; | 590 | return err; |
590 | 591 | ||
591 | bs->cur = beg + len; | 592 | bs->cur = beg + len; |
@@ -660,18 +661,20 @@ int decode_seqof(bitstr_t * bs, field_t * f, char *base, int level) | |||
660 | i < | 661 | i < |
661 | effective_count ? | 662 | effective_count ? |
662 | base : NULL, | 663 | base : NULL, |
663 | level + 1)) > | 664 | level + 1)) < |
664 | H323_ERROR_STOP) | 665 | H323_ERROR_NONE) |
665 | return err; | 666 | return err; |
666 | 667 | ||
667 | bs->cur = beg + len; | 668 | bs->cur = beg + len; |
668 | bs->bit = 0; | 669 | bs->bit = 0; |
669 | } else | 670 | } else |
670 | if ((err = (Decoders[son->type]) (bs, son, | 671 | if ((err = (Decoders[son->type]) (bs, son, |
671 | i < effective_count ? | 672 | i < |
672 | base : NULL, | 673 | effective_count ? |
673 | level + 1))) | 674 | base : NULL, |
674 | return err; | 675 | level + 1)) < |
676 | H323_ERROR_NONE) | ||
677 | return err; | ||
675 | 678 | ||
676 | if (base) | 679 | if (base) |
677 | base += son->offset; | 680 | base += son->offset; |
@@ -735,13 +738,14 @@ int decode_choice(bitstr_t * bs, field_t * f, char *base, int level) | |||
735 | } | 738 | } |
736 | beg = bs->cur; | 739 | beg = bs->cur; |
737 | 740 | ||
738 | if ((err = (Decoders[son->type]) (bs, son, base, level + 1)) > | 741 | if ((err = (Decoders[son->type]) (bs, son, base, level + 1)) < |
739 | H323_ERROR_STOP) | 742 | H323_ERROR_NONE) |
740 | return err; | 743 | return err; |
741 | 744 | ||
742 | bs->cur = beg + len; | 745 | bs->cur = beg + len; |
743 | bs->bit = 0; | 746 | bs->bit = 0; |
744 | } else if ((err = (Decoders[son->type]) (bs, son, base, level + 1))) | 747 | } else if ((err = (Decoders[son->type]) (bs, son, base, level + 1)) < |
748 | H323_ERROR_NONE) | ||
745 | return err; | 749 | return err; |
746 | 750 | ||
747 | return H323_ERROR_NONE; | 751 | return H323_ERROR_NONE; |
diff --git a/net/ipv4/netfilter/ip_nat_snmp_basic.c b/net/ipv4/netfilter/ip_nat_snmp_basic.c index c62253845538..c33244263b90 100644 --- a/net/ipv4/netfilter/ip_nat_snmp_basic.c +++ b/net/ipv4/netfilter/ip_nat_snmp_basic.c | |||
@@ -768,6 +768,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, | |||
768 | len *= sizeof(unsigned long); | 768 | len *= sizeof(unsigned long); |
769 | *obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC); | 769 | *obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC); |
770 | if (*obj == NULL) { | 770 | if (*obj == NULL) { |
771 | kfree(lp); | ||
771 | kfree(id); | 772 | kfree(id); |
772 | if (net_ratelimit()) | 773 | if (net_ratelimit()) |
773 | printk("OOM in bsalg (%d)\n", __LINE__); | 774 | printk("OOM in bsalg (%d)\n", __LINE__); |
@@ -1003,12 +1004,12 @@ static unsigned char snmp_trap_decode(struct asn1_ctx *ctx, | |||
1003 | 1004 | ||
1004 | return 1; | 1005 | return 1; |
1005 | 1006 | ||
1007 | err_addr_free: | ||
1008 | kfree((unsigned long *)trap->ip_address); | ||
1009 | |||
1006 | err_id_free: | 1010 | err_id_free: |
1007 | kfree(trap->id); | 1011 | kfree(trap->id); |
1008 | 1012 | ||
1009 | err_addr_free: | ||
1010 | kfree((unsigned long *)trap->ip_address); | ||
1011 | |||
1012 | return 0; | 1013 | return 0; |
1013 | } | 1014 | } |
1014 | 1015 | ||
@@ -1126,11 +1127,10 @@ static int snmp_parse_mangle(unsigned char *msg, | |||
1126 | struct snmp_v1_trap trap; | 1127 | struct snmp_v1_trap trap; |
1127 | unsigned char ret = snmp_trap_decode(&ctx, &trap, map, check); | 1128 | unsigned char ret = snmp_trap_decode(&ctx, &trap, map, check); |
1128 | 1129 | ||
1129 | /* Discard trap allocations regardless */ | 1130 | if (ret) { |
1130 | kfree(trap.id); | 1131 | kfree(trap.id); |
1131 | kfree((unsigned long *)trap.ip_address); | 1132 | kfree((unsigned long *)trap.ip_address); |
1132 | 1133 | } else | |
1133 | if (!ret) | ||
1134 | return ret; | 1134 | return ret; |
1135 | 1135 | ||
1136 | } else { | 1136 | } else { |
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index f285bbf296e2..8604c747bca5 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -221,7 +221,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl) | |||
221 | if (pskb_may_pull(skb, xprth + 4 - skb->data)) { | 221 | if (pskb_may_pull(skb, xprth + 4 - skb->data)) { |
222 | u16 *ipcomp_hdr = (u16 *)xprth; | 222 | u16 *ipcomp_hdr = (u16 *)xprth; |
223 | 223 | ||
224 | fl->fl_ipsec_spi = ntohl(ntohs(ipcomp_hdr[1])); | 224 | fl->fl_ipsec_spi = htonl(ntohs(ipcomp_hdr[1])); |
225 | } | 225 | } |
226 | break; | 226 | break; |
227 | default: | 227 | default: |
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 05eb67def39f..48636436028a 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -208,7 +208,7 @@ static void ipcomp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
208 | if (type != ICMPV6_DEST_UNREACH && type != ICMPV6_PKT_TOOBIG) | 208 | if (type != ICMPV6_DEST_UNREACH && type != ICMPV6_PKT_TOOBIG) |
209 | return; | 209 | return; |
210 | 210 | ||
211 | spi = ntohl(ntohs(ipcomph->cpi)); | 211 | spi = htonl(ntohs(ipcomph->cpi)); |
212 | x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, spi, IPPROTO_COMP, AF_INET6); | 212 | x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, spi, IPPROTO_COMP, AF_INET6); |
213 | if (!x) | 213 | if (!x) |
214 | return; | 214 | return; |
diff --git a/net/irda/iriap.c b/net/irda/iriap.c index 254f90746900..2d2e2b1919f4 100644 --- a/net/irda/iriap.c +++ b/net/irda/iriap.c | |||
@@ -544,7 +544,8 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self, | |||
544 | { | 544 | { |
545 | struct sk_buff *tx_skb; | 545 | struct sk_buff *tx_skb; |
546 | int n; | 546 | int n; |
547 | __u32 tmp_be32, tmp_be16; | 547 | __u32 tmp_be32; |
548 | __be16 tmp_be16; | ||
548 | __u8 *fp; | 549 | __u8 *fp; |
549 | 550 | ||
550 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__); | 551 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__); |
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 3ac4193a78ed..7026b0866b7b 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -159,6 +159,7 @@ struct cache_head *sunrpc_cache_update(struct cache_detail *detail, | |||
159 | detail->update(tmp, new); | 159 | detail->update(tmp, new); |
160 | tmp->next = *head; | 160 | tmp->next = *head; |
161 | *head = tmp; | 161 | *head = tmp; |
162 | detail->entries++; | ||
162 | cache_get(tmp); | 163 | cache_get(tmp); |
163 | is_new = cache_fresh_locked(tmp, new->expiry_time); | 164 | is_new = cache_fresh_locked(tmp, new->expiry_time); |
164 | cache_fresh_locked(old, 0); | 165 | cache_fresh_locked(old, 0); |
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index b54971059f16..891a6090cc09 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c | |||
@@ -62,7 +62,7 @@ int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq) | |||
62 | case IPPROTO_COMP: | 62 | case IPPROTO_COMP: |
63 | if (!pskb_may_pull(skb, sizeof(struct ip_comp_hdr))) | 63 | if (!pskb_may_pull(skb, sizeof(struct ip_comp_hdr))) |
64 | return -EINVAL; | 64 | return -EINVAL; |
65 | *spi = ntohl(ntohs(*(u16*)(skb->h.raw + 2))); | 65 | *spi = htonl(ntohs(*(u16*)(skb->h.raw + 2))); |
66 | *seq = 0; | 66 | *seq = 0; |
67 | return 0; | 67 | return 0; |
68 | default: | 68 | default: |