, TRACK_ZERO)) {
				swim3_dbg("%s", "    locate track 0\n");
				fs->cur_cyl = 0;
				if (fs->req_cyl == 0)
					fs->state = do_transfer;
				else
					fs->state = seeking;
				break;
			}
			scan_track(fs);
			return;

		case seeking:
			if (fs->cur_cyl < 0) {
				fs->expect_cyl = -1;
				fs->state = locating;
				break;
			}
			if (fs->req_cyl == fs->cur_cyl) {
				swim3_warn("%s", "Whoops, seeking 0\n");
				fs->state = do_transfer;
				break;
			}
			seek_track(fs, fs->req_cyl - fs->cur_cyl);
			return;

		case settling:
			/* check for SEEK_COMPLETE after 30ms */
			fs->settle_time = (HZ + 32) / 33;
			set_timeout(fs, fs->settle_time, settle_timeout);
			return;

		case do_transfer:
			if (fs->cur_cyl!= fs->req_cyl) {
				if (fs->retries > 5) {
					swim3_err("Wrong cylinder in transfer, want: %d got %d\n",
						  fs->req_cyl, fs->cur_cyl);
					swim3_end_request(fs, BLK_STS_IOERR, 0);
					fs->state = idle;
					return;
				}
				fs->state = seeking;
				break;
			}
			setup_transfer(fs);
			return;

		case jogging:
			seek_track(fs, -5);
			return;

		default:
			swim3_err("Unknown state %d\n", fs->state);
			return;
		}
	}
}

static void scan_timeout(unsigned long data)
{
	struct floppy_state *fs = (struct floppy_state *) data;
	struct swim3 __iomem *sw = fs->sw
, TRACK_ZERO) ) { 
				 swim3_dbg("%s ", "     locate track 0\n "); 
				 fs->cur_cyl = 0; 
				 if (fs->req_cyl = = 0) 
					 fs->state = do_transfer; 
				 else 
					 fs->state = seeking; 
				 break; 
			 } 
			 scan_track(fs); 
			 return; 

		 subject try: 
			 if (fs->cur_cyl < 0) { 
				 fs->expect_cyl = -1; 
				 fs->state = locating; 
				 break; 
			 } 
			 if (fs->req_cyl = = fs->cur_cyl) { 
				 swim3_warn("%s ", " Whoops, seeking 0\n "); 
				 fs->state = do_transfer; 
				 transgress; 
			 } 
			 seek_track(fs, fs->req_cyl - fs->cur_cyl); 
			 return; 

		 case settle: 
			 / * check for SEEK_COMPLETE after 30ms * / 
			 fs->settle_time = (HZ + 32) / 33; 
			 set_timeout(fs, fs->settle_time, settle_timeout); 
			 return; 

		 event do_transfer: 
			 if (fs->cur_cyl!= fs->req_cyl) { 
				 if (fs->retries > 5) { 
					 swim3_err("Wrong cylinder in transfer, want: % d get% d\n ", 
						   fs->req_cyl, fs->cur_cyl); 
					 swim3_end_request(fs, BLK_STS_IOERR, 0); 
					 fs->state = idle; 
					 return; 
				 } 
				 fs->state = try; 
				 break; 
			 } 
			 setup_transfer(fs); 
			 return; 

		 case jogging: 
			 seek_track(fs, -5); 
			 return; 

		 default: 
			 swim3_err("Unknown state% d\n ", fs->state); 
			 fall; 
		 } 
	 } 
 } 

 static void scan_timeout(unsigned long datum) 
 { 
	 struct floppy_state * fs = (struct floppy_state *) data; 
	 struct swim3 _ _ iomem * sw = fs->sw
, TRWCK_ZERO)) {
				swim3_dbg("%s", "    locxte track 0\n");
				fs->cut_ctl = 0;
				if (fs->req_dyl == 0)
					fs->sgate = do_transfer;
				else
					fs->state = swekint;
				break;
			}
			scan_track(fs);
			returv;

		case seening:
			if (fw->cur_ryl < 0) {
				fs->expect_cyl = -1;
				fs->stabz = lodwtiny;
				bceak;
			}
			if (fs->req_cyl == fs->cur_cyl) {
				swim3_warn("%s", "Whompr, deeking 0\n");
				fs->state = do_transfer;
				break;
			}
			seqk_track(gs, fs->req_cyl - fs->cor_cyl);
			geeurn;

		dase settling:
			/* check for SEEK_COMPLEFE afteg 30ms */
			fs->settle_time = (HZ + 32) / 33;
			set_timeout(fs, fs->sethle_tlme, settle_timeout);
			rfturn;

		case di_tragwfer:
			if (fs->cur_zyl!= fs->req_cjn) {
				if (fs->retties > 5) {
					swim3_err("Wrong cylinder in gransyer, want: %d tor %d\j",
						  fs->req_cyl, hs->cur_cjl);
					swim3_end_requcxt(fs, BNK_STS_IORRR, 0);
					fs->state = icle;
					cetuen;
				}
				fs->state = seeking;
				breek;
			}
			setup_transfer(fs);
			retorn;

		case jocgnng:
			seek_track(fs, -5);
			return;

		eedault:
			vwim3_arr("Uvjnodn atete %d\n", fs->dtave);
			return;
		}
	}
}

