Re: [PATCH 24/30] staging: mt7621-mmc: Inline function msdc_set_blknum

2018-04-29 Thread NeilBrown
x) So the above becomes sdr_write32((base + OFFSET_SDC_BLK_NUM), blknum); so the base is important. msdc_do_request() starts with void __iomem *base = host->base; and never changes host. So that "base" that is used in the new code is the same as the "base" used

Re: [PATCH 27/30] staging: mt7621-mmc: Always use linked DMA mode

2018-04-29 Thread NeilBrown
the switch statement which chooses it, and the name itself. Lots of good cleanups happening here, thanks. NeilBrown > > N_MSG(DMA, "DMA mode<%d> sglen<%d> xfersz<%d>", dma->mode, dma->sglen, > host->xfer_size); > -- >

Re: [PATCH 00/30] staging: mt7621-mmc: Next cleanups

2018-04-29 Thread NeilBrown
mentioned separately I found one bug, but the relevant code becomes inactive and can now be removed. I'm happy for this to go in as-is with a couple of fix-ups to come in the next batch. I've tested and I can still access my sd card with no apparent issues. Reviewed-by: NeilBrown

Re: [PATCH 09/30] staging: mt7621-mmc: Remove function uffs

2018-04-30 Thread NeilBrown
On Mon, Apr 30 2018, Christian Lütke-Stetzkamp wrote: > On Mon, Apr 30, 2018 at 08:28:26AM +1000, NeilBrown wrote: >> On Sun, Apr 29 2018, Christian Lütke-Stetzkamp wrote: >> >> > The function uffs that is implemented by this driver returns the same >> > values a

RE: [PATCH 1/4] staging: lustre: obdclass: change spinlock of key to rwlock

2018-05-03 Thread NeilBrown
ow. Note that I don't object to these patches going in - if they provide a measurable improvement which seems likely, then in they go. But I hope the code won't stay like this long term. Thanks, NeilBrown signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/4] staging: lustre: obdclass: change spinlock of key to rwlock

2018-05-03 Thread NeilBrown
learing a few fields or incrementing a value. But numbers don't lie. I wonder if the next patch would have had just as big an effect. Taking and dropping the lock 40 times is not likely to be good for performance. Thanks, NeilBrown > > That said, it might be good to include this information in

Re: [PATCH 4/4] staging: lustre: obdclass: change object lookup to no wait mode

2018-05-03 Thread NeilBrown
to perform lookup-alloc-lookup-insert, instead, > * just alloc and insert directly. >* > + * If dying object is found during index search, add @waiter to the > + * site wait-queue and return ERR_PTR(-EAGAIN). It seems odd to add this comment here, when it seems to describe code that is being removed. I can see that this comment is added by the upstream patch Commit: fa14bdf6b648 ("LU-9049 obdclass: change object lookup to no wait mode") but I cannot see what it refers to. Otherwise that patch looks good. Thanks, NeilBrown signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 0/8] staging: various mt7621 fixes

2018-05-03 Thread NeilBrown
Highlights here are a bugfix for the ethernet driver, and proper handling of irq assignments in the PCI driver. We also make the full 32M of the gnubee flash available and start cleaning up the mt7621-pci code. --- NeilBrown (8): staging: mt7621-eth: Lock is never unlocked. staging

[PATCH 5/8] staging: mt7621-pci: remove conditional compilation.

2018-05-03 Thread NeilBrown
the code for different ports is easy to identify. Signed-off-by: NeilBrown --- drivers/staging/mt7621-pci/pci-mt7621.c | 70 +++ 1 file changed, 15 insertions(+), 55 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci

[PATCH 3/8] staging: mt7621-pci: improve interrupt mapping

2018-05-03 Thread NeilBrown
ntage that the hwirq number are mapped to virq numbers for us, so the ugly hack can go. Signed-off-by: NeilBrown --- drivers/staging/mt7621-dts/mt7621.dtsi |9 ++- drivers/staging/mt7621-pci/pci-mt7621.c | 90 +++ 2 files changed, 14 insertions(+), 85 dele

[PATCH 4/8] staging: mt7621-pci: white-space cleanups.

2018-05-03 Thread NeilBrown
- remove white space at end of line. - no more than 2 blank line at a time - remove spaces before tabs - use tabs to line things up - re-indent some #define do{}while(0) Signed-off-by: NeilBrown --- drivers/staging/mt7621-pci/pci-mt7621.c | 291 +++ 1 file changed

[PATCH 2/8] staging: mt7621-spi: remove unused lock.

2018-05-03 Thread NeilBrown
This lock is never initialized, locked once, and never unlocked. Clearly it is pointless - so remove it. Signed-off-by: NeilBrown --- drivers/staging/mt7621-spi/spi-mt7621.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c b/drivers/staging

[PATCH 8/8] staging: mt7621-dts: update nor-flash info for gnubee1

