diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/ide-probe.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 70aa86c8807e..a776a6d73c54 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -89,20 +89,19 @@ static void ide_disk_init_mult_count(ide_drive_t *drive) | |||
89 | { | 89 | { |
90 | struct hd_driveid *id = drive->id; | 90 | struct hd_driveid *id = drive->id; |
91 | 91 | ||
92 | drive->mult_count = 0; | ||
93 | if (id->max_multsect) { | 92 | if (id->max_multsect) { |
94 | #ifdef CONFIG_IDEDISK_MULTI_MODE | 93 | #ifdef CONFIG_IDEDISK_MULTI_MODE |
95 | id->multsect = ((id->max_multsect/2) > 1) ? id->max_multsect : 0; | 94 | if ((id->max_multsect / 2) > 1) { |
96 | id->multsect_valid = id->multsect ? 1 : 0; | 95 | id->multsect = id->max_multsect; |
97 | drive->mult_req = id->multsect_valid ? id->max_multsect : 0; | 96 | id->multsect_valid = 1; |
98 | drive->special.b.set_multmode = drive->mult_req ? 1 : 0; | 97 | } else { |
99 | #else /* original, pre IDE-NFG, per request of AC */ | 98 | id->multsect = 0; |
100 | drive->mult_req = 0; | 99 | id->multsect_valid = 0; |
101 | if (drive->mult_req > id->max_multsect) | 100 | } |
102 | drive->mult_req = id->max_multsect; | 101 | drive->mult_req = id->multsect; |
103 | if (drive->mult_req || ((id->multsect_valid & 1) && id->multsect)) | ||
104 | drive->special.b.set_multmode = 1; | ||
105 | #endif | 102 | #endif |
103 | if ((id->multsect_valid & 1) && id->multsect) | ||
104 | drive->special.b.set_multmode = 1; | ||
106 | } | 105 | } |
107 | } | 106 | } |
108 | 107 | ||