diff options
author | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2011-04-19 15:04:20 -0400 |
---|---|---|
committer | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2011-11-04 15:53:02 -0400 |
commit | 22605f96810d073eb74051d0295b6577d6a6a563 (patch) | |
tree | f5af6aebe31f92cd6fe6bc343a931984ef7aa0f2 /include | |
parent | aba2080f3f1639f9202f1a52993669844abcfb80 (diff) | |
download | linux-stable-22605f96810d073eb74051d0295b6577d6a6a563.tar.gz linux-stable-22605f96810d073eb74051d0295b6577d6a6a563.tar.bz2 linux-stable-22605f96810d073eb74051d0295b6577d6a6a563.zip |
NVMe: Time out initialisation after a few seconds
THe device reports (in its capability register) how long it will take
to initialise. If that time elapses before the ready bit becomes set,
conclude the device is broken and refuse to initialise it. Log a nice
error message so the user knows why we did nothing.
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nvme.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 9d6febb91521..a19304fefa7d 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h @@ -35,6 +35,8 @@ struct nvme_bar { __u64 acq; /* Admin CQ Base Address */ }; +#define NVME_CAP_TIMEOUT(cap) (((cap) >> 24) & 0xff) + enum { NVME_CC_ENABLE = 1 << 0, NVME_CC_CSS_NVM = 0 << 4, |