[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200902111728.28070.bzolnier@gmail.com>
Date: Wed, 11 Feb 2009 17:28:27 +0100
From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To: petkovbb@...il.com
Cc: linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] ide: pass command to ide_map_sg()
On Wednesday 11 February 2009, Borislav Petkov wrote:
> On Tue, Feb 10, 2009 at 12:19:52AM +0100, Bartlomiej Zolnierkiewicz wrote:
> > From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
> > Subject: [PATCH] ide: pass command to ide_map_sg()
> >
> > * Set IDE_TFLAG_WRITE flag and ->rq also for ATA_CMD_PACKET
> > commands.
> >
> > * Pass command to ->dma_setup method and update all its
> > implementations accordingly.
> >
> > * Pass command instead of request to ide_build_sglist(),
> > *_build_dmatable() and ide_map_sg().
> >
> > While at it:
> >
> > * Fix scc_dma_setup() documentation + use ATA_DMA_WR define.
> >
> > * Rename sgiioc4_build_dma_table() to sgiioc4_build_dmatable(),
> > change return value type to 'int' and drop unused 'ddir'
> > argument.
> >
> > * Do some minor cleanups in [tx4939]ide_dma_setup().
> >
> > There should be no functional changes caused by this patch.
> >
> > Cc: Borislav Petkov <petkovbb@...il.com>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
[...]
[ please cut needless parts when replying, thanks ]
> > Index: b/drivers/ide/ide-floppy.c
> > ===================================================================
> > --- a/drivers/ide/ide-floppy.c
> > +++ b/drivers/ide/ide-floppy.c
> > @@ -285,8 +285,12 @@ static ide_startstop_t ide_floppy_do_req
> > goto out_end;
> > }
> >
> > + if (rq_data_dir(rq))
> > + cmd->tf_flags |= IDE_TFLAG_WRITE;
> > + cmd->rq = rq;
> > +
> > ide_init_sg_cmd(cmd, rq->nr_sectors);
> > - ide_map_sg(drive, rq);
> > + ide_map_sg(drive, cmd);
>
> How about we push those mappings in ide_issue_pc() in the else-branch
> after we've tried setting up dma and we've failed? This way we don't
> have to do that in the ->do_request of every device and do it for all at
Sounds OK to me.
> one place instead. Only ide-cd will have to have ->ide_io_buffers for
> PIO transfers (which I was working on before bugs :))
BTW I have now a draft patch making ide-cd use ide_pio_bytes() for fs
requests (I still need to do it for non-fs requests, polish, document
and do more testing). The hard parts (== more like mind melting ones)
were in untagling cdrom_end_request() uses and getting rid of partial
completions without making the whole transfer fail on errors...
Thanks,
Bart
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists