Skip to content

Commit e1e82b6

Browse files
Daniel WalkerJames Bottomley
authored andcommitted
[SCSI] qla2xxx: firmware semaphore to mutex
Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1 parent 0e973a2 commit e1e82b6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/vmalloc.h>
1111
#include <linux/delay.h>
1212
#include <linux/kthread.h>
13+
#include <linux/mutex.h>
1314

1415
#include <scsi/scsi_tcq.h>
1516
#include <scsi/scsicam.h>
@@ -2634,7 +2635,7 @@ qla2x00_timer(scsi_qla_host_t *ha)
26342635
#define FW_FILE_ISP24XX "ql2400_fw.bin"
26352636
#define FW_FILE_ISP25XX "ql2500_fw.bin"
26362637

2637-
static DECLARE_MUTEX(qla_fw_lock);
2638+
static DEFINE_MUTEX(qla_fw_lock);
26382639

26392640
static struct fw_blob qla_fw_blobs[FW_BLOBS] = {
26402641
{ .name = FW_FILE_ISP21XX, .segs = { 0x1000, 0 }, },
@@ -2665,7 +2666,7 @@ qla2x00_request_firmware(scsi_qla_host_t *ha)
26652666
blob = &qla_fw_blobs[FW_ISP25XX];
26662667
}
26672668

2668-
down(&qla_fw_lock);
2669+
mutex_lock(&qla_fw_lock);
26692670
if (blob->fw)
26702671
goto out;
26712672

@@ -2678,7 +2679,7 @@ qla2x00_request_firmware(scsi_qla_host_t *ha)
26782679
}
26792680

26802681
out:
2681-
up(&qla_fw_lock);
2682+
mutex_unlock(&qla_fw_lock);
26822683
return blob;
26832684
}
26842685

@@ -2687,11 +2688,11 @@ qla2x00_release_firmware(void)
26872688
{
26882689
int idx;
26892690

2690-
down(&qla_fw_lock);
2691+
mutex_lock(&qla_fw_lock);
26912692
for (idx = 0; idx < FW_BLOBS; idx++)
26922693
if (qla_fw_blobs[idx].fw)
26932694
release_firmware(qla_fw_blobs[idx].fw);
2694-
up(&qla_fw_lock);
2695+
mutex_unlock(&qla_fw_lock);
26952696
}
26962697

26972698
static pci_ers_result_t

0 commit comments

Comments
 (0)