From patchwork Sat May 2 02:30:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David VomLehn X-Patchwork-Id: 26802 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 EBB96B707C for ; Sat, 2 May 2009 12:30:55 +1000 (EST) Received: by ozlabs.org (Postfix) id D5D60DDF58; Sat, 2 May 2009 12:30:55 +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 77C66DDF55 for ; Sat, 2 May 2009 12:30:55 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754539AbZEBCaF (ORCPT ); Fri, 1 May 2009 22:30:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753849AbZEBCaE (ORCPT ); Fri, 1 May 2009 22:30:04 -0400 Received: from sj-iport-3.cisco.com ([171.71.176.72]:28493 "EHLO sj-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752106AbZEBCaA (ORCPT ); Fri, 1 May 2009 22:30:00 -0400 X-IronPort-AV: E=Sophos;i="4.40,281,1238976000"; d="scan'208";a="158433888" Received: from sj-dkim-2.cisco.com ([171.71.179.186]) by sj-iport-3.cisco.com with ESMTP; 02 May 2009 02:30:00 +0000 Received: from sj-core-2.cisco.com (sj-core-2.cisco.com [171.71.177.254]) by sj-dkim-2.cisco.com (8.12.11/8.12.11) with ESMTP id n422U01o031277; Fri, 1 May 2009 19:30:00 -0700 Received: from cuplxvomd02.corp.sa.net ([64.101.20.155]) by sj-core-2.cisco.com (8.13.8/8.13.8) with ESMTP id n422U0tw025547; Sat, 2 May 2009 02:30:00 GMT Date: Fri, 1 May 2009 19:30:00 -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 5/5] initdev:kernel: USB and SCSI block init device notification, v3 Message-ID: <20090502023000.GA16076@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=1989; t=1241231400; x=1242095400; c=relaxed/simple; s=sjdkim2002; 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=205/5]=20initdev=3Akernel=3A=20USB=20and =20SCSI=20block=20init=20device=0A=09notification,=20v3 |Sender:=20; bh=V33GltyFv7pYEBETuaovK+ph4jpv2SSGI/Litw/ixXE=; b=egBqIh05+2JQxHMxQ6WfpaQJX3bKMIQVOrEwasZyu5kUEykgBQZ2Ny4cYx I8dMuyXv25lmwUVeAo9ALAuD5lPrsnxWV6GFDRnU10x1u8DW9XMyq9YeL+oG O46A6rt6EQ; Authentication-Results: sj-dkim-2; header.From=dvomlehn@cisco.com; dkim=pass ( sig from cisco.com/sjdkim2002 verified; ); Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Alan Stern --- drivers/scsi/scsi_scan.c | 2 ++ drivers/usb/storage/usb.c | 3 +++ 2 files changed, 5 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/scsi_scan.c b/drivers/scsi/scsi_scan.c index 6f51ca4..735b061 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -1834,6 +1834,7 @@ static int do_scan_async(void *_data) struct async_scan_data *data = _data; do_scsi_scan_host(data->shost); scsi_finish_async_scan(data); + initdev_probe_done(BOOTDEV_BLOCK_MASK); return 0; } @@ -1855,6 +1856,7 @@ void scsi_scan_host(struct Scsi_Host *shost) return; } + initdev_found(BOOTDEV_BLOCK_MASK); p = kthread_run(do_scan_async, data, "scsi_scan_%d", shost->host_no); if (IS_ERR(p)) do_scan_async(data); diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 8060b85..ea7abab 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -837,6 +837,7 @@ static int usb_stor_scan_thread(void * __us) /* Should we unbind if no devices were detected? */ } + initdev_probe_done(BOOTDEV_BLOCK_MASK); complete_and_exit(&us->scanning_done, 0); } @@ -937,10 +938,12 @@ int usb_stor_probe2(struct us_data *us) } /* Start up the thread for delayed SCSI-device scanning */ + initdev_found(BOOTDEV_BLOCK_MASK); th = kthread_create(usb_stor_scan_thread, us, "usb-stor-scan"); if (IS_ERR(th)) { printk(KERN_WARNING USB_STORAGE "Unable to start the device-scanning thread\n"); + initdev_probe_done(BOOTDEV_BLOCK_MASK); complete(&us->scanning_done); quiesce_and_remove_host(us); result = PTR_ERR(th);