diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_aux.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 821cde65e369..a1db95925138 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -815,9 +815,7 @@ zfcp_get_adapter_by_busid(char *bus_id) | |||
815 | struct zfcp_unit * | 815 | struct zfcp_unit * |
816 | zfcp_unit_enqueue(struct zfcp_port *port, fcp_lun_t fcp_lun) | 816 | zfcp_unit_enqueue(struct zfcp_port *port, fcp_lun_t fcp_lun) |
817 | { | 817 | { |
818 | struct zfcp_unit *unit, *tmp_unit; | 818 | struct zfcp_unit *unit; |
819 | unsigned int scsi_lun; | ||
820 | int found; | ||
821 | 819 | ||
822 | /* | 820 | /* |
823 | * check that there is no unit with this FCP_LUN already in list | 821 | * check that there is no unit with this FCP_LUN already in list |
@@ -863,22 +861,10 @@ zfcp_unit_enqueue(struct zfcp_port *port, fcp_lun_t fcp_lun) | |||
863 | } | 861 | } |
864 | 862 | ||
865 | zfcp_unit_get(unit); | 863 | zfcp_unit_get(unit); |
864 | unit->scsi_lun = scsilun_to_int((struct scsi_lun *)&unit->fcp_lun); | ||
866 | 865 | ||
867 | scsi_lun = 0; | ||
868 | found = 0; | ||
869 | write_lock_irq(&zfcp_data.config_lock); | 866 | write_lock_irq(&zfcp_data.config_lock); |
870 | list_for_each_entry(tmp_unit, &port->unit_list_head, list) { | 867 | list_add_tail(&unit->list, &port->unit_list_head); |
871 | if (tmp_unit->scsi_lun != scsi_lun) { | ||
872 | found = 1; | ||
873 | break; | ||
874 | } | ||
875 | scsi_lun++; | ||
876 | } | ||
877 | unit->scsi_lun = scsi_lun; | ||
878 | if (found) | ||
879 | list_add_tail(&unit->list, &tmp_unit->list); | ||
880 | else | ||
881 | list_add_tail(&unit->list, &port->unit_list_head); | ||
882 | atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &unit->status); | 868 | atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &unit->status); |
883 | atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING, &unit->status); | 869 | atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING, &unit->status); |
884 | write_unlock_irq(&zfcp_data.config_lock); | 870 | write_unlock_irq(&zfcp_data.config_lock); |