diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-22 11:22:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-22 11:22:33 -0400 |
commit | a7b354e868bc2f887dfb0a418aa7d96df1afc399 (patch) | |
tree | 7f07d314a3a0177daab9b54d78ded0c4f9e412e0 /include | |
parent | f7edd5fbde8af44fa06218f56e0f648fc7a527c8 (diff) | |
parent | 4ef281853474389fea952e9e59650e599ecf2d62 (diff) |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
[libata] pata_it821x: fix warning
libata: Fix a large collection of DMA mode mismatches
ahci: sis controllers actually can do PMP
pata_via: clean up recent tf_load changes
libata: restore SControl on detach
libata: use ata_link_printk() when printing SError
libata: always do follow-up SRST if hardreset returned -EAGAIN
libata: fix EH action overwriting in ata_eh_reset()
sata_mv: add the Gen IIE flag to the SoC devices.
ata_piix: IDE Mode SATA patch for Intel Ibex Peak DeviceIDs
ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs
sata_mv: don't issue two DMA commands concurrently
libata: implement no[hs]rst force params
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 06b80337303b..225bfc5bd9ec 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -163,6 +163,7 @@ enum { | |||
163 | ATA_DEV_NONE = 9, /* no device */ | 163 | ATA_DEV_NONE = 9, /* no device */ |
164 | 164 | ||
165 | /* struct ata_link flags */ | 165 | /* struct ata_link flags */ |
166 | ATA_LFLAG_NO_HRST = (1 << 1), /* avoid hardreset */ | ||
166 | ATA_LFLAG_NO_SRST = (1 << 2), /* avoid softreset */ | 167 | ATA_LFLAG_NO_SRST = (1 << 2), /* avoid softreset */ |
167 | ATA_LFLAG_ASSUME_ATA = (1 << 3), /* assume ATA class */ | 168 | ATA_LFLAG_ASSUME_ATA = (1 << 3), /* assume ATA class */ |
168 | ATA_LFLAG_ASSUME_SEMB = (1 << 4), /* assume SEMB class */ | 169 | ATA_LFLAG_ASSUME_SEMB = (1 << 4), /* assume SEMB class */ |
@@ -646,6 +647,7 @@ struct ata_link { | |||
646 | 647 | ||
647 | unsigned int flags; /* ATA_LFLAG_xxx */ | 648 | unsigned int flags; /* ATA_LFLAG_xxx */ |
648 | 649 | ||
650 | u32 saved_scontrol; /* SControl on probe */ | ||
649 | unsigned int hw_sata_spd_limit; | 651 | unsigned int hw_sata_spd_limit; |
650 | unsigned int sata_spd_limit; | 652 | unsigned int sata_spd_limit; |
651 | unsigned int sata_spd; /* current SATA PHY speed */ | 653 | unsigned int sata_spd; /* current SATA PHY speed */ |
@@ -1427,6 +1429,28 @@ static inline unsigned long ata_deadline(unsigned long from_jiffies, | |||
1427 | return from_jiffies + msecs_to_jiffies(timeout_msecs); | 1429 | return from_jiffies + msecs_to_jiffies(timeout_msecs); |
1428 | } | 1430 | } |
1429 | 1431 | ||
1432 | /* Don't open code these in drivers as there are traps. Firstly the range may | ||
1433 | change in future hardware and specs, secondly 0xFF means 'no DMA' but is | ||
1434 | > UDMA_0. Dyma ddreigiau */ | ||
1435 | |||
1436 | static inline int ata_using_mwdma(struct ata_device *adev) | ||
1437 | { | ||
1438 | if (adev->dma_mode >= XFER_MW_DMA_0 && adev->dma_mode <= XFER_MW_DMA_4) | ||
1439 | return 1; | ||
1440 | return 0; | ||
1441 | } | ||
1442 | |||
1443 | static inline int ata_using_udma(struct ata_device *adev) | ||
1444 | { | ||
1445 | if (adev->dma_mode >= XFER_UDMA_0 && adev->dma_mode <= XFER_UDMA_7) | ||
1446 | return 1; | ||
1447 | return 0; | ||
1448 | } | ||
1449 | |||
1450 | static inline int ata_dma_enabled(struct ata_device *adev) | ||
1451 | { | ||
1452 | return (adev->dma_mode == 0xFF ? 0 : 1); | ||
1453 | } | ||
1430 | 1454 | ||
1431 | /************************************************************************** | 1455 | /************************************************************************** |
1432 | * PMP - drivers/ata/libata-pmp.c | 1456 | * PMP - drivers/ata/libata-pmp.c |