Skip to content

Commit

Permalink
Merge branch 'scsi-scan'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Garzik committed Oct 4, 2005
2 parents 9d5b130 + 3f19ee8 commit 643736a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4203,7 +4203,7 @@ int ata_device_add(struct ata_probe_ent *ent)
for (i = 0; i < count; i++) {
struct ata_port *ap = host_set->ports[i];

scsi_scan_host(ap->host);
ata_scsi_scan_host(ap);
}

dev_set_drvdata(dev, host_set);
Expand Down
16 changes: 16 additions & 0 deletions drivers/scsi/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1816,3 +1816,19 @@ void ata_scsi_simulate(u16 *id,
}
}

void ata_scsi_scan_host(struct ata_port *ap)
{
struct ata_device *dev;
unsigned int i;

if (ap->flags & ATA_FLAG_PORT_DISABLED)
return;

for (i = 0; i < ATA_MAX_DEVICES; i++) {
dev = &ap->device[i];

if (ata_dev_present(dev))
scsi_scan_target(&ap->host->shost_gendev, 0, i, 0, 0);
}
}

1 change: 1 addition & 0 deletions drivers/scsi/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ extern void swap_buf_le16(u16 *buf, unsigned int buf_words);


/* libata-scsi.c */
extern void ata_scsi_scan_host(struct ata_port *ap);
extern void ata_to_sense_error(struct ata_queued_cmd *qc, u8 drv_stat);
extern int ata_scsi_error(struct Scsi_Host *host);
extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf,
Expand Down

0 comments on commit 643736a

Please sign in to comment.