Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next ] net: Allow userns root to control tun and tap devices
From: Serge E. Hallyn @ 2012-11-19 14:23 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Linux Containers, David Miller
In-Reply-To: <87a9uekpvw.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>

Quoting Eric W. Biederman (ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org):
> 
> Allow an unpriviled user who has created a user namespace, and then
> created a network namespace to effectively use the new network
> namespace, by reducing capable(CAP_NET_ADMIN) calls to
> ns_capable(net->user_ns,CAP_NET_ADMIN) calls.
> 
> Allow setting of the tun iff flags.
> Allow creating of tun devices.
> Allow adding a new queue to a tun device.
> 

Acked-by: Serge Hallyn <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

> Signed-off-by: "Eric W. Biederman" <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
> ---
>  drivers/net/tun.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index b44d7b7..b01e8c0 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -373,10 +373,11 @@ static u16 tun_select_queue(struct net_device *dev, struct sk_buff *skb)
>  static inline bool tun_not_capable(struct tun_struct *tun)
>  {
>  	const struct cred *cred = current_cred();
> +	struct net *net = dev_net(tun->dev);
>  
>  	return ((uid_valid(tun->owner) && !uid_eq(cred->euid, tun->owner)) ||
>  		  (gid_valid(tun->group) && !in_egroup_p(tun->group))) &&
> -		!capable(CAP_NET_ADMIN);
> +		!ns_capable(net->user_ns, CAP_NET_ADMIN);
>  }
>  
>  static void tun_set_real_num_queues(struct tun_struct *tun)
> @@ -1559,7 +1560,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
>  		char *name;
>  		unsigned long flags = 0;
>  
> -		if (!capable(CAP_NET_ADMIN))
> +		if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
>  			return -EPERM;
>  		err = security_tun_dev_create();
>  		if (err < 0)
> -- 
> 1.7.5.4

^ permalink raw reply

* [PATCH 2/2] net: mvneta: fix section mismatch warning caused by mvneta_deinit()
From: Thomas Petazzoni @ 2012-11-19 14:13 UTC (permalink / raw)
  To: Jason Cooper
  Cc: David S. Miller, netdev, Gregory Clement, Andrew Lunn,
	linux-arm-kernel
In-Reply-To: <1353334396-26128-1-git-send-email-thomas.petazzoni@free-electrons.com>

mvneta_deinit() can be called from the ->probe() hook in the error
path, so it shouldn't be marked as __devexit. It fixes the following
section mismatch warning:

WARNING: vmlinux.o(.devinit.text+0x239c): Section mismatch in reference
from the function mvneta_probe() to the function .devexit.text:mvneta_deinit()
The function __devinit mvneta_probe() references
a function __devexit mvneta_deinit().

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/net/ethernet/marvell/mvneta.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index c90382a..ad0b551 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -2605,7 +2605,7 @@ static int __devinit mvneta_init(struct mvneta_port *pp, int phy_addr)
 	return 0;
 }
 
-static void __devexit mvneta_deinit(struct mvneta_port *pp)
+static void mvneta_deinit(struct mvneta_port *pp)
 {
 	kfree(pp->txqs);
 	kfree(pp->rxqs);
-- 
1.7.9.5

^ permalink raw reply related

* [PATCH 1/2] net: mvneta: add clk support
From: Thomas Petazzoni @ 2012-11-19 14:13 UTC (permalink / raw)
  To: Jason Cooper
  Cc: David S. Miller, netdev, Gregory Clement, Andrew Lunn,
	linux-arm-kernel
In-Reply-To: <1353334396-26128-1-git-send-email-thomas.petazzoni@free-electrons.com>

Now that the Armada 370/XP platform has gained proper integration with
the clock framework, we add clk support in the Marvell Armada 370/XP
Ethernet driver.

Since the existing Device Tree binding that exposes a
'clock-frequency' property has never been exposed in any stable kernel
release, we take the freedom of removing this property to replace it
with the standard 'clocks' clock pointer property.

The Device Tree binding documentation is updated accordingly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../bindings/net/marvell-armada-370-neta.txt       |    4 +--
 drivers/net/ethernet/marvell/mvneta.c              |   31 +++++++++++++-------
 2 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
index c4e87f0..859a6fa 100644
--- a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
+++ b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
@@ -8,7 +8,7 @@ Required properties:
   property, a single integer).
 - phy-mode: The interface between the SoC and the PHY (a string that
   of_get_phy_mode() can understand)
-- clock-frequency: frequency of the peripheral clock of the SoC.
+- clocks: a pointer to the reference clock for this device.
 
 Example:
 
