[media] pulse8-cec: fix error handling

Support more error codes and fix a bug where MSGCODE_TRANSMIT_FAILED_LINE
was mapped to CEC_TX_STATUS_ARB_LOST, which is wrong.

Thanks to Pulse-Eight for providing me with the information needed
to handle this correctly (I hope).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Hans Verkuil 2016-08-12 06:46:06 -03:00 committed by Mauro Carvalho Chehab
parent 1e6e97541a
commit 31f58e31dc
1 changed files with 4 additions and 4 deletions

View File

@ -114,14 +114,11 @@ static void pulse8_irq_work_handler(struct work_struct *work)
cec_transmit_done(pulse8->adap, CEC_TX_STATUS_OK,
0, 0, 0, 0);
break;
case MSGCODE_TRANSMIT_FAILED_LINE:
cec_transmit_done(pulse8->adap, CEC_TX_STATUS_ARB_LOST,
1, 0, 0, 0);
break;
case MSGCODE_TRANSMIT_FAILED_ACK:
cec_transmit_done(pulse8->adap, CEC_TX_STATUS_NACK,
0, 1, 0, 0);
break;
case MSGCODE_TRANSMIT_FAILED_LINE:
case MSGCODE_TRANSMIT_FAILED_TIMEOUT_DATA:
case MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE:
cec_transmit_done(pulse8->adap, CEC_TX_STATUS_ERROR,
@ -170,6 +167,9 @@ static irqreturn_t pulse8_interrupt(struct serio *serio, unsigned char data,
case MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE:
schedule_work(&pulse8->work);
break;
case MSGCODE_HIGH_ERROR:
case MSGCODE_LOW_ERROR:
case MSGCODE_RECEIVE_FAILED:
case MSGCODE_TIMEOUT_ERROR:
break;
case MSGCODE_COMMAND_ACCEPTED: