Operating System - OpenVMS
1822936 Members
3814 Online
109645 Solutions
New Discussion юеВ

Re: half-duplex mode vs full-duplex mode issue

 
Troytu
Occasional Visitor

half-duplex mode vs full-duplex mode issue

Hello,

Someone knows why the following function detecs correctly the cable disconnection for an ethernet card when is configured on half-duplex mode and when is configured on full-duplex mode doesn't detect the disconnection?

 

void check_hubs(int hub)
{
   unsigned int stat,error_dev;
   float waittime = 0.1;			/* needed time to obtain a qio answer */
   P5_PARAM xmt_param={0xAB,0,0x04,0,0,0};	/* broadcast multicast address */
   char xmt_buffer[1];				/* transmit buffer */

   /* transmits a multicast message */
   _qio_iosb[hub].w_err = 0;
   stat = sys$qio(0,_network_channel[hub].channel,IO$_WRITEVBLK,&_qio_iosb[hub],0,0,&xmt_buffer[0],0,0,0,&xmt_param,0);
   if (stat & 1)
   {
		  /* qio success. wait a time to access to the returned information */
		  lib$wait(&waittime);
		
		  /* checks qio status */
		  if (_qio_iosb[hub].w_err == 0)
		  {
			 /* timeout in write operation */
			 error_dev = TRUE;
		  }
		  else if ($FAIL(_qio_iosb[hub].w_err))
		  {
			 /* network error */
			 error_dev = TRUE;
		  }
		  else
		  {
			 /* success in write operation */
		   error_dev = FALSE;	
		  }
   }
   else
   {
     
	    /* qio error */
      if (_network_channel[hub].critical)
      {
          lib$stop(stat,0,0);
      }
      else if (!_error_in_hub[hub])
      {
           printf("QUIO ERROR CONTROL_DEVFAIL\n");
         lib$signal(CONTROL_DEVFAIL, 1, &_dvc_dsc);
      }
      error_dev = TRUE;
   }
}   

 

 

 

 

2 REPLIES 2
support_s
System Recommended

Query: half-duplex mode vs full-duplex mode issue

System recommended content:

1. Is there an IPM to force FESA to run in Full duplex mode ?

 

Please click on "Thumbs Up/Kudo" icon to give a "Kudo".

 

Thank you for being a HPE valuable community member.


Accept or Kudo

Volker Halle
Honored Contributor

Re: half-duplex mode vs full-duplex mode issue

You're checking the IOSB, before the QIO has finished. LIB$WAIT may not be enough... Timing may be different between HDX und FDX case.

Try testing with sys$qiow

Volker.