aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c57
1 files changed, 44 insertions, 13 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 63d3f70d06e1..4d707d06a5d1 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1241,10 +1241,14 @@ void ata_port_probe(struct ata_port *ap)
1241} 1241}
1242 1242
1243/** 1243/**
1244 * __sata_phy_reset - 1244 * __sata_phy_reset - Wake/reset a low-level SATA PHY
1245 * @ap: 1245 * @ap: SATA port associated with target SATA PHY.
1246 * 1246 *
1247 * LOCKING: 1247 * This function issues commands to standard SATA Sxxx
1248 * PHY registers, to wake up the phy (and device), and
1249 * clear any reset condition.
1250 *
1251 * LOCKING: None. Serialized during ata_bus_probe().
1248 * 1252 *
1249 */ 1253 */
1250void __sata_phy_reset(struct ata_port *ap) 1254void __sata_phy_reset(struct ata_port *ap)
@@ -1289,10 +1293,13 @@ void __sata_phy_reset(struct ata_port *ap)
1289} 1293}
1290 1294
1291/** 1295/**
1292 * __sata_phy_reset - 1296 * sata_phy_reset - Reset SATA bus.
1293 * @ap: 1297 * @ap: SATA port associated with target SATA PHY.
1294 * 1298 *
1295 * LOCKING: 1299 * This function resets the SATA bus, and then probes
1300 * the bus for devices.
1301 *
1302 * LOCKING: None. Serialized during ata_bus_probe().
1296 * 1303 *
1297 */ 1304 */
1298void sata_phy_reset(struct ata_port *ap) 1305void sata_phy_reset(struct ata_port *ap)
@@ -1304,10 +1311,16 @@ void sata_phy_reset(struct ata_port *ap)
1304} 1311}
1305 1312
1306/** 1313/**
1307 * ata_port_disable - 1314 * ata_port_disable - Disable port.
1308 * @ap: 1315 * @ap: Port to be disabled.
1309 * 1316 *
1310 * LOCKING: 1317 * Modify @ap data structure such that the system
1318 * thinks that the entire port is disabled, and should
1319 * never attempt to probe or communicate with devices
1320 * on this port.
1321 *
1322 * LOCKING: host_set lock, or some other form of
1323 * serialization.
1311 */ 1324 */
1312 1325
1313void ata_port_disable(struct ata_port *ap) 1326void ata_port_disable(struct ata_port *ap)
@@ -1416,7 +1429,9 @@ static void ata_host_set_dma(struct ata_port *ap, u8 xfer_mode,
1416 * ata_set_mode - Program timings and issue SET FEATURES - XFER 1429 * ata_set_mode - Program timings and issue SET FEATURES - XFER
1417 * @ap: port on which timings will be programmed 1430 * @ap: port on which timings will be programmed
1418 * 1431 *
1419 * LOCKING: 1432 * Set ATA device disk transfer mode (PIO3, UDMA6, etc.).
1433 *
1434 * LOCKING: None. Serialized during ata_bus_probe().
1420 * 1435 *
1421 */ 1436 */
1422static void ata_set_mode(struct ata_port *ap) 1437static void ata_set_mode(struct ata_port *ap)
@@ -1467,7 +1482,10 @@ err_out:
1467 * @tmout_pat: impatience timeout 1482 * @tmout_pat: impatience timeout
1468 * @tmout: overall timeout 1483 * @tmout: overall timeout
1469 * 1484 *
1470 * LOCKING: 1485 * Sleep until ATA Status register bit BSY clears,
1486 * or a timeout occurs.
1487 *
1488 * LOCKING: None.
1471 * 1489 *
1472 */ 1490 */
1473 1491
@@ -1556,7 +1574,7 @@ static void ata_bus_post_reset(struct ata_port *ap, unsigned int devmask)
1556 * ata_bus_edd - 1574 * ata_bus_edd -
1557 * @ap: 1575 * @ap:
1558 * 1576 *
1559 * LOCKING: 1577 * LOCKING: None. Serialized during ata_bus_probe().
1560 * 1578 *
1561 */ 1579 */
1562 1580
@@ -1909,7 +1927,10 @@ static int ata_choose_xfer_mode(struct ata_port *ap,
1909 * @ap: Port associated with device @dev 1927 * @ap: Port associated with device @dev
1910 * @dev: Device to which command will be sent 1928 * @dev: Device to which command will be sent
1911 * 1929 *
1912 * LOCKING: 1930 * Issue SET FEATURES - XFER MODE command to device @dev
1931 * on port @ap.
1932 *
1933 * LOCKING: None. Serialized during ata_bus_probe().
1913 */ 1934 */
1914 1935
1915static void ata_dev_set_xfermode(struct ata_port *ap, struct ata_device *dev) 1936static void ata_dev_set_xfermode(struct ata_port *ap, struct ata_device *dev)
@@ -1981,7 +2002,11 @@ static void ata_sg_clean(struct ata_queued_cmd *qc)
1981 * ata_fill_sg - Fill PCI IDE PRD table 2002 * ata_fill_sg - Fill PCI IDE PRD table
1982 * @qc: Metadata associated with taskfile to be transferred 2003 * @qc: Metadata associated with taskfile to be transferred
1983 * 2004 *
2005 * Fill PCI IDE PRD (scatter-gather) table with segments
2006 * associated with the current disk command.
2007 *
1984 * LOCKING: 2008 * LOCKING:
2009 * spin_lock_irqsave(host_set lock)
1985 * 2010 *
1986 */ 2011 */
1987static void ata_fill_sg(struct ata_queued_cmd *qc) 2012static void ata_fill_sg(struct ata_queued_cmd *qc)
@@ -2028,6 +2053,10 @@ static void ata_fill_sg(struct ata_queued_cmd *qc)
2028 * ata_check_atapi_dma - Check whether ATAPI DMA can be supported 2053 * ata_check_atapi_dma - Check whether ATAPI DMA can be supported
2029 * @qc: Metadata associated with taskfile to check 2054 * @qc: Metadata associated with taskfile to check
2030 * 2055 *
2056 * Allow low-level driver to filter ATA PACKET commands, returning
2057 * a status indicating whether or not it is OK to use DMA for the
2058 * supplied PACKET command.
2059 *
2031 * LOCKING: 2060 * LOCKING:
2032 * RETURNS: 0 when ATAPI DMA can be used 2061 * RETURNS: 0 when ATAPI DMA can be used
2033 * nonzero otherwise 2062 * nonzero otherwise
@@ -2046,6 +2075,8 @@ int ata_check_atapi_dma(struct ata_queued_cmd *qc)
2046 * ata_qc_prep - Prepare taskfile for submission 2075 * ata_qc_prep - Prepare taskfile for submission
2047 * @qc: Metadata associated with taskfile to be prepared 2076 * @qc: Metadata associated with taskfile to be prepared
2048 * 2077 *
2078 * Prepare ATA taskfile for submission.
2079 *
2049 * LOCKING: 2080 * LOCKING:
2050 * spin_lock_irqsave(host_set lock) 2081 * spin_lock_irqsave(host_set lock)
2051 */ 2082 */