From patchwork Sat Jun 6 02:34:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David VomLehn X-Patchwork-Id: 28182 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 7DF42B70A9 for ; Sat, 6 Jun 2009 13:01:46 +1000 (EST) Received: by ozlabs.org (Postfix) id 71F6BDDD1B; Sat, 6 Jun 2009 13:01:46 +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 14510DDD0B for ; Sat, 6 Jun 2009 13:01:46 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754628AbZFFDBF (ORCPT ); Fri, 5 Jun 2009 23:01:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754521AbZFFDAx (ORCPT ); Fri, 5 Jun 2009 23:00:53 -0400 Received: from sj-iport-6.cisco.com ([171.71.176.117]:62814 "EHLO sj-iport-6.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753885AbZFFDAs (ORCPT ); Fri, 5 Jun 2009 23:00:48 -0400 X-IronPort-AV: E=Sophos;i="4.41,314,1241395200"; d="scan'208";a="317953893" Received: from sj-dkim-1.cisco.com ([171.71.179.21]) by sj-iport-6.cisco.com with ESMTP; 06 Jun 2009 02:34:11 +0000 Received: from sj-core-3.cisco.com (sj-core-3.cisco.com [171.68.223.137]) by sj-dkim-1.cisco.com (8.12.11/8.12.11) with ESMTP id n562YBvl018608; Fri, 5 Jun 2009 19:34:11 -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 n562YBkf026912; Sat, 6 Jun 2009 02:34:11 GMT Date: Fri, 5 Jun 2009 19:34:11 -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/7] initdev:kernel:USB and SCSI block init device notification, v4 Message-ID: <20090606023411.GA5746@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=2025; t=1244255651; x=1245119651; c=relaxed/simple; s=sjdkim1004; 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/7]=20initdev=3Akernel=3AUSB=20and=20 SCSI=20block=20init=20device=0A=09notification,=20v4 |Sender:=20; bh=jbG/kK7m6IVgcUNzjepM2ysClB8j3noqN17XSHepDtY=; b=ZimcRMunAJ5Oy+YVlAhVWO8yCfWIZ8lYqglweiK4Zdevi24FH/nfw+s4ey xy8i9rEM3G4zI0arh4Geou8wc0LkBI+JKD/Vg/OkljhD/UUjjC9ji5Ljpnsw G4W64zoeWmWWhCweT8p+d05lZcLUkH/SWNeSEKw45jrY6cEvzBjSE=; Authentication-Results: sj-dkim-1; header.From=dvomlehn@cisco.com; dkim=pass ( sig from cisco.com/sjdkim1004 verified; ); Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Alan Stern Add notification of device discovery for USB and SCSI block devices. History v4 Change BOOTDEV_* to INITDEV_*. v3 Change bootdev_* to initdev_* v2 Correct location of call to bootdev_found v1 Initial version Signed-off-by: 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..cb7b450 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(INITDEV_BLOCK_MASK); return 0; } @@ -1855,6 +1856,7 @@ void scsi_scan_host(struct Scsi_Host *shost) return; } + initdev_found(INITDEV_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..6a78278 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(INITDEV_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(INITDEV_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(INITDEV_BLOCK_MASK); complete(&us->scanning_done); quiesce_and_remove_host(us); result = PTR_ERR(th);