Enscript Output

extractedLnx/linux-2.6.9/drivers/s390/block/dasd_3990_erp.c_dasd_3990_handle_env_data.c

static void
dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense)
{

	struct dasd_device *device = erp->device;
	char msg_format = (sense[7] & 0xF0);
	char msg_no = (sense[7] & 0x0F);

	switch (msg_format) {
	case 0x00:		/* Format 0 - Program or System Checks */

		if (sense[1] & 0x10) {	/* check message to operator bit */

			switch (msg_no) {
			case 0x00:	/* No Message */
				break;
			case 0x01:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Invalid Command");
				break;
			case 0x02:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Invalid Command "
					    "Sequence");
				break;
			case 0x03:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - CCW Count less than "
					    "required");
				break;
			case 0x04:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Invalid Parameter");
				break;
			case 0x05:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Diagnostic of Sepecial"
					    " Command Violates File Mask");
				break;
			case 0x07:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Channel Returned with "
					    "Incorrect retry CCW");
				break;
			case 0x08:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Reset Notification");
				break;
			case 0x09:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Storage Path Restart");
				break;
			case 0x0A:
				DEV_MESSAGE(KERN_WARNING, device,
					    "FORMAT 0 - Channel requested "
					    "... %02x", sense[8]);
				break;
			case 0x0B:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Invalid Defective/"
					    "Alternate Track Pointer");
				break;
			case 0x0C:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - DPS Installation "
					    "Check");
				break;
			case 0x0E:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Command Invalid on "
					    "Secondary Address");
				break;
			case 0x0F:
				DEV_MESSAGE(KERN_WARNING, device,
					    "FORMAT 0 - Status Not As "
					    "Required: reason %02x", sense[8]);
				break;
			default:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Reseved");
			}
		} else {
			switch (msg_no) {
			case 0x00:	/* No Message */
				break;
			case 0x01:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Device Error Source");
				break;
			case 0x02:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Reserved");
				break;
			case 0x03:
				DEV_MESSAGE(KERN_WARNING, device,
					    "FORMAT 0 - Device Fenced - "
					    "device = %02x", sense[4]);
				break;
			case 0x04:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Data Pinned for "
					    "Device");
				break;
			default:
				DEV_MESSAGE(KERN_WARNING, device, "%s",
					    "FORMAT 0 - Reserved");
			}
		}
		break;

	case 0x10:		/* Format 1 - Device Equipment Checks */
		switch (msg_no) {
		case 0x00:	/* No Message */
			break;
		case 0x01:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Device Status 1 not as "
				    "expected");
			break;
		case 0x03:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Index missing");
			break;
		case 0x04:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Interruption cannot be reset");
			break;
		case 0x05:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Device did not respond to "
				    "selection");
			break;
		case 0x06:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Device check-2 error or Set "
				    "Sector is not complete");
			break;
		case 0x07:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Head address does not "
				    "compare");
			break;
		case 0x08:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Device status 1 not valid");
			break;
		case 0x09:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Device not ready");
			break;
		case 0x0A:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Track physical address did "
				    "not compare");
			break;
		case 0x0B:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Missing device address bit");
			break;
		case 0x0C:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Drive motor switch is off");
			break;
		case 0x0D:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Seek incomplete");
			break;
		case 0x0E:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Cylinder address did not "
				    "compare");
			break;
		case 0x0F:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Offset active cannot be "
				    "reset");
			break;
		default:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 1 - Reserved");
		}
		break;

	case 0x20:		/* Format 2 - 3990 Equipment Checks */
		switch (msg_no) {
		case 0x08:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 2 - 3990 check-2 error");
			break;
		case 0x0E:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 2 - Support facility errors");
			break;
		case 0x0F:
			DEV_MESSAGE(KERN_WARNING, device,
				    "FORMAT 2 - Microcode detected error %02x",
				    sense[8]);
			break;
		default:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 2 - Reserved");
		}
		break;

	case 0x30:		/* Format 3 - 3990 Control Checks */
		switch (msg_no) {
		case 0x0F:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 3 - Allegiance terminated");
			break;
		default:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 3 - Reserved");
		}
		break;

	case 0x40:		/* Format 4 - Data Checks */
		switch (msg_no) {
		case 0x00:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - Home address area error");
			break;
		case 0x01:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - Count area error");
			break;
		case 0x02:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - Key area error");
			break;
		case 0x03:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - Data area error");
			break;
		case 0x04:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - No sync byte in home address "
				    "area");
			break;
		case 0x05:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - No sync byte in count address "
				    "area");
			break;
		case 0x06:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - No sync byte in key area");
			break;
		case 0x07:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - No sync byte in data area");
			break;
		case 0x08:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - Home address area error; "
				    "offset active");
			break;
		case 0x09:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - Count area error; offset "
				    "active");
			break;
		case 0x0A:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - Key area error; offset "
				    "active");
			break;
		case 0x0B:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - Data area error; "
				    "offset active");
			break;
		case 0x0C:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - No sync byte in home "
				    "address area; offset active");
			break;
		case 0x0D:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - No syn byte in count "
				    "address area; offset active");
			break;
		case 0x0E:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - No sync byte in key area; "
				    "offset active");
			break;
		case 0x0F:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - No syn byte in data area; "
				    "offset active");
			break;
		default:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 4 - Reserved");
		}
		break;

	case 0x50:		/* Format 5 - Data Check with displacement information */
		switch (msg_no) {
		case 0x00:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 5 - Data Check in the "
				    "home address area");
			break;
		case 0x01:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 5 - Data Check in the count area");
			break;
		case 0x02:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 5 - Data Check in the key area");
			break;
		case 0x03:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 5 - Data Check in the data area");
			break;
		case 0x08:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 5 - Data Check in the "
				    "home address area; offset active");
			break;
		case 0x09:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 5 - Data Check in the count area; "
				    "offset active");
			break;
		case 0x0A:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 5 - Data Check in the key area; "
				    "offset active");
			break;
		case 0x0B:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 5 - Data Check in the data area; "
				    "offset active");
			break;
		default:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 5 - Reserved");
		}
		break;

	case 0x60:		/* Format 6 - Usage Statistics/Overrun Errors */
		switch (msg_no) {
		case 0x00:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 6 - Overrun on channel A");
			break;
		case 0x01:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 6 - Overrun on channel B");
			break;
		case 0x02:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 6 - Overrun on channel C");
			break;
		case 0x03:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 6 - Overrun on channel D");
			break;
		case 0x04:
			DEV_MESSAGE(KERN_WARNING, device, "%s",
				    "FORMAT 6 - Overrun on channel E");
			break;
		case 0x05:
			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);
		break;
	}			/* end switch message format */

}				/* end dasd_3990_handle_env_data */

Generated by GNU enscript 1.6.4.