idxd: Rename idxd_genstatus_register to idxd_gensts_register
This is called GENSTS in the spec, so match that name. Signed-off-by: Ben Walker <benjamin.walker@intel.com> Change-Id: I0e8f917e13908f3920ab297e14cb3adee856eaa5 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11432 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
51d1e752a8
commit
4ac05e3abc
@ -389,7 +389,7 @@ union idxd_offsets_register {
|
||||
};
|
||||
SPDK_STATIC_ASSERT(sizeof(union idxd_offsets_register) == 16, "size mismatch");
|
||||
|
||||
union idxd_genstatus_register {
|
||||
union idxd_gensts_register {
|
||||
struct {
|
||||
uint32_t state: 2;
|
||||
uint32_t reset_type: 2;
|
||||
@ -397,7 +397,7 @@ union idxd_genstatus_register {
|
||||
};
|
||||
uint32_t raw;
|
||||
};
|
||||
SPDK_STATIC_ASSERT(sizeof(union idxd_genstatus_register) == 4, "size mismatch");
|
||||
SPDK_STATIC_ASSERT(sizeof(union idxd_gensts_register) == 4, "size mismatch");
|
||||
|
||||
union idxd_cmdsts_reg {
|
||||
struct {
|
||||
|
@ -337,7 +337,7 @@ idxd_device_configure(struct spdk_user_idxd_device *user_idxd)
|
||||
{
|
||||
int i, rc = 0;
|
||||
union idxd_offsets_register offsets_reg;
|
||||
union idxd_genstatus_register genstatus_reg;
|
||||
union idxd_gensts_register gensts_reg;
|
||||
struct spdk_idxd_device *idxd = &user_idxd->idxd;
|
||||
|
||||
/*
|
||||
@ -392,20 +392,20 @@ idxd_device_configure(struct spdk_user_idxd_device *user_idxd)
|
||||
/*
|
||||
* Enable the device
|
||||
*/
|
||||
genstatus_reg.raw = _idxd_read_4(idxd, IDXD_GENSTATUS_OFFSET);
|
||||
assert(genstatus_reg.state == IDXD_DEVICE_STATE_DISABLED);
|
||||
gensts_reg.raw = _idxd_read_4(idxd, IDXD_GENSTATUS_OFFSET);
|
||||
assert(gensts_reg.state == IDXD_DEVICE_STATE_DISABLED);
|
||||
|
||||
_idxd_write_4(idxd, IDXD_CMD_OFFSET, IDXD_ENABLE_DEV << IDXD_CMD_SHIFT);
|
||||
rc = idxd_wait_cmd(idxd, IDXD_REGISTER_TIMEOUT_US);
|
||||
genstatus_reg.raw = _idxd_read_4(idxd, IDXD_GENSTATUS_OFFSET);
|
||||
if ((rc < 0) || (genstatus_reg.state != IDXD_DEVICE_STATE_ENABLED)) {
|
||||
gensts_reg.raw = _idxd_read_4(idxd, IDXD_GENSTATUS_OFFSET);
|
||||
if ((rc < 0) || (gensts_reg.state != IDXD_DEVICE_STATE_ENABLED)) {
|
||||
rc = -EINVAL;
|
||||
SPDK_ERRLOG("Error enabling device %u\n", rc);
|
||||
goto err_device_enable;
|
||||
}
|
||||
|
||||
genstatus_reg.raw = spdk_mmio_read_4((uint32_t *)(user_idxd->reg_base + IDXD_GENSTATUS_OFFSET));
|
||||
assert(genstatus_reg.state == IDXD_DEVICE_STATE_ENABLED);
|
||||
gensts_reg.raw = spdk_mmio_read_4((uint32_t *)(user_idxd->reg_base + IDXD_GENSTATUS_OFFSET));
|
||||
assert(gensts_reg.state == IDXD_DEVICE_STATE_ENABLED);
|
||||
|
||||
/*
|
||||
* Enable the work queues that we've configured
|
||||
@ -420,7 +420,7 @@ idxd_device_configure(struct spdk_user_idxd_device *user_idxd)
|
||||
}
|
||||
}
|
||||
|
||||
if ((rc == 0) && (genstatus_reg.state == IDXD_DEVICE_STATE_ENABLED)) {
|
||||
if ((rc == 0) && (gensts_reg.state == IDXD_DEVICE_STATE_ENABLED)) {
|
||||
SPDK_DEBUGLOG(idxd, "Device enabled, version 0x%x gencap: 0x%lx\n",
|
||||
user_idxd->registers.version,
|
||||
user_idxd->registers.gencap.raw);
|
||||
|
Loading…
Reference in New Issue
Block a user