From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Borislav Petkov <petkovbb@googlemail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 05/14] ide-atapi: add a buffer-arg to ide_queue_pc_tail
Date: Sun, 10 May 2009 23:32:35 +0200 [thread overview]
Message-ID: <200905102332.35931.bzolnier@gmail.com> (raw)
In-Reply-To: <1241855134-4984-6-git-send-email-petkovbb@gmail.com>
On Saturday 09 May 2009 09:45:25 Borislav Petkov wrote:
> This is in preparation of removing ide_atapi_pc. Expose the buffer as an
> argument to ide_queue_pc_tail with later replacing it with local buffer
> or even kmalloc'ed one if needed due to stack usage constraints.
>
> Also, add the possibility of passing a NULL-ptr buffer for cmds which
> don't transfer data besides the cdb.
>
> There should be no functional change resulting from this patch.
>
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> ---
> drivers/ide/ide-atapi.c | 12 ++++++------
> drivers/ide/ide-floppy.c | 17 ++++++++---------
> drivers/ide/ide-floppy_ioctl.c | 16 ++++++++--------
> drivers/ide/ide-tape.c | 37 ++++++++++++++++++-------------------
> include/linux/ide.h | 2 +-
> 5 files changed, 41 insertions(+), 43 deletions(-)
[...]
> @@ -1637,11 +1636,11 @@ static void idetape_get_mode_sense_results(ide_drive_t *drive)
> {
> idetape_tape_t *tape = drive->driver_data;
> struct ide_atapi_pc pc;
> - u8 *caps;
> + u8 buf[24], *caps;
> u8 speed, max_speed;
>
> idetape_create_mode_sense_cmd(&pc, IDETAPE_CAPABILITIES_PAGE);
> - if (ide_queue_pc_tail(drive, tape->disk, &pc, pc.req_xfer)) {
> + if (ide_queue_pc_tail(drive, tape->disk, &pc, buf, pc.req_xfer)) {
> printk(KERN_ERR "ide-tape: Can't get tape parameters - assuming"
> " some default values\n");
> tape->blk_size = 512;
> @@ -1650,7 +1649,7 @@ static void idetape_get_mode_sense_results(ide_drive_t *drive)
> put_unaligned(6*52, (u16 *)&tape->caps[16]);
> return;
> }
> - caps = pc.buf + 4 + pc.buf[3];
> + caps = buf + 4 + buf[3];
Ideally the above change should also be in the separate patch
(or at least documented in the description of this patch).
next prev parent reply other threads:[~2009-05-10 21:36 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-09 7:45 [RFC PATCH 0/12] ide-atapi remove pc->buf Borislav Petkov
2009-05-09 7:45 ` [PATCH 01/14] ide-tape: fix potential fs requests bug Borislav Petkov
2009-05-09 8:02 ` Sam Ravnborg
2009-05-09 8:50 ` Borislav Petkov
2009-05-09 10:25 ` Sam Ravnborg
2009-05-09 12:09 ` Borislav Petkov
2009-05-09 7:45 ` [PATCH 02/14] ide-atapi: switch to blk_rq_bytes() on do_request() path Borislav Petkov
2009-05-10 21:32 ` Bartlomiej Zolnierkiewicz
2009-05-09 7:45 ` [PATCH 03/14] ide-atapi: switch to rq->resid_len Borislav Petkov
2009-05-10 21:32 ` Bartlomiej Zolnierkiewicz
2009-05-11 7:23 ` Borislav Petkov
2009-05-11 11:22 ` Bartlomiej Zolnierkiewicz
2009-05-12 14:38 ` Sergei Shtylyov
2009-05-09 7:45 ` [PATCH 04/14] ide-atapi: add a len-parameter to ide_queue_pc_tail Borislav Petkov
2009-05-09 7:45 ` [PATCH 05/14] ide-atapi: add a buffer-arg " Borislav Petkov
2009-05-10 21:32 ` Bartlomiej Zolnierkiewicz [this message]
2009-05-09 7:45 ` [PATCH 06/14] ide-floppy/ide_floppy_get_flexible_disk_page: use local buffer Borislav Petkov
2009-05-09 7:45 ` [PATCH 07/14] ide-floppy/ide_floppy_get_sfrp_bit: " Borislav Petkov
2009-05-09 7:45 ` [PATCH 08/14] ide-floppy/ide_floppy_format_unit: " Borislav Petkov
2009-05-09 7:45 ` [PATCH 09/14] ide-atapi: use local sense buffer Borislav Petkov
2009-05-10 21:32 ` Bartlomiej Zolnierkiewicz
2009-05-12 7:17 ` Borislav Petkov
2009-05-09 7:45 ` [PATCH 10/14] ide-tape: fix READ POSITION cmd handling Borislav Petkov
2009-05-09 7:45 ` [PATCH 11/14] ide-tape/ide_tape_get_bsize_from_bdesc: use local buffer Borislav Petkov
2009-05-09 7:45 ` [PATCH 12/14] ide-atapi: remove pc->buf Borislav Petkov
2009-05-09 7:45 ` [PATCH 13/14] ide-cd: use whole request_sense buffer in EH Borislav Petkov
2009-05-09 7:45 ` [PATCH 14/14] ide: unify interrupt reason checking Borislav Petkov
2009-05-10 21:39 ` Bartlomiej Zolnierkiewicz
2009-05-10 21:32 ` [RFC PATCH 0/12] ide-atapi remove pc->buf Bartlomiej Zolnierkiewicz
2009-05-10 23:30 ` Tejun Heo
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=200905102332.35931.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petkovbb@googlemail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).