netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-2.6 PATCH 1/2] qla3xxx: Give the PHY time to come out of reset.
@ 2009-06-23 19:00 Ron Mercer
  2009-06-23 19:00 ` [net-2.6 PATCH 2/2] qla3xxx: Don't sleep while holding lock Ron Mercer
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ron Mercer @ 2009-06-23 19:00 UTC (permalink / raw)
  To: davem; +Cc: netdev, ron.mercer


Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
 drivers/net/qla3xxx.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index cadc32c..d9e3835 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -3151,7 +3151,8 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
 	ql_write_common_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg,
 			    (ISP_SERIAL_PORT_IF_WE |
 			     (ISP_SERIAL_PORT_IF_WE << 16)));
-
+	/* Give the PHY time to come out of reset. */
+	mdelay(100);
 	qdev->port_link_state = LS_DOWN;
 	netif_carrier_off(qdev->ndev);
 
-- 
1.6.0.2


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

* [net-2.6 PATCH 2/2] qla3xxx: Don't sleep while holding lock.
  2009-06-23 19:00 [net-2.6 PATCH 1/2] qla3xxx: Give the PHY time to come out of reset Ron Mercer
@ 2009-06-23 19:00 ` Ron Mercer
  2009-06-23 23:36   ` David Miller
  2009-06-23 23:36 ` [net-2.6 PATCH 1/2] qla3xxx: Give the PHY time to come out of reset David Miller
  2009-06-24  8:56 ` Franco Fichtner
  2 siblings, 1 reply; 5+ messages in thread
From: Ron Mercer @ 2009-06-23 19:00 UTC (permalink / raw)
  To: davem; +Cc: netdev, ron.mercer

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
 drivers/net/qla3xxx.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index d9e3835..56333ee 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -3143,6 +3143,7 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
 						(void __iomem *)port_regs;
 	u32 delay = 10;
 	int status = 0;
+	unsigned long hw_flags = 0;
 
 	if(ql_mii_setup(qdev))
 		return -1;
@@ -3352,7 +3353,9 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
 		value = ql_read_page0_reg(qdev, &port_regs->portStatus);
 		if (value & PORT_STATUS_IC)
 			break;
+		spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
 		msleep(500);
+		spin_lock_irqsave(&qdev->hw_lock, hw_flags);
 	} while (--delay);
 
 	if (delay == 0) {
-- 
1.6.0.2


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

* Re: [net-2.6 PATCH 1/2] qla3xxx: Give the PHY time to come out of reset.
  2009-06-23 19:00 [net-2.6 PATCH 1/2] qla3xxx: Give the PHY time to come out of reset Ron Mercer
  2009-06-23 19:00 ` [net-2.6 PATCH 2/2] qla3xxx: Don't sleep while holding lock Ron Mercer
@ 2009-06-23 23:36 ` David Miller
  2009-06-24  8:56 ` Franco Fichtner
  2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2009-06-23 23:36 UTC (permalink / raw)
  To: ron.mercer; +Cc: netdev

From: Ron Mercer <ron.mercer@qlogic.com>
Date: Tue, 23 Jun 2009 12:00:01 -0700

> 
> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>

Applied.

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

* Re: [net-2.6 PATCH 2/2] qla3xxx: Don't sleep while holding lock.
  2009-06-23 19:00 ` [net-2.6 PATCH 2/2] qla3xxx: Don't sleep while holding lock Ron Mercer
@ 2009-06-23 23:36   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2009-06-23 23:36 UTC (permalink / raw)
  To: ron.mercer; +Cc: netdev

From: Ron Mercer <ron.mercer@qlogic.com>
Date: Tue, 23 Jun 2009 12:00:02 -0700

> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>

Applied.

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

* Re: [net-2.6 PATCH 1/2] qla3xxx: Give the PHY time to come out of reset.
  2009-06-23 19:00 [net-2.6 PATCH 1/2] qla3xxx: Give the PHY time to come out of reset Ron Mercer
  2009-06-23 19:00 ` [net-2.6 PATCH 2/2] qla3xxx: Don't sleep while holding lock Ron Mercer
  2009-06-23 23:36 ` [net-2.6 PATCH 1/2] qla3xxx: Give the PHY time to come out of reset David Miller
@ 2009-06-24  8:56 ` Franco Fichtner
  2 siblings, 0 replies; 5+ messages in thread
From: Franco Fichtner @ 2009-06-24  8:56 UTC (permalink / raw)
  To: Ron Mercer; +Cc: davem, netdev

Ron Mercer wrote:
> +	/* Give the PHY time to come out of reset. */
> +	mdelay(100);
>   

Why *delay* for 100ms? This is something I pointed out quite a while ago 
when
you first introduced your driver.

Looking at the other patch where you eventually replaced the delay with 
a sleep
left the door wide open for a lock related issue. So I can see why the 
delay works
"better" for you.

However, I also recall pointing out the locking in this driver needed 
some work,
because there were spinlocks held over the duration of numerous function 
calls.
It seemed like a mess, but nobody cared.


Franco

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

end of thread, other threads:[~2009-06-24  8:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-23 19:00 [net-2.6 PATCH 1/2] qla3xxx: Give the PHY time to come out of reset Ron Mercer
2009-06-23 19:00 ` [net-2.6 PATCH 2/2] qla3xxx: Don't sleep while holding lock Ron Mercer
2009-06-23 23:36   ` David Miller
2009-06-23 23:36 ` [net-2.6 PATCH 1/2] qla3xxx: Give the PHY time to come out of reset David Miller
2009-06-24  8:56 ` Franco Fichtner

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