aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_scsi.c
diff options
context:
space:
mode:
authorSven Schuetz <sven@linux.vnet.ibm.com>2009-04-06 12:31:47 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-12 15:20:05 -0400
commit9d544f2b9bd4a0f7ba2784cc47e3591667a7b8d4 (patch)
tree5497f9b83aaa2e17da5d6ef0901de0c731e7b8a3 /drivers/s390/scsi/zfcp_scsi.c
parent9e4f5e29610162fd426366f3b29e3cc6e575b858 (diff)
[SCSI] zfcp: Add FC pass-through support
Provide the ability to do fibre channel requests from the userspace to our zfcp driver. Patch builds upon extension to the fibre channel tranport class by James Smart and Seokmann Ju. See here http://marc.info/?l=linux-scsi&m=123808882309133&w=2 Signed-off-by: Sven Schuetz <sven@linux.vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_scsi.c')
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 7d0da230eb63..967ede73f4c5 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -623,6 +623,20 @@ void zfcp_scsi_scan(struct work_struct *work)
623 zfcp_unit_put(unit); 623 zfcp_unit_put(unit);
624} 624}
625 625
626static int zfcp_execute_fc_job(struct fc_bsg_job *job)
627{
628 switch (job->request->msgcode) {
629 case FC_BSG_RPT_ELS:
630 case FC_BSG_HST_ELS_NOLOGIN:
631 return zfcp_fc_execute_els_fc_job(job);
632 case FC_BSG_RPT_CT:
633 case FC_BSG_HST_CT:
634 return zfcp_fc_execute_ct_fc_job(job);
635 default:
636 return -EINVAL;
637 }
638}
639
626struct fc_function_template zfcp_transport_functions = { 640struct fc_function_template zfcp_transport_functions = {
627 .show_starget_port_id = 1, 641 .show_starget_port_id = 1,
628 .show_starget_port_name = 1, 642 .show_starget_port_name = 1,
@@ -644,6 +658,7 @@ struct fc_function_template zfcp_transport_functions = {
644 .dev_loss_tmo_callbk = zfcp_scsi_dev_loss_tmo_callbk, 658 .dev_loss_tmo_callbk = zfcp_scsi_dev_loss_tmo_callbk,
645 .terminate_rport_io = zfcp_scsi_terminate_rport_io, 659 .terminate_rport_io = zfcp_scsi_terminate_rport_io,
646 .show_host_port_state = 1, 660 .show_host_port_state = 1,
661 .bsg_request = zfcp_execute_fc_job,
647 /* no functions registered for following dynamic attributes but 662 /* no functions registered for following dynamic attributes but
648 directly set by LLDD */ 663 directly set by LLDD */
649 .show_host_port_type = 1, 664 .show_host_port_type = 1,