patch-2.2.17 linux/drivers/s390/net/iucv.c

Next file: linux/drivers/sbus/char/Makefile
Previous file: linux/drivers/s390/net/ctc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.16/drivers/s390/net/iucv.c linux/drivers/s390/net/iucv.c
@@ -7,8 +7,10 @@
  *    Author(s): Stefan Hegewald <hegewald@de.ibm.com>
  *               Hartmut Penner <hpenner@de.ibm.com> 
  * 
+ *    
  *    2.3 Updates Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
  *                Martin Schwidefsky (schwidefsky@de.ibm.com)
+ *                Alan Altmark (Alan_Altmark@us.ibm.com)
  *                
 
  */
@@ -42,10 +44,10 @@
 
 
 
-
 #define DEBUG123
 #define MAX_DEVICES  10
 
+
 extern char _ascebc[];
 
 /* 
@@ -496,8 +498,6 @@
   /* get own buffer: */
   extern_int_buffer = (INTERRUPT_T*) iucv_ext_int_buffer;
   
-  netif_enter_interrupt(dev);        /* lock ! */
-  
 #ifdef DEBUG
   printk(  "iucv: do_iucv_interrupt %x received; pathid: %02X\n",
 	   extern_int_buffer->iptype,extern_int_buffer->ippathid);
@@ -505,6 +505,14 @@
   dumpit((char *)&extern_int_buffer[0],40);
 #endif
   
+  if (extern_int_buffer->iptype == 0x01)
+    dev = get_device_from_userid(&((char*) extern_int_buffer)[8]);
+  else
+    dev = get_device_from_pathid(extern_int_buffer->ippathid);
+
+  netif_enter_interrupt(dev);        /* lock ! */
+  privptr = (struct iucv_priv *)(dev->priv);
+  
   switch (extern_int_buffer->iptype)
     {
     case 0x01: /* connection pending ext interrrupt */
@@ -519,11 +527,7 @@
 	iucv_retrieve_buffer(glob_command_buffer);
 	break;
       }
-#ifdef DEBUG
-      dumpit(&((char *)extern_int_buffer)[8],8);
-#endif
-      dev = get_device_from_userid(&((char*)extern_int_buffer)[8]);
-      privptr = (struct iucv_priv *)(dev->priv);
+
       privptr->pathid =  extern_int_buffer->ippathid;
       
 #ifdef DEBUG
@@ -542,8 +546,6 @@
       if( extern_int_buffer->ipmsgtag !=0)
 	{
 	  /* get ptr's to kernel struct with local & broadcast address */
-	  dev = get_device_from_pathid(extern_int_buffer->ippathid);
-	  privptr = (struct iucv_priv *)(dev->priv);
 	  indev = dev->ip_ptr;
 	  inaddr = (struct in_ifaddr*) indev->ifa_list;
 	}
@@ -595,8 +597,6 @@
 		   (unsigned int)extern_int_buffer->ipaudit);
 	}
       /* a transmission is over: tell we are no more busy */
-      dev = get_device_from_pathid(extern_int_buffer->ippathid);
-      privptr = (struct iucv_priv *)(dev->priv);
       privptr->stats.tx_packets++;
       netif_wake_queue(dev);                /* transmission is no longer busy*/
       break;
@@ -607,8 +607,6 @@
 #ifdef DEBUG
       printk(  "message pending.\n");
 #endif
-      dev = get_device_from_pathid(extern_int_buffer->ippathid);
-      privptr = (struct iucv_priv *)(dev->priv);
       rcvptr = &privptr->receive_buffer[0];
       
       /* re-set receive buffer */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)