Skip to content

Commit

Permalink
qla3xxx: ethernet: Fix bogus interrupt state flag.
Browse files Browse the repository at this point in the history
In 'ql_adapter_initialize'
the first call for 'spin_unlock_irqrestore()' is with hw_flags = 0,
which is as good as 'spin_unlock_irq()' (unconditional interrupt
enabling). If this is intended, then for better performance
'spin_unlock_irqrestore()' can be replaced with 'spin_unlock_irq()'
and 'spin_lock_irqsave()' can be replaced by 'spin_lock_irq()

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Santosh Nayak authored and David S. Miller committed Mar 5, 2012
1 parent d1d81d4 commit 9d1dfc0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/ethernet/qlogic/qla3xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3017,7 +3017,6 @@ 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;
Expand Down Expand Up @@ -3228,9 +3227,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);
spin_unlock_irq(&qdev->hw_lock);
msleep(500);
spin_lock_irqsave(&qdev->hw_lock, hw_flags);
spin_lock_irq(&qdev->hw_lock);
} while (--delay);

if (delay == 0) {
Expand Down

0 comments on commit 9d1dfc0

Please sign in to comment.