From patchwork Sat Jun 6 02:34:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David VomLehn X-Patchwork-Id: 28183 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 17C4FB70A9 for ; Sat, 6 Jun 2009 13:01:47 +1000 (EST) Received: by ozlabs.org (Postfix) id 0B685DDD1B; Sat, 6 Jun 2009 13:01:47 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 9E4E5DDD0B for ; Sat, 6 Jun 2009 13:01:46 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752327AbZFFDBG (ORCPT ); Fri, 5 Jun 2009 23:01:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754572AbZFFDAz (ORCPT ); Fri, 5 Jun 2009 23:00:55 -0400 Received: from sj-iport-6.cisco.com ([171.71.176.117]:62847 "EHLO sj-iport-6.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753903AbZFFDAs (ORCPT ); Fri, 5 Jun 2009 23:00:48 -0400 X-IronPort-AV: E=Sophos;i="4.41,314,1241395200"; d="scan'208";a="317953920" Received: from sj-dkim-3.cisco.com ([171.71.179.195]) by sj-iport-6.cisco.com with ESMTP; 06 Jun 2009 02:34:13 +0000 Received: from sj-core-3.cisco.com (sj-core-3.cisco.com [171.68.223.137]) by sj-dkim-3.cisco.com (8.12.11/8.12.11) with ESMTP id n562YD1b010038; Fri, 5 Jun 2009 19:34:13 -0700 Received: from cuplxvomd02.corp.sa.net ([64.101.20.155]) by sj-core-3.cisco.com (8.13.8/8.13.8) with ESMTP id n562YD5x026922; Sat, 6 Jun 2009 02:34:13 GMT Date: Fri, 5 Jun 2009 19:34:13 -0700 From: David VomLehn To: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, linux-usb@vger.kernel.org, greg@kroah.com, linux-scsi@vger.kernel.org, netdev@vger.kernel.org, arjan@infradead.org Subject: [PATCH 6/7] initdev:kernel:SCSI asynchronous block init device notification Message-ID: <20090606023413.GA5772@cuplxvomd02.corp.sa.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=1439; t=1244255653; x=1245119653; c=relaxed/simple; s=sjdkim3002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=dvomlehn@cisco.com; z=From:=20David=20VomLehn=20 |Subject:=20[PATCH=206/7]=20initdev=3Akernel=3ASCSI=20async hronous=20block=20init=20device=0A=09notification |Sender:=20; bh=6ec/v9794Hf87pobpY6b9WHj+ok4MVa1TwE/g76/aOE=; b=jKr26G30dubrTuEON1tzqgw7pMOsoGnf2jurL+8Uc2rX2FqPJXojD9nCby x5K199NPWY89QAhOtbVosr2KmRH4bh5w6bJzJ5ozM4U/3CSqpX8h3oRzv7yD ouBEvu3JZO; Authentication-Results: sj-dkim-3; header.From=dvomlehn@cisco.com; dkim=pass ( sig from cisco.com/sjdkim3002 verified; ); Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In addition to the bus initdev synchronization, SCSI also starts asynchronous threads with which we must synchronize. Signed-off-by: David VomLehn --- drivers/scsi/sd.c | 3 +++ fs/partitions/check.c | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 8404423..1104892 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1955,10 +1955,12 @@ static void sd_probe_async(void *data, async_cookie_t cookie) sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", sdp->removable ? "removable " : ""); + initdev_probe_done(INITDEV_BLOCK_MASK); return; out_free_index: ida_remove(&sd_index_ida, index); + initdev_probe_done(INITDEV_BLOCK_MASK); } /** @@ -2026,6 +2028,7 @@ static int sd_probe(struct device *dev) sdkp->openers = 0; sdkp->previous_state = 1; + initdev_found(INITDEV_BLOCK_MASK); async_schedule(sd_probe_async, sdkp); return 0; diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 99e33ef..fbc6cd5 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -502,6 +502,7 @@ exit: while ((part = disk_part_iter_next(&piter))) kobject_uevent(&part_to_dev(part)->kobj, KOBJ_ADD); disk_part_iter_exit(&piter); + initdev_registered(INITDEV_BLOCK_TYPE); } int rescan_partitions(struct gendisk *disk, struct block_device *bdev)