Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30902
b: refs/heads/master
c: af181c2
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jun 27, 2006
1 parent e97d308 commit ea029d1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 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: 41542dbe12e34165e586de1e3fe0a245707aa39e
refs/heads/master: af181c2d765ec9735356bc313ab9e844ec2c7a24
50 changes: 25 additions & 25 deletions trunk/drivers/scsi/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,31 @@ static int ata_ering_map(struct ata_ering *ering,
return rc;
}

static void ata_eh_clear_action(struct ata_device *dev,
struct ata_eh_info *ehi, unsigned int action)
{
int i;

if (!dev) {
ehi->action &= ~action;
for (i = 0; i < ATA_MAX_DEVICES; i++)
ehi->dev_action[i] &= ~action;
} else {
/* doesn't make sense for port-wide EH actions */
WARN_ON(!(action & ATA_EH_PERDEV_MASK));

/* break ehi->action into ehi->dev_action */
if (ehi->action & action) {
for (i = 0; i < ATA_MAX_DEVICES; i++)
ehi->dev_action[i] |= ehi->action & action;
ehi->action &= ~action;
}

/* turn off the specified per-dev action */
ehi->dev_action[dev->devno] &= ~action;
}
}

/**
* ata_scsi_timed_out - SCSI layer time out callback
* @cmd: timed out SCSI command
Expand Down Expand Up @@ -705,31 +730,6 @@ static void ata_eh_detach_dev(struct ata_device *dev)
spin_unlock_irqrestore(ap->lock, flags);
}

static void ata_eh_clear_action(struct ata_device *dev,
struct ata_eh_info *ehi, unsigned int action)
{
int i;

if (!dev) {
ehi->action &= ~action;
for (i = 0; i < ATA_MAX_DEVICES; i++)
ehi->dev_action[i] &= ~action;
} else {
/* doesn't make sense for port-wide EH actions */
WARN_ON(!(action & ATA_EH_PERDEV_MASK));

/* break ehi->action into ehi->dev_action */
if (ehi->action & action) {
for (i = 0; i < ATA_MAX_DEVICES; i++)
ehi->dev_action[i] |= ehi->action & action;
ehi->action &= ~action;
}

/* turn off the specified per-dev action */
ehi->dev_action[dev->devno] &= ~action;
}
}

/**
* ata_eh_about_to_do - about to perform eh_action
* @ap: target ATA port
Expand Down

0 comments on commit ea029d1

Please sign in to comment.