* Re: Kill TRUE/FALSE from hp100.c
From: Pavel Machek @ 2002-12-11 23:04 UTC (permalink / raw)
To: Christoph Hellwig, Rusty trivial patch monkey Russell,
kernel list, jgarzik
In-Reply-To: <20021211224734.A7023@infradead.org>
Hi!
> > Kernel coding style does not like TRUE/FALSE, AFAICS. Please apply,
>
> What's even more interesting: were did the defintions of TRUE/FALSE
> as used by hp100.c come from?
hp100.h. I did not yet kill them but will do that soon.
Pavel
--
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.
^ permalink raw reply
* Re: Problems using /proc/scsi/gdth/ with 2.4.20aa1
From: Doug Ledford @ 2002-12-11 23:03 UTC (permalink / raw)
To: Oliver Jehle; +Cc: linux-kernel
In-Reply-To: <1039502939.1054.12.camel@vorab.monex.li>
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]
On Tue, Dec 10, 2002 at 07:49:00AM +0100, Oliver Jehle wrote:
> Running linux 2.4.20-aa1 and the gdth driver works ,but accessing
> /proc/scsi/gdth/0 for example with cat or the supplied icpcon utility
> don't work...
>
> these messages are in system log when accessing /proc/scsi/gdth/0 with
> cat for example (works with 2.4.18)
> ...
>
> Dec 10 06:37:47 arena1 kernel: Unable to handle kernel NULL pointer
> dereference at virtual address 00000000
> Dec 10 06:37:47 arena1 kernel: printing eip:
> Dec 10 06:37:47 arena1 kernel: c024c879
> Dec 10 06:37:47 arena1 kernel: *pde = 00000000
> Dec 10 06:37:47 arena1 kernel: Oops: 0002 2.4.20aa1 #2 SMP Mon Dec 9
> 16:55:18 CET 2002
> Dec 10 06:37:47 arena1 kernel: CPU: 0
> Dec 10 06:37:47 arena1 kernel: EIP:
> 0010:[scsi_release_commandblocks+17/92] Not tainted
/me chuckles
That looks *amazingly* familiar...a patch I wrote introduced that bug,
sorry. It's fix is attached (assuming that Andrea picked up the same
version of the 2.4.x iorl contention patch that we are using now, which
is what introduced this problem for us here).
--
Doug Ledford <dledford@redhat.com> 919-754-3700 x44233
Red Hat, Inc.
1801 Varsity Dr.
Raleigh, NC 27606
[-- Attachment #2: linux-2.4.9-gdthoops.patch --]
[-- Type: text/plain, Size: 745 bytes --]
--- linux/drivers/scsi/scsi.c-stock Fri Oct 25 15:41:03 2002
+++ linux/drivers/scsi/scsi.c Fri Oct 25 15:47:04 2002
@@ -2672,10 +2672,10 @@
SDpnt->type = -1;
SDpnt->queue_depth = 1;
- scsi_build_commandblocks(SDpnt);
-
scsi_initialize_queue(SDpnt, SHpnt);
+ scsi_build_commandblocks(SDpnt);
+
SDpnt->online = TRUE;
/*
@@ -2705,13 +2705,12 @@
panic("Attempt to delete wrong device\n");
}
- blk_cleanup_queue(&SDpnt->request_queue);
-
/*
* We only have a single SCpnt attached to this device. Free
* it now.
*/
scsi_release_commandblocks(SDpnt);
+ blk_cleanup_queue(&SDpnt->request_queue);
kfree(SDpnt);
}
^ permalink raw reply
* Re: Oops on linux 2.4.20-ac1
From: Orion Poplawski @ 2002-12-11 23:00 UTC (permalink / raw)
To: Alan Cox; +Cc: Linux Kernel Mailing List
In-Reply-To: <1039554145.14175.70.camel@irongate.swansea.linux.org.uk>
Alan Cox wrote:
>Random lockups on dual athlons are a notorious problem under all OS's.
>Start by checking it passes memtest86, that will verify the RAM is ok -
>and the AMD is -very- picky about RAM.
>
>If thats ok then let me know which board you have, what is plugged into
>it and what PSU you are using.
>
>
>
memtest86 completed 3 passes with no errors, so:
MB:
Asus A7M266-D w/ Dual Athlon 2100 MP and 4 x 512MB PC2100 ECC Dimms
AMD 762 Chipset
RAM clocking is "normal"
Cards:
PCI 3com 3c905-TX ethernet
PCI Tekram DC-390U3W SCSI Controller
PCI ATI 3d Rage II Video
1 IDE Hard disk
1 external SCSI disk
PSU is a Turbo-Cool 475 ATX-PFC (appears to be 460W)
^ permalink raw reply
* Re: ELKS port of Adventure - help needed :)
From: Paul Nasrat @ 2002-12-11 22:51 UTC (permalink / raw)
To: linux-8086
In-Reply-To: <200212112222.gBBMMA5G007271@eddie.loc>
On Wed, Dec 11, 2002 at 10:22:13PM +0000, Richard Wallman wrote:
> On 11 Dec, Richard Wallman wrote:
>
> > Possible a source code or bcc problem
>
> It's a bcc problem: strcmp doesn't return the right values.
Cheers that's a great pointer, oh well time to get my hands dirty...
> Paul: short answer = rewrite strcmp. Only "vocab.c" and "english.c" use
> that function, so just replace all references. sed is your friend. :)
Indeed - I'll hopefully have some time to do this tomorrow. I have the
bcc archives to hand so can look at previous versions to brush up my
asm.
Just got nice shiny 8086 laptop - but without floppy/serial. It's an
Olivetti Quaderno, I may be able to use a flash pcmcia disk on it to get
elks onto it, but we'll see. Else it's going to be pinouts from usenet
and some soldering (eep)...
Paul
^ permalink raw reply
* Re: 2.5.50 - sound driver issues with i810_audio
From: Doug Ledford @ 2002-12-11 22:59 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: linux-kernel
In-Reply-To: <200212092124.gB9LOL3J007516@turing-police.cc.vt.edu>
On Mon, Dec 09, 2002 at 04:24:21PM -0500, Valdis.Kletnieks@vt.edu wrote:
> a female voice saying "New mail from I B M I-source List Server". When I
> play it, "New mail from" is almost always OK, sometimes all of it is OK, and
> usually it loses it about halfway through. What comes out sounds like:
>
> New Mail from I B I-sour<M>ce <distorted>list server st server"
>
> Yes, it sounds like it's taking about half the frames and delaying them a chunk
This sounds like the problem some chipsets had with wrapping counters in
the dma pointer read code. Basically, when the sg segment is advanced to
the next segment, the offset counter would not be simultaneously cleared
but instead would be momentarily delayed before the clear occured and a
read at just the wrong time could result in us thinking that the buffer
was a full sg segment farther than it was. There were changes made to the
oss i810 driver around version 0.18 to solve this problem if I remember
correctly. Similar code may be needed in the alsa driver, I'm not sure
because I have looked at it or tried it (my machine with an i810 doesn't
run 2.5 kernels).
--
Doug Ledford <dledford@redhat.com> 919-754-3700 x44233
Red Hat, Inc.
1801 Varsity Dr.
Raleigh, NC 27606
^ permalink raw reply
* [U-Boot-Users] uncompressing two gziped images
From: Wolfgang Denk @ 2002-12-11 22:50 UTC (permalink / raw)
To: u-boot
In-Reply-To: <8D7C5F56B409554D9D46AC22195807F3061BCA@exchwenz01.dmcwave.co.nz>
In message <8D7C5F56B409554D9D46AC22195807F3061BCA@exchwenz01.dmcwave.co.nz> you wrote:
>
> My question is how can I uncompress two stand alone images before starting
> one of them (the first one)?
Currently there is no command available to do this. Actually, ther
eis very little support for the handling of the misc image types -
the only thing which is really supported is what's needed to boot
Linux with or without ramdisk images.
For example, you can use autoscr to execute the contents of a script
images - but it will not handle a compressed script image (yet).
So all you can do is implement the required features, and send the
patches.
> Before I start changing the code to do this for us I though I'd ask incase
> there is a way I have not been able to figure out yet. I have tried using
> mkimage and setting one to a Linux kernel image and the other one to a RAM
> disk but the RAM disk is not decompressed before being relocated.
No, this won;t work. You have to add new code.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
"You shouldn't make my toaster angry." - Household security explained
in "Johnny Quest"
^ permalink raw reply
* Re: Strange load spikes on 2.4.19 kernel
From: Steven Roussey @ 2002-12-11 22:54 UTC (permalink / raw)
To: robm; +Cc: linux-kernel
Was there ever a solution to this issue? Is it kernel or ext3 based issue?
Is there a workaround? I've spent two months looking for a source and
solution to this issue. It is pressing for me since all our users get locked
out at the height of the spike. Ours is a webserver.
Example of load graph (my minute):
http://www.network54.com/spikes.html
TIA
Steven Roussey
^ permalink raw reply
* Re: ELKS port of Adventure - help needed :)
From: Richard Wallman @ 2002-12-11 22:46 UTC (permalink / raw)
To: Linux 8086
In-Reply-To: <200212112222.gBBMMA5G007271@eddie.loc>
On 11 Dec, I wrote:
{SNIP: a load of rubbish}
Scratch all that, I did a quick test and bcc is fine.
I blame tiredness. >:)
Still getting -1 each time for the comparison in vocab.c though. I even
tried "check=1" before the "check = strcmp(w, wc[mid].aword);" line,
and it still comes up -1 each time.
Just tried pasting the bit of C from the end of the libc code:
--------------------------------------------------------------
int newcmp(d, s)
const char *d;
const char * s;
{
register char *s1=(char *)d, *s2=(char *)s, c1,c2;
while((c1= *s1++) == (c2= *s2++) && c1 );
return c1 - c2;
};
--------------------------------------------------------------
Put that in vocab.c, replace the reference in the "binary" function, and
it all works smoothly (for that function at least).
Looks like the only useful part of my last post was the suggestion to
replace strcmp.
There's a problem here somewhere, but I'm damned if I can find it
right now.
Yawn...time for bed...
--
Richard Wallman
http://www.murkygoth.uklinux.net/elks
^ permalink raw reply
* Re: O2 VICE support
From: Christoph Hellwig @ 2002-12-11 22:45 UTC (permalink / raw)
To: ilya; +Cc: linux-mips, ralf
In-Reply-To: <20021211221629.GP609@gateway.total-knowledge.com>
On Wed, Dec 11, 2002 at 02:16:29PM -0800, ilya@theIlya.com wrote:
> > > + if (!filp->private_data) {
> > > + filp->private_data = vice_device;
> > > + }
> >
> > filp->private_data can't be set.
> ???
> I can live without using it of course, since it isn't currently possible to have
> more then one instance of VICE in same machine, but theoretical possibility does
> exist. Where should I pass information about which specific device current
> call is?
Sorry if that sentence was confusing. I meant it can't be already set in
->open so the if is superflous.
> > > +void vice_cleanup_module(void)
> > > +{
> > > +#ifndef CONFIG_DEVFS_FS
> > > + /* cleanup_module is never called if registering failed */
> > > + unregister_chrdev(vice_major, "vice");
> > > +#endif
> >
> > Umm, just because someone makes the mistake of enabling devfs he
> > doesn't have to use it.. :)
> I'm not buying that one :)
You can have CONFIG_DEVFS_FS set but devfs not mounted and used.
Thus #ifndef CONFIG_DEVFS_FS code is a very bad idea.
^ permalink raw reply
* Re: [parisc-linux] ["CSA Test Drive" <TestDrive@compaq.com>] FW: Some issues
From: Carlos O'Donell @ 2002-12-11 22:44 UTC (permalink / raw)
To: John David Anglin; +Cc: Bdale Garbee, parisc-linux
In-Reply-To: <200212112203.gBBM3BRZ021171@hiauly1.hia.nrc.ca>
> > 2) The Debian HPPA box (spe170) seems to have alpha quality
> > software. Specifically, the FCNV,UDW,DBL instruction is
> > apparently trapped, at least for certain input operand
>
> I tried the program and I confirm the incorrect result under
> hppa-linux. The same code under hpux generates the correct
> result. The problem might be the wrong rounding mode is set
> by glibc. I believe that there was a recent fix for this.
I fixed fesetround() so it wouldn't make a mess of the RM mask. Though
it does not appear that rounding is related to the problem.
> I see no indication that the code traps on a PA8700. I think
> you would get a report in kern.log if the insn trapped due to
> an unimplemented trap. You might have the floating point
> exception enables on causing traps on your machine.
The code _seems_ to trap on a PA8600. Though I won't say anything until
I enable debugging in the trap handler and rerun the test.
c.
^ permalink raw reply
* Re: O2 VICE support
From: Juan Quintela @ 2002-12-11 22:46 UTC (permalink / raw)
To: ilya; +Cc: Christoph Hellwig, linux-mips, ralf
In-Reply-To: <20021211221629.GP609@gateway.total-knowledge.com>
>>>>> "ilya" == ilya <ilya@theIlya.com> writes:
>>
>> > +void vice_cleanup_module(void)
>> > +{
>> > +#ifndef CONFIG_DEVFS_FS
>> > + /* cleanup_module is never called if registering failed */
>> > + unregister_chrdev(vice_major, "vice");
>> > +#endif
>>
>> Umm, just because someone makes the mistake of enabling devfs he
>> doesn't have to use it.. :)
ilya> I'm not buying that one :)
Read behind the joke:
- you have devfs compiled in
- you don't have devfs mounted
Conclusion:
there is a bug in your code :)
Later, Juan.
--
In theory, practice and theory are the same, but in practice they
are different -- Larry McVoy
^ permalink raw reply
* Re: Kill TRUE/FALSE from hp100.c
From: Christoph Hellwig @ 2002-12-11 22:47 UTC (permalink / raw)
To: Pavel Machek; +Cc: Rusty trivial patch monkey Russell, kernel list, jgarzik
In-Reply-To: <20021210215612.GA514@elf.ucw.cz>
On Tue, Dec 10, 2002 at 10:56:12PM +0100, Pavel Machek wrote:
> Hi!
>
> Kernel coding style does not like TRUE/FALSE, AFAICS. Please apply,
What's even more interesting: were did the defintions of TRUE/FALSE
as used by hp100.c come from?
^ permalink raw reply
* Confusing help texts?
From: Pavel Machek @ 2002-12-11 22:44 UTC (permalink / raw)
To: kernel list, greg
Hi!
+ * Prevents any programs running with egid == 0 if a specific USB device
+ * is not present in the system. Yes, it can be gotten around, but is a
+ * nice starting point for people to play with, and learn the LSM
+ * interface.
How can you "prevent any program"?
+ It enables control over processes being created by root users
+ if a specific USB device is not present in the system.
Enables control over processes?
Confused,
Pavel
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
^ permalink raw reply
* Re: [PATCH 2.5] SGI O2 framebuffer driver
From: Alan Cox @ 2002-12-11 23:15 UTC (permalink / raw)
To: Vivien Chappelier; +Cc: Ralf Baechle, linux-mips, Ilya Volynets
In-Reply-To: <Pine.LNX.4.21.0212112252410.2300-100000@melkor>
On Wed, 2002-12-11 at 22:25, Vivien Chappelier wrote:
> Hi,
>
> Here's a patch to add support for the framebuffer on the SGI
> O2. It has support for both static (bootmem) and dynamic video memory
> allocation (limited to 2MB due to the small number of available vmalloc
> mappings in the current mips64 kernel).
Since vmalloc is physically non linear is there any reason you can't
just use get_free_page() a lot ?
^ permalink raw reply
* Re: Allocating 16MB aligned phsyical memory
From: Pete Zaitcev @ 2002-12-11 22:43 UTC (permalink / raw)
To: Felix Domke; +Cc: linux-kernel
In-Reply-To: <mailman.1039599127.17111.linux-kernel2news@redhat.com>
>[...]
> At the moment, i'm reserving a 16MB space of ram for which i made an own
> allocater. needless to say that this sucks.
No, that's normal. Of course, you should have used Pauline's
bigphysarea patch, but otherwise it's a sane idea, IMHO.
http://www.polyware.nl/~middelink/En/hob-v4l.html
http://www.polyware.nl/~middelink/patch/bigphysarea-2.4.4.tar.gz
I often wonder why MPEG hardware designers are such dorks.
It is pretty common place between them to ask for contiguous
memory. I would say, 95% of requests for contiguous memory
comes from poor hacks who have to deal with DVRs, PVRs,
and such. Practically no other hardware is this idiotic.
Not that it's impossible to do right, or anything. I think,
stradis is sane.
-- Pete
^ permalink raw reply
* Re: capable open_port() check wrong for kmem
From: carbonated beverage @ 2002-12-11 22:38 UTC (permalink / raw)
To: Olaf Dietsche; +Cc: linux-kernel
In-Reply-To: <87fzt6nm6n.fsf@goat.bogus.local>
On Tue, Dec 10, 2002 at 12:33:04PM +0100, Olaf Dietsche wrote:
[snip]
> You may want to look at this thread:
> <http://groups.google.com/groups?threadm=87smza1p7f.fsf%40goat.bogus.local>
Hmm.
Okay, which approach is generally accpetible for inclusion into the kernel?
1) Nuke CAP_SYS_RAWIO check. If the permissions on /dev/kmem is wrong,
tough. It shouldn't be root:root 0666 in the first place anyways.
2) Add CAP_SYS_KMEM for read-only access, check for CAP_SYS_RAWIO for
the write case.
3) Special case /dev/kmem in open_port.
or:
4) Even if an application doesn't need write access to /dev/kmem, require
it to open /dev/kmem O_RDWR, as it makes life easier for many people,
especially when modifying the kernel at run-time to hijack sysca... um, do
creative updates. :)
I'd prefer #1 or #2, but the discussion seems to have ended during the last
time the issue was brought up.
-- DN
Daniel
^ permalink raw reply
* How to get a user's IDLE time?
From: hanxin @ 2002-12-11 22:34 UTC (permalink / raw)
To: netfilter mail list
Hi,
I have a Redhat 7.2 box with kernel 2.4.18. I use iptables for NAT and
there are 20 clients in my firewall.
Now I want to know is there a way to get a client PC's IDLE time(the
time that the PC doesn't send/receive packets through firewall).
Thanks.
--
hanxin
^ permalink raw reply
* Kill crap from hp100.c
From: Pavel Machek @ 2002-12-10 21:52 UTC (permalink / raw)
To: Rusty trivial patch monkey Russell, kernel list, jgarzik
Hi!
This kills assorted crap from hp100 driver. (For 2.4 and 2.5)
Pavel
--- clean/drivers/net/hp100.c 2002-11-23 19:55:22.000000000 +0100
+++ linux-swsusp/drivers/net/hp100.c 2002-12-09 21:19:48.000000000 +0100
@@ -117,7 +117,6 @@
#include <asm/bitops.h>
#include <asm/io.h>
-#define LINUX_2_1
typedef struct net_device_stats hp100_stats_t;
#include "hp100.h"
@@ -285,7 +284,6 @@
#define HP100_PCI_IDS_SIZE (sizeof(hp100_pci_ids)/sizeof(struct hp100_pci_id))
-#if LINUX_VERSION_CODE >= 0x20400
static struct pci_device_id hp100_pci_tbl[] __initdata = {
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585A, PCI_ANY_ID, PCI_ANY_ID,},
{PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585B, PCI_ANY_ID, PCI_ANY_ID,},
@@ -294,7 +292,6 @@
{} /* Terminating entry */
};
MODULE_DEVICE_TABLE(pci, hp100_pci_tbl);
-#endif /* LINUX_VERSION_CODE >= 0x20400 */
static int hp100_rx_ratio = HP100_DEFAULT_RX_RATIO;
static int hp100_priority_tx = HP100_DEFAULT_PRIORITY_TX;
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
^ permalink raw reply
* Kill TRUE/FALSE from hp100.c
From: Pavel Machek @ 2002-12-10 21:56 UTC (permalink / raw)
To: Rusty trivial patch monkey Russell, kernel list, jgarzik
Hi!
Kernel coding style does not like TRUE/FALSE, AFAICS. Please apply,
Pavel
--- clean/drivers/net/hp100.c 2002-11-23 19:55:22.000000000 +0100
+++ linux-swsusp/drivers/net/hp100.c 2002-12-09 21:19:48.000000000 +0100
@@ -889,7 +887,7 @@
wait();
} else {
hp100_outw(HP100_INT_EN | HP100_RESET_LB, OPTION_LSW);
- hp100_cascade_reset(dev, TRUE);
+ hp100_cascade_reset(dev, 1);
hp100_page(MAC_CTRL);
hp100_andb(~(HP100_RX_EN | HP100_TX_EN), MAC_CFG_1);
}
@@ -900,7 +898,7 @@
wait();
/* Go into reset again. */
- hp100_cascade_reset(dev, TRUE);
+ hp100_cascade_reset(dev, 1);
/* Set Option Registers to a safe state */
hp100_outw(HP100_DEBUG_EN |
@@ -943,13 +941,13 @@
wait(); /* TODO: Do we really need this? */
/* Enable Hardware (e.g. unreset) */
- hp100_cascade_reset(dev, FALSE);
+ hp100_cascade_reset(dev, 0);
/* ------- initialisation complete ----------- */
/* Finally try to log in the Hub if there may be a VG connection. */
if (lp->lan_type != HP100_LAN_10)
hp100_login_to_vg_hub(dev, FALSE); /* relogin */
}
\f
@@ -1191,7 +1189,7 @@
hp100_stop_interface(dev);
if (lp->lan_type == HP100_LAN_100)
- lp->hub_status = hp100_login_to_vg_hub(dev, FALSE);
+ lp->hub_status = hp100_login_to_vg_hub(dev, 0);
netif_stop_queue(dev);
@@ -1508,13 +1506,13 @@
hp100_andb(~HP100_BM_MASTER, BM);
} /* end of shutdown procedure for non-etr parts */
- hp100_cascade_reset(dev, TRUE);
+ hp100_cascade_reset(dev, 1);
}
hp100_page(PERFORMANCE);
/* hp100_outw( HP100_BM_READ | HP100_BM_WRITE | HP100_RESET_HB, OPTION_LSW ); */
/* Busmaster mode should be shut down now. */
}
/*
* transmit functions
*/
@@ -1577,18 +1584,18 @@
if (i == HP100_LAN_ERR)
printk("hp100: %s: link down detected\n", dev->name);
else if (lp->lan_type != i) { /* cable change! */
- /* it's very hard - all network setting must be changed!!! */
+ /* it's very hard - all network settings must be changed!!! */
printk("hp100: %s: cable change 10Mb/s <-> 100Mb/s detected\n", dev->name);
lp->lan_type = i;
hp100_stop_interface(dev);
if (lp->lan_type == HP100_LAN_100)
- lp->hub_status = hp100_login_to_vg_hub(dev, FALSE);
+ lp->hub_status = hp100_login_to_vg_hub(dev, 0);
hp100_start_interface(dev);
} else {
printk("hp100: %s: interface reset\n", dev->name);
hp100_stop_interface(dev);
if (lp->lan_type == HP100_LAN_100)
- lp->hub_status = hp100_login_to_vg_hub(dev, FALSE);
+ lp->hub_status = hp100_login_to_vg_hub(dev, 0);
hp100_start_interface(dev);
}
}
@@ -1729,7 +1727,7 @@
/* we have a 100Mb/s adapter but it isn't connected to hub */
printk("hp100: %s: login to 100Mb/s hub retry\n", dev->name);
hp100_stop_interface(dev);
- lp->hub_status = hp100_login_to_vg_hub(dev, FALSE);
+ lp->hub_status = hp100_login_to_vg_hub(dev, 0);
hp100_start_interface(dev);
} else {
spin_lock_irqsave(&lp->lock, flags);
@@ -1745,13 +1743,13 @@
lp->lan_type = i;
hp100_stop_interface(dev);
if (lp->lan_type == HP100_LAN_100)
- lp->hub_status = hp100_login_to_vg_hub(dev, FALSE);
+ lp->hub_status = hp100_login_to_vg_hub(dev, 0);
hp100_start_interface(dev);
} else {
printk("hp100: %s: interface reset\n", dev->name);
hp100_stop_interface(dev);
if (lp->lan_type == HP100_LAN_100)
- lp->hub_status = hp100_login_to_vg_hub(dev, FALSE);
+ lp->hub_status = hp100_login_to_vg_hub(dev, 0);
hp100_start_interface(dev);
mdelay(1);
}
@@ -2220,7 +2219,7 @@
#ifdef HP100_DEBUG
printk("hp100: %s: 100VG MAC settings have changed - relogin.\n", dev->name);
#endif
- lp->hub_status = hp100_login_to_vg_hub(dev, TRUE); /* force a relogin to the hub */
+ lp->hub_status = hp100_login_to_vg_hub(dev, 1); /* force a relogin to the hub */
}
} else {
int i;
@@ -2245,7 +2244,7 @@
#ifdef HP100_DEBUG
printk("hp100: %s: 100VG MAC settings have changed - relogin.\n", dev->name);
#endif
- lp->hub_status = hp100_login_to_vg_hub(dev, TRUE); /* force a relogin to the hub */
+ lp->hub_status = hp100_login_to_vg_hub(dev, 1); /* force a relogin to the hub */
}
}
}
@@ -2685,7 +2689,7 @@
*/
hp100_page(MAC_CTRL);
startst = hp100_inb(VG_LAN_CFG_1);
- if ((force_relogin == TRUE) || (hp100_inb(MAC_CFG_4) & HP100_MAC_SEL_ST)) {
+ if ((force_relogin == 1) || (hp100_inb(MAC_CFG_4) & HP100_MAC_SEL_ST)) {
#ifdef HP100_DEBUG_TRAINING
printk("hp100: %s: Start training\n", dev->name);
#endif
@@ -2847,7 +2851,7 @@
printk("hp100: %s: cascade_reset\n", dev->name);
#endif
- if (enable == TRUE) {
+ if (enable) {
hp100_outw(HP100_HW_RST | HP100_RESET_LB, OPTION_LSW);
if (lp->chip == HP100_CHIPID_LASSEN) {
/* Lassen requires a PCI transmit fifo reset */
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
^ permalink raw reply
* hp100: Detect coax cabling
From: Pavel Machek @ 2002-12-10 22:01 UTC (permalink / raw)
To: kernel list, jgarzik
Hi!
This is only non-trivial patch from this series. It prints coax
vs. 10baseT information to the user, and fixes indentation. Please apply,
Pavel
--- clean/drivers/net/hp100.c 2002-11-23 19:55:22.000000000 +0100
+++ linux-swsusp/drivers/net/hp100.c 2002-12-09 21:19:48.000000000 +0100
@@ -356,8 +353,8 @@
* address - Jean II */
static inline dma_addr_t virt_to_whatever(struct net_device *dev, u32 * ptr)
{
- return ((u_long) ptr) +
- ((struct hp100_private *) (dev->priv))->whatever_offset;
+ return ((u_long) ptr) +
+ ((struct hp100_private *) (dev->priv))->whatever_offset;
}
/* TODO: This function should not really be needed in a good design... */
@@ -854,7 +849,10 @@
printk("100Mb/s Voice Grade AnyLAN network.\n");
break;
case HP100_LAN_10:
- printk("10Mb/s network.\n");
+ printk("10Mb/s network (10baseT).\n");
+ break;
+ case HP100_LAN_COAX:
+ printk("10Mb/s network (coax).\n");
break;
default:
printk("Warning! Link down.\n");
@@ -2535,11 +2534,16 @@
return HP100_LAN_10;
if (val_10 & HP100_AUI_ST) { /* have we BNC or AUI onboard? */
+ /*
+ * This can be overriden by dos utility, so if this has no effect,
+ * perhaps you need to download that utility from HP and set card
+ * back to "auto detect".
+ */
val_10 |= HP100_AUI_SEL | HP100_LOW_TH;
hp100_page(MAC_CTRL);
hp100_outb(val_10, 10_LAN_CFG_1);
hp100_page(PERFORMANCE);
- return HP100_LAN_10;
+ return HP100_LAN_COAX;
}
if ((lp->id->id == 0x02019F022) ||
--- clean/drivers/net/hp100.h 2001-05-16 19:25:38.000000000 +0200
+++ linux-swsusp/drivers/net/hp100.h 2002-11-28 21:18:09.000000000 +0100
@@ -518,12 +518,13 @@
*/
#define HP100_LAN_100 100 /* lan_type value for VG */
#define HP100_LAN_10 10 /* lan_type value for 10BaseT */
+#define HP100_LAN_COAX 9 /* lan_type value for Coax */
#define HP100_LAN_ERR (-1) /* lan_type value for link down */
#define TRUE 1
#define FALSE 0
/*
* Bus Master Data Structures ----------------------------------------------
*/
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
^ permalink raw reply
* hp100: make it compile with debugging
From: Pavel Machek @ 2002-12-10 21:57 UTC (permalink / raw)
To: Rusty trivial patch monkey Russell, kernel list, jgarzik
Hi!
This is neccessary if you want hp100 to compile with debugging, please
apply.
Pavel
--- clean/drivers/net/hp100.c 2002-11-23 19:55:22.000000000 +0100
+++ linux-swsusp/drivers/net/hp100.c 2002-12-09 21:19:48.000000000 +0100
@@ -2096,6 +2094,7 @@
struct hp100_private *lp = (struct hp100_private *) dev->priv;
#ifdef HP100_DEBUG_B
+ int ioaddr = dev->base_addr;
hp100_outw(0x4216, TRACE);
printk("hp100: %s: misc_interrupt\n", dev->name);
#endif
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
^ permalink raw reply
* Re: PATCH: Four function buttons on DELL Latitude X200
From: Pavel Machek @ 2002-12-10 21:34 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: linux-kernel
In-Reply-To: <at2r5v$fib$1@cesium.transmeta.com>
Hi!
> > In article <m3d6ocjd81.fsf@Janik.cz> you wrote:
> > > this patch add support for four functions key on DELL Latitude X200.
> >
> > we need a more generic appoach to handle those key codes for various
> > extensions. I think a pure software reconfiguration of the keymaps or a
> > daemon trakcing the raw codes is fine. Perhaps we can make something like a
> > hook into the kernel where all untrapped function keys are send to in raw
> > format?
> >
>
> The PC only has so many possible keycodes (with E0 and E1 it's still
> in the sub-300 range.) It won't fit within 128, but I would really
> like an algorithmic mapping from scancodes to keycodes so we don't
> continue to have this problem.
>
> For example, using a 16-bit keycode model:
>
>
> Scancode Keycode (binary)
> mxxxxxxx m0000000 0xxxxxxx
> E0 mxxxxxxx m0000000 1xxxxxxx
> E1 mxxxxxxx yyyyyyyy mxxxxxxx yyyyyyyy
>
> m = make/break bit
Well, nothing prevents keyboard manufacturers from using 0xe2 as a
prefix, too. I think there are really *weird* keyboards out there.
Pavel
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
^ permalink raw reply
* Re: usage of disarm_decr[]
From: Xiaogeng (Shawn) Jin @ 2002-12-11 22:31 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-embedded
In-Reply-To: <15863.44615.245438.78166@argo.ozlabs.ibm.com>
Thank you. I have some further questions regarding to timer_interrupt().
How often is timer_interrupt() invoked? Every 1/HZ seconds? This is
controlled by the decrementer, right? Initially the value of the
decrementer is 'tb_ticks_per_jiffy'. Then it's updated in
timer_interrupt(). Why isn't 'next_dec' the initial value
'tb_ticks_per_jiffy'? It's due to the time drift caused by the accuracy
of external clock (oscillator) or by the precision of software?
next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)
The timebase register is initialized to zero and then increments
periodically. How does it increment? Each clock (TMBCLK) the increment
is 1? by itself, I mean, hardware itself, or by software?
>>What's the purpose of using disarm_decr? I read the timer_interrupt()
>>code and found the only place where it's referenced.
>
> RT-Linux (www.fsmlabs.com) uses it. RT-Linux takes over all interrupt
> handling, including decrementer interrupts, and the disarm_decr thing
> is there to give RT-Linux a way to take control of the decrementer
> register.
Thanks.
- Shawn.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply
* Re: NFS mounted rootfs possible via PCMCIA NIC ?
From: Andrew Morton @ 2002-12-11 22:34 UTC (permalink / raw)
To: Andreas Schaufler; +Cc: Linux Kernel Mailing List
In-Reply-To: <200212112253.57325.andreas.schaufler@gmx.de>
Andreas Schaufler wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello list,
>
> I am trying to configure a notebook with a PCMCIA NIC to boot over network.
> (kernel 2.4.20)
Nope. The kernel does the NFS thing before bringing up cardbus.
This patch worked, back in the 2.4.17 days. It also fixes some
cardbus bugs. I don't immediately recall what they were.
drivers/pcmcia/Makefile | 3 +
drivers/pcmcia/ds.c | 13 ++-----
drivers/pcmcia/yenta.c | 85 ++++++++++++++++++++++--------------------------
init/main.c | 3 -
4 files changed, 45 insertions(+), 59 deletions(-)
--- 24/drivers/pcmcia/ds.c~pcmcia-ip-autoconf Wed Dec 11 14:30:56 2002
+++ 24-akpm/drivers/pcmcia/ds.c Wed Dec 11 14:30:56 2002
@@ -968,14 +968,7 @@ int __init init_pcmcia_ds(void)
return 0;
}
-#ifdef MODULE
-
-int __init init_module(void)
-{
- return init_pcmcia_ds();
-}
-
-void __exit cleanup_module(void)
+void __exit cleanup_pcmcia_ds(void)
{
int i;
#ifdef CONFIG_PROC_FS
@@ -990,4 +983,6 @@ void __exit cleanup_module(void)
kfree(socket_table);
}
-#endif
+module_init(init_pcmcia_ds);
+module_exit(cleanup_pcmcia_ds);
+
--- 24/drivers/pcmcia/Makefile~pcmcia-ip-autoconf Wed Dec 11 14:30:56 2002
+++ 24-akpm/drivers/pcmcia/Makefile Wed Dec 11 14:30:56 2002
@@ -22,7 +22,7 @@ ifeq ($(CONFIG_CARDBUS),y)
endif
ifeq ($(CONFIG_PCMCIA),y)
- obj-y := cistpl.o rsrc_mgr.o bulkmem.o ds.o cs.o
+ obj-y := cistpl.o rsrc_mgr.o bulkmem.o cs.o
ifeq ($(CONFIG_CARDBUS),y)
obj-y += cardbus.o yenta.o pci_socket.o
endif
@@ -38,6 +38,7 @@ ifeq ($(CONFIG_PCMCIA),y)
ifeq ($(CONFIG_HD64465_PCMCIA),y)
obj-y += hd64465_ss.o
endif
+ obj-y += ds.o
else
ifeq ($(CONFIG_PCMCIA),m)
obj-m := pcmcia_core.o ds.o
--- 24/drivers/pcmcia/yenta.c~pcmcia-ip-autoconf Wed Dec 11 14:30:56 2002
+++ 24-akpm/drivers/pcmcia/yenta.c Wed Dec 11 14:30:56 2002
@@ -574,38 +574,6 @@ static void yenta_get_socket_capabilitie
printk("Yenta IRQ list %04x, PCI irq%d\n", socket->cap.irq_mask, socket->cb_irq);
}
-extern void cardbus_register(pci_socket_t *socket);
-
-/*
- * 'Bottom half' for the yenta_open routine. Allocate the interrupt line
- * and register the socket with the upper layers.
- */
-static void yenta_open_bh(void * data)
-{
- pci_socket_t * socket = (pci_socket_t *) data;
-
- /* It's OK to overwrite this now */
- socket->tq_task.routine = yenta_bh;
-
- if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, SA_SHIRQ, socket->dev->name, socket)) {
- /* No IRQ or request_irq failed. Poll */
- socket->cb_irq = 0; /* But zero is a valid IRQ number. */
- socket->poll_timer.function = yenta_interrupt_wrapper;
- socket->poll_timer.data = (unsigned long)socket;
- socket->poll_timer.expires = jiffies + HZ;
- add_timer(&socket->poll_timer);
- }
-
- /* Figure out what the dang thing can do for the PCMCIA layer... */
- yenta_get_socket_capabilities(socket, isa_interrupts);
- printk("Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE));
-
- /* Register it with the pcmcia layer.. */
- cardbus_register(socket);
-
- MOD_DEC_USE_COUNT;
-}
-
static void yenta_clear_maps(pci_socket_t *socket)
{
int i;
@@ -823,6 +791,8 @@ static struct cardbus_override_struct {
#define NR_OVERRIDES (sizeof(cardbus_override)/sizeof(struct cardbus_override_struct))
+extern void cardbus_register(pci_socket_t *socket);
+
/*
* Initialize a cardbus controller. Make sure we have a usable
* interrupt, and that we can map the cardbus area. Fill in the
@@ -832,15 +802,19 @@ static int yenta_open(pci_socket_t *sock
{
int i;
struct pci_dev *dev = socket->dev;
+ int retval = -1;
+ int polling = 0;
+
+ MOD_INC_USE_COUNT;
/*
* Do some basic sanity checking..
*/
if (pci_enable_device(dev))
- return -1;
+ goto fail;
if (!pci_resource_start(dev, 0)) {
printk("No cardbus resource!\n");
- return -1;
+ goto fail;
}
/*
@@ -849,7 +823,7 @@ static int yenta_open(pci_socket_t *sock
*/
socket->base = ioremap(pci_resource_start(dev, 0), 0x1000);
if (!socket->base)
- return -1;
+ goto fail;
yenta_config_init(socket);
@@ -867,24 +841,43 @@ static int yenta_open(pci_socket_t *sock
if (dev->vendor == d->vendor && dev->device == d->device) {
socket->op = d->op;
if (d->op->open) {
- int retval = d->op->open(socket);
- if (retval < 0)
- return retval;
+ int ret = d->op->open(socket);
+ if (ret < 0) {
+ iounmap(socket->base);
+ retval = ret;
+ goto fail;
+ }
}
}
}
- /* Get the PCMCIA kernel thread to complete the
- initialisation later. We can't do this here,
- because, er, because Linus says so :)
- */
- socket->tq_task.routine = yenta_open_bh;
+ socket->tq_task.routine = yenta_bh;
socket->tq_task.data = socket;
- MOD_INC_USE_COUNT;
- schedule_task(&socket->tq_task);
+ if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt,
+ SA_SHIRQ, socket->dev->name, socket)) {
+ /* No IRQ or request_irq failed. Poll */
+ socket->cb_irq = 0; /* But zero is a valid IRQ number. */
+ socket->poll_timer.function = yenta_interrupt_wrapper;
+ socket->poll_timer.data = (unsigned long)socket;
+ socket->poll_timer.expires = jiffies + HZ;
+ polling = 1;
+ }
- return 0;
+ /* Figure out what the dang thing can do for the PCMCIA layer... */
+ yenta_get_socket_capabilities(socket, isa_interrupts);
+ printk("Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE));
+
+ /* Register it with the pcmcia layer.. */
+ cardbus_register(socket);
+
+ if (polling)
+ add_timer(&socket->poll_timer);
+
+ retval = 0;
+fail:
+ MOD_DEC_USE_COUNT;
+ return retval;
}
/*
--- 24/init/main.c~pcmcia-ip-autoconf Wed Dec 11 14:30:56 2002
+++ 24-akpm/init/main.c Wed Dec 11 14:30:56 2002
@@ -533,9 +533,6 @@ static void __init do_basic_setup(void)
irda_proto_init();
irda_device_init(); /* Must be done after protocol initialization */
#endif
-#ifdef CONFIG_PCMCIA
- init_pcmcia_ds(); /* Do this last */
-#endif
}
extern void prepare_namespace(void);
_
^ permalink raw reply
* Re: NFS mounted rootfs possible via PCMCIA NIC ?
From: Alan Cox @ 2002-12-11 23:12 UTC (permalink / raw)
To: Andreas Schaufler; +Cc: Linux Kernel Mailing List
In-Reply-To: <200212112253.57325.andreas.schaufler@gmx.de>
On Wed, 2002-12-11 at 21:53, Andreas Schaufler wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello list,
>
> I am trying to configure a notebook with a PCMCIA NIC to boot over network.
> (kernel 2.4.20)
> In order to accomplish this I passed over the neccessary configuration
> paramters through the boot loader (ip, root, nfsroot)
>
> The problem is: When the kernel is booting it is trying to configure the
> Network interface, before it has been activated.
PCMCIA relies in part on user space. You can do this, it involves
building a large initrd with a dhcp client on it that sets up pcmcia,
then nfs mounts stuff, then pivot_root()'s into it. Its not exactly
trivial
^ 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.