aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/megaraid.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index dfea346b00a5..f9792528e33f 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -380,23 +380,23 @@ megaraid_queue(Scsi_Cmnd *scmd, void (*done)(Scsi_Cmnd *))
380 380
381 spin_lock_irqsave(&adapter->lock, flags); 381 spin_lock_irqsave(&adapter->lock, flags);
382 scb = mega_build_cmd(adapter, scmd, &busy); 382 scb = mega_build_cmd(adapter, scmd, &busy);
383 if (!scb)
384 goto out;
383 385
384 if(scb) { 386 scb->state |= SCB_PENDQ;
385 scb->state |= SCB_PENDQ; 387 list_add_tail(&scb->list, &adapter->pending_list);
386 list_add_tail(&scb->list, &adapter->pending_list);
387 388
388 /* 389 /*
389 * Check if the HBA is in quiescent state, e.g., during a 390 * Check if the HBA is in quiescent state, e.g., during a
390 * delete logical drive opertion. If it is, don't run 391 * delete logical drive opertion. If it is, don't run
391 * the pending_list. 392 * the pending_list.
392 */ 393 */
393 if(atomic_read(&adapter->quiescent) == 0) { 394 if (atomic_read(&adapter->quiescent) == 0)
394 mega_runpendq(adapter); 395 mega_runpendq(adapter);
395 }
396 return 0;
397 }
398 spin_unlock_irqrestore(&adapter->lock, flags);
399 396
397 busy = 0;
398 out:
399 spin_unlock_irqrestore(&adapter->lock, flags);
400 return busy; 400 return busy;
401} 401}
402 402
@@ -4677,7 +4677,6 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4677 4677
4678 adapter->flag = flag; 4678 adapter->flag = flag;
4679 spin_lock_init(&adapter->lock); 4679 spin_lock_init(&adapter->lock);
4680 scsi_assign_lock(host, &adapter->lock);
4681 4680
4682 host->cmd_per_lun = max_cmd_per_lun; 4681 host->cmd_per_lun = max_cmd_per_lun;
4683 host->max_sectors = max_sectors_per_io; 4682 host->max_sectors = max_sectors_per_io;