@@ -16,7 +16,7 @@ ethernet@d0070000 {
 	compatible = "marvell,armada-370-neta";
 	reg = <0xd0070000 0x2500>;
 	interrupts = <8>;
-	clock-frequency = <250000000>;
+	clocks = <&gate_clk 4>;
 	status = "okay";
 	phy = <&phy0>;
 	phy-mode = "rgmii-id";
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index a7826f0..c90382a 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -29,6 +29,7 @@
 #include <linux/of_net.h>
 #include <linux/of_address.h>
 #include <linux/phy.h>
+#include <linux/clk.h>
 
 /* Registers */
 #define MVNETA_RXQ_CONFIG_REG(q)                (0x1400 + ((q) << 2))
@@ -243,7 +244,7 @@ struct mvneta_port {
 	int weight;
 
 	/* Core clock */
-	unsigned int clk_rate_hz;
+	struct clk *clk;
 	u8 mcast_count[256];
 	u16 tx_ring_size;
 	u16 rx_ring_size;
@@ -1029,7 +1030,11 @@ static void mvneta_rx_pkts_coal_set(struct mvneta_port *pp,
 static void mvneta_rx_time_coal_set(struct mvneta_port *pp,
 				    struct mvneta_rx_queue *rxq, u32 value)
 {
-	u32 val = (pp->clk_rate_hz / 1000000) * value;
+	u32 val;
+	unsigned long clk_rate;
+
+	clk_rate = clk_get_rate(pp->clk);
+	val = (clk_rate / 1000000) * value;
 
 	mvreg_write(pp, MVNETA_RXQ_TIME_COAL_REG(rxq->id), val);
 	rxq->time_coal = value;
@@ -2670,7 +2675,7 @@ static int __devinit mvneta_probe(struct platform_device *pdev)
 	const struct mbus_dram_target_info *dram_target_info;
 	struct device_node *dn = pdev->dev.of_node;
 	struct device_node *phy_node;
-	u32 phy_addr, clk_rate_hz;
+	u32 phy_addr;
 	struct mvneta_port *pp;
 	struct net_device *dev;
 	const char *mac_addr;
@@ -2710,12 +2715,6 @@ static int __devinit mvneta_probe(struct platform_device *pdev)
 		goto err_free_irq;
 	}
 
-	if (of_property_read_u32(dn, "clock-frequency", &clk_rate_hz) != 0) {
-		dev_err(&pdev->dev, "could not read clock-frequency\n");
-		err = -EINVAL;
-		goto err_free_irq;
-	}
-
 	mac_addr = of_get_mac_address(dn);
 
 	if (!mac_addr || !is_valid_ether_addr(mac_addr))
@@ -2736,7 +2735,6 @@ static int __devinit mvneta_probe(struct platform_device *pdev)
 	clear_bit(MVNETA_F_TX_DONE_TIMER_BIT, &pp->flags);
 
 	pp->weight = MVNETA_RX_POLL_WEIGHT;
-	pp->clk_rate_hz = clk_rate_hz;
 	pp->phy_node = phy_node;
 	pp->phy_interface = phy_mode;
 
@@ -2746,6 +2744,14 @@ static int __devinit mvneta_probe(struct platform_device *pdev)
 		goto err_free_irq;
 	}
 
+	pp->clk = devm_clk_get(&pdev->dev, NULL);
+	if (IS_ERR(pp->clk)) {
+		err = PTR_ERR(pp->clk);
+		goto err_unmap;
+	}
+
+	clk_prepare_enable(pp->clk);
+
 	pp->tx_done_timer.data = (unsigned long)dev;
 
 	pp->tx_ring_size = MVNETA_MAX_TXD;
@@ -2757,7 +2763,7 @@ static int __devinit mvneta_probe(struct platform_device *pdev)
 	err = mvneta_init(pp, phy_addr);
 	if (err < 0) {
 		dev_err(&pdev->dev, "can't init eth hal\n");
-		goto err_unmap;
+		goto err_clk;
 	}
 	mvneta_port_power_up(pp, phy_mode);
 
@@ -2785,6 +2791,8 @@ static int __devinit mvneta_probe(struct platform_device *pdev)
 
 err_deinit:
 	mvneta_deinit(pp);
+err_clk:
+	clk_disable_unprepare(pp->clk);
 err_unmap:
 	iounmap(pp->base);
 err_free_irq:
@@ -2802,6 +2810,7 @@ static int __devexit mvneta_remove(struct platform_device *pdev)
 
 	unregister_netdev(dev);
 	mvneta_deinit(pp);
+	clk_disable_unprepare(pp->clk);
 	iounmap(pp->base);
 	irq_dispose_mapping(dev->irq);
 	free_netdev(dev);
-- 
1.7.9.5

^ permalink raw reply related

* [GIT PULL] Marvell Ethernet driver clk support + section mismatch fix
From: Thomas Petazzoni @ 2012-11-19 14:13 UTC (permalink / raw)
  To: Jason Cooper
  Cc: David S. Miller, netdev, Gregory Clement, Andrew Lunn,
	linux-arm-kernel

Jason,

Here are two additional patches for the mvneta Ethernet driver
(intended for your mvebu/driver branch):

 * One adding clk support. It's not a fix, but I think it's better if
   we can get the Device Tree binding correct directly in 3.8. This
   commit basically replaces the clock-frequency DT property by a
   proper 'clocks' DT property that references a DT clock. If we don't
   get this in 3.8, we'll have to support the legacy clock-frequency
   DT property for ever as it will be part of the kernel-to-DT ABI. So
   it would be nicer to get this patch in for 3.8.

   The DT patches related to this one are coming into a separate pull
   request.

 * The second one fixes a section mismatch warning, so it is certainly
   important.

Thanks!

The following changes since commit 803b4905545039f97c7824bcab605e91ac20acbb:

  Merge remote-tracking branch 'jcooper/mvebu/dt' into mvneta-fixes (2012-11-19 12:08:58 +0100)

are available in the git repository at:

  git@github.com:MISL-EBU-System-SW/mainline-public.git tags/marvell-mvneta-fix-and-clk-support-3.8

for you to fetch changes up to 4b968e8f98603a422f35b18682c169fb706c0115:

  net: mvneta: fix section mismatch warning caused by mvneta_deinit() (2012-11-19 14:45:25 +0100)

----------------------------------------------------------------
Marvell Ethernet driver fix + clk support

----------------------------------------------------------------
Thomas Petazzoni (2):
      net: mvneta: add clk support
      net: mvneta: fix section mismatch warning caused by mvneta_deinit()

 .../bindings/net/marvell-armada-370-neta.txt       |    4 +--
 drivers/net/ethernet/marvell/mvneta.c              |   33 +++++++++++++-------
 2 files changed, 23 insertions(+), 14 deletions(-)

^ permalink raw reply

* Re: [PATCH 1/1] iwlwifi: Remove duplicate inclusion of iwl-trans.h in pcie/drv.c
From: Johannes Berg @ 2012-11-19 14:09 UTC (permalink / raw)
  To: Sachin Kamat
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA, ilw-VuQAYsv1563Yd54FQh9/CA,
	wey-yi.w.guy-ral2JQCrhuEAvxtiuMwx3w,
	patches-QSEj5FYQhm4dnm+yROfE0A
In-Reply-To: <1353325540-9338-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

On Mon, 2012-11-19 at 17:15 +0530, Sachin Kamat wrote:
> iwl-trans.h was included twice.

Thanks, I've picked this up.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* 018/00/848
From: thomas Kurlick @ 2012-11-19 13:40 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: Col. Thomas Kurlick.pdf --]
[-- Type: application/pdf, Size: 171059 bytes --]

^ permalink raw reply

* 018/00/848
From: Mr. Glenn Taylor @ 2012-11-19 13:45 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: Document Of Business Proposal(Mr. Glenn Taylor)open the attachment for more details.pdf --]
[-- Type: application/pdf, Size: 87791 bytes --]

^ permalink raw reply

* Re: [PATCH 3/3] net: mvneta: adjust multiline comments to net/ style
From: Thomas Petazzoni @ 2012-11-19 12:56 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Jason Cooper, Lior Amsalem, Andrew Lunn, netdev, Gregory Clement,
	David S. Miller, linux-arm-kernel
In-Reply-To: <50AA2AD4.6030007@mvista.com>

Dear Sergei Shtylyov,

On Mon, 19 Nov 2012 16:49:24 +0400, Sergei Shtylyov wrote:

> > -/*
> > - * The two bytes Marvell header. Either contains a special value used
> > +/* The two bytes Marvell header. Either contains a special value used
> 
>     Why the heck you're doing this? It's the preferred style, see 
> Documentation/CodingStyle, chapter 8.

No. Please read Documentation/CodingStyle, chapter 8 entirely:

===============================================================
The preferred style for long (multi-line) comments is:

        /*
         * This is the preferred style for multi-line
         * comments in the Linux kernel source code.
         * Please use it consistently.
         *
         * Description:  A column of asterisks on the left side,
         * with beginning and ending almost-blank lines.
         */

