From: Jiri Vanek Date: Mon, 14 May 2012 09:01:05 +0000 (+0200) Subject: Starting transmit queue fixed. X-Git-Url: http://rtime.felk.cvut.cz/gitweb/socketcan-devel.git/commitdiff_plain/216d07fb1476f1fe19fd645bc05a6772efac22de Starting transmit queue fixed. --- diff --git a/kernel/2.6/drivers/net/can/usb/ctu_usbcan.c b/kernel/2.6/drivers/net/can/usb/ctu_usbcan.c index 2b2fcbc..ccf1afa 100644 --- a/kernel/2.6/drivers/net/can/usb/ctu_usbcan.c +++ b/kernel/2.6/drivers/net/can/usb/ctu_usbcan.c @@ -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; }