aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c36
1 files changed, 33 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 42fab03ad2b..f2aff3f4042 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -798,7 +798,7 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
798} 798}
799 799
800static int 800static int
801lpfc_abort_handler(struct scsi_cmnd *cmnd) 801__lpfc_abort_handler(struct scsi_cmnd *cmnd)
802{ 802{
803 struct lpfc_hba *phba = 803 struct lpfc_hba *phba =
804 (struct lpfc_hba *)cmnd->device->host->hostdata[0]; 804 (struct lpfc_hba *)cmnd->device->host->hostdata[0];
@@ -918,7 +918,17 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
918} 918}
919 919
920static int 920static int
921lpfc_reset_lun_handler(struct scsi_cmnd *cmnd) 921lpfc_abort_handler(struct scsi_cmnd *cmnd)
922{
923 int rc;
924 spin_lock_irq(cmnd->device->host->host_lock);
925 rc = __lpfc_abort_handler(cmnd);
926 spin_unlock_irq(cmnd->device->host->host_lock);
927 return rc;
928}
929
930static int
931__lpfc_reset_lun_handler(struct scsi_cmnd *cmnd)
922{ 932{
923 struct Scsi_Host *shost = cmnd->device->host; 933 struct Scsi_Host *shost = cmnd->device->host;
924 struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata[0]; 934 struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata[0];
@@ -1030,11 +1040,21 @@ out:
1030 return ret; 1040 return ret;
1031} 1041}
1032 1042
1043static int
1044lpfc_reset_lun_handler(struct scsi_cmnd *cmnd)
1045{
1046 int rc;
1047 spin_lock_irq(cmnd->device->host->host_lock);
1048 rc = __lpfc_reset_lun_handler(cmnd);
1049 spin_unlock_irq(cmnd->device->host->host_lock);
1050 return rc;
1051}
1052
1033/* 1053/*
1034 * Note: midlayer calls this function with the host_lock held 1054 * Note: midlayer calls this function with the host_lock held
1035 */ 1055 */
1036static int 1056static int
1037lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) 1057__lpfc_reset_bus_handler(struct scsi_cmnd *cmnd)
1038{ 1058{
1039 struct Scsi_Host *shost = cmnd->device->host; 1059 struct Scsi_Host *shost = cmnd->device->host;
1040 struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata[0]; 1060 struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata[0];
@@ -1124,6 +1144,16 @@ out:
1124} 1144}
1125 1145
1126static int 1146static int
1147lpfc_reset_bus_handler(struct scsi_cmnd *cmnd)
1148{
1149 int rc;
1150 spin_lock_irq(cmnd->device->host->host_lock);
1151 rc = __lpfc_reset_bus_handler(cmnd);
1152 spin_unlock_irq(cmnd->device->host->host_lock);
1153 return rc;
1154}
1155
1156static int
1127lpfc_slave_alloc(struct scsi_device *sdev) 1157lpfc_slave_alloc(struct scsi_device *sdev)
1128{ 1158{
1129 struct lpfc_hba *phba = (struct lpfc_hba *)sdev->host->hostdata[0]; 1159 struct lpfc_hba *phba = (struct lpfc_hba *)sdev->host->hostdata[0];