This is the 5.4.89 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl/99ZgACgkQONu9yGCS aT609BAAg3AcT6t2WQFfY0LZwaT4u8Y7mg7gx2995vDhzWOei/o6AasogDpnv+ey fDIu0NwMTK73K5bDSas5pWirEi/+eCk1S0xxg8rLkHgHOYJD7z6Ktq5DlNv5nfNN KUl1jnEcZznk4Y3ogxDwJTHmXVCRZAlckn46YiCpYKZeZbA/IqHlzzle9Dwd3eLN ElZN6Vdq5vagJOxTuFAEdHLy8mxIWySN0Kh6Ac0VKaaxLbE3GsXXEUtin7nLe/nj 19/98ije7vQaTUNdqMSu5FIQsZGHg+XNji7EGLvmF/nITEUdwzIWuMsP5/ArVpJn rjnmz2J3IuQix7X08PGcde/0T1scXxnspOrQyVnMgGEl9J/5NpewrIItGZGt3H0u /fTvohGXx1nvaavDii3u7/y+s038v9HeP9Br6ISlprwZP8Pg4arm0sPQ2aHbPQ1v GQZSqat6hOm8DvpkLr0mO4w/+RYgRaVLRCIf8jWoStPvS/pm4APaDvYPAjZdqPRm xPSOa9Irvg0UaiwIxiXJdPBvFELvUHexpSxTNGQWsXdNHfMROnK+B4c3MScbDVt8 vevIh3PVYqENW5Nsn7mSwdWPRzmNaouW/2fWqYjCWxhaSGfqweOz/JawHrwuTTQj GRdTgEn9w6o3uj8hQIt7c0+QfGLSvZlHfyvl7JYk/cV6SoofI40= =0wHl -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEdQaENiSDAlGTDEbB7G51OISzHs0FAl/+FjUACgkQ7G51OISz Hs1oTxAAnXqdA+W4GsMTJYy8tN5PPGFh2yKAyrgfpsHVF8iHHWSDPZXD4x4w8p18 NOk5lzfGYQD9KeJfqQmW3exvdSRzOBbff1F+tTtSwxG5VHTvZQeqqHCPO7ba9e5O b4A+lv3t4Oy+8F88NSdY32KEA9y6W1mZ3O4sojB1R48yBckIRGSbYZgLq7Zcd/2B /pEuDeG1PkXmz+vXKhNKIohfddXngxcv5B41bv+YuyzBdAcs44sks9tEh9ZzhppC zRal9uVMlIIF3OJSIYZ9mQDp70zZuirmN/Jf/4RQ2vNqBwvR1KbLH4EyCvFRZmDk 7xrGBTLn99hM4Rw62JWzEWMCMD8BRfZegsBtXNO2UEg0VWOZONPDRlo2RVKbOVDm cFykPWCs32PuFa5Ys75clt2uL3Y2sw9SnAQUOLiMoWTdccsCP9HCXvMQPs+QlVWQ Y+W96naQzbt3Ri55t+mQ+esKmq65KEq1qdbU1dfd412Y+gME/2DCEdHSLL3vwu1M aeYBJOre93xKLIwZ0izmPuDnVI5FHqBzd6ZLGHEvnra0/uJuDJ3j2J7L9NPFL0D9 s0+WjZImfh3E8kYDAJgCEftk3UadxewLtF6Y65KxpQB7mytR5SPSnv06fK9W5Lgf l/Fk5xWKcIltjPBjh6df0FMyhFCSH2IOCIFn5W44xglaWl937HI= =MeY4 -----END PGP SIGNATURE----- Merge tag 'v5.4.89' into 5.4-2.2.x-imx This is the 5.4.89 stable release Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>5.4-rM2-2.2.x-imx-squashed
commit
761cab513d
4
Makefile
4
Makefile
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 5
|
VERSION = 5
|
||||||
PATCHLEVEL = 4
|
PATCHLEVEL = 4
|
||||||
SUBLEVEL = 88
|
SUBLEVEL = 89
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Kleptomaniac Octopus
|
NAME = Kleptomaniac Octopus
|
||||||
|
|
||||||
|
@ -436,7 +436,7 @@ LEX = flex
|
||||||
YACC = bison
|
YACC = bison
|
||||||
AWK = awk
|
AWK = awk
|
||||||
INSTALLKERNEL := installkernel
|
INSTALLKERNEL := installkernel
|
||||||
DEPMOD = /sbin/depmod
|
DEPMOD = depmod
|
||||||
PERL = perl
|
PERL = perl
|
||||||
PYTHON = python
|
PYTHON = python
|
||||||
PYTHON3 = python3
|
PYTHON3 = python3
|
||||||
|
|
|
@ -98,7 +98,7 @@ SECTIONS
|
||||||
ALIGN_FUNCTION();
|
ALIGN_FUNCTION();
|
||||||
#endif
|
#endif
|
||||||
/* careful! __ftr_alt_* sections need to be close to .text */
|
/* careful! __ftr_alt_* sections need to be close to .text */
|
||||||
*(.text.hot TEXT_MAIN .text.fixup .text.unlikely .fixup __ftr_alt_* .ref.text);
|
*(.text.hot .text.hot.* TEXT_MAIN .text.fixup .text.unlikely .text.unlikely.* .fixup __ftr_alt_* .ref.text);
|
||||||
#ifdef CONFIG_PPC64
|
#ifdef CONFIG_PPC64
|
||||||
*(.tramp.ftrace.text);
|
*(.tramp.ftrace.text);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -167,9 +167,6 @@ static u8 mtrr_type_lookup_variable(u64 start, u64 end, u64 *partial_end,
|
||||||
*repeat = 0;
|
*repeat = 0;
|
||||||
*uniform = 1;
|
*uniform = 1;
|
||||||
|
|
||||||
/* Make end inclusive instead of exclusive */
|
|
||||||
end--;
|
|
||||||
|
|
||||||
prev_match = MTRR_TYPE_INVALID;
|
prev_match = MTRR_TYPE_INVALID;
|
||||||
for (i = 0; i < num_var_ranges; ++i) {
|
for (i = 0; i < num_var_ranges; ++i) {
|
||||||
unsigned short start_state, end_state, inclusive;
|
unsigned short start_state, end_state, inclusive;
|
||||||
|
@ -261,6 +258,9 @@ u8 mtrr_type_lookup(u64 start, u64 end, u8 *uniform)
|
||||||
int repeat;
|
int repeat;
|
||||||
u64 partial_end;
|
u64 partial_end;
|
||||||
|
|
||||||
|
/* Make end inclusive instead of exclusive */
|
||||||
|
end--;
|
||||||
|
|
||||||
if (!mtrr_state_set)
|
if (!mtrr_state_set)
|
||||||
return MTRR_TYPE_INVALID;
|
return MTRR_TYPE_INVALID;
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ static inline u64 rsvd_bits(int s, int e)
|
||||||
if (e < s)
|
if (e < s)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return ((1ULL << (e - s + 1)) - 1) << s;
|
return ((2ULL << (e - s)) - 1) << s;
|
||||||
}
|
}
|
||||||
|
|
||||||
void kvm_mmu_set_mmio_spte_mask(u64 mmio_mask, u64 mmio_value, u64 access_mask);
|
void kvm_mmu_set_mmio_spte_mask(u64 mmio_mask, u64 mmio_value, u64 access_mask);
|
||||||
|
|
|
@ -826,6 +826,8 @@ int pud_free_pmd_page(pud_t *pud, unsigned long addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
free_page((unsigned long)pmd_sv);
|
free_page((unsigned long)pmd_sv);
|
||||||
|
|
||||||
|
pgtable_pmd_page_dtor(virt_to_page(pmd));
|
||||||
free_page((unsigned long)pmd);
|
free_page((unsigned long)pmd);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -370,7 +370,7 @@ static uint32_t derive_pub_key(const void *pub_key, uint32_t len, uint8_t *buf)
|
||||||
memcpy(cur, e, sizeof(e));
|
memcpy(cur, e, sizeof(e));
|
||||||
cur += sizeof(e);
|
cur += sizeof(e);
|
||||||
/* Zero parameters to satisfy set_pub_key ABI. */
|
/* Zero parameters to satisfy set_pub_key ABI. */
|
||||||
memset(cur, 0, SETKEY_PARAMS_SIZE);
|
memzero_explicit(cur, SETKEY_PARAMS_SIZE);
|
||||||
|
|
||||||
return cur - buf;
|
return cur - buf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,8 @@ static int ecdh_set_secret(struct crypto_kpp *tfm, const void *buf,
|
||||||
struct ecdh params;
|
struct ecdh params;
|
||||||
unsigned int ndigits;
|
unsigned int ndigits;
|
||||||
|
|
||||||
if (crypto_ecdh_decode_key(buf, len, ¶ms) < 0)
|
if (crypto_ecdh_decode_key(buf, len, ¶ms) < 0 ||
|
||||||
|
params.key_size > sizeof(ctx->private_key))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
ndigits = ecdh_supported_curve(params.curve_id);
|
ndigits = ecdh_supported_curve(params.curve_id);
|
||||||
|
|
|
@ -3606,7 +3606,7 @@ static int idt77252_init_one(struct pci_dev *pcidev,
|
||||||
|
|
||||||
if ((err = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(32)))) {
|
if ((err = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(32)))) {
|
||||||
printk("idt77252: can't enable DMA for PCI device at %s\n", pci_name(pcidev));
|
printk("idt77252: can't enable DMA for PCI device at %s\n", pci_name(pcidev));
|
||||||
return err;
|
goto err_out_disable_pdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
card = kzalloc(sizeof(struct idt77252_dev), GFP_KERNEL);
|
card = kzalloc(sizeof(struct idt77252_dev), GFP_KERNEL);
|
||||||
|
|
|
@ -3456,7 +3456,7 @@ void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
|
||||||
if (fwnode_is_primary(fn)) {
|
if (fwnode_is_primary(fn)) {
|
||||||
dev->fwnode = fn->secondary;
|
dev->fwnode = fn->secondary;
|
||||||
if (!(parent && fn == parent->fwnode))
|
if (!(parent && fn == parent->fwnode))
|
||||||
fn->secondary = ERR_PTR(-ENODEV);
|
fn->secondary = NULL;
|
||||||
} else {
|
} else {
|
||||||
dev->fwnode = NULL;
|
dev->fwnode = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,12 +250,8 @@ static int h5_close(struct hci_uart *hu)
|
||||||
if (h5->vnd && h5->vnd->close)
|
if (h5->vnd && h5->vnd->close)
|
||||||
h5->vnd->close(h5);
|
h5->vnd->close(h5);
|
||||||
|
|
||||||
if (hu->serdev)
|
if (!hu->serdev)
|
||||||
serdev_device_close(hu->serdev);
|
|
||||||
|
|
||||||
kfree_skb(h5->rx_skb);
|
|
||||||
kfree(h5);
|
kfree(h5);
|
||||||
h5 = NULL;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,10 +77,6 @@ static void dma_buf_release(struct dentry *dentry)
|
||||||
|
|
||||||
dmabuf->ops->release(dmabuf);
|
dmabuf->ops->release(dmabuf);
|
||||||
|
|
||||||
mutex_lock(&db_list.lock);
|
|
||||||
list_del(&dmabuf->list_node);
|
|
||||||
mutex_unlock(&db_list.lock);
|
|
||||||
|
|
||||||
if (dmabuf->resv == (struct dma_resv *)&dmabuf[1])
|
if (dmabuf->resv == (struct dma_resv *)&dmabuf[1])
|
||||||
dma_resv_fini(dmabuf->resv);
|
dma_resv_fini(dmabuf->resv);
|
||||||
|
|
||||||
|
@ -89,6 +85,22 @@ static void dma_buf_release(struct dentry *dentry)
|
||||||
kfree(dmabuf);
|
kfree(dmabuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int dma_buf_file_release(struct inode *inode, struct file *file)
|
||||||
|
{
|
||||||
|
struct dma_buf *dmabuf;
|
||||||
|
|
||||||
|
if (!is_dma_buf_file(file))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
dmabuf = file->private_data;
|
||||||
|
|
||||||
|
mutex_lock(&db_list.lock);
|
||||||
|
list_del(&dmabuf->list_node);
|
||||||
|
mutex_unlock(&db_list.lock);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct dentry_operations dma_buf_dentry_ops = {
|
static const struct dentry_operations dma_buf_dentry_ops = {
|
||||||
.d_dname = dmabuffs_dname,
|
.d_dname = dmabuffs_dname,
|
||||||
.d_release = dma_buf_release,
|
.d_release = dma_buf_release,
|
||||||
|
@ -444,6 +456,7 @@ static void dma_buf_show_fdinfo(struct seq_file *m, struct file *file)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct file_operations dma_buf_fops = {
|
static const struct file_operations dma_buf_fops = {
|
||||||
|
.release = dma_buf_file_release,
|
||||||
.mmap = dma_buf_mmap_internal,
|
.mmap = dma_buf_mmap_internal,
|
||||||
.llseek = dma_buf_llseek,
|
.llseek = dma_buf_llseek,
|
||||||
.poll = dma_buf_poll,
|
.poll = dma_buf_poll,
|
||||||
|
|
|
@ -936,7 +936,7 @@ static void reloc_gpu_flush(struct reloc_cache *cache)
|
||||||
GEM_BUG_ON(cache->rq_size >= obj->base.size / sizeof(u32));
|
GEM_BUG_ON(cache->rq_size >= obj->base.size / sizeof(u32));
|
||||||
cache->rq_cmd[cache->rq_size] = MI_BATCH_BUFFER_END;
|
cache->rq_cmd[cache->rq_size] = MI_BATCH_BUFFER_END;
|
||||||
|
|
||||||
__i915_gem_object_flush_map(obj, 0, sizeof(u32) * (cache->rq_size + 1));
|
i915_gem_object_flush_map(obj);
|
||||||
i915_gem_object_unpin_map(obj);
|
i915_gem_object_unpin_map(obj);
|
||||||
|
|
||||||
intel_gt_chipset_flush(cache->rq->engine->gt);
|
intel_gt_chipset_flush(cache->rq->engine->gt);
|
||||||
|
@ -1163,6 +1163,8 @@ static int __reloc_gpu_alloc(struct i915_execbuffer *eb,
|
||||||
goto out_pool;
|
goto out_pool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset32(cmd, 0, pool->obj->base.size / sizeof(u32));
|
||||||
|
|
||||||
batch = i915_vma_instance(pool->obj, vma->vm, NULL);
|
batch = i915_vma_instance(pool->obj, vma->vm, NULL);
|
||||||
if (IS_ERR(batch)) {
|
if (IS_ERR(batch)) {
|
||||||
err = PTR_ERR(batch);
|
err = PTR_ERR(batch);
|
||||||
|
|
|
@ -223,7 +223,6 @@ void ide_prep_sense(ide_drive_t *drive, struct request *rq)
|
||||||
sense_rq->rq_disk = rq->rq_disk;
|
sense_rq->rq_disk = rq->rq_disk;
|
||||||
sense_rq->cmd_flags = REQ_OP_DRV_IN;
|
sense_rq->cmd_flags = REQ_OP_DRV_IN;
|
||||||
ide_req(sense_rq)->type = ATA_PRIV_SENSE;
|
ide_req(sense_rq)->type = ATA_PRIV_SENSE;
|
||||||
sense_rq->rq_flags |= RQF_PREEMPT;
|
|
||||||
|
|
||||||
req->cmd[0] = GPCMD_REQUEST_SENSE;
|
req->cmd[0] = GPCMD_REQUEST_SENSE;
|
||||||
req->cmd[4] = cmd_len;
|
req->cmd[4] = cmd_len;
|
||||||
|
|
|
@ -512,11 +512,6 @@ repeat:
|
||||||
* above to return us whatever is in the queue. Since we call
|
* above to return us whatever is in the queue. Since we call
|
||||||
* ide_do_request() ourselves, we end up taking requests while
|
* ide_do_request() ourselves, we end up taking requests while
|
||||||
* the queue is blocked...
|
* the queue is blocked...
|
||||||
*
|
|
||||||
* We let requests forced at head of queue with ide-preempt
|
|
||||||
* though. I hope that doesn't happen too much, hopefully not
|
|
||||||
* unless the subdriver triggers such a thing in its own PM
|
|
||||||
* state machine.
|
|
||||||
*/
|
*/
|
||||||
if ((drive->dev_flags & IDE_DFLAG_BLOCKED) &&
|
if ((drive->dev_flags & IDE_DFLAG_BLOCKED) &&
|
||||||
ata_pm_request(rq) == 0 &&
|
ata_pm_request(rq) == 0 &&
|
||||||
|
|
|
@ -92,9 +92,7 @@
|
||||||
GSWIP_MDIO_PHY_FDUP_MASK)
|
GSWIP_MDIO_PHY_FDUP_MASK)
|
||||||
|
|
||||||
/* GSWIP MII Registers */
|
/* GSWIP MII Registers */
|
||||||
#define GSWIP_MII_CFG0 0x00
|
#define GSWIP_MII_CFGp(p) (0x2 * (p))
|
||||||
#define GSWIP_MII_CFG1 0x02
|
|
||||||
#define GSWIP_MII_CFG5 0x04
|
|
||||||
#define GSWIP_MII_CFG_EN BIT(14)
|
#define GSWIP_MII_CFG_EN BIT(14)
|
||||||
#define GSWIP_MII_CFG_LDCLKDIS BIT(12)
|
#define GSWIP_MII_CFG_LDCLKDIS BIT(12)
|
||||||
#define GSWIP_MII_CFG_MODE_MIIP 0x0
|
#define GSWIP_MII_CFG_MODE_MIIP 0x0
|
||||||
|
@ -392,17 +390,9 @@ static void gswip_mii_mask(struct gswip_priv *priv, u32 clear, u32 set,
|
||||||
static void gswip_mii_mask_cfg(struct gswip_priv *priv, u32 clear, u32 set,
|
static void gswip_mii_mask_cfg(struct gswip_priv *priv, u32 clear, u32 set,
|
||||||
int port)
|
int port)
|
||||||
{
|
{
|
||||||
switch (port) {
|
/* There's no MII_CFG register for the CPU port */
|
||||||
case 0:
|
if (!dsa_is_cpu_port(priv->ds, port))
|
||||||
gswip_mii_mask(priv, clear, set, GSWIP_MII_CFG0);
|
gswip_mii_mask(priv, clear, set, GSWIP_MII_CFGp(port));
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
gswip_mii_mask(priv, clear, set, GSWIP_MII_CFG1);
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
gswip_mii_mask(priv, clear, set, GSWIP_MII_CFG5);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gswip_mii_mask_pcdu(struct gswip_priv *priv, u32 clear, u32 set,
|
static void gswip_mii_mask_pcdu(struct gswip_priv *priv, u32 clear, u32 set,
|
||||||
|
@ -806,9 +796,8 @@ static int gswip_setup(struct dsa_switch *ds)
|
||||||
gswip_mdio_mask(priv, 0xff, 0x09, GSWIP_MDIO_MDC_CFG1);
|
gswip_mdio_mask(priv, 0xff, 0x09, GSWIP_MDIO_MDC_CFG1);
|
||||||
|
|
||||||
/* Disable the xMII link */
|
/* Disable the xMII link */
|
||||||
gswip_mii_mask_cfg(priv, GSWIP_MII_CFG_EN, 0, 0);
|
for (i = 0; i < priv->hw_info->max_ports; i++)
|
||||||
gswip_mii_mask_cfg(priv, GSWIP_MII_CFG_EN, 0, 1);
|
gswip_mii_mask_cfg(priv, GSWIP_MII_CFG_EN, 0, i);
|
||||||
gswip_mii_mask_cfg(priv, GSWIP_MII_CFG_EN, 0, 5);
|
|
||||||
|
|
||||||
/* enable special tag insertion on cpu port */
|
/* enable special tag insertion on cpu port */
|
||||||
gswip_switch_mask(priv, 0, GSWIP_FDMA_PCTRL_STEN,
|
gswip_switch_mask(priv, 0, GSWIP_FDMA_PCTRL_STEN,
|
||||||
|
@ -1522,8 +1511,6 @@ static void gswip_phylink_mac_link_up(struct dsa_switch *ds, int port,
|
||||||
{
|
{
|
||||||
struct gswip_priv *priv = ds->priv;
|
struct gswip_priv *priv = ds->priv;
|
||||||
|
|
||||||
/* Enable the xMII interface only for the external PHY */
|
|
||||||
if (interface != PHY_INTERFACE_MODE_INTERNAL)
|
|
||||||
gswip_mii_mask_cfg(priv, 0, GSWIP_MII_CFG_EN, port);
|
gswip_mii_mask_cfg(priv, 0, GSWIP_MII_CFG_EN, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2520,6 +2520,7 @@ static int bcm_sysport_probe(struct platform_device *pdev)
|
||||||
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
|
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
|
||||||
dev->hw_features |= dev->features;
|
dev->hw_features |= dev->features;
|
||||||
dev->vlan_features |= dev->features;
|
dev->vlan_features |= dev->features;
|
||||||
|
dev->max_mtu = UMAC_MAX_MTU_SIZE;
|
||||||
|
|
||||||
/* Request the WOL interrupt and advertise suspend if available */
|
/* Request the WOL interrupt and advertise suspend if available */
|
||||||
priv->wol_irq_disabled = 1;
|
priv->wol_irq_disabled = 1;
|
||||||
|
|
|
@ -1207,7 +1207,7 @@ static int ethoc_probe(struct platform_device *pdev)
|
||||||
ret = mdiobus_register(priv->mdio);
|
ret = mdiobus_register(priv->mdio);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&netdev->dev, "failed to register MDIO bus\n");
|
dev_err(&netdev->dev, "failed to register MDIO bus\n");
|
||||||
goto free2;
|
goto free3;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ethoc_mdio_probe(netdev);
|
ret = ethoc_mdio_probe(netdev);
|
||||||
|
@ -1239,6 +1239,7 @@ error2:
|
||||||
netif_napi_del(&priv->napi);
|
netif_napi_del(&priv->napi);
|
||||||
error:
|
error:
|
||||||
mdiobus_unregister(priv->mdio);
|
mdiobus_unregister(priv->mdio);
|
||||||
|
free3:
|
||||||
mdiobus_free(priv->mdio);
|
mdiobus_free(priv->mdio);
|
||||||
free2:
|
free2:
|
||||||
clk_disable_unprepare(priv->clk);
|
clk_disable_unprepare(priv->clk);
|
||||||
|
|
|
@ -3890,6 +3890,7 @@ static int ucc_geth_probe(struct platform_device* ofdev)
|
||||||
INIT_WORK(&ugeth->timeout_work, ucc_geth_timeout_work);
|
INIT_WORK(&ugeth->timeout_work, ucc_geth_timeout_work);
|
||||||
netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, 64);
|
netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, 64);
|
||||||
dev->mtu = 1500;
|
dev->mtu = 1500;
|
||||||
|
dev->max_mtu = 1518;
|
||||||
|
|
||||||
ugeth->msg_enable = netif_msg_init(debug.msg_enable, UGETH_MSG_DEFAULT);
|
ugeth->msg_enable = netif_msg_init(debug.msg_enable, UGETH_MSG_DEFAULT);
|
||||||
ugeth->phy_interface = phy_interface;
|
ugeth->phy_interface = phy_interface;
|
||||||
|
@ -3935,12 +3936,12 @@ static int ucc_geth_remove(struct platform_device* ofdev)
|
||||||
struct device_node *np = ofdev->dev.of_node;
|
struct device_node *np = ofdev->dev.of_node;
|
||||||
|
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
free_netdev(dev);
|
|
||||||
ucc_geth_memclean(ugeth);
|
ucc_geth_memclean(ugeth);
|
||||||
if (of_phy_is_fixed_link(np))
|
if (of_phy_is_fixed_link(np))
|
||||||
of_phy_deregister_fixed_link(np);
|
of_phy_deregister_fixed_link(np);
|
||||||
of_node_put(ugeth->ug_info->tbi_node);
|
of_node_put(ugeth->ug_info->tbi_node);
|
||||||
of_node_put(ugeth->ug_info->phy_node);
|
of_node_put(ugeth->ug_info->phy_node);
|
||||||
|
free_netdev(dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -415,6 +415,10 @@ static void __lb_other_process(struct hns_nic_ring_data *ring_data,
|
||||||
/* for mutl buffer*/
|
/* for mutl buffer*/
|
||||||
new_skb = skb_copy(skb, GFP_ATOMIC);
|
new_skb = skb_copy(skb, GFP_ATOMIC);
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
|
if (!new_skb) {
|
||||||
|
netdev_err(ndev, "skb alloc failed\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
skb = new_skb;
|
skb = new_skb;
|
||||||
|
|
||||||
check_ok = 0;
|
check_ok = 0;
|
||||||
|
|
|
@ -2152,8 +2152,7 @@ static void __ibmvnic_reset(struct work_struct *work)
|
||||||
rc = do_hard_reset(adapter, rwi, reset_state);
|
rc = do_hard_reset(adapter, rwi, reset_state);
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
}
|
}
|
||||||
} else if (!(rwi->reset_reason == VNIC_RESET_FATAL &&
|
} else {
|
||||||
adapter->from_passive_init)) {
|
|
||||||
rc = do_reset(adapter, rwi, reset_state);
|
rc = do_reset(adapter, rwi, reset_state);
|
||||||
}
|
}
|
||||||
kfree(rwi);
|
kfree(rwi);
|
||||||
|
|
|
@ -129,6 +129,7 @@ enum i40e_state_t {
|
||||||
__I40E_RESET_INTR_RECEIVED,
|
__I40E_RESET_INTR_RECEIVED,
|
||||||
__I40E_REINIT_REQUESTED,
|
__I40E_REINIT_REQUESTED,
|
||||||
__I40E_PF_RESET_REQUESTED,
|
__I40E_PF_RESET_REQUESTED,
|
||||||
|
__I40E_PF_RESET_AND_REBUILD_REQUESTED,
|
||||||
__I40E_CORE_RESET_REQUESTED,
|
__I40E_CORE_RESET_REQUESTED,
|
||||||
__I40E_GLOBAL_RESET_REQUESTED,
|
__I40E_GLOBAL_RESET_REQUESTED,
|
||||||
__I40E_EMP_RESET_INTR_RECEIVED,
|
__I40E_EMP_RESET_INTR_RECEIVED,
|
||||||
|
@ -156,6 +157,8 @@ enum i40e_state_t {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define I40E_PF_RESET_FLAG BIT_ULL(__I40E_PF_RESET_REQUESTED)
|
#define I40E_PF_RESET_FLAG BIT_ULL(__I40E_PF_RESET_REQUESTED)
|
||||||
|
#define I40E_PF_RESET_AND_REBUILD_FLAG \
|
||||||
|
BIT_ULL(__I40E_PF_RESET_AND_REBUILD_REQUESTED)
|
||||||
|
|
||||||
/* VSI state flags */
|
/* VSI state flags */
|
||||||
enum i40e_vsi_state_t {
|
enum i40e_vsi_state_t {
|
||||||
|
|
|
@ -44,6 +44,8 @@ static int i40e_setup_misc_vector(struct i40e_pf *pf);
|
||||||
static void i40e_determine_queue_usage(struct i40e_pf *pf);
|
static void i40e_determine_queue_usage(struct i40e_pf *pf);
|
||||||
static int i40e_setup_pf_filter_control(struct i40e_pf *pf);
|
static int i40e_setup_pf_filter_control(struct i40e_pf *pf);
|
||||||
static void i40e_prep_for_reset(struct i40e_pf *pf, bool lock_acquired);
|
static void i40e_prep_for_reset(struct i40e_pf *pf, bool lock_acquired);
|
||||||
|
static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit,
|
||||||
|
bool lock_acquired);
|
||||||
static int i40e_reset(struct i40e_pf *pf);
|
static int i40e_reset(struct i40e_pf *pf);
|
||||||
static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired);
|
static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired);
|
||||||
static int i40e_setup_misc_vector_for_recovery_mode(struct i40e_pf *pf);
|
static int i40e_setup_misc_vector_for_recovery_mode(struct i40e_pf *pf);
|
||||||
|
@ -8484,6 +8486,14 @@ void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags, bool lock_acquired)
|
||||||
"FW LLDP is disabled\n" :
|
"FW LLDP is disabled\n" :
|
||||||
"FW LLDP is enabled\n");
|
"FW LLDP is enabled\n");
|
||||||
|
|
||||||
|
} else if (reset_flags & I40E_PF_RESET_AND_REBUILD_FLAG) {
|
||||||
|
/* Request a PF Reset
|
||||||
|
*
|
||||||
|
* Resets PF and reinitializes PFs VSI.
|
||||||
|
*/
|
||||||
|
i40e_prep_for_reset(pf, lock_acquired);
|
||||||
|
i40e_reset_and_rebuild(pf, true, lock_acquired);
|
||||||
|
|
||||||
} else if (reset_flags & BIT_ULL(__I40E_REINIT_REQUESTED)) {
|
} else if (reset_flags & BIT_ULL(__I40E_REINIT_REQUESTED)) {
|
||||||
int v;
|
int v;
|
||||||
|
|
||||||
|
|
|
@ -1704,7 +1704,7 @@ int i40e_pci_sriov_configure(struct pci_dev *pdev, int num_vfs)
|
||||||
if (num_vfs) {
|
if (num_vfs) {
|
||||||
if (!(pf->flags & I40E_FLAG_VEB_MODE_ENABLED)) {
|
if (!(pf->flags & I40E_FLAG_VEB_MODE_ENABLED)) {
|
||||||
pf->flags |= I40E_FLAG_VEB_MODE_ENABLED;
|
pf->flags |= I40E_FLAG_VEB_MODE_ENABLED;
|
||||||
i40e_do_reset_safe(pf, I40E_PF_RESET_FLAG);
|
i40e_do_reset_safe(pf, I40E_PF_RESET_AND_REBUILD_FLAG);
|
||||||
}
|
}
|
||||||
ret = i40e_pci_sriov_enable(pdev, num_vfs);
|
ret = i40e_pci_sriov_enable(pdev, num_vfs);
|
||||||
goto sriov_configure_out;
|
goto sriov_configure_out;
|
||||||
|
@ -1713,7 +1713,7 @@ int i40e_pci_sriov_configure(struct pci_dev *pdev, int num_vfs)
|
||||||
if (!pci_vfs_assigned(pf->pdev)) {
|
if (!pci_vfs_assigned(pf->pdev)) {
|
||||||
i40e_free_vfs(pf);
|
i40e_free_vfs(pf);
|
||||||
pf->flags &= ~I40E_FLAG_VEB_MODE_ENABLED;
|
pf->flags &= ~I40E_FLAG_VEB_MODE_ENABLED;
|
||||||
i40e_do_reset_safe(pf, I40E_PF_RESET_FLAG);
|
i40e_do_reset_safe(pf, I40E_PF_RESET_AND_REBUILD_FLAG);
|
||||||
} else {
|
} else {
|
||||||
dev_warn(&pdev->dev, "Unable to free VFs because some are assigned to VMs.\n");
|
dev_warn(&pdev->dev, "Unable to free VFs because some are assigned to VMs.\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
|
|
@ -1844,12 +1844,10 @@ static int iavf_init_get_resources(struct iavf_adapter *adapter)
|
||||||
netif_tx_stop_all_queues(netdev);
|
netif_tx_stop_all_queues(netdev);
|
||||||
if (CLIENT_ALLOWED(adapter)) {
|
if (CLIENT_ALLOWED(adapter)) {
|
||||||
err = iavf_lan_add_device(adapter);
|
err = iavf_lan_add_device(adapter);
|
||||||
if (err) {
|
if (err)
|
||||||
rtnl_unlock();
|
|
||||||
dev_info(&pdev->dev, "Failed to add VF to client API service list: %d\n",
|
dev_info(&pdev->dev, "Failed to add VF to client API service list: %d\n",
|
||||||
err);
|
err);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
dev_info(&pdev->dev, "MAC address: %pM\n", adapter->hw.mac.addr);
|
dev_info(&pdev->dev, "MAC address: %pM\n", adapter->hw.mac.addr);
|
||||||
if (netdev->features & NETIF_F_GRO)
|
if (netdev->features & NETIF_F_GRO)
|
||||||
dev_info(&pdev->dev, "GRO is enabled\n");
|
dev_info(&pdev->dev, "GRO is enabled\n");
|
||||||
|
|
|
@ -4694,7 +4694,7 @@ static int mvneta_probe(struct platform_device *pdev)
|
||||||
err = mvneta_port_power_up(pp, pp->phy_interface);
|
err = mvneta_port_power_up(pp, pp->phy_interface);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_err(&pdev->dev, "can't power up port\n");
|
dev_err(&pdev->dev, "can't power up port\n");
|
||||||
return err;
|
goto err_netdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Armada3700 network controller does not support per-cpu
|
/* Armada3700 network controller does not support per-cpu
|
||||||
|
|
|
@ -1129,7 +1129,7 @@ static void mvpp22_gop_init_rgmii(struct mvpp2_port *port)
|
||||||
|
|
||||||
regmap_read(priv->sysctrl_base, GENCONF_CTRL0, &val);
|
regmap_read(priv->sysctrl_base, GENCONF_CTRL0, &val);
|
||||||
if (port->gop_id == 2)
|
if (port->gop_id == 2)
|
||||||
val |= GENCONF_CTRL0_PORT0_RGMII | GENCONF_CTRL0_PORT1_RGMII;
|
val |= GENCONF_CTRL0_PORT0_RGMII;
|
||||||
else if (port->gop_id == 3)
|
else if (port->gop_id == 3)
|
||||||
val |= GENCONF_CTRL0_PORT1_RGMII_MII;
|
val |= GENCONF_CTRL0_PORT1_RGMII_MII;
|
||||||
regmap_write(priv->sysctrl_base, GENCONF_CTRL0, val);
|
regmap_write(priv->sysctrl_base, GENCONF_CTRL0, val);
|
||||||
|
@ -2161,17 +2161,18 @@ static void mvpp2_rx_pkts_coal_set(struct mvpp2_port *port,
|
||||||
static void mvpp2_tx_pkts_coal_set(struct mvpp2_port *port,
|
static void mvpp2_tx_pkts_coal_set(struct mvpp2_port *port,
|
||||||
struct mvpp2_tx_queue *txq)
|
struct mvpp2_tx_queue *txq)
|
||||||
{
|
{
|
||||||
unsigned int thread = mvpp2_cpu_to_thread(port->priv, get_cpu());
|
unsigned int thread;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
if (txq->done_pkts_coal > MVPP2_TXQ_THRESH_MASK)
|
if (txq->done_pkts_coal > MVPP2_TXQ_THRESH_MASK)
|
||||||
txq->done_pkts_coal = MVPP2_TXQ_THRESH_MASK;
|
txq->done_pkts_coal = MVPP2_TXQ_THRESH_MASK;
|
||||||
|
|
||||||
val = (txq->done_pkts_coal << MVPP2_TXQ_THRESH_OFFSET);
|
val = (txq->done_pkts_coal << MVPP2_TXQ_THRESH_OFFSET);
|
||||||
|
/* PKT-coalescing registers are per-queue + per-thread */
|
||||||
|
for (thread = 0; thread < MVPP2_MAX_THREADS; thread++) {
|
||||||
mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_NUM_REG, txq->id);
|
mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_NUM_REG, txq->id);
|
||||||
mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_THRESH_REG, val);
|
mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_THRESH_REG, val);
|
||||||
|
}
|
||||||
put_cpu();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 mvpp2_usec_to_cycles(u32 usec, unsigned long clk_hz)
|
static u32 mvpp2_usec_to_cycles(u32 usec, unsigned long clk_hz)
|
||||||
|
|
|
@ -405,6 +405,38 @@ static int mvpp2_prs_tcam_first_free(struct mvpp2 *priv, unsigned char start,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Drop flow control pause frames */
|
||||||
|
static void mvpp2_prs_drop_fc(struct mvpp2 *priv)
|
||||||
|
{
|
||||||
|
unsigned char da[ETH_ALEN] = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x01 };
|
||||||
|
struct mvpp2_prs_entry pe;
|
||||||
|
unsigned int len;
|
||||||
|
|
||||||
|
memset(&pe, 0, sizeof(pe));
|
||||||
|
|
||||||
|
/* For all ports - drop flow control frames */
|
||||||
|
pe.index = MVPP2_PE_FC_DROP;
|
||||||
|
mvpp2_prs_tcam_lu_set(&pe, MVPP2_PRS_LU_MAC);
|
||||||
|
|
||||||
|
/* Set match on DA */
|
||||||
|
len = ETH_ALEN;
|
||||||
|
while (len--)
|
||||||
|
mvpp2_prs_tcam_data_byte_set(&pe, len, da[len], 0xff);
|
||||||
|
|
||||||
|
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_DROP_MASK,
|
||||||
|
MVPP2_PRS_RI_DROP_MASK);
|
||||||
|
|
||||||
|
mvpp2_prs_sram_bits_set(&pe, MVPP2_PRS_SRAM_LU_GEN_BIT, 1);
|
||||||
|
mvpp2_prs_sram_next_lu_set(&pe, MVPP2_PRS_LU_FLOWS);
|
||||||
|
|
||||||
|
/* Mask all ports */
|
||||||
|
mvpp2_prs_tcam_port_map_set(&pe, MVPP2_PRS_PORT_MASK);
|
||||||
|
|
||||||
|
/* Update shadow table and hw entry */
|
||||||
|
mvpp2_prs_shadow_set(priv, pe.index, MVPP2_PRS_LU_MAC);
|
||||||
|
mvpp2_prs_hw_write(priv, &pe);
|
||||||
|
}
|
||||||
|
|
||||||
/* Enable/disable dropping all mac da's */
|
/* Enable/disable dropping all mac da's */
|
||||||
static void mvpp2_prs_mac_drop_all_set(struct mvpp2 *priv, int port, bool add)
|
static void mvpp2_prs_mac_drop_all_set(struct mvpp2 *priv, int port, bool add)
|
||||||
{
|
{
|
||||||
|
@ -1162,6 +1194,7 @@ static void mvpp2_prs_mac_init(struct mvpp2 *priv)
|
||||||
mvpp2_prs_hw_write(priv, &pe);
|
mvpp2_prs_hw_write(priv, &pe);
|
||||||
|
|
||||||
/* Create dummy entries for drop all and promiscuous modes */
|
/* Create dummy entries for drop all and promiscuous modes */
|
||||||
|
mvpp2_prs_drop_fc(priv);
|
||||||
mvpp2_prs_mac_drop_all_set(priv, 0, false);
|
mvpp2_prs_mac_drop_all_set(priv, 0, false);
|
||||||
mvpp2_prs_mac_promisc_set(priv, 0, MVPP2_PRS_L2_UNI_CAST, false);
|
mvpp2_prs_mac_promisc_set(priv, 0, MVPP2_PRS_L2_UNI_CAST, false);
|
||||||
mvpp2_prs_mac_promisc_set(priv, 0, MVPP2_PRS_L2_MULTI_CAST, false);
|
mvpp2_prs_mac_promisc_set(priv, 0, MVPP2_PRS_L2_MULTI_CAST, false);
|
||||||
|
@ -1647,8 +1680,9 @@ static int mvpp2_prs_pppoe_init(struct mvpp2 *priv)
|
||||||
mvpp2_prs_sram_next_lu_set(&pe, MVPP2_PRS_LU_IP6);
|
mvpp2_prs_sram_next_lu_set(&pe, MVPP2_PRS_LU_IP6);
|
||||||
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L3_IP6,
|
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L3_IP6,
|
||||||
MVPP2_PRS_RI_L3_PROTO_MASK);
|
MVPP2_PRS_RI_L3_PROTO_MASK);
|
||||||
/* Skip eth_type + 4 bytes of IPv6 header */
|
/* Jump to DIP of IPV6 header */
|
||||||
mvpp2_prs_sram_shift_set(&pe, MVPP2_ETH_TYPE_LEN + 4,
|
mvpp2_prs_sram_shift_set(&pe, MVPP2_ETH_TYPE_LEN + 8 +
|
||||||
|
MVPP2_MAX_L3_ADDR_SIZE,
|
||||||
MVPP2_PRS_SRAM_OP_SEL_SHIFT_ADD);
|
MVPP2_PRS_SRAM_OP_SEL_SHIFT_ADD);
|
||||||
/* Set L3 offset */
|
/* Set L3 offset */
|
||||||
mvpp2_prs_sram_offset_set(&pe, MVPP2_PRS_SRAM_UDF_TYPE_L3,
|
mvpp2_prs_sram_offset_set(&pe, MVPP2_PRS_SRAM_UDF_TYPE_L3,
|
||||||
|
|
|
@ -129,7 +129,7 @@
|
||||||
#define MVPP2_PE_VID_EDSA_FLTR_DEFAULT (MVPP2_PRS_TCAM_SRAM_SIZE - 7)
|
#define MVPP2_PE_VID_EDSA_FLTR_DEFAULT (MVPP2_PRS_TCAM_SRAM_SIZE - 7)
|
||||||
#define MVPP2_PE_VLAN_DBL (MVPP2_PRS_TCAM_SRAM_SIZE - 6)
|
#define MVPP2_PE_VLAN_DBL (MVPP2_PRS_TCAM_SRAM_SIZE - 6)
|
||||||
#define MVPP2_PE_VLAN_NONE (MVPP2_PRS_TCAM_SRAM_SIZE - 5)
|
#define MVPP2_PE_VLAN_NONE (MVPP2_PRS_TCAM_SRAM_SIZE - 5)
|
||||||
/* reserved */
|
#define MVPP2_PE_FC_DROP (MVPP2_PRS_TCAM_SRAM_SIZE - 4)
|
||||||
#define MVPP2_PE_MAC_MC_PROMISCUOUS (MVPP2_PRS_TCAM_SRAM_SIZE - 3)
|
#define MVPP2_PE_MAC_MC_PROMISCUOUS (MVPP2_PRS_TCAM_SRAM_SIZE - 3)
|
||||||
#define MVPP2_PE_MAC_UC_PROMISCUOUS (MVPP2_PRS_TCAM_SRAM_SIZE - 2)
|
#define MVPP2_PE_MAC_UC_PROMISCUOUS (MVPP2_PRS_TCAM_SRAM_SIZE - 2)
|
||||||
#define MVPP2_PE_MAC_NON_PROMISCUOUS (MVPP2_PRS_TCAM_SRAM_SIZE - 1)
|
#define MVPP2_PE_MAC_NON_PROMISCUOUS (MVPP2_PRS_TCAM_SRAM_SIZE - 1)
|
||||||
|
|
|
@ -257,7 +257,7 @@ void ionic_rx_fill(struct ionic_queue *q)
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
len = netdev->mtu + ETH_HLEN;
|
len = netdev->mtu + ETH_HLEN + VLAN_HLEN;
|
||||||
|
|
||||||
for (i = ionic_q_space_avail(q); i; i--) {
|
for (i = ionic_q_space_avail(q); i; i--) {
|
||||||
skb = ionic_rx_skb_alloc(q, len, &dma_addr);
|
skb = ionic_rx_skb_alloc(q, len, &dma_addr);
|
||||||
|
|
|
@ -1737,6 +1737,11 @@ netdev_features_t qede_features_check(struct sk_buff *skb,
|
||||||
ntohs(udp_hdr(skb)->dest) != gnv_port))
|
ntohs(udp_hdr(skb)->dest) != gnv_port))
|
||||||
return features & ~(NETIF_F_CSUM_MASK |
|
return features & ~(NETIF_F_CSUM_MASK |
|
||||||
NETIF_F_GSO_MASK);
|
NETIF_F_GSO_MASK);
|
||||||
|
} else if (l4_proto == IPPROTO_IPIP) {
|
||||||
|
/* IPIP tunnels are unknown to the device or at least unsupported natively,
|
||||||
|
* offloads for them can't be done trivially, so disable them for such skb.
|
||||||
|
*/
|
||||||
|
return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3958,7 +3958,8 @@ static void rtl_pll_power_down(struct rtl8169_private *tp)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (tp->mac_version) {
|
switch (tp->mac_version) {
|
||||||
case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_33:
|
case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_26:
|
||||||
|
case RTL_GIGA_MAC_VER_32 ... RTL_GIGA_MAC_VER_33:
|
||||||
case RTL_GIGA_MAC_VER_37:
|
case RTL_GIGA_MAC_VER_37:
|
||||||
case RTL_GIGA_MAC_VER_39:
|
case RTL_GIGA_MAC_VER_39:
|
||||||
case RTL_GIGA_MAC_VER_43:
|
case RTL_GIGA_MAC_VER_43:
|
||||||
|
@ -3987,7 +3988,8 @@ static void rtl_pll_power_down(struct rtl8169_private *tp)
|
||||||
static void rtl_pll_power_up(struct rtl8169_private *tp)
|
static void rtl_pll_power_up(struct rtl8169_private *tp)
|
||||||
{
|
{
|
||||||
switch (tp->mac_version) {
|
switch (tp->mac_version) {
|
||||||
case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_33:
|
case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_26:
|
||||||
|
case RTL_GIGA_MAC_VER_32 ... RTL_GIGA_MAC_VER_33:
|
||||||
case RTL_GIGA_MAC_VER_37:
|
case RTL_GIGA_MAC_VER_37:
|
||||||
case RTL_GIGA_MAC_VER_39:
|
case RTL_GIGA_MAC_VER_39:
|
||||||
case RTL_GIGA_MAC_VER_43:
|
case RTL_GIGA_MAC_VER_43:
|
||||||
|
|
|
@ -485,6 +485,7 @@ void cpts_unregister(struct cpts *cpts)
|
||||||
|
|
||||||
ptp_clock_unregister(cpts->clock);
|
ptp_clock_unregister(cpts->clock);
|
||||||
cpts->clock = NULL;
|
cpts->clock = NULL;
|
||||||
|
cpts->phc_index = -1;
|
||||||
|
|
||||||
cpts_write32(cpts, 0, int_enable);
|
cpts_write32(cpts, 0, int_enable);
|
||||||
cpts_write32(cpts, 0, control);
|
cpts_write32(cpts, 0, control);
|
||||||
|
@ -667,6 +668,7 @@ struct cpts *cpts_create(struct device *dev, void __iomem *regs,
|
||||||
cpts->cc.read = cpts_systim_read;
|
cpts->cc.read = cpts_systim_read;
|
||||||
cpts->cc.mask = CLOCKSOURCE_MASK(32);
|
cpts->cc.mask = CLOCKSOURCE_MASK(32);
|
||||||
cpts->info = cpts_info;
|
cpts->info = cpts_info;
|
||||||
|
cpts->phc_index = -1;
|
||||||
|
|
||||||
cpts_calc_mult_shift(cpts);
|
cpts_calc_mult_shift(cpts);
|
||||||
/* save cc.mult original value as it can be modified
|
/* save cc.mult original value as it can be modified
|
||||||
|
|
|
@ -1469,7 +1469,7 @@ static struct sk_buff *tun_napi_alloc_frags(struct tun_file *tfile,
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (it->nr_segs > MAX_SKB_FRAGS + 1)
|
if (it->nr_segs > MAX_SKB_FRAGS + 1)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-EMSGSIZE);
|
||||||
|
|
||||||
local_bh_disable();
|
local_bh_disable();
|
||||||
skb = napi_get_frags(&tfile->napi);
|
skb = napi_get_frags(&tfile->napi);
|
||||||
|
|
|
@ -1625,9 +1625,6 @@ static void cdc_ncm_status(struct usbnet *dev, struct urb *urb)
|
||||||
* USB_CDC_NOTIFY_NETWORK_CONNECTION notification shall be
|
* USB_CDC_NOTIFY_NETWORK_CONNECTION notification shall be
|
||||||
* sent by device after USB_CDC_NOTIFY_SPEED_CHANGE.
|
* sent by device after USB_CDC_NOTIFY_SPEED_CHANGE.
|
||||||
*/
|
*/
|
||||||
netif_info(dev, link, dev->net,
|
|
||||||
"network connection: %sconnected\n",
|
|
||||||
!!event->wValue ? "" : "dis");
|
|
||||||
usbnet_link_change(dev, !!event->wValue, 0);
|
usbnet_link_change(dev, !!event->wValue, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1058,6 +1058,7 @@ static const struct usb_device_id products[] = {
|
||||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0125)}, /* Quectel EC25, EC20 R2.0 Mini PCIe */
|
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0125)}, /* Quectel EC25, EC20 R2.0 Mini PCIe */
|
||||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0306)}, /* Quectel EP06/EG06/EM06 */
|
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0306)}, /* Quectel EP06/EG06/EM06 */
|
||||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */
|
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */
|
||||||
|
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0620)}, /* Quectel EM160R-GL */
|
||||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0800)}, /* Quectel RM500Q-GL */
|
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0800)}, /* Quectel RM500Q-GL */
|
||||||
|
|
||||||
/* 3. Combined interface devices matching on interface number */
|
/* 3. Combined interface devices matching on interface number */
|
||||||
|
|
|
@ -2072,14 +2072,16 @@ static int virtnet_set_channels(struct net_device *dev,
|
||||||
|
|
||||||
get_online_cpus();
|
get_online_cpus();
|
||||||
err = _virtnet_set_queues(vi, queue_pairs);
|
err = _virtnet_set_queues(vi, queue_pairs);
|
||||||
if (!err) {
|
if (err) {
|
||||||
netif_set_real_num_tx_queues(dev, queue_pairs);
|
put_online_cpus();
|
||||||
netif_set_real_num_rx_queues(dev, queue_pairs);
|
goto err;
|
||||||
|
|
||||||
virtnet_set_affinity(vi);
|
|
||||||
}
|
}
|
||||||
|
virtnet_set_affinity(vi);
|
||||||
put_online_cpus();
|
put_online_cpus();
|
||||||
|
|
||||||
|
netif_set_real_num_tx_queues(dev, queue_pairs);
|
||||||
|
netif_set_real_num_rx_queues(dev, queue_pairs);
|
||||||
|
err:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -569,6 +569,13 @@ static void ppp_timer(struct timer_list *t)
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&ppp->lock, flags);
|
spin_lock_irqsave(&ppp->lock, flags);
|
||||||
|
/* mod_timer could be called after we entered this function but
|
||||||
|
* before we got the lock.
|
||||||
|
*/
|
||||||
|
if (timer_pending(&proto->timer)) {
|
||||||
|
spin_unlock_irqrestore(&ppp->lock, flags);
|
||||||
|
return;
|
||||||
|
}
|
||||||
switch (proto->state) {
|
switch (proto->state) {
|
||||||
case STOPPING:
|
case STOPPING:
|
||||||
case REQ_SENT:
|
case REQ_SENT:
|
||||||
|
|
|
@ -117,12 +117,16 @@ static int spi_execute(struct scsi_device *sdev, const void *cmd,
|
||||||
sshdr = &sshdr_tmp;
|
sshdr = &sshdr_tmp;
|
||||||
|
|
||||||
for(i = 0; i < DV_RETRIES; i++) {
|
for(i = 0; i < DV_RETRIES; i++) {
|
||||||
|
/*
|
||||||
|
* The purpose of the RQF_PM flag below is to bypass the
|
||||||
|
* SDEV_QUIESCE state.
|
||||||
|
*/
|
||||||
result = scsi_execute(sdev, cmd, dir, buffer, bufflen, sense,
|
result = scsi_execute(sdev, cmd, dir, buffer, bufflen, sense,
|
||||||
sshdr, DV_TIMEOUT, /* retries */ 1,
|
sshdr, DV_TIMEOUT, /* retries */ 1,
|
||||||
REQ_FAILFAST_DEV |
|
REQ_FAILFAST_DEV |
|
||||||
REQ_FAILFAST_TRANSPORT |
|
REQ_FAILFAST_TRANSPORT |
|
||||||
REQ_FAILFAST_DRIVER,
|
REQ_FAILFAST_DRIVER,
|
||||||
0, NULL);
|
RQF_PM, NULL);
|
||||||
if (driver_byte(result) != DRIVER_SENSE ||
|
if (driver_byte(result) != DRIVER_SENSE ||
|
||||||
sshdr->sense_key != UNIT_ATTENTION)
|
sshdr->sense_key != UNIT_ATTENTION)
|
||||||
break;
|
break;
|
||||||
|
@ -1005,23 +1009,26 @@ spi_dv_device(struct scsi_device *sdev)
|
||||||
*/
|
*/
|
||||||
lock_system_sleep();
|
lock_system_sleep();
|
||||||
|
|
||||||
|
if (scsi_autopm_get_device(sdev))
|
||||||
|
goto unlock_system_sleep;
|
||||||
|
|
||||||
if (unlikely(spi_dv_in_progress(starget)))
|
if (unlikely(spi_dv_in_progress(starget)))
|
||||||
goto unlock;
|
goto put_autopm;
|
||||||
|
|
||||||
if (unlikely(scsi_device_get(sdev)))
|
if (unlikely(scsi_device_get(sdev)))
|
||||||
goto unlock;
|
goto put_autopm;
|
||||||
|
|
||||||
spi_dv_in_progress(starget) = 1;
|
spi_dv_in_progress(starget) = 1;
|
||||||
|
|
||||||
buffer = kzalloc(len, GFP_KERNEL);
|
buffer = kzalloc(len, GFP_KERNEL);
|
||||||
|
|
||||||
if (unlikely(!buffer))
|
if (unlikely(!buffer))
|
||||||
goto out_put;
|
goto put_sdev;
|
||||||
|
|
||||||
/* We need to verify that the actual device will quiesce; the
|
/* We need to verify that the actual device will quiesce; the
|
||||||
* later target quiesce is just a nice to have */
|
* later target quiesce is just a nice to have */
|
||||||
if (unlikely(scsi_device_quiesce(sdev)))
|
if (unlikely(scsi_device_quiesce(sdev)))
|
||||||
goto out_free;
|
goto free_buffer;
|
||||||
|
|
||||||
scsi_target_quiesce(starget);
|
scsi_target_quiesce(starget);
|
||||||
|
|
||||||
|
@ -1041,12 +1048,16 @@ spi_dv_device(struct scsi_device *sdev)
|
||||||
|
|
||||||
spi_initial_dv(starget) = 1;
|
spi_initial_dv(starget) = 1;
|
||||||
|
|
||||||
out_free:
|
free_buffer:
|
||||||
kfree(buffer);
|
kfree(buffer);
|
||||||
out_put:
|
|
||||||
|
put_sdev:
|
||||||
spi_dv_in_progress(starget) = 0;
|
spi_dv_in_progress(starget) = 0;
|
||||||
scsi_device_put(sdev);
|
scsi_device_put(sdev);
|
||||||
unlock:
|
put_autopm:
|
||||||
|
scsi_autopm_put_device(sdev);
|
||||||
|
|
||||||
|
unlock_system_sleep:
|
||||||
unlock_system_sleep();
|
unlock_system_sleep();
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(spi_dv_device);
|
EXPORT_SYMBOL(spi_dv_device);
|
||||||
|
|
|
@ -96,6 +96,30 @@ static int ufshcd_pci_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
return ufshcd_system_resume(dev_get_drvdata(dev));
|
return ufshcd_system_resume(dev_get_drvdata(dev));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ufshcd_pci_poweroff - suspend-to-disk poweroff function
|
||||||
|
* @dev: pointer to PCI device handle
|
||||||
|
*
|
||||||
|
* Returns 0 if successful
|
||||||
|
* Returns non-zero otherwise
|
||||||
|
*/
|
||||||
|
static int ufshcd_pci_poweroff(struct device *dev)
|
||||||
|
{
|
||||||
|
struct ufs_hba *hba = dev_get_drvdata(dev);
|
||||||
|
int spm_lvl = hba->spm_lvl;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For poweroff we need to set the UFS device to PowerDown mode.
|
||||||
|
* Force spm_lvl to ensure that.
|
||||||
|
*/
|
||||||
|
hba->spm_lvl = 5;
|
||||||
|
ret = ufshcd_system_suspend(hba);
|
||||||
|
hba->spm_lvl = spm_lvl;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* !CONFIG_PM_SLEEP */
|
#endif /* !CONFIG_PM_SLEEP */
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
|
@ -190,8 +214,14 @@ ufshcd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct dev_pm_ops ufshcd_pci_pm_ops = {
|
static const struct dev_pm_ops ufshcd_pci_pm_ops = {
|
||||||
SET_SYSTEM_SLEEP_PM_OPS(ufshcd_pci_suspend,
|
#ifdef CONFIG_PM_SLEEP
|
||||||
ufshcd_pci_resume)
|
.suspend = ufshcd_pci_suspend,
|
||||||
|
.resume = ufshcd_pci_resume,
|
||||||
|
.freeze = ufshcd_pci_suspend,
|
||||||
|
.thaw = ufshcd_pci_resume,
|
||||||
|
.poweroff = ufshcd_pci_poweroff,
|
||||||
|
.restore = ufshcd_pci_resume,
|
||||||
|
#endif
|
||||||
SET_RUNTIME_PM_OPS(ufshcd_pci_runtime_suspend,
|
SET_RUNTIME_PM_OPS(ufshcd_pci_runtime_suspend,
|
||||||
ufshcd_pci_runtime_resume,
|
ufshcd_pci_runtime_resume,
|
||||||
ufshcd_pci_runtime_idle)
|
ufshcd_pci_runtime_idle)
|
||||||
|
|
|
@ -3593,7 +3593,7 @@ static int ufshcd_dme_enable(struct ufs_hba *hba)
|
||||||
ret = ufshcd_send_uic_cmd(hba, &uic_cmd);
|
ret = ufshcd_send_uic_cmd(hba, &uic_cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
dev_err(hba->dev,
|
dev_err(hba->dev,
|
||||||
"dme-reset: error code %d\n", ret);
|
"dme-enable: error code %d\n", ret);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -714,7 +714,7 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
|
||||||
ret = dma_async_device_register(dd);
|
ret = dma_async_device_register(dd);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "failed to register dma device\n");
|
dev_err(&pdev->dev, "failed to register dma device\n");
|
||||||
return ret;
|
goto err_uninit_hsdma;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = of_dma_controller_register(pdev->dev.of_node,
|
ret = of_dma_controller_register(pdev->dev.of_node,
|
||||||
|
@ -730,6 +730,8 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
err_unregister:
|
err_unregister:
|
||||||
dma_async_device_unregister(dd);
|
dma_async_device_unregister(dd);
|
||||||
|
err_uninit_hsdma:
|
||||||
|
mtk_hsdma_uninit(hsdma);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,61 +46,84 @@ static int target_xcopy_gen_naa_ieee(struct se_device *dev, unsigned char *buf)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct xcopy_dev_search_info {
|
/**
|
||||||
const unsigned char *dev_wwn;
|
* target_xcopy_locate_se_dev_e4_iter - compare XCOPY NAA device identifiers
|
||||||
struct se_device *found_dev;
|
*
|
||||||
};
|
* @se_dev: device being considered for match
|
||||||
|
* @dev_wwn: XCOPY requested NAA dev_wwn
|
||||||
|
* @return: 1 on match, 0 on no-match
|
||||||
|
*/
|
||||||
static int target_xcopy_locate_se_dev_e4_iter(struct se_device *se_dev,
|
static int target_xcopy_locate_se_dev_e4_iter(struct se_device *se_dev,
|
||||||
void *data)
|
const unsigned char *dev_wwn)
|
||||||
{
|
{
|
||||||
struct xcopy_dev_search_info *info = data;
|
|
||||||
unsigned char tmp_dev_wwn[XCOPY_NAA_IEEE_REGEX_LEN];
|
unsigned char tmp_dev_wwn[XCOPY_NAA_IEEE_REGEX_LEN];
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (!se_dev->dev_attrib.emulate_3pc)
|
if (!se_dev->dev_attrib.emulate_3pc) {
|
||||||
|
pr_debug("XCOPY: emulate_3pc disabled on se_dev %p\n", se_dev);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
memset(&tmp_dev_wwn[0], 0, XCOPY_NAA_IEEE_REGEX_LEN);
|
memset(&tmp_dev_wwn[0], 0, XCOPY_NAA_IEEE_REGEX_LEN);
|
||||||
target_xcopy_gen_naa_ieee(se_dev, &tmp_dev_wwn[0]);
|
target_xcopy_gen_naa_ieee(se_dev, &tmp_dev_wwn[0]);
|
||||||
|
|
||||||
rc = memcmp(&tmp_dev_wwn[0], info->dev_wwn, XCOPY_NAA_IEEE_REGEX_LEN);
|
rc = memcmp(&tmp_dev_wwn[0], dev_wwn, XCOPY_NAA_IEEE_REGEX_LEN);
|
||||||
if (rc != 0)
|
if (rc != 0) {
|
||||||
|
pr_debug("XCOPY: skip non-matching: %*ph\n",
|
||||||
|
XCOPY_NAA_IEEE_REGEX_LEN, tmp_dev_wwn);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
info->found_dev = se_dev;
|
|
||||||
pr_debug("XCOPY 0xe4: located se_dev: %p\n", se_dev);
|
pr_debug("XCOPY 0xe4: located se_dev: %p\n", se_dev);
|
||||||
|
|
||||||
rc = target_depend_item(&se_dev->dev_group.cg_item);
|
|
||||||
if (rc != 0) {
|
|
||||||
pr_err("configfs_depend_item attempt failed: %d for se_dev: %p\n",
|
|
||||||
rc, se_dev);
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
pr_debug("Called configfs_depend_item for se_dev: %p se_dev->se_dev_group: %p\n",
|
|
||||||
se_dev, &se_dev->dev_group);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int target_xcopy_locate_se_dev_e4(const unsigned char *dev_wwn,
|
static int target_xcopy_locate_se_dev_e4(struct se_session *sess,
|
||||||
struct se_device **found_dev)
|
const unsigned char *dev_wwn,
|
||||||
|
struct se_device **_found_dev,
|
||||||
|
struct percpu_ref **_found_lun_ref)
|
||||||
{
|
{
|
||||||
struct xcopy_dev_search_info info;
|
struct se_dev_entry *deve;
|
||||||
int ret;
|
struct se_node_acl *nacl;
|
||||||
|
struct se_lun *this_lun = NULL;
|
||||||
|
struct se_device *found_dev = NULL;
|
||||||
|
|
||||||
memset(&info, 0, sizeof(info));
|
/* cmd with NULL sess indicates no associated $FABRIC_MOD */
|
||||||
info.dev_wwn = dev_wwn;
|
if (!sess)
|
||||||
|
goto err_out;
|
||||||
|
|
||||||
ret = target_for_each_device(target_xcopy_locate_se_dev_e4_iter, &info);
|
pr_debug("XCOPY 0xe4: searching for: %*ph\n",
|
||||||
if (ret == 1) {
|
XCOPY_NAA_IEEE_REGEX_LEN, dev_wwn);
|
||||||
*found_dev = info.found_dev;
|
|
||||||
|
nacl = sess->se_node_acl;
|
||||||
|
rcu_read_lock();
|
||||||
|
hlist_for_each_entry_rcu(deve, &nacl->lun_entry_hlist, link) {
|
||||||
|
struct se_device *this_dev;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
this_lun = rcu_dereference(deve->se_lun);
|
||||||
|
this_dev = rcu_dereference_raw(this_lun->lun_se_dev);
|
||||||
|
|
||||||
|
rc = target_xcopy_locate_se_dev_e4_iter(this_dev, dev_wwn);
|
||||||
|
if (rc) {
|
||||||
|
if (percpu_ref_tryget_live(&this_lun->lun_ref))
|
||||||
|
found_dev = this_dev;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rcu_read_unlock();
|
||||||
|
if (found_dev == NULL)
|
||||||
|
goto err_out;
|
||||||
|
|
||||||
|
pr_debug("lun_ref held for se_dev: %p se_dev->se_dev_group: %p\n",
|
||||||
|
found_dev, &found_dev->dev_group);
|
||||||
|
*_found_dev = found_dev;
|
||||||
|
*_found_lun_ref = &this_lun->lun_ref;
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
err_out:
|
||||||
pr_debug_ratelimited("Unable to locate 0xe4 descriptor for EXTENDED_COPY\n");
|
pr_debug_ratelimited("Unable to locate 0xe4 descriptor for EXTENDED_COPY\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static int target_xcopy_parse_tiddesc_e4(struct se_cmd *se_cmd, struct xcopy_op *xop,
|
static int target_xcopy_parse_tiddesc_e4(struct se_cmd *se_cmd, struct xcopy_op *xop,
|
||||||
unsigned char *p, unsigned short cscd_index)
|
unsigned char *p, unsigned short cscd_index)
|
||||||
|
@ -246,12 +269,16 @@ static int target_xcopy_parse_target_descriptors(struct se_cmd *se_cmd,
|
||||||
|
|
||||||
switch (xop->op_origin) {
|
switch (xop->op_origin) {
|
||||||
case XCOL_SOURCE_RECV_OP:
|
case XCOL_SOURCE_RECV_OP:
|
||||||
rc = target_xcopy_locate_se_dev_e4(xop->dst_tid_wwn,
|
rc = target_xcopy_locate_se_dev_e4(se_cmd->se_sess,
|
||||||
&xop->dst_dev);
|
xop->dst_tid_wwn,
|
||||||
|
&xop->dst_dev,
|
||||||
|
&xop->remote_lun_ref);
|
||||||
break;
|
break;
|
||||||
case XCOL_DEST_RECV_OP:
|
case XCOL_DEST_RECV_OP:
|
||||||
rc = target_xcopy_locate_se_dev_e4(xop->src_tid_wwn,
|
rc = target_xcopy_locate_se_dev_e4(se_cmd->se_sess,
|
||||||
&xop->src_dev);
|
xop->src_tid_wwn,
|
||||||
|
&xop->src_dev,
|
||||||
|
&xop->remote_lun_ref);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pr_err("XCOPY CSCD descriptor IDs not found in CSCD list - "
|
pr_err("XCOPY CSCD descriptor IDs not found in CSCD list - "
|
||||||
|
@ -396,18 +423,12 @@ static int xcopy_pt_get_cmd_state(struct se_cmd *se_cmd)
|
||||||
|
|
||||||
static void xcopy_pt_undepend_remotedev(struct xcopy_op *xop)
|
static void xcopy_pt_undepend_remotedev(struct xcopy_op *xop)
|
||||||
{
|
{
|
||||||
struct se_device *remote_dev;
|
|
||||||
|
|
||||||
if (xop->op_origin == XCOL_SOURCE_RECV_OP)
|
if (xop->op_origin == XCOL_SOURCE_RECV_OP)
|
||||||
remote_dev = xop->dst_dev;
|
pr_debug("putting dst lun_ref for %p\n", xop->dst_dev);
|
||||||
else
|
else
|
||||||
remote_dev = xop->src_dev;
|
pr_debug("putting src lun_ref for %p\n", xop->src_dev);
|
||||||
|
|
||||||
pr_debug("Calling configfs_undepend_item for"
|
percpu_ref_put(xop->remote_lun_ref);
|
||||||
" remote_dev: %p remote_dev->dev_group: %p\n",
|
|
||||||
remote_dev, &remote_dev->dev_group.cg_item);
|
|
||||||
|
|
||||||
target_undepend_item(&remote_dev->dev_group.cg_item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xcopy_pt_release_cmd(struct se_cmd *se_cmd)
|
static void xcopy_pt_release_cmd(struct se_cmd *se_cmd)
|
||||||
|
|
|
@ -29,6 +29,7 @@ struct xcopy_op {
|
||||||
struct se_device *dst_dev;
|
struct se_device *dst_dev;
|
||||||
unsigned char dst_tid_wwn[XCOPY_NAA_IEEE_REGEX_LEN];
|
unsigned char dst_tid_wwn[XCOPY_NAA_IEEE_REGEX_LEN];
|
||||||
unsigned char local_dev_wwn[XCOPY_NAA_IEEE_REGEX_LEN];
|
unsigned char local_dev_wwn[XCOPY_NAA_IEEE_REGEX_LEN];
|
||||||
|
struct percpu_ref *remote_lun_ref;
|
||||||
|
|
||||||
sector_t src_lba;
|
sector_t src_lba;
|
||||||
sector_t dst_lba;
|
sector_t dst_lba;
|
||||||
|
|
|
@ -140,9 +140,13 @@ static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev)
|
||||||
misc_pdev = of_find_device_by_node(args.np);
|
misc_pdev = of_find_device_by_node(args.np);
|
||||||
of_node_put(args.np);
|
of_node_put(args.np);
|
||||||
|
|
||||||
if (!misc_pdev || !platform_get_drvdata(misc_pdev))
|
if (!misc_pdev)
|
||||||
return ERR_PTR(-EPROBE_DEFER);
|
return ERR_PTR(-EPROBE_DEFER);
|
||||||
|
|
||||||
|
if (!platform_get_drvdata(misc_pdev)) {
|
||||||
|
put_device(&misc_pdev->dev);
|
||||||
|
return ERR_PTR(-EPROBE_DEFER);
|
||||||
|
}
|
||||||
data->dev = &misc_pdev->dev;
|
data->dev = &misc_pdev->dev;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1907,6 +1907,10 @@ static const struct usb_device_id acm_ids[] = {
|
||||||
{ USB_DEVICE(0x04d8, 0x0083), /* Bootloader mode */
|
{ USB_DEVICE(0x04d8, 0x0083), /* Bootloader mode */
|
||||||
.driver_info = IGNORE_DEVICE,
|
.driver_info = IGNORE_DEVICE,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ USB_DEVICE(0x04d8, 0xf58b),
|
||||||
|
.driver_info = IGNORE_DEVICE,
|
||||||
|
},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*Samsung phone in firmware update mode */
|
/*Samsung phone in firmware update mode */
|
||||||
|
|
|
@ -465,11 +465,21 @@ static int service_outstanding_interrupt(struct wdm_device *desc)
|
||||||
if (!desc->resp_count || !--desc->resp_count)
|
if (!desc->resp_count || !--desc->resp_count)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
if (test_bit(WDM_DISCONNECTING, &desc->flags)) {
|
||||||
|
rv = -ENODEV;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
if (test_bit(WDM_RESETTING, &desc->flags)) {
|
||||||
|
rv = -EIO;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
set_bit(WDM_RESPONDING, &desc->flags);
|
set_bit(WDM_RESPONDING, &desc->flags);
|
||||||
spin_unlock_irq(&desc->iuspin);
|
spin_unlock_irq(&desc->iuspin);
|
||||||
rv = usb_submit_urb(desc->response, GFP_KERNEL);
|
rv = usb_submit_urb(desc->response, GFP_KERNEL);
|
||||||
spin_lock_irq(&desc->iuspin);
|
spin_lock_irq(&desc->iuspin);
|
||||||
if (rv) {
|
if (rv) {
|
||||||
|
if (!test_bit(WDM_DISCONNECTING, &desc->flags))
|
||||||
dev_err(&desc->intf->dev,
|
dev_err(&desc->intf->dev,
|
||||||
"usb_submit_urb failed with result %d\n", rv);
|
"usb_submit_urb failed with result %d\n", rv);
|
||||||
|
|
||||||
|
@ -1026,9 +1036,9 @@ static void wdm_disconnect(struct usb_interface *intf)
|
||||||
wake_up_all(&desc->wait);
|
wake_up_all(&desc->wait);
|
||||||
mutex_lock(&desc->rlock);
|
mutex_lock(&desc->rlock);
|
||||||
mutex_lock(&desc->wlock);
|
mutex_lock(&desc->wlock);
|
||||||
kill_urbs(desc);
|
|
||||||
cancel_work_sync(&desc->rxwork);
|
cancel_work_sync(&desc->rxwork);
|
||||||
cancel_work_sync(&desc->service_outs_intr);
|
cancel_work_sync(&desc->service_outs_intr);
|
||||||
|
kill_urbs(desc);
|
||||||
mutex_unlock(&desc->wlock);
|
mutex_unlock(&desc->wlock);
|
||||||
mutex_unlock(&desc->rlock);
|
mutex_unlock(&desc->rlock);
|
||||||
|
|
||||||
|
|
|
@ -274,8 +274,25 @@ static int usblp_ctrl_msg(struct usblp *usblp, int request, int type, int dir, i
|
||||||
#define usblp_reset(usblp)\
|
#define usblp_reset(usblp)\
|
||||||
usblp_ctrl_msg(usblp, USBLP_REQ_RESET, USB_TYPE_CLASS, USB_DIR_OUT, USB_RECIP_OTHER, 0, NULL, 0)
|
usblp_ctrl_msg(usblp, USBLP_REQ_RESET, USB_TYPE_CLASS, USB_DIR_OUT, USB_RECIP_OTHER, 0, NULL, 0)
|
||||||
|
|
||||||
#define usblp_hp_channel_change_request(usblp, channel, buffer) \
|
static int usblp_hp_channel_change_request(struct usblp *usblp, int channel, u8 *new_channel)
|
||||||
usblp_ctrl_msg(usblp, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, USB_TYPE_VENDOR, USB_DIR_IN, USB_RECIP_INTERFACE, channel, buffer, 1)
|
{
|
||||||
|
u8 *buf;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
buf = kzalloc(1, GFP_KERNEL);
|
||||||
|
if (!buf)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
ret = usblp_ctrl_msg(usblp, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST,
|
||||||
|
USB_TYPE_VENDOR, USB_DIR_IN, USB_RECIP_INTERFACE,
|
||||||
|
channel, buf, 1);
|
||||||
|
if (ret == 0)
|
||||||
|
*new_channel = buf[0];
|
||||||
|
|
||||||
|
kfree(buf);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See the description for usblp_select_alts() below for the usage
|
* See the description for usblp_select_alts() below for the usage
|
||||||
|
|
|
@ -304,6 +304,7 @@
|
||||||
|
|
||||||
/* Global USB2 PHY Vendor Control Register */
|
/* Global USB2 PHY Vendor Control Register */
|
||||||
#define DWC3_GUSB2PHYACC_NEWREGREQ BIT(25)
|
#define DWC3_GUSB2PHYACC_NEWREGREQ BIT(25)
|
||||||
|
#define DWC3_GUSB2PHYACC_DONE BIT(24)
|
||||||
#define DWC3_GUSB2PHYACC_BUSY BIT(23)
|
#define DWC3_GUSB2PHYACC_BUSY BIT(23)
|
||||||
#define DWC3_GUSB2PHYACC_WRITE BIT(22)
|
#define DWC3_GUSB2PHYACC_WRITE BIT(22)
|
||||||
#define DWC3_GUSB2PHYACC_ADDR(n) (n << 16)
|
#define DWC3_GUSB2PHYACC_ADDR(n) (n << 16)
|
||||||
|
|
|
@ -24,7 +24,7 @@ static int dwc3_ulpi_busyloop(struct dwc3 *dwc)
|
||||||
|
|
||||||
while (count--) {
|
while (count--) {
|
||||||
reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYACC(0));
|
reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYACC(0));
|
||||||
if (!(reg & DWC3_GUSB2PHYACC_BUSY))
|
if (reg & DWC3_GUSB2PHYACC_DONE)
|
||||||
return 0;
|
return 0;
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,6 +265,7 @@ config USB_CONFIGFS_NCM
|
||||||
depends on NET
|
depends on NET
|
||||||
select USB_U_ETHER
|
select USB_U_ETHER
|
||||||
select USB_F_NCM
|
select USB_F_NCM
|
||||||
|
select CRC32
|
||||||
help
|
help
|
||||||
NCM is an advanced protocol for Ethernet encapsulation, allows
|
NCM is an advanced protocol for Ethernet encapsulation, allows
|
||||||
grouping of several ethernet frames into one USB transfer and
|
grouping of several ethernet frames into one USB transfer and
|
||||||
|
@ -314,6 +315,7 @@ config USB_CONFIGFS_EEM
|
||||||
depends on NET
|
depends on NET
|
||||||
select USB_U_ETHER
|
select USB_U_ETHER
|
||||||
select USB_F_EEM
|
select USB_F_EEM
|
||||||
|
select CRC32
|
||||||
help
|
help
|
||||||
CDC EEM is a newer USB standard that is somewhat simpler than CDC ECM
|
CDC EEM is a newer USB standard that is somewhat simpler than CDC ECM
|
||||||
and therefore can be supported by more hardware. Technically ECM and
|
and therefore can be supported by more hardware. Technically ECM and
|
||||||
|
|
|
@ -392,8 +392,11 @@ int usb_function_deactivate(struct usb_function *function)
|
||||||
|
|
||||||
spin_lock_irqsave(&cdev->lock, flags);
|
spin_lock_irqsave(&cdev->lock, flags);
|
||||||
|
|
||||||
if (cdev->deactivations == 0)
|
if (cdev->deactivations == 0) {
|
||||||
|
spin_unlock_irqrestore(&cdev->lock, flags);
|
||||||
status = usb_gadget_deactivate(cdev->gadget);
|
status = usb_gadget_deactivate(cdev->gadget);
|
||||||
|
spin_lock_irqsave(&cdev->lock, flags);
|
||||||
|
}
|
||||||
if (status == 0)
|
if (status == 0)
|
||||||
cdev->deactivations++;
|
cdev->deactivations++;
|
||||||
|
|
||||||
|
@ -424,8 +427,11 @@ int usb_function_activate(struct usb_function *function)
|
||||||
status = -EINVAL;
|
status = -EINVAL;
|
||||||
else {
|
else {
|
||||||
cdev->deactivations--;
|
cdev->deactivations--;
|
||||||
if (cdev->deactivations == 0)
|
if (cdev->deactivations == 0) {
|
||||||
|
spin_unlock_irqrestore(&cdev->lock, flags);
|
||||||
status = usb_gadget_activate(cdev->gadget);
|
status = usb_gadget_activate(cdev->gadget);
|
||||||
|
spin_lock_irqsave(&cdev->lock, flags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_irqrestore(&cdev->lock, flags);
|
spin_unlock_irqrestore(&cdev->lock, flags);
|
||||||
|
|
|
@ -233,9 +233,16 @@ static ssize_t gadget_dev_desc_bcdUSB_store(struct config_item *item,
|
||||||
|
|
||||||
static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page)
|
static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page)
|
||||||
{
|
{
|
||||||
char *udc_name = to_gadget_info(item)->composite.gadget_driver.udc_name;
|
struct gadget_info *gi = to_gadget_info(item);
|
||||||
|
char *udc_name;
|
||||||
|
int ret;
|
||||||
|
|
||||||
return sprintf(page, "%s\n", udc_name ?: "");
|
mutex_lock(&gi->lock);
|
||||||
|
udc_name = gi->composite.gadget_driver.udc_name;
|
||||||
|
ret = sprintf(page, "%s\n", udc_name ?: "");
|
||||||
|
mutex_unlock(&gi->lock);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int unregister_gadget(struct gadget_info *gi)
|
static int unregister_gadget(struct gadget_info *gi)
|
||||||
|
@ -1217,9 +1224,9 @@ static void purge_configs_funcs(struct gadget_info *gi)
|
||||||
|
|
||||||
cfg = container_of(c, struct config_usb_cfg, c);
|
cfg = container_of(c, struct config_usb_cfg, c);
|
||||||
|
|
||||||
list_for_each_entry_safe(f, tmp, &c->functions, list) {
|
list_for_each_entry_safe_reverse(f, tmp, &c->functions, list) {
|
||||||
|
|
||||||
list_move_tail(&f->list, &cfg->func_list);
|
list_move(&f->list, &cfg->func_list);
|
||||||
if (f->unbind) {
|
if (f->unbind) {
|
||||||
dev_dbg(&gi->cdev.gadget->dev,
|
dev_dbg(&gi->cdev.gadget->dev,
|
||||||
"unbind function '%s'/%p\n",
|
"unbind function '%s'/%p\n",
|
||||||
|
@ -1505,7 +1512,7 @@ static const struct usb_gadget_driver configfs_driver_template = {
|
||||||
.suspend = configfs_composite_suspend,
|
.suspend = configfs_composite_suspend,
|
||||||
.resume = configfs_composite_resume,
|
.resume = configfs_composite_resume,
|
||||||
|
|
||||||
.max_speed = USB_SPEED_SUPER,
|
.max_speed = USB_SPEED_SUPER_PLUS,
|
||||||
.driver = {
|
.driver = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.name = "configfs-gadget",
|
.name = "configfs-gadget",
|
||||||
|
@ -1545,7 +1552,7 @@ static struct config_group *gadgets_make(
|
||||||
gi->composite.unbind = configfs_do_nothing;
|
gi->composite.unbind = configfs_do_nothing;
|
||||||
gi->composite.suspend = NULL;
|
gi->composite.suspend = NULL;
|
||||||
gi->composite.resume = NULL;
|
gi->composite.resume = NULL;
|
||||||
gi->composite.max_speed = USB_SPEED_SUPER;
|
gi->composite.max_speed = USB_SPEED_SUPER_PLUS;
|
||||||
|
|
||||||
spin_lock_init(&gi->spinlock);
|
spin_lock_init(&gi->spinlock);
|
||||||
mutex_init(&gi->lock);
|
mutex_init(&gi->lock);
|
||||||
|
|
|
@ -1126,6 +1126,7 @@ fail_tx_reqs:
|
||||||
printer_req_free(dev->in_ep, req);
|
printer_req_free(dev->in_ep, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usb_free_all_descriptors(f);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -271,7 +271,7 @@ static struct usb_endpoint_descriptor fs_epout_desc = {
|
||||||
|
|
||||||
.bEndpointAddress = USB_DIR_OUT,
|
.bEndpointAddress = USB_DIR_OUT,
|
||||||
.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
|
.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
|
||||||
.wMaxPacketSize = cpu_to_le16(1023),
|
/* .wMaxPacketSize = DYNAMIC */
|
||||||
.bInterval = 1,
|
.bInterval = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ static struct usb_endpoint_descriptor hs_epout_desc = {
|
||||||
.bDescriptorType = USB_DT_ENDPOINT,
|
.bDescriptorType = USB_DT_ENDPOINT,
|
||||||
|
|
||||||
.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
|
.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
|
||||||
.wMaxPacketSize = cpu_to_le16(1024),
|
/* .wMaxPacketSize = DYNAMIC */
|
||||||
.bInterval = 4,
|
.bInterval = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -348,7 +348,7 @@ static struct usb_endpoint_descriptor fs_epin_desc = {
|
||||||
|
|
||||||
.bEndpointAddress = USB_DIR_IN,
|
.bEndpointAddress = USB_DIR_IN,
|
||||||
.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
|
.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
|
||||||
.wMaxPacketSize = cpu_to_le16(1023),
|
/* .wMaxPacketSize = DYNAMIC */
|
||||||
.bInterval = 1,
|
.bInterval = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -357,7 +357,7 @@ static struct usb_endpoint_descriptor hs_epin_desc = {
|
||||||
.bDescriptorType = USB_DT_ENDPOINT,
|
.bDescriptorType = USB_DT_ENDPOINT,
|
||||||
|
|
||||||
.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
|
.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
|
||||||
.wMaxPacketSize = cpu_to_le16(1024),
|
/* .wMaxPacketSize = DYNAMIC */
|
||||||
.bInterval = 4,
|
.bInterval = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -444,12 +444,28 @@ struct cntrl_range_lay3 {
|
||||||
__le32 dRES;
|
__le32 dRES;
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
static void set_ep_max_packet_size(const struct f_uac2_opts *uac2_opts,
|
static int set_ep_max_packet_size(const struct f_uac2_opts *uac2_opts,
|
||||||
struct usb_endpoint_descriptor *ep_desc,
|
struct usb_endpoint_descriptor *ep_desc,
|
||||||
unsigned int factor, bool is_playback)
|
enum usb_device_speed speed, bool is_playback)
|
||||||
{
|
{
|
||||||
int chmask, srate, ssize;
|
int chmask, srate, ssize;
|
||||||
u16 max_packet_size;
|
u16 max_size_bw, max_size_ep;
|
||||||
|
unsigned int factor;
|
||||||
|
|
||||||
|
switch (speed) {
|
||||||
|
case USB_SPEED_FULL:
|
||||||
|
max_size_ep = 1023;
|
||||||
|
factor = 1000;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case USB_SPEED_HIGH:
|
||||||
|
max_size_ep = 1024;
|
||||||
|
factor = 8000;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_playback) {
|
if (is_playback) {
|
||||||
chmask = uac2_opts->p_chmask;
|
chmask = uac2_opts->p_chmask;
|
||||||
|
@ -461,10 +477,12 @@ static void set_ep_max_packet_size(const struct f_uac2_opts *uac2_opts,
|
||||||
ssize = uac2_opts->c_ssize;
|
ssize = uac2_opts->c_ssize;
|
||||||
}
|
}
|
||||||
|
|
||||||
max_packet_size = num_channels(chmask) * ssize *
|
max_size_bw = num_channels(chmask) * ssize *
|
||||||
DIV_ROUND_UP(srate, factor / (1 << (ep_desc->bInterval - 1)));
|
DIV_ROUND_UP(srate, factor / (1 << (ep_desc->bInterval - 1)));
|
||||||
ep_desc->wMaxPacketSize = cpu_to_le16(min_t(u16, max_packet_size,
|
ep_desc->wMaxPacketSize = cpu_to_le16(min_t(u16, max_size_bw,
|
||||||
le16_to_cpu(ep_desc->wMaxPacketSize)));
|
max_size_ep));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Use macro to overcome line length limitation */
|
/* Use macro to overcome line length limitation */
|
||||||
|
@ -670,10 +688,33 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate wMaxPacketSize according to audio bandwidth */
|
/* Calculate wMaxPacketSize according to audio bandwidth */
|
||||||
set_ep_max_packet_size(uac2_opts, &fs_epin_desc, 1000, true);
|
ret = set_ep_max_packet_size(uac2_opts, &fs_epin_desc, USB_SPEED_FULL,
|
||||||
set_ep_max_packet_size(uac2_opts, &fs_epout_desc, 1000, false);
|
true);
|
||||||
set_ep_max_packet_size(uac2_opts, &hs_epin_desc, 8000, true);
|
if (ret < 0) {
|
||||||
set_ep_max_packet_size(uac2_opts, &hs_epout_desc, 8000, false);
|
dev_err(dev, "%s:%d Error!\n", __func__, __LINE__);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = set_ep_max_packet_size(uac2_opts, &fs_epout_desc, USB_SPEED_FULL,
|
||||||
|
false);
|
||||||
|
if (ret < 0) {
|
||||||
|
dev_err(dev, "%s:%d Error!\n", __func__, __LINE__);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = set_ep_max_packet_size(uac2_opts, &hs_epin_desc, USB_SPEED_HIGH,
|
||||||
|
true);
|
||||||
|
if (ret < 0) {
|
||||||
|
dev_err(dev, "%s:%d Error!\n", __func__, __LINE__);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = set_ep_max_packet_size(uac2_opts, &hs_epout_desc, USB_SPEED_HIGH,
|
||||||
|
false);
|
||||||
|
if (ret < 0) {
|
||||||
|
dev_err(dev, "%s:%d Error!\n", __func__, __LINE__);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
if (EPOUT_EN(uac2_opts)) {
|
if (EPOUT_EN(uac2_opts)) {
|
||||||
agdev->out_ep = usb_ep_autoconfig(gadget, &fs_epout_desc);
|
agdev->out_ep = usb_ep_autoconfig(gadget, &fs_epout_desc);
|
||||||
|
|
|
@ -45,9 +45,10 @@
|
||||||
#define UETH__VERSION "29-May-2008"
|
#define UETH__VERSION "29-May-2008"
|
||||||
|
|
||||||
/* Experiments show that both Linux and Windows hosts allow up to 16k
|
/* Experiments show that both Linux and Windows hosts allow up to 16k
|
||||||
* frame sizes. Set the max size to 15k+52 to prevent allocating 32k
|
* frame sizes. Set the max MTU size to 15k+52 to prevent allocating 32k
|
||||||
* blocks and still have efficient handling. */
|
* blocks and still have efficient handling. */
|
||||||
#define GETHER_MAX_ETH_FRAME_LEN 15412
|
#define GETHER_MAX_MTU_SIZE 15412
|
||||||
|
#define GETHER_MAX_ETH_FRAME_LEN (GETHER_MAX_MTU_SIZE + ETH_HLEN)
|
||||||
|
|
||||||
struct eth_dev {
|
struct eth_dev {
|
||||||
/* lock is held while accessing port_usb
|
/* lock is held while accessing port_usb
|
||||||
|
@ -786,7 +787,7 @@ struct eth_dev *gether_setup_name(struct usb_gadget *g,
|
||||||
|
|
||||||
/* MTU range: 14 - 15412 */
|
/* MTU range: 14 - 15412 */
|
||||||
net->min_mtu = ETH_HLEN;
|
net->min_mtu = ETH_HLEN;
|
||||||
net->max_mtu = GETHER_MAX_ETH_FRAME_LEN;
|
net->max_mtu = GETHER_MAX_MTU_SIZE;
|
||||||
|
|
||||||
dev->gadget = g;
|
dev->gadget = g;
|
||||||
SET_NETDEV_DEV(net, &g->dev);
|
SET_NETDEV_DEV(net, &g->dev);
|
||||||
|
@ -848,7 +849,7 @@ struct net_device *gether_setup_name_default(const char *netname)
|
||||||
|
|
||||||
/* MTU range: 14 - 15412 */
|
/* MTU range: 14 - 15412 */
|
||||||
net->min_mtu = ETH_HLEN;
|
net->min_mtu = ETH_HLEN;
|
||||||
net->max_mtu = GETHER_MAX_ETH_FRAME_LEN;
|
net->max_mtu = GETHER_MAX_MTU_SIZE;
|
||||||
|
|
||||||
return net;
|
return net;
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,8 +203,10 @@ static int acm_ms_bind(struct usb_composite_dev *cdev)
|
||||||
struct usb_descriptor_header *usb_desc;
|
struct usb_descriptor_header *usb_desc;
|
||||||
|
|
||||||
usb_desc = usb_otg_descriptor_alloc(gadget);
|
usb_desc = usb_otg_descriptor_alloc(gadget);
|
||||||
if (!usb_desc)
|
if (!usb_desc) {
|
||||||
|
status = -ENOMEM;
|
||||||
goto fail_string_ids;
|
goto fail_string_ids;
|
||||||
|
}
|
||||||
usb_otg_descriptor_init(gadget, usb_desc);
|
usb_otg_descriptor_init(gadget, usb_desc);
|
||||||
otg_desc[0] = usb_desc;
|
otg_desc[0] = usb_desc;
|
||||||
otg_desc[1] = NULL;
|
otg_desc[1] = NULL;
|
||||||
|
|
|
@ -4642,19 +4642,19 @@ static u16 xhci_calculate_u1_timeout(struct xhci_hcd *xhci,
|
||||||
{
|
{
|
||||||
unsigned long long timeout_ns;
|
unsigned long long timeout_ns;
|
||||||
|
|
||||||
/* Prevent U1 if service interval is shorter than U1 exit latency */
|
|
||||||
if (usb_endpoint_xfer_int(desc) || usb_endpoint_xfer_isoc(desc)) {
|
|
||||||
if (xhci_service_interval_to_ns(desc) <= udev->u1_params.mel) {
|
|
||||||
dev_dbg(&udev->dev, "Disable U1, ESIT shorter than exit latency\n");
|
|
||||||
return USB3_LPM_DISABLED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (xhci->quirks & XHCI_INTEL_HOST)
|
if (xhci->quirks & XHCI_INTEL_HOST)
|
||||||
timeout_ns = xhci_calculate_intel_u1_timeout(udev, desc);
|
timeout_ns = xhci_calculate_intel_u1_timeout(udev, desc);
|
||||||
else
|
else
|
||||||
timeout_ns = udev->u1_params.sel;
|
timeout_ns = udev->u1_params.sel;
|
||||||
|
|
||||||
|
/* Prevent U1 if service interval is shorter than U1 exit latency */
|
||||||
|
if (usb_endpoint_xfer_int(desc) || usb_endpoint_xfer_isoc(desc)) {
|
||||||
|
if (xhci_service_interval_to_ns(desc) <= timeout_ns) {
|
||||||
|
dev_dbg(&udev->dev, "Disable U1, ESIT shorter than exit latency\n");
|
||||||
|
return USB3_LPM_DISABLED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* The U1 timeout is encoded in 1us intervals.
|
/* The U1 timeout is encoded in 1us intervals.
|
||||||
* Don't return a timeout of zero, because that's USB3_LPM_DISABLED.
|
* Don't return a timeout of zero, because that's USB3_LPM_DISABLED.
|
||||||
*/
|
*/
|
||||||
|
@ -4706,19 +4706,19 @@ static u16 xhci_calculate_u2_timeout(struct xhci_hcd *xhci,
|
||||||
{
|
{
|
||||||
unsigned long long timeout_ns;
|
unsigned long long timeout_ns;
|
||||||
|
|
||||||
/* Prevent U2 if service interval is shorter than U2 exit latency */
|
|
||||||
if (usb_endpoint_xfer_int(desc) || usb_endpoint_xfer_isoc(desc)) {
|
|
||||||
if (xhci_service_interval_to_ns(desc) <= udev->u2_params.mel) {
|
|
||||||
dev_dbg(&udev->dev, "Disable U2, ESIT shorter than exit latency\n");
|
|
||||||
return USB3_LPM_DISABLED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (xhci->quirks & XHCI_INTEL_HOST)
|
if (xhci->quirks & XHCI_INTEL_HOST)
|
||||||
timeout_ns = xhci_calculate_intel_u2_timeout(udev, desc);
|
timeout_ns = xhci_calculate_intel_u2_timeout(udev, desc);
|
||||||
else
|
else
|
||||||
timeout_ns = udev->u2_params.sel;
|
timeout_ns = udev->u2_params.sel;
|
||||||
|
|
||||||
|
/* Prevent U2 if service interval is shorter than U2 exit latency */
|
||||||
|
if (usb_endpoint_xfer_int(desc) || usb_endpoint_xfer_isoc(desc)) {
|
||||||
|
if (xhci_service_interval_to_ns(desc) <= timeout_ns) {
|
||||||
|
dev_dbg(&udev->dev, "Disable U2, ESIT shorter than exit latency\n");
|
||||||
|
return USB3_LPM_DISABLED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* The U2 timeout is encoded in 256us intervals */
|
/* The U2 timeout is encoded in 256us intervals */
|
||||||
timeout_ns = DIV_ROUND_UP_ULL(timeout_ns, 256 * 1000);
|
timeout_ns = DIV_ROUND_UP_ULL(timeout_ns, 256 * 1000);
|
||||||
/* If the necessary timeout value is bigger than what we can set in the
|
/* If the necessary timeout value is bigger than what we can set in the
|
||||||
|
|
|
@ -497,6 +497,9 @@ static ssize_t yurex_write(struct file *file, const char __user *user_buffer,
|
||||||
timeout = schedule_timeout(YUREX_WRITE_TIMEOUT);
|
timeout = schedule_timeout(YUREX_WRITE_TIMEOUT);
|
||||||
finish_wait(&dev->waitq, &wait);
|
finish_wait(&dev->waitq, &wait);
|
||||||
|
|
||||||
|
/* make sure URB is idle after timeout or (spurious) CMD_ACK */
|
||||||
|
usb_kill_urb(dev->cntl_urb);
|
||||||
|
|
||||||
mutex_unlock(&dev->io_mutex);
|
mutex_unlock(&dev->io_mutex);
|
||||||
|
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
|
|
|
@ -536,23 +536,29 @@ static int iuu_uart_flush(struct usb_serial_port *port)
|
||||||
struct device *dev = &port->dev;
|
struct device *dev = &port->dev;
|
||||||
int i;
|
int i;
|
||||||
int status;
|
int status;
|
||||||
u8 rxcmd = IUU_UART_RX;
|
u8 *rxcmd;
|
||||||
struct iuu_private *priv = usb_get_serial_port_data(port);
|
struct iuu_private *priv = usb_get_serial_port_data(port);
|
||||||
|
|
||||||
if (iuu_led(port, 0xF000, 0, 0, 0xFF) < 0)
|
if (iuu_led(port, 0xF000, 0, 0, 0xFF) < 0)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
|
rxcmd = kmalloc(1, GFP_KERNEL);
|
||||||
|
if (!rxcmd)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
rxcmd[0] = IUU_UART_RX;
|
||||||
|
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
status = bulk_immediate(port, &rxcmd, 1);
|
status = bulk_immediate(port, rxcmd, 1);
|
||||||
if (status != IUU_OPERATION_OK) {
|
if (status != IUU_OPERATION_OK) {
|
||||||
dev_dbg(dev, "%s - uart_flush_write error\n", __func__);
|
dev_dbg(dev, "%s - uart_flush_write error\n", __func__);
|
||||||
return status;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = read_immediate(port, &priv->len, 1);
|
status = read_immediate(port, &priv->len, 1);
|
||||||
if (status != IUU_OPERATION_OK) {
|
if (status != IUU_OPERATION_OK) {
|
||||||
dev_dbg(dev, "%s - uart_flush_read error\n", __func__);
|
dev_dbg(dev, "%s - uart_flush_read error\n", __func__);
|
||||||
return status;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->len > 0) {
|
if (priv->len > 0) {
|
||||||
|
@ -560,12 +566,16 @@ static int iuu_uart_flush(struct usb_serial_port *port)
|
||||||
status = read_immediate(port, priv->buf, priv->len);
|
status = read_immediate(port, priv->buf, priv->len);
|
||||||
if (status != IUU_OPERATION_OK) {
|
if (status != IUU_OPERATION_OK) {
|
||||||
dev_dbg(dev, "%s - uart_flush_read error\n", __func__);
|
dev_dbg(dev, "%s - uart_flush_read error\n", __func__);
|
||||||
return status;
|
goto out_free;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dev_dbg(dev, "%s - uart_flush_read OK!\n", __func__);
|
dev_dbg(dev, "%s - uart_flush_read OK!\n", __func__);
|
||||||
iuu_led(port, 0, 0xF000, 0, 0xFF);
|
iuu_led(port, 0, 0xF000, 0, 0xFF);
|
||||||
|
|
||||||
|
out_free:
|
||||||
|
kfree(rxcmd);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -555,10 +555,8 @@ exit:
|
||||||
static void keyspan_pda_write_bulk_callback(struct urb *urb)
|
static void keyspan_pda_write_bulk_callback(struct urb *urb)
|
||||||
{
|
{
|
||||||
struct usb_serial_port *port = urb->context;
|
struct usb_serial_port *port = urb->context;
|
||||||
struct keyspan_pda_private *priv;
|
|
||||||
|
|
||||||
set_bit(0, &port->write_urbs_free);
|
set_bit(0, &port->write_urbs_free);
|
||||||
priv = usb_get_serial_port_data(port);
|
|
||||||
|
|
||||||
/* queue up a wakeup at scheduler time */
|
/* queue up a wakeup at scheduler time */
|
||||||
usb_serial_port_softint(port);
|
usb_serial_port_softint(port);
|
||||||
|
|
|
@ -1117,6 +1117,8 @@ static const struct usb_device_id option_ids[] = {
|
||||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0xff, 0xff),
|
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0xff, 0xff),
|
||||||
.driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
|
.driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
|
||||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) },
|
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) },
|
||||||
|
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0620, 0xff, 0xff, 0x30) }, /* EM160R-GL */
|
||||||
|
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0620, 0xff, 0, 0) },
|
||||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x30) },
|
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x30) },
|
||||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) },
|
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) },
|
||||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10),
|
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10),
|
||||||
|
@ -2057,6 +2059,7 @@ static const struct usb_device_id option_ids[] = {
|
||||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */
|
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */
|
||||||
.driver_info = RSVD(6) },
|
.driver_info = RSVD(6) },
|
||||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */
|
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */
|
||||||
|
{ USB_DEVICE_INTERFACE_CLASS(0x2df3, 0x9d03, 0xff) }, /* LongSung M5710 */
|
||||||
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */
|
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */
|
||||||
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */
|
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */
|
||||||
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */
|
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */
|
||||||
|
|
|
@ -90,6 +90,13 @@ UNUSUAL_DEV(0x152d, 0x0578, 0x0000, 0x9999,
|
||||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||||
US_FL_BROKEN_FUA),
|
US_FL_BROKEN_FUA),
|
||||||
|
|
||||||
|
/* Reported-by: Thinh Nguyen <thinhn@synopsys.com> */
|
||||||
|
UNUSUAL_DEV(0x154b, 0xf00b, 0x0000, 0x9999,
|
||||||
|
"PNY",
|
||||||
|
"Pro Elite SSD",
|
||||||
|
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||||
|
US_FL_NO_ATA_1X),
|
||||||
|
|
||||||
/* Reported-by: Thinh Nguyen <thinhn@synopsys.com> */
|
/* Reported-by: Thinh Nguyen <thinhn@synopsys.com> */
|
||||||
UNUSUAL_DEV(0x154b, 0xf00d, 0x0000, 0x9999,
|
UNUSUAL_DEV(0x154b, 0xf00d, 0x0000, 0x9999,
|
||||||
"PNY",
|
"PNY",
|
||||||
|
|
|
@ -396,6 +396,8 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
|
||||||
default:
|
default:
|
||||||
usbip_dbg_vhci_rh(" ClearPortFeature: default %x\n",
|
usbip_dbg_vhci_rh(" ClearPortFeature: default %x\n",
|
||||||
wValue);
|
wValue);
|
||||||
|
if (wValue >= 32)
|
||||||
|
goto error;
|
||||||
vhci_hcd->port_status[rhport] &= ~(1 << wValue);
|
vhci_hcd->port_status[rhport] &= ~(1 << wValue);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -860,6 +860,7 @@ static void handle_tx_zerocopy(struct vhost_net *net, struct socket *sock)
|
||||||
size_t len, total_len = 0;
|
size_t len, total_len = 0;
|
||||||
int err;
|
int err;
|
||||||
struct vhost_net_ubuf_ref *uninitialized_var(ubufs);
|
struct vhost_net_ubuf_ref *uninitialized_var(ubufs);
|
||||||
|
struct ubuf_info *ubuf;
|
||||||
bool zcopy_used;
|
bool zcopy_used;
|
||||||
int sent_pkts = 0;
|
int sent_pkts = 0;
|
||||||
|
|
||||||
|
@ -892,9 +893,7 @@ static void handle_tx_zerocopy(struct vhost_net *net, struct socket *sock)
|
||||||
|
|
||||||
/* use msg_control to pass vhost zerocopy ubuf info to skb */
|
/* use msg_control to pass vhost zerocopy ubuf info to skb */
|
||||||
if (zcopy_used) {
|
if (zcopy_used) {
|
||||||
struct ubuf_info *ubuf;
|
|
||||||
ubuf = nvq->ubuf_info + nvq->upend_idx;
|
ubuf = nvq->ubuf_info + nvq->upend_idx;
|
||||||
|
|
||||||
vq->heads[nvq->upend_idx].id = cpu_to_vhost32(vq, head);
|
vq->heads[nvq->upend_idx].id = cpu_to_vhost32(vq, head);
|
||||||
vq->heads[nvq->upend_idx].len = VHOST_DMA_IN_PROGRESS;
|
vq->heads[nvq->upend_idx].len = VHOST_DMA_IN_PROGRESS;
|
||||||
ubuf->callback = vhost_zerocopy_callback;
|
ubuf->callback = vhost_zerocopy_callback;
|
||||||
|
@ -924,6 +923,7 @@ static void handle_tx_zerocopy(struct vhost_net *net, struct socket *sock)
|
||||||
err = sock->ops->sendmsg(sock, &msg, len);
|
err = sock->ops->sendmsg(sock, &msg, len);
|
||||||
if (unlikely(err < 0)) {
|
if (unlikely(err < 0)) {
|
||||||
if (zcopy_used) {
|
if (zcopy_used) {
|
||||||
|
if (vq->heads[ubuf->desc].len == VHOST_DMA_IN_PROGRESS)
|
||||||
vhost_net_ubuf_put(ubufs);
|
vhost_net_ubuf_put(ubufs);
|
||||||
nvq->upend_idx = ((unsigned)nvq->upend_idx - 1)
|
nvq->upend_idx = ((unsigned)nvq->upend_idx - 1)
|
||||||
% UIO_MAXIOV;
|
% UIO_MAXIOV;
|
||||||
|
|
|
@ -704,11 +704,9 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Map the VRAM cacheable for performance. This is also required for
|
* Map the VRAM cacheable for performance.
|
||||||
* VM Connect to display properly for ARM64 Linux VM, as the host also
|
|
||||||
* maps the VRAM cacheable.
|
|
||||||
*/
|
*/
|
||||||
fb_virt = ioremap_cache(par->mem->start, screen_fb_size);
|
fb_virt = ioremap_wc(par->mem->start, screen_fb_size);
|
||||||
if (!fb_virt)
|
if (!fb_virt)
|
||||||
goto err2;
|
goto err2;
|
||||||
|
|
||||||
|
|
|
@ -238,6 +238,7 @@ struct waiting_dir_move {
|
||||||
* after this directory is moved, we can try to rmdir the ino rmdir_ino.
|
* after this directory is moved, we can try to rmdir the ino rmdir_ino.
|
||||||
*/
|
*/
|
||||||
u64 rmdir_ino;
|
u64 rmdir_ino;
|
||||||
|
u64 rmdir_gen;
|
||||||
bool orphanized;
|
bool orphanized;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -323,7 +324,7 @@ static int is_waiting_for_move(struct send_ctx *sctx, u64 ino);
|
||||||
static struct waiting_dir_move *
|
static struct waiting_dir_move *
|
||||||
get_waiting_dir_move(struct send_ctx *sctx, u64 ino);
|
get_waiting_dir_move(struct send_ctx *sctx, u64 ino);
|
||||||
|
|
||||||
static int is_waiting_for_rm(struct send_ctx *sctx, u64 dir_ino);
|
static int is_waiting_for_rm(struct send_ctx *sctx, u64 dir_ino, u64 gen);
|
||||||
|
|
||||||
static int need_send_hole(struct send_ctx *sctx)
|
static int need_send_hole(struct send_ctx *sctx)
|
||||||
{
|
{
|
||||||
|
@ -2306,7 +2307,7 @@ static int get_cur_path(struct send_ctx *sctx, u64 ino, u64 gen,
|
||||||
|
|
||||||
fs_path_reset(name);
|
fs_path_reset(name);
|
||||||
|
|
||||||
if (is_waiting_for_rm(sctx, ino)) {
|
if (is_waiting_for_rm(sctx, ino, gen)) {
|
||||||
ret = gen_unique_name(sctx, ino, gen, name);
|
ret = gen_unique_name(sctx, ino, gen, name);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -2865,8 +2866,8 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct orphan_dir_info *
|
static struct orphan_dir_info *add_orphan_dir_info(struct send_ctx *sctx,
|
||||||
add_orphan_dir_info(struct send_ctx *sctx, u64 dir_ino)
|
u64 dir_ino, u64 dir_gen)
|
||||||
{
|
{
|
||||||
struct rb_node **p = &sctx->orphan_dirs.rb_node;
|
struct rb_node **p = &sctx->orphan_dirs.rb_node;
|
||||||
struct rb_node *parent = NULL;
|
struct rb_node *parent = NULL;
|
||||||
|
@ -2875,20 +2876,23 @@ add_orphan_dir_info(struct send_ctx *sctx, u64 dir_ino)
|
||||||
while (*p) {
|
while (*p) {
|
||||||
parent = *p;
|
parent = *p;
|
||||||
entry = rb_entry(parent, struct orphan_dir_info, node);
|
entry = rb_entry(parent, struct orphan_dir_info, node);
|
||||||
if (dir_ino < entry->ino) {
|
if (dir_ino < entry->ino)
|
||||||
p = &(*p)->rb_left;
|
p = &(*p)->rb_left;
|
||||||
} else if (dir_ino > entry->ino) {
|
else if (dir_ino > entry->ino)
|
||||||
p = &(*p)->rb_right;
|
p = &(*p)->rb_right;
|
||||||
} else {
|
else if (dir_gen < entry->gen)
|
||||||
|
p = &(*p)->rb_left;
|
||||||
|
else if (dir_gen > entry->gen)
|
||||||
|
p = &(*p)->rb_right;
|
||||||
|
else
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
odi = kmalloc(sizeof(*odi), GFP_KERNEL);
|
odi = kmalloc(sizeof(*odi), GFP_KERNEL);
|
||||||
if (!odi)
|
if (!odi)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
odi->ino = dir_ino;
|
odi->ino = dir_ino;
|
||||||
odi->gen = 0;
|
odi->gen = dir_gen;
|
||||||
odi->last_dir_index_offset = 0;
|
odi->last_dir_index_offset = 0;
|
||||||
|
|
||||||
rb_link_node(&odi->node, parent, p);
|
rb_link_node(&odi->node, parent, p);
|
||||||
|
@ -2896,8 +2900,8 @@ add_orphan_dir_info(struct send_ctx *sctx, u64 dir_ino)
|
||||||
return odi;
|
return odi;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct orphan_dir_info *
|
static struct orphan_dir_info *get_orphan_dir_info(struct send_ctx *sctx,
|
||||||
get_orphan_dir_info(struct send_ctx *sctx, u64 dir_ino)
|
u64 dir_ino, u64 gen)
|
||||||
{
|
{
|
||||||
struct rb_node *n = sctx->orphan_dirs.rb_node;
|
struct rb_node *n = sctx->orphan_dirs.rb_node;
|
||||||
struct orphan_dir_info *entry;
|
struct orphan_dir_info *entry;
|
||||||
|
@ -2908,15 +2912,19 @@ get_orphan_dir_info(struct send_ctx *sctx, u64 dir_ino)
|
||||||
n = n->rb_left;
|
n = n->rb_left;
|
||||||
else if (dir_ino > entry->ino)
|
else if (dir_ino > entry->ino)
|
||||||
n = n->rb_right;
|
n = n->rb_right;
|
||||||
|
else if (gen < entry->gen)
|
||||||
|
n = n->rb_left;
|
||||||
|
else if (gen > entry->gen)
|
||||||
|
n = n->rb_right;
|
||||||
else
|
else
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int is_waiting_for_rm(struct send_ctx *sctx, u64 dir_ino)
|
static int is_waiting_for_rm(struct send_ctx *sctx, u64 dir_ino, u64 gen)
|
||||||
{
|
{
|
||||||
struct orphan_dir_info *odi = get_orphan_dir_info(sctx, dir_ino);
|
struct orphan_dir_info *odi = get_orphan_dir_info(sctx, dir_ino, gen);
|
||||||
|
|
||||||
return odi != NULL;
|
return odi != NULL;
|
||||||
}
|
}
|
||||||
|
@ -2961,7 +2969,7 @@ static int can_rmdir(struct send_ctx *sctx, u64 dir, u64 dir_gen,
|
||||||
key.type = BTRFS_DIR_INDEX_KEY;
|
key.type = BTRFS_DIR_INDEX_KEY;
|
||||||
key.offset = 0;
|
key.offset = 0;
|
||||||
|
|
||||||
odi = get_orphan_dir_info(sctx, dir);
|
odi = get_orphan_dir_info(sctx, dir, dir_gen);
|
||||||
if (odi)
|
if (odi)
|
||||||
key.offset = odi->last_dir_index_offset;
|
key.offset = odi->last_dir_index_offset;
|
||||||
|
|
||||||
|
@ -2992,7 +3000,7 @@ static int can_rmdir(struct send_ctx *sctx, u64 dir, u64 dir_gen,
|
||||||
|
|
||||||
dm = get_waiting_dir_move(sctx, loc.objectid);
|
dm = get_waiting_dir_move(sctx, loc.objectid);
|
||||||
if (dm) {
|
if (dm) {
|
||||||
odi = add_orphan_dir_info(sctx, dir);
|
odi = add_orphan_dir_info(sctx, dir, dir_gen);
|
||||||
if (IS_ERR(odi)) {
|
if (IS_ERR(odi)) {
|
||||||
ret = PTR_ERR(odi);
|
ret = PTR_ERR(odi);
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -3000,12 +3008,13 @@ static int can_rmdir(struct send_ctx *sctx, u64 dir, u64 dir_gen,
|
||||||
odi->gen = dir_gen;
|
odi->gen = dir_gen;
|
||||||
odi->last_dir_index_offset = found_key.offset;
|
odi->last_dir_index_offset = found_key.offset;
|
||||||
dm->rmdir_ino = dir;
|
dm->rmdir_ino = dir;
|
||||||
|
dm->rmdir_gen = dir_gen;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loc.objectid > send_progress) {
|
if (loc.objectid > send_progress) {
|
||||||
odi = add_orphan_dir_info(sctx, dir);
|
odi = add_orphan_dir_info(sctx, dir, dir_gen);
|
||||||
if (IS_ERR(odi)) {
|
if (IS_ERR(odi)) {
|
||||||
ret = PTR_ERR(odi);
|
ret = PTR_ERR(odi);
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -3045,6 +3054,7 @@ static int add_waiting_dir_move(struct send_ctx *sctx, u64 ino, bool orphanized)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
dm->ino = ino;
|
dm->ino = ino;
|
||||||
dm->rmdir_ino = 0;
|
dm->rmdir_ino = 0;
|
||||||
|
dm->rmdir_gen = 0;
|
||||||
dm->orphanized = orphanized;
|
dm->orphanized = orphanized;
|
||||||
|
|
||||||
while (*p) {
|
while (*p) {
|
||||||
|
@ -3190,7 +3200,7 @@ static int path_loop(struct send_ctx *sctx, struct fs_path *name,
|
||||||
while (ino != BTRFS_FIRST_FREE_OBJECTID) {
|
while (ino != BTRFS_FIRST_FREE_OBJECTID) {
|
||||||
fs_path_reset(name);
|
fs_path_reset(name);
|
||||||
|
|
||||||
if (is_waiting_for_rm(sctx, ino))
|
if (is_waiting_for_rm(sctx, ino, gen))
|
||||||
break;
|
break;
|
||||||
if (is_waiting_for_move(sctx, ino)) {
|
if (is_waiting_for_move(sctx, ino)) {
|
||||||
if (*ancestor_ino == 0)
|
if (*ancestor_ino == 0)
|
||||||
|
@ -3230,6 +3240,7 @@ static int apply_dir_move(struct send_ctx *sctx, struct pending_dir_move *pm)
|
||||||
u64 parent_ino, parent_gen;
|
u64 parent_ino, parent_gen;
|
||||||
struct waiting_dir_move *dm = NULL;
|
struct waiting_dir_move *dm = NULL;
|
||||||
u64 rmdir_ino = 0;
|
u64 rmdir_ino = 0;
|
||||||
|
u64 rmdir_gen;
|
||||||
u64 ancestor;
|
u64 ancestor;
|
||||||
bool is_orphan;
|
bool is_orphan;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -3244,6 +3255,7 @@ static int apply_dir_move(struct send_ctx *sctx, struct pending_dir_move *pm)
|
||||||
dm = get_waiting_dir_move(sctx, pm->ino);
|
dm = get_waiting_dir_move(sctx, pm->ino);
|
||||||
ASSERT(dm);
|
ASSERT(dm);
|
||||||
rmdir_ino = dm->rmdir_ino;
|
rmdir_ino = dm->rmdir_ino;
|
||||||
|
rmdir_gen = dm->rmdir_gen;
|
||||||
is_orphan = dm->orphanized;
|
is_orphan = dm->orphanized;
|
||||||
free_waiting_dir_move(sctx, dm);
|
free_waiting_dir_move(sctx, dm);
|
||||||
|
|
||||||
|
@ -3280,6 +3292,7 @@ static int apply_dir_move(struct send_ctx *sctx, struct pending_dir_move *pm)
|
||||||
dm = get_waiting_dir_move(sctx, pm->ino);
|
dm = get_waiting_dir_move(sctx, pm->ino);
|
||||||
ASSERT(dm);
|
ASSERT(dm);
|
||||||
dm->rmdir_ino = rmdir_ino;
|
dm->rmdir_ino = rmdir_ino;
|
||||||
|
dm->rmdir_gen = rmdir_gen;
|
||||||
}
|
}
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -3298,7 +3311,7 @@ static int apply_dir_move(struct send_ctx *sctx, struct pending_dir_move *pm)
|
||||||
struct orphan_dir_info *odi;
|
struct orphan_dir_info *odi;
|
||||||
u64 gen;
|
u64 gen;
|
||||||
|
|
||||||
odi = get_orphan_dir_info(sctx, rmdir_ino);
|
odi = get_orphan_dir_info(sctx, rmdir_ino, rmdir_gen);
|
||||||
if (!odi) {
|
if (!odi) {
|
||||||
/* already deleted */
|
/* already deleted */
|
||||||
goto finish;
|
goto finish;
|
||||||
|
|
|
@ -138,8 +138,12 @@ static int proc_getattr(const struct path *path, struct kstat *stat,
|
||||||
{
|
{
|
||||||
struct inode *inode = d_inode(path->dentry);
|
struct inode *inode = d_inode(path->dentry);
|
||||||
struct proc_dir_entry *de = PDE(inode);
|
struct proc_dir_entry *de = PDE(inode);
|
||||||
if (de && de->nlink)
|
if (de) {
|
||||||
set_nlink(inode, de->nlink);
|
nlink_t nlink = READ_ONCE(de->nlink);
|
||||||
|
if (nlink > 0) {
|
||||||
|
set_nlink(inode, nlink);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
generic_fillattr(inode, stat);
|
generic_fillattr(inode, stat);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -338,6 +342,16 @@ static const struct file_operations proc_dir_operations = {
|
||||||
.iterate_shared = proc_readdir,
|
.iterate_shared = proc_readdir,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int proc_net_d_revalidate(struct dentry *dentry, unsigned int flags)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const struct dentry_operations proc_net_dentry_ops = {
|
||||||
|
.d_revalidate = proc_net_d_revalidate,
|
||||||
|
.d_delete = always_delete_dentry,
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* proc directories can do almost nothing..
|
* proc directories can do almost nothing..
|
||||||
*/
|
*/
|
||||||
|
@ -362,6 +376,7 @@ struct proc_dir_entry *proc_register(struct proc_dir_entry *dir,
|
||||||
write_unlock(&proc_subdir_lock);
|
write_unlock(&proc_subdir_lock);
|
||||||
goto out_free_inum;
|
goto out_free_inum;
|
||||||
}
|
}
|
||||||
|
dir->nlink++;
|
||||||
write_unlock(&proc_subdir_lock);
|
write_unlock(&proc_subdir_lock);
|
||||||
|
|
||||||
return dp;
|
return dp;
|
||||||
|
@ -459,8 +474,8 @@ struct proc_dir_entry *proc_symlink(const char *name,
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(proc_symlink);
|
EXPORT_SYMBOL(proc_symlink);
|
||||||
|
|
||||||
struct proc_dir_entry *proc_mkdir_data(const char *name, umode_t mode,
|
struct proc_dir_entry *_proc_mkdir(const char *name, umode_t mode,
|
||||||
struct proc_dir_entry *parent, void *data)
|
struct proc_dir_entry *parent, void *data, bool force_lookup)
|
||||||
{
|
{
|
||||||
struct proc_dir_entry *ent;
|
struct proc_dir_entry *ent;
|
||||||
|
|
||||||
|
@ -472,13 +487,20 @@ struct proc_dir_entry *proc_mkdir_data(const char *name, umode_t mode,
|
||||||
ent->data = data;
|
ent->data = data;
|
||||||
ent->proc_fops = &proc_dir_operations;
|
ent->proc_fops = &proc_dir_operations;
|
||||||
ent->proc_iops = &proc_dir_inode_operations;
|
ent->proc_iops = &proc_dir_inode_operations;
|
||||||
parent->nlink++;
|
if (force_lookup) {
|
||||||
|
pde_force_lookup(ent);
|
||||||
|
}
|
||||||
ent = proc_register(parent, ent);
|
ent = proc_register(parent, ent);
|
||||||
if (!ent)
|
|
||||||
parent->nlink--;
|
|
||||||
}
|
}
|
||||||
return ent;
|
return ent;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(_proc_mkdir);
|
||||||
|
|
||||||
|
struct proc_dir_entry *proc_mkdir_data(const char *name, umode_t mode,
|
||||||
|
struct proc_dir_entry *parent, void *data)
|
||||||
|
{
|
||||||
|
return _proc_mkdir(name, mode, parent, data, false);
|
||||||
|
}
|
||||||
EXPORT_SYMBOL_GPL(proc_mkdir_data);
|
EXPORT_SYMBOL_GPL(proc_mkdir_data);
|
||||||
|
|
||||||
struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode,
|
struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode,
|
||||||
|
@ -505,10 +527,7 @@ struct proc_dir_entry *proc_create_mount_point(const char *name)
|
||||||
ent->data = NULL;
|
ent->data = NULL;
|
||||||
ent->proc_fops = NULL;
|
ent->proc_fops = NULL;
|
||||||
ent->proc_iops = NULL;
|
ent->proc_iops = NULL;
|
||||||
parent->nlink++;
|
|
||||||
ent = proc_register(parent, ent);
|
ent = proc_register(parent, ent);
|
||||||
if (!ent)
|
|
||||||
parent->nlink--;
|
|
||||||
}
|
}
|
||||||
return ent;
|
return ent;
|
||||||
}
|
}
|
||||||
|
@ -666,8 +685,12 @@ void remove_proc_entry(const char *name, struct proc_dir_entry *parent)
|
||||||
len = strlen(fn);
|
len = strlen(fn);
|
||||||
|
|
||||||
de = pde_subdir_find(parent, fn, len);
|
de = pde_subdir_find(parent, fn, len);
|
||||||
if (de)
|
if (de) {
|
||||||
rb_erase(&de->subdir_node, &parent->subdir);
|
rb_erase(&de->subdir_node, &parent->subdir);
|
||||||
|
if (S_ISDIR(de->mode)) {
|
||||||
|
parent->nlink--;
|
||||||
|
}
|
||||||
|
}
|
||||||
write_unlock(&proc_subdir_lock);
|
write_unlock(&proc_subdir_lock);
|
||||||
if (!de) {
|
if (!de) {
|
||||||
WARN(1, "name '%s'\n", name);
|
WARN(1, "name '%s'\n", name);
|
||||||
|
@ -676,9 +699,6 @@ void remove_proc_entry(const char *name, struct proc_dir_entry *parent)
|
||||||
|
|
||||||
proc_entry_rundown(de);
|
proc_entry_rundown(de);
|
||||||
|
|
||||||
if (S_ISDIR(de->mode))
|
|
||||||
parent->nlink--;
|
|
||||||
de->nlink = 0;
|
|
||||||
WARN(pde_subdir_first(de),
|
WARN(pde_subdir_first(de),
|
||||||
"%s: removing non-empty directory '%s/%s', leaking at least '%s'\n",
|
"%s: removing non-empty directory '%s/%s', leaking at least '%s'\n",
|
||||||
__func__, de->parent->name, de->name, pde_subdir_first(de)->name);
|
__func__, de->parent->name, de->name, pde_subdir_first(de)->name);
|
||||||
|
@ -714,13 +734,12 @@ int remove_proc_subtree(const char *name, struct proc_dir_entry *parent)
|
||||||
de = next;
|
de = next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
write_unlock(&proc_subdir_lock);
|
|
||||||
|
|
||||||
proc_entry_rundown(de);
|
|
||||||
next = de->parent;
|
next = de->parent;
|
||||||
if (S_ISDIR(de->mode))
|
if (S_ISDIR(de->mode))
|
||||||
next->nlink--;
|
next->nlink--;
|
||||||
de->nlink = 0;
|
write_unlock(&proc_subdir_lock);
|
||||||
|
|
||||||
|
proc_entry_rundown(de);
|
||||||
if (de == root)
|
if (de == root)
|
||||||
break;
|
break;
|
||||||
pde_put(de);
|
pde_put(de);
|
||||||
|
|
|
@ -299,3 +299,10 @@ extern unsigned long task_statm(struct mm_struct *,
|
||||||
unsigned long *, unsigned long *,
|
unsigned long *, unsigned long *,
|
||||||
unsigned long *, unsigned long *);
|
unsigned long *, unsigned long *);
|
||||||
extern void task_mem(struct seq_file *, struct mm_struct *);
|
extern void task_mem(struct seq_file *, struct mm_struct *);
|
||||||
|
|
||||||
|
extern const struct dentry_operations proc_net_dentry_ops;
|
||||||
|
static inline void pde_force_lookup(struct proc_dir_entry *pde)
|
||||||
|
{
|
||||||
|
/* /proc/net/ entries can be changed under us by setns(CLONE_NEWNET) */
|
||||||
|
pde->proc_dops = &proc_net_dentry_ops;
|
||||||
|
}
|
||||||
|
|
|
@ -39,22 +39,6 @@ static struct net *get_proc_net(const struct inode *inode)
|
||||||
return maybe_get_net(PDE_NET(PDE(inode)));
|
return maybe_get_net(PDE_NET(PDE(inode)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int proc_net_d_revalidate(struct dentry *dentry, unsigned int flags)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct dentry_operations proc_net_dentry_ops = {
|
|
||||||
.d_revalidate = proc_net_d_revalidate,
|
|
||||||
.d_delete = always_delete_dentry,
|
|
||||||
};
|
|
||||||
|
|
||||||
static void pde_force_lookup(struct proc_dir_entry *pde)
|
|
||||||
{
|
|
||||||
/* /proc/net/ entries can be changed under us by setns(CLONE_NEWNET) */
|
|
||||||
pde->proc_dops = &proc_net_dentry_ops;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int seq_open_net(struct inode *inode, struct file *file)
|
static int seq_open_net(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
unsigned int state_size = PDE(inode)->state_size;
|
unsigned int state_size = PDE(inode)->state_size;
|
||||||
|
|
|
@ -21,6 +21,7 @@ extern void proc_flush_task(struct task_struct *);
|
||||||
|
|
||||||
extern struct proc_dir_entry *proc_symlink(const char *,
|
extern struct proc_dir_entry *proc_symlink(const char *,
|
||||||
struct proc_dir_entry *, const char *);
|
struct proc_dir_entry *, const char *);
|
||||||
|
struct proc_dir_entry *_proc_mkdir(const char *, umode_t, struct proc_dir_entry *, void *, bool);
|
||||||
extern struct proc_dir_entry *proc_mkdir(const char *, struct proc_dir_entry *);
|
extern struct proc_dir_entry *proc_mkdir(const char *, struct proc_dir_entry *);
|
||||||
extern struct proc_dir_entry *proc_mkdir_data(const char *, umode_t,
|
extern struct proc_dir_entry *proc_mkdir_data(const char *, umode_t,
|
||||||
struct proc_dir_entry *, void *);
|
struct proc_dir_entry *, void *);
|
||||||
|
@ -99,6 +100,11 @@ static inline struct proc_dir_entry *proc_symlink(const char *name,
|
||||||
static inline struct proc_dir_entry *proc_mkdir(const char *name,
|
static inline struct proc_dir_entry *proc_mkdir(const char *name,
|
||||||
struct proc_dir_entry *parent) {return NULL;}
|
struct proc_dir_entry *parent) {return NULL;}
|
||||||
static inline struct proc_dir_entry *proc_create_mount_point(const char *name) { return NULL; }
|
static inline struct proc_dir_entry *proc_create_mount_point(const char *name) { return NULL; }
|
||||||
|
static inline struct proc_dir_entry *_proc_mkdir(const char *name, umode_t mode,
|
||||||
|
struct proc_dir_entry *parent, void *data, bool force_lookup)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
static inline struct proc_dir_entry *proc_mkdir_data(const char *name,
|
static inline struct proc_dir_entry *proc_mkdir_data(const char *name,
|
||||||
umode_t mode, struct proc_dir_entry *parent, void *data) { return NULL; }
|
umode_t mode, struct proc_dir_entry *parent, void *data) { return NULL; }
|
||||||
static inline struct proc_dir_entry *proc_mkdir_mode(const char *name,
|
static inline struct proc_dir_entry *proc_mkdir_mode(const char *name,
|
||||||
|
@ -136,7 +142,7 @@ struct net;
|
||||||
static inline struct proc_dir_entry *proc_net_mkdir(
|
static inline struct proc_dir_entry *proc_net_mkdir(
|
||||||
struct net *net, const char *name, struct proc_dir_entry *parent)
|
struct net *net, const char *name, struct proc_dir_entry *parent)
|
||||||
{
|
{
|
||||||
return proc_mkdir_data(name, 0, parent, net);
|
return _proc_mkdir(name, 0, parent, net, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ns_common;
|
struct ns_common;
|
||||||
|
|
|
@ -168,12 +168,14 @@ static inline void red_set_vars(struct red_vars *v)
|
||||||
v->qcount = -1;
|
v->qcount = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog)
|
static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog, u8 Scell_log)
|
||||||
{
|
{
|
||||||
if (fls(qth_min) + Wlog > 32)
|
if (fls(qth_min) + Wlog > 32)
|
||||||
return false;
|
return false;
|
||||||
if (fls(qth_max) + Wlog > 32)
|
if (fls(qth_max) + Wlog > 32)
|
||||||
return false;
|
return false;
|
||||||
|
if (Scell_log >= 32)
|
||||||
|
return false;
|
||||||
if (qth_max < qth_min)
|
if (qth_max < qth_min)
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -3718,16 +3718,23 @@ static void pwq_adjust_max_active(struct pool_workqueue *pwq)
|
||||||
* is updated and visible.
|
* is updated and visible.
|
||||||
*/
|
*/
|
||||||
if (!freezable || !workqueue_freezing) {
|
if (!freezable || !workqueue_freezing) {
|
||||||
|
bool kick = false;
|
||||||
|
|
||||||
pwq->max_active = wq->saved_max_active;
|
pwq->max_active = wq->saved_max_active;
|
||||||
|
|
||||||
while (!list_empty(&pwq->delayed_works) &&
|
while (!list_empty(&pwq->delayed_works) &&
|
||||||
pwq->nr_active < pwq->max_active)
|
pwq->nr_active < pwq->max_active) {
|
||||||
pwq_activate_first_delayed(pwq);
|
pwq_activate_first_delayed(pwq);
|
||||||
|
kick = true;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Need to kick a worker after thawed or an unbound wq's
|
* Need to kick a worker after thawed or an unbound wq's
|
||||||
* max_active is bumped. It's a slow path. Do it always.
|
* max_active is bumped. In realtime scenarios, always kicking a
|
||||||
|
* worker will cause interference on the isolated cpu cores, so
|
||||||
|
* let's kick iff work items were activated.
|
||||||
*/
|
*/
|
||||||
|
if (kick)
|
||||||
wake_up_worker(pwq->pool);
|
wake_up_worker(pwq->pool);
|
||||||
} else {
|
} else {
|
||||||
pwq->max_active = 0;
|
pwq->max_active = 0;
|
||||||
|
|
|
@ -81,14 +81,14 @@ static int clear_bits_ll(unsigned long *addr, unsigned long mask_to_clear)
|
||||||
* users set the same bit, one user will return remain bits, otherwise
|
* users set the same bit, one user will return remain bits, otherwise
|
||||||
* return 0.
|
* return 0.
|
||||||
*/
|
*/
|
||||||
static int bitmap_set_ll(unsigned long *map, int start, int nr)
|
static int bitmap_set_ll(unsigned long *map, unsigned long start, unsigned long nr)
|
||||||
{
|
{
|
||||||
unsigned long *p = map + BIT_WORD(start);
|
unsigned long *p = map + BIT_WORD(start);
|
||||||
const int size = start + nr;
|
const unsigned long size = start + nr;
|
||||||
int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG);
|
int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG);
|
||||||
unsigned long mask_to_set = BITMAP_FIRST_WORD_MASK(start);
|
unsigned long mask_to_set = BITMAP_FIRST_WORD_MASK(start);
|
||||||
|
|
||||||
while (nr - bits_to_set >= 0) {
|
while (nr >= bits_to_set) {
|
||||||
if (set_bits_ll(p, mask_to_set))
|
if (set_bits_ll(p, mask_to_set))
|
||||||
return nr;
|
return nr;
|
||||||
nr -= bits_to_set;
|
nr -= bits_to_set;
|
||||||
|
@ -116,14 +116,15 @@ static int bitmap_set_ll(unsigned long *map, int start, int nr)
|
||||||
* users clear the same bit, one user will return remain bits,
|
* users clear the same bit, one user will return remain bits,
|
||||||
* otherwise return 0.
|
* otherwise return 0.
|
||||||
*/
|
*/
|
||||||
static int bitmap_clear_ll(unsigned long *map, int start, int nr)
|
static unsigned long
|
||||||
|
bitmap_clear_ll(unsigned long *map, unsigned long start, unsigned long nr)
|
||||||
{
|
{
|
||||||
unsigned long *p = map + BIT_WORD(start);
|
unsigned long *p = map + BIT_WORD(start);
|
||||||
const int size = start + nr;
|
const unsigned long size = start + nr;
|
||||||
int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG);
|
int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG);
|
||||||
unsigned long mask_to_clear = BITMAP_FIRST_WORD_MASK(start);
|
unsigned long mask_to_clear = BITMAP_FIRST_WORD_MASK(start);
|
||||||
|
|
||||||
while (nr - bits_to_clear >= 0) {
|
while (nr >= bits_to_clear) {
|
||||||
if (clear_bits_ll(p, mask_to_clear))
|
if (clear_bits_ll(p, mask_to_clear))
|
||||||
return nr;
|
return nr;
|
||||||
nr -= bits_to_clear;
|
nr -= bits_to_clear;
|
||||||
|
@ -183,8 +184,8 @@ int gen_pool_add_owner(struct gen_pool *pool, unsigned long virt, phys_addr_t ph
|
||||||
size_t size, int nid, void *owner)
|
size_t size, int nid, void *owner)
|
||||||
{
|
{
|
||||||
struct gen_pool_chunk *chunk;
|
struct gen_pool_chunk *chunk;
|
||||||
int nbits = size >> pool->min_alloc_order;
|
unsigned long nbits = size >> pool->min_alloc_order;
|
||||||
int nbytes = sizeof(struct gen_pool_chunk) +
|
unsigned long nbytes = sizeof(struct gen_pool_chunk) +
|
||||||
BITS_TO_LONGS(nbits) * sizeof(long);
|
BITS_TO_LONGS(nbits) * sizeof(long);
|
||||||
|
|
||||||
chunk = vzalloc_node(nbytes, nid);
|
chunk = vzalloc_node(nbytes, nid);
|
||||||
|
@ -242,7 +243,7 @@ void gen_pool_destroy(struct gen_pool *pool)
|
||||||
struct list_head *_chunk, *_next_chunk;
|
struct list_head *_chunk, *_next_chunk;
|
||||||
struct gen_pool_chunk *chunk;
|
struct gen_pool_chunk *chunk;
|
||||||
int order = pool->min_alloc_order;
|
int order = pool->min_alloc_order;
|
||||||
int bit, end_bit;
|
unsigned long bit, end_bit;
|
||||||
|
|
||||||
list_for_each_safe(_chunk, _next_chunk, &pool->chunks) {
|
list_for_each_safe(_chunk, _next_chunk, &pool->chunks) {
|
||||||
chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk);
|
chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk);
|
||||||
|
@ -278,7 +279,7 @@ unsigned long gen_pool_alloc_algo_owner(struct gen_pool *pool, size_t size,
|
||||||
struct gen_pool_chunk *chunk;
|
struct gen_pool_chunk *chunk;
|
||||||
unsigned long addr = 0;
|
unsigned long addr = 0;
|
||||||
int order = pool->min_alloc_order;
|
int order = pool->min_alloc_order;
|
||||||
int nbits, start_bit, end_bit, remain;
|
unsigned long nbits, start_bit, end_bit, remain;
|
||||||
|
|
||||||
#ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG
|
#ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||||
BUG_ON(in_nmi());
|
BUG_ON(in_nmi());
|
||||||
|
@ -487,7 +488,7 @@ void gen_pool_free_owner(struct gen_pool *pool, unsigned long addr, size_t size,
|
||||||
{
|
{
|
||||||
struct gen_pool_chunk *chunk;
|
struct gen_pool_chunk *chunk;
|
||||||
int order = pool->min_alloc_order;
|
int order = pool->min_alloc_order;
|
||||||
int start_bit, nbits, remain;
|
unsigned long start_bit, nbits, remain;
|
||||||
|
|
||||||
#ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG
|
#ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||||
BUG_ON(in_nmi());
|
BUG_ON(in_nmi());
|
||||||
|
@ -754,7 +755,7 @@ unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size,
|
||||||
index = bitmap_find_next_zero_area(map, size, start, nr, 0);
|
index = bitmap_find_next_zero_area(map, size, start, nr, 0);
|
||||||
|
|
||||||
while (index < size) {
|
while (index < size) {
|
||||||
int next_bit = find_next_bit(map, size, index + nr);
|
unsigned long next_bit = find_next_bit(map, size, index + nr);
|
||||||
if ((next_bit - index) < len) {
|
if ((next_bit - index) < len) {
|
||||||
len = next_bit - index;
|
len = next_bit - index;
|
||||||
start_bit = index;
|
start_bit = index;
|
||||||
|
|
|
@ -1235,8 +1235,8 @@ static const struct attribute_group dql_group = {
|
||||||
static ssize_t xps_cpus_show(struct netdev_queue *queue,
|
static ssize_t xps_cpus_show(struct netdev_queue *queue,
|
||||||
char *buf)
|
char *buf)
|
||||||
{
|
{
|
||||||
|
int cpu, len, ret, num_tc = 1, tc = 0;
|
||||||
struct net_device *dev = queue->dev;
|
struct net_device *dev = queue->dev;
|
||||||
int cpu, len, num_tc = 1, tc = 0;
|
|
||||||
struct xps_dev_maps *dev_maps;
|
struct xps_dev_maps *dev_maps;
|
||||||
cpumask_var_t mask;
|
cpumask_var_t mask;
|
||||||
unsigned long index;
|
unsigned long index;
|
||||||
|
@ -1246,22 +1246,31 @@ static ssize_t xps_cpus_show(struct netdev_queue *queue,
|
||||||
|
|
||||||
index = get_netdev_queue_index(queue);
|
index = get_netdev_queue_index(queue);
|
||||||
|
|
||||||
|
if (!rtnl_trylock())
|
||||||
|
return restart_syscall();
|
||||||
|
|
||||||
if (dev->num_tc) {
|
if (dev->num_tc) {
|
||||||
/* Do not allow XPS on subordinate device directly */
|
/* Do not allow XPS on subordinate device directly */
|
||||||
num_tc = dev->num_tc;
|
num_tc = dev->num_tc;
|
||||||
if (num_tc < 0)
|
if (num_tc < 0) {
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
|
goto err_rtnl_unlock;
|
||||||
|
}
|
||||||
|
|
||||||
/* If queue belongs to subordinate dev use its map */
|
/* If queue belongs to subordinate dev use its map */
|
||||||
dev = netdev_get_tx_queue(dev, index)->sb_dev ? : dev;
|
dev = netdev_get_tx_queue(dev, index)->sb_dev ? : dev;
|
||||||
|
|
||||||
tc = netdev_txq_to_tc(dev, index);
|
tc = netdev_txq_to_tc(dev, index);
|
||||||
if (tc < 0)
|
if (tc < 0) {
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
|
goto err_rtnl_unlock;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!zalloc_cpumask_var(&mask, GFP_KERNEL))
|
if (!zalloc_cpumask_var(&mask, GFP_KERNEL)) {
|
||||||
return -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
goto err_rtnl_unlock;
|
||||||
|
}
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
dev_maps = rcu_dereference(dev->xps_cpus_map);
|
dev_maps = rcu_dereference(dev->xps_cpus_map);
|
||||||
|
@ -1284,9 +1293,15 @@ static ssize_t xps_cpus_show(struct netdev_queue *queue,
|
||||||
}
|
}
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
||||||
|
rtnl_unlock();
|
||||||
|
|
||||||
len = snprintf(buf, PAGE_SIZE, "%*pb\n", cpumask_pr_args(mask));
|
len = snprintf(buf, PAGE_SIZE, "%*pb\n", cpumask_pr_args(mask));
|
||||||
free_cpumask_var(mask);
|
free_cpumask_var(mask);
|
||||||
return len < PAGE_SIZE ? len : -EINVAL;
|
return len < PAGE_SIZE ? len : -EINVAL;
|
||||||
|
|
||||||
|
err_rtnl_unlock:
|
||||||
|
rtnl_unlock();
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t xps_cpus_store(struct netdev_queue *queue,
|
static ssize_t xps_cpus_store(struct netdev_queue *queue,
|
||||||
|
@ -1314,7 +1329,13 @@ static ssize_t xps_cpus_store(struct netdev_queue *queue,
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!rtnl_trylock()) {
|
||||||
|
free_cpumask_var(mask);
|
||||||
|
return restart_syscall();
|
||||||
|
}
|
||||||
|
|
||||||
err = netif_set_xps_queue(dev, mask, index);
|
err = netif_set_xps_queue(dev, mask, index);
|
||||||
|
rtnl_unlock();
|
||||||
|
|
||||||
free_cpumask_var(mask);
|
free_cpumask_var(mask);
|
||||||
|
|
||||||
|
@ -1326,22 +1347,29 @@ static struct netdev_queue_attribute xps_cpus_attribute __ro_after_init
|
||||||
|
|
||||||
static ssize_t xps_rxqs_show(struct netdev_queue *queue, char *buf)
|
static ssize_t xps_rxqs_show(struct netdev_queue *queue, char *buf)
|
||||||
{
|
{
|
||||||
|
int j, len, ret, num_tc = 1, tc = 0;
|
||||||
struct net_device *dev = queue->dev;
|
struct net_device *dev = queue->dev;
|
||||||
struct xps_dev_maps *dev_maps;
|
struct xps_dev_maps *dev_maps;
|
||||||
unsigned long *mask, index;
|
unsigned long *mask, index;
|
||||||
int j, len, num_tc = 1, tc = 0;
|
|
||||||
|
|
||||||
index = get_netdev_queue_index(queue);
|
index = get_netdev_queue_index(queue);
|
||||||
|
|
||||||
|
if (!rtnl_trylock())
|
||||||
|
return restart_syscall();
|
||||||
|
|
||||||
if (dev->num_tc) {
|
if (dev->num_tc) {
|
||||||
num_tc = dev->num_tc;
|
num_tc = dev->num_tc;
|
||||||
tc = netdev_txq_to_tc(dev, index);
|
tc = netdev_txq_to_tc(dev, index);
|
||||||
if (tc < 0)
|
if (tc < 0) {
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
|
goto err_rtnl_unlock;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mask = bitmap_zalloc(dev->num_rx_queues, GFP_KERNEL);
|
mask = bitmap_zalloc(dev->num_rx_queues, GFP_KERNEL);
|
||||||
if (!mask)
|
if (!mask) {
|
||||||
return -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
goto err_rtnl_unlock;
|
||||||
|
}
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
dev_maps = rcu_dereference(dev->xps_rxqs_map);
|
dev_maps = rcu_dereference(dev->xps_rxqs_map);
|
||||||
|
@ -1367,10 +1395,16 @@ static ssize_t xps_rxqs_show(struct netdev_queue *queue, char *buf)
|
||||||
out_no_maps:
|
out_no_maps:
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
||||||
|
rtnl_unlock();
|
||||||
|
|
||||||
len = bitmap_print_to_pagebuf(false, buf, mask, dev->num_rx_queues);
|
len = bitmap_print_to_pagebuf(false, buf, mask, dev->num_rx_queues);
|
||||||
bitmap_free(mask);
|
bitmap_free(mask);
|
||||||
|
|
||||||
return len < PAGE_SIZE ? len : -EINVAL;
|
return len < PAGE_SIZE ? len : -EINVAL;
|
||||||
|
|
||||||
|
err_rtnl_unlock:
|
||||||
|
rtnl_unlock();
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t xps_rxqs_store(struct netdev_queue *queue, const char *buf,
|
static ssize_t xps_rxqs_store(struct netdev_queue *queue, const char *buf,
|
||||||
|
@ -1396,10 +1430,17 @@ static ssize_t xps_rxqs_store(struct netdev_queue *queue, const char *buf,
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!rtnl_trylock()) {
|
||||||
|
bitmap_free(mask);
|
||||||
|
return restart_syscall();
|
||||||
|
}
|
||||||
|
|
||||||
cpus_read_lock();
|
cpus_read_lock();
|
||||||
err = __netif_set_xps_queue(dev, mask, index, true);
|
err = __netif_set_xps_queue(dev, mask, index, true);
|
||||||
cpus_read_unlock();
|
cpus_read_unlock();
|
||||||
|
|
||||||
|
rtnl_unlock();
|
||||||
|
|
||||||
bitmap_free(mask);
|
bitmap_free(mask);
|
||||||
return err ? : len;
|
return err ? : len;
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,7 +302,7 @@ __be32 fib_compute_spec_dst(struct sk_buff *skb)
|
||||||
.flowi4_iif = LOOPBACK_IFINDEX,
|
.flowi4_iif = LOOPBACK_IFINDEX,
|
||||||
.flowi4_oif = l3mdev_master_ifindex_rcu(dev),
|
.flowi4_oif = l3mdev_master_ifindex_rcu(dev),
|
||||||
.daddr = ip_hdr(skb)->saddr,
|
.daddr = ip_hdr(skb)->saddr,
|
||||||
.flowi4_tos = RT_TOS(ip_hdr(skb)->tos),
|
.flowi4_tos = ip_hdr(skb)->tos & IPTOS_RT_MASK,
|
||||||
.flowi4_scope = scope,
|
.flowi4_scope = scope,
|
||||||
.flowi4_mark = vmark ? skb->mark : 0,
|
.flowi4_mark = vmark ? skb->mark : 0,
|
||||||
};
|
};
|
||||||
|
|
|
@ -128,7 +128,7 @@ int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi,
|
||||||
* to 0 and sets the configured key in the
|
* to 0 and sets the configured key in the
|
||||||
* inner erspan header field
|
* inner erspan header field
|
||||||
*/
|
*/
|
||||||
if (greh->protocol == htons(ETH_P_ERSPAN) ||
|
if ((greh->protocol == htons(ETH_P_ERSPAN) && hdr_len != 4) ||
|
||||||
greh->protocol == htons(ETH_P_ERSPAN2)) {
|
greh->protocol == htons(ETH_P_ERSPAN2)) {
|
||||||
struct erspan_base_hdr *ershdr;
|
struct erspan_base_hdr *ershdr;
|
||||||
|
|
||||||
|
|
|
@ -1406,7 +1406,7 @@ static int compat_get_entries(struct net *net,
|
||||||
xt_compat_lock(NFPROTO_ARP);
|
xt_compat_lock(NFPROTO_ARP);
|
||||||
t = xt_find_table_lock(net, NFPROTO_ARP, get.name);
|
t = xt_find_table_lock(net, NFPROTO_ARP, get.name);
|
||||||
if (!IS_ERR(t)) {
|
if (!IS_ERR(t)) {
|
||||||
const struct xt_table_info *private = t->private;
|
const struct xt_table_info *private = xt_table_get_private_protected(t);
|
||||||
struct xt_table_info info;
|
struct xt_table_info info;
|
||||||
|
|
||||||
ret = compat_table_info(private, &info);
|
ret = compat_table_info(private, &info);
|
||||||
|
|
|
@ -1616,7 +1616,7 @@ compat_get_entries(struct net *net, struct compat_ipt_get_entries __user *uptr,
|
||||||
xt_compat_lock(AF_INET);
|
xt_compat_lock(AF_INET);
|
||||||
t = xt_find_table_lock(net, AF_INET, get.name);
|
t = xt_find_table_lock(net, AF_INET, get.name);
|
||||||
if (!IS_ERR(t)) {
|
if (!IS_ERR(t)) {
|
||||||
const struct xt_table_info *private = t->private;
|
const struct xt_table_info *private = xt_table_get_private_protected(t);
|
||||||
struct xt_table_info info;
|
struct xt_table_info info;
|
||||||
ret = compat_table_info(private, &info);
|
ret = compat_table_info(private, &info);
|
||||||
if (!ret && get.size == info.size)
|
if (!ret && get.size == info.size)
|
||||||
|
|
|
@ -1625,7 +1625,7 @@ compat_get_entries(struct net *net, struct compat_ip6t_get_entries __user *uptr,
|
||||||
xt_compat_lock(AF_INET6);
|
xt_compat_lock(AF_INET6);
|
||||||
t = xt_find_table_lock(net, AF_INET6, get.name);
|
t = xt_find_table_lock(net, AF_INET6, get.name);
|
||||||
if (!IS_ERR(t)) {
|
if (!IS_ERR(t)) {
|
||||||
const struct xt_table_info *private = t->private;
|
const struct xt_table_info *private = xt_table_get_private_protected(t);
|
||||||
struct xt_table_info info;
|
struct xt_table_info info;
|
||||||
ret = compat_table_info(private, &info);
|
ret = compat_table_info(private, &info);
|
||||||
if (!ret && get.size == info.size)
|
if (!ret && get.size == info.size)
|
||||||
|
|
|
@ -1114,7 +1114,7 @@ int ncsi_rcv_rsp(struct sk_buff *skb, struct net_device *dev,
|
||||||
int payload, i, ret;
|
int payload, i, ret;
|
||||||
|
|
||||||
/* Find the NCSI device */
|
/* Find the NCSI device */
|
||||||
nd = ncsi_find_dev(dev);
|
nd = ncsi_find_dev(orig_dev);
|
||||||
ndp = nd ? TO_NCSI_DEV_PRIV(nd) : NULL;
|
ndp = nd ? TO_NCSI_DEV_PRIV(nd) : NULL;
|
||||||
if (!ndp)
|
if (!ndp)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
|
@ -143,20 +143,6 @@ htable_size(u8 hbits)
|
||||||
return hsize * sizeof(struct hbucket *) + sizeof(struct htable);
|
return hsize * sizeof(struct hbucket *) + sizeof(struct htable);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Compute htable_bits from the user input parameter hashsize */
|
|
||||||
static u8
|
|
||||||
htable_bits(u32 hashsize)
|
|
||||||
{
|
|
||||||
/* Assume that hashsize == 2^htable_bits */
|
|
||||||
u8 bits = fls(hashsize - 1);
|
|
||||||
|
|
||||||
if (jhash_size(bits) != hashsize)
|
|
||||||
/* Round up to the first 2^n value */
|
|
||||||
bits = fls(hashsize);
|
|
||||||
|
|
||||||
return bits;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef IP_SET_HASH_WITH_NETS
|
#ifdef IP_SET_HASH_WITH_NETS
|
||||||
#if IPSET_NET_COUNT > 1
|
#if IPSET_NET_COUNT > 1
|
||||||
#define __CIDR(cidr, i) (cidr[i])
|
#define __CIDR(cidr, i) (cidr[i])
|
||||||
|
@ -1520,7 +1506,11 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set,
|
||||||
if (!h)
|
if (!h)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
hbits = htable_bits(hashsize);
|
/* Compute htable_bits from the user input parameter hashsize.
|
||||||
|
* Assume that hashsize == 2^htable_bits,
|
||||||
|
* otherwise round up to the first 2^n value.
|
||||||
|
*/
|
||||||
|
hbits = fls(hashsize - 1);
|
||||||
hsize = htable_size(hbits);
|
hsize = htable_size(hbits);
|
||||||
if (hsize == 0) {
|
if (hsize == 0) {
|
||||||
kfree(h);
|
kfree(h);
|
||||||
|
|
|
@ -146,7 +146,7 @@ static int nft_dynset_init(const struct nft_ctx *ctx,
|
||||||
u32 flags = ntohl(nla_get_be32(tb[NFTA_DYNSET_FLAGS]));
|
u32 flags = ntohl(nla_get_be32(tb[NFTA_DYNSET_FLAGS]));
|
||||||
|
|
||||||
if (flags & ~NFT_DYNSET_F_INV)
|
if (flags & ~NFT_DYNSET_F_INV)
|
||||||
return -EINVAL;
|
return -EOPNOTSUPP;
|
||||||
if (flags & NFT_DYNSET_F_INV)
|
if (flags & NFT_DYNSET_F_INV)
|
||||||
priv->invert = true;
|
priv->invert = true;
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ static int nft_dynset_init(const struct nft_ctx *ctx,
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
if (tb[NFTA_DYNSET_TIMEOUT] != NULL) {
|
if (tb[NFTA_DYNSET_TIMEOUT] != NULL) {
|
||||||
if (!(set->flags & NFT_SET_TIMEOUT))
|
if (!(set->flags & NFT_SET_TIMEOUT))
|
||||||
return -EINVAL;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
err = nf_msecs_to_jiffies64(tb[NFTA_DYNSET_TIMEOUT], &timeout);
|
err = nf_msecs_to_jiffies64(tb[NFTA_DYNSET_TIMEOUT], &timeout);
|
||||||
if (err)
|
if (err)
|
||||||
|
@ -193,7 +193,7 @@ static int nft_dynset_init(const struct nft_ctx *ctx,
|
||||||
|
|
||||||
if (tb[NFTA_DYNSET_SREG_DATA] != NULL) {
|
if (tb[NFTA_DYNSET_SREG_DATA] != NULL) {
|
||||||
if (!(set->flags & NFT_SET_MAP))
|
if (!(set->flags & NFT_SET_MAP))
|
||||||
return -EINVAL;
|
return -EOPNOTSUPP;
|
||||||
if (set->dtype == NFT_DATA_VERDICT)
|
if (set->dtype == NFT_DATA_VERDICT)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,9 @@ static int xt_rateest_tg_checkentry(const struct xt_tgchk_param *par)
|
||||||
} cfg;
|
} cfg;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (strnlen(info->name, sizeof(est->name)) >= sizeof(est->name))
|
||||||
|
return -ENAMETOOLONG;
|
||||||
|
|
||||||
net_get_random_once(&jhash_rnd, sizeof(jhash_rnd));
|
net_get_random_once(&jhash_rnd, sizeof(jhash_rnd));
|
||||||
|
|
||||||
mutex_lock(&xn->hash_lock);
|
mutex_lock(&xn->hash_lock);
|
||||||
|
|
|
@ -368,7 +368,7 @@ static int choke_change(struct Qdisc *sch, struct nlattr *opt,
|
||||||
|
|
||||||
ctl = nla_data(tb[TCA_CHOKE_PARMS]);
|
ctl = nla_data(tb[TCA_CHOKE_PARMS]);
|
||||||
|
|
||||||
if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog))
|
if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Scell_log))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (ctl->limit > CHOKE_MAX_QUEUE)
|
if (ctl->limit > CHOKE_MAX_QUEUE)
|
||||||
|
|
|
@ -480,7 +480,7 @@ static inline int gred_change_vq(struct Qdisc *sch, int dp,
|
||||||
struct gred_sched *table = qdisc_priv(sch);
|
struct gred_sched *table = qdisc_priv(sch);
|
||||||
struct gred_sched_data *q = table->tab[dp];
|
struct gred_sched_data *q = table->tab[dp];
|
||||||
|
|
||||||
if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog)) {
|
if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Scell_log)) {
|
||||||
NL_SET_ERR_MSG_MOD(extack, "invalid RED parameters");
|
NL_SET_ERR_MSG_MOD(extack, "invalid RED parameters");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,7 +213,7 @@ static int red_change(struct Qdisc *sch, struct nlattr *opt,
|
||||||
max_P = tb[TCA_RED_MAX_P] ? nla_get_u32(tb[TCA_RED_MAX_P]) : 0;
|
max_P = tb[TCA_RED_MAX_P] ? nla_get_u32(tb[TCA_RED_MAX_P]) : 0;
|
||||||
|
|
||||||
ctl = nla_data(tb[TCA_RED_PARMS]);
|
ctl = nla_data(tb[TCA_RED_PARMS]);
|
||||||
if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog))
|
if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Scell_log))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (ctl->limit > 0) {
|
if (ctl->limit > 0) {
|
||||||
|
|
|
@ -647,7 +647,7 @@ static int sfq_change(struct Qdisc *sch, struct nlattr *opt)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctl_v1 && !red_check_params(ctl_v1->qth_min, ctl_v1->qth_max,
|
if (ctl_v1 && !red_check_params(ctl_v1->qth_min, ctl_v1->qth_max,
|
||||||
ctl_v1->Wlog))
|
ctl_v1->Wlog, ctl_v1->Scell_log))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (ctl_v1 && ctl_v1->qth_min) {
|
if (ctl_v1 && ctl_v1->qth_min) {
|
||||||
p = kmalloc(sizeof(*p), GFP_KERNEL);
|
p = kmalloc(sizeof(*p), GFP_KERNEL);
|
||||||
|
|
|
@ -1626,7 +1626,7 @@ static void taprio_destroy(struct Qdisc *sch)
|
||||||
taprio_disable_offload(dev, q, NULL);
|
taprio_disable_offload(dev, q, NULL);
|
||||||
|
|
||||||
if (q->qdiscs) {
|
if (q->qdiscs) {
|
||||||
for (i = 0; i < dev->num_tx_queues && q->qdiscs[i]; i++)
|
for (i = 0; i < dev->num_tx_queues; i++)
|
||||||
qdisc_put(q->qdiscs[i]);
|
qdisc_put(q->qdiscs[i]);
|
||||||
|
|
||||||
kfree(q->qdiscs);
|
kfree(q->qdiscs);
|
||||||
|
|
|
@ -15,6 +15,8 @@ if ! test -r System.map ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# legacy behavior: "depmod" in /sbin, no /sbin in PATH
|
||||||
|
PATH="$PATH:/sbin"
|
||||||
if [ -z $(command -v $DEPMOD) ]; then
|
if [ -z $(command -v $DEPMOD) ]; then
|
||||||
echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
|
echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
|
||||||
echo "This is probably in the kmod package." >&2
|
echo "This is probably in the kmod package." >&2
|
||||||
|
|
|
@ -2186,8 +2186,6 @@ static struct snd_pci_quirk power_save_blacklist[] = {
|
||||||
SND_PCI_QUIRK(0x1849, 0x7662, "Asrock H81M-HDS", 0),
|
SND_PCI_QUIRK(0x1849, 0x7662, "Asrock H81M-HDS", 0),
|
||||||
/* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
|
||||||
SND_PCI_QUIRK(0x1043, 0x8733, "Asus Prime X370-Pro", 0),
|
SND_PCI_QUIRK(0x1043, 0x8733, "Asus Prime X370-Pro", 0),
|
||||||
/* https://bugzilla.redhat.com/show_bug.cgi?id=1581607 */
|
|
||||||
SND_PCI_QUIRK(0x1558, 0x3501, "Clevo W35xSS_370SS", 0),
|
|
||||||
/* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
|
||||||
SND_PCI_QUIRK(0x1558, 0x6504, "Clevo W65_67SB", 0),
|
SND_PCI_QUIRK(0x1558, 0x6504, "Clevo W65_67SB", 0),
|
||||||
/* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
|
/* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
|
||||||
|
|
|
@ -1075,6 +1075,7 @@ static int patch_conexant_auto(struct hda_codec *codec)
|
||||||
static const struct hda_device_id snd_hda_id_conexant[] = {
|
static const struct hda_device_id snd_hda_id_conexant[] = {
|
||||||
HDA_CODEC_ENTRY(0x14f11f86, "CX8070", patch_conexant_auto),
|
HDA_CODEC_ENTRY(0x14f11f86, "CX8070", patch_conexant_auto),
|
||||||
HDA_CODEC_ENTRY(0x14f12008, "CX8200", patch_conexant_auto),
|
HDA_CODEC_ENTRY(0x14f12008, "CX8200", patch_conexant_auto),
|
||||||
|
HDA_CODEC_ENTRY(0x14f120d0, "CX11970", patch_conexant_auto),
|
||||||
HDA_CODEC_ENTRY(0x14f15045, "CX20549 (Venice)", patch_conexant_auto),
|
HDA_CODEC_ENTRY(0x14f15045, "CX20549 (Venice)", patch_conexant_auto),
|
||||||
HDA_CODEC_ENTRY(0x14f15047, "CX20551 (Waikiki)", patch_conexant_auto),
|
HDA_CODEC_ENTRY(0x14f15047, "CX20551 (Waikiki)", patch_conexant_auto),
|
||||||
HDA_CODEC_ENTRY(0x14f15051, "CX20561 (Hermosa)", patch_conexant_auto),
|
HDA_CODEC_ENTRY(0x14f15051, "CX20561 (Hermosa)", patch_conexant_auto),
|
||||||
|
|
|
@ -6236,6 +6236,7 @@ enum {
|
||||||
ALC221_FIXUP_HP_FRONT_MIC,
|
ALC221_FIXUP_HP_FRONT_MIC,
|
||||||
ALC292_FIXUP_TPT460,
|
ALC292_FIXUP_TPT460,
|
||||||
ALC298_FIXUP_SPK_VOLUME,
|
ALC298_FIXUP_SPK_VOLUME,
|
||||||
|
ALC298_FIXUP_LENOVO_SPK_VOLUME,
|
||||||
ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER,
|
ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER,
|
||||||
ALC269_FIXUP_ATIV_BOOK_8,
|
ALC269_FIXUP_ATIV_BOOK_8,
|
||||||
ALC221_FIXUP_HP_MIC_NO_PRESENCE,
|
ALC221_FIXUP_HP_MIC_NO_PRESENCE,
|
||||||
|
@ -7062,6 +7063,10 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||||
.chained = true,
|
.chained = true,
|
||||||
.chain_id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
|
.chain_id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
|
||||||
},
|
},
|
||||||
|
[ALC298_FIXUP_LENOVO_SPK_VOLUME] = {
|
||||||
|
.type = HDA_FIXUP_FUNC,
|
||||||
|
.v.func = alc298_fixup_speaker_volume,
|
||||||
|
},
|
||||||
[ALC295_FIXUP_DISABLE_DAC3] = {
|
[ALC295_FIXUP_DISABLE_DAC3] = {
|
||||||
.type = HDA_FIXUP_FUNC,
|
.type = HDA_FIXUP_FUNC,
|
||||||
.v.func = alc295_fixup_disable_dac3,
|
.v.func = alc295_fixup_disable_dac3,
|
||||||
|
@ -7875,6 +7880,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||||
SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
|
SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
|
||||||
SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
|
SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
|
||||||
SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
|
SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
|
||||||
|
SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),
|
||||||
SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
|
SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
|
||||||
SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
|
SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
|
||||||
SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED),
|
SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED),
|
||||||
|
@ -7935,6 +7941,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||||
SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
|
SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
|
||||||
SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
|
SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
|
||||||
SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
|
SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
|
||||||
|
SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
|
||||||
|
SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
|
||||||
SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
|
SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
|
||||||
SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
|
SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
|
||||||
SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
|
SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
|
||||||
|
@ -8040,6 +8048,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||||
SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
|
SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
|
||||||
SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
|
SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
|
||||||
SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
|
SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
|
||||||
|
SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME),
|
||||||
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
|
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
|
||||||
SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
|
SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
|
||||||
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
|
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
|
||||||
|
|
|
@ -1002,6 +1002,7 @@ static const struct hda_verb vt1802_init_verbs[] = {
|
||||||
enum {
|
enum {
|
||||||
VIA_FIXUP_INTMIC_BOOST,
|
VIA_FIXUP_INTMIC_BOOST,
|
||||||
VIA_FIXUP_ASUS_G75,
|
VIA_FIXUP_ASUS_G75,
|
||||||
|
VIA_FIXUP_POWER_SAVE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void via_fixup_intmic_boost(struct hda_codec *codec,
|
static void via_fixup_intmic_boost(struct hda_codec *codec,
|
||||||
|
@ -1011,6 +1012,13 @@ static void via_fixup_intmic_boost(struct hda_codec *codec,
|
||||||
override_mic_boost(codec, 0x30, 0, 2, 40);
|
override_mic_boost(codec, 0x30, 0, 2, 40);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void via_fixup_power_save(struct hda_codec *codec,
|
||||||
|
const struct hda_fixup *fix, int action)
|
||||||
|
{
|
||||||
|
if (action == HDA_FIXUP_ACT_PRE_PROBE)
|
||||||
|
codec->power_save_node = 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct hda_fixup via_fixups[] = {
|
static const struct hda_fixup via_fixups[] = {
|
||||||
[VIA_FIXUP_INTMIC_BOOST] = {
|
[VIA_FIXUP_INTMIC_BOOST] = {
|
||||||
.type = HDA_FIXUP_FUNC,
|
.type = HDA_FIXUP_FUNC,
|
||||||
|
@ -1025,11 +1033,16 @@ static const struct hda_fixup via_fixups[] = {
|
||||||
{ }
|
{ }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
[VIA_FIXUP_POWER_SAVE] = {
|
||||||
|
.type = HDA_FIXUP_FUNC,
|
||||||
|
.v.func = via_fixup_power_save,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct snd_pci_quirk vt2002p_fixups[] = {
|
static const struct snd_pci_quirk vt2002p_fixups[] = {
|
||||||
SND_PCI_QUIRK(0x1043, 0x1487, "Asus G75", VIA_FIXUP_ASUS_G75),
|
SND_PCI_QUIRK(0x1043, 0x1487, "Asus G75", VIA_FIXUP_ASUS_G75),
|
||||||
SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST),
|
SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST),
|
||||||
|
SND_PCI_QUIRK(0x1558, 0x3501, "Clevo W35xSS_370SS", VIA_FIXUP_POWER_SAVE),
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1889,6 +1889,8 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi *umidi,
|
||||||
ms_ep = find_usb_ms_endpoint_descriptor(hostep);
|
ms_ep = find_usb_ms_endpoint_descriptor(hostep);
|
||||||
if (!ms_ep)
|
if (!ms_ep)
|
||||||
continue;
|
continue;
|
||||||
|
if (ms_ep->bNumEmbMIDIJack > 0x10)
|
||||||
|
continue;
|
||||||
if (usb_endpoint_dir_out(ep)) {
|
if (usb_endpoint_dir_out(ep)) {
|
||||||
if (endpoints[epidx].out_ep) {
|
if (endpoints[epidx].out_ep) {
|
||||||
if (++epidx >= MIDI_MAX_ENDPOINTS) {
|
if (++epidx >= MIDI_MAX_ENDPOINTS) {
|
||||||
|
@ -2141,6 +2143,8 @@ static int snd_usbmidi_detect_roland(struct snd_usb_midi *umidi,
|
||||||
cs_desc[1] == USB_DT_CS_INTERFACE &&
|
cs_desc[1] == USB_DT_CS_INTERFACE &&
|
||||||
cs_desc[2] == 0xf1 &&
|
cs_desc[2] == 0xf1 &&
|
||||||
cs_desc[3] == 0x02) {
|
cs_desc[3] == 0x02) {
|
||||||
|
if (cs_desc[4] > 0x10 || cs_desc[5] > 0x10)
|
||||||
|
continue;
|
||||||
endpoint->in_cables = (1 << cs_desc[4]) - 1;
|
endpoint->in_cables = (1 << cs_desc[4]) - 1;
|
||||||
endpoint->out_cables = (1 << cs_desc[5]) - 1;
|
endpoint->out_cables = (1 << cs_desc[5]) - 1;
|
||||||
return snd_usbmidi_detect_endpoints(umidi, endpoint, 1);
|
return snd_usbmidi_detect_endpoints(umidi, endpoint, 1);
|
||||||
|
|
|
@ -428,9 +428,8 @@ static int kvm_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn,
|
||||||
kvm->mmu_notifier_count++;
|
kvm->mmu_notifier_count++;
|
||||||
need_tlb_flush = kvm_unmap_hva_range(kvm, range->start, range->end,
|
need_tlb_flush = kvm_unmap_hva_range(kvm, range->start, range->end,
|
||||||
range->flags);
|
range->flags);
|
||||||
need_tlb_flush |= kvm->tlbs_dirty;
|
|
||||||
/* we've to flush the tlb before the pages can be freed */
|
/* we've to flush the tlb before the pages can be freed */
|
||||||
if (need_tlb_flush)
|
if (need_tlb_flush || kvm->tlbs_dirty)
|
||||||
kvm_flush_remote_tlbs(kvm);
|
kvm_flush_remote_tlbs(kvm);
|
||||||
|
|
||||||
spin_unlock(&kvm->mmu_lock);
|
spin_unlock(&kvm->mmu_lock);
|
||||||
|
|
Loading…
Reference in New Issue