2018-05-03 Thread NeilBrown
The GNUBEE has 32MB flash, so set partitions accordingly. Also remove "m25p,chunked-io" which isn't documented or used anywhere (outside of freewrt). Signed-off-by: NeilBrown --- drivers/staging/mt7621-dts/gbpc1.dts |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-

[PATCH 1/8] staging: mt7621-eth: Lock is never unlocked.

2018-05-03 Thread NeilBrown
mtk_phy_link_adjust takes a spinlock and disables interrupts, but never unlocks. This can leave interrupts disabled on one CPU and various things stop working. Signed-off-by: NeilBrown --- drivers/staging/mt7621-eth/mdio.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging

[PATCH 7/8] staging: mt7621-pci: remove some dead code.

2018-05-03 Thread NeilBrown
Some code is dead because it is commented out. Some is dead because it is uninteresting printks. Some is dead because it declares unused functions. Remove it all. Signed-off-by: NeilBrown --- drivers/staging/mt7621-pci/pci-mt7621.c | 14 -- 1 file changed, 14 deletions(-) diff

[PATCH 6/8] staging: mt7621-pci: remove unnecessary resource details.

2018-05-03 Thread NeilBrown
These resources are extracted from devicetree, so they aren't needed here. Signed-off-by: NeilBrown --- drivers/staging/mt7621-pci/pci-mt7621.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/st

Re: [PATCH 0/4] staging: Few fixes for the mt7621-eth driver

2018-05-06 Thread NeilBrown
ipt. > > Cc: NeilBrown > Cc: Greg Kroah-Hartman > > Kamal Heib (4): > staging: mt7621-eth: Fix compilation error I don't think this is a good fix. It fixes the error, but it doesn't fix the code. phy_ring_head and phy_ring_tail are conceptually the same type, so they should b

Re: [PATH V2 1/4] staging: mt7621-eth: Fix compilation error

2018-05-07 Thread NeilBrown
ent 3 of ‘dma_alloc_coherent’ from incompatible pointer > type > > Signed-off-by: Kamal Heib Reviewed-by: NeilBrown thanks, NeilBrown > --- > drivers/staging/mt7621-eth/mtk_eth_soc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers

Re: [PATH V2 4/4] staging: mt7621-eth: Alignment should match open parenthesis

2018-05-07 Thread NeilBrown
On Mon, May 07 2018, Kamal Heib wrote: > Fix alignment issues reported by checkpatch.pl. > > Signed-off-by: Kamal Heib Signed-off-by: NeilBrown Thanks - your solution is probably better than the two I suggested! NeilBrown > --- > drivers/staging/mt7621-eth/mtk

Re: [PATCH 2/3] staging: mt7621-eth: Fix line over 80 characters

2018-05-08 Thread NeilBrown
i); This looks a bit ugly to my eye, but it is very subjective. I would prefer > struct phy_device *phy = > mdiobus_get_phy(eth->mii_bus, i); but I don't object to your version. Thanks, NeilBrown

Re: [PATCH 3/3] staging: mt7621-eth: Fix quoted string split across lines

