Alex Villací­s Lasso | 1 Aug 2007 19:02
Picon

Kingsun Dazzle USB IrDA dongle - release candidate for submission (try 1)

First try at patch, to have it ready for 2.6.24 merge window. Already 
includes correction for max-packet size.
--------------------------
This patch adds support for the KingSun Dazzle USB IrDA dongle.

This dongle does not follow the usb-irda specification, so it needs its 
own special driver. Just like the Kingsun/Donshine dongle, it exposes 
two interrupt endpoints. Reception is performed through direct reads 
from the input endpoint. Transmission requires splitting the IrDA frames 
into 8-byte segments, in which the first byte encodes how many of the 
remaining 7 bytes are used as data. Speed change is made with a control 
URB just like the one in cypress_m8, and it seems to support up to 
115200 bps.

On plugin, this dongle reports vendor and device IDs: 0x07d0:0x4100

Signed-off-by: Alex Villacís Lasso <a_villacis <at> palosanto.com>

--

-- 
perl -e '$x=2.4;print sprintf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
(Continue reading)

Alex Villací­s Lasso | 2 Aug 2007 17:37
Picon

Re: Kingsun KS-959 USB IrDA dongle - release?candidate for submission (try 1)

Manuel Arguelles escribió:
> Hello,
>
> I downloaded and installed the module, it loads ok when I plug the device, 
> however i can't make  obexftp to interact with it, I'm not sure if I'm 
> missing something... my kernel is 2.6.17.13
>
>   
Sorry to ask, but did you remember to do "irattach irda0 -s" ? Worked 
fine for me, and I used the exact same program to test communication. 
The irda service in Fedora won't do this for you for dongles plugged 
after it has been started.
> Best Regards
>
>   

--

-- 
perl -e '$x=2.4;print sprintf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
irda-users mailing list
irda-users <at> lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/irda-users
Samuel Ortiz | 3 Aug 2007 01:27

Re: stir4200 transmit thread hang?

Hi Ryan

On Sat, Jul 21, 2007 at 10:55:09PM -0400, Ryan Reading wrote:
> I have been experiencing IrDA transmission hangs while using a
> stir4200 based device under linux (kernel 2.6.19).  The device seems
> to stop responding completely, no discovery packets or anything being
> transmitted, which can be observed by the light on the device not
> blinking.
> 
> The device will start working again if I simply remove and re-insert
> it, or if I type "ifconfig irda0 down" and the "ifconfig irda0 up".  I
> decided to try and track this down, and it seems it's a result of a
> bug in the stir4200 driver.  The IrDA subsystem seems to be performing
> correctly.
> 
> I traced the problem down to the following thread in stir4200.c.
> There are situations that the thread will get to line 793 and go to
> sleep *without* netif_wake_queue(dev) being called on line 761.  This
> causes the stir_transmit_thread to go to sleep *forever* and never be
> woke up to transmit more data.  The reason is that the "netif queue"
> is never woke up which causes the "net" subsystem to never call the
> stir_hard_xmit() function to transmit data.  The stir_hard_xmit()
> function is the only place that the stir4200 driver wakes up the
> stir_transmit_thread().  Because of this situation, the device stops
> operating altogether until  the driver is reset.
I only see 2 ways of reaching a state where we go to sleep without
calling netif_wake_queue():
- In the PM code in stir_transmit_thread().
- If the xchg() call fails, in stir_transmit_thread() as well.

(Continue reading)

Manuel Arguelles | 3 Aug 2007 06:59
Picon

Re: Kingsun KS-959 USB IrDA dongle - release?candidate for submission (try 1)

Hello,

Yes, this is the dmesg output: (when i plugged the device)
...
KingSun KS-959 IRDA/USB found at address 2, Vendor: 7d0, Product: 4959
/home/paco/3rdparty/ks-959/ks959-sir.c: IrDA: Registered KingSun KS-959 device 
irda0
usbcore: registered new driver ks959-sir

