* Re: no atapi cdrecord burning with 2.6.0-test11-bk10 / bk13
From: Måns Rullgård @ 2003-12-17 15:20 UTC (permalink / raw)
To: linux-kernel
In-Reply-To: <Pine.LNX.4.21.0312171604390.32339-100000@needs-no.brain.uni-freiburg.de>
Thomas Voegtle <thomas@voegtle-clan.de> writes:
> cdrecord -dev=ATAPI -scanbus with 2.6.0-test11-bk10 and bk13 shows this:
cdrecord dev=/dev/cdrom -scanbus is the recommended way, whatever
cdrecord tries to make you believe.
--
Måns Rullgård
mru@kth.se
^ permalink raw reply
* PPC 405 OCP EMAC MAL problem
From: l.lucrezia.tiesse @ 2003-12-17 15:16 UTC (permalink / raw)
To: linuxppc-embedded
We have developped a board with NPE405 processor with PPC Linux 2.4.20 kernel, we also have reported various patchs to ibm_ocp device driver, but when we run a test that outputs via FTP big files of both ethernet interfaces contemporarly, we observe that there is a period (few seconds) in which we did not receive any data, then we get a RXDE interrupt and then we see a RXEOB interrupt pending on the MAL, CPU is not interrupted at all.....
Does somebody have any idea ?
thanks a lot
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply
* Re: [LARTC] imq crash investigation
From: Roy @ 2003-12-17 15:16 UTC (permalink / raw)
To: lartc
In-Reply-To: <marc-lartc-107165245312033@msgid-missing>
Now I am continuing imq development, but seems it is hopeless, no mater what
i do it crashes when qdisc are used
seems that it can be not imq problem but somthing wrong with htb.
I completely rewrote imq driver, only device registration left. I checked
many diferent variants of code, and no mater what, it crashes as allways
I even made that packets are never dropped but still it crashes completely
with no reason, probability to crash increases with load.
here is new imq code:
int wequeue=stats->rx_packets-stats->tx_packets;
stats->rx_dropped=wequeue;
if (wequeue >70){
nf_reinject(skb, info, NF_ACCEPT); //not alow to fill queue full so htb
wont drop packets
stats->tx_dropped++;
return 0;
}
stats->rx_packets++;
//-------- the main part of the driver ( packets are newer dropped)
skb->destructor = imq_skb_destructor; // not used this time
skb->real_dev=skb->dev; //not used
skb->dev=imq_dev; //not used also
if (dev_queue_xmit(skb)){
skb->dev=skb->real_dev;
printk("cant queue %p \n",skb); // if this occurs then queue is full. what
never happens
}
//-----------------------------------
As you see it is so simple that there is no space for bugs.
now kernel do not crash, it just hags completely with no output.
so I suspect that there is problem with shaper itself or netfilter, or linux
dont like when packets are reordered.
Now I am going to try completely diferent idea, I thing I should name it not
INQ but NFD because it will be netfilter interface( the part of netfilter
core itself) so EVERYTHING will pass this interface.
> Hello.
>
> As you know Patrick McHardy stopped to support IMQ. As for now, this
> stuff has an annoying problem and I've made a little investigation of
> it. So, maybe it will be useful for someone.
>
> First, pass all traffic of the interface (as in, as out) though imq
> device. Something like:
>
> iptables -t mangle -I PREROUTING -i $DEV -j IMQ
> iptables -t mangle -I POSTROUTING -o $DEV -j IMQ
>
> This works ok. At least, after a day of running this setup seems to be
> stable. Now, lets attach a qdisc to imq:
>
> RATE\x187
> tc qdisc add dev imq0 handle 1: root tbf rate ${RATE}kbit \
> burst 15kb/8 limit 15kb
>
> Ok, here it is. After some time (minutes,hours) I get a kernel panic.
>
> As far as I know, IMQ is the _only_ way for now in Linux to limit the
> total bandwidth of the link (in+out). It would be excellent if somebody,
> enough expirenced in kernel hacking, will be so kind to fix that
problem.
>
> Best regards,
> Ivan Pesin
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply
* Re: alsa timer slippage
From: Jaroslav Kysela @ 2003-12-17 15:13 UTC (permalink / raw)
To: Chris Cannam; +Cc: Pedro Lopez-Cabanillas, alsa-devel
In-Reply-To: <200312150953.08559.cannam@all-day-breakfast.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1525 bytes --]
On Mon, 15 Dec 2003, Chris Cannam wrote:
> On Monday 15 Dec 2003 9:16 am, Chris Cannam wrote:
> > This seems to suggest that the default system-based timer is doing
> > something a bit naive, like assuming it was called back on time
> > without actually checking.
>
> Hmm yes, even this crappy little patch to alsa-kernel/core/timer.c
> (gross adjustment to each system timer tick according to how late the
> previous one was) improves things for me. With this the timer still
> slips, but never quite enough to be audible in a MIDI-only stream.
> The PCM clock is still much much better though.
>
> @@ -940,9 +940,16 @@
> return 1000000000L / HZ;
> }
>
> +static long lateness;
> +
> static void snd_timer_s_function(unsigned long data)
> {
> + struct timer_list *tlist;
> snd_timer_t *timer = (snd_timer_t *)data;
> +
> + tlist = (struct timer_list *) timer->private_data;
> + lateness = (long)jiffies - (long)tlist->expires;
> +
> snd_timer_interrupt(timer, timer->sticks);
> }
>
> @@ -951,7 +958,7 @@
> struct timer_list *tlist;
>
> tlist = (struct timer_list *) timer->private_data;
> - tlist->expires = jiffies + timer->sticks;
> + tlist->expires = jiffies + timer->sticks - lateness;
> add_timer(tlist);
> return 0;
> }
Thanks for insigh to the problem. Can you try the attached patch?
(It's also in CVS.)
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
[-- Attachment #2: Type: TEXT/plain, Size: 3335 bytes --]
Index: timer.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/timer.c,v
retrieving revision 1.52
retrieving revision 1.55
diff -u -r1.52 -r1.55
--- timer.c 23 Oct 2003 14:34:52 -0000 1.52
+++ timer.c 17 Dec 2003 15:14:33 -0000 1.55
@@ -935,6 +935,14 @@
* System timer
*/
+struct snd_timer_system_private {
+ struct timer_list tlist;
+ struct timer * timer;
+ unsigned long last_expires;
+ unsigned long last_jiffies;
+ unsigned long correction;
+};
+
unsigned int snd_timer_system_resolution(void)
{
return 1000000000L / HZ;
@@ -943,26 +951,44 @@
static void snd_timer_s_function(unsigned long data)
{
snd_timer_t *timer = (snd_timer_t *)data;
- snd_timer_interrupt(timer, timer->sticks);
+ struct snd_timer_system_private *priv = timer->private_data;
+ unsigned long jiff = jiffies;
+ if (time_after(jiff, priv->last_expires))
+ priv->correction = (long)jiff - (long)priv->last_expires;
+ snd_timer_interrupt(timer, (long)jiff - (long)priv->last_jiffies);
}
static int snd_timer_s_start(snd_timer_t * timer)
{
- struct timer_list *tlist;
+ struct snd_timer_system_private *priv;
+ unsigned long njiff;
- tlist = (struct timer_list *) timer->private_data;
- tlist->expires = jiffies + timer->sticks;
- add_timer(tlist);
+ priv = (struct snd_timer_system_private *) timer->private_data;
+ njiff = (priv->last_jiffies = jiffies);
+ if (priv->correction > timer->sticks - 1) {
+ priv->correction -= timer->sticks - 1;
+ njiff++;
+ } else {
+ njiff += timer->sticks - priv->correction;
+ priv->correction -= timer->sticks;
+ }
+ priv->last_expires = priv->tlist.expires = njiff;
+ add_timer(&priv->tlist);
return 0;
}
static int snd_timer_s_stop(snd_timer_t * timer)
{
- struct timer_list *tlist;
+ struct snd_timer_system_private *priv;
+ unsigned long jiff;
- tlist = (struct timer_list *) timer->private_data;
- del_timer(tlist);
- timer->sticks = tlist->expires - jiffies;
+ priv = (struct snd_timer_system_private *) timer->private_data;
+ del_timer(&priv->tlist);
+ jiff = jiffies;
+ if (time_before(jiff, priv->last_expires))
+ timer->sticks = priv->last_expires - jiff;
+ else
+ timer->sticks = 1;
return 0;
}
@@ -984,22 +1010,22 @@
static int snd_timer_register_system(void)
{
snd_timer_t *timer;
- struct timer_list *tlist;
+ struct snd_timer_system_private *priv;
int err;
if ((err = snd_timer_global_new("system", SNDRV_TIMER_GLOBAL_SYSTEM, &timer)) < 0)
return err;
strcpy(timer->name, "system timer");
timer->hw = snd_timer_system;
- tlist = (struct timer_list *) snd_kcalloc(sizeof(struct timer_list), GFP_KERNEL);
- if (tlist == NULL) {
+ priv = (struct snd_timer_system_private *) snd_kcalloc(sizeof(struct snd_timer_system_private), GFP_KERNEL);
+ if (priv == NULL) {
snd_timer_free(timer);
return -ENOMEM;
}
- init_timer(tlist);
- tlist->function = snd_timer_s_function;
- tlist->data = (unsigned long) timer;
- timer->private_data = tlist;
+ init_timer(&priv->tlist);
+ priv->tlist.function = snd_timer_s_function;
+ priv->tlist.data = (unsigned long) timer;
+ timer->private_data = priv;
timer->private_free = snd_timer_free_system;
return snd_timer_global_register(timer);
}
^ permalink raw reply
* Re: [PATCH] initialize bootmem maps in reverse order
From: Jesse Barnes @ 2003-12-17 15:12 UTC (permalink / raw)
To: linux-ia64
In-Reply-To: <marc-linux-ia64-107151544512148@msgid-missing>
On Wed, Dec 17, 2003 at 09:06:12AM +0100, Xavier Bru wrote:
> The patch works OK for us.
Great! Fixed it first try! :) David, does this patch look ok for
2.6.1?
Thanks,
Jesse
diff -Nru a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
--- a/arch/ia64/mm/discontig.c Mon Dec 15 10:56:38 2003
+++ b/arch/ia64/mm/discontig.c Mon Dec 15 10:56:38 2003
@@ -134,94 +134,69 @@
int node)
{
unsigned long epfn, cpu, cpus;
- unsigned long pernodesize = 0, pernode;
+ unsigned long pernodesize = 0, pernode, pages, mapsize;
void *cpu_data;
struct bootmem_data *bdp = &mem_data[node].bootmem_data;
epfn = (start + len) >> PAGE_SHIFT;
+ pages = bdp->node_low_pfn - (bdp->node_boot_start >> PAGE_SHIFT);
+ mapsize = bootmem_bootmap_pages(pages) << PAGE_SHIFT;
+
/*
* Make sure this memory falls within this node's usable memory
* since we may have thrown some away in build_maps().
*/
- if (start < bdp->node_boot_start ||
- epfn > bdp->node_low_pfn)
+ if (start < bdp->node_boot_start || epfn > bdp->node_low_pfn)
return 0;
/* Don't setup this node's local space twice... */
- if (!mem_data[node].pernode_addr) {
- /*
- * Calculate total size needed, incl. what's necessary
- * for good alignment and alias prevention.
- */
- cpus = early_nr_cpus_node(node);
- pernodesize += PERCPU_PAGE_SIZE * cpus;
- pernodesize += L1_CACHE_ALIGN(sizeof(pg_data_t));
- pernodesize += L1_CACHE_ALIGN(sizeof(struct ia64_node_data));
- pernodesize = PAGE_ALIGN(pernodesize);
- pernode = NODEDATA_ALIGN(start, node);
-
- /* Is this range big enough for what we want to store here? */
- if (start + len > (pernode + pernodesize)) {
- mem_data[node].pernode_addr = pernode;
- mem_data[node].pernode_size = pernodesize;
- memset(__va(pernode), 0, pernodesize);
-
- cpu_data = (void *)pernode;
- pernode += PERCPU_PAGE_SIZE * cpus;
-
- mem_data[node].pgdat = __va(pernode);
- pernode += L1_CACHE_ALIGN(sizeof(pg_data_t));
-
- mem_data[node].node_data = __va(pernode);
- pernode += L1_CACHE_ALIGN(sizeof(struct ia64_node_data));
-
- mem_data[node].pgdat->bdata = bdp;
- pernode += L1_CACHE_ALIGN(sizeof(pg_data_t));
-
- /*
- * Copy the static per-cpu data into the region we
- * just set aside and then setup __per_cpu_offset
- * for each CPU on this node.
- */
- for (cpu = 0; cpu < NR_CPUS; cpu++) {
- if (node = node_cpuid[cpu].nid) {
- memcpy(__va(cpu_data), __phys_per_cpu_start,
- __per_cpu_end-__per_cpu_start);
- __per_cpu_offset[cpu] - (char*)__va(cpu_data) -
- __per_cpu_start;
- cpu_data += PERCPU_PAGE_SIZE;
- }
- }
- }
- }
+ if (mem_data[node].pernode_addr)
+ return 0;
+
+ /*
+ * Calculate total size needed, incl. what's necessary
+ * for good alignment and alias prevention.
+ */
+ cpus = early_nr_cpus_node(node);
+ pernodesize += PERCPU_PAGE_SIZE * cpus;
+ pernodesize += L1_CACHE_ALIGN(sizeof(pg_data_t));
+ pernodesize += L1_CACHE_ALIGN(sizeof(struct ia64_node_data));
+ pernodesize = PAGE_ALIGN(pernodesize);
+ pernode = NODEDATA_ALIGN(start, node);
+
+ /* Is this range big enough for what we want to store here? */
+ if (start + len > (pernode + pernodesize + mapsize)) {
+ mem_data[node].pernode_addr = pernode;
+ mem_data[node].pernode_size = pernodesize;
+ memset(__va(pernode), 0, pernodesize);
+
+ cpu_data = (void *)pernode;
+ pernode += PERCPU_PAGE_SIZE * cpus;
+
+ mem_data[node].pgdat = __va(pernode);
+ pernode += L1_CACHE_ALIGN(sizeof(pg_data_t));
- pernode = mem_data[node].pernode_addr;
- pernodesize = mem_data[node].pernode_size;
- if (pernode && !bdp->node_bootmem_map) {
- unsigned long pages, mapsize, map = 0;
-
- pages = bdp->node_low_pfn -
- (bdp->node_boot_start >> PAGE_SHIFT);
- mapsize = bootmem_bootmap_pages(pages) << PAGE_SHIFT;
+ mem_data[node].node_data = __va(pernode);
+ pernode += L1_CACHE_ALIGN(sizeof(struct ia64_node_data));
+
+ mem_data[node].pgdat->bdata = bdp;
+ pernode += L1_CACHE_ALIGN(sizeof(pg_data_t));
/*
- * The map will either contain the pernode area or begin
- * after it.
+ * Copy the static per-cpu data into the region we
+ * just set aside and then setup __per_cpu_offset
+ * for each CPU on this node.
*/
- if (pernode - start > mapsize)
- map = start;
- else if (start + len - pernode - pernodesize > mapsize)
- map = pernode + pernodesize;
-
- if (map) {
- init_bootmem_node(mem_data[node].pgdat,
- map>>PAGE_SHIFT,
- bdp->node_boot_start>>PAGE_SHIFT,
- bdp->node_low_pfn);
+ for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ if (node = node_cpuid[cpu].nid) {
+ memcpy(__va(cpu_data), __phys_per_cpu_start,
+ __per_cpu_end - __per_cpu_start);
+ __per_cpu_offset[cpu] = (char*)__va(cpu_data) -
+ __per_cpu_start;
+ cpu_data += PERCPU_PAGE_SIZE;
+ }
}
-
}
return 0;
@@ -314,6 +289,8 @@
*/
void __init find_memory(void)
{
+ int node;
+
reserve_memory();
if (numnodes = 0) {
@@ -327,6 +304,31 @@
/* These actually end up getting called by call_pernode_memory() */
efi_memmap_walk(filter_rsvd_memory, build_node_maps);
efi_memmap_walk(filter_rsvd_memory, find_pernode_space);
+
+ /*
+ * Initialize the boot memory maps in reverse order since that's
+ * what the bootmem allocator expects
+ */
+ for (node = numnodes - 1; node >= 0; node--) {
+ unsigned long pernode, pernodesize, map;
+ struct bootmem_data *bdp;
+
+ bdp = &mem_data[node].bootmem_data;
+ pernode = mem_data[node].pernode_addr;
+ pernodesize = mem_data[node].pernode_size;
+ map = pernode + pernodesize;
+
+ /* Sanity check... */
+ if (!pernode)
+ panic("pernode space for node %d "
+ "could not be allocated!", node);
+
+ init_bootmem_node(mem_data[node].pgdat,
+ map>>PAGE_SHIFT,
+ bdp->node_boot_start>>PAGE_SHIFT,
+ bdp->node_low_pfn);
+ }
+
efi_memmap_walk(filter_rsvd_memory, free_node_bootmem);
reserve_pernode_space();
^ permalink raw reply
* no atapi cdrecord burning with 2.6.0-test11-bk10 / bk13
From: Thomas Voegtle @ 2003-12-17 15:09 UTC (permalink / raw)
To: linux-kernel
Hello,
cdrecord -dev=ATAPI -scanbus with 2.6.0-test11-bk10 and bk13 shows this:
scsibus0:
0,0,0 0) '' '' '' NON CCS Disk
0,1,0 1) '' '' '' NON CCS Disk
but this works well with 2.6.0-test11.
=>
0,0,0 0) 'CREATIVE' ' CD5233E ' '2.05' Removable CD-ROM
0,1,0 1) 'PLEXTOR ' 'CD-R PX-W1610A' '1.04' Removable CD-ROM
SuSE 9.0
please cc me, I'm not subscribed
Greetings
Thomas
--
Thomas Vögtle email: thomas@voegtle-clan.de
----- http://www.voegtle-clan.de/thomas ------
^ permalink raw reply
* Re: Comments and questions about tuning IPTables for high volume
From: Chris Brenton @ 2003-12-17 15:06 UTC (permalink / raw)
To: Pete Davis; +Cc: <
In-Reply-To: <sfe01aa8.008@gwadmin.springisd.org>
On Wed, 2003-12-17 at 09:58, Pete Davis wrote:
>
> Questions:
> 1) Any suggestions on other tuning?
You may want to have a look at LARTC:
http://www.lartc.org/
I used these tweaks to push a few boxes with less than half the
horsepower of yours up speeds of 300 Mb/s. Only problem I had was with
logging, but ULOG should cure that.
HTH,
C
^ permalink raw reply
* Feature suggestion: internal logdrop table
From: Markus Saarinen @ 2003-12-17 15:04 UTC (permalink / raw)
To: netfilter-devel
Would it be possible to have a 'logdrop' target coded into iptables?
I know that i can manually create a table with a simple log & drop rules,
but it gets very long ruleset if i want to have different log prefixes
for different
kind of matches, e.g.:
iptables -A INPUT -s subnet1 -d somewhere -j LOG --log-prefix "fromsubnet1"
iptables -A INPUT -s subnet1 -d somewhere -j DROP
iptables -A INPUT -s subnet2 -d somewhere -j LOG --log-prefix "fromsubnet2"
iptables -A INPUT -s subnet2 -d somewhere -j DROP
...and so on...
Whereas this would seem much more convenient and logical:
iptables -A INPUT -s subnet1 -d somewhere -j LOGDROP --log-prefix
"fromsubnet1"
iptables -A INPUT -s subnet2 -d somewhere -j LOGDROP --log-prefix
"fromsubnet2"
From a bit of Googling, i've seen that quite many people actually
create these log-drop
chains by hand (myself included), so think it would actually be a quite
useful feature.
Not to mention the few clockticks my firewall would save when it could
just drop the
packet from the same rule without traversing back to the original chain
and parsing
a new rule ;-)
Cheers,
Markus
^ permalink raw reply
* small parser fix
From: Marco d'Itri @ 2003-12-17 15:02 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 223 bytes --]
The parser will complain if the rules file contains empty lines.
BTW, it's a real PITA udev exiting without an output or logging if a
single line in a config file cannot be parsed.
--
ciao, |
Marco | [3659 anKlt7WQ1y7rw]
[-- Attachment #2: fix_nl_rules --]
[-- Type: text/plain, Size: 387 bytes --]
diff -ruN udev-009.orig/namedev_parse.c udev-009/namedev_parse.c
--- udev-009.orig/namedev_parse.c 2003-12-16 03:26:49.000000000 +0100
+++ udev-009/namedev_parse.c 2003-12-17 15:52:20.000000000 +0100
@@ -159,7 +160,7 @@
dbg_parse("read '%s'", temp);
/* empty line? */
- if (*temp == 0x00)
+ if (*temp == 0x00 || *temp == '\n')
continue;
/* see if this is a comment */
^ permalink raw reply
* Re: Simple partition not detected with 2.6
From: Andries Brouwer @ 2003-12-17 14:59 UTC (permalink / raw)
To: Ludovic Drolez; +Cc: linux-kernel
In-Reply-To: <20031217112046.GA31709@joebar.freealter.fr>
On Wed, Dec 17, 2003 at 12:20:46PM +0100, Ludovic Drolez wrote:
> I've attached a boot log.
> In fact it seems that it's not a partitions problem but a disk
> detection problem: the IDE controller is detected but not the disks...
>
> The server is an HP-DL320 with integrated RAID IDE.
OK - in that case I can refer you to Bartlomiej Zolnierkiewicz,
our IDE maintainer.
^ permalink raw reply
* Comments and questions about tuning IPTables for high volume
From: Pete Davis @ 2003-12-17 14:58 UTC (permalink / raw)
To: netfilter
I have tuned my IPTables box running Redhat 9 on a dual 1ghz box with
1GB and raid1 scsi160 (2x36gb). It is acting as a temporary replacement
(to test throughput/prove the proxy is a bottleneck) for our proxy but
it is NOT doing anything other than routing with a few firewall rules to
block ICMPs and UDP Microsoft ports (lingering Nachi infections). Here
are the parameters I have tuned and other pertinent settings:
ulimit -n 8192
/proc/sys/fs/file-max 104851
/proc/sys/net/ipv4/ip_conntrack_max 65528
sysctl ((Not sure exactly what they mean but these were the defaults...
Anyone have explanations for them??):
net.ipv4.tcp_wmem 4096 16384 131072
net.core.wmem_default = 65535
net.core.wmem_max = 131071
(the rmem settings are the same)
I have seen up to 9700 connections in ip_conntrack with 95%+ being HTTP
connections. The CPU never goes about 5%. It has 800mb+ free.
Questions:
1) Any suggestions on other tuning? It is just a packet processor
(router) with a few rules... less than 20 total. It is protected by a
firewall so I don't need rule tuning/suggestions just throughput
suggestions. It is servicing 6000+ desktops on an uncapped ds3
(normally capped at 15mb/s but uncapped for testing by the ISP).
2) I tuned sysctl for things like source routing, ICMP echo broadcast,
'martians, etc. I turned on syncookies also. Any sysctl things I may
have missed for an IPTables firewall?
3) I have tuned the max number of open files and file descriptors but a
cat /proc/sys/fs/file-nr says "240 67 104851", or close to it (not much
being used). When I do a "lsof | wc -l", I get a number between 300 and
390. Question: I thought that each connection took one or more file
descriptors? (I might be confusing it with FreeBSD, which I also use).
I thought the max number of open files was necessary for an IPTables
firewall/'router' also, correct??
4) When I do a 'vmstat', I see the number of interrupts steadily
climbing up (under 'system' the column labeled 'in'). Once it gets near
300-350, it goes back to zero. It doesn't seem to be tied to the number
of connections or any other statistic I can find. I suspect the
interrupts are related to the NIC. Any ideas what might be going on?
Is this even a concern based on the purpose/performance of the box (It
has gotten up to 21mb/s to the internet).
BTW, thanks to all for the help on the syslogd problem. It was set up
correctly and 'started' working some time between Thursday night and
Monday morning... I have no idea why it took a few hours to kick it but
thanks to all anyway.
Pete
^ permalink raw reply
* libipq
From: Oumer Teyeb @ 2003-12-17 14:57 UTC (permalink / raw)
To: netfilter
Hi,
I have a linux box (propriotry of some company) where there is an
installation of iptables but not of libipq. As I want to do some
userspace programming, I naturally want libipq installed. Is there an
easy way of installing libipq without the need to recompile my kernel (I
don't even have the source for the kernel) or reinstall the iptables
that is already there? Will it be enough just to run make under the
libipq sub-directory of the iptables source code? I just don't want to
mess the iptables that is already working.
Thanks in advance,
Oumer
^ permalink raw reply
* [LARTC] Source routing two services in the intranet
From: azeredo @ 2003-12-17 14:57 UTC (permalink / raw)
To: lartc
Hi.
A few months ago I asked the list about source routing and got a nice
solution by Martin Brown. Thanks a lot for the help Martin Brown. Actually my
problem now is related to the one before and so i think it is useful to
rewrite it here:
Quoting Martin
- private (rfc1918) internal network with services published to the
world
- two public networks
- a single service (in the internal network) which should be reachable
on an IP in each public network
Solution:
The key to the general solution of this problem is to use separate pairs
of IPs for the entire path from the outside world to the internal network.
The internal service (e.g., webserver) must host two IP addresses. One IP
address can be reached via DNAT from public network 1 and the other IP
address can be reached via DNAT from the other network.
The detailed solution can be looked up here:
http://linux-ip.net/html/adv-multi-internet.html#adv-multi-internet-inbound
namely,
[root@masq-gw]#ip route add nat 67.17.28.10 via 192.168.100.10
[root@masq-gw]# ip rule add nat 67.17.28.10 from 192.168.100.10 table 4
[root@masq-gw]# ip route add nat 205.254.211.17 via 192.168.100.17
[root@masq-gw]# ip rule add nat 205.254.211.17 from 192.168.100.17
[root@masq-gw]# ip rule show
0: from all lookup local
32765: from 192.168.100.17 lookup main map-to 205.254.211.17
32765: from 192.168.100.10 lookup 4 map-to 67.17.28.10
32766: from all lookup main
32767: from all lookup 253
[root@masq-gw]# ip route show table local | grep ^nat
nat 205.254.211.17 via 192.168.100.17 scope host
nat 67.17.28.10 via 192.168.100.10 scope host
This solution above has a drawback. If i have to provide a different service
on a different computer in the internal network I can't, since every package
that reaches the linux router is being redirected to the same computer in the
internal network. Assume that besides the web service in
192.168.100.10-192.168.100.17 (IP alias used here) we want to to provide ssh
service on 192.168.100.20-192.168.100.21 and want to source routing both
services in the linux. I believe that to solve this i need to operate with
iptables and iproute together and DNAT the requests according to the port it is
addressed to. It seems that iproute by itself cannot do that. But to
accomplish this i thing that a solid knowledge of how the packages traverse the
kernel is necessary and that is what
I am not sure about. So I would really appreciate if anyone could help me write
the iptables and iproute rules for the example just mentioned. That would be a
great help.
Thanks a lot for your attention,
Aldrovando Araújo
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply
* libipq
From: Oumer Teyeb @ 2003-12-17 14:49 UTC (permalink / raw)
To: netfilter
In-Reply-To: <010d01c3c3d0$0541fb50$63ea38c3@hewlett7k6i3ca>
Hi,
I have a linux box (propriotry of some company) where there is an
installation of iptables but not of libipq. As I want to do some
userspace programming, I naturally want libipq installed. Is there an
easy way of installing libipq without the need to recompile my kernel (I
don't even have the source for the kernel) or reinstall the iptables
that is already there? Will it be enough just to run make under the
libipq sub-directory of the iptables source code? I just don't want to
mess the iptables that is already working.
Thanks in advance,
Oumer
^ permalink raw reply
* Program map for USB devices
From: Dirk Heinrichs @ 2003-12-17 14:48 UTC (permalink / raw)
To: autofs
[-- Attachment #1.1: Type: text/plain, Size: 648 bytes --]
Hi,
I've got several USB devices which are all accessed as SCSI disc through the
usb-storage driver. Since the device node they are attached to depends on
plugin order, I need to know how to find out which hardware is attached to
which /dev/sd*, so that I can write a program map.
Any hints?
Thanx...
Dirk
--
Dirk Heinrichs | Tel: +49 (0)151 1513 6954
Configuration Manager | Fax: +49 (0)211 47068 111
Cap Gemini Ernst & Young| Mail: dirk.heinrichs@cgey.com
Hambornerstraße 55 | Web: http://www.cgey.com
D-40472 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net
[-- Attachment #1.2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 140 bytes --]
_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs
^ permalink raw reply
* Re: Port Redirection with iptables
From: Jason Cook @ 2003-12-17 14:48 UTC (permalink / raw)
To: netfilter
I tried port scanning the linux box. Port 80
responded as Squid. The PREROUTING line in my
iptables showed traffic.
This might be a stupid question, but how do you set up
the client to use the linux box as a
gateway/firewall/cache server?
I have the linux box set as the default gateway/DNS
server on the client machine (along with the real DNS
server)
> > I am trying to install Linux as a firewall and
> caching
> > server with iptables and Linux. I
> > need to do this transparently.
> >
> > I installed Red Hat Linux 9. Ran all of the
> updates
> > nice and smooth. Turned on ip forwarding.
> > Configured Squid...and tested it by specifying the
> > servers ip address and port 3128 from the
> > browser. Works great. Here the options I had
> changed
> > in the config file.
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
^ permalink raw reply
* [linux-lvm] weird duplicate pv problem
From: Tupshin Harper @ 2003-12-17 14:48 UTC (permalink / raw)
To: linux-lvm
I have an lvm2 volume group composed of about 8 different pvs. Recently,
most lvm commmands started displaying errors like below. Not that it is
claiming duplicate PVs, but the duplicates are contained in /dev/nbd/*,
and I'm not actually using any network block devices. I have NBD comiled
into the kernel, and I'm about to compiling a kernel with nbd not
compiled in and see if that helps, but it seems extremely odd that lvm
would detect duplicate pvs on unused nbd devices.
The effects of the problem (in addition to getting these warnings, are
that any change to a lv(resizing, for example), will render that lv
inactive or suspended (have seen both), until I do a magic incarnation
that involves first "vgcfgrestore" and then "lvchange -a y" on the
affected lv. Note that vgcfgrestore does not make the warnings go away,
but it does allow the lvchange command to succeed.
Any thoughts? FWIW, I am using devfs, and I'm still curious about a
reasonable migration strategy to move an lvm2 setup to non-devfs. Kernel
2.6.0-test11, lvm tools that come with debian sid(lvm version 2.00.05,
library version 1.00.05-ioctl-cvs, driver version 4.0.0).
-Tupshin
> vgdisplay lvm_group_1
Found duplicate PV M20svyTZBtuUWDqrlVcwufe0UTwu7bsP: using /dev/nbd/1
not /dev/hdg1
Incorrect metadata area header checksum
Found duplicate PV vnA2QpnmuXZpj5oAFKymumCCEICD0HA1: using /dev/nbd/65
not /dev/hdh1
Incorrect metadata area header checksum
Found duplicate PV cG67YV7KK1Imi8x0sZGl5gpiKXlyXKGV: using /dev/nbd/66
not /dev/hdl1
Incorrect metadata area header checksum
Found duplicate PV cG67YV7KK1Imi8x0sZGl5gpiKXlyXKGV: using /dev/nbd/67
not /dev/hdl1
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/68
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/69
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/70
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/71
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/72
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/73
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/74
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/75
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/76
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/77
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/78
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/79
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/80
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/81
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/82
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/83
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/84
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/85
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/86
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/87
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/88
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/89
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/90
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/91
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/92
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/93
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/94
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/95
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/96
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/97
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/98
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using /dev/nbd/99
not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/100 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/101 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/102 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/103 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/104 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/105 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/106 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/107 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/108 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/109 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/110 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/111 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/112 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/113 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/114 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/115 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/116 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/117 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/118 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/119 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/120 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/121 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/122 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/123 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/124 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/125 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/126 not /dev/hdb4
Incorrect metadata area header checksum
Found duplicate PV 4oBUtBXUZ23rcLjA9AHc3XGQLxpjqIxv: using
/dev/nbd/127 not /dev/hdb4
Incorrect metadata area header checksum
Incorrect metadata area header checksum
Incorrect metadata area header checksum
Incorrect metadata area header checksum
Incorrect metadata area header checksum
WARNING: Volume group "lvm_group_1" inconsistent
--- Volume group ---
VG Name lvm_group_1
System ID PV_IMP(none)1043708474
Format lvm2
Metadata Areas 8
Metadata Sequence No 49
VG Access read/write
VG Status resizable
MAX LV 256
Cur LV 32
Open LV 31
Max PV 256
Cur PV 8
Act PV 8
VG Size 672.97 GB
PE Size 32.00 MB
Total PE 21535
Alloc PE / Size 11546 / 360.81 GB
Free PE / Size 9989 / 312.16 GB
VG UUID yw5iGA-cA7L-OHCF-iWxJ-rOaR-wg9u-ncQcu6
^ permalink raw reply
* [PATCH 2.4] Wolfson AC97 touch screen driver - build
From: Liam Girdwood @ 2003-12-17 14:45 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 176 bytes --]
This patch removes the battery monitor text from the kernel build
configuration. The battery monitor will eventually be a separate driver.
Patch is against 2.4.24-pre1
Liam
[-- Attachment #2: wm97xx-build.diff --]
[-- Type: text/x-patch, Size: 640 bytes --]
diff -urN a/drivers/sound/Config.in b/drivers/sound/Config.in
--- a/drivers/sound/Config.in 2003-11-28 18:26:20.000000000 +0000
+++ b/drivers/sound/Config.in 2003-12-17 14:05:40.000000000 +0000
@@ -234,7 +234,7 @@
dep_tristate ' AD1980 front/back switch plugin' CONFIG_SOUND_AD1980 $CONFIG_SOUND
-dep_tristate ' Wolfson Touchscreen/BMON plugin' CONFIG_SOUND_WM97XX $CONFIG_SOUND
+dep_tristate ' Wolfson Touchscreen plugin' CONFIG_SOUND_WM97XX $CONFIG_SOUND
# A cross directory dependence. The sound modules will need gameport.o compiled in,
# but it resides in the drivers/char/joystick directory. This define_tristate takes
^ permalink raw reply
* [PATCH 2.4] Wolfson AC97 touch screen driver - documentation
From: Liam Girdwood @ 2003-12-17 14:45 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 136 bytes --]
This patch updates the driver documentation to reflect the use of the
kernel input event interface.
Patch is against 2.4.24-pre1
Liam
[-- Attachment #2: wm97xx-docs.diff --]
[-- Type: text/x-patch, Size: 1397 bytes --]
diff -urN a/Documentation/Configure.help b/Documentation/Configure.help
--- a/Documentation/Configure.help 2003-12-17 11:59:19.000000000 +0000
+++ b/Documentation/Configure.help 2003-12-17 14:04:13.000000000 +0000
@@ -28651,13 +28651,6 @@
Please see Documentation/wolfson-touchscreen.txt for
a complete list of parameters.
- In order to use this driver, a char device called wm97xx with a major
- number of 10 and minor number 16 will have to be created under
- /dev/touchscreen.
-
- e.g.
- mknod /dev/touchscreen/wm97xx c 10 16
-
If you want to compile this as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here. The module will be called ac97_plugin_wm97xx.o.
diff -urN a/Documentation/wolfson-touchscreen.txt b/Documentation/wolfson-touchscreen.txt
--- a/Documentation/wolfson-touchscreen.txt 2003-11-28 18:26:19.000000000 +0000
+++ b/Documentation/wolfson-touchscreen.txt 2003-12-17 14:00:03.000000000 +0000
@@ -37,12 +37,8 @@
Driver Usage
============
-In order to use this driver, a char device called wm97xx with a major
-number of 10 and minor number 16 will have to be created under
-/dev/touchscreen.
-
-e.g.
-mknod /dev/touchscreen/wm97xx c 10 16
+This driver uses the kernel input event interface. Please see
+Documentation/input/input.txt section 3.2.4 for details.
Driver Parameters
^ permalink raw reply
* [PATCH 2.4] Wolfson AC97 touch screen driver - wm97xx.h
From: Liam Girdwood @ 2003-12-17 14:44 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 166 bytes --]
This patch moves the wm97xx.h header from include/linux to drivers/sound
as the driver now uses the kernel input event interface.
Patch is against 2.4.24-pre1
Liam
[-- Attachment #2: wm97xx-h.diff --]
[-- Type: text/x-patch, Size: 9276 bytes --]
diff -urN a/drivers/sound/wm97xx.h b/drivers/sound/wm97xx.h
--- a/drivers/sound/wm97xx.h 1970-01-01 01:00:00.000000000 +0100
+++ b/drivers/sound/wm97xx.h 2003-12-17 14:07:32.000000000 +0000
@@ -0,0 +1,96 @@
+
+/*
+ * Register bits for Wolfson WM97xx series of codecs
+ */
+
+#ifndef _WM97XX_H_
+#define _WM97XX_H_
+
+#include <linux/ac97_codec.h> /* AC97 control layer */
+
+/*
+ * WM97xx AC97 Touchscreen registers
+ */
+#define AC97_WM97XX_DIGITISER1 0x76
+#define AC97_WM97XX_DIGITISER2 0x78
+#define AC97_WM97XX_DIGITISER_RD 0x7a
+
+/*
+ * WM97xx register bits
+ */
+#define WM97XX_POLL 0x8000 /* initiate a polling measurement */
+#define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */
+#define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */
+#define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */
+#define WM97XX_COO 0x0800 /* enable coordinate mode */
+#define WM97XX_CTC 0x0400 /* enable continuous mode */
+#define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */
+#define WM97XX_CM_RATE_187 0x0100 /* 187.5Hz continuous rate */
+#define WM97XX_CM_RATE_375 0x0200 /* 375Hz continuous rate */
+#define WM97XX_CM_RATE_750 0x0300 /* 750Hz continuous rate */
+#define WM97XX_CM_RATE_8K 0x00f0 /* 8kHz continuous rate */
+#define WM97XX_CM_RATE_12K 0x01f0 /* 12kHz continuous rate */
+#define WM97XX_CM_RATE_24K 0x02f0 /* 24kHz continuous rate */
+#define WM97XX_CM_RATE_48K 0x03f0 /* 48kHz continuous rate */
+#define WM97XX_DELAY(i) ((i << 4) & 0x00f0) /* sample delay times */
+#define WM97XX_SLEN 0x0008 /* slot read back enable */
+#define WM97XX_SLT(i) ((i - 5) & 0x7) /* touchpanel slot selection (5-11) */
+#define WM97XX_PRP_DETW 0x4000 /* pen detect on, digitiser off, wake up */
+#define WM97XX_PRP_DET 0x8000 /* pen detect on, digitiser off, no wake up */
+#define WM97XX_PRP_DET_DIG 0xc000 /* pen detect on, digitiser on */
+#define WM97XX_RPR 0x2000 /* wake up on pen down */
+#define WM97XX_PEN_DOWN 0x8000 /* pen is down */
+
+/* WM9712 Bits */
+#define WM9712_45W 0x1000 /* set for 5-wire touchscreen */
+#define WM9712_PDEN 0x0800 /* measure only when pen down */
+#define WM9712_WAIT 0x0200 /* wait until adc is read before next sample */
+#define WM9712_PIL 0x0100 /* current used for pressure measurement. set 400uA else 200uA */
+#define WM9712_MASK_HI 0x0040 /* hi on mask pin (47) stops conversions */
+#define WM9712_MASK_EDGE 0x0080 /* rising/falling edge on pin delays sample */
+#define WM9712_MASK_SYNC 0x00c0 /* rising/falling edge on mask initiates sample */
+#define WM9712_RPU(i) (i&0x3f) /* internal pull up on pen detect (64k / rpu) */
+#define WM9712_ADCSEL_COMP1 0x4000 /* COMP1/AUX1 measurement (pin29) */
+#define WM9712_ADCSEL_COMP2 0x5000 /* COMP2/AUX2 measurement (pin30) */
+#define WM9712_ADCSEL_BMON 0x6000 /* BMON/AUX3 measurement (pin31) */
+#define WM9712_ADCSEL_WIPER 0x7000 /* WIPER/AUX4 measurement (pin12) */
+#define WM9712_PD(i) (0x1 << i) /* power management */
+
+/* WM9712 Registers */
+#define AC97_WM9712_POWER 0x24
+#define AC97_WM9712_REV 0x58
+
+/* WM9705 Bits */
+#define WM9705_PDEN 0x1000 /* measure only when pen is down */
+#define WM9705_PINV 0x0800 /* inverts sense of pen down output */
+#define WM9705_BSEN 0x0400 /* BUSY flag enable, pin47 is 1 when busy */
+#define WM9705_BINV 0x0200 /* invert BUSY (pin47) output */
+#define WM9705_WAIT 0x0100 /* wait until adc is read before next sample */
+#define WM9705_PIL 0x0080 /* current used for pressure measurement. set 400uA else 200uA */
+#define WM9705_PHIZ 0x0040 /* set PHONE and PCBEEP inputs to high impedance */
+#define WM9705_MASK_HI 0x0010 /* hi on mask stops conversions */
+#define WM9705_MASK_EDGE 0x0020 /* rising/falling edge on pin delays sample */
+#define WM9705_MASK_SYNC 0x0030 /* rising/falling edge on mask initiates sample */
+#define WM9705_PDD(i) (i & 0x000f) /* pen detect comparator threshold */
+#define WM9705_ADCSEL_BMON 0x4000 /* BMON measurement */
+#define WM9705_ADCSEL_AUX 0x5000 /* AUX measurement */
+#define WM9705_ADCSEL_PHONE 0x6000 /* PHONE measurement */
+#define WM9705_ADCSEL_PCBEEP 0x7000 /* PCBEEP measurement */
+
+/* AUX ADC ID's */
+#define TS_COMP1 0x0
+#define TS_COMP2 0x1
+#define TS_BMON 0x2
+#define TS_WIPER 0x3
+
+/* ID numbers */
+#define WM97XX_ID1 0x574d
+#define WM9712_ID2 0x4c12
+#define WM9705_ID2 0x4c05
+
+#define AC97_LINK_FRAME 21 /* time in uS for AC97 link frame */
+
+void register_touchscreen_codec(struct ac97_codec *codec);
+void unregister_touchscreen_codec(struct ac97_codec *codec);
+
+#endif
diff -urN a/include/linux/wm97xx.h b/include/linux/wm97xx.h
--- a/include/linux/wm97xx.h 2003-11-28 18:26:21.000000000 +0000
+++ b/include/linux/wm97xx.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,96 +0,0 @@
-
-/*
- * Register bits for Wolfson WM97xx series of codecs
- */
-
-#ifndef _WM97XX_H_
-#define _WM97XX_H_
-
-#include <linux/ac97_codec.h> /* AC97 control layer */
-
-/*
- * WM97xx AC97 Touchscreen registers
- */
-#define AC97_WM97XX_DIGITISER1 0x76
-#define AC97_WM97XX_DIGITISER2 0x78
-#define AC97_WM97XX_DIGITISER_RD 0x7a
-
-/*
- * WM97xx register bits
- */
-#define WM97XX_POLL 0x8000 /* initiate a polling measurement */
-#define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */
-#define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */
-#define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */
-#define WM97XX_COO 0x0800 /* enable coordinate mode */
-#define WM97XX_CTC 0x0400 /* enable continuous mode */
-#define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */
-#define WM97XX_CM_RATE_187 0x0100 /* 187.5Hz continuous rate */
-#define WM97XX_CM_RATE_375 0x0200 /* 375Hz continuous rate */
-#define WM97XX_CM_RATE_750 0x0300 /* 750Hz continuous rate */
-#define WM97XX_CM_RATE_8K 0x00f0 /* 8kHz continuous rate */
-#define WM97XX_CM_RATE_12K 0x01f0 /* 12kHz continuous rate */
-#define WM97XX_CM_RATE_24K 0x02f0 /* 24kHz continuous rate */
-#define WM97XX_CM_RATE_48K 0x03f0 /* 48kHz continuous rate */
-#define WM97XX_DELAY(i) ((i << 4) & 0x00f0) /* sample delay times */
-#define WM97XX_SLEN 0x0008 /* slot read back enable */
-#define WM97XX_SLT(i) ((i - 5) & 0x7) /* touchpanel slot selection (5-11) */
-#define WM97XX_PRP_DETW 0x4000 /* pen detect on, digitiser off, wake up */
-#define WM97XX_PRP_DET 0x8000 /* pen detect on, digitiser off, no wake up */
-#define WM97XX_PRP_DET_DIG 0xc000 /* pen detect on, digitiser on */
-#define WM97XX_RPR 0x2000 /* wake up on pen down */
-#define WM97XX_PEN_DOWN 0x8000 /* pen is down */
-
-/* WM9712 Bits */
-#define WM9712_45W 0x1000 /* set for 5-wire touchscreen */
-#define WM9712_PDEN 0x0800 /* measure only when pen down */
-#define WM9712_WAIT 0x0200 /* wait until adc is read before next sample */
-#define WM9712_PIL 0x0100 /* current used for pressure measurement. set 400uA else 200uA */
-#define WM9712_MASK_HI 0x0040 /* hi on mask pin (47) stops conversions */
-#define WM9712_MASK_EDGE 0x0080 /* rising/falling edge on pin delays sample */
-#define WM9712_MASK_SYNC 0x00c0 /* rising/falling edge on mask initiates sample */
-#define WM9712_RPU(i) (i&0x3f) /* internal pull up on pen detect (64k / rpu) */
-#define WM9712_ADCSEL_COMP1 0x4000 /* COMP1/AUX1 measurement (pin29) */
-#define WM9712_ADCSEL_COMP2 0x5000 /* COMP2/AUX2 measurement (pin30) */
-#define WM9712_ADCSEL_BMON 0x6000 /* BMON/AUX3 measurement (pin31) */
-#define WM9712_ADCSEL_WIPER 0x7000 /* WIPER/AUX4 measurement (pin12) */
-#define WM9712_PD(i) (0x1 << i) /* power management */
-
-/* WM9712 Registers */
-#define AC97_WM9712_POWER 0x24
-#define AC97_WM9712_REV 0x58
-
-/* WM9705 Bits */
-#define WM9705_PDEN 0x1000 /* measure only when pen is down */
-#define WM9705_PINV 0x0800 /* inverts sense of pen down output */
-#define WM9705_BSEN 0x0400 /* BUSY flag enable, pin47 is 1 when busy */
-#define WM9705_BINV 0x0200 /* invert BUSY (pin47) output */
-#define WM9705_WAIT 0x0100 /* wait until adc is read before next sample */
-#define WM9705_PIL 0x0080 /* current used for pressure measurement. set 400uA else 200uA */
-#define WM9705_PHIZ 0x0040 /* set PHONE and PCBEEP inputs to high impedance */
-#define WM9705_MASK_HI 0x0010 /* hi on mask stops conversions */
-#define WM9705_MASK_EDGE 0x0020 /* rising/falling edge on pin delays sample */
-#define WM9705_MASK_SYNC 0x0030 /* rising/falling edge on mask initiates sample */
-#define WM9705_PDD(i) (i & 0x000f) /* pen detect comparator threshold */
-#define WM9705_ADCSEL_BMON 0x4000 /* BMON measurement */
-#define WM9705_ADCSEL_AUX 0x5000 /* AUX measurement */
-#define WM9705_ADCSEL_PHONE 0x6000 /* PHONE measurement */
-#define WM9705_ADCSEL_PCBEEP 0x7000 /* PCBEEP measurement */
-
-/* AUX ADC ID's */
-#define TS_COMP1 0x0
-#define TS_COMP2 0x1
-#define TS_BMON 0x2
-#define TS_WIPER 0x3
-
-/* ID numbers */
-#define WM97XX_ID1 0x574d
-#define WM9712_ID2 0x4c12
-#define WM9705_ID2 0x4c05
-
-#define AC97_LINK_FRAME 21 /* time in uS for AC97 link frame */
-
-void register_touchscreen_codec(struct ac97_codec *codec);
-void unregister_touchscreen_codec(struct ac97_codec *codec);
-
-#endif
^ permalink raw reply
* [PATCH 2.4] Wolfson AC97 touch screen driver - Input Event interface
From: Liam Girdwood @ 2003-12-17 14:44 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
This patch adds support for the kernel input event interface to the
Wolfson WM9705/WM9712 touchscreen driver.
Patch is against 2.4.24-pre1
Changes:-
o Added Input event interface (Stanley Cai)
o Improved driver CPU utilisation (Ian Molton)
o Removed ADC source bits from output (me)
o Added coordinate streaming mode on XScale (me)
o Removed old h3600 TS_EVENT interface (me)
Liam
[-- Attachment #2: wm97xx-driver.diff --]
[-- Type: text/x-patch, Size: 43963 bytes --]
diff -urN a/drivers/sound/ac97_plugin_wm97xx.c b/drivers/sound/ac97_plugin_wm97xx.c
--- a/drivers/sound/ac97_plugin_wm97xx.c 2003-11-28 18:26:20.000000000 +0000
+++ b/drivers/sound/ac97_plugin_wm97xx.c 2003-12-17 14:14:36.000000000 +0000
@@ -5,6 +5,7 @@
* Copyright 2003 Wolfson Microelectronics PLC.
* Author: Liam Girdwood
* liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
+ * parts (c) Ian Molton <spyro@f2s.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -32,56 +33,82 @@
* - supports WM9705, WM9712
* - polling mode
* - coordinate polling
+ * - continuous mode
* - adjustable rpu/dpp settings
* - adjustable pressure current
* - adjustable sample settle delay
* - 4 and 5 wire touchscreens (5 wire is WM9712 only)
* - pen down detection
- * - battery monitor
- * - sample AUX adc's
* - power management
- * - direct AC97 IO from userspace (#define WM97XX_TS_DEBUG)
*
* TODO:
- * - continuous mode
* - adjustable sample rate
* - AUX adc in coordinate / continous modes
- * - Official device identifier or misc device ?
+ * - Codec GPIO
+ * - battery monitor
+ * - sample AUX adc's
*
* Revision history
* 7th May 2003 Initial version.
* 6th June 2003 Added non module support and AC97 registration.
* 18th June 2003 Added AUX adc sampling.
* 23rd June 2003 Did some minimal reformatting, fixed a couple of
- * locking bugs and noted a race to fix.
+ * locking bugs and noted a race to fix.
* 24th June 2003 Added power management and fixed race condition.
+ * 10th July 2003 Changed to a misc device.
+ * 31st July 2003 Moved TS_EVENT and TS_CAL to wm97xx.h
+ * 8th Aug 2003 Added option for read() calling wm97xx_sample_touch()
+ * because some ac97_read/ac_97_write call schedule()
+ * 7th Nov 2003 Added Input touch event interface, stanley.cai@intel.com
+ * 13th Nov 2003 Removed h3600 touch interface, added interrupt based
+ * pen down notification and implemented continous mode
+ * on XScale arch.
+ * 4th Dec 2003 Removed ADC src bits from sample data.
*/
#include <linux/module.h>
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/fs.h>
+#include <linux/input.h>
#include <linux/delay.h>
-#include <linux/poll.h>
#include <linux/string.h>
#include <linux/proc_fs.h>
-#include <linux/miscdevice.h>
#include <linux/pm.h>
-#include <linux/wm97xx.h> /* WM97xx registers and bits */
#include <asm/uaccess.h> /* get_user,copy_to_user */
#include <asm/io.h>
-#define TS_NAME "ac97_plugin_wm97xx"
+#include "wm97xx.h"
+
+#define TS_NAME "wm97xx"
#define TS_MINOR 16
-#define WM_TS_VERSION "0.6"
+#define WM_TS_VERSION "0.10"
#define AC97_NUM_REG 64
+/*
+ * Machine specific set up.
+ *
+ * This is for targets that can support a PEN down interrupt and/or
+ * streaming back touch data in an AC97 slot (not slot 1). The
+ * streaming touch data is read back via the targets AC97 FIFO's
+ */
+#if defined(CONFIG_ARCH_PXA)
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/irqs.h>
+#define WM97XX_IRQ IRQ_AC97
+#define WM97XX_FIFO_HAS_DATA MISR & (1 << 2)
+#define WM97XX_READ_FIFO MODR & (0xffff)
+#endif
+
+#ifndef WM97XX_IRQ
+#define WM97XX_IRQ 0
+#define WM97XX_FIFO_HAS_DATA 0
+#define WM97XX_READ_FIFO 0
+#endif
/*
* Debug
*/
-
#define PFX TS_NAME
#define WM97XX_TS_DEBUG 0
@@ -97,8 +124,7 @@
/*
* Module parameters
*/
-
-
+
/*
* Set the codec sample mode.
*
@@ -124,8 +150,8 @@
*/
MODULE_PARM(mode,"i");
MODULE_PARM_DESC(mode, "Set WM97XX operation mode");
-static int mode = 0;
-
+static int mode = 0;
+
/*
* WM9712 - Set internal pull up for pen detect.
*
@@ -137,7 +163,7 @@
*/
MODULE_PARM(rpu,"i");
MODULE_PARM_DESC(rpu, "Set internal pull up resitor for pen detect.");
-static int rpu = 0;
+static int rpu = 0;
/*
* WM9705 - Pen detect comparator threshold.
@@ -151,8 +177,8 @@
*/
MODULE_PARM(pdd,"i");
MODULE_PARM_DESC(pdd, "Set pen detect comparator threshold");
-static int pdd = 0;
-
+static int pdd = 0;
+
/*
* Set current used for pressure measurement.
*
@@ -174,7 +200,7 @@
*/
MODULE_PARM(five_wire,"i");
MODULE_PARM_DESC(five_wire, "Set 5 wire touchscreen.");
-static int five_wire = 0;
+static int five_wire = 0;
/*
* Set adc sample delay.
@@ -190,104 +216,71 @@
*/
MODULE_PARM(delay,"i");
MODULE_PARM_DESC(delay, "Set adc sample delay.");
-static int delay = 4;
-
+static int delay = 4;
-/* +++++++++++++ Lifted from include/linux/h3600_ts.h ++++++++++++++*/
-typedef struct {
- unsigned short pressure; // touch pressure
- unsigned short x; // calibrated X
- unsigned short y; // calibrated Y
- unsigned short millisecs; // timestamp of this event
-} TS_EVENT;
-
-typedef struct {
- int xscale;
- int xtrans;
- int yscale;
- int ytrans;
- int xyswap;
-} TS_CAL;
-
-/* Use 'f' as magic number */
-#define IOC_MAGIC 'f'
-
-#define TS_GET_RATE _IO(IOC_MAGIC, 8)
-#define TS_SET_RATE _IO(IOC_MAGIC, 9)
-#define TS_GET_CAL _IOR(IOC_MAGIC, 10, TS_CAL)
-#define TS_SET_CAL _IOW(IOC_MAGIC, 11, TS_CAL)
-
-/* +++++++++++++ Done lifted from include/linux/h3600_ts.h +++++++++*/
-
-#define TS_GET_COMP1 _IOR(IOC_MAGIC, 12, short)
-#define TS_GET_COMP2 _IOR(IOC_MAGIC, 13, short)
-#define TS_GET_BMON _IOR(IOC_MAGIC, 14, short)
-#define TS_GET_WIPER _IOR(IOC_MAGIC, 15, short)
-
-#ifdef WM97XX_TS_DEBUG
-/* debug get/set ac97 codec register ioctl's */
-#define TS_GET_AC97_REG _IOR(IOC_MAGIC, 20, short)
-#define TS_SET_AC97_REG _IOW(IOC_MAGIC, 21, short)
-#define TS_SET_AC97_INDEX _IOW(IOC_MAGIC, 22, short)
-#endif
-
-#define EVENT_BUFSIZE 128
+/*
+ * Pen down detection
+ *
+ * Pen down detection can either be via an interrupt (preferred) or
+ * by polling the PDEN bit. This is an option because some systems may
+ * not support the pen down interrupt.
+ *
+ * Set pen_int to 1 to enable interrupt driven pen down detection.
+ */
+MODULE_PARM(pen_int,"i");
+MODULE_PARM_DESC(pen_int, "Set pen down interrupt");
+static int pen_int = 0;
typedef struct {
- TS_CAL cal; /* Calibration values */
- TS_EVENT event_buf[EVENT_BUFSIZE];/* The event queue */
- int nextIn, nextOut;
- int event_count;
int is_wm9712:1; /* are we a WM912 or a WM9705 */
int is_registered:1; /* Is the driver AC97 registered */
- int line_pgal:5;
- int line_pgar:5;
- int phone_pga:5;
- int mic_pgal:5;
- int mic_pgar:5;
- int overruns; /* event buffer overruns */
int adc_errs; /* sample read back errors */
-#ifdef WM97XX_TS_DEBUG
- short ac97_index;
-#endif
- struct fasync_struct *fasync; /* asynch notification */
- struct timer_list acq_timer; /* Timer for triggering acquisitions */
wait_queue_head_t wait; /* read wait queue */
spinlock_t lock;
struct ac97_codec *codec;
+#if defined(CONFIG_PROC_FS)
struct proc_dir_entry *wm97xx_ts_ps;
-#ifdef WM97XX_TS_DEBUG
- struct proc_dir_entry *wm97xx_debug_ts_ps;
#endif
+#if defined(CONFIG_PM)
struct pm_dev * pm;
+ int line_pgal:5;
+ int line_pgar:5;
+ int phone_pga:5;
+ int mic_pgal:5;
+ int mic_pgar:5;
+#endif
+ struct input_dev *idev;
+ struct completion init_exit;
+ struct task_struct *rtask;
+ struct semaphore sem;
+ int use_count;
+ int restart;
} wm97xx_ts_t;
static inline void poll_delay (void);
static int __init wm97xx_ts_init_module(void);
-static int wm97xx_poll_read_adc (wm97xx_ts_t* ts, u16 adcsel, u16* sample);
-static int wm97xx_coord_read_adc (wm97xx_ts_t* ts, u16* x, u16* y,
- u16* pressure);
static inline int pendown (wm97xx_ts_t *ts);
-static void wm97xx_acq_timer(unsigned long data);
-static int wm97xx_fasync(int fd, struct file *filp, int mode);
-static int wm97xx_ioctl(struct inode * inode, struct file *filp,
- unsigned int cmd, unsigned long arg);
-static unsigned int wm97xx_poll(struct file * filp, poll_table * wait);
-static ssize_t wm97xx_read(struct file * filp, char * buf, size_t count,
- loff_t * l);
-static int wm97xx_open(struct inode * inode, struct file * filp);
-static int wm97xx_release(struct inode * inode, struct file * filp);
+static void wm97xx_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+static int wm97xx_poll_read_adc (wm97xx_ts_t* ts, u16 adcsel, u16* sample);
static void init_wm97xx_phy(void);
-static int adc_get (wm97xx_ts_t *ts, unsigned short *value, int id);
static int wm97xx_probe(struct ac97_codec *codec, struct ac97_driver *driver);
static void wm97xx_remove(struct ac97_codec *codec, struct ac97_driver *driver);
static void wm97xx_ts_cleanup_module(void);
+static int wm97xx_ts_evt_add(wm97xx_ts_t* ts, u16 pressure, u16 x, u16 y);
+static int wm97xx_ts_evt_release(wm97xx_ts_t* ts);
+
+#if defined(CONFIG_PM)
static int wm97xx_pm_event(struct pm_dev *dev, pm_request_t rqst, void *data);
static void wm97xx_suspend(void);
static void wm97xx_resume(void);
static void wm9712_pga_save(wm97xx_ts_t* ts);
static void wm9712_pga_restore(wm97xx_ts_t* ts);
+#endif
+/* we only support a single touchscreen */
+static wm97xx_ts_t wm97xx_ts;
+static struct input_dev wm97xx_input;
+
/* AC97 registration info */
static struct ac97_driver wm9705_driver = {
codec_id: 0x574D4C05,
@@ -304,38 +297,40 @@
probe: wm97xx_probe,
remove: __devexit_p(wm97xx_remove),
};
-
-/* we only support a single touchscreen */
-static wm97xx_ts_t wm97xx_ts;
-
+
/*
* ADC sample delay times in uS
*/
static const int delay_table[16] = {
- 21, // 1 AC97 Link frames
- 42, // 2
- 84, // 4
- 167, // 8
- 333, // 16
- 667, // 32
- 1000, // 48
- 1333, // 64
- 2000, // 96
- 2667, // 128
- 3333, // 160
- 4000, // 192
- 4667, // 224
- 5333, // 256
- 6000, // 288
- 0 // No delay, switch matrix always on
+ 21,// 1 AC97 Link frames
+ 42,// 2
+ 84,// 4
+ 167,// 8
+ 333,// 16
+ 667,// 32
+ 1000,// 48
+ 1333,// 64
+ 2000,// 96
+ 2667,// 128
+ 3333,// 160
+ 4000,// 192
+ 4667,// 224
+ 5333,// 256
+ 6000,// 288
+ 0 // No delay, switch matrix always on
};
+// Todo
+static void wm97xx_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+ info("int recv");
+}
+
/*
* Delay after issuing a POLL command.
*
* The delay is 3 AC97 link frames + the touchpanel settling delay
*/
-
static inline void poll_delay(void)
{
int pdelay = 3 * AC97_LINK_FRAME + delay_table[delay];
@@ -344,63 +339,6 @@
/*
- * sample the auxillary ADC's
- */
-
-static int adc_get(wm97xx_ts_t* ts, unsigned short * value, int id)
-{
- short adcsel = 0;
-
- /* first find out our adcsel flag */
- if (ts->is_wm9712) {
- switch (id) {
- case TS_COMP1:
- adcsel = WM9712_ADCSEL_COMP1;
- break;
- case TS_COMP2:
- adcsel = WM9712_ADCSEL_COMP2;
- break;
- case TS_BMON:
- adcsel = WM9712_ADCSEL_BMON;
- break;
- case TS_WIPER:
- adcsel = WM9712_ADCSEL_WIPER;
- break;
- }
- } else {
- switch (id) {
- case TS_COMP1:
- adcsel = WM9705_ADCSEL_PCBEEP;
- break;
- case TS_COMP2:
- adcsel = WM9705_ADCSEL_PHONE;
- break;
- case TS_BMON:
- adcsel = WM9705_ADCSEL_BMON;
- break;
- case TS_WIPER:
- adcsel = WM9705_ADCSEL_AUX;
- break;
- }
- }
-
- /* now sample the adc */
- if (mode == 1) {
- /* coordinate mode - not currently available (TODO) */
- return 0;
- }
- else
- {
- /* polling mode */
- if (!wm97xx_poll_read_adc(ts, adcsel, value))
- return 0;
- }
-
- return 1;
-}
-
-
-/*
* Read a sample from the adc in polling mode.
*/
static int wm97xx_poll_read_adc (wm97xx_ts_t* ts, u16 adcsel, u16* sample)
@@ -412,7 +350,7 @@
dig1 = ts->codec->codec_read(ts->codec, AC97_WM97XX_DIGITISER1);
dig1&=0x0fff;
ts->codec->codec_write(ts->codec, AC97_WM97XX_DIGITISER1, dig1 | adcsel |
- WM97XX_POLL);
+ WM97XX_POLL);
/* wait 3 AC97 time slots + delay for conversion */
poll_delay();
@@ -420,7 +358,7 @@
/* wait for POLL to go low */
while ((ts->codec->codec_read(ts->codec, AC97_WM97XX_DIGITISER1) & WM97XX_POLL) && timeout) {
udelay(AC97_LINK_FRAME);
- timeout--;
+ timeout--;
}
if (timeout > 0)
*sample = ts->codec->codec_read(ts->codec, AC97_WM97XX_DIGITISER_RD);
@@ -429,7 +367,7 @@
err ("adc sample timeout");
return 0;
}
-
+
/* check we have correct sample */
if ((*sample & 0x7000) != adcsel ) {
err ("adc wrong sample, read %x got %x", adcsel, *sample & 0x7000);
@@ -487,334 +425,91 @@
}
/*
- * Is the pen down ?
+ * Sample the touchscreen in polling mode
*/
-static inline int pendown (wm97xx_ts_t *ts)
+int wm97xx_poll_touch(wm97xx_ts_t *ts)
{
- return ts->codec->codec_read(ts->codec, AC97_WM97XX_DIGITISER_RD) & WM97XX_PEN_DOWN;
-}
-
-/*
- * X,Y coordinates and pressure aquisition function.
- * This function is run by a kernel timer and it's frequency between
- * calls is the touchscreen polling rate;
- */
-
-static void wm97xx_acq_timer(unsigned long data)
-{
- wm97xx_ts_t* ts = (wm97xx_ts_t*)data;
- unsigned long flags;
- long x,y;
- TS_EVENT event;
+ u16 x, y, p;
- spin_lock_irqsave(&ts->lock, flags);
-
- /* are we still registered ? */
- if (!ts->is_registered) {
- spin_unlock_irqrestore(&ts->lock, flags);
- return; /* we better stop then */
+ if (!wm97xx_poll_read_adc(ts, WM97XX_ADCSEL_X, &x)) {
+ info("x %d\n", x);
+ return -EIO;
}
-
- /* read coordinates if pen is down */
- if (!pendown(ts))
- goto acq_exit;
-
- if (mode == 1) {
- /* coordinate mode */
- if (!wm97xx_coord_read_adc(ts, (u16*)&x, (u16*)&y, &event.pressure))
- goto acq_exit;
- } else
- {
- /* polling mode */
- if (!wm97xx_poll_read_adc(ts, WM97XX_ADCSEL_X, (u16*)&x))
- goto acq_exit;
- if (!wm97xx_poll_read_adc(ts, WM97XX_ADCSEL_Y, (u16*)&y))
- goto acq_exit;
-
- /* only read pressure if we have to */
- if (!five_wire && pil) {
- if (!wm97xx_poll_read_adc(ts, WM97XX_ADCSEL_PRES, &event.pressure))
- goto acq_exit;
- }
- else
- event.pressure = 0;
+ if (!wm97xx_poll_read_adc(ts, WM97XX_ADCSEL_Y, &y)) {
+ info("y %d\n", y);
+ return -EIO;
}
- /* timestamp this new event. */
- event.millisecs = jiffies;
-
- /* calibrate and remove unwanted bits from samples */
- event.pressure &= 0x0fff;
-
- x &= 0x00000fff;
- x = ((ts->cal.xscale * x) >> 8) + ts->cal.xtrans;
- event.x = (u16)x;
-
- y &= 0x00000fff;
- y = ((ts->cal.yscale * y) >> 8) + ts->cal.ytrans;
- event.y = (u16)y;
-
- /* add this event to the event queue */
- ts->event_buf[ts->nextIn++] = event;
- if (ts->nextIn == EVENT_BUFSIZE)
- ts->nextIn = 0;
- if (ts->event_count < EVENT_BUFSIZE) {
- ts->event_count++;
- } else {
- /* throw out the oldest event */
- if (++ts->nextOut == EVENT_BUFSIZE) {
- ts->nextOut = 0;
- ts->overruns++;
- }
- }
-
- /* async notify */
- if (ts->fasync)
- kill_fasync(&ts->fasync, SIGIO, POLL_IN);
- /* wake up any read call */
- if (waitqueue_active(&ts->wait))
- wake_up_interruptible(&ts->wait);
-
- /* schedule next acquire */
-acq_exit:
- ts->acq_timer.expires = jiffies + HZ / 100;
- add_timer(&ts->acq_timer);
-
- spin_unlock_irqrestore(&ts->lock, flags);
-}
-
-
-/* +++++++++++++ File operations ++++++++++++++*/
-
-static int wm97xx_fasync(int fd, struct file *filp, int mode)
-{
- wm97xx_ts_t* ts = (wm97xx_ts_t*)filp->private_data;
- return fasync_helper(fd, filp, mode, &ts->fasync);
-}
-
-static int wm97xx_ioctl(struct inode * inode, struct file *filp,
- unsigned int cmd, unsigned long arg)
-{
- unsigned short adc_value;
-#ifdef WM97XX_TS_DEBUG
- short data;
-#endif
- wm97xx_ts_t* ts = (wm97xx_ts_t*)filp->private_data;
-
- switch(cmd) {
- case TS_GET_RATE: /* TODO: what is this? */
- break;
- case TS_SET_RATE: /* TODO: what is this? */
- break;
- case TS_GET_CAL:
- if(copy_to_user((char *)arg, (char *)&ts->cal, sizeof(TS_CAL)))
- return -EFAULT;
- break;
- case TS_SET_CAL:
- if(copy_from_user((char *)&ts->cal, (char *)arg, sizeof(TS_CAL)))
- return -EFAULT;
- break;
- case TS_GET_COMP1:
- if (adc_get(ts, &adc_value, TS_COMP1)) {
- if(copy_to_user((char *)arg, (char *)&adc_value, sizeof(adc_value)))
- return -EFAULT;
- }
- else
- return -EIO;
- break;
- case TS_GET_COMP2:
- if (adc_get(ts, &adc_value, TS_COMP2)) {
- if(copy_to_user((char *)arg, (char *)&adc_value, sizeof(adc_value)))
- return -EFAULT;
- }
- else
- return -EIO;
- break;
- case TS_GET_BMON:
- if (adc_get(ts, &adc_value, TS_BMON)) {
- if(copy_to_user((char *)arg, (char *)&adc_value, sizeof(adc_value)))
- return -EFAULT;
- }
- else
+ if (pil && !five_wire) {
+ if (!wm97xx_poll_read_adc(ts, WM97XX_ADCSEL_PRES, &p)) {
+ info("p %d\n", p);
return -EIO;
- break;
- case TS_GET_WIPER:
- if (adc_get(ts, &adc_value, TS_WIPER)) {
- if(copy_to_user((char *)arg, (char *)&adc_value, sizeof(adc_value)))
- return -EFAULT;
}
- else
- return -EIO;
- break;
-#ifdef WM97XX_TS_DEBUG
- /* debug get/set ac97 codec register ioctl's
- *
- * This is direct IO to the codec registers - BE CAREFULL
- */
- case TS_GET_AC97_REG: /* read from ac97 reg (index) */
- data = ts->codec->codec_read(ts->codec, ts->ac97_index);
- if(copy_to_user((char *)arg, (char *)&data, sizeof(data)))
- return -EFAULT;
- break;
- case TS_SET_AC97_REG: /* write to ac97 reg (index) */
- if(copy_from_user((char *)&data, (char *)arg, sizeof(data)))
- return -EFAULT;
- ts->codec->codec_write(ts->codec, ts->ac97_index, data);
- break;
- case TS_SET_AC97_INDEX: /* set ac97 reg index */
- if(copy_from_user((char *)&ts->ac97_index, (char *)arg, sizeof(ts->ac97_index)))
- return -EFAULT;
- break;
-#endif
- default:
- return -EINVAL;
+ } else {
+ p = 0xffff;
}
-
- return 0;
-}
-
-static unsigned int wm97xx_poll(struct file * filp, poll_table * wait)
-{
- wm97xx_ts_t *ts = (wm97xx_ts_t *)filp->private_data;
- poll_wait(filp, &ts->wait, wait);
- if (ts->event_count)
- return POLLIN | POLLRDNORM;
- return 0;
+
+ wm97xx_ts_evt_add(ts, p, x, y);
+ return 1;
}
-static ssize_t wm97xx_read(struct file *filp, char *buf, size_t count, loff_t *l)
+/*
+ * Sample the touchscreen in polling coordinate mode
+ */
+int wm97xx_poll_coord_touch(wm97xx_ts_t *ts)
{
- wm97xx_ts_t* ts = (wm97xx_ts_t*)filp->private_data;
- unsigned long flags;
- TS_EVENT event;
- int i;
-
- /* are we still registered with AC97 layer ? */
- spin_lock_irqsave(&ts->lock, flags);
- if (!ts->is_registered) {
- spin_unlock_irqrestore(&ts->lock, flags);
- return -ENXIO;
- }
-
- if (ts->event_count == 0) {
- if (filp->f_flags & O_NONBLOCK)
- return -EAGAIN;
- spin_unlock_irqrestore(&ts->lock, flags);
-
- wait_event_interruptible(ts->wait, ts->event_count != 0);
-
- /* are we still registered after sleep ? */
- spin_lock_irqsave(&ts->lock, flags);
- if (!ts->is_registered) {
- spin_unlock_irqrestore(&ts->lock, flags);
- return -ENXIO;
- }
- if (signal_pending(current))
- return -ERESTARTSYS;
- }
+ u16 x, y, p;
- for (i = count; i >= sizeof(TS_EVENT);
- i -= sizeof(TS_EVENT), buf += sizeof(TS_EVENT)) {
- if (ts->event_count == 0)
- break;
- spin_lock_irqsave(&ts->lock, flags);
- event = ts->event_buf[ts->nextOut++];
- if (ts->nextOut == EVENT_BUFSIZE)
- ts->nextOut = 0;
- if (ts->event_count)
- ts->event_count--;
- spin_unlock_irqrestore(&ts->lock, flags);
- if(copy_to_user(buf, &event, sizeof(TS_EVENT)))
- return i != count ? count - i : -EFAULT;
- }
- return count - i;
+ if (wm97xx_coord_read_adc(ts, &x, &y, &p)) {
+ wm97xx_ts_evt_add(ts, p, x, y);
+ return 1;
+ } else
+ return -EIO;
}
-
-static int wm97xx_open(struct inode * inode, struct file * filp)
+/*
+ * Sample the touchscreen in continous mode
+ */
+int wm97xx_cont_touch(wm97xx_ts_t *ts)
{
- wm97xx_ts_t* ts;
- unsigned long flags;
- u16 val;
- int minor = MINOR(inode->i_rdev);
+ u16 x, y;
+ int count = 0;
- if (minor != TS_MINOR)
- return -ENODEV;
-
- filp->private_data = ts = &wm97xx_ts;
-
- spin_lock_irqsave(&ts->lock, flags);
-
- /* are we registered with AC97 layer ? */
- if (!ts->is_registered) {
- spin_unlock_irqrestore(&ts->lock, flags);
- return -ENXIO;
+ /* currently assuming x is followed by y from the FIFO */
+ while (WM97XX_FIFO_HAS_DATA) {
+ x = WM97XX_READ_FIFO;
+ y = WM97XX_READ_FIFO;
+ wm97xx_ts_evt_add(ts, 0, x, y);
+ count++;
}
-
- /* start digitiser */
- val = ts->codec->codec_read(ts->codec, AC97_WM97XX_DIGITISER2);
- ts->codec->codec_write(ts->codec, AC97_WM97XX_DIGITISER2,
- val | WM97XX_PRP_DET_DIG);
-
- /* flush event queue */
- ts->nextIn = ts->nextOut = ts->event_count = 0;
-
- /* Set up timer. */
- init_timer(&ts->acq_timer);
- ts->acq_timer.function = wm97xx_acq_timer;
- ts->acq_timer.data = (unsigned long)ts;
- ts->acq_timer.expires = jiffies + HZ / 100;
- add_timer(&ts->acq_timer);
-
- spin_unlock_irqrestore(&ts->lock, flags);
- return 0;
+ return count;
}
-static int wm97xx_release(struct inode * inode, struct file * filp)
+/*
+ * Is the pen down ?
+ */
+static inline int pendown (wm97xx_ts_t *ts)
{
- wm97xx_ts_t* ts = (wm97xx_ts_t*)filp->private_data;
- unsigned long flags;
- u16 val;
-
- wm97xx_fasync(-1, filp, 0);
- del_timer_sync(&ts->acq_timer);
-
- spin_lock_irqsave(&ts->lock, flags);
-
- /* stop digitiser */
- val = ts->codec->codec_read(ts->codec, AC97_WM97XX_DIGITISER2);
- ts->codec->codec_write(ts->codec, AC97_WM97XX_DIGITISER2,
- val & ~WM97XX_PRP_DET_DIG);
-
- spin_unlock_irqrestore(&ts->lock, flags);
- return 0;
+ if (pen_int) {
+
+ } else {
+ return ts->codec->codec_read(ts->codec, AC97_WM97XX_DIGITISER_RD)
+ & WM97XX_PEN_DOWN;
+ }
}
-static struct file_operations ts_fops = {
- owner: THIS_MODULE,
- read: wm97xx_read,
- poll: wm97xx_poll,
- ioctl: wm97xx_ioctl,
- fasync: wm97xx_fasync,
- open: wm97xx_open,
- release: wm97xx_release,
-};
-
-/* +++++++++++++ End File operations ++++++++++++++*/
-
-#ifdef CONFIG_PROC_FS
+#if defined(CONFIG_PROC_FS)
static int wm97xx_read_proc (char *page, char **start, off_t off,
- int count, int *eof, void *data)
+ int count, int *eof, void *data)
{
int len = 0, prpu;
u16 dig1, dig2, digrd, adcsel, adcsrc, slt, prp, rev;
unsigned long flags;
char srev = ' ';
-
wm97xx_ts_t* ts;
if ((ts = data) == NULL)
return -ENODEV;
-
+
spin_lock_irqsave(&ts->lock, flags);
if (!ts->is_registered) {
spin_unlock_irqrestore(&ts->lock, flags);
@@ -828,38 +523,35 @@
rev = (ts->codec->codec_read(ts->codec, AC97_WM9712_REV) & 0x000c) >> 2;
spin_unlock_irqrestore(&ts->lock, flags);
-
+
adcsel = dig1 & 0x7000;
adcsrc = digrd & 0x7000;
slt = (dig1 & 0x7) + 5;
prp = dig2 & 0xc000;
prpu = dig2 & 0x003f;
- /* driver version */
len += sprintf (page+len, "Wolfson WM97xx Version %s\n", WM_TS_VERSION);
-
- /* what we are using */
+
len += sprintf (page+len, "Using %s", ts->is_wm9712 ? "WM9712" : "WM9705");
if (ts->is_wm9712) {
switch (rev) {
- case 0x0:
- srev = 'A';
+ case 0x0:
+ srev = 'A';
break;
- case 0x1:
- srev = 'B';
+ case 0x1:
+ srev = 'B';
break;
- case 0x2:
- srev = 'D';
+ case 0x2:
+ srev = 'D';
break;
- case 0x3:
- srev = 'E';
+ case 0x3:
+ srev = 'E';
break;
}
len += sprintf (page+len, " silicon rev %c\n",srev);
} else
len += sprintf (page+len, "\n");
-
- /* WM97xx settings */
+
len += sprintf (page+len, "Settings :\n%s%s%s%s",
dig1 & WM97XX_POLL ? " -sampling adc data(poll)\n" : "",
adcsel == WM97XX_ADCSEL_X ? " -adc set to X coordinate\n" : "",
@@ -867,18 +559,18 @@
adcsel == WM97XX_ADCSEL_PRES ? " -adc set to pressure\n" : "");
if (ts->is_wm9712) {
len += sprintf (page+len, "%s%s%s%s",
- adcsel == WM9712_ADCSEL_COMP1 ? " -adc set to COMP1/AUX1\n" : "",
- adcsel == WM9712_ADCSEL_COMP2 ? " -adc set to COMP2/AUX2\n" : "",
- adcsel == WM9712_ADCSEL_BMON ? " -adc set to BMON\n" : "",
- adcsel == WM9712_ADCSEL_WIPER ? " -adc set to WIPER\n" : "");
- } else {
+ adcsel == WM9712_ADCSEL_COMP1 ? " -adc set to COMP1/AUX1\n" : "",
+ adcsel == WM9712_ADCSEL_COMP2 ? " -adc set to COMP2/AUX2\n" : "",
+ adcsel == WM9712_ADCSEL_BMON ? " -adc set to BMON\n" : "",
+ adcsel == WM9712_ADCSEL_WIPER ? " -adc set to WIPER\n" : "");
+ } else {
len += sprintf (page+len, "%s%s%s%s",
- adcsel == WM9705_ADCSEL_PCBEEP ? " -adc set to PCBEEP\n" : "",
- adcsel == WM9705_ADCSEL_PHONE ? " -adc set to PHONE\n" : "",
- adcsel == WM9705_ADCSEL_BMON ? " -adc set to BMON\n" : "",
- adcsel == WM9705_ADCSEL_AUX ? " -adc set to AUX\n" : "");
- }
-
+ adcsel == WM9705_ADCSEL_PCBEEP ? " -adc set to PCBEEP\n" : "",
+ adcsel == WM9705_ADCSEL_PHONE ? " -adc set to PHONE\n" : "",
+ adcsel == WM9705_ADCSEL_BMON ? " -adc set to BMON\n" : "",
+ adcsel == WM9705_ADCSEL_AUX ? " -adc set to AUX\n" : "");
+ }
+
len += sprintf (page+len, "%s%s%s%s%s%s",
dig1 & WM97XX_COO ? " -coordinate sampling\n" : " -individual sampling\n",
dig1 & WM97XX_CTC ? " -continuous mode\n" : " -polling mode\n",
@@ -886,11 +578,11 @@
prp == WM97XX_PRP_DETW ? " -pen detect enabled, wake up\n" : "",
prp == WM97XX_PRP_DET_DIG ? " -pen digitiser and pen detect enabled\n" : "",
dig1 & WM97XX_SLEN ? " -read back using slot " : " -read back using AC97\n");
-
- if ((dig1 & WM97XX_SLEN) && slt !=12)
+
+ if ((dig1 & WM97XX_SLEN) && slt !=12)
len += sprintf(page+len, "%d\n", slt);
len += sprintf (page+len, " -adc sample delay %d uSecs\n", delay_table[(dig1 & 0x00f0) >> 4]);
-
+
if (ts->is_wm9712) {
if (prpu)
len += sprintf (page+len, " -rpu %d Ohms\n", 64000/ prpu);
@@ -900,75 +592,38 @@
len += sprintf (page+len, " -pressure current %s uA\n", dig2 & WM9705_PIL ? "400" : "200");
len += sprintf (page+len, " -%s impedance for PHONE and PCBEEP\n", dig2 & WM9705_PHIZ ? "high" : "low");
}
-
- /* WM97xx digitiser read */
+
len += sprintf(page+len, "\nADC data:\n%s%d\n%s%s\n",
- " -adc value (decimal) : ", digrd & 0x0fff,
- " -pen ", digrd & 0x8000 ? "Down" : "Up");
+ " -adc value (decimal) : ", digrd & 0x0fff,
+ " -pen ", digrd & 0x8000 ? "Down" : "Up");
if (ts->is_wm9712) {
len += sprintf (page+len, "%s%s%s%s",
- adcsrc == WM9712_ADCSEL_COMP1 ? " -adc value is COMP1/AUX1\n" : "",
- adcsrc == WM9712_ADCSEL_COMP2 ? " -adc value is COMP2/AUX2\n" : "",
- adcsrc == WM9712_ADCSEL_BMON ? " -adc value is BMON\n" : "",
- adcsrc == WM9712_ADCSEL_WIPER ? " -adc value is WIPER\n" : "");
- } else {
+ adcsrc == WM9712_ADCSEL_COMP1 ? " -adc value is COMP1/AUX1\n" : "",
+ adcsrc == WM9712_ADCSEL_COMP2 ? " -adc value is COMP2/AUX2\n" : "",
+ adcsrc == WM9712_ADCSEL_BMON ? " -adc value is BMON\n" : "",
+ adcsrc == WM9712_ADCSEL_WIPER ? " -adc value is WIPER\n" : "");
+ } else {
len += sprintf (page+len, "%s%s%s%s",
- adcsrc == WM9705_ADCSEL_PCBEEP ? " -adc value is PCBEEP\n" : "",
- adcsrc == WM9705_ADCSEL_PHONE ? " -adc value is PHONE\n" : "",
- adcsrc == WM9705_ADCSEL_BMON ? " -adc value is BMON\n" : "",
- adcsrc == WM9705_ADCSEL_AUX ? " -adc value is AUX\n" : "");
- }
-
- /* register dump */
+ adcsrc == WM9705_ADCSEL_PCBEEP ? " -adc value is PCBEEP\n" : "",
+ adcsrc == WM9705_ADCSEL_PHONE ? " -adc value is PHONE\n" : "",
+ adcsrc == WM9705_ADCSEL_BMON ? " -adc value is BMON\n" : "",
+ adcsrc == WM9705_ADCSEL_AUX ? " -adc value is AUX\n" : "");
+ }
+
len += sprintf(page+len, "\nRegisters:\n%s%x\n%s%x\n%s%x\n",
- " -digitiser 1 (0x76) : 0x", dig1,
- " -digitiser 2 (0x78) : 0x", dig2,
- " -digitiser read (0x7a) : 0x", digrd);
-
- /* errors */
- len += sprintf(page+len, "\nErrors:\n%s%d\n%s%d\n",
- " -buffer overruns ", ts->overruns,
- " -coordinate errors ", ts->adc_errs);
-
- return len;
-}
+ " -digitiser 1 (0x76) : 0x", dig1,
+ " -digitiser 2 (0x78) : 0x", dig2,
+ " -digitiser read (0x7a) : 0x", digrd);
+
+ len += sprintf(page+len, "\nErrors:\n%s%d\n",
+ " -coordinate errors ", ts->adc_errs);
-#ifdef WM97XX_TS_DEBUG
-/* dump all the AC97 register space */
-static int wm_debug_read_proc (char *page, char **start, off_t off,
- int count, int *eof, void *data)
-{
- int len = 0, i;
- unsigned long flags;
- wm97xx_ts_t* ts;
- u16 reg[AC97_NUM_REG];
-
- if ((ts = data) == NULL)
- return -ENODEV;
-
- spin_lock_irqsave(&ts->lock, flags);
- if (!ts->is_registered) {
- spin_unlock_irqrestore(&ts->lock, flags);
- len += sprintf (page+len, "Not registered\n");
- return len;
- }
-
- for (i=0; i < AC97_NUM_REG; i++) {
- reg[i] = ts->codec->codec_read(ts->codec, i * 2);
- }
- spin_unlock_irqrestore(&ts->lock, flags);
-
- for (i=0; i < AC97_NUM_REG; i++) {
- len += sprintf (page+len, "0x%2.2x : 0x%4.4x\n",i * 2, reg[i]);
- }
-
return len;
}
-#endif
#endif
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM)
/* WM97xx Power Management
* The WM9712 has extra powerdown states that are controlled in
* seperate registers from the AC97 power management.
@@ -996,40 +651,39 @@
wm97xx_ts_t* ts = &wm97xx_ts;
u16 reg;
unsigned long flags;
-
- /* are we registered */
+
spin_lock_irqsave(&ts->lock, flags);
if (!ts->is_registered) {
spin_unlock_irqrestore(&ts->lock, flags);
return;
}
-
+
/* wm9705 does not have extra PM */
if (!ts->is_wm9712) {
spin_unlock_irqrestore(&ts->lock, flags);
return;
}
-
+
/* save and mute the PGA's */
wm9712_pga_save(ts);
-
+
reg = ts->codec->codec_read(ts->codec, AC97_PHONE_VOL);
ts->codec->codec_write(ts->codec, AC97_PHONE_VOL, reg | 0x001f);
-
+
reg = ts->codec->codec_read(ts->codec, AC97_MIC_VOL);
ts->codec->codec_write(ts->codec, AC97_MIC_VOL, reg | 0x1f1f);
-
+
reg = ts->codec->codec_read(ts->codec, AC97_LINEIN_VOL);
ts->codec->codec_write(ts->codec, AC97_LINEIN_VOL, reg | 0x1f1f);
-
+
/* power down, dont disable the AC link */
- ts->codec->codec_write(ts->codec, AC97_WM9712_POWER, WM9712_PD(14) | WM9712_PD(13) |
- WM9712_PD(12) | WM9712_PD(11) | WM9712_PD(10) |
- WM9712_PD(9) | WM9712_PD(8) | WM9712_PD(7) |
- WM9712_PD(6) | WM9712_PD(5) | WM9712_PD(4) |
- WM9712_PD(3) | WM9712_PD(2) | WM9712_PD(1) |
- WM9712_PD(0));
-
+ ts->codec->codec_write(ts->codec, AC97_WM9712_POWER, WM9712_PD(14) |
+ WM9712_PD(13) | WM9712_PD(12) | WM9712_PD(11) |
+ WM9712_PD(10) | WM9712_PD(9) | WM9712_PD(8) |
+ WM9712_PD(7) | WM9712_PD(6) | WM9712_PD(5) |
+ WM9712_PD(4) | WM9712_PD(3) | WM9712_PD(2) |
+ WM9712_PD(1) | WM9712_PD(0));
+
spin_unlock_irqrestore(&ts->lock, flags);
}
@@ -1040,14 +694,14 @@
{
wm97xx_ts_t* ts = &wm97xx_ts;
unsigned long flags;
-
+
/* are we registered */
spin_lock_irqsave(&ts->lock, flags);
if (!ts->is_registered) {
spin_unlock_irqrestore(&ts->lock, flags);
return;
}
-
+
/* wm9705 does not have extra PM */
if (!ts->is_wm9712) {
spin_unlock_irqrestore(&ts->lock, flags);
@@ -1056,14 +710,13 @@
/* power up */
ts->codec->codec_write(ts->codec, AC97_WM9712_POWER, 0x0);
-
+
/* restore PGA state */
wm9712_pga_restore(ts);
-
+
spin_unlock_irqrestore(&ts->lock, flags);
}
-
/* save state of wm9712 PGA's */
static void wm9712_pga_save(wm97xx_ts_t* ts)
{
@@ -1078,10 +731,10 @@
static void wm9712_pga_restore(wm97xx_ts_t* ts)
{
u16 reg;
-
+
reg = ts->codec->codec_read(ts->codec, AC97_PHONE_VOL);
ts->codec->codec_write(ts->codec, AC97_PHONE_VOL, reg | ts->phone_pga);
-
+
reg = ts->codec->codec_read(ts->codec, AC97_LINEIN_VOL);
ts->codec->codec_write(ts->codec, AC97_LINEIN_VOL, reg | ts->line_pgar | (ts->line_pgal << 8));
@@ -1094,19 +747,18 @@
/*
* set up the physical settings of the device
*/
-
static void init_wm97xx_phy(void)
{
u16 dig1, dig2, aux, vid;
wm97xx_ts_t *ts = &wm97xx_ts;
/* default values */
- dig1 = WM97XX_DELAY(4) | WM97XX_SLT(6);
+ dig1 = WM97XX_DELAY(4) | WM97XX_SLT(5);
if (ts->is_wm9712)
dig2 = WM9712_RPU(1);
else {
dig2 = 0x0;
-
+
/*
* mute VIDEO and AUX as they share X and Y touchscreen
* inputs on the WM9705
@@ -1116,21 +768,21 @@
info("muting AUX mixer as it shares X touchscreen coordinate");
ts->codec->codec_write(ts->codec, AC97_AUX_VOL, 0x8000 | aux);
}
-
+
vid = ts->codec->codec_read(ts->codec, AC97_VIDEO_VOL);
if (!(vid & 0x8000)) {
info("muting VIDEO mixer as it shares Y touchscreen coordinate");
ts->codec->codec_write(ts->codec, AC97_VIDEO_VOL, 0x8000 | vid);
}
}
-
+
/* WM9712 rpu */
if (ts->is_wm9712 && rpu) {
dig2 &= 0xffc0;
dig2 |= WM9712_RPU(rpu);
info("setting pen detect pull-up to %d Ohms",64000 / rpu);
}
-
+
/* touchpanel pressure */
if (pil == 2) {
if (ts->is_wm9712)
@@ -1140,13 +792,13 @@
info("setting pressure measurement current to 400uA.");
} else if (pil)
info ("setting pressure measurement current to 200uA.");
-
+
/* WM9712 five wire */
if (ts->is_wm9712 && five_wire) {
dig2 |= WM9712_45W;
info("setting 5-wire touchscreen mode.");
- }
-
+ }
+
/* sample settling delay */
if (delay!=4) {
if (delay < 0 || delay > 15) {
@@ -1157,19 +809,29 @@
dig1 |= WM97XX_DELAY(delay);
info("setting adc sample delay to %d u Secs.", delay_table[delay]);
}
-
+
/* coordinate mode */
if (mode == 1) {
dig1 |= WM97XX_COO;
info("using coordinate mode");
- }
+ }
+ /* continous mode */
+ if (mode == 2) {
+ dig1 |= WM97XX_CTC | WM97XX_COO | WM97XX_CM_RATE_375 | WM97XX_SLEN | WM97XX_SLT(5);
+ info("using continous mode");
+ if (ts->is_wm9712)
+ dig2 |= WM9712_PDEN;
+ else
+ dig2 |= WM9705_PDEN;
+ }
+
/* WM9705 pdd */
if (pdd && !ts->is_wm9712) {
dig2 |= (pdd & 0x000f);
info("setting pdd to Vmid/%d", 1 - (pdd & 0x000f));
}
-
+
ts->codec->codec_write(ts->codec, AC97_WM97XX_DIGITISER1, dig1);
ts->codec->codec_write(ts->codec, AC97_WM97XX_DIGITISER2, dig2);
}
@@ -1182,27 +844,27 @@
static int wm97xx_probe(struct ac97_codec *codec, struct ac97_driver *driver)
{
- unsigned long flags;
+ unsigned long flags;
u16 id1, id2;
wm97xx_ts_t *ts = &wm97xx_ts;
-
+
spin_lock_irqsave(&ts->lock, flags);
-
+
/* we only support 1 touchscreen at the moment */
if (ts->is_registered) {
spin_unlock_irqrestore(&ts->lock, flags);
return -1;
}
-
+
/*
* We can only use a WM9705 or WM9712 that has been *first* initialised
* by the AC97 audio driver. This is because we have to use the audio
- * drivers codec read() and write() functions to sample the touchscreen
- *
+ * drivers codec read() and write() functions to sample the touchscreen
+ *
* If an initialsed WM97xx is found then get the codec read and write
- * functions.
+ * functions.
*/
-
+
/* test for a WM9712 or a WM9705 */
id1 = codec->codec_read(codec, AC97_VENDOR_ID1);
id2 = codec->codec_read(codec, AC97_VENDOR_ID2);
@@ -1210,131 +872,276 @@
ts->is_wm9712 = 1;
info("registered a WM9712");
} else if (id1 == WM97XX_ID1 && id2 == WM9705_ID2) {
- ts->is_wm9712 = 0;
- info("registered a WM9705");
+ ts->is_wm9712 = 0;
+ info("registered a WM9705");
} else {
err("could not find a WM97xx codec. Found a 0x%4x:0x%4x instead",
id1, id2);
spin_unlock_irqrestore(&ts->lock, flags);
return -1;
}
-
+
/* set up AC97 codec interface */
ts->codec = codec;
codec->driver_private = (void*)&ts;
- codec->codec_unregister = 0;
-
+
/* set up physical characteristics */
init_wm97xx_phy();
-
+
ts->is_registered = 1;
spin_unlock_irqrestore(&ts->lock, flags);
return 0;
}
-/* this is called by the audio driver when ac97_codec is unloaded */
-
+/*
+ * Called by ac97_codec when it is unloaded.
+ */
static void wm97xx_remove(struct ac97_codec *codec, struct ac97_driver *driver)
{
unsigned long flags;
u16 dig1, dig2;
wm97xx_ts_t *ts = codec->driver_private;
+ dbg("Unloading codec\n");
spin_lock_irqsave(&ts->lock, flags);
-
+
/* check that are registered */
if (!ts->is_registered) {
err("double unregister");
spin_unlock_irqrestore(&ts->lock, flags);
return;
}
-
+
ts->is_registered = 0;
wake_up_interruptible(&ts->wait); /* So we see its gone */
-
+
/* restore default digitiser values */
dig1 = WM97XX_DELAY(4) | WM97XX_SLT(6);
if (ts->is_wm9712)
dig2 = WM9712_RPU(1);
else
dig2 = 0x0;
-
+
codec->codec_write(codec, AC97_WM97XX_DIGITISER1, dig1);
codec->codec_write(codec, AC97_WM97XX_DIGITISER2, dig2);
ts->codec = NULL;
-
+
spin_unlock_irqrestore(&ts->lock, flags);
}
-static struct miscdevice wm97xx_misc = {
- minor: TS_MINOR,
- name: "touchscreen/wm97xx",
- fops: &ts_fops,
-};
+/*
+ * add a touch event
+ */
+static int wm97xx_ts_evt_add(wm97xx_ts_t* ts, u16 pressure, u16 x, u16 y)
+{
+ /* add event and remove adc src bits */
+ input_report_abs(ts->idev, ABS_X, x & 0xfff);
+ input_report_abs(ts->idev, ABS_Y, y & 0xfff);
+ input_report_abs(ts->idev, ABS_PRESSURE, pressure & 0xfff);
+ return 0;
+}
+
+/*
+ * add a pen up event
+ */
+static int wm97xx_ts_evt_release(wm97xx_ts_t* ts)
+{
+// dbg("release the stylus.\n");
+ input_report_abs(ts->idev, ABS_PRESSURE, 0);
+ return 0;
+}
+
+/*
+ * The touchscreen sample reader thread
+ */
+static int wm97xx_thread(void *_ts)
+{
+ wm97xx_ts_t *ts = (wm97xx_ts_t *)_ts;
+ struct task_struct *tsk = current;
+ int valid;
+
+ ts->rtask = tsk;
+
+ /* set up thread context */
+ daemonize();
+ reparent_to_init();
+ strcpy(tsk->comm, "ktsd");
+ tsk->tty = NULL;
+
+ /* we will die when we receive SIGKILL */
+ spin_lock_irq(&tsk->sigmask_lock);
+ siginitsetinv(&tsk->blocked, sigmask(SIGKILL));
+ recalc_sigpending(tsk);
+ spin_unlock_irq(&tsk->sigmask_lock);
+
+ /* init is complete */
+ complete(&ts->init_exit);
+ valid = 0;
+
+ /* touch reader loop */
+ for (;;) {
+ ts->restart = 0;
+ if( signal_pending(tsk))
+ break;
+
+ if(pendown(ts)) {
+ switch (mode) {
+ case 0:
+ wm97xx_poll_touch(ts);
+ valid = 1;
+ break;
+ case 1:
+ wm97xx_poll_coord_touch(ts);
+ valid = 1;
+ break;
+ case 2:
+ wm97xx_cont_touch(ts);
+ valid = 1;
+ break;
+ }
+ } else {
+ if (valid) {
+ valid = 0;
+ wm97xx_ts_evt_release(ts);
+ }
+ }
+
+ set_task_state(tsk, TASK_INTERRUPTIBLE);
+ schedule_timeout(HZ/100);
+ }
+ ts->rtask = NULL;
+ complete_and_exit(&ts->init_exit, 0);
+
+ return 0;
+}
+
+/*
+ * Start the touchscreen thread and
+ * the touch digitiser.
+ */
+static int wm97xx_ts_input_open(struct input_dev *idev)
+{
+ wm97xx_ts_t *ts = (wm97xx_ts_t *) &wm97xx_ts;
+ u32 flags;
+ int ret, val;
+
+ if ( ts->use_count++ != 0 )
+ return 0;
+
+ /* start touchscreen thread */
+ ts->idev = idev;
+ init_completion(&ts->init_exit);
+ ret = kernel_thread(wm97xx_thread, ts, 0);
+ if (ret >= 0)
+ wait_for_completion(&ts->init_exit);
+
+ spin_lock_irqsave( &ts->lock, flags );
+
+ /* start digitiser */
+ val = ts->codec->codec_read(ts->codec, AC97_WM97XX_DIGITISER2);
+ ts->codec->codec_write(ts->codec, AC97_WM97XX_DIGITISER2,
+ val | WM97XX_PRP_DET_DIG);
+
+ spin_unlock_irqrestore( &ts->lock, flags );
+
+ return 0;
+}
+
+/*
+ * Kill the touchscreen thread and stop
+ * the touch digitiser.
+ */
+static void wm97xx_ts_input_close(struct input_dev *idev)
+{
+ wm97xx_ts_t *ts = (wm97xx_ts_t *) &wm97xx_ts;
+ u32 flags;
+ int val;
+
+ if (--ts->use_count == 0) {
+ /* kill thread */
+ if (ts->rtask) {
+ send_sig(SIGKILL, ts->rtask, 1);
+ wait_for_completion(&ts->init_exit);
+ }
+
+ down(&ts->sem);
+ spin_lock_irqsave(&ts->lock, flags);
+
+ /* stop digitiser */
+ val = ts->codec->codec_read(ts->codec, AC97_WM97XX_DIGITISER2);
+ ts->codec->codec_write(ts->codec, AC97_WM97XX_DIGITISER2,
+ val & ~WM97XX_PRP_DET_DIG);
+
+ spin_unlock_irqrestore(&ts->lock, flags);
+ up(&ts->sem);
+ }
+}
static int __init wm97xx_ts_init_module(void)
{
wm97xx_ts_t* ts = &wm97xx_ts;
int ret;
char proc_str[64];
-
+
info("Wolfson WM9705/WM9712 Touchscreen Controller");
info("Version %s liam.girdwood@wolfsonmicro.com", WM_TS_VERSION);
-
+
memset(ts, 0, sizeof(wm97xx_ts_t));
-
- /* register our misc device */
- if ((ret = misc_register(&wm97xx_misc)) < 0) {
- err("can't register misc device");
- return ret;
- }
-
+
+ /* tell input system what we events we accept and register */
+ wm97xx_input.name = "wm97xx touchscreen";
+ wm97xx_input.open = wm97xx_ts_input_open;
+ wm97xx_input.close = wm97xx_ts_input_close;
+ __set_bit(EV_ABS, wm97xx_input.evbit);
+ __set_bit(ABS_X, wm97xx_input.absbit);
+ __set_bit(ABS_Y, wm97xx_input.absbit);
+ __set_bit(ABS_PRESSURE, wm97xx_input.absbit);
+ input_register_device(&wm97xx_input);
+
init_waitqueue_head(&ts->wait);
spin_lock_init(&ts->lock);
+ init_MUTEX(&ts->sem);
+
- // initial calibration values
- ts->cal.xscale = 256;
- ts->cal.xtrans = 0;
- ts->cal.yscale = 256;
- ts->cal.ytrans = 0;
-
- /* reset error counters */
- ts->overruns = 0;
- ts->adc_errs = 0;
+ /* register pendown interrupt handler */
+ if (pen_int) {
+#if defined(WM97XX_IRQ)
+ if ((ret = request_irq(WM97XX_IRQ, wm97xx_interrupt, 0, "AC97-touchscreen", &ts)) != 0) {
+ err("can't get irq %d falling back to pendown polling\n", WM97XX_IRQ);
+ pen_int = 0;
+ }
+#else
+ err("touchscreen interrupt not supported/implemented on this arch\n");
+ pen_int = 0;
+#endif
+ }
/* register with the AC97 layer */
ac97_register_driver(&wm9705_driver);
ac97_register_driver(&wm9712_driver);
-
-#ifdef CONFIG_PROC_FS
- /* register proc interface */
+
+#if defined(CONFIG_PROC_FS)
sprintf(proc_str, "driver/%s", TS_NAME);
if ((ts->wm97xx_ts_ps = create_proc_read_entry (proc_str, 0, NULL,
- wm97xx_read_proc, ts)) == 0)
+ wm97xx_read_proc, ts)) == 0)
err("could not register proc interface /proc/%s", proc_str);
-#ifdef WM97XX_TS_DEBUG
- if ((ts->wm97xx_debug_ts_ps = create_proc_read_entry ("driver/ac97_registers",
- 0, NULL,wm_debug_read_proc, ts)) == 0)
- err("could not register proc interface /proc/driver/ac97_registers");
-#endif
#endif
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM)
if ((ts->pm = pm_register(PM_UNKNOWN_DEV, PM_SYS_UNKNOWN, wm97xx_pm_event)) == 0)
err("could not register with power management");
#endif
+
return 0;
}
static void wm97xx_ts_cleanup_module(void)
{
- wm97xx_ts_t* ts = &wm97xx_ts;
-
-#ifdef CONFIG_PM
- pm_unregister (ts->pm);
+#if defined(CONFIG_PM)
+ pm_unregister (wm97xx_ts.pm);
#endif
- ac97_unregister_driver(&wm9705_driver);
- ac97_unregister_driver(&wm9712_driver);
- misc_deregister(&wm97xx_misc);
+ if (pen_int)
+ free_irq(WM97XX_IRQ, NULL);
+ input_unregister_device(&wm97xx_input);
}
/* Module information */
@@ -1355,8 +1162,8 @@
return 0;
/* parse the options and check for out of range values */
- for(this_opt=strtok(options, ",");
- this_opt; this_opt=strtok(NULL, ",")) {
+ for(this_opt=strsep(options, ",");
+ this_opt; this_opt=strsep(NULL, ",")) {
if (!strncmp(this_opt, "pil:", 4)) {
this_opt+=4;
pil = simple_strtol(this_opt, NULL, 0);
@@ -1399,6 +1206,13 @@
mode = 0;
continue;
}
+ if (!strncmp(this_opt, "pen_int:", 8)) {
+ this_opt+=8;
+ pen_int = simple_strtol(this_opt, NULL, 0);
+ if (pen_int < 0 || pen_int > 1)
+ pen_int = 0;
+ continue;
+ }
}
return 1;
}
^ permalink raw reply
* Re: Initio 9100u -- Mike Christie's 2.6.0-test11 Patch -- Kernel Errors
From: James Bottomley @ 2003-12-17 14:24 UTC (permalink / raw)
To: James Daniel; +Cc: SCSI Mailing List, Mike Christie
In-Reply-To: <000501c3c47c$dfc05ae0$0200000a@nightsky>
On Wed, 2003-12-17 at 04:05, James Daniel wrote:
> i91u: PCI Base=0xEC00, IRQ=12, BIOS=0xC8000, SCSI ID=7
> i91u: Reset SCSI Bus ...
> ERROR: SCSI host `INI9100U' has no error handling
> ERROR: This is not a safe way to run your SCSI host
> ERROR: The error handling must be added to this driver
> Call Trace:
> [<c029cfd1>] scsi_host_alloc+0x291/0x2a0
> [<c029cff1>] scsi_register+0x11/0x60
> [<c02a4ed1>] i91u_detect+0x1d1/0x3c0
> [<c0290e28>] ide_register_driver+0xe8/0x120
> [<c03628b3>] init_this_scsi_driver+0x53/0x100
> [<c035276c>] do_initcalls+0x2c/0xa0
> [<c01050ed>] init+0x2d/0x140
> [<c01050c0>] init+0x0/0x140
> [<c0107329>] kernel_thread_helper+0x5/0x1c
This one's expected: although the driver was made compilable and
converted to the new dma API, it still needs a new error handler, which
is what the complaint is about.
> It then goes on to ID the drive correctly, and loads the sd driver, which
> again IDs the drive correctly.. and we get:
>
> SCSI device sda: 17783240 512-byte hdwr sectors (9105 MB)
> SCSI device sda: drive cache: write back
> /dev/scsi/host0/bus0/target1/lun0: unknown partition table
> Attached scsi disk sda at scsi0, channel 0, id 1, lun 0
This one's really strange, because clearly the INQUIRY and the
READ_CAPACITY both succeeded and returned apparently good values. The
READ10 to the DOS parition sector has failed (with no errors).
The only difference is that the READ10 is generated in the partition
code (via read_dev_sector), so it will be a sg read (probably with
scsi_device->use_sg set to 1)...I'm travelling today, so if Mike hasn't
found the problem by the tomorrow, I'll take a look.
James
^ permalink raw reply
* visual posh material which stimulates men's organs
From: Amie House @ 2003-12-17 17:16 UTC (permalink / raw)
To: honey+1070261091, webmaster, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 491 bytes --]
Dear Sir/Madam
The following video which you will see
portraits the multimillion Hilton
heiress;Paris-who stupidly let herself
be filmed at the age of 19!I'm sure you
know the rest as you follow the news.
This is the chance for you to solve the mystery
of the Hilton's saga.If you are ready
to play detective
click the link below:
http://ns.adweawen.biz/ph/index_mailer.html
Opt---Off
http://adweawen.biz/p/xen.php
Hope you will have fun.
kro rfeegu
^ permalink raw reply
* 2.4.23 atyfb doesn't work on Presario 1700
From: Kent Hunt @ 2003-12-17 14:21 UTC (permalink / raw)
To: lk
[-- Attachment #1: Type: text/plain, Size: 2123 bytes --]
Hi,
I had atyfb working perfectly with stock
kernel 2.4.21 and
perhaps earlier kernels. The reason I don't recall if
it worked with
earlier kernels is because my HD crashed. I cannot
even find out what
was the configuration that made it work.
I cannot make it work with the new atyfb in
2.4.23 either.
#
# Console drivers
#
CONFIG_VGA_CONSOLE=y
CONFIG_VIDEO_SELECT=y
#
# Frame-buffer support
#
CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_VIDEO_SELECT=y
CONFIG_FB_ATY=y
CONFIG_FB_ATY_CT=y
CONFIG_FB_ATY_GENERIC_LCD=y
CONFIG_FBCON_ADVANCED=y
CONFIG_FBCON_CFB8=y
CONFIG_FBCON_CFB24=y
CONFIG_FBCON_CFB32=y
CONFIG_FBCON_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
My laptop is a Presario 1700.
01:00.0 VGA compatible controller: ATI Technologies
Inc Rage Mobility P/M AGP 2x (rev 64)
01:00.0 Class 0300: 1002:4c4d (rev 64)
In addition, should this patch be applied? lspci says
I have an AGP and
the id code is 4c4d.
--- linux-2.4.23-acpi/drivers/video/aty/atyfb_base.c
2003-12-14 12:09:09.000000000 -0500
+++
linux-2.4.23-fb/drivers/video/aty/atyfb_base_orig.c
2003-12-13 19:04:06.000000000 -0500
@@ -376,8 +376,8 @@
{ 0x4c50, 0x4c50, 0x00, 0x00, m64n_ltp_p, 230,
100, 100, M64F_GT | M64F_INTEGRATED | M64F_RESET
_3D | M64F_GTB_DSP | M64F_EXTRA_BRIGHT},
/* 3D RAGE Mobility */
- { 0x4c4d, 0x4c4d, 0x00, 0x00, m64n_mob_p, 230,
83, 125, M64F_GT | M64F_INTEGRATED | M64F_RESET
_3D | M64F_GTB_DSP | M64F_MOBIL_BUS |
M64F_EXTRA_BRIGHT},
- { 0x4c4e, 0x4c4e, 0x00, 0x00, m64n_mob_a, 230,
83, 125, M64F_GT | M64F_INTEGRATED | M64F_RESET
_3D | M64F_GTB_DSP | M64F_MOBIL_BUS |
M64F_EXTRA_BRIGHT},
+ { 0x4c4d, 0x4c4d, 0x00, 0x00, m64n_mob_a, 230,
83, 125, M64F_GT | M64F_INTEGRATED | M64F_RESET
_3D | M64F_GTB_DSP | M64F_MOBIL_BUS |
M64F_EXTRA_BRIGHT},
+ { 0x4c4e, 0x4c4e, 0x00, 0x00, m64n_mob_p, 230,
83, 125, M64F_GT | M64F_INTEGRATED | M64F_RESET
_3D | M64F_GTB_DSP | M64F_MOBIL_BUS |
M64F_EXTRA_BRIGHT},
#endif /* CONFIG_FB_ATY_CT */
};
Kent
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
[-- Attachment #2: atyfb.txt --]
[-- Type: text/plain, Size: 1972 bytes --]
Hi,
I had atyfb working perfectly with stock kernel 2.4.21 and
perhaps earlier kernels. The reason I don't recall if it worked with
earlier kernels is because my HD crashed. I cannot even find out what
was the configuration that made it work.
I cannot make it work with the new atyfb in 2.4.23 either.
#
# Console drivers
#
CONFIG_VGA_CONSOLE=y
CONFIG_VIDEO_SELECT=y
#
# Frame-buffer support
#
CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_VIDEO_SELECT=y
CONFIG_FB_ATY=y
CONFIG_FB_ATY_CT=y
CONFIG_FB_ATY_GENERIC_LCD=y
CONFIG_FBCON_ADVANCED=y
CONFIG_FBCON_CFB8=y
CONFIG_FBCON_CFB24=y
CONFIG_FBCON_CFB32=y
CONFIG_FBCON_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
My laptop is a Presario 1700.
01:00.0 VGA compatible controller: ATI Technologies Inc Rage Mobility P/M AGP 2x (rev 64)
01:00.0 Class 0300: 1002:4c4d (rev 64)
In addition, should this patch be applied? lspci says I have an AGP and
the id code is 4c4d.
--- linux-2.4.23-acpi/drivers/video/aty/atyfb_base.c 2003-12-14 12:09:09.000000000 -0500
+++ linux-2.4.23-fb/drivers/video/aty/atyfb_base_orig.c 2003-12-13 19:04:06.000000000 -0500
@@ -376,8 +376,8 @@
{ 0x4c50, 0x4c50, 0x00, 0x00, m64n_ltp_p, 230, 100, 100, M64F_GT | M64F_INTEGRATED | M64F_RESET_3D | M64F_GTB_DSP | M64F_EXTRA_BRIGHT},
/* 3D RAGE Mobility */
- { 0x4c4d, 0x4c4d, 0x00, 0x00, m64n_mob_p, 230, 83, 125, M64F_GT | M64F_INTEGRATED | M64F_RESET_3D | M64F_GTB_DSP | M64F_MOBIL_BUS | M64F_EXTRA_BRIGHT},
- { 0x4c4e, 0x4c4e, 0x00, 0x00, m64n_mob_a, 230, 83, 125, M64F_GT | M64F_INTEGRATED | M64F_RESET_3D | M64F_GTB_DSP | M64F_MOBIL_BUS | M64F_EXTRA_BRIGHT},
+ { 0x4c4d, 0x4c4d, 0x00, 0x00, m64n_mob_a, 230, 83, 125, M64F_GT | M64F_INTEGRATED | M64F_RESET_3D | M64F_GTB_DSP | M64F_MOBIL_BUS | M64F_EXTRA_BRIGHT},
+ { 0x4c4e, 0x4c4e, 0x00, 0x00, m64n_mob_p, 230, 83, 125, M64F_GT | M64F_INTEGRATED | M64F_RESET_3D | M64F_GTB_DSP | M64F_MOBIL_BUS | M64F_EXTRA_BRIGHT},
#endif /* CONFIG_FB_ATY_CT */
};
^ permalink raw reply
* Re: usb midi devices.
From: Clemens Ladisch @ 2003-12-17 14:15 UTC (permalink / raw)
To: Patrick Shirkey; +Cc: alsa-devel
In-Reply-To: <20031214101942.GA920@tuba.home>
Martin Langer wrote:
> And there are some other cards (Sonica, ...) which need a firmware download,
> but there's no linux loader available.
MobilePre, Sonica, Transit, Ozone (all from M-Audio).
BTW: Patrick, what would be the preferred format for submitting
changed to the soundcard list? (There's no file to send a patch for.)
Regards,
Clemens
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
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.