Re: [PATCH v5 2/5] can: kvaser_usb: Consolidate and unify state change handling

2015-01-21 Thread Ahmed S. Darwish
On Wed, Jan 21, 2015 at 03:00:15PM +, Andri Yngvason wrote: Quoting Ahmed S. Darwish (2015-01-21 14:43:23) Hi! ... -- Unplug the cable -- (000.009106) can0 2080 [8] 00 00 00 00 00 00 08 00 ERRORFRAME bus-error error-counter-tx-rx{{8}{0

[PATCH v5 1/5] can: kvaser_usb: Update net interface state before exiting on OOM

2015-01-20 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Update all of the can interface's state and error counters before trying any skb allocation that can actually fail with -ENOMEM. Suggested-by: Marc Kleine-Budde m...@pengutronix.de Signed-off-by: Ahmed S. Darwish ahmed.darw...@valeo.com --- drivers

[PATCH v5 3/5] can: kvaser_usb: Fix state handling upon BUS_ERROR events

2015-01-20 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com While being in an ERROR_WARNING state and receiving further bus error events with error counts in the range of 97-127 inclusive, the state handling code erroneously reverts back to ERROR_ACTIVE. As per the CAN standard recommendations, only revert

[PATCH v5 2/5] can: kvaser_usb: Consolidate and unify state change handling

2015-01-20 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Replace most of the can interface's state and error counters handling with the new can-dev can_change_state() mechanism. Suggested-by: Andri Yngvason andri.yngva...@marel.com Signed-off-by: Ahmed S. Darwish ahmed.darw...@valeo.com --- drivers/net

[PATCH v5 5/5] can: kvaser_usb: Add support for the USBcan-II family

2015-01-20 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com CAN to USB interfaces sold by the Swedish manufacturer Kvaser are divided into two major families: 'Leaf', and 'USBcanII'. From an Operating System perspective, the firmware of both families behave in a not too drastically different fashion

Re: [PATCH v5 2/5] can: kvaser_usb: Consolidate and unify state change handling

2015-01-22 Thread Ahmed S. Darwish
On Wed, Jan 21, 2015 at 05:13:45PM +0100, Wolfgang Grandegger wrote: On Wed, 21 Jan 2015 10:36:47 -0500, Ahmed S. Darwish darwish...@gmail.com wrote: On Wed, Jan 21, 2015 at 03:00:15PM +, Andri Yngvason wrote: Quoting Ahmed S. Darwish (2015-01-21 14:43:23) Hi! ... -- Unplug

Re: [PATCH 01/13] kdbus: add documentation

2015-01-22 Thread Ahmed S. Darwish
On Fri, Jan 16, 2015 at 11:16:05AM -0800, Greg Kroah-Hartman wrote: From: Daniel Mack dan...@zonque.org kdbus is a system for low-latency, low-overhead, easy to use interprocess communication (IPC). The interface to all functions in this driver is implemented via ioctls on files exposed

[PATCH v5 4/5] can: kvaser_usb: Retry the first bulk transfer on -ETIMEDOUT

2015-01-20 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com On some x86 laptops, plugging a Kvaser device again after an unplug makes the firmware always ignore the very first command. For such a case, provide some room for retries instead of completly exiting the driver init code. Signed-off-by: Ahmed S

Re: [PATCH v5 2/5] can: kvaser_usb: Consolidate and unify state change handling

2015-01-21 Thread Ahmed S. Darwish
Hi! On Wed, Jan 21, 2015 at 12:53:58PM +0100, Wolfgang Grandegger wrote: On Wed, 21 Jan 2015 10:33:19 +, Andri Yngvason andri.yngva...@marel.com wrote: Quoting Ahmed S. Darwish (2015-01-20 21:45:37) From: Ahmed S. Darwish ahmed.darw...@valeo.com Replace most of the can interface's

Re: [PATCH v4 3/4] can: kvaser_usb: Add support for the Usbcan-II family

2015-01-18 Thread Ahmed S. Darwish
Hi! On Mon, Jan 12, 2015 at 02:53:02PM +0100, Olivier Sobrie wrote: Hello, On Sun, Jan 11, 2015 at 03:36:12PM -0500, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com ... @@ -98,7 +128,13 @@ #define CMD_START_CHIP_REPLY 27 #define

Re: [PATCH v5 2/5] can: kvaser_usb: Consolidate and unify state change handling

2015-01-24 Thread Ahmed S. Darwish
Hi! On Wed, Jan 21, 2015 at 04:20:25PM +, Andri Yngvason wrote: Quoting Ahmed S. Darwish (2015-01-20 21:45:37) From: Ahmed S. Darwish ahmed.darw...@valeo.com Replace most of the can interface's state and error counters handling with the new can-dev can_change_state() mechanism

Re: [PATCH v5 2/5] can: kvaser_usb: Consolidate and unify state change handling

2015-01-24 Thread Ahmed S. Darwish
On Fri, Jan 23, 2015 at 10:32:13AM +, Andri Yngvason wrote: Quoting Ahmed S. Darwish (2015-01-23 06:07:34) On Wed, Jan 21, 2015 at 05:13:45PM +0100, Wolfgang Grandegger wrote: On Wed, 21 Jan 2015 10:36:47 -0500, Ahmed S. Darwish darwish...@gmail.com wrote: On Wed, Jan 21, 2015

Re: [PATCH 01/13] kdbus: add documentation

2015-01-24 Thread Ahmed S. Darwish
On Fri, Jan 23, 2015 at 09:19:46PM +0800, Greg Kroah-Hartman wrote: On Fri, Jan 23, 2015 at 08:28:20AM +0200, Ahmed S. Darwish wrote: On Fri, Jan 16, 2015 at 11:16:05AM -0800, Greg Kroah-Hartman wrote: From: Daniel Mack dan...@zonque.org kdbus is a system for low-latency, low-overhead

Re: [PATCH v5 2/5] can: kvaser_usb: Consolidate and unify state change handling

2015-01-24 Thread Ahmed S. Darwish
On Thu, Jan 22, 2015 at 10:14:47AM +, Andri Yngvason wrote: Quoting Marc Kleine-Budde (2015-01-21 22:59:23) On 01/21/2015 05:20 PM, Andri Yngvason wrote: Marc, could you merge the move bus_off++ patch before you merge this so that I won't have to incorporate this patch-set into

[PATCH v6 5/7] can: kvaser_usb: Update interface state before exiting on OOM

2015-01-25 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Update all of the can interface's state and error counters before trying any skb allocation that can actually fail with -ENOMEM. Suggested-by: Marc Kleine-Budde m...@pengutronix.de Signed-off-by: Ahmed S. Darwish ahmed.darw...@valeo.com --- drivers

[PATCH v6 6/7] can: kvaser_usb: Consolidate and unify state change handling

2015-01-25 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Replace most of the can interface's state and error counters handling with the new can-dev can_change_state() mechanism. Suggested-by: Andri Yngvason andri.yngva...@marel.com Signed-off-by: Ahmed S. Darwish ahmed.darw...@valeo.com --- drivers/net

[PATCH v6 1/7] can: kvaser_usb: Do not sleep in atomic context

2015-01-25 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Upon receiving a hardware event with the BUS_RESET flag set, the driver kills all of its anchored URBs and resets all of its transmit URB contexts. Unfortunately it does so under the context of URB completion handler `kvaser_usb_read_bulk_callback

[PATCH v6 7/7] can: kvaser_usb: Add support for the USBcan-II family

2015-01-25 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com CAN to USB interfaces sold by the Swedish manufacturer Kvaser are divided into two major families: 'Leaf', and 'USBcanII'. From an Operating System perspective, the firmware of both families behave in a not too drastically different fashion

[PATCH v6 0/7] can: kvaser_usb: Leaf bugfixes and USBCan-II support

2015-01-25 Thread Ahmed S. Darwish
Hi! This is an updated patch series for the Kvaser CAN/USB devices: 1- Extra patches are now added to the series. Most importantly patch #1 which fixes a critical `sleep in atomic context' bug in the current upstream driver. Patch #2 fixes a corruption in the kernel logs, also affecting current

[PATCH v6 4/7] can: kvaser_usb: Fix state handling upon BUS_ERROR events

2015-01-25 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com While being in an ERROR_WARNING state, and receiving further bus error events with error counters still in the ERROR_WARNING range of 97-127 inclusive, the state handling code erroneously reverts back to ERROR_ACTIVE. Per the CAN standard, only

[PATCH v6 3/7] can: kvaser_usb: Retry the first bulk transfer on -ETIMEDOUT

2015-01-25 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com On some x86 laptops, plugging a Kvaser device again after an unplug makes the firmware always ignore the very first command. For such a case, provide some room for retries instead of completely exiting the driver init code. Signed-off-by: Ahmed S

[PATCH v6 2/7] can: kvaser_usb: Send correct context to URB completion

2015-01-25 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Send expected argument to the URB completion hander: a CAN netdevice instead of the network interface private context `kvaser_usb_net_priv'. This was discovered by having some garbage in the kernel log in place of the netdevice names: can0 and can1

Re: [PATCH v5 4/5] can: kvaser_usb: Retry the first bulk transfer on -ETIMEDOUT

2015-01-25 Thread Ahmed S. Darwish
On Wed, Jan 21, 2015 at 03:24:46PM +0300, Sergei Shtylyov wrote: Hello. On 1/21/2015 12:48 AM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com On some x86 laptops, plugging a Kvaser device again after an unplug makes the firmware always ignore the very first

[PATCH v4 00/04] can: Introduce support for Kvaser USBCAN-II devices

2015-01-11 Thread Ahmed S. Darwish
Hi, Now since earlier v3 submission patches #1-3 got merged, this is a new patch series expanding on patch v3 #4: support for the USBCAN-II family. A new series is introduced due to the extra additions suggested by code review, which required being added in their own self-contained patches.

Re: [PATCH v4 01/04] can: kvaser_usb: Don't dereference skb after a netif_rx() devices

2015-01-11 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com We should not touch the packet after a netif_rx: it might get freed behind our back. Suggested-by: Marc Kleine-Budde m...@pengutronix.de Signed-off-by: Ahmed S. Darwish ahmed.darw...@valeo.com --- drivers/net/can/usb/kvaser_usb.c | 11

[PATCH v4 2/4] can: kvaser_usb: Update error counters before exiting on OOM

2015-01-11 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Let the error counters be more accurate in case of Out of Memory conditions. Suggested-by: Marc Kleine-Budde m...@pengutronix.de Signed-off-by: Ahmed S. Darwish ahmed.darw...@valeo.com --- drivers/net/can/usb/kvaser_usb.c | 6 +++--- 1 file changed

[PATCH v4 3/4] can: kvaser_usb: Add support for the Usbcan-II family

2015-01-11 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com CAN to USB interfaces sold by the Swedish manufacturer Kvaser are divided into two major families: 'Leaf', and 'UsbcanII'. From an Operating System perspective, the firmware of both families behave in a not too drastically different fashion

[PATCH v4 4/4] can: kvaser_usb: Retry first bulk transfer on -ETIMEDOUT

2015-01-11 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com (This is a draft patch, I'm not sure if this fixes the USB bug or only its psymptom. Feedback from the linux-usb folks is really appreciated.) When plugging the Kvaser USB/CAN dongle the first time, everything works as expected and all

[PATCH v4 01/04] can: kvaser_usb: Don't dereference skb after a netif_rx()

2015-01-11 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com We should not touch the packet after a netif_rx: it might get freed behind our back. Suggested-by: Marc Kleine-Budde m...@pengutronix.de Signed-off-by: Ahmed S. Darwish ahmed.darw...@valeo.com --- drivers/net/can/usb/kvaser_usb.c | 11

Re: [PATCH v4 4/4] can: kvaser_usb: Retry first bulk transfer on -ETIMEDOUT

2015-01-12 Thread Ahmed S. Darwish
On Sun, Jan 11, 2015 at 09:51:10PM +0100, Marc Kleine-Budde wrote: On 01/11/2015 09:45 PM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com (This is a draft patch, I'm not sure if this fixes the USB bug or only its psymptom. Feedback from the linux-usb folks

Re: [PATCH v4 4/4] can: kvaser_usb: Retry first bulk transfer on -ETIMEDOUT

2015-01-12 Thread Ahmed S. Darwish
On Mon, Jan 12, 2015 at 02:33:30PM +0100, Olivier Sobrie wrote: Hello, On Mon, Jan 12, 2015 at 05:14:07AM -0500, Ahmed S. Darwish wrote: On Sun, Jan 11, 2015 at 09:51:10PM +0100, Marc Kleine-Budde wrote: On 01/11/2015 09:45 PM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw

Re: [PATCH v3 4/4] can: kvaser_usb: Add support for the Usbcan-II family

2015-01-12 Thread Ahmed S. Darwish
On Mon, Jan 12, 2015 at 12:51:49PM +0100, Marc Kleine-Budde wrote: On 01/08/2015 04:19 PM, Ahmed S. Darwish wrote: [...] MODULE_DEVICE_TABLE(usb, kvaser_usb_table); @@ -463,7 +631,18 @@ static int kvaser_usb_get_software_info(struct kvaser_usb *dev) if (err) return

Re: [PATCH v4 3/4] can: kvaser_usb: Add support for the Usbcan-II family

2015-01-12 Thread Ahmed S. Darwish
On Mon, Jan 12, 2015 at 07:07:41AM -0500, Ahmed S. Darwish wrote: Hi Marc, On Mon, Jan 12, 2015 at 12:43:56PM +0100, Marc Kleine-Budde wrote: On 01/11/2015 09:36 PM, Ahmed S. Darwish wrote: + + switch (dev-family) { + case KVASER_LEAF: + rx_msg = msg-u.leaf.rx_can.msg

Re: [PATCH v4 3/4] can: kvaser_usb: Add support for the Usbcan-II family

2015-01-12 Thread Ahmed S. Darwish
Hi Marc, On Sun, Jan 11, 2015 at 03:36:12PM -0500, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com CAN to USB interfaces sold by the Swedish manufacturer Kvaser are divided into two major families: 'Leaf', and 'UsbcanII'. From an Operating System perspective

Re: [PATCH v4 3/4] can: kvaser_usb: Add support for the Usbcan-II family

2015-01-12 Thread Ahmed S. Darwish
Hi Marc, On Mon, Jan 12, 2015 at 12:43:56PM +0100, Marc Kleine-Budde wrote: On 01/11/2015 09:36 PM, Ahmed S. Darwish wrote: [...] diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c index 0eb870b..da47d17 100644 --- a/drivers/net/can/usb/kvaser_usb.c +++ b

Re: [PATCH v4 2/4] can: kvaser_usb: Update error counters before exiting on OOM

2015-01-12 Thread Ahmed S. Darwish
On Mon, Jan 12, 2015 at 12:09:32PM +0100, Marc Kleine-Budde wrote: On 01/11/2015 09:15 PM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com Let the error counters be more accurate in case of Out of Memory conditions. Please have a look at kvaser_usb_rx_error

Re: [PATCH v3 4/4] can: kvaser_usb: Add support for the Usbcan-II family

2015-01-08 Thread Ahmed S. Darwish
On Thu, Jan 08, 2015 at 12:53:37PM +0100, Marc Kleine-Budde wrote: On 01/05/2015 07:31 PM, Ahmed S. Darwish wrote: [...] cf-can_id |= CAN_ERR_CRTL; cf-data[1] = CAN_ERR_CRTL_RX_OVERFLOW; stats-rx_over_errors++; stats-rx_errors

Re: Fix for synchronization issue in IPV6 implementation in smack module(v3.18)

2015-01-09 Thread Ahmed S. Darwish
Hi Vishal, On Thu, Jan 08, 2015 at 10:11:52PM +0530, Vishal Goel wrote: [PATCH] This patch fixes the synchronization issue in IPv6 implementation. Previously there was no synchronization mechanism used while accessing(adding/reading/deletion) smk_ipv6_port_list. It could be possible that

[PATCH v3 2/4] can: kvaser_usb: Reset all URB tx contexts upon channel close

2015-01-05 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Flooding the Kvaser CAN to USB dongle with multiple reads and writes in very high frequency (*), closing the CAN channel while all the transmissions are on (#), opening the device again (@), then sending a small number of packets would make

[PATCH v3 1/4] can: kvaser_usb: Don't free packets when tight on URBs

2015-01-05 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Flooding the Kvaser CAN to USB dongle with multiple reads and writes in high frequency caused seemingly-random panics in the kernel. On further inspection, it seems the driver erroneously freed the to-be-transmitted packet upon getting tight on URBs

[PATCH v3 3/4] can: kvaser_usb: Don't send a RESET_CHIP for non-existing channels

2015-01-05 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Recent Leaf firmware versions (= 3.1.557) do not allow to send commands for non-existing channels. If a command is sent for a non-existing channel, the firmware crashes. Reported-by: Christopher Storah christopher.sto...@invetech.com.au Signed-off

[PATCH v3 4/4] can: kvaser_usb: Add support for the Usbcan-II family

2015-01-05 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com CAN to USB interfaces sold by the Swedish manufacturer Kvaser are divided into two major families: 'Leaf', and 'UsbcanII'. From an Operating System perspective, the firmware of both families behave in a not too drastically different fashion

Re: [PATCH v3 4/4] can: kvaser_usb: Add support for the Usbcan-II family

2015-01-08 Thread Ahmed S. Darwish
Hi Marc, On Thu, Jan 08, 2015 at 12:53:37PM +0100, Marc Kleine-Budde wrote: On 01/05/2015 07:31 PM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com [...] +/* Kvaser USB CAN dongles are divided into two major families: + * - Leaf: Based on Renesas M32C, running

[PATCH v5 2/2] can: kvaser_usb: Fix sparse warning __le16 degrades to integer

2015-03-15 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com USB endpoint's wMaxPacketSize field is an le16 entity. Use appropriate le16_to_cpu macros to maintain endian independence. Reported-by: Marc Kleine-Budde m...@pengutronix.de Signed-off-by: Ahmed S. Darwish ahmed.darw...@valeo.com --- drivers/net

[PATCH v5 1/2] can: kvaser_usb: Comply with firmware max tx URBs value

2015-03-15 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Current driver code arbitrarily assumes a max outstanding tx value of 16 parallel transmissions. Meanwhile, the device firmware provides its actual maximum inside its reply to the CMD_GET_SOFTWARE_INFO message. Under heavy tx traffic

Re: [PATCH v5 1/2] can: kvaser_usb: Comply with firmware max tx URBs value

2015-03-16 Thread Ahmed S. Darwish
On Sun, Mar 15, 2015 at 07:08:23PM +0100, Marc Kleine-Budde wrote: On 03/15/2015 04:03 PM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com Current driver code arbitrarily assumes a max outstanding tx value of 16 parallel transmissions. Meanwhile, the device

Re: [PATCH 1/5] can: kvaser_usb: Avoid double free on URB submission failures

2015-03-09 Thread Ahmed S. Darwish
Hi Marc, (Sorry for the late reply as I was out of town!) On Wed, Mar 04, 2015 at 10:15:45AM +0100, Marc Kleine-Budde wrote: On 02/26/2015 04:20 PM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com Upon a URB submission failure, the driver calls usb_free_urb

[PATCH v2 2/3] can: kvaser_usb: Utilize all possible tx URBs

2015-03-11 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com The driver currently limits the number of outstanding, not yet ACKed, transfers to 16 URBs. Meanwhile, the Kvaser firmware provides its actual max supported number of outstanding transmissions in its reply to the CMD_GET_SOFTWARE_INFO message. One

[PATCH v2 3/3] can: kvaser_usb: Use can-dev unregistration mechanism

2015-03-11 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Use can-dev's unregister_candev() instead of directly calling networking unregister_netdev(). While both are functionally equivalent, unregister_candev() might do extra stuff in the future than just calling networking layer unregistration code

Re: [PATCH v2 1/3] can: kvaser_usb: Fix tx queue start/stop race conditions

2015-03-11 Thread Ahmed S. Darwish
On Wed, Mar 11, 2015 at 04:36:52PM +0100, Marc Kleine-Budde wrote: On 03/11/2015 04:23 PM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com A number of tx queue wake-up events went missing due to the outlined scenario below. Start state is a pool of 16 tx URBs

[PATCH v2 1/3] can: kvaser_usb: Fix tx queue start/stop race conditions

2015-03-11 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com A number of tx queue wake-up events went missing due to the outlined scenario below. Start state is a pool of 16 tx URBs, active tx_urbs count = 15, with the netdev tx queue open. start_xmit() tx_acknowledge

[PATCH v3 2/3] can: kvaser_usb: Utilize all possible tx URBs

2015-03-11 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com The driver currently limits the number of outstanding, not yet ACKed, transfers to 16 URBs. Meanwhile, the Kvaser firmware provides its actual max supported number of outstanding transmissions in its reply to the CMD_GET_SOFTWARE_INFO message. One

[PATCH v3 1/3] can: kvaser_usb: Fix tx queue start/stop race conditions

2015-03-11 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com A number of tx queue wake-up events went missing due to the outlined scenario below. Start state is a pool of 16 tx URBs, active tx_urbs count = 15, with the netdev tx queue open. start_xmit() tx_acknowledge

[PATCH v3 3/3] can: kvaser_usb: Use can-dev unregistration mechanism

2015-03-11 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Use can-dev's unregister_candev() instead of directly calling networking unregister_netdev(). While both are functionally equivalent, unregister_candev() might do extra stuff in the future than just calling networking layer unregistration code

Re: [PATCH v3 2/3] can: kvaser_usb: Utilize all possible tx URBs

2015-03-12 Thread Ahmed S. Darwish
On Wed, Mar 11, 2015 at 10:53:28PM +0100, Marc Kleine-Budde wrote: On 03/11/2015 06:39 PM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com The driver currently limits the number of outstanding, not yet ACKed, transfers to 16 URBs. Meanwhile, the Kvaser firmware

[PATCH v4 1/3] can: kvaser_usb: Fix tx queue start/stop race conditions

2015-03-14 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com A number of tx queue wake-up events went missing due to the outlined scenario below. Start state is a pool of 16 tx URBs, active tx_urbs count = 15, with the netdev tx queue open. CPU #1 [softirq] CPU #2 [softirq] start_xmit

[PATCH v4 2/3] can: kvaser_usb: Utilize all possible tx URBs

2015-03-14 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com The driver currently limits the number of outstanding, not yet ACKed, transfers to 16 URBs. Meanwhile, the Kvaser firmware provides its actual max supported number of outstanding transmissions in its reply to the CMD_GET_SOFTWARE_INFO message. One

[PATCH v4 3/3] can: kvaser_usb: Use can-dev unregistration mechanism

2015-03-14 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Use can-dev's unregister_candev() instead of directly calling networking unregister_netdev(). While both are functionally equivalent, unregister_candev() might do extra stuff in the future than just calling networking layer unregistration code

Re: [PATCH v4 1/3] can: kvaser_usb: Fix tx queue start/stop race conditions

2015-03-14 Thread Ahmed S. Darwish
Hi Marc, On Sat, Mar 14, 2015 at 02:41:18PM +0100, Marc Kleine-Budde wrote: On 03/14/2015 02:02 PM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com A number of tx queue wake-up events went missing due to the outlined scenario below. Start state is a pool of 16 tx

Re: [PATCH v4 1/3] can: kvaser_usb: Fix tx queue start/stop race conditions

2015-03-14 Thread Ahmed S. Darwish
On Sat, Mar 14, 2015 at 03:58:39PM +0100, Marc Kleine-Budde wrote: On 03/14/2015 03:38 PM, Ahmed S. Darwish wrote: Applied to can. This will go into David's net tree and finally into net-next. Then I'll apply patches 2+3. Nag me, if I forget about them ;) Thanks! :-) So if I've

Re: [PATCH v4 3/3] can: kvaser_usb: Use can-dev unregistration mechanism

2015-03-14 Thread Ahmed S. Darwish
On Sat, Mar 14, 2015 at 04:26:56PM +0100, Marc Kleine-Budde wrote: On 03/14/2015 02:11 PM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com Use can-dev's unregister_candev() instead of directly calling networking unregister_netdev(). While both are functionally

Re: [PATCH v4 3/3] can: kvaser_usb: Use can-dev unregistration mechanism

2015-03-14 Thread Ahmed S. Darwish
On Sat, Mar 14, 2015 at 04:55:11PM +0100, Marc Kleine-Budde wrote: On 03/14/2015 04:41 PM, Ahmed S. Darwish wrote: On Sat, Mar 14, 2015 at 04:26:56PM +0100, Marc Kleine-Budde wrote: On 03/14/2015 02:11 PM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com Use can

Re: [PATCH v3 1/3] can: kvaser_usb: Fix tx queue start/stop race conditions

2015-03-12 Thread Ahmed S. Darwish
Hi Marc, On Wed, Mar 11, 2015 at 10:43:07PM +0100, Marc Kleine-Budde wrote: On 03/11/2015 06:37 PM, Ahmed S. Darwish wrote: From: Ahmed S. Darwish ahmed.darw...@valeo.com A number of tx queue wake-up events went missing due to the outlined scenario below. Start state is a pool of 16 tx

[PATCH 2/5] can: kvaser_usb: Read all messages in a bulk-in URB buffer

2015-02-26 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com The Kvaser firmware can only read and write messages that are not crossing the USB endpoint's wMaxPacketSize boundary. While receiving commands from the CAN device, if the next command in the same URB buffer crossed that max packet size boundary

[PATCH 3/5] can: kvaser_usb: Utilize all possible tx URBs

2015-02-26 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com The driver currently limits the number of outstanding, not yet ACKed, transfers to 16 URBs. Meanwhile, the Kvaser firmware provides its actual max supported number of outstanding transmissions in its reply to the CMD_GET_SOFTWARE_INFO message. One

[PATCH 1/5] can: kvaser_usb: Avoid double free on URB submission failures

2015-02-26 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Upon a URB submission failure, the driver calls usb_free_urb() but then manually frees the URB buffer by itself. Meanwhile usb_free_urb() has alredy freed out that transfer buffer since we're the only code path holding a reference to this URB

[PATCH 5/5] can: kvaser_usb: Fix tx queue start/stop race conditions

2015-02-26 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com A number of tx queue wake-up events went missing due to the outlined scenario below. Start state is a pool of 16 tx URBs, active tx_urbs count = 15, with the netdev tx queue open. start_xmit() tx_acknowledge

[PATCH 4/5] can: kvaser_usb: Use can-dev unregistration mechanism

2015-02-26 Thread Ahmed S. Darwish
From: Ahmed S. Darwish ahmed.darw...@valeo.com Use can-dev's unregister_candev() instead of directly calling networking unregister_netdev(). While both are functionally equivalent, unregister_candev() might do extra stuff in the future than just calling networking layer unregistration code

Re: [PATCH 11/13] proc: readdir /proc/*/task

2018-08-28 Thread Ahmed S. Darwish
On Tue, Aug 28, 2018 at 12:36:22PM +, Ahmed S. Darwish wrote: > On Tue, Aug 28, 2018 at 02:15:01AM +0300, Alexey Dobriyan wrote: > > --- > > fs/proc/base.c | 8 > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > Missing description

Re: [GIT PULL] Staging/IIO driver patches for 4.19-rc1

2018-08-28 Thread Ahmed S. Darwish
[ re-send; forgotten lkml CC added; sorry ] Hi, On Sat, 18 Aug 2018 17:57:24 +0200, Greg KH wrote: [...] > addition of some new IIO drivers. Also added was a "gasket" driver from > Google that needs loads of work and the erofs filesystem. > Why are we adding __a whole new in-kernel

Re: [PATCH 11/13] proc: readdir /proc/*/task

2018-08-28 Thread Ahmed S. Darwish
On Tue, Aug 28, 2018 at 02:15:01AM +0300, Alexey Dobriyan wrote: > --- > fs/proc/base.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > Missing description and S-o-b. Further comments below.. > diff --git a/fs/proc/base.c b/fs/proc/base.c > index 33f444721965..668e465c86b3

Re: [GIT PULL] Staging/IIO driver patches for 4.19-rc1

2018-08-28 Thread Ahmed S. Darwish
Hi! On Tue, Aug 28, 2018 at 02:36:07PM +0200, Greg KH wrote: > On Tue, Aug 28, 2018 at 10:38:17AM +0000, Ahmed S. Darwish wrote: > > [ re-send; forgotten lkml CC added; sorry ] > > > > Hi, > > > > On Sat, 18 Aug 2018 17:57:24 +0200, Greg KH wrote: > > [...]

[PATCH] staging: gasket: TODO: re-implement using UIO

2018-09-10 Thread Ahmed S. Darwish
its signle client, the Apex driver, to a proper UIO driver (uio_driver.h). Link: https://lkml.kernel.org/r/20180828103817.GB1397@do-kernel Signed-off-by: Ahmed S. Darwish --- drivers/staging/gasket/TODO | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/staging/gasket

Re: [PATCH v3 3/3] drivers: soc: xilinx: Add ZynqMP PM driver

2018-09-11 Thread Ahmed S. Darwish
Hi! [ Thanks a lot for upstreaming this.. ] On Tue, Sep 11, 2018 at 02:34:57PM -0700, Jolly Shah wrote: > From: Rajan Vaja > > Add ZynqMP PM driver. PM driver provides power management > support for ZynqMP. > > Signed-off-by: Rajan Vaja > Signed-off-by: Jolly Shah > --- [...] > +static

/sbin/depmod Segmentation fault (Reproducable)

2007-01-03 Thread Ahmed S. Darwish
onsole-tools 0.2.3 Sh-utils 5.93 udev 079 wireless-tools 28 -- Ahmed S. Darwish .config.gz Description: Binary data

[PATCH 2.6.20-rc3] cpufreq: check sysfs_create_link return value

2007-01-04 Thread Ahmed S. Darwish
ot;cpufreq"); + ret = sysfs_create_link(_sys_dev->kobj, >kobj, + "cpufreq"); + if (ret) { + mutex_unlock(>lock); + goto err_out_unregister; + }

[PATCH 2.6.20-rc3] Remove unneeded kmalloc casts

2007-01-04 Thread Ahmed S. Darwish
GFP_KERNEL); + priv->rx_buffers = kmalloc(RX_QUEUE_LENGTH * + sizeof(struct ipw2100_rx_packet), + GFP_KERNEL); if (!priv->rx_buffers) { IPW_DEBUG_INFO("can't allocate rx packe

[PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-04 Thread Ahmed S. Darwish
struct ktermios), GFP_KERNEL); if (!o_ltp) goto free_mem_out; memset(o_ltp, 0, sizeof(struct ktermios)); -- Ahmed S. Darwish http://darwish-07.blogspot.com - To unsubscribe from this list: send the line "unsubscribe linux

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-04 Thread Ahmed S. Darwish
On Fri, Jan 05, 2007 at 01:56:09AM -0500, Robert P. J. Day wrote: > On Fri, 5 Jan 2007, Ahmed S. Darwish wrote: > > > Remove unnecessary kmalloc casts in drivers/char/tty_io.c > > rather than remove these casts a file or two at a time, why not just > do them all at once and

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Ahmed S. Darwish
On Fri, Jan 05, 2007 at 09:10:01AM +0100, Rolf Eike Beer wrote: > Ahmed S. Darwish wrote: > > Remove unnecessary kmalloc casts in drivers/char/tty_io.c > > > > Signed-off-by: Ahmed Darwish <[EMAIL PROTECTED]> > > if (!*ltp_loc) { > -ltp

[PATCH UPDATED 2.6.20-rc3] Remove all the unneeded k[mzc]alloc casts

2007-01-05 Thread Ahmed S. Darwish
*) kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t), - GFP_NOFS); + ciKey.name = kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t), + GFP_NOFS); if (ciKey.name == 0) { rc = -ENOMEM; goto dtSearch_Exit2; @@ -9

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Ahmed S. Darwish
ove the casts of the lines you're touching. > This will reduce the size of the complete thing avoiding two rather trivial > patches touching the same line twice. > > Eike OK. In progress -- Ahmed S. Darwish http://darwish-07.blogspot.com - To unsubscribe from this list: send the line "u

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Ahmed S. Darwish
ll try this now. Are you Mr. Alan Cox. ?. Sorry, "Alan" alone is ambiguous. -- Ahmed S. Darwish http://darwish-07.blogspot.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.ke

[PATCH 2.6.20-rc3] TTY_IO code cleanups

2007-01-05 Thread Ahmed S. Darwish
!(driver->flags & TTY_DRIVER_DEVPTS_MEM)) { - p = kmalloc(driver->num * 3 * sizeof(void *), GFP_KERNEL); + p = kzalloc(driver->num * 3 * sizeof(void *), GFP_KERNEL); if (!p) return -ENOMEM; - memset(p, 0,

Re: [PATCH 2.6.20-rc3] TTY_IO code cleanups

2007-01-05 Thread Ahmed S. Darwish
TY_LDISC, >flags)) { > ld->refcount++; >- ret = 1; >+ return 1; > } > spin_unlock_irqrestore(_ldisc_lock, flags); >- return ret; >+ return 0; > } Very sorry, Didn't mention the spin_unlock_irqrestore(). Here's t

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Ahmed S. Darwish
> On Fri, Jan 05, 2007 at 09:10:01AM +0100, rday wrote: > > Ahmed S. Darwish wrote: > > Remove unnecessary kmalloc casts in drivers/char/tty_io.c > > Signed-off-by: Ahmed Darwish <[EMAIL PROTECTED]> > > rday > > p.s. just FYI, i have a patch that does most

[PATCH 2.6.20-rc3] JSM_TTY: kmalloc->kzalloc/Casting cleanups

2007-01-06 Thread Ahmed S. Darwish
CORE, ERR, >pci_dev, "%s:%d Unable to allocate memory for channel struct\n", __FILE__, __LINE__); } - memset(brd->channels[i], 0, sizeof(struct jsm_channel)); }

[PATCH 2.6.20-rc3] DAC960: kmalloc->kzalloc/Casting cleanups

2007-01-06 Thread Ahmed S. Darwish
ength, GFP_ATOMIC); + NewStatusBuffer = kmalloc(2 * Controller->CombinedStatusBufferLength, +GFP_ATOMIC); if (NewStatusBuffer == NULL) { DAC960_Warning("Unable to expand Combined Status Buffer - Truncating\n", -- Ahmed S. Darwish http://darwish-07.blogspo

[PATCH 2.6.20-rc3] CIFS: Remove 2 unneeded kzalloc casts

2007-01-06 Thread Ahmed S. Darwish
struct cifsTconInfo), + GFP_KERNEL); if (ret_buf) { write_lock(); atomic_inc(); -- Ahmed S. Darwish http://darwish-07.blogspot.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a m

[PATCH 2.6.20-rc3] S390: kmalloc->kzalloc/casting cleanups

2007-01-06 Thread Ahmed S. Darwish
+ dev = kzalloc(sizeof (struct net_device), GFP_KERNEL); if (!dev) return NULL; - memset(dev, 0, sizeof (struct net_device)); } dev->priv = privptr; -- Ahmed S. Darwish http://darwish-07.blogspot.com - To unsubsc

[PATCH 2.6.20-rc3] UCC Ether driver: kmalloc casting cleanups

2007-01-06 Thread Ahmed S. Darwish
ucc_geth_init_pram), GFP_KERNEL))) { ugeth_err ("%s: Can not allocate memory for" " p_UccInitEnetParamShadows.", __FUNCTION__); -- Ahmed S. Darwish http://darwish-07.blogspot.com - To unsubscribe from this list: send the line "unsubscribe

[PATCH 2.6.20-rc3] HID-Core: Tiny patch to remove a kmalloc cast

2007-01-06 Thread Ahmed S. Darwish
kfree(device->collection); kfree(device); return NULL; -- Ahmed S. Darwish http://darwish-07.blogspot.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo

Re: [PATCH 2.6.20-rc3] DAC960: kmalloc->kzalloc/Casting cleanups

2007-01-06 Thread Ahmed S. Darwish
; "---". > > *after* that "---" line, and *before* you start the actual patch, > you can add superfluous text, like asking about who the maintainer is, > so that informal dialogue like that doesn't become part of the > permanent patch record. > rday Thanks for a

Re: [PATCH 2.6.20-rc3] DAC960: kmalloc->kzalloc/Casting cleanups

2007-01-06 Thread Ahmed S. Darwish
On Sat, Jan 06, 2007 at 09:46:30AM -0800, Randy Dunlap wrote: > On Sat, 6 Jan 2007 15:17:25 +0200 Ahmed S. Darwish wrote: > > > Hi all, > > I'm not able to find the DAC960 block driver maintainer. If someones knows > > please reply :). > > It's orphaned. Andrew ca

Re: [PATCH 2.6.20-rc3] UCC Ether driver: kmalloc casting cleanups

2007-01-07 Thread Ahmed S. Darwish
On Mon, Jan 08, 2007 at 11:12:28AM +0800, Li Yang-r58472 wrote: > > From: Ahmed S. Darwish [mailto:[EMAIL PROTECTED] > > > > Hi, > > A kmalloc casting cleanup patch. > > Signed-off-by: Ahmed Darwish <[EMAIL PROTECTED]> [..] > > -

Re: [PATCH 2.6.20-rc3] UCC Ether driver: kmalloc casting cleanups

2007-01-07 Thread Ahmed S. Darwish
On Mon, Jan 08, 2007 at 11:12:28AM +0800, Li Yang-r58472 wrote: > > NACK about the 2 clean-ups above. Cast from pointer to integer is > required here. > Hi, here's the modified patch. A patch to switch kmalloc to kzalloc and clean some redundant kmalloc casts. Signed-off-by: Ahme

Re: [PATCH UPDATED 2.6.20-rc3] Remove all the unneeded k[mzc]alloc casts

2007-01-08 Thread Ahmed S. Darwish
On Mon, Jan 08, 2007 at 01:10:19PM +0100, Rolf Eike Beer wrote: > Ahmed S. Darwish wrote: > > Hi all, > > This is a patch to remove the unneeded k[mzc]alloc casts in the whole > > > > Signed-off-by: Ahmed Darwish > > > > diff --git a/arch/cris/arch-v32/

Re: [PATCH] drivers/media/video/videocodec.c: check kmalloc() return value.

2007-03-12 Thread Ahmed S. Darwish
ches put a "---" line after Signed-off-by signature. Thanks, -- Ahmed S. Darwish http://darwish.07.googlepages.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.k

[PATCH 2.6.21-rc4] kernel/exit: Fix a comment and code contradiction

2007-03-16 Thread Ahmed S. Darwish
Hi list, Comment in release_task() claims that group leader's parent process is signalled only if it desires so, which is not true. Signed-off-by: Ahmed S. Darwish <[EMAIL PROTECTED]> --- To save your time, here's the contradictory code which don't appear in the patch (appears after it

Re: [PATCH 2.6.21-rc4] kernel/exit: Fix a comment and code contradiction

2007-03-17 Thread Ahmed S. Darwish
[Johannes please use replay-to-all to notify all readers] On 2007-03-17 9:45:36 Johannes Weiner wrote: > On Sat, Mar 17, 2007 at 08:21:32AM +0200, Ahmed S. Darwish wrote: > > Comment in release_task() claims that group leader's parent process > > is signalled only if it de

  1   2   3   4   5   6   7   8   9   >