aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@xenotime.net>2006-01-28 13:15:32 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-28 13:15:32 -0500
commitc893a3ae49279a4ab6aa6cf594a2ec6d286e1187 (patch)
treea081e82f1273e7dd2c9eb5c26f4078cc5b6a79af /drivers/scsi/libata-core.c
parent6340f019695a08e3b2e317e307014801fc86b178 (diff)
Various libata documentation updates.
This is a merger of libata docs + cleanups from Martin Waitz <tali@admingilde.org> and me. From: Randy Dunlap <rdunlap@xenotime.net> From: Martin Waitz <tali@admingilde.org> Fix libata kernel-doc comments to match code. Add some function parameters to kernel-doc. Fix some typos/spellos. Put comments in <= 80 columns. Make one DPRINTK string unique. Fix sparse cast warnings. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index b369dbd7cb23..249e67fab81f 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1442,12 +1442,11 @@ static inline u8 ata_dev_knobble(const struct ata_port *ap)
1442} 1442}
1443 1443
1444/** 1444/**
1445 * ata_dev_config - Run device specific handlers and check for 1445 * ata_dev_config - Run device specific handlers & check for SATA->PATA bridges
1446 * SATA->PATA bridges 1446 * @ap: Bus
1447 * @ap: Bus 1447 * @i: Device
1448 * @i: Device
1449 * 1448 *
1450 * LOCKING: 1449 * LOCKING:
1451 */ 1450 */
1452 1451
1453void ata_dev_config(struct ata_port *ap, unsigned int i) 1452void ata_dev_config(struct ata_port *ap, unsigned int i)
@@ -1794,9 +1793,9 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
1794 ata_timing_quantize(t, t, T, UT); 1793 ata_timing_quantize(t, t, T, UT);
1795 1794
1796 /* 1795 /*
1797 * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T 1796 * Even in DMA/UDMA modes we still use PIO access for IDENTIFY,
1798 * and some other commands. We have to ensure that the DMA cycle timing is 1797 * S.M.A.R.T * and some other commands. We have to ensure that the
1799 * slower/equal than the fastest PIO timing. 1798 * DMA cycle timing is slower/equal than the fastest PIO timing.
1800 */ 1799 */
1801 1800
1802 if (speed > XFER_PIO_4) { 1801 if (speed > XFER_PIO_4) {
@@ -1805,7 +1804,7 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
1805 } 1804 }
1806 1805
1807 /* 1806 /*
1808 * Lenghten active & recovery time so that cycle time is correct. 1807 * Lengthen active & recovery time so that cycle time is correct.
1809 */ 1808 */
1810 1809
1811 if (t->act8b + t->rec8b < t->cyc8b) { 1810 if (t->act8b + t->rec8b < t->cyc8b) {
@@ -1924,7 +1923,6 @@ static void ata_host_set_dma(struct ata_port *ap, u8 xfer_mode,
1924 * 1923 *
1925 * LOCKING: 1924 * LOCKING:
1926 * PCI/etc. bus probe sem. 1925 * PCI/etc. bus probe sem.
1927 *
1928 */ 1926 */
1929static void ata_set_mode(struct ata_port *ap) 1927static void ata_set_mode(struct ata_port *ap)
1930{ 1928{
@@ -1973,7 +1971,6 @@ err_out:
1973 * or a timeout occurs. 1971 * or a timeout occurs.
1974 * 1972 *
1975 * LOCKING: None. 1973 * LOCKING: None.
1976 *
1977 */ 1974 */
1978 1975
1979unsigned int ata_busy_sleep (struct ata_port *ap, 1976unsigned int ata_busy_sleep (struct ata_port *ap,
@@ -3200,7 +3197,7 @@ void ata_poll_qc_complete(struct ata_queued_cmd *qc)
3200} 3197}
3201 3198
3202/** 3199/**
3203 * ata_pio_poll - 3200 * ata_pio_poll - poll using PIO, depending on current state
3204 * @ap: the target ata_port 3201 * @ap: the target ata_port
3205 * 3202 *
3206 * LOCKING: 3203 * LOCKING:
@@ -3307,7 +3304,7 @@ static int ata_pio_complete (struct ata_port *ap)
3307 3304
3308 3305
3309/** 3306/**
3310 * swap_buf_le16 - swap halves of 16-words in place 3307 * swap_buf_le16 - swap halves of 16-bit words in place
3311 * @buf: Buffer to swap 3308 * @buf: Buffer to swap
3312 * @buf_words: Number of 16-bit words in buffer. 3309 * @buf_words: Number of 16-bit words in buffer.
3313 * 3310 *
@@ -4520,19 +4517,6 @@ err_out:
4520} 4517}
4521 4518
4522 4519
4523/**
4524 * ata_port_start - Set port up for dma.
4525 * @ap: Port to initialize
4526 *
4527 * Called just after data structures for each port are
4528 * initialized. Allocates space for PRD table.
4529 *
4530 * May be used as the port_start() entry in ata_port_operations.
4531 *
4532 * LOCKING:
4533 * Inherited from caller.
4534 */
4535
4536/* 4520/*
4537 * Execute a 'simple' command, that only consists of the opcode 'cmd' itself, 4521 * Execute a 'simple' command, that only consists of the opcode 'cmd' itself,
4538 * without filling any other registers 4522 * without filling any other registers
@@ -4584,6 +4568,8 @@ static int ata_start_drive(struct ata_port *ap, struct ata_device *dev)
4584 4568
4585/** 4569/**
4586 * ata_device_resume - wakeup a previously suspended devices 4570 * ata_device_resume - wakeup a previously suspended devices
4571 * @ap: port the device is connected to
4572 * @dev: the device to resume
4587 * 4573 *
4588 * Kick the drive back into action, by sending it an idle immediate 4574 * Kick the drive back into action, by sending it an idle immediate
4589 * command and making sure its transfer mode matches between drive 4575 * command and making sure its transfer mode matches between drive
@@ -4606,10 +4592,11 @@ int ata_device_resume(struct ata_port *ap, struct ata_device *dev)
4606 4592
4607/** 4593/**
4608 * ata_device_suspend - prepare a device for suspend 4594 * ata_device_suspend - prepare a device for suspend
4595 * @ap: port the device is connected to
4596 * @dev: the device to suspend
4609 * 4597 *
4610 * Flush the cache on the drive, if appropriate, then issue a 4598 * Flush the cache on the drive, if appropriate, then issue a
4611 * standbynow command. 4599 * standbynow command.
4612 *
4613 */ 4600 */
4614int ata_device_suspend(struct ata_port *ap, struct ata_device *dev) 4601int ata_device_suspend(struct ata_port *ap, struct ata_device *dev)
4615{ 4602{
@@ -4623,6 +4610,19 @@ int ata_device_suspend(struct ata_port *ap, struct ata_device *dev)
4623 return 0; 4610 return 0;
4624} 4611}
4625 4612
4613/**
4614 * ata_port_start - Set port up for dma.
4615 * @ap: Port to initialize
4616 *
4617 * Called just after data structures for each port are
4618 * initialized. Allocates space for PRD table.
4619 *
4620 * May be used as the port_start() entry in ata_port_operations.
4621 *
4622 * LOCKING:
4623 * Inherited from caller.
4624 */
4625
4626int ata_port_start (struct ata_port *ap) 4626int ata_port_start (struct ata_port *ap)
4627{ 4627{
4628 struct device *dev = ap->host_set->dev; 4628 struct device *dev = ap->host_set->dev;
@@ -4880,9 +4880,9 @@ int ata_device_add(const struct ata_probe_ent *ent)
4880 4880
4881 ap = host_set->ports[i]; 4881 ap = host_set->ports[i];
4882 4882
4883 DPRINTK("ata%u: probe begin\n", ap->id); 4883 DPRINTK("ata%u: bus probe begin\n", ap->id);
4884 rc = ata_bus_probe(ap); 4884 rc = ata_bus_probe(ap);
4885 DPRINTK("ata%u: probe end\n", ap->id); 4885 DPRINTK("ata%u: bus probe end\n", ap->id);
4886 4886
4887 if (rc) { 4887 if (rc) {
4888 /* FIXME: do something useful here? 4888 /* FIXME: do something useful here?
@@ -4906,7 +4906,7 @@ int ata_device_add(const struct ata_probe_ent *ent)
4906 } 4906 }
4907 4907
4908 /* probes are done, now scan each port's disk(s) */ 4908 /* probes are done, now scan each port's disk(s) */
4909 DPRINTK("probe begin\n"); 4909 DPRINTK("host probe begin\n");
4910 for (i = 0; i < count; i++) { 4910 for (i = 0; i < count; i++) {
4911 struct ata_port *ap = host_set->ports[i]; 4911 struct ata_port *ap = host_set->ports[i];
4912 4912