From bae4d40849f3acdd9663f5a0857c9415ed7e6d5d Mon Sep 17 00:00:00 2001 From: Ranjani Vaidyanathan Date: Mon, 1 Apr 2013 16:03:31 -0500 Subject: ENGR00257847-2 MX6Q/DL-Fix Ethernet performance issue when WAIT mode is active All of the interrupts from the ENET block are not routed to the GPC block. Hence ENET interrupts are not able to wake up the SOC when the system is in WAIT mode. And the ENET interrupt gets serviced only when another interrupt causes the SOC to exit WAIT mode. This impacts the ENET performance. To fix the issue two options: 1. Route the ENET interrupt to a GPIO. Need to enable the CONFIG_MX6_ENET_IRQ_TO_GPIO in the config. 2. If the GPIO mechanism cannot be used and is not enabled by the above mentioned config, the patch will disable entry to WAIT mode until ENET clock is active. When the ENET clock is disabled, WAIT mode will be automatically enetered. Signed-off-by: Ranjani Vaidyanathan --- include/linux/fec.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/fec.h b/include/linux/fec.h index 97a56d4add74..a9d659456eba 100644 --- a/include/linux/fec.h +++ b/include/linux/fec.h @@ -21,6 +21,9 @@ struct fec_platform_data { int (*power_hibernate) (struct phy_device *); phy_interface_t phy; unsigned char mac[ETH_ALEN]; +#ifdef CONFIG_MX6_ENET_IRQ_TO_GPIO + unsigned int gpio_irq; +#endif }; #endif -- cgit v1.2.3 From f8f1b8124d552ec0320c4360b460ed2d74fab81d Mon Sep 17 00:00:00 2001 From: Terry Lv Date: Fri, 12 Apr 2013 15:44:46 +0800 Subject: ENGR00258357-5: mlb: Use circle buf macros to replace old ringbuf mechanism Use circle buf to replace old ringbuf mechanism. Change to use circle buffer in read, write, rx isr and tx isr functions. In first design of MLB, it's using it's own mechanism to manage ring buffer, like in mxc_mlb.c. And then, I saw that kernel already had a serials of circ buffer macros which can be used to manage ring buffers. This patch is to use circle buffer macros to manage mlb internal ring buffers. For detail of circle buffers, you can refer to linux-2.6-imx/Documentation/circular-buffers.txt. Signed-off-by: Terry Lv --- include/linux/mxc_mlb.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/mxc_mlb.h b/include/linux/mxc_mlb.h index 7ac953c84dd3..3a63647b61b3 100644 --- a/include/linux/mxc_mlb.h +++ b/include/linux/mxc_mlb.h @@ -1,7 +1,7 @@ /* * mxc_mlb.h * - * Copyright 2008-2011 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2008-2013 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -21,6 +21,7 @@ #define MLB_SET_FPS _IOW('S', 0x10, unsigned int) #define MLB_GET_VER _IOR('S', 0x11, unsigned long) #define MLB_SET_DEVADDR _IOR('S', 0x12, unsigned char) + /*! * set channel address for each logical channel * the MSB 16bits is for tx channel, the left LSB is for rx channel @@ -30,6 +31,10 @@ #define MLB_CHAN_SHUTDOWN _IO('S', 0x15) #define MLB_CHAN_GETEVENT _IOR('S', 0x16, unsigned long) +#define MLB_SET_ISOC_BLKSIZE_188 _IO('S', 0x17) +#define MLB_SET_ISOC_BLKSIZE_196 _IO('S', 0x18) +#define MLB_SET_SYNC_QUAD _IOW('S', 0x19, unsigned int) + /*! * MLB event define */ -- cgit v1.2.3 From 94108194acb45f6cc488c9ff4e8d561c113f6409 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Mon, 10 Oct 2011 23:43:53 +0200 Subject: can: dev: let can_get_echo_skb() return dlc of CAN frame can_get_echo_skb() is usually called in the TX complete handler. The stats->tx_packets and stats->tx_bytes should be updated there, too. This patch simplifies to figure out the size of the sent CAN frame. Signed-off-by: Marc Kleine-Budde --- include/linux/can/dev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index cc0bb4961669..129dbee2c8d6 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h @@ -93,7 +93,7 @@ void can_bus_off(struct net_device *dev); void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, unsigned int idx); -void can_get_echo_skb(struct net_device *dev, unsigned int idx); +unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx); void can_free_echo_skb(struct net_device *dev, unsigned int idx); struct sk_buff *alloc_can_skb(struct net_device *dev, struct can_frame **cf); -- cgit v1.2.3