Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271659
b: refs/heads/master
c: 4840b78
h: refs/heads/master
i:
  271657: a9a2682
  271655: c4d52ae
v: v3
  • Loading branch information
Jarod Wilson authored and Mauro Carvalho Chehab committed Aug 27, 2011
1 parent 1247460 commit bacce30
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa3348980a504c01e300823ab743cb2d874327fa
refs/heads/master: 4840b788ad608977d47964d39ee53a55bec41702
13 changes: 13 additions & 0 deletions trunk/drivers/media/rc/mceusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ struct mceusb_dev {
char name[128];
char phys[64];
enum mceusb_model_type model;

bool need_reset; /* flag to issue a device resume cmd */
};

/* MCE Device Command Strings, generally a port and command pair */
Expand Down Expand Up @@ -735,6 +737,14 @@ static void mce_request_packet(struct mceusb_dev *ir, unsigned char *data,

static void mce_async_out(struct mceusb_dev *ir, unsigned char *data, int size)
{
int rsize = sizeof(DEVICE_RESUME);

if (ir->need_reset) {
ir->need_reset = false;
mce_request_packet(ir, DEVICE_RESUME, rsize, MCEUSB_TX);
msleep(10);
}

mce_request_packet(ir, data, size, MCEUSB_TX);
msleep(10);
}
Expand Down Expand Up @@ -909,6 +919,9 @@ static void mceusb_handle_command(struct mceusb_dev *ir, int index)
case MCE_RSP_EQIRRXPORTEN:
ir->learning_enabled = ((hi & 0x02) == 0x02);
break;
case MCE_RSP_CMD_ILLEGAL:
ir->need_reset = true;
break;
default:
break;
}
Expand Down

0 comments on commit bacce30

Please sign in to comment.