All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: petkovbb@gmail.com
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] ide: pass command to ide_map_sg()
Date: Wed, 11 Feb 2009 17:28:27 +0100	[thread overview]
Message-ID: <200902111728.28070.bzolnier@gmail.com> (raw)
In-Reply-To: <20090211063623.GB937@gollum.tnic>

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@gmail.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@gmail.com>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.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

  reply	other threads:[~2009-02-11 16:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-09 23:19 [PATCH 0/6] ide: more unifications of ATA and ATAPI support Bartlomiej Zolnierkiewicz
2009-02-09 23:19 ` [PATCH 1/6] ide: pass command to ide_map_sg() Bartlomiej Zolnierkiewicz
2009-02-11  6:36   ` Borislav Petkov
2009-02-11 16:28     ` Bartlomiej Zolnierkiewicz [this message]
2009-02-09 23:19 ` [PATCH 2/6] ide: use do_rw_taskfile() for ATA_CMD_PACKET commands Bartlomiej Zolnierkiewicz
2009-02-09 23:20 ` [PATCH 3/6] ide: set hwif->expiry prior to calling [__]ide_set_handler() Bartlomiej Zolnierkiewicz
2009-03-16 14:23   ` Sergei Shtylyov
2009-02-09 23:20 ` [PATCH 4/6] ide: add ->dma_expiry method and remove ->dma_exec_cmd one Bartlomiej Zolnierkiewicz
2009-02-10 18:18   ` Sergei Shtylyov
2009-02-11 16:30     ` Bartlomiej Zolnierkiewicz
2009-02-11 17:30       ` Sergei Shtylyov
2009-02-17 14:16         ` Bartlomiej Zolnierkiewicz
2009-02-17 14:29           ` Sergei Shtylyov
2009-02-09 23:20 ` [PATCH 5/6] ide: remove ide_execute_pkt_cmd() Bartlomiej Zolnierkiewicz
2009-02-11  6:55   ` Borislav Petkov
2009-02-11 13:22     ` Sergei Shtylyov
2009-02-11 13:37       ` Borislav Petkov
2009-02-11 13:49         ` Sergei Shtylyov
2009-02-11 16:32           ` Borislav Petkov
2009-02-15 12:24             ` Sergei Shtylyov
2009-02-15 17:39               ` Borislav Petkov
2009-02-15 23:18                 ` Sergei Shtylyov
2009-02-16  8:56                   ` Borislav Petkov
2009-02-11 16:37           ` Bartlomiej Zolnierkiewicz
2009-02-09 23:20 ` [PATCH 6/6] ide: keep track of number of bytes instead of sectors in struct ide_cmd Bartlomiej Zolnierkiewicz
2009-02-11  7:16 ` [PATCH 0/6] ide: more unifications of ATA and ATAPI support Borislav Petkov
2009-02-23 22:51   ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200902111728.28070.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.