[PATCH] Drivers: hv: hv_fcopy: fix a race condition for SMP guest
We should schedule the 5s "timer work" before starting the data transfer, otherwise, the data transfer code may finish so fast on another virtual cpu that when the code(fcopy_write()) trying to cancel the 5s "timer work" can occasionally fail because the "timer work" may haven't been scheduled yet and as a result the fcopy process will be aborted wrongly by fcopy_work_func() in 5s. Thank Liz Zhang for the initial investigation on the bug. This addresses https://bugzilla.redhat.com/show_bug.cgi?id=1118123 Tested-by: Liz Zhang Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: sta...@vger.kernel.org Signed-off-by: Dexuan Cui --- drivers/hv/hv_fcopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c index eaaa3d8..23b2ce2 100644 --- a/drivers/hv/hv_fcopy.c +++ b/drivers/hv/hv_fcopy.c @@ -246,8 +246,8 @@ void hv_fcopy_onchannelcallback(void *context) /* * Send the information to the user-level daemon. */ - fcopy_send_data(); schedule_delayed_work(&fcopy_work, 5*HZ); + fcopy_send_data(); return; } icmsghdr->icflags = ICMSGHDRFLAG_TRANSACTION | ICMSGHDRFLAG_RESPONSE; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 46/94] ARM: dts: am335x-evm: Enable the McASP FIFO for audio
On 07/15/2014 08:01 PM, Sam Asadi wrote: > From: Peter Ujfalusi > > The use of FIFO in McASP can reduce the risk of audio under/overrun and > lowers the load on the memories since the DMA will operate in bursts. > > Signed-off-by: Peter Ujfalusi > Signed-off-by: Tony Lindgren > Signed-off-by: sam-the-6 > --- > arch/arm/boot/dts/am335x-evm.dts |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) What is the reason this patch is in this */94 series? What is this series of patches anyways? FWIW the two McASP FIFO enable patch is already in mainline and they should not be backported to older kernels w/o the changes in the mcasp driver in 3.16. > > diff --git a/arch/arm/boot/dts/am335x-evm.dts > b/arch/arm/boot/dts/am335x-evm.dts > index ecb2677..e2156a5 100644 > --- a/arch/arm/boot/dts/am335x-evm.dts > +++ b/arch/arm/boot/dts/am335x-evm.dts > @@ -529,8 +529,8 @@ > serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ > 0 0 1 2 > >; > - tx-num-evt = <1>; > - rx-num-evt = <1>; > + tx-num-evt = <32>; > + rx-num-evt = <32>; > }; > > &tps { > -- Péter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V5 6/6] staging: vt6556: Replace printk by dev_warn
On Tue, Jul 15, 2014 at 10:46:49PM +0200, Peter Senna Tschudin wrote: > This patch fixes a checkpatch warning by replacing printk > by dev_warn. Tested by compilation only. > > Signed-off-by: Peter Senna Tschudin > --- > Changes from V4: > - use dev_warn instead of pr_warn > > drivers/staging/vt6656/main_usb.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/vt6656/main_usb.c > b/drivers/staging/vt6656/main_usb.c > index 7567646..6708e98 100644 > --- a/drivers/staging/vt6656/main_usb.c > +++ b/drivers/staging/vt6656/main_usb.c > @@ -527,7 +527,8 @@ static void usb_device_reset(struct vnt_private *pDevice) > > status = usb_reset_device(pDevice->usb); > if (status) > -printk("usb_device_reset fail status=%d\n",status); > + dev_warn(&pDevice->usb->dev, > + "usb_device_reset fail status=%d\n", status); > } > > static void device_free_int_bufs(struct vnt_private *priv) This doesn't apply to my latest tree, can you please refresh it and resend? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 02/10] staging: unisys: add toolaction to sysfs
On Tue, Jul 15, 2014 at 01:30:42PM -0400, Benjamin Romer wrote: > Move the proc entry for controlling the toolaction field to sysfs. The field > appears in /sys/devices/platform/visorchipset/install/toolaction. > > This field is used to tell s-Par which type of recovery tool action to perform > on the next guest boot-up. The meaning of the value is dependent on the type > of installation software used to commission the guest. > > Signed-off-by: Benjamin Romer > --- > .../unisys/visorchipset/visorchipset_main.c| 157 > - > 1 file changed, 60 insertions(+), 97 deletions(-) All sysfs files need a Documentation/ABI/ entry. As this isn't in the "real" part of the kernel yet, just create the entries in the unisys/ subdir and then when it moves out, we can move them to the "right" place in the tree. Can you redo this patch with that entry? And of course, there are comments below: > --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c > +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c > @@ -150,11 +150,6 @@ static ssize_t proc_read_installer(struct file *file, > char __user *buf, > static ssize_t proc_write_installer(struct file *file, > const char __user *buffer, > size_t count, loff_t *ppos); > -static ssize_t proc_read_toolaction(struct file *file, char __user *buf, > - size_t len, loff_t *offset); > -static ssize_t proc_write_toolaction(struct file *file, > - const char __user *buffer, > - size_t count, loff_t *ppos); > static ssize_t proc_read_bootToTool(struct file *file, char __user *buf, > size_t len, loff_t *offset); > static ssize_t proc_write_bootToTool(struct file *file, > @@ -165,11 +160,6 @@ static const struct file_operations proc_installer_fops > = { > .write = proc_write_installer, > }; > > -static const struct file_operations proc_toolaction_fops = { > - .read = proc_read_toolaction, > - .write = proc_write_toolaction, > -}; > - > static const struct file_operations proc_bootToTool_fops = { > .read = proc_read_bootToTool, > .write = proc_write_bootToTool, > @@ -322,10 +312,36 @@ static VISORCHIPSET_BUSDEV_RESPONDERS BusDev_Responders > = { > /* info for /dev/visorchipset */ > static dev_t MajorDev = -1; /**< indicates major num for device */ > > +/* prototypes for attributes */ > +static ssize_t show_toolaction(struct device *dev, > + struct device_attribute *attr, char *buf); > + > +static ssize_t store_toolaction(struct device *dev, > + struct device_attribute *attr, const char *buf, size_t count); > + > +static DEVICE_ATTR(toolaction, S_IRUSR | S_IWUSR, show_toolaction, > + store_toolaction); > + > +static struct attribute *visorchipset_install_attrs[] = { > + &dev_attr_toolaction.attr, > + NULL > +}; > + > +static struct attribute_group visorchipset_install_group = { > + .name = "install", > + .attrs = visorchipset_install_attrs > +}; > + > +static const struct attribute_group *visorchipset_dev_groups[] = { > + &visorchipset_install_group, > + NULL > +}; > + > /* /sys/devices/platform/visorchipset */ > static struct platform_device Visorchipset_platform_device = { > .name = "visorchipset", > .id = -1, > + .dev.groups = visorchipset_dev_groups, > }; Why is this a platform device in the first place? Isn't it a "real" device in the system on some type of "bus"? > /* Function prototypes */ > @@ -337,6 +353,40 @@ static void > controlvm_respond_physdev_changestate(CONTROLVM_MESSAGE_HEADER * > msgHdr, int response, > ULTRA_SEGMENT_STATE state); > > +ssize_t show_toolaction(struct device *dev, struct device_attribute *attr, > + char *buf) > +{ > + if (ControlVm_channel) { How can this not be true? I tried to follow the code here, but it's horrid, why is this assigned in a work queue and not when the module starts up? > + U8 toolAction; > + > + visorchannel_read(ControlVm_channel, > + offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, > +ToolAction), &toolAction, sizeof(U8)); > + return scnprintf(buf, PAGE_SIZE, "%u\n", toolAction); > + } else > + return -ENODEV; > +} Why would this sysfs file be created if there is not a device? That's not how sysfs files work, it should only be present if the file has a value, and if not, it shouldn't be there. Same goes for your other sysfs files in this patchset, you should never be return -ENODEV, you just shouldn't have created the file in the first place. That makes your kernel code simpler, and hopefully, your userspace code easier too. thanks, greg k-h _
Re: [PATCH] staging: emxx_udc: Fix coding style errors
Hi Greg, On Tue, Jul 15, 2014 at 07:21:28PM -0700, Greg Kroah-Hartman wrote: > On Wed, Jul 16, 2014 at 09:16:15AM +0800, Stone Kang wrote: > > Only fixing errors reported by checkpatch.pl, based on the following > > rules: > > 1. '*' should be adjacent to the data name or function name. > > 2. Don't use C99-style "// ..." comments. > > > > Signed-off-by: KANG Yuxuan > > I see two different names here, one in the "From:" line, and one in the > Signed-off-by: line, are they the same? They need to match up :( > > Please resend with this fixed. > > thanks, > > greg k-h Sorry, I forgot to set the From: line. New patch has been sent, but as the content didn't change, no 'v2' tag was attached in the title. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: emxx_udc: Fix coding style errors
Only fixing errors reported by checkpatch.pl, based on the following rules: 1. '*' should be adjacent to the data name or function name. 2. Don't use C99-style "// ..." comments. Signed-off-by: KANG Yuxuan --- drivers/staging/emxx_udc/emxx_udc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 0003463..b2eaf01 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c @@ -562,12 +562,12 @@ static void _nbu2ss_dma_unmap_single( /*-*/ /* Endpoint 0 OUT Transfer (PIO) */ -static int EP0_out_PIO(struct nbu2ss_udc *udc, u8* pBuf, u32 length) +static int EP0_out_PIO(struct nbu2ss_udc *udc, u8 *pBuf, u32 length) { u32 i; int nret = 0; u32 iWordLength = 0; - USB_REG_ACCESS* pBuf32 = (USB_REG_ACCESS *)pBuf; + USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf; /**/ /* Read Length */ @@ -588,12 +588,12 @@ static int EP0_out_PIO(struct nbu2ss_udc *udc, u8* pBuf, u32 length) /*-*/ /* Endpoint 0 OUT Transfer (PIO, OverBytes) */ -static int EP0_out_OverBytes(struct nbu2ss_udc *udc, u8* pBuf, u32 length) +static int EP0_out_OverBytes(struct nbu2ss_udc *udc, u8 *pBuf, u32 length) { u32 i; u32 iReadSize = 0; USB_REG_ACCESS Temp32; - USB_REG_ACCESS* pBuf32 = (USB_REG_ACCESS *)pBuf; + USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf; if ((0 < length) && (length < sizeof(u32))) { Temp32.dw = _nbu2ss_readl(&udc->p_regs->EP0_READ); @@ -613,7 +613,7 @@ static int EP0_in_PIO(struct nbu2ss_udc *udc, u8 *pBuf, u32 length) u32 iMaxLength = EP0_PACKETSIZE; u32 iWordLength = 0; u32 iWriteLength = 0; - USB_REG_ACCESS* pBuf32 = (USB_REG_ACCESS *)pBuf; + USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf; /**/ /* Transfer Length */ @@ -639,7 +639,7 @@ static int EP0_in_OverBytes(struct nbu2ss_udc *udc, u8 *pBuf, u32 iRemainSize) { u32 i; USB_REG_ACCESS Temp32; - USB_REG_ACCESS* pBuf32 = (USB_REG_ACCESS *)pBuf; + USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf; if ((0 < iRemainSize) && (iRemainSize < sizeof(u32))) { for (i = 0 ; i < iRemainSize ; i++) @@ -3339,7 +3339,7 @@ static int __init nbu2ss_drv_contest_init( udc->gadget.ep0 = &udc->ep[0].ep; udc->gadget.speed = USB_SPEED_UNKNOWN; udc->gadget.name = driver_name; - //udc->gadget.is_dualspeed = 1; + /* udc->gadget.is_dualspeed = 1; */ device_initialize(&udc->gadget.dev); -- 2.0.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: emxx_udc: Fix coding style errors
On Wed, Jul 16, 2014 at 09:16:15AM +0800, Stone Kang wrote: > Only fixing errors reported by checkpatch.pl, based on the following > rules: > 1. '*' should be adjacent to the data name or function name. > 2. Don't use C99-style "// ..." comments. > > Signed-off-by: KANG Yuxuan I see two different names here, one in the "From:" line, and one in the Signed-off-by: line, are they the same? They need to match up :( Please resend with this fixed. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: emxx_udc: Fix coding style errors
Only fixing errors reported by checkpatch.pl, based on the following rules: 1. '*' should be adjacent to the data name or function name. 2. Don't use C99-style "// ..." comments. Signed-off-by: KANG Yuxuan --- drivers/staging/emxx_udc/emxx_udc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 0003463..b2eaf01 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c @@ -562,12 +562,12 @@ static void _nbu2ss_dma_unmap_single( /*-*/ /* Endpoint 0 OUT Transfer (PIO) */ -static int EP0_out_PIO(struct nbu2ss_udc *udc, u8* pBuf, u32 length) +static int EP0_out_PIO(struct nbu2ss_udc *udc, u8 *pBuf, u32 length) { u32 i; int nret = 0; u32 iWordLength = 0; - USB_REG_ACCESS* pBuf32 = (USB_REG_ACCESS *)pBuf; + USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf; /**/ /* Read Length */ @@ -588,12 +588,12 @@ static int EP0_out_PIO(struct nbu2ss_udc *udc, u8* pBuf, u32 length) /*-*/ /* Endpoint 0 OUT Transfer (PIO, OverBytes) */ -static int EP0_out_OverBytes(struct nbu2ss_udc *udc, u8* pBuf, u32 length) +static int EP0_out_OverBytes(struct nbu2ss_udc *udc, u8 *pBuf, u32 length) { u32 i; u32 iReadSize = 0; USB_REG_ACCESS Temp32; - USB_REG_ACCESS* pBuf32 = (USB_REG_ACCESS *)pBuf; + USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf; if ((0 < length) && (length < sizeof(u32))) { Temp32.dw = _nbu2ss_readl(&udc->p_regs->EP0_READ); @@ -613,7 +613,7 @@ static int EP0_in_PIO(struct nbu2ss_udc *udc, u8 *pBuf, u32 length) u32 iMaxLength = EP0_PACKETSIZE; u32 iWordLength = 0; u32 iWriteLength = 0; - USB_REG_ACCESS* pBuf32 = (USB_REG_ACCESS *)pBuf; + USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf; /**/ /* Transfer Length */ @@ -639,7 +639,7 @@ static int EP0_in_OverBytes(struct nbu2ss_udc *udc, u8 *pBuf, u32 iRemainSize) { u32 i; USB_REG_ACCESS Temp32; - USB_REG_ACCESS* pBuf32 = (USB_REG_ACCESS *)pBuf; + USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf; if ((0 < iRemainSize) && (iRemainSize < sizeof(u32))) { for (i = 0 ; i < iRemainSize ; i++) @@ -3339,7 +3339,7 @@ static int __init nbu2ss_drv_contest_init( udc->gadget.ep0 = &udc->ep[0].ep; udc->gadget.speed = USB_SPEED_UNKNOWN; udc->gadget.name = driver_name; - //udc->gadget.is_dualspeed = 1; + /* udc->gadget.is_dualspeed = 1; */ device_initialize(&udc->gadget.dev); -- 2.0.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS
On Tue, Jul 15, 2014 at 10:05:30AM -0700, Greg KH wrote: > On Tue, Jul 15, 2014 at 07:53:07PM +0300, Sam Asadi wrote: > > From: Simon Horman > > > > There are a number of DT and defconfig files which > > are maintained as part of shmobile but have not been > > listed as such in the MAINTAINERS file. This creates > > confusion from time to time. > > > > Signed-off-by: Simon Horman > > Signed-off-by: sam-the-6 > > Really? We need a "real" name here. > > And why are you passing on Simon's patches, why would I care about this > patch to the MAINTAINERS file? > > confused, I'm also a little confused as this same patch is sitting in my tree and has been queued up for v3.17 by in the arm-soc tree. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V4 4/6] staging: vt6556: Remove typedefs
On Tue, Jul 15, 2014 at 10:05:54PM +0200, Peter Senna Tschudin wrote: > On Tue, Jul 15, 2014 at 5:06 PM, Greg KH wrote: > > On Mon, Jul 14, 2014 at 09:15:31PM +0200, Peter Senna Tschudin wrote: > >> This patch removes uneeded typedefs reported by chackpatch and removes > >> one enum. The removed enum from card.h: > >> > >> typedef enum _CARD_PHY_TYPE { > >> PHY_TYPE_AUTO = 0, > >> PHY_TYPE_11B, > >> PHY_TYPE_11G, > >> PHY_TYPE_11A > >> } CARD_PHY_TYPE, *PCARD_PHY_TYPE; > > > > Why did you remove this? > Unlike the other two enums this patch change, this one is not in use. > As checkpatch complained about the typedef and it is not currently in > use, I removed it. Then say that, we want to know _why_ you do something, not _what_ you do, as it's obvious from the code as to _what_ happens. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 6/8 V2] staging: dgap: remove unneeded dgap_err()
On Wed, Jul 16, 2014 at 08:21:30AM +0900, DaeSeok Youn wrote: > Hi, > > 2014-07-16 0:29 GMT+09:00 Greg KH : > > On Tue, Jul 15, 2014 at 06:11:44PM +0900, Daeseok Youn wrote: > >> The dgap_err() is printing a message with pr_err(), > >> so all those are replaced. > >> > >> Use definition "pr_fmt" and then all of "dgap:" in > >> the beginning of print messages are removed. > >> > >> And also removed "out of memory" message because > >> the kernel has own message for that. > >> > >> Signed-off-by: Daeseok Youn > >> --- > >> V2: use pr_fmt "dgap:" prefix on print message on dgap. > >> remove "out of memory" message. > >> > >> Adds Mark to TO list and CC list for checking send > >> this email properly to him. > >> > >> drivers/staging/dgap/dgap.c | 306 > >> +++ > >> 1 files changed, 133 insertions(+), 173 deletions(-) > >> > >> diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c > >> index 06c55cb..9e750fb 100644 > >> --- a/drivers/staging/dgap/dgap.c > >> +++ b/drivers/staging/dgap/dgap.c > >> @@ -41,6 +41,8 @@ > >> */ > >> #undef DIGI_CONCENTRATORS_SUPPORTED > >> > >> +#define pr_fmt(fmt) "dgap: " fmt > >> + > >> #include > >> #include > >> #include > >> @@ -153,7 +155,6 @@ static void dgap_firmware_reset_port(struct channel_t > >> *ch); > >> static int dgap_gettok(char **in); > >> static char *dgap_getword(char **in); > >> static int dgap_checknode(struct cnode *p); > >> -static void dgap_err(char *s); > >> > >> /* > >> * Function prototypes from dgap_sysfs.h > >> @@ -815,7 +816,7 @@ static struct board_t *dgap_found_board(struct pci_dev > >> *pdev, int id, > >> if (ret) > >> goto free_brd; > >> > >> - pr_info("dgap: board %d: %s (rev %d), irq %ld\n", > >> + pr_info("board %d: %s (rev %d), irq %ld\n", > >> boardnum, brd->name, brd->rev, brd->irq); > > > > Almost all of the pr_*() calls in this driver should be converted over > > to use dev_*() calls instead. And some of them, like this one, should > > be removed entirely (no need for a driver to be "noisy" when a device > > for it is found, it should be quiet if at all possible, unless something > > went wrong.) > > > > So can you do that here instead? I've applied the earlier patches in > > this series, and stopped here. > OK. I can. pr_*() calls are replaced with dev_*() calls. > And also removes some of print message which are useless like "out > of memory" Yes, please do that, that would be great. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] ARM: OMAP2+: remove DSP platform device
It was added to support DSP Bridge. Since DSP Bridge was removed, and nothing else is using the platform device, remove it too. Signed-off-by: Kristina Martšenko Cc: Omar Ramirez Luna Cc: Suman Anna Cc: Felipe Contreras --- arch/arm/mach-omap2/Makefile | 4 - arch/arm/mach-omap2/common.c | 2 - arch/arm/mach-omap2/dsp.c | 134 - include/linux/platform_data/dsp-omap.h | 34 - 4 files changed, 174 deletions(-) delete mode 100644 arch/arm/mach-omap2/dsp.c delete mode 100644 include/linux/platform_data/dsp-omap.h diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 8ca99e9..fa78000 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -232,10 +232,6 @@ obj-$(CONFIG_HW_PERF_EVENTS) += pmu.o iommu-$(CONFIG_OMAP_IOMMU) := omap-iommu.o obj-y += $(iommu-m) $(iommu-y) -ifneq ($(CONFIG_TIDSPBRIDGE),) -obj-y += dsp.o -endif - # OMAP2420 MSDI controller integration support ("MMC") obj-$(CONFIG_SOC_OMAP2420) += msdi.o diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c index 2dabb9e..484cdad 100644 --- a/arch/arm/mach-omap2/common.c +++ b/arch/arm/mach-omap2/common.c @@ -14,7 +14,6 @@ */ #include #include -#include #include "common.h" #include "omap-secure.h" @@ -30,7 +29,6 @@ int __weak omap_secure_ram_reserve_memblock(void) void __init omap_reserve(void) { - omap_dsp_reserve_sdram_memblock(); omap_secure_ram_reserve_memblock(); omap_barrier_reserve_memblock(); } diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c deleted file mode 100644 index f7492df..000 --- a/arch/arm/mach-omap2/dsp.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * TI's OMAP DSP platform device registration - * - * Copyright (C) 2005-2006 Texas Instruments, Inc. - * Copyright (C) 2009 Nokia Corporation - * - * Written by Hiroshi DOYU - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -/* - * XXX The function pointers to the PRM/CM functions are incorrect and - * should be removed. No device driver should be changing PRM/CM bits - * directly; that's a layering violation -- those bits are the responsibility - * of the OMAP PM core code. - */ - -#include -#include - -#include - -#include "control.h" -#include "cm2xxx_3xxx.h" -#include "prm2xxx_3xxx.h" -#ifdef CONFIG_TIDSPBRIDGE_DVFS -#include "omap-pm.h" -#endif -#include "soc.h" - -#include - -static struct platform_device *omap_dsp_pdev; - -static struct omap_dsp_platform_data omap_dsp_pdata __initdata = { -#ifdef CONFIG_TIDSPBRIDGE_DVFS - .dsp_set_min_opp = omap_pm_dsp_set_min_opp, - .dsp_get_opp = omap_pm_dsp_get_opp, - .cpu_set_freq = omap_pm_cpu_set_freq, - .cpu_get_freq = omap_pm_cpu_get_freq, -#endif - .dsp_prm_read = omap2_prm_read_mod_reg, - .dsp_prm_write = omap2_prm_write_mod_reg, - .dsp_prm_rmw_bits = omap2_prm_rmw_mod_reg_bits, - .dsp_cm_read = omap2_cm_read_mod_reg, - .dsp_cm_write = omap2_cm_write_mod_reg, - .dsp_cm_rmw_bits = omap2_cm_rmw_mod_reg_bits, - - .set_bootaddr = omap_ctrl_write_dsp_boot_addr, - .set_bootmode = omap_ctrl_write_dsp_boot_mode, -}; - -static phys_addr_t omap_dsp_phys_mempool_base; - -void __init omap_dsp_reserve_sdram_memblock(void) -{ - phys_addr_t size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE; - phys_addr_t paddr; - - if (!cpu_is_omap34xx()) - return; - - if (!size) - return; - - paddr = arm_memblock_steal(size, SZ_1M); - if (!paddr) { - pr_err("%s: failed to reserve %llx bytes\n", - __func__, (unsigned long long)size); - return; - } - - omap_dsp_phys_mempool_base = paddr; -} - -static phys_addr_t omap_dsp_get_mempool_base(void) -{ - return omap_dsp_phys_mempool_base; -} - -static int __init omap_dsp_init(void) -{ - struct platform_device *pdev; - int err = -ENOMEM; - struct omap_dsp_platform_data *pdata = &omap_dsp_pdata; - - if (!cpu_is_omap34xx()) - return 0; - - pdata->phys_mempool_base = omap_dsp_get_mempool_base(); - - if (pdata->phys_mempool_base) { - pdata->phys_mempool_size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE; - pr_info("%s: %llx bytes @ %llx\n", __func__, - (unsigned long long)pdata->phys_mempool_size, - (unsigned long long)pdata->phys_mempool_base); - } - - pdev = platform_device_alloc("omap-dsp", -1); - if (!pdev) - goto err_out; - - err = platform_device_add_data(pdev, pdata, sizeof(*pdata)); - if (err) -
Re: [PATCH 6/8 V2] staging: dgap: remove unneeded dgap_err()
Hi, 2014-07-16 0:29 GMT+09:00 Greg KH : > On Tue, Jul 15, 2014 at 06:11:44PM +0900, Daeseok Youn wrote: >> The dgap_err() is printing a message with pr_err(), >> so all those are replaced. >> >> Use definition "pr_fmt" and then all of "dgap:" in >> the beginning of print messages are removed. >> >> And also removed "out of memory" message because >> the kernel has own message for that. >> >> Signed-off-by: Daeseok Youn >> --- >> V2: use pr_fmt "dgap:" prefix on print message on dgap. >> remove "out of memory" message. >> >> Adds Mark to TO list and CC list for checking send >> this email properly to him. >> >> drivers/staging/dgap/dgap.c | 306 >> +++ >> 1 files changed, 133 insertions(+), 173 deletions(-) >> >> diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c >> index 06c55cb..9e750fb 100644 >> --- a/drivers/staging/dgap/dgap.c >> +++ b/drivers/staging/dgap/dgap.c >> @@ -41,6 +41,8 @@ >> */ >> #undef DIGI_CONCENTRATORS_SUPPORTED >> >> +#define pr_fmt(fmt) "dgap: " fmt >> + >> #include >> #include >> #include >> @@ -153,7 +155,6 @@ static void dgap_firmware_reset_port(struct channel_t >> *ch); >> static int dgap_gettok(char **in); >> static char *dgap_getword(char **in); >> static int dgap_checknode(struct cnode *p); >> -static void dgap_err(char *s); >> >> /* >> * Function prototypes from dgap_sysfs.h >> @@ -815,7 +816,7 @@ static struct board_t *dgap_found_board(struct pci_dev >> *pdev, int id, >> if (ret) >> goto free_brd; >> >> - pr_info("dgap: board %d: %s (rev %d), irq %ld\n", >> + pr_info("board %d: %s (rev %d), irq %ld\n", >> boardnum, brd->name, brd->rev, brd->irq); > > Almost all of the pr_*() calls in this driver should be converted over > to use dev_*() calls instead. And some of them, like this one, should > be removed entirely (no need for a driver to be "noisy" when a device > for it is found, it should be quiet if at all possible, unless something > went wrong.) > > So can you do that here instead? I've applied the earlier patches in > this series, and stopped here. OK. I can. pr_*() calls are replaced with dev_*() calls. And also removes some of print message which are useless like "out of memory" Thanks. regards, Daeseok Youn > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V5 3/4] staging: vt6556: Cleanup coding style: lines over 80 chars
This patch cleanup the follwoing coding style issues: - line over 80 chars - spaces on the beginning of a line - put { and } on the correct places Tested by compilation only. Signed-off-by: Peter Senna Tschudin --- Changes from V4: - Splitted [PATCH V4 1/6] in 4 smaller patches drivers/staging/vt6656/baseband.c | 8 +--- drivers/staging/vt6656/card.c | 9 + drivers/staging/vt6656/main_usb.c | 5 +++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index 7adc8db..8678b41 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -123,8 +123,9 @@ static u8 vnt_vt3184_vt3226d0[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* 0xff */ }; -static const u16 awcFrameTime[MAX_RATE] = -{10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216}; +static const u16 awcFrameTime[MAX_RATE] = { + 10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216 +}; /* * Description: Calculate data frame transmitting time @@ -468,7 +469,8 @@ int BBbVT3184Init(struct vnt_private *priv) priv->ldBmThreshold[2] = 0; priv->ldBmThreshold[3] = 0; /* Fix VT3226 DFC system timing issue */ - vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2, SOFTPWRCTL_RFLEOPT); + vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2, + SOFTPWRCTL_RFLEOPT); } else { return true; } diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 6a6e614..37cd96b 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -58,8 +58,9 @@ /* const u16 cwRXBCNTSFOff[MAX_RATE] = {17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; */ -static const u16 cwRXBCNTSFOff[MAX_RATE] = -{192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3}; +static const u16 cwRXBCNTSFOff[MAX_RATE] = { + 192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3 +}; /* * Description: Set NIC media channel @@ -477,7 +478,7 @@ void vnt_update_top_rates(struct vnt_private *priv) } priv->byTopCCKBasicRate = top_cck; - } +} int vnt_ofdm_min_rate(struct vnt_private *priv) { @@ -710,7 +711,7 @@ void vnt_update_next_tbtt(struct vnt_private *priv, u64 tsf, data[7] = (u8)(tsf >> 56); vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT, - MESSAGE_REQUEST_TBTT, 0, 8, data); + MESSAGE_REQUEST_TBTT, 0, 8, data); dev_dbg(&priv->usb->dev, "%s TBTT: %8llx\n", __func__, tsf); diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 95a87ef..d103df1 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -526,8 +526,9 @@ static void device_free_rx_bufs(struct vnt_private *priv) static void usb_device_reset(struct vnt_private *pDevice) { - int status; - status = usb_reset_device(pDevice->usb); + int status; + + status = usb_reset_device(pDevice->usb); if (status) printk("usb_device_reset fail status=%d\n",status); return ; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V5 4/4] staging: vt6556: Cleanup coding style: indentation
This patch cleanup the follwoing coding style issues: - indentation style - new line after declaration Tested by compilation only. Signed-off-by: Peter Senna Tschudin --- Changes from V4: - Splitted [PATCH V4 1/6] in 4 smaller patches drivers/staging/vt6656/main_usb.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index d103df1..ba5c8a9 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -62,7 +62,7 @@ #include "int.h" /* static int msglevel = MSG_LEVEL_DEBUG; */ -static int msglevel=MSG_LEVEL_INFO; +static int msglevel = MSG_LEVEL_INFO; /* * define module options @@ -177,13 +177,12 @@ static struct usb_device_id vt6656_table[] = { /* frequency list (map channels to frequencies) */ /* static const long frequency_list[] = { -2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 2484, -4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980, -5035, 5040, 5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 5230, 5240, -5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 5660, 5680, -5700, 5745, 5765, 5785, 5805, 5825 - }; - + 2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, + 2472, 2484, 4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980, 5035, 5040, + 5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 5230, 5240, + 5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, + 5660, 5680, 5700, 5745, 5765, 5785, 5805, 5825 +}; */ static int vt6656_probe(struct usb_interface *intf, @@ -206,16 +205,16 @@ static void usb_device_reset(struct vnt_private *pDevice); static void device_set_options(struct vnt_private *pDevice) { -pDevice->cbTD = TX_DESC_DEF0; -pDevice->cbRD = RX_DESC_DEF0; -pDevice->byShortRetryLimit = SHORT_RETRY_DEF; -pDevice->byLongRetryLimit = LONG_RETRY_DEF; -pDevice->op_mode = NL80211_IFTYPE_UNSPECIFIED; -pDevice->byBBType = BBP_TYPE_DEF; -pDevice->byPacketType = pDevice->byBBType; -pDevice->byAutoFBCtrl = AUTO_FB_0; -pDevice->byPreambleType = 0; -pDevice->bExistSWNetAddr = false; + pDevice->cbTD = TX_DESC_DEF0; + pDevice->cbRD = RX_DESC_DEF0; + pDevice->byShortRetryLimit = SHORT_RETRY_DEF; + pDevice->byLongRetryLimit = LONG_RETRY_DEF; + pDevice->op_mode = NL80211_IFTYPE_UNSPECIFIED; + pDevice->byBBType = BBP_TYPE_DEF; + pDevice->byPacketType = pDevice->byBBType; + pDevice->byAutoFBCtrl = AUTO_FB_0; + pDevice->byPreambleType = 0; + pDevice->bExistSWNetAddr = false; } /* @@ -837,6 +836,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, u32 changed) { struct vnt_private *priv = hw->priv; + priv->current_aid = conf->aid; if (changed & BSS_CHANGED_BSSID) -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V5 2/4] staging: vt6556: Cleanup coding style: comments
This patch cleanup coding style issues on comments. Tested by compilation only. Signed-off-by: Peter Senna Tschudin --- Changes from V4: - Splitted [PATCH V4 1/6] in 4 smaller patches drivers/staging/vt6656/baseband.c | 15 --- drivers/staging/vt6656/card.c | 4 ++-- drivers/staging/vt6656/channel.c | 5 +++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index c1675d5..7adc8db 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -26,9 +26,10 @@ * Date: Jun. 5, 2002 * * Functions: - * vnt_get_frame_time- Calculate data frame transmitting time - * vnt_get_phy_field - Calculate PhyLength, PhyService and Phy Signal parameter for baseband Tx - * BBbVT3184Init - VIA VT3184 baseband chip init code + * vnt_get_frame_time - Calculate data frame transmitting time + * vnt_get_phy_field - Calculate PhyLength, PhyService and Phy + * Signal parameter for baseband Tx + * BBbVT3184Init - VIA VT3184 baseband chip init code * * Revision History: * @@ -86,7 +87,7 @@ static u8 vnt_vt3184_al2230[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* 0xff */ }; -//{{RobertYu:20060515, new BB setting for VT3226D0 +/* {{RobertYu:20060515, new BB setting for VT3226D0 */ static u8 vnt_vt3184_vt3226d0[] = { 0x31, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x70, 0x45, 0x2a, 0x76, 0x00, 0x00, 0x80, 0x00, /* 0x0f */ @@ -191,9 +192,9 @@ unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type, * tx_rate - Tx Rate * Out: * struct vnt_phy_field *phy - * - pointer to Phy Length field - * - pointer to Phy Service field - * - pointer to Phy Signal field + * - pointer to Phy Length field + * - pointer to Phy Service field + * - pointer to Phy Signal field * * Return Value: none * diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index ea06b63..6a6e614 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -55,8 +55,8 @@ #include "key.h" #include "usbpipe.h" -//const u16 cwRXBCNTSFOff[MAX_RATE] = -//{17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; +/* const u16 cwRXBCNTSFOff[MAX_RATE] = + {17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; */ static const u16 cwRXBCNTSFOff[MAX_RATE] = {192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3}; diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c index fb1838e..4a53f1a 100644 --- a/drivers/staging/vt6656/channel.c +++ b/drivers/staging/vt6656/channel.c @@ -28,8 +28,9 @@ * * * Revision History: - * 01-18-2005 RobertYu: remove the for loop searching in ChannelValid, - * change ChannelRuleTab to lookup-type, reorder table items. + * 01-18-2005 RobertYu: remove the for loop searching in + * ChannelValid, change ChannelRuleTab + * to lookup-type, reorder table items. * * */ -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V5 1/4] staging: vt6556: Cleanup coding style: #define
This patch cleanup coding style issues on #defines. Tested by compilation only. Signed-off-by: Peter Senna Tschudin --- Changes from V4: - Splitted [PATCH V4 1/6] in 4 smaller patches drivers/staging/vt6656/card.h | 6 +++--- drivers/staging/vt6656/device.h | 10 +- drivers/staging/vt6656/main_usb.c | 18 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h index 5b7cc5a..80fcd53 100644 --- a/drivers/staging/vt6656/card.h +++ b/drivers/staging/vt6656/card.h @@ -39,9 +39,9 @@ typedef enum _CARD_PHY_TYPE { PHY_TYPE_11A } CARD_PHY_TYPE, *PCARD_PHY_TYPE; -#define CB_MAX_CHANNEL_24G 14 -#define CB_MAX_CHANNEL_5G 42 /* add channel9(5045MHz), 41==>42 */ -#define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G+CB_MAX_CHANNEL_5G) +#define CB_MAX_CHANNEL_24G 14 +#define CB_MAX_CHANNEL_5G 42 /* add channel9(5045MHz), 41==>42 */ +#define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G + CB_MAX_CHANNEL_5G) struct vnt_private; diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index 436f109..b7b3131 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -441,11 +441,11 @@ struct vnt_private { struct ieee80211_low_level_stats low_stats; }; -#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) { \ -if ((uVar) >= ((uModulo) - 1)) \ -(uVar) = 0; \ -else\ -(uVar)++; \ +#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) { \ + if ((uVar) >= ((uModulo) - 1)) \ + (uVar) = 0; \ + else\ + (uVar)++; \ } #define fMP_DISCONNECTED0x0002 diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index dffd0c7..95a87ef 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -75,18 +75,18 @@ MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION(DEVICE_FULL_DRV_NAM); -#define DEVICE_PARAM(N,D) \ -static int N[MAX_UINTS]=OPTION_DEFAULT;\ -module_param_array(N, int, NULL, 0);\ -MODULE_PARM_DESC(N, D); +#define DEVICE_PARAM(N, D) \ + static int N[MAX_UINTS] = OPTION_DEFAULT; \ + module_param_array(N, int, NULL, 0);\ + MODULE_PARM_DESC(N, D) -#define RX_DESC_DEF0 64 -DEVICE_PARAM(RxDescriptors0,"Number of receive usb desc buffer"); +#define RX_DESC_DEF0 64 +DEVICE_PARAM(RxDescriptors0, "Number of receive usb desc buffer"); -#define TX_DESC_DEF0 64 -DEVICE_PARAM(TxDescriptors0,"Number of transmit usb desc buffer"); +#define TX_DESC_DEF0 64 +DEVICE_PARAM(TxDescriptors0, "Number of transmit usb desc buffer"); -#define CHANNEL_DEF 6 +#define CHANNEL_DEF 6 DEVICE_PARAM(Channel, "Channel number"); /* PreambleType[] is the preamble length used for transmit. -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V5 6/6] staging: vt6556: Replace printk by dev_warn
This patch fixes a checkpatch warning by replacing printk by dev_warn. Tested by compilation only. Signed-off-by: Peter Senna Tschudin --- Changes from V4: - use dev_warn instead of pr_warn drivers/staging/vt6656/main_usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 7567646..6708e98 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -527,7 +527,8 @@ static void usb_device_reset(struct vnt_private *pDevice) status = usb_reset_device(pDevice->usb); if (status) -printk("usb_device_reset fail status=%d\n",status); + dev_warn(&pDevice->usb->dev, +"usb_device_reset fail status=%d\n", status); } static void device_free_int_bufs(struct vnt_private *priv) -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V5 5/6] staging: vt6556: Cleanup indentation on statements
Use tabs instead of spaces in a set of statements and fix lines over 80 chars. Reported by checkpatch. Tested by compilation only. Signed-off-by: Peter Senna Tschudin --- Cahnges from V4: - Fix identation issue found on V4 drivers/staging/vt6656/main_usb.c | 44 --- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 553a8e9..cc0281a 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -382,38 +382,40 @@ static int device_init_registers(struct vnt_private *pDevice) /* load vt3266 calibration parameters in EEPROM */ if (pDevice->byRFType == RF_VT3226D0) { if ((pDevice->abyEEPROM[EEP_OFS_MAJOR_VER] == 0x1) && - (pDevice->abyEEPROM[EEP_OFS_MINOR_VER] >= 0x4)) { + (pDevice->abyEEPROM[EEP_OFS_MINOR_VER] >= 0x4)) { byCalibTXIQ = pDevice->abyEEPROM[EEP_OFS_CALIB_TX_IQ]; byCalibTXDC = pDevice->abyEEPROM[EEP_OFS_CALIB_TX_DC]; byCalibRXIQ = pDevice->abyEEPROM[EEP_OFS_CALIB_RX_IQ]; if (byCalibTXIQ || byCalibTXDC || byCalibRXIQ) { - /* CR255, enable TX/RX IQ and DC compensation mode */ + /* CR255, enable TX/RX IQ and + DC compensation mode */ vnt_control_out_u8(pDevice, - MESSAGE_REQUEST_BBREG, - 0xff, - 0x03); - /* CR251, TX I/Q Imbalance Calibration */ + MESSAGE_REQUEST_BBREG, + 0xff, + 0x03); + /* CR251, TX I/Q Imbalance Calibration */ vnt_control_out_u8(pDevice, - MESSAGE_REQUEST_BBREG, - 0xfb, - byCalibTXIQ); - /* CR252, TX DC-Offset Calibration */ + MESSAGE_REQUEST_BBREG, + 0xfb, + byCalibTXIQ); + /* CR252, TX DC-Offset Calibration */ vnt_control_out_u8(pDevice, - MESSAGE_REQUEST_BBREG, - 0xfC, - byCalibTXDC); - /* CR253, RX I/Q Imbalance Calibration */ + MESSAGE_REQUEST_BBREG, + 0xfC, + byCalibTXDC); + /* CR253, RX I/Q Imbalance Calibration */ vnt_control_out_u8(pDevice, - MESSAGE_REQUEST_BBREG, - 0xfd, - byCalibRXIQ); + MESSAGE_REQUEST_BBREG, + 0xfd, + byCalibRXIQ); } else { - /* CR255, turn off BB Calibration compensation */ + /* CR255, turn off + BB Calibration compensation */ vnt_control_out_u8(pDevice, - MESSAGE_REQUEST_BBREG, - 0xff, - 0x0); + MESSAGE_REQUEST_BBREG, + 0xff, + 0x0); } } } -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V4 4/6] staging: vt6556: Remove typedefs
On Tue, Jul 15, 2014 at 5:06 PM, Greg KH wrote: > On Mon, Jul 14, 2014 at 09:15:31PM +0200, Peter Senna Tschudin wrote: >> This patch removes uneeded typedefs reported by chackpatch and removes >> one enum. The removed enum from card.h: >> >> typedef enum _CARD_PHY_TYPE { >> PHY_TYPE_AUTO = 0, >> PHY_TYPE_11B, >> PHY_TYPE_11G, >> PHY_TYPE_11A >> } CARD_PHY_TYPE, *PCARD_PHY_TYPE; > > Why did you remove this? Unlike the other two enums this patch change, this one is not in use. As checkpatch complained about the typedef and it is not currently in use, I removed it. > -- Peter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: rtl8821ae: patch for mac80211 regulatory changes
On 07/15, Kevin Folz wrote: > Hello, > > > > I noticed you two have worked on the staging rtl8821ae driver. > > > > I wrote to the mailing list last month, but have yet to receive a > response. > > http://permalink.gmane.org/gmane.linux.kernel.wireless.general/125235 > > > > > I downloaded the latest linux kernel, 3.16.0rc2+, and created a patch > (attached) based on changes to rtl8192ee > > mac80211 had a change to regulatory defines, so I ported the changes to > your driver. > > > > rtl8821ae driver now successfully initializes on boot. > > > > I've never submitted to the Linux kernel before, I hope you can apply > this patch. > > > > Thanks, > Kevin Folz > Hello Kevin, first of all thanks for your submission and the changes that you have made. Now, since I'm not the right person to recieve such patches I'm going to use this opportunity and show you how you can do better. You can learn how to send patches by reading Documentation/SendPatches document. This is good place to start because it covers everything that is needed to make a successfull submission. In short you should send your patch inlined in the mail body to the mantainer of the staging subsystem and the 'driver devel' mailing list. Yes, you can include developer such as me that have contributed to the portion of kernel that you are working on however the important thing is to include the mantainers and the mailing list. This is because each patch before it is accepted is reviewed by multiple people and changed according to their comments. This is how the Linux kernel development is taking place. Before you send your patch make sure that your changes are compliant with the coding standard that the Linux kernel developers are following. You can learn it by reading Documentation/CodingStyle document and check for issues in your patches by using scripts/checkpatch.pl script. When your patch is good and contains no coding style issues you can use the scripts/get_mantainer.pl script to list the people and mailing lists that are interested in seeing changes to this code area. The last thing that you should do is to send it. When you work witch patches the easiest thing is to use git for it. Just read about the git send-email command. I know that it is a bit of reading however I assure you that the whole process despite of being precisely documented is not difficult at all. I suggest that you learn the process, send your patch again now in the proper manner and we will take it from there. Good Luck PS: I forward this message to the driver devel mailing list where the other people might help you too. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8192ee: Fix setting highest n rate
On Mon, Jul 14, 2014 at 10:56:32PM -0500, Larry Finger wrote: > Commit 4fb6a37c3f94c1cb4b828bfcc4347771e1628f88 by Andrey Utkin > and entitled "staging: rtl8192ee: > "Correct bitmask in comparsion" fixed what appeared to be a typo. After > consultation with the Realtek engineers, merely testing for a 2T2R device > is sufficient to ensure that the TX MCS map will equal 0x0c, thus the second > test can be ignored. > > Signed-off-by: Larry Finger > --- > drivers/staging/rtl8192ee/base.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8192ee/base.c > b/drivers/staging/rtl8192ee/base.c > index 71ed12e..b8b897a 100644 > --- a/drivers/staging/rtl8192ee/base.c > +++ b/drivers/staging/rtl8192ee/base.c > @@ -826,8 +826,7 @@ static u8 _rtl_get_vht_highest_n_rate(struct ieee80211_hw > *hw, > u8 hw_rate; > u16 map = le16_to_cpu(sta->vht_cap.vht_mcs.tx_mcs_map); > > - if ((get_rf_type(rtlphy) == RF_2T2R) && > - (map & 0x000c) != 0x000c) { > + if ((get_rf_type(rtlphy) == RF_2T2R) { I don't think you test built this change :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: linux-next: build failure after merge of the tty.current tree
On 07/12/2014 09:02 AM, Peter Hurley wrote: On 07/11/2014 09:20 PM, Stephen Rothwell wrote: Hi Peter, On Fri, 11 Jul 2014 11:06:56 -0400 Peter Hurley wrote: Sorry about that. I don't have a full cross-compiler setup for build testing. Looks like that's something I'm going to have to add. see https://www.kernel.org/pub/tools/crosstool/ These are only good for building the kernel (no libc). You don't necessarily need to build the whole kernel but often just building the particular drivers is enough. Especially if they are directly modified ... Hi Stephen, Thanks for the link. I had found Shuah Khan's slideshow pdf on cross-compiler packages earlier and so have already started down that path. Just an fyi, The cross-compiler packages of the emdebian project in the unstable (aka, "sid") distribution have broken dependencies. So the instructions here http://events.linuxfoundation.org/sites/events/files/slides/Shuah_Khan_cross_compile_linux.pdf and here http://linuxdriverproject.org/mediawiki/index.php/Cross-compiling_Linux_kernel_on_x86_64#Installation_Steps are no longer applicable. Regards, Peter Hurley ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4 0/5] staging:iio:hmc5843: Few adjustments and support for hmc5983
On 15/07/14 13:24, Josef Gajdusek wrote: This patch series modifies the hmc5843 driver to support the hmc5983 i2c and spi interfaces. v2: * Reverted the changed order of iio unregister and setting hmc mode to sleep v3: * Fixed bug introduced in the first patch * Readded few comment lines which have gone missing in the hmc5843.c -> hmc5843_core.c move v4: * Changes suggested by Lars in https://lkml.org/lkml/2014/7/14/968 * The i2c and spi drivers are now user-selectable with the core driver being selected automatically * The regmap_config structs in both _spi and _i2c files are now static * The iio_dev allocation is now done in the common function * pm ops are now defined in the header file and the same definition is shared between both interface-specific drivers * regmap tables in hmc5843.h are not longer static (this fixed bunch of variable not used warnings) Jonathan, the patch series applies cleanly against mainline (for me at least), maybe you already have some hmc5843 related patches in your tree which are not yet in upstream? (probably https://lkml.org/lkml/2014/2/14/312) You are correct (although curiously the error from patch this time is a much cleaner fail than before where it was detecting a repeated apply - ah well). Could you rebase this series against staging/staging-next from git.kernel.org please. I'm far more likely to get something wrong doing this than you are. Also you have the ability to test the result! Sorry for the extra work but it's good to see lots of simultaneous interest in this driver! Thanks, Jonathan Josef Gajdusek (5): staging:iio:hmc5843: Added regmap support staging:iio:hmc5843: Split hmc5843.c to multiple files staging:iio:hmc5843: register <-> value arrays now can have different lengths staging:iio:hmc5843: Add support for i2c hmc5983 staging:iio:hmc5843: Add support for spi hmc5983 drivers/staging/iio/magnetometer/Kconfig| 30 +- drivers/staging/iio/magnetometer/Makefile | 4 +- drivers/staging/iio/magnetometer/hmc5843.c | 652 drivers/staging/iio/magnetometer/hmc5843.h | 86 drivers/staging/iio/magnetometer/hmc5843_core.c | 638 +++ drivers/staging/iio/magnetometer/hmc5843_i2c.c | 74 +++ drivers/staging/iio/magnetometer/hmc5843_spi.c | 73 +++ 7 files changed, 900 insertions(+), 657 deletions(-) delete mode 100644 drivers/staging/iio/magnetometer/hmc5843.c create mode 100644 drivers/staging/iio/magnetometer/hmc5843.h create mode 100644 drivers/staging/iio/magnetometer/hmc5843_core.c create mode 100644 drivers/staging/iio/magnetometer/hmc5843_i2c.c create mode 100644 drivers/staging/iio/magnetometer/hmc5843_spi.c ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 55/94] Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code
From: "K. Y. Srinivasan" Starting with Win8, we have implemented several optimizations to improve the scalability and performance of the VMBUS transport between the Host and the Guest. Some of the non-performance critical services cannot leverage these optimization since they only read and process one message at a time. Make adjustments to the callback dispatch code to account for the way non-performance critical drivers handle reading of the channel. Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman Signed-off-by: sam-the-6 --- drivers/hv/connection.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index e84f452..ae22e3c 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -339,9 +339,13 @@ static void process_chn_event(u32 relid) */ do { - hv_begin_read(&channel->inbound); + if (read_state) + hv_begin_read(&channel->inbound); channel->onchannel_callback(arg); - bytes_to_read = hv_end_read(&channel->inbound); + if (read_state) + bytes_to_read = hv_end_read(&channel->inbound); + else + bytes_to_read = 0; } while (read_state && (bytes_to_read != 0)); } else { pr_err("no channel callback for relid - %u\n", relid); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 48/94] ARM: dts: Fix TI CPSW Phy mode selection on IGEP COM AQUILA.
From: Enric Balletbo i Serra As this board use external clock for RMII interface we should specify 'rmii' phy mode and 'rmii-clock-ext' to make ethernet working. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tony Lindgren Signed-off-by: sam-the-6 --- arch/arm/boot/dts/am335x-igep0033.dtsi |6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/am335x-igep0033.dtsi b/arch/arm/boot/dts/am335x-igep0033.dtsi index 8a0a72d..a1a0cc5 100644 --- a/arch/arm/boot/dts/am335x-igep0033.dtsi +++ b/arch/arm/boot/dts/am335x-igep0033.dtsi @@ -105,10 +105,16 @@ &cpsw_emac0 { phy_id = <&davinci_mdio>, <0>; + phy-mode = "rmii"; }; &cpsw_emac1 { phy_id = <&davinci_mdio>, <1>; + phy-mode = "rmii"; +}; + +&phy_sel { + rmii-clock-ext; }; &elm { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/10] staging: unisys: clean up diagdump proc entry code
Remove remnant code left over from the diagdump proc entry. Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 6b82c55..0ae1502 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -127,9 +127,6 @@ InitPartitionProperties(void) static MYPROCTYPE *PartitionType; -#define VISORCHIPSET_DIAG_PROC_ENTRY_FN "diagdump" -static struct proc_dir_entry *diag_proc_dir; - static LIST_HEAD(BusInfoList); static LIST_HEAD(DevInfoList); @@ -2637,10 +2634,7 @@ visorchipset_exit(void) visor_proc_DestroyType(PartitionType); PartitionType = NULL; } - if (diag_proc_dir) { - remove_proc_entry(VISORCHIPSET_DIAG_PROC_ENTRY_FN, ProcDir); - diag_proc_dir = NULL; - } + memset(&g_DiagMsgHdr, 0, sizeof(CONTROLVM_MESSAGE_HEADER)); memset(&g_ChipSetMsgHdr, 0, sizeof(CONTROLVM_MESSAGE_HEADER)); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 95/95] Staging: commedi: 8253.h: style issue fixed
Patch 95/95? Really? Where are the other 94 patches in this series? :( Please look at what you are doing here, does it make sense? On Tue, Jul 15, 2014 at 08:04:35PM +0300, Sam Asadi wrote: > a revision to the file that previously had several style issues. > It's clean now. What does this mean? What did you do in this changeset? Describe _why_ you made the change, not the result of what happened _after_ this patch is applied. Please step back, take a day or two to regroup, and revisit what you are trying to do here. You are not sending out patches correctly at all. Please read some tutorials on how to do this properly (try kernelnewbies.org) and then do a dry-run by sending the patches to yourself. After that looks correct, then consider sending them to the kernel developers. But again, wait, don't rush, there's no deadline here. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 89/94] Linux 3.16-rc5
On Tue, 15 Jul 2014 20:01:44 +0300, Sam Asadi said: > From: Linus Torvalds > > > Signed-off-by: sam-the-6 > --- > Makefile |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 2167084..f3c543d 100644 > --- a/Makefile > +++ b/Makefile > @@ -1,7 +1,7 @@ > VERSION = 3 > PATCHLEVEL = 16 > SUBLEVEL = 0 > -EXTRAVERSION = -rc4 > +EXTRAVERSION = -rc5 > NAME = Shuffling Zombie Juror Moral of the story - always test send a stream of patches to yourself first :) pgppzGQlLBUR1.pgp Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 72/94] phy: omap-usb2: fix devm_ioremap_resource error detection code
From: Himangi Saraogi devm_ioremap_resource returns an ERR_PTR value, not NULL, on failure. A simplified version of the semantic match that finds this problem is as follows: // @@ expression e,e1; statement S; @@ *e = devm_ioremap_resource(...); if (!e1) S // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Greg Kroah-Hartman Signed-off-by: sam-the-6 --- drivers/phy/phy-omap-usb2.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c index 7007c11..2063d54 100644 --- a/drivers/phy/phy-omap-usb2.c +++ b/drivers/phy/phy-omap-usb2.c @@ -233,8 +233,8 @@ static int omap_usb2_probe(struct platform_device *pdev) if (phy_data->flags & OMAP_USB2_CALIBRATE_FALSE_DISCONNECT) { res = platform_get_resource(pdev, IORESOURCE_MEM, 0); phy->phy_base = devm_ioremap_resource(&pdev->dev, res); - if (!phy->phy_base) - return -ENOMEM; + if (IS_ERR(phy->phy_base)) + return PTR_ERR(phy->phy_base); phy->flags |= OMAP_USB2_CALIBRATE_FALSE_DISCONNECT; } -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 25/94] iio: hid-sensor-press: Fix return values
From: Sachin Kamat IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored the actual return values (which could be -EINVAL) and instead returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO upon success. Agreed with by Srinivas. Signed-off-by: Sachin Kamat Cc: Srinivas Pandruvada Signed-off-by: Jonathan Cameron Signed-off-by: sam-the-6 --- drivers/iio/pressure/hid-sensor-press.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/iio/pressure/hid-sensor-press.c b/drivers/iio/pressure/hid-sensor-press.c index 1cd190c..2c0d2a4 100644 --- a/drivers/iio/pressure/hid-sensor-press.c +++ b/drivers/iio/pressure/hid-sensor-press.c @@ -78,7 +78,6 @@ static int press_read_raw(struct iio_dev *indio_dev, struct press_state *press_state = iio_priv(indio_dev); int report_id = -1; u32 address; - int ret; int ret_type; s32 poll_value; @@ -128,14 +127,12 @@ static int press_read_raw(struct iio_dev *indio_dev, ret_type = IIO_VAL_INT; break; case IIO_CHAN_INFO_SAMP_FREQ: - ret = hid_sensor_read_samp_freq_value( + ret_type = hid_sensor_read_samp_freq_value( &press_state->common_attributes, val, val2); - ret_type = IIO_VAL_INT_PLUS_MICRO; break; case IIO_CHAN_INFO_HYSTERESIS: - ret = hid_sensor_read_raw_hyst_value( + ret_type = hid_sensor_read_raw_hyst_value( &press_state->common_attributes, val, val2); - ret_type = IIO_VAL_INT_PLUS_MICRO; break; default: ret_type = -EINVAL; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 78/94] scripts/kernel-doc: handle object-like macros
From: Horia Geanta Object-like macros are different than function-like macros: https://gcc.gnu.org/onlinedocs/cpp/Object-like-Macros.html https://gcc.gnu.org/onlinedocs/cpp/Function-like-Macros.html They are not parsed correctly, generating invalid intermediate files (xmls) for cases like: #define BIT_MASK(0xFF << BIT_SHIFT) where "OxFF <<" is considered to be parameter type. When parsing, we can differentiate beween these two types of macros by checking whether there is at least one whitespace b/w "#define" and first opening parenthesis. Signed-off-by: Horia Geanta Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds Signed-off-by: sam-the-6 --- scripts/kernel-doc | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index da058da..16a07cf 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -2073,6 +2073,7 @@ sub check_return_section { sub dump_function($$) { my $prototype = shift; my $file = shift; +my $noret = 0; $prototype =~ s/^static +//; $prototype =~ s/^extern +//; @@ -2086,7 +2087,7 @@ sub dump_function($$) { $prototype =~ s/__init_or_module +//; $prototype =~ s/__must_check +//; $prototype =~ s/__weak +//; -$prototype =~ s/^#\s*define\s+//; #ak added +my $define = $prototype =~ s/^#\s*define\s+//; #ak added $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; # Yes, this truly is vile. We are looking for: @@ -2105,7 +2106,15 @@ sub dump_function($$) { # - atomic_set (macro) # - pci_match_device, __copy_to_user (long return type) -if ($prototype =~ m/^()([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || +if ($define && $prototype =~ m/^()([a-zA-Z0-9_~:]+)\s+/) { +# This is an object-like macro, it has no return type and no parameter +# list. +# Function-like macros are not allowed to have spaces between +# declaration_name and opening parenthesis (notice the \s+). +$return_type = $1; +$declaration_name = $2; +$noret = 1; +} elsif ($prototype =~ m/^()([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || $prototype =~ m/^(\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || $prototype =~ m/^(\w+\s*\*)\s*([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || $prototype =~ m/^(\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ || @@ -2140,7 +2149,7 @@ sub dump_function($$) { # of warnings goes sufficiently down, the check is only performed in # verbose mode. # TODO: always perform the check. -if ($verbose) { +if ($verbose && !$noret) { check_return_section($file, $declaration_name, $return_type); } -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 41/94] usb: option: Add ID for Telewell TW-LTE 4G v2
From: Bernd Wachter Add ID of the Telewell 4G v2 hardware to option driver to get legacy serial interface working Signed-off-by: Bernd Wachter Cc: Signed-off-by: Johan Hovold Signed-off-by: sam-the-6 --- drivers/usb/serial/option.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index ac73f49..a968894 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1487,6 +1487,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = (kernel_ulong_t)&net_intf2_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1426, 0xff, 0xff, 0xff), /* ZTE MF91 */ .driver_info = (kernel_ulong_t)&net_intf2_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff), /* Telewell TW-LTE 4G v2 */ + .driver_info = (kernel_ulong_t)&net_intf2_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) }, -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: question regarding drivers/staging/iio/adc/ad7280a.c
On 14/07/14 21:31, Himangi Saraogi wrote: Hi, The code seems to have a memory leak. The function ad7280_attr_init calls kasprintf a number of times, which calls kmalloc (or more precisely kmalloc_track_caller), but this data does not ever seem to be freed. I propose to introduce a devm_ version of kasprintf, which will be useful for other files also. I am not very sure that will it be useful to introduce a bunch of kfrees, just to remove the memory leaks immediately, but I think it would be safer just to devm everything, so then one is sure that everything is freed as it should be, in the right order. The question here is whether such a memory leak squashing would be worth applying to stable. Personally I'd go with no. In which case feel free to fix it via the introduction of a devm version. Jonathan Thanks Himangi ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 64/94] serial: Test for no tx data on tx restart
From: Peter Hurley Commit 717f3bbab3c7628736ef738fdbf3d9a28578c26c, 'serial_core: Fix conditional start_tx on ring buffer not empty' exposes an incorrect assumption in several drivers' start_tx methods; the tx ring buffer can, in fact, be empty when restarting tx while performing flow control. Affected drivers: sunsab.c ip22zilog.c pmac_zilog.c sunzilog.c m32r_sio.c imx.c Other in-tree serial drivers either are not affected or already test for empty tx ring buffer before transmitting. Test for empty tx ring buffer in start_tx() method, after transmitting x_char (if applicable). Reported-by: Aaro Koskinen Cc: Seth Bollinger Cc: "David S. Miller" Cc: Sam Ravnborg Cc: Thomas Bogendoerfer Signed-off-by: Peter Hurley Cc: stable # 3.15 Signed-off-by: Greg Kroah-Hartman Signed-off-by: sam-the-6 --- drivers/tty/serial/imx.c|3 +++ drivers/tty/serial/ip22zilog.c |2 ++ drivers/tty/serial/m32r_sio.c |8 +--- drivers/tty/serial/pmac_zilog.c |3 +++ drivers/tty/serial/sunsab.c |3 +++ drivers/tty/serial/sunzilog.c |2 ++ 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index e2f9387..56bd9aa 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -567,6 +567,9 @@ static void imx_start_tx(struct uart_port *port) struct imx_port *sport = (struct imx_port *)port; unsigned long temp; + if (uart_circ_empty(&port.state->xmit)) + return; + if (USE_IRDA(sport)) { /* half duplex in IrDA mode; have to disable receive mode */ temp = readl(sport->port.membase + UCR4); diff --git a/drivers/tty/serial/ip22zilog.c b/drivers/tty/serial/ip22zilog.c index 1efd4c3..99b7b86 100644 --- a/drivers/tty/serial/ip22zilog.c +++ b/drivers/tty/serial/ip22zilog.c @@ -603,6 +603,8 @@ static void ip22zilog_start_tx(struct uart_port *port) } else { struct circ_buf *xmit = &port->state->xmit; + if (uart_circ_empty(xmit)) + return; writeb(xmit->buf[xmit->tail], &channel->data); ZSDELAY(); ZS_WSYNC(channel); diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c index 68f2c53..5702828 100644 --- a/drivers/tty/serial/m32r_sio.c +++ b/drivers/tty/serial/m32r_sio.c @@ -266,9 +266,11 @@ static void m32r_sio_start_tx(struct uart_port *port) if (!(up->ier & UART_IER_THRI)) { up->ier |= UART_IER_THRI; serial_out(up, UART_IER, up->ier); - serial_out(up, UART_TX, xmit->buf[xmit->tail]); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - up->port.icount.tx++; + if (!uart_circ_empty(xmit)) { + serial_out(up, UART_TX, xmit->buf[xmit->tail]); + xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); + up->port.icount.tx++; + } } while((serial_in(up, UART_LSR) & UART_EMPTY) != UART_EMPTY); #else diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index 8193635..f7ad5b9 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c @@ -653,6 +653,8 @@ static void pmz_start_tx(struct uart_port *port) } else { struct circ_buf *xmit = &port->state->xmit; + if (uart_circ_empty(xmit)) + goto out; write_zsdata(uap, xmit->buf[xmit->tail]); zssync(uap); xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); @@ -661,6 +663,7 @@ static void pmz_start_tx(struct uart_port *port) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(&uap->port); } + out: pmz_debug("pmz: start_tx() done.\n"); } diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c index 80a58ec..2f57df9 100644 --- a/drivers/tty/serial/sunsab.c +++ b/drivers/tty/serial/sunsab.c @@ -427,6 +427,9 @@ static void sunsab_start_tx(struct uart_port *port) struct circ_buf *xmit = &up->port.state->xmit; int i; + if (uart_circ_empty(xmit)) + return; + up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR); writeb(up->interrupt_mask1, &up->regs->w.imr1); diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c index a85db8b..02df394 100644 --- a/drivers/tty/serial/sunzilog.c +++ b/drivers/tty/serial/sunzilog.c @@ -703,6 +703,8 @@ static void sunzilog_start_tx(struct uart_port *port) } else { struct circ_buf *xmit = &port->state->xmit; + if (uart_circ_empty(xmit)) + return; writeb(xmit->buf[xmit->tail], &channel->data); ZSDELAY(); ZS_WSYNC(channel); --
[PATCH 71/94] phy: sun4i: depend on RESET_CONTROLLER
From: Maxime Ripard The driver depend on the reset framework in a mandatory way. Make sure reset_control_get is defined by adding this dependency in Kconfig Signed-off-by: Maxime Ripard Reported-by: Arnd Bergmann Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Greg Kroah-Hartman Signed-off-by: sam-the-6 --- drivers/phy/Kconfig |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index fcdfe7c..64b98d2 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -112,6 +112,7 @@ config PHY_EXYNOS5250_SATA config PHY_SUN4I_USB tristate "Allwinner sunxi SoC USB PHY driver" depends on ARCH_SUNXI && HAS_IOMEM && OF + depends on RESET_CONTROLLER select GENERIC_PHY help Enable this to support the transceiver that is part of Allwinner -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/10] staging: unisys: remove partition information from proc
Debugging information for the guest's channels was being exposed in proc. Remove the code that creates these entries, which are no longer needed. Signed-off-by: Benjamin Romer --- .../unisys/visorchipset/visorchipset_main.c| 100 - 1 file changed, 100 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 0ae1502..29af8ad 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -99,38 +99,9 @@ static CONTROLVM_MESSAGE_PACKET g_DeviceChangeStatePacket; #define is_diagpool_channel(channel_type_guid) \ (uuid_le_cmp(channel_type_guid, UltraDiagPoolChannelProtocolGuid) == 0) -typedef enum { - PARTPROP_invalid, - PARTPROP_name, - PARTPROP_description, - PARTPROP_handle, - PARTPROP_busNumber, - /* add new properties above, but don't forget to change -* InitPartitionProperties() and show_partition_property() also... -*/ - PARTPROP_last -} PARTITION_property; -static const char *PartitionTypeNames[] = { "partition", NULL }; - -static char *PartitionPropertyNames[PARTPROP_last + 1]; -static void -InitPartitionProperties(void) -{ - char **p = PartitionPropertyNames; - p[PARTPROP_invalid] = ""; - p[PARTPROP_name] = "name"; - p[PARTPROP_description] = "description"; - p[PARTPROP_handle] = "handle"; - p[PARTPROP_busNumber] = "busNumber"; - p[PARTPROP_last] = NULL; -} - -static MYPROCTYPE *PartitionType; - static LIST_HEAD(BusInfoList); static LIST_HEAD(DevInfoList); -static struct proc_dir_entry *ProcDir; static VISORCHANNEL *ControlVm_channel; typedef struct { @@ -561,52 +532,6 @@ ssize_t store_remaining_steps(struct device *dev, struct device_attribute *attr, return -ENODEV; } -static void -show_partition_property(struct seq_file *f, void *ctx, int property) -{ - VISORCHIPSET_BUS_INFO *info = (VISORCHIPSET_BUS_INFO *) (ctx); - - switch (property) { - case PARTPROP_name: - seq_printf(f, "%s\n", NONULLSTR(info->name)); - break; - case PARTPROP_description: - seq_printf(f, "%s\n", NONULLSTR(info->description)); - break; - case PARTPROP_handle: - seq_printf(f, "0x%-16.16Lx\n", info->partitionHandle); - break; - case PARTPROP_busNumber: - seq_printf(f, "%d\n", info->busNo); - break; - default: - seq_printf(f, "(%d??)\n", property); - break; - } -} - -static void -proc_Init(void) -{ - if (ProcDir == NULL) { - ProcDir = proc_mkdir(MYDRVNAME, NULL); - if (ProcDir == NULL) { - LOGERR("failed to create /proc directory %s", - MYDRVNAME); - POSTCODE_LINUX_2(CHIPSET_INIT_FAILURE_PC, -POSTCODE_SEVERITY_ERR); - } - } -} - -static void -proc_DeInit(void) -{ - if (ProcDir != NULL) - remove_proc_entry(MYDRVNAME, NULL); - ProcDir = NULL; -} - #if 0 static void testUnicode(void) @@ -1318,16 +1243,6 @@ bus_configure(CONTROLVM_MESSAGE *inmsg, PARSER_CONTEXT *parser_ctx) pBusInfo->name = parser_string_get(parser_ctx); visorchannel_uuid_id(&pBusInfo->partitionGuid, s); - pBusInfo->procObject = - visor_proc_CreateObject(PartitionType, s, (void *) (pBusInfo)); - if (pBusInfo->procObject == NULL) { - LOGERR("CONTROLVM_BUS_CONFIGURE Failed: busNo=%lu failed to create /proc entry", -busNo); - POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busNo, -POSTCODE_SEVERITY_ERR); - rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED; - goto Away; - } POSTCODE_LINUX_3(BUS_CONFIGURE_EXIT_PC, busNo, POSTCODE_SEVERITY_INFO); Away: bus_epilog(busNo, CONTROLVM_BUS_CONFIGURE, &inmsg->hdr, @@ -2529,15 +2444,6 @@ visorchipset_init(void) goto Away; } - proc_Init(); - memset(PartitionPropertyNames, 0, sizeof(PartitionPropertyNames)); - InitPartitionProperties(); - - PartitionType = visor_proc_CreateType(ProcDir, PartitionTypeNames, - (const char **) - PartitionPropertyNames, - &show_partition_property); - memset(&g_DiagMsgHdr, 0, sizeof(CONTROLVM_MESSAGE_HEADER)); memset(&g_ChipSetMsgHdr, 0, sizeof(CONTROLVM_MESSAGE_HEADER)); @@ -2630,18 +2536,12 @@ visorchipset_exit(void) cleanup_controlvm_structures(); - if (PartitionType) { - visor_proc_DestroyType(PartitionType); -
[PATCH 04/10] staging: unisys: move installer to sysfs and split fields
The installer entry in /proc/visorchipset/installer was composed of three separate fields as one entry. This patch removes the proc entry and associated functions, and creates new fields with distinct entries under sysfs in the visorchipset/install directory. The fields are: textid: used to send the ID of a string that should be displayed on s-Par's automatic installation progress screen. Setting this field when not in installation mode (boottotool was set on the previous guest boot) has no effect. remaining_steps: used to set the value of the progress bar on the s-Par automatic installation progress screen. This field has no effect if not in installation mode. error: used to send the ID of a string that should be displayed on s-Par's automatic installation progress screen when an error is encountered during installation. This field has no effect if not in installation mode. s-Par's automatic Linux installation software uses these fields to communicate progress with the system management partition. Signed-off-by: Benjamin Romer --- .../unisys/visorchipset/visorchipset_main.c| 267 +++-- 1 file changed, 134 insertions(+), 133 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 04d6349..d4987b1 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -145,16 +145,6 @@ static VISORCHANNEL *ControlVm_channel; static ssize_t visorchipset_proc_read_writeonly(struct file *file, char __user *buf, size_t len, loff_t *offset); -static ssize_t proc_read_installer(struct file *file, char __user *buf, - size_t len, loff_t *offset); -static ssize_t proc_write_installer(struct file *file, - const char __user *buffer, - size_t count, loff_t *ppos); - -static const struct file_operations proc_installer_fops = { - .read = proc_read_installer, - .write = proc_write_installer, -}; typedef struct { U8 __iomem *ptr;/* pointer to base address of payload pool */ @@ -316,15 +306,43 @@ static ssize_t show_boottotool(struct device *dev, static ssize_t store_boottotool(struct device *dev, struct device_attribute *attr, const char *buf, size_t count); +static ssize_t show_error(struct device *dev, struct device_attribute *attr, + char *buf); + +static ssize_t store_error(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count); + +static ssize_t show_textid(struct device *dev, struct device_attribute *attr, + char *buf); + +static ssize_t store_textid(struct device *dev,struct device_attribute *attr, + const char *buf, size_t count); + +static ssize_t show_remaining_steps(struct device *dev, + struct device_attribute *attr, char *buf); + +static ssize_t store_remaining_steps(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count); + static DEVICE_ATTR(toolaction, S_IRUSR | S_IWUSR, show_toolaction, store_toolaction); static DEVICE_ATTR(boottotool, S_IRUSR | S_IWUSR, show_boottotool, store_boottotool); +static DEVICE_ATTR(error, S_IRUSR | S_IWUSR, show_error, store_error); + +static DEVICE_ATTR(textid, S_IRUSR | S_IWUSR, show_textid, store_textid); + +static DEVICE_ATTR(remaining_steps, S_IRUSR | S_IWUSR, show_remaining_steps, + store_remaining_steps); + static struct attribute *visorchipset_install_attrs[] = { &dev_attr_toolaction.attr, &dev_attr_boottotool.attr, + &dev_attr_error.attr, + &dev_attr_textid.attr, + &dev_attr_remaining_steps.attr, NULL }; @@ -428,6 +446,112 @@ ssize_t store_boottotool(struct device *dev, struct device_attribute *attr, return -ENODEV; } } + +ssize_t show_error(struct device *dev, struct device_attribute *attr, + char *buf) +{ + U32 error; + + if (ControlVm_channel) { + visorchannel_read(ControlVm_channel, offsetof( + ULTRA_CONTROLVM_CHANNEL_PROTOCOL, InstallationError), + &error, sizeof(U32)); + return scnprintf(buf, PAGE_SIZE, "%i\n", error); + } else { + return -ENODEV; + } +} + +ssize_t store_error(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) +{ + U32 error; + + if (ControlVm_channel) { + if (sscanf(buf, "%i\n", &error) == 1) { + if (visorchannel_write(ControlVm_channel, +
[PATCH 08/10] staging: unisys: remove unused visorchipset_proc_read_writeonly()
The function visorchipset_proc_read_writeonly() is no longer used anywhere, so remove it. Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 7d0983a..6b82c55 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -136,10 +136,6 @@ static LIST_HEAD(DevInfoList); static struct proc_dir_entry *ProcDir; static VISORCHANNEL *ControlVm_channel; -static ssize_t visorchipset_proc_read_writeonly(struct file *file, - char __user *buf, - size_t len, loff_t *offset); - typedef struct { U8 __iomem *ptr;/* pointer to base address of payload pool */ U64 offset; /* offset from beginning of controlvm @@ -2492,13 +2488,6 @@ ssize_t store_chipsetready(struct device *dev, struct device_attribute *attr, return count; } -static ssize_t -visorchipset_proc_read_writeonly(struct file *file, char __user *buf, -size_t len, loff_t *offset) -{ - return 0; -} - static int __init visorchipset_init(void) { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/10] staging: unisys: move chipsetready to sysfs
Move the chipsetready proc entry to sysfs under a new directory guest. This entry is used by Unisys application software on the guest to acknowledge completion of specific events for integration purposes, but these acknowledgements are not required for the guest to operate correctly. Signed-off-by: Benjamin Romer --- .../unisys/visorchipset/visorchipset_main.c| 62 +- 1 file changed, 24 insertions(+), 38 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index d4987b1..a5f992d 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -130,9 +130,6 @@ static MYPROCTYPE *PartitionType; #define VISORCHIPSET_DIAG_PROC_ENTRY_FN "diagdump" static struct proc_dir_entry *diag_proc_dir; -#define VISORCHIPSET_CHIPSET_PROC_ENTRY_FN "chipsetready" -static struct proc_dir_entry *chipset_proc_dir; - #define VISORCHIPSET_PARAHOTPLUG_PROC_ENTRY_FN "parahotplug" static struct proc_dir_entry *parahotplug_proc_dir; @@ -324,6 +321,9 @@ static ssize_t show_remaining_steps(struct device *dev, static ssize_t store_remaining_steps(struct device *dev, struct device_attribute *attr, const char *buf, size_t count); +static ssize_t store_chipsetready(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count); + static DEVICE_ATTR(toolaction, S_IRUSR | S_IWUSR, show_toolaction, store_toolaction); @@ -337,6 +337,8 @@ static DEVICE_ATTR(textid, S_IRUSR | S_IWUSR, show_textid, store_textid); static DEVICE_ATTR(remaining_steps, S_IRUSR | S_IWUSR, show_remaining_steps, store_remaining_steps); +static DEVICE_ATTR(chipsetready, S_IWUSR, NULL, store_chipsetready); + static struct attribute *visorchipset_install_attrs[] = { &dev_attr_toolaction.attr, &dev_attr_boottotool.attr, @@ -351,8 +353,19 @@ static struct attribute_group visorchipset_install_group = { .attrs = visorchipset_install_attrs }; +static struct attribute *visorchipset_guest_attrs[] = { + &dev_attr_chipsetready.attr, + NULL +}; + +static struct attribute_group visorchipset_guest_group = { + .name = "guest", + .attrs = visorchipset_guest_attrs +}; + static const struct attribute_group *visorchipset_dev_groups[] = { &visorchipset_install_group, + &visorchipset_guest_group, NULL }; @@ -2466,36 +2479,20 @@ visorchipset_cache_free(struct kmem_cache *pool, void *p, char *fn, int ln) kmem_cache_free(pool, p); } -#define gettoken(bufp) strsep(bufp, " -\t\n") - -static ssize_t -chipset_proc_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) +ssize_t store_chipsetready(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) { - char buf[512]; - char *token, *p; - - if (count > sizeof(buf) - 1) { - LOGERR("chipset_proc_write: count (%d) exceeds size of buffer (%d)", -(int) count, (int) sizeof(buffer)); - return -EINVAL; - } - if (copy_from_user(buf, buffer, count)) { - LOGERR("chipset_proc_write: copy_from_user failed"); - return -EFAULT; - } - buf[count] = '\0'; + char *token, *p = (char *)buf; - p = buf; - token = gettoken(&p); + token = strsep(&p, " -\t\n"); if (strcmp(token, "CALLHOMEDISK_MOUNTED") == 0) { - token = gettoken(&p); + token = strsep(&p, " -\t\n"); /* The Call Home Disk has been mounted */ if (strcmp(token, "0") == 0) chipset_events[0] = 1; } else if (strcmp(token, "MODULES_LOADED") == 0) { - token = gettoken(&p); + token = strsep(&p, " -\t\n"); /* All modules for the partition have been loaded */ if (strcmp(token, "0") == 0) chipset_events[1] = 1; @@ -2505,7 +2502,8 @@ chipset_proc_write(struct file *file, const char __user *buffer, return -1; } else { /* Unsupported event specified */ - LOGERR("%s is an invalid event for sending CHIPSET_READY response", token); + LOGERR("%s is an invalid event for sending CHIPSET_READY response", + token); return -1; } @@ -2519,12 +2517,6 @@ visorchipset_proc_read_writeonly(struct file *file, char __user *buf, return 0; } -static const struct file_operations chipset_proc_fops = { - .owner = THIS_MODULE, - .read = visorchipset_proc_read_writeonly, - .write = chipset_proc_write, -}; - static int __init visorchipset_init(void) { @@ -2580,8 +2572,6 @@ visorchipset_init(void) memset(&g_Diag
[PATCH 06/10] staging: unisys: move parahotplug to sysfs
Move the /proc/visorchipset/parahotplug interface to sysfs under /sys/devices/platform/visorchipset/guest/parahotplug. The parahotplug interface is used to deal with recovery situations on s-Par guest partitions. The command service partition will send a message to a guest when a device that guest is using needs to be temporarily removed. The message triggers a udev event that will cause a recovery script to run. When that script has completed its work, it will write to the parahotplug interface to send a message back to Command indicating that it is safe to remove the device. Signed-off-by: Benjamin Romer --- .../unisys/visorchipset/visorchipset_main.c| 49 ++ 1 file changed, 12 insertions(+), 37 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index a5f992d..a82a5e7 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -130,9 +130,6 @@ static MYPROCTYPE *PartitionType; #define VISORCHIPSET_DIAG_PROC_ENTRY_FN "diagdump" static struct proc_dir_entry *diag_proc_dir; -#define VISORCHIPSET_PARAHOTPLUG_PROC_ENTRY_FN "parahotplug" -static struct proc_dir_entry *parahotplug_proc_dir; - static LIST_HEAD(BusInfoList); static LIST_HEAD(DevInfoList); @@ -324,6 +321,9 @@ static ssize_t store_remaining_steps(struct device *dev, static ssize_t store_chipsetready(struct device *dev, struct device_attribute *attr, const char *buf, size_t count); +static ssize_t store_parahotplug(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count); + static DEVICE_ATTR(toolaction, S_IRUSR | S_IWUSR, show_toolaction, store_toolaction); @@ -339,6 +339,8 @@ static DEVICE_ATTR(remaining_steps, S_IRUSR | S_IWUSR, show_remaining_steps, static DEVICE_ATTR(chipsetready, S_IWUSR, NULL, store_chipsetready); +static DEVICE_ATTR(parahotplug, S_IWUSR, NULL, store_parahotplug); + static struct attribute *visorchipset_install_attrs[] = { &dev_attr_toolaction.attr, &dev_attr_boottotool.attr, @@ -355,6 +357,7 @@ static struct attribute_group visorchipset_install_group = { static struct attribute *visorchipset_guest_attrs[] = { &dev_attr_chipsetready.attr, + &dev_attr_parahotplug.attr, NULL }; @@ -1871,30 +1874,17 @@ parahotplug_process_message(CONTROLVM_MESSAGE *inmsg) /* * Gets called when the udev script writes to - * /proc/visorchipset/parahotplug. Expects input in the form of " - * " where is the identifier passed to the script that - * matches a request on the request list, and is 0 or 1 - * indicating whether the device is now enabled or not. + * /sys/devices/platform/visorchipset/guest/parahotplug. + * Expects input in the form of " " where is the identifier + * passed to the script that matches a request on the request list, and + * is 0 or 1 indicating whether the device is now enabled or not. */ -static ssize_t -parahotplug_proc_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos) +ssize_t store_parahotplug(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) { - char buf[64]; uint id; ushort active; - if (count > sizeof(buf) - 1) { - LOGERR("parahotplug_proc_write: count (%d) exceeds size of buffer (%d)", -(int) count, (int) sizeof(buf)); - return -EINVAL; - } - if (copy_from_user(buf, buffer, count)) { - LOGERR("parahotplug_proc_write: copy_from_user failed"); - return -EFAULT; - } - buf[count] = '\0'; - if (sscanf(buf, "%u %hu", &id, &active) != 2) { id = 0; active = 0; @@ -1910,12 +1900,6 @@ parahotplug_proc_write(struct file *file, const char __user *buffer, return count; } -static const struct file_operations parahotplug_proc_fops = { - .owner = THIS_MODULE, - .read = visorchipset_proc_read_writeonly, - .write = parahotplug_proc_write, -}; - /* Process a controlvm message. * Return result: *FALSE - this function will return FALSE only in the case where the @@ -2574,9 +2558,6 @@ visorchipset_init(void) memset(&g_ChipSetMsgHdr, 0, sizeof(CONTROLVM_MESSAGE_HEADER)); - parahotplug_proc_dir = - proc_create(VISORCHIPSET_PARAHOTPLUG_PROC_ENTRY_FN, 0200, - ProcDir, ¶hotplug_proc_fops); memset(&g_DelDumpMsgHdr, 0, sizeof(CONTROLVM_MESSAGE_HEADER)); Putfile_buffer_list_pool = @@ -2677,12 +2658,6 @@ visorchipset_exit(void) memset(&g_ChipSetMsgHdr, 0, sizeof(CONTROLVM_MESSAGE_HEADER)); - if (parahotplug_proc_dir) { - remove_proc_entry(VISORCHIPSET_PARAHOTPLUG_PROC_ENTRY_FN, -
[PATCH 07/10] staging: unisys: fix chipsetready parsing
The chipsetready interface was using strsep() on a const buffer, which is wrong and overcomplicated for what is being done in the function. This patch changes it to use sscanf() instead. Signed-off-by: Benjamin Romer --- .../unisys/visorchipset/visorchipset_main.c| 40 ++ 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index a82a5e7..7d0983a 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -2466,28 +2466,26 @@ visorchipset_cache_free(struct kmem_cache *pool, void *p, char *fn, int ln) ssize_t store_chipsetready(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - char *token, *p = (char *)buf; - - token = strsep(&p, " -\t\n"); - - if (strcmp(token, "CALLHOMEDISK_MOUNTED") == 0) { - token = strsep(&p, " -\t\n"); - /* The Call Home Disk has been mounted */ - if (strcmp(token, "0") == 0) - chipset_events[0] = 1; - } else if (strcmp(token, "MODULES_LOADED") == 0) { - token = strsep(&p, " -\t\n"); - /* All modules for the partition have been loaded */ - if (strcmp(token, "0") == 0) - chipset_events[1] = 1; - } else if (token == NULL) { - /* No event specified */ - LOGERR("No event was specified to send CHIPSET_READY response"); - return -1; + char msgtype[64]; + int msgparam; + + if (sscanf(buf, "%64s %d", msgtype, &msgparam) == 2) { + if (strcmp(msgtype, "CALLHOMEDISK_MOUNTED") == 0) { + /* The Call Home Disk has been mounted */ + if (msgparam == 0) + chipset_events[0] = 1; + } else if (strcmp(msgtype, "MODULES_LOADED") == 0) { + /* All modules for the partition have been loaded */ + if (msgparam == 0) + chipset_events[1] = 1; + } else { + /* Unsupported event specified */ + LOGERR("%s is an invalid event for sending CHIPSET_READY response", + msgtype); + return -1; + } } else { - /* Unsupported event specified */ - LOGERR("%s is an invalid event for sending CHIPSET_READY response", - token); + LOGERR("malformed input to chipsetready attribute"); return -1; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/10] staging: unisys: add toolaction to sysfs
Move the proc entry for controlling the toolaction field to sysfs. The field appears in /sys/devices/platform/visorchipset/install/toolaction. This field is used to tell s-Par which type of recovery tool action to perform on the next guest boot-up. The meaning of the value is dependent on the type of installation software used to commission the guest. Signed-off-by: Benjamin Romer --- .../unisys/visorchipset/visorchipset_main.c| 157 - 1 file changed, 60 insertions(+), 97 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index ecbeaec..d30c365 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -150,11 +150,6 @@ static ssize_t proc_read_installer(struct file *file, char __user *buf, static ssize_t proc_write_installer(struct file *file, const char __user *buffer, size_t count, loff_t *ppos); -static ssize_t proc_read_toolaction(struct file *file, char __user *buf, - size_t len, loff_t *offset); -static ssize_t proc_write_toolaction(struct file *file, -const char __user *buffer, -size_t count, loff_t *ppos); static ssize_t proc_read_bootToTool(struct file *file, char __user *buf, size_t len, loff_t *offset); static ssize_t proc_write_bootToTool(struct file *file, @@ -165,11 +160,6 @@ static const struct file_operations proc_installer_fops = { .write = proc_write_installer, }; -static const struct file_operations proc_toolaction_fops = { - .read = proc_read_toolaction, - .write = proc_write_toolaction, -}; - static const struct file_operations proc_bootToTool_fops = { .read = proc_read_bootToTool, .write = proc_write_bootToTool, @@ -322,10 +312,36 @@ static VISORCHIPSET_BUSDEV_RESPONDERS BusDev_Responders = { /* info for /dev/visorchipset */ static dev_t MajorDev = -1; /**< indicates major num for device */ +/* prototypes for attributes */ +static ssize_t show_toolaction(struct device *dev, + struct device_attribute *attr, char *buf); + +static ssize_t store_toolaction(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count); + +static DEVICE_ATTR(toolaction, S_IRUSR | S_IWUSR, show_toolaction, + store_toolaction); + +static struct attribute *visorchipset_install_attrs[] = { + &dev_attr_toolaction.attr, + NULL +}; + +static struct attribute_group visorchipset_install_group = { + .name = "install", + .attrs = visorchipset_install_attrs +}; + +static const struct attribute_group *visorchipset_dev_groups[] = { + &visorchipset_install_group, + NULL +}; + /* /sys/devices/platform/visorchipset */ static struct platform_device Visorchipset_platform_device = { .name = "visorchipset", .id = -1, + .dev.groups = visorchipset_dev_groups, }; /* Function prototypes */ @@ -337,6 +353,40 @@ static void controlvm_respond_physdev_changestate(CONTROLVM_MESSAGE_HEADER * msgHdr, int response, ULTRA_SEGMENT_STATE state); +ssize_t show_toolaction(struct device *dev, struct device_attribute *attr, + char *buf) +{ + if (ControlVm_channel) { + U8 toolAction; + + visorchannel_read(ControlVm_channel, + offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, + ToolAction), &toolAction, sizeof(U8)); + return scnprintf(buf, PAGE_SIZE, "%u\n", toolAction); + } else + return -ENODEV; +} + +ssize_t store_toolaction(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) +{ + if (ControlVm_channel) { + U8 toolAction; + + if (sscanf(buf, "%hhu\n", &toolAction) == 1) { + if (visorchannel_write(ControlVm_channel, + offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, + ToolAction), + &toolAction, sizeof(U8)) < 0) + return -EFAULT; + else + return count; + } else + return -EIO; + } else + return -ENODEV; +} + static void show_partition_property(struct seq_file *f, void *ctx, int property) { @@ -2423,89 +2473,6 @@ proc_write_installer(struct file *file, } /** - * Reads the ToolAction field of ControlVMChannel. - */ -static ssize_t -proc_read_toolaction(struct file *file, char __user *buf, -
[PATCH 01/10] staging: unisys: remove proc entries from /proc/visorchipset/controlvm
Remove the code that generates proc entries for the controlVM channel. These entries are no longer necessary for debug. Signed-off-by: Benjamin Romer --- .../unisys/visorchipset/visorchipset_main.c| 109 + 1 file changed, 1 insertion(+), 108 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index f897128..ecbeaec 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -125,42 +125,7 @@ InitPartitionProperties(void) p[PARTPROP_last] = NULL; } -typedef enum { - CTLVMPROP_invalid, - CTLVMPROP_physAddr, - CTLVMPROP_controlChannelAddr, - CTLVMPROP_controlChannelBytes, - CTLVMPROP_sparBootPart, - CTLVMPROP_sparStoragePart, - CTLVMPROP_livedumpLength, - CTLVMPROP_livedumpCrc32, - /* add new properties above, but don't forget to change -* InitControlVmProperties() show_controlvm_property() also... -*/ - CTLVMPROP_last -} CONTROLVM_property; - -static const char *ControlVmTypeNames[] = { "controlvm", NULL }; - -static char *ControlVmPropertyNames[CTLVMPROP_last + 1]; -static void -InitControlVmProperties(void) -{ - char **p = ControlVmPropertyNames; - p[CTLVMPROP_invalid] = ""; - p[CTLVMPROP_physAddr] = "physAddr"; - p[CTLVMPROP_controlChannelAddr] = "controlChannelAddr"; - p[CTLVMPROP_controlChannelBytes] = "controlChannelBytes"; - p[CTLVMPROP_sparBootPart] = "spar_boot_part"; - p[CTLVMPROP_sparStoragePart] = "spar_storage_part"; - p[CTLVMPROP_livedumpLength] = "livedumpLength"; - p[CTLVMPROP_livedumpCrc32] = "livedumpCrc32"; - p[CTLVMPROP_last] = NULL; -} - -static MYPROCOBJECT *ControlVmObject; static MYPROCTYPE *PartitionType; -static MYPROCTYPE *ControlVmType; #define VISORCHIPSET_DIAG_PROC_ENTRY_FN "diagdump" static struct proc_dir_entry *diag_proc_dir; @@ -397,63 +362,6 @@ show_partition_property(struct seq_file *f, void *ctx, int property) } static void -show_controlvm_property(struct seq_file *f, void *ctx, int property) -{ - /* Note: ctx is not needed since we only have 1 controlvm channel */ - switch (property) { - case CTLVMPROP_physAddr: - if (ControlVm_channel == NULL) - seq_puts(f, "0x0\n"); - else - seq_printf(f, "0x%-16.16Lx\n", - visorchannel_get_physaddr - (ControlVm_channel)); - break; - case CTLVMPROP_controlChannelAddr: - if (ControlVm_channel == NULL) - seq_puts(f, "0x0\n"); - else { - GUEST_PHYSICAL_ADDRESS addr = 0; - visorchannel_read(ControlVm_channel, - offsetof - (ULTRA_CONTROLVM_CHANNEL_PROTOCOL, - gpControlChannel), &addr, - sizeof(addr)); - seq_printf(f, "0x%-16.16Lx\n", (u64) (addr)); - } - break; - case CTLVMPROP_controlChannelBytes: - if (ControlVm_channel == NULL) - seq_puts(f, "0x0\n"); - else { - U32 bytes = 0; - visorchannel_read(ControlVm_channel, - offsetof - (ULTRA_CONTROLVM_CHANNEL_PROTOCOL, - ControlChannelBytes), &bytes, - sizeof(bytes)); - seq_printf(f, "%lu\n", (ulong) (bytes)); - } - break; - case CTLVMPROP_sparBootPart: - seq_puts(f, "0:0:0:0/1\n"); - break; - case CTLVMPROP_sparStoragePart: - seq_puts(f, "0:0:0:0/2\n"); - break; - case CTLVMPROP_livedumpLength: - seq_printf(f, "%lu\n", LiveDump_info.length); - break; - case CTLVMPROP_livedumpCrc32: - seq_printf(f, "%lu\n", (ulong) LiveDump_info.crc32); - break; - default: - seq_printf(f, "(%d??)\n", property); - break; - } -} - -static void proc_Init(void) { if (ProcDir == NULL) { @@ -2736,20 +2644,12 @@ visorchipset_init(void) proc_Init(); memset(PartitionPropertyNames, 0, sizeof(PartitionPropertyNames)); - memset(ControlVmPropertyNames, 0, sizeof(ControlVmPropertyNames)); InitPartitionProperties(); - InitControlVmProperties(); PartitionType = visor_proc_CreateType(ProcDir, PartitionTypeNames, (const char **)
[PATCH 00/10] staging: unisys: visorchipset proc fixes
This patch series removes all proc entries made by the visorchipset module. The installation mode entries and the guest runtime entries were moved to sysfs under the existing visorchipset directory. The installer proc entry consisted of three fields, which were each moved to a new individual entry under the installer directory. The remaining proc entries are removed entirely. Functions that were orphaned by the removals are also removed, and the code used by the chipsetready entry was corrected and simplified. Benjamin Romer (10): staging: unisys: remove proc entries from /proc/visorchipset/controlvm staging: unisys: add toolaction to sysfs staging: unisys: move boottotool out of proc to sysfs staging: unisys: move installer to sysfs and split fields staging: unisys: move chipsetready to sysfs staging: unisys: move parahotplug to sysfs staging: unisys: fix chipsetready parsing staging: unisys: remove unused visorchipset_proc_read_writeonly() staging: unisys: clean up diagdump proc entry code staging: unisys: remove partition information from proc .../unisys/visorchipset/visorchipset_main.c| 900 +++-- 1 file changed, 276 insertions(+), 624 deletions(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/10] staging: unisys: move boottotool out of proc to sysfs
Move the proc entry controlling the boottotool flag to procfs. The field appears in /sys/devices/platform/visorchipset/install/boottotool. The boottotool flag controls s-Par behavior on the next boot of this guest. Setting the flag will cause the guest to boot from the utility and installation image, which will use the value in the toolaction field to determine what operation is being requested. Signed-off-by: Benjamin Romer --- .../unisys/visorchipset/visorchipset_main.c| 149 +++-- 1 file changed, 51 insertions(+), 98 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index d30c365..04d6349 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -150,21 +150,12 @@ static ssize_t proc_read_installer(struct file *file, char __user *buf, static ssize_t proc_write_installer(struct file *file, const char __user *buffer, size_t count, loff_t *ppos); -static ssize_t proc_read_bootToTool(struct file *file, char __user *buf, - size_t len, loff_t *offset); -static ssize_t proc_write_bootToTool(struct file *file, -const char __user *buffer, -size_t count, loff_t *ppos); + static const struct file_operations proc_installer_fops = { .read = proc_read_installer, .write = proc_write_installer, }; -static const struct file_operations proc_bootToTool_fops = { - .read = proc_read_bootToTool, - .write = proc_write_bootToTool, -}; - typedef struct { U8 __iomem *ptr;/* pointer to base address of payload pool */ U64 offset; /* offset from beginning of controlvm @@ -319,11 +310,21 @@ static ssize_t show_toolaction(struct device *dev, static ssize_t store_toolaction(struct device *dev, struct device_attribute *attr, const char *buf, size_t count); +static ssize_t show_boottotool(struct device *dev, + struct device_attribute *attr, char *buf); + +static ssize_t store_boottotool(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count); + static DEVICE_ATTR(toolaction, S_IRUSR | S_IWUSR, show_toolaction, store_toolaction); +static DEVICE_ATTR(boottotool, S_IRUSR | S_IWUSR, show_boottotool, + store_boottotool); + static struct attribute *visorchipset_install_attrs[] = { &dev_attr_toolaction.attr, + &dev_attr_boottotool.attr, NULL }; @@ -387,6 +388,46 @@ ssize_t store_toolaction(struct device *dev, struct device_attribute *attr, return -ENODEV; } +ssize_t show_boottotool(struct device *dev, struct device_attribute *attr, + char *buf) +{ + if (ControlVm_channel) { + ULTRA_EFI_SPAR_INDICATION efiSparIndication; + + visorchannel_read(ControlVm_channel, + offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, + EfiSparIndication), &efiSparIndication, + sizeof(ULTRA_EFI_SPAR_INDICATION)); + return scnprintf(buf, PAGE_SIZE, "%u\n", + efiSparIndication.BootToTool); + } else { + return -ENODEV; + } +} + +ssize_t store_boottotool(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) +{ + if (ControlVm_channel) { + int val; + ULTRA_EFI_SPAR_INDICATION efiSparIndication; + + if (sscanf(buf, "%u\n", &val) == 1) { + efiSparIndication.BootToTool = val; + if (visorchannel_write(ControlVm_channel, + offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, +EfiSparIndication), + &(efiSparIndication), + sizeof(ULTRA_EFI_SPAR_INDICATION)) < 0) + return -EFAULT; + else + return count; + } else + return -EIO; + } else { + return -ENODEV; + } +} static void show_partition_property(struct seq_file *f, void *ctx, int property) { @@ -2472,90 +2513,6 @@ proc_write_installer(struct file *file, return count; } -/** - * Reads the EfiSparIndication.BootToTool field of ControlVMChannel. - */ -static ssize_t -proc_read_bootToTool(struct file *file, char __user *buf, -size_t len, loff_t *offset) -{ - int length = 0; - ULTRA_EFI_SPAR_INDICATION efiSparIndication; - char *vbuf; - loff_t pos = *offset; - - if (!ControlVm_channel) - return -ENODEV; - - if (p
Re: [PATCH 01/94] ARM: shmobile: Add DT and defconfigs to MAINTAINERS
On Tue, Jul 15, 2014 at 10:05:30AM -0700, Greg KH wrote: > On Tue, Jul 15, 2014 at 07:53:07PM +0300, Sam Asadi wrote: > > From: Simon Horman > > > > There are a number of DT and defconfig files which > > are maintained as part of shmobile but have not been > > listed as such in the MAINTAINERS file. This creates > > confusion from time to time. > > > > Signed-off-by: Simon Horman > > Signed-off-by: sam-the-6 > > Really? We need a "real" name here. > > And why are you passing on Simon's patches, why would I care about this > patch to the MAINTAINERS file? Ok, what are you doing here? You just sent 94 patches that are already committed in the kernel tree. Why in the name of ${DIETY} would you do that? What are you trying to do? confused, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 56/94] Drivers: hv: util: Fix a bug in the KVP code
From: "K. Y. Srinivasan" Add code to poll the channel since we process only one message at a time and the host may not interrupt us. Also increase the receive buffer size since some KVP messages are close to 8K bytes in size. Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman Signed-off-by: sam-the-6 --- drivers/hv/hv_kvp.c | 17 ++--- drivers/hv/hv_util.c |2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c index ea85253..521c146 100644 --- a/drivers/hv/hv_kvp.c +++ b/drivers/hv/hv_kvp.c @@ -127,6 +127,17 @@ kvp_work_func(struct work_struct *dummy) kvp_respond_to_host(NULL, HV_E_FAIL); } +static void poll_channel(struct vmbus_channel *channel) +{ + if (channel->target_cpu != smp_processor_id()) + smp_call_function_single(channel->target_cpu, +hv_kvp_onchannelcallback, +channel, true); + else + hv_kvp_onchannelcallback(channel); +} + + static int kvp_handle_handshake(struct hv_kvp_msg *msg) { int ret = 1; @@ -155,7 +166,7 @@ static int kvp_handle_handshake(struct hv_kvp_msg *msg) kvp_register(dm_reg_value); kvp_transaction.active = false; if (kvp_transaction.kvp_context) - hv_kvp_onchannelcallback(kvp_transaction.kvp_context); + poll_channel(kvp_transaction.kvp_context); } return ret; } @@ -568,7 +579,7 @@ response_done: vmbus_sendpacket(channel, recv_buffer, buf_len, req_id, VM_PKT_DATA_INBAND, 0); - + poll_channel(channel); } /* @@ -603,7 +614,7 @@ void hv_kvp_onchannelcallback(void *context) return; } - vmbus_recvpacket(channel, recv_buffer, PAGE_SIZE * 2, &recvlen, + vmbus_recvpacket(channel, recv_buffer, PAGE_SIZE * 4, &recvlen, &requestid); if (recvlen > 0) { diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c index dd76180..3b9c9ef 100644 --- a/drivers/hv/hv_util.c +++ b/drivers/hv/hv_util.c @@ -319,7 +319,7 @@ static int util_probe(struct hv_device *dev, (struct hv_util_service *)dev_id->driver_data; int ret; - srv->recv_buffer = kmalloc(PAGE_SIZE * 2, GFP_KERNEL); + srv->recv_buffer = kmalloc(PAGE_SIZE * 4, GFP_KERNEL); if (!srv->recv_buffer) return -ENOMEM; if (srv->util_init) { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 94/94] Staging: commedi: 8253.h: style issue fixed
a revision to the file that previously had several style issues. It's clean now. Signed-off-by: Sam Asadi Signed-off-by: sam-the-6 --- drivers/staging/comedi/drivers/8253.h |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers/8253.h b/drivers/staging/comedi/drivers/8253.h index 31d0fc9..d320027 100644 --- a/drivers/staging/comedi/drivers/8253.h +++ b/drivers/staging/comedi/drivers/8253.h @@ -282,6 +282,7 @@ static inline void i8254_mm_write(void __iomem *base_address, * OR'ed with: * I8254_BCD, I8254_BINARY */ + static inline int i8254_set_mode(unsigned long base_address, unsigned int regshift, unsigned int counter_number, unsigned int mode) -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 53/94] ARM: OMAP2+: Remove non working OMAP HDMI audio initialization
From: Jyri Sarha This code is not working currently and it can be removed. There is a conflict in sharing resources with the actual HDMI driver and with the ASoC HDMI audio DAI driver. Signed-off-by: Jyri Sarha Signed-off-by: Tony Lindgren Signed-off-by: sam-the-6 --- arch/arm/mach-omap2/devices.c | 28 1 file changed, 28 deletions(-) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 592ba0a..b6f8f34 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -297,33 +297,6 @@ static void omap_init_audio(void) static inline void omap_init_audio(void) {} #endif -#if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \ - defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE) - -static struct platform_device omap_hdmi_audio = { - .name = "omap-hdmi-audio", - .id = -1, -}; - -static void __init omap_init_hdmi_audio(void) -{ - struct omap_hwmod *oh; - struct platform_device *pdev; - - oh = omap_hwmod_lookup("dss_hdmi"); - if (!oh) - return; - - pdev = omap_device_build("omap-hdmi-audio-dai", -1, oh, NULL, 0); - WARN(IS_ERR(pdev), -"Can't build omap_device for omap-hdmi-audio-dai.\n"); - - platform_device_register(&omap_hdmi_audio); -} -#else -static inline void omap_init_hdmi_audio(void) {} -#endif - #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) #include @@ -459,7 +432,6 @@ static int __init omap2_init_devices(void) */ omap_init_audio(); omap_init_camera(); - omap_init_hdmi_audio(); omap_init_mbox(); /* If dtb is there, the devices will be created dynamically */ if (!of_have_populated_dt()) { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 58/94] i8k: Fix non-SMP operation
From: Guenter Roeck Commit f36fdb9f0266 (i8k: Force SMM to run on CPU 0) adds support for multi-core CPUs to the driver. Unfortunately, that causes it to fail loading if compiled without SMP support, at least on 32 bit kernels. Kernel log shows "i8k: unable to get SMM Dell signature", and function i8k_smm is found to return -EINVAL. Testing revealed that the culprit is the missing return value check of set_cpus_allowed_ptr. Fixes: f36fdb9f0266 (i8k: Force SMM to run on CPU 0) Reported-by: Jim Bos Tested-by: Jim Bos Cc: sta...@vger.kernel.org # 3.14+ Signed-off-by: Guenter Roeck Cc: Andreas Mohr Signed-off-by: Greg Kroah-Hartman Signed-off-by: sam-the-6 --- drivers/char/i8k.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c index d915707..93dcad0 100644 --- a/drivers/char/i8k.c +++ b/drivers/char/i8k.c @@ -138,7 +138,9 @@ static int i8k_smm(struct smm_regs *regs) if (!alloc_cpumask_var(&old_mask, GFP_KERNEL)) return -ENOMEM; cpumask_copy(old_mask, ¤t->cpus_allowed); - set_cpus_allowed_ptr(current, cpumask_of(0)); + rc = set_cpus_allowed_ptr(current, cpumask_of(0)); + if (rc) + goto out; if (smp_processor_id() != 0) { rc = -EBUSY; goto out; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 45/94] ARM: OMAP2+: Make GPMC skip disabled devices
From: Guido Martínez Currently, child nodes of the gpmc node are iterated and probed regardless of their 'status' property. This means adding 'status = "disabled";' has no effect. This patch changes the iteration to only probe nodes marked as available. Signed-off-by: Guido Martínez Tested-by: Pekon Gupta Signed-off-by: Tony Lindgren Signed-off-by: sam-the-6 --- arch/arm/mach-omap2/gpmc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 2c0c281..8bc1338 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1615,7 +1615,7 @@ static int gpmc_probe_dt(struct platform_device *pdev) return ret; } - for_each_child_of_node(pdev->dev.of_node, child) { + for_each_available_child_of_node(pdev->dev.of_node, child) { if (!child->name) continue; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 49/94] ARM: l2c: fix revision checking
From: Russell King The revision checking in l2c310_enable() was not correct; we were masking the part number rather than the revision number. Fix this to use the correct macro. Fixes: 4374d64933b1 ("ARM: l2c: add automatic enable of early BRESP") Signed-off-by: Russell King Signed-off-by: sam-the-6 --- arch/arm/mm/cache-l2x0.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 076172b..7c3fb41 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -664,7 +664,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock) { - unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK; + unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK; bool cortex_a9 = read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9; if (rev >= L310_CACHE_ID_RTL_R2P0) { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 51/94] ARM: dts: Update the parent for Audss clocks in Exynos5420
From: Tushar Behera Currently CLK_FOUT_EPLL was set as one of the parents of AUDSS mux. As per the user manual, it should be CLK_MAU_EPLL. The problem surfaced when the bootloader in Peach-pit board set the EPLL clock as the parent of AUDSS mux. While booting the kernel, we used to get a system hang during late boot if CLK_MAU_EPLL was disabled. Signed-off-by: Tushar Behera Signed-off-by: Shaik Ameer Basha Reported-by: Kevin Hilman Tested-by: Javier Martinez Canillas Tested-by: Doug Anderson Signed-off-by: Kukjin Kim Signed-off-by: sam-the-6 --- arch/arm/boot/dts/exynos5420.dtsi |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index e385322..79e9119 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -167,7 +167,7 @@ compatible = "samsung,exynos5420-audss-clock"; reg = <0x0381 0x0C>; #clock-cells = <1>; - clocks = <&clock CLK_FIN_PLL>, <&clock CLK_FOUT_EPLL>, + clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MAU_EPLL>, <&clock CLK_SCLK_MAUDIO0>, <&clock CLK_SCLK_MAUPCM0>; clock-names = "pll_ref", "pll_in", "sclk_audio", "sclk_pcm_in"; }; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 29/94] iio: hid-sensor-gyro-3d: Fix return values
From: Sachin Kamat IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored the actual return values (which could be -EINVAL) and instead returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO upon success. Signed-off-by: Sachin Kamat Cc: Srinivas Pandruvada Signed-off-by: Jonathan Cameron Signed-off-by: sam-the-6 --- drivers/iio/gyro/hid-sensor-gyro-3d.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c index 40f4e49..fa034a3 100644 --- a/drivers/iio/gyro/hid-sensor-gyro-3d.c +++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c @@ -110,7 +110,6 @@ static int gyro_3d_read_raw(struct iio_dev *indio_dev, struct gyro_3d_state *gyro_state = iio_priv(indio_dev); int report_id = -1; u32 address; - int ret; int ret_type; s32 poll_value; @@ -151,14 +150,12 @@ static int gyro_3d_read_raw(struct iio_dev *indio_dev, ret_type = IIO_VAL_INT; break; case IIO_CHAN_INFO_SAMP_FREQ: - ret = hid_sensor_read_samp_freq_value( + ret_type = hid_sensor_read_samp_freq_value( &gyro_state->common_attributes, val, val2); - ret_type = IIO_VAL_INT_PLUS_MICRO; break; case IIO_CHAN_INFO_HYSTERESIS: - ret = hid_sensor_read_raw_hyst_value( + ret_type = hid_sensor_read_raw_hyst_value( &gyro_state->common_attributes, val, val2); - ret_type = IIO_VAL_INT_PLUS_MICRO; break; default: ret_type = -EINVAL; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/94] clk: ti: apll: not allocating enough data
From: Dan Carpenter There is a cut and paste bug here which will lead to memory corruption because we don't allocate enough data. Fixes: 4d008589e271 ('CLK: TI: APLL: add support for omap2 aplls') Signed-off-by: Dan Carpenter Signed-off-by: Tero Kristo Signed-off-by: sam-the-6 --- drivers/clk/ti/apll.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c index 5428c9c..18dbaf12 100644 --- a/drivers/clk/ti/apll.c +++ b/drivers/clk/ti/apll.c @@ -338,7 +338,7 @@ static void __init of_omap2_apll_setup(struct device_node *node) const char *parent_name; u32 val; - ad = kzalloc(sizeof(*clk_hw), GFP_KERNEL); + ad = kzalloc(sizeof(*ad), GFP_KERNEL); clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL); init = kzalloc(sizeof(*init), GFP_KERNEL); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 87/94] clk: spear3xx: Use proper control register offset
From: Thomas Gleixner The control register is at offset 0x10, not 0x0. This is wreckaged since commit 5df33a62c (SPEAr: Switch to common clock framework). Signed-off-by: Thomas Gleixner Cc: sta...@vger.kernel.org Acked-by: Viresh Kumar Signed-off-by: Mike Turquette Signed-off-by: sam-the-6 --- drivers/clk/spear/spear3xx_clock.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/spear/spear3xx_clock.c b/drivers/clk/spear/spear3xx_clock.c index c2d2043..125eba8 100644 --- a/drivers/clk/spear/spear3xx_clock.c +++ b/drivers/clk/spear/spear3xx_clock.c @@ -211,7 +211,7 @@ static inline void spear310_clk_init(void) { } /* array of all spear 320 clock lookups */ #ifdef CONFIG_MACH_SPEAR320 -#define SPEAR320_CONTROL_REG (soc_config_base + 0x) +#define SPEAR320_CONTROL_REG (soc_config_base + 0x0010) #define SPEAR320_EXT_CTRL_REG (soc_config_base + 0x0018) #define SPEAR320_UARTX_PCLK_MASK0x1 -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 27/94] iio: hid-sensor-magn-3d: Fix return values
From: Sachin Kamat IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored the actual return values (which could be -EINVAL) and instead returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO upon success. Signed-off-by: Sachin Kamat Cc: Srinivas Pandruvada Signed-off-by: Jonathan Cameron Signed-off-by: sam-the-6 --- drivers/iio/magnetometer/hid-sensor-magn-3d.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c index 41cf29e..b2b0937 100644 --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c @@ -110,7 +110,6 @@ static int magn_3d_read_raw(struct iio_dev *indio_dev, struct magn_3d_state *magn_state = iio_priv(indio_dev); int report_id = -1; u32 address; - int ret; int ret_type; s32 poll_value; @@ -153,14 +152,12 @@ static int magn_3d_read_raw(struct iio_dev *indio_dev, ret_type = IIO_VAL_INT; break; case IIO_CHAN_INFO_SAMP_FREQ: - ret = hid_sensor_read_samp_freq_value( + ret_type = hid_sensor_read_samp_freq_value( &magn_state->common_attributes, val, val2); - ret_type = IIO_VAL_INT_PLUS_MICRO; break; case IIO_CHAN_INFO_HYSTERESIS: - ret = hid_sensor_read_raw_hyst_value( + ret_type = hid_sensor_read_raw_hyst_value( &magn_state->common_attributes, val, val2); - ret_type = IIO_VAL_INT_PLUS_MICRO; break; default: ret_type = -EINVAL; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/94] ARM: kprobes: Prevent known test failures stopping other tests running
From: Jon Medhurst Due to a long-standing issue with Thumb symbol lookup [1] the jprobes tests fail when built into a kernel compiled as Thumb mode. (They work fine for ARM mode kernels or for Thumb when built as a loadable module.) Rather than have this problem terminate testing prematurely lets instead emit an error message and carry on with the main kprobes tests, delaying the final failure report until the end. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/063026.html Signed-off-by: Jon Medhurst Signed-off-by: sam-the-6 --- arch/arm/kernel/kprobes-test.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/kernel/kprobes-test.c b/arch/arm/kernel/kprobes-test.c index 3796399..08d7312 100644 --- a/arch/arm/kernel/kprobes-test.c +++ b/arch/arm/kernel/kprobes-test.c @@ -225,6 +225,7 @@ static int pre_handler_called; static int post_handler_called; static int jprobe_func_called; static int kretprobe_handler_called; +static int tests_failed; #define FUNC_ARG1 0x12345678 #define FUNC_ARG2 0xabcdef @@ -461,6 +462,13 @@ static int run_api_tests(long (*func)(long, long)) pr_info("jprobe\n"); ret = test_jprobe(func); +#if defined(CONFIG_THUMB2_KERNEL) && !defined(MODULE) + if (ret == -EINVAL) { + pr_err("FAIL: Known longtime bug with jprobe on Thumb kernels\n"); + tests_failed = ret; + ret = 0; + } +#endif if (ret < 0) return ret; @@ -1672,6 +1680,8 @@ static int __init run_all_tests(void) out: if (ret == 0) + ret = tests_failed; + if (ret == 0) pr_info("Finished kprobe tests OK\n"); else pr_err("kprobe tests failed\n"); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 63/94] ARM: EXYNOS: Register cpuidle device only on exynos4210 and 5250
From: Tomasz Figa Currently, the exynos cpuidle driver works correctly only on exynos4210 and 5250. Trying to use it with just one CPU online on any other exynos SoCs will lead to system failure, due to unsupported AFTR mode on other SoCs. This patch fixes the problem by registering the driver only on supported SoCs and letting others simply use default WFI mode until support for them is added. Signed-off-by: Tomasz Figa Signed-off-by: Kukjin Kim Signed-off-by: sam-the-6 --- arch/arm/mach-exynos/exynos.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 95cad25..46d893f 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -173,10 +173,8 @@ static struct platform_device exynos_cpuidle = { void __init exynos_cpuidle_init(void) { - if (soc_is_exynos5440()) - return; - - platform_device_register(&exynos_cpuidle); + if (soc_is_exynos4210() || soc_is_exynos5250()) + platform_device_register(&exynos_cpuidle); } void __init exynos_cpufreq_init(void) -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 83/94] ext4: fix potential null pointer dereference in ext4_free_inode
From: Namjae Jeon Fix potential null pointer dereferencing problem caused by e43bb4e612 ("ext4: decrement free clusters/inodes counters when block group declared bad") Reported-by: Dan Carpenter Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan Signed-off-by: Theodore Ts'o Reviewed-by: Lukas Czerner Signed-off-by: sam-the-6 --- fs/ext4/ialloc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 0840bf3..5b87fc3 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -338,7 +338,7 @@ out: fatal = err; } else { ext4_error(sb, "bit already cleared for inode %lu", ino); - if (!EXT4_MB_GRP_IBITMAP_CORRUPT(grp)) { + if (gdp && !EXT4_MB_GRP_IBITMAP_CORRUPT(grp)) { int count; count = ext4_free_inodes_count(sb, gdp); percpu_counter_sub(&sbi->s_freeinodes_counter, -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 76/94] ARM: at91: at91sam9x5: add clocks for usb device
From: Bo Shen Add clocks for usb device, or else switch to CCF, the gadget won't work. Reported-by: Jiri Prchal Signed-off-by: Bo Shen Acked-by: Alexandre Belloni Tested-by: Jiri Prchal Signed-off-by: Nicolas Ferre Signed-off-by: Olof Johansson Signed-off-by: sam-the-6 --- arch/arm/boot/dts/at91sam9x5.dtsi |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index d6133f4..2ebc421 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi @@ -1045,6 +1045,8 @@ reg = <0x0050 0x8 0xf803c000 0x400>; interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>; + clocks = <&usb>, <&udphs_clk>; + clock-names = "hclk", "pclk"; status = "disabled"; ep0 { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 66/94] m68k: Export mach_random_get_entropy to modules
From: Geert Uytterhoeven When a module calls random_get_entropy(): ERROR: "mach_random_get_entropy" [crypto/drbg.ko] undefined! make[1]: *** [__modpost] Error 1 Signed-off-by: Geert Uytterhoeven Signed-off-by: sam-the-6 --- arch/m68k/kernel/time.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 958f1ad..3857737 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -30,6 +31,7 @@ unsigned long (*mach_random_get_entropy)(void); +EXPORT_SYMBOL_GPL(mach_random_get_entropy); /* -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 34/94] ext4: disable synchronous transaction batching if max_batch_time==0
From: Eric Sandeen The mount manpage says of the max_batch_time option, This optimization can be turned off entirely by setting max_batch_time to 0. But the code doesn't do that. So fix the code to do that. Signed-off-by: Eric Sandeen Signed-off-by: Theodore Ts'o Cc: sta...@vger.kernel.org Signed-off-by: sam-the-6 --- fs/ext4/super.c |2 -- fs/jbd2/transaction.c |5 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 3423947..6297c07 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1525,8 +1525,6 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token, arg = JBD2_DEFAULT_MAX_COMMIT_AGE; sbi->s_commit_interval = HZ * arg; } else if (token == Opt_max_batch_time) { - if (arg == 0) - arg = EXT4_DEF_MAX_BATCH_TIME; sbi->s_max_batch_time = arg; } else if (token == Opt_min_batch_time) { sbi->s_min_batch_time = arg; diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index 38cfcf5..6f0f590 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -1588,9 +1588,12 @@ int jbd2_journal_stop(handle_t *handle) * to perform a synchronous write. We do this to detect the * case where a single process is doing a stream of sync * writes. No point in waiting for joiners in that case. +* +* Setting max_batch_time to 0 disables this completely. */ pid = current->pid; - if (handle->h_sync && journal->j_last_sync_writer != pid) { + if (handle->h_sync && journal->j_last_sync_writer != pid && + journal->j_max_batch_time) { u64 commit_time, trans_time; journal->j_last_sync_writer = pid; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 85/94] parisc: fix fanotify_mark() syscall on 32bit compat kernel
From: Helge Deller On parisc we can not use the existing compat implementation for fanotify_mark() because for the 64bit mask parameter the higher and lower 32bits are ordered differently than what the compat function expects from big endian architectures. Specifically: It finally turned out, that on hppa we end up with different assignments of parameters to kernel arguments depending on if we call the glibc wrapper function int fanotify_mark (int __fanotify_fd, unsigned int __flags, uint64_t __mask, int __dfd, const char *__pathname); or directly calling the syscall manually syscall(__NR_fanotify_mark, ...) Reason is, that the syscall() function is implemented as C-function and because we now have the sysno as first parameter in front of the other parameters the compiler will unexpectedly add an empty paramenter in front of the u64 value to ensure the correct calling alignment for 64bit values. This means, on hppa you can't simply use syscall() to call the kernel fanotify_mark() function directly, but you have to use the glibc function instead. This patch fixes the kernel in the hppa-arch specifc coding to adjust the parameters in a way as if userspace calls the glibc wrapper function fanotify_mark(). Signed-off-by: Helge Deller Cc: sta...@vger.kernel.org # 3.13+ Signed-off-by: sam-the-6 --- arch/parisc/kernel/sys_parisc32.c | 10 ++ arch/parisc/kernel/syscall_table.S |2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index bb9f3b6..ec741fe 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c @@ -4,6 +4,7 @@ * Copyright (C) 2000-2001 Hewlett Packard Company * Copyright (C) 2000 John Marvin * Copyright (C) 2001 Matthew Wilcox + * Copyright (C) 2014 Helge Deller * * These routines maintain argument size conversion between 32bit and 64bit * environment. Based heavily on sys_ia32.c and sys_sparc32.c. @@ -57,3 +58,12 @@ asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23, current->comm, current->pid, r20); return -ENOSYS; } + +asmlinkage long sys32_fanotify_mark(compat_int_t fanotify_fd, compat_uint_t flags, + compat_uint_t mask0, compat_uint_t mask1, compat_int_t dfd, + const char __user * pathname) +{ + return sys_fanotify_mark(fanotify_fd, flags, + ((__u64)mask1 << 32) | mask0, +dfd, pathname); +} diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index c5fa7a6..84c5d3a 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S @@ -418,7 +418,7 @@ ENTRY_SAME(accept4) /* 320 */ ENTRY_SAME(prlimit64) ENTRY_SAME(fanotify_init) - ENTRY_COMP(fanotify_mark) + ENTRY_DIFF(fanotify_mark) ENTRY_COMP(clock_adjtime) ENTRY_SAME(name_to_handle_at) /* 325 */ ENTRY_COMP(open_by_handle_at) -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 84/94] parisc: add serial ports of C8000/1GHz machine to hardware database
From: Helge Deller Signed-off-by: Helge Deller Cc: sta...@vger.kernel.org # 3.13+ Signed-off-by: sam-the-6 --- arch/parisc/kernel/hardware.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c index 608716f..af3bc35 100644 --- a/arch/parisc/kernel/hardware.c +++ b/arch/parisc/kernel/hardware.c @@ -1210,7 +1210,8 @@ static struct hp_hardware hp_hardware_list[] = { {HPHW_FIO, 0x004, 0x00320, 0x0, "Metheus Frame Buffer"}, {HPHW_FIO, 0x004, 0x00340, 0x0, "BARCO CX4500 VME Grphx Cnsl"}, {HPHW_FIO, 0x004, 0x00360, 0x0, "Hughes TOG VME FDDI"}, - {HPHW_FIO, 0x076, 0x000AD, 0x00, "Crestone Peak RS-232"}, + {HPHW_FIO, 0x076, 0x000AD, 0x0, "Crestone Peak Core RS-232"}, + {HPHW_FIO, 0x077, 0x000AD, 0x0, "Crestone Peak Fast? Core RS-232"}, {HPHW_IOA, 0x185, 0xB, 0x00, "Java BC Summit Port"}, {HPHW_IOA, 0x1FF, 0xB, 0x00, "Hitachi Ghostview Summit Port"}, {HPHW_IOA, 0x580, 0xB, 0x10, "U2-IOA BC Runway Port"}, -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 65/94] serial: arc_uart: Use uart_circ_empty() for open-coded comparison
From: Peter Hurley Replace open-coded test for empty tx ring buffer with equivalent helper function, uart_circ_empty(). No functional change. Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman Signed-off-by: sam-the-6 --- drivers/tty/serial/arc_uart.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c index c9f5c9d..008c223 100644 --- a/drivers/tty/serial/arc_uart.c +++ b/drivers/tty/serial/arc_uart.c @@ -177,7 +177,7 @@ static void arc_serial_tx_chars(struct arc_uart_port *uart) uart->port.icount.tx++; uart->port.x_char = 0; sent = 1; - } else if (xmit->tail != xmit->head) { /* TODO: uart_circ_empty */ + } else if (!uart_circ_empty(xmit)) { ch = xmit->buf[xmit->tail]; xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); uart->port.icount.tx++; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 73/94] drivers: phy: phy-samsung-usb2.c: Add missing MODULE_DEVICE_TABLE
From: Sjoerd Simons Allow phy-exynos-usb2 to be autoloaded based on devicetree information. Tested on Odroid X2 with its USB subsystem build as modules. Signed-off-by: Sjoerd Simons Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Greg Kroah-Hartman Signed-off-by: sam-the-6 --- drivers/phy/phy-samsung-usb2.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/phy-samsung-usb2.c b/drivers/phy/phy-samsung-usb2.c index 8a8c6bc..1e69a32 100644 --- a/drivers/phy/phy-samsung-usb2.c +++ b/drivers/phy/phy-samsung-usb2.c @@ -107,6 +107,7 @@ static const struct of_device_id samsung_usb2_phy_of_match[] = { #endif { }, }; +MODULE_DEVICE_TABLE(of, samsung_usb2_phy_of_match); static int samsung_usb2_phy_probe(struct platform_device *pdev) { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 47/94] ARM: dts: am335x-evmsk: Enable the McASP FIFO for audio
From: Peter Ujfalusi The use of FIFO in McASP can reduce the risk of audio under/overrun and lowers the load on the memories since the DMA will operate in bursts. Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren Signed-off-by: sam-the-6 --- arch/arm/boot/dts/am335x-evmsk.dts |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts index ab9a34c..80a3b21 100644 --- a/arch/arm/boot/dts/am335x-evmsk.dts +++ b/arch/arm/boot/dts/am335x-evmsk.dts @@ -560,8 +560,8 @@ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ 0 0 1 2 >; - tx-num-evt = <1>; - rx-num-evt = <1>; + tx-num-evt = <32>; + rx-num-evt = <32>; }; &tscadc { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 40/94] USB: cp210x: add support for Corsair usb dongle
From: Andras Kovacs Corsair USB Dongles are shipped with Corsair AXi series PSUs. These are cp210x serial usb devices, so make driver detect these. I have a program, that can get information from these PSUs. Tested with 2 different dongles shipped with Corsair AX860i and AX1200i units. Signed-off-by: Andras Kovacs Cc: Signed-off-by: Johan Hovold Signed-off-by: sam-the-6 --- drivers/usb/serial/cp210x.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 762e4a5..330df5c 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -153,6 +153,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ + { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */ { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/94] ARM: kprobes: Fix test code compilation errors for ARMv4 targets
From: Jon Medhurst Conditionally compile kprobes test cases for ARMv5 instructions to avoid compilation errors with ARMv4 targets like: /tmp/cc7Tx8ST.s:16740: Error: selected processor does not support ARM mode `clz r0,r0' Signed-off-by: Jon Medhurst Signed-off-by: sam-the-6 --- arch/arm/kernel/kprobes-test-arm.c |8 1 file changed, 8 insertions(+) diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c index e73f9cf..cb14242 100644 --- a/arch/arm/kernel/kprobes-test-arm.c +++ b/arch/arm/kernel/kprobes-test-arm.c @@ -218,6 +218,7 @@ void kprobe_arm_test_cases(void) TEST_BB_R("bx r",7,2f,"") TEST_BF_R("bxeq r",14,2f,"") +#if __LINUX_ARM_ARCH__ >= 5 TEST_R("clz r0, r",0, 0x0,"") TEST_R("clzeq r7, r",14,0x1,"") TEST_R("clz lr, r",7, 0x,"") @@ -339,6 +340,7 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED(__inst_arm(0xe16f02e1) " @ smultt pc, r1, r2") TEST_UNSUPPORTED(__inst_arm(0xe16002ef) " @ smultt r0, pc, r2") TEST_UNSUPPORTED(__inst_arm(0xe1600fe1) " @ smultt r0, r1, pc") +#endif TEST_GROUP("Multiply and multiply-accumulate") @@ -561,6 +563,7 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED("ldrshtr1, [r2], #48") #endif +#if __LINUX_ARM_ARCH__ >= 5 TEST_RPR( "strdr",0, VAL1,", [r",1, 48,", -r",2,24,"]") TEST_RPR( "strccd r",8, VAL2,", [r",13,0, ", r",12,48,"]") TEST_RPR( "strdr",4, VAL1,", [r",2, 24,", r",3, 48,"]!") @@ -597,6 +600,7 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED(__inst_arm(0xe1efc3d0) " @ ldrd r12, [pc, #48]!") TEST_UNSUPPORTED(__inst_arm(0xe0c9f3d0) " @ ldrd pc, [r9], #48") TEST_UNSUPPORTED(__inst_arm(0xe0c9e3d0) " @ ldrd lr, [r9], #48") +#endif TEST_GROUP("Miscellaneous") @@ -1229,7 +1233,9 @@ void kprobe_arm_test_cases(void) TEST_COPROCESSOR( "mrc"two" 0, 0, r0, cr0, cr0, 0") COPROCESSOR_INSTRUCTIONS_ST_LD("",e) +#if __LINUX_ARM_ARCH__ >= 5 COPROCESSOR_INSTRUCTIONS_MC_MR("",e) +#endif TEST_UNSUPPORTED("svc 0") TEST_UNSUPPORTED("svc 0xff") @@ -1289,7 +1295,9 @@ void kprobe_arm_test_cases(void) TEST( "blx__dummy_thumb_subroutine_odd") #endif /* __LINUX_ARM_ARCH__ >= 6 */ +#if __LINUX_ARM_ARCH__ >= 5 COPROCESSOR_INSTRUCTIONS_ST_LD("2",f) +#endif #if __LINUX_ARM_ARCH__ >= 6 COPROCESSOR_INSTRUCTIONS_MC_MR("2",f) #endif -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 23/94] clocksource: exynos_mct: Fix ftrace
From: Doug Anderson In (93bfb76 clocksource: exynos_mct: register sched_clock callback) we supported using the MCT as a scheduler clock. We properly marked exynos4_read_sched_clock() as notrace. However, we then went and called another function that _wasn't_ notrace. That means if you do: cd /sys/kernel/debug/tracing/ echo function_graph > current_tracer You'll get a crash. Fix this (but still let other readers of the MCT be trace-enabled) by adding an extra function. It's important to keep other users of MCT traceable because the MCT is actually quite slow to access and we want exynos4_frc_read() to show up in ftrace profiles if it's the bottleneck. Signed-off-by: Doug Anderson Signed-off-by: Kukjin Kim Signed-off-by: sam-the-6 --- drivers/clocksource/exynos_mct.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index f71d55f..5ce99c0 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -162,7 +162,7 @@ static void exynos4_mct_frc_start(void) exynos4_mct_write(reg, EXYNOS4_MCT_G_TCON); } -static cycle_t exynos4_frc_read(struct clocksource *cs) +static cycle_t notrace _exynos4_frc_read(void) { unsigned int lo, hi; u32 hi2 = __raw_readl(reg_base + EXYNOS4_MCT_G_CNT_U); @@ -176,6 +176,11 @@ static cycle_t exynos4_frc_read(struct clocksource *cs) return ((cycle_t)hi << 32) | lo; } +static cycle_t exynos4_frc_read(struct clocksource *cs) +{ + return _exynos4_frc_read(); +} + static void exynos4_frc_resume(struct clocksource *cs) { exynos4_mct_frc_start(); @@ -192,7 +197,7 @@ struct clocksource mct_frc = { static u64 notrace exynos4_read_sched_clock(void) { - return exynos4_frc_read(&mct_frc); + return _exynos4_frc_read(); } static void __init exynos4_clocksource_init(void) -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 30/94] iio: hid-sensor-prox: Fix return values
From: Sachin Kamat IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored the actual return values (which could be -EINVAL) and instead returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO upon success. Signed-off-by: Sachin Kamat Cc: Srinivas Pandruvada Signed-off-by: Jonathan Cameron Signed-off-by: sam-the-6 --- drivers/iio/light/hid-sensor-prox.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c index d203ef4..412bae8 100644 --- a/drivers/iio/light/hid-sensor-prox.c +++ b/drivers/iio/light/hid-sensor-prox.c @@ -74,7 +74,6 @@ static int prox_read_raw(struct iio_dev *indio_dev, struct prox_state *prox_state = iio_priv(indio_dev); int report_id = -1; u32 address; - int ret; int ret_type; s32 poll_value; @@ -125,14 +124,12 @@ static int prox_read_raw(struct iio_dev *indio_dev, ret_type = IIO_VAL_INT; break; case IIO_CHAN_INFO_SAMP_FREQ: - ret = hid_sensor_read_samp_freq_value( + ret_type = hid_sensor_read_samp_freq_value( &prox_state->common_attributes, val, val2); - ret_type = IIO_VAL_INT_PLUS_MICRO; break; case IIO_CHAN_INFO_HYSTERESIS: - ret = hid_sensor_read_raw_hyst_value( + ret_type = hid_sensor_read_raw_hyst_value( &prox_state->common_attributes, val, val2); - ret_type = IIO_VAL_INT_PLUS_MICRO; break; default: ret_type = -EINVAL; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/94] clk: s2mps11: Fix double free corruption during driver unbind
From: Krzysztof Kozlowski After unbinding the driver memory was corrupted by double free of clk_lookup structure. This lead to OOPS when re-binding the driver again. The driver allocated memory for 'clk_lookup' with devm_kzalloc. During driver removal this memory was freed twice: once by clkdev_drop() and second by devm code. Kernel panic log: [ 30.839284] Unable to handle kernel paging request at virtual address 5f343173 [ 30.846476] pgd = dee14000 [ 30.849165] [5f343173] *pgd= [ 30.852703] Internal error: Oops: 805 [#1] PREEMPT SMP ARM [ 30.858166] Modules linked in: [ 30.861208] CPU: 0 PID: 1 Comm: bash Not tainted 3.16.0-rc2-00239-g94bdf617b07e-dirty #40 [ 30.869364] task: df478000 ti: df48 task.ti: df48 [ 30.874752] PC is at clkdev_add+0x2c/0x38 [ 30.878738] LR is at clkdev_add+0x18/0x38 [ 30.882732] pc : []lr : []psr: 6013 [ 30.882732] sp : df481e78 ip : 0001 fp : c0700ed8 [ 30.894187] r10: 000c r9 : r8 : c07b0e3c [ 30.899396] r7 : 0002 r6 : df45f9d0 r5 : df421390 r4 : c0700d6c [ 30.905906] r3 : 5f343173 r2 : c0700d84 r1 : 6013 r0 : c0700d6c [ 30.912417] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 30.919534] Control: 10c53c7d Table: 5ee1406a DAC: 0015 [ 30.925262] Process bash (pid: 1, stack limit = 0xdf480240) [ 30.930817] Stack: (0xdf481e78 to 0xdf482000) [ 30.935159] 1e60: 1000 df6de610 [ 30.943321] 1e80: df7f4558 c0355650 c05ec6ec c0700eb0 df6de600 df7f4510 dec9d69c 0014 [ 30.951480] 1ea0: 00167b48 df6de610 c0700e30 c0713518 c0700e30 dec9d69c 0006 [ 30.959639] 1ec0: 00167b48 c02c1b7c c02c1b64 df6de610 c07aff48 c02c0420 c06fb150 c047cc20 [ 30.967798] 1ee0: df6de610 df6de610 c0700e30 df6de644 c06fb150 000c dec9d690 c02bef90 [ 30.975957] 1f00: dec9c6c0 dece4c00 df481f80 dece4c00 000c c02be73c 000c c016ca8c [ 30.984116] 1f20: c016ca48 c016c1f4 b6f18000 df481f80 [ 30.992276] 1f40: df7f66c0 000c df48 df48 b6f18000 c011094c df47839c 6013 [ 31.000435] 1f60: df7f66c0 df7f66c0 000c df48 b6f18000 c0110dd4 [ 31.008594] 1f80: 000c b6ec05d8 000c b6f18000 0004 c000f2a8 [ 31.016753] 1fa0: 1000 c000f0e0 b6ec05d8 000c 0001 b6f18000 000c [ 31.024912] 1fc0: b6ec05d8 000c b6f18000 0004 000c 0001 00167b48 [ 31.033071] 1fe0: bed83a80 b6e004f0 b6e5122c 6010 0001 [ 31.041248] [] (clkdev_add) from [] (s2mps11_clk_probe+0x2b4/0x3b4) [ 31.049223] [] (s2mps11_clk_probe) from [] (platform_drv_probe+0x18/0x48) [ 31.057728] [] (platform_drv_probe) from [] (driver_probe_device+0x13c/0x384) [ 31.066579] [] (driver_probe_device) from [] (bind_store+0x88/0xd8) [ 31.074564] [] (bind_store) from [] (drv_attr_store+0x20/0x2c) [ 31.082118] [] (drv_attr_store) from [] (sysfs_kf_write+0x44/0x48) [ 31.090016] [] (sysfs_kf_write) from [] (kernfs_fop_write+0xc0/0x17c) [ 31.098176] [] (kernfs_fop_write) from [] (vfs_write+0xa0/0x1c4) [ 31.105899] [] (vfs_write) from [] (SyS_write+0x40/0x8c) [ 31.112931] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x3c) [ 31.120481] Code: e2842018 e584501c e1a4 e885000c (e5835000) [ 31.126596] ---[ end trace efad45bfa3a61b05 ]--- [ 31.131181] Kernel panic - not syncing: Fatal exception [ 31.136368] CPU1: stopping [ 31.139054] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 3.16.0-rc2-00239-g94bdf617b07e-dirty #40 [ 31.148697] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 31.156419] [] (show_stack) from [] (dump_stack+0x80/0xcc) [ 31.163622] [] (dump_stack) from [] (handle_IPI+0x130/0x15c) [ 31.170998] [] (handle_IPI) from [] (gic_handle_irq+0x60/0x68) [ 31.178549] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x70) [ 31.186009] Exception stack(0xdf4bdf88 to 0xdf4bdfd0) [ 31.191046] df80: ffed df4bc000 c06d042c [ 31.199207] dfa0: ffed c06d03c0 c070c288 df4bdfd0 [ 31.207363] dfc0: c0010324 c0010328 6013 [ 31.212402] [] (__irq_svc) from [] (arch_cpu_idle+0x28/0x30) [ 31.219783] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x2c4/0x3f0) [ 31.228027] [] (cpu_startup_entry) from [<400086c4>] (0x400086c4) [ 31.234968] ---[ end Kernel panic - not syncing: Fatal exception Fixes: 7cc560dea415 ("clk: s2mps11: Add support for s2mps11") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Yadwinder Singh Brar Signed-off-by: Mike Turquette Signed-off-by: sam-the-6 --- drivers/clk/clk-s2mps11.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 9b7b585..3757e9e 100644 --- a/drivers/clk/clk-s2mps1
[PATCH 13/94] Update imx-sdma cyclic handling to report residue
From: Russell King - ARM Linux I received a report this morning from one of the Novena developers that the behaviour of the iMX6 ASoC codec driver (using imx-pcm-dma.c) was sub-optimal under high system load. While there are issues relating to system load remaining, upon reviewing the ASoC imx-pcm-dma.c driver, it was noticed that it not using the residue support, because SDMA doesn't support it. This has the effect that SDMA has to make multiple calls into the ASoC and ALSA code, one for each period. Since ALSA's snd_pcm_elapsed() does not need to be called multiple times and it is entirely sufficient to call it once to update ALSA with the current buffer position via the pointer method, we can do better here. We can also avoid stopping the DMA entirely, just like real cyclic DMA implementations behave. While this means that we replay some old samples, this is a nicer behaviour than having audio stop and restart. The changes to achieve this are relatively minor - imx-sdma.c can track where the DMA is to the nearest descriptor boundary - it does this already when deciding how many callbacks to issue. In doing this, buf_tail always points at the descriptor which will complete next. The residue is defined by the bytes remaining to the end of the buffer, when the buffer is viewed as a single block of memory [start...end]. So, when we start out, there's a full buffer worth of residue, and this counts down as we approach the end of the buffer, eventually becoming zero at the end, before returning to the full buffer worth when we wrap back to the start. Moving the walking of the descriptors into the interrupt handler means that we can update the BD_DONE flag at interrupt time, thus avoiding a delayed tasklet stopping the cyclic DMA. This means that the residue can be calculated from (total descriptors - buf_tail) * descriptor size. This is what the change below does. We update imx-pcm-dma.c to remove the NO_RESIDUE flag since we now provide the residue. Signed-off-by: Russell King Tested-by: Shawn Guo Signed-off-by: Vinod Koul Signed-off-by: sam-the-6 --- drivers/dma/imx-sdma.c | 22 ++ sound/soc/fsl/imx-pcm-dma.c |1 - 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 1287146..14867e3 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -255,6 +255,7 @@ struct sdma_channel { enum dma_slave_buswidth word_size; unsigned intbuf_tail; unsigned intnum_bd; + unsigned intperiod_len; struct sdma_buffer_descriptor *bd; dma_addr_t bd_phys; unsigned intpc_from_device, pc_to_device; @@ -593,6 +594,12 @@ static void sdma_event_disable(struct sdma_channel *sdmac, unsigned int event) static void sdma_handle_channel_loop(struct sdma_channel *sdmac) { + if (sdmac->desc.callback) + sdmac->desc.callback(sdmac->desc.callback_param); +} + +static void sdma_update_channel_loop(struct sdma_channel *sdmac) +{ struct sdma_buffer_descriptor *bd; /* @@ -611,9 +618,6 @@ static void sdma_handle_channel_loop(struct sdma_channel *sdmac) bd->mode.status |= BD_DONE; sdmac->buf_tail++; sdmac->buf_tail %= sdmac->num_bd; - - if (sdmac->desc.callback) - sdmac->desc.callback(sdmac->desc.callback_param); } } @@ -669,6 +673,9 @@ static irqreturn_t sdma_int_handler(int irq, void *dev_id) int channel = fls(stat) - 1; struct sdma_channel *sdmac = &sdma->channel[channel]; + if (sdmac->flags & IMX_DMA_SG_LOOP) + sdma_update_channel_loop(sdmac); + tasklet_schedule(&sdmac->tasklet); __clear_bit(channel, &stat); @@ -1129,6 +1136,7 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic( sdmac->status = DMA_IN_PROGRESS; sdmac->buf_tail = 0; + sdmac->period_len = period_len; sdmac->flags |= IMX_DMA_SG_LOOP; sdmac->direction = direction; @@ -1225,9 +1233,15 @@ static enum dma_status sdma_tx_status(struct dma_chan *chan, struct dma_tx_state *txstate) { struct sdma_channel *sdmac = to_sdma_chan(chan); + u32 residue; + + if (sdmac->flags & IMX_DMA_SG_LOOP) + residue = (sdmac->num_bd - sdmac->buf_tail) * sdmac->period_len; + else + residue = sdmac->chn_count - sdmac->chn_real_count; dma_set_tx_state(txstate, chan->completed_cookie, chan->cookie, - sdmac->chn_count - sdmac->chn_real_count); +residue); return sdmac->status; } diff --git a/sound/soc/fsl/imx-pcm-dma.c b/sound/soc/fsl/imx-pcm-dma.c index 0849b7b..0db94f49 100644 ---
[PATCH 06/94] clk: samsung: fix several typos to fix boot on s3c2410
From: Vasily Khoruzhick There's a several typos in a driver: 2410 instead of S3C2410 and wrong argument to ARRAY_SIZE(). They prevent s3c2410 from properly booting. Signed-off-by: Vasily Khoruzhick Reviewed-by: Heiko Stuebner Signed-off-by: Tomasz Figa Signed-off-by: sam-the-6 --- drivers/clk/samsung/clk-s3c2410.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/samsung/clk-s3c2410.c b/drivers/clk/samsung/clk-s3c2410.c index ba07168..bd9a873 100644 --- a/drivers/clk/samsung/clk-s3c2410.c +++ b/drivers/clk/samsung/clk-s3c2410.c @@ -378,7 +378,7 @@ void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f, if (!np) s3c2410_common_clk_register_fixed_ext(ctx, xti_f); - if (current_soc == 2410) { + if (current_soc == S3C2410) { if (_get_rate("xti") == 12 * MHZ) { s3c2410_plls[mpll].rate_table = pll_s3c2410_12mhz_tbl; s3c2410_plls[upll].rate_table = pll_s3c2410_12mhz_tbl; @@ -432,7 +432,7 @@ void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f, samsung_clk_register_fixed_factor(ctx, s3c2410_ffactor, ARRAY_SIZE(s3c2410_ffactor)); samsung_clk_register_alias(ctx, s3c2410_aliases, - ARRAY_SIZE(s3c2410_common_aliases)); + ARRAY_SIZE(s3c2410_aliases)); break; case S3C2440: samsung_clk_register_mux(ctx, s3c2440_muxes, -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 61/94] clk: exynos5420: Add IDs for clocks used in PD mfc
From: Arun Kumar K Adds IDs for MUX clocks to be used by power domain for MFC for doing re-parenting while pd on/off. Signed-off-by: Arun Kumar K Signed-off-by: Shaik Ameer Basha Acked-by: Tomasz Figa Signed-off-by: Kukjin Kim Signed-off-by: sam-the-6 --- drivers/clk/samsung/clk-exynos5420.c |6 -- include/dt-bindings/clock/exynos5420.h |2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c index 61eccf0..a4e6cc7 100644 --- a/drivers/clk/samsung/clk-exynos5420.c +++ b/drivers/clk/samsung/clk-exynos5420.c @@ -631,7 +631,8 @@ static struct samsung_mux_clock exynos5x_mux_clks[] __initdata = { SRC_TOP4, 16, 1), MUX(0, "mout_user_aclk266", mout_user_aclk266_p, SRC_TOP4, 20, 1), MUX(0, "mout_user_aclk166", mout_user_aclk166_p, SRC_TOP4, 24, 1), - MUX(0, "mout_user_aclk333", mout_user_aclk333_p, SRC_TOP4, 28, 1), + MUX(CLK_MOUT_USER_ACLK333, "mout_user_aclk333", mout_user_aclk333_p, + SRC_TOP4, 28, 1), MUX(0, "mout_user_aclk400_disp1", mout_user_aclk400_disp1_p, SRC_TOP5, 0, 1), @@ -684,7 +685,8 @@ static struct samsung_mux_clock exynos5x_mux_clks[] __initdata = { SRC_TOP11, 12, 1), MUX(0, "mout_sw_aclk266", mout_sw_aclk266_p, SRC_TOP11, 20, 1), MUX(0, "mout_sw_aclk166", mout_sw_aclk166_p, SRC_TOP11, 24, 1), - MUX(0, "mout_sw_aclk333", mout_sw_aclk333_p, SRC_TOP11, 28, 1), + MUX(CLK_MOUT_SW_ACLK333, "mout_sw_aclk333", mout_sw_aclk333_p, + SRC_TOP11, 28, 1), MUX(0, "mout_sw_aclk400_disp1", mout_sw_aclk400_disp1_p, SRC_TOP12, 4, 1), diff --git a/include/dt-bindings/clock/exynos5420.h b/include/dt-bindings/clock/exynos5420.h index 14e1c8f..21d51ae 100644 --- a/include/dt-bindings/clock/exynos5420.h +++ b/include/dt-bindings/clock/exynos5420.h @@ -202,6 +202,8 @@ #define CLK_MOUT_G3D 641 #define CLK_MOUT_VPLL 642 #define CLK_MOUT_MAUDIO0 643 +#define CLK_MOUT_USER_ACLK333 644 +#define CLK_MOUT_SW_ACLK333645 /* divider clocks */ #define CLK_DOUT_PIXEL 768 -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 42/94] ARM: DRA7/AM43XX: fix header definition for omap44xx_restart
From: Nishanth Menon omap44xx_restart is defined as a static void inline when DRA7/AM437X is defined alone, which implies that the restart function is no longer functional even though it is built in. So, fix the definition of the same. Signed-off-by: Nishanth Menon Signed-off-by: Tony Lindgren Signed-off-by: sam-the-6 --- arch/arm/mach-omap2/common.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index b2d252b..dc571f1 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -162,7 +162,8 @@ static inline void omap3xxx_restart(enum reboot_mode mode, const char *cmd) } #endif -#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) +#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \ + defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM43XX) void omap44xx_restart(enum reboot_mode mode, const char *cmd); #else static inline void omap44xx_restart(enum reboot_mode mode, const char *cmd) -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/94] ARM: dts: dra7xx-clocks: Fix the l3 and l4 clock rates
From: Rajendra Nayak Without the patch: /debug/.../dpll_core_x2_ck/dpll_core_h12x2_ck # cat clk_rate 53200 /debug/.../dpll_core_x2_ck/dpll_core_h12x2_ck/l3_iclk_div # cat clk_rate 53200 /debug/.../dpll_core_x2_ck/dpll_core_h12x2_ck/l3_iclk_div/l4_root_clk_div # cat clk_rate 53200 With the patch: /debug/.../dpll_core_x2_ck/dpll_core_h12x2_ck # cat clk_rate 53200 /debug/.../dpll_core_x2_ck/dpll_core_h12x2_ck/l3_iclk_div # cat clk_rate 26600 /debug/.../dpll_core_x2_ck/dpll_core_h12x2_ck/l3_iclk_div/l4_root_clk_div # cat clk_rate 13300 The l3 clock derived from core DPLL is actually a divider clock, with the default divider set to 2. l4 then derived from l3 is a fixed factor clock, but the fixed divider is 2 and not 1. Which means the l3 clock is half of core DPLLs h12x2 and l4 is half of l3 (as seen with this patch) Signed-off-by: Rajendra Nayak Signed-off-by: Tero Kristo Signed-off-by: sam-the-6 --- arch/arm/boot/dts/dra7xx-clocks.dtsi | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/dra7xx-clocks.dtsi b/arch/arm/boot/dts/dra7xx-clocks.dtsi index c90c76d..dc7a292 100644 --- a/arch/arm/boot/dts/dra7xx-clocks.dtsi +++ b/arch/arm/boot/dts/dra7xx-clocks.dtsi @@ -673,10 +673,12 @@ l3_iclk_div: l3_iclk_div { #clock-cells = <0>; - compatible = "fixed-factor-clock"; + compatible = "ti,divider-clock"; + ti,max-div = <2>; + ti,bit-shift = <4>; + reg = <0x0100>; clocks = <&dpll_core_h12x2_ck>; - clock-mult = <1>; - clock-div = <1>; + ti,index-power-of-two; }; l4_root_clk_div: l4_root_clk_div { @@ -684,7 +686,7 @@ compatible = "fixed-factor-clock"; clocks = <&l3_iclk_div>; clock-mult = <1>; - clock-div = <1>; + clock-div = <2>; }; video1_clk2_div: video1_clk2_div { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 37/94] ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss
From: Roger Quadros Add the sysconfig class bits for the Super Speed USB controllers Signed-off-by: Roger Quadros Reviewed-by: Rajendra Nayak Tested-by: Sekhar Nori Signed-off-by: Paul Walmsley Signed-off-by: sam-the-6 --- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index 1209266..284324f 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c @@ -1727,8 +1727,20 @@ static struct omap_hwmod dra7xx_uart6_hwmod = { * */ +static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = { + .rev_offs = 0x, + .sysc_offs = 0x0010, + .sysc_flags = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE | + SYSC_HAS_SIDLEMODE), + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | + SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | + MSTANDBY_SMART | MSTANDBY_SMART_WKUP), + .sysc_fields= &omap_hwmod_sysc_type2, +}; + static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = { .name = "usb_otg_ss", + .sysc = &dra7xx_usb_otg_ss_sysc, }; /* usb_otg_ss1 */ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/94] ARM: kprobes: Disallow instructions with PC and register specified shift
From: Jon Medhurst ARM data processing instructions which have a register specified shift are defined as UNPREDICTABLE if PC is used for any register, not just the shift value as the code was previous assuming. This issue manifests on A15 devices as either test case failures or undefined instructions aborts. Reported-by: David Long Signed-off-by: Jon Medhurst Signed-off-by: sam-the-6 --- arch/arm/kernel/kprobes-test-arm.c | 22 -- arch/arm/kernel/probes-arm.c |6 +++--- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c index 9db4b65..e73f9cf 100644 --- a/arch/arm/kernel/kprobes-test-arm.c +++ b/arch/arm/kernel/kprobes-test-arm.c @@ -74,8 +74,6 @@ void kprobe_arm_test_cases(void) TEST_RRR( op "lt" s " r11, r",11,VAL1,", r",14,N(val),", asr r",7, 6,"")\ TEST_RR( op "gt" s " r12, r13" ", r",14,val, ", ror r",14,7,"")\ TEST_RR( op "le" s " r14, r",0, val, ", r13" ", lsl r",14,8,"")\ - TEST_RR( op s "r12, pc"", r",14,val, ", ror r",14,7,"")\ - TEST_RR( op s "r14, r",0, val, ", pc"", lsl r",14,8,"")\ TEST_R( op "eq" s " r0, r",11,VAL1,", #0xf5") \ TEST_R( op "ne" s " r11, r",0, VAL1,", #0xf500") \ TEST_R( op s "r7, r",8, VAL2,", #0x000af000") \ @@ -103,8 +101,6 @@ void kprobe_arm_test_cases(void) TEST_RRR( op "ger",11,VAL1,", r",14,N(val),", asr r",7, 6,"") \ TEST_RR( op "ler13" ", r",14,val, ", ror r",14,7,"") \ TEST_RR( op "gtr",0, val, ", r13" ", lsl r",14,8,"") \ - TEST_RR( op " pc"", r",14,val, ", ror r",14,7,"") \ - TEST_RR( op " r",0, val, ", pc"", lsl r",14,8,"") \ TEST_R( op "eqr",11,VAL1,", #0xf5") \ TEST_R( op "ner",0, VAL1,", #0xf500") \ TEST_R( op " r",8, VAL2,", #0x000af000") @@ -125,7 +121,6 @@ void kprobe_arm_test_cases(void) TEST_RR( op "ge" s " r11, r",11,N(val),", asr r",7, 6,"")\ TEST_RR( op "lt" s " r12, r",11,val, ", ror r",14,7,"") \ TEST_R( op "gt" s " r14, r13" ", lsl r",14,8,"") \ - TEST_R( op "le" s " r14, pc"", lsl r",14,8,"") \ TEST( op "eq" s " r0, #0xf5")\ TEST( op "ne" s " r11, #0xf500") \ TEST( op s "r7, #0x000af000") \ @@ -159,12 +154,19 @@ void kprobe_arm_test_cases(void) TEST_SUPPORTED("cmp pc, #0x1000"); TEST_SUPPORTED("cmp sp, #0x1000"); - /* Data-processing with PC as shift*/ + /* Data-processing with PC and a shift count in a register */ TEST_UNSUPPORTED(__inst_arm(0xe15c0f1e) " @ cmp r12, r14, asl pc") TEST_UNSUPPORTED(__inst_arm(0xe1a0cf1e) " @ mov r12, r14, asl pc") TEST_UNSUPPORTED(__inst_arm(0xe08caf1e) " @ add r10, r12, r14, asl pc") - - /* Data-processing with PC as shift*/ + TEST_UNSUPPORTED(__inst_arm(0xe151021f) " @ cmp r1, pc, lsl r2") + TEST_UNSUPPORTED(__inst_arm(0xe17f0211) " @ cmn pc, r1, lsl r2") + TEST_UNSUPPORTED(__inst_arm(0xe1a0121f) " @ mov r1, pc, lsl r2") + TEST_UNSUPPORTED(__inst_arm(0xe1a0f211) " @ mov pc, r1, lsl r2") + TEST_UNSUPPORTED(__inst_arm(0xe042131f) " @ sub r1, r2, pc, lsl r3") + TEST_UNSUPPORTED(__inst_arm(0xe1cf1312) " @ bic r1, pc, r2, lsl r3") + TEST_UNSUPPORTED(__inst_arm(0xe081f312) " @ add pc, r1, r2, lsl r3") + + /* Data-processing with PC as a target and status registers updated */ TEST_UNSUPPORTED("movs pc, r1") TEST_UNSUPPORTED("movs pc, r1, lsl r2") TEST_UNSUPPORTED("movs pc, #0x1") @@ -187,14 +189,14 @@ void kprobe_arm_test_cases(void) TEST_BF_R ("add pc, pc, r",14,2f-1f-8,"") TEST_BF_R ("add pc, r",14,2f-1f-8,", pc") TEST_BF_R ("mov pc, r",0,2f,"") - TEST_BF_RR("mov pc, r",0,2f,", asl r",1,0,"") + TEST_BF_R ("add pc, pc, r",14,(2f-1f-8)*2,", asr #1") TEST_BB( "sub pc, pc, #1b-2b+8") #if __LINUX_ARM_ARCH__ == 6 && !defined(CONFIG_CPU_V7) TEST_BB( "sub pc, pc, #1b-2b+8-2") /* UNPREDICTABLE before and after ARMv6 */ #endif TEST_BB_R( "sub pc, pc, r",14, 1f-2f+8,"") TEST_BB_R( "rsb pc, r",14,1f-2f+8,", pc") - TEST_RR( "add pc, pc, r",10,-2,", asl r",11,1,"") + TEST_R("add pc, pc, r",10,-2,", asl #1") #ifdef CONFIG_THUMB2_KERNEL TEST_ARM_TO_THUMB_INTERWORK_R("add pc, pc, r",0,3f-1f-8+1,"") TEST_ARM_TO_THUMB_INTERWORK_R("sub pc, r",0,3f+8+1,
[PATCH 92/94] Staging: comedi: adl_pci9118: fixed style issues
several style issues fixed. Signed-off-by: Sam Asadi modified: drivers/staging/comedi/drivers/adl_pci9118.c Signed-off-by: sam-the-6 --- drivers/staging/comedi/drivers/adl_pci9118.c | 124 +- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c index 59a65cb..7139f87 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c @@ -8,59 +8,63 @@ * Author: Michal Dobes * */ -/* -Driver: adl_pci9118 -Description: Adlink PCI-9118DG, PCI-9118HG, PCI-9118HR -Author: Michal Dobes -Devices: [ADLink] PCI-9118DG (pci9118dg), PCI-9118HG (pci9118hg), - PCI-9118HR (pci9118hr) -Status: works - -This driver supports AI, AO, DI and DO subdevices. -AI subdevice supports cmd and insn interface, -other subdevices support only insn interface. -For AI: -- If cmd->scan_begin_src=TRIG_EXT then trigger input is TGIN (pin 46). -- If cmd->convert_src=TRIG_EXT then trigger input is EXTTRG (pin 44). -- If cmd->start_src/stop_src=TRIG_EXT then trigger input is TGIN (pin 46). -- It is not necessary to have cmd.scan_end_arg=cmd.chanlist_len but - cmd.scan_end_arg modulo cmd.chanlist_len must by 0. -- If return value of cmdtest is 5 then you've bad channel list - (it isn't possible mixture S.E. and DIFF inputs or bipolar and unipolar - ranges). - -There are some hardware limitations: -a) You cann't use mixture of unipolar/bipoar ranges or differencial/single - ended inputs. -b) DMA transfers must have the length aligned to two samples (32 bit), - so there is some problems if cmd->chanlist_len is odd. This driver tries - bypass this with adding one sample to the end of the every scan and discard - it on output but this cann't be used if cmd->scan_begin_src=TRIG_FOLLOW - and is used flag TRIG_WAKE_EOS, then driver switch to interrupt driven mode - with interrupt after every sample. -c) If isn't used DMA then you can use only mode where - cmd->scan_begin_src=TRIG_FOLLOW. - -Configuration options: - [0] - PCI bus of device (optional) - [1] - PCI slot of device (optional) - If bus/slot is not specified, then first available PCI - card will be used. - [2] - 0= standard 8 DIFF/16 SE channels configuration - n = external multiplexer connected, 1 <= n <= 256 - [3] - 0=autoselect DMA or EOC interrupts operation - 1 = disable DMA mode - 3 = disable DMA and INT, only insn interface will work - [4] - sample&hold signal - card can generate signal for external S&H board - 0 = use SSHO(pin 45) signal is generated in onboard hardware S&H logic - 0 != use ADCHN7(pin 23) signal is generated from driver, number say how - long delay is requested in ns and sign polarity of the hold - (in this case external multiplexor can serve only 128 channels) - [5] - 0=stop measure on all hardware errors - 2 | = ignore ADOR - A/D Overrun status - 8|=ignore Bover - A/D Burst Mode Overrun status - 256|=ignore nFull - A/D FIFO Full status +/* + Driver: adl_pci9118 + Description: Adlink PCI-9118DG, PCI-9118HG, PCI-9118HR + Author: Michal Dobes + Devices: [ADLink] PCI-9118DG (pci9118dg), PCI-9118HG (pci9118hg), + PCI-9118HR (pci9118hr) + Status: works + + This driver supports AI, AO, DI and DO subdevices. + AI subdevice supports cmd and insn interface, + other subdevices support only insn interface. + For AI: + - If cmd->scan_begin_src=TRIG_EXT then trigger input is TGIN (pin 46). + - If cmd->convert_src=TRIG_EXT then trigger input is EXTTRG (pin 44). + - If cmd->start_src/stop_src=TRIG_EXT then trigger input is TGIN (pin 46). + - It is not necessary to have cmd.scan_end_arg=cmd.chanlist_len but + cmd.scan_end_arg modulo cmd.chanlist_len must by 0. + - If return value of cmdtest is 5 then you've bad channel list + (it isn't possible mixture S.E. and DIFF inputs or bipolar and unipolar + ranges). + + There are some hardware limitations: + a) You cann't use mixture of unipolar/bipoar ranges or differencial/single + ended inputs. + b) DMA transfers must have the length aligned to two samples (32 bit), + so there is some problems if cmd->chanlist_len is odd. This driver + tries bypass this with adding one sample to the end of the every scan + and discard it on output but this cann't be used if + cmd->scan_begin_src=TRIG_FOLLOW and is used flag TRIG_WAKE_EOS, then + driver switch to interrupt driven mode with interrupt after every + sample. + c) If isn't used DMA then you can use only mode where + cmd->scan_begin_src=TRIG_FOLLOW. + + Configuration options: + [0] - PCI bus of device (optional) + [1] - PCI slot of device (optional) +If bus/slot is not specified, then first available PCI +card will
[PATCH 68/94] serial: imx: Fix build breakage
From: Peter Hurley Fix breakage introduced by commit c557d392fbf5badd693ea1946a4317c87a26a716, 'serial: Test for no tx data on tx restart'. Reported-by: Stephen Rothwell Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman Signed-off-by: sam-the-6 --- drivers/tty/serial/imx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 56bd9aa..044e86d 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -567,7 +567,7 @@ static void imx_start_tx(struct uart_port *port) struct imx_port *sport = (struct imx_port *)port; unsigned long temp; - if (uart_circ_empty(&port.state->xmit)) + if (uart_circ_empty(&port->state->xmit)) return; if (USE_IRDA(sport)) { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 95/95] Staging: commedi: 8253.h: style issue fixed
a revision to the file that previously had several style issues. It's clean now. Signed-off-by: Sam Asadi --- drivers/staging/comedi/drivers/8253.h |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers/8253.h b/drivers/staging/comedi/drivers/8253.h index 31d0fc9..d320027 100644 --- a/drivers/staging/comedi/drivers/8253.h +++ b/drivers/staging/comedi/drivers/8253.h @@ -282,6 +282,7 @@ static inline void i8254_mm_write(void __iomem *base_address, * OR'ed with: * I8254_BCD, I8254_BINARY */ + static inline int i8254_set_mode(unsigned long base_address, unsigned int regshift, unsigned int counter_number, unsigned int mode) -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 67/94] ext4: revert commit which was causing fs corruption after journal replays
From: Theodore Ts'o Commit 007649375f6af2 ("ext4: initialize multi-block allocator before checking block descriptors") causes the block group descriptor's count of the number of free blocks to become inconsistent with the number of free blocks in the allocation bitmap. This is a harmless form of fs corruption, but it causes the kernel to potentially remount the file system read-only, or to panic, depending on the file systems's error behavior. Thanks to Eric Whitney for his tireless work to reproduce and to find the guilty commit. Fixes: 007649375f6af2 ("ext4: initialize multi-block allocator before checking block descriptors" Cc: sta...@vger.kernel.org # 3.15 Reported-by: David Jander Reported-by: Matteo Croce Tested-by: Eric Whitney Suggested-by: Eric Whitney Signed-off-by: Theodore Ts'o Signed-off-by: sam-the-6 --- fs/ext4/super.c | 51 --- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 6297c07..6df7bc6 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -3879,38 +3879,19 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) goto failed_mount2; } } - - /* -* set up enough so that it can read an inode, -* and create new inode for buddy allocator -*/ - sbi->s_gdb_count = db_count; - if (!test_opt(sb, NOLOAD) && - EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_HAS_JOURNAL)) - sb->s_op = &ext4_sops; - else - sb->s_op = &ext4_nojournal_sops; - - ext4_ext_init(sb); - err = ext4_mb_init(sb); - if (err) { - ext4_msg(sb, KERN_ERR, "failed to initialize mballoc (%d)", -err); - goto failed_mount2; - } - if (!ext4_check_descriptors(sb, &first_not_zeroed)) { ext4_msg(sb, KERN_ERR, "group descriptors corrupted!"); - goto failed_mount2a; + goto failed_mount2; } if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG)) if (!ext4_fill_flex_info(sb)) { ext4_msg(sb, KERN_ERR, "unable to initialize " "flex_bg meta info!"); - goto failed_mount2a; + goto failed_mount2; } + sbi->s_gdb_count = db_count; get_random_bytes(&sbi->s_next_generation, sizeof(u32)); spin_lock_init(&sbi->s_next_gen_lock); @@ -3945,6 +3926,14 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) sbi->s_stripe = ext4_get_stripe_size(sbi); sbi->s_extent_max_zeroout_kb = 32; + /* +* set up enough so that it can read an inode +*/ + if (!test_opt(sb, NOLOAD) && + EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_HAS_JOURNAL)) + sb->s_op = &ext4_sops; + else + sb->s_op = &ext4_nojournal_sops; sb->s_export_op = &ext4_export_ops; sb->s_xattr = ext4_xattr_handlers; #ifdef CONFIG_QUOTA @@ -4134,13 +4123,21 @@ no_journal: if (err) { ext4_msg(sb, KERN_ERR, "failed to reserve %llu clusters for " "reserved pool", ext4_calculate_resv_clusters(sb)); - goto failed_mount5; + goto failed_mount4a; } err = ext4_setup_system_zone(sb); if (err) { ext4_msg(sb, KERN_ERR, "failed to initialize system " "zone (%d)", err); + goto failed_mount4a; + } + + ext4_ext_init(sb); + err = ext4_mb_init(sb); + if (err) { + ext4_msg(sb, KERN_ERR, "failed to initialize mballoc (%d)", +err); goto failed_mount5; } @@ -4217,8 +4214,11 @@ failed_mount8: failed_mount7: ext4_unregister_li_request(sb); failed_mount6: - ext4_release_system_zone(sb); + ext4_mb_release(sb); failed_mount5: + ext4_ext_release(sb); + ext4_release_system_zone(sb); +failed_mount4a: dput(sb->s_root); sb->s_root = NULL; failed_mount4: @@ -4242,14 +4242,11 @@ failed_mount3: percpu_counter_destroy(&sbi->s_extent_cache_cnt); if (sbi->s_mmp_tsk) kthread_stop(sbi->s_mmp_tsk); -failed_mount2a: - ext4_mb_release(sb); failed_mount2: for (i = 0; i < db_count; i++) brelse(sbi->s_group_desc[i]); ext4_kvfree(sbi->s_group_desc); failed_mount: - ext4_ext_release(sb); if (sbi->s_chksum_driver) crypto_free_shash(sbi->s_chksum_driver); if (sbi->s_proc) { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/ma
[PATCH 89/94] Linux 3.16-rc5
From: Linus Torvalds Signed-off-by: sam-the-6 --- Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2167084..f3c543d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 3 PATCHLEVEL = 16 SUBLEVEL = 0 -EXTRAVERSION = -rc4 +EXTRAVERSION = -rc5 NAME = Shuffling Zombie Juror # *DOCUMENTATION* -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 57/94] USB: ftdi_sio: Add extra PID.
From: Bert Vermeulen This patch adds PID 0x0003 to the VID 0x128d (Testo). At least the Testo 435-4 uses this, likely other gear as well. Signed-off-by: Bert Vermeulen Cc: Johan Hovold Cc: stable Signed-off-by: Greg Kroah-Hartman Signed-off-by: sam-the-6 --- drivers/usb/serial/ftdi_sio.c |3 ++- drivers/usb/serial/ftdi_sio_ids.h |3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 115662c1..bf2e30a 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -720,7 +720,8 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(FTDI_VID, FTDI_ACG_HFDUAL_PID) }, { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, - { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) }, + { USB_DEVICE(TESTO_VID, TESTO_1_PID) }, + { USB_DEVICE(TESTO_VID, TESTO_3_PID) }, { USB_DEVICE(FTDI_VID, FTDI_GAMMA_SCOUT_PID) }, { USB_DEVICE(FTDI_VID, FTDI_TACTRIX_OPENPORT_13M_PID) }, { USB_DEVICE(FTDI_VID, FTDI_TACTRIX_OPENPORT_13S_PID) }, diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index 500474c..106cc16 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h @@ -798,7 +798,8 @@ * Submitted by Colin Leroy */ #define TESTO_VID 0x128D -#define TESTO_USB_INTERFACE_PID0x0001 +#define TESTO_1_PID0x0001 +#define TESTO_3_PID0x0003 /* * Mobility Electronics products. -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 79/94] DocBook: fix mtdnand typos
From: Masanari Iida This patch fixed spelling typo found in DocBook/mtdnand.tmpl. Signed-off-by: Masanari Iida Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds Signed-off-by: sam-the-6 --- Documentation/DocBook/mtdnand.tmpl | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl index cd11926..7da8f04 100644 --- a/Documentation/DocBook/mtdnand.tmpl +++ b/Documentation/DocBook/mtdnand.tmpl @@ -91,7 +91,7 @@ [MTD Interface] These functions provide the interface to the MTD kernel API. - They are not replacable and provide functionality + They are not replaceable and provide functionality which is complete hardware independent. @@ -100,14 +100,14 @@ [GENERIC] - Generic functions are not replacable and provide functionality + Generic functions are not replaceable and provide functionality which is complete hardware independent. [DEFAULT] Default functions provide hardware related functionality which is suitable for most of the implementations. These functions can be replaced by the - board driver if neccecary. Those functions are called via pointers in the + board driver if necessary. Those functions are called via pointers in the NAND chip description structure. The board driver can set the functions which should be replaced by board dependent functions before calling nand_scan(). If the function pointer is NULL on entry to nand_scan() then the pointer @@ -264,7 +264,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd) is set up nand_scan() is called. This function tries to detect and identify then chip. If a chip is found all the internal data fields are initialized accordingly. - The structure(s) have to be zeroed out first and then filled with the neccecary + The structure(s) have to be zeroed out first and then filled with the necessary information about the device. @@ -327,7 +327,7 @@ module_init(board_init); Exit function - The exit function is only neccecary if the driver is + The exit function is only necessary if the driver is compiled as a module. It releases all resources which are held by the chip driver and unregisters the partitions in the MTD layer. @@ -494,7 +494,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip) in this case. See rts_from4.c and diskonchip.c for implementation reference. In those cases we must also use bad block tables on FLASH, because the ECC layout is - interferring with the bad block marker positions. + interfering with the bad block marker positions. See bad block table support for details. @@ -542,7 +542,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip) nand_scan() calls the function nand_default_bbt(). nand_default_bbt() selects appropriate default - bad block table desriptors depending on the chip information + bad block table descriptors depending on the chip information which was retrieved by nand_scan(). @@ -554,7 +554,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip) Flash based tables - It may be desired or neccecary to keep a bad block table in FLASH. + It may be desired or necessary to keep a bad block table in FLASH. For AG-AND chips this is mandatory, as they have no factory marked bad blocks. They have factory marked good blocks. The marker pattern is erased when the block is erased to be reused. So in case of @@ -565,10 +565,10 @@ static void board_select_chip (struct mtd_info *mtd, int chip) of the blocks. - The b
[PATCH 39/94] iio:tcs3472: Check for buffer enabled and locking
From: Peter Meerwald Signed-off-by: Peter Meerwald Signed-off-by: Jonathan Cameron Signed-off-by: sam-the-6 --- drivers/iio/light/tcs3472.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/iio/light/tcs3472.c b/drivers/iio/light/tcs3472.c index fe063a0..7525699 100644 --- a/drivers/iio/light/tcs3472.c +++ b/drivers/iio/light/tcs3472.c @@ -52,6 +52,7 @@ struct tcs3472_data { struct i2c_client *client; + struct mutex lock; u8 enable; u8 control; u8 atime; @@ -116,10 +117,17 @@ static int tcs3472_read_raw(struct iio_dev *indio_dev, switch (mask) { case IIO_CHAN_INFO_RAW: + if (iio_buffer_enabled(indio_dev)) + return -EBUSY; + + mutex_lock(&data->lock); ret = tcs3472_req_data(data); - if (ret < 0) + if (ret < 0) { + mutex_unlock(&data->lock); return ret; + } ret = i2c_smbus_read_word_data(data->client, chan->address); + mutex_unlock(&data->lock); if (ret < 0) return ret; *val = ret; @@ -255,6 +263,7 @@ static int tcs3472_probe(struct i2c_client *client, data = iio_priv(indio_dev); i2c_set_clientdata(client, indio_dev); data->client = client; + mutex_init(&data->lock); indio_dev->dev.parent = &client->dev; indio_dev->info = &tcs3472_info; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 75/94] phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove
From: Roger Quadros If probe fails then we need to call pm_runtime_disable() to balance out the previous pm_runtime_enable() call. Else it will cause unbalanced pm_runtime_enable() call in the succeding probe call. This anomaly was observed when the call to devm_phy_create() failed with -EPROBE_DEFER. Balance out the pm_runtime_enable() call in .remove() as well. Signed-off-by: Roger Quadros Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Greg Kroah-Hartman Signed-off-by: sam-the-6 --- drivers/phy/phy-omap-usb2.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c index 2063d54..34b3961 100644 --- a/drivers/phy/phy-omap-usb2.c +++ b/drivers/phy/phy-omap-usb2.c @@ -262,7 +262,6 @@ static int omap_usb2_probe(struct platform_device *pdev) otg->phy= &phy->phy; platform_set_drvdata(pdev, phy); - pm_runtime_enable(phy->dev); generic_phy = devm_phy_create(phy->dev, &ops, NULL); if (IS_ERR(generic_phy)) @@ -270,10 +269,13 @@ static int omap_usb2_probe(struct platform_device *pdev) phy_set_drvdata(generic_phy, phy); + pm_runtime_enable(phy->dev); phy_provider = devm_of_phy_provider_register(phy->dev, of_phy_simple_xlate); - if (IS_ERR(phy_provider)) + if (IS_ERR(phy_provider)) { + pm_runtime_disable(phy->dev); return PTR_ERR(phy_provider); + } phy->wkupclk = devm_clk_get(phy->dev, "wkupclk"); if (IS_ERR(phy->wkupclk)) { @@ -317,6 +319,7 @@ static int omap_usb2_remove(struct platform_device *pdev) if (!IS_ERR(phy->optclk)) clk_unprepare(phy->optclk); usb_remove_phy(&phy->phy); + pm_runtime_disable(phy->dev); return 0; } -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 74/94] phy: core: Fix error path in phy_create()
From: Roger Quadros Prevent resources from being freed twice in case device_add() call fails within phy_create(). Also use ida_simple_remove() instead of ida_remove() as we had used ida_simple_get() to allocate the ida. Cc: 3.13+ # 3.13+ Signed-off-by: Roger Quadros Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Greg Kroah-Hartman Signed-off-by: sam-the-6 --- drivers/phy/phy-core.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index c64a2f3..49c4465 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -614,8 +614,9 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops, return phy; put_dev: - put_device(&phy->dev); - ida_remove(&phy_ida, phy->id); + put_device(&phy->dev); /* calls phy_release() which frees resources */ + return ERR_PTR(ret); + free_phy: kfree(phy); return ERR_PTR(ret); @@ -799,7 +800,7 @@ static void phy_release(struct device *dev) phy = to_phy(dev); dev_vdbg(dev, "releasing '%s'\n", dev_name(dev)); - ida_remove(&phy_ida, phy->id); + ida_simple_remove(&phy_ida, phy->id); kfree(phy); } -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 26/94] iio: hid-sensor-accel-3d: Fix return values
From: Sachin Kamat IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored the actual return values (which could be -EINVAL) and instead returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO upon success. Signed-off-by: Sachin Kamat Cc: Srinivas Pandruvada Signed-off-by: Jonathan Cameron Signed-off-by: sam-the-6 --- drivers/iio/accel/hid-sensor-accel-3d.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c index 69abf91..54e464e 100644 --- a/drivers/iio/accel/hid-sensor-accel-3d.c +++ b/drivers/iio/accel/hid-sensor-accel-3d.c @@ -110,7 +110,6 @@ static int accel_3d_read_raw(struct iio_dev *indio_dev, struct accel_3d_state *accel_state = iio_priv(indio_dev); int report_id = -1; u32 address; - int ret; int ret_type; s32 poll_value; @@ -151,14 +150,12 @@ static int accel_3d_read_raw(struct iio_dev *indio_dev, ret_type = IIO_VAL_INT; break; case IIO_CHAN_INFO_SAMP_FREQ: - ret = hid_sensor_read_samp_freq_value( + ret_type = hid_sensor_read_samp_freq_value( &accel_state->common_attributes, val, val2); - ret_type = IIO_VAL_INT_PLUS_MICRO; break; case IIO_CHAN_INFO_HYSTERESIS: - ret = hid_sensor_read_raw_hyst_value( + ret_type = hid_sensor_read_raw_hyst_value( &accel_state->common_attributes, val, val2); - ret_type = IIO_VAL_INT_PLUS_MICRO; break; default: ret_type = -EINVAL; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 80/94] DocBook: fix various typos
From: Masanari Iida This patch fixed spelling typo in various template files within Documentation/Docbook. Signed-off-by: Masanari Iida Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds Signed-off-by: sam-the-6 --- Documentation/DocBook/gadget.tmpl |2 +- Documentation/DocBook/genericirq.tmpl |4 ++-- Documentation/DocBook/kernel-locking.tmpl |2 +- Documentation/DocBook/libata.tmpl |6 +++--- Documentation/DocBook/media_api.tmpl |2 +- Documentation/DocBook/regulator.tmpl |2 +- Documentation/DocBook/uio-howto.tmpl |4 ++-- Documentation/DocBook/usb.tmpl|2 +- Documentation/DocBook/writing-an-alsa-driver.tmpl |2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl index 4017f14..2c425d7 100644 --- a/Documentation/DocBook/gadget.tmpl +++ b/Documentation/DocBook/gadget.tmpl @@ -708,7 +708,7 @@ hardware level details could be very different. Systems need specialized hardware support to implement OTG, notably including a special Mini-AB jack -and associated transciever to support Dual-Role +and associated transceiver to support Dual-Role operation: they can act either as a host, using the standard Linux-USB host side driver stack, diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl index 46347f6..59fb5c0 100644 --- a/Documentation/DocBook/genericirq.tmpl +++ b/Documentation/DocBook/genericirq.tmpl @@ -182,7 +182,7 @@ Each interrupt is described by an interrupt descriptor structure irq_desc. The interrupt is referenced by an 'unsigned int' numeric - value which selects the corresponding interrupt decription structure + value which selects the corresponding interrupt description structure in the descriptor structures array. The descriptor structure contains status information and pointers to the interrupt flow method and the interrupt chip structure @@ -470,7 +470,7 @@ if (desc->irq_data.chip->irq_eoi) To avoid copies of identical implementations of IRQ chips the core provides a configurable generic interrupt chip - implementation. Developers should check carefuly whether the + implementation. Developers should check carefully whether the generic chip fits their needs before implementing the same functionality slightly differently themselves. diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl index 19f2a5a..e584ee1 100644 --- a/Documentation/DocBook/kernel-locking.tmpl +++ b/Documentation/DocBook/kernel-locking.tmpl @@ -1760,7 +1760,7 @@ as it would be on UP. -There is a furthur optimization possible here: remember our original +There is a further optimization possible here: remember our original cache code, where there were no reference counts and the caller simply held the lock whenever using the object? This is still possible: if you hold the lock, no one can delete the object, so you don't need to diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl index deb71ba..d7fcdc5 100644 --- a/Documentation/DocBook/libata.tmpl +++ b/Documentation/DocBook/libata.tmpl @@ -677,7 +677,7 @@ and other resources, etc. - ATA_QCFLAG_ACTIVE is clared from qc->flags. + ATA_QCFLAG_ACTIVE is cleared from qc->flags. @@ -708,7 +708,7 @@ and other resources, etc. - qc->waiting is claread & completed (in that order). + qc->waiting is cleared & completed (in that order). @@ -1163,7 +1163,7 @@ and other resources, etc. Once sense data is acquired, this type of errors can be - handled similary to other SCSI errors. Note that sense data + handled similarly to other SCSI errors. Note that sense data may indicate ATA bus error (e.g. Sense Key 04h HARDWARE ERROR && ASC/ASCQ 47h/00h SCSI PARITY ERROR). In such cases, the error should be considered as an ATA bus error and diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl index 4decb46..03f9a1f 100644 --- a/Documentation/DocBook/media_api.tmpl +++ b/Documentation/DocBook/media_api.tmpl @@ -68,7 +68,7 @@ several digital tv standards. While it is called as DVB API, in fact it covers several different video standards including DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated - to documment support also for DVB-S2, ISDB-T and ISDB-S. + to document support also for DVB-S2, ISDB-T and ISDB-S. The third part covers the Remote Controller API. The fourth part covers the Media Control
[PATCH 43/94] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on
From: Roger Quadros After clarification from the hardware team it was found that this 1.8V PHY supply can't be switched OFF when SoC is Active. Since the PHY IPs don't contain isolation logic built in the design to allow the power rail to be switched off, there is a very high risk of IP reliability and additional leakage paths which can result in additional power consumption. The only scenario where this rail can be switched off is part of Power on reset sequencing, but it needs to be kept always-on during operation. This patch is required for proper functionality of USB, SATA and PCIe on DRA7-evm. CC: Rajendra Nayak CC: Tero Kristo Signed-off-by: Roger Quadros Signed-off-by: Tony Lindgren Signed-off-by: sam-the-6 --- arch/arm/boot/dts/dra7-evm.dts |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts index 4adc280..8308954 100644 --- a/arch/arm/boot/dts/dra7-evm.dts +++ b/arch/arm/boot/dts/dra7-evm.dts @@ -240,6 +240,7 @@ regulator-name = "ldo3"; regulator-min-microvolt = <180>; regulator-max-microvolt = <180>; + regulator-always-on; regulator-boot-on; }; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 54/94] iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends
From: Jan Kardell Since AI lines could be selected at will (linux-3.11) the sending and receiving ends of the FIFO does not agree about what step is used for a line. It only works if the last lines are used, like 5,6,7, and fails if ie 2,4,6 is selected in DT. Signed-off-by: Jan Kardell Tested-by: Zubair Lutfullah Signed-off-by: Jonathan Cameron Cc: sta...@vger.kernel.org Signed-off-by: sam-the-6 --- drivers/iio/adc/ti_am335x_adc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index a4db302..d5dc4c6 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c @@ -374,7 +374,7 @@ static int tiadc_read_raw(struct iio_dev *indio_dev, return -EAGAIN; } } - map_val = chan->channel + TOTAL_CHANNELS; + map_val = adc_dev->channel_step[chan->scan_index]; /* * We check the complete FIFO. We programmed just one entry but in case -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 93/94] Staging: comedi: 3 files revised fixed style issues
3 files in 'staging/comedi/drivers/' revised again and style issues fixed Signed-off-by: Sam Asadi modified: drivers/staging/comedi/drivers/8253.h modified: drivers/staging/comedi/drivers/8255.c modified: drivers/staging/comedi/drivers/adl_pci9118.c Signed-off-by: sam-the-6 --- drivers/staging/comedi/drivers/8253.h| 34 +++--- drivers/staging/comedi/drivers/8255.c| 154 +- drivers/staging/comedi/drivers/adl_pci9118.c | 140 +++ 3 files changed, 167 insertions(+), 161 deletions(-) diff --git a/drivers/staging/comedi/drivers/8253.h b/drivers/staging/comedi/drivers/8253.h index f6b8607..31d0fc9 100644 --- a/drivers/staging/comedi/drivers/8253.h +++ b/drivers/staging/comedi/drivers/8253.h @@ -1,20 +1,20 @@ /* -comedi/drivers/8253.h -Header file for 8253 - -COMEDI - Linux Control and Measurement Device Interface -Copyright (C) 2000 David A. Schleef - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -*/ + * comedi/drivers/8253.h + * Header file for 8253 + * + * COMEDI - Linux Control and Measurement Device Interface + * Copyright (C) 2000 David A. Schleef + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ #ifndef _8253_H #define _8253_H @@ -55,7 +55,7 @@ static inline void i8253_cascade_ns_to_timer(int i8253_osc_base, /* check for overflow */ divider > div1 && divider > div2 && divider * i8253_osc_base > divider && - divider * i8253_osc_base > i8253_osc_base) { + divider * i8253_osc_base > i8253_osc_base) { return; } diff --git a/drivers/staging/comedi/drivers/8255.c b/drivers/staging/comedi/drivers/8255.c index de273c7..246bf30 100644 --- a/drivers/staging/comedi/drivers/8255.c +++ b/drivers/staging/comedi/drivers/8255.c @@ -1,73 +1,77 @@ /* - comedi/drivers/8255.c - Driver for 8255 - - COMEDI - Linux Control and Measurement Device Interface - Copyright (C) 1998 David A. Schleef - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - Driver: 8255 - Description: generic 8255 support - Devices: [standard] 8255 (8255) - Author: ds - Status: works - Updated: Fri, 7 Jun 2002 12:56:45 -0700 - - The classic in digital I/O. The 8255 appears in Comedi as a single - digital I/O subdevice with 24 channels. The channel 0 corresponds - to the 8255's port A, bit 0; channel 23 corresponds to port C, bit - 7. Direction configuration is done in blocks, with channels 0-7, - 8-15, 16-19, and 20-23 making up the 4 blocks. The only 8255 mode - supported is mode 0. - - You should enable compilation this driver if you plan to use a board - that has an 8255 chip. For multifunction boards, the main driver will - configure the 8255 subdevice automatically. - - This driver also works independently with ISA and PCI cards that - directly map the 8255 registers to I/O ports, including cards with - multiple 8255 chips. To configure the driver for such a card, the - option list should be a list of the I/O port bases for each of the - 8255 chips. For example, - - comedi_config /dev/comedi0 8255 0x200,0x204,0x208,0x20c - - Note that most PCI 8255 boards do NOT work with this driver, and - need a separate driver as a wrapper. For those that do work, the - I/O port base address can be found in the output of 'lspci -v'. - - This file contains an exported subdevice
[PATCH 59/94] m68k: Fix boot regression on machines with RAM at non-zero
From: Geert Uytterhoeven My enhancement to store the initial mapping size for later reuse in commit 486df8bc4627bdfc032d11bedcd056cc5343ee62 ("m68k: Increase initial mapping to 8 or 16 MiB if possible") broke booting on machines where RAM doesn't start at address zero. Use pc-relative addressing to fix this. Reported-by: Andreas Schwab Signed-off-by: Geert Uytterhoeven Tested-by: Andreas Schwab Signed-off-by: sam-the-6 --- arch/m68k/kernel/head.S |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index dbb118e..a547884 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S @@ -921,7 +921,8 @@ L(nocon): jls 1f lsrl#1,%d1 1: - movel %d1,m68k_init_mapped_size + lea %pc@(m68k_init_mapped_size),%a0 + movel %d1,%a0@ mmu_map #PAGE_OFFSET,%pc@(L(phys_kernel_start)),%d1,\ %pc@(m68k_supervisor_cachemode) -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 46/94] ARM: dts: am335x-evm: Enable the McASP FIFO for audio
From: Peter Ujfalusi The use of FIFO in McASP can reduce the risk of audio under/overrun and lowers the load on the memories since the DMA will operate in bursts. Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren Signed-off-by: sam-the-6 --- arch/arm/boot/dts/am335x-evm.dts |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts index ecb2677..e2156a5 100644 --- a/arch/arm/boot/dts/am335x-evm.dts +++ b/arch/arm/boot/dts/am335x-evm.dts @@ -529,8 +529,8 @@ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ 0 0 1 2 >; - tx-num-evt = <1>; - rx-num-evt = <1>; + tx-num-evt = <32>; + rx-num-evt = <32>; }; &tps { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 31/94] ext4: fix unjournalled bg descriptor while initializing inode bitmap
From: Theodore Ts'o The first time that we allocate from an uninitialized inode allocation bitmap, if the block allocation bitmap is also uninitalized, we need to get write access to the block group descriptor before we start modifying the block group descriptor flags and updating the free block count, etc. Otherwise, there is the potential of a bad journal checksum (if journal checksums are enabled), and of the file system becoming inconsistent if we crash at exactly the wrong time. Signed-off-by: Theodore Ts'o Cc: sta...@vger.kernel.org Signed-off-by: sam-the-6 --- fs/ext4/ialloc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index a87455d..0840bf3 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -874,6 +874,13 @@ got: goto out; } + BUFFER_TRACE(group_desc_bh, "get_write_access"); + err = ext4_journal_get_write_access(handle, group_desc_bh); + if (err) { + ext4_std_error(sb, err); + goto out; + } + /* We may have to initialize the block bitmap if it isn't already */ if (ext4_has_group_desc_csum(sb) && gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) { @@ -910,13 +917,6 @@ got: } } - BUFFER_TRACE(group_desc_bh, "get_write_access"); - err = ext4_journal_get_write_access(handle, group_desc_bh); - if (err) { - ext4_std_error(sb, err); - goto out; - } - /* Update the relevant bg descriptor fields */ if (ext4_has_group_desc_csum(sb)) { int free; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 62/94] ARM: dts: Add clock property for mfc_pd in exynos5420
From: Arun Kumar K Adding the optional clock property for the mfc_pd for handling the re-parenting while pd on/off. Signed-off-by: Arun Kumar K Signed-off-by: Shaik Ameer Basha Reviewed-by: Tomasz Figa Signed-off-by: Kukjin Kim Signed-off-by: sam-the-6 --- arch/arm/boot/dts/exynos5420.dtsi |3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 79e9119..1595722 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -260,6 +260,9 @@ mfc_pd: power-domain@10044060 { compatible = "samsung,exynos4210-pd"; reg = <0x10044060 0x20>; + clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MOUT_SW_ACLK333>, + <&clock CLK_MOUT_USER_ACLK333>; + clock-names = "oscclk", "pclk0", "clk0"; }; disp_pd: power-domain@100440C0 { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel