[PATCH] mei: reseting -> resetting

2013-04-18 Thread Bill Nottingham
This enum leaks out to userspace via error messages, so fix the spelling.

Signed-off-by: Bill Nottingham 
---
 drivers/misc/mei/hbm.c | 8 
 drivers/misc/mei/hw-me.c   | 2 +-
 drivers/misc/mei/init.c| 4 ++--
 drivers/misc/mei/mei_dev.h | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c
index fb9e63b..e02d4cf 100644
--- a/drivers/misc/mei/hbm.c
+++ b/drivers/misc/mei/hbm.c
@@ -52,7 +52,7 @@ static void mei_hbm_me_cl_allocate(struct mei_device *dev)
sizeof(struct mei_me_client), GFP_KERNEL);
if (!clients) {
dev_err(&dev->pdev->dev, "memory allocation for ME clients 
failed.\n");
-   dev->dev_state = MEI_DEV_RESETING;
+   dev->dev_state = MEI_DEV_RESETTING;
mei_reset(dev, 1);
return;
}
@@ -146,7 +146,7 @@ void mei_hbm_start_req(struct mei_device *dev)
dev->recvd_msg = false;
if (mei_write_message(dev, mei_hdr, dev->wr_msg.data)) {
dev_dbg(&dev->pdev->dev, "write send version message to FW 
fail.\n");
-   dev->dev_state = MEI_DEV_RESETING;
+   dev->dev_state = MEI_DEV_RESETTING;
mei_reset(dev, 1);
}
dev->init_clients_state = MEI_START_MESSAGE;
@@ -174,7 +174,7 @@ static void mei_hbm_enum_clients_req(struct mei_device *dev)
enum_req->hbm_cmd = HOST_ENUM_REQ_CMD;
 
if (mei_write_message(dev, mei_hdr, dev->wr_msg.data)) {
-   dev->dev_state = MEI_DEV_RESETING;
+   dev->dev_state = MEI_DEV_RESETTING;
dev_dbg(&dev->pdev->dev, "write send enumeration request 
message to FW fail.\n");
mei_reset(dev, 1);
}
@@ -226,7 +226,7 @@ static int mei_hbm_prop_req(struct mei_device *dev)
prop_req->address = next_client_index;
 
if (mei_write_message(dev, mei_hdr, dev->wr_msg.data)) {
-   dev->dev_state = MEI_DEV_RESETING;
+   dev->dev_state = MEI_DEV_RESETTING;
dev_err(&dev->pdev->dev, "Properties request command failed\n");
mei_reset(dev, 1);
 
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index 642c622..4460a3e 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw-me.c
@@ -452,7 +452,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
 
/* check if ME wants a reset */
if (!mei_hw_is_ready(dev) &&
-   dev->dev_state != MEI_DEV_RESETING &&
+   dev->dev_state != MEI_DEV_RESETTING &&
dev->dev_state != MEI_DEV_INITIALIZING) {
dev_dbg(&dev->pdev->dev, "FW not ready.\n");
mei_reset(dev, 1);
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index 3561799..cb58f72 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -31,7 +31,7 @@ const char *mei_dev_state_str(int state)
MEI_DEV_STATE(INITIALIZING);
MEI_DEV_STATE(INIT_CLIENTS);
MEI_DEV_STATE(ENABLED);
-   MEI_DEV_STATE(RESETING);
+   MEI_DEV_STATE(RESETTING);
MEI_DEV_STATE(DISABLED);
MEI_DEV_STATE(RECOVERING_FROM_RESET);
MEI_DEV_STATE(POWER_DOWN);
@@ -151,7 +151,7 @@ void mei_reset(struct mei_device *dev, int 
interrupts_enabled)
if (dev->dev_state != MEI_DEV_INITIALIZING) {
if (dev->dev_state != MEI_DEV_DISABLED &&
dev->dev_state != MEI_DEV_POWER_DOWN)
-   dev->dev_state = MEI_DEV_RESETING;
+   dev->dev_state = MEI_DEV_RESETTING;
 
mei_cl_all_disconnect(dev);
 
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
index 9787381..77a584b 100644
--- a/drivers/misc/mei/mei_dev.h
+++ b/drivers/misc/mei/mei_dev.h
@@ -95,7 +95,7 @@ enum mei_dev_state {
MEI_DEV_INITIALIZING = 0,
MEI_DEV_INIT_CLIENTS,
MEI_DEV_ENABLED,
-   MEI_DEV_RESETING,
+   MEI_DEV_RESETTING,
MEI_DEV_DISABLED,
MEI_DEV_RECOVERING_FROM_RESET,
MEI_DEV_POWER_DOWN,
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] make unicode default

2007-10-01 Thread Bill Nottingham
Jan Engelhardt ([EMAIL PROTECTED]) said: 
> 
> Make the vt return to the system default when it is reset.
> Also make UTF-8 the system default.
> Derived from http://lkml.org/lkml/2007/8/31/246
> 
> Tested and works as expected.

Fine with me. I believe the original patch I sent went to -mm, so you 
may need rediffing/changing to go with that.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] add CONFIG_VT_UNICODE

2007-09-06 Thread Bill Nottingham
H. Peter Anvin ([EMAIL PROTECTED]) said: 
> Hmmm...
>
> Personally I'd suggest making it the default unless overridden in 
> /etc/sysctl.conf.  My second preference would be a command-line option, not 
> a compile-time default.
>
> This is 2007, after all, and it seems Unicode should be the default, 
> anything else legacy...

At the moment, it's a module parameter (ergo sysfs), not /proc/sys.
Also, this patch ties unicode for the keyboard as well.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: origin of __tmp1930643048 network device name: kernel-space or user-space

2007-09-06 Thread Bill Nottingham
Jan Engelhardt ([EMAIL PROTECTED]) said: 
> >dear all,
> >I'm trying to track down a problem on a Sun V40Z server with 4 network
> >devices grabbing random ethX device names. now, trying to force the
> >device names to what I want, I got a __tmpX form of device name,
> >which I think is a half-configured device... but which piece of
> >software is to blame ??? kernel, udev, hotplug
> 
> Look into dmesg. If the device was once known as ethX or similar,
> then it is userspace to blame.

It's userspace.



I'm assuming you're running some sort of Fedora/RHEL/
derivative; this is what you get when you have a device that starts
out named ethX, but which needed to be renamed so that an already
configured ethX could be changed to that name.

For the new device, either add a HWADDR in a ifcfg-ethX file for
that interface, add something to /etc/mactab, or add a udev rule.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] add CONFIG_VT_UNICODE

2007-08-31 Thread Bill Nottingham
Randy Dunlap ([EMAIL PROTECTED]) said: 
> A diffstat would be nice.

Sure.

 linux-2.6.22.noarch/drivers/char/Kconfig|   17 +
 linux-2.6.22.noarch/drivers/char/keyboard.c |2 +-
 linux-2.6.22.noarch/drivers/char/sysrq.c|4 ++--
 linux-2.6.22.noarch/drivers/char/vt.c   |6 +-
 linux-2.6.22.noarch/drivers/char/vt_ioctl.c |2 +-
 linux-2.6.22.x86_64/include/linux/vt_kern.h |1 +
 6 files changed, 27 insertions(+), 5 deletions(-)
   
> Please document 'default_utf8=' in Documentation/kernel-parameters.txt.

It's already documented there (existed before this patch).

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] add CONFIG_VT_UNICODE

2007-08-31 Thread Bill Nottingham
As of now, the kernel defaults to non-unicode and XLATE for the keyboard.
We've been changing this in Fedora, but that requires patching the defaults
in the kernel.

The attached introduces CONFIG_VT_UNICODE, which sets the console in unicode
mode by default on boot, including both the virtual terminal and the keyboard
driver.

Signed-off-by: Bill Nottingham <[EMAIL PROTECTED]>

diff -up linux-2.6.22.noarch/drivers/char/keyboard.c.foo 
linux-2.6.22.noarch/drivers/char/keyboard.c
--- linux-2.6.22.noarch/drivers/char/keyboard.c.foo 2007-08-30 
17:18:54.0 -0400
+++ linux-2.6.22.noarch/drivers/char/keyboard.c 2007-08-30 17:27:13.0 
-0400
@@ -1366,7 +1366,7 @@ int __init kbd_init(void)
kbd_table[i].lockstate = KBD_DEFLOCK;
kbd_table[i].slockstate = 0;
kbd_table[i].modeflags = KBD_DEFMODE;
-   kbd_table[i].kbdmode = VC_XLATE;
+   kbd_table[i].kbdmode = default_utf8 ? VC_UNICODE : VC_XLATE;
}
 
error = input_register_handler(&kbd_handler);
diff -up linux-2.6.22.noarch/drivers/char/vt_ioctl.c.foo 
linux-2.6.22.noarch/drivers/char/vt_ioctl.c
--- linux-2.6.22.noarch/drivers/char/vt_ioctl.c.foo 2007-08-30 
17:15:45.0 -0400
+++ linux-2.6.22.noarch/drivers/char/vt_ioctl.c 2007-08-30 17:27:35.0 
-0400
@@ -1070,7 +1070,7 @@ int vt_waitactive(int vt)
 void reset_vc(struct vc_data *vc)
 {
vc->vc_mode = KD_TEXT;
-   kbd_table[vc->vc_num].kbdmode = VC_XLATE;
+   kbd_table[vc->vc_num].kbdmode = default_utf8 ? VC_UNICODE : VC_XLATE;
vc->vt_mode.mode = VT_AUTO;
vc->vt_mode.waitv = 0;
vc->vt_mode.relsig = 0;
diff -up linux-2.6.22.noarch/drivers/char/Kconfig.foo 
linux-2.6.22.noarch/drivers/char/Kconfig
--- linux-2.6.22.noarch/drivers/char/Kconfig.foo2007-08-30 
17:33:41.0 -0400
+++ linux-2.6.22.noarch/drivers/char/Kconfig2007-08-30 17:33:46.0 
-0400
@@ -36,6 +36,23 @@ config VT
  If unsure, say Y, or else you won't be able to do much with your new
  shiny Linux system :-)
 
+config VT_UNICODE
+   bool "Virtual console is Unicode by default"
+   depends on VT
+   default n
+   ---help---
+ If you say Y here, the virtual terminal will be in UTF-8 by default,
+ and the keyboard will run in unicode mode.
+
+ If you say N here, the virtual terminal will not be in UTF-8 by
+ default, and the keyboard will run in XLATE mode.
+
+ This can also be changed by passing 'default_utf8=<0|1>' on the
+ kernel command line.
+
+ Historically, the kernel has defaulted to non-UTF8 and XLATE mode.
+ If unsure, say N here.
+
 config VT_CONSOLE
bool "Support for console on virtual terminal" if EMBEDDED
depends on VT
diff -up linux-2.6.22.noarch/drivers/char/vt.c.foo 
linux-2.6.22.noarch/drivers/char/vt.c
--- linux-2.6.22.noarch/drivers/char/vt.c.foo   2007-08-30 17:20:02.0 
-0400
+++ linux-2.6.22.noarch/drivers/char/vt.c   2007-08-30 17:26:05.0 
-0400
@@ -158,7 +158,11 @@ static void blank_screen_t(unsigned long
 static void set_palette(struct vc_data *vc);
 
 static int printable;  /* Is console ready for printing? */
-static int default_utf8;
+#ifdef CONFIG_VT_UNICODE
+int default_utf8 = 1;
+#else
+int default_utf8;
+#endif
 module_param(default_utf8, int, S_IRUGO | S_IWUSR);
 
 /*
diff -up linux-2.6.22.noarch/drivers/char/sysrq.c.foo 
linux-2.6.22.noarch/drivers/char/sysrq.c
--- linux-2.6.22.noarch/drivers/char/sysrq.c.foo2007-08-30 
17:16:20.0 -0400
+++ linux-2.6.22.noarch/drivers/char/sysrq.c2007-08-30 17:26:52.0 
-0400
@@ -107,12 +107,12 @@ static void sysrq_handle_unraw(int key, 
struct kbd_struct *kbd = &kbd_table[fg_console];
 
if (kbd)
-   kbd->kbdmode = VC_XLATE;
+   kbd->kbdmode = default_utf8 ? VC_UNICODE : VC_XLATE;
 }
 static struct sysrq_key_op sysrq_unraw_op = {
.handler= sysrq_handle_unraw,
.help_msg   = "unRaw",
-   .action_msg = "Keyboard mode set to XLATE",
+   .action_msg = "Keyboard mode set to system default",
.enable_mask= SYSRQ_ENABLE_KEYBOARD,
 };
 #else
diff -up linux-2.6.22.x86_64/include/linux/vt_kern.h.foo 
linux-2.6.22.x86_64/include/linux/vt_kern.h
--- linux-2.6.22.x86_64/include/linux/vt_kern.h.foo 2007-08-30 
19:35:29.0 -0400
+++ linux-2.6.22.x86_64/include/linux/vt_kern.h 2007-08-30 19:35:29.0 
-0400
@@ -87,6 +87,7 @@ extern int unbind_con_driver(const struc
 extern char con_buf[CON_BUF_SIZE];
 extern struct mutex con_buf_mtx;
 extern char vt_dont_switch;
+extern int default_utf8;
 
 struct vt_spawn_console {
spinlock_t lock;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body

Re: 2.6.22: pcspkr driver no longer loads automatically

2007-08-08 Thread Bill Nottingham
Kay Sievers ([EMAIL PROTECTED]) said: 
> Ah, ok, makes sense. Yeah, that weird "platform devices loads itself by
> the name" thing got disabled in the platform subsystem. It caused
> modprobe loops for other devices.
> 
> The whole idea of issuing MODALIAS with plain module names instead of
> aliases can't really work, but the platform maintainer didn't like to
> use the usual aliases and the matches in the modules, for a reason I
> didn't understand while we talked about the problem last time.

So, the solution is for the platform device to issue a random modalias
that pcskpr exports?

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.22: pcspkr driver no longer loads automatically

2007-08-08 Thread Bill Nottingham
Kay Sievers ([EMAIL PROTECTED]) said: 
> It doesn't have any aliases, so seems it was never autoloaded.

It was - prior kernels loaded it via the uevent generated from 
/devices/platform/pcspkr. Newer kernels seem to never actually
trigger a uevent from that (tested with a combination of
udevmonitor and 'udevtrigger --subsystem-match=platform'.)

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] remove gratuitous space in airo module description

2007-07-27 Thread Bill Nottingham
Currently the modinfo looks like:

description:Support for Cisco/Aironet 802.11 wireless ethernet  
  cards.  Direct support for ISA/PCI/MPI cards and support   
for PCMCIA when used with airo_cs.

Arguably, it should be cut at the end of the first sentence. 
This at least makes it somewhat more legible.

diff -up linux-2.6.22.x86_64/drivers/net/wireless/airo.c.foo 
linux-2.6.22.x86_64/drivers/net/wireless/airo.c
--- linux-2.6.22.x86_64/drivers/net/wireless/airo.c.foo 2007-07-27 
19:03:59.0 -0400
+++ linux-2.6.22.x86_64/drivers/net/wireless/airo.c 2007-07-27 
19:04:15.0 -0400
@@ -241,8 +241,8 @@ static int proc_perm = 0644;
 
 MODULE_AUTHOR("Benjamin Reed");
 MODULE_DESCRIPTION("Support for Cisco/Aironet 802.11 wireless ethernet \
-   cards.  Direct support for ISA/PCI/MPI cards and support \
-  for PCMCIA when used with airo_cs.");
+cards.  Direct support for ISA/PCI/MPI cards and support \
+for PCMCIA when used with airo_cs.");
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340/350");
 module_param_array(io, int, NULL, 0);

Signed-off-by: Bill Nottingham <[EMAIL PROTECTED]>

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3

2007-06-14 Thread Bill Nottingham
Alexandre Oliva ([EMAIL PROTECTED]) said: 
> > Wait, a signed filesystem image that happens to contain GPL code
> > is now a derived work? Under what sort of interpretation does *that*
> > occur?
> 
> Is the signature not derived from the bits in the GPLed component, as
> much as it is derived from the key?
> 
> Isn't the signature is a functional portion of the image, i.e., if I
> take it out from the system, it won't work any more?
> 
> > (This pretty much throws the 'aggregation' premise in GPLv2 completely
> > out.)
> 
> Not really.  It could take some explicit distinguishing between
> functional and non-functional signatures, but that's about it.

OK. Let's take this to the simple and logical conclusion. A signed
filesystem image containing both GPL and non-GPL code. From your
point A, this is a derived work. 

Let's read the license...

2. b) You must cause any work that ... is derived from the Program or any
   part thereof, to be licensed as a whole at no charge to all third
   parties under the terms of this License.

...
 But when you
 distribute the same sections as part of a whole which is a work based
 on the Program, the distribution of the whole must be on the terms of
 this License, whose permissions for other licensees extend to the
 entire whole, and thus to each and every part regardless of who wrote it.
 
and yet later:

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

Pick one. They can't both be valid.

Moreover, this interpretation means that Red Hat (and pretty much
any other Linux distributor) should close up shop, as that's what
we've been doing for years.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3

2007-06-14 Thread Bill Nottingham
Alexandre Oliva ([EMAIL PROTECTED]) said: 
> And since the specific implementation involves creating a derived work
> of the GPLed kernel (the signature, or the signed image, or what have
> you)

Wait, a signed filesystem image that happens to contain GPL code
is now a derived work? Under what sort of interpretation does *that*
occur?

(This pretty much throws the 'aggregation' premise in GPLv2 completely
out.)

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3

2007-06-14 Thread Bill Nottingham
Alexandre Oliva ([EMAIL PROTECTED]) said: 
> But how about inside the TiVO, so as to use Linux and the rest of the
> GNU/Linux distro put in there for an even better DVR experience?
> 
> Sure, this might still be accomplished on another hardware platform.
> But the TiVO already has all the hardware there, and you already have
> all the software ready to work on it.  Except that you can't change
> it.  You'd have to waste time and money just to get to the same status
> on another hardware platform.
> 
> What do we gain?

Nothing. But that's not the terms it was licensed under, and no matter
what someone may claim about the *spirit* of the license, adding clauses
that restrict how you can deploy GPL software for use is a fundamental
enough change to the practical aspect of the license that it's no wonder
that people will choose not to use it.

If the designers of the license are more interested in vendettas against
those using the software in a way they didn't see beforehand (come on,
explicitly trying to define 'consumer product'?) in order to accomplish
pyrrhic victories (people moving to other platforms instead of using your
newly licensed code), that's fine, it's their choice. But not everyone
will want to follow that choice.

Bill


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3

2007-06-14 Thread Bill Nottingham
Neshama Parhoti ([EMAIL PROTECTED]) said: 
> But many of FSF's GNU projects are similar - for example GCC has 
> contributors
> from many many companies and individuals, from which I presume there
> are who might object to GPLv3.

FSF requires copyright assignment to the FSF on things like the compiler.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3

2007-06-14 Thread Bill Nottingham
Alexandre Oliva ([EMAIL PROTECTED]) said: 
> > Sure, if they make any changes or fixes to Linux.  Other than that,
> > only the same benefit that Microsoft get from Windows piracy - TiVo
> > employees become familiar with Linux and are more likely to use it
> > and maybe contribute more in another job later.
> 
> Now, what if TiVO actually permitted all of its customers to make
> changes or fixes to Linux, and become familiar with it and become more
> likely to use it and maybe contribute more later?

a) there's nothing that prevents a Tivo user from changing or fixing
Linux completely outside of the Tivo
b) the 'interesting' bits that someone would modify the Tivo to change
*aren't actually the bits that everyone is kvetching about here*

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.22-rc4-mm1

2007-06-07 Thread Bill Nottingham
Greg KH ([EMAIL PROTECTED]) said: 
> There are a number of distros out there right now who can support that
> option disabled.  I'm pretty sure they are the following right now:
>   Gentoo unstable (actually stable works now for me, but I'm not
>going to guarantee it just yet...)
>   Debian unstable (again stable might work, but I have not heard
>any reports from testers.)
>   openSUSE FACTORY (the 10.3 alpha releases)
> 
> and now it sounds like Red Hat rawhide will also work properly.

I suspect while it will work for mkinitrd, the installer will not
work properly.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: dealing with gcc 'comparison is always false' warnings (was: [PATCH] drivers/infiniband: fix comparsion between unsigned and negative)

2007-05-30 Thread Bill Nottingham
Satyam Sharma ([EMAIL PROTECTED]) said: 
> But yes, the kind of "fixes" you pointed out that _remove_ these conditions
> are definitely *not* what we would want to do.

I can see that - but I think it should be at least be brought up for each
warning, to determine either:

1) if it should be ignored
2) if a signed type is actually intended
3) if the code should be elided

While not necessarily in the IB instances, there are cases where there
are entire blocks of code (with debugging output, error returns, etc)
that can never get run, and it may make sense to remove those.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH RFC] qla2xxx: fix timeout in qla2x00_down_timeout

2007-05-30 Thread Bill Nottingham
iterations is unsigned, so it is impossible to get out of the loop
and return -ETIMEDOUT.

Signed-off-by: Bill Nottingham <[EMAIL PROTECTED]>

---

If the intention *is* to never fall out of the end of the loop, ignore
this, and just replace it with do {} while (1);.

--- drivers/scsi/qla2xxx/qla_os.c.foo   2007-05-30 04:07:52.0 -0400
+++ drivers/scsi/qla2xxx/qla_os.c   2007-05-30 04:08:31.0 -0400
@@ -2587,15 +2587,15 @@ qla2x00_down_timeout(struct semaphore *s
unsigned int iterations = jiffies_to_msecs(timeout)/100;
 
do {
if (!down_trylock(sema))
return 0;
if (msleep_interruptible(step))
break;
-   } while (--iterations >= 0);
+   } while (--iterations > 0);
 
return -ETIMEDOUT;
 }
 
 /* Firmware interface routines. */
 
 #define FW_BLOBS   5
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] drivers/infiniband: fix comparsion between unsigned and negative

2007-05-30 Thread Bill Nottingham
Recent gcc versions emit warnings when unsigned variables are compared < 0 or 
>= 0.

Signed-off-by: Bill Nottingham <[EMAIL PROTECTED]>

---
 core/sysfs.c   |2 +-
 core/ucm.c |2 +-
 core/ucma.c|2 +-
 core/user_mad.c|5 ++---
 core/uverbs_main.c |3 +--
 core/verbs.c   |3 +--
 hw/mlx4/qp.c   |2 +-
 7 files changed, 8 insertions(+), 11 deletions(-)

diff -ru linux-2.6.21-old/drivers/infiniband/core/sysfs.c 
linux-2.6.21/drivers/infiniband/core/sysfs.c
--- linux-2.6.21-old/drivers/infiniband/core/sysfs.c2007-05-30 
02:52:52.0 -0400
+++ linux-2.6.21/drivers/infiniband/core/sysfs.c2007-05-30 
02:07:31.0 -0400
@@ -112,7 +112,7 @@
return ret;
 
return sprintf(buf, "%d: %s\n", attr.state,
-  attr.state >= 0 && attr.state < ARRAY_SIZE(state_name) ?
+  attr.state < ARRAY_SIZE(state_name) ?
   state_name[attr.state] : "UNKNOWN");
 }
 
diff -ru linux-2.6.21-old/drivers/infiniband/core/ucma.c 
linux-2.6.21/drivers/infiniband/core/ucma.c
--- linux-2.6.21-old/drivers/infiniband/core/ucma.c 2007-05-30 
02:52:52.0 -0400
+++ linux-2.6.21/drivers/infiniband/core/ucma.c 2007-05-30 02:09:34.0 
-0400
@@ -955,7 +955,7 @@
if (copy_from_user(&hdr, buf, sizeof(hdr)))
return -EFAULT;
 
-   if (hdr.cmd < 0 || hdr.cmd >= ARRAY_SIZE(ucma_cmd_table))
+   if (hdr.cmd >= ARRAY_SIZE(ucma_cmd_table))
return -EINVAL;
 
if (hdr.in + sizeof(hdr) > len)
diff -ru linux-2.6.21-old/drivers/infiniband/core/ucm.c 
linux-2.6.21/drivers/infiniband/core/ucm.c
--- linux-2.6.21-old/drivers/infiniband/core/ucm.c  2007-05-30 
02:52:52.0 -0400
+++ linux-2.6.21/drivers/infiniband/core/ucm.c  2007-05-30 02:08:01.0 
-0400
@@ -1125,7 +1125,7 @@
if (copy_from_user(&hdr, buf, sizeof(hdr)))
return -EFAULT;
 
-   if (hdr.cmd < 0 || hdr.cmd >= ARRAY_SIZE(ucm_cmd_table))
+   if (hdr.cmd >= ARRAY_SIZE(ucm_cmd_table))
return -EINVAL;
 
if (hdr.in + sizeof(hdr) > len)
diff -ru linux-2.6.21-old/drivers/infiniband/core/user_mad.c 
linux-2.6.21/drivers/infiniband/core/user_mad.c
--- linux-2.6.21-old/drivers/infiniband/core/user_mad.c 2007-05-30 
02:52:52.0 -0400
+++ linux-2.6.21/drivers/infiniband/core/user_mad.c 2007-05-30 
02:08:32.0 -0400
@@ -455,8 +455,7 @@
goto err;
}
 
