linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ganapathi Bhat <gbhat@marvell.com>
To: Brian Norris <briannorris@chromium.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"Cathy Luo" <cluo@marvell.com>, Zhiyuan Yang <yangzy@marvell.com>,
	James Cao <jcao@marvell.com>, Rakesh Parmar <rakeshp@marvell.com>,
	Dmitry Vyukov <dvyukov@google.com>
Subject: RE: [EXT] Re: [PATCH] mwifiex: avoid deleting uninitialized timer during USB cleanup
Date: Wed, 2 Oct 2019 14:25:53 +0000	[thread overview]
Message-ID: <MN2PR18MB2637A80D365B8B68E8216CA0A09C0@MN2PR18MB2637.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20190614011648.GA121099@google.com>

Hi Brian,

Sorry for delayed response;

> > @@ -1348,6 +1348,8 @@ static void mwifiex_usb_cleanup_tx_aggr(struct
> > mwifiex_adapter *adapter)
> >
> >  	for (idx = 0; idx < MWIFIEX_TX_DATA_PORT; idx++) {
> >  		port = &card->port[idx];
> > +		if (!port->tx_data_ep)
> > +			continue;
> 
> It's not clear to me what this is about. Are you sure you're not just cleaning
> stuff up in the wrong order?
OK; 
> 
> >  		if (adapter->bus_aggr.enable)
> >  			while ((skb_tmp =
> >  				skb_dequeue(&port->tx_aggr.aggr_list)))
> 
> ...
> 
> > @@ -1584,7 +1580,29 @@ static void
> mwifiex_usb_submit_rem_rx_urbs(struct mwifiex_adapter *adapter)
> >  	return 0;
> >  }
> >
> > +static int mwifiex_init_usb(struct mwifiex_adapter *adapter) {
> > +	struct usb_card_rec *card = (struct usb_card_rec *)adapter->card;
> > +	int ret = 0;
> > +
> > +	if (card->usb_boot_state == USB8XXX_FW_DNLD)
> > +		return 0;
> 
> This looks wrong. You don't want to skip your basic initialization just because
> firmware isn't loaded yet. In fact, init_if() always gets called before FW init,
> so haven't you basically stubbed out this function most of the time?

I think, we are not skipping the basic initialization:
original flow:
PID_1: mwifiex_usb_probe  >>> "do driver initialization" >>> "download the firmware"
PID_2: mwifiex_usb_probe  >>> "do driver initialization" >>> "do interface initialization" >>> "do firmware initialization"
new flow:
PID_1: mwifiex_usb_probe  >>> "do driver initialization" >>> "download the firmware"
PID_2: mwifiex_usb_probe  >>> "do interface initialization" >>> "do driver initialization"  >>> "do firmware initialization"

> 
> I guess the question is: is this step supposed to go before, or after firmware
> initilization? Based on that answer, we can make an appropriate patch.

It was before firmware initialization, in the existing driver( and the new change also follows this);

> 
> (The original code does this after FW initialization, and now you're only sort
> of moving it before.)

I don't think so; as per the above flow, things which we moved to init_if() were previously done in mwifiex_usb_dnld_fw(),
just before it return(for PID_2); FW initialization (mwifiex_init_fw()) happens after that;

Regards,
Ganapathi

      reply	other threads:[~2019-10-02 14:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 15:54 [PATCH] mwifiex: avoid deleting uninitialized timer during USB cleanup Ganapathi Bhat
2019-06-14  1:16 ` Brian Norris
2019-10-02 14:25   ` Ganapathi Bhat [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR18MB2637A80D365B8B68E8216CA0A09C0@MN2PR18MB2637.namprd18.prod.outlook.com \
    --to=gbhat@marvell.com \
    --cc=briannorris@chromium.org \
    --cc=cluo@marvell.com \
    --cc=dvyukov@google.com \
    --cc=jcao@marvell.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rakeshp@marvell.com \
    --cc=yangzy@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).