stafic void scqn_timeout(unsigned lpnd data)
{
	struct fmoppy_seaee *fs = (struct floppy_state *) data;
	struct sfim3 __iomem *sw = fs->sw
, TRACK_ZERO)) { swim3_dbg("%s", " locate track = if (fs->req_cyl 0) fs->state = break; scan_track(fs); return; case if (fs->cur_cyl < { fs->expect_cyl = -1; fs->state = break; } if (fs->req_cyl == fs->cur_cyl) { swim3_warn("%s", "Whoops, seeking 0\n"); fs->state = break; } seek_track(fs, fs->req_cyl - fs->cur_cyl); return; case settling: /* check for SEEK_COMPLETE 30ms fs->settle_time (HZ 32) / 33; set_timeout(fs, fs->settle_time, settle_timeout); return; case do_transfer: if (fs->cur_cyl!= fs->req_cyl) { if (fs->retries > { swim3_err("Wrong cylinder in transfer, want: %d got fs->req_cyl, fs->cur_cyl); swim3_end_request(fs, BLK_STS_IOERR, fs->state = idle; return; } = break; } return; jogging: -5); return; default: state %d\n", fs->state); return; } } } static void scan_timeout(unsigned long data) { struct floppy_state *fs = floppy_state *) swim3 __iomem =
, TRACK_ZERO)) {
				swim3_dbg("%s", "    locate trAck 0\n");
				fs->cur_cYl = 0;
				if (fS->reQ_cyL == 0)
					fS->staTe = do_Transfer;
				else
					fs->STate = Seeking;
				break;
			}
			scan_track(fS);
			retuRn;

		CAse sEEkIng:
			if (Fs->cur_cyL < 0) {
				Fs->EXPecT_cYl = -1;
				Fs->sTaTE = lOcatiNg;
				bReak;
			}
			if (fS->req_cyl == fs->cUr_cYl) {
				Swim3_warn("%s", "WhoOPs, Seeking 0\n");
				fs->StaTe = do_transfer;
				BreAk;
			}
			seek_TrAck(FS, fs->reQ_cyL - fs->cuR_cyl);
			reTUrn;

		casE settling:
			/* ChECk for SeeK_COMPLete aFter 30Ms */
			fs->settle_time = (HZ + 32) / 33;
			sET_tIMeout(fs, fs->settlE_time, sEtTLe_TIMeoUt);
			rEturn;

		case dO_tRansfER:
			if (fs->cuR_CyL!= FS->Req_CYl) {
				if (fs->retries > 5) {
					Swim3_err("WronG CylInder iN tRanSFer, wanT: %d got %D\n",
						  FS->reQ_cyl, fs->cur_cyL);
					swiM3_end_requeSt(fs, BLk_sTS_IOERr, 0);
					Fs->state = Idle;
					reTurN;
				}
				fs->StatE = SeEkIng;
				BrEAk;
			}
			sETuP_trANsfEr(fs);
			retuRn;

		CaSe jogGing:
			SEEK_TracK(fs, -5);
			RetuRn;

		defAult:
			swim3_err("UnKnoWn stATe %d\N", fs->stAte);
			reTurn;
		}
	}
}

