Skip to content

Commit

Permalink
Changes representative of linux-3.10.0-1160.24.1.el7.tar.xz
Browse files Browse the repository at this point in the history
  • Loading branch information
da-x committed Mar 25, 2021
1 parent c0bf8ac commit 35c0343
Show file tree
Hide file tree
Showing 16 changed files with 364 additions and 219 deletions.
36 changes: 36 additions & 0 deletions .gitlab-ci-private.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This CI will only work for trusted contributors. CI for public contributors
# runs via a webhook on the merge requests. There's nothing you have to do if
# you want your changes tested -- created pipelines will be automatically
# linked in the merge request and appropriate labels will be added to it.
# Changes to this file will NOT be reflected in the testing.

workflow:
rules:
- if: $CI_MERGE_REQUEST_ID

trigger_pipeline:
variables:
git_url: ${CI_MERGE_REQUEST_PROJECT_URL}.git
git_url_cache_owner: kernel
branch: ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}
commit_hash: ${CI_COMMIT_SHA}
name: kernel-rhel7
mr_id: ${CI_MERGE_REQUEST_IID}
mr_url: ${CI_MERGE_REQUEST_PROJECT_URL}/-/merge_requests/${CI_MERGE_REQUEST_IID}
title: ${CI_COMMIT_TITLE}

kernel_type: internal
make_target: rpm
builder_image: quay.io/cki/builder-rhel7
architectures: 'x86_64 ppc64le ppc64 s390x'
build_kabi_whitelist: 'true'
tree_yaml_name: rhel
kpet_tree_family: rhel7
package_name: kernel
publish_elsewhere: 'true'
native_tools: 'false'
trigger:
project: redhat/red-hat-ci-tools/kernel/cki-scratch-pipelines/scratch-pipelines
branch: rhel7
strategy: depend

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EXTRAVERSION =
NAME = Unicycling Gorilla
RHEL_MAJOR = 7
RHEL_MINOR = 9
RHEL_RELEASE = 1160.21.1
RHEL_RELEASE = 1160.24.1

#
# DRM backport version
Expand Down
10 changes: 9 additions & 1 deletion drivers/mmc/core/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,7 @@ static void mmc_blk_mq_req_done(struct mmc_request *mrq)
if (waiting)
wake_up(&mq->wait);
else
kblockd_schedule_work(&mq->complete_work);
queue_work(mq->card->complete_wq, &mq->complete_work);

return;
}
Expand Down Expand Up @@ -2898,6 +2898,13 @@ static int mmc_blk_probe(struct mmc_card *card)

mmc_fixup_device(card, mmc_blk_fixups);

card->complete_wq = alloc_workqueue("mmc_complete",
WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
if (unlikely(!card->complete_wq)) {
pr_err("Failed to create mmc completion workqueue");
return -ENOMEM;
}

md = mmc_blk_alloc(card);
if (IS_ERR(md))
return PTR_ERR(md);
Expand Down Expand Up @@ -2959,6 +2966,7 @@ static void mmc_blk_remove(struct mmc_card *card)
pm_runtime_put_noidle(&card->dev);
mmc_blk_remove_req(md);
dev_set_drvdata(&card->dev, NULL);
destroy_workqueue(card->complete_wq);
}

static int _mmc_blk_suspend(struct mmc_card *card)
Expand Down
21 changes: 14 additions & 7 deletions drivers/net/ethernet/mellanox/mlx4/en_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1377,8 +1377,10 @@ static void mlx4_en_tx_timeout(struct net_device *dev)
}

priv->port_stats.tx_timeout++;
en_dbg(DRV, priv, "Scheduling watchdog\n");
queue_work(mdev->workqueue, &priv->watchdog_task);
if (!test_and_set_bit(MLX4_EN_STATE_FLAG_RESTARTING, &priv->state)) {
en_dbg(DRV, priv, "Scheduling port restart\n");
queue_work(mdev->workqueue, &priv->restart_task);
}
}


