Horst Hummel | 138c014 | 2006-06-29 14:58:12 +0200 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * File...........: linux/drivers/s390/block/dasd_9336_erp.c |
| 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
| 4 | * Bugreports.to..: <Linux390@de.ibm.com> |
| 5 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000 |
| 6 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #define PRINTK_HEADER "dasd_erp(9336)" |
| 10 | |
| 11 | #include "dasd_int.h" |
| 12 | |
| 13 | |
| 14 | /* |
Horst Hummel | 138c014 | 2006-06-29 14:58:12 +0200 | [diff] [blame] | 15 | * DASD_9336_ERP_EXAMINE |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | * |
| 17 | * DESCRIPTION |
Horst Hummel | 138c014 | 2006-06-29 14:58:12 +0200 | [diff] [blame] | 18 | * Checks only for fatal/no/recover error. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | * A detailed examination of the sense data is done later outside |
| 20 | * the interrupt handler. |
| 21 | * |
| 22 | * The logic is based on the 'IBM 3880 Storage Control Reference' manual |
| 23 | * 'Chapter 7. 9336 Sense Data'. |
| 24 | * |
| 25 | * RETURN VALUES |
Horst Hummel | 138c014 | 2006-06-29 14:58:12 +0200 | [diff] [blame] | 26 | * dasd_era_none no error |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | * dasd_era_fatal for all fatal (unrecoverable errors) |
| 28 | * dasd_era_recover for all others. |
| 29 | */ |
| 30 | dasd_era_t |
| 31 | dasd_9336_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb) |
| 32 | { |
| 33 | /* check for successful execution first */ |
| 34 | if (irb->scsw.cstat == 0x00 && |
| 35 | irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END)) |
| 36 | return dasd_era_none; |
| 37 | |
| 38 | /* examine the 24 byte sense data */ |
| 39 | return dasd_era_recover; |
| 40 | |
| 41 | } /* END dasd_9336_erp_examine */ |