mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
Merge remote-tracking branch 'origin/upstream/linux-linaro-lsk-v3.10-android+android-common-3.10' into develop-3.10
This commit is contained in:
commit
ddcfb41f93
2
Makefile
2
Makefile
|
|
@ -1,6 +1,6 @@
|
|||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 18
|
||||
SUBLEVEL = 19
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include <linux/kdebug.h>
|
||||
#include <asm/pgalloc.h>
|
||||
|
||||
static int handle_vmalloc_fault(struct mm_struct *mm, unsigned long address)
|
||||
static int handle_vmalloc_fault(unsigned long address)
|
||||
{
|
||||
/*
|
||||
* Synchronize this task's top level page-table
|
||||
|
|
@ -26,7 +26,7 @@ static int handle_vmalloc_fault(struct mm_struct *mm, unsigned long address)
|
|||
pud_t *pud, *pud_k;
|
||||
pmd_t *pmd, *pmd_k;
|
||||
|
||||
pgd = pgd_offset_fast(mm, address);
|
||||
pgd = pgd_offset_fast(current->active_mm, address);
|
||||
pgd_k = pgd_offset_k(address);
|
||||
|
||||
if (!pgd_present(*pgd_k))
|
||||
|
|
@ -72,7 +72,7 @@ void do_page_fault(struct pt_regs *regs, int write, unsigned long address,
|
|||
* nothing more.
|
||||
*/
|
||||
if (address >= VMALLOC_START && address <= VMALLOC_END) {
|
||||
ret = handle_vmalloc_fault(mm, address);
|
||||
ret = handle_vmalloc_fault(address);
|
||||
if (unlikely(ret))
|
||||
goto bad_area_nosemaphore;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -690,6 +690,14 @@ config EARLY_PRINTK
|
|||
kernel low-level debugging functions. Add earlyprintk to your
|
||||
kernel parameters to enable this console.
|
||||
|
||||
config EARLY_PRINTK_DIRECT
|
||||
bool "Early printk direct"
|
||||
depends on DEBUG_LL
|
||||
help
|
||||
Say Y here if you want to have an early console using the
|
||||
kernel low-level debugging functions and EARLY_PRINTK is
|
||||
not early enough.
|
||||
|
||||
config OC_ETM
|
||||
bool "On-chip ETM and ETB"
|
||||
depends on ARM_AMBA
|
||||
|
|
|
|||
|
|
@ -195,6 +195,8 @@ common_stext:
|
|||
ldw MEM_PDC_HI(%r0),%r6
|
||||
depd %r6, 31, 32, %r3 /* move to upper word */
|
||||
|
||||
mfctl %cr30,%r6 /* PCX-W2 firmware bug */
|
||||
|
||||
ldo PDC_PSW(%r0),%arg0 /* 21 */
|
||||
ldo PDC_PSW_SET_DEFAULTS(%r0),%arg1 /* 2 */
|
||||
ldo PDC_PSW_WIDE_BIT(%r0),%arg2 /* 2 */
|
||||
|
|
@ -203,6 +205,8 @@ common_stext:
|
|||
copy %r0,%arg3
|
||||
|
||||
stext_pdc_ret:
|
||||
mtctl %r6,%cr30 /* restore task thread info */
|
||||
|
||||
/* restore rfi target address*/
|
||||
ldd TI_TASK-THREAD_SZ_ALGN(%sp), %r10
|
||||
tophys_r1 %r10
|
||||
|
|
|
|||
|
|
@ -40,9 +40,11 @@ static ssize_t exitcode_proc_write(struct file *file,
|
|||
const char __user *buffer, size_t count, loff_t *pos)
|
||||
{
|
||||
char *end, buf[sizeof("nnnnn\0")];
|
||||
size_t size;
|
||||
int tmp;
|
||||
|
||||
if (copy_from_user(buf, buffer, count))
|
||||
size = min(count, sizeof(buf));
|
||||
if (copy_from_user(buf, buffer, size))
|
||||
return -EFAULT;
|
||||
|
||||
tmp = simple_strtol(buf, &end, 0);
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ static int __init early_get_pnodeid(void)
|
|||
break;
|
||||
case UV3_HUB_PART_NUMBER:
|
||||
case UV3_HUB_PART_NUMBER_X:
|
||||
uv_min_hub_revision_id += UV3_HUB_REVISION_BASE - 1;
|
||||
uv_min_hub_revision_id += UV3_HUB_REVISION_BASE;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
|||
|
||||
sp = regs->areg[1];
|
||||
|
||||
if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp)) {
|
||||
if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && sas_ss_flags(sp) == 0) {
|
||||
sp = current->sas_ss_sp + current->sas_ss_size;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1322,14 +1322,14 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc)
|
|||
* should be retried. To be used from EH.
|
||||
*
|
||||
* SCSI midlayer limits the number of retries to scmd->allowed.
|
||||
* scmd->retries is decremented for commands which get retried
|
||||
* scmd->allowed is incremented for commands which get retried
|
||||
* due to unrelated failures (qc->err_mask is zero).
|
||||
*/
|
||||
void ata_eh_qc_retry(struct ata_queued_cmd *qc)
|
||||
{
|
||||
struct scsi_cmnd *scmd = qc->scsicmd;
|
||||
if (!qc->err_mask && scmd->retries)
|
||||
scmd->retries--;
|
||||
if (!qc->err_mask)
|
||||
scmd->allowed++;
|
||||
__ata_eh_qc_complete(qc);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ static int icst_set_rate(struct clk_hw *hw, unsigned long rate,
|
|||
|
||||
vco = icst_hz_to_vco(icst->params, rate);
|
||||
icst->rate = icst_hz(icst->params, vco);
|
||||
vco_set(icst->vcoreg, icst->lockreg, vco);
|
||||
vco_set(icst->lockreg, icst->vcoreg, vco);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include <linux/workqueue.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/slab.h>
|
||||
#include "cpufreq_governor.h"
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/cpufreq_interactive.h>
|
||||
|
|
|
|||
|
|
@ -629,8 +629,8 @@ static int __cpuinit intel_pstate_cpu_exit(struct cpufreq_policy *policy)
|
|||
|
||||
static int __cpuinit intel_pstate_cpu_init(struct cpufreq_policy *policy)
|
||||
{
|
||||
int rc, min_pstate, max_pstate;
|
||||
struct cpudata *cpu;
|
||||
int rc;
|
||||
|
||||
rc = intel_pstate_init_cpu(policy->cpu);
|
||||
if (rc)
|
||||
|
|
@ -644,9 +644,8 @@ static int __cpuinit intel_pstate_cpu_init(struct cpufreq_policy *policy)
|
|||
else
|
||||
policy->policy = CPUFREQ_POLICY_POWERSAVE;
|
||||
|
||||
intel_pstate_get_min_max(cpu, &min_pstate, &max_pstate);
|
||||
policy->min = min_pstate * 100000;
|
||||
policy->max = max_pstate * 100000;
|
||||
policy->min = cpu->pstate.min_pstate * 100000;
|
||||
policy->max = cpu->pstate.turbo_pstate * 100000;
|
||||
|
||||
/* cpuinfo and default policy values */
|
||||
policy->cpuinfo.min_freq = cpu->pstate.min_pstate * 100000;
|
||||
|
|
|
|||
|
|
@ -406,9 +406,16 @@ long drm_ioctl(struct file *filp,
|
|||
cmd = ioctl->cmd_drv;
|
||||
}
|
||||
else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE)) {
|
||||
u32 drv_size;
|
||||
|
||||
ioctl = &drm_ioctls[nr];
|
||||
cmd = ioctl->cmd;
|
||||
|
||||
drv_size = _IOC_SIZE(ioctl->cmd);
|
||||
usize = asize = _IOC_SIZE(cmd);
|
||||
if (drv_size > asize)
|
||||
asize = drv_size;
|
||||
|
||||
cmd = ioctl->cmd;
|
||||
} else
|
||||
goto err_i1;
|
||||
|
||||
|
|
|
|||
|
|
@ -1641,7 +1641,7 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode)
|
|||
* does the same thing and more.
|
||||
*/
|
||||
if ((rdev->family != CHIP_RV710) && (rdev->family != CHIP_RV730) &&
|
||||
(rdev->family != CHIP_RS880))
|
||||
(rdev->family != CHIP_RS780) && (rdev->family != CHIP_RS880))
|
||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0);
|
||||
}
|
||||
if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) {
|
||||
|
|
|
|||
|
|
@ -740,9 +740,17 @@ static void vmw_postclose(struct drm_device *dev,
|
|||
struct vmw_fpriv *vmw_fp;
|
||||
|
||||
vmw_fp = vmw_fpriv(file_priv);
|
||||
ttm_object_file_release(&vmw_fp->tfile);
|
||||
if (vmw_fp->locked_master)
|
||||
|
||||
if (vmw_fp->locked_master) {
|
||||
struct vmw_master *vmaster =
|
||||
vmw_master(vmw_fp->locked_master);
|
||||
|
||||
ttm_lock_set_kill(&vmaster->lock, true, SIGTERM);
|
||||
ttm_vt_unlock(&vmaster->lock);
|
||||
drm_master_put(&vmw_fp->locked_master);
|
||||
}
|
||||
|
||||
ttm_object_file_release(&vmw_fp->tfile);
|
||||
kfree(vmw_fp);
|
||||
}
|
||||
|
||||
|
|
@ -942,14 +950,13 @@ static void vmw_master_drop(struct drm_device *dev,
|
|||
|
||||
vmw_fp->locked_master = drm_master_get(file_priv->master);
|
||||
ret = ttm_vt_lock(&vmaster->lock, false, vmw_fp->tfile);
|
||||
vmw_execbuf_release_pinned_bo(dev_priv);
|
||||
|
||||
if (unlikely((ret != 0))) {
|
||||
DRM_ERROR("Unable to lock TTM at VT switch.\n");
|
||||
drm_master_put(&vmw_fp->locked_master);
|
||||
}
|
||||
|
||||
ttm_lock_set_kill(&vmaster->lock, true, SIGTERM);
|
||||
ttm_lock_set_kill(&vmaster->lock, false, SIGTERM);
|
||||
vmw_execbuf_release_pinned_bo(dev_priv);
|
||||
|
||||
if (!dev_priv->enable_fb) {
|
||||
ret = ttm_bo_evict_mm(&dev_priv->bdev, TTM_PL_VRAM);
|
||||
|
|
|
|||
|
|
@ -970,7 +970,7 @@ void vmw_resource_unreserve(struct vmw_resource *res,
|
|||
if (new_backup)
|
||||
res->backup_offset = new_backup_offset;
|
||||
|
||||
if (!res->func->may_evict)
|
||||
if (!res->func->may_evict || res->id == -1)
|
||||
return;
|
||||
|
||||
write_lock(&dev_priv->resource_lock);
|
||||
|
|
|
|||
|
|
@ -1059,7 +1059,7 @@ static void request_write(struct cached_dev *dc, struct search *s)
|
|||
|
||||
if (bio->bi_rw & REQ_FLUSH) {
|
||||
/* Also need to send a flush to the backing device */
|
||||
struct bio *flush = bio_alloc_bioset(0, GFP_NOIO,
|
||||
struct bio *flush = bio_alloc_bioset(GFP_NOIO, 0,
|
||||
dc->disk.bio_split);
|
||||
|
||||
flush->bi_rw = WRITE_FLUSH;
|
||||
|
|
|
|||
|
|
@ -8072,6 +8072,7 @@ static int md_set_badblocks(struct badblocks *bb, sector_t s, int sectors,
|
|||
u64 *p;
|
||||
int lo, hi;
|
||||
int rv = 1;
|
||||
unsigned long flags;
|
||||
|
||||
if (bb->shift < 0)
|
||||
/* badblocks are disabled */
|
||||
|
|
@ -8086,7 +8087,7 @@ static int md_set_badblocks(struct badblocks *bb, sector_t s, int sectors,
|
|||
sectors = next - s;
|
||||
}
|
||||
|
||||
write_seqlock_irq(&bb->lock);
|
||||
write_seqlock_irqsave(&bb->lock, flags);
|
||||
|
||||
p = bb->page;
|
||||
lo = 0;
|
||||
|
|
@ -8202,7 +8203,7 @@ static int md_set_badblocks(struct badblocks *bb, sector_t s, int sectors,
|
|||
bb->changed = 1;
|
||||
if (!acknowledged)
|
||||
bb->unacked_exist = 1;
|
||||
write_sequnlock_irq(&bb->lock);
|
||||
write_sequnlock_irqrestore(&bb->lock, flags);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1479,6 +1479,7 @@ static int raid1_spare_active(struct mddev *mddev)
|
|||
}
|
||||
}
|
||||
if (rdev
|
||||
&& rdev->recovery_offset == MaxSector
|
||||
&& !test_bit(Faulty, &rdev->flags)
|
||||
&& !test_and_set_bit(In_sync, &rdev->flags)) {
|
||||
count++;
|
||||
|
|
|
|||
|
|
@ -1762,6 +1762,7 @@ static int raid10_spare_active(struct mddev *mddev)
|
|||
}
|
||||
sysfs_notify_dirent_safe(tmp->replacement->sysfs_state);
|
||||
} else if (tmp->rdev
|
||||
&& tmp->rdev->recovery_offset == MaxSector
|
||||
&& !test_bit(Faulty, &tmp->rdev->flags)
|
||||
&& !test_and_set_bit(In_sync, &tmp->rdev->flags)) {
|
||||
count++;
|
||||
|
|
|
|||
|
|
@ -668,6 +668,12 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
|
|||
bi->bi_io_vec[0].bv_len = STRIPE_SIZE;
|
||||
bi->bi_io_vec[0].bv_offset = 0;
|
||||
bi->bi_size = STRIPE_SIZE;
|
||||
/*
|
||||
* If this is discard request, set bi_vcnt 0. We don't
|
||||
* want to confuse SCSI because SCSI will replace payload
|
||||
*/
|
||||
if (rw & REQ_DISCARD)
|
||||
bi->bi_vcnt = 0;
|
||||
if (rrdev)
|
||||
set_bit(R5_DOUBLE_LOCKED, &sh->dev[i].flags);
|
||||
|
||||
|
|
@ -706,6 +712,12 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
|
|||
rbi->bi_io_vec[0].bv_len = STRIPE_SIZE;
|
||||
rbi->bi_io_vec[0].bv_offset = 0;
|
||||
rbi->bi_size = STRIPE_SIZE;
|
||||
/*
|
||||
* If this is discard request, set bi_vcnt 0. We don't
|
||||
* want to confuse SCSI because SCSI will replace payload
|
||||
*/
|
||||
if (rw & REQ_DISCARD)
|
||||
rbi->bi_vcnt = 0;
|
||||
if (conf->mddev->gendisk)
|
||||
trace_block_bio_remap(bdev_get_queue(rbi->bi_bdev),
|
||||
rbi, disk_devt(conf->mddev->gendisk),
|
||||
|
|
@ -2800,6 +2812,14 @@ static void handle_stripe_clean_event(struct r5conf *conf,
|
|||
}
|
||||
/* now that discard is done we can proceed with any sync */
|
||||
clear_bit(STRIPE_DISCARD, &sh->state);
|
||||
/*
|
||||
* SCSI discard will change some bio fields and the stripe has
|
||||
* no updated data, so remove it from hash list and the stripe
|
||||
* will be reinitialized
|
||||
*/
|
||||
spin_lock_irq(&conf->device_lock);
|
||||
remove_hash(sh);
|
||||
spin_unlock_irq(&conf->device_lock);
|
||||
if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state))
|
||||
set_bit(STRIPE_HANDLE, &sh->state);
|
||||
|
||||
|
|
|
|||
|
|
@ -1409,10 +1409,10 @@ static int at91_can_remove(struct platform_device *pdev)
|
|||
|
||||
static const struct platform_device_id at91_can_id_table[] = {
|
||||
{
|
||||
.name = "at91_can",
|
||||
.name = "at91sam9x5_can",
|
||||
.driver_data = (kernel_ulong_t)&at91_at91sam9x5_data,
|
||||
}, {
|
||||
.name = "at91sam9x5_can",
|
||||
.name = "at91_can",
|
||||
.driver_data = (kernel_ulong_t)&at91_at91sam9263_data,
|
||||
}, {
|
||||
/* sentinel */
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
#define FLEXCAN_MCR_BCC BIT(16)
|
||||
#define FLEXCAN_MCR_LPRIO_EN BIT(13)
|
||||
#define FLEXCAN_MCR_AEN BIT(12)
|
||||
#define FLEXCAN_MCR_MAXMB(x) ((x) & 0xf)
|
||||
#define FLEXCAN_MCR_MAXMB(x) ((x) & 0x1f)
|
||||
#define FLEXCAN_MCR_IDAM_A (0 << 8)
|
||||
#define FLEXCAN_MCR_IDAM_B (1 << 8)
|
||||
#define FLEXCAN_MCR_IDAM_C (2 << 8)
|
||||
|
|
@ -745,9 +745,11 @@ static int flexcan_chip_start(struct net_device *dev)
|
|||
*
|
||||
*/
|
||||
reg_mcr = flexcan_read(®s->mcr);
|
||||
reg_mcr &= ~FLEXCAN_MCR_MAXMB(0xff);
|
||||
reg_mcr |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_FEN | FLEXCAN_MCR_HALT |
|
||||
FLEXCAN_MCR_SUPV | FLEXCAN_MCR_WRN_EN |
|
||||
FLEXCAN_MCR_IDAM_C | FLEXCAN_MCR_SRX_DIS;
|
||||
FLEXCAN_MCR_IDAM_C | FLEXCAN_MCR_SRX_DIS |
|
||||
FLEXCAN_MCR_MAXMB(FLEXCAN_TX_BUF_ID);
|
||||
netdev_dbg(dev, "%s: writing mcr=0x%08x", __func__, reg_mcr);
|
||||
flexcan_write(reg_mcr, ®s->mcr);
|
||||
|
||||
|
|
@ -792,6 +794,10 @@ static int flexcan_chip_start(struct net_device *dev)
|
|||
®s->cantxfg[i].can_ctrl);
|
||||
}
|
||||
|
||||
/* Abort any pending TX, mark Mailbox as INACTIVE */
|
||||
flexcan_write(FLEXCAN_MB_CNT_CODE(0x4),
|
||||
®s->cantxfg[FLEXCAN_TX_BUF_ID].can_ctrl);
|
||||
|
||||
/* acceptance mask/acceptance code (accept everything) */
|
||||
flexcan_write(0x0, ®s->rxgmask);
|
||||
flexcan_write(0x0, ®s->rx14mask);
|
||||
|
|
@ -983,9 +989,9 @@ static void unregister_flexcandev(struct net_device *dev)
|
|||
}
|
||||
|
||||
static const struct of_device_id flexcan_of_match[] = {
|
||||
{ .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, },
|
||||
{ .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, },
|
||||
{ .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, },
|
||||
{ .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, },
|
||||
{ .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, },
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, flexcan_of_match);
|
||||
|
|
|
|||
|
|
@ -209,6 +209,7 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
|
|||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
unsigned long flags;
|
||||
int i;
|
||||
|
||||
if (ath_startrecv(sc) != 0) {
|
||||
ath_err(common, "Unable to restart recv logic\n");
|
||||
|
|
@ -236,6 +237,15 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
|
|||
}
|
||||
work:
|
||||
ath_restart_work(sc);
|
||||
|
||||
for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
|
||||
if (!ATH_TXQ_SETUP(sc, i))
|
||||
continue;
|
||||
|
||||
spin_lock_bh(&sc->tx.txq[i].axq_lock);
|
||||
ath_txq_schedule(sc, &sc->tx.txq[i]);
|
||||
spin_unlock_bh(&sc->tx.txq[i].axq_lock);
|
||||
}
|
||||
}
|
||||
|
||||
if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx != 3)
|
||||
|
|
@ -543,21 +553,10 @@ irqreturn_t ath_isr(int irq, void *dev)
|
|||
|
||||
static int ath_reset(struct ath_softc *sc)
|
||||
{
|
||||
int i, r;
|
||||
int r;
|
||||
|
||||
ath9k_ps_wakeup(sc);
|
||||
|
||||
r = ath_reset_internal(sc, NULL);
|
||||
|
||||
for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
|
||||
if (!ATH_TXQ_SETUP(sc, i))
|
||||
continue;
|
||||
|
||||
spin_lock_bh(&sc->tx.txq[i].axq_lock);
|
||||
ath_txq_schedule(sc, &sc->tx.txq[i]);
|
||||
spin_unlock_bh(&sc->tx.txq[i].axq_lock);
|
||||
}
|
||||
|
||||
ath9k_ps_restore(sc);
|
||||
|
||||
return r;
|
||||
|
|
|
|||
|
|
@ -268,6 +268,12 @@ const struct iwl_cfg iwl6035_2agn_cfg = {
|
|||
.ht_params = &iwl6000_ht_params,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6035_2agn_sff_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Ultimate-N 6235 AGN",
|
||||
IWL_DEVICE_6035,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl1030_bgn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
|
||||
IWL_DEVICE_6030,
|
||||
|
|
|
|||
|
|
@ -316,6 +316,7 @@ extern const struct iwl_cfg iwl2000_2bgn_cfg;
|
|||
extern const struct iwl_cfg iwl2000_2bgn_d_cfg;
|
||||
extern const struct iwl_cfg iwl2030_2bgn_cfg;
|
||||
extern const struct iwl_cfg iwl6035_2agn_cfg;
|
||||
extern const struct iwl_cfg iwl6035_2agn_sff_cfg;
|
||||
extern const struct iwl_cfg iwl105_bgn_cfg;
|
||||
extern const struct iwl_cfg iwl105_bgn_d_cfg;
|
||||
extern const struct iwl_cfg iwl135_bgn_cfg;
|
||||
|
|
|
|||
|
|
@ -138,13 +138,16 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
|
|||
|
||||
/* 6x00 Series */
|
||||
{IWL_PCI_DEVICE(0x422B, 0x1101, iwl6000_3agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x422B, 0x1108, iwl6000_3agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x422B, 0x1121, iwl6000_3agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x422B, 0x1128, iwl6000_3agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x422C, 0x1301, iwl6000i_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x422C, 0x1306, iwl6000i_2abg_cfg)},
|
||||
{IWL_PCI_DEVICE(0x422C, 0x1307, iwl6000i_2bg_cfg)},
|
||||
{IWL_PCI_DEVICE(0x422C, 0x1321, iwl6000i_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x422C, 0x1326, iwl6000i_2abg_cfg)},
|
||||
{IWL_PCI_DEVICE(0x4238, 0x1111, iwl6000_3agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x4238, 0x1118, iwl6000_3agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x4239, 0x1311, iwl6000i_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x4239, 0x1316, iwl6000i_2abg_cfg)},
|
||||
|
||||
|
|
@ -152,12 +155,16 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
|
|||
{IWL_PCI_DEVICE(0x0082, 0x1301, iwl6005_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0082, 0x1306, iwl6005_2abg_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0082, 0x1307, iwl6005_2bg_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0082, 0x1308, iwl6005_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0082, 0x1321, iwl6005_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0082, 0x1326, iwl6005_2abg_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0082, 0x1328, iwl6005_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0085, 0x1311, iwl6005_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0085, 0x1318, iwl6005_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0085, 0x1316, iwl6005_2abg_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0082, 0xC020, iwl6005_2agn_sff_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0085, 0xC220, iwl6005_2agn_sff_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0085, 0xC228, iwl6005_2agn_sff_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0082, 0x4820, iwl6005_2agn_d_cfg)},
|
||||
{IWL_PCI_DEVICE(0x0082, 0x1304, iwl6005_2agn_mow1_cfg)},/* low 5GHz active */
|
||||
{IWL_PCI_DEVICE(0x0082, 0x1305, iwl6005_2agn_mow2_cfg)},/* high 5GHz active */
|
||||
|
|
@ -239,8 +246,11 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
|
|||
|
||||
/* 6x35 Series */
|
||||
{IWL_PCI_DEVICE(0x088E, 0x4060, iwl6035_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x088E, 0x406A, iwl6035_2agn_sff_cfg)},
|
||||
{IWL_PCI_DEVICE(0x088F, 0x4260, iwl6035_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x088F, 0x426A, iwl6035_2agn_sff_cfg)},
|
||||
{IWL_PCI_DEVICE(0x088E, 0x4460, iwl6035_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x088E, 0x446A, iwl6035_2agn_sff_cfg)},
|
||||
{IWL_PCI_DEVICE(0x088E, 0x4860, iwl6035_2agn_cfg)},
|
||||
{IWL_PCI_DEVICE(0x088F, 0x5260, iwl6035_2agn_cfg)},
|
||||
|
||||
|
|
|
|||
|
|
@ -270,10 +270,12 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
|
|||
}
|
||||
} while (true);
|
||||
|
||||
if ((adapter->int_status) || IS_CARD_RX_RCVD(adapter))
|
||||
goto process_start;
|
||||
|
||||
spin_lock_irqsave(&adapter->main_proc_lock, flags);
|
||||
if ((adapter->int_status) || IS_CARD_RX_RCVD(adapter)) {
|
||||
spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
|
||||
goto process_start;
|
||||
}
|
||||
|
||||
adapter->mwifiex_processing = false;
|
||||
spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
|
||||
|
||||
|
|
|
|||
|
|
@ -343,7 +343,8 @@ bool rtl92cu_rx_query_desc(struct ieee80211_hw *hw,
|
|||
(bool)GET_RX_DESC_PAGGR(pdesc));
|
||||
rx_status->mactime = GET_RX_DESC_TSFL(pdesc);
|
||||
if (phystatus) {
|
||||
p_drvinfo = (struct rx_fwinfo_92c *)(pdesc + RTL_RX_DESC_SIZE);
|
||||
p_drvinfo = (struct rx_fwinfo_92c *)(skb->data +
|
||||
stats->rx_bufshift);
|
||||
rtl92c_translate_rx_signal_stuff(hw, skb, stats, pdesc,
|
||||
p_drvinfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,8 @@ enum {
|
|||
BWD_HW,
|
||||
};
|
||||
|
||||
static struct dentry *debugfs_dir;
|
||||
|
||||
/* Translate memory window 0,1 to BAR 2,4 */
|
||||
#define MW_TO_BAR(mw) (mw * 2 + 2)
|
||||
|
||||
|
|
@ -531,9 +533,9 @@ static int ntb_xeon_setup(struct ntb_device *ndev)
|
|||
}
|
||||
|
||||
if (val & SNB_PPD_DEV_TYPE)
|
||||
ndev->dev_type = NTB_DEV_DSD;
|
||||
else
|
||||
ndev->dev_type = NTB_DEV_USD;
|
||||
else
|
||||
ndev->dev_type = NTB_DEV_DSD;
|
||||
|
||||
ndev->reg_ofs.pdb = ndev->reg_base + SNB_PDOORBELL_OFFSET;
|
||||
ndev->reg_ofs.pdb_mask = ndev->reg_base + SNB_PDBMSK_OFFSET;
|
||||
|
|
@ -547,7 +549,7 @@ static int ntb_xeon_setup(struct ntb_device *ndev)
|
|||
if (ndev->conn_type == NTB_CONN_B2B) {
|
||||
ndev->reg_ofs.sdb = ndev->reg_base + SNB_B2B_DOORBELL_OFFSET;
|
||||
ndev->reg_ofs.spad_write = ndev->reg_base + SNB_B2B_SPAD_OFFSET;
|
||||
ndev->limits.max_spads = SNB_MAX_SPADS;
|
||||
ndev->limits.max_spads = SNB_MAX_B2B_SPADS;
|
||||
} else {
|
||||
ndev->reg_ofs.sdb = ndev->reg_base + SNB_SDOORBELL_OFFSET;
|
||||
ndev->reg_ofs.spad_write = ndev->reg_base + SNB_SPAD_OFFSET;
|
||||
|
|
@ -644,10 +646,16 @@ static int ntb_device_setup(struct ntb_device *ndev)
|
|||
rc = -ENODEV;
|
||||
}
|
||||
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
dev_info(&ndev->pdev->dev, "Device Type = %s\n",
|
||||
ndev->dev_type == NTB_DEV_USD ? "USD/DSP" : "DSD/USP");
|
||||
|
||||
/* Enable Bus Master and Memory Space on the secondary side */
|
||||
writew(PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER, ndev->reg_ofs.spci_cmd);
|
||||
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ntb_device_free(struct ntb_device *ndev)
|
||||
|
|
@ -992,6 +1000,28 @@ static void ntb_free_callbacks(struct ntb_device *ndev)
|
|||
kfree(ndev->db_cb);
|
||||
}
|
||||
|
||||
static void ntb_setup_debugfs(struct ntb_device *ndev)
|
||||
{
|
||||
if (!debugfs_initialized())
|
||||
return;
|
||||
|
||||
if (!debugfs_dir)
|
||||
debugfs_dir = debugfs_create_dir(KBUILD_MODNAME, NULL);
|
||||
|
||||
ndev->debugfs_dir = debugfs_create_dir(pci_name(ndev->pdev),
|
||||
debugfs_dir);
|
||||
}
|
||||
|
||||
static void ntb_free_debugfs(struct ntb_device *ndev)
|
||||
{
|
||||
debugfs_remove_recursive(ndev->debugfs_dir);
|
||||
|
||||
if (debugfs_dir && simple_empty(debugfs_dir)) {
|
||||
debugfs_remove_recursive(debugfs_dir);
|
||||
debugfs_dir = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static int ntb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
{
|
||||
struct ntb_device *ndev;
|
||||
|
|
@ -1004,6 +1034,7 @@ static int ntb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
ndev->pdev = pdev;
|
||||
ndev->link_status = NTB_LINK_DOWN;
|
||||
pci_set_drvdata(pdev, ndev);
|
||||
ntb_setup_debugfs(ndev);
|
||||
|
||||
rc = pci_enable_device(pdev);
|
||||
if (rc)
|
||||
|
|
@ -1100,6 +1131,7 @@ static int ntb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
err1:
|
||||
pci_disable_device(pdev);
|
||||
err:
|
||||
ntb_free_debugfs(ndev);
|
||||
kfree(ndev);
|
||||
|
||||
dev_err(&pdev->dev, "Error loading %s module\n", KBUILD_MODNAME);
|
||||
|
|
@ -1129,6 +1161,7 @@ static void ntb_pci_remove(struct pci_dev *pdev)
|
|||
iounmap(ndev->reg_base);
|
||||
pci_release_selected_regions(pdev, NTB_BAR_MASK);
|
||||
pci_disable_device(pdev);
|
||||
ntb_free_debugfs(ndev);
|
||||
kfree(ndev);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -127,6 +127,8 @@ struct ntb_device {
|
|||
unsigned char link_status;
|
||||
struct delayed_work hb_timer;
|
||||
unsigned long last_ts;
|
||||
|
||||
struct dentry *debugfs_dir;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -155,6 +157,20 @@ static inline struct pci_dev *ntb_query_pdev(struct ntb_device *ndev)
|
|||
return ndev->pdev;
|
||||
}
|
||||
|
||||
/**
|
||||
* ntb_query_debugfs() - return the debugfs pointer
|
||||
* @ndev: pointer to ntb_device instance
|
||||
*
|
||||
* Given the ntb pointer, return the debugfs directory pointer for the NTB
|
||||
* hardware device
|
||||
*
|
||||
* RETURNS: a pointer to the debugfs directory
|
||||
*/
|
||||
static inline struct dentry *ntb_query_debugfs(struct ntb_device *ndev)
|
||||
{
|
||||
return ndev->debugfs_dir;
|
||||
}
|
||||
|
||||
struct ntb_device *ntb_register_transport(struct pci_dev *pdev,
|
||||
void *transport);
|
||||
void ntb_unregister_transport(struct ntb_device *ndev);
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@
|
|||
#define NTB_LINK_WIDTH_MASK 0x03f0
|
||||
|
||||
#define SNB_MSIX_CNT 4
|
||||
#define SNB_MAX_SPADS 16
|
||||
#define SNB_MAX_COMPAT_SPADS 8
|
||||
#define SNB_MAX_B2B_SPADS 16
|
||||
#define SNB_MAX_COMPAT_SPADS 16
|
||||
/* Reserve the uppermost bit for link interrupt */
|
||||
#define SNB_MAX_DB_BITS 15
|
||||
#define SNB_DB_BITS_PER_VEC 5
|
||||
|
|
|
|||
|
|
@ -157,7 +157,6 @@ struct ntb_transport {
|
|||
bool transport_link;
|
||||
struct delayed_work link_work;
|
||||
struct work_struct link_cleanup;
|
||||
struct dentry *debugfs_dir;
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
@ -824,12 +823,12 @@ static void ntb_transport_init_queue(struct ntb_transport *nt,
|
|||
qp->tx_max_frame = min(transport_mtu, tx_size / 2);
|
||||
qp->tx_max_entry = tx_size / qp->tx_max_frame;
|
||||
|
||||
if (nt->debugfs_dir) {
|
||||
if (ntb_query_debugfs(nt->ndev)) {
|
||||
char debugfs_name[4];
|
||||
|
||||
snprintf(debugfs_name, 4, "qp%d", qp_num);
|
||||
qp->debugfs_dir = debugfs_create_dir(debugfs_name,
|
||||
nt->debugfs_dir);
|
||||
ntb_query_debugfs(nt->ndev));
|
||||
|
||||
qp->debugfs_stats = debugfs_create_file("stats", S_IRUSR,
|
||||
qp->debugfs_dir, qp,
|
||||
|
|
@ -857,11 +856,6 @@ int ntb_transport_init(struct pci_dev *pdev)
|
|||
if (!nt)
|
||||
return -ENOMEM;
|
||||
|
||||
if (debugfs_initialized())
|
||||
nt->debugfs_dir = debugfs_create_dir(KBUILD_MODNAME, NULL);
|
||||
else
|
||||
nt->debugfs_dir = NULL;
|
||||
|
||||
nt->ndev = ntb_register_transport(pdev, nt);
|
||||
if (!nt->ndev) {
|
||||
rc = -EIO;
|
||||
|
|
@ -907,7 +901,6 @@ int ntb_transport_init(struct pci_dev *pdev)
|
|||
err1:
|
||||
ntb_unregister_transport(nt->ndev);
|
||||
err:
|
||||
debugfs_remove_recursive(nt->debugfs_dir);
|
||||
kfree(nt);
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -921,16 +914,16 @@ void ntb_transport_free(void *transport)
|
|||
nt->transport_link = NTB_LINK_DOWN;
|
||||
|
||||
/* verify that all the qp's are freed */
|
||||
for (i = 0; i < nt->max_qps; i++)
|
||||
for (i = 0; i < nt->max_qps; i++) {
|
||||
if (!test_bit(i, &nt->qp_bitmap))
|
||||
ntb_transport_free_queue(&nt->qps[i]);
|
||||
debugfs_remove_recursive(nt->qps[i].debugfs_dir);
|
||||
}
|
||||
|
||||
ntb_bus_remove(nt);
|
||||
|
||||
cancel_delayed_work_sync(&nt->link_work);
|
||||
|
||||
debugfs_remove_recursive(nt->debugfs_dir);
|
||||
|
||||
ntb_unregister_event_callback(nt->ndev);
|
||||
|
||||
pdev = ntb_query_pdev(nt->ndev);
|
||||
|
|
|
|||
|
|
@ -771,6 +771,8 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long
|
|||
static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
|
||||
{
|
||||
struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
|
||||
if (!capable(CAP_SYS_RAWIO))
|
||||
return -EPERM;
|
||||
return aac_compat_do_ioctl(dev, cmd, (unsigned long)arg);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2843,6 +2843,7 @@ static void sd_probe_async(void *data, async_cookie_t cookie)
|
|||
gd->events |= DISK_EVENT_MEDIA_CHANGE;
|
||||
}
|
||||
|
||||
blk_pm_runtime_init(sdp->request_queue, dev);
|
||||
add_disk(gd);
|
||||
if (sdkp->capacity)
|
||||
sd_dif_config_host(sdkp);
|
||||
|
|
@ -2851,7 +2852,6 @@ static void sd_probe_async(void *data, async_cookie_t cookie)
|
|||
|
||||
sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n",
|
||||
sdp->removable ? "removable " : "");
|
||||
blk_pm_runtime_init(sdp->request_queue, dev);
|
||||
scsi_autopm_put_device(sdp);
|
||||
put_device(&sdkp->dev);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,12 @@ struct compat_ion_custom_data {
|
|||
compat_ulong_t arg;
|
||||
};
|
||||
|
||||
#define COMPAT_ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, \
|
||||
struct compat_ion_allocation_data)
|
||||
#define COMPAT_ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
|
||||
#define COMPAT_ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, \
|
||||
struct compat_ion_custom_data)
|
||||
|
||||
static int compat_get_ion_allocation_data(
|
||||
struct compat_ion_allocation_data __user *data32,
|
||||
struct ion_allocation_data __user *data)
|
||||
|
|
@ -105,7 +111,7 @@ long compat_ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
return -ENOTTY;
|
||||
|
||||
switch (cmd) {
|
||||
case ION_IOC_ALLOC:
|
||||
case COMPAT_ION_IOC_ALLOC:
|
||||
{
|
||||
struct compat_ion_allocation_data __user *data32;
|
||||
struct ion_allocation_data __user *data;
|
||||
|
|
@ -119,13 +125,12 @@ long compat_ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
err = compat_get_ion_allocation_data(data32, data);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
ret = filp->f_op->unlocked_ioctl(filp, cmd,
|
||||
ret = filp->f_op->unlocked_ioctl(filp, ION_IOC_ALLOC,
|
||||
(unsigned long)data);
|
||||
err = compat_put_ion_allocation_data(data32, data);
|
||||
return ret ? ret : err;
|
||||
}
|
||||
case ION_IOC_FREE:
|
||||
case COMPAT_ION_IOC_FREE:
|
||||
{
|
||||
struct compat_ion_allocation_data __user *data32;
|
||||
struct ion_allocation_data __user *data;
|
||||
|
|
@ -140,10 +145,10 @@ long compat_ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
return filp->f_op->unlocked_ioctl(filp, cmd,
|
||||
return filp->f_op->unlocked_ioctl(filp, ION_IOC_FREE,
|
||||
(unsigned long)data);
|
||||
}
|
||||
case ION_IOC_CUSTOM: {
|
||||
case COMPAT_ION_IOC_CUSTOM: {
|
||||
struct compat_ion_custom_data __user *data32;
|
||||
struct ion_custom_data __user *data;
|
||||
int err;
|
||||
|
|
@ -157,7 +162,7 @@ long compat_ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
return filp->f_op->unlocked_ioctl(filp, cmd,
|
||||
return filp->f_op->unlocked_ioctl(filp, ION_IOC_CUSTOM,
|
||||
(unsigned long)data);
|
||||
}
|
||||
case ION_IOC_SHARE:
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap,
|
|||
for_each_sg(table->sgl, sg, table->nents, i) {
|
||||
struct page *page = sg_page(sg);
|
||||
|
||||
for (j = 0; j < sg_dma_len(sg) / PAGE_SIZE; j++)
|
||||
for (j = 0; j < sg->length / PAGE_SIZE; j++)
|
||||
buffer->pages[k++] = page++;
|
||||
}
|
||||
|
||||
|
|
@ -383,7 +383,14 @@ static void ion_handle_get(struct ion_handle *handle)
|
|||
|
||||
static int ion_handle_put(struct ion_handle *handle)
|
||||
{
|
||||
return kref_put(&handle->ref, ion_handle_destroy);
|
||||
struct ion_client *client = handle->client;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&client->lock);
|
||||
ret = kref_put(&handle->ref, ion_handle_destroy);
|
||||
mutex_unlock(&client->lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct ion_handle *ion_handle_lookup(struct ion_client *client,
|
||||
|
|
@ -403,14 +410,24 @@ static struct ion_handle *ion_handle_lookup(struct ion_client *client,
|
|||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
static struct ion_handle *ion_uhandle_get(struct ion_client *client, int id)
|
||||
static struct ion_handle *ion_handle_get_by_id(struct ion_client *client,
|
||||
int id)
|
||||
{
|
||||
return idr_find(&client->idr, id);
|
||||
struct ion_handle *handle;
|
||||
|
||||
mutex_lock(&client->lock);
|
||||
handle = idr_find(&client->idr, id);
|
||||
if (handle)
|
||||
ion_handle_get(handle);
|
||||
mutex_unlock(&client->lock);
|
||||
|
||||
return handle ? handle : ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
static bool ion_handle_validate(struct ion_client *client, struct ion_handle *handle)
|
||||
{
|
||||
return (ion_uhandle_get(client, handle->id) == handle);
|
||||
WARN_ON(!mutex_is_locked(&client->lock));
|
||||
return (idr_find(&client->idr, handle->id) == handle);
|
||||
}
|
||||
|
||||
static int ion_handle_add(struct ion_client *client, struct ion_handle *handle)
|
||||
|
|
@ -468,11 +485,11 @@ struct ion_handle *ion_alloc(struct ion_client *client, size_t len,
|
|||
* request of the caller allocate from it. Repeat until allocate has
|
||||
* succeeded or all heaps have been tried
|
||||
*/
|
||||
if (WARN_ON(!len))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
len = PAGE_ALIGN(len);
|
||||
|
||||
if (!len)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
down_read(&dev->lock);
|
||||
plist_for_each_entry(heap, &dev->heaps, node) {
|
||||
/* if the caller didn't specify this heap id */
|
||||
|
|
@ -503,11 +520,11 @@ struct ion_handle *ion_alloc(struct ion_client *client, size_t len,
|
|||
|
||||
mutex_lock(&client->lock);
|
||||
ret = ion_handle_add(client, handle);
|
||||
mutex_unlock(&client->lock);
|
||||
if (ret) {
|
||||
ion_handle_put(handle);
|
||||
handle = ERR_PTR(ret);
|
||||
}
|
||||
mutex_unlock(&client->lock);
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
|
@ -527,8 +544,8 @@ void ion_free(struct ion_client *client, struct ion_handle *handle)
|
|||
mutex_unlock(&client->lock);
|
||||
return;
|
||||
}
|
||||
ion_handle_put(handle);
|
||||
mutex_unlock(&client->lock);
|
||||
ion_handle_put(handle);
|
||||
}
|
||||
EXPORT_SYMBOL(ion_free);
|
||||
|
||||
|
|
@ -823,6 +840,22 @@ static void ion_unmap_dma_buf(struct dma_buf_attachment *attachment,
|
|||
{
|
||||
}
|
||||
|
||||
void ion_pages_sync_for_device(struct device *dev, struct page *page,
|
||||
size_t size, enum dma_data_direction dir)
|
||||
{
|
||||
struct scatterlist sg;
|
||||
|
||||
sg_init_table(&sg, 1);
|
||||
sg_set_page(&sg, page, size, 0);
|
||||
/*
|
||||
* This is not correct - sg_dma_address needs a dma_addr_t that is valid
|
||||
* for the the targeted device, but this works on the currently targeted
|
||||
* hardware.
|
||||
*/
|
||||
sg_dma_address(&sg) = page_to_phys(page);
|
||||
dma_sync_sg_for_device(dev, &sg, 1, dir);
|
||||
}
|
||||
|
||||
struct ion_vma_list {
|
||||
struct list_head list;
|
||||
struct vm_area_struct *vma;
|
||||
|
|
@ -847,7 +880,9 @@ static void ion_buffer_sync_for_device(struct ion_buffer *buffer,
|
|||
struct page *page = buffer->pages[i];
|
||||
|
||||
if (ion_buffer_page_is_dirty(page))
|
||||
__dma_page_cpu_to_dev(page, 0, PAGE_SIZE, dir);
|
||||
ion_pages_sync_for_device(dev, ion_buffer_page(page),
|
||||
PAGE_SIZE, dir);
|
||||
|
||||
ion_buffer_page_clean(buffer->pages + i);
|
||||
}
|
||||
list_for_each_entry(vma_list, &buffer->vmas, list) {
|
||||
|
|
@ -1021,14 +1056,15 @@ struct dma_buf *ion_share_dma_buf(struct ion_client *client,
|
|||
|
||||
mutex_lock(&client->lock);
|
||||
valid_handle = ion_handle_validate(client, handle);
|
||||
mutex_unlock(&client->lock);
|
||||
if (!valid_handle) {
|
||||
WARN(1, "%s: invalid handle passed to share.\n", __func__);
|
||||
mutex_unlock(&client->lock);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
buffer = handle->buffer;
|
||||
ion_buffer_get(buffer);
|
||||
mutex_unlock(&client->lock);
|
||||
|
||||
dmabuf = dma_buf_export(buffer, &dma_buf_ops, buffer->size, O_RDWR);
|
||||
if (IS_ERR(dmabuf)) {
|
||||
ion_buffer_put(buffer);
|
||||
|
|
@ -1081,18 +1117,24 @@ struct ion_handle *ion_import_dma_buf(struct ion_client *client, int fd)
|
|||
handle = ion_handle_lookup(client, buffer);
|
||||
if (!IS_ERR(handle)) {
|
||||
ion_handle_get(handle);
|
||||
mutex_unlock(&client->lock);
|
||||
goto end;
|
||||
}
|
||||
mutex_unlock(&client->lock);
|
||||
|
||||
handle = ion_handle_create(client, buffer);
|
||||
if (IS_ERR(handle))
|
||||
goto end;
|
||||
|
||||
mutex_lock(&client->lock);
|
||||
ret = ion_handle_add(client, handle);
|
||||
mutex_unlock(&client->lock);
|
||||
if (ret) {
|
||||
ion_handle_put(handle);
|
||||
handle = ERR_PTR(ret);
|
||||
}
|
||||
|
||||
end:
|
||||
mutex_unlock(&client->lock);
|
||||
dma_buf_put(dmabuf);
|
||||
return handle;
|
||||
}
|
||||
|
|
@ -1156,12 +1198,11 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
if (copy_from_user(&data, (void __user *)arg,
|
||||
sizeof(struct ion_handle_data)))
|
||||
return -EFAULT;
|
||||
mutex_lock(&client->lock);
|
||||
handle = ion_uhandle_get(client, data.handle);
|
||||
mutex_unlock(&client->lock);
|
||||
if (!handle)
|
||||
return -EINVAL;
|
||||
handle = ion_handle_get_by_id(client, data.handle);
|
||||
if (IS_ERR(handle))
|
||||
return PTR_ERR(handle);
|
||||
ion_free(client, handle);
|
||||
ion_handle_put(handle);
|
||||
break;
|
||||
}
|
||||
case ION_IOC_SHARE:
|
||||
|
|
@ -1172,8 +1213,11 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
|
||||
if (copy_from_user(&data, (void __user *)arg, sizeof(data)))
|
||||
return -EFAULT;
|
||||
handle = ion_uhandle_get(client, data.handle);
|
||||
handle = ion_handle_get_by_id(client, data.handle);
|
||||
if (IS_ERR(handle))
|
||||
return PTR_ERR(handle);
|
||||
data.fd = ion_share_dma_buf_fd(client, handle);
|
||||
ion_handle_put(handle);
|
||||
if (copy_to_user((void __user *)arg, &data, sizeof(data)))
|
||||
return -EFAULT;
|
||||
if (data.fd < 0)
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ static int ion_chunk_heap_allocate(struct ion_heap *heap,
|
|||
sg = table->sgl;
|
||||
for (i -= 1; i >= 0; i--) {
|
||||
gen_pool_free(chunk_heap->pool, page_to_phys(sg_page(sg)),
|
||||
sg_dma_len(sg));
|
||||
sg->length);
|
||||
sg = sg_next(sg);
|
||||
}
|
||||
sg_free_table(table);
|
||||
|
|
@ -106,13 +106,13 @@ static void ion_chunk_heap_free(struct ion_buffer *buffer)
|
|||
|
||||
ion_heap_buffer_zero(buffer);
|
||||
|
||||
if (ion_buffer_cached(buffer))
|
||||
dma_sync_sg_for_device(NULL, table->sgl, table->nents,
|
||||
DMA_BIDIRECTIONAL);
|
||||
|
||||
for_each_sg(table->sgl, sg, table->nents, i) {
|
||||
if (ion_buffer_cached(buffer))
|
||||
arm_dma_ops.sync_single_for_device(NULL,
|
||||
pfn_to_dma(NULL, page_to_pfn(sg_page(sg))),
|
||||
sg_dma_len(sg), DMA_BIDIRECTIONAL);
|
||||
gen_pool_free(chunk_heap->pool, page_to_phys(sg_page(sg)),
|
||||
sg_dma_len(sg));
|
||||
sg->length);
|
||||
}
|
||||
chunk_heap->allocated -= allocated_size;
|
||||
sg_free_table(table);
|
||||
|
|
@ -148,7 +148,6 @@ struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *heap_data)
|
|||
pgprot_t pgprot = pgprot_writecombine(PAGE_KERNEL);
|
||||
int i, ret;
|
||||
|
||||
|
||||
chunk_heap = kzalloc(sizeof(struct ion_chunk_heap), GFP_KERNEL);
|
||||
if (!chunk_heap)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
|
@ -181,9 +180,9 @@ struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *heap_data)
|
|||
}
|
||||
free_vm_area(vm_struct);
|
||||
|
||||
arm_dma_ops.sync_single_for_device(NULL,
|
||||
pfn_to_dma(NULL, page_to_pfn(phys_to_page(heap_data->base))),
|
||||
heap_data->size, DMA_BIDIRECTIONAL);
|
||||
ion_pages_sync_for_device(NULL, pfn_to_page(PFN_DOWN(heap_data->base)),
|
||||
heap_data->size, DMA_BIDIRECTIONAL);
|
||||
|
||||
gen_pool_add(chunk_heap->pool, chunk_heap->base, heap_data->size, -1);
|
||||
chunk_heap->heap.ops = &chunk_heap_ops;
|
||||
chunk_heap->heap.type = ION_HEAP_TYPE_CHUNK;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ void *ion_heap_map_kernel(struct ion_heap *heap,
|
|||
pgprot = pgprot_writecombine(PAGE_KERNEL);
|
||||
|
||||
for_each_sg(table->sgl, sg, table->nents, i) {
|
||||
int npages_this_entry = PAGE_ALIGN(sg_dma_len(sg)) / PAGE_SIZE;
|
||||
int npages_this_entry = PAGE_ALIGN(sg->length) / PAGE_SIZE;
|
||||
struct page *page = sg_page(sg);
|
||||
BUG_ON(i >= npages);
|
||||
for (j = 0; j < npages_this_entry; j++) {
|
||||
|
|
@ -80,14 +80,14 @@ int ion_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer,
|
|||
for_each_sg(table->sgl, sg, table->nents, i) {
|
||||
struct page *page = sg_page(sg);
|
||||
unsigned long remainder = vma->vm_end - addr;
|
||||
unsigned long len = sg_dma_len(sg);
|
||||
unsigned long len = sg->length;
|
||||
|
||||
if (offset >= sg_dma_len(sg)) {
|
||||
offset -= sg_dma_len(sg);
|
||||
if (offset >= sg->length) {
|
||||
offset -= sg->length;
|
||||
continue;
|
||||
} else if (offset) {
|
||||
page += offset / PAGE_SIZE;
|
||||
len = sg_dma_len(sg) - offset;
|
||||
len = sg->length - offset;
|
||||
offset = 0;
|
||||
}
|
||||
len = min(len, remainder);
|
||||
|
|
@ -119,7 +119,7 @@ int ion_heap_buffer_zero(struct ion_buffer *buffer)
|
|||
|
||||
for_each_sg(table->sgl, sg, table->nents, i) {
|
||||
struct page *page = sg_page(sg);
|
||||
unsigned long len = sg_dma_len(sg);
|
||||
unsigned long len = sg->length;
|
||||
|
||||
for (j = 0; j < len / PAGE_SIZE; j++) {
|
||||
struct page *sub_page = page + j;
|
||||
|
|
|
|||
|
|
@ -34,13 +34,8 @@ static void *ion_page_pool_alloc_pages(struct ion_page_pool *pool)
|
|||
|
||||
if (!page)
|
||||
return NULL;
|
||||
/* this is only being used to flush the page for dma,
|
||||
this api is not really suitable for calling from a driver
|
||||
but no better way to flush a page for dma exist at this time */
|
||||
arm_dma_ops.sync_single_for_device(NULL,
|
||||
pfn_to_dma(NULL, page_to_pfn(page)),
|
||||
PAGE_SIZE << pool->order,
|
||||
DMA_BIDIRECTIONAL);
|
||||
ion_pages_sync_for_device(NULL, page, PAGE_SIZE << pool->order,
|
||||
DMA_BIDIRECTIONAL);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
#ifndef _ION_PRIV_H
|
||||
#define _ION_PRIV_H
|
||||
|
||||
#include <linux/dma-direction.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/mm_types.h>
|
||||
#include <linux/mutex.h>
|
||||
|
|
@ -357,4 +358,15 @@ void ion_page_pool_free(struct ion_page_pool *, struct page *);
|
|||
int ion_page_pool_shrink(struct ion_page_pool *pool, gfp_t gfp_mask,
|
||||
int nr_to_scan);
|
||||
|
||||
/**
|
||||
* ion_pages_sync_for_device - cache flush pages for use with the specified
|
||||
* device
|
||||
* @dev: the device the pages will be used with
|
||||
* @page: the first page to be flushed
|
||||
* @size: size in bytes of region to be flushed
|
||||
* @dir: direction of dma transfer
|
||||
*/
|
||||
void ion_pages_sync_for_device(struct device *dev, struct page *page,
|
||||
size_t size, enum dma_data_direction dir);
|
||||
|
||||
#endif /* _ION_PRIV_H */
|
||||
|
|
|
|||
|
|
@ -77,9 +77,8 @@ static struct page *alloc_buffer_page(struct ion_system_heap *heap,
|
|||
page = ion_heap_alloc_pages(buffer, gfp_flags, order);
|
||||
if (!page)
|
||||
return 0;
|
||||
arm_dma_ops.sync_single_for_device(NULL,
|
||||
pfn_to_dma(NULL, page_to_pfn(page)),
|
||||
PAGE_SIZE << order, DMA_BIDIRECTIONAL);
|
||||
ion_pages_sync_for_device(NULL, page, PAGE_SIZE << order,
|
||||
DMA_BIDIRECTIONAL);
|
||||
}
|
||||
if (!page)
|
||||
return 0;
|
||||
|
|
@ -210,7 +209,7 @@ void ion_system_heap_free(struct ion_buffer *buffer)
|
|||
|
||||
for_each_sg(table->sgl, sg, table->nents, i)
|
||||
free_buffer_page(sys_heap, buffer, sg_page(sg),
|
||||
get_order(sg_dma_len(sg)));
|
||||
get_order(sg->length));
|
||||
sg_free_table(table);
|
||||
kfree(table);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1960,6 +1960,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
|
|||
|
||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Called IOCTL_BCM_GET_DEVICE_DRIVER_INFO\n");
|
||||
|
||||
memset(&DevInfo, 0, sizeof(DevInfo));
|
||||
DevInfo.MaxRDMBufferSize = BUFFER_4K;
|
||||
DevInfo.u32DSDStartOffset = EEPROM_CALPARAM_START;
|
||||
DevInfo.u32RxAlignmentCorrection = 0;
|
||||
|
|
|
|||
|
|
@ -153,6 +153,9 @@ static ssize_t oz_cdev_write(struct file *filp, const char __user *buf,
|
|||
struct oz_app_hdr *app_hdr;
|
||||
struct oz_serial_ctx *ctx;
|
||||
|
||||
if (count > sizeof(ei->data) - sizeof(*elt) - sizeof(*app_hdr))
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_bh(&g_cdev.lock);
|
||||
pd = g_cdev.active_pd;
|
||||
if (pd)
|
||||
|
|
|
|||
|
|
@ -1063,7 +1063,7 @@ static int mp_wait_modem_status(struct sb_uart_state *state, unsigned long arg)
|
|||
|
||||
static int mp_get_count(struct sb_uart_state *state, struct serial_icounter_struct *icnt)
|
||||
{
|
||||
struct serial_icounter_struct icount;
|
||||
struct serial_icounter_struct icount = {};
|
||||
struct sb_uart_icount cnow;
|
||||
struct sb_uart_port *port = state->port;
|
||||
|
||||
|
|
|
|||
|
|
@ -570,6 +570,7 @@ int wvlan_uil_put_info(struct uilreq *urq, struct wl_private *lp)
|
|||
ltv_t *pLtv;
|
||||
bool_t ltvAllocated = FALSE;
|
||||
ENCSTRCT sEncryption;
|
||||
size_t len;
|
||||
|
||||
#ifdef USE_WDS
|
||||
hcf_16 hcfPort = HCF_PORT_0;
|
||||
|
|
@ -686,7 +687,8 @@ int wvlan_uil_put_info(struct uilreq *urq, struct wl_private *lp)
|
|||
break;
|
||||
case CFG_CNF_OWN_NAME:
|
||||
memset(lp->StationName, 0, sizeof(lp->StationName));
|
||||
memcpy((void *)lp->StationName, (void *)&pLtv->u.u8[2], (size_t)pLtv->u.u16[0]);
|
||||
len = min_t(size_t, pLtv->u.u16[0], sizeof(lp->StationName));
|
||||
strlcpy(lp->StationName, &pLtv->u.u8[2], len);
|
||||
pLtv->u.u16[0] = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
|
||||
break;
|
||||
case CFG_CNF_LOAD_BALANCING:
|
||||
|
|
@ -1783,6 +1785,7 @@ int wvlan_set_station_nickname(struct net_device *dev,
|
|||
{
|
||||
struct wl_private *lp = wl_priv(dev);
|
||||
unsigned long flags;
|
||||
size_t len;
|
||||
int ret = 0;
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
|
|
@ -1793,8 +1796,8 @@ int wvlan_set_station_nickname(struct net_device *dev,
|
|||
wl_lock(lp, &flags);
|
||||
|
||||
memset(lp->StationName, 0, sizeof(lp->StationName));
|
||||
|
||||
memcpy(lp->StationName, extra, wrqu->data.length);
|
||||
len = min_t(size_t, wrqu->data.length, sizeof(lp->StationName));
|
||||
strlcpy(lp->StationName, extra, len);
|
||||
|
||||
/* Commit the adapter parameters */
|
||||
wl_apply(lp);
|
||||
|
|
|
|||
|
|
@ -134,10 +134,10 @@ static int pscsi_pmode_enable_hba(struct se_hba *hba, unsigned long mode_flag)
|
|||
* pSCSI Host ID and enable for phba mode
|
||||
*/
|
||||
sh = scsi_host_lookup(phv->phv_host_id);
|
||||
if (IS_ERR(sh)) {
|
||||
if (!sh) {
|
||||
pr_err("pSCSI: Unable to locate SCSI Host for"
|
||||
" phv_host_id: %d\n", phv->phv_host_id);
|
||||
return PTR_ERR(sh);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
phv->phv_lld_host = sh;
|
||||
|
|
@ -515,10 +515,10 @@ static int pscsi_configure_device(struct se_device *dev)
|
|||
sh = phv->phv_lld_host;
|
||||
} else {
|
||||
sh = scsi_host_lookup(pdv->pdv_host_id);
|
||||
if (IS_ERR(sh)) {
|
||||
if (!sh) {
|
||||
pr_err("pSCSI: Unable to locate"
|
||||
" pdv_host_id: %d\n", pdv->pdv_host_id);
|
||||
return PTR_ERR(sh);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -630,36 +630,57 @@ static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct vm_operations_struct uio_vm_ops = {
|
||||
static const struct vm_operations_struct uio_logical_vm_ops = {
|
||||
.open = uio_vma_open,
|
||||
.close = uio_vma_close,
|
||||
.fault = uio_vma_fault,
|
||||
};
|
||||
|
||||
static int uio_mmap_logical(struct vm_area_struct *vma)
|
||||
{
|
||||
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
|
||||
vma->vm_ops = &uio_logical_vm_ops;
|
||||
uio_vma_open(vma);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct vm_operations_struct uio_physical_vm_ops = {
|
||||
#ifdef CONFIG_HAVE_IOREMAP_PROT
|
||||
.access = generic_access_phys,
|
||||
#endif
|
||||
};
|
||||
|
||||
static int uio_mmap_physical(struct vm_area_struct *vma)
|
||||
{
|
||||
struct uio_device *idev = vma->vm_private_data;
|
||||
int mi = uio_find_mem_index(vma);
|
||||
struct uio_mem *mem;
|
||||
if (mi < 0)
|
||||
return -EINVAL;
|
||||
mem = idev->info->mem + mi;
|
||||
|
||||
if (vma->vm_end - vma->vm_start > mem->size)
|
||||
return -EINVAL;
|
||||
|
||||
vma->vm_ops = &uio_physical_vm_ops;
|
||||
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
|
||||
|
||||
/*
|
||||
* We cannot use the vm_iomap_memory() helper here,
|
||||
* because vma->vm_pgoff is the map index we looked
|
||||
* up above in uio_find_mem_index(), rather than an
|
||||
* actual page offset into the mmap.
|
||||
*
|
||||
* So we just do the physical mmap without a page
|
||||
* offset.
|
||||
*/
|
||||
return remap_pfn_range(vma,
|
||||
vma->vm_start,
|
||||
idev->info->mem[mi].addr >> PAGE_SHIFT,
|
||||
mem->addr >> PAGE_SHIFT,
|
||||
vma->vm_end - vma->vm_start,
|
||||
vma->vm_page_prot);
|
||||
}
|
||||
|
||||
static int uio_mmap_logical(struct vm_area_struct *vma)
|
||||
{
|
||||
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
|
||||
vma->vm_ops = &uio_vm_ops;
|
||||
uio_vma_open(vma);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int uio_mmap(struct file *filep, struct vm_area_struct *vma)
|
||||
{
|
||||
struct uio_listener *listener = filep->private_data;
|
||||
|
|
|
|||
|
|
@ -97,6 +97,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
/* Alcor Micro Corp. Hub */
|
||||
{ USB_DEVICE(0x058f, 0x9254), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
/* MicroTouch Systems touchscreen */
|
||||
{ USB_DEVICE(0x0596, 0x051e), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
/* appletouch */
|
||||
{ USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
|
|
@ -130,6 +133,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
/* Broadcom BCM92035DGROM BT dongle */
|
||||
{ USB_DEVICE(0x0a5c, 0x2021), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
/* MAYA44USB sound device */
|
||||
{ USB_DEVICE(0x0a92, 0x0091), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
/* Action Semiconductor flash disk */
|
||||
{ USB_DEVICE(0x10d6, 0x2200), .driver_info =
|
||||
USB_QUIRK_STRING_FETCH_255 },
|
||||
|
|
|
|||
|
|
@ -906,6 +906,7 @@ static struct usb_device_id id_table_combined [] = {
|
|||
{ USB_DEVICE(FTDI_VID, FTDI_LUMEL_PD12_PID) },
|
||||
/* Crucible Devices */
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_CT_COMET_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_Z3X_PID) },
|
||||
{ }, /* Optional parameter entry */
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1307,3 +1307,9 @@
|
|||
* Manufacturer: Crucible Technologies
|
||||
*/
|
||||
#define FTDI_CT_COMET_PID 0x8e08
|
||||
|
||||
/*
|
||||
* Product: Z3X Box
|
||||
* Manufacturer: Smart GSM Team
|
||||
*/
|
||||
#define FTDI_Z3X_PID 0x0011
|
||||
|
|
|
|||
|
|
@ -693,6 +693,222 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7C) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x01) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x02) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x03) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x04) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x05) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x06) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0D) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0E) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0F) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x10) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x12) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x13) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x14) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x15) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x17) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x18) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x19) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x1A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x1B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x1C) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x31) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x32) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x33) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x34) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x35) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x36) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3D) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3E) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3F) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x48) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x49) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x4A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x4B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x4C) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x61) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x62) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x63) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x64) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x65) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x66) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6D) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6E) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6F) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x78) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x79) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x7A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x7B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x7C) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x01) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x02) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x03) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x04) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x05) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x06) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0D) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0E) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0F) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x10) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x12) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x13) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x14) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x15) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x17) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x18) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x19) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x1A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x1B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x1C) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x31) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x32) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x33) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x34) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x35) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x36) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3D) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3E) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3F) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x48) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x49) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x4A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x4B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x4C) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x61) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x62) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x63) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x64) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x65) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x66) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6D) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6E) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6F) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x78) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x79) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x7A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x7B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x7C) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x01) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x02) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x03) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x04) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x05) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x06) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0D) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0E) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0F) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x10) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x12) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x13) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x14) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x15) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x17) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x18) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x19) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x1A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x1B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x1C) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x31) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x32) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x33) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x34) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x35) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x36) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3D) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3E) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3F) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x48) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x49) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x4A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x4B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x4C) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x61) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x62) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x63) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x64) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x65) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x66) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6D) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6E) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6F) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x78) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x79) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x7A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x7B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x7C) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x01) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x02) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x03) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x04) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x05) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x06) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0D) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0E) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0F) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x10) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x12) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x13) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x14) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x15) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x17) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x18) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x19) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x1A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x1B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x1C) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x31) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x32) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x33) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x34) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x35) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x36) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3D) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3E) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3F) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x48) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x49) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x4A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x4B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x4C) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x61) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x62) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x63) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x64) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x65) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x66) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6D) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6E) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6F) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x78) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x79) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7A) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7B) },
|
||||
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7C) },
|
||||
|
||||
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) },
|
||||
|
|
|
|||
|
|
@ -211,8 +211,11 @@ static int slave_configure(struct scsi_device *sdev)
|
|||
/*
|
||||
* Many devices do not respond properly to READ_CAPACITY_16.
|
||||
* Tell the SCSI layer to try READ_CAPACITY_10 first.
|
||||
* However some USB 3.0 drive enclosures return capacity
|
||||
* modulo 2TB. Those must use READ_CAPACITY_16
|
||||
*/
|
||||
sdev->try_rc_10_first = 1;
|
||||
if (!(us->fflags & US_FL_NEEDS_CAP16))
|
||||
sdev->try_rc_10_first = 1;
|
||||
|
||||
/* assume SPC3 or latter devices support sense size > 18 */
|
||||
if (sdev->scsi_level > SCSI_SPC_2)
|
||||
|
|
|
|||
|
|
@ -1925,6 +1925,13 @@ UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201,
|
|||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_IGNORE_RESIDUE ),
|
||||
|
||||
/* Reported by Oliver Neukum <oneukum@suse.com> */
|
||||
UNUSUAL_DEV( 0x174c, 0x55aa, 0x0100, 0x0100,
|
||||
"ASMedia",
|
||||
"AS2105",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NEEDS_CAP16),
|
||||
|
||||
/* Reported by Jesse Feddema <jdfeddema@gmail.com> */
|
||||
UNUSUAL_DEV( 0x177f, 0x0400, 0x0000, 0x0000,
|
||||
"Yarvik",
|
||||
|
|
|
|||
|
|
@ -1017,7 +1017,7 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs,
|
|||
if (data_direction != DMA_NONE) {
|
||||
ret = vhost_scsi_map_iov_to_sgl(tv_cmd,
|
||||
&vq->iov[data_first], data_num,
|
||||
data_direction == DMA_TO_DEVICE);
|
||||
data_direction == DMA_FROM_DEVICE);
|
||||
if (unlikely(ret)) {
|
||||
vq_err(vq, "Failed to map iov to sgl\n");
|
||||
goto err_free;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
#define ADF_SHORT_FENCE_TIMEOUT (1 * MSEC_PER_SEC)
|
||||
#define ADF_LONG_FENCE_TIMEOUT (10 * MSEC_PER_SEC)
|
||||
|
||||
static DEFINE_IDR(adf_devices);
|
||||
|
||||
static void adf_fence_wait(struct adf_device *dev, struct sync_fence *fence)
|
||||
{
|
||||
/* sync_fence_wait() dumps debug information on timeout. Experience
|
||||
|
|
@ -455,23 +457,20 @@ static int adf_obj_init(struct adf_obj *obj, enum adf_obj_type type,
|
|||
struct idr *idr, struct adf_device *parent,
|
||||
const struct adf_obj_ops *ops, const char *fmt, va_list args)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (ops && ops->supports_event && !ops->set_event) {
|
||||
pr_err("%s: %s implements supports_event but not set_event\n",
|
||||
__func__, adf_obj_type_str(type));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (idr) {
|
||||
int ret = idr_alloc(idr, obj, 0, 0, GFP_KERNEL);
|
||||
if (ret < 0) {
|
||||
pr_err("%s: allocating object id failed: %d\n",
|
||||
__func__, ret);
|
||||
return ret;
|
||||
}
|
||||
obj->id = ret;
|
||||
} else {
|
||||
obj->id = -1;
|
||||
ret = idr_alloc(idr, obj, 0, 0, GFP_KERNEL);
|
||||
if (ret < 0) {
|
||||
pr_err("%s: allocating object id failed: %d\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
obj->id = ret;
|
||||
|
||||
vscnprintf(obj->name, sizeof(obj->name), fmt, args);
|
||||
|
||||
|
|
@ -498,8 +497,7 @@ static void adf_obj_destroy(struct adf_obj *obj, struct idr *idr)
|
|||
}
|
||||
|
||||
mutex_destroy(&obj->event_lock);
|
||||
if (idr)
|
||||
idr_remove(idr, obj->id);
|
||||
idr_remove(idr, obj->id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -543,8 +541,8 @@ int adf_device_init(struct adf_device *dev, struct device *parent,
|
|||
memset(dev, 0, sizeof(*dev));
|
||||
|
||||
va_start(args, fmt);
|
||||
ret = adf_obj_init(&dev->base, ADF_OBJ_DEVICE, NULL, dev, &ops->base,
|
||||
fmt, args);
|
||||
ret = adf_obj_init(&dev->base, ADF_OBJ_DEVICE, &adf_devices, dev,
|
||||
&ops->base, fmt, args);
|
||||
va_end(args);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
|
@ -612,7 +610,7 @@ void adf_device_destroy(struct adf_device *dev)
|
|||
}
|
||||
mutex_destroy(&dev->post_lock);
|
||||
mutex_destroy(&dev->client_lock);
|
||||
adf_obj_destroy(&dev->base, NULL);
|
||||
adf_obj_destroy(&dev->base, &adf_devices);
|
||||
}
|
||||
EXPORT_SYMBOL(adf_device_destroy);
|
||||
|
||||
|
|
|
|||
|
|
@ -105,11 +105,6 @@ static struct device_attribute adf_interface_attrs[] = {
|
|||
__ATTR_RO(vsync_timestamp),
|
||||
};
|
||||
|
||||
static char *adf_devnode(struct device *dev, umode_t *mode)
|
||||
{
|
||||
return kasprintf(GFP_KERNEL, "adf/%s", dev_name(dev));
|
||||
}
|
||||
|
||||
int adf_obj_sysfs_init(struct adf_obj *obj, struct device *parent)
|
||||
{
|
||||
int ret = idr_alloc(&adf_minors, obj, 0, 0, GFP_KERNEL);
|
||||
|
|
@ -142,7 +137,7 @@ static char *adf_device_devnode(struct device *dev, umode_t *mode,
|
|||
kuid_t *uid, kgid_t *gid)
|
||||
{
|
||||
struct adf_obj *obj = container_of(dev, struct adf_obj, dev);
|
||||
return kasprintf(GFP_KERNEL, "adf/%s/device", obj->name);
|
||||
return kasprintf(GFP_KERNEL, "adf%d", obj->id);
|
||||
}
|
||||
|
||||
static char *adf_interface_devnode(struct device *dev, umode_t *mode,
|
||||
|
|
@ -151,8 +146,8 @@ static char *adf_interface_devnode(struct device *dev, umode_t *mode,
|
|||
struct adf_obj *obj = container_of(dev, struct adf_obj, dev);
|
||||
struct adf_interface *intf = adf_obj_to_interface(obj);
|
||||
struct adf_device *parent = adf_interface_parent(intf);
|
||||
return kasprintf(GFP_KERNEL, "adf/%s/interface%d",
|
||||
parent->base.name, intf->base.id);
|
||||
return kasprintf(GFP_KERNEL, "adf-interface%d.%d",
|
||||
parent->base.id, intf->base.id);
|
||||
}
|
||||
|
||||
static char *adf_overlay_engine_devnode(struct device *dev, umode_t *mode,
|
||||
|
|
@ -161,8 +156,8 @@ static char *adf_overlay_engine_devnode(struct device *dev, umode_t *mode,
|
|||
struct adf_obj *obj = container_of(dev, struct adf_obj, dev);
|
||||
struct adf_overlay_engine *eng = adf_obj_to_overlay_engine(obj);
|
||||
struct adf_device *parent = adf_overlay_engine_parent(eng);
|
||||
return kasprintf(GFP_KERNEL, "adf/%s/overlay-engine%d",
|
||||
parent->base.name, eng->base.id);
|
||||
return kasprintf(GFP_KERNEL, "adf-overlay-engine%d.%d",
|
||||
parent->base.id, eng->base.id);
|
||||
}
|
||||
|
||||
static void adf_noop_release(struct device *dev)
|
||||
|
|
@ -285,7 +280,6 @@ int adf_sysfs_init(void)
|
|||
goto err_chrdev;
|
||||
}
|
||||
|
||||
class->devnode = adf_devnode;
|
||||
adf_class = class;
|
||||
adf_major = ret;
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -361,39 +361,13 @@ void au1100fb_fb_rotate(struct fb_info *fbi, int angle)
|
|||
int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
|
||||
{
|
||||
struct au1100fb_device *fbdev;
|
||||
unsigned int len;
|
||||
unsigned long start=0, off;
|
||||
|
||||
fbdev = to_au1100fb_device(fbi);
|
||||
|
||||
if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
start = fbdev->fb_phys & PAGE_MASK;
|
||||
len = PAGE_ALIGN((start & ~PAGE_MASK) + fbdev->fb_len);
|
||||
|
||||
off = vma->vm_pgoff << PAGE_SHIFT;
|
||||
|
||||
if ((vma->vm_end - vma->vm_start + off) > len) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
off += start;
|
||||
vma->vm_pgoff = off >> PAGE_SHIFT;
|
||||
|
||||
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
|
||||
pgprot_val(vma->vm_page_prot) |= (6 << 9); //CCA=6
|
||||
|
||||
vma->vm_flags |= VM_IO;
|
||||
|
||||
if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
|
||||
vma->vm_end - vma->vm_start,
|
||||
vma->vm_page_prot)) {
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return vm_iomap_memory(vma, fbdev->fb_phys, fbdev->fb_len);
|
||||
}
|
||||
|
||||
static struct fb_ops au1100fb_ops =
|
||||
|
|
|
|||
|
|
@ -1233,38 +1233,13 @@ static int au1200fb_fb_blank(int blank_mode, struct fb_info *fbi)
|
|||
* method mainly to allow the use of the TLB streaming flag (CCA=6)
|
||||
*/
|
||||
static int au1200fb_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||
|
||||
{
|
||||
unsigned int len;
|
||||
unsigned long start=0, off;
|
||||
struct au1200fb_device *fbdev = info->par;
|
||||
|
||||
if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
start = fbdev->fb_phys & PAGE_MASK;
|
||||
len = PAGE_ALIGN((start & ~PAGE_MASK) + fbdev->fb_len);
|
||||
|
||||
off = vma->vm_pgoff << PAGE_SHIFT;
|
||||
|
||||
if ((vma->vm_end - vma->vm_start + off) > len) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
off += start;
|
||||
vma->vm_pgoff = off >> PAGE_SHIFT;
|
||||
|
||||
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
|
||||
pgprot_val(vma->vm_page_prot) |= _CACHE_MASK; /* CCA=7 */
|
||||
|
||||
vma->vm_flags |= VM_IO;
|
||||
|
||||
return io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
|
||||
vma->vm_end - vma->vm_start,
|
||||
vma->vm_page_prot);
|
||||
|
||||
return 0;
|
||||
return vm_iomap_memory(vma, fbdev->fb_phys, fbdev->fb_len);
|
||||
}
|
||||
|
||||
static void set_global(u_int cmd, struct au1200_lcd_global_regs_t *pdata)
|
||||
|
|
|
|||
|
|
@ -1149,7 +1149,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
|
|||
struct ecryptfs_msg_ctx *msg_ctx;
|
||||
struct ecryptfs_message *msg = NULL;
|
||||
char *auth_tok_sig;
|
||||
char *payload;
|
||||
char *payload = NULL;
|
||||
size_t payload_len = 0;
|
||||
int rc;
|
||||
|
||||
|
|
@ -1203,6 +1203,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
|
|||
}
|
||||
out:
|
||||
kfree(msg);
|
||||
kfree(payload);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
|
|||
|
||||
if (insert_inode_locked(inode) < 0) {
|
||||
rc = -EINVAL;
|
||||
goto fail_unlock;
|
||||
goto fail_put;
|
||||
}
|
||||
|
||||
inode_init_owner(inode, parent, mode);
|
||||
|
|
@ -156,7 +156,6 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
|
|||
fail_drop:
|
||||
dquot_drop(inode);
|
||||
inode->i_flags |= S_NOQUOTA;
|
||||
fail_unlock:
|
||||
clear_nlink(inode);
|
||||
unlock_new_inode(inode);
|
||||
fail_put:
|
||||
|
|
|
|||
|
|
@ -328,6 +328,8 @@ loff_t seq_lseek(struct file *file, loff_t offset, int whence)
|
|||
m->read_pos = offset;
|
||||
retval = file->f_pos = offset;
|
||||
}
|
||||
} else {
|
||||
file->f_pos = offset;
|
||||
}
|
||||
}
|
||||
file->f_version = m->version;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,9 @@
|
|||
US_FLAG(INITIAL_READ10, 0x00100000) \
|
||||
/* Initial READ(10) (and others) must be retried */ \
|
||||
US_FLAG(WRITE_CACHE, 0x00200000) \
|
||||
/* Write Cache status is not available */
|
||||
/* Write Cache status is not available */ \
|
||||
US_FLAG(NEEDS_CAP16, 0x00400000)
|
||||
/* cannot handle READ_CAPACITY_10 */
|
||||
|
||||
#define US_FLAG(name, value) US_FL_##name = value ,
|
||||
enum { US_DO_ALL_FLAGS };
|
||||
|
|
|
|||
|
|
@ -223,6 +223,8 @@ struct drm_mode_get_connector {
|
|||
__u32 connection;
|
||||
__u32 mm_width, mm_height; /**< HxW in millimeters */
|
||||
__u32 subpixel;
|
||||
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#define DRM_MODE_PROP_PENDING (1<<0)
|
||||
|
|
|
|||
|
|
@ -1995,7 +1995,7 @@ static int cgroup_attach_task(struct cgroup *cgrp, struct task_struct *tsk,
|
|||
|
||||
/* @tsk either already exited or can't exit until the end */
|
||||
if (tsk->flags & PF_EXITING)
|
||||
continue;
|
||||
goto next;
|
||||
|
||||
/* as per above, nr_threads may decrease, but not increase. */
|
||||
BUG_ON(i >= group_size);
|
||||
|
|
@ -2003,7 +2003,7 @@ static int cgroup_attach_task(struct cgroup *cgrp, struct task_struct *tsk,
|
|||
ent.cgrp = task_cgroup_from_root(tsk, root);
|
||||
/* nothing to do if this task is already in the cgroup */
|
||||
if (ent.cgrp == cgrp)
|
||||
continue;
|
||||
goto next;
|
||||
/*
|
||||
* saying GFP_ATOMIC has no effect here because we did prealloc
|
||||
* earlier, but it's good form to communicate our expectations.
|
||||
|
|
@ -2011,7 +2011,7 @@ static int cgroup_attach_task(struct cgroup *cgrp, struct task_struct *tsk,
|
|||
retval = flex_array_put(group, i, &ent, GFP_ATOMIC);
|
||||
BUG_ON(retval != 0);
|
||||
i++;
|
||||
|
||||
next:
|
||||
if (!threadgroup)
|
||||
break;
|
||||
} while_each_thread(leader, tsk);
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@
|
|||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/printk.h>
|
||||
|
||||
#ifdef CONFIG_EARLY_PRINTK_DIRECT
|
||||
extern void printascii(char *);
|
||||
#endif
|
||||
|
||||
/* printk's without a loglevel use this.. */
|
||||
#define DEFAULT_MESSAGE_LOGLEVEL CONFIG_DEFAULT_MESSAGE_LOGLEVEL
|
||||
|
||||
|
|
@ -1578,6 +1582,10 @@ asmlinkage int vprintk_emit(int facility, int level,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_EARLY_PRINTK_DIRECT
|
||||
printascii(text);
|
||||
#endif
|
||||
|
||||
if (level == -1)
|
||||
level = default_message_loglevel;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,54 @@ static RAW_NOTIFIER_HEAD(clockevents_chain);
|
|||
/* Protection for the above */
|
||||
static DEFINE_RAW_SPINLOCK(clockevents_lock);
|
||||
|
||||
static u64 cev_delta2ns(unsigned long latch, struct clock_event_device *evt,
|
||||
bool ismax)
|
||||
{
|
||||
u64 clc = (u64) latch << evt->shift;
|
||||
u64 rnd;
|
||||
|
||||
if (unlikely(!evt->mult)) {
|
||||
evt->mult = 1;
|
||||
WARN_ON(1);
|
||||
}
|
||||
rnd = (u64) evt->mult - 1;
|
||||
|
||||
/*
|
||||
* Upper bound sanity check. If the backwards conversion is
|
||||
* not equal latch, we know that the above shift overflowed.
|
||||
*/
|
||||
if ((clc >> evt->shift) != (u64)latch)
|
||||
clc = ~0ULL;
|
||||
|
||||
/*
|
||||
* Scaled math oddities:
|
||||
*
|
||||
* For mult <= (1 << shift) we can safely add mult - 1 to
|
||||
* prevent integer rounding loss. So the backwards conversion
|
||||
* from nsec to device ticks will be correct.
|
||||
*
|
||||
* For mult > (1 << shift), i.e. device frequency is > 1GHz we
|
||||
* need to be careful. Adding mult - 1 will result in a value
|
||||
* which when converted back to device ticks can be larger
|
||||
* than latch by up to (mult - 1) >> shift. For the min_delta
|
||||
* calculation we still want to apply this in order to stay
|
||||
* above the minimum device ticks limit. For the upper limit
|
||||
* we would end up with a latch value larger than the upper
|
||||
* limit of the device, so we omit the add to stay below the
|
||||
* device upper boundary.
|
||||
*
|
||||
* Also omit the add if it would overflow the u64 boundary.
|
||||
*/
|
||||
if ((~0ULL - clc > rnd) &&
|
||||
(!ismax || evt->mult <= (1U << evt->shift)))
|
||||
clc += rnd;
|
||||
|
||||
do_div(clc, evt->mult);
|
||||
|
||||
/* Deltas less than 1usec are pointless noise */
|
||||
return clc > 1000 ? clc : 1000;
|
||||
}
|
||||
|
||||
/**
|
||||
* clockevents_delta2ns - Convert a latch value (device ticks) to nanoseconds
|
||||
* @latch: value to convert
|
||||
|
|
@ -39,20 +87,7 @@ static DEFINE_RAW_SPINLOCK(clockevents_lock);
|
|||
*/
|
||||
u64 clockevent_delta2ns(unsigned long latch, struct clock_event_device *evt)
|
||||
{
|
||||
u64 clc = (u64) latch << evt->shift;
|
||||
|
||||
if (unlikely(!evt->mult)) {
|
||||
evt->mult = 1;
|
||||
WARN_ON(1);
|
||||
}
|
||||
|
||||
do_div(clc, evt->mult);
|
||||
if (clc < 1000)
|
||||
clc = 1000;
|
||||
if (clc > KTIME_MAX)
|
||||
clc = KTIME_MAX;
|
||||
|
||||
return clc;
|
||||
return cev_delta2ns(latch, evt, false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(clockevent_delta2ns);
|
||||
|
||||
|
|
@ -317,8 +352,8 @@ void clockevents_config(struct clock_event_device *dev, u32 freq)
|
|||
sec = 600;
|
||||
|
||||
clockevents_calc_mult_shift(dev, freq, sec);
|
||||
dev->min_delta_ns = clockevent_delta2ns(dev->min_delta_ticks, dev);
|
||||
dev->max_delta_ns = clockevent_delta2ns(dev->max_delta_ticks, dev);
|
||||
dev->min_delta_ns = cev_delta2ns(dev->min_delta_ticks, dev, false);
|
||||
dev->max_delta_ns = cev_delta2ns(dev->max_delta_ticks, dev, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -529,7 +529,8 @@ void sg_miter_stop(struct sg_mapping_iter *miter)
|
|||
miter->__offset += miter->consumed;
|
||||
miter->__remaining -= miter->consumed;
|
||||
|
||||
if (miter->__flags & SG_MITER_TO_SG)
|
||||
if ((miter->__flags & SG_MITER_TO_SG) &&
|
||||
!PageSlab(miter->page))
|
||||
flush_kernel_dcache_page(miter->page);
|
||||
|
||||
if (miter->__flags & SG_MITER_ATOMIC) {
|
||||
|
|
|
|||
|
|
@ -1288,64 +1288,90 @@ struct page *follow_trans_huge_pmd(struct vm_area_struct *vma,
|
|||
int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
unsigned long addr, pmd_t pmd, pmd_t *pmdp)
|
||||
{
|
||||
struct anon_vma *anon_vma = NULL;
|
||||
struct page *page;
|
||||
unsigned long haddr = addr & HPAGE_PMD_MASK;
|
||||
int page_nid = -1, this_nid = numa_node_id();
|
||||
int target_nid;
|
||||
int current_nid = -1;
|
||||
bool migrated;
|
||||
bool page_locked;
|
||||
bool migrated = false;
|
||||
|
||||
spin_lock(&mm->page_table_lock);
|
||||
if (unlikely(!pmd_same(pmd, *pmdp)))
|
||||
goto out_unlock;
|
||||
|
||||
page = pmd_page(pmd);
|
||||
get_page(page);
|
||||
current_nid = page_to_nid(page);
|
||||
page_nid = page_to_nid(page);
|
||||
count_vm_numa_event(NUMA_HINT_FAULTS);
|
||||
if (current_nid == numa_node_id())
|
||||
if (page_nid == this_nid)
|
||||
count_vm_numa_event(NUMA_HINT_FAULTS_LOCAL);
|
||||
|
||||
/*
|
||||
* Acquire the page lock to serialise THP migrations but avoid dropping
|
||||
* page_table_lock if at all possible
|
||||
*/
|
||||
page_locked = trylock_page(page);
|
||||
target_nid = mpol_misplaced(page, vma, haddr);
|
||||
if (target_nid == -1) {
|
||||
put_page(page);
|
||||
goto clear_pmdnuma;
|
||||
/* If the page was locked, there are no parallel migrations */
|
||||
if (page_locked)
|
||||
goto clear_pmdnuma;
|
||||
|
||||
/*
|
||||
* Otherwise wait for potential migrations and retry. We do
|
||||
* relock and check_same as the page may no longer be mapped.
|
||||
* As the fault is being retried, do not account for it.
|
||||
*/
|
||||
spin_unlock(&mm->page_table_lock);
|
||||
wait_on_page_locked(page);
|
||||
page_nid = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Acquire the page lock to serialise THP migrations */
|
||||
/* Page is misplaced, serialise migrations and parallel THP splits */
|
||||
get_page(page);
|
||||
spin_unlock(&mm->page_table_lock);
|
||||
lock_page(page);
|
||||
if (!page_locked)
|
||||
lock_page(page);
|
||||
anon_vma = page_lock_anon_vma_read(page);
|
||||
|
||||
/* Confirm the PTE did not while locked */
|
||||
spin_lock(&mm->page_table_lock);
|
||||
if (unlikely(!pmd_same(pmd, *pmdp))) {
|
||||
unlock_page(page);
|
||||
put_page(page);
|
||||
page_nid = -1;
|
||||
goto out_unlock;
|
||||
}
|
||||
spin_unlock(&mm->page_table_lock);
|
||||
|
||||
/* Migrate the THP to the requested node */
|
||||
/*
|
||||
* Migrate the THP to the requested node, returns with page unlocked
|
||||
* and pmd_numa cleared.
|
||||
*/
|
||||
spin_unlock(&mm->page_table_lock);
|
||||
migrated = migrate_misplaced_transhuge_page(mm, vma,
|
||||
pmdp, pmd, addr, page, target_nid);
|
||||
if (!migrated)
|
||||
goto check_same;
|
||||
if (migrated)
|
||||
page_nid = target_nid;
|
||||
|
||||
task_numa_fault(target_nid, HPAGE_PMD_NR, true);
|
||||
return 0;
|
||||
|
||||
check_same:
|
||||
spin_lock(&mm->page_table_lock);
|
||||
if (unlikely(!pmd_same(pmd, *pmdp)))
|
||||
goto out_unlock;
|
||||
goto out;
|
||||
clear_pmdnuma:
|
||||
BUG_ON(!PageLocked(page));
|
||||
pmd = pmd_mknonnuma(pmd);
|
||||
set_pmd_at(mm, haddr, pmdp, pmd);
|
||||
VM_BUG_ON(pmd_numa(*pmdp));
|
||||
update_mmu_cache_pmd(vma, addr, pmdp);
|
||||
unlock_page(page);
|
||||
out_unlock:
|
||||
spin_unlock(&mm->page_table_lock);
|
||||
if (current_nid != -1)
|
||||
task_numa_fault(current_nid, HPAGE_PMD_NR, false);
|
||||
|
||||
out:
|
||||
if (anon_vma)
|
||||
page_unlock_anon_vma_read(anon_vma);
|
||||
|
||||
if (page_nid != -1)
|
||||
task_numa_fault(page_nid, HPAGE_PMD_NR, migrated);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
54
mm/memory.c
54
mm/memory.c
|
|
@ -3525,12 +3525,12 @@ static int do_nonlinear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
}
|
||||
|
||||
int numa_migrate_prep(struct page *page, struct vm_area_struct *vma,
|
||||
unsigned long addr, int current_nid)
|
||||
unsigned long addr, int page_nid)
|
||||
{
|
||||
get_page(page);
|
||||
|
||||
count_vm_numa_event(NUMA_HINT_FAULTS);
|
||||
if (current_nid == numa_node_id())
|
||||
if (page_nid == numa_node_id())
|
||||
count_vm_numa_event(NUMA_HINT_FAULTS_LOCAL);
|
||||
|
||||
return mpol_misplaced(page, vma, addr);
|
||||
|
|
@ -3541,7 +3541,7 @@ int do_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
{
|
||||
struct page *page = NULL;
|
||||
spinlock_t *ptl;
|
||||
int current_nid = -1;
|
||||
int page_nid = -1;
|
||||
int target_nid;
|
||||
bool migrated = false;
|
||||
|
||||
|
|
@ -3571,15 +3571,10 @@ int do_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
return 0;
|
||||
}
|
||||
|
||||
current_nid = page_to_nid(page);
|
||||
target_nid = numa_migrate_prep(page, vma, addr, current_nid);
|
||||
page_nid = page_to_nid(page);
|
||||
target_nid = numa_migrate_prep(page, vma, addr, page_nid);
|
||||
pte_unmap_unlock(ptep, ptl);
|
||||
if (target_nid == -1) {
|
||||
/*
|
||||
* Account for the fault against the current node if it not
|
||||
* being replaced regardless of where the page is located.
|
||||
*/
|
||||
current_nid = numa_node_id();
|
||||
put_page(page);
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -3587,11 +3582,11 @@ int do_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
/* Migrate to the requested node */
|
||||
migrated = migrate_misplaced_page(page, target_nid);
|
||||
if (migrated)
|
||||
current_nid = target_nid;
|
||||
page_nid = target_nid;
|
||||
|
||||
out:
|
||||
if (current_nid != -1)
|
||||
task_numa_fault(current_nid, 1, migrated);
|
||||
if (page_nid != -1)
|
||||
task_numa_fault(page_nid, 1, migrated);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -3606,7 +3601,6 @@ static int do_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
unsigned long offset;
|
||||
spinlock_t *ptl;
|
||||
bool numa = false;
|
||||
int local_nid = numa_node_id();
|
||||
|
||||
spin_lock(&mm->page_table_lock);
|
||||
pmd = *pmdp;
|
||||
|
|
@ -3629,9 +3623,10 @@ static int do_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
for (addr = _addr + offset; addr < _addr + PMD_SIZE; pte++, addr += PAGE_SIZE) {
|
||||
pte_t pteval = *pte;
|
||||
struct page *page;
|
||||
int curr_nid = local_nid;
|
||||
int page_nid = -1;
|
||||
int target_nid;
|
||||
bool migrated;
|
||||
bool migrated = false;
|
||||
|
||||
if (!pte_present(pteval))
|
||||
continue;
|
||||
if (!pte_numa(pteval))
|
||||
|
|
@ -3653,25 +3648,19 @@ static int do_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
if (unlikely(page_mapcount(page) != 1))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Note that the NUMA fault is later accounted to either
|
||||
* the node that is currently running or where the page is
|
||||
* migrated to.
|
||||
*/
|
||||
curr_nid = local_nid;
|
||||
target_nid = numa_migrate_prep(page, vma, addr,
|
||||
page_to_nid(page));
|
||||
if (target_nid == -1) {
|
||||
page_nid = page_to_nid(page);
|
||||
target_nid = numa_migrate_prep(page, vma, addr, page_nid);
|
||||
pte_unmap_unlock(pte, ptl);
|
||||
if (target_nid != -1) {
|
||||
migrated = migrate_misplaced_page(page, target_nid);
|
||||
if (migrated)
|
||||
page_nid = target_nid;
|
||||
} else {
|
||||
put_page(page);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Migrate to the requested node */
|
||||
pte_unmap_unlock(pte, ptl);
|
||||
migrated = migrate_misplaced_page(page, target_nid);
|
||||
if (migrated)
|
||||
curr_nid = target_nid;
|
||||
task_numa_fault(curr_nid, 1, migrated);
|
||||
if (page_nid != -1)
|
||||
task_numa_fault(page_nid, 1, migrated);
|
||||
|
||||
pte = pte_offset_map_lock(mm, pmdp, addr, &ptl);
|
||||
}
|
||||
|
|
@ -4074,6 +4063,7 @@ int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
|
|||
|
||||
return len;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(generic_access_phys);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
|||
19
mm/migrate.c
19
mm/migrate.c
|
|
@ -1710,12 +1710,12 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
|
|||
unlock_page(new_page);
|
||||
put_page(new_page); /* Free it */
|
||||
|
||||
unlock_page(page);
|
||||
/* Retake the callers reference and putback on LRU */
|
||||
get_page(page);
|
||||
putback_lru_page(page);
|
||||
|
||||
count_vm_events(PGMIGRATE_FAIL, HPAGE_PMD_NR);
|
||||
isolated = 0;
|
||||
goto out;
|
||||
mod_zone_page_state(page_zone(page),
|
||||
NR_ISOLATED_ANON + page_lru, -HPAGE_PMD_NR);
|
||||
goto out_fail;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1732,9 +1732,9 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
|
|||
entry = maybe_pmd_mkwrite(pmd_mkdirty(entry), vma);
|
||||
entry = pmd_mkhuge(entry);
|
||||
|
||||
page_add_new_anon_rmap(new_page, vma, haddr);
|
||||
|
||||
pmdp_clear_flush(vma, haddr, pmd);
|
||||
set_pmd_at(mm, haddr, pmd, entry);
|
||||
page_add_new_anon_rmap(new_page, vma, haddr);
|
||||
update_mmu_cache_pmd(vma, address, &entry);
|
||||
page_remove_rmap(page);
|
||||
/*
|
||||
|
|
@ -1753,7 +1753,6 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
|
|||
count_vm_events(PGMIGRATE_SUCCESS, HPAGE_PMD_NR);
|
||||
count_vm_numa_events(NUMA_PAGE_MIGRATE, HPAGE_PMD_NR);
|
||||
|
||||
out:
|
||||
mod_zone_page_state(page_zone(page),
|
||||
NR_ISOLATED_ANON + page_lru,
|
||||
-HPAGE_PMD_NR);
|
||||
|
|
@ -1762,6 +1761,10 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
|
|||
out_fail:
|
||||
count_vm_events(PGMIGRATE_FAIL, HPAGE_PMD_NR);
|
||||
out_dropref:
|
||||
entry = pmd_mknonnuma(entry);
|
||||
set_pmd_at(mm, haddr, pmd, entry);
|
||||
update_mmu_cache_pmd(vma, address, &entry);
|
||||
|
||||
unlock_page(page);
|
||||
put_page(page);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ static inline unsigned long change_pmd_range(struct vm_area_struct *vma,
|
|||
split_huge_page_pmd(vma, addr, pmd);
|
||||
else if (change_huge_pmd(vma, pmd, addr, newprot,
|
||||
prot_numa)) {
|
||||
pages += HPAGE_PMD_NR;
|
||||
pages++;
|
||||
continue;
|
||||
}
|
||||
/* fall through */
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ int walk_page_range(unsigned long addr, unsigned long end,
|
|||
if (err)
|
||||
break;
|
||||
pgd++;
|
||||
} while (addr = next, addr != end);
|
||||
} while (addr = next, addr < end);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,12 +388,12 @@ static struct vmap_area *alloc_vmap_area(unsigned long size,
|
|||
addr = ALIGN(first->va_end, align);
|
||||
if (addr < vstart)
|
||||
goto nocache;
|
||||
if (addr + size - 1 < addr)
|
||||
if (addr + size < addr)
|
||||
goto overflow;
|
||||
|
||||
} else {
|
||||
addr = ALIGN(vstart, align);
|
||||
if (addr + size - 1 < addr)
|
||||
if (addr + size < addr)
|
||||
goto overflow;
|
||||
|
||||
n = vmap_area_root.rb_node;
|
||||
|
|
@ -420,7 +420,7 @@ static struct vmap_area *alloc_vmap_area(unsigned long size,
|
|||
if (addr + cached_hole_size < first->va_start)
|
||||
cached_hole_size = first->va_start - addr;
|
||||
addr = ALIGN(first->va_end, align);
|
||||
if (addr + size - 1 < addr)
|
||||
if (addr + size < addr)
|
||||
goto overflow;
|
||||
|
||||
if (list_is_last(&first->list, &vmap_area_list))
|
||||
|
|
|
|||
|
|
@ -3315,7 +3315,7 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev,
|
|||
return -EINVAL;
|
||||
}
|
||||
band = chanctx_conf->def.chan->band;
|
||||
sta = sta_info_get(sdata, peer);
|
||||
sta = sta_info_get_bss(sdata, peer);
|
||||
if (sta) {
|
||||
qos = test_sta_flag(sta, WLAN_STA_WME);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -842,6 +842,8 @@ struct tpt_led_trigger {
|
|||
* that the scan completed.
|
||||
* @SCAN_ABORTED: Set for our scan work function when the driver reported
|
||||
* a scan complete for an aborted scan.
|
||||
* @SCAN_HW_CANCELLED: Set for our scan work function when the scan is being
|
||||
* cancelled.
|
||||
*/
|
||||
enum {
|
||||
SCAN_SW_SCANNING,
|
||||
|
|
@ -849,6 +851,7 @@ enum {
|
|||
SCAN_ONCHANNEL_SCANNING,
|
||||
SCAN_COMPLETED,
|
||||
SCAN_ABORTED,
|
||||
SCAN_HW_CANCELLED,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3002,6 +3002,9 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx,
|
|||
case NL80211_IFTYPE_ADHOC:
|
||||
if (!bssid)
|
||||
return 0;
|
||||
if (ether_addr_equal(sdata->vif.addr, hdr->addr2) ||
|
||||
ether_addr_equal(sdata->u.ibss.bssid, hdr->addr2))
|
||||
return 0;
|
||||
if (ieee80211_is_beacon(hdr->frame_control)) {
|
||||
return 1;
|
||||
} else if (!ieee80211_bssid_match(bssid, sdata->u.ibss.bssid)) {
|
||||
|
|
|
|||
|
|
@ -202,6 +202,9 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local)
|
|||
enum ieee80211_band band;
|
||||
int i, ielen, n_chans;
|
||||
|
||||
if (test_bit(SCAN_HW_CANCELLED, &local->scanning))
|
||||
return false;
|
||||
|
||||
do {
|
||||
if (local->hw_scan_band == IEEE80211_NUM_BANDS)
|
||||
return false;
|
||||
|
|
@ -878,7 +881,23 @@ void ieee80211_scan_cancel(struct ieee80211_local *local)
|
|||
if (!local->scan_req)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* We have a scan running and the driver already reported completion,
|
||||
* but the worker hasn't run yet or is stuck on the mutex - mark it as
|
||||
* cancelled.
|
||||
*/
|
||||
if (test_bit(SCAN_HW_SCANNING, &local->scanning) &&
|
||||
test_bit(SCAN_COMPLETED, &local->scanning)) {
|
||||
set_bit(SCAN_HW_CANCELLED, &local->scanning);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (test_bit(SCAN_HW_SCANNING, &local->scanning)) {
|
||||
/*
|
||||
* Make sure that __ieee80211_scan_completed doesn't trigger a
|
||||
* scan on another band.
|
||||
*/
|
||||
set_bit(SCAN_HW_CANCELLED, &local->scanning);
|
||||
if (local->ops->cancel_hw_scan)
|
||||
drv_cancel_hw_scan(local,
|
||||
rcu_dereference_protected(local->scan_sdata,
|
||||
|
|
|
|||
|
|
@ -180,6 +180,9 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
|
|||
struct ieee80211_local *local = sta->local;
|
||||
struct ieee80211_sub_if_data *sdata = sta->sdata;
|
||||
|
||||
if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
|
||||
sta->last_rx = jiffies;
|
||||
|
||||
if (ieee80211_is_data_qos(mgmt->frame_control)) {
|
||||
struct ieee80211_hdr *hdr = (void *) skb->data;
|
||||
u8 *qc = ieee80211_get_qos_ctl(hdr);
|
||||
|
|
|
|||
|
|
@ -1100,7 +1100,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
|
|||
tx->sta = rcu_dereference(sdata->u.vlan.sta);
|
||||
if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr)
|
||||
return TX_DROP;
|
||||
} else if (info->flags & IEEE80211_TX_CTL_INJECTED ||
|
||||
} else if (info->flags & (IEEE80211_TX_CTL_INJECTED |
|
||||
IEEE80211_TX_INTFL_NL80211_FRAME_TX) ||
|
||||
tx->sdata->control_port_protocol == tx->skb->protocol) {
|
||||
tx->sta = sta_info_get_bss(sdata, hdr->addr1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2174,6 +2174,10 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local,
|
|||
}
|
||||
|
||||
rate = cfg80211_calculate_bitrate(&ri);
|
||||
if (WARN_ONCE(!rate,
|
||||
"Invalid bitrate: flags=0x%x, idx=%d, vht_nss=%d\n",
|
||||
status->flag, status->rate_idx, status->vht_nss))
|
||||
return 0;
|
||||
|
||||
/* rewind from end of MPDU */
|
||||
if (status->flag & RX_FLAG_MACTIME_END)
|
||||
|
|
|
|||
|
|
@ -269,6 +269,8 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
|
|||
if (chan->flags & IEEE80211_CHAN_DISABLED)
|
||||
continue;
|
||||
wdev->wext.ibss.chandef.chan = chan;
|
||||
wdev->wext.ibss.chandef.center_freq1 =
|
||||
chan->center_freq;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -353,6 +355,7 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
|
|||
if (chan) {
|
||||
wdev->wext.ibss.chandef.chan = chan;
|
||||
wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
|
||||
wdev->wext.ibss.chandef.center_freq1 = freq;
|
||||
wdev->wext.ibss.channel_fixed = true;
|
||||
} else {
|
||||
/* cfg80211_ibss_wext_join will pick one if needed */
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ static struct sym_entry *table;
|
|||
static unsigned int table_size, table_cnt;
|
||||
static int all_symbols = 0;
|
||||
static char symbol_prefix_char = '\0';
|
||||
static unsigned long long kernel_start_addr = 0;
|
||||
|
||||
int token_profit[0x10000];
|
||||
|
||||
|
|
@ -65,7 +66,10 @@ unsigned char best_table_len[256];
|
|||
|
||||
static void usage(void)
|
||||
{
|
||||
fprintf(stderr, "Usage: kallsyms [--all-symbols] [--symbol-prefix=<prefix char>] < in.map > out.S\n");
|
||||
fprintf(stderr, "Usage: kallsyms [--all-symbols] "
|
||||
"[--symbol-prefix=<prefix char>] "
|
||||
"[--page-offset=<CONFIG_PAGE_OFFSET>] "
|
||||
"< in.map > out.S\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
@ -194,6 +198,9 @@ static int symbol_valid(struct sym_entry *s)
|
|||
int i;
|
||||
int offset = 1;
|
||||
|
||||
if (s->addr < kernel_start_addr)
|
||||
return 0;
|
||||
|
||||
/* skip prefix char */
|
||||
if (symbol_prefix_char && *(s->sym + 1) == symbol_prefix_char)
|
||||
offset++;
|
||||
|
|
@ -646,6 +653,9 @@ int main(int argc, char **argv)
|
|||
if ((*p == '"' && *(p+2) == '"') || (*p == '\'' && *(p+2) == '\''))
|
||||
p++;
|
||||
symbol_prefix_char = *p;
|
||||
} else if (strncmp(argv[i], "--page-offset=", 14) == 0) {
|
||||
const char *p = &argv[i][14];
|
||||
kernel_start_addr = strtoull(p, NULL, 16);
|
||||
} else
|
||||
usage();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ kallsyms()
|
|||
kallsymopt="${kallsymopt} --all-symbols"
|
||||
fi
|
||||
|
||||
kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET"
|
||||
|
||||
local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \
|
||||
${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ static struct snd_pcm *snd_pcm_get(struct snd_card *card, int device)
|
|||
struct snd_pcm *pcm;
|
||||
|
||||
list_for_each_entry(pcm, &snd_pcm_devices, list) {
|
||||
if (pcm->internal)
|
||||
continue;
|
||||
if (pcm->card == card && pcm->device == device)
|
||||
return pcm;
|
||||
}
|
||||
|
|
@ -60,6 +62,8 @@ static int snd_pcm_next(struct snd_card *card, int device)
|
|||
struct snd_pcm *pcm;
|
||||
|
||||
list_for_each_entry(pcm, &snd_pcm_devices, list) {
|
||||
if (pcm->internal)
|
||||
continue;
|
||||
if (pcm->card == card && pcm->device > device)
|
||||
return pcm->device;
|
||||
else if (pcm->card->number > card->number)
|
||||
|
|
|
|||
|
|
@ -4789,8 +4789,8 @@ static void hda_power_work(struct work_struct *work)
|
|||
spin_unlock(&codec->power_lock);
|
||||
|
||||
state = hda_call_codec_suspend(codec, true);
|
||||
codec->pm_down_notified = 0;
|
||||
if (!bus->power_keep_link_on && (state & AC_PWRST_CLK_STOP_OK)) {
|
||||
if (!codec->pm_down_notified &&
|
||||
!bus->power_keep_link_on && (state & AC_PWRST_CLK_STOP_OK)) {
|
||||
codec->pm_down_notified = 1;
|
||||
hda_call_pm_notify(bus, false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4383,9 +4383,11 @@ int snd_hda_gen_build_controls(struct hda_codec *codec)
|
|||
true, &spec->vmaster_mute.sw_kctl);
|
||||
if (err < 0)
|
||||
return err;
|
||||
if (spec->vmaster_mute.hook)
|
||||
if (spec->vmaster_mute.hook) {
|
||||
snd_hda_add_vmaster_hook(codec, &spec->vmaster_mute,
|
||||
spec->vmaster_mute_enum);
|
||||
snd_hda_sync_vmaster_hook(&spec->vmaster_mute);
|
||||
}
|
||||
}
|
||||
|
||||
free_kctls(spec); /* no longer needed */
|
||||
|
|
|
|||
|
|
@ -4253,6 +4253,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
|
|||
SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
|
||||
SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_ASUS_MODE4),
|
||||
SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_ASUS_MODE4),
|
||||
SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
|
||||
SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2),
|
||||
SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
|
||||
|
|
|
|||
|
|
@ -530,6 +530,7 @@ static int hp_supply_event(struct snd_soc_dapm_widget *w,
|
|||
hubs->hp_startup_mode);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case SND_SOC_DAPM_PRE_PMD:
|
||||
snd_soc_update_bits(codec, WM8993_CHARGE_PUMP_1,
|
||||
|
|
|
|||
|
|
@ -1797,7 +1797,7 @@ static ssize_t dapm_widget_power_read_file(struct file *file,
|
|||
w->active ? "active" : "inactive");
|
||||
|
||||
list_for_each_entry(p, &w->sources, list_sink) {
|
||||
if (p->connected && !p->connected(w, p->sink))
|
||||
if (p->connected && !p->connected(w, p->source))
|
||||
continue;
|
||||
|
||||
if (p->connect)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user