aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-24 09:56:57 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-24 09:56:57 -0500
commit2e9edbf815e42f93dd29a9981f27bd421acc47df (patch)
tree57f4026cc532879c0678c535e15c5172b62d2106 /drivers/scsi/libata-core.c
parentebdfca6eb1b755d3bfe9a81339ecdafd92038c1a (diff)
[libata] export ata_dev_pair; trim trailing whitespace
Mostly, trim trailing whitespace. Also: * export ata_dev_pair * move ata_dev_classify export closer to ata_dev_pair export
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c49
1 files changed, 25 insertions, 24 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 909568f7a72a..94ad4acf8a59 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -190,7 +190,7 @@ static const u8 ata_rw_cmds[] = {
190 * ata_rwcmd_protocol - set taskfile r/w commands and protocol 190 * ata_rwcmd_protocol - set taskfile r/w commands and protocol
191 * @qc: command to examine and configure 191 * @qc: command to examine and configure
192 * 192 *
193 * Examine the device configuration and tf->flags to calculate 193 * Examine the device configuration and tf->flags to calculate
194 * the proper read/write commands and protocol to use. 194 * the proper read/write commands and protocol to use.
195 * 195 *
196 * LOCKING: 196 * LOCKING:
@@ -203,7 +203,7 @@ int ata_rwcmd_protocol(struct ata_queued_cmd *qc)
203 u8 cmd; 203 u8 cmd;
204 204
205 int index, fua, lba48, write; 205 int index, fua, lba48, write;
206 206
207 fua = (tf->flags & ATA_TFLAG_FUA) ? 4 : 0; 207 fua = (tf->flags & ATA_TFLAG_FUA) ? 4 : 0;
208 lba48 = (tf->flags & ATA_TFLAG_LBA48) ? 2 : 0; 208 lba48 = (tf->flags & ATA_TFLAG_LBA48) ? 2 : 0;
209 write = (tf->flags & ATA_TFLAG_WRITE) ? 1 : 0; 209 write = (tf->flags & ATA_TFLAG_WRITE) ? 1 : 0;
@@ -1055,7 +1055,7 @@ unsigned int ata_pio_need_iordy(const struct ata_device *adev)
1055 return 0; 1055 return 0;
1056 if (speed > 2) 1056 if (speed > 2)
1057 return 1; 1057 return 1;
1058 1058
1059 /* If we have no drive specific rule, then PIO 2 is non IORDY */ 1059 /* If we have no drive specific rule, then PIO 2 is non IORDY */
1060 1060
1061 if (adev->id[ATA_ID_FIELD_VALID] & 2) { /* EIDE */ 1061 if (adev->id[ATA_ID_FIELD_VALID] & 2) { /* EIDE */
@@ -1583,7 +1583,7 @@ void sata_phy_reset(struct ata_port *ap)
1583 * Obtain the other device on the same cable, or if none is 1583 * Obtain the other device on the same cable, or if none is
1584 * present NULL is returned 1584 * present NULL is returned
1585 */ 1585 */
1586 1586
1587struct ata_device *ata_dev_pair(struct ata_port *ap, struct ata_device *adev) 1587struct ata_device *ata_dev_pair(struct ata_port *ap, struct ata_device *adev)
1588{ 1588{
1589 struct ata_device *pair = &ap->device[1 - adev->devno]; 1589 struct ata_device *pair = &ap->device[1 - adev->devno];
@@ -1620,7 +1620,7 @@ void ata_port_disable(struct ata_port *ap)
1620 * PIO 0-5, MWDMA 0-2 and UDMA 0-6 timings (in nanoseconds). 1620 * PIO 0-5, MWDMA 0-2 and UDMA 0-6 timings (in nanoseconds).
1621 * These were taken from ATA/ATAPI-6 standard, rev 0a, except 1621 * These were taken from ATA/ATAPI-6 standard, rev 0a, except
1622 * for PIO 5, which is a nonstandard extension and UDMA6, which 1622 * for PIO 5, which is a nonstandard extension and UDMA6, which
1623 * is currently supported only by Maxtor drives. 1623 * is currently supported only by Maxtor drives.
1624 */ 1624 */
1625 1625
1626static const struct ata_timing ata_timing[] = { 1626static const struct ata_timing ata_timing[] = {
@@ -1635,11 +1635,11 @@ static const struct ata_timing ata_timing[] = {
1635 { XFER_UDMA_0, 0, 0, 0, 0, 0, 0, 0, 120 }, 1635 { XFER_UDMA_0, 0, 0, 0, 0, 0, 0, 0, 120 },
1636 1636
1637/* { XFER_UDMA_SLOW, 0, 0, 0, 0, 0, 0, 0, 150 }, */ 1637/* { XFER_UDMA_SLOW, 0, 0, 0, 0, 0, 0, 0, 150 }, */
1638 1638
1639 { XFER_MW_DMA_2, 25, 0, 0, 0, 70, 25, 120, 0 }, 1639 { XFER_MW_DMA_2, 25, 0, 0, 0, 70, 25, 120, 0 },
1640 { XFER_MW_DMA_1, 45, 0, 0, 0, 80, 50, 150, 0 }, 1640 { XFER_MW_DMA_1, 45, 0, 0, 0, 80, 50, 150, 0 },
1641 { XFER_MW_DMA_0, 60, 0, 0, 0, 215, 215, 480, 0 }, 1641 { XFER_MW_DMA_0, 60, 0, 0, 0, 215, 215, 480, 0 },
1642 1642
1643 { XFER_SW_DMA_2, 60, 0, 0, 0, 120, 120, 240, 0 }, 1643 { XFER_SW_DMA_2, 60, 0, 0, 0, 120, 120, 240, 0 },
1644 { XFER_SW_DMA_1, 90, 0, 0, 0, 240, 240, 480, 0 }, 1644 { XFER_SW_DMA_1, 90, 0, 0, 0, 240, 240, 480, 0 },
1645 { XFER_SW_DMA_0, 120, 0, 0, 0, 480, 480, 960, 0 }, 1645 { XFER_SW_DMA_0, 120, 0, 0, 0, 480, 480, 960, 0 },
@@ -1692,7 +1692,7 @@ static const struct ata_timing* ata_timing_find_mode(unsigned short speed)
1692 for (t = ata_timing; t->mode != speed; t++) 1692 for (t = ata_timing; t->mode != speed; t++)
1693 if (t->mode == 0xFF) 1693 if (t->mode == 0xFF)
1694 return NULL; 1694 return NULL;
1695 return t; 1695 return t;
1696} 1696}
1697 1697
1698int ata_timing_compute(struct ata_device *adev, unsigned short speed, 1698int ata_timing_compute(struct ata_device *adev, unsigned short speed,
@@ -1702,7 +1702,7 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
1702 struct ata_timing p; 1702 struct ata_timing p;
1703 1703
1704 /* 1704 /*
1705 * Find the mode. 1705 * Find the mode.
1706 */ 1706 */
1707 1707
1708 if (!(s = ata_timing_find_mode(speed))) 1708 if (!(s = ata_timing_find_mode(speed)))
@@ -2078,11 +2078,11 @@ static unsigned int ata_bus_softreset(struct ata_port *ap,
2078 */ 2078 */
2079 msleep(150); 2079 msleep(150);
2080 2080
2081 2081
2082 /* Before we perform post reset processing we want to see if 2082 /* Before we perform post reset processing we want to see if
2083 the bus shows 0xFF because the odd clown forgets the D7 pulldown 2083 the bus shows 0xFF because the odd clown forgets the D7 pulldown
2084 resistor */ 2084 resistor */
2085 2085
2086 if (ata_check_status(ap) == 0xFF) 2086 if (ata_check_status(ap) == 0xFF)
2087 return 1; /* Positive is failure for some reason */ 2087 return 1; /* Positive is failure for some reason */
2088 2088
@@ -2651,22 +2651,22 @@ static const char * const ata_dma_blacklist [] = {
2651 "SanDisk SDP3B-64", NULL, 2651 "SanDisk SDP3B-64", NULL,
2652 "SANYO CD-ROM CRD", NULL, 2652 "SANYO CD-ROM CRD", NULL,
2653 "HITACHI CDR-8", NULL, 2653 "HITACHI CDR-8", NULL,
2654 "HITACHI CDR-8335", NULL, 2654 "HITACHI CDR-8335", NULL,
2655 "HITACHI CDR-8435", NULL, 2655 "HITACHI CDR-8435", NULL,
2656 "Toshiba CD-ROM XM-6202B", NULL, 2656 "Toshiba CD-ROM XM-6202B", NULL,
2657 "TOSHIBA CD-ROM XM-1702BC", NULL, 2657 "TOSHIBA CD-ROM XM-1702BC", NULL,
2658 "CD-532E-A", NULL, 2658 "CD-532E-A", NULL,
2659 "E-IDE CD-ROM CR-840", NULL, 2659 "E-IDE CD-ROM CR-840", NULL,
2660 "CD-ROM Drive/F5A", NULL, 2660 "CD-ROM Drive/F5A", NULL,
2661 "WPI CDD-820", NULL, 2661 "WPI CDD-820", NULL,
2662 "SAMSUNG CD-ROM SC-148C", NULL, 2662 "SAMSUNG CD-ROM SC-148C", NULL,
2663 "SAMSUNG CD-ROM SC", NULL, 2663 "SAMSUNG CD-ROM SC", NULL,
2664 "SanDisk SDP3B-64", NULL, 2664 "SanDisk SDP3B-64", NULL,
2665 "ATAPI CD-ROM DRIVE 40X MAXIMUM",NULL, 2665 "ATAPI CD-ROM DRIVE 40X MAXIMUM",NULL,
2666 "_NEC DV5800A", NULL, 2666 "_NEC DV5800A", NULL,
2667 "SAMSUNG CD-ROM SN-124", "N001" 2667 "SAMSUNG CD-ROM SN-124", "N001"
2668}; 2668};
2669 2669
2670static int ata_strim(char *s, size_t len) 2670static int ata_strim(char *s, size_t len)
2671{ 2671{
2672 len = strnlen(s, len); 2672 len = strnlen(s, len);
@@ -3697,7 +3697,7 @@ static void ata_pio_error(struct ata_port *ap)
3697 if (qc->tf.command != ATA_CMD_PACKET) 3697 if (qc->tf.command != ATA_CMD_PACKET)
3698 printk(KERN_WARNING "ata%u: PIO error\n", ap->id); 3698 printk(KERN_WARNING "ata%u: PIO error\n", ap->id);
3699 3699
3700 /* make sure qc->err_mask is available to 3700 /* make sure qc->err_mask is available to
3701 * know what's wrong and recover 3701 * know what's wrong and recover
3702 */ 3702 */
3703 WARN_ON(qc->err_mask == 0); 3703 WARN_ON(qc->err_mask == 0);
@@ -4695,7 +4695,7 @@ err_free_ret:
4695 * ata_host_set_remove - PCI layer callback for device removal 4695 * ata_host_set_remove - PCI layer callback for device removal
4696 * @host_set: ATA host set that was removed 4696 * @host_set: ATA host set that was removed
4697 * 4697 *
4698 * Unregister all objects associated with this host set. Free those 4698 * Unregister all objects associated with this host set. Free those
4699 * objects. 4699 * objects.
4700 * 4700 *
4701 * LOCKING: 4701 * LOCKING:
@@ -4967,6 +4967,8 @@ EXPORT_SYMBOL_GPL(ata_std_postreset);
4967EXPORT_SYMBOL_GPL(ata_std_probe_reset); 4967EXPORT_SYMBOL_GPL(ata_std_probe_reset);
4968EXPORT_SYMBOL_GPL(ata_drive_probe_reset); 4968EXPORT_SYMBOL_GPL(ata_drive_probe_reset);
4969EXPORT_SYMBOL_GPL(ata_dev_revalidate); 4969EXPORT_SYMBOL_GPL(ata_dev_revalidate);
4970EXPORT_SYMBOL_GPL(ata_dev_classify);
4971EXPORT_SYMBOL_GPL(ata_dev_pair);
4970EXPORT_SYMBOL_GPL(ata_port_disable); 4972EXPORT_SYMBOL_GPL(ata_port_disable);
4971EXPORT_SYMBOL_GPL(ata_ratelimit); 4973EXPORT_SYMBOL_GPL(ata_ratelimit);
4972EXPORT_SYMBOL_GPL(ata_busy_sleep); 4974EXPORT_SYMBOL_GPL(ata_busy_sleep);
@@ -4977,7 +4979,6 @@ EXPORT_SYMBOL_GPL(ata_scsi_error);
4977EXPORT_SYMBOL_GPL(ata_scsi_slave_config); 4979EXPORT_SYMBOL_GPL(ata_scsi_slave_config);
4978EXPORT_SYMBOL_GPL(ata_scsi_release); 4980EXPORT_SYMBOL_GPL(ata_scsi_release);
4979EXPORT_SYMBOL_GPL(ata_host_intr); 4981EXPORT_SYMBOL_GPL(ata_host_intr);
4980EXPORT_SYMBOL_GPL(ata_dev_classify);
4981EXPORT_SYMBOL_GPL(ata_id_string); 4982EXPORT_SYMBOL_GPL(ata_id_string);
4982EXPORT_SYMBOL_GPL(ata_id_c_string); 4983EXPORT_SYMBOL_GPL(ata_id_c_string);
4983EXPORT_SYMBOL_GPL(ata_scsi_simulate); 4984EXPORT_SYMBOL_GPL(ata_scsi_simulate);