aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-18 22:26:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-18 22:26:54 -0400
commit814a2bf957739f367cbebfa1b60237387b72d0ee (patch)
tree8d65c38d14beb8d6d2dc5b9d7f8dbe63c7cad31a /drivers/net
parent237045fc3c67d44088f767dca5a9fa30815eba62 (diff)
parentf9310b2f9a19b7f16c7b1c1558f8b649b9b933c1 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge second patch-bomb from Andrew Morton: - a couple of hotfixes - the rest of MM - a new timer slack control in procfs - a couple of procfs fixes - a few misc things - some printk tweaks - lib/ updates, notably to radix-tree. - add my and Nick Piggin's old userspace radix-tree test harness to tools/testing/radix-tree/. Matthew said it was a godsend during the radix-tree work he did. - a few code-size improvements, switching to __always_inline where gcc screwed up. - partially implement character sets in sscanf * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (118 commits) sscanf: implement basic character sets lib/bug.c: use common WARN helper param: convert some "on"/"off" users to strtobool lib: add "on"/"off" support to kstrtobool lib: update single-char callers of strtobool() lib: move strtobool() to kstrtobool() include/linux/unaligned: force inlining of byteswap operations include/uapi/linux/byteorder, swab: force inlining of some byteswap operations include/asm-generic/atomic-long.h: force inlining of some atomic_long operations usb: common: convert to use match_string() helper ide: hpt366: convert to use match_string() helper ata: hpt366: convert to use match_string() helper power: ab8500: convert to use match_string() helper power: charger_manager: convert to use match_string() helper drm/edid: convert to use match_string() helper pinctrl: convert to use match_string() helper device property: convert to use match_string() helper lib/string: introduce match_string() helper radix-tree tests: add test for radix_tree_iter_next radix-tree tests: add regression3 test ...
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/freescale/gianfar.c2
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_main.c2
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c2
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c2
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_rx.c9
-rw-r--r--drivers/net/ethernet/sun/niu.c2
-rw-r--r--drivers/net/wireless/marvell/mwifiex/debugfs.c10
8 files changed, 14 insertions, 17 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index b9ecf197ad11..f21b2c479780 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -2944,7 +2944,7 @@ static bool gfar_add_rx_frag(struct gfar_rx_buff *rxb, u32 lstatus,
2944 /* change offset to the other half */ 2944 /* change offset to the other half */
2945 rxb->page_offset ^= GFAR_RXB_TRUESIZE; 2945 rxb->page_offset ^= GFAR_RXB_TRUESIZE;
2946 2946
2947 atomic_inc(&page->_count); 2947 page_ref_inc(page);
2948 2948
2949 return true; 2949 return true;
2950} 2950}
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index b243c3cbe68f..b4547ebed774 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -243,7 +243,7 @@ static bool fm10k_can_reuse_rx_page(struct fm10k_rx_buffer *rx_buffer,
243 /* Even if we own the page, we are not allowed to use atomic_set() 243 /* Even if we own the page, we are not allowed to use atomic_set()
244 * This would break get_page_unless_zero() users. 244 * This would break get_page_unless_zero() users.
245 */ 245 */
246 atomic_inc(&page->_count); 246 page_ref_inc(page);
247 247
248 return true; 248 return true;
249} 249}
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 31e5f3942839..5b4ad1ad4d5f 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -6630,7 +6630,7 @@ static bool igb_can_reuse_rx_page(struct igb_rx_buffer *rx_buffer,
6630 /* Even if we own the page, we are not allowed to use atomic_set() 6630 /* Even if we own the page, we are not allowed to use atomic_set()
6631 * This would break get_page_unless_zero() users. 6631 * This would break get_page_unless_zero() users.
6632 */ 6632 */
6633 atomic_inc(&page->_count); 6633 page_ref_inc(page);
6634 6634
6635 return true; 6635 return true;
6636} 6636}
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index c4003a88bbf6..e6035ff6b861 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -1942,7 +1942,7 @@ static bool ixgbe_add_rx_frag(struct ixgbe_ring *rx_ring,
1942 /* Even if we own the page, we are not allowed to use atomic_set() 1942 /* Even if we own the page, we are not allowed to use atomic_set()
1943 * This would break get_page_unless_zero() users. 1943 * This would break get_page_unless_zero() users.
1944 */ 1944 */
1945 atomic_inc(&page->_count); 1945 page_ref_inc(page);
1946 1946
1947 return true; 1947 return true;
1948} 1948}
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 3558f019b631..0ea14c0a2e74 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -837,7 +837,7 @@ add_tail_frag:
837 /* Even if we own the page, we are not allowed to use atomic_set() 837 /* Even if we own the page, we are not allowed to use atomic_set()
838 * This would break get_page_unless_zero() users. 838 * This would break get_page_unless_zero() users.
839 */ 839 */
840 atomic_inc(&page->_count); 840 page_ref_inc(page);
841 841
842 return true; 842 return true;
843} 843}
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 41440b2b20a3..86bcfe510e4e 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -82,8 +82,7 @@ static int mlx4_alloc_pages(struct mlx4_en_priv *priv,
82 /* Not doing get_page() for each frag is a big win 82 /* Not doing get_page() for each frag is a big win
83 * on asymetric workloads. Note we can not use atomic_set(). 83 * on asymetric workloads. Note we can not use atomic_set().
84 */ 84 */
85 atomic_add(page_alloc->page_size / frag_info->frag_stride - 1, 85 page_ref_add(page, page_alloc->page_size / frag_info->frag_stride - 1);
86 &page->_count);
87 return 0; 86 return 0;
88} 87}
89 88
@@ -127,7 +126,7 @@ out:
127 dma_unmap_page(priv->ddev, page_alloc[i].dma, 126 dma_unmap_page(priv->ddev, page_alloc[i].dma,
128 page_alloc[i].page_size, PCI_DMA_FROMDEVICE); 127 page_alloc[i].page_size, PCI_DMA_FROMDEVICE);
129 page = page_alloc[i].page; 128 page = page_alloc[i].page;
130 atomic_set(&page->_count, 1); 129 set_page_count(page, 1);
131 put_page(page); 130 put_page(page);
132 } 131 }
133 } 132 }
@@ -165,7 +164,7 @@ static int mlx4_en_init_allocator(struct mlx4_en_priv *priv,
165 164
166 en_dbg(DRV, priv, " frag %d allocator: - size:%d frags:%d\n", 165 en_dbg(DRV, priv, " frag %d allocator: - size:%d frags:%d\n",
167 i, ring->page_alloc[i].page_size, 166 i, ring->page_alloc[i].page_size,
168 atomic_read(&ring->page_alloc[i].page->_count)); 167 page_ref_count(ring->page_alloc[i].page));
169 } 168 }
170 return 0; 169 return 0;
171 170
@@ -177,7 +176,7 @@ out:
177 dma_unmap_page(priv->ddev, page_alloc->dma, 176 dma_unmap_page(priv->ddev, page_alloc->dma,
178 page_alloc->page_size, PCI_DMA_FROMDEVICE); 177 page_alloc->page_size, PCI_DMA_FROMDEVICE);
179 page = page_alloc->page; 178 page = page_alloc->page;
180 atomic_set(&page->_count, 1); 179 set_page_count(page, 1);
181 put_page(page); 180 put_page(page);
182 page_alloc->page = NULL; 181 page_alloc->page = NULL;
183 } 182 }
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index ab6051a43134..9cc45649f477 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -3341,7 +3341,7 @@ static int niu_rbr_add_page(struct niu *np, struct rx_ring_info *rp,
3341 3341
3342 niu_hash_page(rp, page, addr); 3342 niu_hash_page(rp, page, addr);
3343 if (rp->rbr_blocks_per_page > 1) 3343 if (rp->rbr_blocks_per_page > 1)
3344 atomic_add(rp->rbr_blocks_per_page - 1, &page->_count); 3344 page_ref_add(page, rp->rbr_blocks_per_page - 1);
3345 3345
3346 for (i = 0; i < rp->rbr_blocks_per_page; i++) { 3346 for (i = 0; i < rp->rbr_blocks_per_page; i++) {
3347 __le32 *rbr = &rp->rbr[start_index + i]; 3347 __le32 *rbr = &rp->rbr[start_index + i];
diff --git a/drivers/net/wireless/marvell/mwifiex/debugfs.c b/drivers/net/wireless/marvell/mwifiex/debugfs.c
index 0b9c580af988..2eff989c6d9f 100644
--- a/drivers/net/wireless/marvell/mwifiex/debugfs.c
+++ b/drivers/net/wireless/marvell/mwifiex/debugfs.c
@@ -880,14 +880,12 @@ mwifiex_reset_write(struct file *file,
880{ 880{
881 struct mwifiex_private *priv = file->private_data; 881 struct mwifiex_private *priv = file->private_data;
882 struct mwifiex_adapter *adapter = priv->adapter; 882 struct mwifiex_adapter *adapter = priv->adapter;
883 char cmd;
884 bool result; 883 bool result;
884 int rc;
885 885
886 if (copy_from_user(&cmd, ubuf, sizeof(cmd))) 886 rc = kstrtobool_from_user(ubuf, count, &result);
887 return -EFAULT; 887 if (rc)
888 888 return rc;
889 if (strtobool(&cmd, &result))
890 return -EINVAL;
891 889
892 if (!result) 890 if (!result)
893 return -EINVAL; 891 return -EINVAL;