public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.4-rc-bk3: hdparm -X locks up IDE
@ 2004-03-11 14:14 Denis Vlasenko
  2004-03-11 14:52 ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 11+ messages in thread
From: Denis Vlasenko @ 2004-03-11 14:14 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-03-12 14:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-11 14:14 2.6.4-rc-bk3: hdparm -X locks up IDE Denis Vlasenko
2004-03-11 14:52 ` Bartlomiej Zolnierkiewicz
2004-03-11 14:48   ` Jens Axboe
2004-03-11 15:07     ` Bartlomiej Zolnierkiewicz
2004-03-11 15:02       ` Jens Axboe
2004-03-11 17:59       ` Jeff Garzik
2004-03-12  0:21         ` [PATCH] hdparm_X.patch (was: Re: 2.6.4-rc-bk3: hdparm -X locks up IDE) Denis Vlasenko
2004-03-12  1:02           ` Bartlomiej Zolnierkiewicz
2004-03-12  7:24             ` Denis Vlasenko
2004-03-12  9:39               ` Denis Vlasenko
2004-03-12 14:34                 ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox