Add debug logging to Gridseed driver init

This commit is contained in:
Gemini Bot
2026-01-21 13:26:02 +00:00
parent 9c7992340b
commit 5fe74aa636

View File

@@ -287,16 +287,25 @@ static void gc3355_init(struct cgpu_info *gridseed, GRIDSEED_INFO *info)
unsigned char buf[512]; unsigned char buf[512];
int amount; int amount;
applog(LOG_NOTICE, "DEBUG: gc3355_init called. opt_scrypt is: %d", opt_scrypt);
applog(LOG_NOTICE, "System reseting"); applog(LOG_NOTICE, "System reseting");
gc3355_send_cmds(gridseed, str_reset); gc3355_send_cmds(gridseed, str_reset);
cgsleep_ms(200); cgsleep_ms(200);
usb_buffer_clear(gridseed); usb_buffer_clear(gridseed);
usb_read_timeout(gridseed, buf, sizeof(buf), &amount, 10, C_GETRESULTS); usb_read_timeout(gridseed, buf, sizeof(buf), &amount, 10, C_GETRESULTS);
applog(LOG_NOTICE, "DEBUG: Sending str_init");
gc3355_send_cmds(gridseed, str_init); gc3355_send_cmds(gridseed, str_init);
if (opt_scrypt)
if (opt_scrypt) {
applog(LOG_NOTICE, "DEBUG: Sending str_ltc_reset (Scrypt Mode)");
gc3355_send_cmds(gridseed, str_ltc_reset); gc3355_send_cmds(gridseed, str_ltc_reset);
else } else {
applog(LOG_NOTICE, "DEBUG: Sending str_btc_reset (SHA256 Mode)");
gc3355_send_cmds(gridseed, str_btc_reset); gc3355_send_cmds(gridseed, str_btc_reset);
}
gc3355_set_core_freq(gridseed); gc3355_set_core_freq(gridseed);
if (info->voltage) if (info->voltage)
gc3355_switch_voltage(gridseed); gc3355_switch_voltage(gridseed);