public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles
@ 2002-02-11  5:12 reddog83
  2002-02-11  9:49 ` Jens Axboe
  2002-02-11 15:38 ` Paul Fulghum
  0 siblings, 2 replies; 10+ messages in thread
From: reddog83 @ 2002-02-11  5:12 UTC (permalink / raw)
  To: davej; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 279 bytes --]

This is a temp fix for thje synclink.c file in drivers/char it work's for me 
so DJ will you please apply this patch.
Thank you Victor Torres.
All it does it removes the #error please convert me to 
Documentation/DMA-mapping.txt 
it compiles and work's great for me.
Please apply

[-- Attachment #2: synclink.diff --]
[-- Type: text/x-diff, Size: 372 bytes --]

diff -urN linux-2.5.orig/drivers/char/synclink.c.orig linux/drivers/char/synclink.c
--- synclink.c.orig	Sun Feb 10 23:51:50 2002
+++ synclink.c	Sun Feb 10 23:53:14 2002
@@ -60,6 +60,8 @@
 #  define BREAKPOINT() { }
 #endif
 
-#error Please convert me to Documentation/DMA-mapping.txt
-
 #define MAX_ISA_DEVICES 10
 #define MAX_PCI_DEVICES 10
 #define MAX_TOTAL_DEVICES 20

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

* Re: [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles
  2002-02-11  5:12 [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles reddog83
@ 2002-02-11  9:49 ` Jens Axboe
  2002-02-11 15:38 ` Paul Fulghum
  1 sibling, 0 replies; 10+ messages in thread
From: Jens Axboe @ 2002-02-11  9:49 UTC (permalink / raw)
  To: reddog83; +Cc: davej, linux-kernel

On Mon, Feb 11 2002, reddog83 wrote:
> This is a temp fix for thje synclink.c file in drivers/char it work's for me 
> so DJ will you please apply this patch.
> Thank you Victor Torres.
> All it does it removes the #error please convert me to 
> Documentation/DMA-mapping.txt 
> it compiles and work's great for me.

I find this _really_ hard to believe. It may compile, but does it link?

> Please apply

Not really

-- 
Jens Axboe


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

* Re: [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles
  2002-02-11  5:12 [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles reddog83
  2002-02-11  9:49 ` Jens Axboe
@ 2002-02-11 15:38 ` Paul Fulghum
  2002-02-11 20:48   ` reddog83
  1 sibling, 1 reply; 10+ messages in thread
From: Paul Fulghum @ 2002-02-11 15:38 UTC (permalink / raw)
  To: reddog83, davej; +Cc: linux-kernel

> This is a temp fix for thje synclink.c file in drivers/char it work's for
me
> so DJ will you please apply this patch.
> Thank you Victor Torres.
> All it does it removes the #error please convert me to
> Documentation/DMA-mapping.txt
> it compiles and work's great for me.
> Please apply

There is nothing in the DMA-mapping.txt that
applies to the PCI version of the synclink adapter
(which does not do DMA to/from system memory).

The ISA version of the synclink adapter does do
ISA DMA bus master transfers. After reading
DMA-mapping.txt twice it is unclear what changes
need to be applied. The documentation seems to imply
that ISA devices need to make some pci_xxx calls.
I'm not sure how this works when there is no PCI bus.

For now, removing the #error line should work fine
for the PCI adapter and probably for the ISA as well.

I will look at this again as time allows.

I usually wait 6-12 months after the new development
kernel opens before attempting to sync my drivers
to the latest changes. This avoids most of the eat-your-file-system
phase, prevents wasting time chasing after a rapidly changing API,
and still leaves another 12 months for tweaking.

Paul Fulghum, paulkf@microgate.com
Microgate Corporation, www.microgate.com


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

* Re: [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles
  2002-02-11 15:38 ` Paul Fulghum
@ 2002-02-11 20:48   ` reddog83
  2002-02-12  6:56     ` Jens Axboe
  0 siblings, 1 reply; 10+ messages in thread
From: reddog83 @ 2002-02-11 20:48 UTC (permalink / raw)
  To: Paul Fulghum; +Cc: linux-kernel

Paul-
That is understandable. I had  the same guess as you when I made this patch. 
Why is ths synclink.c driver using DMA Mapping. After I took that line out I 
was fine becuase my system is fine. 

On Monday 11 February 2002 10:38 am, you wrote:
> > This is a temp fix for thje synclink.c file in drivers/char it work's for
>
> me
>
> > so DJ will you please apply this patch.
> > Thank you Victor Torres.
> > All it does it removes the #error please convert me to
> > Documentation/DMA-mapping.txt
> > it compiles and work's great for me.
> > Please apply
>
> There is nothing in the DMA-mapping.txt that
> applies to the PCI version of the synclink adapter
> (which does not do DMA to/from system memory).
>
> The ISA version of the synclink adapter does do
> ISA DMA bus master transfers. After reading
> DMA-mapping.txt twice it is unclear what changes
> need to be applied. The documentation seems to imply
> that ISA devices need to make some pci_xxx calls.
> I'm not sure how this works when there is no PCI bus.
>
> For now, removing the #error line should work fine
> for the PCI adapter and probably for the ISA as well.
>
> I will look at this again as time allows.
>
> I usually wait 6-12 months after the new development
> kernel opens before attempting to sync my drivers
> to the latest changes. This avoids most of the eat-your-file-system
> phase, prevents wasting time chasing after a rapidly changing API,
> and still leaves another 12 months for tweaking.
>
> Paul Fulghum, paulkf@microgate.com
> Microgate Corporation, www.microgate.com

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

* Re: [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles
  2002-02-11 20:48   ` reddog83
@ 2002-02-12  6:56     ` Jens Axboe
  2002-02-12  7:03       ` Jens Axboe
  2002-02-12  7:11       ` David S. Miller
  0 siblings, 2 replies; 10+ messages in thread
From: Jens Axboe @ 2002-02-12  6:56 UTC (permalink / raw)
  To: reddog83; +Cc: Paul Fulghum, linux-kernel

On Mon, Feb 11 2002, reddog83 wrote:
> Paul-
> That is understandable. I had  the same guess as you when I made this patch. 
> Why is ths synclink.c driver using DMA Mapping. After I took that line out I 
> was fine becuase my system is fine. 

The "real" fix for synclink is just something like this, afaics.

# 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.275   -> 1.276  
#	drivers/char/synclink.c	1.11    -> 1.12   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/12	axboe@burns.home.kernel.dk	1.276
# synclink is an ISA-only driver, so just use isa_virt_to_bus to make
# it work
# --------------------------------------------
#
diff -Nru a/drivers/char/synclink.c b/drivers/char/synclink.c
--- a/drivers/char/synclink.c	Tue Feb 12 07:55:54 2002
+++ b/drivers/char/synclink.c	Tue Feb 12 07:55:54 2002
@@ -60,8 +60,6 @@
 #  define BREAKPOINT() { }
 #endif
 
-#error Please convert me to Documentation/DMA-mapping.txt
-
 #define MAX_ISA_DEVICES 10
 #define MAX_PCI_DEVICES 10
 #define MAX_TOTAL_DEVICES 20
@@ -3985,7 +3983,7 @@
 		if ( info->buffer_list == NULL )
 			return -ENOMEM;
 			
-		info->buffer_list_phys = virt_to_bus(info->buffer_list);
+		info->buffer_list_phys = isa_virt_to_bus(info->buffer_list);
 	}
 
 	/* We got the memory for the buffer entry lists. */
@@ -4096,7 +4094,7 @@
 				kmalloc(DMABUFFERSIZE, GFP_KERNEL | GFP_DMA);
 			if ( BufferList[i].virt_addr == NULL )
 				return -ENOMEM;
-			phys_addr = virt_to_bus(BufferList[i].virt_addr);
+			phys_addr = isa_virt_to_bus(BufferList[i].virt_addr);
 		}
 		BufferList[i].phys_addr = phys_addr;
 	}

-- 
Jens Axboe


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

* Re: [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles
  2002-02-12  6:56     ` Jens Axboe
@ 2002-02-12  7:03       ` Jens Axboe
  2002-02-12  7:07         ` Jens Axboe
  2002-02-12  7:11       ` David S. Miller
  1 sibling, 1 reply; 10+ messages in thread
From: Jens Axboe @ 2002-02-12  7:03 UTC (permalink / raw)
  To: reddog83; +Cc: Paul Fulghum, linux-kernel

On Tue, Feb 12 2002, Jens Axboe wrote:
> On Mon, Feb 11 2002, reddog83 wrote:
> > Paul-
> > That is understandable. I had  the same guess as you when I made this patch. 
> > Why is ths synclink.c driver using DMA Mapping. After I took that line out I 
> > was fine becuase my system is fine. 
> 
> The "real" fix for synclink is just something like this, afaics.

Agrh, scratch that. It's not ISA only of course, my bad.

-- 
Jens Axboe


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

* Re: [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles
  2002-02-12  7:03       ` Jens Axboe
@ 2002-02-12  7:07         ` Jens Axboe
  0 siblings, 0 replies; 10+ messages in thread
From: Jens Axboe @ 2002-02-12  7:07 UTC (permalink / raw)
  To: reddog83; +Cc: Paul Fulghum, linux-kernel

On Tue, Feb 12 2002, Jens Axboe wrote:
> On Tue, Feb 12 2002, Jens Axboe wrote:
> > On Mon, Feb 11 2002, reddog83 wrote:
> > > Paul-
> > > That is understandable. I had  the same guess as you when I made this patch. 
> > > Why is ths synclink.c driver using DMA Mapping. After I took that line out I 
> > > was fine becuase my system is fine. 
> > 
> > The "real" fix for synclink is just something like this, afaics.
> 
> Agrh, scratch that. It's not ISA only of course, my bad.

For fsck sake, that path was ISA only... Ok, time for coffee.

-- 
Jens Axboe


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

* Re: [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles
  2002-02-12  6:56     ` Jens Axboe
  2002-02-12  7:03       ` Jens Axboe
@ 2002-02-12  7:11       ` David S. Miller
  2002-02-12  7:14         ` Jens Axboe
  1 sibling, 1 reply; 10+ messages in thread
From: David S. Miller @ 2002-02-12  7:11 UTC (permalink / raw)
  To: axboe; +Cc: reddog83, paulkf, linux-kernel

   From: Jens Axboe <axboe@suse.de>
   Date: Tue, 12 Feb 2002 07:56:36 +0100

   On Mon, Feb 11 2002, reddog83 wrote:
   > Paul-
   > That is understandable. I had  the same guess as you when I made this patch. 
   > Why is ths synclink.c driver using DMA Mapping. After I took that line out I 
   > was fine becuase my system is fine. 
   
   The "real" fix for synclink is just something like this, afaics.
   
It is a PCI driver Jens, this change is not correct.

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

* Re: [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles
  2002-02-12  7:11       ` David S. Miller
@ 2002-02-12  7:14         ` Jens Axboe
  2002-02-12 14:24           ` Paul Fulghum
  0 siblings, 1 reply; 10+ messages in thread
From: Jens Axboe @ 2002-02-12  7:14 UTC (permalink / raw)
  To: David S. Miller; +Cc: reddog83, paulkf, linux-kernel

On Mon, Feb 11 2002, David S. Miller wrote:
>    From: Jens Axboe <axboe@suse.de>
>    Date: Tue, 12 Feb 2002 07:56:36 +0100
> 
>    On Mon, Feb 11 2002, reddog83 wrote:
>    > Paul-
>    > That is understandable. I had  the same guess as you when I made this patch. 
>    > Why is ths synclink.c driver using DMA Mapping. After I took that line out I 
>    > was fine becuase my system is fine. 
>    
>    The "real" fix for synclink is just something like this, afaics.
>    
> It is a PCI driver Jens, this change is not correct.

See my repeated follow-ups :-)

-- 
Jens Axboe


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

* Re: [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles
  2002-02-12  7:14         ` Jens Axboe
@ 2002-02-12 14:24           ` Paul Fulghum
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Fulghum @ 2002-02-12 14:24 UTC (permalink / raw)
  To: Jens Axboe, David S. Miller; +Cc: reddog83, linux-kernel

> >    The "real" fix for synclink is just something like this, afaics.
> >    
> > It is a PCI driver Jens, this change is not correct.
> 
> See my repeated follow-ups :-)

It is an ISA and PCI driver, but only the ISA adapter
uses DMA and requires DMA mapping.

Thanks for the patch Jens.

Paul Fulghum, paulkf@microgate.com
Microgate Corporation, www.microgate.com


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

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

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-11  5:12 [PATCH] 2.5.3-dj5 synclink.c fix so that it compiles reddog83
2002-02-11  9:49 ` Jens Axboe
2002-02-11 15:38 ` Paul Fulghum
2002-02-11 20:48   ` reddog83
2002-02-12  6:56     ` Jens Axboe
2002-02-12  7:03       ` Jens Axboe
2002-02-12  7:07         ` Jens Axboe
2002-02-12  7:11       ` David S. Miller
2002-02-12  7:14         ` Jens Axboe
2002-02-12 14:24           ` Paul Fulghum

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