From patchwork Tue Aug 4 22:15:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David VomLehn X-Patchwork-Id: 30754 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 307D0B6EDE for ; Wed, 5 Aug 2009 08:18:30 +1000 (EST) Received: by ozlabs.org (Postfix) id 24B32DDD0B; Wed, 5 Aug 2009 08:18:30 +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 A1B9BDDD04 for ; Wed, 5 Aug 2009 08:18:29 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933490AbZHDWQI (ORCPT ); Tue, 4 Aug 2009 18:16:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933193AbZHDWQH (ORCPT ); Tue, 4 Aug 2009 18:16:07 -0400 Received: from sj-iport-6.cisco.com ([171.71.176.117]:37821 "EHLO sj-iport-6.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755266AbZHDWPO (ORCPT ); Tue, 4 Aug 2009 18:15:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAEtPeEqrR7MV/2dsb2JhbAC8RYgpkBcFhBg X-IronPort-AV: E=Sophos;i="4.43,324,1246838400"; d="scan'208";a="360440787" Received: from sj-dkim-1.cisco.com ([171.71.179.21]) by sj-iport-6.cisco.com with ESMTP; 04 Aug 2009 22:15:15 +0000 Received: from sj-core-5.cisco.com (sj-core-5.cisco.com [171.71.177.238]) by sj-dkim-1.cisco.com (8.12.11/8.12.11) with ESMTP id n74MFFmY012001; Tue, 4 Aug 2009 15:15:15 -0700 Received: from cuplxvomd02.corp.sa.net ([64.101.20.155]) by sj-core-5.cisco.com (8.13.8/8.14.3) with ESMTP id n74MFFbn025927; Tue, 4 Aug 2009 22:15:15 GMT Date: Tue, 4 Aug 2009 15:15:15 -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 v4] initdev:kernel:USB and SCSI block init device notification Message-ID: <20090804221515.GA9335@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=1879; t=1249424115; x=1250288115; 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=20v4]=20initdev=3Akernel=3AUSB=20a nd=20SCSI=20block=20init=20device=0A=09notification |Sender:=20; bh=vns0xL5UhlOLYUq8arybY+gaonEiJn5XKGQrzksqRkg=; b=EAzzSauGysQZ/TrDsD9IYojDn2547Hhs7yyC4+f0vfGR5fW603Gzv8uJqd DDSCGq03UWq1qXXELxAIdg1iTPCLPpkGqUk3ig012HCT7JfahH7tkbgrJPHb 5/ysRDdHmqKN8C1Av0YzfGY9Sw29X80oQpVmeSJ67cRD0YN7QgV9c=; 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. 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);