summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-all.h
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2010-10-18 11:30:13 +0000
committermav <mav@FreeBSD.org>2010-10-18 11:30:13 +0000
commitd5157b74694d4a37a03c0245b1681f20321cd062 (patch)
treefd926a601552c1bcf585c33dddb137654dc80a3f /sys/dev/ata/ata-all.h
parentc2ef20d77bba663f8ce180c864d82fee39cb3482 (diff)
downloadFreeBSD-src-d5157b74694d4a37a03c0245b1681f20321cd062.zip
FreeBSD-src-d5157b74694d4a37a03c0245b1681f20321cd062.tar.gz
Set of legacy mode SATA enchancements:
- Implement proper combined mode decoding for Intel controllers to properly identify SATA and PATA channels and associate ATA channels with SATA ports. This fixes wrong reporting and in some cases hard resets to wrong SATA ports. - Improve SATA registers support to handle hot-plug events and potentially interface errors. For ICH5/6300ESB chipsets these registers accessible via PCI config space. For later ones they may be accessible via PCI BAR(5). - For controllers not generating interrupts on hot-plug events, implement periodic status polling. Use it to detect hot-plug on Intel and VIA controllers. Same probably could also be used for Serverworks and SIS.
Diffstat (limited to 'sys/dev/ata/ata-all.h')
-rw-r--r--sys/dev/ata/ata-all.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/ata/ata-all.h b/sys/dev/ata/ata-all.h
index 0f09a1f..17a28c0 100644
--- a/sys/dev/ata/ata-all.h
+++ b/sys/dev/ata/ata-all.h
@@ -114,13 +114,6 @@
#define ATA_SS_IPM_PARTIAL 0x00000200
#define ATA_SS_IPM_SLUMBER 0x00000600
-#define ATA_SS_CONWELL_MASK \
- (ATA_SS_DET_MASK|ATA_SS_SPD_MASK|ATA_SS_IPM_MASK)
-#define ATA_SS_CONWELL_GEN1 \
- (ATA_SS_DET_PHY_ONLINE|ATA_SS_SPD_GEN1|ATA_SS_IPM_ACTIVE)
-#define ATA_SS_CONWELL_GEN2 \
- (ATA_SS_DET_PHY_ONLINE|ATA_SS_SPD_GEN2|ATA_SS_IPM_ACTIVE)
-
#define ATA_SERROR 14
#define ATA_SE_DATA_CORRECTED 0x00000001
#define ATA_SE_COMM_CORRECTED 0x00000002
@@ -567,6 +560,7 @@ struct ata_channel {
#define ATA_DMA_BEFORE_CMD 0x100
#define ATA_KNOWN_PRESENCE 0x200
#define ATA_STATUS_IS_LONG 0x400
+#define ATA_PERIODIC_POLL 0x800
int pm_level; /* power management level */
int devices; /* what is present */
@@ -593,6 +587,7 @@ struct ata_channel {
struct ata_cam_device user[16]; /* User-specified settings */
struct ata_cam_device curr[16]; /* Current settings */
#endif
+ struct callout poll_callout; /* Periodic status poll. */
};
/* disk bay/enclosure related */
@@ -666,7 +661,7 @@ void ata_dmainit(device_t);
void ata_dmafini(device_t dev);
/* ata-sata.c: */
-void ata_sata_phy_check_events(device_t dev);
+void ata_sata_phy_check_events(device_t dev, int port);
int ata_sata_scr_read(struct ata_channel *ch, int port, int reg, uint32_t *val);
int ata_sata_scr_write(struct ata_channel *ch, int port, int reg, uint32_t val);
int ata_sata_phy_reset(device_t dev, int port, int quick);
OpenPOWER on IntegriCloud