Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23490
b: refs/heads/master
c: ebdfca6
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Mar 24, 2006
1 parent 40807a1 commit f74de09
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 082776e4be791736c32baf818e50f501a7f83819
refs/heads/master: ebdfca6eb1b755d3bfe9a81339ecdafd92038c1a
17 changes: 17 additions & 0 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,6 +1575,23 @@ void sata_phy_reset(struct ata_port *ap)
ata_bus_reset(ap);
}

/**
* ata_dev_pair - return other device on cable
* @ap: port
* @adev: device
*
* Obtain the other device on the same cable, or if none is
* present NULL is returned
*/

struct ata_device *ata_dev_pair(struct ata_port *ap, struct ata_device *adev)
{
struct ata_device *pair = &ap->device[1 - adev->devno];
if (!ata_dev_present(pair))
return NULL;
return pair;
}

/**
* ata_port_disable - Disable port.
* @ap: Port to be disabled.
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,8 @@ extern int ata_std_bios_param(struct scsi_device *sdev,
struct block_device *bdev,
sector_t capacity, int geom[]);
extern int ata_scsi_slave_config(struct scsi_device *sdev);
extern struct ata_device *ata_dev_pair(struct ata_port *ap,
struct ata_device *adev);

/*
* Timing helpers
Expand Down

0 comments on commit f74de09

Please sign in to comment.