Skip to content

Commit

Permalink
Merge tag 'v4.14.333' into 4.14-main
Browse files Browse the repository at this point in the history
This is the 4.14.333 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmV50c4ACgkQONu9yGCS
# aT7NBxAAtKBLAoVN5J4r4/i/H6ac1RonF4Lq6Y2S0CgV81IYPH602dV6OsC6bGh6
# UrSBiA0p2jBDLSFcDJOyrneMxJHveA0KSczAPNscE+ml7bVmiT47ySw6KxdM8wEU
# 3fnSdmUZ96Sa0CQoJSU50ot7lhzAiiMG8JWCLRPDRofIN0+qpTw5oCSnwKGsqyO8
# LJkRujzKfWAykYQIrUYXqeIzzxww0JbE/8MRbeNT+2OfjG/jZamZwBQPFUWih67Q
# qAGFxV4n1MUdo4+kd5rpaYw5/5boPoVo8KIaxnrCWbauXn2MUT0ZWLDKnGu5hptL
# 6PHy66FFTYQjFJpuTc4+X7vzqptSJta8SSDqpcJ9FX9bVUdTuH07QDkA5yGmttb6
# 2W1fJKR9rTyt1+J526xBWgNdyilv08IUP4R6g4RUe2aRuqDMFrPAegcCyeQ7g99f
# cpg5z/knynn1qvJ4CznM83z1ZxwgG861G94ZJPPd2hKTPRltQpt9fF35ekeaHzcF
# f8vZfnYzD228R0FgtDcA8d9VIU/K3gICbhr1SCASy8uUyt+8RRtxxjGX4QUOwbZW
# PQwdX500xLzV5Lg7fOzyuaM/6+oYk+vU5iYJnkeglg5ReYtfEerHNtVRh4PAtgEu
# 04G81HY9cHjSqne6I5MTE/sx9L3JZj5dED8ZqDMqag5pB+G/1EQ=
# =ey14
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Dec 13 16:46:22 2023 CET
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
  • Loading branch information
frank-w committed Jan 14, 2024
2 parents 59bb9df + 27972f3 commit 302b5f6
Show file tree
Hide file tree
Showing 24 changed files with 228 additions and 54 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 14
SUBLEVEL = 332
SUBLEVEL = 333
EXTRAVERSION =
NAME = Petit Gorille

Expand Down
2 changes: 1 addition & 1 deletion arch/s390/mm/pgtable.c
Expand Up @@ -667,7 +667,7 @@ void ptep_zap_unused(struct mm_struct *mm, unsigned long addr,
pte_clear(mm, addr, ptep);
}
if (reset)
pgste_val(pgste) &= ~_PGSTE_GPS_USAGE_MASK;
pgste_val(pgste) &= ~(_PGSTE_GPS_USAGE_MASK | _PGSTE_GPS_NODAT);
pgste_set_unlock(ptep, pgste);
preempt_enable();
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
Expand Up @@ -113,7 +113,7 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)
}

for (i = 0; i < p->nchunks; i++) {
struct drm_amdgpu_cs_chunk __user **chunk_ptr = NULL;
struct drm_amdgpu_cs_chunk __user *chunk_ptr = NULL;
struct drm_amdgpu_cs_chunk user_chunk;
uint32_t __user *cdata;

Expand Down
4 changes: 4 additions & 0 deletions drivers/hwmon/acpi_power_meter.c
Expand Up @@ -45,6 +45,7 @@ ACPI_MODULE_NAME(ACPI_POWER_METER_NAME);
#define POWER_METER_CAN_NOTIFY (1 << 3)
#define POWER_METER_IS_BATTERY (1 << 8)
#define UNKNOWN_HYSTERESIS 0xFFFFFFFF
#define UNKNOWN_POWER 0xFFFFFFFF

#define METER_NOTIFY_CONFIG 0x80
#define METER_NOTIFY_TRIP 0x81
Expand Down Expand Up @@ -356,6 +357,9 @@ static ssize_t show_power(struct device *dev,
update_meter(resource);
mutex_unlock(&resource->lock);

if (resource->power == UNKNOWN_POWER)
return -ENODATA;

return sprintf(buf, "%llu\n", resource->power * 1000);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/bnxt_re/main.c
Expand Up @@ -70,7 +70,7 @@ static char version[] =
BNXT_RE_DESC " v" ROCE_DRV_MODULE_VERSION "\n";

MODULE_AUTHOR("Eddie Wai <eddie.wai@broadcom.com>");
MODULE_DESCRIPTION(BNXT_RE_DESC " Driver");
MODULE_DESCRIPTION(BNXT_RE_DESC);
MODULE_LICENSE("Dual BSD/GPL");

/* globals */
Expand Down
42 changes: 36 additions & 6 deletions drivers/net/ethernet/broadcom/tg3.c
Expand Up @@ -6844,7 +6844,7 @@ static int tg3_rx(struct tg3_napi *tnapi, int budget)
desc_idx, *post_ptr);
drop_it_no_recycle:
/* Other statistics kept track of by card. */
tp->rx_dropped++;
tnapi->rx_dropped++;
goto next_pkt;
}

