/*
* __ide_do_rw_disk() issues READ and WRITE commands to a disk,
* using LBA if supported, or CHS otherwise, to address sectors.
- * It also takes care of issuing special DRIVE_CMDs.
*/
-ide_startstop_t __ide_do_rw_disk (ide_drive_t *drive, struct request *rq, sector_t block)
+static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, sector_t block)
{
ide_hwif_t *hwif = HWIF(drive);
unsigned int dma = drive->using_dma;
return pre_task_out_intr(drive, rq);
}
}
-EXPORT_SYMBOL_GPL(__ide_do_rw_disk);
/*
* 268435455 == 137439 MB or 28bit limit
block, rq->nr_sectors, (unsigned long)rq->buffer);
if (hwif->rw_disk)
- return hwif->rw_disk(drive, rq, block);
- else
- return __ide_do_rw_disk(drive, rq, block);
+ hwif->rw_disk(drive, rq);
+
+ return __ide_do_rw_disk(drive, rq, block);
}
/*
}
/**
- * hpt372n_rw_disk - wrapper for I/O
+ * hpt372n_rw_disk - prepare for I/O
* @drive: drive for command
* @rq: block request structure
- * @block: block number
- *
- * This is called when a disk I/O is issued to the 372N instead
- * of the default functionality. We need it because of the clock
- * switching
*
+ * This is called when a disk I/O is issued to the 372N.
+ * We need it because of the clock switching.
*/
-
-static ide_startstop_t hpt372n_rw_disk(ide_drive_t *drive, struct request *rq, sector_t block)
+
+static void hpt372n_rw_disk(ide_drive_t *drive, struct request *rq)
{
+ ide_hwif_t *hwif = drive->hwif;
int wantclock;
-
- if(rq_data_dir(rq) == READ)
- wantclock = 0x21;
- else
- wantclock = 0x23;
-
- if(HWIF(drive)->config_data != wantclock)
- {
+
+ wantclock = rq_data_dir(rq) ? 0x23 : 0x21;
+
+ if (hwif->config_data != wantclock) {
hpt372n_set_clock(drive, wantclock);
- HWIF(drive)->config_data = wantclock;
+ hwif->config_data = wantclock;
}
- return __ide_do_rw_disk(drive, rq, block);
}
/*
struct pci_dev *pci_dev; /* for pci chipsets */
struct ide_pci_device_s *cds; /* chipset device struct */
- ide_startstop_t (*rw_disk)(ide_drive_t *, struct request *, sector_t);
+ void (*rw_disk)(ide_drive_t *, struct request *);
#if 0
ide_hwif_ops_t *hwifops;
extern int taskfile_lib_get_identify(ide_drive_t *drive, u8 *);
extern int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout);
-ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, sector_t block);
/*
* ide_stall_queue() can be used by a drive to give excess bandwidth back