Browse Source

BFLSC enable buffered USB reading

nfactor-troky
Kano 12 years ago
parent
commit
1bec49041f
  1. 8
      driver-bflsc.c

8
driver-bflsc.c

@ -471,6 +471,12 @@ static int write_to_dev(struct cgpu_info *bflsc, int dev, char *buf, int buflen, @@ -471,6 +471,12 @@ static int write_to_dev(struct cgpu_info *bflsc, int dev, char *buf, int buflen,
struct DataForwardToChain data;
int len;
/*
* The protocol is syncronous so any previous excess can be
* discarded and assumed corrupt data or failed USB transfers
*/
usb_buffer_clear(bflsc);
if (dev == 0)
return usb_write(bflsc, buf, buflen, amount, cmd);
@ -949,6 +955,8 @@ reinit: @@ -949,6 +955,8 @@ reinit:
mutex_init(&bflsc->device_mutex);
rwlock_init(&sc_info->stat_lock);
usb_buffer_enable(bflsc);
return true;
unshin:

Loading…
Cancel
Save