diff options
author | James.Smart@Emulex.Com <James.Smart@Emulex.Com> | 2005-11-28 11:41:53 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-13 20:20:22 -0500 |
commit | 63c59c3b8ff444b771a245f59935c0202ece963b (patch) | |
tree | eccb686ade63b3c8997f6dd797caca81a2740608 /drivers | |
parent | 23dc04f1ec0d2f8fdda82ad1f9aa87b6ed74cd4a (diff) |
[SCSI] lpfc 8.1.1 : Remove locking wrappers around error handlers
Remove locking wrappers around error handlers. Wrappers were added in
early 2.6.13 api change
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 52 |
1 files changed, 14 insertions, 38 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 0aa5ca68433f..a4d8455de446 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -760,11 +760,12 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | |||
760 | return 0; | 760 | return 0; |
761 | } | 761 | } |
762 | 762 | ||
763 | |||
763 | static int | 764 | static int |
764 | __lpfc_abort_handler(struct scsi_cmnd *cmnd) | 765 | lpfc_abort_handler(struct scsi_cmnd *cmnd) |
765 | { | 766 | { |
766 | struct lpfc_hba *phba = | 767 | struct Scsi_Host *shost = cmnd->device->host; |
767 | (struct lpfc_hba *)cmnd->device->host->hostdata[0]; | 768 | struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata[0]; |
768 | struct lpfc_sli_ring *pring = &phba->sli.ring[phba->sli.fcp_ring]; | 769 | struct lpfc_sli_ring *pring = &phba->sli.ring[phba->sli.fcp_ring]; |
769 | struct lpfc_iocbq *iocb; | 770 | struct lpfc_iocbq *iocb; |
770 | struct lpfc_iocbq *abtsiocb; | 771 | struct lpfc_iocbq *abtsiocb; |
@@ -773,6 +774,7 @@ __lpfc_abort_handler(struct scsi_cmnd *cmnd) | |||
773 | unsigned int loop_count = 0; | 774 | unsigned int loop_count = 0; |
774 | int ret = SUCCESS; | 775 | int ret = SUCCESS; |
775 | 776 | ||
777 | spin_lock_irq(shost->host_lock); | ||
776 | 778 | ||
777 | lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble; | 779 | lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble; |
778 | BUG_ON(!lpfc_cmd); | 780 | BUG_ON(!lpfc_cmd); |
@@ -850,21 +852,13 @@ __lpfc_abort_handler(struct scsi_cmnd *cmnd) | |||
850 | phba->brd_no, ret, cmnd->device->id, | 852 | phba->brd_no, ret, cmnd->device->id, |
851 | cmnd->device->lun, cmnd->serial_number); | 853 | cmnd->device->lun, cmnd->serial_number); |
852 | 854 | ||
853 | return ret; | 855 | spin_unlock_irq(shost->host_lock); |
854 | } | ||
855 | 856 | ||
856 | static int | 857 | return ret; |
857 | lpfc_abort_handler(struct scsi_cmnd *cmnd) | ||
858 | { | ||
859 | int rc; | ||
860 | spin_lock_irq(cmnd->device->host->host_lock); | ||
861 | rc = __lpfc_abort_handler(cmnd); | ||
862 | spin_unlock_irq(cmnd->device->host->host_lock); | ||
863 | return rc; | ||
864 | } | 858 | } |
865 | 859 | ||
866 | static int | 860 | static int |
867 | __lpfc_reset_lun_handler(struct scsi_cmnd *cmnd) | 861 | lpfc_reset_lun_handler(struct scsi_cmnd *cmnd) |
868 | { | 862 | { |
869 | struct Scsi_Host *shost = cmnd->device->host; | 863 | struct Scsi_Host *shost = cmnd->device->host; |
870 | struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata[0]; | 864 | struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata[0]; |
@@ -875,6 +869,7 @@ __lpfc_reset_lun_handler(struct scsi_cmnd *cmnd) | |||
875 | int ret = FAILED; | 869 | int ret = FAILED; |
876 | int cnt, loopcnt; | 870 | int cnt, loopcnt; |
877 | 871 | ||
872 | spin_lock_irq(shost->host_lock); | ||
878 | /* | 873 | /* |
879 | * If target is not in a MAPPED state, delay the reset until | 874 | * If target is not in a MAPPED state, delay the reset until |
880 | * target is rediscovered or nodev timeout expires. | 875 | * target is rediscovered or nodev timeout expires. |
@@ -964,24 +959,12 @@ out_free_scsi_buf: | |||
964 | lpfc_cmd->result); | 959 | lpfc_cmd->result); |
965 | lpfc_release_scsi_buf(phba, lpfc_cmd); | 960 | lpfc_release_scsi_buf(phba, lpfc_cmd); |
966 | out: | 961 | out: |
962 | spin_unlock_irq(shost->host_lock); | ||
967 | return ret; | 963 | return ret; |
968 | } | 964 | } |
969 | 965 | ||
970 | static int | 966 | static int |
971 | lpfc_reset_lun_handler(struct scsi_cmnd *cmnd) | 967 | lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) |
972 | { | ||
973 | int rc; | ||
974 | spin_lock_irq(cmnd->device->host->host_lock); | ||
975 | rc = __lpfc_reset_lun_handler(cmnd); | ||
976 | spin_unlock_irq(cmnd->device->host->host_lock); | ||
977 | return rc; | ||
978 | } | ||
979 | |||
980 | /* | ||
981 | * Note: midlayer calls this function with the host_lock held | ||
982 | */ | ||
983 | static int | ||
984 | __lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) | ||
985 | { | 968 | { |
986 | struct Scsi_Host *shost = cmnd->device->host; | 969 | struct Scsi_Host *shost = cmnd->device->host; |
987 | struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata[0]; | 970 | struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata[0]; |
@@ -992,6 +975,8 @@ __lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) | |||
992 | unsigned int midlayer_id = 0; | 975 | unsigned int midlayer_id = 0; |
993 | struct lpfc_scsi_buf * lpfc_cmd; | 976 | struct lpfc_scsi_buf * lpfc_cmd; |
994 | 977 | ||
978 | spin_lock_irq(shost->host_lock); | ||
979 | |||
995 | lpfc_cmd = lpfc_sli_get_scsi_buf (phba); | 980 | lpfc_cmd = lpfc_sli_get_scsi_buf (phba); |
996 | if (lpfc_cmd == NULL) | 981 | if (lpfc_cmd == NULL) |
997 | goto out; | 982 | goto out; |
@@ -1067,20 +1052,11 @@ __lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) | |||
1067 | "%d:0714 SCSI layer issued Bus Reset Data: x%x\n", | 1052 | "%d:0714 SCSI layer issued Bus Reset Data: x%x\n", |
1068 | phba->brd_no, ret); | 1053 | phba->brd_no, ret); |
1069 | out: | 1054 | out: |
1055 | spin_unlock_irq(shost->host_lock); | ||
1070 | return ret; | 1056 | return ret; |
1071 | } | 1057 | } |
1072 | 1058 | ||
1073 | static int | 1059 | static int |
1074 | lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) | ||
1075 | { | ||
1076 | int rc; | ||
1077 | spin_lock_irq(cmnd->device->host->host_lock); | ||
1078 | rc = __lpfc_reset_bus_handler(cmnd); | ||
1079 | spin_unlock_irq(cmnd->device->host->host_lock); | ||
1080 | return rc; | ||
1081 | } | ||
1082 | |||
1083 | static int | ||
1084 | lpfc_slave_alloc(struct scsi_device *sdev) | 1060 | lpfc_slave_alloc(struct scsi_device *sdev) |
1085 | { | 1061 | { |
1086 | struct lpfc_hba *phba = (struct lpfc_hba *)sdev->host->hostdata[0]; | 1062 | struct lpfc_hba *phba = (struct lpfc_hba *)sdev->host->hostdata[0]; |