RE: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

2018-01-17 Thread 李書帆
Dear Heikki, Sorry for bothering. Just want to check is there anything we need to modify? Thank you! Best Regards, * Shu-Fan Lee Richtek Technology Corporation TEL: +886-3-5526789 #2359 FAX: +886-3-5526612 * -Original Message---

Re: [PATCH v2 3/4] Staging: rtl8723bs: Change condition to assignment

2018-01-17 Thread Dan Carpenter
On Wed, Jan 17, 2018 at 12:33:23AM +0530, Shreeya Patel wrote: > Change the conditional operator to assignment as it is > not a conditional statement. > > Signed-off-by: Shreeya Patel > --- > > Changes in v2 > -Rebase and resend. > > drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 +- > 1 file

[PATCH v2] usb: ehci-omap: don't complain on -EPROBE_DEFER when no PHY found

2018-01-17 Thread Ladislav Michl
Don't complain on -EPROBE_DEFER when when no PHY found, the driver probe will be retried later. Signed-off-by: Ladislav Michl Acked-by: Tony Lindgren --- Changes: - v2: None, just added Tony's ack drivers/usb/host/ehci-omap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff -

Re: [PATCH] usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode

2018-01-17 Thread Roger Quadros
Manu, On 16/01/18 08:26, Manu Gautam wrote: > Commit 689bf72c6e0d ("usb: dwc3: Don't reinitialize core during > host bus-suspend/resume") updated suspend/resume routines to not > power_off and reinit PHYs/core for host mode. > It broke platforms that rely on DWC3 core to power_off PHYs to > enter

Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

2018-01-17 Thread Heikki Krogerus
Hi, On Wed, Jan 17, 2018 at 09:30:45AM +, shufan_lee(?) wrote: > Dear Heikki, > > Sorry for bothering. > > Just want to check is there anything we need to modify? I'll check the patch this week, but please note that we are -rc8, so nothing is going to happen before -rc1 is out.

Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

2018-01-17 Thread Greg KH
On Wed, Jan 17, 2018 at 01:08:58PM +0200, Heikki Krogerus wrote: > Hi, > > On Wed, Jan 17, 2018 at 09:30:45AM +, shufan_lee(?) wrote: > > Dear Heikki, > > > > Sorry for bothering. > > > > Just want to check is there anything we need to modify? > > I'll check the patch this week,

[PATCH] USB: serial: remove redundant initializations of 'mos_parport'

2018-01-17 Thread Colin King
From: Colin Ian King The pointer mos_parport is being initialized to pp->private_data and then the assignment is duplicated after a spin lock. Remove the initialization as it occurs before the spin lock and it is a redundant assignment. Cleans up clang warnings: drivers/usb/serial/mos7720.c:521

Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

2018-01-17 Thread Heikki Krogerus
Hi Greg, On Wed, Jan 17, 2018 at 12:14:02PM +0100, Greg KH wrote: > On Wed, Jan 17, 2018 at 01:08:58PM +0200, Heikki Krogerus wrote: > > Hi, > > > > On Wed, Jan 17, 2018 at 09:30:45AM +, shufan_lee(?) wrote: > > > Dear Heikki, > > > > > > Sorry for bothering. > > > > > > Just wa

Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

2018-01-17 Thread Greg KH
On Wed, Jan 17, 2018 at 02:00:28PM +0200, Heikki Krogerus wrote: > Hi Greg, > > On Wed, Jan 17, 2018 at 12:14:02PM +0100, Greg KH wrote: > > On Wed, Jan 17, 2018 at 01:08:58PM +0200, Heikki Krogerus wrote: > > > Hi, > > > > > > On Wed, Jan 17, 2018 at 09:30:45AM +, shufan_lee(?) wrote

Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