then I ran "irattach irda0 -s" (syslog output)
irattach: executing: '/sbin/modprobe irda0'
irattach: + FATAL: Module irda0 not found.
irattach: Trying to load module irda0 exited with status 1
irattach: executing: 'echo pacostation > /proc/sys/net/irda/devname'
irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
irattach: Starting device irda

obexftp -l output goes really fast:
# obexftp -l
Connecting...failed: connect
Still trying to connect
Connecting...failed: connect
Still trying to connect
Connecting...failed: connect
Still trying to connect

I have also tried with "irattach ks959-sir -s" for this case, syslog output:
irattach: executing: '/sbin/modprobe ks959-sir'
irattach: executing: 'echo pacostation > /proc/sys/net/irda/devname'
irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
(Continue reading)

radek polak | 3 Aug 2007 14:27
Picon
Favicon

The MSG_NOSIGNAL socket flag

Hi All,
i am working on IrDA sockets support for Portable.NET (www.dotgnu.org). The code uses MSG_NOSIGNAL flag
when sending data on socket. This works for standard unix socket, but when i have an IrDA socket it returns
with errno EINVAL. Without the MSG_NOSIGNAL everything works even on IrDA sockets normally.

Does anybody knows answer to the following questions, please?

1/ Is MSG_NOSIGNAL flag supported or IrDA sockets?
2/ If it is supported - am i missing something?
3/ If it is not supported - is there any reason why it's not supported?

Thanks

Radek

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Alex Villací­s Lasso | 3 Aug 2007 17:19
Picon

Re: Kingsun KS-959 USB IrDA dongle - release?candidate for submission (try 1)

Manuel Arguelles escribió:
> Hello,
>
> Yes, this is the dmesg output: (when i plugged the device)
> ...
> KingSun KS-959 IRDA/USB found at address 2, Vendor: 7d0, Product: 4959
> /home/paco/3rdparty/ks-959/ks959-sir.c: IrDA: Registered KingSun KS-959 device 
> irda0
> usbcore: registered new driver ks959-sir
>
> then I ran "irattach irda0 -s" (syslog output)
> irattach: executing: '/sbin/modprobe irda0'
> irattach: + FATAL: Module irda0 not found.
> irattach: Trying to load module irda0 exited with status 1
> irattach: executing: 'echo pacostation > /proc/sys/net/irda/devname'
> irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
> irattach: Starting device irda
>
> obexftp -l output goes really fast:
> # obexftp -l
> Connecting...failed: connect
> Still trying to connect
> Connecting...failed: connect
> Still trying to connect
> Connecting...failed: connect
> Still trying to connect
>   
I will check what is going on over the weekend. I think I may have seen 
that particular behavior (three very fast failed attempts to connect) 
when I was developing the driver, but they had since gone away (2.6.22). 
(Continue reading)

Samuel Ortiz | 6 Aug 2007 01:59

Re: The MSG_NOSIGNAL socket flag

Hi Radek,

On Fri, Aug 03, 2007 at 02:27:18PM +0200, radek polak wrote:
> Hi All,
> i am working on IrDA sockets support for Portable.NET (www.dotgnu.org). The code uses MSG_NOSIGNAL flag
when sending data on socket. This works for standard unix socket, but when i have an IrDA socket it returns
with errno EINVAL. Without the MSG_NOSIGNAL everything works even on IrDA sockets normally.
> 
> Does anybody knows answer to the following questions, please?
> 
> 1/ Is MSG_NOSIGNAL flag supported or IrDA sockets?
No, it's currently not. If you set the MSG_NOSIGNAL flag you will get an
EINVAL.

> 2/ If it is supported - am i missing something?
> 3/ If it is not supported - is there any reason why it's not supported?
Not to my knowledge, no. I didn't write the code, but I guess it's a
missing feature. I'll double check with the original author of the code,
but meanwhile could you patch your kernel with the following patch ? It
should enable MSG_NOSIGNAL support...If it works for you and I get a
confirmation from Jean that there is no particular reason for leaving
out MSG_NOSIGNAL support, I'll push the patch upstream.
Here goes the patch:

diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 4c670cf..dce2661 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
 <at>  <at>  -1245,18 +1245,17  <at>  <at>  static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
 	struct sock *sk = sock->sk;
