dasd_3990_erp.c

来自「linux-2.4.29操作系统的源码」· C语言 代码 · 共 1,977 行 · 第 1/5 页

C
1,977
字号
                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 6 - Overrun on channel F");			break;		case 0x06:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 6 - Overrun on channel G");			break;		case 0x07:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 6 - Overrun on channel H");			break;		default:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 6 - Reserved");		}                break;			case 0x70:	/* Format 7 - Device Connection Control Checks */		switch (msg_no) {		case 0x00:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - RCC initiated by a connection "                                     "check alert");			break;		case 0x01:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - RCC 1 sequence not "                                     "successful");			break;		case 0x02:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - RCC 1 and RCC 2 sequences not "                                     "successful");			break;		case 0x03:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - Invalid tag-in during "                                     "selection sequence");			break;		case 0x04:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - extra RCC required");			break;		case 0x05:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - Invalid DCC selection "                                     "response or timeout");			break;		case 0x06:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - Missing end operation; device "                                     "transfer complete");			break;		case 0x07:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - Missing end operation; device "                                     "transfer incomplete");			break;		case 0x08:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - Invalid tag-in for an "                                     "immediate command sequence");			break;		case 0x09:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - Invalid tag-in for an "                                     "extended command sequence");			break;		case 0x0A:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - 3990 microcode time out when "                                     "stopping selection");			break;		case 0x0B:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - No response to selection "                                     "after a poll interruption");			break;		case 0x0C:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - Permanent path error (DASD "                                     "controller not available)");			break;		case 0x0D:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - DASD controller not available"                                     " on disconnected command chain");			break;		default:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 7 - Reserved");		}                break;			case 0x80:	/* Format 8 - Additional Device Equipment Checks */		switch (msg_no) {		case 0x00:	/* No Message */		case 0x01:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 8 - Error correction code "                                     "hardware fault");			break;		case 0x03:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 8 - Unexpected end operation "                                     "response code");			break;		case 0x04:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 8 - End operation with transfer "                                     "count not zero");			break;		case 0x05:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 8 - End operation with transfer "                                     "count zero");			break;		case 0x06:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 8 - DPS checks after a system "                                     "reset or selective reset");			break;		case 0x07:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 8 - DPS cannot be filled");			break;		case 0x08:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 8 - Short busy time-out during "                                     "device selection");			break;		case 0x09:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 8 - DASD controller failed to "                                     "set or reset the long busy latch");			break;		case 0x0A:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 8 - No interruption from device "                                     "during a command chain");			break;		default:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 8 - Reserved");		}                break;			case 0x90:	/* Format 9 - Device Read, Write, and Seek Checks */		switch (msg_no) {		case 0x00:			break;	/* No Message */		case 0x06:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 9 - Device check-2 error");			break;		case 0x07:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 9 - Head address did not compare");			break;		case 0x0A:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 9 - Track physical address did "                                     "not compare while oriented");			break;		case 0x0E:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 9 - Cylinder address did not "                                     "compare");			break;		default:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT 9 - Reserved");		}                break;			case 0xF0:		/* Format F - Cache Storage Checks */		switch (msg_no) {		case 0x00:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT F - Operation Terminated");			break;		case 0x01:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT F - Subsystem Processing Error");			break;		case 0x02:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT F - Cache or nonvolatile storage "                                     "equipment failure");			break;		case 0x04:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT F - Caching terminated");			break;		case 0x06:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT F - Cache fast write access not "                                     "authorized");			break;		case 0x07:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT F - Track format incorrect");			break;		case 0x09:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT F - Caching reinitiated");			break;		case 0x0A:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT F - Nonvolatile storage "                                     "terminated");			break;		case 0x0B:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT F - Volume is suspended duplex");			break;		case 0x0C:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT F - Subsystem status connot be "                                     "determined");			break;		case 0x0D:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT F - Caching status reset to "                                     "default");			break;		case 0x0E:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT F - DASD Fast Write inhibited");			break;		default:                        DEV_MESSAGE (KERN_WARNING, device, "%s",                                     "FORMAT D - Reserved");		}                break;			default:	/* unknown message format - should not happen */                DEV_MESSAGE (KERN_WARNING, device,                             "unknown message format %02x",                             msg_format);                	} /* end switch message format */        } /* end dasd_3990_handle_env_data *//* * DASD_3990_ERP_COM_REJ * * DESCRIPTION *   Handles 24 byte 'Command Reject' error. * * PARAMETER *   erp                current erp_head *   sense              current sense data *  * RETURN VALUES *   erp                'new' erp_head - pointer to new ERP  */ccw_req_t *dasd_3990_erp_com_rej (ccw_req_t *erp,		       char      *sense){	dasd_device_t *device = erp->device;        erp->function = dasd_3990_erp_com_rej;	/* env data present (ACTION 10 - retry should work) */	if (sense[2] & SNS2_ENV_DATA_PRESENT) {                DEV_MESSAGE (KERN_DEBUG, device, "%s",                             "Command Reject - environmental data present");		dasd_3990_handle_env_data (erp,                                           sense);		erp->retries = 5;	} else {		/* fatal error -  set status to FAILED */                DEV_MESSAGE (KERN_ERR, device, "%s",                             "Command Reject - Fatal error");                erp = dasd_3990_erp_cleanup (erp,                                             CQR_STATUS_FAILED);	}	return erp;} /* end dasd_3990_erp_com_rej *//* * DASD_3990_ERP_BUS_OUT  * * DESCRIPTION *   Handles 24 byte 'Bus Out Parity Check' error. * * PARAMETER *   erp                current erp_head * RETURN VALUES *   erp                new erp_head - pointer to new ERP */ccw_req_t *dasd_3990_erp_bus_out (ccw_req_t *erp){	dasd_device_t *device = erp->device;        /* first time set initial retry counter and erp_function */        /* and retry once without blocking queue                 */        /* (this enables easier enqueing of the cqr)             */        if (erp->function != dasd_3990_erp_bus_out) {                erp->retries  = 256;                erp->function = dasd_3990_erp_bus_out;        } else {                /* issue a message and wait for 'device ready' interrupt */                DEV_MESSAGE (KERN_DEBUG, device, "%s",                             "bus out parity error or BOPC requested by "                             "channel");                                dasd_3990_erp_block_queue (erp,                                           60);                        }	return erp;} /* end dasd_3990_erp_bus_out *//* * DASD_3990_ERP_EQUIP_CHECK * * DESCRIPTION *   Handles 24 byte 'Equipment Check' error. * * PARAMETER *   erp                current erp_head * RETURN VALUES *   erp                new erp_head - pointer to new ERP */ccw_req_t *dasd_3990_erp_equip_check (ccw_req_t *erp,			   char      *sense){	dasd_device_t *device = erp->device;	erp->function = dasd_3990_erp_equip_check;	if (sense[1] & SNS1_WRITE_INHIBITED) {		DEV_MESSAGE (KERN_DEBUG, device, "%s",                             "Write inhibited path encountered");		/* vary path offline */		DEV_MESSAGE (KERN_ERR, device, "%s",                             "Path should be varied off-line. "                             "This is not implemented yet \n - please report "                             "to linux390@de.ibm.com");		erp = dasd_3990_erp_action_1 (erp);	} else if (sense[2] & SNS2_ENV_DATA_PRESENT) {                                DEV_MESSAGE (KERN_DEBUG, device, "%s",                             "Equipment Check - "                             "environmental data present");                                dasd_3990_handle_env_data (erp,                                           sense);                                erp = dasd_3990_erp_action_4 (erp,                                              sense);                        } else if (sense[1] & SNS1_PERM_ERR) {                DEV_MESSAGE (KERN_DEBUG, device, "%s",                             "Equipment Check - retry exhausted or "                             "undesirable");                                erp = dasd_3990_erp_action_1 (erp);                        } else {                /* all other equipment checks - Action 5 */                /* rest is done when retries == 0 */                DEV_MESSAGE (KERN_DEBUG, device, "%s",                             "Equipment check or processing error");                                erp = dasd_3990_erp_action_5 (erp);        }                return erp;        } /* end dasd_3990_erp_equip_check */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?