mtp: Forbid link up/failure on blocked links.
This commit is contained in:
parent
86a2a53b90
commit
309d79f5ed
|
@ -62,6 +62,12 @@ void mtp_link_up(struct mtp_link *link)
|
|||
{
|
||||
int one_up;
|
||||
|
||||
if (link->blocked) {
|
||||
LOGP(DINP, LOGL_ERROR, "Ignoring link up on blocked link %s/%d.\n",
|
||||
link->set->name, link->link_no);
|
||||
return;
|
||||
}
|
||||
|
||||
one_up = is_one_up(link->set);
|
||||
link->available = 1;
|
||||
link->was_up = 0;
|
||||
|
|
|
@ -169,6 +169,12 @@ int mtp_link_slta(struct mtp_link *link, uint16_t l3_len,
|
|||
|
||||
void mtp_link_failure(struct mtp_link *link)
|
||||
{
|
||||
if (link->blocked) {
|
||||
LOGP(DINP, LOGL_ERROR, "Ignoring failure on blocked link %s/%d.\n",
|
||||
link->set->name, link->link_no);
|
||||
return;
|
||||
}
|
||||
|
||||
LOGP(DINP, LOGL_ERROR, "Link has failed. Resetting it: %s/%d\n",
|
||||
link->set->name, link->link_no);
|
||||
rate_ctr_inc(&link->ctrg->ctr[MTP_LNK_ERROR]);
|
||||
|
|
Reference in New Issue