diff options
author | Tejun Heo <tj@kernel.org> | 2010-05-10 15:41:37 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-05-19 13:35:47 -0400 |
commit | 5fe7454aa9c6ef5fcf506b0f2dfc20f696891f1a (patch) | |
tree | 94e01d83671ed916dd6c931333722702bf46c7ef /include/linux | |
parent | 8244cd05979ef924787aa70fd80304f1773976a1 (diff) |
libata-sff: ap->[last_]ctl are SFF specific
ap->[last_]ctl are specific to SFF controllers. Put them inside
CONFIG_ATA_SFF and move initialization into ata_sff_port_init().
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/libata.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 19f716edd3be..85b99b83f990 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -721,10 +721,10 @@ struct ata_port { | |||
721 | 721 | ||
722 | #ifdef CONFIG_ATA_SFF | 722 | #ifdef CONFIG_ATA_SFF |
723 | struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ | 723 | struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ |
724 | #endif /* CONFIG_ATA_SFF */ | ||
725 | |||
726 | u8 ctl; /* cache of ATA control register */ | 724 | u8 ctl; /* cache of ATA control register */ |
727 | u8 last_ctl; /* Cache last written value */ | 725 | u8 last_ctl; /* Cache last written value */ |
726 | #endif /* CONFIG_ATA_SFF */ | ||
727 | |||
728 | unsigned int pio_mask; | 728 | unsigned int pio_mask; |
729 | unsigned int mwdma_mask; | 729 | unsigned int mwdma_mask; |
730 | unsigned int udma_mask; | 730 | unsigned int udma_mask; |
@@ -1435,7 +1435,11 @@ static inline void ata_tf_init(struct ata_device *dev, struct ata_taskfile *tf) | |||
1435 | { | 1435 | { |
1436 | memset(tf, 0, sizeof(*tf)); | 1436 | memset(tf, 0, sizeof(*tf)); |
1437 | 1437 | ||
1438 | #ifdef CONFIG_ATA_SFF | ||
1438 | tf->ctl = dev->link->ap->ctl; | 1439 | tf->ctl = dev->link->ap->ctl; |
1440 | #else | ||
1441 | tf->ctl = ATA_DEVCTL_OBS; | ||
1442 | #endif | ||
1439 | if (dev->devno == 0) | 1443 | if (dev->devno == 0) |
1440 | tf->device = ATA_DEVICE_OBS; | 1444 | tf->device = ATA_DEVICE_OBS; |
1441 | else | 1445 | else |