#endif 
static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *pc){	idefloppy_floppy_t *floppy = drive->driver_data;	ide_hwif_t *hwif = drive->hwif;	atapi_feature_t feature;	atapi_bcount_t bcount;	ide_handler_t *pkt_xfer_routine;#if IDEFLOPPY_DEBUG_BUGS	if (floppy->pc->c[0] == IDEFLOPPY_REQUEST_SENSE_CMD &&	    pc->c[0] == IDEFLOPPY_REQUEST_SENSE_CMD) {		printk(KERN_ERR "ide-floppy: possible ide-floppy.c bug - "			"Two request sense in serial were issued\n");	}#endif /* IDEFLOPPY_DEBUG_BUGS */	if (floppy->failed_pc == NULL &&	    pc->c[0] != IDEFLOPPY_REQUEST_SENSE_CMD)		floppy->failed_pc = pc;	/* Set the current packet command */	floppy->pc = pc;	if (pc->retries > IDEFLOPPY_MAX_PC_RETRIES ||	    test_bit(PC_ABORT, &pc->flags)) {		/*		 *	We will "abort" retrying a packet command in case		 *	a legitimate error code was received.		 */		if (!test_bit(PC_ABORT, &pc->flags)) {			if (!test_bit(PC_SUPPRESS_ERROR, &pc->flags)) {				if (idefloppy_should_report_error(floppy))					printk(KERN_ERR "ide-floppy: %s: I/O error, "					       "pc = %2x, key = %2x, "					       "asc = %2x, ascq = %2x\n",					       drive->name, pc->c[0],					       floppy->sense_key,					       floppy->asc, floppy->ascq);			}			/* Giving up */			pc->error = IDEFLOPPY_ERROR_GENERAL;		}		floppy->failed_pc = NULL;		pc->callback(drive);		return ide_stopped;	}	debug_log(KERN_INFO "Retry number - %d\n",pc->retries);	pc->retries++;	/* We haven't transferred any data yet */	pc->actually_transferred = 0;	pc->current_position = pc->buffer;	bcount.all = min(pc->request_transfer, 63 * 1024);	if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags)) {		(void)__ide_dma_off(drive);	}	feature.all = 0;	if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma)		feature.b.dma = !hwif->dma_setup(drive);	if (IDE_CONTROL_REG)		HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);	/* Use PIO/DMA */	HWIF(drive)->OUTB(feature.all, IDE_FEATURE_REG);	HWIF(drive)->OUTB(bcount.b.high, IDE_BCOUNTH_REG);	HWIF(drive)->OUTB(bcount.b.low, IDE_BCOUNTL_REG);	HWIF(drive)->OUTB(drive->select.all, IDE_SELECT_REG);	if (feature.b.dma) {	/* Begin DMA, if necessary */		set_bit(PC_DMA_IN_PROGRESS, &pc->flags);		hwif->dma_start(drive);	}	/* Can we transfer the packet when we get the interrupt or wait? */	if (test_bit(IDEFLOPPY_ZIP_DRIVE, &floppy->flags)) {		/* wait */		pkt_xfer_routine = &idefloppy_transfer_pc1;	} else {		/* immediate */		pkt_xfer_routine = &idefloppy_transfer_pc;	}		if (test_bit (IDEFLOPPY_DRQ_INTERRUPT, &floppy->flags)) {		/* Issue the packet command */		ide_execute_command(drive, WIN_PACKETCMD,				pkt_xfer_routine,				IDEFLOPPY_WAIT_CMD,				NULL);		return ide_started;	} else {		/* Issue the packet command */		HWIF(drive)->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG);		return (*pkt_xfer_routine) (drive);	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c7ea4b31fd962b4baadb42c0b8d7c6851c584102/ide-floppy.c/clean/drivers/ide/ide-floppy.c