Re: [PATCH v2 1/2] staging: gdm7240: adding LTE USB driver

2013-07-24 Thread Greg KH
On Thu, Jul 25, 2013 at 12:53:40AM +0300, Dan Carpenter wrote: > > +static int gdm_lte_ioctl_get_data(struct wm_req_t *req, struct net_device > > *dev) > > +{ > > + u16 id = req->data_id; > > + > > + switch (id) { > > + case GET_ENDIAN_INFO: > > + /* required for the user space app

Re: [PATCH v2 1/2] staging: gdm7240: adding LTE USB driver

2013-07-24 Thread Dan Carpenter
> +static int gdm_lte_ioctl_get_data(struct wm_req_t *req, struct net_device > *dev) > +{ > + u16 id = req->data_id; > + > + switch (id) { > + case GET_ENDIAN_INFO: > + /* required for the user space application to find out device > endian */ > + get_dev_endian

[PATCH 30/53] staging: comedi: usbdux: tidy up usbdux_ai_cancel()

2013-07-24 Thread H Hartley Sweeten
Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the private data was allocated during the attach. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah

[PATCH 52/53] staging: comedi: usbdux: move usbdux_firmware_upload()

2013-07-24 Thread H Hartley Sweeten
For aesthetics, move this function closer to the (*auto_attach). Also, rename some of the defined constants that are used by the firmware upload. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 170 +++---

[PATCH 53/53] staging: comedi: usbdux: clarify bipolar ai data in usbduxsub_ai_isoc_irq()

2013-07-24 Thread H Hartley Sweeten
Use the comedi_range_is_bipolar() helper instead of checking the 'range' index against a magic number. Also, use the s->maxdata to calculate the value needed to munge the value for bipolar data instead of the magic number. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

[PATCH 51/53] staging: comedi: usbdux: remove some unused defines

2013-07-24 Thread H Hartley Sweeten
These defines are not used by the driver. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/co

[PATCH 48/53] staging: comedi: usbdux: tidy up unlink and stop helpers

2013-07-24 Thread H Hartley Sweeten
For aesthetic reasons, pass the comedi_device pointer to the unlink helpers instead of the private data pointer. All the unlink helpers simply call usb_kill_urb() to cancel any pending transfer requests. The usb passed to usb_kill_urb() can be NULL so the extra sanity check is not required. The u

[PATCH 50/53] staging: comedi: usbdux: remove the usb endpoint defines

2013-07-24 Thread H Hartley Sweeten
The endpoint defines are each only used in one place and don't help clarify the code. Remove the defines and just open code the values. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 25 + 1 file chan

[PATCH 49/53] staging: comedi: usbdux: use the stop helpers in the detach

2013-07-24 Thread H Hartley Sweeten
Use the stop helpers instead of duplicating the code in the detach. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/u

[PATCH 47/53] staging: comedi: usbdux: tidy up usbdux_pwm_start()

2013-07-24 Thread H Hartley Sweeten
Rename the local variable used for the private data pointer to the comedi "norm". Use memset() to initialize the urb transfer_buffer. Set the pwm_cmd_running after submitting the pwm urbs so we don't have to clear it if the submit fails. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg

[PATCH 45/53] staging: comedi: usbdux: tidy up usbdux_pwm_stop()

2013-07-24 Thread H Hartley Sweeten
For aesthetic reasons, pass the comedi_device pointer to this function instead of the private data pointer. Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the pri

[PATCH 46/53] staging: comedi: usbdux: fix usbdux_pwm_cancel()

2013-07-24 Thread H Hartley Sweeten
Add the missing down/up of the semaphore to prevent other commands from being issued to the usb device while the pwn is being stopped. Rename the local variable used for the private data pointer to the comedi "norm". Make sure to check that usbdux_pwm_stop() was successful before sending command

[PATCH 43/53] staging: comedi: usbdux: fix usbdux_counter_read()

2013-07-24 Thread H Hartley Sweeten
Comedi (*insn_read) operations are supposed to read and return insn->n values. Fix this function to work like the core expects. Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only

[PATCH 41/53] staging: comedi: usbdux: tidy up usbdux_dio_insn_config()

2013-07-24 Thread H Hartley Sweeten
Tidy up this function a bit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/stag

[PATCH 44/53] staging: comedi: usbdux: fix usbdux_counter_write()

2013-07-24 Thread H Hartley Sweeten
Comedi (*insn_write) operations are supposed to write insn->n values. Fix this function to work like the core expects. Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be calle

[PATCH 42/53] staging: comedi: usbdux: tidy up usbdux_dio_insn_bits()

2013-07-24 Thread H Hartley Sweeten
Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the private data was allocated during the attach. Tidy up the exit path using goto to ensure that the semaphore is

[PATCH 40/53] staging: comedi: usbdux: tidy up usbdux_ao_cmd()

2013-07-24 Thread H Hartley Sweeten
Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the private data was allocated during the attach. Make sure an ao command is not already running and return -EBUSY

[PATCH 38/53] staging: comedi: usbdux: tidy up usbdux_ao_insn_write()

2013-07-24 Thread H Hartley Sweeten
Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the private data was allocated during the attach. Tidy up the exit path using goto to ensure that the semaphore is

[PATCH 39/53] staging: comedi: usbdux: tidy up usbdux_ao_inttrig()

2013-07-24 Thread H Hartley Sweeten
Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the private data was allocated during the attach. Tidy up the exit path using goto to ensure that the semaphore it

[PATCH 37/53] staging: comedi: usbdux: tidy up usbdux_ao_insn_read()

2013-07-24 Thread H Hartley Sweeten
Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the private data was allocated during the attach. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah

[PATCH 36/53] staging: comedi: usbdux: clarify bipolar ai data

2013-07-24 Thread H Hartley Sweeten
Use the comedi_range_is_bipolar() helper instead of checking the 'range' index against a magic number. Also, use the s->maxdata to calculate the value needed to munge the value for bipolar data instead of the magic number. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

[PATCH 35/53] staging: comedi: usbdux: tidy up usbdux_ai_insn_read()

2013-07-24 Thread H Hartley Sweeten
Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the private data was allocated during the attach. Tidy up the exit path using goto to ensure that the semaphore is

[PATCH 33/53] staging: comedi: usbdux: tidy up usbdux_ai_inttrig()

2013-07-24 Thread H Hartley Sweeten
Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the private data was allocated during the attach. Tidy up the exit path using goto to ensure that the semaphore it

[PATCH 34/53] staging: comedi: usbdux: tidy up usbdux_ai_cmd()

2013-07-24 Thread H Hartley Sweeten
Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the private data was allocated during the attach. Tidy up the exit path using goto to ensure that the semaphore is

[PATCH 29/53] staging: comedi: usbdux: tidy up usbdux_ai_stop()

2013-07-24 Thread H Hartley Sweeten
For aesthetic reasons, pass the comedi_device pointer to this function instead of the private data pointer. Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the pri

[PATCH 32/53] staging: comedi: usbdux: tidy up usbdux_ao_cancel()

2013-07-24 Thread H Hartley Sweeten
Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the private data was allocated during the attach. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah

[PATCH 31/53] staging: comedi: usbdux: tidy up usbdux_ao_stop()

2013-07-24 Thread H Hartley Sweeten
For aesthetic reasons, pass the comedi_device pointer to this function instead of the private data pointer. Rename the local variable used for the private data pointer to the comedi "norm". Remove the unnecessary sanity check of the private data pointer. This function can only be called is the pri

[PATCH 27/53] staging: comedi: usbdux: remove 'ifnum' from the private data

2013-07-24 Thread H Hartley Sweeten
The 'ifnum' is only used during the attach of the device. Remove it from the private data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/stagin

[PATCH 28/53] staging: comedi: usbdux: make private data flags bit-fields

2013-07-24 Thread H Hartley Sweeten
Change the flags in the private data to bit-fields to save a bit of space. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/staging/

[PATCH 25/53] staging: comedi: usbdux: pass comedi_device pointer to usbdux_alloc_usb_buffers()

2013-07-24 Thread H Hartley Sweeten
For aesthetic reasons, pass the comedi_device pointer to this function instead of the private data pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 24/53] staging: comedi: usbdux: tidy up receive_dux_commands()

2013-07-24 Thread H Hartley Sweeten
For aesthetic reasons, pass the comedi_device pointer to this function instead of the private data pointer. Rename the local variable used for the private data pointer to the comedi "norm". Add a local variable for the usb_device pointer to tidy up the usb_bulk_msg() call. Signed-off-by: H Hartle

[PATCH 26/53] staging: comedi: usbdux: remove usb_device back pointer from private data

2013-07-24 Thread H Hartley Sweeten
The usb_device can be found when needed using the comedi_to_usb_dev() helper. Use that instead the remove the back pointer from the private data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 39

[PATCH 23/53] staging: comedi: usbdux: tidy up send_dux_commands()

2013-07-24 Thread H Hartley Sweeten
For aesthetic reasons, pass the comedi_device pointer to this function instead of the private data pointer. Rename the local variable used for the private data pointer to the comedi "norm". Add a local variable for the usb_device pointer to tidy up the usb_bulk_msg() call. Signed-off-by: H Hartle

[PATCH 21/53] staging: comedi: usbdux: remove 'comedidev' from private data

2013-07-24 Thread H Hartley Sweeten
This back pointer is no longer needed by the driver. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/

[PATCH 22/53] staging: comedi: usbdux: remove 'interface' from private data

2013-07-24 Thread H Hartley Sweeten
This back pointer is only used for a couple dev_printk() messages and during the detach. For the dev_printk() we can use the dev->class_dev. In the detach we can get the usb_interface from the comedi_device. Do that and remove the back pointer from the private data. Signed-off-by: H Hartley Swee

[PATCH 20/53] staging: comedi: usbdux: tidy up usbduxsub_submit_pwm_urbs()

2013-07-24 Thread H Hartley Sweeten
Pass the comedi_device pointer (the urb context) to this function instead of the private data pointer. Use a local variable for the urb pointer that is setup and submitted. Remove the sanity check of the private data. This function can only get called if the allocation was successful during the a

[PATCH 0/2] Drivers: hv: balloon: Online memory segments "in context"

2013-07-24 Thread K. Y. Srinivasan
The current code depends on user level code to bring online memory segments that have been hot added. Change this code to online memory in the same context that is hot adding the memory. This patch set implements the necessary infrastructure for making it possible to online memory segments from wi

[PATCH 19/53] staging: comedi: usbdux: tidy up usbduxsub_submit_outurbs()

2013-07-24 Thread H Hartley Sweeten
Pass the comedi_device pointer (the urb context) to this function instead of the private data pointer. Use a local variable for the urb pointers that are setup and submitted. Remove the sanity check of the private data. This function can only get called if the allocation was successful during the

[PATCH 17/53] staging: comedi: usbdux: remove dev_printk() noise

2013-07-24 Thread H Hartley Sweeten
Most of these are just function trace noise. The rest report errors that the user can't do anything about so they amount to added noise. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 184 +++- 1

[PATCH 16/53] staging: comedi: usbdux: tidy up the comedi_lrange tables

2013-07-24 Thread H Hartley Sweeten
Cleanup the whitespace in the tables. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/drivers/staging/comedi/drivers/usbdux.c

[PATCH] staging: gdm724x: Update logging

2013-07-24 Thread Joe Perches
Make the logging prefixes match the module names by adding #define pr_fmt(fmt) KBUILD_MODNAME and converting printks to netdev_ when a struct netdevice * is available and and pr_ when not. Remove embedded prefixes. Add missing terminating newlines. Remove an unnecessary rx-dropped message. Remove

[PATCH 18/53] staging: comedi: usbdux: tidy up usbduxsub_submit_inurbs()

2013-07-24 Thread H Hartley Sweeten
Pass the comedi_device pointer (the urb context) to this function instead of the private data pointer. Use a local variable for the urb pointers that are setup and submitted. Remove the sanity check of the private data. This function can only get called if the allocation was successful during the

[PATCH 14/53] staging: comedi: usbdux: tidy up usbduxsub_pwm_irq()

2013-07-24 Thread H Hartley Sweeten
Rename the local variables to the comedi "norm". Use dev->class_dev as the device for all dev_printk() messages. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 49 + 1 file changed, 19 insert

[PATCH 15/53] staging: comedi: usbdux: remove the SUBDEV_* defines

2013-07-24 Thread H Hartley Sweeten
These defines are only used to index the dev->subdevices array during the attach. It's cleaner to just open-code the values. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 25 + 1 file changed, 5 inse

[PATCH 12/53] staging: comedi: usbdux: tidy up usbduxsub_ai_isoc_irq()

2013-07-24 Thread H Hartley Sweeten
Rename the local variables to the comedi "norm". The comedi_subdevice in this function is actually the dev->read_subdev that was initialized in the attach. Use that instead of accessing the dev->subdevices array directly. Use dev->class_dev as the device for all dev_printk() messages. Instead of

[PATCH 13/53] staging: comedi: usbdux: tidy up usbduxsub_ao_isoc_irq()

2013-07-24 Thread H Hartley Sweeten
Rename the local variables to the comedi "norm". The comedi_subdevice in this function is actually the dev->write_subdev that was initialized in the attach. Use that instead of accessing the dev->subdevices array directly. Use dev->class_dev as the device for all dev_printk() messages. Instead o

[PATCH 10/53] staging: comedi: usbdux: tidy up usbdux_attach_common()

2013-07-24 Thread H Hartley Sweeten
Rename the local variable used for the device private data. Move the setting of the device private data 'comedidev' to the (*auto_attach) where the other back pointers are set. Tidy up the subdevice init by removing the unnecessary comments and adding some whitespace. Remove the unnecessary dev_

[PATCH 11/53] staging: comedi: usbdux: absorb usbdux_attach_common into caller

2013-07-24 Thread H Hartley Sweeten
This function is only called by usbdux_auto_attach(), absorb it. Also, there is no reason to down/up the semaphore during the attach. None of the subdevices are functioning yet so there are no commands being sent to the usb device. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-

[PATCH 08/53] staging: comedi: usbdux: cleanup the (*detach)

2013-07-24 Thread H Hartley Sweeten
The tidy_up() function is only called by the (*detach). That function unlinks any running urbs and frees all the allocated urbs and buffers used by the driver. Rename tidy_up() to usbdux_free_usb_buffers() and move all the parts that don't deal with the freeing of the buffers directly into the (*d

[PATCH 09/53] staging: comedi: usbdux: remove NOISY_DUX_DEBUGBUG

2013-07-24 Thread H Hartley Sweeten
This define enables printing of the 'dux_commands' that is sent to the usb device in send_dux_commands(). This type of development debug should not be left in the final driver. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c |

RE: [PATCH 2/2] Drivers: hv: balloon: Online the hot-added memory "in context"

2013-07-24 Thread KY Srinivasan
> -Original Message- > From: Dave Hansen [mailto:d...@sr71.net] > Sent: Wednesday, July 24, 2013 5:04 PM > To: KY Srinivasan > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; > a...@firstfloor.org; a...@linu

[PATCH 05/53] staging: comedi: usbdux: push usb (*disconnect) into comedi (*detach)

2013-07-24 Thread H Hartley Sweeten
The usb_driver (*disconnect) calls comedi_usb_auto_unconfig() which will call the comedi_driver (*detach). Just move all the disconnect/detach into the comedi_driver and use comedi_usb_auto_unconfig() directly for the (*disconnect). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-

[PATCH 07/53] staging: comedi: usbdux: remove unnecessary tidy_up() calls

2013-07-24 Thread H Hartley Sweeten
If the comedi_driver (*auto_attach) fails, the comedi core will call the (*detach) function to do any cleanup. It's not necessary to do the cleanup in the (*auto_attach). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 5 +---

[PATCH 06/53] staging: comedi: usbdux: push usb (*probe) into comedi (*auto_attach)

2013-07-24 Thread H Hartley Sweeten
The usb_driver (*probe) calls comedi_usb_auto_config() after finding a free slot for the static private data and doind some initial allocation and setup. The comedi_usb_auto_config() will then call the comedi_driver (*auto_attach). Move all the probe/auto_attach into the comedi_driver and just hav

[PATCH 03/53] staging: comedi: usbdux: tidy up usbdux_usb_probe()

2013-07-24 Thread H Hartley Sweeten
Use a pointer to the struct usbdux_private data being configured in the probe. Also use a pointer to the struct urb being setup in the buffer allocations. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 221 +++---

[PATCH 02/53] staging: comedi: usbdux: remove the usb_driver (*probe) noise

2013-07-24 Thread H Hartley Sweeten
The dev_dbg() during the usb_driver (*probe) is just added noise. The dev_err() when a usb_alloc_urb() fails is not necessary. The allocation failure will have already output a message. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/u

[PATCH 04/53] staging: comedi: usbdux: move usb buffer allocation into new function

2013-07-24 Thread H Hartley Sweeten
Move all the usb buffer allocation code in the usb_driver (*probe) into a new function, usbdux_alloc_usb_buffers(). This allows tidying up the error path in the (*probe). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 274 ++

Re: [PATCH v2 1/2] staging: gdm7240: adding LTE USB driver

2013-07-24 Thread Dan Carpenter
On Thu, Jul 25, 2013 at 03:36:17AM +0900, Won Kang wrote: > +- Explain reason for multiples of 512 bytes in alloc_tx_struct() Actually I remembered that I had seen this before in gdm_usb_send() from drivers/staging/gdm72xx/gdm_usb.c. Apparently there is a firmware bug. /* * In s

[PATCH 01/53] staging: comedi: usbdux: rename struct usbduxsub

2013-07-24 Thread H Hartley Sweeten
This struct is the comedi_device private data. For aesthetic reasons, rename it to usbdux_private. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbdux.c | 98 +++-- 1 file changed, 45 insertions(+), 53 del

[PATCH 00/53] staging: comedi: usbdux: cleanup driver

2013-07-24 Thread H Hartley Sweeten
Move all the usb_driver (*probe) and (*disconnect) operations into the comedi_driver (*auto_attach) and (*detach). This allows the per device private data to be kzalloc()'d and removes the 16 device limitation. Remove all the unnecessary information from the private data. Tidy up the driver to re

Re: [PATCH 2/2] Drivers: hv: balloon: Online the hot-added memory "in context"

2013-07-24 Thread Dave Hansen
On 07/24/2013 02:29 PM, K. Y. Srinivasan wrote: > /* > - * Wait for the memory block to be onlined. > - * Since the hot add has succeeded, it is ok to > - * proceed even if the pages in the hot added region > - * have not been "onlin

Re: [PATCH 1/1] Drivers: base: memory: Export symbols for onlining memory blocks

2013-07-24 Thread Dave Hansen
On 07/24/2013 12:45 PM, KY Srinivasan wrote: > All I am saying is that I see two classes of failures: (a) Our > inability to allocate memory to manage the memory that is being hot added > and (b) Our inability to bring the hot added memory online within a reasonable > amount of time. I am not sure

[PATCH 1/2] Drivers: base: memory: Export functionality for "in kernel" onlining of memory

2013-07-24 Thread K. Y. Srinivasan
The current machinery for hot-adding memory requires having user level to bring the memory segments online. Export the necessary functionality to bring the memory segment online without involving user space code. Signed-off-by: K. Y. Srinivasan --- drivers/base/memory.c | 35 +

[PATCH 2/2] Drivers: hv: balloon: Online the hot-added memory "in context"

2013-07-24 Thread K. Y. Srinivasan
Leverage the newly exported functionality to bring memory online without involving user level code. Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_balloon.c | 20 +++- 1 files changed, 3 insertions(+), 17 deletions(-) diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_bal

Re: [PATCH v2 1/2] staging: gdm7240: adding LTE USB driver

2013-07-24 Thread Greg KH
On Thu, Jul 25, 2013 at 03:36:17AM +0900, Won Kang wrote: > GCT Semiconductor GDM7240 is 4G LTE chip. > This driver supports GCT reference platform as a USB device. I've applied this now, and fixed up the tty build warnings (which you should have also seen.) I'm not sure I got the tty fixes corre

RE: [PATCH] staging: dwc2: add microframe scheduler from downstream Pi kernel

2013-07-24 Thread Paul Zimmerman
> From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Tuesday, July 23, 2013 2:59 PM > > On Wed, Jul 17, 2013 at 12:35:46PM -0700, Paul Zimmerman wrote: > > The transfer scheduler in the dwc2 driver is pretty basic, not to > > mention buggy. It works fairly well with just a couple of devices

[PATCH] staging: comedi: fix subdev_flags for all digital subdevices

2013-07-24 Thread H Hartley Sweeten
The SDF_GROUND and SDF_COMMON flags only apply to analog subdevices. It makes no sense to set these flags for digital subdevices. Digital input (COMEDI_SUBD_DI) subdevices only need the SDF_READABLE flag and optionally SDF_CMD_READ it the subdevice supports commands. Digital output (COMEDI_SUBD_D

RE: [PATCH 1/1] Drivers: base: memory: Export symbols for onlining memory blocks

2013-07-24 Thread KY Srinivasan
> -Original Message- > From: Dave Hansen [mailto:d...@sr71.net] > Sent: Wednesday, July 24, 2013 12:43 PM > To: KY Srinivasan > Cc: Dave Hansen; Michal Hocko; gre...@linuxfoundation.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; a

[PATCH] staging: comedi: mite.h: needs

2013-07-24 Thread H Hartley Sweeten
As reported by the kbuild test robot: Commit: 0bdab509bf9c6d838dc0a3b1d68bbf841fc20b5a staging: comedi: usee comedi_alloc_devpriv Removed the include of from many of the comedi drivers. Unfortunately, this header uses kfree() in an inline function. Instead of adding to each of the drivers that

[PATCH 14/14] staging: comedi: ii_pci20kc: reorder subdevices

2013-07-24 Thread H Hartley Sweeten
Make the built-on dio subdevice 0 and the three add-on modules subdevices 1-3. This allows the driver to consistently use the ii20k_module_iobase() helper to get the base address needed to access a the registers used by a given subdevice. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg

[PATCH 13/14] staging: comedi: ii_pci20kc: cleanup final pieces

2013-07-24 Thread H Hartley Sweeten
Tidy up the multi-line comments at the beginning of the file and remove any irrelevant information. Fix the II20K_ID_PCI200341M_1 define, there are one to many 0's. Rename all the remaining pci20xxx_* to ii20k_*. The "pci" just adds confusion, this is not a PCI board. Remove the private (*detach

[PATCH 12/14] staging: comedi: ii_pci20kc: cleanup the ai subdevice

2013-07-24 Thread H Hartley Sweeten
The PCI-200341M-1 module can both provide an analog input subdevice in this driver. The module provides four differential input channels with four programmable gains. Currently the gain is configured as an option passed when the board is attached. Rewrite the ai subdevice support functions to prop

[PATCH 10/14] staging: comedi: ii_pci20kc.c: break up the subdevice private data union

2013-07-24 Thread H Hartley Sweeten
The union used for the subdevice private data just adds confusion. Split the union into two separate private data structs. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ii_pci20kc.c | 64 +++-- 1 file changed,

[PATCH 11/14] staging: comedi: ii_pci20kc: cleanup the ao subdevice

2013-07-24 Thread H Hartley Sweeten
The PCI-20006M-1 and PCI-20006M-2 modules can both provide an analog output subdevice in this driver. Fix the module init code to detect both of them. The analog output can support +/-5, 0-10, or +/-10 volt ranges depending on jumpers on the board. Report all the ranges to the user instead of rely

[PATCH 09/14] staging: comedi: ii_pci20kc.c: remove 'iobase' from the subdevice private data

2013-07-24 Thread H Hartley Sweeten
The 'iobase' can be calculated when needed. Remove it from the subdevice private data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ii_pci20kc.c | 58 +++-- 1 file changed, 31 insertions(+), 27 deletions(-) d

[PATCH 08/14] staging: comedi: ii_pci20kc.c: tidy up the subdevice module init

2013-07-24 Thread H Hartley Sweeten
Use the carrier board id to determine if a module is installed for a given subdevice. Consolidate the module init code into ii20k_init_module(). For aesthetic reasons, rename the subdevice functions to remove 'pci' from them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartm

[PATCH 07/14] staging: comedi: ii_pci20kc.c: cleanup the dio subdevice

2013-07-24 Thread H Hartley Sweeten
For asethetics, redefine the register map for the carrier board. The 'PCI*' names lead one to think this is a PCI board not a legacy ISA board. Remove the #if 0'd out pci20xxx_{do,di}() functions. They are not needed. Rename, and fix, the pci20xxx_dio_config() function. The control and direction

[PATCH 05/14] staging: comedi: ii_pci20kc: move comedi_lrange tables

2013-07-24 Thread H Hartley Sweeten
For aesthetic reasons, move the static const data to the head of the file. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ii_pci20kc.c | 65 +++-- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/

[PATCH 06/14] staging: comedi: ii_pci20kc: remove CHAN macro

2013-07-24 Thread H Hartley Sweeten
This macro is not used, and it looks to much like the comedi CR_CHAN macro. Just remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ii_pci20kc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers

[PATCH 04/14] staging: comedi: ii_pci20kc: remove forward declarations 3

2013-07-24 Thread H Hartley Sweeten
Move a couple functions to remove the need for the last forward declarations. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ii_pci20kc.c | 135 +--- 1 file changed, 62 insertions(+), 73 deletions(-) diff --git

[PATCH 03/14] staging: comedi: ii_pci20kc: remove forward declarations 2

2013-07-24 Thread H Hartley Sweeten
Move the pci20xxx_dio_*() functions to remove the need for some of the forward declarations. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ii_pci20kc.c | 190 +--- 1 file changed, 88 insertions(+), 102 deletion

[PATCH 01/14] staging: comedi: ii_pci20kc: use comedi_alloc_spriv()

2013-07-24 Thread H Hartley Sweeten
For aesthetic reasons, use the helper function to allocate the subdevice private data instead of hanging it on the device private data. The core will free the memory during the detach. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ii_

[PATCH 02/14] staging: comedi: ii_pci20kc: remove forward declarations 1

2013-07-24 Thread H Hartley Sweeten
Move the pci20xxx_attach() and pci20xxx_detach() functions to remove the need for some of the forward declarations. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ii_pci20kc.c | 184 1 file changed, 75 inse

[PATCH 00/14] staging: comedi: ii_pci20kc: cleanup driver

2013-07-24 Thread H Hartley Sweeten
Tidy up this legacy comedi driver. H Hartley Sweeten (14): staging: comedi: ii_pci20kc: use comedi_alloc_spriv() staging: comedi: ii_pci20kc: remove forward declarations 1 staging: comedi: ii_pci20kc: remove forward declarations 2 staging: comedi: ii_pci20kc: remove forward declarations 3

회신: Re: [PATCH v2 1/2] staging: gdm7240: adding LTE USB driver

2013-07-24 Thread Won Kang
Hi Joe, Got it. Thanks Regards, Won 원본 메시지 발신: Joe Perches 날짜: 2013/07/25 오전 3:42 (GMT+09:00) 수신: Won Kang 참조: linux-ker...@vger.kernel.org,de...@driverdev.osuosl.org,gre...@linuxfoundation.org,Won Kang 제목: Re: [PATCH v2 1/2] staging: gdm7240: adding LTE USB driver On

[PATCH 13/13] staging: comedi: pcmuio: tidy up some function declarations

2013-07-24 Thread H Hartley Sweeten
For aesthetics, tidy up a couple of the function declarations. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmuio.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/p

[PATCH 11/13] staging: comedi: pcmuio: fix types of asics members

2013-07-24 Thread H Hartley Sweeten
The 'enabled_mask' is a bit mask of the channels that are enabled for interrupt detection and should be an unsigned int. The 'stop_count' is a >= 0 value that is set by the unsigned int cmd->stop_arg. Make it an unsigned int. The 'active' and 'continuous' members are flags. Make them unsigned int

[PATCH 12/13] staging: comedi: pcmuio: remove unneeded include

2013-07-24 Thread H Hartley Sweeten
The header is no longer needed by this driver. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmuio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio

[PATCH 09/13] staging: comedi: pcmuio: add inline helpers to get the 'iobase', 'asic', and 'port'

2013-07-24 Thread H Hartley Sweeten
To reduce the potential for bugs, introduce a couple inline helper functions to consolidate the calculations needed to get the 'iobase' for a given asic and the 'asic' and 'port' associated with a given subdevice. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drive

[PATCH 10/13] staging: comedi: pcmuio: docuemnt asics[].spinlock

2013-07-24 Thread H Hartley Sweeten
Add a comment about what this spinlock is used for. Also, add comments for two helper functions that do not need to lock/unlock the spinlock. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmuio.c | 4 +++- 1 file changed, 3 insertion

[PATCH 08/13] staging: comedi: pcmuio: remove unnecessary mask of triggered channels

2013-07-24 Thread H Hartley Sweeten
The 'triggered' value is read directly from the three trigger id registers and does not have any extra data that needs masked off. Remove the 'mytrig' local variable and just use 'triggered' directly. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/co

[PATCH 07/13] staging: comedi: pcmuio: make sure input channels stay inputs

2013-07-24 Thread H Hartley Sweeten
When updating the output channels make sure the channels configured as inputs stay inputs. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmuio.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/stagi

[PATCH 06/13] staging: comedi: pcmuio: pcmuio_handle_asic_interrupt() does not need the subdevice

2013-07-24 Thread H Hartley Sweeten
The comedi_subdevice pointer is not used in this function. Its simply passed on to pcmuio_handle_intr_subdev(). That function then needs to calculate the 'asic' associated with the subdevice. Just pass on the 'asic' instead and let pcmuio_handle_intr_subdev() get the subdevice from that. Signed-of

[PATCH 05/13] staging: comedi: pcmuio: remove subdevice private data

2013-07-24 Thread H Hartley Sweeten
The subdevice private data is only needed for each 'asic' not for each subdevice. Since the 'asic' can be calculated easily from the subdevice we can merge the subdevice private data members directly into the private data. This removes the need to kcalloc/free the subdevice private data and saves

[PATCH 02/13] staging: comedi: pcmuio: spinlock pcmuio_{write, read}()

2013-07-24 Thread H Hartley Sweeten
Currently only the pcmuio_handle_asic_interrupt() function uses the spinlock in the private data to protect the read of the paged interrupt id registers. All accesses to the paged registers should be protected to ensure that the page is not changed until the access is complete. Move the lock/unlock

[PATCH 04/13] staging: comedi: pcmuio: remove 'asic' from subdevice private data

2013-07-24 Thread H Hartley Sweeten
The 'asic' associated with a subdevice can be easily calculated. The only functions that use this member in the subdevice private data can only be called by the subdevices that support interrupts. Just calculate the 'asic' and remove the member variable and the sanity checks. Signed-off-by: H Hart

[PATCH 03/13] staging: comedi: pcmuio: tidy up pcmuio_handle_asic_interrupt()

2013-07-24 Thread H Hartley Sweeten
The interrupt subdevice associated with the 'asic' can be easily calculated. Remove the for() loop that searched for it and tidy up the function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmuio.c | 43 +++-

[PATCH 01/13] staging: comedi: pcmuio: fix interrupt requests

2013-07-24 Thread H Hartley Sweeten
Legacy (ISA) interrupts are not sharable so this driver should not be passing the IRQF_SHARED flag when requesting the interrupts. This driver supports two board types: PCM-UIO48 with one asic (one interrupt source) PCM-UIO96 with two asics (two interrupt sources) The PCM-UIO96 has a jumper t

[PATCH 00/13] staging: comedi: pcmuio: additional cleanup

2013-07-24 Thread H Hartley Sweeten
Tidy up the interrupt support and the private data usage. Do a bit of additional cleanup to clarify the driver a bit. H Hartley Sweeten (13): staging: comedi: pcmuio: fix interrupt requests staging: comedi: pcmuio: spinlock pcmuio_{write,read}() staging: comedi: pcmuio: tidy up pcmuio_handle

Re: [PATCH v2 1/2] staging: gdm7240: adding LTE USB driver

2013-07-24 Thread Joe Perches
On Thu, 2013-07-25 at 03:36 +0900, Won Kang wrote: > GCT Semiconductor GDM7240 is 4G LTE chip. > This driver supports GCT reference platform as a USB device. > > Signed-off-by: Won Kang > > staging: gdm7240: added contacts for code maintanance > > Signed-off-by: Won Kang > > staging: gdm7240:

  1   2   >