Menu

Patch for kernel 2.6

2003-11-23
2003-11-30
  • Josep Comas

    Josep Comas - 2003-11-23

    Hello,

    Here there is a patch for kernel 2.6, sent by Marco d'Itri.

    This patch adds support for the new kernel ATM API.
    The last chunk removes two unneeded assignations.
    I basically copied these changes from the 2.6.0 kernel tree.

    --- xdslusb.c.orig    2003-11-23 14:04:36.000000000 +0100
    +++ xdslusb.c    2003-11-23 14:14:00.000000000 +0100
    @@ -206,6 +206,10 @@
       #define UDSL_PARM_INT(a)  module_param (a, uint, 0444)
    #endif

    +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
    +#  define OLD_ATM_INTERFACE
    +#endif
    +
    UDSL_PARM_INT (speed);
    MODULE_PARM_DESC(speed, "Driver speed: 0 = normal, 1 = fast (default = 0)");
    UDSL_PARM_INT (open);
    @@ -360,7 +364,11 @@
    /* ATM */

    static void udsl_atm_dev_close (struct atm_dev *dev);
    +#ifdef OLD_ATM_INTERFACE
    static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci);
    +#else
    +static int udsl_atm_open (struct atm_vcc *vcc);
    +#endif
    static void udsl_atm_close (struct atm_vcc *vcc);
    static int udsl_atm_ioctl (struct atm_dev *dev, unsigned int cmd, void *arg);
    static int udsl_atm_send (struct atm_vcc *vcc, struct sk_buff *skb);
    @@ -996,11 +1004,19 @@
         return 0;
    }

    +#ifdef OLD_ATM_INTERFACE
    static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci)
    +#else
    +static int udsl_atm_open (struct atm_vcc *vcc)
    +#endif
    {
         struct udsl_instance_data *instance = vcc->dev->dev_data;
         struct udsl_vcc_data *new;
         unsigned int max_pdu;
    +#ifndef OLD_ATM_INTERFACE
    +    int vci = vcc->vci;
    +    short vpi = vcc->vpi;
    +#endif

         dbg ("udsl_atm_open: vpi %hd, vci %d", vpi, vci);

    @@ -1052,8 +1068,6 @@
         }

         vcc->dev_data = new;
    -     vcc->vpi = vpi;
    -     vcc->vci = vci;

         tasklet_disable (&instance->receive_tasklet);
         list_add (&new->list, &instance->vcc_list);

    -- ciao, | Marco | [3236 imR0c4C.VzzPY]

     
    • Luca Rosellini

      Luca Rosellini - 2003-11-30

      Yeah, the patch fixes the compilation warning in xdslusb.c but when starting cxstart I still get:
      ADSL line is up (Downstream 832 Kbits/s, Upstream 192 Kbits/s)
      >>> Loading driver...
      Launching driver in debug mode...
      FATAL: Module cxacrudbg already in kernel.

      or
      ADSL line is up (Downstream 832 Kbits/s, Upstream 192 Kbits/s)
      >>> Loading driver...
      Launching driver in normal mode...
      FATAL: Error inserting cxacru (/lib/modules/2.6.0-test11/kernel/drivers/usb/cxacru.ko): File exists

      Since Linus said that test11 is very close to the final I think It's time to find a workaround for the problem.

      Best
      Luca

       
    • Luca Rosellini

      Luca Rosellini - 2003-11-30

      hello jcomas. I fixed the error said above.
      Here is the (trivial) patch to apply to cxload.sh that fixed the problem for me.

      Best
      Luca

      --- cxload.sh    2003-10-05 10:56:20.000000000 +0200
      +++ cxload.sh-fixed    2003-11-30 18:12:58.288468592 +0100
      @@ -106,6 +106,8 @@
            SPEED_OPTION=1
            ;;
      esac
      +
      +rmmod $MODULE_RUN
      modprobe $MODULE_RUN speed=$SPEED_OPTION open=$PARAM_0a || exit 1
      sleep 3s

       

Log in to post a comment.

MongoDB Logo MongoDB