Skip to content

[Bug]: Discover Nvme Namespaces function is called multiple times in NvmExpressDriverBindingStart #12644

@EricGao2015

Description

@EricGao2015

Is there an existing issue for this?

  • I have searched existing issues

Bug Type

  • Firmware
  • Tool
  • Unit Test

What packages are impacted?

MdeModulePkg

Which targets are impacted by this bug?

DEBUG, RELEASE, NOOPT

Current Behavior

In the NvmExpressDriverBindingStart function, the Discover Nvme Namespaces function is called upon entering the start function, even if the driver is already started. I am confused whether this behavior is intentional or just a bug.

if (RemainingDevicePath == NULL) {
//
// Enumerate all NVME namespaces in the controller
//
Status = DiscoverAllNamespaces (
Private
);
} else if (!IsDevicePathEnd (RemainingDevicePath)) {
//
// Enumerate the specified NVME namespace
//
Status = Private->Passthru.GetNamespace (
&Private->Passthru,
RemainingDevicePath,
&NamespaceId
);
if (!EFI_ERROR (Status)) {
Status = EnumerateNvmeDevNamespace (
Private,
NamespaceId
);
}
}

Expected Behavior

Steps To Reproduce

Build Environment

- OS(s): N/A
- Tool Chain(s): Any

Version Information

edk2-stable202605

Urgency

Low

Are you going to fix this?

I will fix it

Do you need maintainer feedback?

Maintainer feedback requested

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions