aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
-rw-r--r--drivers/scsi/scsi_scan.c37
1 files changed, 12 insertions, 25 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 327c5d7e5bd2..7eb3a2d40dc5 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -462,10 +462,9 @@ static int scsi_probe_lun(struct scsi_device *sdev, char *inq_result,
462 pass = 1; 462 pass = 1;
463 463
464 next_pass: 464 next_pass:
465 SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO "scsi scan: INQUIRY pass %d " 465 SCSI_LOG_SCAN_BUS(3, sdev_printk(KERN_INFO, sdev,
466 "to host %d channel %d id %d lun %d, length %d\n", 466 "scsi scan: INQUIRY pass %d length %d\n",
467 pass, sdev->host->host_no, sdev->channel, 467 pass, try_inquiry_len));
468 sdev->id, sdev->lun, try_inquiry_len));
469 468
470 /* Each pass gets up to three chances to ignore Unit Attention */ 469 /* Each pass gets up to three chances to ignore Unit Attention */
471 for (count = 0; count < 3; ++count) { 470 for (count = 0; count < 3; ++count) {
@@ -1190,9 +1189,8 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
1190 num_luns = max_scsi_report_luns; 1189 num_luns = max_scsi_report_luns;
1191 } 1190 }
1192 1191
1193 SCSI_LOG_SCAN_BUS(3, printk (KERN_INFO "scsi scan: REPORT LUN scan of" 1192 SCSI_LOG_SCAN_BUS(3, sdev_printk (KERN_INFO, sdev,
1194 " host %d channel %d id %d\n", sdev->host->host_no, 1193 "scsi scan: REPORT LUN scan\n"));
1195 sdev->channel, sdev->id));
1196 1194
1197 /* 1195 /*
1198 * Scan the luns in lun_data. The entry at offset 0 is really 1196 * Scan the luns in lun_data. The entry at offset 0 is really
@@ -1231,9 +1229,10 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
1231 /* 1229 /*
1232 * Got some results, but now none, abort. 1230 * Got some results, but now none, abort.
1233 */ 1231 */
1234 printk(KERN_ERR "scsi: Unexpected response" 1232 sdev_printk(KERN_ERR, sdev,
1235 " from %s lun %d while scanning, scan" 1233 "Unexpected response"
1236 " aborted\n", devname, lun); 1234 " from lun %d while scanning, scan"
1235 " aborted\n", lun);
1237 break; 1236 break;
1238 } 1237 }
1239 } 1238 }
@@ -1418,8 +1417,9 @@ static void scsi_scan_channel(struct Scsi_Host *shost, unsigned int channel,
1418int scsi_scan_host_selected(struct Scsi_Host *shost, unsigned int channel, 1417int scsi_scan_host_selected(struct Scsi_Host *shost, unsigned int channel,
1419 unsigned int id, unsigned int lun, int rescan) 1418 unsigned int id, unsigned int lun, int rescan)
1420{ 1419{
1421 SCSI_LOG_SCAN_BUS(3, printk (KERN_INFO "%s: <%u:%u:%u:%u>\n", 1420 SCSI_LOG_SCAN_BUS(3, shost_printk (KERN_INFO, shost,
1422 __FUNCTION__, shost->host_no, channel, id, lun)); 1421 "%s: <%u:%u:%u>\n",
1422 __FUNCTION__, channel, id, lun));
1423 1423
1424 if (((channel != SCAN_WILD_CARD) && (channel > shost->max_channel)) || 1424 if (((channel != SCAN_WILD_CARD) && (channel > shost->max_channel)) ||
1425 ((id != SCAN_WILD_CARD) && (id > shost->max_id)) || 1425 ((id != SCAN_WILD_CARD) && (id > shost->max_id)) ||
@@ -1452,19 +1452,6 @@ void scsi_scan_host(struct Scsi_Host *shost)
1452} 1452}
1453EXPORT_SYMBOL(scsi_scan_host); 1453EXPORT_SYMBOL(scsi_scan_host);
1454 1454
1455/**
1456 * scsi_scan_single_target - scan the given SCSI target
1457 * @shost: adapter to scan
1458 * @chan: channel to scan
1459 * @id: target id to scan
1460 **/
1461void scsi_scan_single_target(struct Scsi_Host *shost,
1462 unsigned int chan, unsigned int id)
1463{
1464 scsi_scan_host_selected(shost, chan, id, SCAN_WILD_CARD, 1);
1465}
1466EXPORT_SYMBOL(scsi_scan_single_target);
1467
1468void scsi_forget_host(struct Scsi_Host *shost) 1455void scsi_forget_host(struct Scsi_Host *shost)
1469{ 1456{
1470 struct scsi_device *sdev; 1457 struct scsi_device *sdev;