Expand Down Expand Up @@ -1732,6 +1734,7 @@ int mlx4_en_start_port(struct net_device *dev)
mlx4_en_deactivate_cq(priv, cq);
goto tx_err;
}
clear_bit(MLX4_EN_TX_RING_STATE_RECOVERING, &tx_ring->state);
if (t != TX_XDP) {
tx_ring->tx_queue = netdev_get_tx_queue(dev, i);
tx_ring->recycle_ring = NULL;
Expand Down Expand Up @@ -1828,6 +1831,7 @@ int mlx4_en_start_port(struct net_device *dev)
local_bh_enable();
}

clear_bit(MLX4_EN_STATE_FLAG_RESTARTING, &priv->state);
netif_tx_start_all_queues(dev);
netif_device_attach(dev);

Expand Down Expand Up @@ -1998,7 +2002,7 @@ void mlx4_en_stop_port(struct net_device *dev, int detach)
static void mlx4_en_restart(struct work_struct *work)
{
struct mlx4_en_priv *priv = container_of(work, struct mlx4_en_priv,
watchdog_task);
restart_task);
struct mlx4_en_dev *mdev = priv->mdev;
struct net_device *dev = priv->dev;

Expand Down Expand Up @@ -2378,7 +2382,7 @@ static int mlx4_en_change_mtu(struct net_device *dev, int new_mtu)
if (netif_running(dev)) {
mutex_lock(&mdev->state_lock);
if (!mdev->device_up) {
/* NIC is probably restarting - let watchdog task reset
/* NIC is probably restarting - let restart task reset
* the port */
en_dbg(DRV, priv, "Change MTU called with card down!?\n");
} else {
Expand All @@ -2387,7 +2391,9 @@ static int mlx4_en_change_mtu(struct net_device *dev, int new_mtu)
if (err) {
en_err(priv, "Failed restarting port:%d\n",
priv->port);
queue_work(mdev->workqueue, &priv->watchdog_task);
if (!test_and_set_bit(MLX4_EN_STATE_FLAG_RESTARTING,
&priv->state))
queue_work(mdev->workqueue, &priv->restart_task);
}
}
mutex_unlock(&mdev->state_lock);
Expand Down Expand Up @@ -2857,7 +2863,8 @@ static int mlx4_xdp_set(struct net_device *dev, struct bpf_prog *prog)
if (err) {
en_err(priv, "Failed starting port %d for XDP change\n",
priv->port);
queue_work(mdev->workqueue, &priv->watchdog_task);
if (!test_and_set_bit(MLX4_EN_STATE_FLAG_RESTARTING, &priv->state))
queue_work(mdev->workqueue, &priv->restart_task);
}
}

Expand Down Expand Up @@ -3257,7 +3264,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
priv->counter_index = MLX4_SINK_COUNTER_INDEX(mdev->dev);
spin_lock_init(&priv->stats_lock);
INIT_WORK(&priv->rx_mode_task, mlx4_en_do_set_rx_mode);
INIT_WORK(&priv->watchdog_task, mlx4_en_restart);
INIT_WORK(&priv->restart_task, mlx4_en_restart);
INIT_WORK(&priv->linkstate_task, mlx4_en_linkstate);
INIT_DELAYED_WORK(&priv->stats_task, mlx4_en_do_get_stats);
INIT_DELAYED_WORK(&priv->service_task, mlx4_en_service_task);
Expand Down
40 changes: 33 additions & 7 deletions drivers/net/ethernet/mellanox/mlx4/en_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,35 @@ int mlx4_en_free_tx_buf(struct net_device *dev, struct mlx4_en_tx_ring *ring)
return cnt;
}