Expand Down Expand Up @@ -7872,8 +7872,10 @@ static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi,

segs = skb_gso_segment(skb, tp->dev->features &
~(NETIF_F_TSO | NETIF_F_TSO6));
if (IS_ERR(segs) || !segs)
if (IS_ERR(segs) || !segs) {
tnapi->tx_dropped++;
goto tg3_tso_bug_end;
}

do {
nskb = segs;
Expand Down Expand Up @@ -8146,7 +8148,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
drop:
dev_kfree_skb_any(skb);
drop_nofree:
tp->tx_dropped++;
tnapi->tx_dropped++;
return NETDEV_TX_OK;
}

Expand Down Expand Up @@ -9324,7 +9326,7 @@ static void __tg3_set_rx_mode(struct net_device *);
/* tp->lock is held. */
static int tg3_halt(struct tg3 *tp, int kind, bool silent)
{
int err;
int err, i;

tg3_stop_fw(tp);

Expand All @@ -9345,6 +9347,13 @@ static int tg3_halt(struct tg3 *tp, int kind, bool silent)

/* And make sure the next sample is new data */
memset(tp->hw_stats, 0, sizeof(struct tg3_hw_stats));

for (i = 0; i < TG3_IRQ_MAX_VECS; ++i) {
struct tg3_napi *tnapi = &tp->napi[i];

tnapi->rx_dropped = 0;
tnapi->tx_dropped = 0;
}
}

return err;
Expand Down Expand Up @@ -11888,6 +11897,9 @@ static void tg3_get_nstats(struct tg3 *tp, struct rtnl_link_stats64 *stats)
{
struct rtnl_link_stats64 *old_stats = &tp->net_stats_prev;
struct tg3_hw_stats *hw_stats = tp->hw_stats;
unsigned long rx_dropped;
unsigned long tx_dropped;
int i;

stats->rx_packets = old_stats->rx_packets +
get_stat64(&hw_stats->rx_ucast_packets) +
Expand Down Expand Up @@ -11934,8 +11946,26 @@ static void tg3_get_nstats(struct tg3 *tp, struct rtnl_link_stats64 *stats)
stats->rx_missed_errors = old_stats->rx_missed_errors +
get_stat64(&hw_stats->rx_discards);

stats->rx_dropped = tp->rx_dropped;
stats->tx_dropped = tp->tx_dropped;
/* Aggregate per-queue counters. The per-queue counters are updated
* by a single writer, race-free. The result computed by this loop
* might not be 100% accurate (counters can be updated in the middle of
* the loop) but the next tg3_get_nstats() will recompute the current
* value so it is acceptable.
*
* Note that these counters wrap around at 4G on 32bit machines.
*/
rx_dropped = (unsigned long)(old_stats->rx_dropped);
tx_dropped = (unsigned long)(old_stats->tx_dropped);

for (i = 0; i < tp->irq_cnt; i++) {
struct tg3_napi *tnapi = &tp->napi[i];

rx_dropped += tnapi->rx_dropped;
tx_dropped += tnapi->tx_dropped;
}

stats->rx_dropped = rx_dropped;
stats->tx_dropped = tx_dropped;
}

