Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763153AbZJOWm4 (ORCPT ); Thu, 15 Oct 2009 18:42:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756387AbZJOWmz (ORCPT ); Thu, 15 Oct 2009 18:42:55 -0400 Received: from rcsinet12.oracle.com ([148.87.113.124]:53513 "EHLO rgminet12.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752532AbZJOWmy (ORCPT ); Thu, 15 Oct 2009 18:42:54 -0400 Message-ID: <4AD7A569.1040308@oracle.com> Date: Thu, 15 Oct 2009 15:42:49 -0700 From: Randy Dunlap User-Agent: Thunderbird 2.0.0.19 (X11/20081227) MIME-Version: 1.0 To: Bhavesh Davda CC: Randy Dunlap , Stephen Rothwell , "pv-drivers@vmware.com" , netdev , LKML , "linux-next@vger.kernel.org" , David Miller Subject: Re: [Pv-drivers] [PATCH -next] vmxnet3: use dev_dbg, fix build for CONFIG_BLOCK=n References: <20091015152538.74a1cb15.sfr@canb.auug.org.au> <4AD7A24F.6000900@oracle.com> <8B1F619C9F5F454E81D90D3C161698D7017DD56435@EXCH-MBX-3.vmware.com> In-Reply-To: <8B1F619C9F5F454E81D90D3C161698D7017DD56435@EXCH-MBX-3.vmware.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Source-IP: acsmt353.oracle.com [141.146.40.153] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090209.4AD7A53F.010A:SCFMA4539814,ss=1,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6508 Lines: 172 Bhavesh Davda wrote: > Who ever compiles with CONFIG_BLOCK=n? Just kidding... or why does networking need CONFIG_BLOCK at all? ;) > Thanks again for making this change! Ship it! So could I have used adapter->netdev->dev or adapter->pdev->dev ? either of them? are they the same? > Signed-off-by: Bhavesh Davda > > - Bhavesh > >> -----Original Message----- >> From: pv-drivers-bounces@vmware.com [mailto:pv-drivers- >> bounces@vmware.com] On Behalf Of Randy Dunlap >> Sent: Thursday, October 15, 2009 3:30 PM >> To: Stephen Rothwell >> Cc: pv-drivers@vmware.com; netdev; LKML; linux-next@vger.kernel.org; >> David Miller >> Subject: [Pv-drivers] [PATCH -next] vmxnet3: use dev_dbg, fix build for >> CONFIG_BLOCK=n >> >> From: Randy Dunlap >> >> vmxnet3 was using dprintk() for debugging output. This was >> defined in and was the only thing that was >> used from that header file. This caused compile errors >> when CONFIG_BLOCK was not enabled due to bio* and BIO* >> uses in the header file, so change this driver to use >> dev_dbg() for debugging output. >> >> include/linux/dst.h:520: error: dereferencing pointer to incomplete >> type >> include/linux/dst.h:520: error: 'BIO_POOL_BITS' undeclared (first use >> in this function) >> include/linux/dst.h:521: error: dereferencing pointer to incomplete >> type >> include/linux/dst.h:522: error: dereferencing pointer to incomplete >> type >> include/linux/dst.h:525: error: dereferencing pointer to incomplete >> type >> make[4]: *** [drivers/net/vmxnet3/vmxnet3_drv.o] Error 1 >> >> Signed-off-by: Randy Dunlap >> --- >> drivers/net/vmxnet3/vmxnet3_drv.c | 27 ++++++++++++++++++--------- >> drivers/net/vmxnet3/vmxnet3_int.h | 2 +- >> 2 files changed, 19 insertions(+), 10 deletions(-) >> >> --- linux-next-20091015.orig/drivers/net/vmxnet3/vmxnet3_int.h >> +++ linux-next-20091015/drivers/net/vmxnet3/vmxnet3_int.h >> @@ -30,6 +30,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -59,7 +60,6 @@ >> #include >> #include >> #include >> -#include >> >> #include "vmxnet3_defs.h" >> >> --- linux-next-20091015.orig/drivers/net/vmxnet3/vmxnet3_drv.c >> +++ linux-next-20091015/drivers/net/vmxnet3/vmxnet3_drv.c >> @@ -481,7 +481,8 @@ vmxnet3_rq_alloc_rx_buf(struct vmxnet3_r >> } >> rq->uncommitted[ring_idx] += num_allocated; >> >> - dprintk(KERN_ERR "alloc_rx_buf: %d allocated, next2fill %u, >> next2comp " >> + dev_dbg(&adapter->netdev->dev, >> + "alloc_rx_buf: %d allocated, next2fill %u, next2comp " >> "%u, uncommited %u\n", num_allocated, ring->next2fill, >> ring->next2comp, rq->uncommitted[ring_idx]); >> >> @@ -539,7 +540,8 @@ vmxnet3_map_pkt(struct sk_buff *skb, str >> tbi = tq->buf_info + tq->tx_ring.next2fill; >> tbi->map_type = VMXNET3_MAP_NONE; >> >> - dprintk(KERN_ERR "txd[%u]: 0x%Lx 0x%x 0x%x\n", >> + dev_dbg(&adapter->netdev->dev, >> + "txd[%u]: 0x%Lx 0x%x 0x%x\n", >> tq->tx_ring.next2fill, ctx->sop_txd->txd.addr, >> ctx->sop_txd->dword[2], ctx->sop_txd->dword[3]); >> vmxnet3_cmd_ring_adv_next2fill(&tq->tx_ring); >> @@ -572,7 +574,8 @@ vmxnet3_map_pkt(struct sk_buff *skb, str >> gdesc->dword[2] = dw2 | buf_size; >> gdesc->dword[3] = 0; >> >> - dprintk(KERN_ERR "txd[%u]: 0x%Lx 0x%x 0x%x\n", >> + dev_dbg(&adapter->netdev->dev, >> + "txd[%u]: 0x%Lx 0x%x 0x%x\n", >> tq->tx_ring.next2fill, gdesc->txd.addr, >> gdesc->dword[2], gdesc->dword[3]); >> vmxnet3_cmd_ring_adv_next2fill(&tq->tx_ring); >> @@ -600,7 +603,8 @@ vmxnet3_map_pkt(struct sk_buff *skb, str >> gdesc->dword[2] = dw2 | frag->size; >> gdesc->dword[3] = 0; >> >> - dprintk(KERN_ERR "txd[%u]: 0x%llu %u %u\n", >> + dev_dbg(&adapter->netdev->dev, >> + "txd[%u]: 0x%llu %u %u\n", >> tq->tx_ring.next2fill, gdesc->txd.addr, >> gdesc->dword[2], gdesc->dword[3]); >> vmxnet3_cmd_ring_adv_next2fill(&tq->tx_ring); >> @@ -697,7 +701,8 @@ vmxnet3_parse_and_copy_hdr(struct sk_buf >> tdd = tq->data_ring.base + tq->tx_ring.next2fill; >> >> memcpy(tdd->data, skb->data, ctx->copy_size); >> - dprintk(KERN_ERR "copy %u bytes to dataRing[%u]\n", >> + dev_dbg(&adapter->netdev->dev, >> + "copy %u bytes to dataRing[%u]\n", >> ctx->copy_size, tq->tx_ring.next2fill); >> return 1; >> >> @@ -808,7 +813,8 @@ vmxnet3_tq_xmit(struct sk_buff *skb, str >> >> if (count > vmxnet3_cmd_ring_desc_avail(&tq->tx_ring)) { >> tq->stats.tx_ring_full++; >> - dprintk(KERN_ERR "tx queue stopped on %s, next2comp %u" >> + dev_dbg(&adapter->netdev->dev, >> + "tx queue stopped on %s, next2comp %u" >> " next2fill %u\n", adapter->netdev->name, >> tq->tx_ring.next2comp, tq->tx_ring.next2fill); >> >> @@ -853,7 +859,8 @@ vmxnet3_tq_xmit(struct sk_buff *skb, str >> >> /* finally flips the GEN bit of the SOP desc */ >> gdesc->dword[2] ^= VMXNET3_TXD_GEN; >> - dprintk(KERN_ERR "txd[%u]: SOP 0x%Lx 0x%x 0x%x\n", >> + dev_dbg(&adapter->netdev->dev, >> + "txd[%u]: SOP 0x%Lx 0x%x 0x%x\n", >> (u32)((union Vmxnet3_GenericDesc *)ctx.sop_txd - >> tq->tx_ring.base), gdesc->txd.addr, gdesc->dword[2], >> gdesc->dword[3]); >> @@ -990,7 +997,8 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx >> if (unlikely(rcd->len == 0)) { >> /* Pretend the rx buffer is skipped. */ >> BUG_ON(!(rcd->sop && rcd->eop)); >> - dprintk(KERN_ERR "rxRing[%u][%u] 0 length\n", >> + dev_dbg(&adapter->netdev->dev, >> + "rxRing[%u][%u] 0 length\n", >> ring_idx, idx); >> goto rcd_done; >> } >> @@ -1676,7 +1684,8 @@ vmxnet3_activate_dev(struct vmxnet3_adap >> int err; >> u32 ret; >> >> - dprintk(KERN_ERR "%s: skb_buf_size %d, rx_buf_per_pkt %d, ring >> sizes" >> + dev_dbg(&adapter->netdev->dev, >> + "%s: skb_buf_size %d, rx_buf_per_pkt %d, ring sizes" >> " %u %u %u\n", adapter->netdev->name, adapter- >>> skb_buf_size, >> adapter->rx_buf_per_pkt, adapter->tx_queue.tx_ring.size, >> adapter->rx_queue.rx_ring[0].size, >> _______________________________________________ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/