-   if (packet->mad.hdr.id < 0 ||
-   packet->mad.hdr.id >= IB_UMAD_MAX_AGENTS) {
+   if (packet->mad.hdr.id >= IB_UMAD_MAX_AGENTS) {
ret = -EINVAL;
goto err;
}
@@ -665,7 +664,7 @@
 
down_write(&file->port->mutex);
 
-   if (id < 0 || id >= IB_UMAD_MAX_AGENTS || !__get_agent(file, id)) {
+   if (id >= IB_UMAD_MAX_AGENTS || !__get_agent(file, id)) {
ret = -EINVAL;
goto out;
}
diff -ru linux-2.6.21-old/drivers/infiniband/core/uverbs_main.c 
linux-2.6.21/drivers/infiniband/core/uverbs_main.c
--- linux-2.6.21-old/drivers/infiniband/core/uverbs_main.c  2007-05-30 
02:52:52.0 -0400
+++ linux-2.6.21/drivers/infiniband/core/uverbs_main.c  2007-05-30 
02:09:07.0 -0400
@@ -592,8 +592,7 @@
if (hdr.in_words * 4 != count)
return -EINVAL;
 
-   if (hdr.command < 0 ||
-   hdr.command >= ARRAY_SIZE(uverbs_cmd_table) ||
+   if (hdr.command >= ARRAY_SIZE(uverbs_cmd_table) ||
!uverbs_cmd_table[hdr.command]  ||
!(file->device->ib_dev->uverbs_cmd_mask & (1ull << hdr.command)))
return -EINVAL;
diff -ru linux-2.6.21-old/drivers/infiniband/core/verbs.c 
linux-2.6.21/drivers/infiniband/core/verbs.c
--- linux-2.6.21-old/drivers/infiniband/core/verbs.c2007-05-30 
02:52:52.0 -0400
+++ linux-2.6.21/drivers/infiniband/core/verbs.c2007-05-30 
02:07:06.0 -0400
@@ -535,8 +535,7 @@
 {
enum ib_qp_attr_mask req_param, opt_param;
 
-   if (cur_state  < 0 || cur_state  > IB_QPS_ERR ||
-   next_state < 0 || next_state > IB_QPS_ERR)
+   if (cur_state  > IB_QPS_ERR || next_state > IB_QPS_ERR)
return 0;
 
if (mask & IB_QP_CUR_STATE  &&
diff -ru linux-2.6.21-old/drivers/infiniband/hw/mlx4/qp.c 
linux-2.6.21/drivers/infiniband/hw/mlx4/qp.c
--- linux-2.6.21-old/drivers/infiniband/hw/mlx4/qp.c2007-05-30 
02:52:52.0 -0400
+++ linux-2.6.21/drivers/infiniband/hw/mlx4/qp.c2007-05-30 
02:10:18.0 -0400
@@ -1284,7 +1284,7 @@
 */
wmb();
 
-   if (wr->opcode < 0 || wr->opcode >= ARRAY_SIZE(mlx4_ib_opcode)) 
{
+   

[PATCH] drivers/video: Fix comparisons between negative and unsigned

2007-05-30 Thread Bill Nottingham
Recent gcc versions emit warnings when unsigned variables are compared < 0 or 
>= 0.

Signed-off-by: Bill Nottingham <[EMAIL PROTECTED]>

---
 aty/aty128fb.c   |3 ---
 aty/radeon_base.c|5 -
 cirrusfb.c   |5 -
 fbmem.c  |8 
 intelfb/intelfbdrv.c |5 -
 riva/fbdev.c |5 -
 vga16fb.c|2 +-
 7 files changed, 5 insertions(+), 28 deletions(-)

diff -ru linux-2.6.21-old/drivers/video/aty/aty128fb.c 
linux-2.6.21/drivers/video/aty/aty128fb.c
--- linux-2.6.21-old/drivers/video/aty/aty128fb.c   2007-05-30 
02:53:00.0 -0400
+++ linux-2.6.21/drivers/video/aty/aty128fb.c   2007-05-30 02:28:35.0 
-0400
@@ -1350,9 +1350,6 @@
}
}
 
-   if (pll->post_divider < 0)
-   return -EINVAL;
-
/* calculate feedback divider */
n = c.ref_divider * output_freq;
d = c.ref_clk;
diff -ru linux-2.6.21-old/drivers/video/aty/radeon_base.c 
linux-2.6.21/drivers/video/aty/radeon_base.c
--- linux-2.6.21-old/drivers/video/aty/radeon_base.c2007-05-30 
02:53:00.0 -0400
+++ linux-2.6.21/drivers/video/aty/radeon_base.c2007-05-30 
02:28:13.0 -0400
@@ -813,11 +813,6 @@
if (v.xres_virtual < v.xres)
v.xres = v.xres_virtual;
 
-   if (v.xoffset < 0)
-v.xoffset = 0;
-if (v.yoffset < 0)
-v.yoffset = 0;
- 
 if (v.xoffset > v.xres_virtual - v.xres)
 v.xoffset = v.xres_virtual - v.xres - 1;
 
diff -ru linux-2.6.21-old/drivers/video/cirrusfb.c 
linux-2.6.21/drivers/video/cirrusfb.c
--- linux-2.6.21-old/drivers/video/cirrusfb.c   2007-05-30 02:53:00.0 
-0400
+++ linux-2.6.21/drivers/video/cirrusfb.c   2007-05-30 02:29:21.0 
-0400
@@ -729,11 +729,6 @@
if (var->yres_virtual < var->yres)
var->yres_virtual = var->yres;
 
-   if (var->xoffset < 0)
-   var->xoffset = 0;
-   if (var->yoffset < 0)
-   var->yoffset = 0;
-
/* truncate xoffset and yoffset to maximum if too high */
if (var->xoffset > var->xres_virtual - var->xres)
var->xoffset = var->xres_virtual - var->xres - 1;
diff -ru linux-2.6.21-old/drivers/video/fbmem.c 
linux-2.6.21/drivers/video/fbmem.c
--- linux-2.6.21-old/drivers/video/fbmem.c  2007-05-30 02:53:00.0 
-0400
+++ linux-2.6.21/drivers/video/fbmem.c  2007-05-30 02:27:25.0 -0400
@@ -392,7 +392,7 @@
image->dx += image->width + 8;
}
} else if (rotate == FB_ROTATE_UD) {
-   for (x = 0; x < num && image->dx >= 0; x++) {
+   for (x = 0; x < num; x++) {
info->fbops->fb_imageblit(info, image);
image->dx -= image->width + 8;
}
@@ -404,7 +404,7 @@
image->dy += image->height + 8;
}
} else if (rotate == FB_ROTATE_CCW) {
-   for (x = 0; x < num && image->dy >= 0; x++) {
+   for (x = 0; x < num; x++) {
info->fbops->fb_imageblit(info, image);
image->dy -= image->height + 8;
}
@@ -973,9 +973,9 @@
case FBIOPUT_CON2FBMAP:
if (copy_from_user(&con2fb, argp, sizeof(con2fb)))
return - EFAULT;
-   if (con2fb.console < 0 || con2fb.console > MAX_NR_CONSOLES)
+   if (con2fb.console > MAX_NR_CONSOLES)
return -EINVAL;
-   if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
+   if (con2fb.framebuffer >= FB_MAX)
return -EINVAL;
 #ifdef CONFIG_KMOD
if (!registered_fb[con2fb.framebuffer])
diff -ru linux-2.6.21-old/drivers/video/intelfb/intelfbdrv.c 
linux-2.6.21/drivers/video/intelfb/intelfbdrv.c
--- linux-2.6.21-old/drivers/video/intelfb/intelfbdrv.c 2007-05-30 
02:53:13.0 -0400
+++ linux-2.6.21/drivers/video/intelfb/intelfbdrv.c 2007-05-30 
02:30:32.0 -0400
@@ -1343,11 +1343,6 @@
break;
}
 
-   if (v.xoffset < 0)
-   v.xoffset = 0;
-   if (v.yoffset < 0)
-   v.yoffset = 0;
-
if (v.xoffset > v.xres_virtual - v.xres)
v.xoffset = v.xres_virtual - v.xres;
if (v.yoffset > v.yres_virtual - v.yres)
diff -ru linux-2.6.21-old/drivers/video/riva/fbdev.c 
linux-2.6.21/drivers/video/riva/fbdev.c
--- linux-2.6.21-old/drivers/video/riva/fbdev.c 2007-05-30 02:53:00.0 
-0400
+++ linux-2.6.21/drivers/video/riva/fbdev.c 2007-05-30 02:29:05.0 
-0400
@@ -1185,11 +1185,6 @@
if (rivafb_do_m

[PATCH] drivers/net: fix comparisons of unsigned < 0

2007-05-30 Thread Bill Nottingham
Recent gcc versions emit warnings when unsigned variables are compared < 0 or 
>= 0.

Signed-off-by: Bill Nottingham <[EMAIL PROTECTED]>

---
 mlx4/qp.c   |3 +--
 netxen/netxen_nic_niu.c |6 +++---
 tulip/de2104x.c |1 -
 3 files changed, 4 insertions(+), 6 deletions(-)

diff -ru linux-2.6.21-old/drivers/net/mlx4/qp.c 
linux-2.6.21/drivers/net/mlx4/qp.c
--- linux-2.6.21-old/drivers/net/mlx4/qp.c  2007-05-30 02:52:53.0 
-0400
+++ linux-2.6.21/drivers/net/mlx4/qp.c  2007-05-30 02:18:33.0 -0400
@@ -113,8 +113,7 @@
struct mlx4_cmd_mailbox *mailbox;
int ret = 0;
 
-   if (cur_state < 0 || cur_state >= MLX4_QP_NUM_STATE ||
-   new_state < 0 || cur_state >= MLX4_QP_NUM_STATE ||
+   if (cur_state >= MLX4_QP_NUM_STATE || cur_state >= MLX4_QP_NUM_STATE ||
!op[cur_state][new_state])
return -EINVAL;
 
diff -ru linux-2.6.21-old/drivers/net/netxen/netxen_nic_niu.c 
linux-2.6.21/drivers/net/netxen/netxen_nic_niu.c
--- linux-2.6.21-old/drivers/net/netxen/netxen_nic_niu.c2007-05-30 
02:52:53.0 -0400
+++ linux-2.6.21/drivers/net/netxen/netxen_nic_niu.c2007-05-30 
02:20:02.0 -0400
@@ -728,7 +728,7 @@
__u32 mac_cfg0;
u32 port = physical_port[adapter->portnum];
 
-   if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
+   if (port > NETXEN_NIU_MAX_GBE_PORTS)
return -EINVAL;
mac_cfg0 = 0;
netxen_gb_soft_reset(mac_cfg0);
@@ -761,7 +761,7 @@
__u32 reg;
u32 port = physical_port[adapter->portnum];
 
-   if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
+   if (port > NETXEN_NIU_MAX_GBE_PORTS)
return -EINVAL;
 
/* save previous contents */
@@ -898,7 +898,7 @@
__u32 reg;
u32 port = physical_port[adapter->portnum];
 
-   if ((port < 0) || (port > NETXEN_NIU_MAX_XG_PORTS))
+   if (port > NETXEN_NIU_MAX_XG_PORTS)
return -EINVAL;
 
if (netxen_nic_hw_read_wx(adapter,
diff -ru linux-2.6.21-old/drivers/net/tulip/de2104x.c 
linux-2.6.21/drivers/net/tulip/de2104x.c
--- linux-2.6.21-old/drivers/net/tulip/de2104x.c2007-05-30 
02:52:53.0 -0400
+++ linux-2.6.21/drivers/net/tulip/de2104x.c2007-05-30 02:20:44.0 
-0400
@@ -785,7 +785,6 @@
 
de->tx_head = NEXT_TX(entry);
 
-   BUG_ON(TX_BUFFS_AVAIL(de) < 0);
if (TX_BUFFS_AVAIL(de) == 0)
netif_stop_queue(dev);
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] net: fix comparisons of unsigned < 0

2007-05-30 Thread Bill Nottingham
Recent gcc versions emit warnings when unsigned variables are compared < 0 or 
>= 0.

Signed-off-by: Bill Nottingham <[EMAIL PROTECTED]>

---

 8021q/vlan.c   |3 +--
 dccp/probe.c   |2 +-
 ipv6/netfilter/nf_conntrack_l3proto_ipv6.c |3 +--
 ipv6/netfilter/nf_conntrack_proto_icmpv6.c |3 +--
 sched/act_pedit.c  |3 +--
 sctp/debug.c   |8 
 sctp/sm_statetable.c   |2 +-
 wanrouter/wanmain.c|2 +-
 8 files changed, 7 insertions(+), 19 deletions(-)

diff -ru linux-2.6.21-old/net/8021q/vlan.c linux-2.6.21/net/8021q/vlan.c
--- linux-2.6.21-old/net/8021q/vlan.c   2007-05-30 02:53:04.0 -0400
+++ linux-2.6.21/net/8021q/vlan.c   2007-05-30 02:35:47.0 -0400
@@ -740,8 +740,7 @@
case SET_VLAN_NAME_TYPE_CMD:
if (!capable(CAP_NET_ADMIN))
return -EPERM;
-   if ((args.u.name_type >= 0) &&
-   (args.u.name_type < VLAN_NAME_TYPE_HIGHEST)) {
+   if (args.u.name_type < VLAN_NAME_TYPE_HIGHEST) {
vlan_name_type = args.u.name_type;
err = 0;
} else {
diff -ru linux-2.6.21-old/net/dccp/probe.c linux-2.6.21/net/dccp/probe.c
--- linux-2.6.21-old/net/dccp/probe.c   2007-05-30 02:53:04.0 -0400
+++ linux-2.6.21/net/dccp/probe.c   2007-05-30 02:36:09.0 -0400
@@ -128,7 +128,7 @@
int error = 0, cnt = 0;
unsigned char *tbuf;
 
-   if (!buf || len < 0)
+   if (!buf)
return -EINVAL;
 
if (len == 0)
diff -ru linux-2.6.21-old/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c 
linux-2.6.21/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
--- linux-2.6.21-old/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c 
2007-05-30 02:53:04.0 -0400
+++ linux-2.6.21/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c 2007-05-30 
02:36:44.0 -0400
@@ -177,8 +177,7 @@
 
protoff = nf_ct_ipv6_skip_exthdr(*pskb, extoff, &pnum,
 (*pskb)->len - extoff);
-   if (protoff < 0 || protoff > (*pskb)->len ||
-   pnum == NEXTHDR_FRAGMENT) {
+   if (protoff > (*pskb)->len || pnum == NEXTHDR_FRAGMENT) {
DEBUGP("proto header not found\n");
return NF_ACCEPT;
}
diff -ru linux-2.6.21-old/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c 
linux-2.6.21/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
--- linux-2.6.21-old/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c 
2007-05-30 02:53:04.0 -0400
+++ linux-2.6.21/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c 2007-05-30 
02:37:04.0 -0400
@@ -168,8 +168,7 @@
   skb->len - inip6off
- sizeof(struct ipv6hdr));
 
-   if ((inprotoff < 0) || (inprotoff > skb->len) ||
-   (inprotonum == NEXTHDR_FRAGMENT)) {
+   if ((inprotoff > skb->len) || (inprotonum == NEXTHDR_FRAGMENT)) {
DEBUGP("icmpv6_error: Can't get protocol header in ICMPv6 
payload.\n");
return -NF_ACCEPT;
}
diff -ru linux-2.6.21-old/net/sched/act_pedit.c 
linux-2.6.21/net/sched/act_pedit.c
--- linux-2.6.21-old/net/sched/act_pedit.c  2007-05-30 02:53:04.0 
-0400
+++ linux-2.6.21/net/sched/act_pedit.c  2007-05-30 02:38:19.0 -0400
@@ -164,8 +164,7 @@
printk("offset must be on 32 bit boundaries\n");
goto bad;
}
-   if (skb->len < 0 ||
-   (offset > 0 && offset > skb->len)) {
+   if (offset > 0 && offset > skb->len) {
printk("offset %d cant exceed pkt length %d\n",
   offset, skb->len);
goto bad;
diff -ru linux-2.6.21-old/net/sctp/debug.c linux-2.6.21/net/sctp/debug.c
--- linux-2.6.21-old/net/sctp/debug.c   2007-05-30 02:53:04.0 -0400
+++ linux-2.6.21/net/sctp/debug.c   2007-05-30 02:39:29.0 -0400
@@ -77,8 +77,6 @@
 /* Lookup "chunk type" debug name. */
 const char *sctp_cname(const sctp_subtype_t cid)
 {
-   if (cid.chunk < 0)
-   return "illegal chunk id";
if (cid.chunk <= SCTP_CID_BASE_MAX)
return sctp_cid_tbl[cid.chunk];
 
@@ -146,8 +144,6 @@
 /* Lookup primitive debug name. */
 const char *sctp_pname(const sctp_subtype_t id)
 {
-   if (id.primitive < 0)
-   return "illegal primitive";
if (id.primitive <= SCTP_EVENT_PRIMITIVE_MAX)
   

[PATCH] mm: fix comparisons against unsigned

2007-05-30 Thread Bill Nottingham
Recent gcc versions emit warnings when unsigned variables are compared < 0 or 
>= 0.

Signed-off-by: Bill Nottingham <[EMAIL PROTECTED]>

---

 filemap.c |   34 --
 slub.c|2 --
 2 files changed, 16 insertions(+), 20 deletions(-)

Patch is noisy due to whitespace.

diff -ru linux-2.6.21-old/mm/filemap.c linux-2.6.21/mm/filemap.c
--- linux-2.6.21-old/mm/filemap.c   2007-05-30 02:53:04.0 -0400
+++ linux-2.6.21/mm/filemap.c   2007-05-30 01:43:30.0 -0400
@@ -2176,24 +2176,22 @@
continue;
}
 zero_length_segment:
-   if (likely(copied >= 0)) {
-   if (!status)
-   status = copied;
-
-   if (status >= 0) {
-   written += status;
-   count -= status;
-   pos += status;
-   buf += status;
-   if (unlikely(nr_segs > 1)) {
-   filemap_set_next_iovec(&cur_iov,
-   &iov_base, status);
-   if (count)
-   buf = cur_iov->iov_base +
-   iov_base;
-   } else {
-   iov_base += status;
-   }
+   if (!status)
+   status = copied;
+
+   if (status >= 0) {
+   written += status;
+   count -= status;
+   pos += status;
+   buf += status;
+   if (unlikely(nr_segs > 1)) {
+   filemap_set_next_iovec(&cur_iov,
+   &iov_base, status);
+   if (count)
+   buf = cur_iov->iov_base +
+   iov_base;
+   } else {
+   iov_base += status;
}
}
if (unlikely(copied != bytes))
diff -ru linux-2.6.21-old/mm/slub.c linux-2.6.21/mm/slub.c
--- linux-2.6.21-old/mm/slub.c  2007-05-30 02:53:06.0 -0400
+++ linux-2.6.21/mm/slub.c  2007-05-30 01:45:33.0 -0400
@@ -1966,8 +1966,6 @@
s->size = size;
 
s->order = calculate_order(size);
-   if (s->order < 0)
-   return 0;
 
/*
 * Determine the number of objects per slab
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] alsa: fix comparison of unsigned < 0

2007-05-30 Thread Bill Nottingham
Recent gccs emit warnings when unsigned variables are compared < 0 or >= 0.

Signed-off-by: Bill Nottingham <[EMAIL PROTECTED]>

 ac97/ac97_patch.c|3 +--
 ali5451/ali5451.c|6 ++
 ca0106/ca0106_proc.c |4 ++--
 rme9652/rme9652.c|2 --
 4 files changed, 5 insertions(+), 10 deletions(-)

diff -ru linux-2.6.21-old/sound/pci/ac97/ac97_patch.c 
linux-2.6.21/sound/pci/ac97/ac97_patch.c
--- linux-2.6.21-old/sound/pci/ac97/ac97_patch.c2007-05-30 
02:53:05.0 -0400
+++ linux-2.6.21/sound/pci/ac97/ac97_patch.c2007-05-30 02:32:41.0 
-0400
@@ -2086,8 +2086,7 @@
struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
unsigned short val;
 
-   if (ucontrol->value.enumerated.item[0] > 3
-   || ucontrol->value.enumerated.item[0] < 0)
+   if (ucontrol->value.enumerated.item[0] > 3)
return -EINVAL;
val = ctrl2reg[ucontrol->value.enumerated.item[0]]
  << AC97_AD198X_VREF_SHIFT;
diff -ru linux-2.6.21-old/sound/pci/ali5451/ali5451.c 
linux-2.6.21/sound/pci/ali5451/ali5451.c
--- linux-2.6.21-old/sound/pci/ali5451/ali5451.c2007-05-30 
02:53:05.0 -0400
+++ linux-2.6.21/sound/pci/ali5451/ali5451.c2007-05-30 02:33:27.0 
-0400
@@ -2057,10 +2057,8 @@
 {
if (codec->hw_initialized)
snd_ali_disable_address_interrupt(codec);
-   if (codec->irq >= 0) {
-   synchronize_irq(codec->irq);
-   free_irq(codec->irq, codec);
-   }
+   synchronize_irq(codec->irq);
+   free_irq(codec->irq, codec);
if (codec->port)
pci_release_regions(codec->pci);
pci_disable_device(codec->pci);
diff -ru linux-2.6.21-old/sound/pci/ca0106/ca0106_proc.c 
linux-2.6.21/sound/pci/ca0106/ca0106_proc.c
--- linux-2.6.21-old/sound/pci/ca0106/ca0106_proc.c 2007-05-30 
02:53:05.0 -0400
+++ linux-2.6.21/sound/pci/ca0106/ca0106_proc.c 2007-05-30 02:34:19.0 
-0400
@@ -305,7 +305,7 @@
 while (!snd_info_get_line(buffer, line, sizeof(line))) {
 if (sscanf(line, "%x %x", ®, &val) != 2)
 continue;
-if ((reg < 0x40) && (reg >=0) && (val <= 0x) ) {
+if ((reg < 0x40) && (val <= 0x) ) {
spin_lock_irqsave(&emu->emu_lock, flags);
outl(val, emu->port + (reg & 0xfffc));
spin_unlock_irqrestore(&emu->emu_lock, flags);
@@ -406,7 +406,7 @@
 while (!snd_info_get_line(buffer, line, sizeof(line))) {
 if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3)
 continue;
-if ((reg < 0x80) && (reg >=0) && (val <= 0x) && 
(channel_id >=0) && (channel_id <= 3) )
+if ((reg < 0x80) && (val <= 0x) && (channel_id <= 3) )
 snd_ca0106_ptr_write(emu, reg, channel_id, val);
 }
 }
diff -ru linux-2.6.21-old/sound/pci/rme9652/rme9652.c 
linux-2.6.21/sound/pci/rme9652/rme9652.c
--- linux-2.6.21-old/sound/pci/rme9652/rme9652.c2007-05-30 
02:53:05.0 -0400
+++ linux-2.6.21/sound/pci/rme9652/rme9652.c2007-05-30 02:35:16.0 
-0400
@@ -406,8 +406,6 @@
} else if (!frag)
return 0;
offset -= rme9652->max_jitter;
-   if (offset < 0)
-   offset += period_size * 2;
} else {
if (offset > period_size + rme9652->max_jitter) {
if (!frag)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: new sysfs layout and ethernet device names

2007-03-29 Thread Bill Nottingham
Greg KH ([EMAIL PROTECTED]) said: 
> > If interfaces have to change, so be it. But changing the rules for
> > using them years after it's implemented and then claiming "you didn't
> > read the instructions" is pretty lame.
> 
> That documentation has been in the kernel tree for almost a full year:

It has a date on it. I'm not blind. That doesn't change the fact that
that documentation:

>   Date:   Thu Apr 27 14:10:12 2006 -0700

postdates the interface it's describing by at *least* two years. Which
was the point of my mail that you conveniently ignored - retroactively
deciding which parts of the interface you export to userspace shouldn't be
used falls way short of best practices.

> Anyway, yes, older code should still "just work" if you enable the
> CONFIG_SYSFS_DEPRECATED config option in the kernel, that is what it is
> there for.

It appears to... the point was that (as far as the code is concerned)
it's a silent break. Of course, code that expects the 'current' layout
will then break when this new change is made, unless you add
CONFIG_SYSFS_SLIGHTLY_LESS_DEPRECATED?

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: new sysfs layout and ethernet device names

2007-03-28 Thread Bill Nottingham
Greg KH ([EMAIL PROTECTED]) said: 
> If you follow the rules in Documentation/ABI/testing/sysfs-class your
> program will not have any problems.

Oh, of *course*. We add interfaces and then claim years later,
after code has been written, "Oh, you shouldn't be using that!" in
documentation. Meanwhile, such code using the old interface will still
a) continue to compile b) continue to run without any sort of warnings.

If interfaces have to change, so be it. But changing the rules for
using them years after it's implemented and then claiming "you didn't
read the instructions" is pretty lame.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: new sysfs layout and ethernet device names

2007-03-27 Thread Bill Nottingham
Kay Sievers ([EMAIL PROTECTED]) said: 
> >If you *do* try to use one of these names, the rename will succeed...
> >partway. The link in /sys/class/net is renamed, the directory is
> >not (as it obviously can't rename on top of whatever is already there.)
> >Various networking tools then break in assorted ways due to the
> >naming disconnect.
> >
> >Going back to the deprecated layout makes these names available again -
> >it's possible (although not necessarily likely) that the new layout
> >will break someone's device configuration if they upgrade kernels,
> >even if the rest of their tools are updated for the new layout.
> 
> There will be a directory at the bus-device with the name of the
> class, that glues together the bus-devices and the class-devices in
> the unified tree:
>  
> http://git.kernel.org/?p=linux/kernel/git/gregkh/patches.git;a=blob;f=driver/driver-core-fix-namespace-issue-with-devices-assigned-to-classes.patch;hb=HEAD
> 
> So the network-interface(s) will be in their own directory "net",
> below the bus-device, and don't conflict with the existing attributes.

So, the layout will change again?

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


new sysfs layout and ethernet device names

2007-03-20 Thread Bill Nottingham
I was fiddling with the 'new' (no CONFIG_SYSFS_DEPRECATED) layout
and ethernet device names, and noticed that the new layout effectively
restricts the availability of certain device names.

By making a directory for the ethernet device name in the parent
device, you no longer can use any name that is used in sysfs for
the parent device type - for PCI devices this would be 'resource0',
'power', 'enable', etc. For USB, it would be a different set
of names that are no longer available.

If you *do* try to use one of these names, the rename will succeed...
partway. The link in /sys/class/net is renamed, the directory is
not (as it obviously can't rename on top of whatever is already there.)
Various networking tools then break in assorted ways due to the
naming disconnect.

Going back to the deprecated layout makes these names available again -
it's possible (although not necessarily likely) that the new layout
will break someone's device configuration if they upgrade kernels,
even if the rest of their tools are updated for the new layout.

Bill


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: GPL only modules [was Re: [GIT PATCH] more Driver core patches for 2.6.19]

2006-12-19 Thread Bill Nottingham
Gene Heskett ([EMAIL PROTECTED]) said: 
> FWIW:
> [EMAIL PROTECTED] src]# python list-kernel-hardware.py
> Traceback (most recent call last):
>   File "list-kernel-hardware.py", line 70, in ?
> ret = pciids_to_names(data)
>   File "list-kernel-hardware.py", line 11, in pciids_to_names
> pciids = open('/usr/share/misc/pci.ids', 'r')
> IOError: [Errno 2] No such file or directory: '/usr/share/misc/pci.ids'
> 
> That file apparently doesn't exist on an FC6 i686 system

s/misc/hwdata/ for FC and derivatives.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: libata-pata with ICH4, rootfs

2006-12-14 Thread Bill Nottingham
Alistair John Strachan ([EMAIL PROTECTED]) said: 
> > > Is it possible to use pata_mpiix (or pata_oldpiix) with an ICH4 IDE
> > > controller and boot off it?
> >
> > ata_piix (the SATA/PATA driver) deals with the ICH4. pata_mpiix is
> > specifically for the Intel MPIIX laptop chipset and pata_oldpiix
> > explicitly for the original PIIX chipset and none of the later ones.
> 
> Correct me if I'm wrong, but SATA wasn't available on ICH4. Only 5 and 
> greater. The kernel help text agrees with me.
> 
> My IDE controller usually works with CONFIG_BLK_DEV_PIIX; I was interested in 
> using your pata_xxx drivers in replacement, assuming there was support.

pata_xxx is for older PIIX, not ICH4. ICH* is handled by ata_piix, which
can drive both SATA *and* PATA in the new kernels. In fact:

[EMAIL PROTECTED]: ~]$ lspci | grep IDE
00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 
01)
[EMAIL PROTECTED]: ~]$ dmesg | grep ata
...
ata_piix :00:1f.1: version 2.00ac6
ata1: PATA max UDMA/100 cmd 0x1F0 ctl 0x3F6 bmdma 0x1860 irq 14
ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0x1868 irq 15
...
[EMAIL PROTECTED]: ~]$ uname -r
2.6.19-1.2839.fc7

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: GPL only modules [was Re: [GIT PATCH] more Driver core patches for 2.6.19]

2006-12-14 Thread Bill Nottingham
Rik van Riel ([EMAIL PROTECTED]) said: 
> Maybe we should just educate users and teach them to
> avoid crazy unsupportable configurations and simply buy
> the hardware that has open drivers available?

Educating the users may help, but it's hard to do the
education once they've already bought the hardware. Generally,
it would be 1) buy hardware 2) run whatever comes with it
3) try Linux. Hard to get the 'if you're ever thinking about
running Linux, don't buy XYZ' into that workflow.

> Sure, the process of getting drivers merged upstream[2] can
> take some time and effort, but the resulting improvements in
> driver performance and stability are often worth it.  It's
> happened more than once that the Linux kernel community's
> review process turned up some opportunities for a 30% performance
> improvement in a submitted driver.
> 
> Hardware companies: can you afford to miss out on the stability
> and performance improvements that merging a driver upstream tends
> to get?
> 
> Can you afford to miss out when your competitors are getting these
> benefits?

This is the big point - we need to show the vendors how getting
upstream helps them.

Compare costs of all-in-house development versus shared-with-community
development.

Compare how quickly issues are fixed, and how often drivers actually
regress with in-tree vs. out-of-tree drivers.

Get case studies of drivers that have been opened (qeth? lpfc? Others?)
and get other companies to *go on the record* on how opening their
drivers and getting them upstream has helped them to lower their development
costs and scale their sales.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: GPL only modules [was Re: [GIT PATCH] more Driver core patches for 2.6.19]

2006-12-13 Thread Bill Nottingham

Greg KH ([EMAIL PROTECTED]) said: 
> An updated version is below.

If you're adding this, you should probably schedule EXPORT_SYMBOL_GPL
for removal at the same time, as this essentially renders that irrelevant.

That being said...

First, this is adding the measure at module load time. Any copyright
infringment happens on distribution; module load isn't (necessarily)
that; if I write random code and load it, without ever sending it
to anyone, I'm not violating the license, and this would prevent that.
So it seems somewhat misplaced.

Secondly...

> Oh, and for those who have asked me how we would enforce this after this
> date if this decision is made, I'd like to go on record that I will be
> glad to take whatever legal means necessary to stop people from
> violating this.

There's nothing stopping you undertaking these means now. Addition of
this measure doesn't change the copyright status of any code - what was
a violation before would still be a violation. Copyright's not something
like trademark, where it's sue-or-lose - there's no requirement for
constant action, and there's no requirement for enforcement measures.
If I reproduce and start selling copies of the White album, it doesn't
matter that there wasn't a mechanism on the CD that prevented me doing
that - it's still a copyright violation.

Hence, the only purpose of a clause like this legally would seem to be
to *intentionally* go after people using the DMCA. Which seems... tacky.

Of course, I don't have significant code of note in the kernel, so I can't
really prevent you from doing this if you want...

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH/RFC] Delete JFFS (version 1)

2006-12-12 Thread Bill Nottingham
Jeff Garzik ([EMAIL PROTECTED]) said: 
> It's always been the case that we remove Linux kernel code when the 
> number of users (and more importantly, developers) drops to near-nil.

So, drivers/net/3c501.c?

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] module-init-tools: don't do '-' substitutions in depmod

2005-09-08 Thread Bill Nottingham
The attached patch removes the '-' for '_' substitution from
depmod - this makes the names printed for modules in module.alias
match the actual names of the module files.

Bill
diff -ru depmod.c.old depmod.c
--- depmod.c2005-04-30 08:38:46.0 -0400
+++ depmod.c2005-09-08 15:52:26.0 -0400
@@ -607,13 +607,8 @@
else
afterslash++;
 
-   /* Convert to underscores, stop at first . */
-   for (i = 0; afterslash[i] && afterslash[i] != '.'; i++) {
-   if (afterslash[i] == '-')
-   modname[i] = '_';
-   else
+   for (i = 0; afterslash[i] && afterslash[i] != '.'; i++)
modname[i] = afterslash[i];
-   }
modname[i] = '\0';
 }
 


Re: [patch] IBM HDAPS accelerometer driver.

2005-08-26 Thread Bill Nottingham
Robert Love ([EMAIL PROTECTED]) said: 
> Of late I have been working on a driver for the IBM Hard Drive Active
> Protection System (HDAPS), which provides a two-axis accelerometer and
> some other misc. data.  The hardware is found on recent IBM ThinkPad
> laptops.

How does this relate to the hdaps driver hosted at sourceforge since
June?

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] vgacon: set vc_hi_font_mask correctly

2005-04-14 Thread Bill Nottingham
When allocating a new VC with vgacon_init(), the font is
shared across all the VGA consoles. However, the font
mask was always set to the default value of zero in visual_init(),
even if we were using 512 character fonts at the time.

Moreover, code in vgacon.c:vga_do_font_op() didn't reset
the mask if the console driver thinks it's already in 512 character
mode. This means that to *fix* it, you'd actually have to take
the console out of 512 character mode and then set it back.

The attached sets vc_hi_font_mask in vgacon_init() for
any new consoles opened if the vgacon driver is already
in 512 character mode, solving this.

This bug goes back to 2.4.18 at least, probably earlier.

Bill
diff -ru linux-2.6.11-orig/drivers/video/console/vgacon.c 
linux-2.6.11/drivers/video/console/vgacon.c
--- linux-2.6.11-orig/drivers/video/console/vgacon.c2005-04-08 
23:52:59.0 -0400
+++ linux-2.6.11/drivers/video/console/vgacon.c 2005-04-14 14:54:29.0 
-0400
@@ -337,6 +337,8 @@
c->vc_scan_lines = vga_scan_lines;
c->vc_font.height = vga_video_font_height;
c->vc_complement_mask = 0x7700;
+   if (vga_512_chars)
+   c->vc_hi_font_mask = 0x0800;
p = *c->vc_uni_pagedir_loc;
if (c->vc_uni_pagedir_loc == &c->vc_uni_pagedir ||
!--c->vc_uni_pagedir_loc[1])


Re: bad caching behavior in 2.6.12rc1

2005-03-25 Thread Bill Nottingham
Andrew Morton ([EMAIL PROTECTED]) said: 
> > Test box is a 1.5GB laptop.
> > 
> > In typical use, I would open a mailbox A, and then switch
> > to mailbox B. Immediately switching back to mailbox A, I
> > would find out it was no longer cached. (Using maildirs,
> > FWIW.)
> > 
> > Looking at /proc/meminfo, I would see:
> > 
> > LowFree: 8-12MB
> > HighFree: 300-400MB
> > Cached: 100-200MB
> > 
> > i.e., it was evicting cache when there was plenty of highmem
> > available for use.
> 
> Where's the rest of the memory gone?  A full /proc/meminfo would be useful.

In the manner of all good bugs, as soon as I tried to reproduce it, it's
hiding. I can get it to this point (very little lowfree, lots of highfree,
medium amounts of cache); but now the cache is behaving more as expected.

Feel free to ignore it until I can duplicate it again. :)

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


bad caching behavior in 2.6.12rc1

2005-03-24 Thread Bill Nottingham
When I upgraded from 2.6.11 to 2.6.12rc1, the VM started
behaving really badly with respect to caching.

Test box is a 1.5GB laptop.

In typical use, I would open a mailbox A, and then switch
to mailbox B. Immediately switching back to mailbox A, I
would find out it was no longer cached. (Using maildirs,
FWIW.)

Looking at /proc/meminfo, I would see:

LowFree: 8-12MB
HighFree: 300-400MB
Cached: 100-200MB

i.e., it was evicting cache when there was plenty of highmem
available for use.

When going back to 2.6.11, and using the same sort of the
workload, the caching would behave more as expected.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: RFD: Kernel release numbering

2005-03-03 Thread Bill Nottingham
Dave Jones ([EMAIL PROTECTED]) said: 
>  > [*] I don't know any details of the /proc incompatibility which davej
>  > mentions, and I'd like to.  That sounds like a screw-up.
> 
> We changed the format of /proc/slabinfo.  Running slabtop threw up
> an error message complaining that the format had changed.
> 
> It was a graceful failure, but a failure none-the-less.
> 
> Other failures have been somewhat more dramatic.
> I know ipsec-tools, and alsa-lib have both caused pain
> on at least one occasion after the last 2-3 kernel updates.

The ones I remember were:

- alsa-lib, as mentioned
- ipsec-tools/openswan needed updating when the kernel changed
   to require forward SAs
- a old script on an earlier release needed fixed when usbdevfs finally
   went from being deprecated to dead

SELinux changed froom 2.6.early to 2.6.current as well, IIRC.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Hotplug blacklist and video devices

2005-02-21 Thread Bill Nottingham
Jon Smirl ([EMAIL PROTECTED]) said: 
> Is there a specific reason why they are blocked? 
> 
> For example I'm looking at making changes to DRM such that DRM will
> require the corresponding framebuffer driver to be loaded. If you back
> up further this is part of fixing X so that it won't mess with the
> hardware from user space. Mode setting would come from the framebuffer
> driver instead of the X 2D XAA driver.

If it's a hard module dep, I don't see how that would be a problem;
that would ignore the blacklist.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Hotplug blacklist and video devices

2005-02-18 Thread Bill Nottingham
Jon Smirl ([EMAIL PROTECTED]) said: 
> Why are all of the framebuffer drivers on the hotplug blacklist?

Well, that probably depends on your distribution. :)

Under Fedora (and RHEL), they're there because we generally
don't want to load them unless the user asked for them.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [ANNOUNCE] hotplug-ng 001 release

2005-02-10 Thread Bill Nottingham
Greg KH ([EMAIL PROTECTED]) said: 
> I'd like to announce, yet-another-hotplug based userspace project:
> linux-ng.  This collection of code replaces the existing linux-hotplug
> package with very tiny, compiled executable programs, instead of the
> existing bash scripts.
> 
> It currently provides the following:
>   - a /sbin/hotplug multiplexer.  Works identical to the existing
> bash /sbin/hotplug.

How does this interact with current usage of udevsend as the hotplug
multiplexer?

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


slab BUG in FC devel kernel, x86-64

2005-01-28 Thread Bill Nottingham
The kernel in question is based on 2.6.11-rc2-bk4, FWIW.

Transcribed by hand. Happened when rsyncing data onto
a LVM-on-RAID1, sata_via controller. (root FS is on generic
VIA IDE).

slab: double free detected in cache 'size-128', objp 81000340bba8.
Kernel BUG at slab:2188
invalid operand:  [1]
CPU 0
Modules linked in: md5 ipv6 parport_pc lp parport sunrpc ipt_REJECT ipt_state
 ip-contrack iptable_filter ip_tables dm_mod video button battery ac raid1
 ohci1394 ieee1394 uhci_hcd ehci_hcd i2c_viapro i2c_core snd_via82xx
 snd_ac97_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc
 gameport snd_mpu401_uart snd_rawmidi snd_seq_device snd soundcore via_rhine
 mii floppy ext3 jbd sata_via libata sd_mod scsi_mod
Pid: 161, comm: kswapd0 Not tainted 2.6.10-1.1115_FC4
RIP: 0010:[] {free_block+208}
RSP: 0018:81003bde9cd8  EFLAGS: 00010092
RAX: 004a RBX: 81000340b000 RCX: 8042e010
RDX: 8042e010 RSI: 0001 RDI: 81003a82a7d0
RBP: 81003bfef640 R08: 8042e010 R09: 81001dafdd78
R10: 0001 R11: 8044bd20 R12: 81000340bba8
R13: 0013 R14: 81000340b028 R15: 0013
FS:  2aaba3a0() GS:8050d880() knlGS:
CS:  0010 DS: 0018 ES: 0018 CR0: 8005003b
CR2: 2aaac000 CR3: 0b36d000 CR4: 06e0
Process kswapd0 (pid: 161, threadinfo 81003bde8000, task 81003bd5d070)
Stack: 0001 81003bfe9698 00101a285a78 81003bfef640
   0010 81003bfe9688 81003bfe9698 
   0080 801690c1
Call Trace:{cache_flusharray+242} 
{kfree+156}
   {destroy_inode+41} {dispose_list+95}
   {shrink_icache_memory+993} 
{shrink_slab+188}
   {balance_pgdat+547} {kswapd+260}
   {autoremove_wake_function+0} 
{autoremove_wake_function+0}
   {autoremove_wake_function+0} 
{schedule_tail+11}
   {child_rip+8} {kswapd+0}
   {child_rip+0}

Code: 0f 0b 21 f1 36 80 ff ff ff ff 8c 08 0f b7 43 24 48 89 de 48
RIP {free_block+208} RSP 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Linux 2.4.4-ac11

2001-05-17 Thread Bill Nottingham

(catching up...)

Alan Cox ([EMAIL PROTECTED]) said: 
> 2.4.4-ac9
...
> o Further tulip updates   (Jeff Garzik)
...
> 2.4.4-ac8
> o Tulip driver updates(Jeff Garzik)

These updates (sorry, haven't tracked down which of the two) conspire to
break the tulip on my ia64, it's a:

02:01.0 Ethernet controller: Digital Equipment Corporation DECchip 21041 [Tulip
Pass 3] (rev 21)

What normally happens is that all the TX packets show up
as carrier errors, and no packets are ever recieved.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] missing return value from pci_xircom_fn() in drivers/char/serial.c

2001-05-14 Thread Bill Nottingham

Jesper Juhl ([EMAIL PROTECTED]) said: 
> I have made a patch against 2.4.4-ac8 that makes the change, it is 
> below. I guess someone more knowledgeable than me can probably see if 
> this is correct. If this is completely bogus, then please just disregard 
> this email.

Yup, it's right. My bad. :)

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] make Xircom cardbus modems work

2001-05-09 Thread Bill Nottingham

Jeff Garzik ([EMAIL PROTECTED]) said: 
> Bill,
> 
> Does the attached patch work for you?

Yup, works fine for me (compiled in.)

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] make Xircom cardbus modems work

2001-05-09 Thread Bill Nottingham

The attached allows serial.c to work with my Xircom cardbus
ethernet+modem combo card. It doesn't get autodetected, because
the serial driver explicitly doesn't recognize anything with
more than one iomem region (the Xircom modem has two.)
If the serial driver is linked in statically, the delay
on initialization is needed, else the UART will get detected
as a 16450 or not at all; I guess the card is just slow in
coming up.

Bill


--- linux/drivers/char/serial.c.foo Tue May  8 23:44:41 2001
+++ linux/drivers/char/serial.c Wed May  9 01:18:07 2001
@@ -4182,6 +4182,15 @@
return 0;
 }
 
+static int
+#ifndef MODULE
+__devinit
+#endif
+pci_xircom_fn(struct pci_dev *dev, struct pci_board *board, int enable)
+{
+   __set_current_state(TASK_UNINTERRUPTIBLE);
+   schedule_timeout(HZ/10);
+}
 
 /*
  * This is the configuration table for all of the PCI serial boards
@@ -4558,6 +4567,11 @@
/*
 * Untested PCI modems, sent in from various folks...
 */
+   /* Xircom Cardbus Ethernet 10/100 + 56k Modem <[EMAIL PROTECTED]> */
+   {   0x115d, 0x0103,
+   PCI_ANY_ID, PCI_ANY_ID,
+   SPCI_FL_BASE0, 1, 115200,
+   0, 0, pci_xircom_fn },
/* Elsa Model 56K PCI Modem, from Andreas Rath <[EMAIL PROTECTED]> */
{   PCI_VENDOR_ID_ROCKWELL, 0x1004,
0x1048, 0x1500, 



Re: Linux Kernel Debuggers, KDB or KGDB?

2001-05-02 Thread Bill Nottingham

Jeff Dike ([EMAIL PROTECTED]) said: 
> > > Is this sufficient to do driver development?  TUN/TAP doesn't let me
> > > write 
> > > ethernet drivers inside UML.
> > For ISDN not really. For SCSI yes - scsi generic would let you write a
> > virtual scsi adapter 'owning' some physical devices 
> 
> Fine, so go ahead and write a UML SCSI adapter...  
> 
> I would love to see this happen.  If you need UML help that's not on the site, 
> let me know, and I'll be happy to do what I can.

There is the simulator SCSI, net, and serial drivers in the ia64
tree. Dunno how similar that would be to what you need.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Problem with "su -" and kernels 2.4.3-ac11 and higher

2001-04-23 Thread Bill Nottingham

Alan Cox ([EMAIL PROTECTED]) said: 
> > > Did you try nesting more than one "su -"? The first one after a boot
> > > works for me - every other one fails.
> > 
> > Same here: the first "su -" works OK, but a second nested one hangs:
> 
> It appears to be a bug in PAM. Someone seems to reply on parent/child running
> order and just got caught out

I'm not so sure; this hang is already after all the authentication is
done.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: ac10 ide-cd oopses on boot

2001-04-19 Thread Bill Nottingham

J . A . Magallon ([EMAIL PROTECTED]) said: 
> > Can you back out the ide-cd changes Jens did and see if that fixes it ?
> 
> Reverted the changes in ide-cd.[hc], and same result.

You want to back out the stuff from drivers/cdrom/cdrom.c; I backed
out the parts of the patch new there to ac10, and it worked again
for me...

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: opl3sa2 in 2.4.2 on Toshiba Tecra 8000

2001-03-29 Thread Bill Nottingham

Klaus Reimer ([EMAIL PROTECTED]) said: 
> Hi,
> 
> > > modprobe opl3sa2 io=0x538 mss_io=0x530 mpu_io=0x330 irq=5 dma=1 dma2=0
> > > isapnp=0
> > It would be what you put in the io= parameter. 0x538 does *not* look
> > right.
> 
> These are the sound-settings in the BIOS:
> 
> WSS I/O: 0x530
> SBPro I/O: 0x220
> Synth I/O: 0x388
> IRQ: 5
> WSS (Play) DMA: 1
> WSS (Rec) DMA & SBPro-DMA: 0
> Control I/O: 0x538
> MPU I/O: 0x330

Hm, OK, then never mind. :) I don't have an opl3sa2 here to test
how well the current driver works.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: opl3sa2 in 2.4.2 on Toshiba Tecra 8000

2001-03-29 Thread Bill Nottingham

Klaus Reimer ([EMAIL PROTECTED]) said: 
> If I am doing this, I can't even load the module and I get the following 
> message in syslog:
> 
> 2001-03-29 18:13:14.184156500 {kern|err} kernel: opl3sa2: Control I/O port 
> 0x0 not free
> 
> What is that "control i/o port"? Is this normally 0x100?

I believe it can be, but I remember it usually being something
like 0x370 or so.

> What is the module 
> parameter to specify this io port? The documentation only mentions "io", 
> "mpu_io" and "mss_io" but I have specified these parameters already:
> 
> modprobe opl3sa2 io=0x538 mss_io=0x530 mpu_io=0x330 irq=5 dma=1 dma2=0 
> isapnp=0

It would be what you put in the io= parameter. 0x538 does *not* look
right.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: opl3sa2 in 2.4.2 on Toshiba Tecra 8000

2001-03-29 Thread Bill Nottingham

Klaus Reimer ([EMAIL PROTECTED]) said: 
> 2001-03-29 10:02:50.054774500 {kern|info} kernel: ad1848/cs4248 codec driver 
> Copyright (C) by Hannu Savolainen 1993-1996
> 2001-03-29 10:02:50.070692500 {kern|notice} kernel: opl3sa2: No cards found
> 2001-03-29 10:02:50.070703500 {kern|notice} kernel: opl3sa2: 0 PnP card(s) 
> found.

Add 'isapnp=0' to the end of the options in your modules.conf.
I *believe* this is fixed in a later kernel (2.4.3pre or 2.4.2ac).

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] MODULE_DEVICE_TABLE support for opl3sa2 driver

2001-02-25 Thread Bill Nottingham

The attached adds MODULE_DEVICE_TABLE support to the ISAPnP support
in the opl3sa2 driver, so it can get picked up by modutils and
the like.

Bill


--- linux/drivers/sound/opl3sa2.c.foo   Mon Feb 26 00:19:33 2001
+++ linux/drivers/sound/opl3sa2.c   Mon Feb 26 00:25:53 2001
@@ -806,6 +806,16 @@
 
 
 #if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
+
+struct isapnp_device_id isapnp_opl3sa2_list[] __initdata = {
+   {   ISAPNP_ANY_ID, ISAPNP_ANY_ID,
+   ISAPNP_VENDOR('Y','M','H'), ISAPNP_FUNCTION(0x0021),
+   NULL },
+   {0}
+};
+
+MODULE_DEVICE_TABLE(isapnp, isapnp_opl3sa2_list);
+
 static int __init opl3sa2_isapnp_probe(struct address_info* hw_cfg,
   struct address_info* mss_cfg,
   struct address_info* mpu_cfg,



Re: unresloved symbols in 2.4.1

2001-02-19 Thread Bill Nottingham

Eugene Danilchenko ([EMAIL PROTECTED]) said: 
> cd /lib/modules/2.4.1; \
> mkdir -p pcmcia; \
> find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
> if [ -r System.map ]; then /sbin/depmod -ae -F System.map  2.4.1; fi
> depmod: *** Unresolved symbols in /lib/modules/2.4.1/kernel/fs/binfmt_elf.o
> depmod: get_pte_slow
> depmod: __handle_bad_pmd 
> 
> 
> System: RedHat 6.2 
> on system installed:
> modutils-2.4.2-1
> 
> What does it mean.

It means that compiling ELF binary support as a module doesn't work right.

> and what have i to do to avoid it?

Compile it in (CONFIG_BINFMT_ELF=y). If you're using Red Hat Linux 6.2,
compiling it as a module is an incredibly bad idea anyway.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] change awe_wave initialization to match 2.2 better

2001-02-19 Thread Bill Nottingham

The awe_wave driver in 2.2 looked at the common I/O ports for
the card if no parameters were specified. The 2.4 driver currently
does an ISAPnP probe, but doesn't fall back to the previous probing
behavior, which means that users with working module configurations
will have theirs broken on upgrade.

The attached fixes it to fall back to 2.2-style behavior if no
parameters are specified; if 'isapnp=1' is specified, it does
not try to look for cards if the ISAPnP probe fails.

Bill


--- linux/drivers/sound/awe_wave.c.foo  Mon Feb 19 14:05:47 2001
+++ linux/drivers/sound/awe_wave.c  Mon Feb 19 14:06:51 2001
@@ -206,7 +206,7 @@
 int io = AWE_DEFAULT_BASE_ADDR; /* Emu8000 base address */
 int memsize = AWE_DEFAULT_MEM_SIZE; /* memory size in Kbytes */
 #if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
-static int isapnp = 1;
+static int isapnp = -1;
 #else
 static int isapnp = 0;
 #endif
@@ -4838,10 +4838,12 @@
if (isapnp) {
if (awe_probe_isapnp(&io) < 0) {
printk(KERN_ERR "AWE32: No ISAPnP cards found\n");
-   return 0;
+   if (isapnp != -1)
+ return 0;
+   } else {
+   setup_ports(io, 0, 0);
+   return 1;
}
-   setup_ports(io, 0, 0);
-   return 1;
}
 #endif /* isapnp */
 



Re: isapnp , 2.2.14 vs. 2.4.1 and awe_wave

2001-02-16 Thread Bill Nottingham

Alan Cox ([EMAIL PROTECTED]) said: 
> > Probing around with test code in awe_wave.c, it become clear to me
> > that the card was not being initialized properly by my isapnptools. 
> > Even more alarming was the fact that pnpdump would not see the SB card 
> > at all under 2.4.1, unless I used the -r option, but would show it 
> > just fine under 2.2.14.
> 
> Dont mix isapnp tools with a 2.4 kernel unless you disable ISA PnP support
> in the kernel. It needs to have one or the other do it, not both

Um, earlier he said:

>  Since I use isapnptools and did not compile in any kernel pnp support,

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Will the IBM OMNI printer driver be making its way into the kernel tree?

2001-02-13 Thread Bill Nottingham

Miles Lane ([EMAIL PROTECTED]) said: 
> http://oss.software.ibm.com/developer/opensource/linux/projects/omni/

Considering it's a ghostscript driver, I severely doubt it. :)

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Is there a Crystal 4299 sound driver?

2001-01-19 Thread Bill Nottingham

Torrey Hoffman ([EMAIL PROTECTED]) said: 
> Here's an lspci -v dump.  The machine is a set top box, pretty much a
> standard PC, but with hardware parts that are rarely seen in normal 
> desktops.  (The graphics card, ethernet card, and MPEG decoder chip
> all required non-standard Linux and X 4.0.2 drivers to work.)

> 00:1f.5 Class 0401: 8086:2415 (rev 02)
>   Subsystem: 110a:0051
>   Flags: bus master, medium devsel, latency 0, IRQ 5
>   I/O ports at 1000
>   I/O ports at 2000

Use the i810_audio driver; either 2.2.18 or 2.4.0 should be more or
less OK.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Is there a Crystal 4299 sound driver?

2001-01-18 Thread Bill Nottingham

Torrey Hoffman ([EMAIL PROTECTED]) said: 
> Does anyone know of a driver for the Crystal 4299 sound chip?

It's not something there's one particular sound driver for (it's just
an ac97 codec chip, as you saw). Most likely you want to use something
like the i810_audio or via82cxxx_audio drivers. What does lspci say
on your machine?

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Compile error: DRM without AGP in 2.4.0

2001-01-11 Thread Bill Nottingham

Alan Cox ([EMAIL PROTECTED]) said: 
> > What if your motherboard doesn't have an AGP slot? I'm running an older
> > Micro Star pentium with a ATI All-in-Wonder with the Rage 128 chipset.
> 
> Then I believe you cant use direct render right now

In 4.0.1 r128 DRM sort of worked with a PCI card in an agpgart-supported
motherboard. But not well.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0 release and ia64

2001-01-10 Thread Bill Nottingham

[EMAIL PROTECTED] ([EMAIL PROTECTED]) said: 
> It looks like, those patches are for the test kernels.

There *should* be a patch for 2.4 final:

linux-2.4.0-ia64-010109.diff.(bz2|gz)

If not, your mirror isn't up to date.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0 release and ia64

2001-01-10 Thread Bill Nottingham

[EMAIL PROTECTED] ([EMAIL PROTECTED]) said: 
> Now that 2.4.0 kernel is officially released, does it run
> or ia64 as it is or do we need to apply any patches to make
> it run on ia64 ?

There's a patch for it in ports/ia64 on your favorite linux kernel
mirror.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: 2.4.0 umount problem

2001-01-10 Thread Bill Nottingham

M T ([EMAIL PROTECTED]) said: 
> I'm running redhat 6.2 halt scripts and strange problem appears when 
> shutting system down with kernel-2.4.0. I get message that "/ device is 
> busy". I've updated util-linux (kill,mount,umount) according to 
> documentation without any success. I've got no problems with 2.2.18.
> Any ideas?

Are you using devfs?

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: DRI doesn't work on 2.4.0 but does on prerelease-ac5

2001-01-08 Thread Bill Nottingham

Michael D. Crawford ([EMAIL PROTECTED]) said: 
> This makes me suspect it's not really working, or else my build of the Mesa-3.4
> library wasn't configured right - but note that if I disable DRI, one of the
> Mesa demos will comment that it's not available.

It sounds as if you're using a Mesa lib that doesn't support the
X DRI stuff, just the software renderer.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: linux-2.4.0-prerelease-ac6 compile errors

2001-01-04 Thread Bill Nottingham

Ignacio Monge ([EMAIL PROTECTED]) said: 
> Problem: compile error in linux-2.4.0-prerelease-ac6

--- linux/drivers/char/serial.c.foo Thu Jan  4 17:31:43 2001
+++ linux/drivers/char/serial.c Thu Jan  4 17:32:38 2001
@@ -5184,12 +5184,12 @@
   
   for (pnp_board = pnp_devices; pnp_board->vendor; pnp_board++)
   if ((dev->vendor == pnp_board->vendor) &&
-  (dev->device == pnp_board->device))
+  (dev->device == pnp_board->function))
   break;
 
   if (pnp_board->vendor) {
   board.vendor = pnp_board->vendor;
-  board.device = pnp_board->device;
+  board.device = pnp_board->function;
   /* Special case that's more efficient to hardcode */
   if ((board.vendor == ISAPNP_VENDOR('A', 'K', 'Y') &&
board.device == ISAPNP_DEVICE(0x1021)))

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: prerelease-ac6 compile problem in serial.c

2001-01-04 Thread Bill Nottingham

Meelis Roos ([EMAIL PROTECTED]) said: 
> 2.4.0-prerelease-ac6 doesn't compile serial on x86 with pnp enabled:
> 
> serial.c: In function `probe_serial_pnp':
> serial.c:5187: structure has no member named `device'
> serial.c:5192: structure has no member named `device'

Doh. I swear this did build when I tried it, although I don't see how.

Bill

--- linux/drivers/char/serial.c.foo Thu Jan  4 17:31:43 2001
+++ linux/drivers/char/serial.c Thu Jan  4 17:32:38 2001
@@ -5184,12 +5184,12 @@
   
   for (pnp_board = pnp_devices; pnp_board->vendor; pnp_board++)
   if ((dev->vendor == pnp_board->vendor) &&
-  (dev->device == pnp_board->device))
+  (dev->device == pnp_board->function))
   break;
 
   if (pnp_board->vendor) {
   board.vendor = pnp_board->vendor;
-  board.device = pnp_board->device;
+  board.device = pnp_board->function;
   /* Special case that's more efficient to hardcode */
   if ((board.vendor == ISAPNP_VENDOR('A', 'K', 'Y') &&
board.device == ISAPNP_DEVICE(0x1021)))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



PATCH: fix FAT32 filesystems on 64-bit platforms

2000-12-14 Thread Bill Nottingham

This fixes FAT32 on 64-bit platforms (notably, IA-64 and Alpha);
without this you can't mount any FAT32 filesystems. A similar patch
is already in 2.2.18.

Bill


--- linux/fs/fat/cache.c.fooSat Nov 25 16:30:47 2000
+++ linux/fs/fat/cache.cSat Nov 25 16:32:29 2000
@@ -70,7 +70,7 @@
}
if (MSDOS_SB(sb)->fat_bits == 32) {
p_first = p_last = NULL; /* GCC needs that stuff */
-   next = CF_LE_L(((unsigned long *) bh->b_data)[(first &
+   next = CF_LE_L(((__u32 *) bh->b_data)[(first &
(SECTOR_SIZE-1)) >> 2]);
/* Fscking Microsoft marketing department. Their "32" is 28. */
next &= 0xfff;
@@ -79,12 +79,12 @@
 
} else if (MSDOS_SB(sb)->fat_bits == 16) {
p_first = p_last = NULL; /* GCC needs that stuff */
-   next = CF_LE_W(((unsigned short *) bh->b_data)[(first &
+   next = CF_LE_W(((__u16 *) bh->b_data)[(first &
(SECTOR_SIZE-1)) >> 1]);
if (next >= 0xfff7) next = -1;
} else {
-   p_first = &((unsigned char *) bh->b_data)[first & (SECTOR_SIZE-1)];
-   p_last = &((unsigned char *) bh2->b_data)[(first+1) &
+   p_first = &((__u8 *) bh->b_data)[first & (SECTOR_SIZE-1)];
+   p_last = &((__u8 *) bh2->b_data)[(first+1) &
(SECTOR_SIZE-1)];
if (nr & 1) next = ((*p_first >> 4) | (*p_last << 4)) & 0xfff;
else next = (*p_first+(*p_last << 8)) & 0xfff;
@@ -92,10 +92,10 @@
}
if (new_value != -1) {
if (MSDOS_SB(sb)->fat_bits == 32) {
-   ((unsigned long *) bh->b_data)[(first & (SECTOR_SIZE-1)) >>
+   ((__u32 *) bh->b_data)[(first & (SECTOR_SIZE-1)) >>
2] = CT_LE_L(new_value);
} else if (MSDOS_SB(sb)->fat_bits == 16) {
-   ((unsigned short *) bh->b_data)[(first & (SECTOR_SIZE-1)) >>
+   ((__u16 *) bh->b_data)[(first & (SECTOR_SIZE-1)) >>
1] = CT_LE_W(new_value);
} else {
if (nr & 1) {



Re: Where did kgcc go in 2.4.0-test10 ?

2000-11-01 Thread Bill Nottingham

H. Peter Anvin ([EMAIL PROTECTED]) said: 
> I think at least supporting a "kgcc" compiler makes sense,
> conceptually (although it probably should have been called "kcc", but
> it's too late now.)

There was already some userland package named kcc, with a kcc
binary. A Kanji converter of some sort, IIRC.

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/