aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_jmicron.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index 225a7223a726..5b8174d94067 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -80,11 +80,10 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline)
80 * actually do our cable checking etc. Thankfully we don't need 80 * actually do our cable checking etc. Thankfully we don't need
81 * to do the plumbing for other cases. 81 * to do the plumbing for other cases.
82 */ 82 */
83 switch (port_map[port]) 83 switch (port_map[port]) {
84 {
85 case PORT_PATA0: 84 case PORT_PATA0:
86 if (control & (1 << 5)) 85 if ((control & (1 << 5)) == 0)
87 return 0; 86 return -ENOENT;
88 if (control & (1 << 3)) /* 40/80 pin primary */ 87 if (control & (1 << 3)) /* 40/80 pin primary */
89 ap->cbl = ATA_CBL_PATA40; 88 ap->cbl = ATA_CBL_PATA40;
90 else 89 else
@@ -93,7 +92,7 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline)
93 case PORT_PATA1: 92 case PORT_PATA1:
94 /* Bit 21 is set if the port is enabled */ 93 /* Bit 21 is set if the port is enabled */
95 if ((control5 & (1 << 21)) == 0) 94 if ((control5 & (1 << 21)) == 0)
96 return 0; 95 return -ENOENT;
97 if (control5 & (1 << 19)) /* 40/80 pin secondary */ 96 if (control5 & (1 << 19)) /* 40/80 pin secondary */
98 ap->cbl = ATA_CBL_PATA40; 97 ap->cbl = ATA_CBL_PATA40;
99 else 98 else