From: Jeff Garzik <jgarzik@pobox.com>
To: linux-scsi@vger.kernel.org
Subject: [scsi hcil 5/9] split up __spi_scan_target()
Date: Mon, 24 Oct 2005 18:03:06 -0400 [thread overview]
Message-ID: <20051024220306.GE10567@havoc.gtf.org> (raw)
In-Reply-To: <20051024220013.GA10070@havoc.gtf.org>
commit 732f2c555a9778d44905e6dcbcab4caab9a29475
Author: Jeff Garzik <jgarzik@pobox.com>
Date: Mon Oct 24 15:35:30 2005 -0400
[SCSI] split up __spi_scan_target()
Split up __spi_scan_target() into two logical pieces:
* struct scsi_target scanning
* SPI-specific scsi_target allocation
This paves the way for an SPI-independent scsi_scan_target().
drivers/scsi/scsi_scan.c | 33 +++++++++++++++++++--------------
1 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 0cbcbe7..205c89f 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1306,23 +1306,11 @@ void scsi_rescan_device(struct device *d
}
EXPORT_SYMBOL(scsi_rescan_device);
-static void __spi_scan_target(struct device *parent, unsigned int channel,
- unsigned int id, unsigned int lun, int rescan)
+static void __scsi_scan_target(struct scsi_target *starget, unsigned int lun,
+ int rescan)
{
- struct Scsi_Host *shost = dev_to_shost(parent);
int bflags = 0;
int res;
- struct scsi_target *starget;
-
- if (shost->this_id == id)
- /*
- * Don't scan the host adapter
- */
- return;
-
- starget = scsi_alloc_target(parent, channel, id);
- if (!starget)
- return;
get_device(&starget->dev);
if (lun != SCAN_WILD_CARD) {
@@ -1356,6 +1344,23 @@ static void __spi_scan_target(struct dev
put_device(&starget->dev);
}
+static void __spi_scan_target(struct device *parent, unsigned int channel,
+ unsigned int id, unsigned int lun, int rescan)
+{
+ struct Scsi_Host *shost = dev_to_shost(parent);
+ struct scsi_target *starget;
+
+ if (shost->this_id == id)
+ /*
+ * Don't scan the host adapter
+ */
+ return;
+
+ starget = scsi_alloc_target(parent, channel, id);
+ if (starget)
+ __scsi_scan_target(starget, lun, rescan);
+}
+
/**
* spi_scan_target - scan a target id, possibly including all LUNs on the
* target.
next prev parent reply other threads:[~2005-10-24 22:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-24 22:00 [scsi hcil 0/9] marginalize HCIL a bit Jeff Garzik
2005-10-24 22:01 ` [scsi hcil 1/9] kill unused scsi_scan_single_target() Jeff Garzik
2005-10-24 22:01 ` [scsi hcil 2/9] remove cpqfcTS driver, long uncompilable Jeff Garzik
2005-10-24 22:02 ` [scsi hcil 3/9] misc cleanups Jeff Garzik
2005-10-29 1:34 ` James Bottomley
2005-10-24 22:02 ` [scsi hcil 4/9] s/scsi_scan_target/spi_scan_target/ Jeff Garzik
2005-10-24 22:03 ` Jeff Garzik [this message]
2005-10-24 22:03 ` [scsi hcil 6/9] introduce sfoo_printk, sfoo_id, sfoo_channel helpers Jeff Garzik
2005-10-24 22:04 ` [scsi hcil 7/9] use {sdev,scmd,starget,shost}_printk in generic code Jeff Garzik
2005-10-24 22:04 ` [scsi hcil 8/9] use sfoo_printk() in drivers Jeff Garzik
2005-10-24 22:05 ` [scsi hcil 9/9] use scmd_id(), scmd_channel() throughout code Jeff Garzik
2005-10-24 22:30 ` [scsi hcil 10/9] ibmmca bug fix Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051024220306.GE10567@havoc.gtf.org \
--to=jgarzik@pobox.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox