9
0
Fork 0

mtp: Forbid link up/failure on blocked links.

This commit is contained in:
Holger Hans Peter Freyther 2011-01-28 18:26:20 +01:00
parent 86a2a53b90
commit 309d79f5ed
2 changed files with 12 additions and 0 deletions

View File

@ -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;

View File

@ -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]);