From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765198AbcINU7e (ORCPT ); Wed, 14 Sep 2016 16:59:34 -0400 Received: from arroyo.ext.ti.com ([198.47.19.12]:50294 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760673AbcINU7b (ORCPT ); Wed, 14 Sep 2016 16:59:31 -0400 Subject: Re: [PATCH 3/9] net: ethernet: ti: cpts: rework initialization/deinitialization To: Richard Cochran References: <20160914130231.3035-1-grygorii.strashko@ti.com> <20160914130231.3035-4-grygorii.strashko@ti.com> <20160914135214.GA28592@localhost.localdomain> <606f7cfc-aa34-528b-df04-7a60a9695425@ti.com> <20160914203217.GD12195@netboy> <20160914205223.GF12195@netboy> CC: "David S. Miller" , , Mugunthan V N , Sekhar Nori , , , WingMan Kwok From: Grygorii Strashko Message-ID: Date: Wed, 14 Sep 2016 23:59:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160914205223.GF12195@netboy> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/14/2016 11:52 PM, Richard Cochran wrote: > On Wed, Sep 14, 2016 at 11:37:45PM +0300, Grygorii Strashko wrote: >> The problem is that if cpts not initialized than pinter on >> cpts (in consumer/parent driver - NETCP) will be NULL. > > You made that problem with your "clean up" in this series. > Previously, cpts was always allocated. not exactly - it was allocated in CPSW .probe() manually, in without this re-work it has to be allocated in NTCP the same way - manually. So, checks we are discussing here will be still present, but they will need to be done in CPSW/NETCP drivers - just one level up and duplicated in both these drivers. > >> So, rx_enable will be unaccessible and cause crash :( > > So just make sure cpts is initialized. OK. I'll update code this way. -- regards, -grygorii