lkml.org 
[lkml]   [2005]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6.11-rc3 01/11] ide: task_end_request() fix
On Wed, 2 Mar 2005 01:49:52 +0900, Tejun Heo <htejun@gmail.com> wrote:
> Hello, Bartlomiej.
>
> On Tue, Mar 01, 2005 at 03:30:32PM +0100, Bartlomiej Zolnierkiewicz wrote:
> > On Sun, 27 Feb 2005 15:49:22 +0900, Tejun Heo <htejun@gmail.com> wrote:
> > >
> > > Taskfile DMA path is still broken. Also calling ide_end_request()
> > > will work there, but IMHO it's just cleaner to finish special commands
> > > inside ide_end_drive_cmd(). Currently,
> >
> > I agree but please note that your patch makes *all* taskfile registers to
> > be exposed through HDIO_DRIVE_TASKFILE regardless of ->rf_in_flags
> > (and obviously later you can't revert this change).
> >
> > > * Successful flagged taskfile -> ide_end_drive_cmd()
> > > * All other successful non-DMA special cmds -> ide_end_request()
> > > * Successful DMA taskfile -> segfault
> >
> > Have you tested it? Why would it segfault?
> >
>
> It's the same reason why PIO taskfiles were broken. rq->rq_disk is
> NULL for taskfile requests.
>
> ide_startstop_t ide_dma_intr (ide_drive_t *drive)
> {
> ...
> printk("**HERE0***\n");
> drv = *(ide_driver_t **)rq->rq_disk->private_data;;
> printk("**HERE1***\n");
> drv->end_request(drive, 1, rq->nr_sectors);
> return ide_stopped;
> ...
> }

Arghh, indeed I forgot about HDIO_DRIVE_TASKFILE here.

Could you fix to check if (drv == NULL) and call
ide_end_request() it the condition is true?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.080 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site