• C
    nvme-pci: split the initial probe from the rest path · eac3ef26
    Christoph Hellwig 提交于
    nvme_reset_work is a little fragile as it needs to handle both resetting
    a live controller and initializing one during probe.  Split out the initial
    probe and open code it in nvme_probe and leave nvme_reset_work to just do
    the live controller reset.
    
    This fixes a recently introduced bug where nvme_dev_disable causes a NULL
    pointer dereferences in blk_mq_quiesce_tagset because the tagset pointer
    is not set when the reset state is entered directly from the new state.
    The separate probe code can skip the reset state and probe directly and
    fixes this.
    
    To make sure the system isn't single threaded on enabling nvme
    controllers, set the PROBE_PREFER_ASYNCHRONOUS flag in the device_driver
    structure so that the driver core probes in parallel.
    
    Fixes: 98d81f0d ("nvme: use blk_mq_[un]quiesce_tagset")
    Reported-by: NGerd Bayer <gbayer@linux.ibm.com>
    Signed-off-by: NChristoph Hellwig <hch@lst.de>
    Reviewed-by: NKeith Busch <kbusch@kernel.org>
    Reviewed-by: NChaitanya Kulkarni <kch@nvidia.com>
    Tested-by Gerd Bayer <gbayer@linxu.ibm.com>
    eac3ef26
pci.c 95.3 KB