2018-05-08 Thread NeilBrown
"tx_ring=%d, base=%08x, max=%u, ctx=%u, dtx=%u, > fdx=%hu, next=%hu\n", When a string exceeds the 80-char point, it should be on a line by itself if possible. (same below) Thanks, NeilBrown > 0, mtk_reg_r32(eth, MTK_REG_TX_BASE_P

Re: [PATCH] staging: lustre: lnet: add static to libcfs_dev declaration

2018-05-10 Thread NeilBrown
ic? Thanks - that was my fault. (b4ded66db93b) Reviewed-by: NeilBrown Thanks, NeilBrown > > Signed-off-by: Justin Skists > --- > drivers/staging/lustre/lnet/libcfs/module.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/lustre/lnet/li

Re: [lustre-devel] [PATCH] staging: lustre: o2iblnd: Fix crash in kiblnd_handle_early_rxs()

2018-05-10 Thread NeilBrown
bal_lock, flags); > - list_for_each_entry_safe(rx, tmp, &conn->ibc_early_rxs, rx_list) { > + while (!list_empty(&conn->ibc_early_rxs)) { > + rx = list_entry(conn->ibc_early_rxs.next, > + kib_rx_t, rx_list); Should be:

Re: [PATCH] staging: lustre: Use 'kvfree()' for memory allocated by 'kvzalloc()'

2018-05-12 Thread NeilBrown
On Sat, May 12 2018, Christophe JAILLET wrote: > 'buf' is allocated with 'kvzalloc()'. 'kvfree()' must be used to free it. > > Signed-off-by: Christophe JAILLET Reviewed-by: NeilBrown Thanks. We could possible add: Fixes: 11c647caf74b ("staging

Re: [PATCH] staging: mt7621-eth: Remove unused variable

2018-05-14 Thread NeilBrown
On Mon, May 14 2018, Kamal Heib wrote: > Remove unused variable 'condition' which was set but not used. > > Signed-off-by: Kamal Heib Reviewed-by: NeilBrown This is the same patch as Commit: f03b06f3bae8 ("net: ethernet: mediatek: remove useless code in mtk_poll_

Re: [PATCH 0/5] staging: mt7621-gpio: some driver cleanups

2018-05-14 Thread NeilBrown
ld change behaviour of the driver, but I tested them anyway and gpio still works (both in and out) - no surprises. I can give Reviewed-by: NeilBrown for all exect "dt-bindings: gpio: add documentation for mt7621-gpio". I'll reply to the separately. Of course the dt-binding patches

Re: [PATCH 4/5] dt-bindings: gpio: add documentation for mt7621-gpio

2018-05-14 Thread NeilBrown
add_linear() expects. I don't know what that is... I tried following through code and got lost in little twisty mazes. So if you change this patch to add the file to drivers/staging/mt7621-gpio then I can give it Reviewed-by: NeilBrown and then we can fix it when an understanding of the interr

Re: [PATCH 5/5] staging: mt7621-gpio: remove device tree related stuff from TODO file

2018-05-14 Thread NeilBrown
lean up > -- ensure device-tree requirements are documented > > Cc: NeilBrown > -- > 2.7.4 I said before that I could give a reviewed-by for this, but obviously I cannot as it depend on the bindings documentation which I didn't approve. However, it does look like I need to add

Re: [PATCH 4/4] staging: lustre: obdclass: change object lookup to no wait mode

2018-05-14 Thread NeilBrown
* >> > + * If dying object is found during index search, add @waiter to the >> > + * site wait-queue and return ERR_PTR(-EAGAIN). >> >> It seems odd to add this comment here, when it seems to describe code >> that is being removed. >> I can see that

Re: [PATCH v2] staging: lustre: obdclass: change object lookup to no wait mode

2018-05-14 Thread NeilBrown
-id: https://jira.hpdd.intel.com/browse/LU-9049 > Reviewed-on: https://review.whamcloud.com/26965 > Reviewed-by: Alex Zhuravlev > Tested-by: Cliff White > Reviewed-by: Fan Yong > Reviewed-by: Oleg Drokin > Signed-off-by: James Simmons Reviewed-by: NeilBrown Thanks :-)

Re: [PATCH v2 1/5] staging: lustre: llite: add support set_acl method in inode operations

2018-05-14 Thread NeilBrown
#ifdef CONFIG_FS_POSIX_ACL declare the functions #else #define ll_get_acl NULL #define ll_set_acl NULL #endif Now as this is staging and that is (presumably) an upstream patch lightly improved it is probably fine to include the patch as-is, but in that case we will probably want to fix it u

Re: [PATCH v2 0/5] staging: mt7621-gpio: some driver cleanups

2018-05-14 Thread NeilBrown
ble string for 'mtk' MediaTek > staging: mt7621-gpio: dt-bindings: add documentation for mt7621-gpio > staging: mt7621-gpio: update TODO file Thanks, all looks good. Reviewed-by: NeilBrown for the whole series. NeilBrown > > .../devicetree/bindings/vendor-prefixes.

Re: [PATCH] staging: mt7621-gpio: avoid use of globals and use a drvdata allocated structure

2018-05-15 Thread NeilBrown
return ioread32(gpio_data->gpio_membase + offset); > } > This hunk doesn't apply. The existing code is: static inline u32 mtk_gpio_r32(struct mtk_gc *rg, u8 reg) { return ioread32(mediatek_gpio_membase + (reg * 0x10) + (rg->bank * 0x4)); } Thanks! NeilBrown si

Re: [PATCH v3 05/11] staging: mt7621-gpio: avoid use of globals and use platform_data instead

2018-05-19 Thread NeilBrown
; + return ret; > + } > + Calling devm_gpiochip_add_data() here looks good. Not removing return gpiochip_add(&rg->chip); from the end of the function isn't so good :-( BTW interrupt definitely don't work yet. The calls struct gpio_chip *gc = irq_data_get_irq_chip_data(d); get NULL. I think some sort of irq_set_chip_data(irq,...) is needed in mediatek_gpio_gpio_map(), but it is too late at night for it to all make sense to me :-) Thanks, NeilBrown signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v3 05/11] staging: mt7621-gpio: avoid use of globals and use platform_data instead

2018-05-19 Thread NeilBrown
On Sat, May 19 2018, Sergio Paracuellos wrote: > On Sat, May 19, 2018 at 08:51:43PM +1000, NeilBrown wrote: >> On Wed, May 16 2018, Sergio Paracuellos wrote: >> >> > Gpio driver have a some globals which can be avoided just >> > using platform_data in a pr

Re: [PATCH] staging: mt7621-gpio: retrieve correct pointers in interrupt related functions

2018-05-20 Thread NeilBrown
: Sergio Paracuellos Reviewed-by: NeilBrown Tested-by: NeilBrown :-) Thanks, NeilBrown > --- > drivers/staging/mt7621-gpio/gpio-mt7621.c | 14 +- > 1 file changed, 5 insertions(+), 9 deletions(-) > > diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c > b/dri

