Hi Jorge,

Jorge Almeida wrote:
> Hello to all.
> 

Hmm, but your mail didn't reach them all yet...

> 
> Sorry for the late answer but i was out of the office in the last days.
> 
> Please see the attached patch with your comments incorporated.

The patch to socket.c looks broken (empty hunk, a lot of unknown
characters). Please re-check if nothing is missing.

> 
> Jan if the patch is OK, please insert it in the SVN trunck of RTnet, setting 
> the correct TODO statement (I don't put nothing).
> 
> For when is scheduled the next RTnet release?
> I'm almost entering in the test phase of my project and it was good to star 
> already with a stable release of RTnet to make my tests :)

As 0.9.7 just rolled out and your patch is currently the only one
pending, there is no timetable for the next release yet. May quickly
change when more patches or bug reports come in. Still, there is nothing
preventing you to consider the SVN revision that will contain your patch
as a release.

> ------------------------------------------------------------------------
> 
> Index: stack/socket.c
> ===================================================================
> --- stack/socket.c    (revision 1087)
> +++ stack/socket.c    (working copy)
> @@ -229,7 +229,7 @@
>      struct ifreq        *ifr = arg;
>      int                 ret = 0;
>  
>      if (request == SIOCGIFCONF) {
>          struct ifconf       *ifc = arg;
>          struct ifreq        *cur_ifr = ifc->ifc_req;
> @@ -279,6 +279,10 @@
>          case SIOCGIFFLAGS:
>              ifr->ifr_flags = rtdev->flags;
>              break;
> +            
> +        case SIOCETHTOOL:
> + ? ? ? ? ? ?if (rtdev->do_ioctl) {
> + ? ? ? ? ? ? ? ? ? ?ret = rtdev->do_ioctl( rtdev, request, arg);
> + ? ? ? ? ? ?}
> +            break;
>  
>          default:
>              ret = -EOPNOTSUPP;
> Index: drivers/rt_8139too.c
> ===================================================================
> --- drivers/rt_8139too.c      (revision 1087)
> +++ drivers/rt_8139too.c      (working copy)
> @@ -40,6 +40,8 @@
>  #include <linux/ioport.h>
>  #include <linux/netdevice.h>
>  #include <linux/etherdevice.h>
> +#include <linux/if.h>
> +#include <linux/ethtool.h>
>  #include <linux/rtnetlink.h>
>  #include <linux/delay.h>
>  #include <linux/ethtool.h>
> @@ -525,6 +527,7 @@
>  static int rtl8139_interrupt (rtdm_irq_t *irq_handle);
>  static int rtl8139_start_xmit (struct rtskb *skb, struct rtnet_device 
> *rtdev);
>  
> +static int rtl8139_ioctl(struct rtnet_device *rtdev, unsigned int request, 
> void * cmd);
>  
>  static void rtl8139_init_ring (struct rtnet_device *rtdev);
>  static void rtl8139_set_rx_mode (struct rtnet_device *rtdev);
> @@ -834,6 +837,7 @@
>          rtdev->stop = rtl8139_close;
>          rtdev->hard_header = &rt_eth_header;
>          rtdev->hard_start_xmit = rtl8139_start_xmit;
> +        rtdev->do_ioctl = rtl8139_ioctl;
>  
>          /*rtdev->set_multicast_list = rtl8139_set_rx_mode; */
>          rtdev->features |= NETIF_F_SG|NETIF_F_HW_CSUM;
> @@ -1341,6 +1345,37 @@
>          return 0;
>  }
>  
> +static int rtl8139_ioctl(struct rtnet_device *rtdev, unsigned int request, 
> void * arg)
> +{
> +    struct rtl8139_private *tp = rtdev->priv;
> +    void *ioaddr = tp->mmio_addr;
> +    int nReturn = 0;
> +    struct ifreq         *ifr = arg;
> +    struct ethtool_value *value;
> +    switch( request )
> +    {
> +        case SIOCETHTOOL :
> +        {
> +            value = (struct ethtool_value *)ifr->ifr_data;
> +            if( value->cmd == ETHTOOL_GLINK )
> +            {
> +                if(RTL_R16 (CSCR) & CSCR_LinkOKBit)
> +                    value->data = 1;
> +                else
> +                    value->data = 0;
> +            }
> +            break;
> +        }
> +        default :
> +        {
> +            rtdm_printk("rtl8139_ioctl: IOCTL not implemented.\n");
> +            nReturn = -EOPNOTSUPP;
> +            break;
> +        }
> +    }
> +    return nReturn;
> +}

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
RTnet-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers

Reply via email to