diff options
| author | Omer Shpigelman <oshpigelman@habana.ai> | 2021-08-16 13:27:12 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-26 14:10:24 +0200 |
| commit | f621eeead8d6eca12289dc8f52727cd23d5c5b21 (patch) | |
| tree | 4d132d7f7b1cc114cd957bb0fbb775b7cf73dd33 /include | |
| parent | 836c0806500d645446a614259cecd0b072bda2eb (diff) | |
| download | linux-f621eeead8d6eca12289dc8f52727cd23d5c5b21.tar.gz linux-f621eeead8d6eca12289dc8f52727cd23d5c5b21.tar.bz2 linux-f621eeead8d6eca12289dc8f52727cd23d5c5b21.zip | |
habanalabs: add "in device creation" status
[ Upstream commit 71731090ab17a208a58020e4b342fdfee280458a ]
On init, the disabled state is cleared right before hw_init and that
causes the device to report on "Operational" state before the device
initialization is finished. Although the char device is not yet exposed
to the user at this stage, the sysfs entries are exposed.
This can cause errors in monitoring applications that use the sysfs
entries.
In order to avoid this, a new state "in device creation" is introduced
to ne reported when the device is not disabled but is still in init
flow.
Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/uapi/misc/habanalabs.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h index a47a731e4527..b4b681b81df8 100644 --- a/include/uapi/misc/habanalabs.h +++ b/include/uapi/misc/habanalabs.h @@ -276,7 +276,9 @@ enum hl_device_status { HL_DEVICE_STATUS_OPERATIONAL, HL_DEVICE_STATUS_IN_RESET, HL_DEVICE_STATUS_MALFUNCTION, - HL_DEVICE_STATUS_NEEDS_RESET + HL_DEVICE_STATUS_NEEDS_RESET, + HL_DEVICE_STATUS_IN_DEVICE_CREATION, + HL_DEVICE_STATUS_LAST = HL_DEVICE_STATUS_IN_DEVICE_CREATION }; /* Opcode for management ioctl |