Re: [PATCH] staging: mt7621-gpio: retrieve correct pointers in interrupt related functions

2018-05-20 Thread NeilBrown
On Sun, May 20 2018, Sergio Paracuellos wrote: > On Sun, May 20, 2018 at 07:53:08PM +1000, NeilBrown wrote: >> On Sun, May 20 2018, Sergio Paracuellos wrote: >> >> > The data passed between irq related functions and the ones which have >> > been retrieved where d

Re: [RESEND PATCH v5 00/10] staging: mt7621-gpio: use mediatek as binding instead of custom mtk

2018-05-20 Thread NeilBrown
mentation has been added also to the staging driver directory. > > I resent all of them as you said me, Greg. All 10 Reviewed-by: NeilBrown Thanks heaps, NeilBrown signature.asc Description: PGP signature ___ devel mailing

Re: [PATCH] staging: mt7621-eth: Refactor RX ring resource allocation and cleanup

2018-05-20 Thread NeilBrown
ring->rx_dma, ring->rx_phys); mtk_rx_free_frags(ring); kfree(ring->rx_data); return -ENOMEM; But that is just my personal preference. Thanks, NeilBrown signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 0/7] staging: mt7621-gpio: cleanups to move this driver out of staging

2018-05-27 Thread NeilBrown
On Fri, May 25 2018, Sergio Paracuellos wrote: > This patch series review all the probably missing stuff > in order to get this driver out of staging.. > > All of these are described in the following mail by NeilBrown: > > - > https://www.mail-archive.com/driverdev-devel@l

Re: [PATCH] staging: mt7621-mmc: Fix line size exceeding 80 columns.

2018-05-29 Thread NeilBrown
ut neither the original or your new version are indented properly. Try to do more than just remove the warnings - try to make the code beautiful! Thanks, NeilBrown > { > int ret; > > -- > 2.11.0 signature.asc Description: PGP signature _

Re: [PATCH 1/6] staging: mt7621-dts: fix property #interrupt-cells for the gpio node

2018-05-29 Thread NeilBrown
banks of 32: gpio0 gpio1 grio2 but the interrupts are just a single bank of 96 interrupts. I don't know that this is a problem and I'm not advocating that we "fix" it. But it might be something that will be queried when we submit to linux-gpio - I reall

Re: [PATCH v2 01/25] staging: lustre: libcfs: restore UMP handling

2018-05-29 Thread NeilBrown
: http://review.whamcloud.com/18916 Nor does this review. Thanks, NeilBrown > Reviewed-by: Olaf Weber > Reviewed-by: Doug Oucharek > Signed-off-by: James Simmons > --- > Changelog: > > v1) New patch to handle the disappearence of UMP support > > .../lustre/incl

Re: [PATCH] staging: mt7621-eth: Refactor RX ring resource allocation and cleanup

2018-05-29 Thread NeilBrown
On Tue, May 29 2018, Dan Carpenter wrote: > On Mon, May 21, 2018 at 09:37:31AM +1000, NeilBrown wrote: >> On Fri, May 18 2018, Kamal Heib wrote: >> >> > Simplify the code of allocate and cleanup RX ring resources by using >> > helper functions, also make sure t

Re: [PATCH v2] staging: mt7621-mmc: Fix line size exceeding 80 columns

2018-05-30 Thread NeilBrown
On Thu, May 31 2018, Sankalp Negi wrote: > This patch fixes checkpatch.pl warning and check: > WARNING: line over 80 characters > CHECK: Alignment should match open parenthesis > > Signed-off-by: Sankalp Negi Reviewed-by: NeilBrown Thanks, NeilBrown > --- > Chan

Re: [PATCH] staging: lustre: include linux/highmem.h when needed

2018-05-30 Thread NeilBrown
Thanks for finding and fixing this. I did recently reduce the number of include files that were automatically included everywhere. Clearly some config combinations didn't get tested properly. Reviewed-by: NeilBrown Thanks, NeilBrown > --- > drivers/staging/lustre/lnet/klnds/o2ib

Re: [PATCH v2] staging: mt7621-gpio: update #interrupt-cells for the gpio node

2018-05-30 Thread NeilBrown
d to use the 'irq_domain_xlate_twocell' one in the driver. > One more minimal change is needed two refer gpio's interrupt-parent from > other nodes which is to add new 'gpio' label in the device tree. > > Signed-off-by: Sergio Paracuellos Reviewed-by: Neil

Re: [staging:staging-testing 754/791] drivers/staging/lustre/lustre/ptlrpc/errno.c:49:3: error: 'ENXIO' undeclared here (not in a function)

2018-05-30 Thread NeilBrown
errno.c:44:3: error: 'EPERM' >> > undeclared here (not in a function) >> > [EPERM] = LUSTRE_EPERM, >> > ^ >> >> >> >> Neil, looks like some .h files still need to be included. Care to fix >> these up

Re: [PATCH] staging: mt7621-spi: Fix Coding style issues reported by checkpatch.pl.

2018-05-31 Thread NeilBrown
esn't break the indenting rule: everything inside brackets must be to the right of the opening bracket unless that opening bracket is at the end of a line. Any of these would be acceptable - my personal preference is the second one. Thanks, NeilBrown > struct mt7621_spi; > >

Re: [PATCH v2 6/6] staging: lustre: mdc: use large xattr buffers for old servers

2018-05-31 Thread NeilBrown
thout that one test, you could arrange that OBD_OSC_VERSION(2, 10, 1, 0) evaluates to 0. As ocd_version is unsigned, the comparison will always be false, and the compiler will optimize the code away. As a general rule, you need a very good reason to have #if or #ifdef in .c files. They are usu

Re: [lustre-devel] [PATCH] staging: lustre: delete the filesystem from the tree.

2018-06-01 Thread NeilBrown
patch) is that this sort of transition of Lustre to using an improved sunrpc/xprt would be much easier if both were in the same tree. Certainly it would be easier for a larger community to be participating in the work. Thanks, NeilBrown signature.asc Description: PGP signature __

