public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make ide-dma compile in 2.5.4-pre2, woops
@ 2002-02-07  8:45 Jens Axboe
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2002-02-07  8:45 UTC (permalink / raw)
  To: Linux Kernel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] make ide-dma compile in 2.5.4-pre2, woops
@ 2002-02-07 12:35 Mikael Pettersson
  2002-02-07 12:39 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Pettersson @ 2002-02-07 12:35 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel

On Thu, 7 Feb 2002 09:45:12 +0100, Jens Axboe wrote:
>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,

ide-dma, ide-scsi, and sg compile and work fine for me in 2.5.4-pre2.
It seems the ->address removal is only in your tree, not Linus'.

/Mikael

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] make ide-dma compile in 2.5.4-pre2, woops
  2002-02-07 12:35 Mikael Pettersson
@ 2002-02-07 12:39 ` Jens Axboe
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2002-02-07 12:39 UTC (permalink / raw)
  To: Mikael Pettersson; +Cc: linux-kernel

On Thu, Feb 07 2002, Mikael Pettersson wrote:
> On Thu, 7 Feb 2002 09:45:12 +0100, Jens Axboe wrote:
> >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,
> 
> ide-dma, ide-scsi, and sg compile and work fine for me in 2.5.4-pre2.
> It seems the ->address removal is only in your tree, not Linus'.

It's quite possible that there is some patch confusion atm, I haven't
even read the 'regular' patch yet. Or maybe it just didn't make
2.5.4-pre2 tag, it seems to be in there.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-02-07 12:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-07  8:45 [PATCH] make ide-dma compile in 2.5.4-pre2, woops Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2002-02-07 12:35 Mikael Pettersson
2002-02-07 12:39 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox