diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-10 13:53:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-10 13:53:26 -0400 |
commit | ef5bef357cdf49f3a386c7102dbf3be5f7e5c913 (patch) | |
tree | 48d9dc86768e3e146267ea21d0c898f9008275a1 /drivers/s390/scsi/zfcp_scsi.c | |
parent | e26feff647ef34423b048b940540a0059001ddb0 (diff) | |
parent | 41bfcf90101601f9507240ff0435c1b73d28a132 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (37 commits)
[SCSI] zfcp: fix double dbf id usage
[SCSI] zfcp: wait on SCSI work to be finished before proceeding with init dev
[SCSI] zfcp: fix erp list usage without using locks
[SCSI] zfcp: prevent fc_remote_port_delete calls for unregistered rport
[SCSI] zfcp: fix deadlock caused by shared work queue tasks
[SCSI] zfcp: put threshold data in hba trace
[SCSI] zfcp: Simplify zfcp data structures
[SCSI] zfcp: Simplify get_adapter_by_busid
[SCSI] zfcp: remove all typedefs and replace them with standards
[SCSI] zfcp: attach and release SAN nameserver port on demand
[SCSI] zfcp: remove unused references, declarations and flags
[SCSI] zfcp: Update message with input from review
[SCSI] zfcp: add queue_full sysfs attribute
[SCSI] scsi_dh: suppress comparison warning
[SCSI] scsi_dh: add Dell product information into rdac device handler
[SCSI] qla2xxx: remove the unused SCSI_QLOGIC_FC_FIRMWARE option
[SCSI] qla2xxx: fix printk format warnings
[SCSI] qla2xxx: Update version number to 8.02.01-k8.
[SCSI] qla2xxx: Ignore payload reserved-bits during RSCN processing.
[SCSI] qla2xxx: Additional residual-count corrections during UNDERRUN handling.
...
Diffstat (limited to 'drivers/s390/scsi/zfcp_scsi.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index aeae56b00b45..ca8f85f3dad4 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -21,20 +21,6 @@ char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu) | |||
21 | return fcp_sns_info_ptr; | 21 | return fcp_sns_info_ptr; |
22 | } | 22 | } |
23 | 23 | ||
24 | void zfcp_set_fcp_dl(struct fcp_cmnd_iu *fcp_cmd, fcp_dl_t fcp_dl) | ||
25 | { | ||
26 | fcp_dl_t *fcp_dl_ptr; | ||
27 | |||
28 | /* | ||
29 | * fcp_dl_addr = start address of fcp_cmnd structure + | ||
30 | * size of fixed part + size of dynamically sized add_dcp_cdb field | ||
31 | * SEE FCP-2 documentation | ||
32 | */ | ||
33 | fcp_dl_ptr = (fcp_dl_t *) ((unsigned char *) &fcp_cmd[1] + | ||
34 | (fcp_cmd->add_fcp_cdb_length << 2)); | ||
35 | *fcp_dl_ptr = fcp_dl; | ||
36 | } | ||
37 | |||
38 | static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) | 24 | static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) |
39 | { | 25 | { |
40 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; | 26 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; |
@@ -119,13 +105,17 @@ static struct zfcp_unit *zfcp_unit_lookup(struct zfcp_adapter *adapter, | |||
119 | { | 105 | { |
120 | struct zfcp_port *port; | 106 | struct zfcp_port *port; |
121 | struct zfcp_unit *unit; | 107 | struct zfcp_unit *unit; |
108 | int scsi_lun; | ||
122 | 109 | ||
123 | list_for_each_entry(port, &adapter->port_list_head, list) { | 110 | list_for_each_entry(port, &adapter->port_list_head, list) { |
124 | if (!port->rport || (id != port->rport->scsi_target_id)) | 111 | if (!port->rport || (id != port->rport->scsi_target_id)) |
125 | continue; | 112 | continue; |
126 | list_for_each_entry(unit, &port->unit_list_head, list) | 113 | list_for_each_entry(unit, &port->unit_list_head, list) { |
127 | if (lun == unit->scsi_lun) | 114 | scsi_lun = scsilun_to_int( |
115 | (struct scsi_lun *)&unit->fcp_lun); | ||
116 | if (lun == scsi_lun) | ||
128 | return unit; | 117 | return unit; |
118 | } | ||
129 | } | 119 | } |
130 | 120 | ||
131 | return NULL; | 121 | return NULL; |
@@ -183,7 +173,6 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) | |||
183 | return retval; | 173 | return retval; |
184 | } | 174 | } |
185 | fsf_req->data = NULL; | 175 | fsf_req->data = NULL; |
186 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ABORTING; | ||
187 | 176 | ||
188 | /* don't access old fsf_req after releasing the abort_lock */ | 177 | /* don't access old fsf_req after releasing the abort_lock */ |
189 | write_unlock_irqrestore(&adapter->abort_lock, flags); | 178 | write_unlock_irqrestore(&adapter->abort_lock, flags); |
@@ -294,7 +283,8 @@ int zfcp_adapter_scsi_register(struct zfcp_adapter *adapter) | |||
294 | sizeof (struct zfcp_adapter *)); | 283 | sizeof (struct zfcp_adapter *)); |
295 | if (!adapter->scsi_host) { | 284 | if (!adapter->scsi_host) { |
296 | dev_err(&adapter->ccw_device->dev, | 285 | dev_err(&adapter->ccw_device->dev, |
297 | "registration with SCSI stack failed."); | 286 | "Registering the FCP device with the " |
287 | "SCSI stack failed\n"); | ||
298 | return -EIO; | 288 | return -EIO; |
299 | } | 289 | } |
300 | 290 | ||
@@ -312,7 +302,6 @@ int zfcp_adapter_scsi_register(struct zfcp_adapter *adapter) | |||
312 | scsi_host_put(adapter->scsi_host); | 302 | scsi_host_put(adapter->scsi_host); |
313 | return -EIO; | 303 | return -EIO; |
314 | } | 304 | } |
315 | atomic_set_mask(ZFCP_STATUS_ADAPTER_REGISTERED, &adapter->status); | ||
316 | 305 | ||
317 | return 0; | 306 | return 0; |
318 | } | 307 | } |
@@ -336,7 +325,6 @@ void zfcp_adapter_scsi_unregister(struct zfcp_adapter *adapter) | |||
336 | scsi_remove_host(shost); | 325 | scsi_remove_host(shost); |
337 | scsi_host_put(shost); | 326 | scsi_host_put(shost); |
338 | adapter->scsi_host = NULL; | 327 | adapter->scsi_host = NULL; |
339 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_REGISTERED, &adapter->status); | ||
340 | 328 | ||
341 | return; | 329 | return; |
342 | } | 330 | } |