diff options
author | Catalin(ux aka Dino) BOIE <util@deuroconsult.ro> | 2006-03-04 12:18:59 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-04 12:18:59 -0500 |
commit | ad8c48ad3bbef078616ed4d2652d362dfd962f09 (patch) | |
tree | e400f39c22cf68621be51042a860cf402c3a9bd5 /drivers/net/e100.c | |
parent | e72fd96e8ee3ff4dd80757172a4fe49bd92fea9c (diff) |
Fix io ordering problems in e100
Checking e100.c code against Documentation/io_ordering.txt I found the
following problem:
spin_lock_irq...
write
spin-unlock
e100_write_flush
The attached patch fix the code like this:
spin_lock_irq...
write
e100_write_flush
spin-unlock
Signed-off-by: Catalin BOIE <catab@umbrella.ro>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/e100.c')
-rw-r--r-- | drivers/net/e100.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 24253c807e55..ed13f72ef8ef 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -598,8 +598,8 @@ static void e100_enable_irq(struct nic *nic) | |||
598 | 598 | ||
599 | spin_lock_irqsave(&nic->cmd_lock, flags); | 599 | spin_lock_irqsave(&nic->cmd_lock, flags); |
600 | writeb(irq_mask_none, &nic->csr->scb.cmd_hi); | 600 | writeb(irq_mask_none, &nic->csr->scb.cmd_hi); |
601 | spin_unlock_irqrestore(&nic->cmd_lock, flags); | ||
602 | e100_write_flush(nic); | 601 | e100_write_flush(nic); |
602 | spin_unlock_irqrestore(&nic->cmd_lock, flags); | ||
603 | } | 603 | } |
604 | 604 | ||
605 | static void e100_disable_irq(struct nic *nic) | 605 | static void e100_disable_irq(struct nic *nic) |
@@ -608,8 +608,8 @@ static void e100_disable_irq(struct nic *nic) | |||
608 | 608 | ||
609 | spin_lock_irqsave(&nic->cmd_lock, flags); | 609 | spin_lock_irqsave(&nic->cmd_lock, flags); |
610 | writeb(irq_mask_all, &nic->csr->scb.cmd_hi); | 610 | writeb(irq_mask_all, &nic->csr->scb.cmd_hi); |
611 | spin_unlock_irqrestore(&nic->cmd_lock, flags); | ||
612 | e100_write_flush(nic); | 611 | e100_write_flush(nic); |
612 | spin_unlock_irqrestore(&nic->cmd_lock, flags); | ||
613 | } | 613 | } |
614 | 614 | ||
615 | static void e100_hw_reset(struct nic *nic) | 615 | static void e100_hw_reset(struct nic *nic) |
@@ -1582,8 +1582,8 @@ static void e100_watchdog(unsigned long data) | |||
1582 | * interrupt mask bit and the SW Interrupt generation bit */ | 1582 | * interrupt mask bit and the SW Interrupt generation bit */ |
1583 | spin_lock_irq(&nic->cmd_lock); | 1583 | spin_lock_irq(&nic->cmd_lock); |
1584 | writeb(readb(&nic->csr->scb.cmd_hi) | irq_sw_gen,&nic->csr->scb.cmd_hi); | 1584 | writeb(readb(&nic->csr->scb.cmd_hi) | irq_sw_gen,&nic->csr->scb.cmd_hi); |
1585 | spin_unlock_irq(&nic->cmd_lock); | ||
1586 | e100_write_flush(nic); | 1585 | e100_write_flush(nic); |
1586 | spin_unlock_irq(&nic->cmd_lock); | ||
1587 | 1587 | ||
1588 | e100_update_stats(nic); | 1588 | e100_update_stats(nic); |
1589 | e100_adjust_adaptive_ifs(nic, cmd.speed, cmd.duplex); | 1589 | e100_adjust_adaptive_ifs(nic, cmd.speed, cmd.duplex); |