Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread Dan Carpenter
On Thu, Nov 21, 2013 at 09:19:21PM +, Mark Einon wrote: On Wed, Nov 20, 2013 at 03:55:27PM +0800, ZHAO Gang wrote: As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY when tx failed. et131x_tx calls function et131x_send_packets, I put the work of

Re: [PATCH v4 1/5] staging: et131x: clean up code

2013-11-22 Thread Dan Carpenter
On Fri, Nov 22, 2013 at 04:44:48PM +0800, ZHAO Gang wrote: Otherwise this patch seems nice but it needs to be split up and resent. By the way, this mailing list is surely an open list, but I can't find how to subscribe it - the website at driverdev.osuosl.org said it has no

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread Denis Kirjanov
On 11/22/13, Mark Einon mark.ei...@gmail.com wrote: On Wed, Nov 20, 2013 at 03:55:27PM +0800, ZHAO Gang wrote: As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY when tx failed. et131x_tx calls function et131x_send_packets, I put the work of et131x_send_packets directly

Re: [PATCH v4 1/5] staging: et131x: clean up code

2013-11-22 Thread ZHAO Gang
On Fri, Nov 22, 2013 at 5:00 PM, Dan Carpenter dan.carpen...@oracle.com wrote: On Fri, Nov 22, 2013 at 04:44:48PM +0800, ZHAO Gang wrote: Otherwise this patch seems nice but it needs to be split up and resent. By the way, this mailing list is surely an open list, but I can't find how to

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread ZHAO Gang
On Fri, Nov 22, 2013 at 5:17 PM, Denis Kirjanov kirja...@gmail.com wrote: On 11/22/13, Mark Einon mark.ei...@gmail.com wrote: On Wed, Nov 20, 2013 at 03:55:27PM +0800, ZHAO Gang wrote: As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY when tx failed. et131x_tx calls

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread Denis Kirjanov
If you have no free TX descriptors that means that something went wrong and it's a BUG. You have to tell the stack to stop sending packets using netif_stop_queue() and reenable transmissions once tx descriptors will be available. There are a lot of live examples in the source tree. On 11/22/13,

Re: [PATCH v4 1/5] staging: et131x: clean up code

2013-11-22 Thread Dan Carpenter
On Fri, Nov 22, 2013 at 07:37:58PM +0800, ZHAO Gang wrote: On Fri, Nov 22, 2013 at 5:00 PM, Dan Carpenter dan.carpen...@oracle.com wrote: On Fri, Nov 22, 2013 at 04:44:48PM +0800, ZHAO Gang wrote: Otherwise this patch seems nice but it needs to be split up and resent. By the way,

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread ZHAO Gang
On Fri, Nov 22, 2013 at 7:56 PM, Denis Kirjanov kirja...@gmail.com wrote: If you have no free TX descriptors that means that something went wrong and it's a BUG. You have to tell the stack to stop sending packets using netif_stop_queue() and reenable transmissions once tx descriptors will be

Re: [PATCH v4 1/5] staging: et131x: clean up code

2013-11-22 Thread ZHAO Gang
On Fri, Nov 22, 2013 at 8:13 PM, Dan Carpenter dan.carpen...@oracle.com wrote: On Fri, Nov 22, 2013 at 07:37:58PM +0800, ZHAO Gang wrote: On Fri, Nov 22, 2013 at 5:00 PM, Dan Carpenter dan.carpen...@oracle.com wrote: On Fri, Nov 22, 2013 at 04:44:48PM +0800, ZHAO Gang wrote: Otherwise

Re: [PATCH v4 1/5] staging: et131x: clean up code

2013-11-22 Thread Dan Carpenter
On Fri, Nov 22, 2013 at 08:35:39PM +0800, ZHAO Gang wrote: On Fri, Nov 22, 2013 at 8:13 PM, Dan Carpenter dan.carpen...@oracle.com wrote: On Fri, Nov 22, 2013 at 07:37:58PM +0800, ZHAO Gang wrote: On Fri, Nov 22, 2013 at 5:00 PM, Dan Carpenter dan.carpen...@oracle.com wrote: On Fri,

[PATCH v5 1/7] staging: et131x: make some tweaks to reduce split lines

