[PATCH] staging: omap4iss: copy paste error in iss_get_clocks
It makes more sense to return PTR_ERR(iss->iss_ctrlclk) here. The current code looks like an oversight in pasting the block just above this one. Signed-off-by: Vitaly Osipov --- drivers/staging/media/omap4iss/iss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c index 2e422dd..4a9e444 100644 --- a/drivers/staging/media/omap4iss/iss.c +++ b/drivers/staging/media/omap4iss/iss.c @@ -1029,7 +1029,7 @@ static int iss_get_clocks(struct iss_device *iss) if (IS_ERR(iss->iss_ctrlclk)) { dev_err(iss->dev, "Unable to get iss_ctrlclk clock info\n"); iss_put_clocks(iss); - return PTR_ERR(iss->iss_fck); + return PTR_ERR(iss->iss_ctrlclk); } return 0; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: comedi: describe members involved when reading/writing buffer
Signed-off-by: Ian Abbott --- I was originally going to put it in comedidev.h but as that gets passed through the compiler more often, I thought it would be better in comedi_buf.c. --- drivers/staging/comedi/comedi_buf.c | 60 + 1 file changed, 60 insertions(+) diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c index df4a9c4..c982393 100644 --- a/drivers/staging/comedi/comedi_buf.c +++ b/drivers/staging/comedi/comedi_buf.c @@ -27,6 +27,66 @@ #define COMEDI_PAGE_PROTECTION PAGE_KERNEL #endif +/* + * Note about the ..._count and ..._ptr members in struct comedi_async: + * + * Think of the _Count values being integers of unlimited size, indexing + * into a buffer of infinite length (though only an advancing portion + * of the buffer of fixed length prealloc_bufsz is accessible at any time). + * Then: + * + * Buf_Read_Count <= Buf_Read_Alloc_Count <= Munge_Count <= + * Buf_Write_Count <= Buf_Write_Alloc_Count <= + * (Buf_Read_Count + prealloc_bufsz) + * + * (Those aren't the actual members, apart from prealloc_bufsz.) When + * the buffer is reset, those _Count values start at 0 and only increase + * in value, maintaining the above inequalities until the next time the + * buffer is reset. The buffer is divided into the following regions by + * the inequalities: + * + * [0, Buf_Read_Count): + * old region no longer accessible + * [Buf_Read_Count, Buf_Read_Alloc_Count): + * filled and munged region allocated for reading but not yet read + * [Buf_Read_Alloc_Count, Munge_Count): + * filled and munged region not yet allocated for reading + * [Munge_Count, Buf_Write_Count): + * filled region not yet munged + * [Buf_Write_Count, Buf_Write_Alloc_Count): + * unfilled region allocated for writing but not yet written + * [Buf_Write_Alloc_Count, Buf_Read_Count + prealloc_bufsz): + * unfilled region not yet allocated for writing + * [Buf_Read_Count + prealloc_bufsz, infinity): + * unfilled region not yet accessible + * + * Data needs to be written into the buffer before it can be read out, + * and may need to be converted (or "munged") between the two + * operations. Extra unfilled buffer space may need to allocated for + * writing (advancing Buf_Write_Alloc_Count) before new data is written. + * After writing new data, the newly filled space needs to be released + * (advancing Buf_Write_Count). This also results in the new data being + * "munged" (advancing Munge_Count). Before data is read out of the + * buffer, extra space may need to be allocated for reading (advancing + * Buf_Read_Alloc_Count). After the data has been read out, the space + * needs to be released (advancing Buf_Read_Count). + * + * The actual members, buf_read_count, buf_read_alloc_count, + * munge_count, buf_write_count, and buf_write_alloc_count take the + * value of the corresponding capitalized _Count values modulo 2^32 + * (UINT_MAX+1). Subtracting a "higher" _count value from a "lower" + * _count value gives the same answer as subtracting a "higher" _Count + * value from a lower _Count value because prealloc_bufsz < UINT_MAX+1. + * The modulo operation is done implicitly. + * + * The buf_read_ptr, munge_ptr, and buf_write_ptr members take the value + * of the corresponding capitalized _Count values modulo prealloc_bufsz. + * These correspond to byte indices in the physical buffer. The modulo + * operation is done by subtracting prealloc_bufsz when the value + * exceeds prealloc_bufsz (assuming prealloc_bufsz plus the increment is + * less than or equal to UINT_MAX). + */ + static void comedi_buf_map_kref_release(struct kref *kref) { struct comedi_buf_map *bm = -- 1.9.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/3] staging: comedi: ni_stc.h: cleanup the ni_private data
On 2014-05-29 18:56, H Hartley Sweeten wrote: The comedi drivers that use the ni_mio_common.c source share a private data struct. This struct is defined in ni_stc.h as a macro so that the real driver can add additional members to the struct. These additional members are not actually needed since they are either unused or can be found when needed. Remove the macro and define the private data as a real struct. Remove some unused members from the private data. Add some callbacks to the private data to remove the read/write macros that the real drivers use to access the hardware. Note: the last patch is pretty large. If needed I can break it up to remove each of the macros one at a time. The last patch is mostly a lot of straightforward substitution, so I think it's quite easy to follow despite being long. H Hartley Sweeten (3): staging: comedi: ni_stc.h: remove NI_PRIVATE_COMMON macro staging: comedi: ni_stc.h: remove unused members from struct ni_private staging: comedi: ni_stc.h: add read/write callbacks to struct ni_private drivers/staging/comedi/drivers/ni_atmio.c | 78 +++-- drivers/staging/comedi/drivers/ni_mio_common.c | 385 + drivers/staging/comedi/drivers/ni_mio_cs.c | 59 ++-- drivers/staging/comedi/drivers/ni_pcimio.c | 123 +--- drivers/staging/comedi/drivers/ni_stc.h| 173 +-- 5 files changed, 467 insertions(+), 351 deletions(-) Looks good! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 0/5] staging: comedi: addi_apci_1564: fix Change-of-State interrupt functionality
On 2014-06-04 03:32, Chase Southwood wrote: This patchset introduces a new private data struct for this driver, adds all of the code required to support Change-of-State interrupts for the digital input subdevice, and finally fixes apci1564_interrupt() to service this type of interrupt correctly. CHANGES FROM v1: *leave the send_sig() calls in for now, until the proper replacement can be implemented. *removed unused static globals, removed the remaining one into the private data struct. *private data struct moved into addi_apci_1564.c. *patches 4/6 and 5/6 from v1 have been merged into patch 4/5 here. *(*cancel) for the interrupt subdevice has been reduced to just disable DI interrupts rather than using the board's reset function. *support for all interrupts issued by the board has been kept in apci1564_interrupt(), rather than stripping everything out except for DI interrupt support. However, DI interrupt support has still been fixed. Chase Southwood (5): staging: comedi: addi_apci_1564: remove use of devpriv->b_OutputMemoryStatus staging: comedi: addi_apci_1564: remove unused static variables staging: comedi: addi_apci_1564: introduce apci1564_private struct staging: comedi: addi_apci_1564: add Change-of-State interrupt subdevice and required functions staging: comedi: addi_apci_1564: move apci1564_interrupt() into addi_apci_1564.c .../comedi/drivers/addi-data/hwdrv_apci1564.c | 304 +++ drivers/staging/comedi/drivers/addi_apci_1564.c| 433 +++-- 2 files changed, 454 insertions(+), 283 deletions(-) Looks good! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 1/2] Staging: unisys: use Linux coding convention for function names
Changed function declarations for VBUSCHANNEL_devInfoToStringBuffer() and ULTRA_VBUS_init_channel() to conform to Linux kernel coding convention. Signed-off-by: Ken Cox --- drivers/staging/unisys/common-spar/include/channels/vbuschannel.h | 4 ++-- drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h | 2 +- drivers/staging/unisys/uislib/uislib.c| 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h index 0dd3e2d..000182c 100644 --- a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h +++ b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h @@ -94,8 +94,8 @@ typedef struct _ULTRA_VBUS_CHANNEL_PROTOCOL { sizeof(ULTRA_VBUS_DEVICEINFO))) #define VBUS_CH_SIZE(MAXDEVICES) COVER(VBUS_CH_SIZE_EXACT(MAXDEVICES), 4096) -static INLINE void -ULTRA_VBUS_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, +static inline void +ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, int bytesAllocated) { /* Please note that the memory at does NOT necessarily have space diff --git a/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h b/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h index 8c0259a..abf01f6 100644 --- a/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h +++ b/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h @@ -146,7 +146,7 @@ VBUSCHANNEL_itoa(char *p, int remain, int num) * Returns the number of bytes written to . */ static inline int -VBUSCHANNEL_devInfoToStringBuffer(ULTRA_VBUS_DEVICEINFO __iomem *devInfo, +vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO __iomem *devInfo, char *p, int remain, int devix) { char __iomem *psrc; diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index d4a7ef8..70cc00f 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -148,7 +148,7 @@ init_vbus_channel(U64 channelAddr, U32 channelBytes, int isServer) rc = NULL; goto Away; } - ULTRA_VBUS_init_channel(pChan, channelBytes); + ultra_vbus_init_channel(pChan, channelBytes); } else { if (!ULTRA_VBUS_CHANNEL_OK_CLIENT(pChan, NULL)) { ERRDRV("%s channel cannot be used", __func__); -- 1.8.5.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 2/2] Staging: unisys: Fix sparse warnings in uislib
Added I/O versions for the functions vbuschannel_devinfo_to_string() and ultra_vbus_init_channel() to get rid of noderef sparse warnings when accessing I/O space. Signed-off-by: Ken Cox --- .../staging/unisys/common-spar/include/channels/vbuschannel.h | 11 ++- drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h | 11 ++- drivers/staging/unisys/uislib/uislib.c| 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h index 000182c..fc997bc 100644 --- a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h +++ b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h @@ -95,7 +95,7 @@ typedef struct _ULTRA_VBUS_CHANNEL_PROTOCOL { #define VBUS_CH_SIZE(MAXDEVICES) COVER(VBUS_CH_SIZE_EXACT(MAXDEVICES), 4096) static inline void -ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, +ultra_vbus_init_channel_io(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, int bytesAllocated) { /* Please note that the memory at does NOT necessarily have space @@ -130,6 +130,15 @@ ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, &x->HdrInfo.devInfoCount); } +static inline void +ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL *x, + int bytes_allocated) +{ + ultra_vbus_init_channel_io( + (__force ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *)x, + bytes_allocated); +} + #pragma pack(pop) #endif diff --git a/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h b/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h index abf01f6..c18efe5 100644 --- a/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h +++ b/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h @@ -146,7 +146,7 @@ VBUSCHANNEL_itoa(char *p, int remain, int num) * Returns the number of bytes written to . */ static inline int -vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO __iomem *devInfo, +vbuschannel_devinfo_to_string_io(ULTRA_VBUS_DEVICEINFO __iomem *devInfo, char *p, int remain, int devix) { char __iomem *psrc; @@ -206,4 +206,13 @@ vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO __iomem *devInfo, return chars; } +static inline int +vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO *devinfo, + char *p, int remain, int devix) +{ + return vbuschannel_devinfo_to_string_io( + (ULTRA_VBUS_DEVICEINFO __force __iomem *)devinfo, + p, remain, devix); +} + #endif diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index 70cc00f..4d7c7f8 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -148,7 +148,7 @@ init_vbus_channel(U64 channelAddr, U32 channelBytes, int isServer) rc = NULL; goto Away; } - ultra_vbus_init_channel(pChan, channelBytes); + ultra_vbus_init_channel_io(pChan, channelBytes); } else { if (!ULTRA_VBUS_CHANNEL_OK_CLIENT(pChan, NULL)) { ERRDRV("%s channel cannot be used", __func__); -- 1.8.5.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 0/2] Staging: unisys: uislib: address sparse noderef warnings
This series gets rid of some sparse noderef warnings by adding I/O versions of the functions that are producing the warnings. In the first patch, we clean up the function names so they are acceptable then we add the new functions in the second patch. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 2/2] Staging: unisys: Fix sparse warnings in uislib
On Thu, Jun 05, 2014 at 11:04:32AM -0500, Ken Cox wrote: > Added I/O versions for the functions vbuschannel_devinfo_to_string() > and ultra_vbus_init_channel() to get rid of noderef sparse warnings when > accessing I/O space. > > Signed-off-by: Ken Cox > --- > .../staging/unisys/common-spar/include/channels/vbuschannel.h | 11 > ++- > drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h | 11 > ++- > drivers/staging/unisys/uislib/uislib.c| 2 +- > 3 files changed, 21 insertions(+), 3 deletions(-) > > diff --git > a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h > b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h > index 000182c..fc997bc 100644 > --- a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h > +++ b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h > @@ -95,7 +95,7 @@ typedef struct _ULTRA_VBUS_CHANNEL_PROTOCOL { > #define VBUS_CH_SIZE(MAXDEVICES) COVER(VBUS_CH_SIZE_EXACT(MAXDEVICES), 4096) > > static inline void > -ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, > +ultra_vbus_init_channel_io(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, > int bytesAllocated) > { > /* Please note that the memory at does NOT necessarily have space > @@ -130,6 +130,15 @@ ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL > __iomem *x, > &x->HdrInfo.devInfoCount); > } > > +static inline void > +ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL *x, > + int bytes_allocated) > +{ > + ultra_vbus_init_channel_io( > + (__force ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *)x, Why do you need to __force anything here? Why not fix it up in the callers by marking those variables properly? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 2/2] Staging: unisys: Fix sparse warnings in uislib
On 06/05/2014 11:22 AM, Greg KH wrote: On Thu, Jun 05, 2014 at 11:04:32AM -0500, Ken Cox wrote: Added I/O versions for the functions vbuschannel_devinfo_to_string() and ultra_vbus_init_channel() to get rid of noderef sparse warnings when accessing I/O space. Signed-off-by: Ken Cox --- .../staging/unisys/common-spar/include/channels/vbuschannel.h | 11 ++- drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h | 11 ++- drivers/staging/unisys/uislib/uislib.c| 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h index 000182c..fc997bc 100644 --- a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h +++ b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h @@ -95,7 +95,7 @@ typedef struct _ULTRA_VBUS_CHANNEL_PROTOCOL { #define VBUS_CH_SIZE(MAXDEVICES) COVER(VBUS_CH_SIZE_EXACT(MAXDEVICES), 4096) static inline void -ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, +ultra_vbus_init_channel_io(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, int bytesAllocated) { /* Please note that the memory at does NOT necessarily have space @@ -130,6 +130,15 @@ ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, &x->HdrInfo.devInfoCount); } +static inline void +ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL *x, + int bytes_allocated) +{ + ultra_vbus_init_channel_io( + (__force ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *)x, Why do you need to __force anything here? Why not fix it up in the callers by marking those variables properly? I was using memcpy_toio(), etc. as an example, but can see that it would be more portable to take care of it in the calling function, even though this is x86_64 only. I will rework the patch. Thanks, Ken ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
video_omap4 and control module access (was ... from opensuse-arm list)
Full thread in opensuse mailing list: http://lists.opensuse.org/archive/opensuse-arm/2014-06/msg4.html Moving this thread out of opensuse to kernel public lists +CC of maintainers relevant to the control module/clk. On 06/05/2014 11:17 AM, Nishanth Menon wrote: > On 06/05/2014 10:56 AM, Laurent Pinchart wrote: >> Hi Nishanth, >> >> On Thursday 05 June 2014 08:37:27 Nishanth Menon wrote: >>> On 06/05/2014 08:29 AM, Takashi Iwai wrote: Alexander Graf wrote: > On 04.06.14 09:28, Matwey V. Kornilov wrote: >> On 19.05.2014 14:02, Alexander Graf wrote: note: expected 'uint32_t *' but argument is of type 'dma_addr_t *' >> >> I've fixed that one, but can not figure out what is wrong now: >> >> https://build.opensuse.org/package/live_build_log/home:matwey:pcm051:13. >> 2/kernel-default/standard/armv7l>> > > If I had to guess I'd say someone forgot to put a few EXPORT_SYMBOLs > into the code and never tested whether compiling his v4l / video driver > actually works when it's compiled as a module. The problem is CONFIG_VIDEO_OMAP4=y while the whole V4L stuff is built as modules. You have to build V4L into kernel, too. That said, it's a Kconfig dependency issue. Looking at the code, though, omap4-iss driver itself is written to be built also as a module. But its Kconfig is bool, so the problem happens. Maybe a patch like below works? Takashi --- diff --git a/drivers/staging/media/omap4iss/Kconfig b/drivers/staging/media/omap4iss/Kconfig index 78b0fba7047e..0c3e3c1acd4f 100644 --- a/drivers/staging/media/omap4iss/Kconfig +++ b/drivers/staging/media/omap4iss/Kconfig @@ -1,5 +1,5 @@ config VIDEO_OMAP4 - bool "OMAP 4 Camera support" + tristate "OMAP 4 Camera support" depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && I2C && ARCH_OMAP4 select VIDEOBUF2_DMA_CONTIG ---help--- >>> >>> +Sakari and Laurent. Full thread: >>> http://lists.opensuse.org/archive/opensuse-arm/2014-06/msg4.html >>> >>> I agree, I see no reason for these to be bool. >> >> There's no good reason for the option to be a boolean, but there's a bad >> reason :-/ The OMAP4 ISS driver calls the omap4_ctrl_pad_readl() and >> omap4_ctrl_pad_writel() functions, which are not exported. The right way to >> fix this would be to implement a control module driver for the OMAP4, but >> that's not a straightforward task, and I don't have time to do so at the >> moment. >> > > a) control module: > from: drivers/staging/media/omap4iss/iss_csiphy.c > /* >* SCM.CONTROL_CAMERA_RX >* - bit [31] : CSIPHY2 lane 2 enable (4460+ only) >* - bit [30:29] : CSIPHY2 per-lane enable (1 to 0) >* - bit [28:24] : CSIPHY1 per-lane enable (4 to 0) >* - bit [21] : CSIPHY2 CTRLCLK enable >* - bit [20:19] : CSIPHY2 config: 00 d-phy, 01/10 ccp2 >* - bit [18] : CSIPHY1 CTRLCLK enable >* - bit [17:16] : CSIPHY1 config: 00 d-phy, 01/10 ccp2 >*/ > cam_rx_ctrl = omap4_ctrl_pad_readl( > OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_CAMERA_RX); > > Is'nt that what pinctrl does? And should be rather trivial to do, no? > > c) if there is something else that these bits do that I cant figure > out, example: for specific stuff like control module bit for clock > (which the above code kinda sounds similar to), like how we had for > display recently - model it with dts clock[1] > > b) if you cannot use existing frameworks OR use pinctrl, last ditch > way to do it in pdata-quirks in mach-omap2 with fops being send over. > > We did debate putting entire control module as a syscon_driver, the > current split (prior to syscon) just makes it impractical to switch > over to it at this point in time, maybe once all dt-fication is done, > it might be possible to switch over to that. > > [1] http://marc.info/?l=linux-omap&m=140127434229399&w=2 > -- Regards, Nishanth Menon ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: video_omap4 and control module access (was ... from opensuse-arm list)
2014-06-05 20:47 GMT+04:00 Nishanth Menon : > Full thread in opensuse mailing list: > > http://lists.opensuse.org/archive/opensuse-arm/2014-06/msg4.html > > Moving this thread out of opensuse to kernel public lists +CC of > maintainers relevant to the control module/clk. Full build log (600KB) and config are available here: http://yadi.sk/d/sVEkp5CjSQDF8 http://yadi.sk/d/c-9N18f8SQDEs -- With best regards, Matwey V. Kornilov http://blog.matwey.name xmpp:0x2...@jabber.ru ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: video_omap4 and control module access (was ... from opensuse-arm list)
Hi Nishanth, On Thursday 05 June 2014 11:47:19 Nishanth Menon wrote: > Full thread in opensuse mailing list: > > http://lists.opensuse.org/archive/opensuse-arm/2014-06/msg4.html > > Moving this thread out of opensuse to kernel public lists +CC of > maintainers relevant to the control module/clk. > > On 06/05/2014 11:17 AM, Nishanth Menon wrote: > > On 06/05/2014 10:56 AM, Laurent Pinchart wrote: > >> On Thursday 05 June 2014 08:37:27 Nishanth Menon wrote: > >>> On 06/05/2014 08:29 AM, Takashi Iwai wrote: > Alexander Graf wrote: > > On 04.06.14 09:28, Matwey V. Kornilov wrote: > >> On 19.05.2014 14:02, Alexander Graf wrote: > note: expected 'uint32_t *' but argument is of type 'dma_addr_t *' > >> > >> I've fixed that one, but can not figure out what is wrong now: > >> > >> https://build.opensuse.org/package/live_build_log/home:matwey:pcm051: > >> 13.2/kernel-default/standard/armv7l>> > > > > If I had to guess I'd say someone forgot to put a few EXPORT_SYMBOLs > > into the code and never tested whether compiling his v4l / video > > driver actually works when it's compiled as a module. > > The problem is CONFIG_VIDEO_OMAP4=y while the whole V4L stuff is built > as modules. You have to build V4L into kernel, too. > That said, it's a Kconfig dependency issue. > > Looking at the code, though, omap4-iss driver itself is written to be > built also as a module. But its Kconfig is bool, so the problem > happens. Maybe a patch like below works? > > Takashi > > --- > diff --git a/drivers/staging/media/omap4iss/Kconfig > b/drivers/staging/media/omap4iss/Kconfig index > 78b0fba7047e..0c3e3c1acd4f > 100644 > --- a/drivers/staging/media/omap4iss/Kconfig > +++ b/drivers/staging/media/omap4iss/Kconfig > @@ -1,5 +1,5 @@ > > config VIDEO_OMAP4 > -bool "OMAP 4 Camera support" > +tristate "OMAP 4 Camera support" > depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && I2C && > ARCH_OMAP4 > select VIDEOBUF2_DMA_CONTIG > ---help--- > >>> > >>> +Sakari and Laurent. Full thread: > >>> http://lists.opensuse.org/archive/opensuse-arm/2014-06/msg4.html > >>> > >>> I agree, I see no reason for these to be bool. > >> > >> There's no good reason for the option to be a boolean, but there's a bad > >> reason :-/ The OMAP4 ISS driver calls the omap4_ctrl_pad_readl() and > >> omap4_ctrl_pad_writel() functions, which are not exported. The right way > >> to fix this would be to implement a control module driver for the OMAP4, > >> but that's not a straightforward task, and I don't have time to do so at > >> the moment. > > > > a) control module: > > from: drivers/staging/media/omap4iss/iss_csiphy.c > > > > /* > > > >* SCM.CONTROL_CAMERA_RX > >* - bit [31] : CSIPHY2 lane 2 enable (4460+ only) > >* - bit [30:29] : CSIPHY2 per-lane enable (1 to 0) > >* - bit [28:24] : CSIPHY1 per-lane enable (4 to 0) > >* - bit [21] : CSIPHY2 CTRLCLK enable > >* - bit [20:19] : CSIPHY2 config: 00 d-phy, 01/10 ccp2 > >* - bit [18] : CSIPHY1 CTRLCLK enable > >* - bit [17:16] : CSIPHY1 config: 00 d-phy, 01/10 ccp2 > >*/ > > > > cam_rx_ctrl = omap4_ctrl_pad_readl( > > > > OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_CAMERA_RX); > > > > Is'nt that what pinctrl does? And should be rather trivial to do, no? It's a bit of a grey area. While enabling/disabling CSI lanes could be considered as falling into the scope of pinctrl (but even there I have some doubts, as this is one level beyond pin muxing in my opinion), pushing clock enabling/disabling to pinctrl would require a really big shoehorn :-) The register also controls the CSI2 PHY mode of operation (CCP2, CSI1 or CSI2), which doesn't really look like pinctrl territory to me. Let's also keep in mind that the configuration currently hardcoded by the driver is a shortcut. We want to be able to control each field in the register dynamically and independently. We can't apply partial pinctrl configurations today, so we would need to declare one configuration for every field combination, which really doesn't scale. > > c) if there is something else that these bits do that I cant figure > > out, example: for specific stuff like control module bit for clock > > (which the above code kinda sounds similar to), like how we had for > > display recently - model it with dts clock[1] The TRM ISS section states that "(vii) A dedicated internal clock gate control is present for each PHY. Enable or disable the internal CTRLCLK from the CAMERARX_CSI22_CTRLCLKE[21] CAMERARX_CSI22_CTRLCLKE bit or the [18] CAMERARX_CSI21_CTRLCLKE bit." Those two of the bits could probably be exposed through CCF, and [1] seems to go in the right direction for that. We will still need a solution for the other bits though, as we will need to handl
[Patch v3 3/4] Staging: unisys: make function names Linux compliant
Changed function declarations in drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h so that the function names follow Linux coding standards. Signed-off-by: Ken Cox --- .../unisys/common-spar/include/vbusdeviceinfo.h| 28 +++--- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h b/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h index abf01f6..7164868 100644 --- a/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h +++ b/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h @@ -50,7 +50,7 @@ typedef struct _ULTRA_VBUS_DEVICEINFO { * to a buffer at , had it been infinitely big. */ static inline int -VBUSCHANNEL_sanitize_buffer(char *p, int remain, char __iomem *src, int srcmax) +vbuschannel_sanitize_buffer(char *p, int remain, char __iomem *src, int srcmax) { int chars = 0; int nonprintable_streak = 0; @@ -99,7 +99,7 @@ VBUSCHANNEL_sanitize_buffer(char *p, int remain, char __iomem *src, int srcmax) * an environment-independent way (since we are in a common header file). */ static inline int -VBUSCHANNEL_itoa(char *p, int remain, int num) +vbuschannel_itoa(char *p, int remain, int num) { int digits = 0; char s[32]; @@ -146,22 +146,22 @@ VBUSCHANNEL_itoa(char *p, int remain, int num) * Returns the number of bytes written to . */ static inline int -vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO __iomem *devInfo, +vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO __iomem *devinfo, char *p, int remain, int devix) { char __iomem *psrc; int nsrc, x, i, pad; int chars = 0; - psrc = &(devInfo->devType[0]); - nsrc = sizeof(devInfo->devType); - if (VBUSCHANNEL_sanitize_buffer(NULL, 0, psrc, nsrc) <= 0) + psrc = &(devinfo->devType[0]); + nsrc = sizeof(devinfo->devType); + if (vbuschannel_sanitize_buffer(NULL, 0, psrc, nsrc) <= 0) return 0; /* emit device index */ if (devix >= 0) { VBUSCHANNEL_ADDACHAR('[', p, remain, chars); - x = VBUSCHANNEL_itoa(p, remain, devix); + x = vbuschannel_itoa(p, remain, devix); p += x; remain -= x; chars += x; @@ -173,7 +173,7 @@ vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO __iomem *devInfo, } /* emit device type */ - x = VBUSCHANNEL_sanitize_buffer(p, remain, psrc, nsrc); + x = vbuschannel_sanitize_buffer(p, remain, psrc, nsrc); p += x; remain -= x; chars += x; @@ -183,9 +183,9 @@ vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO __iomem *devInfo, VBUSCHANNEL_ADDACHAR(' ', p, remain, chars); /* emit driver name */ - psrc = &(devInfo->drvName[0]); - nsrc = sizeof(devInfo->drvName); - x = VBUSCHANNEL_sanitize_buffer(p, remain, psrc, nsrc); + psrc = &(devinfo->drvName[0]); + nsrc = sizeof(devinfo->drvName); + x = vbuschannel_sanitize_buffer(p, remain, psrc, nsrc); p += x; remain -= x; chars += x; @@ -195,9 +195,9 @@ vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO __iomem *devInfo, VBUSCHANNEL_ADDACHAR(' ', p, remain, chars); /* emit strings */ - psrc = &(devInfo->infoStrings[0]); - nsrc = sizeof(devInfo->infoStrings); - x = VBUSCHANNEL_sanitize_buffer(p, remain, psrc, nsrc); + psrc = &(devinfo->infoStrings[0]); + nsrc = sizeof(devinfo->infoStrings); + x = vbuschannel_sanitize_buffer(p, remain, psrc, nsrc); p += x; remain -= x; chars += x; -- 1.8.5.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[Patch v3 2/4] Staging: unisys: Fix sparse warnings in uislib
Added I/O version for the function ultra_vbus_init_channel() to get rid of noderef sparse warnings when accessing I/O space. Signed-off-by: Ken Cox --- .../common-spar/include/channels/vbuschannel.h | 40 -- drivers/staging/unisys/uislib/uislib.c | 2 +- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h index 000182c..af5a1ff 100644 --- a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h +++ b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h @@ -95,12 +95,46 @@ typedef struct _ULTRA_VBUS_CHANNEL_PROTOCOL { #define VBUS_CH_SIZE(MAXDEVICES) COVER(VBUS_CH_SIZE_EXACT(MAXDEVICES), 4096) static inline void -ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, - int bytesAllocated) +ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL *x, + int bytes) { /* Please note that the memory at does NOT necessarily have space * for DevInfo structs allocated at the end, which is why we do NOT use - * to clear. */ + * to clear. */ + memset(x, 0, sizeof(ULTRA_VBUS_CHANNEL_PROTOCOL)); + if (bytes < (int) sizeof(ULTRA_VBUS_CHANNEL_PROTOCOL)) + return; + + x->ChannelHeader.VersionId = ULTRA_VBUS_CHANNEL_PROTOCOL_VERSIONID; + x->ChannelHeader.Signature = ULTRA_VBUS_CHANNEL_PROTOCOL_SIGNATURE; + x->ChannelHeader.SrvState = CHANNELSRV_READY; + x->ChannelHeader.HeaderSize = sizeof(x->ChannelHeader); + x->ChannelHeader.Size = bytes; + memcpy(&x->ChannelHeader.Type, &UltraVbusChannelProtocolGuid, + sizeof(x->ChannelHeader.Type)); + memcpy(&x->ChannelHeader.ZoneGuid, &NULL_UUID_LE, sizeof(uuid_le)); + x->HdrInfo.structBytes = sizeof(ULTRA_VBUS_HEADERINFO); + x->HdrInfo.chpInfoByteOffset = sizeof(ULTRA_VBUS_HEADERINFO); + x->HdrInfo.busInfoByteOffset += sizeof(ULTRA_VBUS_DEVICEINFO); + x->HdrInfo.devInfoByteOffset += sizeof(ULTRA_VBUS_DEVICEINFO); + x->HdrInfo.deviceInfoStructBytes = sizeof(ULTRA_VBUS_DEVICEINFO); + bytes -= (sizeof(ULTRA_CHANNEL_PROTOCOL) + + x->HdrInfo.devInfoByteOffset); + x->HdrInfo.devInfoCount = bytes / x->HdrInfo.deviceInfoStructBytes; +} + +static inline void +ultra_vbus_init_channel_io(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, + int bytesAllocated) +{ + /* +* This is the same as ultra_vbus_init_channel() above, except +* that it operates on I/O space. +* +* Please note that the memory at does NOT necessarily have space +* for DevInfo structs allocated at the end, which is why we do NOT use +* to clear. +*/ memset_io(x, 0, sizeof(ULTRA_VBUS_CHANNEL_PROTOCOL)); if (bytesAllocated < (int) sizeof(ULTRA_VBUS_CHANNEL_PROTOCOL)) return; diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index 70cc00f..4d7c7f8 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -148,7 +148,7 @@ init_vbus_channel(U64 channelAddr, U32 channelBytes, int isServer) rc = NULL; goto Away; } - ultra_vbus_init_channel(pChan, channelBytes); + ultra_vbus_init_channel_io(pChan, channelBytes); } else { if (!ULTRA_VBUS_CHANNEL_OK_CLIENT(pChan, NULL)) { ERRDRV("%s channel cannot be used", __func__); -- 1.8.5.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[Patch v3 1/4] Staging: unisys: use Linux coding convention for function names
Changed function declarations for VBUSCHANNEL_devInfoToStringBuffer() and ULTRA_VBUS_init_channel() to conform to Linux kernel coding convention. Signed-off-by: Ken Cox --- drivers/staging/unisys/common-spar/include/channels/vbuschannel.h | 4 ++-- drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h | 2 +- drivers/staging/unisys/uislib/uislib.c| 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h index 0dd3e2d..000182c 100644 --- a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h +++ b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h @@ -94,8 +94,8 @@ typedef struct _ULTRA_VBUS_CHANNEL_PROTOCOL { sizeof(ULTRA_VBUS_DEVICEINFO))) #define VBUS_CH_SIZE(MAXDEVICES) COVER(VBUS_CH_SIZE_EXACT(MAXDEVICES), 4096) -static INLINE void -ULTRA_VBUS_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, +static inline void +ultra_vbus_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x, int bytesAllocated) { /* Please note that the memory at does NOT necessarily have space diff --git a/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h b/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h index 8c0259a..abf01f6 100644 --- a/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h +++ b/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h @@ -146,7 +146,7 @@ VBUSCHANNEL_itoa(char *p, int remain, int num) * Returns the number of bytes written to . */ static inline int -VBUSCHANNEL_devInfoToStringBuffer(ULTRA_VBUS_DEVICEINFO __iomem *devInfo, +vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO __iomem *devInfo, char *p, int remain, int devix) { char __iomem *psrc; diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index d4a7ef8..70cc00f 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -148,7 +148,7 @@ init_vbus_channel(U64 channelAddr, U32 channelBytes, int isServer) rc = NULL; goto Away; } - ULTRA_VBUS_init_channel(pChan, channelBytes); + ultra_vbus_init_channel(pChan, channelBytes); } else { if (!ULTRA_VBUS_CHANNEL_OK_CLIENT(pChan, NULL)) { ERRDRV("%s channel cannot be used", __func__); -- 1.8.5.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 0/2] Staging: unisys: uislib: address sparse noderef warnings
This series gets rid of some sparse noderef warnings by adding I/O versions of the functions that are producing the warnings and also removing __iomem declarations where they are not needed. While we are at it, we fix up the function names of the functions that we are modifying so that they comply with Linux coding standards. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[Patch v3 4/4] Staging: unisys: Fix noderef sparse warnings in vbusdeviceinfo.h
vbuschannel_devinfo_to_string() was declared with the devinfo argument as a pointer to __iomem space. No callers of this function need the __iomem space, so I removed that constraint. Same thing goes for vbuschannel_sanitize_buffer(). It doesn't need to operate on I/O space. Signed-off-by: Ken Cox --- drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h b/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h index 7164868..45e311c 100644 --- a/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h +++ b/drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h @@ -50,12 +50,12 @@ typedef struct _ULTRA_VBUS_DEVICEINFO { * to a buffer at , had it been infinitely big. */ static inline int -vbuschannel_sanitize_buffer(char *p, int remain, char __iomem *src, int srcmax) +vbuschannel_sanitize_buffer(char *p, int remain, char *src, int srcmax) { int chars = 0; int nonprintable_streak = 0; while (srcmax > 0) { - if ((readb(src) >= ' ') && (readb(src) < 0x7f)) { + if ((*src >= ' ') && (*src < 0x7f)) { if (nonprintable_streak) { if (remain > 0) { *p = ' '; @@ -67,7 +67,7 @@ vbuschannel_sanitize_buffer(char *p, int remain, char __iomem *src, int srcmax) nonprintable_streak = 0; } if (remain > 0) { - *p = readb(src); + *p = *src; p++; remain--; chars++; @@ -146,10 +146,10 @@ vbuschannel_itoa(char *p, int remain, int num) * Returns the number of bytes written to . */ static inline int -vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO __iomem *devinfo, +vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO *devinfo, char *p, int remain, int devix) { - char __iomem *psrc; + char *psrc; int nsrc, x, i, pad; int chars = 0; -- 1.8.5.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/3] Staging: rtl8192u: r8192U_core.c Rearranged statements to fix code-style errors
Rearranged statements around if and switch statements to address the following error: ERROR: trailing statements should be on next line Signed-off-by: Chaitanya Hazarey --- drivers/staging/rtl8192u/r8192U_core.c | 553 - 1 file changed, 402 insertions(+), 151 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 2a9150d..a9922dd 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -905,7 +905,8 @@ inline u16 ieeerate2rtlrate(int rate) static u16 rtl_rate[] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540}; inline u16 rtl8192_rate2rate(short rate) { - if (rate > 11) return 0; + if (rate > 11) + return 0; return rtl_rate[rate]; } @@ -1114,7 +1115,8 @@ struct sk_buff *DrvAggr_Aggregation(struct net_device *dev, struct ieee80211_drv tx_fwinfo->TxRate = MRateToHwRate8190Pci(tcb_desc->data_rate); tx_fwinfo->EnableCPUDur = tcb_desc->bTxEnableFwCalcDur; tx_fwinfo->Short = QueryIsShort(tx_fwinfo->TxHT, tx_fwinfo->TxRate, tcb_desc); - if (tcb_desc->bAMPDUEnable) {//AMPDU enabled + if (tcb_desc->bAMPDUEnable) + {//AMPDU enabled tx_fwinfo->AllowAggregation = 1; /* DWORD 1 */ tx_fwinfo->RxMF = tcb_desc->ampdu_factor; @@ -1329,36 +1331,87 @@ static void rtl8192_config_rate(struct net_device *dev, u16 *rate_config) for (i = 0; i < net->rates_len; i++) { basic_rate = net->rates[i]&0x7f; - switch (basic_rate) { - case MGN_1M:*rate_config |= RRSR_1M;break; - case MGN_2M:*rate_config |= RRSR_2M;break; - case MGN_5_5M: *rate_config |= RRSR_5_5M; break; - case MGN_11M: *rate_config |= RRSR_11M; break; - case MGN_6M:*rate_config |= RRSR_6M;break; - case MGN_9M:*rate_config |= RRSR_9M;break; - case MGN_12M: *rate_config |= RRSR_12M; break; - case MGN_18M: *rate_config |= RRSR_18M; break; - case MGN_24M: *rate_config |= RRSR_24M; break; - case MGN_36M: *rate_config |= RRSR_36M; break; - case MGN_48M: *rate_config |= RRSR_48M; break; - case MGN_54M: *rate_config |= RRSR_54M; break; + switch (basic_rate) + { + case MGN_1M: + *rate_config |= RRSR_1M; + break; + case MGN_2M: + *rate_config |= RRSR_2M; + break; + case MGN_5_5M: + *rate_config |= RRSR_5_5M; + break; + case MGN_11M: + *rate_config |= RRSR_11M; + break; + case MGN_6M: + *rate_config |= RRSR_6M; + break; + case MGN_9M: + *rate_config |= RRSR_9M; + break; + case MGN_12M: + *rate_config |= RRSR_12M; + break; + case MGN_18M: + *rate_config |= RRSR_18M; + break; + case MGN_24M: + *rate_config |= RRSR_24M; + break; + case MGN_36M: + *rate_config |= RRSR_36M; + break; + case MGN_48M: + *rate_config |= RRSR_48M; + break; + case MGN_54M: + *rate_config |= RRSR_54M; + break; } } - for (i = 0; i < net->rates_ex_len; i++) { + for (i = 0; i < net->rates_ex_len; i++) + { basic_rate = net->rates_ex[i]&0x7f; - switch (basic_rate) { - case MGN_1M:*rate_config |= RRSR_1M;break; - case MGN_2M:*rate_config |= RRSR_2M;break; - case MGN_5_5M: *rate_config |= RRSR_5_5M; break; - case MGN_11M: *rate_config |= RRSR_11M; break; - case MGN_6M:*rate_config |= RRSR_6M;break; - case MGN_9M:*rate_config |= RRSR_9M;break; - case MGN_12M: *rate_config |= RRSR_12M; break; - case MGN_18M: *rate_conf
[PATCH 1/3] Staging: rtl8192u: r8192U_core.c Added a space after ','
Added spaces after ',' to fix the following warning: ERROR: space required after that ',' (ctx:VxV) Signed-off-by: Chaitanya Hazarey --- drivers/staging/rtl8192u/r8192U_core.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 24272c5..2a9150d 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -166,17 +166,17 @@ typedef struct _CHANNEL_LIST { } CHANNEL_LIST, *PCHANNEL_LIST; static CHANNEL_LIST ChannelPlan[] = { - {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64,149,153,157,161,165},24}, //FCC - {{1,2,3,4,5,6,7,8,9,10,11},11}, //IC - {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64},21}, //ETSI - {{1,2,3,4,5,6,7,8,9,10,11,12,13},13},//Spain. Change to ETSI. - {{1,2,3,4,5,6,7,8,9,10,11,12,13},13}, //France. Change to ETSI. - {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64},22}, //MKK //MKK - {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64},22},//MKK1 - {{1,2,3,4,5,6,7,8,9,10,11,12,13},13}, //Israel. - {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64},22}, // For 11a , TELEC - {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64}, 22}, //MIC - {{1,2,3,4,5,6,7,8,9,10,11,12,13,14},14} //For Global Domain. 1-11:active scan, 12-14 passive scan. //+YJ, 080626 + {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165}, 24}, //FCC + {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11}, //IC + {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21}, //ETSI + {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13},//Spain. Change to ETSI. + {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13}, //France. Change to ETSI. + {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22}, //MKK //MKK + {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22},//MKK1 + {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13}, //Israel. + {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22}, // For 11a , TELEC + {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22},//MIC + {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14} //For Global Domain. 1-11:active scan, 12-14 passive scan. //+YJ, 080626 }; static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/3] Staging: rtl8192u: r8192U_core.c Converted some C99 comments to fix code-style errors
Converted some C99 warnings to fix the following error: ERROR: trailing statements should be on next line Signed-off-by: Chaitanya Hazarey --- drivers/staging/rtl8192u/r8192U_core.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index a9922dd..9dba99d 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1433,7 +1433,7 @@ static void rtl8192_update_cap(struct net_device *dev, u16 cap) if (net->mode & (IEEE_G|IEEE_N_24G)) { u8 slot_time = 0; - if ((cap & WLAN_CAPABILITY_SHORT_SLOT) && (!priv->ieee80211->pHTInfo->bCurrentRT2RTLongSlotTime)) //short slot time + if ((cap & WLAN_CAPABILITY_SHORT_SLOT) && (!priv->ieee80211->pHTInfo->bCurrentRT2RTLongSlotTime)) /* short slot time */ slot_time = SHORT_SLOT_TIME; else //long slot time slot_time = NON_SHORT_SLOT_TIME; @@ -1500,11 +1500,11 @@ u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame, if (rtl8192_IsWirelessBMode(DataRate)) { - if (bManagementFrame || !bShortPreamble || DataRate == 10) // long preamble + if (bManagementFrame || !bShortPreamble || DataRate == 10) /* long preamble */ FrameTime = (u16)(144+48+(FrameLength*8/(DataRate/10))); else // Short preamble FrameTime = (u16)(72+24+(FrameLength*8/(DataRate/10))); - if ((FrameLength*8 % (DataRate/10)) != 0) //Get the Ceilling + if ((FrameLength*8 % (DataRate/10)) != 0) /* Get the Ceilling */ FrameTime++; } else {//802.11g DSSS-OFDM PLCP length field calculation. N_DBPS = N_DBPSOfRate(DataRate); @@ -1827,7 +1827,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) tx_fwinfo->TxRate = MRateToHwRate8190Pci(tcb_desc->data_rate); tx_fwinfo->EnableCPUDur = tcb_desc->bTxEnableFwCalcDur; tx_fwinfo->Short = QueryIsShort(tx_fwinfo->TxHT, tx_fwinfo->TxRate, tcb_desc); - if (tcb_desc->bAMPDUEnable) //AMPDU enabled + if (tcb_desc->bAMPDUEnable) /* AMPDU enabled */ { tx_fwinfo->AllowAggregation = 1; /* DWORD 1 */ @@ -2314,7 +2314,7 @@ void rtl8192_update_ratr_table(struct net_device *dev) break; case IEEE_N_24G: case IEEE_N_5G: - if (ieee->pHTInfo->PeerMimoPs == 0) //MIMO_PS_STATIC + if (ieee->pHTInfo->PeerMimoPs == 0) /* MIMO_PS_STATIC */ { ratr_value &= 0x0007F007; } else { @@ -2699,7 +2699,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) else priv->EEPROM_Def_Ver = 1; RT_TRACE(COMP_EPROM, "EEPROM_DEF_VER:%d\n", priv->EEPROM_Def_Ver); - if (priv->EEPROM_Def_Ver == 0) //old eeprom definition + if (priv->EEPROM_Def_Ver == 0) /* old eeprom definition */ { int i; if (bLoad_From_EEPOM) @@ -3111,14 +3111,14 @@ static bool rtl8192_adapter_start(struct net_device *dev) // #ifdef TO_DO_LIST if (Adapter->ResetProgress == RESET_TYPE_NORESET) { - if (pMgntInfo->RegRfOff == TRUE) // User disable RF via registry. + if (pMgntInfo->RegRfOff == TRUE) /* User disable RF via registry. */ { RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RegRfOff --\n")); MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW); // Those actions will be discard in MgntActSet_RF_State because of the same state for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++) PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x0); - } else if (pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) // H/W or S/W RF OFF before sleep. + } else if (pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) /* H/W or S/W RF OFF before sleep. */ { RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RfOffReason(%d) --\n", pMgntInfo->RfOffReason)); MgntActSet_RF_State(Adapter, eRfOff, pMgntInfo->RfOffReason); @@ -3647,7 +3647,7 @@ void rtl819x_watchdog_wqcallback(struct work_struct *work) } if ((priv->force_reset) || (priv->ResetProgress == RESET_TYPE_NORESET && (priv->bForcedSilentReset || - (!priv->bDisableNormalResetCheck && ResetType == RESET_TYPE_SILENT // This is control by OID set
[PATCH 1/5] staging: lirc: remove sa1100 support
The LIRC support for sa1100 appears to have never worked because it relies on header files that have never been present in git history. Actually trying to build the driver on an ARM sa1100 kernel fails, so let's just remove the broken support. Signed-off-by: Arnd Bergmann Cc: Jarod Wilson Cc: Mauro Carvalho Chehab Cc: Tuomas Tynkkynen Cc: linux-me...@vger.kernel.org --- drivers/staging/media/lirc/lirc_sir.c | 301 +- 1 file changed, 2 insertions(+), 299 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_sir.c b/drivers/staging/media/lirc/lirc_sir.c index e31cbb8..79da3ad 100644 --- a/drivers/staging/media/lirc/lirc_sir.c +++ b/drivers/staging/media/lirc/lirc_sir.c @@ -55,13 +55,6 @@ #include #include #include -#ifdef LIRC_ON_SA1100 -#include -#ifdef CONFIG_SA1100_COLLIE -#include -#include -#endif -#endif #include @@ -94,35 +87,6 @@ static void init_act200(void); static void init_act220(void); #endif -/*** SA1100 ***/ -#ifdef LIRC_ON_SA1100 -struct sa1100_ser2_registers { - /* HSSP control register */ - unsigned char hscr0; - /* UART registers */ - unsigned char utcr0; - unsigned char utcr1; - unsigned char utcr2; - unsigned char utcr3; - unsigned char utcr4; - unsigned char utdr; - unsigned char utsr0; - unsigned char utsr1; -} sr; - -static int irq = IRQ_Ser2ICP; - -#define LIRC_ON_SA1100_TRANSMITTER_LATENCY 0 - -/* pulse/space ratio of 50/50 */ -static unsigned long pulse_width = (13-LIRC_ON_SA1100_TRANSMITTER_LATENCY); -/* 100/freq-pulse_width */ -static unsigned long space_width = (13-LIRC_ON_SA1100_TRANSMITTER_LATENCY); -static unsigned int freq = 38000; /* modulation frequency */ -static unsigned int duty_cycle = 50; /* duty cycle of 50% */ - -#endif - #define RBUF_LEN 1024 #define WBUF_LEN 1024 @@ -205,17 +169,6 @@ static void drop_hardware(void); static int init_port(void); static void drop_port(void); -#ifdef LIRC_ON_SA1100 -static void on(void) -{ - PPSR |= PPC_TXD2; -} - -static void off(void) -{ - PPSR &= ~PPC_TXD2; -} -#else static inline unsigned int sinp(int offset) { return inb(io + offset); @@ -225,7 +178,6 @@ static inline void soutp(int offset, int value) { outb(value, io + offset); } -#endif #ifndef MAX_UDELAY_MS #define MAX_UDELAY_US 5000 @@ -305,10 +257,6 @@ static ssize_t lirc_write(struct file *file, const char __user *buf, size_t n, if (IS_ERR(tx_buf)) return PTR_ERR(tx_buf); i = 0; -#ifdef LIRC_ON_SA1100 - /* disable receiver */ - Ser2UTCR3 = 0; -#endif local_irq_save(flags); while (1) { if (i >= count) @@ -323,15 +271,6 @@ static ssize_t lirc_write(struct file *file, const char __user *buf, size_t n, i++; } local_irq_restore(flags); -#ifdef LIRC_ON_SA1100 - off(); - udelay(1000); /* wait 1ms for IR diode to recover */ - Ser2UTCR3 = 0; - /* clear status register to prevent unwanted interrupts */ - Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB); - /* enable receiver */ - Ser2UTCR3 = UTCR3_RXE|UTCR3_RIE; -#endif kfree(tx_buf); return count; } @@ -341,25 +280,12 @@ static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) u32 __user *uptr = (u32 __user *)arg; int retval = 0; u32 value = 0; -#ifdef LIRC_ON_SA1100 - - if (cmd == LIRC_GET_FEATURES) - value = LIRC_CAN_SEND_PULSE | - LIRC_CAN_SET_SEND_DUTY_CYCLE | - LIRC_CAN_SET_SEND_CARRIER | - LIRC_CAN_REC_MODE2; - else if (cmd == LIRC_GET_SEND_MODE) - value = LIRC_MODE_PULSE; - else if (cmd == LIRC_GET_REC_MODE) - value = LIRC_MODE_MODE2; -#else if (cmd == LIRC_GET_FEATURES) value = LIRC_CAN_SEND_PULSE | LIRC_CAN_REC_MODE2; else if (cmd == LIRC_GET_SEND_MODE) value = LIRC_MODE_PULSE; else if (cmd == LIRC_GET_REC_MODE) value = LIRC_MODE_MODE2; -#endif switch (cmd) { case LIRC_GET_FEATURES: @@ -372,37 +298,6 @@ static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) case LIRC_SET_REC_MODE: retval = get_user(value, uptr); break; -#ifdef LIRC_ON_SA1100 - case LIRC_SET_SEND_DUTY_CYCLE: - retval = get_user(value, uptr); - if (retval) - return retval; - if (value <= 0 || value > 100) - return -EINVAL; - /* (value/100)*(100/freq) */ - duty_cycle = value; - pulse_width = (unsigned long) duty_cycle*1/freq; - space_width = (unsigned long) 100L/freq-pulse_width; - if (pulse_width >= LIRC_ON_SA1100_TRANS
[PATCH 3/5] staging: sn9c102 depends on USB
If the USB code is a loadable module, this driver cannot be built-in. This adds an explicit dependency on CONFIG_USB so that Kconfig can force sn9c102 to be a module in this case. Signed-off-by: Arnd Bergmann Cc: Luca Risolia Cc: Mauro Carvalho Chehab Cc: linux-me...@vger.kernel.org Cc: linux-...@vger.kernel.org --- drivers/staging/media/sn9c102/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/sn9c102/Kconfig b/drivers/staging/media/sn9c102/Kconfig index c9aba59..10f586b 100644 --- a/drivers/staging/media/sn9c102/Kconfig +++ b/drivers/staging/media/sn9c102/Kconfig @@ -1,6 +1,6 @@ config USB_SN9C102 tristate "USB SN9C1xx PC Camera Controller support (DEPRECATED)" - depends on VIDEO_V4L2 && MEDIA_USB_SUPPORT + depends on VIDEO_V4L2 && MEDIA_USB_SUPPORT && USB ---help--- This driver is DEPRECATED, please use the gspca sonixb and sonixj modules instead. -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/5] staging: rtl8712, rtl8712: avoid lots of build warnings
The rtl8712 driver has an 'extern inline' function that contains an 'if', which causes lots of warnings with CONFIG_PROFILE_ALL_BRANCHES overriding the definition of 'if': drivers/staging/rtl8712/ieee80211.h:759:229: warning: '__f' is static but declared in inline function 'ieee80211_get_hdrlen' which is not static [enabled by default] This changes the driver to use 'static inline' instead, which happens to be the correct annotation anyway. Signed-off-by: Arnd Bergmann Cc: Larry Finger Cc: Florian Schilhabel --- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 10 +- drivers/staging/rtl8712/ieee80211.h| 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index e0aa069..1040bab 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2238,7 +2238,7 @@ static inline void *ieee80211_priv(struct net_device *dev) return ((struct ieee80211_device *)netdev_priv(dev))->priv; } -extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len) +static inline int ieee80211_is_empty_essid(const char *essid, int essid_len) { /* Single white space is for Linksys APs */ if (essid_len == 1 && essid[0] == ' ') @@ -2254,7 +2254,7 @@ extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len) return 1; } -extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode) +static inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode) { /* * It is possible for both access points and our device to support @@ -2280,7 +2280,7 @@ extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mod return 0; } -extern inline int ieee80211_get_hdrlen(u16 fc) +static inline int ieee80211_get_hdrlen(u16 fc) { int hdrlen = IEEE80211_3ADDR_LEN; @@ -2564,12 +2564,12 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee); extern const long ieee80211_wlan_frequencies[]; -extern inline void ieee80211_increment_scans(struct ieee80211_device *ieee) +static inline void ieee80211_increment_scans(struct ieee80211_device *ieee) { ieee->scans++; } -extern inline int ieee80211_get_scans(struct ieee80211_device *ieee) +static inline int ieee80211_get_scans(struct ieee80211_device *ieee) { return ieee->scans; } diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h index da4000e..8269be8 100644 --- a/drivers/staging/rtl8712/ieee80211.h +++ b/drivers/staging/rtl8712/ieee80211.h @@ -734,7 +734,7 @@ enum ieee80211_state { #define IEEE_G(1<<2) #define IEEE_MODE_MASK(IEEE_A|IEEE_B|IEEE_G) -extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len) +static inline int ieee80211_is_empty_essid(const char *essid, int essid_len) { /* Single white space is for Linksys APs */ if (essid_len == 1 && essid[0] == ' ') @@ -748,7 +748,7 @@ extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len) return 1; } -extern inline int ieee80211_get_hdrlen(u16 fc) +static inline int ieee80211_get_hdrlen(u16 fc) { int hdrlen = 24; -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/5] staging/iio: IIO_SIMPLE_DUMMY_BUFFER neds IIO_BUFFER
An obviously missing 'select' statement, without this we get a link error Signed-off-by: Arnd Bergmann Cc: Jonathan Cameron Cc: linux-...@vger.kernel.org --- drivers/staging/iio/Kconfig | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/iio/Kconfig b/drivers/staging/iio/Kconfig index b36feb0..fa38be0 100644 --- a/drivers/staging/iio/Kconfig +++ b/drivers/staging/iio/Kconfig @@ -36,10 +36,11 @@ config IIO_SIMPLE_DUMMY_EVENTS Add some dummy events to the simple dummy driver. config IIO_SIMPLE_DUMMY_BUFFER - boolean "Buffered capture support" - select IIO_KFIFO_BUF - help - Add buffered data capture to the simple dummy driver. + boolean "Buffered capture support" + select IIO_BUFFER + select IIO_KFIFO_BUF + help + Add buffered data capture to the simple dummy driver. endif # IIO_SIMPLE_DUMMY -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/5] staging: wlags49_h2: avoid PROFILE_ALL_BRANCHES warnings
Using an 'if()' inside of an 'extern inline' function causes a gcc warning when CONFIG_PROFILE_ALL_BRANCHES is set every time the function is called, which gets very noisy: In file included from /git/arm-soc/drivers/staging/wlags49_h2/wl_wext.c:73:0: drivers/staging/wlags49_h2/wl_internal.h:1035:216: warning: '__f' is static but declared in inline function 'wl_act_int_off' which is not static [enabled by default] if(lp->is_handling_int == WL_HANDLING_INT) { Fortunately there is a trivial workaround, so we can avoid the problem by making the functions in question 'static inline' rather than 'extern inline'. Signed-off-by: Arnd Bergmann Cc: Henk de Groot --- drivers/staging/wlags49_h2/wl_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wlags49_h2/wl_internal.h b/drivers/staging/wlags49_h2/wl_internal.h index 78129e9..1ecb5cb 100644 --- a/drivers/staging/wlags49_h2/wl_internal.h +++ b/drivers/staging/wlags49_h2/wl_internal.h @@ -1013,7 +1013,7 @@ static inline void wl_unlock(struct wl_private *lp, /* Interrupt enable disable functions */ // -extern inline void wl_act_int_on(struct wl_private *lp) +static inline void wl_act_int_on(struct wl_private *lp) { /* * Only do something when the driver is handling @@ -1025,7 +1025,7 @@ extern inline void wl_act_int_on(struct wl_private *lp) } } -extern inline void wl_act_int_off(struct wl_private *lp) +static inline void wl_act_int_off(struct wl_private *lp) { /* * Only do something when the driver is handling -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/5] randconfig build fixes for staging
Hi Greg, Here are a couple of simple fixes from my backlog of ARM randconfig bugs. Nothing urgent, they can probably all go into next for 3.17 after the merge window, but see for yourself. Arnd Arnd Bergmann (5): staging: lirc: remove sa1100 support staging/iio: IIO_SIMPLE_DUMMY_BUFFER neds IIO_BUFFER staging: sn9c102 depends on USB staging: wlags49_h2: avoid PROFILE_ALL_BRANCHES warnings staging: rtl8712, rtl8712: avoid lots of build warnings drivers/staging/iio/Kconfig| 9 +- drivers/staging/media/lirc/lirc_sir.c | 301 + drivers/staging/media/sn9c102/Kconfig | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 10 +- drivers/staging/rtl8712/ieee80211.h| 4 +- drivers/staging/wlags49_h2/wl_internal.h | 4 +- 6 files changed, 17 insertions(+), 313 deletions(-) -- 1.8.3.2 Cc: Florian Schilhabel Cc: Henk de Groot Cc: Jarod Wilson Cc: Jonathan Cameron Cc: Larry Finger Cc: Luca Risolia Cc: Mauro Carvalho Chehab Cc: Tuomas Tynkkynen Cc: linux-...@vger.kernel.org Cc: linux-me...@vger.kernel.org Cc: linux-...@vger.kernel.org ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] [SCSI] Fix a bug in deriving the FLUSH_TIMEOUT from the basic I/O timeout
On 06/04/2014 12:15 PM, KY Srinivasan wrote: > > >> -Original Message- >> From: James Bottomley [mailto:jbottom...@parallels.com] >> Sent: Wednesday, June 4, 2014 10:02 AM >> To: KY Srinivasan >> Cc: linux-ker...@vger.kernel.org; a...@canonical.com; >> de...@linuxdriverproject.org; h...@infradead.org; linux- >> s...@vger.kernel.org; oher...@suse.com; gre...@linuxfoundation.org; >> jasow...@redhat.com >> Subject: Re: [PATCH 1/1] [SCSI] Fix a bug in deriving the FLUSH_TIMEOUT >> from the basic I/O timeout >> >> On Wed, 2014-06-04 at 09:33 -0700, K. Y. Srinivasan wrote: >>> Commit ID: 7e660100d85af860e7ad763202fff717adcdaacd added code to >>> derive the FLUSH_TIMEOUT from the basic I/O timeout. However, this >>> patch did not use the basic I/O timeout of the device. Fix this bug. >>> >>> Signed-off-by: K. Y. Srinivasan >>> --- >>> drivers/scsi/sd.c |4 +++- >>> 1 files changed, 3 insertions(+), 1 deletions(-) >>> >>> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index >>> e9689d5..54150b1 100644 >>> --- a/drivers/scsi/sd.c >>> +++ b/drivers/scsi/sd.c >>> @@ -832,7 +832,9 @@ static int sd_setup_write_same_cmnd(struct >>> scsi_device *sdp, struct request *rq) >>> >>> static int scsi_setup_flush_cmnd(struct scsi_device *sdp, struct >>> request *rq) { >>> - rq->timeout *= SD_FLUSH_TIMEOUT_MULTIPLIER; >>> + int timeout = sdp->request_queue->rq_timeout; >>> + >>> + rq->timeout = (timeout * SD_FLUSH_TIMEOUT_MULTIPLIER); >> >> Could you share where you found this to be a problem? It looks like a bug in >> block because all inbound requests being prepared should have a timeout >> set, so block would be the place to fix it. > > Perhaps; what I found was that the value in rq->timeout was 0 coming into > this function and thus multiplying obviously has no effect. > I think you are right. We hit this problem because we are doing: scsi_request_fn -> blk_peek_request -> sd_prep_fn -> scsi_setup_flush_cmnd. At this time request->timeout is zero so the multiplication does nothing. See how sd_setup_write_same_cmnd will set the request->timeout at this time. Then in scsi_request_fn we do: scsi_request_fn -> blk_start_request -> blk_add_timer. At this time it will set the request->timeout if something like req block pc users (like scsi_execute() or block/scsi_ioctl.c) or the write same code mentioned above have not set the timeout. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH 1/1] [SCSI] Fix a bug in deriving the FLUSH_TIMEOUT from the basic I/O timeout
> -Original Message- > From: Mike Christie [mailto:micha...@cs.wisc.edu] > Sent: Thursday, June 5, 2014 6:33 PM > To: KY Srinivasan > Cc: James Bottomley; linux-ker...@vger.kernel.org; a...@canonical.com; > de...@linuxdriverproject.org; h...@infradead.org; linux- > s...@vger.kernel.org; oher...@suse.com; gre...@linuxfoundation.org; > jasow...@redhat.com > Subject: Re: [PATCH 1/1] [SCSI] Fix a bug in deriving the FLUSH_TIMEOUT > from the basic I/O timeout > > On 06/04/2014 12:15 PM, KY Srinivasan wrote: > > > > > >> -Original Message- > >> From: James Bottomley [mailto:jbottom...@parallels.com] > >> Sent: Wednesday, June 4, 2014 10:02 AM > >> To: KY Srinivasan > >> Cc: linux-ker...@vger.kernel.org; a...@canonical.com; > >> de...@linuxdriverproject.org; h...@infradead.org; linux- > >> s...@vger.kernel.org; oher...@suse.com; gre...@linuxfoundation.org; > >> jasow...@redhat.com > >> Subject: Re: [PATCH 1/1] [SCSI] Fix a bug in deriving the > >> FLUSH_TIMEOUT from the basic I/O timeout > >> > >> On Wed, 2014-06-04 at 09:33 -0700, K. Y. Srinivasan wrote: > >>> Commit ID: 7e660100d85af860e7ad763202fff717adcdaacd added code to > >>> derive the FLUSH_TIMEOUT from the basic I/O timeout. However, this > >>> patch did not use the basic I/O timeout of the device. Fix this bug. > >>> > >>> Signed-off-by: K. Y. Srinivasan > >>> --- > >>> drivers/scsi/sd.c |4 +++- > >>> 1 files changed, 3 insertions(+), 1 deletions(-) > >>> > >>> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index > >>> e9689d5..54150b1 100644 > >>> --- a/drivers/scsi/sd.c > >>> +++ b/drivers/scsi/sd.c > >>> @@ -832,7 +832,9 @@ static int sd_setup_write_same_cmnd(struct > >>> scsi_device *sdp, struct request *rq) > >>> > >>> static int scsi_setup_flush_cmnd(struct scsi_device *sdp, struct > >>> request *rq) { > >>> - rq->timeout *= SD_FLUSH_TIMEOUT_MULTIPLIER; > >>> + int timeout = sdp->request_queue->rq_timeout; > >>> + > >>> + rq->timeout = (timeout * SD_FLUSH_TIMEOUT_MULTIPLIER); > >> > >> Could you share where you found this to be a problem? It looks like > >> a bug in block because all inbound requests being prepared should > >> have a timeout set, so block would be the place to fix it. > > > > Perhaps; what I found was that the value in rq->timeout was 0 coming > > into this function and thus multiplying obviously has no effect. > > > > I think you are right. We hit this problem because we are doing: > > scsi_request_fn -> blk_peek_request -> sd_prep_fn -> > scsi_setup_flush_cmnd. > > At this time request->timeout is zero so the multiplication does nothing. See > how sd_setup_write_same_cmnd will set the request->timeout at this time. > > Then in scsi_request_fn we do: > > scsi_request_fn -> blk_start_request -> blk_add_timer. > > At this time it will set the request->timeout if something like req block pc > users (like scsi_execute() or block/scsi_ioctl.c) or the write same code > mentioned above have not set the timeout. I don't think this is a recent change. Prior to this commit, we were setting the timeout value in this function; it just happened to be a different constant unrelated to the I/O timeout. K. Y > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] Staging:tidspbridge Fix minor checkpatch.pl warning
From: Adithya K Fixed checkpatch "WARNING: Missing a blank line after declarations" Signed-off-by: Adithya Krishnamurthy --- drivers/staging/tidspbridge/core/chnl_sm.c |1 + drivers/staging/tidspbridge/core/io_sm.c |1 + drivers/staging/tidspbridge/core/tiomap3430.c|2 ++ drivers/staging/tidspbridge/core/tiomap_io.c |2 ++ drivers/staging/tidspbridge/core/wdt.c |1 + drivers/staging/tidspbridge/dynload/cload.c |7 +++ drivers/staging/tidspbridge/dynload/reloc.c |2 ++ drivers/staging/tidspbridge/gen/gh.c |1 + drivers/staging/tidspbridge/pmgr/chnl.c |1 + drivers/staging/tidspbridge/rmgr/dbdcd.c |1 + drivers/staging/tidspbridge/rmgr/drv_interface.c |2 ++ drivers/staging/tidspbridge/rmgr/nldr.c |1 + drivers/staging/tidspbridge/rmgr/node.c |2 ++ drivers/staging/tidspbridge/rmgr/proc.c |3 +++ 14 files changed, 27 insertions(+) diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c index 16fa346..c855992 100644 --- a/drivers/staging/tidspbridge/core/chnl_sm.c +++ b/drivers/staging/tidspbridge/core/chnl_sm.c @@ -486,6 +486,7 @@ int bridge_chnl_get_info(struct chnl_object *chnl_obj, { int status = 0; struct chnl_object *pchnl = (struct chnl_object *)chnl_obj; + if (channel_info != NULL) { if (pchnl) { /* Return the requested information: */ diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c index c2829aa..42f94e1 100644 --- a/drivers/staging/tidspbridge/core/io_sm.c +++ b/drivers/staging/tidspbridge/core/io_sm.c @@ -249,6 +249,7 @@ int bridge_io_create(struct io_mgr **io_man, int bridge_io_destroy(struct io_mgr *hio_mgr) { int status = 0; + if (hio_mgr) { /* Free IO DPC object */ tasklet_kill(&hio_mgr->dpc_tasklet); diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c index 8945b4e..bf952ef 100644 --- a/drivers/staging/tidspbridge/core/tiomap3430.c +++ b/drivers/staging/tidspbridge/core/tiomap3430.c @@ -1057,6 +1057,7 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt, u32 total_bytes = ul_num_bytes; u8 host_buf[BUFFERSIZE]; struct bridge_dev_context *dev_context = dev_ctxt; + while (total_bytes > 0 && !status) { copy_bytes = total_bytes > BUFFERSIZE ? BUFFERSIZE : total_bytes; @@ -1094,6 +1095,7 @@ static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt, struct bridge_dev_context *dev_context = dev_ctxt; u32 ul_remain_bytes = 0; u32 ul_bytes = 0; + ul_remain_bytes = ul_num_bytes; while (ul_remain_bytes > 0 && !status) { ul_bytes = diff --git a/drivers/staging/tidspbridge/core/tiomap_io.c b/drivers/staging/tidspbridge/core/tiomap_io.c index f53ed98..2836467 100644 --- a/drivers/staging/tidspbridge/core/tiomap_io.c +++ b/drivers/staging/tidspbridge/core/tiomap_io.c @@ -176,6 +176,7 @@ int write_dsp_data(struct bridge_dev_context *dev_context, struct cfg_hostres *resources = dev_context->resources; int status = 0; u32 base1, base2, base3; + base1 = OMAP_DSP_MEM1_SIZE; base2 = OMAP_DSP_MEM2_BASE - OMAP_DSP_MEM1_BASE; base3 = OMAP_DSP_MEM3_BASE - OMAP_DSP_MEM1_BASE; @@ -229,6 +230,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context, u32 ul_shm_offset_virt = 0; struct cfg_hostres *host_res = dev_context->resources; bool trace_load = false; + temp_byte1 = 0x0; temp_byte2 = 0x0; diff --git a/drivers/staging/tidspbridge/core/wdt.c b/drivers/staging/tidspbridge/core/wdt.c index c7ee467..b19f887 100644 --- a/drivers/staging/tidspbridge/core/wdt.c +++ b/drivers/staging/tidspbridge/core/wdt.c @@ -33,6 +33,7 @@ static struct dsp_wdt_setting dsp_wdt; void dsp_wdt_dpc(unsigned long data) { struct deh_mgr *deh_mgr; + dev_get_deh_mgr(dev_get_first(), &deh_mgr); if (deh_mgr) bridge_deh_notify(deh_mgr, DSP_WDTOVERFLOW, 0); diff --git a/drivers/staging/tidspbridge/dynload/cload.c b/drivers/staging/tidspbridge/dynload/cload.c index 9d54744..83f2106 100644 --- a/drivers/staging/tidspbridge/dynload/cload.c +++ b/drivers/staging/tidspbridge/dynload/cload.c @@ -160,6 +160,7 @@ int dynamic_load_module(struct dynamic_loader_stream *module, if (!dl_state.dload_errcount) { /* fix up entry point address */ unsigned sref = dl_state.dfile_hdr.df_entry_secn - 1; + if (sref < dl_state.allocated_secn_count) dl_state.dfile_hdr.df_entrypt += dl_state.ldr_sections[sref]
Re: [PATCH 1/1] Staging:tidspbridge Fix minor checkpatch.pl warning
On Fri, 2014-06-06 at 10:24 +0530, Adithya wrote: > From: Adithya K > > Fixed checkpatch "WARNING: Missing a blank line after declarations" [] > diff --git a/drivers/staging/tidspbridge/gen/gh.c > b/drivers/staging/tidspbridge/gen/gh.c [] > @@ -28,6 +28,7 @@ struct gh_node { > struct gh_t_hash_tab { > u32 val_size; > DECLARE_HASHTABLE(hash_table, GH_HASH_ORDER); > + > u32 (*hash)(const void *key); > bool (*match)(const void *key, const void *value); > void (*delete)(void *key); this one is a checkpatch defect. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel