Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@gmail.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Yuusuke Ashizuka <ashiduka@fujitsu.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH v2] ravb: Fixed the problem that rmmod can not be done
Date: Thu, 30 Jul 2020 19:24:17 +0300
Message-ID: <793b7100-9a3a-11fd-f0cd-bf225b958775@gmail.com> (raw)
In-Reply-To: <TY2PR01MB36928342A37492E8694A7625D8710@TY2PR01MB3692.jpnprd01.prod.outlook.com>

Hello!

On 7/30/20 2:37 PM, Yoshihiro Shimoda wrote:

>> From: Yuusuke Ashizuka, Sent: Thursday, July 30, 2020 7:02 PM
>> Subject: [PATCH v2] ravb: Fixed the problem that rmmod can not be done
> 
> Thank you for the patch! I found a similar patch for another driver [1].

   It's not the same case -- that driver hadn't had the MDIO release code at all
before that patch.

> So, we should apply this patch to the ravb driver.

   I believe the driver is innocent. :-)

> [1]
> fd5f375c1628 ("net-next: ax88796: Attach MII bus only when open")
> 
>> ravb is a module driver, but I cannot rmmod it after insmod it.
> 
> I think "When this driver is a module, I cannot ..." is better.

   Perhaps "... is built as a module".

>> ravb does mdio_init() at the time of probe, and module->refcnt is incremented
> 
> I think "This is because that this driver calls ravb_mdio_init() ..." is better.

   Yep.

> According to scripts/checkpatch.pl, I think it's better to be a maximum
> 75 chars per line in the commit description.

   Yes.
   (Note that for the source code the new length limit is 100, not 80.)

>> by alloc_mdio_bitbang() called after that.
>> Therefore, even if ifup is not performed, the driver is in use and rmmod cannot
>> be performed.

   That's not really obvious...

>> $ lsmod
>> Module                  Size  Used by
>> ravb                   40960  1
>> $ rmmod ravb
>> rmmod: ERROR: Module ravb is in use

   Shouldn't the driver core call the remove() method for the affected devices
first, before checking the refcount? 

>> Fixed to execute mdio_init() at open and free_mdio() at close, thereby rmmod is
> 
> I think "Fixed to call ravb_mdio_init() at open and ravb_mdio_release() ..." is better.
> However, I'm not sure whether that Sergei who is the reviwer of this driver accepts
> the descriptions which I suggested though :)

   The language barrier isn't the only obstacle. :-)

> By the way, I think you have to send this patch to the following maintainers too:
> # We can get it by using scripts/get_maintainers.pl.
> David S. Miller <davem@davemloft.net> (maintainer:NETWORKING DRIVERS,commit_signer:8/8=100%)
> Jakub Kicinski <kuba@kernel.org> (maintainer:NETWORKING DRIVERS)
> 
> Best regards,
> Yoshihiro Shimoda

   For the future, please trim your reply before the patch starts as you
don't comment on the patch itself anyway...

>> possible in the ifdown state.
>>
>> Signed-off-by: Yuusuke Ashizuka <ashiduka@fujitsu.com>

[...]

MBR, Sergei

  reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30  3:56 [PATCH] " Yuusuke Ashizuka
2020-07-30  7:55 ` kernel test robot
2020-07-30 10:01 ` [PATCH v2] " Yuusuke Ashizuka
2020-07-30 11:37   ` Yoshihiro Shimoda
2020-07-30 16:24     ` Sergei Shtylyov [this message]
2020-07-31  6:43       ` Yoshihiro Shimoda
2020-07-31 17:45         ` Sergei Shtylyov
2020-07-30 16:04   ` Sergei Shtylyov
2020-07-31 10:18     ` ashiduka
2020-07-31 16:28       ` Sergei Shtylyov
2020-08-06  2:26         ` ashiduka
2020-07-31 18:32   ` Sergei Shtylyov
2020-08-06  2:28     ` ashiduka

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=793b7100-9a3a-11fd-f0cd-bf225b958775@gmail.com \
    --to=sergei.shtylyov@gmail.com \
    --cc=ashiduka@fujitsu.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git