* [PATCH] Make VLSI FIR depend on X86
@ 2003-10-20 6:41 Noah J. Misch
2003-10-20 17:30 ` [irda-users] " Martin Diehl
0 siblings, 1 reply; 7+ messages in thread
From: Noah J. Misch @ 2003-10-20 6:41 UTC (permalink / raw)
To: irda-users; +Cc: netdev, linux-kernel
Greetings,
This is a trivial patch against the Kconfig entry for the VLSI FIR driver to
make it depend on X86. The in-tree code guarantees that the driver will only
build on X86, and according to the comments therein no machine of another
architecture has this hardware anyway.
Granted, no human intelligently configuring a kernel for his or her particular
system would make this mistake, but perhaps someone building a distribution
kernel would. I suggest this patch because it keeps the signal to noise ratio
for those testing allyesconfig builds low.
This patch applies to the linux-2.5 BK tree as of 0400 UTC 10/20/2003, and for
some time before that as well. Please consider for eventual inclusion. It may
be too much of a fringe case until 2.6.0 begins its stable series.
Thanks,
Noah
# 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.1373 -> 1.1374
# drivers/net/irda/Kconfig 1.12 -> 1.13
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/10/16 noah@caltech.edu 1.1374
# Make VLSI_FIR depend on X86. Read the comment just above the #error in
# include/net/irda/vlsi_ir.h for the reason; for now, this driver can never
# compile elsewhere.
# --------------------------------------------
#
diff -Nru a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
--- a/drivers/net/irda/Kconfig Fri Oct 17 13:42:39 2003
+++ b/drivers/net/irda/Kconfig Fri Oct 17 13:42:39 2003
@@ -284,7 +284,7 @@
config VLSI_FIR
tristate "VLSI 82C147 SIR/MIR/FIR (EXPERIMENTAL)"
- depends on EXPERIMENTAL && IRDA && PCI
+ depends on EXPERIMENTAL && IRDA && PCI && X86
help
Say Y here if you want to build support for the VLSI 82C147
PCI-IrDA Controller. This controller is used by the HP OmniBook 800
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [irda-users] [PATCH] Make VLSI FIR depend on X86
2003-10-20 6:41 [PATCH] Make VLSI FIR depend on X86 Noah J. Misch
@ 2003-10-20 17:30 ` Martin Diehl
2003-10-21 4:17 ` David S. Miller
0 siblings, 1 reply; 7+ messages in thread
From: Martin Diehl @ 2003-10-20 17:30 UTC (permalink / raw)
To: Noah J. Misch; +Cc: irda-users, netdev, linux-kernel
On Sun, 19 Oct 2003, Noah J. Misch wrote:
> This is a trivial patch against the Kconfig entry for the VLSI FIR driver to
> make it depend on X86. The in-tree code guarantees that the driver will only
> build on X86, and according to the comments therein no machine of another
> architecture has this hardware anyway.
Well, it would work with any arch, _if_ there was a way to sync the
streaming pci dma buffers before giving them back to hardware. Last time I
checked there was no pci_dma api call to achieve this on all platforms.
For X86 however it's trivial due to cache coherency.
The guy is used with X86 notebooks only - unless whoever owns the
controller design decides to make some CardBus PC-Card for people with
notebooks lacking IrDA-support.
> Granted, no human intelligently configuring a kernel for his or her particular
> system would make this mistake, but perhaps someone building a distribution
> kernel would. I suggest this patch because it keeps the signal to noise ratio
> for those testing allyesconfig builds low.
Valid point, yes.
> This patch applies to the linux-2.5 BK tree as of 0400 UTC 10/20/2003, and for
> some time before that as well. Please consider for eventual inclusion. It may
> be too much of a fringe case until 2.6.0 begins its stable series.
Thanks, second this.
Martin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [irda-users] [PATCH] Make VLSI FIR depend on X86
2003-10-20 17:30 ` [irda-users] " Martin Diehl
@ 2003-10-21 4:17 ` David S. Miller
2003-10-21 7:12 ` Martin Diehl
0 siblings, 1 reply; 7+ messages in thread
From: David S. Miller @ 2003-10-21 4:17 UTC (permalink / raw)
To: Martin Diehl; +Cc: noah, irda-users, netdev, linux-kernel
On Mon, 20 Oct 2003 19:30:33 +0200 (CEST)
Martin Diehl <lists@mdiehl.de> wrote:
> Well, it would work with any arch, _if_ there was a way to sync the
> streaming pci dma buffers before giving them back to hardware.
If pci_dma_sync() doesn't perform the operation you want, please
describe what that operation is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [irda-users] [PATCH] Make VLSI FIR depend on X86
2003-10-21 4:17 ` David S. Miller
@ 2003-10-21 7:12 ` Martin Diehl
2003-10-21 7:12 ` David S. Miller
0 siblings, 1 reply; 7+ messages in thread
From: Martin Diehl @ 2003-10-21 7:12 UTC (permalink / raw)
To: David S. Miller; +Cc: Martin Diehl, noah, irda-users, netdev, linux-kernel
On Mon, 20 Oct 2003, David S. Miller wrote:
> On Mon, 20 Oct 2003 19:30:33 +0200 (CEST)
> Martin Diehl <lists@mdiehl.de> wrote:
>
> > Well, it would work with any arch, _if_ there was a way to sync the
> > streaming pci dma buffers before giving them back to hardware.
>
> If pci_dma_sync() doesn't perform the operation you want, please
> describe what that operation is.
>
Last time I checked pci_dma_sync was meant to sync the mapping when
ownership gets transferred from busmaster to cpu, i.e. after hardware
used/modified the buffer. What about the other direction when the cpu
filled a reused streaming map to device and wants to pass ownership to the
busmaster - we need to flush cpu caches to make sure the busmaster sees
the modified data.
<http://marc.theaimsgroup.com/?l=linux-kernel&m=103221032617171&w=2>
<http://marc.theaimsgroup.com/?l=linux-kernel&m=103221300019951&w=2>
Did I miss something?
Thanks,
Martin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [irda-users] [PATCH] Make VLSI FIR depend on X86
2003-10-21 7:12 ` Martin Diehl
@ 2003-10-21 7:12 ` David S. Miller
2003-10-21 7:33 ` Martin Diehl
0 siblings, 1 reply; 7+ messages in thread
From: David S. Miller @ 2003-10-21 7:12 UTC (permalink / raw)
To: Martin Diehl; +Cc: lists, noah, irda-users, netdev, linux-kernel
On Tue, 21 Oct 2003 09:12:53 +0200 (CEST)
Martin Diehl <lists@mdiehl.de> wrote:
> Last time I checked pci_dma_sync was meant to sync the mapping when
> ownership gets transferred from busmaster to cpu, i.e. after hardware
> used/modified the buffer. What about the other direction when the cpu
> filled a reused streaming map to device and wants to pass ownership to the
> busmaster - we need to flush cpu caches to make sure the busmaster sees
> the modified data.
That's absolutely correct.
Several times I've noted that this is a BUG in the API, that there
is no way to sync the other way, someone just has to add the interface
hooks then all the platform maintainers will implement it.
Here, do this, add a new interface called pci_dma_sync_to_device()
with the appropriate args. Add a NOP implementation to asm-i386/pci.h
and suitable documentation changes to Documentation/DMA-mapping.txt
When you send me that patch, I'll work with the platform maintainers
to take care of the rest.
Deal?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [irda-users] [PATCH] Make VLSI FIR depend on X86
2003-10-21 7:12 ` David S. Miller
@ 2003-10-21 7:33 ` Martin Diehl
2003-10-21 8:13 ` David S. Miller
0 siblings, 1 reply; 7+ messages in thread
From: Martin Diehl @ 2003-10-21 7:33 UTC (permalink / raw)
To: David S. Miller; +Cc: Martin Diehl, noah, irda-users, netdev, linux-kernel
On Tue, 21 Oct 2003, David S. Miller wrote:
> Here, do this, add a new interface called pci_dma_sync_to_device()
> with the appropriate args. Add a NOP implementation to asm-i386/pci.h
> and suitable documentation changes to Documentation/DMA-mapping.txt
>
> When you send me that patch, I'll work with the platform maintainers
> to take care of the rest.
>
> Deal?
Ok, Thanks. Will do it.
One more question: Shouldn't the i386 implementation instead of being NOP
just call flush_write_buffers() - at least this is what the vlsi-private
implementation is doing at the moment?
Martin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [irda-users] [PATCH] Make VLSI FIR depend on X86
2003-10-21 7:33 ` Martin Diehl
@ 2003-10-21 8:13 ` David S. Miller
0 siblings, 0 replies; 7+ messages in thread
From: David S. Miller @ 2003-10-21 8:13 UTC (permalink / raw)
To: Martin Diehl; +Cc: lists, noah, irda-users, netdev, linux-kernel
On Tue, 21 Oct 2003 09:33:24 +0200 (CEST)
Martin Diehl <lists@mdiehl.de> wrote:
> One more question: Shouldn't the i386 implementation instead of being NOP
> just call flush_write_buffers() - at least this is what the vlsi-private
> implementation is doing at the moment?
That seems right, yes.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-10-21 8:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-20 6:41 [PATCH] Make VLSI FIR depend on X86 Noah J. Misch
2003-10-20 17:30 ` [irda-users] " Martin Diehl
2003-10-21 4:17 ` David S. Miller
2003-10-21 7:12 ` Martin Diehl
2003-10-21 7:12 ` David S. Miller
2003-10-21 7:33 ` Martin Diehl
2003-10-21 8:13 ` David S. Miller
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).