Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42144
b: refs/heads/master
c: f84e7e4
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed Dec 3, 2006
1 parent 1e328fb commit f0c26f5
Show file tree
Hide file tree
Showing 2 changed files with 17 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: a569a30d301e4dbc0ad67a211292edece2da1146
refs/heads/master: f84e7e41e1b88547218a3c3b1eb528005e9afdb4
20 changes: 16 additions & 4 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3181,15 +3181,27 @@ static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel,
void ata_scsi_dev_rescan(void *data)
{
struct ata_port *ap = data;
struct ata_device *dev;
unsigned long flags;
unsigned int i;

spin_lock_irqsave(ap->lock, flags);

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

if (ata_dev_enabled(dev) && dev->sdev)
scsi_rescan_device(&(dev->sdev->sdev_gendev));
if (!ata_dev_enabled(dev) || !sdev)
continue;
if (scsi_device_get(sdev))
continue;

spin_unlock_irqrestore(ap->lock, flags);
scsi_rescan_device(&(sdev->sdev_gendev));
scsi_device_put(sdev);
spin_lock_irqsave(ap->lock, flags);
}

spin_unlock_irqrestore(ap->lock, flags);
}

/**
Expand Down

0 comments on commit f0c26f5

Please sign in to comment.