From patchwork Thu Oct 8 02:51:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 7348451 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 93DAC9F302 for ; Thu, 8 Oct 2015 02:49:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ADA0A20654 for ; Thu, 8 Oct 2015 02:49:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA77E20626 for ; Thu, 8 Oct 2015 02:48:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753037AbbJHCsp (ORCPT ); Wed, 7 Oct 2015 22:48:45 -0400 Received: from mga09.intel.com ([134.134.136.24]:42880 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751648AbbJHCs3 (ORCPT ); Wed, 7 Oct 2015 22:48:29 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 07 Oct 2015 19:48:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,652,1437462000"; d="scan'208";a="576274722" Received: from gerry-dev.bj.intel.com ([10.238.158.61]) by FMSMGA003.fm.intel.com with ESMTP; 07 Oct 2015 19:48:26 -0700 From: Jiang Liu To: James Bottomley , Thomas Gleixner , Bjorn Helgaas , Arthur Marsh , Hannes Reinecke , Ballabio@vger.kernel.org, Dario , Christoph Hellwig Cc: Jiang Liu , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, x86@kernel.org Subject: [Bugfix v4 2/2] eata: Ask for help to reset eata controllers for kexec Date: Thu, 8 Oct 2015 10:51:15 +0800 Message-Id: <1444272675-14631-2-git-send-email-jiang.liu@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1444272675-14631-1-git-send-email-jiang.liu@linux.intel.com> References: <1444272675-14631-1-git-send-email-jiang.liu@linux.intel.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Arthur Marsh reported that with the first patch applied, he still encountered troubles when doing kexec with eata devices. Quote Arthur's report: To clarify, if the eata driver gets loaded once and stays loaded, at a kexec reboot attempt the "Synchronising SCSI cache" message is missing for the SCSI disk attached to the controller using the eata driver and eventually other error messages appear as seen in screen images that I have previously posted at http://www.users.on.net/~arthur.marsh/20150915547.jpg. If the eata driver is loaded, unloaded via modprobe -r, then reloaded, a kexec reboot shows 2 "Synchronising SCSI cache" messages for the SCSI disk attached to the controller using the eata driver and the kexec reboot is successful. For more details, please refer to thread at: http://www.gossamer-threads.com/lists/linux/kernel/2251833 https://lkml.org/lkml/2015/9/6/165 First I thought we could solve this issue by implementing a shutdown callback to reset eata controllers when rebooting, but it turns out that this patch doesn't really help. And due to limited knowledge about eata controllers and lack of hardware for tests, helps from eata experts are really welcomed! Signed-off-by: Jiang Liu --- drivers/scsi/eata.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 7315f8adcf65..b83abe283744 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c @@ -1519,6 +1519,11 @@ static void eata2x_pci_remove(struct pci_dev *pdev) pci_disable_device(pdev); } +static void eata2x_pci_shutdown(struct pci_dev *pdev) +{ + port_remove(&pdev->dev); +} + static struct pci_device_id eata2x_tbl[] = { { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SCSI << 8, PCI_ANY_ID) }, { }, @@ -1530,6 +1535,7 @@ static struct pci_driver eata2x_pci_driver = { .id_table = eata2x_tbl, .probe = eata2x_pci_probe, .remove = eata2x_pci_remove, + .shutdown = eata2x_pci_shutdown, }; static int eata2x_register_pci_driver(void) @@ -1571,8 +1577,14 @@ static int __exit eata2x_platform_remove(struct platform_device *pdev) return 0; } +static void eata2x_platform_shutdown(struct platform_device *pdev) +{ + port_remove(&pdev->dev); +} + static struct platform_driver eata2x_platform_driver = { .remove = __exit_p(eata2x_platform_remove), + .shutdown = eata2x_platform_shutdown, .driver = { .name = "eata_plat", .owner = THIS_MODULE,