Changeset 18597


Ignore:
Timestamp:
02/29/12 17:03:44 (15 months ago)
Author:
BrainSlayer
Message:

for testing

Location:
src/linux/universal/linux-3.2
Files:
97 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-3.2/Makefile

    r18579 r18597  
    11VERSION = 3 
    22PATCHLEVEL = 2 
    3 SUBLEVEL = 8 
    4 EXTRAVERSION = 
     3SUBLEVEL = 9 
     4EXTRAVERSION = -rc1 
    55NAME = Saber-toothed Squirrel 
    66 
  • src/linux/universal/linux-3.2/arch/arm/common/pl330.c

    r18171 r18597  
    14971497        struct pl330_dmac *pl330; 
    14981498        unsigned long flags; 
    1499         int ret = 0, active = thrd->req_running; 
     1499        int ret = 0, active; 
    15001500 
    15011501        if (!thrd || thrd->free || thrd->dmac->state == DYING) 
     
    15031503 
    15041504        pl330 = thrd->dmac; 
     1505        active = thrd->req_running; 
    15051506 
    15061507        spin_lock_irqsave(&pl330->lock, flags); 
  • src/linux/universal/linux-3.2/arch/arm/include/asm/assembler.h

    r18171 r18597  
    138138        .endm 
    139139 
     140        .macro  save_and_disable_irqs_notrace, oldcpsr 
     141        mrs     \oldcpsr, cpsr 
     142        disable_irq_notrace 
     143        .endm 
     144 
    140145/* 
    141146 * Restore interrupt state previously stored in a register.  We don't 
  • src/linux/universal/linux-3.2/arch/arm/mach-at91/at91rm9200_devices.c

    r18171 r18597  
    8484 * -------------------------------------------------------------------- */ 
    8585 
    86 #ifdef CONFIG_USB_AT91 
     86#if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE) 
    8787static struct at91_udc_data udc_data; 
    8888 
  • src/linux/universal/linux-3.2/arch/arm/mach-at91/at91sam9260_devices.c

    r18171 r18597  
    8585 * -------------------------------------------------------------------- */ 
    8686 
    87 #ifdef CONFIG_USB_AT91 
     87#if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE) 
    8888static struct at91_udc_data udc_data; 
    8989 
  • src/linux/universal/linux-3.2/arch/arm/mach-at91/at91sam9261_devices.c

    r18171 r18597  
    8888 * -------------------------------------------------------------------- */ 
    8989 
    90 #ifdef CONFIG_USB_AT91 
     90#if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE) 
    9191static struct at91_udc_data udc_data; 
    9292 
  • src/linux/universal/linux-3.2/arch/arm/mach-at91/at91sam9263_devices.c

    r18171 r18597  
    9393 * -------------------------------------------------------------------- */ 
    9494 
    95 #ifdef CONFIG_USB_AT91 
     95#if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE) 
    9696static struct at91_udc_data udc_data; 
    9797 
  • src/linux/universal/linux-3.2/arch/arm/mach-omap2/vp.c

    r18171 r18597  
    4141        u32 val, sys_clk_rate, timeout, waittime; 
    4242        u32 vddmin, vddmax, vstepmin, vstepmax; 
     43 
     44        if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) { 
     45                pr_err("%s: No PMIC info for vdd_%s\n", __func__, voltdm->name); 
     46                return; 
     47        } 
    4348 
    4449        if (!voltdm->read || !voltdm->write) { 
  • src/linux/universal/linux-3.2/arch/arm/mm/cache-v7.S

    r18171 r18597  
    5555        cmp     r1, #2                          @ see what cache we have at this level 
    5656        blt     skip                            @ skip if no cache, or just i-cache 
     57#ifdef CONFIG_PREEMPT 
     58        save_and_disable_irqs_notrace r9        @ make cssr&csidr read atomic 
     59#endif 
    5760        mcr     p15, 2, r10, c0, c0, 0          @ select current cache level in cssr 
    5861        isb                                     @ isb to sych the new cssr&csidr 
    5962        mrc     p15, 1, r1, c0, c0, 0           @ read the new csidr 
     63#ifdef CONFIG_PREEMPT 
     64        restore_irqs_notrace r9 
     65#endif 
    6066        and     r2, r1, #7                      @ extract the length of the cache lines 
    6167        add     r2, r2, #4                      @ add 4 (line length offset) 
  • src/linux/universal/linux-3.2/arch/powerpc/kernel/perf_event.c

    r18171 r18597  
    866866        unsigned long flags; 
    867867        s64 left; 
     868        unsigned long val; 
    868869 
    869870        if (!event->hw.idx || !event->hw.sample_period) 
     
    881882        event->hw.state = 0; 
    882883        left = local64_read(&event->hw.period_left); 
    883         write_pmc(event->hw.idx, left); 
     884 
     885        val = 0; 
     886        if (left < 0x80000000L) 
     887                val = 0x80000000L - left; 
     888 
     889        write_pmc(event->hw.idx, val); 
    884890 
    885891        perf_event_update_userpage(event); 
  • src/linux/universal/linux-3.2/arch/s390/kernel/time.c

    r18171 r18597  
    114114                           struct clock_event_device *evt) 
    115115{ 
     116        struct timespec ts; 
    116117        u64 nsecs; 
    117118 
    118         nsecs = ktime_to_ns(ktime_sub(expires, ktime_get_monotonic_offset())); 
     119        ts.tv_sec = ts.tv_nsec = 0; 
     120        monotonic_to_bootbased(&ts); 
     121        nsecs = ktime_to_ns(ktime_add(timespec_to_ktime(ts), expires)); 
    119122        do_div(nsecs, 125); 
    120         S390_lowcore.clock_comparator = TOD_UNIX_EPOCH + (nsecs << 9); 
     123        S390_lowcore.clock_comparator = sched_clock_base_cc + (nsecs << 9); 
    121124        set_clock_comparator(S390_lowcore.clock_comparator); 
    122125        return 0; 
  • src/linux/universal/linux-3.2/arch/x86/kernel/cpu/intel_cacheinfo.c

    r18171 r18597  
    327327} 
    328328 
    329 static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, 
    330                                         int index) 
     329static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, int index) 
    331330{ 
    332331        int node; 
     
    726725 
    727726#ifdef CONFIG_SMP 
    728 static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) 
    729 { 
    730         struct _cpuid4_info     *this_leaf, *sibling_leaf; 
    731         unsigned long num_threads_sharing; 
    732         int index_msb, i, sibling; 
     727 
     728static int __cpuinit cache_shared_amd_cpu_map_setup(unsigned int cpu, int index) 
     729{ 
     730        struct _cpuid4_info *this_leaf; 
     731        int ret, i, sibling; 
    733732        struct cpuinfo_x86 *c = &cpu_data(cpu); 
    734733 
    735         if ((index == 3) && (c->x86_vendor == X86_VENDOR_AMD)) { 
     734        ret = 0; 
     735        if (index == 3) { 
     736                ret = 1; 
    736737                for_each_cpu(i, cpu_llc_shared_mask(cpu)) { 
    737738                        if (!per_cpu(ici_cpuid4_info, i)) 
     
    744745                        } 
    745746                } 
    746                 return; 
    747         } 
     747        } else if ((c->x86 == 0x15) && ((index == 1) || (index == 2))) { 
     748                ret = 1; 
     749                for_each_cpu(i, cpu_sibling_mask(cpu)) { 
     750                        if (!per_cpu(ici_cpuid4_info, i)) 
     751                                continue; 
     752                        this_leaf = CPUID4_INFO_IDX(i, index); 
     753                        for_each_cpu(sibling, cpu_sibling_mask(cpu)) { 
     754                                if (!cpu_online(sibling)) 
     755                                        continue; 
     756                                set_bit(sibling, this_leaf->shared_cpu_map); 
     757                        } 
     758                } 
     759        } 
     760 
     761        return ret; 
     762} 
     763 
     764static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) 
     765{ 
     766        struct _cpuid4_info *this_leaf, *sibling_leaf; 
     767        unsigned long num_threads_sharing; 
     768        int index_msb, i; 
     769        struct cpuinfo_x86 *c = &cpu_data(cpu); 
     770 
     771        if (c->x86_vendor == X86_VENDOR_AMD) { 
     772                if (cache_shared_amd_cpu_map_setup(cpu, index)) 
     773                        return; 
     774        } 
     775 
    748776        this_leaf = CPUID4_INFO_IDX(cpu, index); 
    749777        num_threads_sharing = 1 + this_leaf->base.eax.split.num_threads_sharing; 
  • src/linux/universal/linux-3.2/drivers/base/regmap/regcache.c

    r18171 r18597  
    5555                val = regcache_get_val(map->reg_defaults_raw, 
    5656                                       i, map->cache_word_size); 
    57                 if (!val) 
     57                if (regmap_volatile(map, i)) 
    5858                        continue; 
    5959                count++; 
     
    7070                val = regcache_get_val(map->reg_defaults_raw, 
    7171                                       i, map->cache_word_size); 
    72                 if (!val) 
     72                if (regmap_volatile(map, i)) 
    7373                        continue; 
    7474                map->reg_defaults[j].reg = i; 
  • src/linux/universal/linux-3.2/drivers/cdrom/cdrom.c

    r18324 r18597  
    21212121                return -ENOMEM; 
    21222122 
    2123         if (!access_ok(VERIFY_WRITE, ubuf, nframes * CD_FRAMESIZE_RAW)) { 
    2124                 ret = -EFAULT; 
    2125                 goto out; 
    2126         } 
    2127  
    21282123        cgc.data_direction = CGC_DATA_READ; 
    21292124        while (nframes > 0) { 
     
    21342129                if (ret) 
    21352130                        break; 
    2136                 if (__copy_to_user(ubuf, cgc.buffer, CD_FRAMESIZE_RAW * nr)) { 
     2131                if (copy_to_user(ubuf, cgc.buffer, CD_FRAMESIZE_RAW * nr)) { 
    21372132                        ret = -EFAULT; 
    21382133                        break; 
     
    21422137                lba += nr; 
    21432138        } 
    2144 out: 
    21452139        kfree(cgc.buffer); 
    21462140        return ret; 
  • src/linux/universal/linux-3.2/drivers/gpu/drm/radeon/r100.c

    r18324 r18597  
    790790                        break; 
    791791                default: 
    792                         msi_rearm = RREG32(RADEON_MSI_REARM_EN) & ~RV370_MSI_REARM_EN; 
    793                         WREG32(RADEON_MSI_REARM_EN, msi_rearm); 
    794                         WREG32(RADEON_MSI_REARM_EN, msi_rearm | RV370_MSI_REARM_EN); 
     792                        WREG32(RADEON_MSI_REARM_EN, RV370_MSI_REARM_EN); 
    795793                        break; 
    796794                } 
  • src/linux/universal/linux-3.2/drivers/gpu/drm/radeon/rs600.c

    r18324 r18597  
    694694                        break; 
    695695                default: 
    696                         msi_rearm = RREG32(RADEON_MSI_REARM_EN) & ~RV370_MSI_REARM_EN; 
    697                         WREG32(RADEON_MSI_REARM_EN, msi_rearm); 
    698                         WREG32(RADEON_MSI_REARM_EN, msi_rearm | RV370_MSI_REARM_EN); 
     696                        WREG32(RADEON_MSI_REARM_EN, RV370_MSI_REARM_EN); 
    699697                        break; 
    700698                } 
  • src/linux/universal/linux-3.2/drivers/hwmon/ads1015.c

    r18171 r18597  
    272272                err = device_create_file(&client->dev, &ads1015_in[k].dev_attr); 
    273273                if (err) 
    274                         goto exit_free; 
     274                        goto exit_remove; 
    275275        } 
    276276 
     
    286286        for (k = 0; k < ADS1015_CHANNELS; ++k) 
    287287                device_remove_file(&client->dev, &ads1015_in[k].dev_attr); 
    288 exit_free: 
    289288        kfree(data); 
    290289exit: 
  • src/linux/universal/linux-3.2/drivers/hwmon/f75375s.c

    r18520 r18597  
    305305                fanmode  |= (3 << FAN_CTRL_MODE(nr)); 
    306306                data->pwm[nr] = 255; 
    307                 f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), 
    308                                 data->pwm[nr]); 
    309307                break; 
    310308        case 1: /* PWM */ 
     
    319317        f75375_write8(client, F75375_REG_FAN_TIMER, fanmode); 
    320318        data->pwm_enable[nr] = val; 
     319        if (val == 0) 
     320                f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), 
     321                                data->pwm[nr]); 
    321322        return 0; 
    322323} 
  • src/linux/universal/linux-3.2/drivers/hwmon/max6639.c

    r18171 r18597  
    7373static const int rpm_ranges[] = { 2000, 4000, 8000, 16000 }; 
    7474 
    75 #define FAN_FROM_REG(val, div, rpm_range)       ((val) == 0 ? -1 : \ 
    76         (val) == 255 ? 0 : (rpm_ranges[rpm_range] * 30) / ((div + 1) * (val))) 
     75#define FAN_FROM_REG(val, rpm_range)    ((val) == 0 || (val) == 255 ? \ 
     76                                0 : (rpm_ranges[rpm_range] * 30) / (val)) 
    7777#define TEMP_LIMIT_TO_REG(val)  SENSORS_LIMIT((val) / 1000, 0, 255) 
    7878 
     
    334334 
    335335        return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[attr->index], 
    336                        data->ppr, data->rpm_range)); 
     336                       data->rpm_range)); 
    337337} 
    338338 
     
    430430        struct max6639_platform_data *max6639_info = 
    431431                client->dev.platform_data; 
    432         int i = 0; 
     432        int i; 
    433433        int rpm_range = 1; /* default: 4000 RPM */ 
    434         int err = 0; 
     434        int err; 
    435435 
    436436        /* Reset chip to default values, see below for GCONFIG setup */ 
     
    447447                data->ppr = 2; 
    448448        data->ppr -= 1; 
    449         err = i2c_smbus_write_byte_data(client, 
    450                         MAX6639_REG_FAN_PPR(i), 
    451                         data->ppr << 5); 
    452         if (err) 
    453                 goto exit; 
    454449 
    455450        if (max6639_info) 
     
    458453 
    459454        for (i = 0; i < 2; i++) { 
     455 
     456                /* Set Fan pulse per revolution */ 
     457                err = i2c_smbus_write_byte_data(client, 
     458                                MAX6639_REG_FAN_PPR(i), 
     459                                data->ppr << 6); 
     460                if (err) 
     461                        goto exit; 
    460462 
    461463                /* Fans config PWM, RPM */ 
  • src/linux/universal/linux-3.2/drivers/infiniband/ulp/ipoib/ipoib.h

    r18171 r18597  
    4545 
    4646#include <net/neighbour.h> 
     47#include <net/sch_generic.h> 
    4748 
    4849#include <linux/atomic.h> 
     
    118119}; 
    119120 
    120 struct ipoib_pseudoheader { 
    121         u8  hwaddr[INFINIBAND_ALEN]; 
     121struct ipoib_cb { 
     122        struct qdisc_skb_cb     qdisc_cb; 
     123        u8                      hwaddr[INFINIBAND_ALEN]; 
    122124}; 
    123125 
  • src/linux/universal/linux-3.2/drivers/infiniband/ulp/ipoib/ipoib_main.c

    r18171 r18597  
    659659 
    660660static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev, 
    661                              struct ipoib_pseudoheader *phdr) 
     661                             struct ipoib_cb *cb) 
    662662{ 
    663663        struct ipoib_dev_priv *priv = netdev_priv(dev); 
     
    667667        spin_lock_irqsave(&priv->lock, flags); 
    668668 
    669         path = __path_find(dev, phdr->hwaddr + 4); 
     669        path = __path_find(dev, cb->hwaddr + 4); 
    670670        if (!path || !path->valid) { 
    671671                int new_path = 0; 
    672672 
    673673                if (!path) { 
    674                         path = path_rec_create(dev, phdr->hwaddr + 4); 
     674                        path = path_rec_create(dev, cb->hwaddr + 4); 
    675675                        new_path = 1; 
    676676                } 
    677677                if (path) { 
    678                         /* put pseudoheader back on for next time */ 
    679                         skb_push(skb, sizeof *phdr); 
    680678                        __skb_queue_tail(&path->queue, skb); 
    681679 
     
    701699 
    702700                spin_unlock_irqrestore(&priv->lock, flags); 
    703                 ipoib_send(dev, skb, path->ah, IPOIB_QPN(phdr->hwaddr)); 
     701                ipoib_send(dev, skb, path->ah, IPOIB_QPN(cb->hwaddr)); 
    704702                return; 
    705703        } else if ((path->query || !path_rec_start(dev, path)) && 
    706704                   skb_queue_len(&path->queue) < IPOIB_MAX_PATH_REC_QUEUE) { 
    707                 /* put pseudoheader back on for next time */ 
    708                 skb_push(skb, sizeof *phdr); 
    709705                __skb_queue_tail(&path->queue, skb); 
    710706        } else { 
     
    775771                } 
    776772        } else { 
    777                 struct ipoib_pseudoheader *phdr = 
    778                         (struct ipoib_pseudoheader *) skb->data; 
    779                 skb_pull(skb, sizeof *phdr); 
    780  
    781                 if (phdr->hwaddr[4] == 0xff) { 
     773                struct ipoib_cb *cb = (struct ipoib_cb *) skb->cb; 
     774 
     775                if (cb->hwaddr[4] == 0xff) { 
    782776                        /* Add in the P_Key for multicast*/ 
    783                         phdr->hwaddr[8] = (priv->pkey >> 8) & 0xff; 
    784                         phdr->hwaddr[9] = priv->pkey & 0xff; 
    785  
    786                         ipoib_mcast_send(dev, phdr->hwaddr + 4, skb); 
     777                        cb->hwaddr[8] = (priv->pkey >> 8) & 0xff; 
     778                        cb->hwaddr[9] = priv->pkey & 0xff; 
     779 
     780                        ipoib_mcast_send(dev, cb->hwaddr + 4, skb); 
    787781                } else { 
    788782                        /* unicast GID -- should be ARP or RARP reply */ 
     
    793787                                           skb_dst(skb) ? "neigh" : "dst", 
    794788                                           be16_to_cpup((__be16 *) skb->data), 
    795                                            IPOIB_QPN(phdr->hwaddr), 
    796                                            phdr->hwaddr + 4); 
     789                                           IPOIB_QPN(cb->hwaddr), 
     790                                           cb->hwaddr + 4); 
    797791                                dev_kfree_skb_any(skb); 
    798792                                ++dev->stats.tx_dropped; 
     
    800794                        } 
    801795 
    802                         unicast_arp_send(skb, dev, phdr); 
     796                        unicast_arp_send(skb, dev, cb); 
    803797                } 
    804798        } 
     
    826820{ 
    827821        struct ipoib_header *header; 
    828         struct dst_entry *dst; 
    829         struct neighbour *n; 
    830822 
    831823        header = (struct ipoib_header *) skb_push(skb, sizeof *header); 
     
    835827 
    836828        /* 
    837          * If we don't have a neighbour structure, stuff the 
    838          * destination address onto the front of the skb so we can 
    839          * figure out where to send the packet later. 
     829         * If we don't have a dst_entry structure, stuff the 
     830         * destination address into skb->cb so we can figure out where 
     831         * to send the packet later. 
    840832         */ 
    841         dst = skb_dst(skb); 
    842         n = NULL; 
    843         if (dst) 
    844                 n = dst_get_neighbour_raw(dst); 
    845         if ((!dst || !n) && daddr) { 
    846                 struct ipoib_pseudoheader *phdr = 
    847                         (struct ipoib_pseudoheader *) skb_push(skb, sizeof *phdr); 
    848                 memcpy(phdr->hwaddr, daddr, INFINIBAND_ALEN); 
     833        if (!skb_dst(skb)) { 
     834                struct ipoib_cb *cb = (struct ipoib_cb *) skb->cb; 
     835                memcpy(cb->hwaddr, daddr, INFINIBAND_ALEN); 
    849836        } 
    850837 
     
    10221009        dev->flags              |= IFF_BROADCAST | IFF_MULTICAST; 
    10231010 
    1024         /* 
    1025          * We add in INFINIBAND_ALEN to allow for the destination 
    1026          * address "pseudoheader" for skbs without neighbour struct. 
    1027          */ 
    1028         dev->hard_header_len     = IPOIB_ENCAP_LEN + INFINIBAND_ALEN; 
     1011        dev->hard_header_len     = IPOIB_ENCAP_LEN; 
    10291012        dev->addr_len            = INFINIBAND_ALEN; 
    10301013        dev->type                = ARPHRD_INFINIBAND; 
  • src/linux/universal/linux-3.2/drivers/infiniband/ulp/ipoib/ipoib_multicast.c

    r18171 r18597  
    263263        while (!skb_queue_empty(&mcast->pkt_queue)) { 
    264264                struct sk_buff *skb = skb_dequeue(&mcast->pkt_queue); 
    265                 struct dst_entry *dst = skb_dst(skb); 
    266                 struct neighbour *n = NULL; 
    267265 
    268266                netif_tx_unlock_bh(dev); 
    269267 
    270268                skb->dev = dev; 
    271                 if (dst) 
    272                         n = dst_get_neighbour_raw(dst); 
    273                 if (!dst || !n) { 
    274                         /* put pseudoheader back on for next time */ 
    275                         skb_push(skb, sizeof (struct ipoib_pseudoheader)); 
    276                 } 
    277269 
    278270                if (dev_queue_xmit(skb)) 
    279271                        ipoib_warn(priv, "dev_queue_xmit failed to requeue packet\n"); 
     272 
    280273                netif_tx_lock_bh(dev); 
    281274        } 
  • src/linux/universal/linux-3.2/drivers/media/rc/imon.c

    r18171 r18597  
    4848#define MOD_DESC        "Driver for SoundGraph iMON MultiMedia IR/Display" 
    4949#define MOD_NAME        "imon" 
    50 #define MOD_VERSION     "0.9.3" 
     50#define MOD_VERSION     "0.9.4" 
    5151 
    5252#define DISPLAY_MINOR_BASE      144 
     
    16591659 
    16601660        ictx = (struct imon_context *)urb->context; 
    1661         if (!ictx || !ictx->dev_present_intf0) 
     1661        if (!ictx) 
    16621662                return; 
     1663 
     1664        /* 
     1665         * if we get a callback before we're done configuring the hardware, we 
     1666         * can't yet process the data, as there's nowhere to send it, but we 
     1667         * still need to submit a new rx URB to avoid wedging the hardware 
     1668         */ 
     1669        if (!ictx->dev_present_intf0) 
     1670                goto out; 
    16631671 
    16641672        switch (urb->status) { 
     
    16791687        } 
    16801688 
     1689out: 
    16811690        usb_submit_urb(ictx->rx_urb_intf0, GFP_ATOMIC); 
    16821691} 
     
    16911700 
    16921701        ictx = (struct imon_context *)urb->context; 
    1693         if (!ictx || !ictx->dev_present_intf1) 
     1702        if (!ictx) 
    16941703                return; 
     1704 
     1705        /* 
     1706         * if we get a callback before we're done configuring the hardware, we 
     1707         * can't yet process the data, as there's nowhere to send it, but we 
     1708         * still need to submit a new rx URB to avoid wedging the hardware 
     1709         */ 
     1710        if (!ictx->dev_present_intf1) 
     1711                goto out; 
    16951712 
    16961713        switch (urb->status) { 
     
    17111728        } 
    17121729 
     1730out: 
    17131731        usb_submit_urb(ictx->rx_urb_intf1, GFP_ATOMIC); 
    17141732} 
     
    22432261        usb_free_urb(rx_urb); 
    22442262rx_urb_alloc_failed: 
    2245         dev_err(ictx->dev, "unable to initialize intf0, err %d\n", ret); 
     2263        dev_err(ictx->dev, "unable to initialize intf1, err %d\n", ret); 
    22462264 
    22472265        return NULL; 
  • src/linux/universal/linux-3.2/drivers/media/video/hdpvr/hdpvr-video.c

    r18171 r18597  
    284284                hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00); 
    285285 
     286                dev->status = STATUS_STREAMING; 
     287 
    286288                INIT_WORK(&dev->worker, hdpvr_transmit_buffers); 
    287289                queue_work(dev->workqueue, &dev->worker); 
     
    289291                v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev, 
    290292                         "streaming started\n"); 
    291                 dev->status = STATUS_STREAMING; 
    292293 
    293294                return 0; 
  • src/linux/universal/linux-3.2/drivers/mmc/card/block.c

    r18171 r18597  
    267267        } 
    268268 
     269        if (!idata->buf_bytes) 
     270                return idata; 
     271 
    269272        idata->buf = kzalloc(idata->buf_bytes, GFP_KERNEL); 
    270273        if (!idata->buf) { 
     
    313316                return PTR_ERR(idata); 
    314317 
    315         cmd.opcode = idata->ic.opcode; 
    316         cmd.arg = idata->ic.arg; 
    317         cmd.flags = idata->ic.flags; 
    318  
    319         data.sg = &sg; 
    320         data.sg_len = 1; 
    321         data.blksz = idata->ic.blksz; 
    322         data.blocks = idata->ic.blocks; 
    323  
    324         sg_init_one(data.sg, idata->buf, idata->buf_bytes); 
    325  
    326         if (idata->ic.write_flag) 
    327                 data.flags = MMC_DATA_WRITE; 
    328         else 
    329                 data.flags = MMC_DATA_READ; 
    330  
    331         mrq.cmd = &cmd; 
    332         mrq.data = &data; 
    333  
    334318        md = mmc_blk_get(bdev->bd_disk); 
    335319        if (!md) { 
     
    344328        } 
    345329 
     330        cmd.opcode = idata->ic.opcode; 
     331        cmd.arg = idata->ic.arg; 
     332        cmd.flags = idata->ic.flags; 
     333 
     334        if (idata->buf_bytes) { 
     335                data.sg = &sg; 
     336                data.sg_len = 1; 
     337                data.blksz = idata->ic.blksz; 
     338                data.blocks = idata->ic.blocks; 
     339 
     340                sg_init_one(data.sg, idata->buf, idata->buf_bytes); 
     341 
     342                if (idata->ic.write_flag) 
     343                        data.flags = MMC_DATA_WRITE; 
     344                else 
     345                        data.flags = MMC_DATA_READ; 
     346 
     347                /* data.flags must already be set before doing this. */ 
     348                mmc_set_data_timeout(&data, card); 
     349 
     350                /* Allow overriding the timeout_ns for empirical tuning. */ 
     351                if (idata->ic.data_timeout_ns) 
     352                        data.timeout_ns = idata->ic.data_timeout_ns; 
     353 
     354                if ((cmd.flags & MMC_RSP_R1B) == MMC_RSP_R1B) { 
     355                        /* 
     356                         * Pretend this is a data transfer and rely on the 
     357                         * host driver to compute timeout.  When all host 
     358                         * drivers support cmd.cmd_timeout for R1B, this 
     359                         * can be changed to: 
     360                         * 
     361                         *     mrq.data = NULL; 
     362                         *     cmd.cmd_timeout = idata->ic.cmd_timeout_ms; 
     363                         */ 
     364                        data.timeout_ns = idata->ic.cmd_timeout_ms * 1000000; 
     365                } 
     366 
     367                mrq.data = &data; 
     368        } 
     369 
     370        mrq.cmd = &cmd; 
     371 
    346372        mmc_claim_host(card->host); 
    347373 
     
    350376                if (err) 
    351377                        goto cmd_rel_host; 
    352         } 
    353  
    354         /* data.flags must already be set before doing this. */ 
    355         mmc_set_data_timeout(&data, card); 
    356         /* Allow overriding the timeout_ns for empirical tuning. */ 
    357         if (idata->ic.data_timeout_ns) 
    358                 data.timeout_ns = idata->ic.data_timeout_ns; 
    359  
    360         if ((cmd.flags & MMC_RSP_R1B) == MMC_RSP_R1B) { 
    361                 /* 
    362                  * Pretend this is a data transfer and rely on the host driver 
    363                  * to compute timeout.  When all host drivers support 
    364                  * cmd.cmd_timeout for R1B, this can be changed to: 
    365                  * 
    366                  *     mrq.data = NULL; 
    367                  *     cmd.cmd_timeout = idata->ic.cmd_timeout_ms; 
    368                  */ 
    369                 data.timeout_ns = idata->ic.cmd_timeout_ms * 1000000; 
    370378        } 
    371379 
  • src/linux/universal/linux-3.2/drivers/net/can/sja1000/sja1000.c

    r18171 r18597  
    9696} 
    9797 
     98static int sja1000_is_absent(struct sja1000_priv *priv) 
     99{ 
     100        return (priv->read_reg(priv, REG_MOD) == 0xFF); 
     101} 
     102 
    98103static int sja1000_probe_chip(struct net_device *dev) 
    99104{ 
    100105        struct sja1000_priv *priv = netdev_priv(dev); 
    101106 
    102         if (priv->reg_base && (priv->read_reg(priv, 0) == 0xFF)) { 
     107        if (priv->reg_base && sja1000_is_absent(priv)) { 
    103108                printk(KERN_INFO "%s: probing @0x%lX failed\n", 
    104109                       DRV_NAME, dev->base_addr); 
     
    494499                n++; 
    495500                status = priv->read_reg(priv, REG_SR); 
     501                /* check for absent controller due to hw unplug */ 
     502                if (status == 0xFF && sja1000_is_absent(priv)) 
     503                        return IRQ_NONE; 
    496504 
    497505                if (isrc & IRQ_WUI) 
     
    510518                                sja1000_rx(dev); 
    511519                                status = priv->read_reg(priv, REG_SR); 
     520                                /* check for absent controller */ 
     521                                if (status == 0xFF && sja1000_is_absent(priv)) 
     522                                        return IRQ_NONE; 
    512523                        } 
    513524                } 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/3com/3c59x.c

    r18171 r18597  
    18431843        } 
    18441844 
    1845         if (!netif_carrier_ok(dev)) 
     1845        if (dev->flags & IFF_SLAVE || !netif_carrier_ok(dev)) 
    18461846                next_tick = 5*HZ; 
    18471847 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/jme.c

    r18171 r18597  
    23292329                return -EINVAL; 
    23302330 
    2331         if (new_mtu > 4000) { 
    2332                 jme->reg_rxcs &= ~RXCS_FIFOTHNP; 
    2333                 jme->reg_rxcs |= RXCS_FIFOTHNP_64QW; 
    2334                 jme_restart_rx_engine(jme); 
    2335         } else { 
    2336                 jme->reg_rxcs &= ~RXCS_FIFOTHNP; 
    2337                 jme->reg_rxcs |= RXCS_FIFOTHNP_128QW; 
    2338                 jme_restart_rx_engine(jme); 
    2339         } 
    23402331 
    23412332        netdev->mtu = new_mtu; 
    23422333        netdev_update_features(netdev); 
    23432334 
     2335        jme_restart_rx_engine(jme); 
    23442336        jme_reset_link(jme); 
    23452337 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/jme.h

    r18171 r18597  
    731731 
    732732        RXCS_DEFAULT            = RXCS_FIFOTHTP_128T | 
    733                                   RXCS_FIFOTHNP_128QW | 
     733                                  RXCS_FIFOTHNP_16QW | 
    734734                                  RXCS_DMAREQSZ_128B | 
    735735                                  RXCS_RETRYGAP_256ns | 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/ti/davinci_emac.c

    r18171 r18597  
    10081008 
    10091009        /* free and bail if we are shutting down */ 
    1010         if (unlikely(!netif_running(ndev) || !netif_carrier_ok(ndev))) { 
     1010        if (unlikely(!netif_running(ndev))) { 
    10111011                dev_kfree_skb_any(skb); 
    10121012                return; 
     
    10371037        ret = cpdma_chan_submit(priv->rxchan, skb, skb->data, 
    10381038                        skb_tailroom(skb), GFP_KERNEL); 
    1039         if (WARN_ON(ret < 0)) 
     1039 
     1040        WARN_ON(ret == -ENOMEM); 
     1041        if (unlikely(ret < 0)) 
    10401042                dev_kfree_skb_any(skb); 
    10411043} 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/via/via-velocity.c

    r18479 r18597  
    24902490                free_irq(dev->irq, dev); 
    24912491 
    2492         /* Power down the chip */ 
    2493         pci_set_power_state(vptr->pdev, PCI_D3hot); 
    2494  
    24952492        velocity_free_rings(vptr); 
    24962493 
  • src/linux/universal/linux-3.2/drivers/net/usb/ipheth.c

    r18171 r18597  
    6161#define USB_PRODUCT_IPHONE_4    0x1297 
    6262#define USB_PRODUCT_IPHONE_4_VZW 0x129c 
     63#define USB_PRODUCT_IPHONE_4S   0x12a0 
    6364 
    6465#define IPHETH_USBINTF_CLASS    255 
     
    104105                IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, 
    105106                IPHETH_USBINTF_PROTO) }, 
     107        { USB_DEVICE_AND_INTERFACE_INFO( 
     108                USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4S, 
     109                IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, 
     110                IPHETH_USBINTF_PROTO) }, 
    106111        { } 
    107112}; 
  • src/linux/universal/linux-3.2/drivers/net/veth.c

    r18171 r18597  
    424424} 
    425425 
    426 static const struct nla_policy veth_policy[VETH_INFO_MAX + 1]; 
     426static const struct nla_policy veth_policy[VETH_INFO_MAX + 1] = { 
     427        [VETH_INFO_PEER]        = { .len = sizeof(struct ifinfomsg) }, 
     428}; 
    427429 
    428430static struct rtnl_link_ops veth_link_ops = { 
  • src/linux/universal/linux-3.2/drivers/net/wireless/ath/ath9k/rc.c

    r18171 r18597  
    13481348        for (i = 0; i < sc->hw->max_rates; i++) { 
    13491349                struct ieee80211_tx_rate *rate = &tx_info->status.rates[i]; 
    1350                 if (!rate->count) 
     1350                if (rate->idx < 0 || !rate->count) 
    13511351                        break; 
    13521352 
  • src/linux/universal/linux-3.2/drivers/pci/probe.c

    r18171 r18597  
    651651        dev_dbg(&dev->dev, "scanning [bus %02x-%02x] behind bridge, pass %d\n", 
    652652                secondary, subordinate, pass); 
     653 
     654        if (!primary && (primary != bus->number) && secondary && subordinate) { 
     655                dev_warn(&dev->dev, "Primary bus is hard wired to 0\n"); 
     656                primary = bus->number; 
     657        } 
    653658 
    654659        /* Check if setup is sensible at all */ 
  • src/linux/universal/linux-3.2/drivers/scsi/scsi_pm.c

    r18171 r18597  
    88#include <linux/pm_runtime.h> 
    99#include <linux/export.h> 
     10#include <linux/async.h> 
    1011 
    1112#include <scsi/scsi.h> 
     
    7071} 
    7172 
     73static int scsi_bus_prepare(struct device *dev) 
     74{ 
     75        if (scsi_is_sdev_device(dev)) { 
     76                /* sd probing uses async_schedule.  Wait until it finishes. */ 
     77                async_synchronize_full(); 
     78 
     79        } else if (scsi_is_host_device(dev)) { 
     80                /* Wait until async scanning is finished */ 
     81                scsi_complete_async_scans(); 
     82        } 
     83        return 0; 
     84} 
     85 
    7286static int scsi_bus_suspend(struct device *dev) 
    7387{ 
     
    88102 
    89103#define scsi_bus_resume_common          NULL 
     104#define scsi_bus_prepare                NULL 
    90105#define scsi_bus_suspend                NULL 
    91106#define scsi_bus_freeze                 NULL 
     
    196211 
    197212const struct dev_pm_ops scsi_bus_pm_ops = { 
     213        .prepare =              scsi_bus_prepare, 
    198214        .suspend =              scsi_bus_suspend, 
    199215        .resume =               scsi_bus_resume_common, 
  • src/linux/universal/linux-3.2/drivers/scsi/scsi_priv.h

    r18171 r18597  
    111111 
    112112/* scsi_scan.c */ 
     113extern int scsi_complete_async_scans(void); 
    113114extern int scsi_scan_host_selected(struct Scsi_Host *, unsigned int, 
    114115                                   unsigned int, unsigned int, int); 
  • src/linux/universal/linux-3.2/drivers/scsi/scsi_scan.c

    r18171 r18597  
    18161816        spin_unlock(&async_scan_lock); 
    18171817 
     1818        scsi_autopm_put_host(shost); 
    18181819        scsi_host_put(shost); 
    18191820        kfree(data); 
     
    18421843        do_scsi_scan_host(shost); 
    18431844        scsi_finish_async_scan(data); 
    1844         scsi_autopm_put_host(shost); 
    18451845        return 0; 
    18461846} 
     
    18701870        if (IS_ERR(p)) 
    18711871                do_scan_async(data); 
    1872         /* scsi_autopm_put_host(shost) is called in do_scan_async() */ 
     1872        /* scsi_autopm_put_host(shost) is called in scsi_finish_async_scan() */ 
    18731873} 
    18741874EXPORT_SYMBOL(scsi_scan_host); 
  • src/linux/universal/linux-3.2/drivers/target/target_core_alua.c

    r18171 r18597  
    8080        } 
    8181 
    82         buf = transport_kmap_first_data_page(cmd); 
     82        buf = transport_kmap_data_sg(cmd); 
    8383 
    8484        spin_lock(&su_dev->t10_alua.tg_pt_gps_lock); 
     
    165165        buf[3] = (rd_len & 0xff); 
    166166 
    167         transport_kunmap_first_data_page(cmd); 
     167        transport_kunmap_data_sg(cmd); 
    168168 
    169169        task->task_scsi_status = GOOD; 
     
    196196                return -EINVAL; 
    197197        } 
    198         buf = transport_kmap_first_data_page(cmd); 
     198        buf = transport_kmap_data_sg(cmd); 
    199199 
    200200        /* 
     
    353353 
    354354out: 
    355         transport_kunmap_first_data_page(cmd); 
     355        transport_kunmap_data_sg(cmd); 
    356356        task->task_scsi_status = GOOD; 
    357357        transport_complete_task(task, 1); 
  • src/linux/universal/linux-3.2/drivers/target/target_core_cdb.c

    r18470 r18597  
    8383        } 
    8484 
    85         buf = transport_kmap_first_data_page(cmd); 
     85        buf = transport_kmap_data_sg(cmd); 
    8686 
    8787        if (dev == tpg->tpg_virt_lun0.lun_se_dev) { 
     
    136136 
    137137out: 
    138         transport_kunmap_first_data_page(cmd); 
     138        transport_kunmap_data_sg(cmd); 
    139139        return 0; 
    140140} 
     
    727727        } 
    728728 
    729         buf = transport_kmap_first_data_page(cmd); 
     729        buf = transport_kmap_data_sg(cmd); 
    730730 
    731731        buf[0] = dev->transport->get_device_type(dev); 
     
    744744 
    745745out_unmap: 
    746         transport_kunmap_first_data_page(cmd); 
     746        transport_kunmap_data_sg(cmd); 
    747747out: 
    748748        if (!ret) { 
     
    766766                blocks = (u32)blocks_long; 
    767767 
    768         buf = transport_kmap_first_data_page(cmd); 
     768        buf = transport_kmap_data_sg(cmd); 
    769769 
    770770        buf[0] = (blocks >> 24) & 0xff; 
     
    782782                put_unaligned_be32(0xFFFFFFFF, &buf[0]); 
    783783 
    784         transport_kunmap_first_data_page(cmd); 
     784        transport_kunmap_data_sg(cmd); 
    785785 
    786786        task->task_scsi_status = GOOD; 
     
    796796        unsigned long long blocks = dev->transport->get_blocks(dev); 
    797797 
    798         buf = transport_kmap_first_data_page(cmd); 
     798        buf = transport_kmap_data_sg(cmd); 
    799799 
    800800        buf[0] = (blocks >> 56) & 0xff; 
     
    817817                buf[14] = 0x80; 
    818818 
    819         transport_kunmap_first_data_page(cmd); 
     819        transport_kunmap_data_sg(cmd); 
    820820 
    821821        task->task_scsi_status = GOOD; 
     
    10301030        } 
    10311031 
    1032         rbuf = transport_kmap_first_data_page(cmd); 
     1032        rbuf = transport_kmap_data_sg(cmd); 
    10331033        memcpy(rbuf, buf, offset); 
    1034         transport_kunmap_first_data_page(cmd); 
     1034        transport_kunmap_data_sg(cmd); 
    10351035 
    10361036        task->task_scsi_status = GOOD; 
     
    10541054        } 
    10551055 
    1056         buf = transport_kmap_first_data_page(cmd); 
     1056        buf = transport_kmap_data_sg(cmd); 
    10571057 
    10581058        if (!core_scsi3_ua_clear_for_request_sense(cmd, &ua_asc, &ua_ascq)) { 
     
    11001100 
    11011101end: 
    1102         transport_kunmap_first_data_page(cmd); 
     1102        transport_kunmap_data_sg(cmd); 
    11031103        task->task_scsi_status = GOOD; 
    11041104        transport_complete_task(task, 1); 
     
    11341134        bd_dl = get_unaligned_be16(&cdb[2]); 
    11351135 
    1136         buf = transport_kmap_first_data_page(cmd); 
     1136        buf = transport_kmap_data_sg(cmd); 
    11371137 
    11381138        ptr = &buf[offset]; 
     
    11581158 
    11591159err: 
    1160         transport_kunmap_first_data_page(cmd); 
     1160        transport_kunmap_data_sg(cmd); 
    11611161        if (!ret) { 
    11621162                task->task_scsi_status = GOOD; 
  • src/linux/universal/linux-3.2/drivers/target/target_core_device.c

    r18171 r18597  
    659659        u32 cdb_offset = 0, lun_count = 0, offset = 8, i; 
    660660 
    661         buf = transport_kmap_first_data_page(se_cmd); 
     661        buf = (unsigned char *) transport_kmap_data_sg(se_cmd); 
    662662 
    663663        /* 
     
    697697         */ 
    698698done: 
    699         transport_kunmap_first_data_page(se_cmd); 
     699        transport_kunmap_data_sg(se_cmd); 
    700700        lun_count *= 8; 
    701701        buf[0] = ((lun_count >> 24) & 0xff); 
  • src/linux/universal/linux-3.2/drivers/target/target_core_pr.c

    r18470 r18597  
    15391539        list_add_tail(&tidh_new->dest_list, &tid_dest_list); 
    15401540 
    1541         buf = transport_kmap_first_data_page(cmd); 
     1541        buf = transport_kmap_data_sg(cmd); 
    15421542        /* 
    15431543         * For a PERSISTENT RESERVE OUT specify initiator ports payload, 
     
    17901790        } 
    17911791 
    1792         transport_kunmap_first_data_page(cmd); 
     1792        transport_kunmap_data_sg(cmd); 
    17931793 
    17941794        /* 
     
    18381838        return 0; 
    18391839out: 
    1840         transport_kunmap_first_data_page(cmd); 
     1840        transport_kunmap_data_sg(cmd); 
    18411841        /* 
    18421842         * For the failure case, release everything from tid_dest_list 
     
    34303430         * information. 
    34313431         */ 
    3432         buf = transport_kmap_first_data_page(cmd); 
     3432        buf = transport_kmap_data_sg(cmd); 
    34333433        rtpi = (buf[18] & 0xff) << 8; 
    34343434        rtpi |= buf[19] & 0xff; 
     
    34373437        tid_len |= (buf[22] & 0xff) << 8; 
    34383438        tid_len |= buf[23] & 0xff; 
    3439         transport_kunmap_first_data_page(cmd); 
     3439        transport_kunmap_data_sg(cmd); 
    34403440        buf = NULL; 
    34413441 
     
    34893489        } 
    34903490 
    3491         buf = transport_kmap_first_data_page(cmd); 
     3491        buf = transport_kmap_data_sg(cmd); 
    34923492        proto_ident = (buf[24] & 0x0f); 
    34933493#if 0 
     
    35233523        } 
    35243524 
    3525         transport_kunmap_first_data_page(cmd); 
     3525        transport_kunmap_data_sg(cmd); 
    35263526        buf = NULL; 
    35273527 
     
    37883788        } 
    37893789 
    3790         transport_kunmap_first_data_page(cmd); 
     3790        transport_kunmap_data_sg(cmd); 
    37913791 
    37923792        core_scsi3_put_pr_reg(dest_pr_reg); 
     
    37943794out: 
    37953795        if (buf) 
    3796                 transport_kunmap_first_data_page(cmd); 
     3796                transport_kunmap_data_sg(cmd); 
    37973797        if (dest_se_deve) 
    37983798                core_scsi3_lunacl_undepend_item(dest_se_deve); 
     
    38683868        type = (cdb[2] & 0x0f); 
    38693869 
    3870         buf = transport_kmap_first_data_page(cmd); 
     3870        buf = transport_kmap_data_sg(cmd); 
    38713871        /* 
    38723872         * From PERSISTENT_RESERVE_OUT parameter list (payload) 
     
    38863886                unreg = (buf[17] & 0x02); 
    38873887        } 
    3888         transport_kunmap_first_data_page(cmd); 
     3888        transport_kunmap_data_sg(cmd); 
    38893889        buf = NULL; 
    38903890 
     
    39863986        } 
    39873987 
    3988         buf = transport_kmap_first_data_page(cmd); 
     3988        buf = transport_kmap_data_sg(cmd); 
    39893989        buf[0] = ((su_dev->t10_pr.pr_generation >> 24) & 0xff); 
    39903990        buf[1] = ((su_dev->t10_pr.pr_generation >> 16) & 0xff); 
     
    40204020        buf[7] = (add_len & 0xff); 
    40214021 
    4022         transport_kunmap_first_data_page(cmd); 
     4022        transport_kunmap_data_sg(cmd); 
    40234023 
    40244024        return 0; 
     
    40464046        } 
    40474047 
    4048         buf = transport_kmap_first_data_page(cmd); 
     4048        buf = transport_kmap_data_sg(cmd); 
    40494049        buf[0] = ((su_dev->t10_pr.pr_generation >> 24) & 0xff); 
    40504050        buf[1] = ((su_dev->t10_pr.pr_generation >> 16) & 0xff); 
     
    41054105err: 
    41064106        spin_unlock(&se_dev->dev_reservation_lock); 
    4107         transport_kunmap_first_data_page(cmd); 
     4107        transport_kunmap_data_sg(cmd); 
    41084108 
    41094109        return 0; 
     
    41294129        } 
    41304130 
    4131         buf = transport_kmap_first_data_page(cmd); 
     4131        buf = transport_kmap_data_sg(cmd); 
    41324132 
    41334133        buf[0] = ((add_len << 8) & 0xff); 
     
    41614161        buf[5] |= 0x01; /* PR_TYPE_EXCLUSIVE_ACCESS_ALLREG */ 
    41624162 
    4163         transport_kunmap_first_data_page(cmd); 
     4163        transport_kunmap_data_sg(cmd); 
    41644164 
    41654165        return 0; 
     
    41914191        } 
    41924192 
    4193         buf = transport_kmap_first_data_page(cmd); 
     4193        buf = transport_kmap_data_sg(cmd); 
    41944194 
    41954195        buf[0] = ((su_dev->t10_pr.pr_generation >> 24) & 0xff); 
     
    43124312        buf[7] = (add_len & 0xff); 
    43134313 
    4314         transport_kunmap_first_data_page(cmd); 
     4314        transport_kunmap_data_sg(cmd); 
    43154315 
    43164316        return 0; 
  • src/linux/universal/linux-3.2/drivers/target/target_core_pscsi.c

    r18171 r18597  
    696696                if (task->task_se_cmd->se_deve->lun_flags & 
    697697                                TRANSPORT_LUNFLAGS_READ_ONLY) { 
    698                         unsigned char *buf = transport_kmap_first_data_page(task->task_se_cmd); 
     698                        unsigned char *buf = transport_kmap_data_sg(task->task_se_cmd); 
    699699 
    700700                        if (cdb[0] == MODE_SENSE_10) { 
     
    706706                        } 
    707707 
    708                         transport_kunmap_first_data_page(task->task_se_cmd); 
     708                        transport_kunmap_data_sg(task->task_se_cmd); 
    709709                } 
    710710        } 
  • src/linux/universal/linux-3.2/drivers/target/target_core_transport.c

    r18470 r18597  
    30543054                goto out_unsupported_cdb; 
    30553055 
    3056         /* Let's limit control cdbs to a page, for simplicity's sake. */ 
    3057         if ((cmd->se_cmd_flags & SCF_SCSI_CONTROL_SG_IO_CDB) && 
    3058             size > PAGE_SIZE) 
    3059                 goto out_invalid_cdb_field; 
    3060  
    30613056        transport_set_supported_SAM_opcode(cmd); 
    30623057        return ret; 
     
    34363431EXPORT_SYMBOL(transport_generic_map_mem_to_cmd); 
    34373432 
    3438 void *transport_kmap_first_data_page(struct se_cmd *cmd) 
     3433void *transport_kmap_data_sg(struct se_cmd *cmd) 
    34393434{ 
    34403435        struct scatterlist *sg = cmd->t_data_sg; 
     3436        struct page **pages; 
     3437        int i; 
    34413438 
    34423439        BUG_ON(!sg); 
     
    34463443         * control CDBs passed as SGLs via transport_generic_map_mem_to_cmd() 
    34473444         */ 
    3448         return kmap(sg_page(sg)) + sg->offset; 
    3449 } 
    3450 EXPORT_SYMBOL(transport_kmap_first_data_page); 
    3451  
    3452 void transport_kunmap_first_data_page(struct se_cmd *cmd) 
    3453 { 
    3454         kunmap(sg_page(cmd->t_data_sg)); 
    3455 } 
    3456 EXPORT_SYMBOL(transport_kunmap_first_data_page); 
     3445        if (!cmd->t_data_nents) 
     3446                return NULL; 
     3447        else if (cmd->t_data_nents == 1) 
     3448                return kmap(sg_page(sg)) + sg->offset; 
     3449 
     3450        /* >1 page. use vmap */ 
     3451        pages = kmalloc(sizeof(*pages) * cmd->t_data_nents, GFP_KERNEL); 
     3452        if (!pages) 
     3453                return NULL; 
     3454 
     3455        /* convert sg[] to pages[] */ 
     3456        for_each_sg(cmd->t_data_sg, sg, cmd->t_data_nents, i) { 
     3457                pages[i] = sg_page(sg); 
     3458        } 
     3459 
     3460        cmd->t_data_vmap = vmap(pages, cmd->t_data_nents,  VM_MAP, PAGE_KERNEL); 
     3461        kfree(pages); 
     3462        if (!cmd->t_data_vmap) 
     3463                return NULL; 
     3464 
     3465        return cmd->t_data_vmap + cmd->t_data_sg[0].offset; 
     3466} 
     3467EXPORT_SYMBOL(transport_kmap_data_sg); 
     3468 
     3469void transport_kunmap_data_sg(struct se_cmd *cmd) 
     3470{ 
     3471        if (!cmd->t_data_nents) 
     3472                return; 
     3473        else if (cmd->t_data_nents == 1) 
     3474                kunmap(sg_page(cmd->t_data_sg)); 
     3475 
     3476        vunmap(cmd->t_data_vmap); 
     3477        cmd->t_data_vmap = NULL; 
     3478} 
     3479EXPORT_SYMBOL(transport_kunmap_data_sg); 
    34573480 
    34583481static int 
  • src/linux/universal/linux-3.2/drivers/usb/core/hcd-pci.c

    r18171 r18597  
    188188        dev->current_state = PCI_D0; 
    189189 
    190         if (!dev->irq) { 
     190        /* The xHCI driver supports MSI and MSI-X, 
     191         * so don't fail if the BIOS doesn't provide a legacy IRQ. 
     192         */ 
     193        if (!dev->irq && (driver->flags & HCD_MASK) != HCD_USB3) { 
    191194                dev_err(&dev->dev, 
    192195                        "Found HC with no IRQ.  Check BIOS/PCI %s setup!\n", 
  • src/linux/universal/linux-3.2/drivers/usb/core/hcd.c

    r18171 r18597  
    24662466                dev_dbg(hcd->self.controller, "supports USB remote wakeup\n"); 
    24672467 
    2468         /* enable irqs just before we start the controller */ 
    2469         if (usb_hcd_is_primary_hcd(hcd)) { 
     2468        /* enable irqs just before we start the controller, 
     2469         * if the BIOS provides legacy PCI irqs. 
     2470         */ 
     2471        if (usb_hcd_is_primary_hcd(hcd) && irqnum) { 
    24702472                retval = usb_hcd_request_irqs(hcd, irqnum, irqflags); 
    24712473                if (retval) 
  • src/linux/universal/linux-3.2/drivers/usb/core/hub.c

    r18278 r18597  
    709709                goto init3; 
    710710 
    711         /* After a resume, port power should still be on. 
     711        /* The superspeed hub except for root hub has to use Hub Depth 
     712         * value as an offset into the route string to locate the bits 
     713         * it uses to determine the downstream port number. So hub driver 
     714         * should send a set hub depth request to superspeed hub after 
     715         * the superspeed hub is set configuration in initialization or 
     716         * reset procedure. 
     717         * 
     718         * After a resume, port power should still be on. 
    712719         * For any other type of activation, turn it on. 
    713720         */ 
    714721        if (type != HUB_RESUME) { 
     722                if (hdev->parent && hub_is_superspeed(hdev)) { 
     723                        ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), 
     724                                        HUB_SET_DEPTH, USB_RT_HUB, 
     725                                        hdev->level - 1, 0, NULL, 0, 
     726                                        USB_CTRL_SET_TIMEOUT); 
     727                        if (ret < 0) 
     728                                dev_err(hub->intfdev, 
     729                                                "set hub depth failed\n"); 
     730                } 
    715731 
    716732                /* Speed up system boot by using a delayed_work for the 
     
    9891005                ret = -ENOMEM; 
    9901006                goto fail; 
    991         } 
    992  
    993         if (hub_is_superspeed(hdev) && (hdev->parent != NULL)) { 
    994                 ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), 
    995                                 HUB_SET_DEPTH, USB_RT_HUB, 
    996                                 hdev->level - 1, 0, NULL, 0, 
    997                                 USB_CTRL_SET_TIMEOUT); 
    998  
    999                 if (ret < 0) { 
    1000                         message = "can't set hub depth"; 
    1001                         goto fail; 
    1002                 } 
    10031007        } 
    10041008 
  • src/linux/universal/linux-3.2/drivers/usb/host/pci-quirks.c

    r18470 r18597  
    875875        if (pdev->vendor == 0x184e)     /* vendor Netlogic */ 
    876876                return; 
    877  
     877        if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI && 
     878                        pdev->class != PCI_CLASS_SERIAL_USB_OHCI && 
     879                        pdev->class != PCI_CLASS_SERIAL_USB_EHCI && 
     880                        pdev->class != PCI_CLASS_SERIAL_USB_XHCI) 
     881                return; 
     882 
     883        if (pci_enable_device(pdev) < 0) { 
     884                dev_warn(&pdev->dev, "Can't enable PCI device, " 
     885                                "BIOS handoff failed.\n"); 
     886                return; 
     887        } 
    878888        if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI) 
    879889                quirk_usb_handoff_uhci(pdev); 
     
    884894        else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI) 
    885895                quirk_usb_handoff_xhci(pdev); 
     896        pci_disable_device(pdev); 
    886897} 
    887898DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff); 
  • src/linux/universal/linux-3.2/drivers/usb/host/xhci-hub.c

    r18171 r18597  
    9696        memset(port_removable, 0, sizeof(port_removable)); 
    9797        for (i = 0; i < ports; i++) { 
    98                 portsc = xhci_readl(xhci, xhci->usb3_ports[i]); 
     98                portsc = xhci_readl(xhci, xhci->usb2_ports[i]); 
    9999                /* If a device is removable, PORTSC reports a 0, same as in the 
    100100                 * hub descriptor DeviceRemovable bits. 
  • src/linux/universal/linux-3.2/drivers/usb/host/xhci-mem.c

    r18171 r18597  
    11411141 
    11421142/* 
    1143  * Convert bInterval expressed in frames (in 1-255 range) to exponent of 
     1143 * Convert bInterval expressed in microframes (in 1-255 range) to exponent of 
    11441144 * microframes, rounded down to nearest power of 2. 
    11451145 */ 
    1146 static unsigned int xhci_parse_frame_interval(struct usb_device *udev, 
    1147                 struct usb_host_endpoint *ep) 
     1146static unsigned int xhci_microframes_to_exponent(struct usb_device *udev, 
     1147                struct usb_host_endpoint *ep, unsigned int desc_interval, 
     1148                unsigned int min_exponent, unsigned int max_exponent) 
    11481149{ 
    11491150        unsigned int interval; 
    11501151 
    1151         interval = fls(8 * ep->desc.bInterval) - 1; 
    1152         interval = clamp_val(interval, 3, 10); 
    1153         if ((1 << interval) != 8 * ep->desc.bInterval) 
     1152        interval = fls(desc_interval) - 1; 
     1153        interval = clamp_val(interval, min_exponent, max_exponent); 
     1154        if ((1 << interval) != desc_interval) 
    11541155                dev_warn(&udev->dev, 
    11551156                         "ep %#x - rounding interval to %d microframes, ep desc says %d microframes\n", 
    11561157                         ep->desc.bEndpointAddress, 
    11571158                         1 << interval, 
    1158                          8 * ep->desc.bInterval); 
     1159                         desc_interval); 
    11591160 
    11601161        return interval; 
     1162} 
     1163 
     1164static unsigned int xhci_parse_microframe_interval(struct usb_device *udev, 
     1165                struct usb_host_endpoint *ep) 
     1166{ 
     1167        return xhci_microframes_to_exponent(udev, ep, 
     1168                        ep->desc.bInterval, 0, 15); 
     1169} 
     1170 
     1171 
     1172static unsigned int xhci_parse_frame_interval(struct usb_device *udev, 
     1173                struct usb_host_endpoint *ep) 
     1174{ 
     1175        return xhci_microframes_to_exponent(udev, ep, 
     1176                        ep->desc.bInterval * 8, 3, 10); 
    11611177} 
    11621178 
     
    11791195                if (usb_endpoint_xfer_control(&ep->desc) || 
    11801196                    usb_endpoint_xfer_bulk(&ep->desc)) { 
    1181                         interval = ep->desc.bInterval; 
     1197                        interval = xhci_parse_microframe_interval(udev, ep); 
    11821198                        break; 
    11831199                } 
  • src/linux/universal/linux-3.2/drivers/usb/host/xhci.c

    r18171 r18597  
    352352                /* hcd->irq is -1, we have MSI */ 
    353353                return 0; 
     354 
     355        if (!pdev->irq) { 
     356                xhci_err(xhci, "No msi-x/msi found and no IRQ in BIOS\n"); 
     357                return -EINVAL; 
     358        } 
    354359 
    355360        /* fall back to legacy interrupt*/ 
  • src/linux/universal/linux-3.2/drivers/usb/serial/cp210x.c

    r18364 r18597  
    137137        { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */ 
    138138        { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ 
     139        { USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */ 
     140        { USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */ 
    139141        { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ 
    140142        { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ 
  • src/linux/universal/linux-3.2/drivers/usb/serial/option.c

    r18595 r18597  
    798798                .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, 
    799799        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) }, 
    800         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, 
    801800        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) }, 
    802801        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) }, 
     
    813812        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff), 
    814813                .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, 
    815         /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) }, */ 
    816814        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) }, 
    817815        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) }, 
     
    838836        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff), 
    839837                .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 
    840         /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0053, 0xff, 0xff, 0xff) }, */ 
    841838        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) }, 
    842839        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff), 
     
    846843        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff), 
    847844                .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 
    848         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, 
    849845        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) }, 
    850846        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) }, 
     
    856852        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0067, 0xff, 0xff, 0xff) }, 
    857853        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) }, 
    858         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, 
    859854        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) }, 
    860855        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0077, 0xff, 0xff, 0xff) }, 
     
    875870        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0096, 0xff, 0xff, 0xff) }, 
    876871        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0097, 0xff, 0xff, 0xff) }, 
    877         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0098, 0xff, 0xff, 0xff) }, 
    878         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0099, 0xff, 0xff, 0xff) }, 
    879872        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff), 
    880873                .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 
     
    897890        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0144, 0xff, 0xff, 0xff) }, 
    898891        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0145, 0xff, 0xff, 0xff) }, 
    899         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0146, 0xff, 0xff, 0xff) }, 
    900         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0147, 0xff, 0xff, 0xff) }, 
    901892        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0148, 0xff, 0xff, 0xff) }, 
    902         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0149, 0xff, 0xff, 0xff) }, 
    903         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0150, 0xff, 0xff, 0xff) }, 
    904893        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0151, 0xff, 0xff, 0xff) }, 
    905         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0152, 0xff, 0xff, 0xff) }, 
    906894        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0153, 0xff, 0xff, 0xff) }, 
    907895        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0155, 0xff, 0xff, 0xff) }, 
     
    910898        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0158, 0xff, 0xff, 0xff) }, 
    911899        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0159, 0xff, 0xff, 0xff) }, 
    912         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0160, 0xff, 0xff, 0xff) }, 
    913900        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) }, 
    914901        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) }, 
    915902        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0164, 0xff, 0xff, 0xff) }, 
    916903        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) }, 
    917         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0168, 0xff, 0xff, 0xff) }, 
    918         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0170, 0xff, 0xff, 0xff) }, 
    919         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0176, 0xff, 0xff, 0xff) }, 
    920         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff) }, 
    921904        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) }, 
    922905        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) }, 
     
    10931076        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) }, 
    10941077        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) }, 
    1095         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1401, 0xff, 0xff, 0xff) }, 
    1096         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1402, 0xff, 0xff, 0xff) }, 
    1097         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1403, 0xff, 0xff, 0xff) }, 
    1098         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1404, 0xff, 0xff, 0xff) }, 
    1099         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1405, 0xff, 0xff, 0xff) }, 
    1100         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1406, 0xff, 0xff, 0xff) }, 
    1101         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1407, 0xff, 0xff, 0xff) }, 
    1102         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1408, 0xff, 0xff, 0xff) }, 
    1103         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1409, 0xff, 0xff, 0xff) }, 
    1104         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1410, 0xff, 0xff, 0xff) }, 
    1105         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1411, 0xff, 0xff, 0xff) }, 
    1106         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1412, 0xff, 0xff, 0xff) }, 
    1107         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1413, 0xff, 0xff, 0xff) }, 
    1108         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1414, 0xff, 0xff, 0xff) }, 
    1109         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1415, 0xff, 0xff, 0xff) }, 
    1110         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1416, 0xff, 0xff, 0xff) }, 
    1111         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1417, 0xff, 0xff, 0xff) }, 
    1112         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1418, 0xff, 0xff, 0xff) }, 
    1113         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1419, 0xff, 0xff, 0xff) }, 
    1114         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1420, 0xff, 0xff, 0xff) }, 
    1115         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1421, 0xff, 0xff, 0xff) }, 
    1116         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1422, 0xff, 0xff, 0xff) }, 
    1117         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1423, 0xff, 0xff, 0xff) }, 
    1118         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1424, 0xff, 0xff, 0xff) }, 
    1119         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1425, 0xff, 0xff, 0xff) }, 
    1120         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1426, 0xff, 0xff, 0xff) }, 
    1121         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1427, 0xff, 0xff, 0xff) }, 
    1122         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff) }, 
    1123         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1429, 0xff, 0xff, 0xff) }, 
    1124         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1430, 0xff, 0xff, 0xff) }, 
    1125         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1431, 0xff, 0xff, 0xff) }, 
    1126         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1432, 0xff, 0xff, 0xff) }, 
    1127         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1433, 0xff, 0xff, 0xff) }, 
    1128         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1434, 0xff, 0xff, 0xff) }, 
    1129         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1435, 0xff, 0xff, 0xff) }, 
    1130         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1436, 0xff, 0xff, 0xff) }, 
    1131         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1437, 0xff, 0xff, 0xff) }, 
    1132         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1438, 0xff, 0xff, 0xff) }, 
    1133         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1439, 0xff, 0xff, 0xff) }, 
    1134         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1440, 0xff, 0xff, 0xff) }, 
    1135         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1441, 0xff, 0xff, 0xff) }, 
    1136         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1442, 0xff, 0xff, 0xff) }, 
    1137         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1443, 0xff, 0xff, 0xff) }, 
    1138         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1444, 0xff, 0xff, 0xff) }, 
    1139         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1445, 0xff, 0xff, 0xff) }, 
    1140         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1446, 0xff, 0xff, 0xff) }, 
    1141         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1447, 0xff, 0xff, 0xff) }, 
    1142         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1448, 0xff, 0xff, 0xff) }, 
    1143         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1449, 0xff, 0xff, 0xff) }, 
    1144         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1450, 0xff, 0xff, 0xff) }, 
    1145         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1451, 0xff, 0xff, 0xff) }, 
    1146         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1452, 0xff, 0xff, 0xff) }, 
    1147         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1453, 0xff, 0xff, 0xff) }, 
    1148         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1454, 0xff, 0xff, 0xff) }, 
    1149         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1455, 0xff, 0xff, 0xff) }, 
    1150         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1456, 0xff, 0xff, 0xff) }, 
    1151         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1457, 0xff, 0xff, 0xff) }, 
    1152         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1458, 0xff, 0xff, 0xff) }, 
    1153         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1459, 0xff, 0xff, 0xff) }, 
    1154         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1460, 0xff, 0xff, 0xff) }, 
    1155         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1461, 0xff, 0xff, 0xff) }, 
    1156         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1462, 0xff, 0xff, 0xff) }, 
    1157         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1463, 0xff, 0xff, 0xff) }, 
    1158         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1464, 0xff, 0xff, 0xff) }, 
    1159         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1465, 0xff, 0xff, 0xff) }, 
    1160         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1466, 0xff, 0xff, 0xff) }, 
    1161         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1467, 0xff, 0xff, 0xff) }, 
    1162         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1468, 0xff, 0xff, 0xff) }, 
    1163         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1469, 0xff, 0xff, 0xff) }, 
    1164         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1470, 0xff, 0xff, 0xff) }, 
    1165         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1471, 0xff, 0xff, 0xff) }, 
    1166         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1472, 0xff, 0xff, 0xff) }, 
    1167         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1473, 0xff, 0xff, 0xff) }, 
    1168         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1474, 0xff, 0xff, 0xff) }, 
    1169         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1475, 0xff, 0xff, 0xff) }, 
    1170         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1476, 0xff, 0xff, 0xff) }, 
    1171         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1477, 0xff, 0xff, 0xff) }, 
    1172         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1478, 0xff, 0xff, 0xff) }, 
    1173         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1479, 0xff, 0xff, 0xff) }, 
    1174         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1480, 0xff, 0xff, 0xff) }, 
    1175         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1481, 0xff, 0xff, 0xff) }, 
    1176         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1482, 0xff, 0xff, 0xff) }, 
    1177         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1483, 0xff, 0xff, 0xff) }, 
    1178         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1484, 0xff, 0xff, 0xff) }, 
    1179         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1485, 0xff, 0xff, 0xff) }, 
    1180         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1486, 0xff, 0xff, 0xff) }, 
    1181         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1487, 0xff, 0xff, 0xff) }, 
    1182         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1488, 0xff, 0xff, 0xff) }, 
    1183         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1489, 0xff, 0xff, 0xff) }, 
    1184         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1490, 0xff, 0xff, 0xff) }, 
    1185         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1491, 0xff, 0xff, 0xff) }, 
    1186         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1492, 0xff, 0xff, 0xff) }, 
    1187         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1493, 0xff, 0xff, 0xff) }, 
    1188         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1494, 0xff, 0xff, 0xff) }, 
    1189         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1495, 0xff, 0xff, 0xff) }, 
    1190         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1496, 0xff, 0xff, 0xff) }, 
    1191         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1497, 0xff, 0xff, 0xff) }, 
    1192         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1498, 0xff, 0xff, 0xff) }, 
    1193         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1499, 0xff, 0xff, 0xff) }, 
    1194         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1500, 0xff, 0xff, 0xff) }, 
    1195         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1501, 0xff, 0xff, 0xff) }, 
    1196         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1502, 0xff, 0xff, 0xff) }, 
    1197         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1503, 0xff, 0xff, 0xff) }, 
    1198         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1504, 0xff, 0xff, 0xff) }, 
    1199         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1505, 0xff, 0xff, 0xff) }, 
    1200         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1506, 0xff, 0xff, 0xff) }, 
    1201         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1507, 0xff, 0xff, 0xff) }, 
    1202         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1508, 0xff, 0xff, 0xff) }, 
    1203         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1509, 0xff, 0xff, 0xff) }, 
    1204         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1510, 0xff, 0xff, 0xff) }, 
     1078        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 
     1079          0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, 
     1080        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, 
     1081 
    12051082        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */ 
    12061083        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0027, 0xff, 0xff, 0xff) }, 
     
    12091086        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, 
    12101087        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, 
     1088        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) }, 
    12111089        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) }, 
     1090        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0133, 0xff, 0xff, 0xff) }, 
    12121091        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) }, 
    1213         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 
    1214           0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, 
    1215         { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, 
     1092        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0147, 0xff, 0xff, 0xff) }, 
     1093        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0152, 0xff, 0xff, 0xff) }, 
     1094        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0168, 0xff, 0xff, 0xff) }, 
     1095        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0170, 0xff, 0xff, 0xff) }, 
     1096        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0176, 0xff, 0xff, 0xff) }, 
     1097        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff) }, 
     1098 
    12161099        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, 
    12171100        { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, 
  • src/linux/universal/linux-3.2/drivers/usb/serial/ti_usb_3410_5052.c

    r18171 r18597  
    166166/* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */ 
    167167/* null entry */ 
    168 static struct usb_device_id ti_id_table_3410[13+TI_EXTRA_VID_PID_COUNT+1] = { 
     168static struct usb_device_id ti_id_table_3410[14+TI_EXTRA_VID_PID_COUNT+1] = { 
    169169        { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, 
    170170        { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, 
     
    180180        { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, 
    181181        { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, 
     182        { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, 
    182183}; 
    183184 
     
    189190}; 
    190191 
    191 static struct usb_device_id ti_id_table_combined[17+2*TI_EXTRA_VID_PID_COUNT+1] = { 
     192static struct usb_device_id ti_id_table_combined[18+2*TI_EXTRA_VID_PID_COUNT+1] = { 
    192193        { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, 
    193194        { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, 
     
    207208        { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, 
    208209        { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, 
     210        { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, 
    209211        { } 
    210212}; 
  • src/linux/universal/linux-3.2/drivers/usb/serial/ti_usb_3410_5052.h

    r18171 r18597  
    4949#define MTS_MT9234ZBA_PRODUCT_ID        0xF115 
    5050#define MTS_MT9234ZBAOLD_PRODUCT_ID     0x0319 
     51 
     52/* Abbott Diabetics vendor and product ids */ 
     53#define ABBOTT_VENDOR_ID                0x1a61 
     54#define ABBOTT_PRODUCT_ID               0x3410 
    5155 
    5256/* Commands */ 
  • src/linux/universal/linux-3.2/drivers/usb/storage/usb.c

    r18171 r18597  
    789789 
    790790        /* If the device is really gone, cut short reset delays */ 
    791         if (us->pusb_dev->state == USB_STATE_NOTATTACHED) 
     791        if (us->pusb_dev->state == USB_STATE_NOTATTACHED) { 
    792792                set_bit(US_FLIDX_DISCONNECTING, &us->dflags); 
    793  
    794         /* Prevent SCSI-scanning (if it hasn't started yet) 
    795          * and wait for the SCSI-scanning thread to stop. 
    796          */ 
    797         set_bit(US_FLIDX_DONT_SCAN, &us->dflags); 
    798         wake_up(&us->delay_wait); 
    799         wait_for_completion(&us->scanning_done); 
     793                wake_up(&us->delay_wait); 
     794        } 
     795 
     796        /* Prevent SCSI scanning (if it hasn't started yet) 
     797         * or wait for the SCSI-scanning routine to stop. 
     798         */ 
     799        cancel_delayed_work_sync(&us->scan_dwork); 
     800 
     801        /* Balance autopm calls if scanning was cancelled */ 
     802        if (test_bit(US_FLIDX_SCAN_PENDING, &us->dflags)) 
     803                usb_autopm_put_interface_no_suspend(us->pusb_intf); 
    800804 
    801805        /* Removing the host will perform an orderly shutdown: caches 
     
    824828} 
    825829 
    826 /* Thread to carry out delayed SCSI-device scanning */ 
    827 static int usb_stor_scan_thread(void * __us) 
    828 { 
    829         struct us_data *us = (struct us_data *)__us; 
     830/* Delayed-work routine to carry out SCSI-device scanning */ 
     831static void usb_stor_scan_dwork(struct work_struct *work) 
     832{ 
     833        struct us_data *us = container_of(work, struct us_data, 
     834                        scan_dwork.work); 
    830835        struct device *dev = &us->pusb_intf->dev; 
    831836 
    832         dev_dbg(dev, "device found\n"); 
    833  
    834         set_freezable_with_signal(); 
    835         /* 
    836          * Wait for the timeout to expire or for a disconnect 
    837          * 
    838          * We can't freeze in this thread or we risk causing khubd to 
    839          * fail to freeze, but we can't be non-freezable either. Nor can 
    840          * khubd freeze while waiting for scanning to complete as it may 
    841          * hold the device lock, causing a hang when suspending devices. 
    842          * So we request a fake signal when freezing and use 
    843          * interruptible sleep to kick us out of our wait early when 
    844          * freezing happens. 
    845          */ 
    846         if (delay_use > 0) { 
    847                 dev_dbg(dev, "waiting for device to settle " 
    848                                 "before scanning\n"); 
    849                 wait_event_interruptible_timeout(us->delay_wait, 
    850                                 test_bit(US_FLIDX_DONT_SCAN, &us->dflags), 
    851                                 delay_use * HZ); 
    852         } 
    853  
    854         /* If the device is still connected, perform the scanning */ 
    855         if (!test_bit(US_FLIDX_DONT_SCAN, &us->dflags)) { 
    856  
    857                 /* For bulk-only devices, determine the max LUN value */ 
    858                 if (us->protocol == USB_PR_BULK && 
    859                                 !(us->fflags & US_FL_SINGLE_LUN)) { 
    860                         mutex_lock(&us->dev_mutex); 
    861                         us->max_lun = usb_stor_Bulk_max_lun(us); 
    862                         mutex_unlock(&us->dev_mutex); 
    863                 } 
    864                 scsi_scan_host(us_to_host(us)); 
    865                 dev_dbg(dev, "scan complete\n"); 
    866  
    867                 /* Should we unbind if no devices were detected? */ 
    868         } 
     837        dev_dbg(dev, "starting scan\n"); 
     838 
     839        /* For bulk-only devices, determine the max LUN value */ 
     840        if (us->protocol == USB_PR_BULK && !(us->fflags & US_FL_SINGLE_LUN)) { 
     841                mutex_lock(&us->dev_mutex); 
     842                us->max_lun = usb_stor_Bulk_max_lun(us); 
     843                mutex_unlock(&us->dev_mutex); 
     844        } 
     845        scsi_scan_host(us_to_host(us)); 
     846        dev_dbg(dev, "scan complete\n"); 
     847 
     848        /* Should we unbind if no devices were detected? */ 
    869849 
    870850        usb_autopm_put_interface(us->pusb_intf); 
    871         complete_and_exit(&us->scanning_done, 0); 
     851        clear_bit(US_FLIDX_SCAN_PENDING, &us->dflags); 
    872852} 
    873853 
     
    916896        init_completion(&(us->notify)); 
    917897        init_waitqueue_head(&us->delay_wait); 
    918         init_completion(&us->scanning_done); 
     898        INIT_DELAYED_WORK(&us->scan_dwork, usb_stor_scan_dwork); 
    919899 
    920900        /* Associate the us_data structure with the USB device */ 
     
    947927int usb_stor_probe2(struct us_data *us) 
    948928{ 
    949         struct task_struct *th; 
    950929        int result; 
    951930        struct device *dev = &us->pusb_intf->dev; 
     
    988967        } 
    989968 
    990         /* Start up the thread for delayed SCSI-device scanning */ 
    991         th = kthread_create(usb_stor_scan_thread, us, "usb-stor-scan"); 
    992         if (IS_ERR(th)) { 
    993                 dev_warn(dev, 
    994                                 "Unable to start the device-scanning thread\n"); 
    995                 complete(&us->scanning_done); 
    996                 quiesce_and_remove_host(us); 
    997                 result = PTR_ERR(th); 
    998                 goto BadDevice; 
    999         } 
    1000  
     969        /* Submit the delayed_work for SCSI-device scanning */ 
    1001970        usb_autopm_get_interface_no_resume(us->pusb_intf); 
    1002         wake_up_process(th); 
    1003  
     971        set_bit(US_FLIDX_SCAN_PENDING, &us->dflags); 
     972 
     973        if (delay_use > 0) 
     974                dev_dbg(dev, "waiting for device to settle before scanning\n"); 
     975        queue_delayed_work(system_freezable_wq, &us->scan_dwork, 
     976                        delay_use * HZ); 
    1004977        return 0; 
    1005978 
  • src/linux/universal/linux-3.2/drivers/usb/storage/usb.h

    r18171 r18597  
    4848#include <linux/completion.h> 
    4949#include <linux/mutex.h> 
     50#include <linux/workqueue.h> 
    5051#include <scsi/scsi_host.h> 
    5152 
     
    7374#define US_FLIDX_RESETTING      4       /* device reset in progress */ 
    7475#define US_FLIDX_TIMED_OUT      5       /* SCSI midlayer timed out  */ 
    75 #define US_FLIDX_DONT_SCAN      6       /* don't scan (disconnect)  */ 
     76#define US_FLIDX_SCAN_PENDING   6       /* scanning not yet done    */ 
    7677#define US_FLIDX_REDO_READ10    7       /* redo READ(10) command    */ 
    7778#define US_FLIDX_READ10_WORKED  8       /* previous READ(10) succeeded */ 
     
    148149        struct completion       cmnd_ready;      /* to sleep thread on      */ 
    149150        struct completion       notify;          /* thread begin/end        */ 
    150         wait_queue_head_t       delay_wait;      /* wait during scan, reset */ 
    151         struct completion       scanning_done;   /* wait for scan thread    */ 
     151        wait_queue_head_t       delay_wait;      /* wait during reset      */ 
     152        struct delayed_work     scan_dwork;      /* for async scanning      */ 
    152153 
    153154        /* subdriver information */ 
  • src/linux/universal/linux-3.2/drivers/video/omap2/dss/dpi.c

    r18171 r18597  
    180180{ 
    181181        int r; 
     182 
     183        if (cpu_is_omap34xx() && !dpi.vdds_dsi_reg) { 
     184                DSSERR("no VDSS_DSI regulator\n"); 
     185                return -ENODEV; 
     186        } 
    182187 
    183188        if (dssdev->manager == NULL) { 
  • src/linux/universal/linux-3.2/fs/ecryptfs/inode.c

    r18364 r18597  
    11051105 
    11061106        rc = vfs_setxattr(lower_dentry, name, value, size, flags); 
     1107        if (!rc) 
     1108                fsstack_copy_attr_all(dentry->d_inode, lower_dentry->d_inode); 
    11071109out: 
    11081110        return rc; 
  • src/linux/universal/linux-3.2/fs/eventpoll.c

    r18171 r18597  
    198198        /* The user that created the eventpoll descriptor */ 
    199199        struct user_struct *user; 
     200 
     201        struct file *file; 
     202 
     203        /* used to optimize loop detection check */ 
     204        int visited; 
     205        struct list_head visited_list_link; 
    200206}; 
    201207 
     
    255261/* Slab cache used to allocate "struct eppoll_entry" */ 
    256262static struct kmem_cache *pwq_cache __read_mostly; 
     263 
     264/* Visited nodes during ep_loop_check(), so we can unset them when we finish */ 
     265static LIST_HEAD(visited_list); 
     266 
     267/* 
     268 * List of files with newly added links, where we may need to limit the number 
     269 * of emanating paths. Protected by the epmutex. 
     270 */ 
     271static LIST_HEAD(tfile_check_list); 
    257272 
    258273#ifdef CONFIG_SYSCTL 
     
    277292#endif /* CONFIG_SYSCTL */ 
    278293 
     294static const struct file_operations eventpoll_fops; 
     295 
     296static inline int is_file_epoll(struct file *f) 
     297{ 
     298        return f->f_op == &eventpoll_fops; 
     299} 
    279300 
    280301/* Setup the structure that is used as key for the RB tree */ 
     
    298319{ 
    299320        return !list_empty(p); 
     321} 
     322 
     323static inline struct eppoll_entry *ep_pwq_from_wait(wait_queue_t *p) 
     324{ 
     325        return container_of(p, struct eppoll_entry, wait); 
    300326} 
    301327 
     
    447473} 
    448474 
     475static void ep_remove_wait_queue(struct eppoll_entry *pwq) 
     476{ 
     477        wait_queue_head_t *whead; 
     478 
     479        rcu_read_lock(); 
     480        /* If it is cleared by POLLFREE, it should be rcu-safe */ 
     481        whead = rcu_dereference(pwq->whead); 
     482        if (whead) 
     483                remove_wait_queue(whead, &pwq->wait); 
     484        rcu_read_unlock(); 
     485} 
     486 
    449487/* 
    450488 * This function unregisters poll callbacks from the associated file 
     
    461499 
    462500                list_del(&pwq->llink); 
    463                 remove_wait_queue(pwq->whead, &pwq->wait); 
     501                ep_remove_wait_queue(pwq); 
    464502                kmem_cache_free(pwq_cache, pwq); 
    465503        } 
     
    712750}; 
    713751 
    714 /* Fast test to see if the file is an eventpoll file */ 
    715 static inline int is_file_epoll(struct file *f) 
    716 { 
    717         return f->f_op == &eventpoll_fops; 
    718 } 
    719  
    720752/* 
    721753 * This is called from eventpoll_release() to unlink files from the eventpoll 
     
    828860        struct eventpoll *ep = epi->ep; 
    829861 
     862        if ((unsigned long)key & POLLFREE) { 
     863                ep_pwq_from_wait(wait)->whead = NULL; 
     864                /* 
     865                 * whead = NULL above can race with ep_remove_wait_queue() 
     866                 * which can do another remove_wait_queue() after us, so we 
     867                 * can't use __remove_wait_queue(). whead->lock is held by 
     868                 * the caller. 
     869                 */ 
     870                list_del_init(&wait->task_list); 
     871        } 
     872 
    830873        spin_lock_irqsave(&ep->lock, flags); 
    831874 
     
    927970} 
    928971 
     972 
     973 
     974#define PATH_ARR_SIZE 5 
     975/* 
     976 * These are the number paths of length 1 to 5, that we are allowing to emanate 
     977 * from a single file of interest. For example, we allow 1000 paths of length 
     978 * 1, to emanate from each file of interest. This essentially represents the 
     979 * potential wakeup paths, which need to be limited in order to avoid massive 
     980 * uncontrolled wakeup storms. The common use case should be a single ep which 
     981 * is connected to n file sources. In this case each file source has 1 path 
     982 * of length 1. Thus, the numbers below should be more than sufficient. These 
     983 * path limits are enforced during an EPOLL_CTL_ADD operation, since a modify 
     984 * and delete can't add additional paths. Protected by the epmutex. 
     985 */ 
     986static const int path_limits[PATH_ARR_SIZE] = { 1000, 500, 100, 50, 10 }; 
     987static int path_count[PATH_ARR_SIZE]; 
     988 
     989static int path_count_inc(int nests) 
     990{ 
     991        if (++path_count[nests] > path_limits[nests]) 
     992                return -1; 
     993        return 0; 
     994} 
     995 
     996static void path_count_init(void) 
     997{ 
     998        int i; 
     999 
     1000        for (i = 0; i < PATH_ARR_SIZE; i++) 
     1001                path_count[i] = 0; 
     1002} 
     1003 
     1004static int reverse_path_check_proc(void *priv, void *cookie, int call_nests) 
     1005{ 
     1006        int error = 0; 
     1007        struct file *file = priv; 
     1008        struct file *child_file; 
     1009        struct epitem *epi; 
     1010 
     1011        list_for_each_entry(epi, &file->f_ep_links, fllink) { 
     1012                child_file = epi->ep->file; 
     1013                if (is_file_epoll(child_file)) { 
     1014                        if (list_empty(&child_file->f_ep_links)) { 
     1015                                if (path_count_inc(call_nests)) { 
     1016                                        error = -1; 
     1017                                        break; 
     1018                                } 
     1019                        } else { 
     1020                                error = ep_call_nested(&poll_loop_ncalls, 
     1021                                                        EP_MAX_NESTS, 
     1022                                                        reverse_path_check_proc, 
     1023                                                        child_file, child_file, 
     1024                                                        current); 
     1025                        } 
     1026                        if (error != 0) 
     1027                                break; 
     1028                } else { 
     1029                        printk(KERN_ERR "reverse_path_check_proc: " 
     1030                                "file is not an ep!\n"); 
     1031                } 
     1032        } 
     1033        return error; 
     1034} 
     1035 
     1036/** 
     1037 * reverse_path_check - The tfile_check_list is list of file *, which have 
     1038 *                      links that are proposed to be newly added. We need to 
     1039 *                      make sure that those added links don't add too many 
     1040 *                      paths such that we will spend all our time waking up 
     1041 *                      eventpoll objects. 
     1042 * 
     1043 * Returns: Returns zero if the proposed links don't create too many paths, 
     1044 *          -1 otherwise. 
     1045 */ 
     1046static int reverse_path_check(void) 
     1047{ 
     1048        int length = 0; 
     1049        int error = 0; 
     1050        struct file *current_file; 
     1051 
     1052        /* let's call this for all tfiles */ 
     1053        list_for_each_entry(current_file, &tfile_check_list, f_tfile_llink) { 
     1054                length++; 
     1055                path_count_init(); 
     1056                error = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS, 
     1057                                        reverse_path_check_proc, current_file, 
     1058                                        current_file, current); 
     1059                if (error) 
     1060                        break; 
     1061        } 
     1062        return error; 
     1063} 
     1064 
    9291065/* 
    9301066 * Must be called with "mtx" held. 
     
    9881124        ep_rbtree_insert(ep, epi); 
    9891125 
     1126        /* now check if we've created too many backpaths */ 
     1127        error = -EINVAL; 
     1128        if (reverse_path_check()) 
     1129                goto error_remove_epi; 
     1130 
    9901131        /* We have to drop the new item inside our item list to keep track of it */ 
    9911132        spin_lock_irqsave(&ep->lock, flags); 
     
    10111152 
    10121153        return 0; 
     1154 
     1155error_remove_epi: 
     1156        spin_lock(&tfile->f_lock); 
     1157        if (ep_is_linked(&epi->fllink)) 
     1158                list_del_init(&epi->fllink); 
     1159        spin_unlock(&tfile->f_lock); 
     1160 
     1161        rb_erase(&epi->rbn, &ep->rbr); 
    10131162 
    10141163error_unregister: 
     
    12761425        struct file *file = priv; 
    12771426        struct eventpoll *ep = file->private_data; 
     1427        struct eventpoll *ep_tovisit; 
    12781428        struct rb_node *rbp; 
    12791429        struct epitem *epi; 
    12801430 
    12811431        mutex_lock_nested(&ep->mtx, call_nests + 1); 
     1432        ep->visited = 1; 
     1433        list_add(&ep->visited_list_link, &visited_list); 
    12821434        for (rbp = rb_first(&ep->rbr); rbp; rbp = rb_next(rbp)) { 
    12831435                epi = rb_entry(rbp, struct epitem, rbn); 
    12841436                if (unlikely(is_file_epoll(epi->ffd.file))) { 
     1437                        ep_tovisit = epi->ffd.file->private_data; 
     1438                        if (ep_tovisit->visited) 
     1439                                continue; 
    12851440                        error = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS, 
    1286                                                ep_loop_check_proc, epi->ffd.file, 
    1287                                                epi->ffd.file->private_data, current); 
     1441                                        ep_loop_check_proc, epi->ffd.file, 
     1442                                        ep_tovisit, current); 
    12881443                        if (error != 0) 
    12891444                                break; 
     1445                } else { 
     1446                        /* 
     1447                         * If we've reached a file that is not associated with 
     1448                         * an ep, then we need to check if the newly added 
     1449                         * links are going to add too many wakeup paths. We do 
     1450                         * this by adding it to the tfile_check_list, if it's 
     1451                         * not already there, and calling reverse_path_check() 
     1452                         * during ep_insert(). 
     1453                         */ 
     1454                        if (list_empty(&epi->ffd.file->f_tfile_llink)) 
     1455                                list_add(&epi->ffd.file->f_tfile_llink, 
     1456                                         &tfile_check_list); 
    12901457                } 
    12911458        } 
     
    13081475static int ep_loop_check(struct eventpoll *ep, struct file *file) 
    13091476{ 
    1310         return ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS, 
     1477        int ret; 
     1478        struct eventpoll *ep_cur, *ep_next; 
     1479 
     1480        ret = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS, 
    13111481                              ep_loop_check_proc, file, ep, current); 
     1482        /* clear visited list */ 
     1483        list_for_each_entry_safe(ep_cur, ep_next, &visited_list, 
     1484                                                        visited_list_link) { 
     1485                ep_cur->visited = 0; 
     1486                list_del(&ep_cur->visited_list_link); 
     1487        } 
     1488        return ret; 
     1489} 
     1490 
     1491static void clear_tfile_check_list(void) 
     1492{ 
     1493        struct file *file; 
     1494 
     1495        /* first clear the tfile_check_list */ 
     1496        while (!list_empty(&tfile_check_list)) { 
     1497                file = list_first_entry(&tfile_check_list, struct file, 
     1498                                        f_tfile_llink); 
     1499                list_del_init(&file->f_tfile_llink); 
     1500        } 
     1501        INIT_LIST_HEAD(&tfile_check_list); 
    13121502} 
    13131503 
     
    13171507SYSCALL_DEFINE1(epoll_create1, int, flags) 
    13181508{ 
    1319         int error; 
     1509        int error, fd; 
    13201510        struct eventpoll *ep = NULL; 
     1511        struct file *file; 
    13211512 
    13221513        /* Check the EPOLL_* constant for consistency.  */ 
     
    13351526         * a file structure and a free file descriptor. 
    13361527         */ 
    1337         error = anon_inode_getfd("[eventpoll]", &eventpoll_fops, ep, 
     1528        fd = get_unused_fd_flags(O_RDWR | (flags & O_CLOEXEC)); 
     1529        if (fd < 0) { 
     1530                error = fd; 
     1531                goto out_free_ep; 
     1532        } 
     1533        file = anon_inode_getfile("[eventpoll]", &eventpoll_fops, ep, 
    13381534                                 O_RDWR | (flags & O_CLOEXEC)); 
    1339         if (error < 0) 
    1340                 ep_free(ep); 
    1341  
     1535        if (IS_ERR(file)) { 
     1536                error = PTR_ERR(file); 
     1537                goto out_free_fd; 
     1538        } 
     1539        fd_install(fd, file); 
     1540        ep->file = file; 
     1541        return fd; 
     1542 
     1543out_free_fd: 
     1544        put_unused_fd(fd); 
     1545out_free_ep: 
     1546        ep_free(ep); 
    13421547        return error; 
    13431548} 
     
    14051610         * When we insert an epoll file descriptor, inside another epoll file 
    14061611         * descriptor, there is the change of creating closed loops, which are 
    1407          * better be handled here, than in more critical paths. 
     1612         * better be handled here, than in more critical paths. While we are 
     1613         * checking for loops we also determine the list of files reachable 
     1614         * and hang them on the tfile_check_list, so we can check that we 
     1615         * haven't created too many possible wakeup paths. 
    14081616         * 
    1409          * We hold epmutex across the loop check and the insert in this case, in 
    1410          * order to prevent two separate inserts from racing and each doing the 
    1411          * insert "at the same time" such that ep_loop_check passes on both 
    1412          * before either one does the insert, thereby creating a cycle. 
    1413          */ 
    1414         if (unlikely(is_file_epoll(tfile) && op == EPOLL_CTL_ADD)) { 
     1617         * We need to hold the epmutex across both ep_insert and ep_remove 
     1618         * b/c we want to make sure we are looking at a coherent view of 
     1619         * epoll network. 
     1620         */ 
     1621        if (op == EPOLL_CTL_ADD || op == EPOLL_CTL_DEL) { 
    14151622                mutex_lock(&epmutex); 
    14161623                did_lock_epmutex = 1; 
    1417                 error = -ELOOP; 
    1418                 if (ep_loop_check(ep, tfile) != 0) 
    1419                         goto error_tgt_fput; 
    1420         } 
    1421  
     1624        } 
     1625        if (op == EPOLL_CTL_ADD) { 
     1626                if (is_file_epoll(tfile)) { 
     1627                        error = -ELOOP; 
     1628                        if (ep_loop_check(ep, tfile) != 0) 
     1629                                goto error_tgt_fput; 
     1630                } else 
     1631                        list_add(&tfile->f_tfile_llink, &tfile_check_list); 
     1632        } 
    14221633 
    14231634        mutex_lock_nested(&ep->mtx, 0); 
     
    14381649                } else 
    14391650                        error = -EEXIST; 
     1651                clear_tfile_check_list(); 
    14401652                break; 
    14411653        case EPOLL_CTL_DEL: 
     
    14561668 
    14571669error_tgt_fput: 
    1458         if (unlikely(did_lock_epmutex)) 
     1670        if (did_lock_epmutex) 
    14591671                mutex_unlock(&epmutex); 
    14601672 
  • src/linux/universal/linux-3.2/fs/namei.c

    r18171 r18597  
    10951095 
    10961096        /* Don't create child dentry for a dead directory. */ 
    1097         if (unlikely(IS_DEADDIR(inode))) 
     1097        if (unlikely(IS_DEADDIR(inode))) { 
     1098                dput(dentry); 
    10981099                return ERR_PTR(-ENOENT); 
     1100        } 
    10991101 
    11001102        old = inode->i_op->lookup(inode, dentry, nd); 
  • src/linux/universal/linux-3.2/fs/nfs/nfs4proc.c

    r18324 r18597  
    35693569        if (npages > 1) { 
    35703570                /* for decoding across pages */ 
    3571                 args.acl_scratch = alloc_page(GFP_KERNEL); 
    3572                 if (!args.acl_scratch) 
     3571                res.acl_scratch = alloc_page(GFP_KERNEL); 
     3572                if (!res.acl_scratch) 
    35733573                        goto out_free; 
    35743574        } 
     
    36063606                if (pages[i]) 
    36073607                        __free_page(pages[i]); 
    3608         if (args.acl_scratch) 
    3609                 __free_page(args.acl_scratch); 
     3608        if (res.acl_scratch) 
     3609                __free_page(res.acl_scratch); 
    36103610        return ret; 
    36113611} 
     
    48774877 
    48784878        res.server_scope = kzalloc(sizeof(struct server_scope), GFP_KERNEL); 
    4879         if (unlikely(!res.server_scope)) 
    4880                 return -ENOMEM; 
     4879        if (unlikely(!res.server_scope)) { 
     4880                status = -ENOMEM; 
     4881                goto out; 
     4882        } 
    48814883 
    48824884        status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); 
     
    48954897                } 
    48964898 
    4897                 if (!clp->server_scope) 
     4899                if (!clp->server_scope) { 
    48984900                        clp->server_scope = res.server_scope; 
    4899                 else 
    4900                         kfree(res.server_scope); 
    4901         } 
    4902  
     4901                        goto out; 
     4902                } 
     4903        } 
     4904        kfree(res.server_scope); 
     4905out: 
    49034906        dprintk("<-- %s status= %d\n", __func__, status); 
    49044907        return status; 
  • src/linux/universal/linux-3.2/fs/nfs/nfs4state.c

    r18171 r18597  
    10721072        struct nfs_client *clp = server->nfs_client; 
    10731073 
     1074        if (test_and_clear_bit(NFS_DELEGATED_STATE, &state->flags)) 
     1075                nfs_async_inode_return_delegation(state->inode, &state->stateid); 
    10741076        nfs4_state_mark_reclaim_nograce(clp, state); 
    10751077        nfs4_schedule_state_manager(clp); 
  • src/linux/universal/linux-3.2/fs/nfs/nfs4xdr.c

    r18324 r18597  
    25232523        xdr_inline_pages(&req->rq_rcv_buf, replen << 2, 
    25242524                args->acl_pages, args->acl_pgbase, args->acl_len); 
    2525         xdr_set_scratch_buffer(xdr, page_address(args->acl_scratch), PAGE_SIZE); 
    25262525 
    25272526        encode_nops(&hdr); 
     
    60356034        int status; 
    60366035 
     6036        if (res->acl_scratch != NULL) { 
     6037                void *p = page_address(res->acl_scratch); 
     6038                xdr_set_scratch_buffer(xdr, p, PAGE_SIZE); 
     6039        } 
    60376040        status = decode_compound_hdr(xdr, &hdr); 
    60386041        if (status) 
  • src/linux/universal/linux-3.2/fs/signalfd.c

    r18171 r18597  
    3030#include <linux/signalfd.h> 
    3131#include <linux/syscalls.h> 
     32 
     33void signalfd_cleanup(struct sighand_struct *sighand) 
     34{ 
     35        wait_queue_head_t *wqh = &sighand->signalfd_wqh; 
     36        /* 
     37         * The lockless check can race with remove_wait_queue() in progress, 
     38         * but in this case its caller should run under rcu_read_lock() and 
     39         * sighand_cachep is SLAB_DESTROY_BY_RCU, we can safely return. 
     40         */ 
     41        if (likely(!waitqueue_active(wqh))) 
     42                return; 
     43 
     44        /* wait_queue_t->func(POLLFREE) should do remove_wait_queue() */ 
     45        wake_up_poll(wqh, POLLHUP | POLLFREE); 
     46} 
    3247 
    3348struct signalfd_ctx { 
  • src/linux/universal/linux-3.2/include/asm-generic/poll.h

    r18171 r18597  
    2929#endif 
    3030 
     31#define POLLFREE        0x4000  /* currently only for epoll */ 
     32 
    3133struct pollfd { 
    3234        int fd; 
  • src/linux/universal/linux-3.2/include/linux/eventpoll.h

    r18171 r18597  
    6262{ 
    6363        INIT_LIST_HEAD(&file->f_ep_links); 
     64        INIT_LIST_HEAD(&file->f_tfile_llink); 
    6465} 
    6566 
  • src/linux/universal/linux-3.2/include/linux/fs.h

    r18250 r18597  
    10081008        /* Used by fs/eventpoll.c to link all the hooks to this file */ 
    10091009        struct list_head        f_ep_links; 
     1010        struct list_head        f_tfile_llink; 
    10101011#endif /* #ifdef CONFIG_EPOLL */ 
    10111012        struct address_space    *f_mapping; 
  • src/linux/universal/linux-3.2/include/linux/nfs_xdr.h

    r18324 r18597  
    603603        unsigned int                    acl_pgbase; 
    604604        struct page **                  acl_pages; 
    605         struct page *                   acl_scratch; 
    606605        struct nfs4_sequence_args       seq_args; 
    607606}; 
     
    613612        size_t                          acl_data_offset; 
    614613        int                             acl_flags; 
     614        struct page *                   acl_scratch; 
    615615        struct nfs4_sequence_res        seq_res; 
    616616}; 
  • src/linux/universal/linux-3.2/include/linux/signalfd.h

    r18171 r18597  
    6262} 
    6363 
     64extern void signalfd_cleanup(struct sighand_struct *sighand); 
     65 
    6466#else /* CONFIG_SIGNALFD */ 
    6567 
    6668static inline void signalfd_notify(struct task_struct *tsk, int sig) { } 
     69 
     70static inline void signalfd_cleanup(struct sighand_struct *sighand) { } 
    6771 
    6872#endif /* CONFIG_SIGNALFD */ 
     
    7175 
    7276#endif /* _LINUX_SIGNALFD_H */ 
    73  
  • src/linux/universal/linux-3.2/include/linux/usb/ch11.h

    r18171 r18597  
    6363#define USB_PORT_FEAT_INDICATOR         22 
    6464#define USB_PORT_FEAT_C_PORT_L1         23 
    65 #define USB_PORT_FEAT_C_PORT_LINK_STATE 25 
    66 #define USB_PORT_FEAT_C_PORT_CONFIG_ERROR 26 
    67 #define USB_PORT_FEAT_PORT_REMOTE_WAKE_MASK 27 
    68 #define USB_PORT_FEAT_BH_PORT_RESET     28 
    69 #define USB_PORT_FEAT_C_BH_PORT_RESET   29 
    70 #define USB_PORT_FEAT_FORCE_LINKPM_ACCEPT 30 
    7165 
    7266/* 
     
    7771#define USB_PORT_FEAT_U1_TIMEOUT                23 
    7872#define USB_PORT_FEAT_U2_TIMEOUT                24 
    79 #define USB_PORT_FEAT_C_LINK_STATE              25 
    80 #define USB_PORT_FEAT_C_CONFIG_ERR              26 
     73#define USB_PORT_FEAT_C_PORT_LINK_STATE         25 
     74#define USB_PORT_FEAT_C_PORT_CONFIG_ERROR       26 
    8175#define USB_PORT_FEAT_REMOTE_WAKE_MASK          27 
    8276#define USB_PORT_FEAT_BH_PORT_RESET             28 
  • src/linux/universal/linux-3.2/include/net/flow.h

    r18171 r18597  
    9090        fl4->fl4_dport = dport; 
    9191        fl4->fl4_sport = sport; 
     92} 
     93 
     94/* Reset some input parameters after previous lookup */ 
     95static inline void flowi4_update_output(struct flowi4 *fl4, int oif, __u8 tos, 
     96                                        __be32 daddr, __be32 saddr) 
     97{ 
     98        fl4->flowi4_oif = oif; 
     99        fl4->flowi4_tos = tos; 
     100        fl4->daddr = daddr; 
     101        fl4->saddr = saddr; 
    92102} 
    93103                                       
  • src/linux/universal/linux-3.2/include/net/route.h

    r18171 r18597  
    271271                        return rt; 
    272272                ip_rt_put(rt); 
     273                flowi4_update_output(fl4, oif, tos, fl4->daddr, fl4->saddr); 
    273274        } 
    274275        security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); 
     
    285286                fl4->fl4_sport = sport; 
    286287                ip_rt_put(rt); 
     288                flowi4_update_output(fl4, sk->sk_bound_dev_if, 
     289                                     RT_CONN_FLAGS(sk), fl4->daddr, 
     290                                     fl4->saddr); 
    287291                security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); 
    288292                return ip_route_output_flow(sock_net(sk), fl4, sk); 
  • src/linux/universal/linux-3.2/include/net/sch_generic.h

    r18171 r18597  
    221221struct qdisc_skb_cb { 
    222222        unsigned int            pkt_len; 
    223         long                    data[]; 
    224 }; 
     223        unsigned char           data[24]; 
     224}; 
     225 
     226static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz) 
     227{ 
     228        struct qdisc_skb_cb *qcb; 
     229        BUILD_BUG_ON(sizeof(skb->cb) < sizeof(unsigned int) + sz); 
     230        BUILD_BUG_ON(sizeof(qcb->data) < sz); 
     231} 
    225232 
    226233static inline int qdisc_qlen(const struct Qdisc *q) 
  • src/linux/universal/linux-3.2/include/target/target_core_base.h

    r18324 r18597  
    487487        struct scatterlist      *t_data_sg; 
    488488        unsigned int            t_data_nents; 
     489        void                    *t_data_vmap; 
    489490        struct scatterlist      *t_bidi_data_sg; 
    490491        unsigned int            t_bidi_data_nents; 
  • src/linux/universal/linux-3.2/include/target/target_core_transport.h

    r18171 r18597  
    130130                                        struct se_session *, u32, int, int, 
    131131                                        unsigned char *); 
    132 void *transport_kmap_first_data_page(struct se_cmd *cmd); 
    133 void transport_kunmap_first_data_page(struct se_cmd *cmd); 
     132void *transport_kmap_data_sg(struct se_cmd *); 
     133void transport_kunmap_data_sg(struct se_cmd *); 
    134134extern int transport_generic_allocate_tasks(struct se_cmd *, unsigned char *); 
    135135extern int transport_handle_cdb_direct(struct se_cmd *); 
  • src/linux/universal/linux-3.2/kernel/fork.c

    r18171 r18597  
    6767#include <linux/oom.h> 
    6868#include <linux/khugepaged.h> 
     69#include <linux/signalfd.h> 
    6970 
    7071#include <asm/pgtable.h> 
     
    911912void __cleanup_sighand(struct sighand_struct *sighand) 
    912913{ 
    913         if (atomic_dec_and_test(&sighand->count)) 
     914        if (atomic_dec_and_test(&sighand->count)) { 
     915                signalfd_cleanup(sighand); 
    914916                kmem_cache_free(sighand_cachep, sighand); 
     917        } 
    915918} 
    916919 
  • src/linux/universal/linux-3.2/kernel/irq/autoprobe.c

    r18171 r18597  
    5454                                desc->irq_data.chip->irq_set_type(&desc->irq_data, 
    5555                                                         IRQ_TYPE_PROBE); 
    56                         irq_startup(desc); 
     56                        irq_startup(desc, false); 
    5757                } 
    5858                raw_spin_unlock_irq(&desc->lock); 
     
    7171                if (!desc->action && irq_settings_can_probe(desc)) { 
    7272                        desc->istate |= IRQS_AUTODETECT | IRQS_WAITING; 
    73                         if (irq_startup(desc)) 
     73                        if (irq_startup(desc, false)) 
    7474                                desc->istate |= IRQS_PENDING; 
    7575                } 
  • src/linux/universal/linux-3.2/kernel/irq/chip.c

    r18171 r18597  
    158158} 
    159159 
    160 int irq_startup(struct irq_desc *desc) 
    161 { 
     160int irq_startup(struct irq_desc *desc, bool resend) 
     161{ 
     162        int ret = 0; 
     163 
    162164        irq_state_clr_disabled(desc); 
    163165        desc->depth = 0; 
    164166 
    165167        if (desc->irq_data.chip->irq_startup) { 
    166                 int ret = desc->irq_data.chip->irq_startup(&desc->irq_data); 
     168                ret = desc->irq_data.chip->irq_startup(&desc->irq_data); 
    167169                irq_state_clr_masked(desc); 
    168                 return ret; 
    169         } 
    170  
    171         irq_enable(desc); 
    172         return 0; 
     170        } else { 
     171                irq_enable(desc); 
     172        } 
     173        if (resend) 
     174                check_irq_resend(desc, desc->irq_data.irq); 
     175        return ret; 
    173176} 
    174177 
     
    331334EXPORT_SYMBOL_GPL(handle_simple_irq); 
    332335 
     336/* 
     337 * Called unconditionally from handle_level_irq() and only for oneshot 
     338 * interrupts from handle_fasteoi_irq() 
     339 */ 
     340static void cond_unmask_irq(struct irq_desc *desc) 
     341{ 
     342        /* 
     343         * We need to unmask in the following cases: 
     344         * - Standard level irq (IRQF_ONESHOT is not set) 
     345         * - Oneshot irq which did not wake the thread (caused by a 
     346         *   spurious interrupt or a primary handler handling it 
     347         *   completely). 
     348         */ 
     349        if (!irqd_irq_disabled(&desc->irq_data) && 
     350            irqd_irq_masked(&desc->irq_data) && !desc->threads_oneshot) 
     351                unmask_irq(desc); 
     352} 
     353 
    333354/** 
    334355 *      handle_level_irq - Level type irq handler 
     
    363384        handle_irq_event(desc); 
    364385 
    365         if (!irqd_irq_disabled(&desc->irq_data) && !(desc->istate & IRQS_ONESHOT)) 
    366                 unmask_irq(desc); 
     386        cond_unmask_irq(desc); 
     387 
    367388out_unlock: 
    368389        raw_spin_unlock(&desc->lock); 
     
    417438        preflow_handler(desc); 
    418439        handle_irq_event(desc); 
     440 
     441        if (desc->istate & IRQS_ONESHOT) 
     442                cond_unmask_irq(desc); 
    419443 
    420444out_eoi: 
     
    626650                irq_settings_set_norequest(desc); 
    627651                irq_settings_set_nothread(desc); 
    628                 irq_startup(desc); 
     652                irq_startup(desc, true); 
    629653        } 
    630654out: 
  • src/linux/universal/linux-3.2/kernel/irq/internals.h

    r18171 r18597  
    6868extern void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume); 
    6969 
    70 extern int irq_startup(struct irq_desc *desc); 
     70extern int irq_startup(struct irq_desc *desc, bool resend); 
    7171extern void irq_shutdown(struct irq_desc *desc); 
    7272extern void irq_enable(struct irq_desc *desc); 
  • src/linux/universal/linux-3.2/kernel/irq/manage.c

    r18171 r18597  
    10281028 
    10291029                if (irq_settings_can_autoenable(desc)) 
    1030                         irq_startup(desc); 
     1030                        irq_startup(desc, true); 
    10311031                else 
    10321032                        /* Undo nested disables: */ 
  • src/linux/universal/linux-3.2/mm/nommu.c

    r18171 r18597  
    697697                mapping = vma->vm_file->f_mapping; 
    698698 
     699                mutex_lock(&mapping->i_mmap_mutex); 
    699700                flush_dcache_mmap_lock(mapping); 
    700701                vma_prio_tree_insert(vma, &mapping->i_mmap); 
    701702                flush_dcache_mmap_unlock(mapping); 
     703                mutex_unlock(&mapping->i_mmap_mutex); 
    702704        } 
    703705 
     
    761763                mapping = vma->vm_file->f_mapping; 
    762764 
     765                mutex_lock(&mapping->i_mmap_mutex); 
    763766                flush_dcache_mmap_lock(mapping); 
    764767                vma_prio_tree_remove(vma, &mapping->i_mmap); 
    765768                flush_dcache_mmap_unlock(mapping); 
     769                mutex_unlock(&mapping->i_mmap_mutex); 
    766770        } 
    767771 
     
    20532057 
    20542058        down_write(&nommu_region_sem); 
     2059        mutex_lock(&inode->i_mapping->i_mmap_mutex); 
    20552060 
    20562061        /* search for VMAs that fall within the dead zone */ 
     
    20602065                 * cache */ 
    20612066                if (vma->vm_flags & VM_SHARED) { 
     2067                        mutex_unlock(&inode->i_mapping->i_mmap_mutex); 
    20622068                        up_write(&nommu_region_sem); 
    20632069                        return -ETXTBSY; /* not quite true, but near enough */ 
     
    20872093        } 
    20882094 
     2095        mutex_unlock(&inode->i_mapping->i_mmap_mutex); 
    20892096        up_write(&nommu_region_sem); 
    20902097        return 0; 
  • src/linux/universal/linux-3.2/net/core/dev.c

    r18313 r18597  
    35743574{ 
    35753575        struct sk_buff *p; 
     3576        unsigned int maclen = skb->dev->hard_header_len; 
    35763577 
    35773578        for (p = napi->gro_list; p; p = p->next) { 
     
    35803581                diffs = (unsigned long)p->dev ^ (unsigned long)skb->dev; 
    35813582                diffs |= p->vlan_tci ^ skb->vlan_tci; 
    3582                 diffs |= compare_ether_header(skb_mac_header(p), 
    3583                                               skb_gro_mac_header(skb)); 
     3583                if (maclen == ETH_HLEN) 
     3584                        diffs |= compare_ether_header(skb_mac_header(p), 
     3585                                                      skb_gro_mac_header(skb)); 
     3586                else if (!diffs) 
     3587                        diffs = memcmp(skb_mac_header(p), 
     3588                                       skb_gro_mac_header(skb), 
     3589                                       maclen); 
    35843590                NAPI_GRO_CB(p)->same_flow = !diffs; 
    35853591                NAPI_GRO_CB(p)->flush = 0; 
  • src/linux/universal/linux-3.2/net/core/netpoll.c

    r18364 r18597  
    195195        poll_napi(dev); 
    196196 
    197         if (dev->priv_flags & IFF_SLAVE) { 
     197        if (dev->flags & IFF_SLAVE) { 
    198198                if (dev->npinfo) { 
    199199                        struct net_device *bond_dev = dev->master; 
  • src/linux/universal/linux-3.2/net/ipv4/arp.c

    r18171 r18597  
    868868                            (arp_fwd_proxy(in_dev, dev, rt) || 
    869869                             arp_fwd_pvlan(in_dev, dev, rt, sip, tip) || 
    870                              pneigh_lookup(&arp_tbl, net, &tip, dev, 0))) { 
     870                             (rt->dst.dev != dev && 
     871                              pneigh_lookup(&arp_tbl, net, &tip, dev, 0)))) { 
    871872                                n = neigh_event_ns(&arp_tbl, sha, &sip, dev); 
    872873                                if (n) 
  • src/linux/universal/linux-3.2/net/ipv4/ip_options.c

    r18171 r18597  
    574574                if (srrptr + 3 <= srrspace) { 
    575575                        opt->is_changed = 1; 
     576                        ip_hdr(skb)->daddr = opt->nexthop; 
    576577                        ip_rt_get_source(&optptr[srrptr-1], skb, rt); 
    577                         ip_hdr(skb)->daddr = opt->nexthop; 
    578578                        optptr[2] = srrptr+4; 
    579579                } else if (net_ratelimit()) 
  • src/linux/universal/linux-3.2/net/ipv4/tcp_input.c

    r18171 r18597  
    13111311} 
    13121312 
    1313 static u8 tcp_sacktag_one(const struct sk_buff *skb, struct sock *sk, 
    1314                           struct tcp_sacktag_state *state, 
     1313/* Mark the given newly-SACKed range as such, adjusting counters and hints. */ 
     1314static u8 tcp_sacktag_one(struct sock *sk, 
     1315                          struct tcp_sacktag_state *state, u8 sacked, 
     1316                          u32 start_seq, u32 end_seq, 
    13151317                          int dup_sack, int pcount) 
    13161318{ 
    13171319        struct tcp_sock *tp = tcp_sk(sk); 
    1318         u8 sacked = TCP_SKB_CB(skb)->sacked; 
    13191320        int fack_count = state->fack_count; 
    13201321 
     
    13221323        if (dup_sack && (sacked & TCPCB_RETRANS)) { 
    13231324                if (tp->undo_marker && tp->undo_retrans && 
    1324                     after(TCP_SKB_CB(skb)->end_seq, tp->undo_marker)) 
     1325                    after(end_seq, tp->undo_marker)) 
    13251326                        tp->undo_retrans--; 
    13261327                if (sacked & TCPCB_SACKED_ACKED) 
     
    13291330 
    13301331        /* Nothing to do; acked frame is about to be dropped (was ACKed). */ 
    1331         if (!after(TCP_SKB_CB(skb)->end_seq, tp->snd_una)) 
     1332        if (!after(end_seq, tp->snd_una)) 
    13321333                return sacked; 
    13331334 
     
    13481349                                 * which was in hole. It is reordering. 
    13491350                                 */ 
    1350                                 if (before(TCP_SKB_CB(skb)->seq, 
     1351                                if (before(start_seq, 
    13511352                                           tcp_highest_sack_seq(tp))) 
    13521353                                        state->reord = min(fack_count, 
     
    13541355 
    13551356                                /* SACK enhanced F-RTO (RFC4138; Appendix B) */ 
    1356                                 if (!after(TCP_SKB_CB(skb)->end_seq, tp->frto_highmark)) 
     1357                                if (!after(end_seq, tp->frto_highmark)) 
    13571358                                        state->flag |= FLAG_ONLY_ORIG_SACKED; 
    13581359                        } 
     
    13721373                /* Lost marker hint past SACKed? Tweak RFC3517 cnt */ 
    13731374                if (!tcp_is_fack(tp) && (tp->lost_skb_hint != NULL) && 
    1374                     before(TCP_SKB_CB(skb)->seq, 
    1375                            TCP_SKB_CB(tp->lost_skb_hint)->seq)) 
     1375                    before(start_seq, TCP_SKB_CB(tp->lost_skb_hint)->seq)) 
    13761376                        tp->lost_cnt_hint += pcount; 
    13771377 
     
    13921392} 
    13931393 
     1394/* Shift newly-SACKed bytes from this skb to the immediately previous 
     1395 * already-SACKed sk_buff. Mark the newly-SACKed bytes as such. 
     1396 */ 
    13941397static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, 
    13951398                           struct tcp_sacktag_state *state, 
     
    13991402        struct tcp_sock *tp = tcp_sk(sk); 
    14001403        struct sk_buff *prev = tcp_write_queue_prev(sk, skb); 
     1404        u32 start_seq = TCP_SKB_CB(skb)->seq;   /* start of newly-SACKed */ 
     1405        u32 end_seq = start_seq + shifted;      /* end of newly-SACKed */ 
    14011406 
    14021407        BUG_ON(!pcount); 
    14031408 
    1404         if (skb == tp->lost_skb_hint) 
     1409        /* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */ 
     1410        if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint)) 
    14051411                tp->lost_cnt_hint += pcount; 
    14061412 
     
    14281434        } 
    14291435 
    1430         /* We discard results */ 
    1431         tcp_sacktag_one(skb, sk, state, dup_sack, pcount); 
     1436        /* Adjust counters and hints for the newly sacked sequence range but 
     1437         * discard the return value since prev is already marked. 
     1438         */ 
     1439        tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked, 
     1440                        start_seq, end_seq, dup_sack, pcount); 
    14321441 
    14331442        /* Difference in this won't matter, both ACKed by the same cumul. ACK */ 
     
    16681677 
    16691678                if (in_sack) { 
    1670                         TCP_SKB_CB(skb)->sacked = tcp_sacktag_one(skb, sk, 
    1671                                                                   state, 
    1672                                                                   dup_sack, 
    1673                                                                   tcp_skb_pcount(skb)); 
     1679                        TCP_SKB_CB(skb)->sacked = 
     1680                                tcp_sacktag_one(sk, 
     1681                                                state, 
     1682                                                TCP_SKB_CB(skb)->sacked, 
     1683                                                TCP_SKB_CB(skb)->seq, 
     1684                                                TCP_SKB_CB(skb)->end_seq, 
     1685                                                dup_sack, 
     1686                                                tcp_skb_pcount(skb)); 
    16741687 
    16751688                        if (!before(TCP_SKB_CB(skb)->seq, 
  • src/linux/universal/linux-3.2/net/ipv4/tcp_ipv4.c

    r18364 r18597  
    651651        arg.csumoffset = offsetof(struct tcphdr, check) / 2; 
    652652        arg.flags = (sk && inet_sk(sk)->transparent) ? IP_REPLY_ARG_NOSRCCHECK : 0; 
     653        /* When socket is gone, all binding information is lost. 
     654         * routing might fail in this case. using iif for oif to 
     655         * make sure we can deliver it 
     656         */ 
     657        arg.bound_dev_if = sk ? sk->sk_bound_dev_if : inet_iif(skb); 
    653658 
    654659        net = dev_net(skb_dst(skb)->dev); 
  • src/linux/universal/linux-3.2/net/mac80211/main.c

    r18324 r18597  
    886886                            result); 
    887887 
     888        ieee80211_led_init(local); 
     889 
    888890        rtnl_lock(); 
    889891 
     
    906908 
    907909        rtnl_unlock(); 
    908  
    909         ieee80211_led_init(local); 
    910910 
    911911        local->network_latency_notifier.notifier_call = 
  • src/linux/universal/linux-3.2/net/netfilter/ipvs/ip_vs_core.c

    r18171 r18597  
    233233        unsigned int flags; 
    234234        struct ip_vs_conn_param param; 
     235        const union nf_inet_addr fwmark = { .ip = htonl(svc->fwmark) }; 
    235236        union nf_inet_addr snet;        /* source network of the client, 
    236237                                           after masking */ 
     
    268269                int protocol = iph.protocol; 
    269270                const union nf_inet_addr *vaddr = &iph.daddr; 
    270                 const union nf_inet_addr fwmark = { .ip = htonl(svc->fwmark) }; 
    271271                __be16 vport = 0; 
    272272 
  • src/linux/universal/linux-3.2/net/sched/sch_choke.c

    r18171 r18597  
    226226static inline struct choke_skb_cb *choke_skb_cb(const struct sk_buff *skb) 
    227227{ 
    228         BUILD_BUG_ON(sizeof(skb->cb) < 
    229                 sizeof(struct qdisc_skb_cb) + sizeof(struct choke_skb_cb)); 
     228        qdisc_cb_private_validate(skb, sizeof(struct choke_skb_cb)); 
    230229        return (struct choke_skb_cb *)qdisc_skb_cb(skb)->data; 
    231230} 
  • src/linux/universal/linux-3.2/net/sched/sch_netem.c

    r18171 r18597  
    119119static inline struct netem_skb_cb *netem_skb_cb(struct sk_buff *skb) 
    120120{ 
    121         BUILD_BUG_ON(sizeof(skb->cb) < 
    122                 sizeof(struct qdisc_skb_cb) + sizeof(struct netem_skb_cb)); 
     121        qdisc_cb_private_validate(skb, sizeof(struct netem_skb_cb)); 
    123122        return (struct netem_skb_cb *)qdisc_skb_cb(skb)->data; 
    124123} 
     
    384383 
    385384                __skb_queue_head(&q->qdisc->q, skb); 
    386                 q->qdisc->qstats.backlog += qdisc_pkt_len(skb); 
    387                 q->qdisc->qstats.requeues++; 
     385                sch->qstats.backlog += qdisc_pkt_len(skb); 
     386                sch->qstats.requeues++; 
    388387                ret = NET_XMIT_SUCCESS; 
    389388        } 
  • src/linux/universal/linux-3.2/net/sched/sch_sfb.c

    r18171 r18597  
    9494static inline struct sfb_skb_cb *sfb_skb_cb(const struct sk_buff *skb) 
    9595{ 
    96         BUILD_BUG_ON(sizeof(skb->cb) < 
    97                 sizeof(struct qdisc_skb_cb) + sizeof(struct sfb_skb_cb)); 
     96        qdisc_cb_private_validate(skb, sizeof(struct sfb_skb_cb)); 
    9897        return (struct sfb_skb_cb *)qdisc_skb_cb(skb)->data; 
    9998} 
  • src/linux/universal/linux-3.2/scripts/package/builddeb

    r18171 r18597  
    239239 
    240240# Build header package 
    241 (cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$) 
    242 (cd $srctree; find arch/$SRCARCH/include include scripts -type f >> /tmp/files$$) 
    243 (cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$) 
     241(cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") 
     242(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles") 
     243(cd $objtree; find .config Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") 
    244244destdir=$kernel_headers_dir/usr/src/linux-headers-$version 
    245245mkdir -p "$destdir" 
    246 (cd $srctree; tar -c -f - -T /tmp/files$$) | (cd $destdir; tar -xf -) 
    247 (cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -) 
    248 rm -f /tmp/files$$ /tmp/objfiles$$ 
     246(cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) 
     247(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) 
     248rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" 
    249249arch=$(dpkg --print-architecture) 
    250250 
  • src/linux/universal/linux-3.2/sound/pci/hda/patch_conexant.c

    r18324 r18597  
    19001900                            AC_VERB_SET_UNSOLICITED_ENABLE, 
    19011901                            AC_USRSP_EN | event); 
     1902} 
     1903 
     1904static void cxt5051_init_mic_jack(struct hda_codec *codec, hda_nid_t nid) 
     1905{ 
    19021906        snd_hda_input_jack_add(codec, nid, SND_JACK_MICROPHONE, NULL); 
    19031907        snd_hda_input_jack_report(codec, nid); 
     
    19171921 
    19181922        conexant_init(codec); 
    1919         conexant_init_jacks(codec); 
    19201923 
    19211924        if (spec->auto_mic & AUTO_MIC_PORTB) 
     
    20372040        if (spec->beep_amp) 
    20382041                snd_hda_attach_beep_device(codec, spec->beep_amp); 
     2042 
     2043        conexant_init_jacks(codec); 
     2044        if (spec->auto_mic & AUTO_MIC_PORTB) 
     2045                cxt5051_init_mic_jack(codec, 0x17); 
     2046        if (spec->auto_mic & AUTO_MIC_PORTC) 
     2047                cxt5051_init_mic_jack(codec, 0x18); 
    20392048 
    20402049        return 0; 
  • src/linux/universal/linux-3.2/sound/pci/hda/patch_realtek.c

    r18520 r18597  
    8080}; 
    8181 
     82#define MAX_VOL_NIDS    0x40 
     83 
    8284struct alc_spec { 
    8385        /* codec parameterization */ 
     
    118120        hda_nid_t dig_in_nid;           /* digital-in NID; optional */ 
    119121        hda_nid_t mixer_nid;            /* analog-mixer NID */ 
    120         DECLARE_BITMAP(vol_ctls, 0x20 << 1); 
    121         DECLARE_BITMAP(sw_ctls, 0x20 << 1); 
     122        DECLARE_BITMAP(vol_ctls, MAX_VOL_NIDS << 1); 
     123        DECLARE_BITMAP(sw_ctls, MAX_VOL_NIDS << 1); 
    122124 
    123125        /* capture setup for dynamic dual-adc switch */ 
     
    30693071{ 
    30703072        hda_nid_t nid = get_amp_nid_(data); 
    3071         unsigned int dir = get_amp_direction_(data); 
     3073        unsigned int dir; 
     3074        if (snd_BUG_ON(nid >= MAX_VOL_NIDS)) 
     3075                return 0; 
     3076        dir = get_amp_direction_(data); 
    30723077        return (nid << 1) | dir; 
    30733078} 
     
    42254230{ 
    42264231        if (action == ALC_FIXUP_ACT_PRE_PROBE) { 
     4232                /* fake the connections during parsing the tree */ 
    42274233                hda_nid_t conn1[2] = { 0x0c, 0x0d }; 
    42284234                hda_nid_t conn2[2] = { 0x0e, 0x0f }; 
     
    42314237                snd_hda_override_conn_list(codec, 0x18, 2, conn2); 
    42324238                snd_hda_override_conn_list(codec, 0x1a, 2, conn2); 
     4239        } else if (action == ALC_FIXUP_ACT_PROBE) { 
     4240                /* restore the connections */ 
     4241                hda_nid_t conn[5] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 }; 
     4242                snd_hda_override_conn_list(codec, 0x14, 5, conn); 
     4243                snd_hda_override_conn_list(codec, 0x15, 5, conn); 
     4244                snd_hda_override_conn_list(codec, 0x18, 5, conn); 
     4245                snd_hda_override_conn_list(codec, 0x1a, 5, conn); 
    42334246        } 
    42344247} 
  • src/linux/universal/linux-3.2/sound/soc/codecs/wm8962.c

    r18470 r18597  
    25602560} 
    25612561 
    2562 static const char *st_text[] = { "None", "Right", "Left" }; 
     2562static const char *st_text[] = { "None", "Left", "Right" }; 
    25632563 
    25642564static const struct soc_enum str_enum = 
Note: See TracChangeset for help on using the changeset viewer.