lkml.org 
[lkml]   [2004]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject2.6.4-rc-bk3: hdparm -X locks up IDE
Date
I discovered that hdparm -X <mode> /dev/hda can lock up IDE
interface if there is some activity.

I walked up from via driver's handler for it:

via_set_speed(): directly programs IDE controller timings.

via_set_drive -> via_set_speed

via82cxxx_tune_drive -> via_set_drive
via82cxxx_ide_dma_check -> via_set_drive

init_hwif_via82cxxx:
hwif->tuneproc = &via82cxxx_tune_drive;
hwif->speedproc = &via_set_drive;
...
hwif->ide_dma_check = &via82cxxx_ide_dma_check;

I think via_set_drive is eventually gets called
by hdparm -X, not other two functions.

ide_set_xfer_rate -> HWIF(drive)->speedproc

pre_reset -> check_dma_crc -> ide_set_xfer_rate

set_xfer_rate -> ide_set_xfer_rate

void ide_add_generic_settings(drive):
...
ide_add_setting(drive, "current_speed", SETTING_RW,
-1, -1, TYPE_BYTE, 0, 70, 1, 1, &drive->current_speed,
set_xfer_rate);
^^^^^^^^^^^^^

Seems like there is no locking protecting mode change.
--
vda
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:2.122 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site