[SCSI] qla1280: Drop host_lock while requesting firmware
authorBen Hutchings <ben@decadent.org.uk>
Sat, 23 Jan 2010 18:40:29 +0000 (18:40 +0000)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 9 Feb 2010 00:35:14 +0000 (18:35 -0600)
request_firmware() may sleep and it appears to be safe to release the
spinlock here.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla1280.c

index 8371d91..49ac414 100644 (file)
@@ -1640,8 +1640,10 @@ qla1280_load_firmware_pio(struct scsi_qla_host *ha)
        uint16_t mb[MAILBOX_REGISTER_COUNT], i;
        int err;
 
+       spin_unlock_irq(ha->host->host_lock);
        err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname,
                               &ha->pdev->dev);
+       spin_lock_irq(ha->host->host_lock);
        if (err) {
                printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
                       ql1280_board_tbl[ha->devnum].fwname, err);
@@ -1699,8 +1701,10 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha)
                return -ENOMEM;
 #endif
 
+       spin_unlock_irq(ha->host->host_lock);
        err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname,
                               &ha->pdev->dev);
+       spin_lock_irq(ha->host->host_lock);
        if (err) {
                printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
                       ql1280_board_tbl[ha->devnum].fwname, err);