current->state = TASK_INTERRUPTIBLE; schedule_timeout(1); 
schedule_timeout_interruptible(1); 
static int floppy_open(struct inode *inode, struct file *filp){	struct floppy_state *fs = inode->i_bdev->bd_disk->private_data;	struct swim3 __iomem *sw = fs->swim3;	int n, err = 0;	if (fs->ref_count == 0) {#ifdef CONFIG_PMAC_MEDIABAY		if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD))			return -ENXIO;#endif		out_8(&sw->setup, S_IBM_DRIVE | S_FCLK_DIV2);		out_8(&sw->control_bic, 0xff);		out_8(&sw->mode, 0x95);		udelay(10);		out_8(&sw->intr_enable, 0);		out_8(&sw->control_bis, DRIVE_ENABLE | INTR_ENABLE);		swim3_action(fs, MOTOR_ON);		fs->write_prot = -1;		fs->cur_cyl = -1;		for (n = 0; n < 2 * HZ; ++n) {			if (n >= HZ/30 && swim3_readbit(fs, SEEK_COMPLETE))				break;			if (signal_pending(current)) {				err = -EINTR;				break;			}			swim3_select(fs, RELAX);			current->state = TASK_INTERRUPTIBLE;			schedule_timeout(1);		}		if (err == 0 && (swim3_readbit(fs, SEEK_COMPLETE) == 0				 || swim3_readbit(fs, DISK_IN) == 0))			err = -ENXIO;		swim3_action(fs, SETMFM);		swim3_select(fs, RELAX);	} else if (fs->ref_count == -1 || filp->f_flags & O_EXCL)		return -EBUSY;	if (err == 0 && (filp->f_flags & O_NDELAY) == 0	    && (filp->f_mode & 3)) {		check_disk_change(inode->i_bdev);		if (fs->ejected)			err = -ENXIO;	}	if (err == 0 && (filp->f_mode & 2)) {		if (fs->write_prot < 0)			fs->write_prot = swim3_readbit(fs, WRITE_PROT);		if (fs->write_prot)			err = -EROFS;	}	if (err) {		if (fs->ref_count == 0) {			swim3_action(fs, MOTOR_OFF);			out_8(&sw->control_bic, DRIVE_ENABLE | INTR_ENABLE);			swim3_select(fs, RELAX);		}		return err;	}	if (filp->f_flags & O_EXCL)		fs->ref_count = -1;	else		++fs->ref_count;	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/86e8486245a01f05a3267b2e8b5c02c2303b670d/swim3.c/buggy/drivers/block/swim3.c