(Continue reading)

Alex Villací­s Lasso | 6 Aug 2007 17:21
Picon

Re: Kingsun KS-959 USB IrDA dongle - release?candidate for submission (try 1)

Manuel Arguelles escribió:
> Hello,
>
> Yes, this is the dmesg output: (when i plugged the device)
> ...
> KingSun KS-959 IRDA/USB found at address 2, Vendor: 7d0, Product: 4959
> /home/paco/3rdparty/ks-959/ks959-sir.c: IrDA: Registered KingSun KS-959 device 
> irda0
> usbcore: registered new driver ks959-sir
>
> then I ran "irattach irda0 -s" (syslog output)
> irattach: executing: '/sbin/modprobe irda0'
> irattach: + FATAL: Module irda0 not found.
> irattach: Trying to load module irda0 exited with status 1
> irattach: executing: 'echo pacostation > /proc/sys/net/irda/devname'
> irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
> irattach: Starting device irda
>
> obexftp -l output goes really fast:
> # obexftp -l
> Connecting...failed: connect
> Still trying to connect
> Connecting...failed: connect
> Still trying to connect
> Connecting...failed: connect
> Still trying to connect
>   
I see now what is happening. You forgot to add -i before -l at the 
command line. It should read "obexftp -i -l" to explicitly state that 
you want IrDA transport to list the directory. It is supposed to be the 
(Continue reading)

Radek Polak | 7 Aug 2007 09:54
Picon
Favicon

Re: The MSG_NOSIGNAL socket flag

Hi Samuel,
you patch works here. Now i can use MSG_NOSIGNAL flag without error. 
I'll use patched kernel and i hope it will make it's way into vanilla 
kernel.

Thanks!

Radek
> Hi Radek,
>
> On Fri, Aug 03, 2007 at 02:27:18PM +0200, radek polak wrote:
>   
>> Hi All,
>> i am working on IrDA sockets support for Portable.NET (www.dotgnu.org). The code uses MSG_NOSIGNAL
flag when sending data on socket. This works for standard unix socket, but when i have an IrDA socket it
returns with errno EINVAL. Without the MSG_NOSIGNAL everything works even on IrDA sockets normally.
>>
>> Does anybody knows answer to the following questions, please?
>>
>> 1/ Is MSG_NOSIGNAL flag supported or IrDA sockets?
>>     
> No, it's currently not. If you set the MSG_NOSIGNAL flag you will get an
> EINVAL.
>
>   
>> 2/ If it is supported - am i missing something?
>> 3/ If it is not supported - is there any reason why it's not supported?
>>     
> Not to my knowledge, no. I didn't write the code, but I guess it's a
> missing feature. I'll double check with the original author of the code,
(Continue reading)

Manuel Arguelles | 8 Aug 2007 06:10
Picon

Re: Kingsun KS-959 USB IrDA dongle - release?candidate for submission (try 1)

Hello,

Sorry for the delay, 

Yes, it's working now!! thanks a lot!!! 

On Mon 06 Aug 2007 10:21, Alex Villací­s Lasso wrote:
> Manuel Arguelles escribió:
> > Hello,
> >
> > Yes, this is the dmesg output: (when i plugged the device)
> > ...
> > KingSun KS-959 IRDA/USB found at address 2, Vendor: 7d0, Product: 4959
> > /home/paco/3rdparty/ks-959/ks959-sir.c: IrDA: Registered KingSun KS-959
> > device irda0
> > usbcore: registered new driver ks959-sir
> >
> > then I ran "irattach irda0 -s" (syslog output)
> > irattach: executing: '/sbin/modprobe irda0'
> > irattach: + FATAL: Module irda0 not found.
> > irattach: Trying to load module irda0 exited with status 1
> > irattach: executing: 'echo pacostation > /proc/sys/net/irda/devname'
> > irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
> > irattach: Starting device irda
> >
> > obexftp -l output goes really fast:
> > # obexftp -l
> > Connecting...failed: connect
> > Still trying to connect
> > Connecting...failed: connect
(Continue reading)


Gmane