diff options
author | jimharris <jimharris@FreeBSD.org> | 2015-09-11 16:59:04 +0000 |
---|---|---|
committer | jimharris <jimharris@FreeBSD.org> | 2015-09-11 16:59:04 +0000 |
commit | f5725c2bdfce75c4020feb9d8ca1b702d6a158b6 (patch) | |
tree | da809ba568436624c3cf79a6b6a648c38ac9da58 /sys/dev/nvme | |
parent | 5be2a0f48edf04cc6f799c301c10871cb21a705b (diff) | |
download | FreeBSD-src-f5725c2bdfce75c4020feb9d8ca1b702d6a158b6.zip FreeBSD-src-f5725c2bdfce75c4020feb9d8ca1b702d6a158b6.tar.gz |
MFC r286043:
nvme: do not notify a consumer about failures that occur during initialization
Sponsored by: Intel
Diffstat (limited to 'sys/dev/nvme')
-rw-r--r-- | sys/dev/nvme/nvme.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c index 329c5e5..cc14d34 100644 --- a/sys/dev/nvme/nvme.c +++ b/sys/dev/nvme/nvme.c @@ -390,6 +390,15 @@ nvme_notify_fail_consumers(struct nvme_controller *ctrlr) struct nvme_consumer *cons; uint32_t i; + /* + * This controller failed during initialization (i.e. IDENTIFY + * command failed or timed out). Do not notify any nvme + * consumers of the failure here, since the consumer does not + * even know about the controller yet. + */ + if (!ctrlr->is_initialized) + return; + for (i = 0; i < NVME_MAX_CONSUMERS; i++) { cons = &nvme_consumer[i]; if (cons->id != INVALID_CONSUMER_ID && cons->fail_fn != NULL) |