aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/ht6560b.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-16 17:53:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-16 17:53:54 -0400
commit42fdd144a40f3afaccaa7ea538268bad3596439e (patch)
tree9986c7f04682408fe1ad983297b0576f68387a68 /drivers/ide/legacy/ht6560b.c
parent4314652bb41df08ad65bd25176ba1dfd24b14a51 (diff)
parent64a8f00ff19508b3962c8a932375dbae88bee4d6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (76 commits) IDE: Report errors during drive reset back to user space Update documentation of HDIO_DRIVE_RESET ioctl IDE: Remove unused code IDE: Fix HDIO_DRIVE_RESET handling hd.c: remove the #include <linux/mc146818rtc.h> update the BLK_DEV_HD help text move ide/legacy/hd.c to drivers/block/ ide/legacy/hd.c: use late_initcall() remove BLK_DEV_HD_ONLY ide: endian annotations in ide-floppy.c ide-floppy: zero out the whole struct ide_atapi_pc on init ide-floppy: fold idefloppy_create_test_unit_ready_cmd into idefloppy_open ide-cd: move request prep chunk from cdrom_do_newpc_cont to rq issue path ide-cd: move request prep from cdrom_start_rw_cont to rq issue path ide-cd: move request prep from cdrom_start_seek_continuation to rq issue path ide-cd: fold cdrom_start_seek into ide_cd_do_request ide-cd: simplify request issuing path ide-cd: mv ide_do_rw_cdrom ide_cd_do_request ide-cd: cdrom_start_seek: remove unused argument block ide-cd: ide_do_rw_cdrom: add the catch-all bad request case to the if-else block ...
Diffstat (limited to 'drivers/ide/legacy/ht6560b.c')
-rw-r--r--drivers/ide/legacy/ht6560b.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c
index dd6dfb32e853..7bc8fd59ea9e 100644
--- a/drivers/ide/legacy/ht6560b.c
+++ b/drivers/ide/legacy/ht6560b.c
@@ -216,6 +216,7 @@ static u8 ht_pio2timings(ide_drive_t *drive, const u8 pio)
216 216
217 if (pio) { 217 if (pio) {
218 unsigned int cycle_time; 218 unsigned int cycle_time;
219 struct ide_timing *t = ide_timing_find_mode(XFER_PIO_0 + pio);
219 220
220 cycle_time = ide_pio_cycle_time(drive, pio); 221 cycle_time = ide_pio_cycle_time(drive, pio);
221 222
@@ -224,10 +225,8 @@ static u8 ht_pio2timings(ide_drive_t *drive, const u8 pio)
224 * actual cycle time for recovery and activity 225 * actual cycle time for recovery and activity
225 * according system bus speed. 226 * according system bus speed.
226 */ 227 */
227 active_time = ide_pio_timings[pio].active_time; 228 active_time = t->active;
228 recovery_time = cycle_time 229 recovery_time = cycle_time - active_time - t->setup;
229 - active_time
230 - ide_pio_timings[pio].setup_time;
231 /* 230 /*
232 * Cycle times should be Vesa bus cycles 231 * Cycle times should be Vesa bus cycles
233 */ 232 */
@@ -311,16 +310,16 @@ static void ht6560b_set_pio_mode(ide_drive_t *drive, const u8 pio)
311#endif 310#endif
312} 311}
313 312
314static void __init ht6560b_port_init_devs(ide_hwif_t *hwif) 313static void __init ht6560b_init_dev(ide_drive_t *drive)
315{ 314{
315 ide_hwif_t *hwif = drive->hwif;
316 /* Setting default configurations for drives. */ 316 /* Setting default configurations for drives. */
317 int t = (HT_CONFIG_DEFAULT << 8) | HT_TIMING_DEFAULT; 317 int t = (HT_CONFIG_DEFAULT << 8) | HT_TIMING_DEFAULT;
318 318
319 if (hwif->channel) 319 if (hwif->channel)
320 t |= (HT_SECONDARY_IF << 8); 320 t |= (HT_SECONDARY_IF << 8);
321 321
322 hwif->drives[0].drive_data = t; 322 drive->drive_data = t;
323 hwif->drives[1].drive_data = t;
324} 323}
325 324
326static int probe_ht6560b; 325static int probe_ht6560b;
@@ -329,7 +328,7 @@ module_param_named(probe, probe_ht6560b, bool, 0);
329MODULE_PARM_DESC(probe, "probe for HT6560B chipset"); 328MODULE_PARM_DESC(probe, "probe for HT6560B chipset");
330 329
331static const struct ide_port_ops ht6560b_port_ops = { 330static const struct ide_port_ops ht6560b_port_ops = {
332 .port_init_devs = ht6560b_port_init_devs, 331 .init_dev = ht6560b_init_dev,
333 .set_pio_mode = ht6560b_set_pio_mode, 332 .set_pio_mode = ht6560b_set_pio_mode,
334 .selectproc = ht6560b_selectproc, 333 .selectproc = ht6560b_selectproc,
335}; 334};