Re: [PATCH] staging: Add Mediatek High Frequency Manager Framework

2020-08-06 Thread hongxu . zhao
ency Manager Framework to show > > manager details and client details, is not for device drivers. > > Then it is not needed :) > > > we recommend device driver(like test/test_app.c) use sysfs which under > > High Frequency Manager Framework. > > Then you need to document it really well as to what you are doing here. > > But again, please try working with the IIO framework as that is what we > have today. Any improvements you make to it will help everyone out. > > Adding a third way to handle sensor data to the kernel is probably not > going to work well for anyone... Yes, I approve your ideas, but iio framework is too much more complicated and widely used, if I improve iio framework maybe not compatible with old interface. Then I decide add a new framework to staging. :) thanks hognxu zhao ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: Add Mediatek High Frequency Manager Framework

2020-08-06 Thread hongxu . zhao
On Tue, 2020-08-04 at 10:11 +0200, Greg Kroah-Hartman wrote: > On Tue, Aug 04, 2020 at 03:52:49PM +0800, hongxu.zhao wrote: > > Add a new sensor framework into linux kernel which can support multi client > > request sensor data. > > There are the following features: > > 1.Ringbuffer between ma

[PATCH] staging: Add Mediatek High Frequency Manager Framework

2020-08-04 Thread hongxu . zhao
_manager/core/hf_manager.c new file mode 100644 index ..a4d4298d5265 --- /dev/null +++ b/drivers/staging/hf_manager/core/hf_manager.c @@ -0,0 +1,1419 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2020 MediaTek Inc. + * Author: Hongxu Zhao + */ + +#define pr_fmt(fmt) &

[PATCH v3] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-15 Thread Zhixu Zhao
A coding alignment issue is found by checkpatch.pl. Fix it by using a temporary for gasket_dev->bar_data[bar_num]. Signed-off-by: Zhixu Zhao --- Changes in v2: - gasket_dev->bar_data[bar_num] was used everywhere. Now replace it with a `struct gasket_bar_data *data`, making the cod

