1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

updated cgminer driver for 3.3.1

This commit is contained in:
bkkcoins 2013-07-02 21:43:38 +07:00 committed by Kano
parent 158f3273fe
commit 3cbb281406

View File

@ -193,7 +193,7 @@ static bool klondike_get_stats(struct cgpu_info *klncgpu)
static bool klondike_detect_one(struct libusb_device *dev, struct usb_find_devices *found) static bool klondike_detect_one(struct libusb_device *dev, struct usb_find_devices *found)
{ {
struct cgpu_info *klncgpu = calloc(1, sizeof(*klncgpu)); struct cgpu_info *klncgpu = usb_alloc_cgpu(&klondike_drv, 1);
struct klondike_info *klninfo = NULL; struct klondike_info *klninfo = NULL;
int attempts = 0; int attempts = 0;
@ -201,10 +201,6 @@ static bool klondike_detect_one(struct libusb_device *dev, struct usb_find_devic
if (unlikely(!klncgpu)) if (unlikely(!klncgpu))
quit(1, "Failed to calloc klncgpu in klondike_detect_one"); quit(1, "Failed to calloc klncgpu in klondike_detect_one");
klncgpu->drv = &klondike_drv;
klncgpu->deven = DEV_ENABLED;
klncgpu->threads = 1;
klninfo = calloc(1, sizeof(*klninfo)); klninfo = calloc(1, sizeof(*klninfo));
if (unlikely(!klninfo)) if (unlikely(!klninfo))
quit(1, "Failed to calloc klninfo in klondke_detect_one"); quit(1, "Failed to calloc klninfo in klondke_detect_one");
@ -278,7 +274,8 @@ static void klondike_check_nonce(struct cgpu_info *klncgpu, WORKRESULT *result)
result->nonce = le32toh(result->nonce - 0xC0); result->nonce = le32toh(result->nonce - 0xC0);
applog(LOG_DEBUG, "Klondike SUBMIT NONCE (x%08x)", result->nonce); applog(LOG_DEBUG, "Klondike SUBMIT NONCE (x%08x)", result->nonce);
submit_nonce(klncgpu->thr[0], work, result->nonce); if(submit_nonce(klncgpu->thr[0], work, result->nonce))
work_completed(klncgpu, work);
} }
return; return;
} }