Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29504
b: refs/heads/master
c: d87fa38
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed May 31, 2006
1 parent e9f89f2 commit 5b3d4d8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 31 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: 52783c5dcc8d317bc8c3e2692d366e8a305abada
refs/heads/master: d87fa38e70853a9607dc34a02d15cf5f149f49f2
28 changes: 0 additions & 28 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2783,34 +2783,6 @@ void ata_std_postreset(struct ata_port *ap, unsigned int *classes)
DPRINTK("EXIT\n");
}

int ata_do_reset(struct ata_port *ap, ata_reset_fn_t reset,
unsigned int *classes)
{
int i, rc;

for (i = 0; i < ATA_MAX_DEVICES; i++)
classes[i] = ATA_DEV_UNKNOWN;

rc = reset(ap, classes);
if (rc)
return rc;

/* If any class isn't ATA_DEV_UNKNOWN, consider classification
* is complete and convert all ATA_DEV_UNKNOWN to
* ATA_DEV_NONE.
*/
for (i = 0; i < ATA_MAX_DEVICES; i++)
if (classes[i] != ATA_DEV_UNKNOWN)
break;

if (i < ATA_MAX_DEVICES)
for (i = 0; i < ATA_MAX_DEVICES; i++)
if (classes[i] == ATA_DEV_UNKNOWN)
classes[i] = ATA_DEV_NONE;

return 0;
}

/**
* ata_dev_same_device - Determine whether new ID matches configured device
* @dev: device to compare against
Expand Down
28 changes: 28 additions & 0 deletions trunk/drivers/scsi/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,34 @@ static void ata_eh_report(struct ata_port *ap)
}
}

static int ata_do_reset(struct ata_port *ap, ata_reset_fn_t reset,
unsigned int *classes)
{
int i, rc;

for (i = 0; i < ATA_MAX_DEVICES; i++)
classes[i] = ATA_DEV_UNKNOWN;

rc = reset(ap, classes);
if (rc)
return rc;

/* If any class isn't ATA_DEV_UNKNOWN, consider classification
* is complete and convert all ATA_DEV_UNKNOWN to
* ATA_DEV_NONE.
*/
for (i = 0; i < ATA_MAX_DEVICES; i++)
if (classes[i] != ATA_DEV_UNKNOWN)
break;

if (i < ATA_MAX_DEVICES)
for (i = 0; i < ATA_MAX_DEVICES; i++)
if (classes[i] == ATA_DEV_UNKNOWN)
classes[i] = ATA_DEV_NONE;

return 0;
}

static int ata_eh_followup_srst_needed(int rc, int classify,
const unsigned int *classes)
{
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/scsi/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ extern int sata_down_spd_limit(struct ata_port *ap);
extern int sata_set_spd_needed(struct ata_port *ap);
extern int ata_down_xfermask_limit(struct ata_device *dev, int force_pio0);
extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev);
extern int ata_do_reset(struct ata_port *ap, ata_reset_fn_t reset,
unsigned int *classes);
extern void ata_qc_free(struct ata_queued_cmd *qc);
extern void ata_qc_issue(struct ata_queued_cmd *qc);
extern void __ata_qc_complete(struct ata_queued_cmd *qc);
Expand Down

0 comments on commit 5b3d4d8

Please sign in to comment.