2013-11-22 Thread ZHAO Gang
1. As TODO list suggested, do this sort of things to reduce split lines: struct fbr_lookup *fbr; fbr = rx_local-fbr[id]; Then replace all the instances of rx_local-fbr[id] with fbr. 2. Some code style changes Signed-off-by: ZHAO Gang gamer...@gmail.com --- v4 - v5: split

[PATCH v5 3/7] staging: et131x: delete unnecessary variable in function et131x_init

2013-11-22 Thread ZHAO Gang
Variable u32 numrfd is not necessary in this function. Signed-off-by: ZHAO Gang gamer...@gmail.com --- drivers/staging/et131x/et131x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 0a6cc62..6df7145

[PATCH v5 4/7] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread ZHAO Gang
As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY when tx failed. et131x_tx calls function et131x_send_packets, I put the work of et131x_send_packets directly into et131x_tx, and made some changes to let the code more readable. Signed-off-by: ZHAO Gang gamer...@gmail.com ---

[PATCH v5 6/7] staging: et131x: remove spinlock adapter-lock

2013-11-22 Thread ZHAO Gang
adapter-lock is only used in et131x_multicast(), which is eventually called by network stack function __dev_set_rx_mode(). __dev_set_rx_mode() is always called by (net_device *)dev-addr_list_lock hold, to protect from concurrent access. So adapter-lock is redundant. Signed-off-by: ZHAO Gang

[PATCH 01/39] staging: comedi: das6402: remove DEBUG noise

2013-11-22 Thread H Hartley Sweeten
The private data does not contain 'das6402_irqcount' or 'das6402_wordsread' members so the printk noise produces build errors when DEBUG is defined. The other printk is just added noise. Remove the printk's to fix the build errors and remove the noise. Signed-off-by: H Hartley Sweeten

[PATCH 02/39] staging: comedi: pcl816: remove DEBUG macro

2013-11-22 Thread H Hartley Sweeten
This macro is only used to output some function tracing debug messages. These messages are just added noise so remove the DEBUG macro as well as the noise. Also, remove pcl816_cmdtest_out() which was only called as part of the DEBUG() in pcl816_ai_cmdtest(). Signed-off-by: H Hartley Sweeten

[PATCH 05/39] staging: comedi: ni_pcidio: remove custom DPRINTK macro

2013-11-22 Thread H Hartley Sweeten
The comedi core defines a DPRINTK macro in comedidev.h. Use that macro instead of defining a private version in this driver. Also, remove the DEBUG define since it was only used to enable the DPRINTK macro. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 07/39] staging: comedi: ni_pcidio: remove DEBUG define

2013-11-22 Thread H Hartley Sweeten
This define is only used to enable some debug messages during the board attach. These are just added noise, remove them as well as the DEBUG define. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH 09/39] staging: comedi: remove comedi_debug module parameter

2013-11-22 Thread H Hartley Sweeten
Remove this module parameter and use the CONFIG_COMEDI_DEBUG option to enable normal kernel debugging with -DDEBUG flag. Remove the #undef DEBUG from all the comedi source files so they will honour the -DDEBUG flag. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 08/39] staging: comedi: dt3000: remove DEBUG define

2013-11-22 Thread H Hartley Sweeten
This define unables some debug code that prints the status flags during the interrupt handler. These messages are just added noise and it's probably not a good idea to spew them during the interrupt anyway. Remove the DEBUG define as well as the debug code. Signed-off-by: H Hartley Sweeten

[PATCH 12/39] staging: comedi: amplc_pci224: remove use of DPRINTK

2013-11-22 Thread H Hartley Sweeten
Use dev_dbg() instead of the DPRINTK macro to output the comedi debugging information. The dev_dbg() will prefix the messages appropriately so remove the comedi%d: DRIVER_NAME portion and use __func__ to show the actual function name for debugging. Signed-off-by: H Hartley Sweeten

[PATCH 11/39] staging: comedi: pcl816: remove use of DPRINTK

2013-11-22 Thread H Hartley Sweeten
Remove the DPRINTK messages that are just function trace noise. Use dev_dbg() instead of the DPRINTK macro to output the comedi debugging information. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org

[PATCH 20/39] staging: comedi: mite: remove MDPRINTK macro

2013-11-22 Thread H Hartley Sweeten
This macro is used by the comedi drivers that usee the mite module to output development function trace messages. These are just added noise. Remove the messages as well as the macro. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg

[PATCH 27/39] staging: comedi: pcmmio: remove DAMMIT_ITS_BROKEN debug

