diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index d33702fe78f9..d9eb20c67bb6 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -267,7 +267,7 @@ enum { | |||
267 | PORT_DISABLED = 2, | 267 | PORT_DISABLED = 2, |
268 | 268 | ||
269 | /* encoding various smaller bitmaps into a single | 269 | /* encoding various smaller bitmaps into a single |
270 | * unsigned int bitmap | 270 | * unsigned long bitmap |
271 | */ | 271 | */ |
272 | ATA_NR_PIO_MODES = 7, | 272 | ATA_NR_PIO_MODES = 7, |
273 | ATA_NR_MWDMA_MODES = 5, | 273 | ATA_NR_MWDMA_MODES = 5, |
@@ -277,13 +277,6 @@ enum { | |||
277 | ATA_SHIFT_MWDMA = ATA_SHIFT_PIO + ATA_NR_PIO_MODES, | 277 | ATA_SHIFT_MWDMA = ATA_SHIFT_PIO + ATA_NR_PIO_MODES, |
278 | ATA_SHIFT_UDMA = ATA_SHIFT_MWDMA + ATA_NR_MWDMA_MODES, | 278 | ATA_SHIFT_UDMA = ATA_SHIFT_MWDMA + ATA_NR_MWDMA_MODES, |
279 | 279 | ||
280 | ATA_MASK_PIO = ((1 << ATA_NR_PIO_MODES) - 1) | ||
281 | << ATA_SHIFT_PIO, | ||
282 | ATA_MASK_MWDMA = ((1 << ATA_NR_MWDMA_MODES) - 1) | ||
283 | << ATA_SHIFT_MWDMA, | ||
284 | ATA_MASK_UDMA = ((1 << ATA_NR_UDMA_MODES) - 1) | ||
285 | << ATA_SHIFT_UDMA, | ||
286 | |||
287 | /* size of buffer to pad xfers ending on unaligned boundaries */ | 280 | /* size of buffer to pad xfers ending on unaligned boundaries */ |
288 | ATA_DMA_PAD_SZ = 4, | 281 | ATA_DMA_PAD_SZ = 4, |
289 | ATA_DMA_PAD_BUF_SZ = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE, | 282 | ATA_DMA_PAD_BUF_SZ = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE, |
@@ -355,6 +348,15 @@ enum { | |||
355 | ATA_DMA_MASK_CFA = (1 << 2), /* DMA on CF Card */ | 348 | ATA_DMA_MASK_CFA = (1 << 2), /* DMA on CF Card */ |
356 | }; | 349 | }; |
357 | 350 | ||
351 | enum ata_xfer_mask { | ||
352 | ATA_MASK_PIO = ((1LU << ATA_NR_PIO_MODES) - 1) | ||
353 | << ATA_SHIFT_PIO, | ||
354 | ATA_MASK_MWDMA = ((1LU << ATA_NR_MWDMA_MODES) - 1) | ||
355 | << ATA_SHIFT_MWDMA, | ||
356 | ATA_MASK_UDMA = ((1LU << ATA_NR_UDMA_MODES) - 1) | ||
357 | << ATA_SHIFT_UDMA, | ||
358 | }; | ||
359 | |||
358 | enum hsm_task_states { | 360 | enum hsm_task_states { |
359 | HSM_ST_IDLE, /* no command on going */ | 361 | HSM_ST_IDLE, /* no command on going */ |
360 | HSM_ST_FIRST, /* (waiting the device to) | 362 | HSM_ST_FIRST, /* (waiting the device to) |
@@ -526,9 +528,9 @@ struct ata_device { | |||
526 | unsigned int cdb_len; | 528 | unsigned int cdb_len; |
527 | 529 | ||
528 | /* per-dev xfer mask */ | 530 | /* per-dev xfer mask */ |
529 | unsigned int pio_mask; | 531 | unsigned long pio_mask; |
530 | unsigned int mwdma_mask; | 532 | unsigned long mwdma_mask; |
531 | unsigned int udma_mask; | 533 | unsigned long udma_mask; |
532 | 534 | ||
533 | /* for CHS addressing */ | 535 | /* for CHS addressing */ |
534 | u16 cylinders; /* Number of cylinders */ | 536 | u16 cylinders; /* Number of cylinders */ |
@@ -854,15 +856,16 @@ extern void ata_tf_read(struct ata_port *ap, struct ata_taskfile *tf); | |||
854 | extern void ata_tf_to_fis(const struct ata_taskfile *tf, | 856 | extern void ata_tf_to_fis(const struct ata_taskfile *tf, |
855 | u8 pmp, int is_cmd, u8 *fis); | 857 | u8 pmp, int is_cmd, u8 *fis); |
856 | extern void ata_tf_from_fis(const u8 *fis, struct ata_taskfile *tf); | 858 | extern void ata_tf_from_fis(const u8 *fis, struct ata_taskfile *tf); |
857 | extern unsigned int ata_pack_xfermask(unsigned int pio_mask, | 859 | extern unsigned long ata_pack_xfermask(unsigned long pio_mask, |
858 | unsigned int mwdma_mask, unsigned int udma_mask); | 860 | unsigned long mwdma_mask, unsigned long udma_mask); |
859 | extern void ata_unpack_xfermask(unsigned int xfer_mask, unsigned int *pio_mask, | 861 | extern void ata_unpack_xfermask(unsigned long xfer_mask, |
860 | unsigned int *mwdma_mask, unsigned int *udma_mask); | 862 | unsigned long *pio_mask, unsigned long *mwdma_mask, |
861 | extern u8 ata_xfer_mask2mode(unsigned int xfer_mask); | 863 | unsigned long *udma_mask); |
862 | extern unsigned int ata_xfer_mode2mask(u8 xfer_mode); | 864 | extern u8 ata_xfer_mask2mode(unsigned long xfer_mask); |
863 | extern int ata_xfer_mode2shift(unsigned int xfer_mode); | 865 | extern unsigned long ata_xfer_mode2mask(u8 xfer_mode); |
864 | extern const char *ata_mode_string(unsigned int xfer_mask); | 866 | extern int ata_xfer_mode2shift(unsigned long xfer_mode); |
865 | extern unsigned int ata_id_xfermask(const u16 *id); | 867 | extern const char *ata_mode_string(unsigned long xfer_mask); |
868 | extern unsigned long ata_id_xfermask(const u16 *id); | ||
866 | extern void ata_noop_dev_select(struct ata_port *ap, unsigned int device); | 869 | extern void ata_noop_dev_select(struct ata_port *ap, unsigned int device); |
867 | extern void ata_std_dev_select(struct ata_port *ap, unsigned int device); | 870 | extern void ata_std_dev_select(struct ata_port *ap, unsigned int device); |
868 | extern u8 ata_check_status(struct ata_port *ap); | 871 | extern u8 ata_check_status(struct ata_port *ap); |
@@ -1001,7 +1004,8 @@ extern int ata_pci_prepare_sff_host(struct pci_dev *pdev, | |||
1001 | const struct ata_port_info * const * ppi, | 1004 | const struct ata_port_info * const * ppi, |
1002 | struct ata_host **r_host); | 1005 | struct ata_host **r_host); |
1003 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 1006 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |
1004 | extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long); | 1007 | extern unsigned long ata_pci_default_filter(struct ata_device *dev, |
1008 | unsigned long xfer_mask); | ||
1005 | #endif /* CONFIG_PCI */ | 1009 | #endif /* CONFIG_PCI */ |
1006 | 1010 | ||
1007 | /* | 1011 | /* |