static int tg3_get_regs_len(struct net_device *dev)
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/broadcom/tg3.h
Expand Up @@ -3005,6 +3005,7 @@ struct tg3_napi {
u16 *rx_rcb_prod_idx;
struct tg3_rx_prodring_set prodring;
struct tg3_rx_buffer_desc *rx_rcb;
unsigned long rx_dropped;

u32 tx_prod ____cacheline_aligned;
u32 tx_cons;
Expand All @@ -3013,6 +3014,7 @@ struct tg3_napi {
u32 prodmbox;
struct tg3_tx_buffer_desc *tx_ring;
struct tg3_tx_ring_info *tx_buffers;
unsigned long tx_dropped;

dma_addr_t status_mapping;
dma_addr_t rx_rcb_mapping;
Expand Down Expand Up @@ -3206,8 +3208,6 @@ struct tg3 {


/* begin "everything else" cacheline(s) section */
unsigned long rx_dropped;
unsigned long tx_dropped;
struct rtnl_link_stats64 net_stats_prev;
struct tg3_ethtool_stats estats_prev;

Expand Down
29 changes: 29 additions & 0 deletions drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
Expand Up @@ -70,6 +70,27 @@ static enum mac_mode hns_get_enet_interface(const struct hns_mac_cb *mac_cb)
}
}

static u32 hns_mac_link_anti_shake(struct mac_driver *mac_ctrl_drv)
{
#define HNS_MAC_LINK_WAIT_TIME 5
#define HNS_MAC_LINK_WAIT_CNT 40

u32 link_status = 0;
int i;

if (!mac_ctrl_drv->get_link_status)
return link_status;

for (i = 0; i < HNS_MAC_LINK_WAIT_CNT; i++) {
msleep(HNS_MAC_LINK_WAIT_TIME);
mac_ctrl_drv->get_link_status(mac_ctrl_drv, &link_status);
if (!link_status)
break;
}

return link_status;
}

void hns_mac_get_link_status(struct hns_mac_cb *mac_cb, u32 *link_status)
{
struct mac_driver *mac_ctrl_drv;
Expand All @@ -87,6 +108,14 @@ void hns_mac_get_link_status(struct hns_mac_cb *mac_cb, u32 *link_status)
&sfp_prsnt);
if (!ret)
*link_status = *link_status && sfp_prsnt;

/* for FIBER port, it may have a fake link up.
* when the link status changes from down to up, we need to do
* anti-shake. the anti-shake time is base on tests.
* only FIBER port need to do this.
*/
if (*link_status && !mac_cb->link)
*link_status = hns_mac_link_anti_shake(mac_ctrl_drv);
}

mac_cb->link = *link_status;
Expand Down
21 changes: 21 additions & 0 deletions drivers/parport/parport_pc.c
Expand Up @@ -2647,6 +2647,8 @@ enum parport_pc_pci_cards {
netmos_9865,
quatech_sppxp100,
wch_ch382l,
brainboxes_uc146,
brainboxes_px203,
};


Expand Down Expand Up @@ -2710,6 +2712,8 @@ static struct parport_pc_pci {
/* netmos_9865 */ { 1, { { 0, -1 }, } },
/* quatech_sppxp100 */ { 1, { { 0, 1 }, } },
/* wch_ch382l */ { 1, { { 2, -1 }, } },
/* brainboxes_uc146 */ { 1, { { 3, -1 }, } },
/* brainboxes_px203 */ { 1, { { 0, -1 }, } },
};