2013-11-22 Thread H Hartley Sweeten
These debug messages are just added noise. Remove them. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/pcmmio.c | 22 -- 1 file changed, 22

[PATCH 29/39] staging: comedi: dyna_pci10xx: convert a KERN_DEBUG message to dev_dbg()

2013-11-22 Thread H Hartley Sweeten
Convert a printk(KERN_DEBUG ... message to dev_dbg(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/dyna_pci10xx.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH 30/39] staging: comedi: pcmmio: convert a KERN_DEBUG message to dev_dbg()

2013-11-22 Thread H Hartley Sweeten
Convert a printk(KERN_DEBUG ... message to dev_dbg(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/pcmmio.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 39/39] staging: comedi: ni_mio_common: remove DEBUG_INTERRUPT messages

2013-11-22 Thread H Hartley Sweeten
Defining DEBUG_INTERRUPT enables some function trace messages during the interrupt. These messages are just added noise. Remove them. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH 31/39] staging: comedi: c6xdigio: remove unnecessary c6xdigio_pwmo_insn_read()

2013-11-22 Thread H Hartley Sweeten
The pwm subdevice in this driver sets the subdev_flags to SDF_WRITEABLE so the s-insn_read callback is not needed. Since this callback simply outputs a printk(KERN_DEBUG ... message jsut remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc:

[PATCH 04/39] staging: comedi: dt282x: remove DEBUG define

2013-11-22 Thread H Hartley Sweeten
This define is not used by the driver. Just remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/fl512.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 16/39] staging: comedi: ni_pcidio: remove DEBUG_FLAGS define and code

2013-11-22 Thread H Hartley Sweeten
The DEBUG_FLAGS define enables some development code that outputs interrupt flags and status information in the interrupt handler. This information is just added noise. Remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

staging: comedi: cleanup debugging support

2013-11-22 Thread H Hartley Sweeten
Currently the COMEDI_DEBUG option enables the comedi_debug module parameter as well as a DPRINTK() macro. To actually get debug messages to display the kernel still needs to be built with the -DDEBUG flag. Cleanup all the custom uses of DEBUG in comedi and use the COMEDI_DEBUG option to enable

[PATCH 38/39] staging: comedi: ni_mio_common: remove DEBUG_STATUS_A messages

2013-11-22 Thread H Hartley Sweeten
Defining DEBUG_STATUS_A enables dumping of a status register during the interrupt. These messages are just added noise. Remove them. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH 2/8] staging: dwc2: fix potential use after free

2013-11-22 Thread Paul Zimmerman
dwc2_process_non_isoc_desc() can potentially free the qtd, so null out the qtd pointer if the call fails so we don't try to access it later Signed-off-by: Paul Zimmerman pa...@synopsys.com --- drivers/staging/dwc2/hcd_ddma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH 3/8] staging: dwc2: rename DWC2_PARAM_TEST to DWC2_OUT_OF_BOUNDS

2013-11-22 Thread Paul Zimmerman
DWC2_PARAM_TEST is not a very good name for this macro, so rename it to DWC2_OUT_OF_BOUNDS Signed-off-by: Paul Zimmerman pa...@synopsys.com --- drivers/staging/dwc2/core.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git

[PATCH 4/8] staging: dwc2: make all the dwc2_set_param* functions void

2013-11-22 Thread Paul Zimmerman
We were not checking the return value from any of these functions, so make them void functions Signed-off-by: Paul Zimmerman pa...@synopsys.com --- drivers/staging/dwc2/core.c | 193 drivers/staging/dwc2/core.h | 60 +++---

[PATCH 6/8] staging: dwc2: remove useless cast

2013-11-22 Thread Paul Zimmerman
Remove useless cast in dwc2_get_otg_version() Signed-off-by: Paul Zimmerman pa...@synopsys.com --- drivers/staging/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c index 6149fbc..5b490a4 100644 ---

[PATCH 7/8] staging: dwc2: rename dwc2_check_core_status()

2013-11-22 Thread Paul Zimmerman
Rename dwc2_check_core_status() to dwc2_is_controller_alive(), and make it a boolean function. Also change the message when the controller is dead to say dead instead of disconnected. Signed-off-by: Paul Zimmerman pa...@synopsys.com --- drivers/staging/dwc2/core.c | 6 +++---