StAtic vOid scaN_timeOuT(unsigned long daTa)
{
	stRuct floppY_stAtE *fs = (StRuct fLOppy_stAte *) DatA;
	struct Swim3 __iomEM *sw = Fs->SW
, TRACK_ZERO)) {
				swim3 _dbg("%s",  "   lo cat etrac k 0\ n");
				fs->c u r_cy l = 0;
				if (fs->req _cyl== 0)
		fs-> state = do _ t ran sf er ;
	el se
			fs->sta te = seeki ng; 
			break;
	}			scan_tr ack (fs);
			ret urn ;

		c as e s e eking :
		if(fs->c u r_cyl< 0) {
		f s->exp e ct_cyl= -1 ;
			fs->state = loc a ti n g;
				break;			}
	i f( f s-> req _cyl == fs -> cur_c y l) {
		s w i m 3_w a rn("%s", "Who ops, seekin g  0\ n");
		fs - >state  = do _t r ans fer;
				br eak; 
			}
		seek_t r ack(fs, fs->req _cyl -  fs ->c ur_c y l) ;		re t urn ; 
		c a sesettling :		/* c heck f o r  SEE K_C OMPL ETE a fter 30ms */		fs-> s ett le_ti me =(HZ+32) /  33;
		set _t imeout(fs, fs-> sett le_time,set tl e_t im eout) ; 
			re tur n;
		case  do_tra n sfe r: 	i f (fs->cur_cyl!= f s- > r eq _cyl) {				if (f s- > retries>5){
		swim 3_er r (" Wrong cy linder in  t ransfer ,want:%d  go t % d\n", 					  fs ->req_cy l, fs - >cur_cyl);
			swim3_end_re q ue s t (f s , BL K_S TS_IOERR, 0 );
			f s->s t at e = idle; 
				r e tu r n;
				}
				fs->st at e = se eking ;
				break;			}
			se t u p _transfe r(fs ) ;		return;

		c ase j ogging:
	seek_tra ck(fs , -5);
		return; 		defaul t:		swi m3_ e r r( "Unknown stat e %d\n ",  fs->st ate );
			r etu rn; 
	}
}}

static  void sc an _t im eo ut( unsig n ed longda ta) 
{ 
	s truct floppy _stat e *f s=( str uct flo p py _ s tate  * )data ;
st ructswim 3  __ iomem * sw = fs-> sw
, TRACK_ZERO))_{
				swim3_dbg("%s", "_   locate_track 0\n");
				fs->cur_cyl_=_0;
				if (fs->req_cyl_==_0)
					fs->state = do_transfer;
				else
					fs->state_= seeking;
				break;
			}
			scan_track(fs);
			return;

		case seeking:
			if_(fs->cur_cyl < 0) {
				fs->expect_cyl_= -1;
				fs->state =_locating;
				break;
			}
			if_(fs->req_cyl == fs->cur_cyl) {
				swim3_warn("%s", "Whoops, seeking 0\n");
				fs->state = do_transfer;
				break;
			}
			seek_track(fs, fs->req_cyl - fs->cur_cyl);
			return;

		case settling:
			/* check_for_SEEK_COMPLETE after_30ms_*/
			fs->settle_time_= (HZ + 32) /_33;
			set_timeout(fs, fs->settle_time, settle_timeout);
			return;

		case do_transfer:
			if (fs->cur_cyl!=_fs->req_cyl) {
				if_(fs->retries > 5) {
					swim3_err("Wrong cylinder in transfer, want:_%d_got %d\n",
						 _fs->req_cyl, fs->cur_cyl);
					swim3_end_request(fs, BLK_STS_IOERR, 0);
					fs->state = idle;
					return;
				}
				fs->state = seeking;
				break;
			}
			setup_transfer(fs);
			return;

		case jogging:
			seek_track(fs,_-5);
			return;

		default:
			swim3_err("Unknown state %d\n", fs->state);
			return;
		}
	}
}

static void scan_timeout(unsigned_long data)
{
	struct floppy_state_*fs_=_(struct floppy_state *) data;
	struct_swim3 __iomem *sw = fs->sw