ir241_lmp_timer_race-2.diff

ir241_lmp_timer_race-2.diff

Post by Jean Tourrilhe » Wed, 18 Jun 2003 04:20:10



ir241_lmp_timer_race-2.diff :
        o [CORRECT] Start timer before sending event to fix race condition
        o [FEATURE] Improve the IrLMP event debugging messages.

diff -u -p linux/net/irda/irlmp_event.d3.c linux/net/irda/irlmp_event.c
--- linux/net/irda/irlmp_event.d3.c     Thu Sep 12 11:47:45 2002

                irlmp_next_lsap_state(self, LSAP_SETUP_PEND);

-               irlmp_do_lap_event(self->lap, LM_LAP_CONNECT_REQUEST, NULL);
-
                /* Start watchdog timer (5 secs for now) */
                irlmp_start_watchdog_timer(self, 5*HZ);
+
+               irlmp_do_lap_event(self->lap, LM_LAP_CONNECT_REQUEST, NULL);
                break;
        case LM_CONNECT_INDICATION:

                irlmp_next_lsap_state(self, LSAP_CONNECT_PEND);

-               irlmp_do_lap_event(self->lap, LM_LAP_CONNECT_REQUEST, NULL);
-
                /* Start watchdog timer
                 * This is not mentionned in the spec, but there is a rare

                 * a backup plan. 1 second is plenty (should be immediate).
                 * Jean II */
                irlmp_start_watchdog_timer(self, 1*HZ);
+
+               irlmp_do_lap_event(self->lap, LM_LAP_CONNECT_REQUEST, NULL);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %s\n",
-                        __FUNCTION__, irlmp_event[event]);
+               IRDA_DEBUG(1, "%s(), Unknown event %s on LSAP %#02x\n",
+                          __FUNCTION__, irlmp_event[event], self->slsap_sel);
                if (skb)
                        dev_kfree_skb(skb);

                irlmp_next_lsap_state(self, LSAP_DISCONNECTED);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), Unknown event %s\n",
-                        __FUNCTION__, irlmp_event[event]);
+               IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
+                          __FUNCTION__, irlmp_event[event], self->slsap_sel);
                if (skb)
                        dev_kfree_skb(skb);

                irlmp_next_lsap_state(self, LSAP_DISCONNECTED);
                break;
        default:
-               IRDA_DEBUG(0, "%s() Unknown event %s\n",
-                        __FUNCTION__, irlmp_event[event]);
+               IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
+                          __FUNCTION__, irlmp_event[event], self->slsap_sel);
                if (skb)
                        dev_kfree_skb(skb);

                irlmp_disconnect_indication(self, reason, skb);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), Unknown event %s\n",
-                        __FUNCTION__, irlmp_event[event]);
+               IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
+                          __FUNCTION__, irlmp_event[event], self->slsap_sel);
                if (skb)
                        dev_kfree_skb(skb);

                irlmp_disconnect_indication(self, LM_CONNECT_FAILURE, NULL);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), Unknown event %s\n",
-                        __FUNCTION__, irlmp_event[event]);
+               IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
+                          __FUNCTION__, irlmp_event[event], self->slsap_sel);
                if (skb)
                        dev_kfree_skb(skb);

                irlmp_disconnect_indication(self, reason, NULL);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), Unknown event %s\n",
-                        __FUNCTION__, irlmp_event[event]);
+               IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
+                          __FUNCTION__, irlmp_event[event], self->slsap_sel);
                if (skb)
                        dev_kfree_skb(skb);
                break;  
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. 2 diff. xservers and diff. resolutions

Hi,

sorry if this is a novice question, i have searched a lot and found
nothing  that fully solve it.

we are developing an application that will have 2 monitors connected.
That will be in Solaris 2.6 most likely.

Two different resolutions and two different Xservers ( 'Xsun' for the
m64 g-card at 1280x1024 and 'Xtsi' for a 'Raptor 2K' g-card at 2048x2048
)

It has to be like that, for the moment, since AFAIK 'Xsun' does not
support the Raptor card and 'Xtsi' does not support the m64 card. Both
work fine if i start one each time as independent Xservers.

Also working when launched as two independent xservers at the same time:

     openwin -dev /dev/fb1  ( X --> /opt/X11R6/bin/Xtsi ) [The raptor
card]
     Xsun :1 -dev /dev/fb0  (the m64 card)

only problem is with keyboard and mouse, that i suppose has to be
disabled on one of the 'xservers'

i have read of X11R6.4 or Xsun in Solaris 2.7 with the '-xinerama'
option. Does X11R6.4 with xinerama option also work OK in Solaris 2.6
??.

I have also tested another commercial SW that works on several monitors
as if they were only one, but unfortunately does not support the Raptor
card.

-------------- The question:
is there any solution to start two different 'xservers' (with two diff.
resolutions) at the same time as if they were the same 'xserver'  ???.
They should pass any mouse/keyboard event to the other one when needed.

Thank you for any suggestion.

--
===============================
F. Javier Cobas

Pls. delete NOJUNKPLS. to reach me by e-mail

--
===============================
F. Javier Cobas

Pls. delete NOJUNKPLS. to reach me by e-mail

Sent via Deja.com http://www.deja.com/
Before you buy.

2. NEED SUMMARY: where is wait3()

3. 2 diff IPs, 2 diff web srvr, 1 machine

4. Extract Records from a text file

5. IRC 2.8 racing under Linux(diff GCC's, diff kernels)

6. OPENING NFS PORT

7. diff tool that can do intraline diffs?

8. Lexmark Optra E

9. diff DNS server on diff NIC

10. Diff consoles, diff resolutions?

11. Is it possible to have 2 diff posix threads waiting on 2 diff sockets?

12. need some direction with ibm7337 diff scsi diff tape

13. diff. between /usr/vac/bin/xlc & /usr/bin/xlc