lkml.org 
[lkml]   [2001]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectmidi device release function not being called
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.
-
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 13:14    [W:0.026 / U:2.628 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site