aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:46 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:46 -0400
commit2298169418f43ba5e0919762a4bab95a1227872a (patch)
tree67cf3133c7bae747ad957c68a650534105a7d8e7 /include/linux/ide.h
parent130e886708d6e11f3d54e5d27c266578de56f343 (diff)
ide: pass command to ide_map_sg()
* Set IDE_TFLAG_WRITE flag and ->rq also for ATA_CMD_PACKET commands. * Pass command to ->dma_setup method and update all its implementations accordingly. * Pass command instead of request to ide_build_sglist(), *_build_dmatable() and ide_map_sg(). While at it: * Fix scc_dma_setup() documentation + use ATA_DMA_WR define. * Rename sgiioc4_build_dma_table() to sgiioc4_build_dmatable(), change return value type to 'int' and drop unused 'ddir' argument. * Do some minor cleanups in [tx4939]ide_dma_setup(). There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index b6142171baf0..b30e79c6ff57 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -714,7 +714,7 @@ struct ide_port_ops {
714 714
715struct ide_dma_ops { 715struct ide_dma_ops {
716 void (*dma_host_set)(struct ide_drive_s *, int); 716 void (*dma_host_set)(struct ide_drive_s *, int);
717 int (*dma_setup)(struct ide_drive_s *); 717 int (*dma_setup)(struct ide_drive_s *, struct ide_cmd *);
718 void (*dma_exec_cmd)(struct ide_drive_s *, u8); 718 void (*dma_exec_cmd)(struct ide_drive_s *, u8);
719 void (*dma_start)(struct ide_drive_s *); 719 void (*dma_start)(struct ide_drive_s *);
720 int (*dma_end)(struct ide_drive_s *); 720 int (*dma_end)(struct ide_drive_s *);
@@ -1412,7 +1412,7 @@ int ide_pci_resume(struct pci_dev *);
1412#define ide_pci_resume NULL 1412#define ide_pci_resume NULL
1413#endif 1413#endif
1414 1414
1415void ide_map_sg(ide_drive_t *, struct request *); 1415void ide_map_sg(ide_drive_t *, struct ide_cmd *);
1416void ide_init_sg_cmd(struct ide_cmd *, int); 1416void ide_init_sg_cmd(struct ide_cmd *, int);
1417 1417
1418#define BAD_DMA_DRIVE 0 1418#define BAD_DMA_DRIVE 0
@@ -1447,14 +1447,14 @@ ide_startstop_t ide_dma_intr(ide_drive_t *);
1447int ide_allocate_dma_engine(ide_hwif_t *); 1447int ide_allocate_dma_engine(ide_hwif_t *);
1448void ide_release_dma_engine(ide_hwif_t *); 1448void ide_release_dma_engine(ide_hwif_t *);
1449 1449
1450int ide_build_sglist(ide_drive_t *, struct request *); 1450int ide_build_sglist(ide_drive_t *, struct ide_cmd *);
1451void ide_destroy_dmatable(ide_drive_t *); 1451void ide_destroy_dmatable(ide_drive_t *);
1452 1452
1453#ifdef CONFIG_BLK_DEV_IDEDMA_SFF 1453#ifdef CONFIG_BLK_DEV_IDEDMA_SFF
1454int config_drive_for_dma(ide_drive_t *); 1454int config_drive_for_dma(ide_drive_t *);
1455extern int ide_build_dmatable(ide_drive_t *, struct request *); 1455int ide_build_dmatable(ide_drive_t *, struct ide_cmd *);
1456void ide_dma_host_set(ide_drive_t *, int); 1456void ide_dma_host_set(ide_drive_t *, int);
1457extern int ide_dma_setup(ide_drive_t *); 1457int ide_dma_setup(ide_drive_t *, struct ide_cmd *);
1458void ide_dma_exec_cmd(ide_drive_t *, u8); 1458void ide_dma_exec_cmd(ide_drive_t *, u8);
1459extern void ide_dma_start(ide_drive_t *); 1459extern void ide_dma_start(ide_drive_t *);
1460int ide_dma_end(ide_drive_t *); 1460int ide_dma_end(ide_drive_t *);
@@ -1482,7 +1482,7 @@ static inline void ide_check_dma_crc(ide_drive_t *drive) { ; }
1482static inline ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) { return ide_stopped; } 1482static inline ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) { return ide_stopped; }
1483static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; } 1483static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; }
1484static inline int ide_build_sglist(ide_drive_t *drive, 1484static inline int ide_build_sglist(ide_drive_t *drive,
1485 struct request *rq) { return 0; } 1485 struct ide_cmd *cmd) { return 0; }
1486#endif /* CONFIG_BLK_DEV_IDEDMA */ 1486#endif /* CONFIG_BLK_DEV_IDEDMA */
1487 1487
1488#ifdef CONFIG_BLK_DEV_IDEACPI 1488#ifdef CONFIG_BLK_DEV_IDEACPI