Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] zfcp: Move qdio setup from erp to zfcp_qdio.c

Initialization of the qdio waitqueue should happen when the qdio data
is initialized and the QDIOUP flag should be handled in the qdio code
as well. Adjust the code accordingly and remove the superfluos
function zfcp_erp_adapter_strategy_open_qdio.

Reviewed-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

authored by

Christof Schmitt and committed by
James Bottomley
3d63d3b4 ea4a3a6a

+3 -12
+1 -12
drivers/s390/scsi/zfcp_erp.c
··· 644 644 read_unlock_irqrestore(&adapter->erp_lock, flags); 645 645 } 646 646 647 - static int zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *act) 648 - { 649 - struct zfcp_qdio *qdio = act->adapter->qdio; 650 - 651 - if (zfcp_qdio_open(qdio)) 652 - return ZFCP_ERP_FAILED; 653 - init_waitqueue_head(&qdio->req_q_wq); 654 - atomic_set_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &act->adapter->status); 655 - return ZFCP_ERP_SUCCEEDED; 656 - } 657 - 658 647 static void zfcp_erp_enqueue_ptp_port(struct zfcp_adapter *adapter) 659 648 { 660 649 struct zfcp_port *port; ··· 767 778 { 768 779 struct zfcp_adapter *adapter = act->adapter; 769 780 770 - if (zfcp_erp_adapter_strategy_open_qdio(act)) { 781 + if (zfcp_qdio_open(adapter->qdio)) { 771 782 atomic_clear_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK | 772 783 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED, 773 784 &adapter->status);
+2
drivers/s390/scsi/zfcp_qdio.c
··· 307 307 return -ENOMEM; 308 308 309 309 zfcp_qdio_setup_init_data(&init_data, qdio); 310 + init_waitqueue_head(&qdio->req_q_wq); 310 311 311 312 return qdio_allocate(&init_data); 312 313 } ··· 392 391 /* set index of first avalable SBALS / number of available SBALS */ 393 392 qdio->req_q_idx = 0; 394 393 atomic_set(&qdio->req_q_free, QDIO_MAX_BUFFERS_PER_Q); 394 + atomic_set_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &qdio->adapter->status); 395 395 396 396 return 0; 397 397