2018-01-17 Thread Greg KH
On Wed, Jan 10, 2018 at 02:59:12PM +0800, ShuFanLee wrote: > +static inline void rt1711h_poll_ctrl(struct rt1711h_chip *chip) > +{ > + cancel_delayed_work_sync(&chip->poll_work); > + > + if (atomic_read(&chip->poll_count) == 0) { > + atomic_inc(&chip->poll_count); > +

Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

2018-01-17 Thread Greg KH
On Wed, Jan 10, 2018 at 02:59:12PM +0800, ShuFanLee wrote: > +static inline int rt1711h_reg_write_word(struct rt1711h_chip *chip, uint8_t > reg, > + uint16_t data) > +{ > + data = cpu_to_le16(data); > + return rt1711h_reg_block_write(chip, reg, 2, (uint8_t *)&data); > +} Did you run s

Re: [PATCH v2] usb: ehci-omap: don't complain on -EPROBE_DEFER when no PHY found

2018-01-17 Thread Roger Quadros
On 17/01/18 12:08, Ladislav Michl wrote: > Don't complain on -EPROBE_DEFER when when no PHY found, the driver > probe will be retried later. > > Signed-off-by: Ladislav Michl > Acked-by: Tony Lindgren Acked-by: Roger Quadros > --- > Changes: > - v2: None, just added Tony's ack > > drivers

Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

2018-01-17 Thread Greg KH
On Wed, Jan 10, 2018 at 02:59:12PM +0800, ShuFanLee wrote: > From: ShuFanLee > > Richtek RT1711H Type-C chip driver that works with > Type-C Port Controller Manager to provide USB PD and > USB Type-C functionalities. > > Signed-off-by: ShuFanLee Minor review of your main structure and your deb

Re: [PATCH v2 0/4] Remove checkpatch warnings

2018-01-17 Thread Greg KH
On Wed, Jan 17, 2018 at 12:24:50AM +0530, Shreeya Patel wrote: > This patchset removes some warnings generated by checkpatch > for cleanup of the rtl8723bs driver. Also some additional > cleanups are introduced in the *[1/4] and *[3/4] patches > to make the code according to the kernel coding style

Re: [PATCH v2 2/4] Staging: rtl8723bs: Change names to conform to the kernel code

2018-01-17 Thread Greg KH
On Wed, Jan 17, 2018 at 12:27:40AM +0530, Shreeya Patel wrote: > Change names of some variables and functions to conform > to the kernel coding style. That's really vague, say exactly what you did here. And don't do all functions/variables at once, that's a pain to review, would you want to revie

[PATCH] usb: phy: mxs: Do not run charger detection on i.MX23/28

2018-01-17 Thread Fabio Estevam
44195] pgd = (ptrval) [2.246994] [0188] *pgd= [2.250676] Internal error: Oops: 5 [#1] ARM [2.254979] Modules linked in: [2.258089] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc8-next-20180117-2-g75d5f21 #7 [2.266724] Hardware name: Freescale MXS (Device Tree) [

Re: [PATCH v2 2/4] Staging: rtl8723bs: Change names to conform to the kernel code

2018-01-17 Thread Shreeya Patel
On Wed, 2018-01-17 at 14:59 +0100, Greg KH wrote: > On Wed, Jan 17, 2018 at 12:27:40AM +0530, Shreeya Patel wrote: > > > > Change names of some variables and functions to conform > > to the kernel coding style. > That's really vague, say exactly what you did here.  And don't do all > functions/var

Not enough bandwidth with Magewell XI100DUSB-HDMI

2018-01-17 Thread Michael Tretter
Hello, I am using a Magewell XI100DUSB-HDMI frame grabber which by itself works fine. However, I get a "Not enough bandwidth for new device state." error for any other USB device that is plugged after the frame grabber. This error is caused by the xHC sending a Bandwidth Error for the Configure En

[PATCH] usb: xhci: implement Get Port Bandwidth command

2018-01-17 Thread Michael Tretter
If the xHC detects an oversubscription of bandwidth, it send a Bandwidth Error completion code in the Command Completion event. The Get Port Bandwidth command can be used to show the available bandwidth of each root hub port of the xHC. Signed-off-by: Michael Tretter --- drivers/usb/host/xhci-ri

[PATCH] usbip: prevent bind loops on devices attached to vhci_hcd

2018-01-17 Thread Shuah Khan
usbip host binds to devices attached to vhci_hcd on the same server when user does attach over localhost or specifies the server as the remote. usbip attach -r localhost -b busid or usbip attach -r servername (or server IP) Unbind followed by bind works, however device is left in a bad state with

[PATCH] usbip: list: don't list devices attached to vhci_hcd

2018-01-17 Thread Shuah Khan
usbip host lists devices attached to vhci_hcd on the same server when user does attach over localhost or specifies the server as the remote. usbip attach -r localhost -b busid or usbip attach -r servername (or server IP) Fix it to check and not list devices that are attached to vhci_hcd. Cc: sta

[PATCH v6 01/99] xarray: Add the xa_lock to the radix_tree_root

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This results in no change in structure size on 64-bit x86 as it fits in the padding between the gfp_t and the void *. Initialising the spinlock requires a name for the benefit of lockdep, so RADIX_TREE_INIT() now needs to know the name of the radix tree it's initialising, an

[PATCH v6 28/99] page cache: Remove stray radix comment

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/filemap.c b/mm/filemap.c index d2a0031d61f5..2536fcacb5bc 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2606,7 +2606,7 @@ static struct page *do_read_cac

[PATCH v6 80/99] blk-ioc: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Skip converting the lock to use xa_lock; I think this code can live with the double-locking. Signed-off-by: Matthew Wilcox --- block/blk-ioc.c | 13 +++-- include/linux/iocontext.h | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git

[PATCH v6 25/99] page cache: Convert page deletion to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox The code is slightly shorter and simpler. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index e6371b551de1..ed30d5310e50 100644 --- a/mm/filema

[PATCH v6 81/99] i915: Convert handles_vma to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Straightforward conversion. Signed-off-by: Matthew Wilcox --- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_context.c | 12 +--- drivers/gpu/drm/i915/i915_gem_context.h | 4 ++-- drivers/gpu/drm/i915/i915_gem_exec

[PATCH v6 82/99] s390: Convert gmap to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox The three radix trees in gmap are all converted to the XArray. This is another case where the multiple locks held mandates the use of the xa_reserve() API. The gmap_insert_rmap() function is considerably simplified by using the advanced API; gmap_radix_tree_free() turns out

[PATCH v6 26/99] page cache: Convert page cache lookups to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Introduce page_cache_pin() to factor out the common logic between the various lookup routines: find_get_entry find_get_entries find_get_pages_range find_get_pages_contig find_get_pages_range_tag find_get_entries_tag filemap_map_pages By using the xa_state to control the ite

[PATCH v6 97/99] xen: Convert pvcalls-back to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This is a straightforward conversion. Signed-off-by: Matthew Wilcox --- drivers/xen/pvcalls-back.c | 51 ++ 1 file changed, 15 insertions(+), 36 deletions(-) diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c i

[PATCH v6 99/99] null_blk: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox We can probably avoid the call to xa_reserve() by changing the locking, but I didn't feel confident enough to do that. Signed-off-by: Matthew Wilcox --- drivers/block/null_blk.c | 87 +--- 1 file changed, 38 insertions(+), 49 del

[PATCH v6 98/99] qrtr: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Moved the kref protection under the xa_lock too. Signed-off-by: Matthew Wilcox --- net/qrtr/qrtr.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c index 77ab05e23001..7de9a06d2aa2 100644 --- a/ne

[PATCH v6 95/99] f2fs: Convert gclist.iroot to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Straightforward conversion. Signed-off-by: Matthew Wilcox --- fs/f2fs/gc.c | 14 +++--- fs/f2fs/gc.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index aac1e02f75df..2b33068dc36b 100644 --- a/fs/f2fs/gc.c +++ b

[PATCH v6 96/99] dma-debug: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This is an unusual way to use the xarray tags. If any other users come up, we can add an xas_get_tags() / xas_set_tags() API, but until then I don't want to encourage this kind of abuse. Signed-off-by: Matthew Wilcox --- lib/dma-debug.c | 105 +

[PATCH v6 93/99] f2fs: Convert ino_root to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox I did a fairly major rewrite of __add_ino_entry(); please check carefully. Also, we can remove ino_list unless it's important to write out orphan inodes in the order they were orphaned. It may also make more sense to combine the array of inode_management structures into a si

[PATCH v6 94/99] f2fs: Convert extent_tree_root to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Rename it to extent_array and use the xa_lock in place of the extent_tree_lock mutex. Signed-off-by: Matthew Wilcox --- fs/f2fs/extent_cache.c | 59 +- fs/f2fs/f2fs.h | 3 +-- 2 files changed, 30 insertions(+), 32 de

[PATCH v6 92/99] f2fs: Convert pids radix tree to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox The XArray API works out rather well for this user. Signed-off-by: Matthew Wilcox --- fs/f2fs/super.c | 2 -- fs/f2fs/trace.c | 60 - fs/f2fs/trace.h | 2 -- 3 files changed, 4 insertions(+), 60 deletions(-) diff -

[PATCH v6 91/99] btrfs: Convert name_cache to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This is a very straightforward conversion. The handling of collisions in the namecache could be better handled with an hlist, but that's a patch for another day. Signed-off-by: Matthew Wilcox --- fs/btrfs/send.c | 19 +-- 1 file changed, 9 insertions(+), 1

[PATCH v6 90/99] btrfs: Convert delayed_nodes_tree to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Rename it to just 'delayed_nodes' and remove it from the protection of btrfs_root->inode_lock. Signed-off-by: Matthew Wilcox --- fs/btrfs/ctree.h | 8 +++--- fs/btrfs/delayed-inode.c | 65 fs/btrfs/disk-io.c |

[PATCH v6 89/99] btrfs: Convert buffer_radix to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Eliminate the buffer_lock as the internal xa_lock provides all the necessary protection. We can remove the radix_tree_preload calls, but I can't find a good way to use the 'exists' result from xa_cmpxchg(). We could resort to the advanced API to improve this, but it's a real

[PATCH v6 86/99] btrfs: Convert reada_zones to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox The use of the reada_lock means we have to use the xa_reserve() API. If we can avoid using reada_lock to protect this xarray, we can drop the use of that function. Signed-off-by: Matthew Wilcox --- fs/btrfs/reada.c | 54 +++

[PATCH v6 87/99] btrfs: Convert reada_extents to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Straightforward conversion. Signed-off-by: Matthew Wilcox --- fs/btrfs/reada.c | 32 +--- fs/btrfs/volumes.c | 2 +- fs/btrfs/volumes.h | 2 +- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/fs/btrfs/reada.c b/fs/btrfs/read

[PATCH v6 88/99] btrfs: Convert reada_tree to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Rename reada_tree to reada_array. Use the xa_lock in reada_array to replace reada_lock. This has to use a nested spinlock as we take the xa_lock of the reada_extents and reada_zones xarrays while holding the reada_lock. Signed-off-by: Matthew Wilcox --- fs/btrfs/ctree.h

[PATCH v6 84/99] btrfs: Convert fs_roots_radix to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Most of the gang lookups being done can be expressed just as efficiently and somewhat more naturally as xa_for_each() loops. I opted not to change the one in btrfs_cleanup_fs_roots() as it's using SRCU which is subtle and quick to anger. Signed-off-by: Matthew Wilcox ---

[PATCH v6 83/99] hwspinlock: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox I had to mess with the locking a bit as I converted the code from a mutex to the xa_lock. Signed-off-by: Matthew Wilcox --- drivers/hwspinlock/hwspinlock_core.c | 151 --- 1 file changed, 52 insertions(+), 99 deletions(-) diff --git a/drive

[PATCH v6 85/99] btrfs: Remove unused spinlock

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox The reada_lock in struct btrfs_device was only initialised, and not actually used. That's good because there's another lock also called reada_lock in the btrfs_fs_info that was quite heavily used. Remove this one. Signed-off-by: Matthew Wilcox --- fs/btrfs/volumes.c | 1

[PATCH v6 79/99] blk-cgroup: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This call to radix_tree_preload is awkward. At the point of allocation, we're under not only a local lock, but also under the queue lock. So we can't back out, drop the lock and retry the allocation. Replace this preload call with a call to xa_reserve() which will ensure t

[PATCH v6 78/99] sh: intc: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox The radix tree was being protected by a raw spinlock. I believe that was not necessary, and the new internal regular spinlock will be adequate for this array. Signed-off-by: Matthew Wilcox --- drivers/sh/intc/core.c | 9 ++ drivers/sh/intc/internals.h | 5 ++--

[PATCH v6 77/99] fscache: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Removes another user of radix_tree_preload(). Signed-off-by: Matthew Wilcox --- fs/fscache/cookie.c | 6 +- fs/fscache/internal.h | 2 +- fs/fscache/object.c | 2 +- fs/fscache/page.c | 152 +--- fs/fscache/

[PATCH v6 76/99] irqdomain: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox In a non-critical path, irqdomain wants to know how many entries are stored in the xarray, so add xa_count(). This is a pretty straightforward conversion; mostly just removing now-redundant locking. The only thing of note is just how much simpler irq_domain_fix_revmap() bec

[PATCH v6 75/99] md: Convert raid5-cache to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This is the first user of the radix tree I've converted which was storing numbers rather than pointers. I'm fairly pleased with how well it came out. There's less boiler-plate involved than there was with the radix tree, so that's a win. It does use the advanced API, and I

[PATCH v6 72/99] xfs: Convert xfs dquot to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This is a pretty straight-forward conversion. Signed-off-by: Matthew Wilcox --- fs/xfs/xfs_dquot.c | 38 +- fs/xfs/xfs_qm.c| 36 ++-- fs/xfs/xfs_qm.h| 18 +- 3 files changed, 48 ins

[PATCH v6 73/99] xfs: Convert mru cache to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This eliminates a call to radix_tree_preload(). Signed-off-by: Matthew Wilcox --- fs/xfs/xfs_mru_cache.c | 72 +++--- 1 file changed, 33 insertions(+), 39 deletions(-) diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs/xfs_mru_cache.c

[PATCH v6 74/99] usb: Convert xhci-mem to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox The XArray API is a slightly better fit for xhci_insert_segment_mapping() than the radix tree API was. Signed-off-by: Matthew Wilcox --- drivers/usb/host/xhci-mem.c | 68 +++-- drivers/usb/host/xhci.h | 6 ++-- 2 files changed,

[PATCH v6 70/99] xfs: Convert m_perag_tree to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Getting rid of the m_perag_lock lets us also get rid of the call to radix_tree_preload(). This is a relatively naive conversion; we could improve performance over the radix tree implementation by passing around xa_state pointers instead of indices, possibly at the expense of

[PATCH v6 71/99] xfs: Convert pag_ici_root to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Rename pag_ici_root to pag_ici_xa and use XArray APIs instead of radix tree APIs. Shorter code, typechecking on tag numbers, better error checking in xfs_reclaim_inode(), and eliminates a call to radix_tree_preload(). Signed-off-by: Matthew Wilcox --- fs/xfs/libxfs/xfs_sb

[PATCH v6 68/99] vmalloc: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox The radix tree of vmap blocks is simpler to express as an XArray. Saves a couple of hundred bytes of text and eliminates a user of the radix tree preload API. Signed-off-by: Matthew Wilcox --- mm/vmalloc.c | 39 +-- 1 file changed, 13 in

[PATCH v6 69/99] brd: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Convert brd_pages from a radix tree to an XArray. Simpler and smaller code; in particular another user of radix_tree_preload is eliminated. Signed-off-by: Matthew Wilcox --- drivers/block/brd.c | 93 - 1 file changed, 28

[PATCH v6 67/99] mm: Convert cgroup writeback to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This is a fairly naive conversion, leaving in place the GFP_ATOMIC allocation. By switching the locking around, we could use GFP_KERNEL and probably simplify the error handling. Signed-off-by: Matthew Wilcox --- include/linux/backing-dev-defs.h | 2 +- include/linux/back

Re: [PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-17 Thread David Miller
From: Kai-Heng Feng Date: Tue, 16 Jan 2018 16:46:27 +0800 > r8153 on Dell TB15/16 dock corrupts rx packets. > > This change is suggested by Realtek. They guess that the XHCI controller > doesn't have enough buffer, and their guesswork is correct, once the RX > aggregation gets disabled, the issu

[PATCH v6 66/99] page cache: Finish XArray conversion

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox With no more radix tree API users left, we can drop the GFP flags and use xa_init() instead of INIT_RADIX_TREE(). Signed-off-by: Matthew Wilcox --- fs/inode.c | 2 +- include/linux/fs.h | 2 +- mm/swap_state.c| 2 +- 3 files changed, 3 insertions(+), 3 deletion

[PATCH v6 64/99] dax: Convert grab_mapping_entry to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/dax.c | 98 +--- 1 file changed, 26 insertions(+), 72 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 494e8fb7a98f..3eb0cf176d69 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -44

[PATCH v6 65/99] dax: Fix sparse warning

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox sparse doesn't know that follow_pte_pmd() conditionally acquires the ptl, because it's in a separate compilation unit. Move follow_pte_pmd() to mm.h where sparse can see it. Signed-off-by: Matthew Wilcox --- include/linux/mm.h | 15 ++- mm/memory.c| 16

[PATCH v6 62/99] dax: Convert dax_insert_pfn_mkwrite to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/dax.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index b66b8c896ed8..e6b25ef112f2 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1497,21 +1497,21 @@ static int dax_insert_pfn_mkwrite(struct

[PATCH v6 63/99] dax: Convert dax_insert_mapping_entry to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/dax.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index e6b25ef112f2..494e8fb7a98f 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -498,9 +498,9 @@ static void *dax_insert_mapping_e

[PATCH v6 60/99] dax: Convert __dax_invalidate_mapping_entry to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Simple now that we already have an xa_state! Signed-off-by: Matthew Wilcox --- fs/dax.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index d3fe61b95216..9a30224da4d6 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -413,24 +413,

[PATCH v6 61/99] dax: Convert dax_writeback_one to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Likewise easy Signed-off-by: Matthew Wilcox --- fs/dax.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 9a30224da4d6..b66b8c896ed8 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -632,8 +632,7 @@ static int dax_writ

[PATCH v6 57/99] dax: Convert dax_unlock_mapping_entry to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Replace slot_locked() with dax_locked() and inline unlock_slot() into its only caller. Signed-off-by: Matthew Wilcox --- fs/dax.c | 48 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/fs/dax.c b/fs/dax.c inde

[PATCH v6 59/99] dax: More XArray conversion

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This time, we want to convert get_unlocked_mapping_entry() to use the XArray. That has a ripple effect, causing us to change the waitqueues to hash on the address of the xarray rather than the address of the mapping (functionally equivalent), and create a lot of on-the-stack

[PATCH v6 58/99] dax: Convert lock_slot to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/dax.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index f3463d93a6ce..8eab0b56f7f9 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -188,12 +188,11 @@ static void dax_wake_mappi

[PATCH v6 56/99] lustre: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- drivers/staging/lustre/lustre/llite/glimpse.c | 12 +--- drivers/staging/lustre/lustre/mdc/mdc_request.c | 16 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/g

[PATCH v6 55/99] f2fs: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This is a straightforward conversion. Signed-off-by: Matthew Wilcox --- fs/f2fs/data.c | 3 +-- fs/f2fs/dir.c| 5 + fs/f2fs/inline.c | 6 +- fs/f2fs/node.c | 10 ++ 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/fs/f2fs/data.c b/

[PATCH v6 53/99] fs: Convert writeback to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox A couple of short loops. Signed-off-by: Matthew Wilcox --- fs/fs-writeback.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index e2c1ca667d9a..897a89489fe9 100644 --- a/fs/fs-writeback.c

[PATCH v6 54/99] nilfs2: Convert to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox I'm not 100% convinced that the rewrite of nilfs_copy_back_pages is correct, but it will at least have different bugs from the current version. Signed-off-by: Matthew Wilcox --- fs/nilfs2/btnode.c | 37 +++- fs/nilfs2/page.c | 72 +

[PATCH v6 52/99] fs: Convert buffer to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Mostly comment fixes, but one use of __xa_set_tag. Signed-off-by: Matthew Wilcox --- fs/buffer.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 1a6ae530156b..e1d18307d5c8 100644 --- a/fs/buffer.c +++ b/fs/

Not work 802.11ac WLAN Adapter

2018-01-17 Thread Cristian
Hello, Open bug in launchpad.net https://bugs.launchpad.net/bugs/1743872 dmesg_4.15.0-041500rc8-generic dmesg: [ 104.468231] usb 3-2: new high-speed USB device number 4 using xhci_hcd [ 104.616570] usb 3-2: New USB device found, idVendor=0bda, idProduct=a811 [ 104.616578] usb 3-2: New USB device

[PATCH v6 50/99] shmem: Comment fixups

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Remove the last mentions of radix tree from various comments. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 4dbcfb436bd1..5110848885d4 100644 --- a/mm/shmem.c ++

[PATCH v6 51/99] btrfs: Convert page cache to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/btrfs/compression.c | 4 +--- fs/btrfs/extent_io.c | 6 ++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index e687d06cd97c..4174b166e235 100644 --- a/fs/btrfs/compre

[PATCH v6 49/99] shmem: Convert shmem_partial_swap_usage to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Simpler code because the xarray takes care of things like the limit and dereferencing the slot. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 5a2226e06f8c..

[PATCH v6 46/99] shmem: Convert shmem_add_to_page_cache to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This removes the last caller of radix_tree_maybe_preload_order(). Simpler code, unless we run out of memory for new xa_nodes partway through inserting entries into the xarray. Hopefully we can support multi-index entries in the page cache soon and all the awful code goes awa

[PATCH v6 47/99] shmem: Convert shmem_alloc_hugepage to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox xa_find() is a slightly easier API to use than radix_tree_gang_lookup_slot() because it contains its own RCU locking. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c in

[PATCH v6 48/99] shmem: Convert shmem_free_swap to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This is a perfect use for xa_cmpxchg(). Note the use of 0 for GFP flags; we won't be allocating memory. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index e8233cb7ab5c..5a22

[PATCH v6 44/99] shmem: Convert shmem_tag_pins to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Simplify the locking by taking the spinlock while we walk the tree on the assumption that many acquires and releases of the lock will be worse than holding the lock for a (potentially) long time. We could replicate the same locking behaviour with the xarray, but would have t

[PATCH v6 45/99] shmem: Convert shmem_wait_for_pins to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox As with shmem_tag_pins(), hold the lock around the entire loop instead of acquiring & dropping it for each entry we're going to untag. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 59 --- 1 file changed, 24 insertio

[PATCH v6 43/99] shmem: Convert find_swap_entry to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This is a 1:1 conversion. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 654f367aca90..ce285ae635ea 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1076,2

[PATCH v6 41/99] shmem: Convert replace to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox shmem_radix_tree_replace() is renamed to shmem_xa_replace() and converted to use the XArray API. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index c5731bb95

[PATCH v6 42/99] shmem: Convert shmem_confirm_swap to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox xa_load has its own RCU locking, so we can eliminate it here. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index fad6c9e7402e..654f367aca90 100644 --- a/mm/shmem.c +++ b/mm/sh

[PATCH v6 40/99] pagevec: Use xa_tag_t

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Removes sparse warnings. Signed-off-by: Matthew Wilcox --- fs/btrfs/extent_io.c| 4 ++-- fs/ext4/inode.c | 2 +- fs/f2fs/data.c | 2 +- fs/gfs2/aops.c | 2 +- include/linux/pagevec.h | 8 +--- mm/swap.c | 4 ++-- 6 files chan

[PATCH v6 39/99] mm: Convert khugepaged_scan_shmem to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Slightly shorter and easier to read code. Signed-off-by: Matthew Wilcox --- mm/khugepaged.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 9f49d0cd61c2..15f1b2d81a69 100644 --- a/mm/khugepaged.

[PATCH v6 38/99] mm: Convert collapse_shmem to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox I found another victim of the radix tree being hard to use. Because there was no call to radix_tree_preload(), khugepaged was allocating radix_tree_nodes using GFP_ATOMIC. I also converted a local_irq_save()/restore() pair to disable()/enable(). Signed-off-by: Matthew Wilc

[PATCH v6 35/99] mm: Convert __do_page_cache_readahead to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This one is trivial. Signed-off-by: Matthew Wilcox --- mm/readahead.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index f64b31b3a84a..66bcaffd47f0 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -174,9 +174,7 @

[PATCH v6 36/99] mm: Convert page migration to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- mm/migrate.c | 41 - 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 75d19904dd9a..7122fec9b075 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -322,7

[PATCH v6 37/99] mm: Convert huge_memory to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Quite a straightforward conversion. Signed-off-by: Matthew Wilcox --- mm/huge_memory.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index f71dd3e7d8cd..5c275295bbd3 100644 --- a/mm/huge_memory.

[PATCH v6 34/99] mm: Convert delete_from_swap_cache to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Both callers of __delete_from_swap_cache have the swp_entry_t already, so pass that in to make constructing the XA_STATE easier. Signed-off-by: Matthew Wilcox --- include/linux/swap.h | 5 +++-- mm/swap_state.c | 24 ++-- mm/vmscan.c | 2

[PATCH v6 32/99] mm: Convert truncate to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox This is essentially xa_cmpxchg() with the locking handled above us, and it doesn't have to handle replacing a NULL entry. Signed-off-by: Matthew Wilcox --- mm/truncate.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mm/truncate.c b/mm/

[PATCH v6 33/99] mm: Convert add_to_swap_cache to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Combine __add_to_swap_cache and add_to_swap_cache into one function since there is no more need to preload. Signed-off-by: Matthew Wilcox --- mm/swap_state.c | 93 ++--- 1 file changed, 29 insertions(+), 64 deletions(-)

[PATCH v6 30/99] mm: Convert page-writeback to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Includes moving mapping_tagged() to fs.h as a static inline, and changing it to return bool. Signed-off-by: Matthew Wilcox --- include/linux/fs.h | 17 +-- mm/page-writeback.c | 62 +++-- 2 files changed, 32 inse

[PATCH v6 31/99] mm: Convert workingset to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox We construct a fake XA_STATE and use it to delete the node with xa_store() rather than adding a special function for this unique use case. Signed-off-by: Matthew Wilcox --- include/linux/swap.h | 9 - mm/workingset.c | 51 ++---

[PATCH v6 29/99] page cache: Convert filemap_range_has_page to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Instead of calling find_get_pages_range() and putting any reference, just use xa_find() to look for a page in the right range. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/mm/filemap.c b/mm/filem

[PATCH v6 27/99] page cache: Convert delete_batch to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox Rename the function from page_cache_tree_delete_batch to just page_cache_delete_batch. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 317a89

[PATCH v6 22/99] page cache: Convert hole search to XArray

2018-01-17 Thread Matthew Wilcox
From: Matthew Wilcox The page cache offers the ability to search for a miss in the previous or next N locations. Rather than teach the XArray about the page cache's definition of a miss, use xas_prev() and xas_next() to search the page array. This should be more efficient as it does not have to

  1   2   >