wctc4xxp: We always want to ack the responses.
Furthermore, do it as soon as we know we should to prevent the ack from potentially going out after another CSM_ENCAPS packet on another CPU. Previously, we would not send ACKS to responses we believed we already responded to. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
This commit is contained in:
parent
44a33126e0
commit
bc274e1b5d
@ -2374,19 +2374,15 @@ receive_csm_encaps_packet(struct wcdte *wc, struct tcb *cmd)
|
|||||||
|
|
||||||
if (!(hdr->control & MESSAGE_PACKET)) {
|
if (!(hdr->control & MESSAGE_PACKET)) {
|
||||||
const bool suppress_ack = ((hdr->control & SUPPRESS_ACK) > 0);
|
const bool suppress_ack = ((hdr->control & SUPPRESS_ACK) > 0);
|
||||||
|
|
||||||
|
if (!suppress_ack)
|
||||||
|
wctc4xxp_send_ack(wc, hdr->seq_num, hdr->channel);
|
||||||
|
|
||||||
if (is_response(hdr)) {
|
if (is_response(hdr)) {
|
||||||
u8 seq_num = hdr->seq_num;
|
|
||||||
__be16 channel = hdr->channel;
|
|
||||||
|
|
||||||
do_rx_response_packet(wc, cmd);
|
do_rx_response_packet(wc, cmd);
|
||||||
if (!suppress_ack)
|
|
||||||
wctc4xxp_send_ack(wc, seq_num, channel);
|
|
||||||
|
|
||||||
} else if (0xc1 == hdr->type) {
|
} else if (0xc1 == hdr->type) {
|
||||||
if (!suppress_ack) {
|
|
||||||
wctc4xxp_send_ack(wc, hdr->seq_num,
|
|
||||||
hdr->channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0x75 == hdr->class) {
|
if (0x75 == hdr->class) {
|
||||||
dev_warn(&wc->pdev->dev,
|
dev_warn(&wc->pdev->dev,
|
||||||
@ -2395,10 +2391,6 @@ receive_csm_encaps_packet(struct wcdte *wc, struct tcb *cmd)
|
|||||||
}
|
}
|
||||||
free_cmd(cmd);
|
free_cmd(cmd);
|
||||||
} else if (0xd4 == hdr->type) {
|
} else if (0xd4 == hdr->type) {
|
||||||
if (!suppress_ack) {
|
|
||||||
wctc4xxp_send_ack(wc, hdr->seq_num,
|
|
||||||
hdr->channel);
|
|
||||||
}
|
|
||||||
if (hdr->params[0] != le16_to_cpu(0xffff)) {
|
if (hdr->params[0] != le16_to_cpu(0xffff)) {
|
||||||
dev_warn(&wc->pdev->dev,
|
dev_warn(&wc->pdev->dev,
|
||||||
"DTE Failed self test (%04x).\n",
|
"DTE Failed self test (%04x).\n",
|
||||||
@ -2414,10 +2406,6 @@ receive_csm_encaps_packet(struct wcdte *wc, struct tcb *cmd)
|
|||||||
}
|
}
|
||||||
free_cmd(cmd);
|
free_cmd(cmd);
|
||||||
} else if (MONITOR_LIVE_INDICATION_TYPE == hdr->type) {
|
} else if (MONITOR_LIVE_INDICATION_TYPE == hdr->type) {
|
||||||
if (!suppress_ack) {
|
|
||||||
wctc4xxp_send_ack(wc, hdr->seq_num,
|
|
||||||
hdr->channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hdr->function == 0x0000) {
|
if (hdr->function == 0x0000) {
|
||||||
u16 alert_type = le16_to_cpu(hdr->params[0]);
|
u16 alert_type = le16_to_cpu(hdr->params[0]);
|
||||||
@ -2434,10 +2422,6 @@ receive_csm_encaps_packet(struct wcdte *wc, struct tcb *cmd)
|
|||||||
print_command(wc, cmd);
|
print_command(wc, cmd);
|
||||||
free_cmd(cmd);
|
free_cmd(cmd);
|
||||||
} else {
|
} else {
|
||||||
if (!suppress_ack) {
|
|
||||||
wctc4xxp_send_ack(wc, hdr->seq_num,
|
|
||||||
hdr->channel);
|
|
||||||
}
|
|
||||||
dev_warn(&wc->pdev->dev,
|
dev_warn(&wc->pdev->dev,
|
||||||
"Unknown command type received. %02x\n", hdr->type);
|
"Unknown command type received. %02x\n", hdr->type);
|
||||||
free_cmd(cmd);
|
free_cmd(cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user