]> rtime.felk.cvut.cz Git - socketcan-devel.git/commitdiff
Starting transmit queue fixed.
authorJiri Vanek <vanekjir@fel.cvut.cz>
Mon, 14 May 2012 09:01:05 +0000 (11:01 +0200)
committerJiri Vanek <vanekjir@fel.cvut.cz>
Mon, 14 May 2012 09:01:05 +0000 (11:01 +0200)
kernel/2.6/drivers/net/can/usb/ctu_usbcan.c

index 2b2fcbc0a540e6b69acdb9d033f1e6018f494b72..ccf1afa10351f4f8771be6d5cb5001332ab8c1c0 100644 (file)
@@ -82,19 +82,19 @@ struct ctu_usbcan_usb {
        struct can_bittiming_const btc;
        u32 can_clock;
 
-       struct usb_device *udev;                        /* the usb device for this device */
+       struct usb_device *udev;        /* the usb device for this device */
        struct net_device *netdev;
 
        u8 bulk_in_endpointAddr;        /* the address of the bulk in endpoint */
        u8 bulk_out_endpointAddr;       /* the address of the bulk out endpoint */
 
-       struct list_head        rx_pend_list;           /* URBs waiting for data receive */
-       struct list_head        rx_ready_list;          /* URBs with valid received data */
-       struct list_head        tx_idle_list;           /* URBs prepared to hold Tx messages */
-       struct list_head        tx_pend_list;           /* URBs holding Tx messages in progress */
-       struct list_head        tx_ready_list;          /* URBs with yet confirmed Tx messages */
+       struct list_head rx_pend_list;          /* URBs waiting for data receive */
+       struct list_head rx_ready_list;         /* URBs with valid received data */
+       struct list_head tx_idle_list;          /* URBs prepared to hold Tx messages */
+       struct list_head tx_pend_list;          /* URBs holding Tx messages in progress */
+       struct list_head tx_ready_list;         /* URBs with yet confirmed Tx messages */
 
-       spinlock_t              list_lock;                      /* list lock */
+       spinlock_t list_lock;   /* list lock */
        struct task_struct *comthread;                  /* usb communication kernel thread  */
 
        volatile long flags;
@@ -631,8 +631,8 @@ static int ctu_usbcan_open(struct net_device *netdev)
        if (err)
                return err;     
 
-       if (netif_queue_stopped(netdev))
-                       netif_wake_queue(netdev);
+       /* start transmit queue */
+       netif_start_queue(netdev);
 
        /* start kernel thread */
        dev->comthread = kthread_run(usbcan_kthread, (void *)dev, "usbcan_1");
@@ -679,13 +679,8 @@ static int ctu_usbcan_probe(struct usb_interface *intf,
        netdev = alloc_candev(sizeof(struct ctu_usbcan_usb));
 #endif
 
-
        if (!netdev) {
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,33)
                dev_err(&intf->dev, "Couldn't alloc candev\n");
-#else
-               dev_err(netdev->dev.parent, "Couldn't alloc candev\n");
-#endif
                return -ENOMEM;
        }