aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_def.h
diff options
context:
space:
mode:
authorAndreas Herrmann <aherrman@de.ibm.com>2005-09-13 15:47:52 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-09-19 14:01:23 -0400
commit059c97d0434834d291eff94669ca2dd3eaac9d28 (patch)
tree70719559f65366c74eb82ee8c7c7a01a0d80aca9 /drivers/s390/scsi/zfcp_def.h
parent3734d24b2e8d85796de70c13705cfb7cbb1d77df (diff)
[SCSI] zfcp: remove union zfcp_req_data, use unit refcount for FCP commands
o union zfcp_req_data removed o increment unit refcount when processing FCP commands (This fixes a theoretical race: When all scsi commands of a unit are aborted and the scsi_device is removed then the unit could be removed before all fsf_requests of that unit are completely processed.) Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_def.h')
-rw-r--r--drivers/s390/scsi/zfcp_def.h69
1 files changed, 2 insertions, 67 deletions
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 455e902533a9..9160e68c4a21 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -635,45 +635,6 @@ struct zfcp_adapter_mempool {
635 mempool_t *data_gid_pn; 635 mempool_t *data_gid_pn;
636}; 636};
637 637
638struct zfcp_exchange_config_data{
639};
640
641struct zfcp_open_port {
642 struct zfcp_port *port;
643};
644
645struct zfcp_close_port {
646 struct zfcp_port *port;
647};
648
649struct zfcp_open_unit {
650 struct zfcp_unit *unit;
651};
652
653struct zfcp_close_unit {
654 struct zfcp_unit *unit;
655};
656
657struct zfcp_close_physical_port {
658 struct zfcp_port *port;
659};
660
661struct zfcp_send_fcp_command_task {
662 struct zfcp_fsf_req *fsf_req;
663 struct zfcp_unit *unit;
664 struct scsi_cmnd *scsi_cmnd;
665 unsigned long start_jiffies;
666};
667
668struct zfcp_send_fcp_command_task_management {
669 struct zfcp_unit *unit;
670};
671
672struct zfcp_abort_fcp_command {
673 struct zfcp_fsf_req *fsf_req;
674 struct zfcp_unit *unit;
675};
676
677/* 638/*
678 * header for CT_IU 639 * header for CT_IU
679 */ 640 */
@@ -781,33 +742,6 @@ struct zfcp_send_els {
781 int status; 742 int status;
782}; 743};
783 744
784struct zfcp_status_read {
785 struct fsf_status_read_buffer *buffer;
786};
787
788struct zfcp_fsf_done {
789 struct completion *complete;
790 int status;
791};
792
793/* request specific data */
794union zfcp_req_data {
795 struct zfcp_exchange_config_data exchange_config_data;
796 struct zfcp_open_port open_port;
797 struct zfcp_close_port close_port;
798 struct zfcp_open_unit open_unit;
799 struct zfcp_close_unit close_unit;
800 struct zfcp_close_physical_port close_physical_port;
801 struct zfcp_send_fcp_command_task send_fcp_command_task;
802 struct zfcp_send_fcp_command_task_management
803 send_fcp_command_task_management;
804 struct zfcp_abort_fcp_command abort_fcp_command;
805 struct zfcp_send_ct *send_ct;
806 struct zfcp_send_els *send_els;
807 struct zfcp_status_read status_read;
808 struct fsf_qtcb_bottom_port *port_data;
809};
810
811struct zfcp_qdio_queue { 745struct zfcp_qdio_queue {
812 struct qdio_buffer *buffer[QDIO_MAX_BUFFERS_PER_Q]; /* SBALs */ 746 struct qdio_buffer *buffer[QDIO_MAX_BUFFERS_PER_Q]; /* SBALs */
813 u8 free_index; /* index of next free bfr 747 u8 free_index; /* index of next free bfr
@@ -963,11 +897,12 @@ struct zfcp_fsf_req {
963 u32 fsf_command; /* FSF Command copy */ 897 u32 fsf_command; /* FSF Command copy */
964 struct fsf_qtcb *qtcb; /* address of associated QTCB */ 898 struct fsf_qtcb *qtcb; /* address of associated QTCB */
965 u32 seq_no; /* Sequence number of request */ 899 u32 seq_no; /* Sequence number of request */
966 union zfcp_req_data data; /* Info fields of request */ 900 unsigned long data; /* private data of request */
967 struct zfcp_erp_action *erp_action; /* used if this request is 901 struct zfcp_erp_action *erp_action; /* used if this request is
968 issued on behalf of erp */ 902 issued on behalf of erp */
969 mempool_t *pool; /* used if request was alloacted 903 mempool_t *pool; /* used if request was alloacted
970 from emergency pool */ 904 from emergency pool */
905 struct zfcp_unit *unit;
971}; 906};
972 907
973typedef void zfcp_fsf_req_handler_t(struct zfcp_fsf_req*); 908typedef void zfcp_fsf_req_handler_t(struct zfcp_fsf_req*);