static const struct pci_device_id parport_pc_pci_tbl[] = {
Expand Down Expand Up @@ -2801,6 +2805,23 @@ static const struct pci_device_id parport_pc_pci_tbl[] = {
PCI_ANY_ID, PCI_ANY_ID, 0, 0, quatech_sppxp100 },
/* WCH CH382L PCI-E single parallel port card */
{ 0x1c00, 0x3050, 0x1c00, 0x3050, 0, 0, wch_ch382l },
/* Brainboxes IX-500/550 */
{ PCI_VENDOR_ID_INTASHIELD, 0x402a,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, oxsemi_pcie_pport },
/* Brainboxes UC-146/UC-157 */
{ PCI_VENDOR_ID_INTASHIELD, 0x0be1,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, brainboxes_uc146 },
{ PCI_VENDOR_ID_INTASHIELD, 0x0be2,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, brainboxes_uc146 },
/* Brainboxes PX-146/PX-257 */
{ PCI_VENDOR_ID_INTASHIELD, 0x401c,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, oxsemi_pcie_pport },
/* Brainboxes PX-203 */
{ PCI_VENDOR_ID_INTASHIELD, 0x4007,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, brainboxes_px203 },
/* Brainboxes PX-475 */
{ PCI_VENDOR_ID_INTASHIELD, 0x401f,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, oxsemi_pcie_pport },
{ 0, } /* terminate list */
};
MODULE_DEVICE_TABLE(pci, parport_pc_pci_tbl);
Expand Down
1 change: 1 addition & 0 deletions drivers/scsi/be2iscsi/be_main.c
Expand Up @@ -2687,6 +2687,7 @@ static int beiscsi_init_wrb_handle(struct beiscsi_hba *phba)
kfree(pwrb_context->pwrb_handle_base);
kfree(pwrb_context->pwrb_handle_basestd);
}
kfree(phwi_ctxt->be_wrbq);
return -ENOMEM;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/tty/serial/8250/8250_early.c
Expand Up @@ -179,6 +179,7 @@ static int __init early_omap8250_setup(struct earlycon_device *device,
OF_EARLYCON_DECLARE(omap8250, "ti,omap2-uart", early_omap8250_setup);
OF_EARLYCON_DECLARE(omap8250, "ti,omap3-uart", early_omap8250_setup);
OF_EARLYCON_DECLARE(omap8250, "ti,omap4-uart", early_omap8250_setup);
OF_EARLYCON_DECLARE(omap8250, "ti,am654-uart", early_omap8250_setup);

#endif

Expand Down
12 changes: 12 additions & 0 deletions drivers/tty/serial/sc16is7xx.c
Expand Up @@ -699,6 +699,18 @@ static bool sc16is7xx_port_irq(struct sc16is7xx_port *s, int portno)
case SC16IS7XX_IIR_RTOI_SRC:
case SC16IS7XX_IIR_XOFFI_SRC:
rxlen = sc16is7xx_port_read(port, SC16IS7XX_RXLVL_REG);

/*
* There is a silicon bug that makes the chip report a
* time-out interrupt but no data in the FIFO. This is
* described in errata section 18.1.4.
*
* When this happens, read one byte from the FIFO to
* clear the interrupt.
*/
if (iir == SC16IS7XX_IIR_RTOI_SRC && !rxlen)
rxlen = 1;

if (rxlen)
sc16is7xx_handle_rx(port, rxlen, iir);
break;
Expand Down
42 changes: 35 additions & 7 deletions fs/nilfs2/sufile.c
Expand Up @@ -513,15 +513,38 @@ int nilfs_sufile_mark_dirty(struct inode *sufile, __u64 segnum)

down_write(&NILFS_MDT(sufile)->mi_sem);
ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, &bh);
if (!ret) {
mark_buffer_dirty(bh);
nilfs_mdt_mark_dirty(sufile);
kaddr = kmap_atomic(bh->b_page);
su = nilfs_sufile_block_get_segment_usage(sufile, segnum, bh, kaddr);
if (ret)
goto out_sem;

kaddr = kmap_atomic(bh->b_page);
su = nilfs_sufile_block_get_segment_usage(sufile, segnum, bh, kaddr);
if (unlikely(nilfs_segment_usage_error(su))) {
struct the_nilfs *nilfs = sufile->i_sb->s_fs_info;

kunmap_atomic(kaddr);
brelse(bh);
if (nilfs_segment_is_active(nilfs, segnum)) {
nilfs_error(sufile->i_sb,
"active segment %llu is erroneous",
(unsigned long long)segnum);
} else {
/*
* Segments marked erroneous are never allocated by
* nilfs_sufile_alloc(); only active segments, ie,
* the segments indexed by ns_segnum or ns_nextnum,
* can be erroneous here.
*/
WARN_ON_ONCE(1);
}
ret = -EIO;
} else {
nilfs_segment_usage_set_dirty(su);
kunmap_atomic(kaddr);
mark_buffer_dirty(bh);
nilfs_mdt_mark_dirty(sufile);
brelse(bh);
}
out_sem:
up_write(&NILFS_MDT(sufile)->mi_sem);
return ret;
}
Expand All @@ -548,9 +571,14 @@ int nilfs_sufile_set_segment_usage(struct inode *sufile, __u64 segnum,

kaddr = kmap_atomic(bh->b_page);
su = nilfs_sufile_block_get_segment_usage(sufile, segnum, bh, kaddr);
WARN_ON(nilfs_segment_usage_error(su));
if (modtime)
if (modtime) {
/*
* Check segusage error and set su_lastmod only when updating
* this entry with a valid timestamp, not for cancellation.
*/
WARN_ON_ONCE(nilfs_segment_usage_error(su));
su->su_lastmod = cpu_to_le64(modtime);
}
su->su_nblocks = cpu_to_le32(nblocks);
kunmap_atomic(kaddr);

Expand Down
6 changes: 5 additions & 1 deletion fs/nilfs2/the_nilfs.c
Expand Up @@ -697,7 +697,11 @@ int init_nilfs(struct the_nilfs *nilfs, struct super_block *sb, char *data)
goto failed_sbh;
}
nilfs_release_super_block(nilfs);
sb_set_blocksize(sb, blocksize);
if (!sb_set_blocksize(sb, blocksize)) {
nilfs_msg(sb, KERN_ERR, "bad blocksize %d", blocksize);
err = -EINVAL;
goto out;
}

err = nilfs_load_super_block(nilfs, sb, blocksize, &sbp);
if (err)
Expand Down
3 changes: 3 additions & 0 deletions include/net/genetlink.h
Expand Up @@ -11,9 +11,12 @@
/**
* struct genl_multicast_group - generic netlink multicast group
* @name: name of the multicast group, names are per-family
* @cap_sys_admin: whether %CAP_SYS_ADMIN is required for binding
*/
struct genl_multicast_group {
char name[GENL_NAMSIZ];
u8 flags;
u8 cap_sys_admin:1;
};

struct genl_ops;
Expand Down

0 comments on commit 302b5f6

Please sign in to comment.