~ubuntu-branches/ubuntu/raring/linux-ti-omap4/raring-security

« back to all changes in this revision

Viewing changes to drivers/net/wireless/b43/dma.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati, Ubuntu: 3.5.0-29.49, Ubuntu: 3.5.0-28.48
  • Date: 2013-05-09 16:42:20 UTC
  • Revision ID: package-import@ubuntu.com-20130509164220-dsdy4gvz86j0l4dv
Tags: 3.5.0-224.35
* Release Tracking Bug
  - LP: #1177190

[ Paolo Pisati ]

* rebased on Ubuntu-3.5.0-29.49

[ Ubuntu: 3.5.0-29.49 ]

* Release Tracking Bug
  - LP: #1177007
* SAUCE: (no-up) alx: disables MSI generation
  - LP: #927782
* CONFIG: CONFIG_EFI_VARS_PSTORE (not set); CONFIG_PPC_EMULATE_SSTEP=y
* SAUCE: Bluetooth: Add support for Broadcom 413c:8143
  - LP: #1166113
* SAUCE: (no-up) x86: reboot: Make Dell Optiplex 390 use reboot=pci
  - LP: #800660
* SAUCE: cpuidle: Fix NULL pointer dereference when offlining CPU's
  - LP: #1168452
* [Config] Add libceph to base modules list
  - LP: #1164739
* SAUCE: (no-up) alx: Don't check netif_running() before powering up
  - LP: #1172415
* [packaging] Bump ABI for every new release
* Revert "drivers/rtc/rtc-at91rm9200.c: use a variable for storing IMR"
  - LP: #1174946
* Input: ALPS - document the alps.h data structures
  - LP: #1089413
* Input: ALPS - copy "model" info into alps_data struct
  - LP: #1089413
* Input: ALPS - move alps_get_model() down below hw_init code
  - LP: #1089413
* Input: ALPS - introduce helper function for repeated commands
  - LP: #1089413
* Input: ALPS - rework detection sequence
  - LP: #1089413
* Input: ALPS - use function pointers for different protocol handlers
  - LP: #1089413
* Input: ALPS - move {addr,nibble}_command settings into
  alps_set_defaults()
  - LP: #1089413
* Input: ALPS - rework detection of Pinnacle AGx touchpads
  - LP: #1089413
* Input: ALPS - fix command mode check
  - LP: #1089413
* Input: ALPS - move pixel and bitmap info into alps_data struct
  - LP: #1089413
* Input: ALPS - make the V3 packet field decoder "pluggable"
  - LP: #1089413
* Input: ALPS - add support for "Rushmore" touchpads
  - LP: #1089413
* Input: ALPS - enable trackstick on Rushmore touchpads
  - LP: #1089413
* Input: ALPS - remove unused argument to alps_enter_command_mode()
  - LP: #1089413
* Input: ALPS - add "Dolphin V1" touchpad support
  - LP: #1089413
* tg3: fix length overflow in VPD firmware parsing
  - LP: #1167065
  - CVE-2013-1929
* Bluetooth: Add support for atheros 04ca:3004 device to ath3k
  - LP: #1168852
* ata_piix: Fix DVD not dectected at some Haswell platforms
  - LP: #1170797
* clockevents: Don't allow dummy broadcast timers
  - LP: #1174946
* Bluetooth: Add support for Dell[QCA 0cf3:0036]
  - LP: #1174946
* Bluetooth: Add support for Dell[QCA 0cf3:817a]
  - LP: #1174946
* ath9k_hw: revert chainmask to user configuration after calibration
  - LP: #1174946
* ath9k: limit tx path hang check to normal data queues
  - LP: #1174946
* rtlwifi: usb: add missing freeing of skbuff
  - LP: #1174946
* net/irda: add missing error path release_sock call
  - LP: #1174946
* pnfs-block: removing DM device maybe cause oops when call dev_remove
  - LP: #1174946
* NFSv4.1: Fix a race in pNFS layoutcommit
  - LP: #1174946
* IPoIB: Fix send lockup due to missed TX completion
  - LP: #1174946
* SUNRPC: Add barriers to ensure read ordering in
  rpc_wake_up_task_queue_locked
  - LP: #1174946
* Nest rename_lock inside vfsmount_lock
  - LP: #1174946
* vt: synchronize_rcu() under spinlock is not nice...
  - LP: #1174946
* iommu/amd: Make sure dma_ops are set for hotplug devices
  - LP: #1174946
