Re: [RFC PATCH] falconide: remove needless ST-DMA locking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bartlomiej,

While working on ide_do_request() improvements I stumbled upon
mismatched ide_get_lock() / ide_release_lock() calls.

[ It seems to be known issue:
 http://marc.info/?l=linux-m68k&m=121423752829622&w=2 ]

It is a known issue, and I submitted a simple fix to Geert a month or so ago. It involves moving the ide_get_lock call inside the request loop instead of doing it once at the start of the function.

I may be completely wrong but how's about the following patch?

You are, indeed .

From: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
Subject: [RFC PATCH] falconide: remove needless ST-DMA locking

According to comments in arch/m68k/atari/stdma.c IDE controller on
Atari Falcon doesn't use ST-DMA chip itself and no locking is needed
(both ST-DMA and IDE IRQ handlers are registered with IRQF_SHARED).

The IDE controller does not use the DMA chip, but it does use the same
interrupt vector as floppy controller, SCSI controller and DMA do. SCSI, as well as floppy do shart DMA. From what I recall, it is not possible to figure out if the interrupt was a DMA complete from the DMA chip state. That's basically whi we need to reserve DMA and interrupt for exclusive use of a single driver a a time.

* Remove code for locking ST-DMA from <asm-m68k/ide.h>
 and falconide.c.

* Remove ide_{get,release}_lock() from ide_do_request()
 (it was broken anyway).

* Remove #ifndef IDE_ARCH_LOCK handling from <linux/ide.h>.

This patch should fix "ide_release_lock: bug" errors reported
by Stephen R Marenka.

Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Cc: Michael Schmitz <schmitz@xxxxxxxxxx>
Cc: Stephen R Marenka <stephen@xxxxxxxxxxx>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>

Objected: Michael Schmitz <schmitz@xxxxxxxxxx>

Do not apply, please.

	Michael

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux