From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751321AbcECEZz (ORCPT ); Tue, 3 May 2016 00:25:55 -0400 Received: from ozlabs.org ([103.22.144.67]:56204 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbcECEZy (ORCPT ); Tue, 3 May 2016 00:25:54 -0400 Date: Tue, 3 May 2016 14:25:52 +1000 From: Stephen Rothwell To: Jens Axboe Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Keith Busch , Christoph Hellwig Subject: linux-next: manual merge of the block tree with Linus' tree Message-ID: <20160503142552.1c5e1d83@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jens, Today's linux-next merge of the block tree got a conflict in: drivers/nvme/host/pci.c between commit: 9bf2b972afea ("NVMe: Fix reset/remove race") from Linus' tree and commit: bb8d261e0888 ("nvme: introduce a controller state machine") from the block tree. I fixed it up (I think - see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. -- Cheers, Stephen Rothwell diff --cc drivers/nvme/host/pci.c index 4fd733ff72b1,077e9bf6a1b8..000000000000 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@@ -1864,10 -1789,8 +1789,11 @@@ static void nvme_reset_work(struct work if (dev->ctrl.ctrl_config & NVME_CC_ENABLE) nvme_dev_disable(dev, false); - if (test_bit(NVME_CTRL_REMOVING, &dev->flags)) ++ if (dev->ctrl.state != NVME_CTRL_DELETING) + goto out; + - set_bit(NVME_CTRL_RESETTING, &dev->flags); + if (!nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_RESETTING)) + goto out; result = nvme_pci_enable(dev); if (result) @@@ -2086,12 -2014,11 +2017,10 @@@ static void nvme_remove(struct pci_dev { struct nvme_dev *dev = pci_get_drvdata(pdev); - set_bit(NVME_CTRL_REMOVING, &dev->flags); - del_timer_sync(&dev->watchdog_timer); - + nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DELETING); + pci_set_drvdata(pdev, NULL); - flush_work(&dev->async_work); + flush_work(&dev->reset_work); - flush_work(&dev->scan_work); - nvme_remove_namespaces(&dev->ctrl); nvme_uninit_ctrl(&dev->ctrl); nvme_dev_disable(dev, true); flush_work(&dev->reset_work);