* i915: initialize CADL in opregion
  - LP: #1174946
* tracing: Protect tracer flags with trace_types_lock
  - LP: #1174946
* tracing: Prevent buffer overwrite disabled for latency tracers
  - LP: #1174946
* nohz: Make tick_nohz_irq_exit() irq safe
  - LP: #1174946
* udf: Fix bitmap overflow on large filesystems with small block size
  - LP: #1174946
* xen/blkback: correctly respond to unknown, non-native requests
  - LP: #1174946
* tty: atmel_serial_probe(): index of atmel_ports[] fix
  - LP: #1174946
* HID: usbhid: quirk for Realtek Multi-card reader
  - LP: #1174946
* HID: usbhid: quirk for MSI GX680R led panel
  - LP: #1174946
* xen-blkback: fix dispatch_rw_block_io() error path
  - LP: #1174946
* sysfs: handle failure path correctly for readdir()
  - LP: #1174946
* usb: xhci: Fix TRB transfer length macro used for Event TRB.
  - LP: #1174946
* staging: comedi: s626: fix continuous acquisition
  - LP: #1174946
* USB: serial: fix hang when opening port
  - LP: #1174946
* Btrfs: fix race between mmap writes and compression
  - LP: #1174946
* Btrfs: fix space leak when we fail to reserve metadata space
  - LP: #1174946
* Btrfs: limit the global reserve to 512mb
  - LP: #1174946
* usb: ftdi_sio: Add support for Mitsubishi FX-USB-AW/-BD
  - LP: #1174946
* Btrfs: don't drop path when printing out tree errors in scrub
  - LP: #1174946
* USB: serial: add modem-status-change wait queue
  - LP: #1174946
* USB: ark3116: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: ch341: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: cypress_m8: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: f81232: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: ftdi_sio: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: io_edgeport: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: io_ti: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: mct_u232: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: mos7840: fix broken TIOCMIWAIT
  - LP: #1174946
* USB: mos7840: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: oti6858: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: pl2303: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: quatech2: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: spcp8x5: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: ssu100: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* USB: ti_usb_3410_5052: fix use-after-free in TIOCMIWAIT
  - LP: #1174946
* Btrfs: use set_nlink if our i_nlink is 0
  - LP: #1174946
* Bluetooth: Fix not closing SCO sockets in the BT_CONNECT2 state
  - LP: #1174946
* HID: usbhid: fix build problem
  - LP: #1174946
* sysfs: fix race between readdir and lseek
  - LP: #1174946
* net: remove a WARN_ON() in net_enable_timestamp()
  - LP: #1174946
* sky2: Receive Overflows not counted
  - LP: #1174946
* sky2: Threshold for Pause Packet is set wrong
  - LP: #1174946
* tcp: preserve ACK clocking in TSO
  - LP: #1174946
* tcp: undo spurious timeout after SACK reneging
  - LP: #1174946
* 8021q: fix a potential use-after-free
  - LP: #1174946
* thermal: shorten too long mcast group name
  - LP: #1174946
* genetlink: trigger BUG_ON if a group name is too long
  - LP: #1174946
* unix: fix a race condition in unix_release()
  - LP: #1174946
* bonding: remove already created master sysfs link on failure
  - LP: #1174946
* bonding: fix miimon and arp_interval delayed work race conditions
  - LP: #1174946
* bonding: fix disabling of arp_interval and miimon
  - LP: #1174946
* drivers: net: ethernet: davinci_emac: use netif_wake_queue() while
  restarting tx queue
  - LP: #1174946
* drivers: net: ethernet: cpsw: use netif_wake_queue() while restarting
  tx queue
  - LP: #1174946
* net: fix *_DIAG_MAX constants
  - LP: #1174946
* aoe: reserve enough headroom on skbs
  - LP: #1174946
* atl1e: drop pci-msi support because of packet corruption
  - LP: #1174946
* DM9000B: driver initialization upgrade
  - LP: #1174946
* ipv6: don't accept multicast traffic with scope 0
  - LP: #1174946
* ipv6: fix bad free of addrconf_init_net
  - LP: #1174946
* ipv6: don't accept node local multicast traffic from the wire
  - LP: #1174946
* ks8851: Fix interpretation of rxlen field.
  - LP: #1174946
* net: add a synchronize_net() in netdev_rx_handler_unregister()
  - LP: #1174946
* pch_gbe: fix ip_summed checksum reporting on rx
  - LP: #1174946