static void mlx4_en_handle_err_cqe(struct mlx4_en_priv *priv, struct mlx4_err_cqe *err_cqe,
u16 cqe_index, struct mlx4_en_tx_ring *ring)
{
struct mlx4_en_dev *mdev = priv->mdev;
struct mlx4_en_tx_info *tx_info;
struct mlx4_en_tx_desc *tx_desc;
u16 wqe_index;
int desc_size;

en_err(priv, "CQE error - cqn 0x%x, ci 0x%x, vendor syndrome: 0x%x syndrome: 0x%x\n",
ring->sp_cqn, cqe_index, err_cqe->vendor_err_syndrome, err_cqe->syndrome);
print_hex_dump(KERN_WARNING, "", DUMP_PREFIX_OFFSET, 16, 1, err_cqe, sizeof(*err_cqe),
false);

wqe_index = be16_to_cpu(err_cqe->wqe_index) & ring->size_mask;
tx_info = &ring->tx_info[wqe_index];
desc_size = tx_info->nr_txbb << LOG_TXBB_SIZE;
en_err(priv, "Related WQE - qpn 0x%x, wqe index 0x%x, wqe size 0x%x\n", ring->qpn,
wqe_index, desc_size);
tx_desc = ring->buf + (wqe_index << LOG_TXBB_SIZE);
print_hex_dump(KERN_WARNING, "", DUMP_PREFIX_OFFSET, 16, 1, tx_desc, desc_size, false);

if (test_and_set_bit(MLX4_EN_STATE_FLAG_RESTARTING, &priv->state))
return;

en_err(priv, "Scheduling port restart\n");
queue_work(mdev->workqueue, &priv->restart_task);
}

bool mlx4_en_process_tx_cq(struct net_device *dev,
struct mlx4_en_cq *cq, int napi_budget)
{
Expand Down Expand Up @@ -431,13 +460,10 @@ bool mlx4_en_process_tx_cq(struct net_device *dev,
dma_rmb();

if (unlikely((cqe->owner_sr_opcode & MLX4_CQE_OPCODE_MASK) ==
MLX4_CQE_OPCODE_ERROR)) {
struct mlx4_err_cqe *cqe_err = (struct mlx4_err_cqe *)cqe;

en_err(priv, "CQE error - vendor syndrome: 0x%x syndrome: 0x%x\n",
cqe_err->vendor_err_syndrome,
cqe_err->syndrome);
}
MLX4_CQE_OPCODE_ERROR))
if (!test_and_set_bit(MLX4_EN_TX_RING_STATE_RECOVERING, &ring->state))
mlx4_en_handle_err_cqe(priv, (struct mlx4_err_cqe *)cqe, index,
ring);

/* Skip over last polled CQE */
new_index = be16_to_cpu(cqe->wqe_index) & size_mask;
Expand Down
12 changes: 11 additions & 1 deletion drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ struct mlx4_en_page_cache {
} buf[MLX4_EN_CACHE_SIZE];
};

enum {
MLX4_EN_TX_RING_STATE_RECOVERING,
};

struct mlx4_en_priv;

struct mlx4_en_tx_ring {
Expand Down Expand Up @@ -319,6 +323,7 @@ struct mlx4_en_tx_ring {
* Only queue_stopped might be used if BQL is not properly working.
*/
unsigned long queue_stopped;
unsigned long state;
struct mlx4_hwq_resources sp_wqres;
struct mlx4_qp sp_qp;
struct mlx4_qp_context sp_context;
Expand Down Expand Up @@ -535,6 +540,10 @@ struct mlx4_en_stats_bitmap {
struct mutex mutex; /* for mutual access to stats bitmap */
};

enum {
MLX4_EN_STATE_FLAG_RESTARTING,
};

struct mlx4_en_priv {
struct mlx4_en_dev *mdev;
struct mlx4_en_port_profile *prof;
Expand Down Expand Up @@ -600,7 +609,7 @@ struct mlx4_en_priv {
struct mlx4_en_cq *rx_cq[MAX_RX_RINGS];
struct mlx4_qp drop_qp;
struct work_struct rx_mode_task;
struct work_struct watchdog_task;
struct work_struct restart_task;
struct work_struct linkstate_task;
struct delayed_work stats_task;
struct delayed_work service_task;
Expand Down Expand Up @@ -648,6 +657,7 @@ struct mlx4_en_priv {
u32 pflags;
u8 rss_key[MLX4_EN_RSS_KEY_SIZE];
u8 rss_hash_fn;
unsigned long state;
};

enum mlx4_en_wol {
Expand Down
Loading

0 comments on commit 35c0343

Please sign in to comment.