Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29481
b: refs/heads/master
c: 3edebac
h: refs/heads/master
i:
  29479: 4f8302a
v: v3
  • Loading branch information
Tejun Heo committed May 31, 2006
1 parent 1379285 commit 681c815
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a04bf4befa8bffa012eedc3a0903c158b9131a9
refs/heads/master: 3edebac41bab7e146578ad9e723ee7fff71c99c0
14 changes: 10 additions & 4 deletions trunk/drivers/scsi/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2743,16 +2743,22 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd,

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

if (ap->flags & ATA_FLAG_DISABLED)
return;

for (i = 0; i < ATA_MAX_DEVICES; i++) {
dev = &ap->device[i];
struct ata_device *dev = &ap->device[i];
struct scsi_device *sdev;

if (!ata_dev_enabled(dev) || dev->sdev)
continue;

if (ata_dev_enabled(dev))
scsi_scan_target(&ap->host->shost_gendev, 0, i, 0, 0);
sdev = __scsi_add_device(ap->host, 0, i, 0, NULL);
if (!IS_ERR(sdev)) {
dev->sdev = sdev;
scsi_device_put(sdev);
}
}
}
1 change: 1 addition & 0 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ struct ata_device {
struct ata_port *ap;
unsigned int devno; /* 0 or 1 */
unsigned long flags; /* ATA_DFLAG_xxx */
struct scsi_device *sdev; /* attached SCSI device */
/* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */
u64 n_sectors; /* size of device, if ATA */
unsigned int class; /* ATA_DEV_xxx */
Expand Down

0 comments on commit 681c815

Please sign in to comment.