From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756157AbaIEHXg (ORCPT ); Fri, 5 Sep 2014 03:23:36 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42524 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751924AbaIEHXe (ORCPT ); Fri, 5 Sep 2014 03:23:34 -0400 Message-ID: <540964F0.8070809@suse.com> Date: Fri, 05 Sep 2014 09:23:28 +0200 From: Hannes Reinecke Organization: SuSE Linux Products GmbH User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: "Luis R. Rodriguez" , gregkh@linuxfoundation.org, dmitry.torokhov@gmail.com, falcon@meizu.com, tiwai@suse.de, tj@kernel.org, arjan@linux.intel.com CC: linux-kernel@vger.kernel.org, oleg@redhat.com, akpm@linux-foundation.org, penguin-kernel@i-love.sakura.ne.jp, joseph.salisbury@canonical.com, bpoirier@suse.de, santosh@chelsio.com, "Luis R. Rodriguez" , One Thousand Gnomes , Tim Gardner , Pierre Fersing , Nagalakshmi Nandigama , Praveen Krishnamoorthy , Sreekanth Reddy , Abhijit Mahajan , Hariprasad S , Casey Leedom , MPT-FusionLinux.pdl@avagotech.com, linux-scsi@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [RFC v2 5/6] mptsas: use async probe References: <1409899047-13045-1-git-send-email-mcgrof@do-not-panic.com> <1409899047-13045-6-git-send-email-mcgrof@do-not-panic.com> In-Reply-To: <1409899047-13045-6-git-send-email-mcgrof@do-not-panic.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/05/2014 08:37 AM, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" > > Its reported that mptsas can at times take over 30 seconds > to recognize SCSI storage devices [0], this is done on the > driver's probe path. Use the the new asynch probe to > circumvent systemd from killing this driver. > > [0] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1276705 > > Cc: Tetsuo Handa > Cc: Joseph Salisbury > Cc: One Thousand Gnomes > Cc: Tim Gardner > Cc: Pierre Fersing > Cc: Andrew Morton > Cc: Oleg Nesterov > Cc: Benjamin Poirier > Cc: Greg Kroah-Hartman > Cc: Nagalakshmi Nandigama > Cc: Praveen Krishnamoorthy > Cc: Sreekanth Reddy > Cc: Abhijit Mahajan > Cc: Hariprasad S > Cc: Santosh Rastapur > Cc: Casey Leedom > Cc: MPT-FusionLinux.pdl@avagotech.com > Cc: linux-scsi@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: netdev@vger.kernel.org > Signed-off-by: Luis R. Rodriguez > --- > drivers/message/fusion/mptsas.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c > index 0707fa2..6dfee95 100644 > --- a/drivers/message/fusion/mptsas.c > +++ b/drivers/message/fusion/mptsas.c > @@ -5385,6 +5385,7 @@ static struct pci_driver mptsas_driver = { > .suspend = mptscsih_suspend, > .resume = mptscsih_resume, > #endif > + .driver.async_probe = true, > }; > > static int __init > This is the wrong appoach. First of all, the mptsas, mpt2sas, and mpt3sas all share the same driver layout, so any issue happeing with this driver will most likely affect the others, too. Secondly the driver is event-based anyway, so we should be moving the initialisation to the already existing event handler: diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 0707fa2..6f41e2c 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -5305,7 +5305,7 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id) /* older firmware doesn't support expander events */ if ((ioc->facts.HeaderVersion >> 8) < 0xE) ioc->old_sas_discovery_protocal = 1; - mptsas_scan_sas_topology(ioc); + mptsas_queue_rescan(ioc); mptsas_fw_event_on(ioc); return 0;