2.5.30 IDE 114
PATCH 1/1 2.5.30 IDE 114
- Fix allocation problem introduced in 113 as suggested by Jens. (Thanks go to Jens for providing info how to use properly blk_get_request in this case. Nevermind I just got confused by __blk_get_request in TCQ code, which made me worry about queue depth strain.)
(Note: SCSI should propably be using the same mechanism instead of
sr_request. At least we should check the code in question there.)
drivers/ide/ide-taskfile.c +10 -5
@@ -188,18 +188,20 @@ static ide_startstop_t special_intr(struint ide_raw_taskfile (struct ata_device *drive,struct ata_taskfile *ar,char *buf) { -struct request *rq = &drive->srequest; +struct request *rq; +int errors;struct ata_channel *ch = drive->channel;request_queue_t *q = &drive->queue;DECLARE_COMPLETION (wait);#ifdef CONFIG_BLK_DEV_PDC4030 +/* special drive cmds not supported */ if (ch->chipset == ide_pdc4030 && buf) -return -ENOSYS ;/* special drive cmds not supported */ +return -ENOSYS ;#endif + rq =blk_get_request (q,READ , __GFP_WAIT);memset (rq,0 ,sizeof (*rq)); - rq->buffer = buf; rq->rq_status =RQ_ACTIVE ; rq->waiting = &wait;
@@ -208,9 +210,12 @@ int ide_raw_taskfile(struct ata_device * ar->command_type =IDE_DRIVE_TASK_NO_DATA ;blk_insert_request (q, rq,1 , ar); -wait_for_completion (&wait);/* wait for it to be serviced */ +wait_for_completion (&wait); -return rq->errors ? -EIO :0 ;/* return -EIO if errors */ + errors = rq->errors; +blk_put_request (rq); + +return errors ? -EIO :0 ; }EXPORT_SYMBOL (ata_read);
include/linux/ide.h +0 -1
@@ -763,7 +763,6 @@ struct ata_device {request_queue_t queue;/* per device request queue */ struct request *rq;/* current request */ -struct request srequest;/* special requests */ u8 retry_pio;/* retrying dma capable host in pio */ u8 state;/* retry state */