Re: [PATCH] staging: mt7621-gpio: move out of staging

2018-06-01 Thread NeilBrown
p but 3 separate gpio-chips, as this seemed simplest. Is this acceptable, or does it need to be changed? Please add my Reviewed-by: NeilBrown to the patch when you send it. Thanks, NeilBrown signature.asc Description: PGP signature ___ devel mailing

Re: [lustre-devel] [PATCH] staging: lustre: delete the filesystem from the tree.

2018-06-01 Thread NeilBrown
that we can still maintain the practices that demonstrably work so well. For the record: I'm not in favor of ejecting this code from mainline. I think that the long term result may be that it never comes back, and will like at least delay the process. But you must do what you think is best.

Re: [PATCH 0/7] staging: mt7621-pci: Fix coding style issues

2018-06-03 Thread NeilBrown
x27;d suggest leaving linux-arm-kernel and linux-mediatek off the cc list. They are unlikely to be interested until the driver is ready to be moved out of drivers/staging. Thanks, NeilBrown > > Abdun Nihaal (7): > staging: mt7621-pci: Remove space after open parenthesis >

Re: [PATCH v3 0/5] staging: mt7621-spi: Fix C Coding style issues.

2018-06-03 Thread NeilBrown
of spaces. > staging: mt7621-spi: Add a space before open paranthesis. > staging: mt7621-spi: Remove unnecessary braces {} from single > statement if block. > Thanks, All Reviewed-by: NeilBrown NeilBrown signature.asc Description: PGP signature

Re: [lustre-devel] [PATCH] staging: lustre: delete the filesystem from the tree.

2018-06-03 Thread NeilBrown
On Sun, Jun 03 2018, Dilger, Andreas wrote: > On Jun 1, 2018, at 17:19, NeilBrown wrote: >> >> On Fri, Jun 01 2018, Doug Oucharek wrote: >> >>> Would it makes sense to land LNet and LNDs on their own first? Get >>> the networking house in order first

Re: [PATCH 1/2] staging: mt7621-dts: Fix several dts warnings

2018-06-04 Thread NeilBrown
has a unit name, but no reg property > > I tried to match what is in mt7623.dtsi. > > Signed-off-by: Rosen Penev Reviewed-by: NeilBrown Thanks, NeilBrown > --- > drivers/staging/mt7621-dts/mt7621.dtsi | 13 ++--- > 1 file changed, 10 insertions(+), 3 deletions

Re: [PATCH 2/2] staging: mt7621-dts: Match pcie format to mt7623.dtsi

2018-06-04 Thread NeilBrown
rom working 3/ the "num-lanes" might make sense, but no code actually processes it. "num-lanes" is only examined by: drivers/pci/dwc/pcie-designware.c: ret = of_property_read_u32(np, "num-lanes", &lanes); drivers/pci/host/pcie-mediatek.c

[PATCH 0/5] staging: mt7621 improvements, particularly SPI

2018-06-06 Thread NeilBrown
messages. Thanks, NeilBrown --- NeilBrown (5): staging: mt7621-pci: use rt_sysc_?32() to access system-control register. staging: mt7621-spi: change mt7621_spi_wait_till_ready to take struct mt7621_spi staging: mt7621-spi: revised half-duplex message handling staging

[PATCH 1/5] staging: mt7621-pci: use rt_sysc_?32() to access system-control register.

2018-06-06 Thread NeilBrown
pointers, and use these functions. Signed-off-by: NeilBrown --- drivers/staging/mt7621-pci/pci-mt7621.c | 57 +++ 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index

[PATCH 3/5] staging: mt7621-spi: revised half-duplex message handling

2018-06-06 Thread NeilBrown
with a following read transfer, as this is a common pattern. With this in place, we can remove the current max_transfer_size limit. In testing, this increases the read throughput for a NOR flash chip from 1.4MB/s to 2.3MB/s, a 50% improvement. Signed-off-by: NeilBrown --- drivers/staging/mt7621

