From: Albert Lee <albertcc@tw.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Linux IDE <linux-ide@vger.kernel.org>,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
Doug Maxey <dwm@maxeymade.com>
Subject: [PATCH 4/4] odd length data handling for __atapi_pio_bytes()
Date: Mon, 06 Jun 2005 16:01:09 +0800 [thread overview]
Message-ID: <42A402C5.3050704@tw.ibm.com> (raw)
In-Reply-To: <42A3FF7B.3040201@tw.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
Hi Jeff,
Problem:
- When odd length data is transfered, the last byte of data is lost.
Changes:
- When an odd length data transfer is seen, round it to the next even length.
(The same as atapi_input_bytes() does in the ide-iops.)
Attached please find the patch against the linux-2.6.git tree for your review. Thanks.
Albert
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
[-- Attachment #2: 04_odd_data.diff --]
[-- Type: text/plain, Size: 560 bytes --]
--- 13_atapi_pio_trailing_data_handling/drivers/scsi/libata-core.c 2005-06-06 13:57:18.000000000 +0800
+++ 14_atapi_pio_odd_handling/drivers/scsi/libata-core.c 2005-06-06 14:54:36.000000000 +0800
@@ -2607,6 +2607,13 @@
/* don't cross page boundaries */
count = min(count, (unsigned int)PAGE_SIZE - offset);
+ /* handle the odd condition */
+ if (unlikely(count & 0x01)) {
+ DPRINTK("ata%u: odd count %u rounded: qc->nbytes %u, bytes %u\n",
+ ap->id, count, qc->nbytes, bytes);
+ count++;
+ }
+
buf = kmap(page) + offset;
qc->curbytes += count;
next prev parent reply other threads:[~2005-06-06 8:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-06 7:47 [PATCH 0/4] Resubmit ATAPI PIO mode fixes Albert Lee
2005-06-06 7:56 ` [PATCH 1/4] sg traverse fix for __atapi_pio_bytes() Albert Lee
2005-06-06 9:24 ` Bartlomiej Zolnierkiewicz
2005-06-06 7:58 ` [PATCH 2/4] if condition " Albert Lee
2005-06-06 9:32 ` Bartlomiej Zolnierkiewicz
2005-06-08 3:47 ` Albert Lee
2005-06-08 9:48 ` Bartlomiej Zolnierkiewicz
2005-06-08 11:58 ` Albert Lee
2005-06-08 13:33 ` Bartlomiej Zolnierkiewicz
2005-06-09 4:05 ` Albert Lee
2005-06-09 6:54 ` Bartlomiej Zolnierkiewicz
2005-06-08 13:39 ` Bartlomiej Zolnierkiewicz
2005-06-06 7:59 ` [PATCH 3/4] trailing data handling " Albert Lee
2005-06-06 9:37 ` Bartlomiej Zolnierkiewicz
2005-06-06 8:01 ` Albert Lee [this message]
2005-06-06 9:39 ` [PATCH 4/4] odd length data handling " Bartlomiej Zolnierkiewicz
[not found] ` <42A7ED91.4090008@pobox.com>
2005-06-10 6:08 ` [PATCH 0/4] Resubmit ATAPI PIO mode fixes Albert Lee
2005-06-10 7:38 ` [PATCH 2/4] libata: if condition fix for __atapi_pio_bytes() Albert Lee
2005-06-10 7:56 ` Bartlomiej Zolnierkiewicz
2005-06-10 8:31 ` Albert Lee
2005-06-10 7:44 ` [PATCH 3/4] libata: trailing data handling " Albert Lee
2005-06-10 7:46 ` [PATCH 4/4] libata: odd length data handling " Albert Lee
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=42A402C5.3050704@tw.ibm.com \
--to=albertcc@tw.ibm.com \
--cc=bzolnier@gmail.com \
--cc=dwm@maxeymade.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
/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.