diff options
50 files changed, 238 insertions, 143 deletions
diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h index e14108b19c09..4c41656ede87 100644 --- a/arch/ia64/include/asm/elf.h +++ b/arch/ia64/include/asm/elf.h | |||
| @@ -201,7 +201,9 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst); | |||
| 201 | relevant until we have real hardware to play with... */ | 201 | relevant until we have real hardware to play with... */ |
| 202 | #define ELF_PLATFORM NULL | 202 | #define ELF_PLATFORM NULL |
| 203 | 203 | ||
| 204 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX) | 204 | #define SET_PERSONALITY(ex) \ |
| 205 | set_personality((current->personality & ~PER_MASK) | PER_LINUX) | ||
| 206 | |||
| 205 | #define elf_read_implies_exec(ex, executable_stack) \ | 207 | #define elf_read_implies_exec(ex, executable_stack) \ |
| 206 | ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) | 208 | ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) |
| 207 | 209 | ||
diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index 1994d3f58443..f2ad2163109d 100644 --- a/arch/x86/include/asm/elf.h +++ b/arch/x86/include/asm/elf.h | |||
| @@ -170,10 +170,7 @@ static inline void elf_common_init(struct thread_struct *t, | |||
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | #define ELF_PLAT_INIT(_r, load_addr) \ | 172 | #define ELF_PLAT_INIT(_r, load_addr) \ |
| 173 | do { \ | 173 | elf_common_init(¤t->thread, _r, 0) |
| 174 | elf_common_init(¤t->thread, _r, 0); \ | ||
| 175 | clear_thread_flag(TIF_IA32); \ | ||
| 176 | } while (0) | ||
| 177 | 174 | ||
| 178 | #define COMPAT_ELF_PLAT_INIT(regs, load_addr) \ | 175 | #define COMPAT_ELF_PLAT_INIT(regs, load_addr) \ |
| 179 | elf_common_init(¤t->thread, regs, __USER_DS) | 176 | elf_common_init(¤t->thread, regs, __USER_DS) |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 41a26a82470a..126f0b493d04 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
| @@ -527,6 +527,7 @@ void set_personality_ia32(void) | |||
| 527 | 527 | ||
| 528 | /* Make sure to be in 32bit mode */ | 528 | /* Make sure to be in 32bit mode */ |
| 529 | set_thread_flag(TIF_IA32); | 529 | set_thread_flag(TIF_IA32); |
| 530 | current->personality |= force_personality32; | ||
| 530 | 531 | ||
| 531 | /* Prepare the first "return" to user space */ | 532 | /* Prepare the first "return" to user space */ |
| 532 | current_thread_info()->status |= TS_COMPAT; | 533 | current_thread_info()->status |= TS_COMPAT; |
diff --git a/drivers/base/class.c b/drivers/base/class.c index 161746deab4b..6e2c3b064f53 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
| @@ -59,6 +59,8 @@ static void class_release(struct kobject *kobj) | |||
| 59 | else | 59 | else |
| 60 | pr_debug("class '%s' does not have a release() function, " | 60 | pr_debug("class '%s' does not have a release() function, " |
| 61 | "be careful\n", class->name); | 61 | "be careful\n", class->name); |
| 62 | |||
| 63 | kfree(cp); | ||
| 62 | } | 64 | } |
| 63 | 65 | ||
| 64 | static struct sysfs_ops class_sysfs_ops = { | 66 | static struct sysfs_ops class_sysfs_ops = { |
diff --git a/drivers/md/dm-log-userspace-transfer.c b/drivers/md/dm-log-userspace-transfer.c index 54abf9e303b7..f1c8cae70b4b 100644 --- a/drivers/md/dm-log-userspace-transfer.c +++ b/drivers/md/dm-log-userspace-transfer.c | |||
| @@ -172,11 +172,15 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type, | |||
| 172 | { | 172 | { |
| 173 | int r = 0; | 173 | int r = 0; |
| 174 | size_t dummy = 0; | 174 | size_t dummy = 0; |
| 175 | int overhead_size = | 175 | int overhead_size = sizeof(struct dm_ulog_request) + sizeof(struct cn_msg); |
| 176 | sizeof(struct dm_ulog_request *) + sizeof(struct cn_msg); | ||
| 177 | struct dm_ulog_request *tfr = prealloced_ulog_tfr; | 176 | struct dm_ulog_request *tfr = prealloced_ulog_tfr; |
| 178 | struct receiving_pkg pkg; | 177 | struct receiving_pkg pkg; |
| 179 | 178 | ||
| 179 | /* | ||
| 180 | * Given the space needed to hold the 'struct cn_msg' and | ||
| 181 | * 'struct dm_ulog_request' - do we have enough payload | ||
| 182 | * space remaining? | ||
| 183 | */ | ||
| 180 | if (data_size > (DM_ULOG_PREALLOCED_SIZE - overhead_size)) { | 184 | if (data_size > (DM_ULOG_PREALLOCED_SIZE - overhead_size)) { |
| 181 | DMINFO("Size of tfr exceeds preallocated size"); | 185 | DMINFO("Size of tfr exceeds preallocated size"); |
| 182 | return -EINVAL; | 186 | return -EINVAL; |
| @@ -191,7 +195,7 @@ resend: | |||
| 191 | */ | 195 | */ |
| 192 | mutex_lock(&dm_ulog_lock); | 196 | mutex_lock(&dm_ulog_lock); |
| 193 | 197 | ||
| 194 | memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - overhead_size); | 198 | memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - sizeof(struct cn_msg)); |
| 195 | memcpy(tfr->uuid, uuid, DM_UUID_LEN); | 199 | memcpy(tfr->uuid, uuid, DM_UUID_LEN); |
| 196 | tfr->luid = luid; | 200 | tfr->luid = luid; |
| 197 | tfr->seq = dm_ulog_seq++; | 201 | tfr->seq = dm_ulog_seq++; |
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index ad779bd13aec..6c1046df81f6 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
| @@ -724,7 +724,7 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes) | |||
| 724 | /* | 724 | /* |
| 725 | * Dispatch io. | 725 | * Dispatch io. |
| 726 | */ | 726 | */ |
| 727 | if (unlikely(ms->log_failure)) { | 727 | if (unlikely(ms->log_failure) && errors_handled(ms)) { |
| 728 | spin_lock_irq(&ms->lock); | 728 | spin_lock_irq(&ms->lock); |
| 729 | bio_list_merge(&ms->failures, &sync); | 729 | bio_list_merge(&ms->failures, &sync); |
| 730 | spin_unlock_irq(&ms->lock); | 730 | spin_unlock_irq(&ms->lock); |
diff --git a/drivers/md/dm-region-hash.c b/drivers/md/dm-region-hash.c index 5f19ceb6fe91..168bd38f5006 100644 --- a/drivers/md/dm-region-hash.c +++ b/drivers/md/dm-region-hash.c | |||
| @@ -660,10 +660,9 @@ void dm_rh_recovery_end(struct dm_region *reg, int success) | |||
| 660 | spin_lock_irq(&rh->region_lock); | 660 | spin_lock_irq(&rh->region_lock); |
| 661 | if (success) | 661 | if (success) |
| 662 | list_add(®->list, ®->rh->recovered_regions); | 662 | list_add(®->list, ®->rh->recovered_regions); |
| 663 | else { | 663 | else |
| 664 | reg->state = DM_RH_NOSYNC; | ||
| 665 | list_add(®->list, ®->rh->failed_recovered_regions); | 664 | list_add(®->list, ®->rh->failed_recovered_regions); |
| 666 | } | 665 | |
| 667 | spin_unlock_irq(&rh->region_lock); | 666 | spin_unlock_irq(&rh->region_lock); |
| 668 | 667 | ||
| 669 | rh->wakeup_workers(rh->context); | 668 | rh->wakeup_workers(rh->context); |
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c index 7d08879689ac..c097d8a4823d 100644 --- a/drivers/md/dm-snap-persistent.c +++ b/drivers/md/dm-snap-persistent.c | |||
| @@ -254,7 +254,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw, | |||
| 254 | * Issue the synchronous I/O from a different thread | 254 | * Issue the synchronous I/O from a different thread |
| 255 | * to avoid generic_make_request recursion. | 255 | * to avoid generic_make_request recursion. |
| 256 | */ | 256 | */ |
| 257 | INIT_WORK(&req.work, do_metadata); | 257 | INIT_WORK_ON_STACK(&req.work, do_metadata); |
| 258 | queue_work(ps->metadata_wq, &req.work); | 258 | queue_work(ps->metadata_wq, &req.work); |
| 259 | flush_workqueue(ps->metadata_wq); | 259 | flush_workqueue(ps->metadata_wq); |
| 260 | 260 | ||
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index e0efc1adcaff..bd58703ee8f6 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c | |||
| @@ -110,7 +110,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | stripes = simple_strtoul(argv[0], &end, 10); | 112 | stripes = simple_strtoul(argv[0], &end, 10); |
| 113 | if (*end) { | 113 | if (!stripes || *end) { |
| 114 | ti->error = "Invalid stripe count"; | 114 | ti->error = "Invalid stripe count"; |
| 115 | return -EINVAL; | 115 | return -EINVAL; |
| 116 | } | 116 | } |
diff --git a/drivers/md/dm-sysfs.c b/drivers/md/dm-sysfs.c index f53392df7b97..f91b40942e07 100644 --- a/drivers/md/dm-sysfs.c +++ b/drivers/md/dm-sysfs.c | |||
| @@ -80,20 +80,12 @@ static struct sysfs_ops dm_sysfs_ops = { | |||
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | /* | 82 | /* |
| 83 | * The sysfs structure is embedded in md struct, nothing to do here | ||
| 84 | */ | ||
| 85 | static void dm_sysfs_release(struct kobject *kobj) | ||
| 86 | { | ||
| 87 | } | ||
| 88 | |||
| 89 | /* | ||
| 90 | * dm kobject is embedded in mapped_device structure | 83 | * dm kobject is embedded in mapped_device structure |
| 91 | * no need to define release function here | 84 | * no need to define release function here |
| 92 | */ | 85 | */ |
| 93 | static struct kobj_type dm_ktype = { | 86 | static struct kobj_type dm_ktype = { |
| 94 | .sysfs_ops = &dm_sysfs_ops, | 87 | .sysfs_ops = &dm_sysfs_ops, |
| 95 | .default_attrs = dm_attrs, | 88 | .default_attrs = dm_attrs, |
| 96 | .release = dm_sysfs_release | ||
| 97 | }; | 89 | }; |
| 98 | 90 | ||
| 99 | /* | 91 | /* |
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 3167480b532c..aa4e2aa86d49 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
| @@ -1595,10 +1595,15 @@ static int dm_prep_fn(struct request_queue *q, struct request *rq) | |||
| 1595 | return BLKPREP_OK; | 1595 | return BLKPREP_OK; |
| 1596 | } | 1596 | } |
| 1597 | 1597 | ||
| 1598 | static void map_request(struct dm_target *ti, struct request *clone, | 1598 | /* |
| 1599 | struct mapped_device *md) | 1599 | * Returns: |
| 1600 | * 0 : the request has been processed (not requeued) | ||
| 1601 | * !0 : the request has been requeued | ||
| 1602 | */ | ||
| 1603 | static int map_request(struct dm_target *ti, struct request *clone, | ||
| 1604 | struct mapped_device *md) | ||
| 1600 | { | 1605 | { |
| 1601 | int r; | 1606 | int r, requeued = 0; |
| 1602 | struct dm_rq_target_io *tio = clone->end_io_data; | 1607 | struct dm_rq_target_io *tio = clone->end_io_data; |
| 1603 | 1608 | ||
| 1604 | /* | 1609 | /* |
| @@ -1625,6 +1630,7 @@ static void map_request(struct dm_target *ti, struct request *clone, | |||
| 1625 | case DM_MAPIO_REQUEUE: | 1630 | case DM_MAPIO_REQUEUE: |
| 1626 | /* The target wants to requeue the I/O */ | 1631 | /* The target wants to requeue the I/O */ |
| 1627 | dm_requeue_unmapped_request(clone); | 1632 | dm_requeue_unmapped_request(clone); |
| 1633 | requeued = 1; | ||
| 1628 | break; | 1634 | break; |
| 1629 | default: | 1635 | default: |
| 1630 | if (r > 0) { | 1636 | if (r > 0) { |
| @@ -1636,6 +1642,8 @@ static void map_request(struct dm_target *ti, struct request *clone, | |||
| 1636 | dm_kill_unmapped_request(clone, r); | 1642 | dm_kill_unmapped_request(clone, r); |
| 1637 | break; | 1643 | break; |
| 1638 | } | 1644 | } |
| 1645 | |||
| 1646 | return requeued; | ||
| 1639 | } | 1647 | } |
| 1640 | 1648 | ||
| 1641 | /* | 1649 | /* |
| @@ -1677,12 +1685,17 @@ static void dm_request_fn(struct request_queue *q) | |||
| 1677 | atomic_inc(&md->pending[rq_data_dir(clone)]); | 1685 | atomic_inc(&md->pending[rq_data_dir(clone)]); |
| 1678 | 1686 | ||
| 1679 | spin_unlock(q->queue_lock); | 1687 | spin_unlock(q->queue_lock); |
| 1680 | map_request(ti, clone, md); | 1688 | if (map_request(ti, clone, md)) |
| 1689 | goto requeued; | ||
| 1690 | |||
| 1681 | spin_lock_irq(q->queue_lock); | 1691 | spin_lock_irq(q->queue_lock); |
| 1682 | } | 1692 | } |
| 1683 | 1693 | ||
| 1684 | goto out; | 1694 | goto out; |
| 1685 | 1695 | ||
| 1696 | requeued: | ||
| 1697 | spin_lock_irq(q->queue_lock); | ||
| 1698 | |||
| 1686 | plug_and_out: | 1699 | plug_and_out: |
| 1687 | if (!elv_queue_empty(q)) | 1700 | if (!elv_queue_empty(q)) |
| 1688 | /* Some requests still remain, retry later */ | 1701 | /* Some requests still remain, retry later */ |
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index fee6eee7ae5b..006cb2efcd22 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
| @@ -296,6 +296,7 @@ static void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr, | |||
| 296 | req_hdr->opcode = opcode; | 296 | req_hdr->opcode = opcode; |
| 297 | req_hdr->subsystem = subsystem; | 297 | req_hdr->subsystem = subsystem; |
| 298 | req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr)); | 298 | req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr)); |
| 299 | req_hdr->version = 0; | ||
| 299 | } | 300 | } |
| 300 | 301 | ||
| 301 | static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages, | 302 | static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages, |
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c index 3103f4165311..35a06b47587b 100644 --- a/drivers/net/ixgbe/ixgbe_82598.c +++ b/drivers/net/ixgbe/ixgbe_82598.c | |||
| @@ -357,12 +357,34 @@ static s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw, s32 packetbuf_num) | |||
| 357 | u32 fctrl_reg; | 357 | u32 fctrl_reg; |
| 358 | u32 rmcs_reg; | 358 | u32 rmcs_reg; |
| 359 | u32 reg; | 359 | u32 reg; |
| 360 | u32 link_speed = 0; | ||
| 361 | bool link_up; | ||
| 360 | 362 | ||
| 361 | #ifdef CONFIG_DCB | 363 | #ifdef CONFIG_DCB |
| 362 | if (hw->fc.requested_mode == ixgbe_fc_pfc) | 364 | if (hw->fc.requested_mode == ixgbe_fc_pfc) |
| 363 | goto out; | 365 | goto out; |
| 364 | 366 | ||
| 365 | #endif /* CONFIG_DCB */ | 367 | #endif /* CONFIG_DCB */ |
| 368 | /* | ||
| 369 | * On 82598 having Rx FC on causes resets while doing 1G | ||
| 370 | * so if it's on turn it off once we know link_speed. For | ||
| 371 | * more details see 82598 Specification update. | ||
| 372 | */ | ||
| 373 | hw->mac.ops.check_link(hw, &link_speed, &link_up, false); | ||
| 374 | if (link_up && link_speed == IXGBE_LINK_SPEED_1GB_FULL) { | ||
| 375 | switch (hw->fc.requested_mode) { | ||
| 376 | case ixgbe_fc_full: | ||
| 377 | hw->fc.requested_mode = ixgbe_fc_tx_pause; | ||
| 378 | break; | ||
| 379 | case ixgbe_fc_rx_pause: | ||
| 380 | hw->fc.requested_mode = ixgbe_fc_none; | ||
| 381 | break; | ||
| 382 | default: | ||
| 383 | /* no change */ | ||
| 384 | break; | ||
| 385 | } | ||
| 386 | } | ||
| 387 | |||
| 366 | /* Negotiate the fc mode to use */ | 388 | /* Negotiate the fc mode to use */ |
| 367 | ret_val = ixgbe_fc_autoneg(hw); | 389 | ret_val = ixgbe_fc_autoneg(hw); |
| 368 | if (ret_val) | 390 | if (ret_val) |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 7b7c8486c0bf..951b73cf5ca2 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
| @@ -5763,6 +5763,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
| 5763 | if (err) | 5763 | if (err) |
| 5764 | goto err_sw_init; | 5764 | goto err_sw_init; |
| 5765 | 5765 | ||
| 5766 | /* Make it possible the adapter to be woken up via WOL */ | ||
| 5767 | if (adapter->hw.mac.type == ixgbe_mac_82599EB) | ||
| 5768 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0); | ||
| 5769 | |||
| 5766 | /* | 5770 | /* |
| 5767 | * If there is a fan on this device and it has failed log the | 5771 | * If there is a fan on this device and it has failed log the |
| 5768 | * failure. | 5772 | * failure. |
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 103e8b0e2a0d..46997e177ee3 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
| @@ -2284,6 +2284,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev, | |||
| 2284 | fail2: | 2284 | fail2: |
| 2285 | efx_fini_struct(efx); | 2285 | efx_fini_struct(efx); |
| 2286 | fail1: | 2286 | fail1: |
| 2287 | WARN_ON(rc > 0); | ||
| 2287 | EFX_LOG(efx, "initialisation failed. rc=%d\n", rc); | 2288 | EFX_LOG(efx, "initialisation failed. rc=%d\n", rc); |
| 2288 | free_netdev(net_dev); | 2289 | free_netdev(net_dev); |
| 2289 | return rc; | 2290 | return rc; |
diff --git a/drivers/net/sfc/qt202x_phy.c b/drivers/net/sfc/qt202x_phy.c index e0d13a451019..67eec7a6e487 100644 --- a/drivers/net/sfc/qt202x_phy.c +++ b/drivers/net/sfc/qt202x_phy.c | |||
| @@ -320,7 +320,7 @@ static int qt202x_reset_phy(struct efx_nic *efx) | |||
| 320 | 320 | ||
| 321 | falcon_board(efx)->type->init_phy(efx); | 321 | falcon_board(efx)->type->init_phy(efx); |
| 322 | 322 | ||
| 323 | return rc; | 323 | return 0; |
| 324 | 324 | ||
| 325 | fail: | 325 | fail: |
| 326 | EFX_ERR(efx, "PHY reset timed out\n"); | 326 | EFX_ERR(efx, "PHY reset timed out\n"); |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index c93f58f5c6f2..317aa34b21cf 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
| @@ -1877,13 +1877,12 @@ static void velocity_error(struct velocity_info *vptr, int status) | |||
| 1877 | /** | 1877 | /** |
| 1878 | * tx_srv - transmit interrupt service | 1878 | * tx_srv - transmit interrupt service |
| 1879 | * @vptr; Velocity | 1879 | * @vptr; Velocity |
| 1880 | * @status: | ||
| 1881 | * | 1880 | * |
| 1882 | * Scan the queues looking for transmitted packets that | 1881 | * Scan the queues looking for transmitted packets that |
| 1883 | * we can complete and clean up. Update any statistics as | 1882 | * we can complete and clean up. Update any statistics as |
| 1884 | * necessary/ | 1883 | * necessary/ |
| 1885 | */ | 1884 | */ |
| 1886 | static int velocity_tx_srv(struct velocity_info *vptr, u32 status) | 1885 | static int velocity_tx_srv(struct velocity_info *vptr) |
| 1887 | { | 1886 | { |
| 1888 | struct tx_desc *td; | 1887 | struct tx_desc *td; |
| 1889 | int qnum; | 1888 | int qnum; |
| @@ -2090,14 +2089,12 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx) | |||
| 2090 | /** | 2089 | /** |
| 2091 | * velocity_rx_srv - service RX interrupt | 2090 | * velocity_rx_srv - service RX interrupt |
| 2092 | * @vptr: velocity | 2091 | * @vptr: velocity |
| 2093 | * @status: adapter status (unused) | ||
| 2094 | * | 2092 | * |
| 2095 | * Walk the receive ring of the velocity adapter and remove | 2093 | * Walk the receive ring of the velocity adapter and remove |
| 2096 | * any received packets from the receive queue. Hand the ring | 2094 | * any received packets from the receive queue. Hand the ring |
| 2097 | * slots back to the adapter for reuse. | 2095 | * slots back to the adapter for reuse. |
| 2098 | */ | 2096 | */ |
| 2099 | static int velocity_rx_srv(struct velocity_info *vptr, int status, | 2097 | static int velocity_rx_srv(struct velocity_info *vptr, int budget_left) |
| 2100 | int budget_left) | ||
| 2101 | { | 2098 | { |
| 2102 | struct net_device_stats *stats = &vptr->dev->stats; | 2099 | struct net_device_stats *stats = &vptr->dev->stats; |
| 2103 | int rd_curr = vptr->rx.curr; | 2100 | int rd_curr = vptr->rx.curr; |
| @@ -2151,32 +2148,24 @@ static int velocity_poll(struct napi_struct *napi, int budget) | |||
| 2151 | struct velocity_info *vptr = container_of(napi, | 2148 | struct velocity_info *vptr = container_of(napi, |
| 2152 | struct velocity_info, napi); | 2149 | struct velocity_info, napi); |
| 2153 | unsigned int rx_done; | 2150 | unsigned int rx_done; |
| 2154 | u32 isr_status; | 2151 | unsigned long flags; |
| 2155 | |||
| 2156 | spin_lock(&vptr->lock); | ||
| 2157 | isr_status = mac_read_isr(vptr->mac_regs); | ||
| 2158 | |||
| 2159 | /* Ack the interrupt */ | ||
| 2160 | mac_write_isr(vptr->mac_regs, isr_status); | ||
| 2161 | if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI))) | ||
| 2162 | velocity_error(vptr, isr_status); | ||
| 2163 | 2152 | ||
| 2153 | spin_lock_irqsave(&vptr->lock, flags); | ||
| 2164 | /* | 2154 | /* |
| 2165 | * Do rx and tx twice for performance (taken from the VIA | 2155 | * Do rx and tx twice for performance (taken from the VIA |
| 2166 | * out-of-tree driver). | 2156 | * out-of-tree driver). |
| 2167 | */ | 2157 | */ |
| 2168 | rx_done = velocity_rx_srv(vptr, isr_status, budget / 2); | 2158 | rx_done = velocity_rx_srv(vptr, budget / 2); |
| 2169 | velocity_tx_srv(vptr, isr_status); | 2159 | velocity_tx_srv(vptr); |
| 2170 | rx_done += velocity_rx_srv(vptr, isr_status, budget - rx_done); | 2160 | rx_done += velocity_rx_srv(vptr, budget - rx_done); |
| 2171 | velocity_tx_srv(vptr, isr_status); | 2161 | velocity_tx_srv(vptr); |
| 2172 | |||
| 2173 | spin_unlock(&vptr->lock); | ||
| 2174 | 2162 | ||
| 2175 | /* If budget not fully consumed, exit the polling mode */ | 2163 | /* If budget not fully consumed, exit the polling mode */ |
| 2176 | if (rx_done < budget) { | 2164 | if (rx_done < budget) { |
| 2177 | napi_complete(napi); | 2165 | napi_complete(napi); |
| 2178 | mac_enable_int(vptr->mac_regs); | 2166 | mac_enable_int(vptr->mac_regs); |
| 2179 | } | 2167 | } |
| 2168 | spin_unlock_irqrestore(&vptr->lock, flags); | ||
| 2180 | 2169 | ||
| 2181 | return rx_done; | 2170 | return rx_done; |
| 2182 | } | 2171 | } |
| @@ -2206,10 +2195,17 @@ static irqreturn_t velocity_intr(int irq, void *dev_instance) | |||
| 2206 | return IRQ_NONE; | 2195 | return IRQ_NONE; |
| 2207 | } | 2196 | } |
| 2208 | 2197 | ||
| 2198 | /* Ack the interrupt */ | ||
| 2199 | mac_write_isr(vptr->mac_regs, isr_status); | ||
| 2200 | |||
| 2209 | if (likely(napi_schedule_prep(&vptr->napi))) { | 2201 | if (likely(napi_schedule_prep(&vptr->napi))) { |
| 2210 | mac_disable_int(vptr->mac_regs); | 2202 | mac_disable_int(vptr->mac_regs); |
| 2211 | __napi_schedule(&vptr->napi); | 2203 | __napi_schedule(&vptr->napi); |
| 2212 | } | 2204 | } |
| 2205 | |||
| 2206 | if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI))) | ||
| 2207 | velocity_error(vptr, isr_status); | ||
| 2208 | |||
| 2213 | spin_unlock(&vptr->lock); | 2209 | spin_unlock(&vptr->lock); |
| 2214 | 2210 | ||
| 2215 | return IRQ_HANDLED; | 2211 | return IRQ_HANDLED; |
| @@ -3100,7 +3096,7 @@ static int velocity_resume(struct pci_dev *pdev) | |||
| 3100 | velocity_init_registers(vptr, VELOCITY_INIT_WOL); | 3096 | velocity_init_registers(vptr, VELOCITY_INIT_WOL); |
| 3101 | mac_disable_int(vptr->mac_regs); | 3097 | mac_disable_int(vptr->mac_regs); |
| 3102 | 3098 | ||
| 3103 | velocity_tx_srv(vptr, 0); | 3099 | velocity_tx_srv(vptr); |
| 3104 | 3100 | ||
| 3105 | for (i = 0; i < vptr->tx.numq; i++) { | 3101 | for (i = 0; i < vptr->tx.numq; i++) { |
| 3106 | if (vptr->tx.used[i]) | 3102 | if (vptr->tx.used[i]) |
| @@ -3344,6 +3340,7 @@ static int velocity_set_coalesce(struct net_device *dev, | |||
| 3344 | { | 3340 | { |
| 3345 | struct velocity_info *vptr = netdev_priv(dev); | 3341 | struct velocity_info *vptr = netdev_priv(dev); |
| 3346 | int max_us = 0x3f * 64; | 3342 | int max_us = 0x3f * 64; |
| 3343 | unsigned long flags; | ||
| 3347 | 3344 | ||
| 3348 | /* 6 bits of */ | 3345 | /* 6 bits of */ |
| 3349 | if (ecmd->tx_coalesce_usecs > max_us) | 3346 | if (ecmd->tx_coalesce_usecs > max_us) |
| @@ -3365,6 +3362,7 @@ static int velocity_set_coalesce(struct net_device *dev, | |||
| 3365 | ecmd->tx_coalesce_usecs); | 3362 | ecmd->tx_coalesce_usecs); |
| 3366 | 3363 | ||
| 3367 | /* Setup the interrupt suppression and queue timers */ | 3364 | /* Setup the interrupt suppression and queue timers */ |
| 3365 | spin_lock_irqsave(&vptr->lock, flags); | ||
| 3368 | mac_disable_int(vptr->mac_regs); | 3366 | mac_disable_int(vptr->mac_regs); |
| 3369 | setup_adaptive_interrupts(vptr); | 3367 | setup_adaptive_interrupts(vptr); |
| 3370 | setup_queue_timers(vptr); | 3368 | setup_queue_timers(vptr); |
| @@ -3372,6 +3370,7 @@ static int velocity_set_coalesce(struct net_device *dev, | |||
| 3372 | mac_write_int_mask(vptr->int_mask, vptr->mac_regs); | 3370 | mac_write_int_mask(vptr->int_mask, vptr->mac_regs); |
| 3373 | mac_clear_isr(vptr->mac_regs); | 3371 | mac_clear_isr(vptr->mac_regs); |
| 3374 | mac_enable_int(vptr->mac_regs); | 3372 | mac_enable_int(vptr->mac_regs); |
| 3373 | spin_unlock_irqrestore(&vptr->lock, flags); | ||
| 3375 | 3374 | ||
| 3376 | return 0; | 3375 | return 0; |
| 3377 | } | 3376 | } |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index fa12b9060b0b..29bf33692f71 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
| @@ -1615,7 +1615,7 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf, | |||
| 1615 | bf->bf_frmlen -= padsize; | 1615 | bf->bf_frmlen -= padsize; |
| 1616 | } | 1616 | } |
| 1617 | 1617 | ||
| 1618 | if (conf_is_ht(&hw->conf) && !is_pae(skb)) | 1618 | if (conf_is_ht(&hw->conf)) |
| 1619 | bf->bf_state.bf_type |= BUF_HT; | 1619 | bf->bf_state.bf_type |= BUF_HT; |
| 1620 | 1620 | ||
| 1621 | bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq); | 1621 | bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq); |
| @@ -1701,7 +1701,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, | |||
| 1701 | goto tx_done; | 1701 | goto tx_done; |
| 1702 | } | 1702 | } |
| 1703 | 1703 | ||
| 1704 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { | 1704 | if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) { |
| 1705 | /* | 1705 | /* |
| 1706 | * Try aggregation if it's a unicast data frame | 1706 | * Try aggregation if it's a unicast data frame |
| 1707 | * and the destination is HT capable. | 1707 | * and the destination is HT capable. |
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index fe3bf9491997..c484cc253892 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
| @@ -115,6 +115,7 @@ | |||
| 115 | #define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */ | 115 | #define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */ |
| 116 | #define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */ | 116 | #define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */ |
| 117 | #define B43_MMIO_RNG 0x65A | 117 | #define B43_MMIO_RNG 0x65A |
| 118 | #define B43_MMIO_IFSSLOT 0x684 /* Interframe slot time */ | ||
| 118 | #define B43_MMIO_IFSCTL 0x688 /* Interframe space control */ | 119 | #define B43_MMIO_IFSCTL 0x688 /* Interframe space control */ |
| 119 | #define B43_MMIO_IFSCTL_USE_EDCF 0x0004 | 120 | #define B43_MMIO_IFSCTL_USE_EDCF 0x0004 |
| 120 | #define B43_MMIO_POWERUP_DELAY 0x6A8 | 121 | #define B43_MMIO_POWERUP_DELAY 0x6A8 |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 4c41cfe44f26..490fb45d1d05 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
| @@ -628,10 +628,17 @@ static void b43_upload_card_macaddress(struct b43_wldev *dev) | |||
| 628 | static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time) | 628 | static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time) |
| 629 | { | 629 | { |
| 630 | /* slot_time is in usec. */ | 630 | /* slot_time is in usec. */ |
| 631 | if (dev->phy.type != B43_PHYTYPE_G) | 631 | /* This test used to exit for all but a G PHY. */ |
| 632 | if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | ||
| 632 | return; | 633 | return; |
| 633 | b43_write16(dev, 0x684, 510 + slot_time); | 634 | b43_write16(dev, B43_MMIO_IFSSLOT, 510 + slot_time); |
| 634 | b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time); | 635 | /* Shared memory location 0x0010 is the slot time and should be |
| 636 | * set to slot_time; however, this register is initially 0 and changing | ||
| 637 | * the value adversely affects the transmit rate for BCM4311 | ||
| 638 | * devices. Until this behavior is unterstood, delete this step | ||
| 639 | * | ||
| 640 | * b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time); | ||
| 641 | */ | ||
| 635 | } | 642 | } |
| 636 | 643 | ||
| 637 | static void b43_short_slot_timing_enable(struct b43_wldev *dev) | 644 | static void b43_short_slot_timing_enable(struct b43_wldev *dev) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 5461f105bd2d..d10bea64fce3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
| @@ -2744,6 +2744,7 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
| 2744 | if ((le16_to_cpu(priv->staging_rxon.channel) != ch)) | 2744 | if ((le16_to_cpu(priv->staging_rxon.channel) != ch)) |
| 2745 | priv->staging_rxon.flags = 0; | 2745 | priv->staging_rxon.flags = 0; |
| 2746 | 2746 | ||
| 2747 | iwl_set_rxon_ht(priv, ht_conf); | ||
| 2747 | iwl_set_rxon_channel(priv, conf->channel); | 2748 | iwl_set_rxon_channel(priv, conf->channel); |
| 2748 | 2749 | ||
| 2749 | iwl_set_flags_for_band(priv, conf->channel->band); | 2750 | iwl_set_flags_for_band(priv, conf->channel->band); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 6f36b6e79f5e..2dbce85404aa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
| @@ -928,7 +928,10 @@ static void iwl_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
| 928 | if (ieee80211_is_mgmt(fc) || | 928 | if (ieee80211_is_mgmt(fc) || |
| 929 | ieee80211_has_protected(fc) || | 929 | ieee80211_has_protected(fc) || |
| 930 | ieee80211_has_morefrags(fc) || | 930 | ieee80211_has_morefrags(fc) || |
| 931 | le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) | 931 | le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG || |
| 932 | (ieee80211_is_data_qos(fc) && | ||
| 933 | *ieee80211_get_qos_ctl(hdr) & | ||
| 934 | IEEE80211_QOS_CONTROL_A_MSDU_PRESENT)) | ||
| 932 | ret = skb_linearize(skb); | 935 | ret = skb_linearize(skb); |
| 933 | else | 936 | else |
| 934 | ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ? | 937 | ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ? |
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c index 6d6ed7485175..f727b4a83196 100644 --- a/drivers/net/wireless/iwmc3200wifi/rx.c +++ b/drivers/net/wireless/iwmc3200wifi/rx.c | |||
| @@ -794,7 +794,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf, | |||
| 794 | } | 794 | } |
| 795 | 795 | ||
| 796 | bss->bss = kzalloc(bss_len, GFP_KERNEL); | 796 | bss->bss = kzalloc(bss_len, GFP_KERNEL); |
| 797 | if (!bss) { | 797 | if (!bss->bss) { |
| 798 | kfree(bss); | 798 | kfree(bss); |
| 799 | IWM_ERR(iwm, "Couldn't allocate bss\n"); | 799 | IWM_ERR(iwm, "Couldn't allocate bss\n"); |
| 800 | return -ENOMEM; | 800 | return -ENOMEM; |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index bc5726dd5fe4..7ba3052b0708 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c | |||
| @@ -65,6 +65,7 @@ static struct usb_device_id rtl8187_table[] __devinitdata = { | |||
| 65 | /* Sitecom */ | 65 | /* Sitecom */ |
| 66 | {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, | 66 | {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, |
| 67 | {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B}, | 67 | {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B}, |
| 68 | {USB_DEVICE(0x0df6, 0x0029), .driver_info = DEVICE_RTL8187B}, | ||
| 68 | /* Sphairon Access Systems GmbH */ | 69 | /* Sphairon Access Systems GmbH */ |
| 69 | {USB_DEVICE(0x114B, 0x0150), .driver_info = DEVICE_RTL8187}, | 70 | {USB_DEVICE(0x114B, 0x0150), .driver_info = DEVICE_RTL8187}, |
| 70 | /* Dick Smith Electronics */ | 71 | /* Dick Smith Electronics */ |
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 5681ebed9c65..03dfd27c4bfb 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
| @@ -494,8 +494,7 @@ static int ssb_devices_register(struct ssb_bus *bus) | |||
| 494 | #endif | 494 | #endif |
| 495 | break; | 495 | break; |
| 496 | case SSB_BUSTYPE_SDIO: | 496 | case SSB_BUSTYPE_SDIO: |
| 497 | #ifdef CONFIG_SSB_SDIO | 497 | #ifdef CONFIG_SSB_SDIOHOST |
| 498 | sdev->irq = bus->host_sdio->dev.irq; | ||
| 499 | dev->parent = &bus->host_sdio->dev; | 498 | dev->parent = &bus->host_sdio->dev; |
| 500 | #endif | 499 | #endif |
| 501 | break; | 500 | break; |
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 6e8bcdfd23b4..a678186f218f 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
| @@ -1312,9 +1312,9 @@ static int processcompl(struct async *as, void __user * __user *arg) | |||
| 1312 | void __user *addr = as->userurb; | 1312 | void __user *addr = as->userurb; |
| 1313 | unsigned int i; | 1313 | unsigned int i; |
| 1314 | 1314 | ||
| 1315 | if (as->userbuffer) | 1315 | if (as->userbuffer && urb->actual_length) |
| 1316 | if (copy_to_user(as->userbuffer, urb->transfer_buffer, | 1316 | if (copy_to_user(as->userbuffer, urb->transfer_buffer, |
| 1317 | urb->transfer_buffer_length)) | 1317 | urb->actual_length)) |
| 1318 | goto err_out; | 1318 | goto err_out; |
| 1319 | if (put_user(as->status, &userurb->status)) | 1319 | if (put_user(as->status, &userurb->status)) |
| 1320 | goto err_out; | 1320 | goto err_out; |
| @@ -1334,14 +1334,11 @@ static int processcompl(struct async *as, void __user * __user *arg) | |||
| 1334 | } | 1334 | } |
| 1335 | } | 1335 | } |
| 1336 | 1336 | ||
| 1337 | free_async(as); | ||
| 1338 | |||
| 1339 | if (put_user(addr, (void __user * __user *)arg)) | 1337 | if (put_user(addr, (void __user * __user *)arg)) |
| 1340 | return -EFAULT; | 1338 | return -EFAULT; |
| 1341 | return 0; | 1339 | return 0; |
| 1342 | 1340 | ||
| 1343 | err_out: | 1341 | err_out: |
| 1344 | free_async(as); | ||
| 1345 | return -EFAULT; | 1342 | return -EFAULT; |
| 1346 | } | 1343 | } |
| 1347 | 1344 | ||
| @@ -1371,8 +1368,11 @@ static struct async *reap_as(struct dev_state *ps) | |||
| 1371 | static int proc_reapurb(struct dev_state *ps, void __user *arg) | 1368 | static int proc_reapurb(struct dev_state *ps, void __user *arg) |
| 1372 | { | 1369 | { |
| 1373 | struct async *as = reap_as(ps); | 1370 | struct async *as = reap_as(ps); |
| 1374 | if (as) | 1371 | if (as) { |
| 1375 | return processcompl(as, (void __user * __user *)arg); | 1372 | int retval = processcompl(as, (void __user * __user *)arg); |
| 1373 | free_async(as); | ||
| 1374 | return retval; | ||
| 1375 | } | ||
| 1376 | if (signal_pending(current)) | 1376 | if (signal_pending(current)) |
| 1377 | return -EINTR; | 1377 | return -EINTR; |
| 1378 | return -EIO; | 1378 | return -EIO; |
| @@ -1380,11 +1380,16 @@ static int proc_reapurb(struct dev_state *ps, void __user *arg) | |||
| 1380 | 1380 | ||
| 1381 | static int proc_reapurbnonblock(struct dev_state *ps, void __user *arg) | 1381 | static int proc_reapurbnonblock(struct dev_state *ps, void __user *arg) |
| 1382 | { | 1382 | { |
| 1383 | int retval; | ||
| 1383 | struct async *as; | 1384 | struct async *as; |
| 1384 | 1385 | ||
| 1385 | if (!(as = async_getcompleted(ps))) | 1386 | as = async_getcompleted(ps); |
| 1386 | return -EAGAIN; | 1387 | retval = -EAGAIN; |
| 1387 | return processcompl(as, (void __user * __user *)arg); | 1388 | if (as) { |
| 1389 | retval = processcompl(as, (void __user * __user *)arg); | ||
| 1390 | free_async(as); | ||
| 1391 | } | ||
| 1392 | return retval; | ||
| 1388 | } | 1393 | } |
| 1389 | 1394 | ||
| 1390 | #ifdef CONFIG_COMPAT | 1395 | #ifdef CONFIG_COMPAT |
| @@ -1475,9 +1480,9 @@ static int processcompl_compat(struct async *as, void __user * __user *arg) | |||
| 1475 | void __user *addr = as->userurb; | 1480 | void __user *addr = as->userurb; |
| 1476 | unsigned int i; | 1481 | unsigned int i; |
| 1477 | 1482 | ||
| 1478 | if (as->userbuffer) | 1483 | if (as->userbuffer && urb->actual_length) |
| 1479 | if (copy_to_user(as->userbuffer, urb->transfer_buffer, | 1484 | if (copy_to_user(as->userbuffer, urb->transfer_buffer, |
| 1480 | urb->transfer_buffer_length)) | 1485 | urb->actual_length)) |
| 1481 | return -EFAULT; | 1486 | return -EFAULT; |
| 1482 | if (put_user(as->status, &userurb->status)) | 1487 | if (put_user(as->status, &userurb->status)) |
| 1483 | return -EFAULT; | 1488 | return -EFAULT; |
| @@ -1497,7 +1502,6 @@ static int processcompl_compat(struct async *as, void __user * __user *arg) | |||
| 1497 | } | 1502 | } |
| 1498 | } | 1503 | } |
| 1499 | 1504 | ||
| 1500 | free_async(as); | ||
| 1501 | if (put_user(ptr_to_compat(addr), (u32 __user *)arg)) | 1505 | if (put_user(ptr_to_compat(addr), (u32 __user *)arg)) |
| 1502 | return -EFAULT; | 1506 | return -EFAULT; |
| 1503 | return 0; | 1507 | return 0; |
| @@ -1506,8 +1510,11 @@ static int processcompl_compat(struct async *as, void __user * __user *arg) | |||
| 1506 | static int proc_reapurb_compat(struct dev_state *ps, void __user *arg) | 1510 | static int proc_reapurb_compat(struct dev_state *ps, void __user *arg) |
| 1507 | { | 1511 | { |
| 1508 | struct async *as = reap_as(ps); | 1512 | struct async *as = reap_as(ps); |
| 1509 | if (as) | 1513 | if (as) { |
| 1510 | return processcompl_compat(as, (void __user * __user *)arg); | 1514 | int retval = processcompl_compat(as, (void __user * __user *)arg); |
| 1515 | free_async(as); | ||
| 1516 | return retval; | ||
| 1517 | } | ||
| 1511 | if (signal_pending(current)) | 1518 | if (signal_pending(current)) |
| 1512 | return -EINTR; | 1519 | return -EINTR; |
| 1513 | return -EIO; | 1520 | return -EIO; |
| @@ -1515,11 +1522,16 @@ static int proc_reapurb_compat(struct dev_state *ps, void __user *arg) | |||
| 1515 | 1522 | ||
| 1516 | static int proc_reapurbnonblock_compat(struct dev_state *ps, void __user *arg) | 1523 | static int proc_reapurbnonblock_compat(struct dev_state *ps, void __user *arg) |
| 1517 | { | 1524 | { |
| 1525 | int retval; | ||
| 1518 | struct async *as; | 1526 | struct async *as; |
| 1519 | 1527 | ||
| 1520 | if (!(as = async_getcompleted(ps))) | 1528 | retval = -EAGAIN; |
| 1521 | return -EAGAIN; | 1529 | as = async_getcompleted(ps); |
| 1522 | return processcompl_compat(as, (void __user * __user *)arg); | 1530 | if (as) { |
| 1531 | retval = processcompl_compat(as, (void __user * __user *)arg); | ||
| 1532 | free_async(as); | ||
| 1533 | } | ||
| 1534 | return retval; | ||
| 1523 | } | 1535 | } |
| 1524 | 1536 | ||
| 1525 | 1537 | ||
diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c index 0a577d5694fd..d4f0db58a8ad 100644 --- a/drivers/usb/gadget/f_eem.c +++ b/drivers/usb/gadget/f_eem.c | |||
| @@ -358,7 +358,7 @@ done: | |||
| 358 | * b15: bmType (0 == data) | 358 | * b15: bmType (0 == data) |
| 359 | */ | 359 | */ |
| 360 | len = skb->len; | 360 | len = skb->len; |
| 361 | put_unaligned_le16((len & 0x3FFF) | BIT(14), skb_push(skb, 2)); | 361 | put_unaligned_le16(len & 0x3FFF, skb_push(skb, 2)); |
| 362 | 362 | ||
| 363 | /* add a zero-length EEM packet, if needed */ | 363 | /* add a zero-length EEM packet, if needed */ |
| 364 | if (padlen) | 364 | if (padlen) |
| @@ -464,7 +464,6 @@ static int eem_unwrap(struct gether *port, | |||
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | /* validate CRC */ | 466 | /* validate CRC */ |
| 467 | crc = get_unaligned_le32(skb->data + len - ETH_FCS_LEN); | ||
| 468 | if (header & BIT(14)) { | 467 | if (header & BIT(14)) { |
| 469 | crc = get_unaligned_le32(skb->data + len | 468 | crc = get_unaligned_le32(skb->data + len |
| 470 | - ETH_FCS_LEN); | 469 | - ETH_FCS_LEN); |
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index 429560100b10..76496f5d272c 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #if defined USB_ETH_RNDIS | 29 | #if defined USB_ETH_RNDIS |
| 30 | # undef USB_ETH_RNDIS | 30 | # undef USB_ETH_RNDIS |
| 31 | #endif | 31 | #endif |
| 32 | #ifdef CONFIG_USB_ETH_RNDIS | 32 | #ifdef CONFIG_USB_G_MULTI_RNDIS |
| 33 | # define USB_ETH_RNDIS y | 33 | # define USB_ETH_RNDIS y |
| 34 | #endif | 34 | #endif |
| 35 | 35 | ||
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index e220fb8091a3..8b45145b9136 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
| 27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
| 28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
| 29 | #include <linux/err.h> | ||
| 29 | 30 | ||
| 30 | #include <linux/usb/ch9.h> | 31 | #include <linux/usb/ch9.h> |
| 31 | #include <linux/usb/gadget.h> | 32 | #include <linux/usb/gadget.h> |
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 4b5dbd0127f5..5fc80a104150 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c | |||
| @@ -2582,6 +2582,7 @@ err: | |||
| 2582 | hsotg->gadget.dev.driver = NULL; | 2582 | hsotg->gadget.dev.driver = NULL; |
| 2583 | return ret; | 2583 | return ret; |
| 2584 | } | 2584 | } |
| 2585 | EXPORT_SYMBOL(usb_gadget_register_driver); | ||
| 2585 | 2586 | ||
| 2586 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) | 2587 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) |
| 2587 | { | 2588 | { |
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index c75d9270c752..19372673bf09 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
| @@ -196,7 +196,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) | |||
| 196 | if (hostpc_reg) { | 196 | if (hostpc_reg) { |
| 197 | u32 t3; | 197 | u32 t3; |
| 198 | 198 | ||
| 199 | spin_unlock_irq(&ehci->lock); | ||
| 199 | msleep(5);/* 5ms for HCD enter low pwr mode */ | 200 | msleep(5);/* 5ms for HCD enter low pwr mode */ |
| 201 | spin_lock_irq(&ehci->lock); | ||
| 200 | t3 = ehci_readl(ehci, hostpc_reg); | 202 | t3 = ehci_readl(ehci, hostpc_reg); |
| 201 | ehci_writel(ehci, t3 | HOSTPC_PHCD, hostpc_reg); | 203 | ehci_writel(ehci, t3 | HOSTPC_PHCD, hostpc_reg); |
| 202 | t3 = ehci_readl(ehci, hostpc_reg); | 204 | t3 = ehci_readl(ehci, hostpc_reg); |
| @@ -904,17 +906,18 @@ static int ehci_hub_control ( | |||
| 904 | if ((temp & PORT_PE) == 0 | 906 | if ((temp & PORT_PE) == 0 |
| 905 | || (temp & PORT_RESET) != 0) | 907 | || (temp & PORT_RESET) != 0) |
| 906 | goto error; | 908 | goto error; |
| 907 | ehci_writel(ehci, temp | PORT_SUSPEND, status_reg); | 909 | |
| 908 | /* After above check the port must be connected. | 910 | /* After above check the port must be connected. |
| 909 | * Set appropriate bit thus could put phy into low power | 911 | * Set appropriate bit thus could put phy into low power |
| 910 | * mode if we have hostpc feature | 912 | * mode if we have hostpc feature |
| 911 | */ | 913 | */ |
| 914 | temp &= ~PORT_WKCONN_E; | ||
| 915 | temp |= PORT_WKDISC_E | PORT_WKOC_E; | ||
| 916 | ehci_writel(ehci, temp | PORT_SUSPEND, status_reg); | ||
| 912 | if (hostpc_reg) { | 917 | if (hostpc_reg) { |
| 913 | temp &= ~PORT_WKCONN_E; | 918 | spin_unlock_irqrestore(&ehci->lock, flags); |
| 914 | temp |= (PORT_WKDISC_E | PORT_WKOC_E); | ||
| 915 | ehci_writel(ehci, temp | PORT_SUSPEND, | ||
| 916 | status_reg); | ||
| 917 | msleep(5);/* 5ms for HCD enter low pwr mode */ | 919 | msleep(5);/* 5ms for HCD enter low pwr mode */ |
| 920 | spin_lock_irqsave(&ehci->lock, flags); | ||
| 918 | temp1 = ehci_readl(ehci, hostpc_reg); | 921 | temp1 = ehci_readl(ehci, hostpc_reg); |
| 919 | ehci_writel(ehci, temp1 | HOSTPC_PHCD, | 922 | ehci_writel(ehci, temp1 | HOSTPC_PHCD, |
| 920 | hostpc_reg); | 923 | hostpc_reg); |
diff --git a/drivers/usb/host/fhci-tds.c b/drivers/usb/host/fhci-tds.c index d224ab467a40..e1232890c78b 100644 --- a/drivers/usb/host/fhci-tds.c +++ b/drivers/usb/host/fhci-tds.c | |||
| @@ -105,7 +105,7 @@ void fhci_ep0_free(struct fhci_usb *usb) | |||
| 105 | if (ep->td_base) | 105 | if (ep->td_base) |
| 106 | cpm_muram_free(cpm_muram_offset(ep->td_base)); | 106 | cpm_muram_free(cpm_muram_offset(ep->td_base)); |
| 107 | 107 | ||
| 108 | if (ep->conf_frame_Q) { | 108 | if (kfifo_initialized(&ep->conf_frame_Q)) { |
| 109 | size = cq_howmany(&ep->conf_frame_Q); | 109 | size = cq_howmany(&ep->conf_frame_Q); |
| 110 | for (; size; size--) { | 110 | for (; size; size--) { |
| 111 | struct packet *pkt = cq_get(&ep->conf_frame_Q); | 111 | struct packet *pkt = cq_get(&ep->conf_frame_Q); |
| @@ -115,7 +115,7 @@ void fhci_ep0_free(struct fhci_usb *usb) | |||
| 115 | cq_delete(&ep->conf_frame_Q); | 115 | cq_delete(&ep->conf_frame_Q); |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | if (ep->empty_frame_Q) { | 118 | if (kfifo_initialized(&ep->empty_frame_Q)) { |
| 119 | size = cq_howmany(&ep->empty_frame_Q); | 119 | size = cq_howmany(&ep->empty_frame_Q); |
| 120 | for (; size; size--) { | 120 | for (; size; size--) { |
| 121 | struct packet *pkt = cq_get(&ep->empty_frame_Q); | 121 | struct packet *pkt = cq_get(&ep->empty_frame_Q); |
| @@ -125,7 +125,7 @@ void fhci_ep0_free(struct fhci_usb *usb) | |||
| 125 | cq_delete(&ep->empty_frame_Q); | 125 | cq_delete(&ep->empty_frame_Q); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | if (ep->dummy_packets_Q) { | 128 | if (kfifo_initialized(&ep->dummy_packets_Q)) { |
| 129 | size = cq_howmany(&ep->dummy_packets_Q); | 129 | size = cq_howmany(&ep->dummy_packets_Q); |
| 130 | for (; size; size--) { | 130 | for (; size; size--) { |
| 131 | u8 *buff = cq_get(&ep->dummy_packets_Q); | 131 | u8 *buff = cq_get(&ep->dummy_packets_Q); |
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 0025847743f3..8b37a4b9839e 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c | |||
| @@ -3245,6 +3245,7 @@ static struct usb_device_id sisusb_table [] = { | |||
| 3245 | { USB_DEVICE(0x0711, 0x0902) }, | 3245 | { USB_DEVICE(0x0711, 0x0902) }, |
| 3246 | { USB_DEVICE(0x0711, 0x0903) }, | 3246 | { USB_DEVICE(0x0711, 0x0903) }, |
| 3247 | { USB_DEVICE(0x0711, 0x0918) }, | 3247 | { USB_DEVICE(0x0711, 0x0918) }, |
| 3248 | { USB_DEVICE(0x0711, 0x0920) }, | ||
| 3248 | { USB_DEVICE(0x182d, 0x021c) }, | 3249 | { USB_DEVICE(0x182d, 0x021c) }, |
| 3249 | { USB_DEVICE(0x182d, 0x0269) }, | 3250 | { USB_DEVICE(0x182d, 0x0269) }, |
| 3250 | { } | 3251 | { } |
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig index de56b3d743d7..3d2d3e549bd1 100644 --- a/drivers/usb/otg/Kconfig +++ b/drivers/usb/otg/Kconfig | |||
| @@ -44,6 +44,7 @@ config ISP1301_OMAP | |||
| 44 | config USB_ULPI | 44 | config USB_ULPI |
| 45 | bool "Generic ULPI Transceiver Driver" | 45 | bool "Generic ULPI Transceiver Driver" |
| 46 | depends on ARM | 46 | depends on ARM |
| 47 | select USB_OTG_UTILS | ||
| 47 | help | 48 | help |
| 48 | Enable this to support ULPI connected USB OTG transceivers which | 49 | Enable this to support ULPI connected USB OTG transceivers which |
| 49 | are likely found on embedded boards. | 50 | are likely found on embedded boards. |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 216f187582ab..7638828e7317 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
| @@ -50,7 +50,7 @@ | |||
| 50 | * Version Information | 50 | * Version Information |
| 51 | */ | 51 | */ |
| 52 | #define DRIVER_VERSION "v1.5.0" | 52 | #define DRIVER_VERSION "v1.5.0" |
| 53 | #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober <kuba@mareimbrium.org>" | 53 | #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober <kuba@mareimbrium.org>, Andreas Mohr" |
| 54 | #define DRIVER_DESC "USB FTDI Serial Converters Driver" | 54 | #define DRIVER_DESC "USB FTDI Serial Converters Driver" |
| 55 | 55 | ||
| 56 | static int debug; | 56 | static int debug; |
| @@ -145,10 +145,15 @@ static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = { | |||
| 145 | 145 | ||
| 146 | 146 | ||
| 147 | 147 | ||
| 148 | /* | ||
| 149 | * Device ID not listed? Test via module params product/vendor or | ||
| 150 | * /sys/bus/usb/ftdi_sio/new_id, then send patch/report! | ||
| 151 | */ | ||
| 148 | static struct usb_device_id id_table_combined [] = { | 152 | static struct usb_device_id id_table_combined [] = { |
| 149 | { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, | 153 | { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, |
| 150 | { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, | 154 | { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, |
| 151 | { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) }, | 155 | { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) }, |
| 156 | { USB_DEVICE(FTDI_VID, FTDI_NXTCAM_PID) }, | ||
| 152 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) }, | 157 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) }, |
| 153 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) }, | 158 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) }, |
| 154 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) }, | 159 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) }, |
| @@ -552,9 +557,16 @@ static struct usb_device_id id_table_combined [] = { | |||
| 552 | { USB_DEVICE(FTDI_VID, FTDI_IBS_PEDO_PID) }, | 557 | { USB_DEVICE(FTDI_VID, FTDI_IBS_PEDO_PID) }, |
| 553 | { USB_DEVICE(FTDI_VID, FTDI_IBS_PROD_PID) }, | 558 | { USB_DEVICE(FTDI_VID, FTDI_IBS_PROD_PID) }, |
| 554 | /* | 559 | /* |
| 555 | * Due to many user requests for multiple ELV devices we enable | 560 | * ELV devices: |
| 556 | * them by default. | ||
| 557 | */ | 561 | */ |
| 562 | { USB_DEVICE(FTDI_VID, FTDI_ELV_USR_PID) }, | ||
| 563 | { USB_DEVICE(FTDI_VID, FTDI_ELV_MSM1_PID) }, | ||
| 564 | { USB_DEVICE(FTDI_VID, FTDI_ELV_KL100_PID) }, | ||
| 565 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS550_PID) }, | ||
| 566 | { USB_DEVICE(FTDI_VID, FTDI_ELV_EC3000_PID) }, | ||
| 567 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS888_PID) }, | ||
| 568 | { USB_DEVICE(FTDI_VID, FTDI_ELV_TWS550_PID) }, | ||
| 569 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FEM_PID) }, | ||
| 558 | { USB_DEVICE(FTDI_VID, FTDI_ELV_CLI7000_PID) }, | 570 | { USB_DEVICE(FTDI_VID, FTDI_ELV_CLI7000_PID) }, |
| 559 | { USB_DEVICE(FTDI_VID, FTDI_ELV_PPS7330_PID) }, | 571 | { USB_DEVICE(FTDI_VID, FTDI_ELV_PPS7330_PID) }, |
| 560 | { USB_DEVICE(FTDI_VID, FTDI_ELV_TFM100_PID) }, | 572 | { USB_DEVICE(FTDI_VID, FTDI_ELV_TFM100_PID) }, |
| @@ -571,11 +583,17 @@ static struct usb_device_id id_table_combined [] = { | |||
| 571 | { USB_DEVICE(FTDI_VID, FTDI_ELV_PCK100_PID) }, | 583 | { USB_DEVICE(FTDI_VID, FTDI_ELV_PCK100_PID) }, |
| 572 | { USB_DEVICE(FTDI_VID, FTDI_ELV_RFP500_PID) }, | 584 | { USB_DEVICE(FTDI_VID, FTDI_ELV_RFP500_PID) }, |
| 573 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FS20SIG_PID) }, | 585 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FS20SIG_PID) }, |
| 586 | { USB_DEVICE(FTDI_VID, FTDI_ELV_UTP8_PID) }, | ||
| 574 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS300PC_PID) }, | 587 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS300PC_PID) }, |
| 588 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS444PC_PID) }, | ||
| 575 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1300PC_PID) }, | 589 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1300PC_PID) }, |
| 576 | { USB_DEVICE(FTDI_VID, FTDI_ELV_EM1010PC_PID) }, | 590 | { USB_DEVICE(FTDI_VID, FTDI_ELV_EM1010PC_PID) }, |
| 577 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS500_PID) }, | 591 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS500_PID) }, |
| 578 | { USB_DEVICE(FTDI_VID, FTDI_ELV_HS485_PID) }, | 592 | { USB_DEVICE(FTDI_VID, FTDI_ELV_HS485_PID) }, |
| 593 | { USB_DEVICE(FTDI_VID, FTDI_ELV_UMS100_PID) }, | ||
| 594 | { USB_DEVICE(FTDI_VID, FTDI_ELV_TFD128_PID) }, | ||
| 595 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FM3RX_PID) }, | ||
| 596 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS777_PID) }, | ||
| 579 | { USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) }, | 597 | { USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) }, |
| 580 | { USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) }, | 598 | { USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) }, |
| 581 | { USB_DEVICE(FTDI_VID, LINX_FUTURE_0_PID) }, | 599 | { USB_DEVICE(FTDI_VID, LINX_FUTURE_0_PID) }, |
| @@ -697,6 +715,7 @@ static struct usb_device_id id_table_combined [] = { | |||
| 697 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, | 715 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, |
| 698 | { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, | 716 | { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, |
| 699 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) }, | 717 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) }, |
| 718 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_AD4USB_PID) }, | ||
| 700 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) }, | 719 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) }, |
| 701 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) }, | 720 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) }, |
| 702 | { USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) }, | 721 | { USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) }, |
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index da92b4952ffb..c8951aeed983 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h | |||
| @@ -38,6 +38,8 @@ | |||
| 38 | /* www.candapter.com Ewert Energy Systems CANdapter device */ | 38 | /* www.candapter.com Ewert Energy Systems CANdapter device */ |
| 39 | #define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */ | 39 | #define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */ |
| 40 | 40 | ||
| 41 | #define FTDI_NXTCAM_PID 0xABB8 /* NXTCam for Mindstorms NXT */ | ||
| 42 | |||
| 41 | /* OOCDlink by Joern Kaipf <joernk@web.de> | 43 | /* OOCDlink by Joern Kaipf <joernk@web.de> |
| 42 | * (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */ | 44 | * (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */ |
| 43 | #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ | 45 | #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ |
| @@ -161,22 +163,37 @@ | |||
| 161 | /* | 163 | /* |
| 162 | * ELV USB devices submitted by Christian Abt of ELV (www.elv.de). | 164 | * ELV USB devices submitted by Christian Abt of ELV (www.elv.de). |
| 163 | * All of these devices use FTDI's vendor ID (0x0403). | 165 | * All of these devices use FTDI's vendor ID (0x0403). |
| 166 | * Further IDs taken from ELV Windows .inf file. | ||
| 164 | * | 167 | * |
| 165 | * The previously included PID for the UO 100 module was incorrect. | 168 | * The previously included PID for the UO 100 module was incorrect. |
| 166 | * In fact, that PID was for ELV's UR 100 USB-RS232 converter (0xFB58). | 169 | * In fact, that PID was for ELV's UR 100 USB-RS232 converter (0xFB58). |
| 167 | * | 170 | * |
| 168 | * Armin Laeuger originally sent the PID for the UM 100 module. | 171 | * Armin Laeuger originally sent the PID for the UM 100 module. |
| 169 | */ | 172 | */ |
| 173 | #define FTDI_ELV_USR_PID 0xE000 /* ELV Universal-Sound-Recorder */ | ||
| 174 | #define FTDI_ELV_MSM1_PID 0xE001 /* ELV Mini-Sound-Modul */ | ||
| 175 | #define FTDI_ELV_KL100_PID 0xE002 /* ELV Kfz-Leistungsmesser KL 100 */ | ||
| 176 | #define FTDI_ELV_WS550_PID 0xE004 /* WS 550 */ | ||
| 177 | #define FTDI_ELV_EC3000_PID 0xE006 /* ENERGY CONTROL 3000 USB */ | ||
| 178 | #define FTDI_ELV_WS888_PID 0xE008 /* WS 888 */ | ||
| 179 | #define FTDI_ELV_TWS550_PID 0xE009 /* Technoline WS 550 */ | ||
| 180 | #define FTDI_ELV_FEM_PID 0xE00A /* Funk Energie Monitor */ | ||
| 170 | #define FTDI_ELV_FHZ1300PC_PID 0xE0E8 /* FHZ 1300 PC */ | 181 | #define FTDI_ELV_FHZ1300PC_PID 0xE0E8 /* FHZ 1300 PC */ |
| 171 | #define FTDI_ELV_WS500_PID 0xE0E9 /* PC-Wetterstation (WS 500) */ | 182 | #define FTDI_ELV_WS500_PID 0xE0E9 /* PC-Wetterstation (WS 500) */ |
| 172 | #define FTDI_ELV_HS485_PID 0xE0EA /* USB to RS-485 adapter */ | 183 | #define FTDI_ELV_HS485_PID 0xE0EA /* USB to RS-485 adapter */ |
| 184 | #define FTDI_ELV_UMS100_PID 0xE0EB /* ELV USB Master-Slave Schaltsteckdose UMS 100 */ | ||
| 185 | #define FTDI_ELV_TFD128_PID 0xE0EC /* ELV Temperatur-Feuchte-Datenlogger TFD 128 */ | ||
| 186 | #define FTDI_ELV_FM3RX_PID 0xE0ED /* ELV Messwertuebertragung FM3 RX */ | ||
| 187 | #define FTDI_ELV_WS777_PID 0xE0EE /* Conrad WS 777 */ | ||
| 173 | #define FTDI_ELV_EM1010PC_PID 0xE0EF /* Engery monitor EM 1010 PC */ | 188 | #define FTDI_ELV_EM1010PC_PID 0xE0EF /* Engery monitor EM 1010 PC */ |
| 174 | #define FTDI_ELV_CSI8_PID 0xE0F0 /* Computer-Schalt-Interface (CSI 8) */ | 189 | #define FTDI_ELV_CSI8_PID 0xE0F0 /* Computer-Schalt-Interface (CSI 8) */ |
| 175 | #define FTDI_ELV_EM1000DL_PID 0xE0F1 /* PC-Datenlogger fuer Energiemonitor (EM 1000 DL) */ | 190 | #define FTDI_ELV_EM1000DL_PID 0xE0F1 /* PC-Datenlogger fuer Energiemonitor (EM 1000 DL) */ |
| 176 | #define FTDI_ELV_PCK100_PID 0xE0F2 /* PC-Kabeltester (PCK 100) */ | 191 | #define FTDI_ELV_PCK100_PID 0xE0F2 /* PC-Kabeltester (PCK 100) */ |
| 177 | #define FTDI_ELV_RFP500_PID 0xE0F3 /* HF-Leistungsmesser (RFP 500) */ | 192 | #define FTDI_ELV_RFP500_PID 0xE0F3 /* HF-Leistungsmesser (RFP 500) */ |
| 178 | #define FTDI_ELV_FS20SIG_PID 0xE0F4 /* Signalgeber (FS 20 SIG) */ | 193 | #define FTDI_ELV_FS20SIG_PID 0xE0F4 /* Signalgeber (FS 20 SIG) */ |
| 194 | #define FTDI_ELV_UTP8_PID 0xE0F5 /* ELV UTP 8 */ | ||
| 179 | #define FTDI_ELV_WS300PC_PID 0xE0F6 /* PC-Wetterstation (WS 300 PC) */ | 195 | #define FTDI_ELV_WS300PC_PID 0xE0F6 /* PC-Wetterstation (WS 300 PC) */ |
| 196 | #define FTDI_ELV_WS444PC_PID 0xE0F7 /* Conrad WS 444 PC */ | ||
| 180 | #define FTDI_PHI_FISCO_PID 0xE40B /* PHI Fisco USB to Serial cable */ | 197 | #define FTDI_PHI_FISCO_PID 0xE40B /* PHI Fisco USB to Serial cable */ |
| 181 | #define FTDI_ELV_UAD8_PID 0xF068 /* USB-AD-Wandler (UAD 8) */ | 198 | #define FTDI_ELV_UAD8_PID 0xF068 /* USB-AD-Wandler (UAD 8) */ |
| 182 | #define FTDI_ELV_UDA7_PID 0xF069 /* USB-DA-Wandler (UDA 7) */ | 199 | #define FTDI_ELV_UDA7_PID 0xF069 /* USB-DA-Wandler (UDA 7) */ |
| @@ -968,6 +985,7 @@ | |||
| 968 | #define PAPOUCH_VID 0x5050 /* Vendor ID */ | 985 | #define PAPOUCH_VID 0x5050 /* Vendor ID */ |
| 969 | #define PAPOUCH_TMU_PID 0x0400 /* TMU USB Thermometer */ | 986 | #define PAPOUCH_TMU_PID 0x0400 /* TMU USB Thermometer */ |
| 970 | #define PAPOUCH_QUIDO4x4_PID 0x0900 /* Quido 4/4 Module */ | 987 | #define PAPOUCH_QUIDO4x4_PID 0x0900 /* Quido 4/4 Module */ |
| 988 | #define PAPOUCH_AD4USB_PID 0x8003 /* AD4USB Measurement Module */ | ||
| 971 | 989 | ||
| 972 | /* | 990 | /* |
| 973 | * Marvell SheevaPlug | 991 | * Marvell SheevaPlug |
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index ac1b6449fb6a..3eb6143bb646 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
| @@ -298,6 +298,7 @@ static struct usb_device_id id_table [] = { | |||
| 298 | { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ | 298 | { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ |
| 299 | .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist | 299 | .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist |
| 300 | }, | 300 | }, |
| 301 | { USB_DEVICE(0x413C, 0x08133) }, /* Dell Computer Corp. Wireless 5720 VZW Mobile Broadband (EVDO Rev-A) Minicard GPS Port */ | ||
| 301 | 302 | ||
| 302 | { } | 303 | { } |
| 303 | }; | 304 | }; |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index c932f9053188..49575fba3756 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
| @@ -941,7 +941,7 @@ UNUSUAL_DEV( 0x07ab, 0xfccd, 0x0000, 0x9999, | |||
| 941 | UNUSUAL_DEV( 0x07af, 0x0004, 0x0100, 0x0133, | 941 | UNUSUAL_DEV( 0x07af, 0x0004, 0x0100, 0x0133, |
| 942 | "Microtech", | 942 | "Microtech", |
| 943 | "USB-SCSI-DB25", | 943 | "USB-SCSI-DB25", |
| 944 | US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init, | 944 | US_SC_DEVICE, US_PR_DEVICE, usb_stor_euscsi_init, |
| 945 | US_FL_SCM_MULT_TARG ), | 945 | US_FL_SCM_MULT_TARG ), |
| 946 | 946 | ||
| 947 | UNUSUAL_DEV( 0x07af, 0x0005, 0x0100, 0x0100, | 947 | UNUSUAL_DEV( 0x07af, 0x0005, 0x0100, 0x0100, |
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 220b758523ae..6a06a1d1ea7b 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c | |||
| @@ -81,24 +81,23 @@ int sysfs_sd_setattr(struct sysfs_dirent *sd, struct iattr * iattr) | |||
| 81 | if (!sd_attrs) | 81 | if (!sd_attrs) |
| 82 | return -ENOMEM; | 82 | return -ENOMEM; |
| 83 | sd->s_iattr = sd_attrs; | 83 | sd->s_iattr = sd_attrs; |
| 84 | } else { | 84 | } |
| 85 | /* attributes were changed at least once in past */ | 85 | /* attributes were changed at least once in past */ |
| 86 | iattrs = &sd_attrs->ia_iattr; | 86 | iattrs = &sd_attrs->ia_iattr; |
| 87 | 87 | ||
| 88 | if (ia_valid & ATTR_UID) | 88 | if (ia_valid & ATTR_UID) |
| 89 | iattrs->ia_uid = iattr->ia_uid; | 89 | iattrs->ia_uid = iattr->ia_uid; |
| 90 | if (ia_valid & ATTR_GID) | 90 | if (ia_valid & ATTR_GID) |
| 91 | iattrs->ia_gid = iattr->ia_gid; | 91 | iattrs->ia_gid = iattr->ia_gid; |
| 92 | if (ia_valid & ATTR_ATIME) | 92 | if (ia_valid & ATTR_ATIME) |
| 93 | iattrs->ia_atime = iattr->ia_atime; | 93 | iattrs->ia_atime = iattr->ia_atime; |
| 94 | if (ia_valid & ATTR_MTIME) | 94 | if (ia_valid & ATTR_MTIME) |
| 95 | iattrs->ia_mtime = iattr->ia_mtime; | 95 | iattrs->ia_mtime = iattr->ia_mtime; |
| 96 | if (ia_valid & ATTR_CTIME) | 96 | if (ia_valid & ATTR_CTIME) |
| 97 | iattrs->ia_ctime = iattr->ia_ctime; | 97 | iattrs->ia_ctime = iattr->ia_ctime; |
| 98 | if (ia_valid & ATTR_MODE) { | 98 | if (ia_valid & ATTR_MODE) { |
| 99 | umode_t mode = iattr->ia_mode; | 99 | umode_t mode = iattr->ia_mode; |
| 100 | iattrs->ia_mode = sd->s_mode = mode; | 100 | iattrs->ia_mode = sd->s_mode = mode; |
| 101 | } | ||
| 102 | } | 101 | } |
| 103 | return 0; | 102 | return 0; |
| 104 | } | 103 | } |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 6f6c5f300af6..bc0fc795bd35 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
| @@ -124,7 +124,7 @@ extern __must_check unsigned int kfifo_out_peek(struct kfifo *fifo, | |||
| 124 | */ | 124 | */ |
| 125 | static inline bool kfifo_initialized(struct kfifo *fifo) | 125 | static inline bool kfifo_initialized(struct kfifo *fifo) |
| 126 | { | 126 | { |
| 127 | return fifo->buffer != 0; | 127 | return fifo->buffer != NULL; |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | /** | 130 | /** |
diff --git a/kernel/kfifo.c b/kernel/kfifo.c index 498cabba225e..35edbe22e9a9 100644 --- a/kernel/kfifo.c +++ b/kernel/kfifo.c | |||
| @@ -80,7 +80,7 @@ int kfifo_alloc(struct kfifo *fifo, unsigned int size, gfp_t gfp_mask) | |||
| 80 | 80 | ||
| 81 | buffer = kmalloc(size, gfp_mask); | 81 | buffer = kmalloc(size, gfp_mask); |
| 82 | if (!buffer) { | 82 | if (!buffer) { |
| 83 | _kfifo_init(fifo, 0, 0); | 83 | _kfifo_init(fifo, NULL, 0); |
| 84 | return -ENOMEM; | 84 | return -ENOMEM; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| @@ -97,6 +97,7 @@ EXPORT_SYMBOL(kfifo_alloc); | |||
| 97 | void kfifo_free(struct kfifo *fifo) | 97 | void kfifo_free(struct kfifo *fifo) |
| 98 | { | 98 | { |
| 99 | kfree(fifo->buffer); | 99 | kfree(fifo->buffer); |
| 100 | _kfifo_init(fifo, NULL, 0); | ||
| 100 | } | 101 | } |
| 101 | EXPORT_SYMBOL(kfifo_free); | 102 | EXPORT_SYMBOL(kfifo_free); |
| 102 | 103 | ||
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index d8aee584e8d1..236a9988ea91 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
| @@ -927,6 +927,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | |||
| 927 | case ETHTOOL_GPERMADDR: | 927 | case ETHTOOL_GPERMADDR: |
| 928 | case ETHTOOL_GUFO: | 928 | case ETHTOOL_GUFO: |
| 929 | case ETHTOOL_GGSO: | 929 | case ETHTOOL_GGSO: |
| 930 | case ETHTOOL_GGRO: | ||
| 930 | case ETHTOOL_GFLAGS: | 931 | case ETHTOOL_GFLAGS: |
| 931 | case ETHTOOL_GPFLAGS: | 932 | case ETHTOOL_GPFLAGS: |
| 932 | case ETHTOOL_GRXFH: | 933 | case ETHTOOL_GRXFH: |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 76c08402c933..a42f658e756a 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
| @@ -946,7 +946,6 @@ int igmp_rcv(struct sk_buff *skb) | |||
| 946 | break; | 946 | break; |
| 947 | case IGMP_HOST_MEMBERSHIP_REPORT: | 947 | case IGMP_HOST_MEMBERSHIP_REPORT: |
| 948 | case IGMPV2_HOST_MEMBERSHIP_REPORT: | 948 | case IGMPV2_HOST_MEMBERSHIP_REPORT: |
| 949 | case IGMPV3_HOST_MEMBERSHIP_REPORT: | ||
| 950 | /* Is it our report looped back? */ | 949 | /* Is it our report looped back? */ |
| 951 | if (skb_rtable(skb)->fl.iif == 0) | 950 | if (skb_rtable(skb)->fl.iif == 0) |
| 952 | break; | 951 | break; |
| @@ -960,6 +959,7 @@ int igmp_rcv(struct sk_buff *skb) | |||
| 960 | in_dev_put(in_dev); | 959 | in_dev_put(in_dev); |
| 961 | return pim_rcv_v1(skb); | 960 | return pim_rcv_v1(skb); |
| 962 | #endif | 961 | #endif |
| 962 | case IGMPV3_HOST_MEMBERSHIP_REPORT: | ||
| 963 | case IGMP_DVMRP: | 963 | case IGMP_DVMRP: |
| 964 | case IGMP_TRACE: | 964 | case IGMP_TRACE: |
| 965 | case IGMP_HOST_LEAVE_MESSAGE: | 965 | case IGMP_HOST_LEAVE_MESSAGE: |
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c index 38fbf04150ae..544ce0876f12 100644 --- a/net/ipv4/ipcomp.c +++ b/net/ipv4/ipcomp.c | |||
| @@ -124,16 +124,12 @@ static int ipcomp4_init_state(struct xfrm_state *x) | |||
| 124 | if (x->props.mode == XFRM_MODE_TUNNEL) { | 124 | if (x->props.mode == XFRM_MODE_TUNNEL) { |
| 125 | err = ipcomp_tunnel_attach(x); | 125 | err = ipcomp_tunnel_attach(x); |
| 126 | if (err) | 126 | if (err) |
| 127 | goto error_tunnel; | 127 | goto out; |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | err = 0; | 130 | err = 0; |
| 131 | out: | 131 | out: |
| 132 | return err; | 132 | return err; |
| 133 | |||
| 134 | error_tunnel: | ||
| 135 | ipcomp_destroy(x); | ||
| 136 | goto out; | ||
| 137 | } | 133 | } |
| 138 | 134 | ||
| 139 | static const struct xfrm_type ipcomp_type = { | 135 | static const struct xfrm_type ipcomp_type = { |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 28e029632493..3fddc69ccccc 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
| @@ -5783,11 +5783,9 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
| 5783 | 5783 | ||
| 5784 | /* tcp_ack considers this ACK as duplicate | 5784 | /* tcp_ack considers this ACK as duplicate |
| 5785 | * and does not calculate rtt. | 5785 | * and does not calculate rtt. |
| 5786 | * Fix it at least with timestamps. | 5786 | * Force it here. |
| 5787 | */ | 5787 | */ |
| 5788 | if (tp->rx_opt.saw_tstamp && | 5788 | tcp_ack_update_rtt(sk, 0, 0); |
| 5789 | tp->rx_opt.rcv_tsecr && !tp->srtt) | ||
| 5790 | tcp_ack_saw_tstamp(sk, 0); | ||
| 5791 | 5789 | ||
| 5792 | if (tp->rx_opt.tstamp_ok) | 5790 | if (tp->rx_opt.tstamp_ok) |
| 5793 | tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; | 5791 | tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; |
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 2f2a5ca2c878..002e6eef9120 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
| @@ -154,16 +154,12 @@ static int ipcomp6_init_state(struct xfrm_state *x) | |||
| 154 | if (x->props.mode == XFRM_MODE_TUNNEL) { | 154 | if (x->props.mode == XFRM_MODE_TUNNEL) { |
| 155 | err = ipcomp6_tunnel_attach(x); | 155 | err = ipcomp6_tunnel_attach(x); |
| 156 | if (err) | 156 | if (err) |
| 157 | goto error_tunnel; | 157 | goto out; |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | err = 0; | 160 | err = 0; |
| 161 | out: | 161 | out: |
| 162 | return err; | 162 | return err; |
| 163 | error_tunnel: | ||
| 164 | ipcomp_destroy(x); | ||
| 165 | |||
| 166 | goto out; | ||
| 167 | } | 163 | } |
| 168 | 164 | ||
| 169 | static const struct xfrm_type ipcomp6_type = | 165 | static const struct xfrm_type ipcomp6_type = |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 1f2db647bb5c..22f0c2aa7a89 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
| @@ -647,7 +647,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
| 647 | } | 647 | } |
| 648 | if (pos[1] != 0 && | 648 | if (pos[1] != 0 && |
| 649 | (pos[1] != ifibss->ssid_len || | 649 | (pos[1] != ifibss->ssid_len || |
| 650 | !memcmp(pos + 2, ifibss->ssid, ifibss->ssid_len))) { | 650 | memcmp(pos + 2, ifibss->ssid, ifibss->ssid_len))) { |
| 651 | /* Ignore ProbeReq for foreign SSID */ | 651 | /* Ignore ProbeReq for foreign SSID */ |
| 652 | return; | 652 | return; |
| 653 | } | 653 | } |
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index b9007f80cb92..12a2bff7dcdb 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
| @@ -245,6 +245,9 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata, | |||
| 245 | info->control.rates[i].count = 1; | 245 | info->control.rates[i].count = 1; |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) | ||
| 249 | return; | ||
| 250 | |||
| 248 | if (sta && sdata->force_unicast_rateidx > -1) { | 251 | if (sta && sdata->force_unicast_rateidx > -1) { |
| 249 | info->control.rates[0].idx = sdata->force_unicast_rateidx; | 252 | info->control.rates[0].idx = sdata->force_unicast_rateidx; |
| 250 | } else { | 253 | } else { |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index f934c9620b73..bc17cf7d68db 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
| @@ -439,6 +439,16 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, | |||
| 439 | if (local->scan_req) | 439 | if (local->scan_req) |
| 440 | return -EBUSY; | 440 | return -EBUSY; |
| 441 | 441 | ||
| 442 | if (req != local->int_scan_req && | ||
| 443 | sdata->vif.type == NL80211_IFTYPE_STATION && | ||
| 444 | !list_empty(&ifmgd->work_list)) { | ||
| 445 | /* actually wait for the work it's doing to finish/time out */ | ||
| 446 | set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request); | ||
| 447 | local->scan_req = req; | ||
| 448 | local->scan_sdata = sdata; | ||
| 449 | return 0; | ||
| 450 | } | ||
| 451 | |||
| 442 | if (local->ops->hw_scan) { | 452 | if (local->ops->hw_scan) { |
| 443 | u8 *ies; | 453 | u8 *ies; |
| 444 | 454 | ||
| @@ -463,14 +473,6 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, | |||
| 463 | local->scan_req = req; | 473 | local->scan_req = req; |
| 464 | local->scan_sdata = sdata; | 474 | local->scan_sdata = sdata; |
| 465 | 475 | ||
| 466 | if (req != local->int_scan_req && | ||
| 467 | sdata->vif.type == NL80211_IFTYPE_STATION && | ||
| 468 | !list_empty(&ifmgd->work_list)) { | ||
| 469 | /* actually wait for the work it's doing to finish/time out */ | ||
| 470 | set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request); | ||
| 471 | return 0; | ||
| 472 | } | ||
| 473 | |||
| 474 | if (local->ops->hw_scan) | 476 | if (local->ops->hw_scan) |
| 475 | __set_bit(SCAN_HW_SCANNING, &local->scanning); | 477 | __set_bit(SCAN_HW_SCANNING, &local->scanning); |
| 476 | else | 478 | else |
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index b36cc344474b..f445ea1c5f52 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
| @@ -1102,7 +1102,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp) | |||
| 1102 | int err = -ENOMEM; | 1102 | int err = -ENOMEM; |
| 1103 | struct xfrm_state *x = xfrm_state_alloc(net); | 1103 | struct xfrm_state *x = xfrm_state_alloc(net); |
| 1104 | if (!x) | 1104 | if (!x) |
| 1105 | goto error; | 1105 | goto out; |
| 1106 | 1106 | ||
| 1107 | memcpy(&x->id, &orig->id, sizeof(x->id)); | 1107 | memcpy(&x->id, &orig->id, sizeof(x->id)); |
| 1108 | memcpy(&x->sel, &orig->sel, sizeof(x->sel)); | 1108 | memcpy(&x->sel, &orig->sel, sizeof(x->sel)); |
| @@ -1160,16 +1160,10 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp) | |||
| 1160 | return x; | 1160 | return x; |
| 1161 | 1161 | ||
| 1162 | error: | 1162 | error: |
| 1163 | xfrm_state_put(x); | ||
| 1164 | out: | ||
| 1163 | if (errp) | 1165 | if (errp) |
| 1164 | *errp = err; | 1166 | *errp = err; |
| 1165 | if (x) { | ||
| 1166 | kfree(x->aalg); | ||
| 1167 | kfree(x->ealg); | ||
| 1168 | kfree(x->calg); | ||
| 1169 | kfree(x->encap); | ||
| 1170 | kfree(x->coaddr); | ||
| 1171 | } | ||
| 1172 | kfree(x); | ||
| 1173 | return NULL; | 1167 | return NULL; |
| 1174 | } | 1168 | } |
| 1175 | 1169 | ||
