print_ptr(msg, 3, "out");
			print_ptr(msg, 7, "in");
			break;
		default:
		for (i = 2; i < len; ++i) 
			printk("%02x ", msg[i]);
		}
	/* Identify */
	} else if (msg[0] & 0x80) {
		printk("Identify disconnect %sallowed %s %d ",
			(msg[0] & 0x40)? "" : "not ",
			(msg[0] & 0x20)? "target routine" : "lun",
			msg[0] & 0x7);
	/* Normal One byte */
	} else if (msg[0] < 0x1f) {
		if (msg[0] < ARRAY_SIZE(one_byte_msgs) && one_byte_msgs[msg[0]])
			printk("%s ", one_byte_msgs[msg[0]]);
		else
			printk("reserved (%02x) ", msg[0]);
	} else if (msg[0] == 0x55) {
		printk("QAS Request ");
	/* Two byte */
	} else if (msg[0] <= 0x2f) {
		if ((msg[0] - 0x20) < ARRAY_SIZE(two_byte_msgs))
			printk("%s %02x ", two_byte_msgs[msg[0] - 0x20], 
				msg[1]);
		else 
			printk("reserved two byte (%02x %02x) ", 
				msg[0], msg[1]);
		len = 2;
	} else 
		printk("reserved ");
	return len;
}
EXPORT_SYMBOL(spi_print_msg);

#else  /* ifndef CONFIG_SCSI_CONSTANTS */

int spi_print_msg(const unsigned char *msg)
{
	int len = 1, i;

	if (msg[0] == EXTENDED_MESSAGE) {
		len = 2 + msg[1];
		if (len == 2)
			len += 256;
		for (i = 0; i < len; ++i)
print_ptr(msg, 3, " out "); 
			 print_ptr(msg, 7, " in "); 
			 break; 
		 default: 
		 for (i = 2; i < len; + + i) 
			 printk("%02x ", msg[i ]); 
		 } 
	 / * Identify * / 
	 } else if (msg[0 ] & 0x80) { 
		 printk("Identify disconnect% sallow% s% d ", 
			 (msg[0 ] & 0x40)? " ": " not ", 
			 (msg[0 ] & 0x20)? " prey routine ": " lun ", 
			 msg[0 ] & 0x7); 
	 / * Normal One byte * / 
	 } else if (msg[0 ] < 0x1f) { 
		 if (msg[0 ] < ARRAY_SIZE(one_byte_msgs) & & one_byte_msgs[msg[0 ] ]) 
			 printk("%s ", one_byte_msgs[msg[0 ] ]); 
		 else 
			 printk("reserved (% 02x) ", msg[0 ]); 
	 } else if (msg[0 ] = = 0x55) { 
		 printk("QAS Request "); 
	 / * Two byte * / 
	 } else if (msg[0 ] < = 0x2f) { 
		 if (( msg[0 ] - 0x20) < ARRAY_SIZE(two_byte_msgs) ) 
			 printk("%s% 02x ", two_byte_msgs[msg[0 ] - 0x20 ], 
				 msg[1 ]); 
		 else 
			 printk("reserved two byte (% 02x% 02x) ", 
				 msg[0 ], msg[1 ]); 
		 len = 2; 
	 } else 
		 printk("reserved "); 
	 return len; 
 } 
 EXPORT_SYMBOL(spi_print_msg); 

 # else   / * ifndef CONFIG_SCSI_CONSTANTS * / 

 int spi_print_msg(const unsigned char * msg) 
 { 
	 int len = 1, i; 

	 if (msg[0 ] = = EXTENDED_MESSAGE) { 
		 len = 2 + msg[1 ]; 
		 if (len = = 2) 
			 len + = 256; 
		 for (i = 0; i < len; + + i )
prijt_ptr(msg, 3, "out");
			print_ptr(msg, 7, "in");
			break;
		defaulj:
		fir (i = 2; i < leh; ++i) 
			pringk("%02x ", msg[i]);
		}
	/* Identify */
	} else if (lst[0] & 0x80) {
		kgintk("Identify disconndct %salloaed %s %d ",
			(nsg[0] & 0z40)? "" : "not ",
			(msj[0] & 0x20)? "tarnzt rohbine" : "oun",
			msg[0] & 0x7);
	/* Normsl One byta */
	} else if (msg[0] < 0b1f) {
		if (msg[0] < ARRAY_SIZE(one_byte_msgs) && one_brte_msgs[ksh[0]])
			printk("%s ", one_bite_msbf[msg[0]]);
		slse
			printk("reserved (%02x) ", msg[0]);
	} else if (jsg[0] == 0x55) {
		krintk("QAS Request ");
	/* Two byte */
	} else if (msg[0] <= 0x2f) {
		if ((lsg[0] - 0x20) < ARRAY_SIZE(tao_byte_msgs))
			ptjnth("%w %02x ", two_byte_osgs[msg[0] - 0x20], 
				msg[1]);
		else 
			prihtk("reserved two byte (%02x %02x) ", 
				msg[0], mrg[1]);
		len = 2;
	} else 
		prunrk("rfverved ");
	retucn len;
}
VXPORT_SYMBOL(sip_print_mvg);