* smsc75xx: fix jumbo frame support
  - LP: #1174946
* bonding: get netdev_rx_handler_unregister out of locks
  - LP: #1174946
* mac80211: always synchronize_net() during station removal
  - LP: #1174946
* regmap: cache Fix regcache-rbtree sync
  - LP: #1174946
* iwlwifi: dvm: don't send HCMD in restart flow
  - LP: #1174946
* nfsd4: reject "negative" acl lengths
  - LP: #1174946
* can: sja1000: fix define conflict on SH
  - LP: #1174946
* b43: N-PHY: increase initial value of "mind" in RSSI calibration
  - LP: #1174946
* b43: A fix for DMA transmission sequence errors
  - LP: #1174946
* b43: N-PHY: use more bits for offset in RSSI calibration
  - LP: #1174946
* tile: expect new initramfs name from hypervisor file system
  - LP: #1174946
* virtio: console: rename cvq_lock to c_ivq_lock
  - LP: #1174946
* virtio: console: add locking around c_ovq operations
  - LP: #1174946
* ARM: cns3xxx: fix mapping of private memory region
  - LP: #1174946
* loop: prevent bdev freeing while device in use
  - LP: #1174946
* thermal: return an error on failure to register thermal class
  - LP: #1174946
* UBIFS: make space fixup work in the remount case
  - LP: #1174946
* reiserfs: Fix warning and inode leak when deleting inode with xattrs
  - LP: #1174946
* mm: prevent mmap_cache race in find_vma()
  - LP: #1174946
* Linux 3.5.7.10
  - LP: #1174946
* ASoC: imx-ssi: Fix occasional AC97 reset failure
  - LP: #1174946
* ASoC: dma-sh7760: Fix compile error
  - LP: #1174946
* spi/s3c64xx: modified error interrupt handling and init
  - LP: #1174946
* spi/mpc512x-psc: optionally keep PSC SS asserted across xfer segmensts
  - LP: #1174946
* EISA/PCI: Fix bus res reference
  - LP: #1174946
* EISA/PCI: Init EISA early, before PNP
  - LP: #1174946
* mwifiex: limit channel number not to overflow memory
  - LP: #1174946
* ALSA: hda - bug fix on return value when getting HDMI ELD info
  - LP: #1174946
* x86: remove the x32 syscall bitmask from syscall_get_nr()
  - LP: #1174946
* ixgbe: fix registration order of driver and DCA nofitication
  - LP: #1174946
* alpha: Add irongate_io to PCI bus resources
  - LP: #1174946
* crypto: gcm - fix assumption that assoc has one segment
  - LP: #1174946
* libata: Use integer return value for atapi_command_packet_set
  - LP: #1174946
* libata: Set max sector to 65535 for Slimtype DVD A DS8A8SH drive
  - LP: #1174946
* remoteproc: fix error path of handle_vdev
  - LP: #1174946
* hwspinlock: fix __hwspin_lock_request error path
  - LP: #1174946
* remoteproc: fix FW_CONFIG typo
  - LP: #1174946
* powerpc: pSeries_lpar_hpte_remove fails from Adjunct partition being
  performed before the ANDCOND test
  - LP: #1174946
* ftrace: Consistently restore trace function on sysctl enabling
  - LP: #1174946
* spinlocks and preemption points need to be at least compiler barriers
  - LP: #1174946
* drm/mgag200: Index 24 in extended CRTC registers is 24 in hex, not
  decimal.
  - LP: #1174946
* panic: fix a possible deadlock in panic()
  - LP: #1174946
* Bluetooth: Add support for IMC Networks [13d3:3393]
  - LP: #1174946
* Bluetooth: Add support for GC-WB300D PCIe [04ca:3006] to ath3k.
  - LP: #1174946
* Bluetooth: Add support for Foxconn / Hon Hai [0489:e04e]
  - LP: #1174946
* Bluetooth: Add support for Foxconn / Hon Hai [0489:e056]
  - LP: #1174946
* Bluetooth device 04ca:3008 should use ath3k
  - LP: #1174946
* Bluetooth: Device 0cf3:3008 should map AR 3012
  - LP: #1174946
* ALSA: hda - Enabling Realtek ALC 671 codec
  - LP: #1174946
* ALSA: hda - fix typo in proc output
  - LP: #1174946
* can: gw: use kmem_cache_free() instead of kfree()
  - LP: #1174946
* tracing: Fix double free when function profile init failed
  - LP: #1174946
