Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21800
b: refs/heads/master
c: c19ba8a
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jan 27, 2006
1 parent f469cd7 commit 582bad8
Show file tree
Hide file tree
Showing 3 changed files with 24 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: b4dc7623c1bb258b66418261dab40f0e4cfc6d42
refs/heads/master: c19ba8af4f104cca28d548cac55c128b28dd31fb
19 changes: 18 additions & 1 deletion trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,24 @@ static int ata_bus_probe(struct ata_port *ap)
{
unsigned int i, found = 0;

ap->ops->phy_reset(ap);
if (ap->ops->probe_reset) {
unsigned int classes[ATA_MAX_DEVICES];
int rc;

ata_port_probe(ap);

rc = ap->ops->probe_reset(ap, classes);
if (rc == 0) {
for (i = 0; i < ATA_MAX_DEVICES; i++)
ap->device[i].class = classes[i];
} else {
printk(KERN_ERR "ata%u: probe reset failed, "
"disabling port\n", ap->id);
ata_port_disable(ap);
}
} else
ap->ops->phy_reset(ap);

if (ap->flags & ATA_FLAG_PORT_DISABLED)
goto err_out;

Expand Down
8 changes: 5 additions & 3 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ enum {
ATA_FLAG_PORT_DISABLED = (1 << 2), /* port is disabled, ignore it */
ATA_FLAG_SATA = (1 << 3),
ATA_FLAG_NO_LEGACY = (1 << 4), /* no legacy mode check */
ATA_FLAG_SRST = (1 << 5), /* use ATA SRST, not E.D.D. */
ATA_FLAG_SRST = (1 << 5), /* (obsolete) use ATA SRST, not E.D.D. */
ATA_FLAG_MMIO = (1 << 6), /* use MMIO, not PIO */
ATA_FLAG_SATA_RESET = (1 << 7), /* use COMRESET */
ATA_FLAG_SATA_RESET = (1 << 7), /* (obsolete) use COMRESET */
ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */
ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once
* proper HSM is in place. */
Expand Down Expand Up @@ -419,7 +419,9 @@ struct ata_port_operations {
u8 (*check_altstatus)(struct ata_port *ap);
void (*dev_select)(struct ata_port *ap, unsigned int device);

void (*phy_reset) (struct ata_port *ap);
void (*phy_reset) (struct ata_port *ap); /* obsolete */
int (*probe_reset) (struct ata_port *ap, unsigned int *classes);

void (*post_set_mode) (struct ata_port *ap);

int (*check_atapi_dma) (struct ata_queued_cmd *qc);
Expand Down

0 comments on commit 582bad8

Please sign in to comment.