mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-27 15:04:17 +00:00
libztex: Don't return error when a bitstream was already configured
The high speed and low speed configureFpga functions should not return an error when no bitstream needs to be downloaded. These codepaths are not executed for now, because all calls to configureFpga set the force parameter to true. Future commits may change that, allowing cgminer to start mining immediately if each hardware has already been correctly configured with firmware and bitstream(s).
This commit is contained in:
parent
b70edef9f5
commit
d9479b2cee
@ -284,7 +284,7 @@ static int libztex_configureFpgaHS(struct libztex_device *ztex, const char* firm
|
||||
libztex_getFpgaState(ztex, &state);
|
||||
if (!force && state.fpgaConfigured) {
|
||||
applog(LOG_INFO, "Bitstream already configured");
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
cnt = libusb_control_transfer(ztex->hndl, 0xc0, 0x33, 0, 0, settings, 2, 1000);
|
||||
if (unlikely(cnt < 0)) {
|
||||
@ -359,7 +359,7 @@ static int libztex_configureFpgaLS(struct libztex_device *ztex, const char* firm
|
||||
libztex_getFpgaState(ztex, &state);
|
||||
if (!force && state.fpgaConfigured) {
|
||||
applog(LOG_DEBUG, "Bitstream already configured");
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (tries = 10; tries > 0; tries--) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user