From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757098Ab0J1Gs6 (ORCPT ); Thu, 28 Oct 2010 02:48:58 -0400 Received: from stargate.chelsio.com ([67.207.112.58]:23817 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754411Ab0J1Gs5 (ORCPT ); Thu, 28 Oct 2010 02:48:57 -0400 Message-ID: <4CC919B1.1040602@chelsio.com> Date: Wed, 27 Oct 2010 23:35:29 -0700 From: Divy Le Ray User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.11) Gecko/20101013 Lightning/1.0b2 Thunderbird/3.1.5 ThunderBrowse/3.3.2 MIME-Version: 1.0 To: Nishanth Aravamudan CC: eric.dumazet@gmail.com, sonnyrao@us.ibm.com, Dimitrios Michailidis , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cxgb3: fix crash due to manipulating queues before registration References: <1288236563.2658.59.camel@edumazet-laptop> <1288242390-28574-1-git-send-email-nacc@us.ibm.com> In-Reply-To: <1288242390-28574-1-git-send-email-nacc@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 28 Oct 2010 06:38:57.0714 (UTC) FILETIME=[CC584920:01CB766A] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/27/2010 10:06 PM, Nishanth Aravamudan wrote: > Hi Eric, > > Something like the following?: > > Thanks, > Nish > > > Along the same lines as "cxgb4: fix crash due to manipulating queues > before registration" (8f6d9f40476895571df039b6f1f5230ec7faebad), before > commit "net: allocate tx queues in register_netdevice" > netif_tx_stop_all_queues and related functions could be used between > device allocation and registration but now only after registration. > cxgb4 has such a call before registration and crashes now. Move it > after register_netdev. > > Signed-off-by: Nishanth Aravamudan Acked-by: Divy Le Ray > Cc: eric.dumazet@gmail.com > Cc: sonnyrao@us.ibm.com > Cc: Divy Le Ray > Cc: Dimitris Michailidis > Cc: netdev@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > --- > drivers/net/cxgb3/cxgb3_main.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c > index 4e3c123..96c70a5 100644 > --- a/drivers/net/cxgb3/cxgb3_main.c > +++ b/drivers/net/cxgb3/cxgb3_main.c > @@ -3301,7 +3301,6 @@ static int __devinit init_one(struct pci_dev *pdev, > pi->rx_offload = T3_RX_CSUM | T3_LRO; > pi->port_id = i; > netif_carrier_off(netdev); > - netif_tx_stop_all_queues(netdev); > netdev->irq = pdev->irq; > netdev->mem_start = mmio_start; > netdev->mem_end = mmio_start + mmio_len - 1; > @@ -3342,6 +3341,7 @@ static int __devinit init_one(struct pci_dev *pdev, > adapter->name = adapter->port[i]->name; > > __set_bit(i,&adapter->registered_device_map); > + netif_tx_stop_all_queues(adapter->port[i]); > } > } > if (!adapter->registered_device_map) {