diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-07 09:47:16 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:21 -0400 |
commit | 9363c3825ea9ad76561eb48a395349dd29211ed6 (patch) | |
tree | abe89a0f7c82b805d84b1a211c97b317f6628d5f /include/linux/libata.h | |
parent | b67a1064cb1c1d3b43e01e8b43a6a8dcdefed733 (diff) |
libata: rename SFF functions
SFF functions have confusing names. Some have sff prefix, some have
bmdma, some std, some pci and some none. Unify the naming by...
* SFF functions which are common to both BMDMA and non-BMDMA are
prefixed with ata_sff_.
* SFF functions which are specific to BMDMA are prefixed with
ata_bmdma_.
* SFF functions which are specific to PCI but apply to both BMDMA and
non-BMDMA are prefixed with ata_pci_sff_.
* SFF functions which are specific to PCI and BMDMA are prefixed with
ata_pci_bmdma_.
* Drop generic prefixes from LLD specific routines. For example,
bfin_std_dev_select -> bfin_dev_select.
The following renames are noteworthy.
ata_qc_issue_prot() -> ata_sff_qc_issue()
ata_pci_default_filter() -> ata_bmdma_mode_filter()
ata_dev_try_classify() -> ata_sff_dev_classify()
This rename is in preparation of separating SFF support out of libata
core layer. This patch strictly renames functions and doesn't
introduce any behavior difference.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 103 |
1 files changed, 53 insertions, 50 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index a05de2ba7a72..66663bfe2c71 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -1342,45 +1342,48 @@ extern const struct ata_port_operations ata_bmdma_port_ops; | |||
1342 | .sg_tablesize = LIBATA_MAX_PRD, \ | 1342 | .sg_tablesize = LIBATA_MAX_PRD, \ |
1343 | .dma_boundary = ATA_DMA_BOUNDARY | 1343 | .dma_boundary = ATA_DMA_BOUNDARY |
1344 | 1344 | ||
1345 | extern void ata_qc_prep(struct ata_queued_cmd *qc); | 1345 | extern void ata_sff_qc_prep(struct ata_queued_cmd *qc); |
1346 | extern void ata_dumb_qc_prep(struct ata_queued_cmd *qc); | 1346 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); |
1347 | extern void ata_std_dev_select(struct ata_port *ap, unsigned int device); | 1347 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); |
1348 | extern u8 ata_check_status(struct ata_port *ap); | 1348 | extern u8 ata_sff_check_status(struct ata_port *ap); |
1349 | extern u8 ata_altstatus(struct ata_port *ap); | 1349 | extern u8 ata_sff_altstatus(struct ata_port *ap); |
1350 | extern int ata_busy_sleep(struct ata_port *ap, | 1350 | extern int ata_sff_busy_sleep(struct ata_port *ap, |
1351 | unsigned long timeout_pat, unsigned long timeout); | 1351 | unsigned long timeout_pat, unsigned long timeout); |
1352 | extern int ata_wait_ready(struct ata_port *ap, unsigned long deadline); | 1352 | extern int ata_sff_wait_ready(struct ata_port *ap, unsigned long deadline); |
1353 | extern void ata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf); | 1353 | extern void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf); |
1354 | extern void ata_tf_read(struct ata_port *ap, struct ata_taskfile *tf); | 1354 | extern void ata_sff_tf_read(struct ata_port *ap, struct ata_taskfile *tf); |
1355 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); | 1355 | extern void ata_sff_exec_command(struct ata_port *ap, |
1356 | extern unsigned int ata_data_xfer(struct ata_device *dev, | 1356 | const struct ata_taskfile *tf); |
1357 | extern unsigned int ata_sff_data_xfer(struct ata_device *dev, | ||
1357 | unsigned char *buf, unsigned int buflen, int rw); | 1358 | unsigned char *buf, unsigned int buflen, int rw); |
1358 | extern unsigned int ata_data_xfer_noirq(struct ata_device *dev, | 1359 | extern unsigned int ata_sff_data_xfer_noirq(struct ata_device *dev, |
1359 | unsigned char *buf, unsigned int buflen, int rw); | 1360 | unsigned char *buf, unsigned int buflen, int rw); |
1360 | extern u8 ata_irq_on(struct ata_port *ap); | 1361 | extern u8 ata_sff_irq_on(struct ata_port *ap); |
1361 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | 1362 | extern void ata_sff_irq_clear(struct ata_port *ap); |
1362 | extern int ata_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, | 1363 | extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, |
1363 | u8 status, int in_wq); | 1364 | u8 status, int in_wq); |
1364 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); | 1365 | extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); |
1365 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); | 1366 | extern unsigned int ata_sff_host_intr(struct ata_port *ap, |
1366 | extern irqreturn_t ata_interrupt(int irq, void *dev_instance); | 1367 | struct ata_queued_cmd *qc); |
1367 | extern void ata_bmdma_freeze(struct ata_port *ap); | 1368 | extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance); |
1368 | extern void ata_bmdma_thaw(struct ata_port *ap); | 1369 | extern void ata_sff_freeze(struct ata_port *ap); |
1369 | extern int ata_std_prereset(struct ata_link *link, unsigned long deadline); | 1370 | extern void ata_sff_thaw(struct ata_port *ap); |
1370 | extern unsigned int ata_dev_try_classify(struct ata_device *dev, int present, | 1371 | extern int ata_sff_prereset(struct ata_link *link, unsigned long deadline); |
1371 | u8 *r_err); | 1372 | extern unsigned int ata_sff_dev_classify(struct ata_device *dev, int present, |
1372 | extern void ata_wait_after_reset(struct ata_port *ap, unsigned long deadline); | 1373 | u8 *r_err); |
1373 | extern int ata_std_softreset(struct ata_link *link, unsigned int *classes, | 1374 | extern void ata_sff_wait_after_reset(struct ata_port *ap, |
1375 | unsigned long deadline); | ||
1376 | extern int ata_sff_softreset(struct ata_link *link, unsigned int *classes, | ||
1374 | unsigned long deadline); | 1377 | unsigned long deadline); |
1375 | extern int sata_std_hardreset(struct ata_link *link, unsigned int *class, | 1378 | extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class, |
1376 | unsigned long deadline); | 1379 | unsigned long deadline); |
1377 | extern void ata_std_postreset(struct ata_link *link, unsigned int *classes); | 1380 | extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); |
1378 | extern void ata_bmdma_error_handler(struct ata_port *ap); | 1381 | extern void ata_sff_error_handler(struct ata_port *ap); |
1379 | extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); | 1382 | extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc); |
1380 | extern int ata_sff_port_start(struct ata_port *ap); | 1383 | extern int ata_sff_port_start(struct ata_port *ap); |
1381 | extern void ata_std_ports(struct ata_ioports *ioaddr); | 1384 | extern void ata_sff_std_ports(struct ata_ioports *ioaddr); |
1382 | extern unsigned long ata_pci_default_filter(struct ata_device *dev, | 1385 | extern unsigned long ata_bmdma_mode_filter(struct ata_device *dev, |
1383 | unsigned long xfer_mask); | 1386 | unsigned long xfer_mask); |
1384 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); | 1387 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); |
1385 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); | 1388 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); |
1386 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 1389 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
@@ -1388,35 +1391,35 @@ extern u8 ata_bmdma_status(struct ata_port *ap); | |||
1388 | extern void ata_bus_reset(struct ata_port *ap); | 1391 | extern void ata_bus_reset(struct ata_port *ap); |
1389 | 1392 | ||
1390 | #ifdef CONFIG_PCI | 1393 | #ifdef CONFIG_PCI |
1391 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); | 1394 | extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev); |
1392 | extern int ata_pci_init_bmdma(struct ata_host *host); | 1395 | extern int ata_pci_bmdma_init(struct ata_host *host); |
1393 | extern int ata_pci_init_sff_host(struct ata_host *host); | 1396 | extern int ata_pci_sff_init_host(struct ata_host *host); |
1394 | extern int ata_pci_prepare_sff_host(struct pci_dev *pdev, | 1397 | extern int ata_pci_sff_prepare_host(struct pci_dev *pdev, |
1395 | const struct ata_port_info * const * ppi, | 1398 | const struct ata_port_info * const * ppi, |
1396 | struct ata_host **r_host); | 1399 | struct ata_host **r_host); |
1397 | extern int ata_pci_activate_sff_host(struct ata_host *host, | 1400 | extern int ata_pci_sff_activate_host(struct ata_host *host, |
1398 | irq_handler_t irq_handler, | 1401 | irq_handler_t irq_handler, |
1399 | struct scsi_host_template *sht); | 1402 | struct scsi_host_template *sht); |
1400 | extern int ata_pci_init_one(struct pci_dev *pdev, | 1403 | extern int ata_pci_sff_init_one(struct pci_dev *pdev, |
1401 | const struct ata_port_info * const * ppi, | 1404 | const struct ata_port_info * const * ppi, |
1402 | struct scsi_host_template *sht, void *host_priv); | 1405 | struct scsi_host_template *sht, void *host_priv); |
1403 | #endif /* CONFIG_PCI */ | 1406 | #endif /* CONFIG_PCI */ |
1404 | 1407 | ||
1405 | /** | 1408 | /** |
1406 | * ata_pause - Flush writes and pause 400 nanoseconds. | 1409 | * ata_sff_pause - Flush writes and pause 400 nanoseconds. |
1407 | * @ap: Port to wait for. | 1410 | * @ap: Port to wait for. |
1408 | * | 1411 | * |
1409 | * LOCKING: | 1412 | * LOCKING: |
1410 | * Inherited from caller. | 1413 | * Inherited from caller. |
1411 | */ | 1414 | */ |
1412 | static inline void ata_pause(struct ata_port *ap) | 1415 | static inline void ata_sff_pause(struct ata_port *ap) |
1413 | { | 1416 | { |
1414 | ata_altstatus(ap); | 1417 | ata_sff_altstatus(ap); |
1415 | ndelay(400); | 1418 | ndelay(400); |
1416 | } | 1419 | } |
1417 | 1420 | ||
1418 | /** | 1421 | /** |
1419 | * ata_busy_wait - Wait for a port status register | 1422 | * ata_sff_busy_wait - Wait for a port status register |
1420 | * @ap: Port to wait for. | 1423 | * @ap: Port to wait for. |
1421 | * @bits: bits that must be clear | 1424 | * @bits: bits that must be clear |
1422 | * @max: number of 10uS waits to perform | 1425 | * @max: number of 10uS waits to perform |
@@ -1428,8 +1431,8 @@ static inline void ata_pause(struct ata_port *ap) | |||
1428 | * LOCKING: | 1431 | * LOCKING: |
1429 | * Inherited from caller. | 1432 | * Inherited from caller. |
1430 | */ | 1433 | */ |
1431 | static inline u8 ata_busy_wait(struct ata_port *ap, unsigned int bits, | 1434 | static inline u8 ata_sff_busy_wait(struct ata_port *ap, unsigned int bits, |
1432 | unsigned int max) | 1435 | unsigned int max) |
1433 | { | 1436 | { |
1434 | u8 status; | 1437 | u8 status; |
1435 | 1438 | ||
@@ -1454,7 +1457,7 @@ static inline u8 ata_busy_wait(struct ata_port *ap, unsigned int bits, | |||
1454 | */ | 1457 | */ |
1455 | static inline u8 ata_wait_idle(struct ata_port *ap) | 1458 | static inline u8 ata_wait_idle(struct ata_port *ap) |
1456 | { | 1459 | { |
1457 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); | 1460 | u8 status = ata_sff_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); |
1458 | 1461 | ||
1459 | #ifdef ATA_DEBUG | 1462 | #ifdef ATA_DEBUG |
1460 | if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) | 1463 | if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) |