For files in net/ and drivers/net/ the preferred style for long
(multi-line) comments is a little different.

        /* The preferred comment style for files in net/ and drivers/net
         * looks like this.
         *
         * It is nearly the same as the generally preferred comment style,
         * but there is no initial almost-blank line.
         */
===============================================================

Seen the second part?

Please also see scripts/checkpatch.pl:

                if ($realfile =~ m@^(drivers/net/|net/)@ &&
                    $rawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
                    $prevrawline =~ /^\+[ \t]*$/) {
                        WARN("NETWORKING_BLOCK_COMMENT_STYLE",
                             "networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
                }

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply

* Re: [PATCH 3/3] net: mvneta: adjust multiline comments to net/ style
From: Sergei Shtylyov @ 2012-11-19 12:49 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Jason Cooper, Lior Amsalem, Andrew Lunn, netdev, Gregory Clement,
	David S. Miller, linux-arm-kernel
In-Reply-To: <1353322834-16952-4-git-send-email-thomas.petazzoni@free-electrons.com>

Hello.

On 19-11-2012 15:00, Thomas Petazzoni wrote:

> As reported by checkpatch, the multiline comments for net/ and
> drivers/net/ have a slightly different format than the one used in the
> rest of the kernel, so we adjust our multiline comments accordingly.

> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>   drivers/net/ethernet/marvell/mvneta.c |   84 ++++++++++++++++-----------------
>   1 file changed, 42 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> index a7826f0..d9dadee 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/drivers/net/ethernet/marvell/mvneta.c
> @@ -178,8 +178,7 @@
>   /* Napi polling weight */
>   #define MVNETA_RX_POLL_WEIGHT		64
>
> -/*
> - * The two bytes Marvell header. Either contains a special value used
> +/* The two bytes Marvell header. Either contains a special value used

    Why the heck you're doing this? It's the preferred style, see 
Documentation/CodingStyle, chapter 8.

WBR, Sergei

^ permalink raw reply

* [patch 6/6] [PATCH] qeth: Remove BUG_ONs
From: frank.blaschka @ 2012-11-19 12:46 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Stefan Raspl
In-Reply-To: <20121119124644.679089322@de.ibm.com>

[-- Attachment #1: 607-qeth-bug-on.diff --]
[-- Type: text/plain, Size: 4525 bytes --]

From: Stefan Raspl <raspl@linux.vnet.ibm.com>

Remove BUG_ONs or convert to WARN_ON_ONCE/WARN_ONs since a failure within a
networking device driver is no reason to shut down the entire machine.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
---
 drivers/s390/net/qeth_core_main.c |   14 ++++++--------
 drivers/s390/net/qeth_l2_main.c   |    3 +--
 drivers/s390/net/qeth_l3_main.c   |    7 +++----
 3 files changed, 10 insertions(+), 14 deletions(-)

--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -383,7 +383,7 @@ static inline void qeth_cleanup_handled_
 				qeth_release_skbs(c);
 
 				c = f->next_pending;
-				BUG_ON(head->next_pending != f);
+				WARN_ON_ONCE(head->next_pending != f);
 				head->next_pending = c;
 				kmem_cache_free(qeth_qdio_outbuf_cache, f);
 			} else {
@@ -415,13 +415,12 @@ static inline void qeth_qdio_handle_aob(
 	buffer = (struct qeth_qdio_out_buffer *) aob->user1;
 	QETH_CARD_TEXT_(card, 5, "%lx", aob->user1);
 
-	BUG_ON(buffer == NULL);
-
 	if (atomic_cmpxchg(&buffer->state, QETH_QDIO_BUF_PRIMED,
 			   QETH_QDIO_BUF_IN_CQ) == QETH_QDIO_BUF_PRIMED) {
 		notification = TX_NOTIFY_OK;
 	} else {
-		BUG_ON(atomic_read(&buffer->state) != QETH_QDIO_BUF_PENDING);
+		WARN_ON_ONCE(atomic_read(&buffer->state) !=
+							QETH_QDIO_BUF_PENDING);
 		atomic_set(&buffer->state, QETH_QDIO_BUF_IN_CQ);
 		notification = TX_NOTIFY_DELAYED_OK;
 	}
@@ -1131,7 +1130,7 @@ static void qeth_release_skbs(struct qet
 		notify_general_error = 1;
 
 	/* release may never happen from within CQ tasklet scope */
-	BUG_ON(atomic_read(&buf->state) == QETH_QDIO_BUF_IN_CQ);
+	WARN_ON_ONCE(atomic_read(&buf->state) == QETH_QDIO_BUF_IN_CQ);
 
 	skb = skb_dequeue(&buf->skb_list);
 	while (skb) {
@@ -2400,7 +2399,7 @@ static int qeth_alloc_qdio_buffers(struc
 		card->qdio.out_qs[i]->queue_no = i;
 		/* give outbound qeth_qdio_buffers their qdio_buffers */
 		for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) {
-			BUG_ON(card->qdio.out_qs[i]->bufs[j] != NULL);
+			WARN_ON(card->qdio.out_qs[i]->bufs[j] != NULL);
 			if (qeth_init_qdio_out_buf(card->qdio.out_qs[i], j))
 				goto out_freeoutqbufs;
 		}
@@ -3565,7 +3564,7 @@ void qeth_qdio_output_handler(struct ccw
 		if (queue->bufstates &&
 		    (queue->bufstates[bidx].flags &
 		     QDIO_OUTBUF_STATE_FLAG_PENDING) != 0) {
-			BUG_ON(card->options.cq != QETH_CQ_ENABLED);
+			WARN_ON_ONCE(card->options.cq != QETH_CQ_ENABLED);
 
 			if (atomic_cmpxchg(&buffer->state,
 					   QETH_QDIO_BUF_PRIMED,
@@ -3579,7 +3578,6 @@ void qeth_qdio_output_handler(struct ccw
 			QETH_CARD_TEXT(queue->card, 5, "aob");
 			QETH_CARD_TEXT_(queue->card, 5, "%lx",
 					virt_to_phys(buffer->aob));
-			BUG_ON(bidx < 0 || bidx >= QDIO_MAX_BUFFERS_PER_Q);
 			if (qeth_init_qdio_out_buf(queue, bidx)) {
 				QETH_CARD_TEXT(card, 2, "outofbuf");
 				qeth_schedule_recovery(card);
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -411,7 +411,7 @@ static int qeth_l2_process_inbound_buffe
 	unsigned int len;
 
 	*done = 0;
-	BUG_ON(!budget);
+	WARN_ON_ONCE(!budget);
 	while (budget) {
 		skb = qeth_core_get_next_skb(card,
 			&card->qdio.in_q->bufs[card->rx.b_index],
@@ -973,7 +973,6 @@ static int __qeth_l2_set_online(struct c
 	int rc = 0;
 	enum qeth_card_states recover_flag;
 
-	BUG_ON(!card);
 	mutex_lock(&card->discipline_mutex);
 	mutex_lock(&card->conf_mutex);
 	QETH_DBF_TEXT(SETUP, 2, "setonlin");
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1939,7 +1939,7 @@ static int qeth_l3_process_inbound_buffe
 	__u16 magic;
 
 	*done = 0;
-	BUG_ON(!budget);
+	WARN_ON_ONCE(!budget);
 	while (budget) {
 		skb = qeth_core_get_next_skb(card,
 			&card->qdio.in_q->bufs[card->rx.b_index],
@@ -3334,7 +3334,6 @@ static int __qeth_l3_set_online(struct c
 	int rc = 0;
 	enum qeth_card_states recover_flag;
 
-	BUG_ON(!card);
 	mutex_lock(&card->discipline_mutex);
 	mutex_lock(&card->conf_mutex);
 	QETH_DBF_TEXT(SETUP, 2, "setonlin");
@@ -3715,9 +3714,9 @@ static void qeth_l3_unregister_notifiers
 {
 
 	QETH_DBF_TEXT(SETUP, 5, "unregnot");
-	BUG_ON(unregister_inetaddr_notifier(&qeth_l3_ip_notifier));
+	WARN_ON(unregister_inetaddr_notifier(&qeth_l3_ip_notifier));
 #ifdef CONFIG_QETH_IPV6
-	BUG_ON(unregister_inet6addr_notifier(&qeth_l3_ip6_notifier));
+	WARN_ON(unregister_inet6addr_notifier(&qeth_l3_ip6_notifier));
 #endif /* QETH_IPV6 */
 }
 

^ permalink raw reply

* [patch 0/6] s390: network patches for net-next
From: frank.blaschka @ 2012-11-19 12:46 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390

Hi Dave,

here are some s390 related patches for net-next

shortlog:

Stefan Raspl (4)
qeth: Remove unused variable
qeth: Consolidate tracing of card features
qeth: Clarify card type naming for virtual NICs
qeth: Remove BUG_ONs

Ursula Braun (2)
ctcm: remove BUG_ON's
claw: remove BUG_ON's


Thanks,
        Frank

^ permalink raw reply

* [patch 2/6] [PATCH] ctcm: remove BUG_ONs
From: frank.blaschka @ 2012-11-19 12:46 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Ursula Braun
In-Reply-To: <20121119124644.679089322@de.ibm.com>

[-- Attachment #1: 604-ctcm-bugon.diff --]
[-- Type: text/plain, Size: 1197 bytes --]

From: Ursula Braun <ursula.braun@de.ibm.com>

Remove BUG_ON's in ctcm driver, since the checked error conditions
are null pointer accesses.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
 drivers/s390/net/ctcm_main.c |    2 --
 drivers/s390/net/ctcm_mpc.c  |    3 ---
 2 files changed, 5 deletions(-)

--- a/drivers/s390/net/ctcm_main.c
+++ b/drivers/s390/net/ctcm_main.c
@@ -1691,8 +1691,6 @@ static void ctcm_remove_device(struct cc
 {
 	struct ctcm_priv *priv = dev_get_drvdata(&cgdev->dev);
 
-	BUG_ON(priv == NULL);
-
 	CTCM_DBF_TEXT_(SETUP, CTC_DBF_INFO,
 			"removing device %p, proto : %d",
 			cgdev, priv->protocol);
--- a/drivers/s390/net/ctcm_mpc.c
+++ b/drivers/s390/net/ctcm_mpc.c
@@ -1367,7 +1367,6 @@ static void mpc_action_go_inop(fsm_insta
 	struct mpc_group *grp;
 	struct channel *wch;
 
-	BUG_ON(dev == NULL);
 	CTCM_PR_DEBUG("Enter %s: %s\n",	__func__, dev->name);
 
 	priv  = dev->ml_priv;
@@ -1472,8 +1471,6 @@ static void mpc_action_timeout(fsm_insta
 	struct channel *wch;
 	struct channel *rch;
 
-	BUG_ON(dev == NULL);
-
 	priv = dev->ml_priv;
 	grp = priv->mpcg;
 	wch = priv->channel[CTCM_WRITE];

^ permalink raw reply

* [patch 1/6] [PATCH] qeth: Remove unused variable
From: frank.blaschka @ 2012-11-19 12:46 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Stefan Raspl
In-Reply-To: <20121119124644.679089322@de.ibm.com>

[-- Attachment #1: 601-qeth-unused-variable.diff --]
[-- Type: text/plain, Size: 831 bytes --]

From: Stefan Raspl <raspl@linux.vnet.ibm.com>

Eliminate a variable that is never modified.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
---
 drivers/s390/net/qeth_core_main.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2280,7 +2280,6 @@ static int qeth_ulp_setup_cb(struct qeth
 		unsigned long data)
 {
 	struct qeth_cmd_buffer *iob;
-	int rc = 0;
 
 	QETH_DBF_TEXT(SETUP, 2, "ulpstpcb");
 
@@ -2296,7 +2295,7 @@ static int qeth_ulp_setup_cb(struct qeth
 		iob->rc = -EMLINK;
 	}
 	QETH_DBF_TEXT_(SETUP, 2, "  rc%d", iob->rc);
-	return rc;
+	return 0;
 }
 
 static int qeth_ulp_setup(struct qeth_card *card)

^ permalink raw reply

* [patch 5/6] [PATCH] qeth: Consolidate tracing of card features
From: frank.blaschka @ 2012-11-19 12:46 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Stefan Raspl
In-Reply-To: <20121119124644.679089322@de.ibm.com>

[-- Attachment #1: 602-qeth-tracing.diff --]
[-- Type: text/plain, Size: 2815 bytes --]

From: Stefan Raspl <raspl@linux.vnet.ibm.com>

Trace all supported and enabled card features to s390dbf.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
---
 drivers/s390/net/qeth_core.h      |    1 +
 drivers/s390/net/qeth_core_main.c |   16 +++++++++++++---
 drivers/s390/net/qeth_l2_main.c   |    1 +
 drivers/s390/net/qeth_l3_main.c   |    1 +
 4 files changed, 16 insertions(+), 3 deletions(-)

--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -933,6 +933,7 @@ int qeth_hdr_chk_and_bounce(struct sk_bu
 int qeth_configure_cq(struct qeth_card *, enum qeth_cq);
 int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action);
 int qeth_query_ipassists(struct qeth_card *, enum qeth_prot_versions prot);
+void qeth_trace_features(struct qeth_card *);
 
 /* exports for OSN */
 int qeth_osn_assist(struct net_device *, void *, int);
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2968,9 +2968,6 @@ static int qeth_query_ipassists_cb(struc
 	} else
 		QETH_DBF_MESSAGE(1, "%s IPA_CMD_QIPASSIST: Flawed LIC detected"
 					"\n", dev_name(&card->gdev->dev));
-	QETH_DBF_TEXT(SETUP, 2, "suppenbl");
-	QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_supported);
-	QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_enabled);
 	return 0;
 }
 
@@ -4730,6 +4727,19 @@ static void qeth_core_free_card(struct q
 	kfree(card);
 }
 
+void qeth_trace_features(struct qeth_card *card)
+{
+	QETH_CARD_TEXT(card, 2, "features");
+	QETH_CARD_TEXT_(card, 2, "%x", card->options.ipa4.supported_funcs);
+	QETH_CARD_TEXT_(card, 2, "%x", card->options.ipa4.enabled_funcs);
+	QETH_CARD_TEXT_(card, 2, "%x", card->options.ipa6.supported_funcs);
+	QETH_CARD_TEXT_(card, 2, "%x", card->options.ipa6.enabled_funcs);
+	QETH_CARD_TEXT_(card, 2, "%x", card->options.adp.supported_funcs);
+	QETH_CARD_TEXT_(card, 2, "%x", card->options.adp.enabled_funcs);
+	QETH_CARD_TEXT_(card, 2, "%x", card->info.diagass_support);
+}
+EXPORT_SYMBOL_GPL(qeth_trace_features);
+
 static struct ccw_device_id qeth_ids[] = {
 	{CCW_DEVICE_DEVTYPE(0x1731, 0x01, 0x1732, 0x01),
 					.driver_info = QETH_CARD_TYPE_OSD},
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -986,6 +986,7 @@ static int __qeth_l2_set_online(struct c
 		rc = -ENODEV;
 		goto out_remove;
 	}
+	qeth_trace_features(card);
 
 	if (!card->dev && qeth_l2_setup_netdev(card)) {
 		rc = -ENODEV;
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3347,6 +3347,7 @@ static int __qeth_l3_set_online(struct c
 		rc = -ENODEV;
 		goto out_remove;
 	}
+	qeth_trace_features(card);
 
 	if (!card->dev && qeth_l3_setup_netdev(card)) {
 		rc = -ENODEV;

^ permalink raw reply

* [patch 4/6] [PATCH] qeth: Clarify card type naming for virtual NICs
From: frank.blaschka @ 2012-11-19 12:46 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Stefan Raspl
In-Reply-To: <20121119124644.679089322@de.ibm.com>

[-- Attachment #1: 603-qeth-card-naming.diff --]
[-- Type: text/plain, Size: 1630 bytes --]

From: Stefan Raspl <raspl@linux.vnet.ibm.com>

So far, virtual NICs whether attached to a VSWITCH or a guest LAN were always
displayed as guest LANs in the device driver attributes and messages, while
in fact it is a virtual NIC.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
---
 drivers/s390/net/qeth_core_main.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -73,13 +73,13 @@ static inline const char *qeth_get_cardn
 	if (card->info.guestlan) {
 		switch (card->info.type) {
 		case QETH_CARD_TYPE_OSD:
-			return " Guest LAN QDIO";
+			return " Virtual NIC QDIO";
 		case QETH_CARD_TYPE_IQD:
-			return " Guest LAN Hiper";
+			return " Virtual NIC Hiper";
 		case QETH_CARD_TYPE_OSM:
-			return " Guest LAN QDIO - OSM";
+			return " Virtual NIC QDIO - OSM";
 		case QETH_CARD_TYPE_OSX:
-			return " Guest LAN QDIO - OSX";
+			return " Virtual NIC QDIO - OSX";
 		default:
 			return " unknown";
 		}
@@ -108,13 +108,13 @@ const char *qeth_get_cardname_short(stru
 	if (card->info.guestlan) {
 		switch (card->info.type) {
 		case QETH_CARD_TYPE_OSD:
-			return "GuestLAN QDIO";
+			return "Virt.NIC QDIO";
 		case QETH_CARD_TYPE_IQD:
-			return "GuestLAN Hiper";
+			return "Virt.NIC Hiper";
 		case QETH_CARD_TYPE_OSM:
-			return "GuestLAN OSM";
+			return "Virt.NIC OSM";
 		case QETH_CARD_TYPE_OSX:
-			return "GuestLAN OSX";
+			return "Virt.NIC OSX";
 		default:
 			return "unknown";
 		}

^ permalink raw reply

* [patch 3/6] [PATCH] claw: remove BUG_ONs
From: frank.blaschka @ 2012-11-19 12:46 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Ursula Braun
In-Reply-To: <20121119124644.679089322@de.ibm.com>

[-- Attachment #1: 605-claw-bugon.diff --]
[-- Type: text/plain, Size: 732 bytes --]

From: Ursula Braun <ursula.braun@de.ibm.com>

Remove BUG_ON's in claw driver, since the checked error conditions
are null pointer accesses.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
 drivers/s390/net/claw.c |    2 --
 1 file changed, 2 deletions(-)

--- a/drivers/s390/net/claw.c
+++ b/drivers/s390/net/claw.c
@@ -3018,10 +3018,8 @@ claw_remove_device(struct ccwgroup_devic
 {
 	struct claw_privbk *priv;
 
-	BUG_ON(!cgdev);
 	CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev));
 	priv = dev_get_drvdata(&cgdev->dev);
-	BUG_ON(!priv);
 	dev_info(&cgdev->dev, " will be removed.\n");
 	if (cgdev->state == CCWGROUP_ONLINE)
 		claw_shutdown_device(cgdev);

^ permalink raw reply

* [PATCH 1/1] bnx2x: Remove duplicate inclusion of bnx2x_hsi.h
From: Sachin Kamat @ 2012-11-19 11:52 UTC (permalink / raw)
  To: netdev; +Cc: eilong, davem, sachin.kamat, patches

bnx2x_hsi.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
index de121cc..19517b3 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
@@ -44,7 +44,6 @@
 #include "bnx2x_reg.h"
 #include "bnx2x_fw_defs.h"
 #include "bnx2x_mfw_req.h"
-#include "bnx2x_hsi.h"
 #include "bnx2x_link.h"
 #include "bnx2x_sp.h"
 #include "bnx2x_dcb.h"
-- 
1.7.4.1

^ permalink raw reply related

* [PATCH 1/1] iwlwifi: Remove duplicate inclusion of iwl-trans.h in pcie/drv.c
From: Sachin Kamat @ 2012-11-19 11:45 UTC (permalink / raw)
  To: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA
  Cc: johannes.berg-ral2JQCrhuEAvxtiuMwx3w, ilw-VuQAYsv1563Yd54FQh9/CA,
	wey-yi.w.guy-ral2JQCrhuEAvxtiuMwx3w,
	sachin.kamat-QSEj5FYQhm4dnm+yROfE0A,
	patches-QSEj5FYQhm4dnm+yROfE0A

iwl-trans.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 drivers/net/wireless/iwlwifi/pcie/drv.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c
index 2a46753..956fe6c 100644
--- a/drivers/net/wireless/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/iwlwifi/pcie/drv.c
@@ -69,7 +69,6 @@
 
 #include "iwl-trans.h"
 #include "iwl-drv.h"
-#include "iwl-trans.h"
 
 #include "cfg.h"
 #include "internal.h"
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* Re: [PATCH] vxlan: Fix error that was resulting in VXLAN MTU size being 10 bytes too large
From: Joseph Glanville @ 2012-11-19 11:33 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, alexander.h.duyck, netdev
In-Reply-To: <20121113133353.227ec987@nehalam.linuxnetplumber.net>

On 14 November 2012 08:33, Stephen Hemminger <shemminger@vyatta.com> wrote:
> On Tue, 13 Nov 2012 14:37:19 -0500 (EST)
> David Miller <davem@davemloft.net> wrote:
>
>> From: Alexander Duyck <alexander.h.duyck@intel.com>
>> Date: Fri, 09 Nov 2012 15:35:24 -0800
>>
>> > This change fixes an issue I found where VXLAN frames were fragmented when
>> > they were up to the VXLAN MTU size.  I root caused the issue to the fact that
>> > the headroom was 4 + 20 + 8 + 8.  This math doesn't appear to be correct
>> > because we are not inserting a VLAN header, but instead a 2nd Ethernet header.
>> > As such the math for the overhead should be 20 + 8 + 8 + 14 to account for the
>> > extra headers that are inserted for VXLAN.
>> >
>> > Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
>>
>> Applied, thanks for the detailed commit message.
>
> Probably need smarter code there to look at header length requirement
> of underlying device as well, maybe someone will be perverse and runn
> vxlan over a tunnel or IPoIB.

Forgive my ignorance but why would running VXLAN on IPoIB require
special header handling? (and would it work or behave strangely?)

I was planning on giving this a go when 3.7 is released but I might do
that sooner if problems are anticipated.

> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Joseph.

-- 
CTO | Orion Virtualisation Solutions | www.orionvm.com.au
Phone: 1300 56 99 52 | Mobile: 0428 754 846

^ permalink raw reply

* [PATCH 1/1] vhost: Remove duplicate inclusion of linux/vhost.h
From: Sachin Kamat @ 2012-11-19 11:28 UTC (permalink / raw)
  To: kvm, virtualization, netdev; +Cc: mst, nab, sachin.kamat, patches

linux/vhost.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/vhost/tcm_vhost.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
index 73bbc46..798792b 100644
--- a/drivers/vhost/tcm_vhost.c
+++ b/drivers/vhost/tcm_vhost.c
@@ -34,7 +34,6 @@
 #include <linux/ctype.h>
 #include <linux/compat.h>
 #include <linux/eventfd.h>
-#include <linux/vhost.h>
 #include <linux/fs.h>
 #include <linux/miscdevice.h>
 #include <asm/unaligned.h>
-- 
1.7.4.1


^ permalink raw reply related

* [PATCH 3/3] net: mvneta: adjust multiline comments to net/ style
From: Thomas Petazzoni @ 2012-11-19 11:00 UTC (permalink / raw)
  To: Jason Cooper
  Cc: David S. Miller, Andrew Lunn, Gregory Clement, linux-arm-kernel,
	Lior Amsalem, netdev
In-Reply-To: <1353322834-16952-1-git-send-email-thomas.petazzoni@free-electrons.com>

As reported by checkpatch, the multiline comments for net/ and
drivers/net/ have a slightly different format than the one used in the
rest of the kernel, so we adjust our multiline comments accordingly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/net/ethernet/marvell/mvneta.c |   84 ++++++++++++++++-----------------
 1 file changed, 42 insertions(+), 42 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index a7826f0..d9dadee 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -178,8 +178,7 @@
 /* Napi polling weight */
 #define MVNETA_RX_POLL_WEIGHT		64
 
-/*
- * The two bytes Marvell header. Either contains a special value used
+/* The two bytes Marvell header. Either contains a special value used
  * by Marvell switches when a specific hardware mode is enabled (not
  * supported by this driver) or is filled automatically by zeroes on
  * the RX side. Those two bytes being at the front of the Ethernet
@@ -259,8 +258,7 @@ struct mvneta_port {
 	unsigned int speed;
 };
 
-/*
- * The mvneta_tx_desc and mvneta_rx_desc structures describe the
+/* The mvneta_tx_desc and mvneta_rx_desc structures describe the
  * layout of the transmit and reception DMA descriptors, and their
  * layout is therefore defined by the hardware design
  */
@@ -318,7 +316,8 @@ struct mvneta_tx_queue {
 	int size;
 
 	/* Number of currently used TX DMA descriptor in the
-	 * descriptor ring */
+	 * descriptor ring
+	 */
 	int count;
 
 	/* Array of transmitted skb */
@@ -454,8 +453,7 @@ struct rtnl_link_stats64 *mvneta_get_stats64(struct net_device *dev,
 
 /* Rx descriptors helper methods */
 
-/*
- * Checks whether the given RX descriptor is both the first and the
+/* Checks whether the given RX descriptor is both the first and the
  * last descriptor for the RX packet. Each RX packet is currently
  * received through a single RX descriptor, so not having each RX
  * descriptor with its first and last bits set is an error
@@ -472,7 +470,8 @@ static void mvneta_rxq_non_occup_desc_add(struct mvneta_port *pp,
 					  int ndescs)
 {
 	/* Only MVNETA_RXQ_ADD_NON_OCCUPIED_MAX (255) descriptors can
-	 * be added at once */
+	 * be added at once
+	 */
 	while (ndescs > MVNETA_RXQ_ADD_NON_OCCUPIED_MAX) {
 		mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id),
 			    (MVNETA_RXQ_ADD_NON_OCCUPIED_MAX <<
@@ -494,8 +493,7 @@ static int mvneta_rxq_busy_desc_num_get(struct mvneta_port *pp,
 	return val & MVNETA_RXQ_OCCUPIED_ALL_MASK;
 }
 
-/*
- * Update num of rx desc called upon return from rx path or
+/* Update num of rx desc called upon return from rx path or
  * from mvneta_rxq_drop_pkts().
  */
 static void mvneta_rxq_desc_num_update(struct mvneta_port *pp,
@@ -580,7 +578,8 @@ static void mvneta_txq_pend_desc_add(struct mvneta_port *pp,
 	u32 val;
 
 	/* Only 255 descriptors can be added at once ; Assume caller
-	   process TX desriptors in quanta less than 256 */
+	 * process TX desriptors in quanta less than 256
+	 */
 	val = pend_desc;
 	mvreg_write(pp, MVNETA_TXQ_UPDATE_REG(txq->id), val);
 }
@@ -596,7 +595,8 @@ mvneta_txq_next_desc_get(struct mvneta_tx_queue *txq)
 }
 
 /* Release the last allocated TX descriptor. Useful to handle DMA
- * mapping failures in the TX path. */
+ * mapping failures in the TX path.
+ */
 static void mvneta_txq_desc_put(struct mvneta_tx_queue *txq)
 {
 	if (txq->next_desc_to_proc == 0)
@@ -714,7 +714,8 @@ static void mvneta_port_down(struct mvneta_port *pp)
 	} while (val & 0xff);
 
 	/* Stop Tx port activity. Check port Tx activity. Issue stop
-	   command for active channels only  */
+	 * command for active channels only
+	 */
 	val = (mvreg_read(pp, MVNETA_TXQ_CMD)) & MVNETA_TXQ_ENABLE_MASK;
 
 	if (val != 0)
@@ -865,7 +866,8 @@ static void mvneta_defaults_set(struct mvneta_port *pp)
 	mvreg_write(pp, MVNETA_MBUS_RETRY, 0x20);
 
 	/* Set CPU queue access map - all CPUs have access to all RX
-	   queues and to all TX queues */
+	 * queues and to all TX queues
+	 */
 	for (cpu = 0; cpu < CONFIG_NR_CPUS; cpu++)
 		mvreg_write(pp, MVNETA_CPU_MAP(cpu),
 			    (MVNETA_CPU_RXQ_ACCESS_ALL_MASK |
@@ -1010,9 +1012,8 @@ static void mvneta_mac_addr_set(struct mvneta_port *pp, unsigned char *addr,
 	mvneta_set_ucast_addr(pp, addr[5], queue);
 }
 
-/*
- * Set the number of packets that will be received before
- * RX interrupt will be generated by HW.
+/* Set the number of packets that will be received before RX interrupt
+ * will be generated by HW.
  */
 static void mvneta_rx_pkts_coal_set(struct mvneta_port *pp,
 				    struct mvneta_rx_queue *rxq, u32 value)
@@ -1022,9 +1023,8 @@ static void mvneta_rx_pkts_coal_set(struct mvneta_port *pp,
 	rxq->pkts_coal = value;
 }
 
-/*
- * Set the time delay in usec before
- * RX interrupt will be generated by HW.
+/* Set the time delay in usec before RX interrupt will be generated by
+ * HW.
  */
 static void mvneta_rx_time_coal_set(struct mvneta_port *pp,
 				    struct mvneta_rx_queue *rxq, u32 value)
@@ -1102,8 +1102,7 @@ static int mvneta_txq_sent_desc_num_get(struct mvneta_port *pp,
 	return sent_desc;
 }
 
-/*
- * Get number of sent descriptors and decrement counter.
+/* Get number of sent descriptors and decrement counter.
  *  The number of sent descriptors is returned.
  */
 static int mvneta_txq_sent_desc_proc(struct mvneta_port *pp,
@@ -1128,8 +1127,9 @@ static u32 mvneta_txq_desc_csum(int l3_offs, int l3_proto,
 	u32 command;
 
 	/* Fields: L3_offset, IP_hdrlen, L3_type, G_IPv4_chk,
-	   G_L4_chk, L4_type; required only for checksum
-	   calculation */
+	 * G_L4_chk, L4_type; required only for checksum
+	 * calculation
+	 */
 	command =  l3_offs    << MVNETA_TX_L3_OFF_SHIFT;
 	command |= ip_hdr_len << MVNETA_TX_IP_HLEN_SHIFT;
 
@@ -1305,8 +1305,7 @@ static u32 mvneta_skb_tx_csum(struct mvneta_port *pp, struct sk_buff *skb)
 	return MVNETA_TX_L4_CSUM_NOT;
 }
 
-/*
- * Returns rx queue pointer (find last set bit) according to causeRxTx
+/* Returns rx queue pointer (find last set bit) according to causeRxTx
  * value
  */
 static struct mvneta_rx_queue *mvneta_rx_policy(struct mvneta_port *pp,
@@ -1454,7 +1453,8 @@ static int mvneta_tx_frag_process(struct mvneta_port *pp, struct sk_buff *skb,
 
 error:
 	/* Release all descriptors that were used to map fragments of
-	 * this packet, as well as the corresponding DMA mappings */
+	 * this packet, as well as the corresponding DMA mappings
+	 */
 	for (i = i - 1; i >= 0; i--) {
 		tx_desc = txq->descs + i;
 		dma_unmap_single(pp->dev->dev.parent,
@@ -1546,7 +1546,8 @@ out:
 		mvneta_txq_done(pp, txq);
 
 	/* If after calling mvneta_txq_done, count equals
-		frags, we need to set the timer */
+	 * frags, we need to set the timer
+	 */
 	if (txq->count == frags && frags > 0)
 		mvneta_add_tx_done_timer(pp);
 
@@ -1598,8 +1599,7 @@ static u32 mvneta_tx_done_gbe(struct mvneta_port *pp, u32 cause_tx_done,
 	return tx_done;
 }
 
-/*
- * Compute crc8 of the specified address, using a unique algorithm ,
+/* Compute crc8 of the specified address, using a unique algorithm ,
  * according to hw spec, different than generic crc8 algorithm
  */
 static int mvneta_addr_crc(unsigned char *addr)
@@ -1828,8 +1828,7 @@ static int mvneta_poll(struct napi_struct *napi, int budget)
 	cause_rx_tx = mvreg_read(pp, MVNETA_INTR_NEW_CAUSE) &
 		MVNETA_RX_INTR_MASK(rxq_number);
 
-	/*
-	 * For the case where the last mvneta_poll did not process all
+	/* For the case where the last mvneta_poll did not process all
 	 * RX packets
 	 */
 	cause_rx_tx |= pp->cause_rx_tx;
@@ -1847,10 +1846,12 @@ static int mvneta_poll(struct napi_struct *napi, int budget)
 			rx_done += count;
 			budget -= count;
 			if (budget > 0) {
-				/* set off the rx bit of the corresponding bit
-				  in the cause rx tx register, so that next
-				  iteration will find the next rx queue where
-				  packets are received on */
+				/* set off the rx bit of the
+				 * corresponding bit in the cause rx
+				 * tx register, so that next iteration
+				 * will find the next rx queue where
+				 * packets are received on
+				 */
 				cause_rx_tx &= ~((1 << rxq->id) << 8);
 			}
 		}
@@ -1925,7 +1926,8 @@ static int mvneta_rxq_fill(struct mvneta_port *pp, struct mvneta_rx_queue *rxq,
 	}
 
 	/* Add this number of RX descriptors as non occupied (ready to
-	   get packets) */
+	 * get packets)
+	 */
 	mvneta_rxq_non_occup_desc_add(pp, rxq, i);
 
 	return i;
@@ -2201,7 +2203,7 @@ static int mvneta_check_mtu_valid(struct net_device *dev, int mtu)
 		return -EINVAL;
 	}
 
-        /* 9676 == 9700 - 20 and rounding to 8 */
+	/* 9676 == 9700 - 20 and rounding to 8 */
 	if (mtu > 9676) {
 		netdev_info(dev, "Illegal MTU value %d, round to 9676\n", mtu);
 		mtu = 9676;
@@ -2231,8 +2233,7 @@ static int mvneta_change_mtu(struct net_device *dev, int mtu)
 	if (!netif_running(dev))
 		return 0;
 
-	/*
-	 * The interface is running, so we have to force a
+	/* The interface is running, so we have to force a
 	 * reallocation of the RXQs
 	 */
 	mvneta_stop_dev(pp);
@@ -2677,8 +2678,7 @@ static int __devinit mvneta_probe(struct platform_device *pdev)
 	int phy_mode;
 	int err;
 
-	/*
-	 * Our multiqueue support is not complete, so for now, only
+	/* Our multiqueue support is not complete, so for now, only
 	 * allow the usage of the first RX queue
 	 */
 	if (rxq_def != 0) {
-- 
1.7.9.5

^ permalink raw reply related

* [PATCH 2/3] net: mvmdio: adjust multiline comment to net/ style
From: Thomas Petazzoni @ 2012-11-19 11:00 UTC (permalink / raw)
  To: Jason Cooper
  Cc: David S. Miller, Andrew Lunn, Gregory Clement, linux-arm-kernel,
	Lior Amsalem, netdev
In-Reply-To: <1353322834-16952-1-git-send-email-thomas.petazzoni@free-electrons.com>

As reported by checkpatch, the multiline comments for net/ and
drivers/net/ have a slightly different format than the one used in the
rest of the kernel, so we adjust our multiline comment accordingly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/net/ethernet/marvell/mvmdio.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index 114a0f1..6d6002b 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -42,8 +42,7 @@ struct orion_mdio_dev {
 	void __iomem *smireg;
 };
 
-/*
- * Wait for the SMI unit to be ready for another operation
+/* Wait for the SMI unit to be ready for another operation
  */
 static int orion_mdio_wait_ready(struct mii_bus *bus)
 {
-- 
1.7.9.5

^ permalink raw reply related

* [GIT PULL] Marvell mvneta Ethernet/MDIO drivers checkpatch fixes
From: Thomas Petazzoni @ 2012-11-19 11:00 UTC (permalink / raw)
  To: Jason Cooper
  Cc: David S. Miller, Andrew Lunn, Gregory Clement, linux-arm-kernel,
	Lior Amsalem, netdev

Jason,

Sebastian Hesselbarth noticed that the new mvmdio and mvneta drivers
produce a number of checkpatch warnings, related to the incluse of
<asm/delay.h> and to the style of multiline comments. The following
three patches fix those checkpatch warnings. Feel free to integrate
them either as follow-up patches of the network driver patches, or to
squash them into the driver patches as you prefer.

David, are you OK with those patches and the fact that we carry them
through the arm-soc tree, as we agreed to do for the mvmdio and mvneta
drivers? Those patches are really simple/stupid fixes.

Thanks!

The following changes since commit a7e7265b086fb12eb4472d0d216c6b787bb35eba:

  Merge remote-tracking branch 'jcooper/mvebu/dt' into mvneta-fixes (2012-11-19 11:30:18 +0100)

are available in the git repository at:


  git@github.com:MISL-EBU-System-SW/mainline-public.git tags/marvell-net-mdio-checkpatch-fixes-3.8

for you to fetch changes up to e313b995bf8598f56c98377a750f968f9dd5ca78:

  net: mvneta: adjust multiline comments to net/ style (2012-11-19 11:42:42 +0100)

----------------------------------------------------------------
Marvell network/MDIO driver checkpatch fixes

----------------------------------------------------------------
Thomas Petazzoni (3):
      net: mvmdio: use <linux/delay.h> instead of <asm/delay.h>
      net: mvmdio: adjust multiline comment to net/ style
      net: mvneta: adjust multiline comments to net/ style

 drivers/net/ethernet/marvell/mvmdio.c |    6 +--
 drivers/net/ethernet/marvell/mvneta.c |   84 ++++++++++++++++-----------------
 2 files changed, 44 insertions(+), 46 deletions(-)

^ permalink raw reply

* [PATCH 1/3] net: mvmdio: use <linux/delay.h> instead of <asm/delay.h>
From: Thomas Petazzoni @ 2012-11-19 11:00 UTC (permalink / raw)
  To: Jason Cooper
  Cc: David S. Miller, Andrew Lunn, Gregory Clement, linux-arm-kernel,
	Lior Amsalem, netdev
In-Reply-To: <1353322834-16952-1-git-send-email-thomas.petazzoni@free-electrons.com>

As suggested by checkpatch, using <linux/delay.h> instead of
<asm/delay.h> is appropriate.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/net/ethernet/marvell/mvmdio.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index 82fbd23..114a0f1 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -27,8 +27,7 @@
 #include <linux/of_address.h>
 #include <linux/of_mdio.h>
 #include <linux/platform_device.h>
-
-#include <asm/delay.h>
+#include <linux/delay.h>
 
 #define MVMDIO_SMI_DATA_SHIFT              0
 #define MVMDIO_SMI_PHY_ADDR_SHIFT          16
-- 
1.7.9.5

^ permalink raw reply related

* Re: [Pv-drivers] [PATCH 0/6] VSOCK for Linux upstreaming
From: Benjamin Herrenschmidt @ 2012-11-19  9:59 UTC (permalink / raw)
  To: Anthony Liguori
  Cc: Gerd Hoffmann, Andy King, pv-drivers, netdev, linux-kernel,
	virtualization, gregkh, David Miller, georgezhang
In-Reply-To: <50A55F57.7080804@us.ibm.com>

On Thu, 2012-11-15 at 15:32 -0600, Anthony Liguori wrote:
> 
> The concept was Nacked and that led to the abomination of virtio-serial.  If an 
> address family for virtualization is on the table, we should reconsider 
> AF_VMCHANNEL.
> 
> I'd be thrilled to get rid of virtio-serial...

Ack.

Ben.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox