diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_scsi.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index cb000c9833bb..03837797c45e 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -144,7 +144,7 @@ static struct zfcp_unit *zfcp_unit_lookup(struct zfcp_adapter *adapter, | |||
144 | list_for_each_entry(port, &adapter->port_list, list) { | 144 | list_for_each_entry(port, &adapter->port_list, list) { |
145 | if (!port->rport || (id != port->rport->scsi_target_id)) | 145 | if (!port->rport || (id != port->rport->scsi_target_id)) |
146 | continue; | 146 | continue; |
147 | unit = zfcp_get_unit_by_lun(port, lun); | 147 | unit = zfcp_unit_find(port, lun); |
148 | if (unit) | 148 | if (unit) |
149 | break; | 149 | break; |
150 | } | 150 | } |
@@ -534,20 +534,6 @@ static void zfcp_scsi_terminate_rport_io(struct fc_rport *rport) | |||
534 | } | 534 | } |
535 | } | 535 | } |
536 | 536 | ||
537 | static void zfcp_scsi_queue_unit_register(struct zfcp_port *port) | ||
538 | { | ||
539 | struct zfcp_unit *unit; | ||
540 | |||
541 | read_lock_irq(&port->unit_list_lock); | ||
542 | list_for_each_entry(unit, &port->unit_list, list) { | ||
543 | get_device(&unit->dev); | ||
544 | if (scsi_queue_work(port->adapter->scsi_host, | ||
545 | &unit->scsi_work) <= 0) | ||
546 | put_device(&unit->dev); | ||
547 | } | ||
548 | read_unlock_irq(&port->unit_list_lock); | ||
549 | } | ||
550 | |||
551 | static void zfcp_scsi_rport_register(struct zfcp_port *port) | 537 | static void zfcp_scsi_rport_register(struct zfcp_port *port) |
552 | { | 538 | { |
553 | struct fc_rport_identifiers ids; | 539 | struct fc_rport_identifiers ids; |
@@ -574,7 +560,7 @@ static void zfcp_scsi_rport_register(struct zfcp_port *port) | |||
574 | port->rport = rport; | 560 | port->rport = rport; |
575 | port->starget_id = rport->scsi_target_id; | 561 | port->starget_id = rport->scsi_target_id; |
576 | 562 | ||
577 | zfcp_scsi_queue_unit_register(port); | 563 | zfcp_unit_queue_scsi_scan(port); |
578 | } | 564 | } |
579 | 565 | ||
580 | static void zfcp_scsi_rport_block(struct zfcp_port *port) | 566 | static void zfcp_scsi_rport_block(struct zfcp_port *port) |
@@ -638,29 +624,6 @@ void zfcp_scsi_rport_work(struct work_struct *work) | |||
638 | } | 624 | } |
639 | 625 | ||
640 | /** | 626 | /** |
641 | * zfcp_scsi_scan - Register LUN with SCSI midlayer | ||
642 | * @unit: The LUN/unit to register | ||
643 | */ | ||
644 | void zfcp_scsi_scan(struct zfcp_unit *unit) | ||
645 | { | ||
646 | struct fc_rport *rport = unit->port->rport; | ||
647 | |||
648 | if (rport && rport->port_state == FC_PORTSTATE_ONLINE) | ||
649 | scsi_scan_target(&rport->dev, 0, rport->scsi_target_id, | ||
650 | scsilun_to_int((struct scsi_lun *) | ||
651 | &unit->fcp_lun), 0); | ||
652 | } | ||
653 | |||
654 | void zfcp_scsi_scan_work(struct work_struct *work) | ||
655 | { | ||
656 | struct zfcp_unit *unit = container_of(work, struct zfcp_unit, | ||
657 | scsi_work); | ||
658 | |||
659 | zfcp_scsi_scan(unit); | ||
660 | put_device(&unit->dev); | ||
661 | } | ||
662 | |||
663 | /** | ||
664 | * zfcp_scsi_set_prot - Configure DIF/DIX support in scsi_host | 627 | * zfcp_scsi_set_prot - Configure DIF/DIX support in scsi_host |
665 | * @adapter: The adapter where to configure DIF/DIX for the SCSI host | 628 | * @adapter: The adapter where to configure DIF/DIX for the SCSI host |
666 | */ | 629 | */ |