diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_iocb.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 5489d5024673..d57669aa4615 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -454,10 +454,11 @@ qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun, | |||
454 | { | 454 | { |
455 | int ret; | 455 | int ret; |
456 | unsigned long flags = 0; | 456 | unsigned long flags = 0; |
457 | scsi_qla_host_t *pha = to_qla_parent(ha); | ||
457 | 458 | ||
458 | spin_lock_irqsave(&ha->hardware_lock, flags); | 459 | spin_lock_irqsave(&pha->hardware_lock, flags); |
459 | ret = __qla2x00_marker(ha, loop_id, lun, type); | 460 | ret = __qla2x00_marker(ha, loop_id, lun, type); |
460 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 461 | spin_unlock_irqrestore(&pha->hardware_lock, flags); |
461 | 462 | ||
462 | return (ret); | 463 | return (ret); |
463 | } | 464 | } |
@@ -672,7 +673,7 @@ qla24xx_start_scsi(srb_t *sp) | |||
672 | { | 673 | { |
673 | int ret, nseg; | 674 | int ret, nseg; |
674 | unsigned long flags; | 675 | unsigned long flags; |
675 | scsi_qla_host_t *ha; | 676 | scsi_qla_host_t *ha, *pha; |
676 | struct scsi_cmnd *cmd; | 677 | struct scsi_cmnd *cmd; |
677 | uint32_t *clr_ptr; | 678 | uint32_t *clr_ptr; |
678 | uint32_t index; | 679 | uint32_t index; |
@@ -686,6 +687,7 @@ qla24xx_start_scsi(srb_t *sp) | |||
686 | /* Setup device pointers. */ | 687 | /* Setup device pointers. */ |
687 | ret = 0; | 688 | ret = 0; |
688 | ha = sp->ha; | 689 | ha = sp->ha; |
690 | pha = to_qla_parent(ha); | ||
689 | reg = &ha->iobase->isp24; | 691 | reg = &ha->iobase->isp24; |
690 | cmd = sp->cmd; | 692 | cmd = sp->cmd; |
691 | /* So we know we haven't pci_map'ed anything yet */ | 693 | /* So we know we haven't pci_map'ed anything yet */ |
@@ -700,7 +702,7 @@ qla24xx_start_scsi(srb_t *sp) | |||
700 | } | 702 | } |
701 | 703 | ||
702 | /* Acquire ring specific lock */ | 704 | /* Acquire ring specific lock */ |
703 | spin_lock_irqsave(&ha->hardware_lock, flags); | 705 | spin_lock_irqsave(&pha->hardware_lock, flags); |
704 | 706 | ||
705 | /* Check for room in outstanding command list. */ | 707 | /* Check for room in outstanding command list. */ |
706 | handle = ha->current_outstanding_cmd; | 708 | handle = ha->current_outstanding_cmd; |
@@ -795,14 +797,14 @@ qla24xx_start_scsi(srb_t *sp) | |||
795 | ha->response_ring_ptr->signature != RESPONSE_PROCESSED) | 797 | ha->response_ring_ptr->signature != RESPONSE_PROCESSED) |
796 | qla24xx_process_response_queue(ha); | 798 | qla24xx_process_response_queue(ha); |
797 | 799 | ||
798 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 800 | spin_unlock_irqrestore(&pha->hardware_lock, flags); |
799 | return QLA_SUCCESS; | 801 | return QLA_SUCCESS; |
800 | 802 | ||
801 | queuing_error: | 803 | queuing_error: |
802 | if (tot_dsds) | 804 | if (tot_dsds) |
803 | scsi_dma_unmap(cmd); | 805 | scsi_dma_unmap(cmd); |
804 | 806 | ||
805 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 807 | spin_unlock_irqrestore(&pha->hardware_lock, flags); |
806 | 808 | ||
807 | return QLA_FUNCTION_FAILED; | 809 | return QLA_FUNCTION_FAILED; |
808 | } | 810 | } |