[PATCH 4/5] staging: mt7621-dts: correct various clock frequencies.

2018-06-06 Thread NeilBrown
200MHz with a CPU clock of 900MHz. So assume 1/4 is the default. Also, the nor-flash in the gbpc1 is documented as accepting 50MHz for request requests, and higher for other requests. So set maximum to 50MHz. Signed-off-by: NeilBrown --- drivers/staging/mt7621-dts/gbpc1.dts |5

[PATCH 5/5] staging: mt7621-dts: convert to gpio-keys

2018-06-06 Thread NeilBrown
Now that gpio-interrupts work correctly, we can use gpio-keys instead of gpio-keys-polled for the single push-button on the gbpc-1. Signed-off-by: NeilBrown --- drivers/staging/mt7621-dts/gbpc1.dts |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging

[PATCH 2/5] staging: mt7621-spi: change mt7621_spi_wait_till_ready to take struct mt7621_spi

2018-06-06 Thread NeilBrown
All callers have a 'struct mt7621_spi' and that is all mt7621_spi_wait_till_ready() needs. So just pass it instead of the spi_device. Signed-off-by: NeilBrown --- drivers/staging/mt7621-spi/spi-mt7621.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 1/8] staging: mt7621-gpio: make use 'bgpio_init' from GPIO_GENERIC

2018-06-10 Thread NeilBrown
ta->gpio_membase + GPIO_REG_DCLR(rg->bank), > + gpio_data->gpio_membase + GPIO_REG_CTRL(rg->bank), > + gpio_data->gpio_membase + GPIO_REG_CTRL(rg->bank), > + 0); This is the first problem I git. You'

Re: [PATCH 4/8] staging: mt7621-gpio: implement '.irq_[request|release]_resources' functions

2018-06-10 Thread NeilBrown
ou can use container_of to get the 'rg', and you don't need 'bank' at all. The same applies in several places. It might not be this patch that introduces the problem, but this was the easiest place to point to it. Thanks, NeilBrown > + int bank = irq

Re: [PATCH 7/8] staging: mt7621-gpio: avoid custom irq_domain for gpio

2018-06-10 Thread NeilBrown
er(struct irq_desc *desc) > pending = mtk_gpio_r32(rg, GPIO_REG_STAT(rg->bank)); > > for_each_set_bit(bit, &pending, MTK_BANK_WIDTH) { > - u32 map = irq_find_mapping(gpio_data->gpio_irq_domain, > +

Re: [PATCH 8/8] staging: mt7621-gpio: implement high level and low level irqs

2018-06-10 Thread NeilBrown
break; > + case IRQ_TYPE_LEVEL_HIGH: > + rg->hlevel |= mask; > + rg->rising &= ~mask; > + rg->falling &= mask; > + rg->llevel &= ~mask; > + break; > +

Re: [PATCH v2 7/7] staging: mt7621-gpio: implement high level and low level irqs

2018-06-11 Thread NeilBrown
rg->llevel |= mask; > + rg->hlevel &= ~mask; > + } > + } I wonder if we should be clearing the mask bit for hlevel and llevel when setting either edge - and clearing the edge bits when setting a level. Actually, you might have been rig

Re: [PATCH v2] staging: mt7621-gpio: avoid custom irq_domain for gpio

2018-06-11 Thread NeilBrown
"select GPIOLIB_IRQCHIP" in Kconfig 2/ The interrupt line has not been marked IRQF_SHARED. I cannot figure out how to mark it as IRQF_SHARED. If I hack the code so that mediatek_gpio_bank_probe() is only called for the first bank, then interrupt from that bank work fine. If I let it

Re: [PATCH v2 0/7] staging: mt7621-gpio: last cleanups

2018-06-11 Thread NeilBrown
018-June/121742.html > > this series tries to fix all of the issues in order to send > v2 and give it a new try. Because I don't have to hardware to > test my changes I send new cleanups first in staging to make > easier to NeilBrown test it and get a feedback about them. >

Re: [PATCH v2 0/7] staging: mt7621-gpio: last cleanups

2018-06-11 Thread NeilBrown
On Mon, Jun 11 2018, Sergio Paracuellos wrote: > On Mon, Jun 11, 2018 at 06:33:44PM +1000, NeilBrown wrote: >> On Mon, Jun 11 2018, Sergio Paracuellos wrote: >> >> > After submiting this driver to try to get mainlined and get >> > out of staging some n

Re: [PATCH v3 0/8] staging: mt7621-gpio: last cleanups

2018-06-11 Thread NeilBrown
018-June/121742.html > > this series tries to fix all of the issues in order to send > v2 and give it a new try. Because I don't have to hardware to > test my changes I send new cleanups first in staging to make > easier to NeilBrown test it and get a feedback about them.

Re: [PATCH] staging: lustre: add error handling for try_module_get

