From: Jens Axboe <axboe@suse.de>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] make ide-dma compile in 2.5.4-pre2, woops
Date: Thu, 7 Feb 2002 09:45:12 +0100 [thread overview]
Message-ID: <20020207094512.D16105@suse.de> (raw)
Hi,
A minor slip up on my behalf broke ide-dma compile in 2.5.4-pre2 due to
the scatterlist ->address removal. This patch should make it work again,
but please not that it is NOT a good example for follow for folks trying
to fixup other drivers due to address breakage...
scatterlist building for a task file ioctl will be moved to be unified
with regular bio sglist building instead of the current nasty hack
soonish.
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.223 -> 1.224
# drivers/ide/ide-dma.c 1.9 -> 1.10
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/07 axboe@burns.home.kernel.dk 1.224
# scatterlist address breakage in task file ioctl building
# --------------------------------------------
#
diff -Nru a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
--- a/drivers/ide/ide-dma.c Thu Feb 7 09:44:56 2002
+++ b/drivers/ide/ide-dma.c Thu Feb 7 09:44:56 2002
@@ -266,14 +266,16 @@
#if 1
if (sector_count > 128) {
memset(&sg[nents], 0, sizeof(*sg));
- sg[nents].address = virt_addr;
+ sg[nents].page = virt_to_page(virt_addr);
+ sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK;
sg[nents].length = 128 * SECTOR_SIZE;
nents++;
virt_addr = virt_addr + (128 * SECTOR_SIZE);
sector_count -= 128;
}
memset(&sg[nents], 0, sizeof(*sg));
- sg[nents].address = virt_addr;
+ sg[nents].page = virt_to_page(virt_addr);
+ sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK;
sg[nents].length = sector_count * SECTOR_SIZE;
nents++;
#endif
--
Jens Axboe
next reply other threads:[~2002-02-07 8:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-07 8:45 Jens Axboe [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-02-07 12:35 [PATCH] make ide-dma compile in 2.5.4-pre2, woops Mikael Pettersson
2002-02-07 12:39 ` Jens Axboe
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=20020207094512.D16105@suse.de \
--to=axboe@suse.de \
--cc=linux-kernel@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.