* r8169: fix auto speed down issue
  - LP: #1174946
* x86: Fix rebuild with EFI_STUB enabled
  - LP: #1174946
* msi-wmi: Fix memory leak
  - LP: #1174946
* DRM/i915: Add QUIRK_INVERT_BRIGHTNESS for NCR machines.
  - LP: #1174946
* drm/i915: add quirk to invert brightness on eMachines G725
  - LP: #1174946
* drm/i915: add quirk to invert brightness on eMachines e725
  - LP: #1174946
* drm/i915: add quirk to invert brightness on Packard Bell NCL20
  - LP: #1174946
* block: avoid using uninitialized value in from queue_var_store
  - LP: #1174946
* ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_*
  - LP: #1174946
* PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()
  - LP: #1174946
* ASoC: wm8903: Fix the bypass to HP/LINEOUT when no DAC or ADC is
  running
  - LP: #1174946
* drm/i915: Use the correct size of the GTT for placing the per-process
  entries
  - LP: #1174946
* GFS2: Fix unlock of fcntl locks during withdrawn state
  - LP: #1174946
* libsas: fix handling vacant phy in sas_set_ex_phy()
  - LP: #1174946
* sched_clock: Prevent 64bit inatomicity on 32bit systems
  - LP: #1174946
* x86, mm, paravirt: Fix vmalloc_fault oops during lazy MMU updates
  - LP: #1174946
* x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare
  metal
  - LP: #1174946
* cifs: Allow passwords which begin with a delimitor
  - LP: #1174946
* target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition
  CDBs
  - LP: #1174946
* udl: handle EDID failure properly.
  - LP: #1174946
* tracing: Fix possible NULL pointer dereferences
  - LP: #1174946
* ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
  - LP: #1174946
* Btrfs: make sure nbytes are right after log replay
  - LP: #1174946
* kobject: fix kset_find_obj() race with concurrent last kobject_put()
  - LP: #1174946
* vfs: Revert spurious fix to spinning prevention in prune_icache_sb
  - LP: #1174946
* kref: Implement kref_get_unless_zero v3
  - LP: #1174946
* hrtimer: Don't reinitialize a cpu_base lock on CPU_UP
  - LP: #1174946
* ARM: Do 15e0d9e37c (ARM: pm: let platforms select cpu_suspend support)
  properly
  - LP: #1174946
* efivars: Allow disabling use as a pstore backend
  - LP: #1174946
* efivars: Add module parameter to disable use as a pstore backend
  - LP: #1174946
* efivars: Fix check for CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE
  - LP: #1174946
* KVM: Allow cross page reads and writes from cached translations.
  - LP: #1174946
* mtd: Disable mtdchar mmap on MMU systems
  - LP: #1174946
* Linux 3.5.7.11
  - LP: #1174946

[ Ubuntu: 3.5.0-28.48 ]

* Release Tracking Bug
  - LP: #1172023
* Revert "drm/i915: GFX_MODE Flush TLB Invalidate Mode must be '1' for
  scanline waits"
  - LP: #1140716
* fbcon: fix locking harder
  - LP: #1167114

Show diffs side-by-side

added added

removed removed

Lines of Context:
1487
1487
        const struct b43_dma_ops *ops;
1488
1488
        struct b43_dmaring *ring;
1489
1489
        struct b43_dmadesc_meta *meta;
 
1490
        static const struct b43_txstatus fake; /* filled with 0 */
 
1491
        const struct b43_txstatus *txstat;
1490
1492
        int slot, firstused;
1491
1493
        bool frame_succeed;
 
1494
        int skip;
 
1495
        static u8 err_out1, err_out2;
1492
1496
 
1493
1497
        ring = parse_cookie(dev, status->cookie, &slot);
1494
1498
        if (unlikely(!ring))
1501
1505
        firstused = ring->current_slot - ring->used_slots + 1;
1502
1506
        if (firstused < 0)
1503
1507
                firstused = ring->nr_slots + firstused;
 
1508
 
 
1509
        skip = 0;
