diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-05-26 21:26:34 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-05-26 21:26:34 -0400 |
commit | cbc696a5fa3942aa2e6ad52a71d5126ffa84d031 (patch) | |
tree | 98eab655c0e5d0853267557616cb7059f27f7fc9 | |
parent | d3f464b5385531c4250a8b1dbd2f9ba6bbfcebb9 (diff) | |
parent | 8fc29ba65bd669b8f23a46b4760f3ba773e2a635 (diff) |
Merge branch 'upstream-fixes' into upstream
37 files changed, 219 insertions, 178 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index aa2cfe2b6f24..31c23e3a2de9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1905,6 +1905,12 @@ M: James.Bottomley@HansenPartnership.com | |||
1905 | L: linux-scsi@vger.kernel.org | 1905 | L: linux-scsi@vger.kernel.org |
1906 | S: Maintained | 1906 | S: Maintained |
1907 | 1907 | ||
1908 | NETEM NETWORK EMULATOR | ||
1909 | P: Stephen Hemminger | ||
1910 | M: shemminger@osdl.org | ||
1911 | L: netem@osdl.org | ||
1912 | S: Maintained | ||
1913 | |||
1908 | NETFILTER/IPTABLES/IPCHAINS | 1914 | NETFILTER/IPTABLES/IPCHAINS |
1909 | P: Rusty Russell | 1915 | P: Rusty Russell |
1910 | P: Marc Boucher | 1916 | P: Marc Boucher |
@@ -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/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S index f48bef15b4f0..af56987f69b0 100644 --- a/arch/i386/kernel/syscall_table.S +++ b/arch/i386/kernel/syscall_table.S | |||
@@ -315,3 +315,4 @@ ENTRY(sys_call_table) | |||
315 | .long sys_splice | 315 | .long sys_splice |
316 | .long sys_sync_file_range | 316 | .long sys_sync_file_range |
317 | .long sys_tee /* 315 */ | 317 | .long sys_tee /* 315 */ |
318 | .long sys_vmsplice | ||
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 4d15e396655c..b9200fb07815 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -463,11 +463,23 @@ static int pmac_pm_finish(suspend_state_t state) | |||
463 | return 0; | 463 | return 0; |
464 | } | 464 | } |
465 | 465 | ||
466 | static int pmac_pm_valid(suspend_state_t state) | ||
467 | { | ||
468 | switch (state) { | ||
469 | case PM_SUSPEND_DISK: | ||
470 | return 1; | ||
471 | /* can't do any other states via generic mechanism yet */ | ||
472 | default: | ||
473 | return 0; | ||
474 | } | ||
475 | } | ||
476 | |||
466 | static struct pm_ops pmac_pm_ops = { | 477 | static struct pm_ops pmac_pm_ops = { |
467 | .pm_disk_mode = PM_DISK_SHUTDOWN, | 478 | .pm_disk_mode = PM_DISK_SHUTDOWN, |
468 | .prepare = pmac_pm_prepare, | 479 | .prepare = pmac_pm_prepare, |
469 | .enter = pmac_pm_enter, | 480 | .enter = pmac_pm_enter, |
470 | .finish = pmac_pm_finish, | 481 | .finish = pmac_pm_finish, |
482 | .valid = pmac_pm_valid, | ||
471 | }; | 483 | }; |
472 | 484 | ||
473 | #endif /* CONFIG_SOFTWARE_SUSPEND */ | 485 | #endif /* CONFIG_SOFTWARE_SUSPEND */ |
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/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index f621168f38ae..8ea70625f7ea 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
@@ -457,10 +457,6 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev, | |||
457 | } | 457 | } |
458 | 458 | ||
459 | vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); | 459 | vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); |
460 | if ((vendor & 0xFFFF) == 0xFFFF) { | ||
461 | rc = -ENODEV; | ||
462 | goto out_err; | ||
463 | } | ||
464 | 460 | ||
465 | /* Default timeouts */ | 461 | /* Default timeouts */ |
466 | chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT); | 462 | chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT); |
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index a140e4536a4e..766cc969c4d0 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c | |||
@@ -491,7 +491,7 @@ static struct pci_device_id divil_pci[] = { | |||
491 | 491 | ||
492 | #define MSR_LBAR_SMB 0x5140000B | 492 | #define MSR_LBAR_SMB 0x5140000B |
493 | 493 | ||
494 | static int scx200_add_cs553x(void) | 494 | static __init int scx200_add_cs553x(void) |
495 | { | 495 | { |
496 | u32 low, hi; | 496 | u32 low, hi; |
497 | u32 smb_base; | 497 | u32 smb_base; |
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/infiniband/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c index 1ea433291fa7..b292fefa3b41 100644 --- a/drivers/infiniband/hw/mthca/mthca_srq.c +++ b/drivers/infiniband/hw/mthca/mthca_srq.c | |||
@@ -490,26 +490,7 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr, | |||
490 | 490 | ||
491 | first_ind = srq->first_free; | 491 | first_ind = srq->first_free; |
492 | 492 | ||
493 | for (nreq = 0; wr; ++nreq, wr = wr->next) { | 493 | for (nreq = 0; wr; wr = wr->next) { |
494 | if (unlikely(nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB)) { | ||
495 | nreq = 0; | ||
496 | |||
497 | doorbell[0] = cpu_to_be32(first_ind << srq->wqe_shift); | ||
498 | doorbell[1] = cpu_to_be32(srq->srqn << 8); | ||
499 | |||
500 | /* | ||
501 | * Make sure that descriptors are written | ||
502 | * before doorbell is rung. | ||
503 | */ | ||
504 | wmb(); | ||
505 | |||
506 | mthca_write64(doorbell, | ||
507 | dev->kar + MTHCA_RECEIVE_DOORBELL, | ||
508 | MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); | ||
509 | |||
510 | first_ind = srq->first_free; | ||
511 | } | ||
512 | |||
513 | ind = srq->first_free; | 494 | ind = srq->first_free; |
514 | 495 | ||
515 | if (ind < 0) { | 496 | if (ind < 0) { |
@@ -569,6 +550,26 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr, | |||
569 | 550 | ||
570 | srq->wrid[ind] = wr->wr_id; | 551 | srq->wrid[ind] = wr->wr_id; |
571 | srq->first_free = next_ind; | 552 | srq->first_free = next_ind; |
553 | |||
554 | ++nreq; | ||
555 | if (unlikely(nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB)) { | ||
556 | nreq = 0; | ||
557 | |||
558 | doorbell[0] = cpu_to_be32(first_ind << srq->wqe_shift); | ||
559 | doorbell[1] = cpu_to_be32(srq->srqn << 8); | ||
560 | |||
561 | /* | ||
562 | * Make sure that descriptors are written | ||
563 | * before doorbell is rung. | ||
564 | */ | ||
565 | wmb(); | ||
566 | |||
567 | mthca_write64(doorbell, | ||
568 | dev->kar + MTHCA_RECEIVE_DOORBELL, | ||
569 | MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); | ||
570 | |||
571 | first_ind = srq->first_free; | ||
572 | } | ||
572 | } | 573 | } |
573 | 574 | ||
574 | if (likely(nreq)) { | 575 | if (likely(nreq)) { |
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 1494175ac6fe..161afddd0f44 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -36,13 +36,10 @@ | |||
36 | 36 | ||
37 | 37 | ||
38 | /* | 38 | /* |
39 | * This code has been tested on an ads7846 / N770 device. | 39 | * This code has been heavily tested on a Nokia 770, and lightly |
40 | * tested on other ads7846 devices (OSK/Mistral, Lubbock). | ||
40 | * Support for ads7843 and ads7845 has only been stubbed in. | 41 | * Support for ads7843 and ads7845 has only been stubbed in. |
41 | * | 42 | * |
42 | * Not yet done: How accurate are the temperature and voltage | ||
43 | * readings? (System-specific calibration should support | ||
44 | * accuracy of 0.3 degrees C; otherwise it's 2.0 degrees.) | ||
45 | * | ||
46 | * IRQ handling needs a workaround because of a shortcoming in handling | 43 | * IRQ handling needs a workaround because of a shortcoming in handling |
47 | * edge triggered IRQs on some platforms like the OMAP1/2. These | 44 | * edge triggered IRQs on some platforms like the OMAP1/2. These |
48 | * platforms don't handle the ARM lazy IRQ disabling properly, thus we | 45 | * platforms don't handle the ARM lazy IRQ disabling properly, thus we |
@@ -248,10 +245,13 @@ static int ads7846_read12_ser(struct device *dev, unsigned command) | |||
248 | 245 | ||
249 | if (req->msg.status) | 246 | if (req->msg.status) |
250 | status = req->msg.status; | 247 | status = req->msg.status; |
248 | |||
249 | /* on-wire is a must-ignore bit, a BE12 value, then padding */ | ||
251 | sample = be16_to_cpu(req->sample); | 250 | sample = be16_to_cpu(req->sample); |
252 | sample = sample >> 4; | 251 | sample = sample >> 3; |
253 | kfree(req); | 252 | sample &= 0x0fff; |
254 | 253 | ||
254 | kfree(req); | ||
255 | return status ? status : sample; | 255 | return status ? status : sample; |
256 | } | 256 | } |
257 | 257 | ||
@@ -336,13 +336,13 @@ static void ads7846_rx(void *ads) | |||
336 | u16 x, y, z1, z2; | 336 | u16 x, y, z1, z2; |
337 | unsigned long flags; | 337 | unsigned long flags; |
338 | 338 | ||
339 | /* adjust: 12 bit samples (left aligned), built from | 339 | /* adjust: on-wire is a must-ignore bit, a BE12 value, then padding; |
340 | * two 8 bit values writen msb-first. | 340 | * built from two 8 bit values written msb-first. |
341 | */ | 341 | */ |
342 | x = be16_to_cpu(ts->tc.x) >> 4; | 342 | x = (be16_to_cpu(ts->tc.x) >> 3) & 0x0fff; |
343 | y = be16_to_cpu(ts->tc.y) >> 4; | 343 | y = (be16_to_cpu(ts->tc.y) >> 3) & 0x0fff; |
344 | z1 = be16_to_cpu(ts->tc.z1) >> 4; | 344 | z1 = (be16_to_cpu(ts->tc.z1) >> 3) & 0x0fff; |
345 | z2 = be16_to_cpu(ts->tc.z2) >> 4; | 345 | z2 = (be16_to_cpu(ts->tc.z2) >> 3) & 0x0fff; |
346 | 346 | ||
347 | /* range filtering */ | 347 | /* range filtering */ |
348 | if (x == MAX_12BIT) | 348 | if (x == MAX_12BIT) |
@@ -420,7 +420,7 @@ static void ads7846_debounce(void *ads) | |||
420 | 420 | ||
421 | m = &ts->msg[ts->msg_idx]; | 421 | m = &ts->msg[ts->msg_idx]; |
422 | t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list); | 422 | t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list); |
423 | val = (*(u16 *)t->rx_buf) >> 3; | 423 | val = (be16_to_cpu(*(__be16 *)t->rx_buf) >> 3) & 0x0fff; |
424 | if (!ts->read_cnt || (abs(ts->last_read - val) > ts->debounce_tol)) { | 424 | if (!ts->read_cnt || (abs(ts->last_read - val) > ts->debounce_tol)) { |
425 | /* Repeat it, if this was the first read or the read | 425 | /* Repeat it, if this was the first read or the read |
426 | * wasn't consistent enough. */ | 426 | * wasn't consistent enough. */ |
@@ -469,7 +469,7 @@ static void ads7846_timer(unsigned long handle) | |||
469 | spin_lock_irq(&ts->lock); | 469 | spin_lock_irq(&ts->lock); |
470 | 470 | ||
471 | if (unlikely(ts->msg_idx && !ts->pendown)) { | 471 | if (unlikely(ts->msg_idx && !ts->pendown)) { |
472 | /* measurment cycle ended */ | 472 | /* measurement cycle ended */ |
473 | if (!device_suspended(&ts->spi->dev)) { | 473 | if (!device_suspended(&ts->spi->dev)) { |
474 | ts->irq_disabled = 0; | 474 | ts->irq_disabled = 0; |
475 | enable_irq(ts->spi->irq); | 475 | enable_irq(ts->spi->irq); |
@@ -495,11 +495,10 @@ static irqreturn_t ads7846_irq(int irq, void *handle, struct pt_regs *regs) | |||
495 | spin_lock_irqsave(&ts->lock, flags); | 495 | spin_lock_irqsave(&ts->lock, flags); |
496 | if (likely(ts->get_pendown_state())) { | 496 | if (likely(ts->get_pendown_state())) { |
497 | if (!ts->irq_disabled) { | 497 | if (!ts->irq_disabled) { |
498 | /* REVISIT irq logic for many ARM chips has cloned a | 498 | /* The ARM do_simple_IRQ() dispatcher doesn't act |
499 | * bug wherein disabling an irq in its handler won't | 499 | * like the other dispatchers: it will report IRQs |
500 | * work;(it's disabled lazily, and too late to work. | 500 | * even after they've been disabled. We work around |
501 | * until all their irq logic is fixed, we must shadow | 501 | * that here. (The "generic irq" framework may help...) |
502 | * that state here. | ||
503 | */ | 502 | */ |
504 | ts->irq_disabled = 1; | 503 | ts->irq_disabled = 1; |
505 | disable_irq(ts->spi->irq); | 504 | disable_irq(ts->spi->irq); |
@@ -609,16 +608,20 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
609 | return -EINVAL; | 608 | return -EINVAL; |
610 | } | 609 | } |
611 | 610 | ||
611 | /* REVISIT when the irq can be triggered active-low, or if for some | ||
612 | * reason the touchscreen isn't hooked up, we don't need to access | ||
613 | * the pendown state. | ||
614 | */ | ||
612 | if (pdata->get_pendown_state == NULL) { | 615 | if (pdata->get_pendown_state == NULL) { |
613 | dev_dbg(&spi->dev, "no get_pendown_state function?\n"); | 616 | dev_dbg(&spi->dev, "no get_pendown_state function?\n"); |
614 | return -EINVAL; | 617 | return -EINVAL; |
615 | } | 618 | } |
616 | 619 | ||
617 | /* We'd set the wordsize to 12 bits ... except that some controllers | 620 | /* We'd set TX wordsize 8 bits and RX wordsize to 13 bits ... except |
618 | * will then treat the 8 bit command words as 12 bits (and drop the | 621 | * that even if the hardware can do that, the SPI controller driver |
619 | * four MSBs of the 12 bit result). Result: inputs must be shifted | 622 | * may not. So we stick to very-portable 8 bit words, both RX and TX. |
620 | * to discard the four garbage LSBs. | ||
621 | */ | 623 | */ |
624 | spi->bits_per_word = 8; | ||
622 | 625 | ||
623 | ts = kzalloc(sizeof(struct ads7846), GFP_KERNEL); | 626 | ts = kzalloc(sizeof(struct ads7846), GFP_KERNEL); |
624 | input_dev = input_allocate_device(); | 627 | input_dev = input_allocate_device(); |
@@ -772,7 +775,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
772 | 775 | ||
773 | if (request_irq(spi->irq, ads7846_irq, | 776 | if (request_irq(spi->irq, ads7846_irq, |
774 | SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING, | 777 | SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING, |
775 | spi->dev.bus_id, ts)) { | 778 | spi->dev.driver->name, ts)) { |
776 | dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); | 779 | dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); |
777 | err = -EBUSY; | 780 | err = -EBUSY; |
778 | goto err_free_mem; | 781 | goto err_free_mem; |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 3ca3cfb03a7e..ec802913f977 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -5028,8 +5028,10 @@ static int md_notify_reboot(struct notifier_block *this, | |||
5028 | printk(KERN_INFO "md: stopping all md devices.\n"); | 5028 | printk(KERN_INFO "md: stopping all md devices.\n"); |
5029 | 5029 | ||
5030 | ITERATE_MDDEV(mddev,tmp) | 5030 | ITERATE_MDDEV(mddev,tmp) |
5031 | if (mddev_trylock(mddev)) | 5031 | if (mddev_trylock(mddev)) { |
5032 | do_md_stop (mddev, 1); | 5032 | do_md_stop (mddev, 1); |
5033 | mddev_unlock(mddev); | ||
5034 | } | ||
5033 | /* | 5035 | /* |
5034 | * certain more exotic SCSI devices are known to be | 5036 | * certain more exotic SCSI devices are known to be |
5035 | * volatile wrt too early system reboots. While the | 5037 | * volatile wrt too early system reboots. While the |
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/pluto2/Kconfig b/drivers/media/dvb/pluto2/Kconfig index 48252e9ce586..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 && I2C | 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/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/irda/Kconfig b/drivers/net/irda/Kconfig index 5e6d00752990..cff8598aa800 100644 --- a/drivers/net/irda/Kconfig +++ b/drivers/net/irda/Kconfig | |||
@@ -33,7 +33,7 @@ config DONGLE | |||
33 | 33 | ||
34 | config ESI_DONGLE | 34 | config ESI_DONGLE |
35 | tristate "ESI JetEye PC dongle" | 35 | tristate "ESI JetEye PC dongle" |
36 | depends on DONGLE && IRDA | 36 | depends on IRTTY_SIR && DONGLE && IRDA |
37 | help | 37 | help |
38 | Say Y here if you want to build support for the Extended Systems | 38 | Say Y here if you want to build support for the Extended Systems |
39 | JetEye PC dongle. To compile it as a module, choose M here. The ESI | 39 | JetEye PC dongle. To compile it as a module, choose M here. The ESI |
@@ -44,7 +44,7 @@ config ESI_DONGLE | |||
44 | 44 | ||
45 | config ACTISYS_DONGLE | 45 | config ACTISYS_DONGLE |
46 | tristate "ACTiSYS IR-220L and IR220L+ dongle" | 46 | tristate "ACTiSYS IR-220L and IR220L+ dongle" |
47 | depends on DONGLE && IRDA | 47 | depends on IRTTY_SIR && DONGLE && IRDA |
48 | help | 48 | help |
49 | Say Y here if you want to build support for the ACTiSYS IR-220L and | 49 | Say Y here if you want to build support for the ACTiSYS IR-220L and |
50 | IR220L+ dongles. To compile it as a module, choose M here. The | 50 | IR220L+ dongles. To compile it as a module, choose M here. The |
@@ -55,7 +55,7 @@ config ACTISYS_DONGLE | |||
55 | 55 | ||
56 | config TEKRAM_DONGLE | 56 | config TEKRAM_DONGLE |
57 | tristate "Tekram IrMate 210B dongle" | 57 | tristate "Tekram IrMate 210B dongle" |
58 | depends on DONGLE && IRDA | 58 | depends on IRTTY_SIR && DONGLE && IRDA |
59 | help | 59 | help |
60 | Say Y here if you want to build support for the Tekram IrMate 210B | 60 | Say Y here if you want to build support for the Tekram IrMate 210B |
61 | dongle. To compile it as a module, choose M here. The Tekram dongle | 61 | dongle. To compile it as a module, choose M here. The Tekram dongle |
@@ -66,7 +66,7 @@ config TEKRAM_DONGLE | |||
66 | 66 | ||
67 | config TOIM3232_DONGLE | 67 | config TOIM3232_DONGLE |
68 | tristate "TOIM3232 IrDa dongle" | 68 | tristate "TOIM3232 IrDa dongle" |
69 | depends on DONGLE && IRDA | 69 | depends on IRTTY_SIR && DONGLE && IRDA |
70 | help | 70 | help |
71 | Say Y here if you want to build support for the Vishay/Temic | 71 | Say Y here if you want to build support for the Vishay/Temic |
72 | TOIM3232 and TOIM4232 based dongles. | 72 | TOIM3232 and TOIM4232 based dongles. |
@@ -74,7 +74,7 @@ config TOIM3232_DONGLE | |||
74 | 74 | ||
75 | config LITELINK_DONGLE | 75 | config LITELINK_DONGLE |
76 | tristate "Parallax LiteLink dongle" | 76 | tristate "Parallax LiteLink dongle" |
77 | depends on DONGLE && IRDA | 77 | depends on IRTTY_SIR && DONGLE && IRDA |
78 | help | 78 | help |
79 | Say Y here if you want to build support for the Parallax Litelink | 79 | Say Y here if you want to build support for the Parallax Litelink |
80 | dongle. To compile it as a module, choose M here. The Parallax | 80 | dongle. To compile it as a module, choose M here. The Parallax |
@@ -85,7 +85,7 @@ config LITELINK_DONGLE | |||
85 | 85 | ||
86 | config MA600_DONGLE | 86 | config MA600_DONGLE |
87 | tristate "Mobile Action MA600 dongle" | 87 | tristate "Mobile Action MA600 dongle" |
88 | depends on DONGLE && IRDA && EXPERIMENTAL | 88 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
89 | help | 89 | help |
90 | Say Y here if you want to build support for the Mobile Action MA600 | 90 | Say Y here if you want to build support for the Mobile Action MA600 |
91 | dongle. To compile it as a module, choose M here. The MA600 dongle | 91 | dongle. To compile it as a module, choose M here. The MA600 dongle |
@@ -98,7 +98,7 @@ config MA600_DONGLE | |||
98 | 98 | ||
99 | config GIRBIL_DONGLE | 99 | config GIRBIL_DONGLE |
100 | tristate "Greenwich GIrBIL dongle" | 100 | tristate "Greenwich GIrBIL dongle" |
101 | depends on DONGLE && IRDA && EXPERIMENTAL | 101 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
102 | help | 102 | help |
103 | Say Y here if you want to build support for the Greenwich GIrBIL | 103 | Say Y here if you want to build support for the Greenwich GIrBIL |
104 | dongle. If you want to compile it as a module, choose M here. | 104 | dongle. If you want to compile it as a module, choose M here. |
@@ -109,7 +109,7 @@ config GIRBIL_DONGLE | |||
109 | 109 | ||
110 | config MCP2120_DONGLE | 110 | config MCP2120_DONGLE |
111 | tristate "Microchip MCP2120" | 111 | tristate "Microchip MCP2120" |
112 | depends on DONGLE && IRDA && EXPERIMENTAL | 112 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
113 | help | 113 | help |
114 | Say Y here if you want to build support for the Microchip MCP2120 | 114 | Say Y here if you want to build support for the Microchip MCP2120 |
115 | dongle. If you want to compile it as a module, choose M here. | 115 | dongle. If you want to compile it as a module, choose M here. |
@@ -123,7 +123,7 @@ config MCP2120_DONGLE | |||
123 | 123 | ||
124 | config OLD_BELKIN_DONGLE | 124 | config OLD_BELKIN_DONGLE |
125 | tristate "Old Belkin dongle" | 125 | tristate "Old Belkin dongle" |
126 | depends on DONGLE && IRDA && EXPERIMENTAL | 126 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
127 | help | 127 | help |
128 | Say Y here if you want to build support for the Adaptec Airport 1000 | 128 | Say Y here if you want to build support for the Adaptec Airport 1000 |
129 | and 2000 dongles. If you want to compile it as a module, choose | 129 | and 2000 dongles. If you want to compile it as a module, choose |
@@ -132,7 +132,7 @@ config OLD_BELKIN_DONGLE | |||
132 | 132 | ||
133 | config ACT200L_DONGLE | 133 | config ACT200L_DONGLE |
134 | tristate "ACTiSYS IR-200L dongle" | 134 | tristate "ACTiSYS IR-200L dongle" |
135 | depends on DONGLE && IRDA && EXPERIMENTAL | 135 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
136 | help | 136 | help |
137 | Say Y here if you want to build support for the ACTiSYS IR-200L | 137 | Say Y here if you want to build support for the ACTiSYS IR-200L |
138 | dongle. If you want to compile it as a module, choose M here. | 138 | dongle. If you want to compile it as a module, choose M here. |
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c index 0e1ac338cac1..bed6823d9809 100644 --- a/drivers/net/wireless/arlan-main.c +++ b/drivers/net/wireless/arlan-main.c | |||
@@ -1838,7 +1838,7 @@ struct net_device * __init arlan_probe(int unit) | |||
1838 | } | 1838 | } |
1839 | 1839 | ||
1840 | #ifdef MODULE | 1840 | #ifdef MODULE |
1841 | int init_module(void) | 1841 | int __init init_module(void) |
1842 | { | 1842 | { |
1843 | int i = 0; | 1843 | int i = 0; |
1844 | 1844 | ||
@@ -1860,7 +1860,7 @@ int init_module(void) | |||
1860 | } | 1860 | } |
1861 | 1861 | ||
1862 | 1862 | ||
1863 | void cleanup_module(void) | 1863 | void __exit cleanup_module(void) |
1864 | { | 1864 | { |
1865 | int i = 0; | 1865 | int i = 0; |
1866 | struct net_device *dev; | 1866 | struct net_device *dev; |
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index ff192e96268a..dade4b903579 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c | |||
@@ -4306,7 +4306,7 @@ out: | |||
4306 | * Insertion of the module | 4306 | * Insertion of the module |
4307 | * I'm now quite proud of the multi-device support. | 4307 | * I'm now quite proud of the multi-device support. |
4308 | */ | 4308 | */ |
4309 | int init_module(void) | 4309 | int __init init_module(void) |
4310 | { | 4310 | { |
4311 | int ret = -EIO; /* Return error if no cards found */ | 4311 | int ret = -EIO; /* Return error if no cards found */ |
4312 | int i; | 4312 | int i; |
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; |
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 9de4b5a04d70..5fc14563ee3a 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c | |||
@@ -405,7 +405,7 @@ static int s3c24xx_spi_remove(struct platform_device *dev) | |||
405 | 405 | ||
406 | static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg) | 406 | static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg) |
407 | { | 407 | { |
408 | struct s3c24xx_spi *hw = platform_get_drvdata(dev); | 408 | struct s3c24xx_spi *hw = platform_get_drvdata(pdev); |
409 | 409 | ||
410 | clk_disable(hw->clk); | 410 | clk_disable(hw->clk); |
411 | return 0; | 411 | return 0; |
@@ -413,7 +413,7 @@ static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg) | |||
413 | 413 | ||
414 | static int s3c24xx_spi_resume(struct platform_device *pdev) | 414 | static int s3c24xx_spi_resume(struct platform_device *pdev) |
415 | { | 415 | { |
416 | struct s3c24xx_spi *hw = platform_get_drvdata(dev); | 416 | struct s3c24xx_spi *hw = platform_get_drvdata(pdev); |
417 | 417 | ||
418 | clk_enable(hw->clk); | 418 | clk_enable(hw->clk); |
419 | return 0; | 419 | return 0; |
diff --git a/fs/affs/namei.c b/fs/affs/namei.c index d4c2d636c479..a42143ca0169 100644 --- a/fs/affs/namei.c +++ b/fs/affs/namei.c | |||
@@ -416,10 +416,9 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
416 | return retval; | 416 | return retval; |
417 | } | 417 | } |
418 | 418 | ||
419 | retval = -EIO; | ||
420 | bh = affs_bread(sb, old_dentry->d_inode->i_ino); | 419 | bh = affs_bread(sb, old_dentry->d_inode->i_ino); |
421 | if (!bh) | 420 | if (!bh) |
422 | goto done; | 421 | return -EIO; |
423 | 422 | ||
424 | /* Remove header from its parent directory. */ | 423 | /* Remove header from its parent directory. */ |
425 | affs_lock_dir(old_dir); | 424 | affs_lock_dir(old_dir); |
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/include/asm-alpha/termbits.h b/include/asm-alpha/termbits.h index f4837fa29420..5541101b58ae 100644 --- a/include/asm-alpha/termbits.h +++ b/include/asm-alpha/termbits.h | |||
@@ -148,6 +148,7 @@ struct termios { | |||
148 | #define HUPCL 00040000 | 148 | #define HUPCL 00040000 |
149 | 149 | ||
150 | #define CLOCAL 00100000 | 150 | #define CLOCAL 00100000 |
151 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
151 | #define CRTSCTS 020000000000 /* flow control */ | 152 | #define CRTSCTS 020000000000 /* flow control */ |
152 | 153 | ||
153 | /* c_lflag bits */ | 154 | /* c_lflag bits */ |
diff --git a/include/asm-powerpc/termbits.h b/include/asm-powerpc/termbits.h index ebf6055481dc..6d533b07aaf5 100644 --- a/include/asm-powerpc/termbits.h +++ b/include/asm-powerpc/termbits.h | |||
@@ -153,6 +153,7 @@ struct termios { | |||
153 | #define HUPCL 00040000 | 153 | #define HUPCL 00040000 |
154 | 154 | ||
155 | #define CLOCAL 00100000 | 155 | #define CLOCAL 00100000 |
156 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
156 | #define CRTSCTS 020000000000 /* flow control */ | 157 | #define CRTSCTS 020000000000 /* flow control */ |
157 | 158 | ||
158 | /* c_lflag bits */ | 159 | /* c_lflag bits */ |
diff --git a/net/core/dev.c b/net/core/dev.c index 2dce673a039b..4fba549caf29 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -127,7 +127,7 @@ | |||
127 | * sure which should go first, but I bet it won't make much | 127 | * sure which should go first, but I bet it won't make much |
128 | * difference if we are running VLANs. The good news is that | 128 | * difference if we are running VLANs. The good news is that |
129 | * this protocol won't be in the list unless compiled in, so | 129 | * this protocol won't be in the list unless compiled in, so |
130 | * the average user (w/out VLANs) will not be adversly affected. | 130 | * the average user (w/out VLANs) will not be adversely affected. |
131 | * --BLG | 131 | * --BLG |
132 | * | 132 | * |
133 | * 0800 IP | 133 | * 0800 IP |
@@ -149,7 +149,7 @@ static struct list_head ptype_base[16]; /* 16 way hashed list */ | |||
149 | static struct list_head ptype_all; /* Taps */ | 149 | static struct list_head ptype_all; /* Taps */ |
150 | 150 | ||
151 | /* | 151 | /* |
152 | * The @dev_base list is protected by @dev_base_lock and the rtln | 152 | * The @dev_base list is protected by @dev_base_lock and the rtnl |
153 | * semaphore. | 153 | * semaphore. |
154 | * | 154 | * |
155 | * Pure readers hold dev_base_lock for reading. | 155 | * Pure readers hold dev_base_lock for reading. |
@@ -641,10 +641,12 @@ int dev_valid_name(const char *name) | |||
641 | * @name: name format string | 641 | * @name: name format string |
642 | * | 642 | * |
643 | * Passed a format string - eg "lt%d" it will try and find a suitable | 643 | * Passed a format string - eg "lt%d" it will try and find a suitable |
644 | * id. Not efficient for many devices, not called a lot. The caller | 644 | * id. It scans list of devices to build up a free map, then chooses |
645 | * must hold the dev_base or rtnl lock while allocating the name and | 645 | * the first empty slot. The caller must hold the dev_base or rtnl lock |
646 | * adding the device in order to avoid duplicates. Returns the number | 646 | * while allocating the name and adding the device in order to avoid |
647 | * of the unit assigned or a negative errno code. | 647 | * duplicates. |
648 | * Limited to bits_per_byte * page size devices (ie 32K on most platforms). | ||
649 | * Returns the number of the unit assigned or a negative errno code. | ||
648 | */ | 650 | */ |
649 | 651 | ||
650 | int dev_alloc_name(struct net_device *dev, const char *name) | 652 | int dev_alloc_name(struct net_device *dev, const char *name) |
@@ -744,7 +746,7 @@ int dev_change_name(struct net_device *dev, char *newname) | |||
744 | } | 746 | } |
745 | 747 | ||
746 | /** | 748 | /** |
747 | * netdev_features_change - device changes fatures | 749 | * netdev_features_change - device changes features |
748 | * @dev: device to cause notification | 750 | * @dev: device to cause notification |
749 | * | 751 | * |
750 | * Called to indicate a device has changed features. | 752 | * Called to indicate a device has changed features. |
@@ -2196,7 +2198,7 @@ int netdev_set_master(struct net_device *slave, struct net_device *master) | |||
2196 | * @dev: device | 2198 | * @dev: device |
2197 | * @inc: modifier | 2199 | * @inc: modifier |
2198 | * | 2200 | * |
2199 | * Add or remove promsicuity from a device. While the count in the device | 2201 | * Add or remove promiscuity from a device. While the count in the device |
2200 | * remains above zero the interface remains promiscuous. Once it hits zero | 2202 | * remains above zero the interface remains promiscuous. Once it hits zero |
2201 | * the device reverts back to normal filtering operation. A negative inc | 2203 | * the device reverts back to normal filtering operation. A negative inc |
2202 | * value is used to drop promiscuity on the device. | 2204 | * value is used to drop promiscuity on the device. |
@@ -3122,7 +3124,7 @@ EXPORT_SYMBOL(alloc_netdev); | |||
3122 | void free_netdev(struct net_device *dev) | 3124 | void free_netdev(struct net_device *dev) |
3123 | { | 3125 | { |
3124 | #ifdef CONFIG_SYSFS | 3126 | #ifdef CONFIG_SYSFS |
3125 | /* Compatiablity with error handling in drivers */ | 3127 | /* Compatibility with error handling in drivers */ |
3126 | if (dev->reg_state == NETREG_UNINITIALIZED) { | 3128 | if (dev->reg_state == NETREG_UNINITIALIZED) { |
3127 | kfree((char *)dev - dev->padded); | 3129 | kfree((char *)dev - dev->padded); |
3128 | return; | 3130 | return; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 0190e39096b9..8a777932786d 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -280,10 +280,13 @@ static int inline rt6_check_neigh(struct rt6_info *rt) | |||
280 | { | 280 | { |
281 | struct neighbour *neigh = rt->rt6i_nexthop; | 281 | struct neighbour *neigh = rt->rt6i_nexthop; |
282 | int m = 0; | 282 | int m = 0; |
283 | if (neigh) { | 283 | if (rt->rt6i_flags & RTF_NONEXTHOP || |
284 | !(rt->rt6i_flags & RTF_GATEWAY)) | ||
285 | m = 1; | ||
286 | else if (neigh) { | ||
284 | read_lock_bh(&neigh->lock); | 287 | read_lock_bh(&neigh->lock); |
285 | if (neigh->nud_state & NUD_VALID) | 288 | if (neigh->nud_state & NUD_VALID) |
286 | m = 1; | 289 | m = 2; |
287 | read_unlock_bh(&neigh->lock); | 290 | read_unlock_bh(&neigh->lock); |
288 | } | 291 | } |
289 | return m; | 292 | return m; |
@@ -292,15 +295,18 @@ static int inline rt6_check_neigh(struct rt6_info *rt) | |||
292 | static int rt6_score_route(struct rt6_info *rt, int oif, | 295 | static int rt6_score_route(struct rt6_info *rt, int oif, |
293 | int strict) | 296 | int strict) |
294 | { | 297 | { |
295 | int m = rt6_check_dev(rt, oif); | 298 | int m, n; |
299 | |||
300 | m = rt6_check_dev(rt, oif); | ||
296 | if (!m && (strict & RT6_SELECT_F_IFACE)) | 301 | if (!m && (strict & RT6_SELECT_F_IFACE)) |
297 | return -1; | 302 | return -1; |
298 | #ifdef CONFIG_IPV6_ROUTER_PREF | 303 | #ifdef CONFIG_IPV6_ROUTER_PREF |
299 | m |= IPV6_DECODE_PREF(IPV6_EXTRACT_PREF(rt->rt6i_flags)) << 2; | 304 | m |= IPV6_DECODE_PREF(IPV6_EXTRACT_PREF(rt->rt6i_flags)) << 2; |
300 | #endif | 305 | #endif |
301 | if (rt6_check_neigh(rt)) | 306 | n = rt6_check_neigh(rt); |
307 | if (n > 1) | ||
302 | m |= 16; | 308 | m |= 16; |
303 | else if (strict & RT6_SELECT_F_REACHABLE) | 309 | else if (!n && strict & RT6_SELECT_F_REACHABLE) |
304 | return -1; | 310 | return -1; |
305 | return m; | 311 | return m; |
306 | } | 312 | } |