aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_def.h
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2008-10-01 06:42:16 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-03 13:11:52 -0400
commit44cc76f2d154aa24340354b4711a0fe7f8f08adc (patch)
tree0b32bb89450b12262b4bf78fc4cd297e8db0b77b /drivers/s390/scsi/zfcp_def.h
parentff3b24fa5370a7ca618f212284d9b36fcedb9c0e (diff)
[SCSI] zfcp: remove unused references, declarations and flags
- Remove unused references and declarations, including one instance of the FC ls_adisc struct that has been defined twice. - Also remove the flags COMMON_OPENING, COMMON_CLOSING, ADAPTER_REGISTERED and XPORT_OK that are only set and cleared, but not checked anywhere. - Remove the zfcp specific atomic_test_mask makro. Simply use atomic_read directly instead. - Remove the zfcp internal sg helper functions and switch the places where it is still used to call sg_virt directly. - With the update of the QDIO code, the QDIO data structures no longer use the volatile type qualifier. Now we can also remove the volatile qualifiers from the zfcp code. Signed-off-by: Swen Schillig <swen@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_def.h')
-rw-r--r--drivers/s390/scsi/zfcp_def.h81
1 files changed, 2 insertions, 79 deletions
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 74d7529621bb..699ecaf2e503 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -39,29 +39,6 @@
39 39
40/********************* GENERAL DEFINES *********************************/ 40/********************* GENERAL DEFINES *********************************/
41 41
42/**
43 * zfcp_sg_to_address - determine kernel address from struct scatterlist
44 * @list: struct scatterlist
45 * Return: kernel address
46 */
47static inline void *
48zfcp_sg_to_address(struct scatterlist *list)
49{
50 return sg_virt(list);
51}
52
53/**
54 * zfcp_address_to_sg - set up struct scatterlist from kernel address
55 * @address: kernel address
56 * @list: struct scatterlist
57 * @size: buffer size
58 */
59static inline void
60zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size)
61{
62 sg_set_buf(list, address, size);
63}
64
65#define REQUEST_LIST_SIZE 128 42#define REQUEST_LIST_SIZE 128
66 43
67/********************* SCSI SPECIFIC DEFINES *********************************/ 44/********************* SCSI SPECIFIC DEFINES *********************************/
@@ -218,13 +195,6 @@ struct fcp_logo {
218#define ZFCP_LS_RSCN 0x61 195#define ZFCP_LS_RSCN 0x61
219#define ZFCP_LS_RNID 0x78 196#define ZFCP_LS_RNID 0x78
220 197
221struct zfcp_ls_rjt_par {
222 u8 action;
223 u8 reason_code;
224 u8 reason_expl;
225 u8 vendor_unique;
226} __attribute__ ((packed));
227
228struct zfcp_ls_adisc { 198struct zfcp_ls_adisc {
229 u8 code; 199 u8 code;
230 u8 field[3]; 200 u8 field[3];
@@ -234,20 +204,6 @@ struct zfcp_ls_adisc {
234 u32 nport_id; 204 u32 nport_id;
235} __attribute__ ((packed)); 205} __attribute__ ((packed));
236 206
237struct zfcp_ls_adisc_acc {
238 u8 code;
239 u8 field[3];
240 u32 hard_nport_id;
241 u64 wwpn;
242 u64 wwnn;
243 u32 nport_id;
244} __attribute__ ((packed));
245
246struct zfcp_rc_entry {
247 u8 code;
248 const char *description;
249};
250
251/* 207/*
252 * FC-GS-2 stuff 208 * FC-GS-2 stuff
253 */ 209 */
@@ -281,9 +237,7 @@ struct zfcp_rc_entry {
281#define ZFCP_STATUS_COMMON_RUNNING 0x40000000 237#define ZFCP_STATUS_COMMON_RUNNING 0x40000000
282#define ZFCP_STATUS_COMMON_ERP_FAILED 0x20000000 238#define ZFCP_STATUS_COMMON_ERP_FAILED 0x20000000
283#define ZFCP_STATUS_COMMON_UNBLOCKED 0x10000000 239#define ZFCP_STATUS_COMMON_UNBLOCKED 0x10000000
284#define ZFCP_STATUS_COMMON_OPENING 0x08000000
285#define ZFCP_STATUS_COMMON_OPEN 0x04000000 240#define ZFCP_STATUS_COMMON_OPEN 0x04000000
286#define ZFCP_STATUS_COMMON_CLOSING 0x02000000
287#define ZFCP_STATUS_COMMON_ERP_INUSE 0x01000000 241#define ZFCP_STATUS_COMMON_ERP_INUSE 0x01000000
288#define ZFCP_STATUS_COMMON_ACCESS_DENIED 0x00800000 242#define ZFCP_STATUS_COMMON_ACCESS_DENIED 0x00800000
289#define ZFCP_STATUS_COMMON_ACCESS_BOXED 0x00400000 243#define ZFCP_STATUS_COMMON_ACCESS_BOXED 0x00400000
@@ -291,14 +245,12 @@ struct zfcp_rc_entry {
291 245
292/* adapter status */ 246/* adapter status */
293#define ZFCP_STATUS_ADAPTER_QDIOUP 0x00000002 247#define ZFCP_STATUS_ADAPTER_QDIOUP 0x00000002
294#define ZFCP_STATUS_ADAPTER_REGISTERED 0x00000004
295#define ZFCP_STATUS_ADAPTER_XCONFIG_OK 0x00000008 248#define ZFCP_STATUS_ADAPTER_XCONFIG_OK 0x00000008
296#define ZFCP_STATUS_ADAPTER_HOST_CON_INIT 0x00000010 249#define ZFCP_STATUS_ADAPTER_HOST_CON_INIT 0x00000010
297#define ZFCP_STATUS_ADAPTER_ERP_THREAD_UP 0x00000020 250#define ZFCP_STATUS_ADAPTER_ERP_THREAD_UP 0x00000020
298#define ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL 0x00000080 251#define ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL 0x00000080
299#define ZFCP_STATUS_ADAPTER_ERP_PENDING 0x00000100 252#define ZFCP_STATUS_ADAPTER_ERP_PENDING 0x00000100
300#define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200 253#define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200
301#define ZFCP_STATUS_ADAPTER_XPORT_OK 0x00000800
302 254
303/* FC-PH/FC-GS well-known address identifiers for generic services */ 255/* FC-PH/FC-GS well-known address identifiers for generic services */
304#define ZFCP_DID_MANAGEMENT_SERVICE 0xFFFFFA 256#define ZFCP_DID_MANAGEMENT_SERVICE 0xFFFFFA
@@ -321,20 +273,16 @@ struct zfcp_rc_entry {
321 ZFCP_STATUS_PORT_NO_SCSI_ID) 273 ZFCP_STATUS_PORT_NO_SCSI_ID)
322 274
323/* logical unit status */ 275/* logical unit status */
324#define ZFCP_STATUS_UNIT_TEMPORARY 0x00000002
325#define ZFCP_STATUS_UNIT_SHARED 0x00000004 276#define ZFCP_STATUS_UNIT_SHARED 0x00000004
326#define ZFCP_STATUS_UNIT_READONLY 0x00000008 277#define ZFCP_STATUS_UNIT_READONLY 0x00000008
327#define ZFCP_STATUS_UNIT_REGISTERED 0x00000010 278#define ZFCP_STATUS_UNIT_REGISTERED 0x00000010
328#define ZFCP_STATUS_UNIT_SCSI_WORK_PENDING 0x00000020 279#define ZFCP_STATUS_UNIT_SCSI_WORK_PENDING 0x00000020
329 280
330/* FSF request status (this does not have a common part) */ 281/* FSF request status (this does not have a common part) */
331#define ZFCP_STATUS_FSFREQ_NOT_INIT 0x00000000
332#define ZFCP_STATUS_FSFREQ_POOL 0x00000001
333#define ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT 0x00000002 282#define ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT 0x00000002
334#define ZFCP_STATUS_FSFREQ_COMPLETED 0x00000004 283#define ZFCP_STATUS_FSFREQ_COMPLETED 0x00000004
335#define ZFCP_STATUS_FSFREQ_ERROR 0x00000008 284#define ZFCP_STATUS_FSFREQ_ERROR 0x00000008
336#define ZFCP_STATUS_FSFREQ_CLEANUP 0x00000010 285#define ZFCP_STATUS_FSFREQ_CLEANUP 0x00000010
337#define ZFCP_STATUS_FSFREQ_ABORTING 0x00000020
338#define ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED 0x00000040 286#define ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED 0x00000040
339#define ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED 0x00000080 287#define ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED 0x00000080
340#define ZFCP_STATUS_FSFREQ_ABORTED 0x00000100 288#define ZFCP_STATUS_FSFREQ_ABORTED 0x00000100
@@ -475,7 +423,7 @@ struct zfcp_erp_action {
475 struct zfcp_adapter *adapter; /* device which should be recovered */ 423 struct zfcp_adapter *adapter; /* device which should be recovered */
476 struct zfcp_port *port; 424 struct zfcp_port *port;
477 struct zfcp_unit *unit; 425 struct zfcp_unit *unit;
478 volatile u32 status; /* recovery status */ 426 u32 status; /* recovery status */
479 u32 step; /* active step of this erp action */ 427 u32 step; /* active step of this erp action */
480 struct zfcp_fsf_req *fsf_req; /* fsf request currently pending 428 struct zfcp_fsf_req *fsf_req; /* fsf request currently pending
481 for this action */ 429 for this action */
@@ -626,7 +574,7 @@ struct zfcp_fsf_req {
626 u8 sbal_response; /* SBAL used in interrupt */ 574 u8 sbal_response; /* SBAL used in interrupt */
627 wait_queue_head_t completion_wq; /* can be used by a routine 575 wait_queue_head_t completion_wq; /* can be used by a routine
628 to wait for completion */ 576 to wait for completion */
629 volatile u32 status; /* status of this request */ 577 u32 status; /* status of this request */
630 u32 fsf_command; /* FSF Command copy */ 578 u32 fsf_command; /* FSF Command copy */
631 struct fsf_qtcb *qtcb; /* address of associated QTCB */ 579 struct fsf_qtcb *qtcb; /* address of associated QTCB */
632 u32 seq_no; /* Sequence number of request */ 580 u32 seq_no; /* Sequence number of request */
@@ -678,14 +626,7 @@ struct zfcp_fsf_req_qtcb {
678#define ZFCP_SET 0x00000100 626#define ZFCP_SET 0x00000100
679#define ZFCP_CLEAR 0x00000200 627#define ZFCP_CLEAR 0x00000200
680 628
681#ifndef atomic_test_mask
682#define atomic_test_mask(mask, target) \
683 ((atomic_read(target) & mask) == mask)
684#endif
685
686#define zfcp_get_busid_by_adapter(adapter) (adapter->ccw_device->dev.bus_id) 629#define zfcp_get_busid_by_adapter(adapter) (adapter->ccw_device->dev.bus_id)
687#define zfcp_get_busid_by_port(port) (zfcp_get_busid_by_adapter(port->adapter))
688#define zfcp_get_busid_by_unit(unit) (zfcp_get_busid_by_port(unit->port))
689 630
690/* 631/*
691 * Helper functions for request ID management. 632 * Helper functions for request ID management.
@@ -746,12 +687,6 @@ zfcp_unit_put(struct zfcp_unit *unit)
746} 687}
747 688
748static inline void 689static inline void
749zfcp_unit_wait(struct zfcp_unit *unit)
750{
751 wait_event(unit->remove_wq, atomic_read(&unit->refcount) == 0);
752}
753
754static inline void
755zfcp_port_get(struct zfcp_port *port) 690zfcp_port_get(struct zfcp_port *port)
756{ 691{
757 atomic_inc(&port->refcount); 692 atomic_inc(&port->refcount);
@@ -765,12 +700,6 @@ zfcp_port_put(struct zfcp_port *port)
765} 700}
766 701
767static inline void 702static inline void
768zfcp_port_wait(struct zfcp_port *port)
769{
770 wait_event(port->remove_wq, atomic_read(&port->refcount) == 0);
771}
772
773static inline void
774zfcp_adapter_get(struct zfcp_adapter *adapter) 703zfcp_adapter_get(struct zfcp_adapter *adapter)
775{ 704{
776 atomic_inc(&adapter->refcount); 705 atomic_inc(&adapter->refcount);
@@ -783,10 +712,4 @@ zfcp_adapter_put(struct zfcp_adapter *adapter)
783 wake_up(&adapter->remove_wq); 712 wake_up(&adapter->remove_wq);
784} 713}
785 714
786static inline void
787zfcp_adapter_wait(struct zfcp_adapter *adapter)
788{
789 wait_event(adapter->remove_wq, atomic_read(&adapter->refcount) == 0);
790}
791
792#endif /* ZFCP_DEF_H */ 715#endif /* ZFCP_DEF_H */