1504
1510
        if (unlikely(slot != firstused)) {
1505
1511
                /* This possibly is a firmware bug and will result in
1506
 
                 * malfunction, memory leaks and/or stall of DMA functionality. */
1507
 
                b43dbg(dev->wl, "Out of order TX status report on DMA ring %d. "
1508
 
                       "Expected %d, but got %d\n",
1509
 
                       ring->index, firstused, slot);
1510
 
                return;
 
1512
                 * malfunction, memory leaks and/or stall of DMA functionality.
 
1513
                 */
 
1514
                if (slot == next_slot(ring, next_slot(ring, firstused))) {
 
1515
                        /* If a single header/data pair was missed, skip over
 
1516
                         * the first two slots in an attempt to recover.
 
1517
                         */
 
1518
                        slot = firstused;
 
1519
                        skip = 2;
 
1520
                        if (!err_out1) {
 
1521
                                /* Report the error once. */
 
1522
                                b43dbg(dev->wl,
 
1523
                                       "Skip on DMA ring %d slot %d.\n",
 
1524
                                       ring->index, slot);
 
1525
                                err_out1 = 1;
 
1526
                        }
 
1527
                } else {
 
1528
                        /* More than a single header/data pair were missed.
 
1529
                         * Report this error once.
 
1530
                         */
 
1531
                        if (!err_out2)
 
1532
                                b43dbg(dev->wl,
 
1533
                                       "Out of order TX status report on DMA ring %d. Expected %d, but got %d\n",
 
1534
                                       ring->index, firstused, slot);
 
1535
                        err_out2 = 1;
 
1536
                        return;
 
1537
                }
1511
1538
        }
1512
1539
 
1513
1540
        ops = ring->ops;
1522
1549
                               slot, firstused, ring->index);
1523
1550
                        break;
1524
1551
                }
 
1552
 
1525
1553
                if (meta->skb) {
1526
1554
                        struct b43_private_tx_info *priv_info =
1527
 
                                b43_get_priv_tx_info(IEEE80211_SKB_CB(meta->skb));
 
1555
                             b43_get_priv_tx_info(IEEE80211_SKB_CB(meta->skb));
1528
1556
 
1529
 
                        unmap_descbuffer(ring, meta->dmaaddr, meta->skb->len, 1);
 
1557
                        unmap_descbuffer(ring, meta->dmaaddr,
 
1558
                                         meta->skb->len, 1);
1530
1559
                        kfree(priv_info->bouncebuffer);
1531
1560
                        priv_info->bouncebuffer = NULL;
1532
1561
                } else {
1538
1567
                        struct ieee80211_tx_info *info;
1539
1568
 
1540
1569
                        if (unlikely(!meta->skb)) {
1541
 
                                /* This is a scatter-gather fragment of a frame, so
1542
 
                                 * the skb pointer must not be NULL. */
 
1570
                                /* This is a scatter-gather fragment of a frame,
 
1571
                                 * so the skb pointer must not be NULL.
 
1572
                                 */
1543
1573
                                b43dbg(dev->wl, "TX status unexpected NULL skb "
1544
1574
                                       "at slot %d (first=%d) on ring %d\n",
1545
1575
                                       slot, firstused, ring->index);
1550
1580
 
1551
1581
                        /*
1552
1582
                         * Call back to inform the ieee80211 subsystem about
1553
 
                         * the status of the transmission.
 
1583
                         * the status of the transmission. When skipping over
 
1584
                         * a missed TX status report, use a status structure
 
1585
                         * filled with zeros to indicate that the frame was not
 
1586
                         * sent (frame_count 0) and not acknowledged
1554
1587
                         */
1555
 
                        frame_succeed = b43_fill_txstatus_report(dev, info, status);
 
1588
                        if (unlikely(skip))
 
1589
                                txstat = &fake;
 
1590
                        else
 
1591
                                txstat = status;
 
1592
 
 
1593
                        frame_succeed = b43_fill_txstatus_report(dev, info,
 
1594
                                                                 txstat);
1556
1595
#ifdef CONFIG_B43_DEBUG
1557
1596
                        if (frame_succeed)
1558
1597
                                ring->nr_succeed_tx_packets++;
1580
1619
                /* Everything unmapped and free'd. So it's not used anymore. */
1581
1620
                ring->used_slots--;
1582
1621
 
1583
 
                if (meta->is_last_fragment) {
 
1622
                if (meta->is_last_fragment && !skip) {
1584
1623
                        /* This is the last scatter-gather
1585
1624
                         * fragment of the frame. We are done. */
1586
1625
                        break;
1587
1626
                }
1588
1627
                slot = next_slot(ring, slot);
 
1628
                if (skip > 0)
 
1629
                        --skip;
1589
1630
        }
1590
1631
        if (ring->stopped) {
1591
1632
                B43_WARN_ON(free_slots(ring) < TX_SLOTS_PER_FRAME);