diff options
author | James Smart <James.Smart@Emulex.Com> | 2006-03-08 14:50:18 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-27 11:51:12 -0400 |
commit | 79ac6745e4d95cd583bca744d313a323deb4adc2 (patch) | |
tree | 3910f0a6b7d8f83ffb5986389e0805477c56a1e0 /drivers/scsi | |
parent | d7a1bb0a04ca835bffc0a91e64ab827dfba7d8f5 (diff) |
[SCSI] Block I/O while SG reset operation in progress - lpfc portion
This removes the duplicate functionality which had been added to
the lpfc driver.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 1 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 1 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 20 |
3 files changed, 0 insertions, 22 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 087c44539a16..f81691fcf177 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -174,7 +174,6 @@ struct lpfc_hba { | |||
174 | dma_addr_t slim2p_mapping; | 174 | dma_addr_t slim2p_mapping; |
175 | uint16_t pci_cfg_value; | 175 | uint16_t pci_cfg_value; |
176 | 176 | ||
177 | struct semaphore hba_can_block; | ||
178 | int32_t hba_state; | 177 | int32_t hba_state; |
179 | 178 | ||
180 | #define LPFC_STATE_UNKNOWN 0 /* HBA state is unknown */ | 179 | #define LPFC_STATE_UNKNOWN 0 /* HBA state is unknown */ |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index c8db857ffb33..f68ad7654986 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -1451,7 +1451,6 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) | |||
1451 | goto out_put_host; | 1451 | goto out_put_host; |
1452 | 1452 | ||
1453 | host->unique_id = phba->brd_no; | 1453 | host->unique_id = phba->brd_no; |
1454 | init_MUTEX(&phba->hba_can_block); | ||
1455 | INIT_LIST_HEAD(&phba->ctrspbuflist); | 1454 | INIT_LIST_HEAD(&phba->ctrspbuflist); |
1456 | INIT_LIST_HEAD(&phba->rnidrspbuflist); | 1455 | INIT_LIST_HEAD(&phba->rnidrspbuflist); |
1457 | INIT_LIST_HEAD(&phba->freebufList); | 1456 | INIT_LIST_HEAD(&phba->freebufList); |
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 7dc4c2e6bed2..aea1ee472f3d 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -41,20 +41,6 @@ | |||
41 | #define LPFC_ABORT_WAIT 2 | 41 | #define LPFC_ABORT_WAIT 2 |
42 | 42 | ||
43 | 43 | ||
44 | static inline void | ||
45 | lpfc_block_requests(struct lpfc_hba * phba) | ||
46 | { | ||
47 | down(&phba->hba_can_block); | ||
48 | scsi_block_requests(phba->host); | ||
49 | } | ||
50 | |||
51 | static inline void | ||
52 | lpfc_unblock_requests(struct lpfc_hba * phba) | ||
53 | { | ||
54 | scsi_unblock_requests(phba->host); | ||
55 | up(&phba->hba_can_block); | ||
56 | } | ||
57 | |||
58 | /* | 44 | /* |
59 | * This routine allocates a scsi buffer, which contains all the necessary | 45 | * This routine allocates a scsi buffer, which contains all the necessary |
60 | * information needed to initiate a SCSI I/O. The non-DMAable buffer region | 46 | * information needed to initiate a SCSI I/O. The non-DMAable buffer region |
@@ -859,7 +845,6 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) | |||
859 | unsigned int loop_count = 0; | 845 | unsigned int loop_count = 0; |
860 | int ret = SUCCESS; | 846 | int ret = SUCCESS; |
861 | 847 | ||
862 | lpfc_block_requests(phba); | ||
863 | spin_lock_irq(shost->host_lock); | 848 | spin_lock_irq(shost->host_lock); |
864 | 849 | ||
865 | lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble; | 850 | lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble; |
@@ -945,7 +930,6 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) | |||
945 | cmnd->device->lun, cmnd->serial_number); | 930 | cmnd->device->lun, cmnd->serial_number); |
946 | 931 | ||
947 | spin_unlock_irq(shost->host_lock); | 932 | spin_unlock_irq(shost->host_lock); |
948 | lpfc_unblock_requests(phba); | ||
949 | 933 | ||
950 | return ret; | 934 | return ret; |
951 | } | 935 | } |
@@ -963,7 +947,6 @@ lpfc_reset_lun_handler(struct scsi_cmnd *cmnd) | |||
963 | int ret = FAILED; | 947 | int ret = FAILED; |
964 | int cnt, loopcnt; | 948 | int cnt, loopcnt; |
965 | 949 | ||
966 | lpfc_block_requests(phba); | ||
967 | spin_lock_irq(shost->host_lock); | 950 | spin_lock_irq(shost->host_lock); |
968 | /* | 951 | /* |
969 | * If target is not in a MAPPED state, delay the reset until | 952 | * If target is not in a MAPPED state, delay the reset until |
@@ -1065,7 +1048,6 @@ out_free_scsi_buf: | |||
1065 | 1048 | ||
1066 | out: | 1049 | out: |
1067 | spin_unlock_irq(shost->host_lock); | 1050 | spin_unlock_irq(shost->host_lock); |
1068 | lpfc_unblock_requests(phba); | ||
1069 | return ret; | 1051 | return ret; |
1070 | } | 1052 | } |
1071 | 1053 | ||
@@ -1080,7 +1062,6 @@ lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) | |||
1080 | int cnt, loopcnt; | 1062 | int cnt, loopcnt; |
1081 | struct lpfc_scsi_buf * lpfc_cmd; | 1063 | struct lpfc_scsi_buf * lpfc_cmd; |
1082 | 1064 | ||
1083 | lpfc_block_requests(phba); | ||
1084 | spin_lock_irq(shost->host_lock); | 1065 | spin_lock_irq(shost->host_lock); |
1085 | 1066 | ||
1086 | lpfc_cmd = lpfc_get_scsi_buf(phba); | 1067 | lpfc_cmd = lpfc_get_scsi_buf(phba); |
@@ -1163,7 +1144,6 @@ lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) | |||
1163 | phba->brd_no, ret); | 1144 | phba->brd_no, ret); |
1164 | out: | 1145 | out: |
1165 | spin_unlock_irq(shost->host_lock); | 1146 | spin_unlock_irq(shost->host_lock); |
1166 | lpfc_unblock_requests(phba); | ||
1167 | return ret; | 1147 | return ret; |
1168 | } | 1148 | } |
1169 | 1149 | ||