aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_fsf.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.h')
-rw-r--r--drivers/s390/scsi/zfcp_fsf.h70
1 files changed, 42 insertions, 28 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.h b/drivers/s390/scsi/zfcp_fsf.h
index 099970b27001..bf94b4da0763 100644
--- a/drivers/s390/scsi/zfcp_fsf.h
+++ b/drivers/s390/scsi/zfcp_fsf.h
@@ -1,27 +1,16 @@
1/* 1/*
2 * This file is part of the zfcp device driver for 2 * zfcp device driver
3 * FCP adapters for IBM System z9 and zSeries.
4 * 3 *
5 * (C) Copyright IBM Corp. 2002, 2006 4 * Interface to the FSF support functions.
6 * 5 *
7 * This program is free software; you can redistribute it and/or modify 6 * Copyright IBM Corporation 2002, 2008
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */ 7 */
21 8
22#ifndef FSF_H 9#ifndef FSF_H
23#define FSF_H 10#define FSF_H
24 11
12#include <linux/pfn.h>
13
25#define FSF_QTCB_CURRENT_VERSION 0x00000001 14#define FSF_QTCB_CURRENT_VERSION 0x00000001
26 15
27/* FSF commands */ 16/* FSF commands */
@@ -258,6 +247,16 @@
258#define FSF_UNIT_ACCESS_EXCLUSIVE 0x02000000 247#define FSF_UNIT_ACCESS_EXCLUSIVE 0x02000000
259#define FSF_UNIT_ACCESS_OUTBOUND_TRANSFER 0x10000000 248#define FSF_UNIT_ACCESS_OUTBOUND_TRANSFER 0x10000000
260 249
250/* FSF interface for CFDC */
251#define ZFCP_CFDC_MAX_SIZE 127 * 1024
252#define ZFCP_CFDC_PAGES PFN_UP(ZFCP_CFDC_MAX_SIZE)
253
254struct zfcp_fsf_cfdc {
255 struct scatterlist sg[ZFCP_CFDC_PAGES];
256 u32 command;
257 u32 option;
258};
259
261struct fsf_queue_designator { 260struct fsf_queue_designator {
262 u8 cssid; 261 u8 cssid;
263 u8 chpid; 262 u8 chpid;
@@ -288,6 +287,18 @@ struct fsf_bit_error_payload {
288 u32 current_transmit_b2b_credit; 287 u32 current_transmit_b2b_credit;
289} __attribute__ ((packed)); 288} __attribute__ ((packed));
290 289
290struct fsf_link_down_info {
291 u32 error_code;
292 u32 res1;
293 u8 res2[2];
294 u8 primary_status;
295 u8 ioerr_code;
296 u8 action_code;
297 u8 reason_code;
298 u8 explanation_code;
299 u8 vendor_specific_code;
300} __attribute__ ((packed));
301
291struct fsf_status_read_buffer { 302struct fsf_status_read_buffer {
292 u32 status_type; 303 u32 status_type;
293 u32 status_subtype; 304 u32 status_subtype;
@@ -298,7 +309,12 @@ struct fsf_status_read_buffer {
298 u32 class; 309 u32 class;
299 u64 fcp_lun; 310 u64 fcp_lun;
300 u8 res3[24]; 311 u8 res3[24];
301 u8 payload[FSF_STATUS_READ_PAYLOAD_SIZE]; 312 union {
313 u8 data[FSF_STATUS_READ_PAYLOAD_SIZE];
314 u32 word[FSF_STATUS_READ_PAYLOAD_SIZE/sizeof(u32)];
315 struct fsf_link_down_info link_down_info;
316 struct fsf_bit_error_payload bit_error;
317 } payload;
302} __attribute__ ((packed)); 318} __attribute__ ((packed));
303 319
304struct fsf_qual_version_error { 320struct fsf_qual_version_error {
@@ -311,23 +327,19 @@ struct fsf_qual_sequence_error {
311 u32 res1[3]; 327 u32 res1[3];
312} __attribute__ ((packed)); 328} __attribute__ ((packed));
313 329
314struct fsf_link_down_info { 330struct fsf_qual_latency_info {
315 u32 error_code; 331 u32 channel_lat;
316 u32 res1; 332 u32 fabric_lat;
317 u8 res2[2]; 333 u8 res1[8];
318 u8 primary_status;
319 u8 ioerr_code;
320 u8 action_code;
321 u8 reason_code;
322 u8 explanation_code;
323 u8 vendor_specific_code;
324} __attribute__ ((packed)); 334} __attribute__ ((packed));
325 335
326union fsf_prot_status_qual { 336union fsf_prot_status_qual {
337 u32 word[FSF_PROT_STATUS_QUAL_SIZE / sizeof(u32)];
327 u64 doubleword[FSF_PROT_STATUS_QUAL_SIZE / sizeof(u64)]; 338 u64 doubleword[FSF_PROT_STATUS_QUAL_SIZE / sizeof(u64)];
328 struct fsf_qual_version_error version_error; 339 struct fsf_qual_version_error version_error;
329 struct fsf_qual_sequence_error sequence_error; 340 struct fsf_qual_sequence_error sequence_error;
330 struct fsf_link_down_info link_down_info; 341 struct fsf_link_down_info link_down_info;
342 struct fsf_qual_latency_info latency_info;
331} __attribute__ ((packed)); 343} __attribute__ ((packed));
332 344
333struct fsf_qtcb_prefix { 345struct fsf_qtcb_prefix {
@@ -437,7 +449,9 @@ struct fsf_qtcb_bottom_config {
437 u32 fc_link_speed; 449 u32 fc_link_speed;
438 u32 adapter_type; 450 u32 adapter_type;
439 u32 peer_d_id; 451 u32 peer_d_id;
440 u8 res2[12]; 452 u8 res1[2];
453 u16 timer_interval;
454 u8 res2[8];
441 u32 s_id; 455 u32 s_id;
442 struct fsf_nport_serv_param nport_serv_param; 456 struct fsf_nport_serv_param nport_serv_param;
443 u8 reserved_nport_serv_param[16]; 457 u8 reserved_nport_serv_param[16];