diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_scsi.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index ad7eb4a9261c..abae2027f7e5 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -1,22 +1,22 @@ | |||
1 | /* | 1 | /* |
2 | * This file is part of the zfcp device driver for | 2 | * This file is part of the zfcp device driver for |
3 | * FCP adapters for IBM System z9 and zSeries. | 3 | * FCP adapters for IBM System z9 and zSeries. |
4 | * | 4 | * |
5 | * (C) Copyright IBM Corp. 2002, 2006 | 5 | * (C) Copyright IBM Corp. 2002, 2006 |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
9 | * the Free Software Foundation; either version 2, or (at your option) | 9 | * the Free Software Foundation; either version 2, or (at your option) |
10 | * any later version. | 10 | * any later version. |
11 | * | 11 | * |
12 | * This program is distributed in the hope that it will be useful, | 12 | * This program is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | 16 | * |
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License |
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define ZFCP_LOG_AREA ZFCP_LOG_AREA_SCSI | 22 | #define ZFCP_LOG_AREA ZFCP_LOG_AREA_SCSI |
@@ -101,7 +101,7 @@ zfcp_get_fcp_dl_ptr(struct fcp_cmnd_iu * fcp_cmd) | |||
101 | ((unsigned char *) fcp_cmd + | 101 | ((unsigned char *) fcp_cmd + |
102 | sizeof (struct fcp_cmnd_iu) + additional_length); | 102 | sizeof (struct fcp_cmnd_iu) + additional_length); |
103 | /* | 103 | /* |
104 | * fcp_dl_addr = start address of fcp_cmnd structure + | 104 | * fcp_dl_addr = start address of fcp_cmnd structure + |
105 | * size of fixed part + size of dynamically sized add_dcp_cdb field | 105 | * size of fixed part + size of dynamically sized add_dcp_cdb field |
106 | * SEE FCP-2 documentation | 106 | * SEE FCP-2 documentation |
107 | */ | 107 | */ |
@@ -189,13 +189,12 @@ static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) | |||
189 | unit->device = NULL; | 189 | unit->device = NULL; |
190 | zfcp_erp_unit_failed(unit); | 190 | zfcp_erp_unit_failed(unit); |
191 | zfcp_unit_put(unit); | 191 | zfcp_unit_put(unit); |
192 | } else { | 192 | } else |
193 | ZFCP_LOG_NORMAL("bug: no unit associated with SCSI device at " | 193 | ZFCP_LOG_NORMAL("bug: no unit associated with SCSI device at " |
194 | "address %p\n", sdpnt); | 194 | "address %p\n", sdpnt); |
195 | } | ||
196 | } | 195 | } |
197 | 196 | ||
198 | /* | 197 | /* |
199 | * called from scsi midlayer to allow finetuning of a device. | 198 | * called from scsi midlayer to allow finetuning of a device. |
200 | */ | 199 | */ |
201 | static int | 200 | static int |
@@ -361,12 +360,11 @@ zfcp_unit_lookup(struct zfcp_adapter *adapter, int channel, unsigned int id, | |||
361 | list_for_each_entry(port, &adapter->port_list_head, list) { | 360 | list_for_each_entry(port, &adapter->port_list_head, list) { |
362 | if (!port->rport || (id != port->rport->scsi_target_id)) | 361 | if (!port->rport || (id != port->rport->scsi_target_id)) |
363 | continue; | 362 | continue; |
364 | list_for_each_entry(unit, &port->unit_list_head, list) { | 363 | list_for_each_entry(unit, &port->unit_list_head, list) |
365 | if (lun == unit->scsi_lun) { | 364 | if (lun == unit->scsi_lun) { |
366 | retval = unit; | 365 | retval = unit; |
367 | goto out; | 366 | goto out; |
368 | } | 367 | } |
369 | } | ||
370 | } | 368 | } |
371 | out: | 369 | out: |
372 | return retval; | 370 | return retval; |
@@ -374,7 +372,7 @@ zfcp_unit_lookup(struct zfcp_adapter *adapter, int channel, unsigned int id, | |||
374 | 372 | ||
375 | /** | 373 | /** |
376 | * zfcp_scsi_eh_abort_handler - abort the specified SCSI command | 374 | * zfcp_scsi_eh_abort_handler - abort the specified SCSI command |
377 | * @scpnt: pointer to scsi_cmnd to be aborted | 375 | * @scpnt: pointer to scsi_cmnd to be aborted |
378 | * Return: SUCCESS - command has been aborted and cleaned up in internal | 376 | * Return: SUCCESS - command has been aborted and cleaned up in internal |
379 | * bookkeeping, SCSI stack won't be called for aborted command | 377 | * bookkeeping, SCSI stack won't be called for aborted command |
380 | * FAILED - otherwise | 378 | * FAILED - otherwise |
@@ -733,7 +731,7 @@ zfcp_get_fc_host_stats(struct Scsi_Host *shost) | |||
733 | if (!data) | 731 | if (!data) |
734 | return NULL; | 732 | return NULL; |
735 | 733 | ||
736 | ret = zfcp_fsf_exchange_port_data(NULL, adapter, data); | 734 | ret = zfcp_fsf_exchange_port_data_sync(adapter, data); |
737 | if (ret) { | 735 | if (ret) { |
738 | kfree(data); | 736 | kfree(data); |
739 | return NULL; /* XXX return zeroed fc_stats? */ | 737 | return NULL; /* XXX return zeroed fc_stats? */ |
@@ -763,7 +761,7 @@ zfcp_reset_fc_host_stats(struct Scsi_Host *shost) | |||
763 | if (!data) | 761 | if (!data) |
764 | return; | 762 | return; |
765 | 763 | ||
766 | ret = zfcp_fsf_exchange_port_data(NULL, adapter, data); | 764 | ret = zfcp_fsf_exchange_port_data_sync(adapter, data); |
767 | if (ret) { | 765 | if (ret) { |
768 | kfree(data); | 766 | kfree(data); |
769 | } else { | 767 | } else { |
@@ -802,6 +800,7 @@ struct fc_function_template zfcp_transport_functions = { | |||
802 | .show_host_port_type = 1, | 800 | .show_host_port_type = 1, |
803 | .show_host_speed = 1, | 801 | .show_host_speed = 1, |
804 | .show_host_port_id = 1, | 802 | .show_host_port_id = 1, |
803 | .disable_target_scan = 1, | ||
805 | }; | 804 | }; |
806 | 805 | ||
807 | /** | 806 | /** |