[SCSI] mac_esp: remove redundant mutual exclusion
authorFinn Thain <fthain@telegraphics.com.au>
Sun, 11 Sep 2011 09:57:51 +0000 (19:57 +1000)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 22 Sep 2011 11:10:18 +0000 (15:10 +0400)
Mutual exclusion is redundant here because all the paths in the call graph
leading to esp_driver_ops.send_dma_cmd() happen under spin_lock_irqsave/
spin_lock_irqrestore. Remove it.

Tested on a Mac Quadra 660av and a Mac LC 630.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/mac_esp.c

index 3893337e3dd3ff05155f7dd99cf5db356adde3f0..590ce1ef20167d407dde187924a9a0ccf2def68e 100644 (file)
@@ -230,9 +230,6 @@ static void mac_esp_send_pdma_cmd(struct esp *esp, u32 addr, u32 esp_count,
                                  u32 dma_count, int write, u8 cmd)
 {
        struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
-       unsigned long flags;
-
-       local_irq_save(flags);
 
        mep->error = 0;
 
@@ -270,8 +267,6 @@ static void mac_esp_send_pdma_cmd(struct esp *esp, u32 addr, u32 esp_count,
                        esp_count = n;
                }
        } while (esp_count);
-
-       local_irq_restore(flags);
 }
 
 /*
@@ -353,8 +348,6 @@ static void mac_esp_send_pio_cmd(struct esp *esp, u32 addr, u32 esp_count,
        struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
        u8 *fifo = esp->regs + ESP_FDATA * 16;
 
-       disable_irq(esp->host->irq);
-
        cmd &= ~ESP_CMD_DMA;
        mep->error = 0;
 
@@ -431,8 +424,6 @@ static void mac_esp_send_pio_cmd(struct esp *esp, u32 addr, u32 esp_count,
                        scsi_esp_cmd(esp, ESP_CMD_TI);
                }
        }
-
-       enable_irq(esp->host->irq);
 }
 
 static int mac_esp_irq_pending(struct esp *esp)