aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_it821x.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-03-09 07:24:15 -0500
committerJeff Garzik <jeff@garzik.org>2007-04-28 14:15:56 -0400
commita0fcdc0259e98d1c16d96baea9ba8a8603e41791 (patch)
tree568c6a99b5e38486c84b5145ac2e3719b8c62720 /drivers/ata/pata_it821x.c
parent6a3d586d8e8a50e4cfd7f8c36d82a53c5614e05b (diff)
[libata] Update several PATA drivers for new ->cable_detect hook
All patches authored and signed-off-by Alan Cox, sent on Mar 7, 2007. I merely combined them all into a single patch. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_it821x.c')
-rw-r--r--drivers/ata/pata_it821x.c33
1 files changed, 5 insertions, 28 deletions
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index be8c9ef8d0d4..f1f8cec8c224 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -80,7 +80,7 @@
80 80
81 81
82#define DRV_NAME "pata_it821x" 82#define DRV_NAME "pata_it821x"
83#define DRV_VERSION "0.3.4" 83#define DRV_VERSION "0.3.6"
84 84
85struct it821x_dev 85struct it821x_dev
86{ 86{
@@ -113,31 +113,6 @@ struct it821x_dev
113static int it8212_noraid; 113static int it8212_noraid;
114 114
115/** 115/**
116 * it821x_pre_reset - probe
117 * @ap: ATA port
118 *
119 * Set the cable type
120 */
121
122static int it821x_pre_reset(struct ata_port *ap)
123{
124 ap->cbl = ATA_CBL_PATA80;
125 return ata_std_prereset(ap);
126}
127
128/**
129 * it821x_error_handler - probe/reset
130 * @ap: ATA port
131 *
132 * Set the cable type and trigger a probe
133 */
134
135static void it821x_error_handler(struct ata_port *ap)
136{
137 return ata_bmdma_drive_eh(ap, it821x_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
138}
139
140/**
141 * it821x_program - program the PIO/MWDMA registers 116 * it821x_program - program the PIO/MWDMA registers
142 * @ap: ATA port 117 * @ap: ATA port
143 * @adev: Device to program 118 * @adev: Device to program
@@ -666,8 +641,9 @@ static struct ata_port_operations it821x_smart_port_ops = {
666 641
667 .freeze = ata_bmdma_freeze, 642 .freeze = ata_bmdma_freeze,
668 .thaw = ata_bmdma_thaw, 643 .thaw = ata_bmdma_thaw,
669 .error_handler = it821x_error_handler, 644 .error_handler = ata_bmdma_error_handler,
670 .post_internal_cmd = ata_bmdma_post_internal_cmd, 645 .post_internal_cmd = ata_bmdma_post_internal_cmd,
646 .cable_detect = ata_cable_unknown,
671 647
672 .bmdma_setup = ata_bmdma_setup, 648 .bmdma_setup = ata_bmdma_setup,
673 .bmdma_start = ata_bmdma_start, 649 .bmdma_start = ata_bmdma_start,
@@ -702,8 +678,9 @@ static struct ata_port_operations it821x_passthru_port_ops = {
702 678
703 .freeze = ata_bmdma_freeze, 679 .freeze = ata_bmdma_freeze,
704 .thaw = ata_bmdma_thaw, 680 .thaw = ata_bmdma_thaw,
705 .error_handler = it821x_error_handler, 681 .error_handler = ata_bmdma_error_handler,
706 .post_internal_cmd = ata_bmdma_post_internal_cmd, 682 .post_internal_cmd = ata_bmdma_post_internal_cmd,
683 .cable_detect = ata_cable_unknown,
707 684
708 .bmdma_setup = ata_bmdma_setup, 685 .bmdma_setup = ata_bmdma_setup,
709 .bmdma_start = it821x_passthru_bmdma_start, 686 .bmdma_start = it821x_passthru_bmdma_start,