mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Store the device data returned from hashfast header returned in reset
This commit is contained in:
parent
775f2040e5
commit
922b4d850d
@ -223,6 +223,22 @@ static bool hashfast_reset(struct cgpu_info *hashfast, struct hashfast_info *inf
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
applog(LOG_DEBUG, "HFA %d: Good reply to OP_USB_INIT", hashfast->device_id);
|
||||||
|
applog(LOG_DEBUG, "HFA %d: OP_USB_INIT: %d die in chain, %d cores, device_type %d, refclk %d Mhz",
|
||||||
|
hashfast->device_id, h->chip_address, h->core_address, h->hdata & 0xff, (h->hdata >> 8) & 0xff);
|
||||||
|
|
||||||
|
// Save device configuration
|
||||||
|
info->asic_count = h->chip_address;
|
||||||
|
info->core_count = h->core_address;
|
||||||
|
info->device_type = (uint8_t)h->hdata;
|
||||||
|
info->ref_frequency = (uint8_t)(h->hdata>>8);
|
||||||
|
info->hash_sequence = 0;
|
||||||
|
info->hash_sequence_tail = 0;
|
||||||
|
info->device_sequence_tail = 0;
|
||||||
|
|
||||||
|
// Size in bytes of the core bitmap in bytes
|
||||||
|
info->core_bitmap_size = (((info->asic_count * info->core_count) + 31) / 32) * 4;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,11 +21,16 @@
|
|||||||
|
|
||||||
struct hashfast_info {
|
struct hashfast_info {
|
||||||
int asic_count; // # of chips in the chain
|
int asic_count; // # of chips in the chain
|
||||||
|
int core_count; // # of cores per chip
|
||||||
|
int device_type; // What sort of device this is
|
||||||
|
int ref_frequency; // Reference clock rate
|
||||||
|
uint16_t hash_sequence; // The next hash sequence # to be sent
|
||||||
struct hf_g1_die_data *die_status; // Array of per-die voltage, current, temperature sensor data
|
struct hf_g1_die_data *die_status; // Array of per-die voltage, current, temperature sensor data
|
||||||
struct hf_long_statistics *die_statistics; // Array of per-die error counters
|
struct hf_long_statistics *die_statistics; // Array of per-die error counters
|
||||||
int hash_clock_rate; // Hash clock rate to use, in Mhz
|
int hash_clock_rate; // Hash clock rate to use, in Mhz
|
||||||
struct hf_usb_init_base usb_init_base; // USB Base information from USB_INIT
|
struct hf_usb_init_base usb_init_base; // USB Base information from USB_INIT
|
||||||
struct hf_config_data config_data; // Configuration data used from USB_INIT
|
struct hf_config_data config_data; // Configuration data used from USB_INIT
|
||||||
|
int core_bitmap_size; // in bytes
|
||||||
|
|
||||||
struct work **works;
|
struct work **works;
|
||||||
uint16_t device_sequence_head; // The most recent sequence number the device dispatched
|
uint16_t device_sequence_head; // The most recent sequence number the device dispatched
|
||||||
|
Loading…
Reference in New Issue
Block a user