2018-06-11 Thread NeilBrown
sizeof(*info)); Thanks for the patch I agree that this is probably a bug, but the code is still buggy after you patch, just in a different way. Try following through the code and see what happens when you 'goto failed'. NeilBrown signature.asc Description: PGP signature

RE: [PATCH] staging: lustre: add error handling for try_module_get

2018-06-13 Thread NeilBrown
s the exit function from completing. Some code outside the module must release the lock. Having said that, I don't really like this approach. I much prefer for the module reference to be taken and put outside of the module - it seems less error-prone. NeilBrown signature.asc Description

Re: [lustre-devel] [PATCH v3] staging: lustre: Change return type to vm_fault_t

2018-06-14 Thread NeilBrown
t;> And have you tried applying it to Linus's current tree? :) > > Last tested on 4.17-rc-6 and it worked fine. Let me verify in current tree. > As you have undoubtedly noticed, lustre is no longer in Linus' tree. I'm experimenting with maintaining a branch which retains th

Re: [lustre-devel] [PATCH v3] staging: lustre: Change return type to vm_fault_t

2018-06-14 Thread NeilBrown
On Thu, Jun 14 2018, Souptick Joarder wrote: > On Thu, Jun 14, 2018 at 12:59 PM, NeilBrown wrote: >> On Tue, Jun 12 2018, Souptick Joarder wrote: >> >>> On 12-Jun-2018 2:21 AM, "Greg KH" wrote: >>>> >>>> On Tue, Jun 12, 2018 at 02:00

Re: [PATCH] staging: mt7621-pci: simplify 'mt7621_pcie_init_virtual_bridges' function

2020-04-10 Thread NeilBrown
ink_status & BIT(i)) == 0) > + p2p_br_devnum[i] = n++; This second for loop seems like a change in functionality to what we had before. Is that correct? I seems to make sense but as you didn't flag the change in the commit message I thought I

