dasd: fix error recovery for alias devices during format
[cascardo/linux.git] / drivers / s390 / block / dasd_int.h
index 0785bd9..2cc188c 100644 (file)
@@ -175,6 +175,7 @@ struct dasd_ccw_req {
        struct dasd_block *block;       /* the originating block device */
        struct dasd_device *memdev;     /* the device used to allocate this */
        struct dasd_device *startdev;   /* device the request is started on */
+       struct dasd_device *basedev;    /* base device if no block->base */
        void *cpaddr;                   /* address of ccw or tcw */
        unsigned char cpmode;           /* 0 = cmd mode, 1 = itcw */
        char status;                    /* status of this request */
@@ -224,6 +225,8 @@ struct dasd_ccw_req {
 /* default expiration time*/
 #define DASD_EXPIRES     300
 #define DASD_EXPIRES_MAX  40000000
+#define DASD_RETRIES     256
+#define DASD_RETRIES_MAX  32768
 
 /* per dasd_ccw_req flags */
 #define DASD_CQR_FLAGS_USE_ERP   0     /* use ERP for this request */
@@ -302,7 +305,7 @@ struct dasd_discipline {
         */
        int (*basic_to_ready) (struct dasd_device *);
        int (*online_to_ready) (struct dasd_device *);
-       int (*ready_to_basic)  (struct dasd_device *);
+       int (*basic_to_known)(struct dasd_device *);
 
        /* (struct dasd_device *);
         * Device operation functions. build_cp creates a ccw chain for
@@ -319,7 +322,7 @@ struct dasd_discipline {
        int (*term_IO) (struct dasd_ccw_req *);
        void (*handle_terminated_request) (struct dasd_ccw_req *);
        int (*format_device) (struct dasd_device *,
-                             struct format_data_t *);
+                             struct format_data_t *, int enable_PAV);
        int (*free_cp) (struct dasd_ccw_req *, struct request *);
 
        /*
@@ -466,6 +469,9 @@ struct dasd_device {
 
        /* default expiration time in s */
        unsigned long default_expires;
+       unsigned long default_retries;
+
+       unsigned long blk_timeout;
 
        struct dentry *debugfs_dentry;
        struct dasd_profile profile;
@@ -519,7 +525,10 @@ struct dasd_block {
 #define DASD_FLAG_SUSPENDED    9       /* The device was suspended */
 #define DASD_FLAG_SAFE_OFFLINE 10      /* safe offline processing requested*/
 #define DASD_FLAG_SAFE_OFFLINE_RUNNING 11      /* safe offline running */
+#define DASD_FLAG_ABORTALL     12      /* Abort all noretry requests */
 
+#define DASD_SLEEPON_START_TAG ((void *) 1)
+#define DASD_SLEEPON_END_TAG   ((void *) 2)
 
 void dasd_put_device_wake(struct dasd_device *);
 
@@ -660,6 +669,8 @@ void dasd_free_device(struct dasd_device *);
 struct dasd_block *dasd_alloc_block(void);
 void dasd_free_block(struct dasd_block *);
 
+enum blk_eh_timer_return dasd_times_out(struct request *req);
+
 void dasd_enable_device(struct dasd_device *);
 void dasd_set_target_state(struct dasd_device *, int);
 void dasd_kick_device(struct dasd_device *);