Re:Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-15 Thread Zhao
09:17 +0200, Greg KH wrote: >> > > > On Wed, Jul 15, 2020 at 07:44:40AM +0800, Zhixu Zhao wrote: >> > > > > On Thu, Jun 18, 2020 at 12:11:27AM +0800, Zhixu Zhao wrote: >> > > > > > A coding alignment issue is fou

Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-15 Thread Zhao
At 2020-06-18 03:10:02, "Dan Carpenter" wrote: >On Thu, Jun 18, 2020 at 12:11:27AM +0800, Zhixu Zhao wrote: >> diff --git a/drivers/staging/gasket/gasket_core.c >> b/drivers/staging/gasket/gasket_core.c >> index 67325fbaf760..28dab302183b 100644 >> --- a

Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-14 Thread Zhixu Zhao
On Thu, Jun 18, 2020 at 12:11:27AM +0800, Zhixu Zhao wrote: > A coding alignment issue is found by checkpatch.pl. > Fix it by using a temporary for gasket_dev->bar_data[bar_num]. > > Signed-off-by: Zhixu Zhao Hi, there~ Does anybody have any further comments on this? Can it be

Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-06-18 Thread Zhixu Zhao
ns[bar_num]` are not the same thing as I see it. Besides, `struct gasket_bar_data` doesn't have a `size` field (it does have a `length_bytes` field). So... did I miss anything? -- Zhixu Zhao https://github.com/zhaozhixu ___ devel mailing list de...@

[PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-06-17 Thread Zhixu Zhao
A coding alignment issue is found by checkpatch.pl. Fix it by using a temporary for gasket_dev->bar_data[bar_num]. Signed-off-by: Zhixu Zhao --- Please ignore the last email (if you received it) because I forgot to Cc the mailing list. Sorry for the noise... Changes in v2: - gasket_

[PATCH] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-06-14 Thread Zhixu Zhao
Fix a coding alignment issue found by checkpatch.pl. Signed-off-by: Zhixu Zhao --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index 67325fbaf760

Re: [RFC PATCH 09/15] drivers/acrn: add passthrough device support

2019-09-01 Thread Zhao, Yakui
On 2019年08月16日 21:05, Dan Carpenter wrote: On Fri, Aug 16, 2019 at 10:25:50AM +0800, Zhao Yakui wrote: + case IC_ASSIGN_PTDEV: { + unsigned short bdf; + + if (copy_from_user(&bdf, (void *)ioctl_param, This casting is ugly and you also need a __user tag

Re: [RFC PATCH 08/15] drivers/acrn: add VM memory management for ACRN char device

2019-08-19 Thread Zhao, Yakui
On 2019年08月19日 15:39, Dan Carpenter wrote: On Mon, Aug 19, 2019 at 01:32:54PM +0800, Zhao, Yakui wrote: In fact as this driver is mainly used for embedded IOT usage, it doesn't handle the complex cleanup when such error is encountered. Instead the clean up is handled in free_guest_vm.

Re: [RFC PATCH 15/15] drivers/acrn: add the support of offline SOS cpu

2019-08-19 Thread Zhao, Yakui
On 2019年08月19日 18:34, Dan Carpenter wrote: On Fri, Aug 16, 2019 at 10:25:56AM +0800, Zhao Yakui wrote: diff --git a/drivers/staging/acrn/acrn_dev.c b/drivers/staging/acrn/acrn_dev.c index 0602125..6868003 100644 --- a/drivers/staging/acrn/acrn_dev.c +++ b/drivers/staging/acrn/acrn_dev.c

Re: [RFC PATCH 00/15] acrn: add the ACRN driver module

2019-08-18 Thread Zhao, Yakui
On 2019年08月19日 13:25, Greg KH wrote: On Mon, Aug 19, 2019 at 09:44:25AM +0800, Zhao, Yakui wrote: On 2019年08月16日 14:39, Borislav Petkov wrote: On Fri, Aug 16, 2019 at 10:25:41AM +0800, Zhao Yakui wrote: The first three patches are the changes under x86/acrn, which adds the required APIs

Re: [RFC PATCH 08/15] drivers/acrn: add VM memory management for ACRN char device

2019-08-18 Thread Zhao, Yakui
On 2019年08月16日 20:58, Dan Carpenter wrote: On Fri, Aug 16, 2019 at 10:25:49AM +0800, Zhao Yakui wrote: +int hugepage_map_guest(struct acrn_vm *vm, struct vm_memmap *memmap) +{ + struct page *page = NULL, *regions_buf_pg = NULL; + unsigned long len, guest_gpa, vma; + struct

Re: [RFC PATCH 10/15] drivers/acrn: add interrupt injection support

2019-08-18 Thread Zhao, Yakui
On 2019年08月16日 21:12, Dan Carpenter wrote: On Fri, Aug 16, 2019 at 10:25:51AM +0800, Zhao Yakui wrote: + case IC_VM_INTR_MONITOR: { + struct page *page; + + ret = get_user_pages_fast(ioctl_param, 1, 1, &page); + if (unlikely(ret != 1) || !

Re: [RFC PATCH 11/15] drivers/acrn: add the support of handling emulated ioreq

2019-08-18 Thread Zhao, Yakui
On 2019年08月16日 21:39, Dan Carpenter wrote: On Fri, Aug 16, 2019 at 10:25:52AM +0800, Zhao Yakui wrote: +int acrn_ioreq_create_client(unsigned short vmid, +ioreq_handler_t handler, +void *client_priv, +char

Re: [RFC PATCH 04/15] drivers/acrn: add the basic framework of acrn char device driver

2019-08-18 Thread Zhao, Yakui
On 2019年08月16日 15:05, Greg KH wrote: On Fri, Aug 16, 2019 at 10:25:45AM +0800, Zhao Yakui wrote: ACRN hypervisor service module is the important middle layer that allows the Linux kernel to communicate with the ACRN hypervisor. It includes the management of virtualized CPU/memory/device

Re: [RFC PATCH 00/15] acrn: add the ACRN driver module

2019-08-18 Thread Zhao, Yakui
On 2019年08月16日 15:03, Greg KH wrote: On Fri, Aug 16, 2019 at 08:39:25AM +0200, Borislav Petkov wrote: On Fri, Aug 16, 2019 at 10:25:41AM +0800, Zhao Yakui wrote: The first three patches are the changes under x86/acrn, which adds the required APIs for the driver and reports the X2APIC caps

Re: [RFC PATCH 00/15] acrn: add the ACRN driver module

2019-08-18 Thread Zhao, Yakui
On 2019年08月16日 14:39, Borislav Petkov wrote: On Fri, Aug 16, 2019 at 10:25:41AM +0800, Zhao Yakui wrote: The first three patches are the changes under x86/acrn, which adds the required APIs for the driver and reports the X2APIC caps. The remaining patches add the ACRN driver module, which

[RFC PATCH 10/15] drivers/acrn: add interrupt injection support

2019-08-15 Thread Zhao Yakui
: monitor the interrupt info for one guest OS Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Co-developed-by: Mingqiang Chi Signed-off-by: Mingqiang Chi Signed-off-by: Zhao Yakui --- drivers/staging/acrn/acrn_dev.c | 48 +++ drivers/staging

[RFC PATCH 14/15] drivers/acrn: add the support of irqfd and eventfd

2019-08-15 Thread Zhao Yakui
r the interrupt injection on acrn_hsm side. Co-developed-by: Shuo Liu Signed-off-by: Shuo Liu Signed-off-by: Zhao Yakui --- drivers/staging/acrn/Makefile | 4 +- drivers/staging/acrn/acrn_dev.c | 19 ++ drivers/staging/acrn/acrn_drv_internal.h | 10 + drivers/staging

[RFC PATCH 08/15] drivers/acrn: add VM memory management for ACRN char device

2019-08-15 Thread Zhao Yakui
Shuo Signed-off-by: Zhao Yakui --- drivers/staging/acrn/Makefile | 4 +- drivers/staging/acrn/acrn_dev.c | 27 +++ drivers/staging/acrn/acrn_drv_internal.h | 90 +++--- drivers/staging/acrn/acrn_mm.c| 227 drivers/staging

[RFC PATCH 12/15] drivers/acrn: add driver-specific IRQ handle to dispatch IO_REQ request

2019-08-15 Thread Zhao Yakui
: Zhao Yakui --- drivers/staging/acrn/acrn_dev.c | 41 + 1 file changed, 41 insertions(+) diff --git a/drivers/staging/acrn/acrn_dev.c b/drivers/staging/acrn/acrn_dev.c index 28258fb..93f45e3 100644 --- a/drivers/staging/acrn/acrn_dev.c +++ b/drivers/staging

[RFC PATCH 04/15] drivers/acrn: add the basic framework of acrn char device driver

2019-08-15 Thread Zhao Yakui
: Zhao Yakui --- drivers/staging/Kconfig | 2 + drivers/staging/Makefile| 1 + drivers/staging/acrn/Kconfig| 18 ++ drivers/staging/acrn/Makefile | 2 + drivers/staging/acrn/acrn_dev.c | 123 5 files changed, 146 insertions

[RFC PATCH 00/15] acrn: add the ACRN driver module

2019-08-15 Thread Zhao Yakui
X2APIC caps. The remaining patches add the ACRN driver module, which accepts the ioctl from user-space and then communicate with the low-level ACRN hypervisor by using hypercall. Zhao Yakui (15): x86/acrn: Report X2APIC for ACRN guest x86/acrn: Add two APIs to add/remove driver-specific upcall ISR

[RFC PATCH 06/15] drivers/acrn: add the support of querying ACRN api version

2019-08-15 Thread Zhao Yakui
space module also needs to check the driver version. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Co-developed-by: Liu Shuo Signed-off-by: Liu Shuo Signed-off-by: Zhao Yakui --- drivers/staging/acrn/acrn_dev.c | 47 +++ include/uapi/linux

[RFC PATCH 03/15] x86/acrn: Add hypercall for ACRN guest

2019-08-15 Thread Zhao Yakui
instruction. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- arch/x86/include/asm/acrn.h | 54 + 1 file changed, 54 insertions(+) diff --git a/arch/x86/include/asm/acrn.h b/arch/x86/include/asm/acrn.h index

[RFC PATCH 09/15] drivers/acrn: add passthrough device support

2019-08-15 Thread Zhao Yakui
interrupt is triggered. Co-developed-by: Gao, Shiqing Signed-off-by: Gao, Shiqing Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- drivers/staging/acrn/acrn_dev.c | 77 +++ drivers/staging/acrn/acrn_drv_internal.h

[RFC PATCH 13/15] drivers/acrn: add service to obtain Power data transition

2019-08-15 Thread Zhao Yakui
can construct the DSDT with Power frequence/C-state idle for guest system. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Co-developed-by: Victor Sun Signed-off-by: Victor Sun Signed-off-by: Zhao Yakui --- drivers/staging/acrn/acrn_dev.c | 75

[RFC PATCH 15/15] drivers/acrn: add the support of offline SOS cpu

2019-08-15 Thread Zhao Yakui
vices/system/cpu/cpuX/online Currently this is mainly used in user-space device model before booting other ACRN guest. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- drivers/staging/acrn/acrn_dev.c | 45 + 1

[RFC PATCH 11/15] drivers/acrn: add the support of handling emulated ioreq

2019-08-15 Thread Zhao Yakui
(int client_id); Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Co-developed-by: Yin FengWei Signed-off-by: Yin FengWei Co-developed-by: Liu Shuo Signed-off-by: Liu Shuo Signed-off-by: Zhao Yakui --- drivers/staging/acrn/Makefile | 3 +- drivers/staging/acrn

[RFC PATCH 02/15] x86/acrn: Add two APIs to add/remove driver-specific upcall ISR handler

2019-08-15 Thread Zhao Yakui
. This is similar to that in XEN/HyperV. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- arch/x86/include/asm/acrn.h | 3 +++ arch/x86/kernel/cpu/acrn.c | 12 2 files changed, 15 insertions(+) diff --git a/arch/x86/include/asm/acrn.h b

[RFC PATCH 05/15] drivers/acrn: add driver-specific hypercall for ACRN_HSM

2019-08-15 Thread Zhao Yakui
Co-developed-by: Liu Shuo Signed-off-by: Liu Shuo Signed-off-by: Zhao Yakui --- drivers/staging/acrn/Makefile | 3 +- drivers/staging/acrn/acrn_hv_defs.h | 65 drivers/staging/acrn/acrn_hypercall.c | 136 ++ drivers/staging/acrn

[RFC PATCH 07/15] drivers/acrn: add acrn vm/vcpu management for ACRN_HSM char device

2019-08-15 Thread Zhao Yakui
destroyed, the low-level ACRN hypervisor will free the corresponding vcpu implicitly. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Co-developed-by: Liu Shuo Signed-off-by: Liu Shuo Signed-off-by: Zhao Yakui --- drivers/staging/acrn/Makefile | 3 +- drivers/staging/acrn

[RFC PATCH 01/15] x86/acrn: Report X2APIC for ACRN guest

2019-08-15 Thread Zhao Yakui
CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui --- arch/x86/kernel/cpu/acrn.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/cpu/acrn.c b/arch/x86/kernel/cpu/acrn.c index 676022e..95db5c4 100644 --- a/arch/x86/kernel/cpu/acrn.c +++ b/arch

Re: [PATCH v2] android: binder: fix dangling pointer comparison

2016-08-18 Thread ZhaoJunmin Zhao(Junmin)
在 2016/8/18 23:23, Greg Kroah-Hartman 写道: On Tue, Aug 16, 2016 at 07:44:59PM -0700, Arve Hjønnevåg wrote: On Mon, Aug 15, 2016 at 7:58 AM, Greg Kroah-Hartman wrote: On Thu, Jun 16, 2016 at 12:45:33AM +0200, Jann Horn wrote: If /dev/binder is opened and the opener process then e.g. calls exe

Re: [PATCH] android: binder: fix dangling pointer comparison

2016-06-18 Thread ZhaoJunmin Zhao(Junmin)
在 2016/6/16 6:39, Jann Horn 写道: On Thu, Jun 16, 2016 at 12:31 AM, Arve Hjønnevåg wrote: On Wed, Jun 15, 2016 at 3:09 PM, Jann Horn wrote: If /dev/binder is opened and the opener process then e.g. calls execve, proc->vma_vm_mm will still point to the location of the now-freed mm_struct. If t

Re: [PATCH] staging: et131x: let the freeing of memory more reasonable in error path

2014-02-21 Thread Zhao, Gang
On Fri, 2014-02-21 at 20:35:50 +0800, Dan Carpenter wrote: > On Fri, Feb 21, 2014 at 08:22:21PM +0800, Zhao, Gang wrote: >> > If we add your patch and the reviewer does a search for fb[0] then it is >> > confusing what the right thing to do is. >> >> My fault.

Re: [PATCH] staging: et131x: let the freeing of memory more reasonable in error path

2014-02-21 Thread Zhao, Gang
On Fri, 2014-02-21 at 15:38:56 +0800, Dan Carpenter wrote: > I don't think this is the right thing because it is needless code. > Overall it doesn't really simplify anything. > > You are worried that reviewers will be confused and think there is a > leak in et131x_rx_dma_memory_alloc() and then add

[PATCH] staging: et131x: let the freeing of memory more reasonable in error path

2014-02-20 Thread Zhao, Gang
_free() can handle this situation correctly. Signed-off-by: Zhao, Gang --- I didn't notice Alan's et131x patch on the list have been applied. Now combine my comments on that patch to a new patch for review. drivers/staging/et131x/et131x.c | 5 - 1 file changed, 4 insertions(+),

Re: [PATCH] et131x: fix allocation failures

2014-02-20 Thread Zhao, Gang
On Thu, 2014-02-20 at 17:03:39 +0800, Dan Carpenter wrote: > On Thu, Feb 20, 2014 at 11:03:45AM +0800, Zhao, Gang wrote: >> On Wed, 2014-02-19 at 19:43:15 +0800, One Thousand Gnomes wrote: >> > On Wed, 19 Feb 2014 09:14:19 +0800 >> > "Zhao\, Gang" wrote: >&

Re: [PATCH] et131x: fix allocation failures

2014-02-19 Thread Zhao, Gang
On Wed, 2014-02-19 at 19:43:15 +0800, One Thousand Gnomes wrote: > On Wed, 19 Feb 2014 09:14:19 +0800 > "Zhao\, Gang" wrote: > >> Alan, thanks for resending this patch. But it seems you overlooked >> something we discussed earlier. >> >> On Mon, 2014-0

Re: [PATCH] et131x: fix allocation failures

2014-02-18 Thread Zhao, Gang
Alan, thanks for resending this patch. But it seems you overlooked something we discussed earlier. On Mon, 2014-02-17 at 22:13:08 +0800, Alan wrote: > We should check the ring allocations don't fail. > If we get a fail we need to clean up properly. The allocator assumes the > deallocator will be u

[PATCH] staging: wlan-ng: replace function ieee80211_dsss_chan_to_freq()

2014-02-18 Thread Zhao, Gang
/ declared in . So this change is safe. This change is a preparation for the removal of function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}. Signed-off-by: Zhao, Gang --- add Cc to linux-wireless for consistency. drivers/staging/wlan-ng/cfg80211.c | 7 +-- 1 file changed, 5 insertions

Re: [PATCH 02/13] staging: r8188eu: Remove pointless "alignment" entry in recv_frame

2014-02-15 Thread Zhao, Gang
On Sat, 2014-02-15 at 06:54:06 +0800, Larry Finger wrote: > This alignment entry in union recv_frame does nothing. It certainly > dues not ensure alignment. ^ typo here. I accidently sent this as a private mail before, better to resend to the list. > > Suggested-by: jes.soren...@redha

Re: [PATCH RESEND 3/3] staging: et131x: fix make W=1 build warning

2014-02-07 Thread Zhao, Gang
Mark, could you look at this patch? It has not been acked. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH RESEND 3/3] staging: et131x: fix make W=1 build warning

2014-02-05 Thread Zhao, Gang
not used [-Wunused-but-set-variable] u32 pm_csr; ^ Signed-off-by: Zhao, Gang --- drivers/staging/et131x/et131x.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 6413500..0c44014 100644 --- a/drivers

[PATCH RESEND 1/3] staging: et131x: stop read when hit max delay in et131x_phy_mii_read

2014-02-05 Thread Zhao, Gang
stop read and return error when hit max delay time. Signed-off-by: Zhao, Gang Acked-by: Mark Einon --- Acked at post: http://article.gmane.org/gmane.linux.kernel/1599347 drivers/staging/et131x/et131x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/et131x/et131x.c b

[PATCH RESEND 2/3] staging: et131x: remove spinlock adapter->lock

2014-02-05 Thread Zhao, Gang
adapter->lock is only used in et131x_multicast(), which is eventually called by network stack function __dev_set_rx_mode(). __dev_set_rx_mode() is always called by (net_device *)dev->addr_list_lock hold, to protect from concurrent access. So adapter->lock is redundant. Signed-off-by: Z

Re: [PATCH] et131x: fix allocation failures

2014-02-05 Thread Zhao, Gang
add Cc to devel mailing list On Wed, 2014-02-05 at 19:56:19 +0800, Alan wrote: > We should check the ring allocations don't fail. > If we get a fail we need to clean up properly. The allocator assumes the > deallocator will be used on failure, but it isn't. Fix this and add a > missing check again

[PATCH v4 3/7] staging: et131x: reduce split lines in et131x_rx_dma_memory_free

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang Acked-by: Mark Einon --- drivers/staging/et131x/et131x.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 9272548..5a45465 100644 --- a/drivers

[PATCH v4 7/7] staging: et131x: remove unnecessary pointer typecast

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang Acked-by: Mark Einon --- drivers/staging/et131x/et131x.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 89bd8ca..fdb19df 100644 --- a/drivers/staging

[PATCH v4 5/7] staging: et131x: reduce split lines in nic_rx_pkts

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang Acked-by: Mark Einon --- drivers/staging/et131x/et131x.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index f498eec..89bd8ca 100644 --- a/drivers/staging/et131x/et131x.c

[PATCH v4 6/7] staging: et131x: remove item that have been done in TODO file

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/README | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/et131x/README b/drivers/staging/et131x/README index 8da96a6..3befc45 100644 --- a/drivers/staging/et131x/README +++ b/drivers/staging/et131x/README @@ -13,10 +13,6

[PATCH v4 4/7] staging: et131x: reduce split lines in nic_return_rfd

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 5a45465..f498eec 100644 --- a/drivers/staging/et131x/et131x.c +++ b

[PATCH v4 2/7] staging: et131x: reduce split lines in et131x_rx_dma_memory_alloc

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang Acked-by: Mark Einon --- drivers/staging/et131x/et131x.c | 48 - 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index d16ac57..9272548 100644 --- a

[PATCH v4 1/7] staging: et131x: reduce split lines in et131x_config_rx_dma_regs

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang Acked-by: Mark Einon --- drivers/staging/et131x/et131x.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 5dd2170..d16ac57 100644 --- a/drivers/staging

Re: [PATCH v3 1/7] staging: et131x: reduce split lines in et131x_config_rx_dma_regs

2013-12-09 Thread ZHAO Gang
On Mon, Dec 9, 2013 at 4:53 PM, Greg Kroah-Hartman wrote: > On Mon, Dec 09, 2013 at 04:46:08PM +0800, ZHAO Gang wrote: >> Signed-off-by: ZHAO Gang >> --- >> drivers/staging/et131x/et131x.c | 24 ++-- >> 1 file changed, 10 insertions(+), 14 deleti

[PATCH v3 6/7] staging: et131x: remove item that have been done in TODO file

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/README | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/et131x/README b/drivers/staging/et131x/README index 8da96a6..3befc45 100644 --- a/drivers/staging/et131x/README +++ b/drivers/staging/et131x/README @@ -13,10 +13,6

[PATCH v3 4/7] staging: et131x: reduce split lines in nic_return_rfd

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 5a45465..f498eec 100644 --- a/drivers/staging/et131x/et131x.c +++ b

[PATCH v3 5/7] staging: et131x: reduce split lines in nic_rx_pkts

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index f498eec..89bd8ca 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging

[PATCH v3 7/7] staging: et131x: remove unnecessary pointer typecast

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 89bd8ca..fdb19df 100644 --- a/drivers/staging/et131x/et131x.c +++ b

[PATCH v3 1/7] staging: et131x: reduce split lines in et131x_config_rx_dma_regs

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 5dd2170..d16ac57 100644 --- a/drivers/staging/et131x/et131x.c +++ b

[PATCH v3 2/7] staging: et131x: reduce split lines in et131x_rx_dma_memory_alloc

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 48 - 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index d16ac57..9272548 100644 --- a/drivers/staging

[PATCH v3 3/7] staging: et131x: reduce split lines in et131x_rx_dma_memory_free

2013-12-09 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 9272548..5a45465 100644 --- a/drivers/staging/et131x

[PATCH 1/2] staging: et131x: improve code consistency: access struct rx_ring

2013-12-07 Thread ZHAO Gang
Let all the code use a pointer called rx_ring to access struct rx_ring members. Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 48 + 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers

[PATCH 2/2] staging: et131x: improve code consistency: access struct tx_ring

2013-12-07 Thread ZHAO Gang
Let all the code use a pointer called tx_ring to access struct tx_ring members. Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 190 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers

[PATCH 4/7 v2] staging: et131x: reduce split lines in nic_return_rfd

2013-12-07 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index f925ce6..5c431c3 100644 --- a/drivers/staging/et131x/et131x.c +++ b

[PATCH 1/7 v2] staging: et131x: reduce split lines in et131x_config_rx_dma_regs

2013-12-07 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index e3a71d3..f86e713 100644 --- a/drivers/staging/et131x/et131x.c +++ b

[PATCH 4/7 RESEND] staging: et131x: reduce split lines in nic_return_rfd

2013-12-06 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 881ae4f..90ef45b 100644 --- a/drivers/staging/et131x/et131x.c +++ b

[PATCH 3/7 RESEND] staging: et131x: reduce split lines in et131x_rx_dma_memory_free

2013-12-06 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 63d28ae..881ae4f 100644 --- a/drivers/staging/et131x

[PATCH 1/7 RESEND] staging: et131x: reduce split lines in et131x_config_rx_dma_regs

2013-12-06 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index e3a71d3..0372f23 100644 --- a/drivers/staging/et131x/et131x.c +++ b

[PATCH 7/7] staging: et131x: remove unnecessary pointer typecast

2013-12-06 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 8d75a3f..1abea42 100644 --- a/drivers/staging/et131x/et131x.c +++ b

[PATCH 4/7] staging: et131x: reduce split lines in nic_return_rfd

2013-12-06 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index b6ce68e..3e34c2e 100644 --- a/drivers/staging/et131x/et131x.c +++ b

[PATCH 6/7] staging: et131x: remove item that have been done in TODO file

2013-12-06 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/README | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/et131x/README b/drivers/staging/et131x/README index 8da96a6..3befc45 100644 --- a/drivers/staging/et131x/README +++ b/drivers/staging/et131x/README @@ -13,10 +13,6

[PATCH 5/7] staging: et131x: reduce split lines in nic_rx_pkts

2013-12-06 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 3e34c2e..8d75a3f 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging

[PATCH 1/7] staging: et131x: reduce split lines in et131x_config_rx_dma_regs

2013-12-06 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index e3a71d3..ee231f2 100644 --- a/drivers/staging/et131x/et131x.c

[PATCH 3/7] staging: et131x: reduce split lines in et131x_rx_dma_memory_free

2013-12-06 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 17ac711..b6ce68e 100644 --- a/drivers/staging/et131x

[PATCH 2/7] staging: et131x: reduce split lines in et131x_rx_dma_memory_alloc

2013-12-06 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 48 - 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index ee231f2..17ac711 100644 --- a/drivers/staging

Re: [PATCH 28/39] staging: remove DEFINE_PCI_DEVICE_TABLE macro

2013-12-05 Thread ZHAO Gang
On Thu, Dec 5, 2013 at 11:43 PM, Greg Kroah-Hartman wrote: > On Thu, Dec 05, 2013 at 05:06:33PM +0800, ZHAO Gang wrote: >> On Tue, Dec 3, 2013 at 7:26 AM, Jingoo Han wrote: >> > Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro >> > is not preferred. >

Re: [PATCH 34/39] vme: remove DEFINE_PCI_DEVICE_TABLE macro

2013-12-05 Thread ZHAO Gang
On Tue, Dec 3, 2013 at 7:29 AM, Jingoo Han wrote: > Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro > is not preferred. > > Signed-off-by: Jingoo Han > --- Greg, this patch should be reverted. It do the opposite things. > drivers/vme/boards/vme_vmivme7805.c |2 +- > drivers/vme

Re: [PATCH 28/39] staging: remove DEFINE_PCI_DEVICE_TABLE macro

2013-12-05 Thread ZHAO Gang
On Tue, Dec 3, 2013 at 7:26 AM, Jingoo Han wrote: > Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro > is not preferred. > > Signed-off-by: Jingoo Han > I think you misunderstood the checkpatch.pl warning, it tells you what to do, not what not to do. WARNING: Use DEFINE_PCI_DEVICE_TA

Re: [PATCH 08/11] staging: et131x: simplify rx dma code

2013-12-04 Thread ZHAO Gang
On Wed, Dec 4, 2013 at 10:53 PM, Mark Einon wrote: > On Wed, Dec 04, 2013 at 09:32:27PM +0800, ZHAO Gang wrote: >> >> By re-examine the code I found the calculation is not correct. The >> real impact is too big to apply this patch, so this patch and >> followin

Re: [PATCH 04/11] staging: et131x: drop packet when error occurs in et131x_tx

2013-12-04 Thread ZHAO Gang
On Thu, Dec 5, 2013 at 7:23 AM, Greg Kroah-Hartman wrote: > On Wed, Dec 04, 2013 at 03:24:14PM +0800, ZHAO Gang wrote: >> As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY >> when tx failed. > > Really? That's ok to do? Seems like you are changing t

Re: [PATCH 08/11] staging: et131x: simplify rx dma code

2013-12-04 Thread ZHAO Gang
On Wed, Dec 4, 2013 at 8:01 PM, ZHAO Gang wrote: > On Wed, Dec 4, 2013 at 5:05 PM, Mark Einon wrote: >> On Wed, Dec 04, 2013 at 03:24:18PM +0800, ZHAO Gang wrote: >>> The original code allocate rx dma memory in several dma_alloc_coherent >>> calls, >>> whic

Re: [PATCH 08/11] staging: et131x: simplify rx dma code

2013-12-04 Thread ZHAO Gang
On Wed, Dec 4, 2013 at 5:05 PM, Mark Einon wrote: > On Wed, Dec 04, 2013 at 03:24:18PM +0800, ZHAO Gang wrote: >> The original code allocate rx dma memory in several dma_alloc_coherent calls, >> which causes some problems: >> 1. since dma_alloc_coherent allocate at leas

[PATCH 05/11] staging: et131x: stop read when hit max delay in et131x_phy_mii_read

2013-12-03 Thread ZHAO Gang
stop read and return error when hit max delay time. Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 6441e25..0fe7b17 100644 --- a/drivers/staging/et131x

[PATCH 06/11] staging: et131x: remove spinlock adapter->lock

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

[PATCH 07/11] staging: et131x: update TODO list

2013-12-03 Thread ZHAO Gang
remove items that have been done Signed-off-by: ZHAO Gang --- drivers/staging/et131x/README | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/et131x/README b/drivers/staging/et131x/README index 8da96a6..00a34ea 100644 --- a/drivers/staging/et131x/README +++ b/drivers

[PATCH 03/11] staging: et131x: delete unnecessary variable in function et131x_init

2013-12-03 Thread ZHAO Gang
Variable u32 numrfd is not necessary in this function. Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 263a478..f4ab56a 100644 --- a

[PATCH 10/11] staging: et131x: fix build warning

2013-12-03 Thread ZHAO Gang
but not used [-Wunused-but-set-variable] u32 pm_csr; ^ Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 3fa1763..65fa0ed 100644 --- a/drivers

[PATCH 11/11] staging: et131x: some code style change

2013-12-03 Thread ZHAO Gang
Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 65fa0ed..772d299 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers

[PATCH 08/11] staging: et131x: simplify rx dma code

2013-12-03 Thread ZHAO Gang
et131x_rx_dma_memory_alloc Instead, allocate all rx dma memory in one dma_alloc_coherent call makes less code, makes it easy to handle dma allocation error, and makes et131x_rx_dma_memory_free as simple as it could be. Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 202

[PATCH 01/11] staging: et131x: make some tweaks to reduce split lines

2013-12-03 Thread ZHAO Gang
1. As TODO list suggested, do this sort of things to reduce split lines: struct fbr_lookup *fbr; fbr = rx_local->fbr[id]; Then replace all the instances of "rx_local->fbr[id]" with fbr. 2. Some code style change Signed-off-by: ZHAO Gang --- driver

[PATCH 04/11] staging: et131x: drop packet when error occurs in et131x_tx

2013-12-03 Thread ZHAO Gang
As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY when tx failed. et131x_tx calls function et131x_send_packets, I put the work of et131x_send_packets directly into et131x_tx, and made some changes to let the code more readable. Signed-off-by: ZHAO Gang --- drivers/staging

[PATCH 09/11] staging: et131x: simplify tx dma code

2013-12-03 Thread ZHAO Gang
combine two dma_alloc_coherent to one Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 70 +++-- 1 file changed, 19 insertions(+), 51 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index a3d1b53

[PATCH 02/11] staging: et131x: change function name

2013-12-03 Thread ZHAO Gang
Change function name from et1310_phy_power_down to et1310_phy_power_switch to better describe its functionality. Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers

[PATCH v2 3/4 RESEND] staging: et131x: fix build warning

2013-12-03 Thread ZHAO Gang
but not used [-Wunused-but-set-variable] u32 pm_csr; ^ Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 3fa1763..65fa0ed 100644 --- a/drivers

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

2013-12-03 Thread ZHAO Gang
On Wed, Dec 4, 2013 at 3:09 PM, Greg Kroah-Hartman wrote: > On Wed, Dec 04, 2013 at 01:51:41PM +0800, ZHAO Gang wrote: >> On Wed, Dec 4, 2013 at 12:38 AM, Greg Kroah-Hartman >> wrote: >> > On Sat, Nov 23, 2013 at 12:21:29AM +0800, ZHAO Gang wrote: >> >> 1. As

  1   2   >