* midi device release function not being called
@ 2001-12-30 2:07 Erik de Castro Lopo
2001-12-30 10:01 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Erik de Castro Lopo @ 2001-12-30 2:07 UTC (permalink / raw)
To: linux-kernel
Hi People,
I'm trying to track down a problem in the es1371 midi driver. The problem
is that when /dev/midi is opened with O_NONBLOCK and the file is closed
when there is still data in the output buffer something in the driver
gets locked up preventing all further opens of the device. The error
returned by open is "Device or resource busy".
Having a look around in the driver I added a printk statement to the
top of the es1371_midi_release() function and found that this function
is never called. I would have expected this to be called in at least
one of the following situations:
- The device is close()ed
- The driver is mod unloaded
Adding a printk statement to the es1371_midi_open() function works as
expected. Is there a reason why the release function is not called?
This is on linux-2.4.16 on an SMP machine. I have also tried 2.2.20 and
found the same problem (file opened O_NONBLOCK and closed with data still
in the output buffer) there.
Can someone please shed some light on this?
Cheers,
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo nospam@mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"The whole principle is wrong; it's like demanding that grown men live on
skim milk because the baby can't eat steak."
- author Robert A. Heinlein on censorship.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-12-30 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-30 2:07 midi device release function not being called Erik de Castro Lopo
2001-12-30 10:01 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome