New DASD feature for ERP related logging
Subsystems (2)
From: Horst Hummel <[email protected]>
[S390] New DASD feature for ERP related logging
It is now possible to enable/disable ERP related logging without re-compile and re-ipl. A additional sysfs-attribute 'erplog' allows to switch the logging non-interruptive.
Signed-off-by Horst Hummel <[email protected]>
Signed-off-by Martin Schwidefsky <[email protected]>
---
drivers/s390/block/dasd.c | 8 +++--- drivers/s390/block/dasd_3990_erp.c | 23 ++++++----------- drivers/s390/block/dasd_devmap.c | 49 +++++++++++++++++++++++++++++++++++++ drivers/s390/block/dasd_int.h | 4 --- include/asm-s390/dasd.h | 2 + 5 files changed, 64 insertions(+), 22 deletions(-)
drivers/s390/block/dasd_3990_erp.c +9 -14
@@ -2641,14 +2641,12 @@ dasd_3990_erp_action(struct dasd_ccw_reqstruct dasd_ccw_req *erp =NULL ;struct dasd_device *device = cqr->device;__u32 cpa = cqr->irb.scsw.cpa; +struct dasd_ccw_req *temp_erp =NULL ; -#ifdef ERP_DEBUG -/* print current erp_chain */ -DEV_MESSAGE (KERN_ERR , device,"%s" , -"ERP chain at BEGINNING of ERP-ACTION" ); - { -struct dasd_ccw_req *temp_erp =NULL ; - +if (device->features &DASD_FEATURE_ERPLOG ) { +/* print current erp_chain */ +DEV_MESSAGE (KERN_ERR , device,"%s" , +"ERP chain at BEGINNING of ERP-ACTION" );for (temp_erp = cqr; temp_erp !=NULL ; temp_erp = temp_erp->refers) {
@@ -2658,7 +2656,6 @@ dasd_3990_erp_action(struct dasd_ccw_req temp_erp->refers); } } -#endif /* ERP_DEBUG */ /* double-check if current erp/cqr was successfull */ if ((cqr->irb.scsw.cstat == 0x00) &&
@@ -2695,11 +2692,10 @@ dasd_3990_erp_action(struct dasd_ccw_req erp =dasd_3990_erp_handle_match_erp (cqr, erp); } -#ifdef ERP_DEBUG -/* print current erp_chain */ -DEV_MESSAGE (KERN_ERR , device,"%s" ,"ERP chain at END of ERP-ACTION" ); - { -struct dasd_ccw_req *temp_erp =NULL ; +if (device->features &DASD_FEATURE_ERPLOG ) { +/* print current erp_chain */ +DEV_MESSAGE (KERN_ERR , device,"%s" , +"ERP chain at END of ERP-ACTION" );for (temp_erp = erp; temp_erp !=NULL ; temp_erp = temp_erp->refers) {
@@ -2709,7 +2705,6 @@ dasd_3990_erp_action(struct dasd_ccw_req temp_erp->refers); } } -#endif /* ERP_DEBUG */ if (erp->status ==DASD_CQR_FAILED )dasd_log_ccw (erp,1 , cpa);
drivers/s390/block/dasd.c +4 -4
@@ -1050,10 +1050,10 @@ dasd_int_handler(struct ccw_device *cdev } }else {/* error */ memcpy (&cqr->irb, irb,sizeof (struct irb )); -#ifdef ERP_DEBUG -/* dump sense data */ -dasd_log_sense (cqr, irb); -#endif +if (device->features &DASD_FEATURE_ERPLOG ) { +/* dump sense data */ +dasd_log_sense (cqr, irb); + }switch (era) {case dasd_era_fatal: cqr->status =DASD_CQR_FAILED ;
drivers/s390/block/dasd_devmap.c +49 -0
67 lines not on this page · raw message
drivers/s390/block/dasd_int.h +0 -4
@@ -13,10 +13,6 @@#ifdef __KERNEL__ -/* erp debugging in dasd.c and dasd_3990_erp.c */ -#define ERP_DEBUG - -/* we keep old device allocation scheme; IOW, minors are still in 0..255 */ #define DASD_PER_MAJOR (1U << (MINORBITS - DASD_PARTN_BITS))#define DASD_PARTN_MASK ((1 << DASD_PARTN_BITS) - 1)
include/asm-s390/dasd.h +2 -0
@@ -69,11 +69,13 @@ typedef struct dasd_information2_t {* 0x01: readonly (ro) * 0x02: use diag discipline (diag) * 0x04: set the device initially online (internal use only) +* 0x08: enable ERP related logging */ #define DASD_FEATURE_DEFAULT 0x00#define DASD_FEATURE_READONLY 0x01#define DASD_FEATURE_USEDIAG 0x02#define DASD_FEATURE_INITIAL_ONLINE 0x04 +#define DASD_FEATURE_ERPLOG 0x08#define DASD_PARTN_BITS 2