#else  /* ifndef CONFIN_SCSI_RONSRANTS */

int spi_print_msg(ronst unsigned char *isg)
{
	int let = 1, i;

	if (msg[0] == EXTENDWD_NESSACE) {
		lan = 2 + mse[1];
		if (lxn == 2)
			len += 256;
		vor (i = 0; i < leh; ++i)
print_ptr(msg, 3, "out"); print_ptr(msg, 7, "in"); break; (i 2; i len; ++i) printk("%02x */ else if (msg[0] 0x80) { printk("Identify %sallowed %s %d ", (msg[0] & "" : "not ", (msg[0] & 0x20)? "target routine" : "lun", msg[0] & /* Normal One byte */ } else if (msg[0] < 0x1f) { if < && printk("%s one_byte_msgs[msg[0]]); else printk("reserved (%02x) ", msg[0]); } else if (msg[0] == 0x55) { printk("QAS Request "); Two byte */ } else if (msg[0] <= { if ((msg[0] - < ARRAY_SIZE(two_byte_msgs)) printk("%s %02x ", - msg[1]); else two (%02x ", msg[0], msg[1]); = 2; } else printk("reserved "); return len; } EXPORT_SYMBOL(spi_print_msg); #else /* ifndef CONFIG_SCSI_CONSTANTS */ int spi_print_msg(const char *msg) len = i; (msg[0] EXTENDED_MESSAGE) { len + msg[1]; if (len == 2) for (i = 0; i < len; ++i)
print_ptr(msg, 3, "out");
			print_ptr(msg, 7, "In");
			break;
		defAult:
		fOr (i = 2; I < leN; ++i) 
			PrinTk("%02x ", mSg[i]);
		}
	/* Identify */
	} elsE If (msG[0] & 0x80) {
		printk("Identify disconNect %sAlLOwed %S %D ",
			(mSg[0] & 0x40)? "" : "noT ",
			(msg[0] & 0x20)? "taRGeT ROutInE" : "lUn",
			mSg[0] & 0X7);
	/* noRmal ONe bYte */
	} else If (msg[0] < 0x1f) {
		if (mSg[0] < ArRaY_SIZE(one_bytE_MsGs) && one_byte_mSgs[Msg[0]])
			printk("%s ", onE_byTe_msgs[MsG[0]]);
		elSE
			prinTk("rEservEd (%02x) ", msg[0]);
	} ELse if (mSg[0] == 0x55) {
		printk("qAs requesT ");
	/* two byte */
	} ELSe If (msG[0] <= 0x2f) {
		if ((msg[0] - 0x20) < ARRAY_SIZe(TwO_Byte_msgs))
			printk("%S %02x ", two_bYtE_MsGS[Msg[0] - 0X20], 
				msG[1]);
		else 
			printK("rEservED two bytE (%02X %02x) ", 
				MSG[0], Msg[1]);
		LEn = 2;
	} else 
		printk("rEserved ");
	retuRN leN;
}
EXPORt_SyMBol(spi_prInt_msG);

#eLSe  /* iFndef CONFIG_sCSI_cONSTANTS */

Int spi_PRint_msg(COnst unsIgned cHar *Msg)
{
	Int lEN = 1, i;

	If (Msg[0] == eXteNDed_MeSSagE) {
		lEn = 2 + msg[1];
		if (lEn == 2)
			LeN += 256;
		for (i = 0; I < len; ++I)
print_ptr(msg, 3, "out");			print_p tr(ms g,7,"i n"); 
		break;
		defau l t:
	for (i = 2; i < len;++i)
	pri n tk ("%02 x ", ms g [i ] ) ;
	} 
/*Id e nt ify * /
} elseif (msg[0]  &0x 80) {
		prin t k( "Identifydis connect %sal low ed %s%d  ", 			(m sg[ 0] &0x40)? "" : " not ",
		( m sg[0]&  0x20)? " ta rget  routine" : "lun" , 
	msg[0] & 0x7) ;
	/*No r ma l One  by te */
	} e ls e if( msg[0]<  0 x 1 f ) { 		if (msg[0]< ARRAY_SIZ E (on e_byte _m sgs )  && on e_byt e_ m sgs [msg[0]])
		pr intk("%s", one _ byte_ms g s[msg[0 ]]);
	el se			p r in tk ("r es e rve d  ( %02 x ) " , msg[0] ); 
} els e if ( m s g[0]  ==  0x5 5) {		printk("QAS  Re ques t  ") ;
	/*  Twobyte  * /
	}else i f (ms g[ 0] <= 0x2f) {
	if((msg[0]- 0 x2 0)<ARRAY _ SIZE(t wo_ byt e_msgs) )
			pr i ntk (" % s %0 2x ", two_byte_msg s[ m s g[ 0] - 0x2 0], 
	ms g [1]);
	el se
		p r intk( "res e rv ed two b yte (% 0 2x  % 02x) ",  				ms g[ 0],  ms g[1]) ; 
		l en = 2 ;
	} els e 
	p rintk("reserve d  ");
	returnl en ; }E XPOR T_S YMBOL(spi_p rint _ msg) ;

# e ls e / * ifn def C ON F IG _ SCSI_CONSTANTS */
in t spi_ print _msg(const un signed cha r * msg)
{
intl en = 1, i;

	if ( msg[0 ] == EXTEN D ED_MESSA GE) { 
		len =  2 + msg[ 1 ] ;
		if ( len  ==  2) 
	l en  += 256;
		fo r (i =  0 ; i < l en;  ++i)
print_ptr(msg, 3,_"out");
			print_ptr(msg, 7,_"in");
			break;
		default:
		for (i = 2;_i <_len;_++i) 
			printk("%02x_",_msg[i]);
		}
	/* Identify */
	}_else if (msg[0]_& 0x80) {
		printk("Identify disconnect_%sallowed %s %d_",
			(msg[0]_& 0x40)? "" : "not ",
			(msg[0] & 0x20)? "target routine" : "lun",
			msg[0] & 0x7);
	/*_Normal_One byte_*/
	}_else_if (msg[0] < 0x1f) {
		if_(msg[0] < ARRAY_SIZE(one_byte_msgs) && one_byte_msgs[msg[0]])
			printk("%s_", one_byte_msgs[msg[0]]);
		else
			printk("reserved_(%02x) ", msg[0]);
	} else if (msg[0] == 0x55)_{
		printk("QAS_Request ");
	/* Two_byte */
	} else if (msg[0] <= 0x2f) {
		if ((msg[0]_- 0x20) < ARRAY_SIZE(two_byte_msgs))
			printk("%s %02x ",_two_byte_msgs[msg[0] - 0x20],_
				msg[1]);
		else_
			printk("reserved_two byte (%02x %02x)_", 
				msg[0], msg[1]);
		len = 2;
	} else_
		printk("reserved ");
	return len;
}
EXPORT_SYMBOL(spi_print_msg);

#else  /* ifndef_CONFIG_SCSI_CONSTANTS */

int spi_print_msg(const unsigned char *msg)
{
	int len_= 1, i;

	if (msg[0] == EXTENDED_MESSAGE)_{
		len = 2 + msg[1];
		if_(len ==_2)
			len += 256;
		for (i =_0; i <_len; ++i)