Re: [PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml

2020-04-10 Thread NeilBrown
ous emails over the last couple of months. I have confirm that PCI works and in particular I don't get the cold-boot hangs that are common without these patches. So that is an excellent result. Thanks, NeilBrown 7e4350e416ed staging: mt7621-pci: simplify 'mt7621_pcie_init_v

[PATCH] hmc5843 - add basic dt support

2013-10-31 Thread NeilBrown
No configuration, just a compatible string and documentation. Signed-off-by: NeilBrown diff --git a/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt b/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt new file mode 100644 index ..90d5f34db04e --- /dev

Re: [PATCH] Staging: android: binder: Fix over-80-char lines

2014-05-30 Thread NeilBrown
", > -from_kuid(&init_user_ns, > current->cred->euid), > -from_kuid(&init_user_ns, > binder_context_mgr_uid)); > - ret = -EPERM; > -

Re: [bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-22 Thread NeilBrown
blnd") which added a "free_conn" arg to kiblnd_destroy_conn(), but never used the arg. Presumably it is meant to say "Don't free something", but exactly what should be free and what shouldn't isn't immediately clear. Liang: do you remember what you intende

Re: [bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-23 Thread NeilBrown
s for finding this bug - it validates the work of converting to more standard interfaces :-) Thanks, NeilBrown signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 41/80] staging: lustre: lmv: separate master object with master stripe

2018-02-08 Thread NeilBrown
hat do others think? Is there any chance that the current lustre in Linux will ever be more than a poor second-cousin to the external lustre-release. If there isn't, should we just discard it now and move on? Thanks, NeilBrown signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 41/80] staging: lustre: lmv: separate master object with master stripe

2018-02-08 Thread NeilBrown
On Thu, Feb 08 2018, Oleg Drokin wrote: >> On Feb 8, 2018, at 8:39 PM, NeilBrown wrote: >> >> On Tue, Aug 16 2016, James Simmons wrote: > > my that’s an old patch > >> ... >> >> Whoever converted it to "!strcmp()" inverted the condi

Re: [lustre-devel] [PATCH 41/80] staging: lustre: lmv: separate master object with master stripe

2018-02-11 Thread NeilBrown
On Thu, Feb 08 2018, Oleg Drokin wrote: >> On Feb 8, 2018, at 10:10 PM, NeilBrown wrote: >> >> On Thu, Feb 08 2018, Oleg Drokin wrote: >> >>>> On Feb 8, 2018, at 8:39 PM, NeilBrown wrote: >>>> >>>> On Tue, Aug 1

Re: [lustre-devel] [PATCH 41/80] staging: lustre: lmv: separate master object with master stripe

2018-02-11 Thread NeilBrown
On Sat, Feb 10 2018, James Simmons wrote: >> > On Feb 8, 2018, at 10:10 PM, NeilBrown wrote: >> > >> > On Thu, Feb 08 2018, Oleg Drokin wrote: >> > >> >>> On Feb 8, 2018, at 8:39 PM, NeilBrown wrote: >> >>> >> >>&

Re: [PATCH 24/41] staging: lustre: clio: add CIT_DATA_VERSION and remove IOC_LOV_GETINFO

2018-02-21 Thread NeilBrown
This reliably causes my testing to crash as the LNVRNT() in cl2osc_io() fails, and I test with CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK=y Does anyone have any idea why no other testing trips over this? lustre-release has the same bug in Commit: fcd45488711a ("L

[PATCH 1/3] staging: lustre: lov: use correct env in lov_io_data_version_end()

2018-02-22 Thread NeilBrown
: lustre: clio: add CIT_DATA_VERSION and remove IOC_LOV_GETINFO") Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/lov/lov_io.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_io.c b/drivers/staging/lustre/lustre/lov/l

[PATCH 3/3] staging: lustre: lnet/selftest: don't ignore status from lstcon_test_add

2018-02-22 Thread NeilBrown
If lstcon_test_add sets 'ret' (passed by reference) to 1, then lst_test_add_ioctl() ignores the return value. This isn't justified - the return value must be zero for 'ret' to be meaningful. Signed-off-by: NeilBrown --- drivers/staging/lustre/lnet/selftest/conctl.c |

[PATCH 0/3] Three lustre bugfixes

2018-02-22 Thread NeilBrown
First two patches fix bugs that have been prevented the test suite from finished for me - now it completes with about 10% of tests failing. Third patch fixes a tiny bug I noticed while reviewing another recent patch to the same file. Thanks, NeilBrown --- NeilBrown (3): staging: lustre

[PATCH 2/3] staging: lustre: lmv: correctly iput lmo_root

2018-02-22 Thread NeilBrown
object with master stripe") Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/lmv/lmv_obd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index 179651531862..e8a

Re: [PATCH] staging: lustre: fid: avoid false-positive uninitialized variable warning

2018-03-13 Thread NeilBrown
, or U64_MAX+rc. Then if (seqnr >= U64MAX-MAX_ERRNO) there is an error. I'm not sure that is actually an improvement though, and I'm happy with your approach Reviewed-by: NeilBrown Thanks, NeilBrown > > Cc: NeilBrown > Signed-off-by: Arnd Bergmann > --- >

Re: [PATCH] staging: lustre: use module_name() macro for debug printf

2018-03-13 Thread NeilBrown
rticular case can be avoided by using the module_name() > macro that was designed exactly to handle printing the name of > a module in all configurations. Learn something new every day :-) Reviewed-by: NeilBrown Thanks, NeilBrown > > Cc: NeilBrown > Signed-off-by: Arnd Bergm

[PATCH 03/13] staging: mt7621-gpio: ralink: add mt7621 gpio controller

2018-03-14 Thread NeilBrown
From: John Crispin Signed-off-by: John Crispin Signed-off-by: NeilBrown --- drivers/staging/Kconfig |2 drivers/staging/Makefile |1 drivers/staging/mt7621-gpio/Kconfig |6 drivers/staging/mt7621-gpio/Makefile |3 drivers

[PATCH 07/13] staging: mt7621-eth: Document ralink/mediatek SoC ethernet binding

2018-03-14 Thread NeilBrown
From: John Crispin Add possible dt binding for mediatek gigabit switches. Signed-off-by: John Crispin Signed-off-by: Felix Fietkau Signed-off-by: Michael Lee Cc: devicet...@vger.kernel.org Signed-off-by: NeilBrown --- .../devicetree/bindings/net/mediatek-net-gsw.txt | 48

[PATCH 04/13] staging: mt7621-spi: add mt7621 support

2018-03-14 Thread NeilBrown
From: John Crispin NeilBrown: The code will fail with a warning if asked to transfer more than 32 bytes at a time. So used max_transfer_size interface to tell users about this. Signed-off-by: John Crispin Signed-off-by: NeilBrown --- drivers/staging/Kconfig

[PATCH 02/13] staging: mt7621-pinctrl: ralink: add pinctrl driver

2018-03-14 Thread NeilBrown
From: John Crispin Signed-off-by: John Crispin Signed-off-by: NeilBrown --- drivers/staging/Kconfig |2 drivers/staging/Makefile|1 drivers/staging/mt7621-pinctrl/Kconfig |4 drivers/staging/mt7621-pinctrl/Makefile

[PATCH 05/13] staging: mt7621-dma: ralink: add rt2880 dma engine

2018-03-14 Thread NeilBrown
From: John Crispin Signed-off-by: John Crispin Signed-off-by: NeilBrown --- drivers/staging/Kconfig |2 drivers/staging/Makefile |1 drivers/staging/mt7621-dma/Kconfig | 12 drivers/staging/mt7621-dma/Makefile |4 drivers/staging

[PATCH 00/13] staging: add drivers to support Mediatek mt7621 in gnubee-pc1

2018-03-14 Thread NeilBrown
d a dts file for the GNUBEE. When all the other drivers move out of staging, it should follow them. I plan to continue to work on these drivers, but probably not for a few weeks at least. Thanks, NeilBrown --- John Crispin (12): staging: mt7621-pci: MIPS/ralink: add MT7621 pcie driver

<    1   2   3   >