Since Linux kernel 2.6.21 entered higher release candidates, more people started to report that Gammu has problem on that with connecting over USB cable. First I thought it is some misconfiguration of kernel, but when several same reports appeared, I decided to take a look at it.
As great side effect of this, I found out that I can use snapshots of Debian kernel, where current version (2.6.21-rc7) is available as Debian package. This saved me lot of time, thanks guys!
After installing and booting new kernel, I quickly found out that the problem is not SIGSEGV as many people reported, but SIGIO. After quick look at code, it was obvious that setting file to asynchronous I/O causes this.
Well this is how asynchronous I/O is supposed to work and kernel people implemented it now for (some?) serial drivers. I have no idea why there was attempt to use it in Gammu. The code is not at all ready for this and makes no use of asynchronous I/O. So the fix was quite easy - just to remove this flag from file.
Fix now sits in SVN, impatient users who run kernel 2.6.21 can get SVN snapshot :-). Testing release will follow during next week.