netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] bna: Update driver version to 3.0.23.0 (resubmit)
@ 2012-04-04 15:41 Jing Huang
  2012-04-04 22:21 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Jing Huang @ 2012-04-04 15:41 UTC (permalink / raw)
  To: davem, netdev; +Cc: AdapterLinuxOpenSrcExtTeam, Jing Huang

I am resubmit this patch set since it seems that the net-next merge window is
over. 

This patch set contains fixes in adapter initialization and tx/rx cleanup path.
It also include code cleanups by removing and renaming some functions.

The driver version has been updated to 3.0.23.0 to reflect the changes.

Jing Huang (7):
  bna: Serialize smem access during adapter initialization
  bna: Flash controller ioc pll init fixes
  bna: ioc cleanups
  bfa: tx rx cleanup fix
  bna: Remove tx tasklet
  bfa: Function name changes and cleanups
  bfa: Update driver version to 3.0.23.0

 drivers/net/ethernet/brocade/bna/bfa_ioc.c      |   61 +++--
 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c   |  142 +++++++----
 drivers/net/ethernet/brocade/bna/bfi_reg.h      |    6 +
 drivers/net/ethernet/brocade/bna/bnad.c         |  316 +++++++++++------------
 drivers/net/ethernet/brocade/bna/bnad.h         |   11 +-
 drivers/net/ethernet/brocade/bna/bnad_ethtool.c |    6 +-
 6 files changed, 300 insertions(+), 242 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/7] bna: Update driver version to 3.0.23.0 (resubmit)
  2012-04-04 15:41 [PATCH 0/7] bna: Update driver version to 3.0.23.0 (resubmit) Jing Huang
@ 2012-04-04 22:21 ` David Miller
  2012-04-04 23:07   ` Jing Huang
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2012-04-04 22:21 UTC (permalink / raw)
  To: huangj; +Cc: netdev, AdapterLinuxOpenSrcExtTeam

From: Jing Huang <huangj@Brocade.COM>
Date: Wed, 4 Apr 2012 08:41:42 -0700

> I am resubmit this patch set since it seems that the net-next merge window is
> over. 
> 
> This patch set contains fixes in adapter initialization and tx/rx cleanup path.
> It also include code cleanups by removing and renaming some functions.
> 
> The driver version has been updated to 3.0.23.0 to reflect the changes.

All applied.

But I would suggest modifying how the driver spins waiting for the
firmware to release semaphore bits in registers.

You have no timeouts or limits in these loops.

So if the firmware crashes or gets stuck, this will take out the
entire computer which is very undesirable.

Change these loops to have a limit and signal an error and fail the
top-level operation if the limit is hit.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH 0/7] bna: Update driver version to 3.0.23.0 (resubmit)
  2012-04-04 22:21 ` David Miller
@ 2012-04-04 23:07   ` Jing Huang
  2012-04-05  0:15     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Jing Huang @ 2012-04-04 23:07 UTC (permalink / raw)
  To: David Miller; +Cc: netdev@vger.kernel.org, Adapter Linux Open Src Ext Team

>But I would suggest modifying how the driver spins waiting for the
>firmware to release semaphore bits in registers.
>
>You have no timeouts or limits in these loops.
>
>So if the firmware crashes or gets stuck, this will take out the
>entire computer which is very undesirable.
>
>Change these loops to have a limit and signal an error and fail the
>top-level operation if the limit is hit.

Thanks David.

The ioc init semaphore register is only used by driver. Firmware will never touch this
register.  It will only be set to 1 when there is a driver instance holding it. So in practice, 
the infinite look will happen only if a driver instance grab the semaphore but forgot to
release it. We add this logic to serialize register access for potential case of concurrent PCI
function probe, which seems pretty rare in Linux.

I agree that this code looks ugly and wrong in theory. We will consider remove it or
implement some timeout logic for it.

Jing

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/7] bna: Update driver version to 3.0.23.0 (resubmit)
  2012-04-04 23:07   ` Jing Huang
@ 2012-04-05  0:15     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-04-05  0:15 UTC (permalink / raw)
  To: huangj; +Cc: netdev, AdapterLinuxOpenSrcExtTeam

From: Jing Huang <huangj@Brocade.COM>
Date: Wed, 4 Apr 2012 16:07:22 -0700

> The ioc init semaphore register is only used by driver. Firmware
> will never touch this register.  It will only be set to 1 when there
> is a driver instance holding it. So in practice, the infinite look
> will happen only if a driver instance grab the semaphore but forgot
> to release it. We add this logic to serialize register access for
> potential case of concurrent PCI function probe, which seems pretty
> rare in Linux.

Thanks for the clarification.

> I agree that this code looks ugly and wrong in theory. We will consider remove it or
> implement some timeout logic for it.

Ok, great.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-05  0:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-04 15:41 [PATCH 0/7] bna: Update driver version to 3.0.23.0 (resubmit) Jing Huang
2012-04-04 22:21 ` David Miller
2012-04-04 23:07   ` Jing Huang
2012-04-05  0:15     ` David Miller

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).