diff options
author | Wolfgang Grandegger <wg@grandegger.com> | 2009-10-08 18:17:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-13 06:44:04 -0400 |
commit | a6e4bc5304033e434fabccabb230b8e9ff55d76f (patch) | |
tree | a1ddf8a6648a5f60e8196c34ad20f9e107f40e8e /drivers/net/can/usb | |
parent | 61321bbd6235ca9a40ba3bc249e8906cc66233c3 (diff) |
can: make the number of echo skb's configurable
This patch allows the CAN controller driver to define the number of echo
skb's used for the local loopback (echo), as suggested by Kurt Van
Dijck, with the function:
struct net_device *alloc_candev(int sizeof_priv,
unsigned int echo_skb_max);
The CAN drivers have been adapted accordingly. For the ems_usb driver,
as suggested by Sebastian Haas, the number of echo skb's has been
increased to 10, which improves the transmission performance a lot.
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can/usb')
-rw-r--r-- | drivers/net/can/usb/ems_usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index 9012e0abc626..a65f56a9cd3d 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c | |||
@@ -232,7 +232,7 @@ MODULE_DEVICE_TABLE(usb, ems_usb_table); | |||
232 | #define INTR_IN_BUFFER_SIZE 4 | 232 | #define INTR_IN_BUFFER_SIZE 4 |
233 | 233 | ||
234 | #define MAX_RX_URBS 10 | 234 | #define MAX_RX_URBS 10 |
235 | #define MAX_TX_URBS CAN_ECHO_SKB_MAX | 235 | #define MAX_TX_URBS 10 |
236 | 236 | ||
237 | struct ems_usb; | 237 | struct ems_usb; |
238 | 238 | ||
@@ -1012,7 +1012,7 @@ static int ems_usb_probe(struct usb_interface *intf, | |||
1012 | struct ems_usb *dev; | 1012 | struct ems_usb *dev; |
1013 | int i, err = -ENOMEM; | 1013 | int i, err = -ENOMEM; |
1014 | 1014 | ||
1015 | netdev = alloc_candev(sizeof(struct ems_usb)); | 1015 | netdev = alloc_candev(sizeof(struct ems_usb), MAX_TX_URBS); |
1016 | if (!netdev) { | 1016 | if (!netdev) { |
1017 | dev_err(netdev->dev.parent, "Couldn't alloc candev\n"); | 1017 | dev_err(netdev->dev.parent, "Couldn't alloc candev\n"); |
1018 | return -ENOMEM; | 1018 | return -ENOMEM; |