Re: RFD: Kernel release numbering

2005-03-05 Thread Andres Salomon
On Thu, 03 Mar 2005 23:15:03 +0100, Adrian Bunk wrote:

> On Thu, Mar 03, 2005 at 04:28:52PM -0500, Jeff Garzik wrote:
>> Bill Rugolsky Jr. wrote:
>> >I've watched you periodically announce "hey, I'm doing an update for
>> >FC3/FC2, please test" on the mail list, and a handful of people go test.
>> >If we could convince many of the the less risk-averse but lazy users to
>> >grab kernels automatically from updates/3/testing/ or updates/3/unstable/
>> >as part of "yum update", and have a way to manage the plethora of (even
>> >daily) kernel updates by removing old unused kernels, then we'd only
>> >have to convince them *once* to set up their YUM repos, and then get them
>> >to poweroff or reboot [or use a Xen domain] occasionally. :-)
>> 
>> 
>> Tangent:  I would like to see requests-for-testing for FC kernels on LKML.
>> 
>> If people announce -ac/-as/-aa/-ck/etc. kernels on LKML, why not distro 
>> kernels?
> 
> Debian unstable currently contains only for kernel 2.6.8 (which is AFAIK 
> still the main kernel in Debian unstable although there are also 2.6.10 
> sources and 2.6.10 kernel images on some architectures) for eight 
> different architectures - many of them containing or depending on their 
> own patches.
> 

There's also no other (suitable) place to announce kernel trees.  Debian
kernels get announced on various debian-related lists; I'd imagine FC
kernels have the same thing.  The only place to announce non-distro trees
is lkml (and I've had requests for an -as specific announce list, I
haven't haven't found the time to get something going).



-
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] i386: remove extra spaces from cpu model id

2005-03-05 Thread Daniel Rozsnyo
Removes extra spaces which separate the frequency string from the cpu model id 
itself (noticable e.g. on Intel Tualatin processors in /proc/cpuinfo)

Signed-off-by: Daniel Rozsnyo <[EMAIL PROTECTED]>
---
diff -urN linux-2.6.11.orig/arch/i386/kernel/cpu/common.c 
linux-2.6.11/arch/i386/kernel/cpu/common.c
--- linux-2.6.11.orig/arch/i386/kernel/cpu/common.c 2005-03-02 
08:37:47.0 +0100
+++ linux-2.6.11/arch/i386/kernel/cpu/common.c  2005-03-06 07:46:16.0 
+0100
@@ -59,7 +59,7 @@
 int __init get_model_name(struct cpuinfo_x86 *c)
 {
unsigned int *v;
-   char *p, *q;
+   char *src, *dst;
if (cpuid_eax(0x8000) < 0x8004)
return 0;
@@ -71,17 +71,25 @@
c->x86_model_id[48] = 0;
/* Intel chips right-justify this string for some dumb reason;
-  undo that brain damage */
-   p = q = >x86_model_id[0];
-   while ( *p == ' ' )
-p++;
-   if ( p != q ) {
-while ( *p )
- *q++ = *p++;
-while ( q <= >x86_model_id[48] )
- *q++ = '\0';  /* Zero-pad the rest */
+  undo that, and also remove multiple spaces from the middle */
+   src = dst = >x86_model_id[0];
+
+   while ( *src == ' ' )   /* find the start */
+   src++;
+
+   while ( *src ) {
+   *dst++ = *src++;
+   if ( *src == ' ' ) {/* first space: copy */
+   *dst++ = *src++;
+   }
+   while ( *src == ' ' ) { /* next spaces: skip */
+   src++;
+   }
}
+   while ( dst <= >x86_model_id[48] )
+   *dst++ = '\0';  /* zero-pad the rest */
+
return 1;
 }
-
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-05 Thread Andres Salomon
Clearly I picked a bad week to go on vacation..


On Fri, 04 Mar 2005
10:18:41 -0800, Linus Torvalds wrote:
[...]
> 
> Alan, I think your problem is that you really think that the tree _I_ want 
> is what _you_ want.
> 
> I look at this from a _layering_ standpoint. Not from a "stable tree"  
> standpoint at all.
> 
> We're always had the "wild" kernels, and 90% of the time the point of the
> "wild" kernels has been to let people test out the experimental stuff,
> that's not always ready for merging. Like it or not, I've considered even
> the -ac kernel historically very much a "wild" thing, not a "bugfixes" 
> thing.
> 
> What I'd like to set up is the reverse. The same way the "wild" kernels
> tend to layer on top of my standard kernel, I'd like to have a lower
> level, the "anti-wild" kernel.  Something that is comprised of patches
> that _everybody_ can agree on, and that doesn't get anything else. AT ALL.
> 

That is what I'm trying to do w/ my tree; obvious fixes only.  Most of
the patches I've included in 2.6.10-asX have been stupid build fixes, and
basic C problems (ie, deref'ing a pointer before it's been assigned).  The
main time I make exceptions for that is for security fixes.  


> And that means that such a kernel would not get all patches that you'd
> want. That's fine. That was never the aim of it. The _only_ point of
> this kernel would be to have a baseline that nobody can disagree with.
> 
> In other words, it's not a "let's fix all serious bugs we can fix", but
> a "this is the least common denominator that is basically acceptable to
> everybody, regardless of what their objectives are".
> 
> So if you want to fix a security issue, and the fix is too big or
> invasive or ugly for the "least common denominator" thing, then it
> simply does not _go_ into that kernel. At that point, it goes into an
> -ac kernel, or into my kernel, or into a vendor kernel. See?
>

This is understandable.  I have included security fixes in -as that were
non-trivial; if a 2.6.x.y tree is not willing to include them, then I
guess it won't be what I was hoping.  I had emailed Chris before going on
vacation, offering to work with him on 2.6.x.y (which would allow me to
drop -as), but if security fixes aren't a higher priority thing (even
in the face of invasive/ugly changes), then I guess there's still a need
for -as/-ac.



-
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 1/13] speedtch: Clean up printk()'s in drivers/usb/atm/speedtch.c

2005-03-05 Thread Greg KH
On Sat, Mar 05, 2005 at 05:37:13PM -0600, James Nelson wrote:
> Add a KERN_WARNING constant to a printk() that is missing it, and add a driver
> prefix to another two in drivers/usb/atm/speedtch.c

Please CC: usb patches to the usb maintainer, it makes it a bit hard for
him to apply them otherwise :)

> Signed-off-by: James Nelson <[EMAIL PROTECTED]>
> 
> diff -Nurp -x dontdiff-osdl --exclude='*~' 
> linux-2.6.11-mm1-original/drivers/usb/atm/speedtch.c 
> linux-2.6.11-mm1/drivers/usb/atm/speedtch.c
> --- linux-2.6.11-mm1-original/drivers/usb/atm/speedtch.c  2005-03-05 
> 13:29:48.0 -0500
> +++ linux-2.6.11-mm1/drivers/usb/atm/speedtch.c   2005-03-05 
> 13:36:44.0 -0500
> @@ -192,8 +192,8 @@ static int speedtch_set_swbuff(struct sp
> 0x32, 0x40, state ? 0x01 : 0x00,
> 0x00, NULL, 0, 100);
>   if (ret < 0) {
> - printk("Warning: %sabling SW buffering: usb_control_msg 
> returned %d\n",
> -  state ? "En" : "Dis", ret);
> + printk(KERN_WARNING "%s: %sabling SW buffering: usb_control_msg 
> returned %d\n",
> +  speedtch_driver_name, state ? "En" : "Dis", ret);

No, please, if you are going to convert anything like this, use the
dev_dbg(), dev_warn(), and assorted macros instead.  Or if nothing else,
the usb subsystem has it's own dbg(), err() and warn() macros that
should be gotten rid of, but that's a lot of changes...

These comments pretty much go for all of your patches in this series,
please rework them all.

thanks,

greg k-h
-
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.6.11

2005-03-05 Thread Neil Brown
On Sunday March 6, [EMAIL PROTECTED] wrote:
> su den 06.03.2005 Klokka 00:19 (+) skreiv J.A. Magallon:
> 
> > static int __init init_nfsd(void)
> > {
> > ...
> > if (proc_mkdir("fs/nfs", NULL)) {
> > struct proc_dir_entry *entry;
> > entry = create_proc_entry("fs/nfs/exports", 0, NULL);
> > if (entry)
> > entry->proc_fops =  _operations;
> > }
> > ...
> > 
> > But nfs-utils 1.0.7 say that you can mount nfsd at /proc/fs/nfsd.
> > What 'exports' would kernel use ? Just duplicate info or a bug ?
> 
> Not sure why /proc/fs/nfs was originally chosen (perhaps Neil
> knows?),

No, before my time.
/proc/fs/nfs/exports has "always" been a file listing the kernels
current understanding of the exports table.
The same information is provided by the "/exports" file in the nfsd
filesystem which (obviously) can be mounted anywhere you like, but
nfs-utils will only work with it if it is mounted on /proc/fs/nfsd
(the preferred location) or /proc/fs/nfs (because for a little while
/proc/fs/nfsd didn't exist).

> but the above code has nothing to do with where you mount the "nfsd"
> filesystem. It is rather part of the legacy support for older versions
> of nfs-utils.
> 
> We should aim to deprecate it at some point soon.

I would like to deprecate the nfssvc system call and /proc/fs/nfs, and
I was planning to do it when 2.7 came out .
Maybe June 2005 would be a good time to mark it 'deprecated' and June
2006 would be a good time to remove it.

NeilBrown
-
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: Logitech MX1000 Horizontal Scrolling

2005-03-05 Thread Aaron Gyes
I worked around the weird two button thing by disabling cruise control.

Get logitecH-applet (http://freshmeat.net/projects/logitech_applet) and
run "logitech-applet -d".

It's a fairly useful app, and for other logitech mice it can put them
into 800 dpi mode, but it's not implemented for the MX1000. Anyone here
smart enough to figure something out?

Aaron Gyes

-
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.6.11

2005-03-05 Thread Trond Myklebust
su den 06.03.2005 Klokka 00:19 (+) skreiv J.A. Magallon:

> static int __init init_nfsd(void)
> {
> ...
> if (proc_mkdir("fs/nfs", NULL)) {
> struct proc_dir_entry *entry;
> entry = create_proc_entry("fs/nfs/exports", 0, NULL);
> if (entry)
> entry->proc_fops =  _operations;
> }
> ...
> 
> But nfs-utils 1.0.7 say that you can mount nfsd at /proc/fs/nfsd.
> What 'exports' would kernel use ? Just duplicate info or a bug ?

Not sure why /proc/fs/nfs was originally chosen (perhaps Neil knows?),
but the above code has nothing to do with where you mount the "nfsd"
filesystem. It is rather part of the legacy support for older versions
of nfs-utils.

We should aim to deprecate it at some point soon.

Cheers,
  Trond

-- 
Trond Myklebust <[EMAIL PROTECTED]>

-
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 10/13] remove aggressive idle balancing

2005-03-05 Thread Siddha, Suresh B
On Thu, Feb 24, 2005 at 11:13:14PM +1100, Nick Piggin wrote:
> Ingo Molnar wrote:
> > * Nick Piggin <[EMAIL PROTECTED]> wrote:
> > 
> > 
> >> [PATCH 6/13] no aggressive idle balancing
> >>
> >> [PATCH 8/13] generalised CPU load averaging
> >> [PATCH 9/13] less affine wakups
> >> [PATCH 10/13] remove aggressive idle balancing
> > 
> > 
> > they look fine, but these are the really scary ones :-) Maybe we could
> > do #8 and #9 first, then #6+#10. But it's probably pointless to look at
> > these in isolation.
> > 
> 
> Oh yes, they are very scary and I guarantee they'll cause
> problems :P

By code inspection, I see an issue with this patch
[PATCH 10/13] remove aggressive idle balancing

Why are we removing cpu_and_siblings_are_idle check from active_load_balance?
In case of SMT, we  want to give prioritization to an idle package while
doing active_load_balance(infact, active_load_balance will be kicked
mainly because there is an idle package) 

Just the re-addition of cpu_and_siblings_are_idle check to 
active_load_balance might not be enough. We somehow need to communicate 
this to move_tasks, otherwise can_migrate_task will fail and we will 
never be able to do active_load_balance.

thanks,
suresh
-
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.6.11.1

2005-03-05 Thread Greg KH
On Sat, Mar 05, 2005 at 01:16:10AM -0500, Shawn Starr wrote:
> Sounds great, I can be a QA resource for what machines I have. 
> 
> How do people get involved in QAing these releases? 

Get the last release and test it out.  If you have problems, and have
simple/obvious patches, send them on.

thanks,

greg k-h
-
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.6.11.1

2005-03-05 Thread Greg KH
On Fri, Mar 04, 2005 at 08:37:28PM -0500, Jeff Garzik wrote:
> Greg KH wrote:
> >On Fri, Mar 04, 2005 at 02:36:14PM -0800, Andrew Morton wrote:
> >
> >>But we end up with a cset in the permanent kernel history which simply
> >>should not have been there.
> >
> >
> >Is this really a big deal?
> 
> If you are pushing linux-release to Linus/Andrew rapidly, quick fixes 
> will land in linux-2.6 rapidly, and more invasive stuff will land only 
> in linux-2.6 when the invasive stuff is ready to go.  It even takes the 
> pressure off pushing invasive stuff ASAP.
> 
> Have you pushed linux-2.6.11.1 upstream yet?  :)

Having Linus pull from the 2.6.x.y bk tree, will not work out.  We
probably don't want the .1, .2, and so on tags in the tree, as well as
not all fixes in there will be proper for his tree (like the 2 currently
in 2.6.11.1.)  The "real" fix will go into his tree through the proper
ways.

But I/we will be sure to pick out the stuff that should go there and
send them to him.

thanks,

greg k-h
-
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.6.11.1

2005-03-05 Thread Greg KH
On Sat, Mar 05, 2005 at 02:53:43AM -0500, Dave Jones wrote:
> On Fri, Mar 04, 2005 at 04:28:02PM -0800, Linus Torvalds wrote:
>  > On Fri, 4 Mar 2005, Greg KH wrote:
>  > > On Fri, Mar 04, 2005 at 02:36:14PM -0800, Andrew Morton wrote:
>  > > > But we end up with a cset in the permanent kernel history which simply
>  > > > should not have been there.
>  > > 
>  > > Is this really a big deal?
>  > 
>  > Once? No. If it ends up being "par for the course", it's bad.
> 
> The amount of stuff in the sucker tree shouldn't really amount
> to /that/ many patches should it ? If it does, then 2.6.x is in
> worse shape than we've all been admitting.
> 
> Would it be that much work to just send the 'meat' as gnu patches,
> and leave the not-for-linus stuff alone ?

No it would not be, and should be the way this works.

thanks,

greg k-h
-
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: [request for inclusion] Filesystem in Userspace

2005-03-05 Thread Kevin P. Fleming
Andrew Morton wrote:
- cachefs is a bit stuck because it's a ton of complex code and afs is
  the only user of it.  Wiring it up to NFS would help.
Yes, please! I have an application for CacheFS between an NFS client and 
 server (all Linux) very soon :-)
-
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][MMC][6/6] Secure Digital (SD) support : wide bus

2005-03-05 Thread Pierre Ossman
Wide bus support.
This adds 4-bit bus support to the MMC layer. It is designed to 
(hopefully) be compatible with a future 4-bit MMC implementation. This 
is done by seperating the three different instances of bus width defines:

* Protocol definition: SD_BUS_WIDTH_x
* SCR contents: SD_SCR_BUS_WIDTH_x
* Host mode: MMC_BUS_WIDTH_x
They have the same values atm but drivers should not rely on this. 
MMC_BUS_WIDTH_x is not meant to be SD specific.

The MMC layer changes bus width when a card is selected. This is because 
the SD spec says that a card is only required to keep a certain bus 
width as long as it's selected.

Layers further up do not need to know which mode the host/card is in. 
They will only see a change in speed.

Index: linux-sd/include/linux/mmc/host.h
===
--- linux-sd/include/linux/mmc/host.h	(revision 138)
+++ linux-sd/include/linux/mmc/host.h	(working copy)
@@ -51,6 +51,11 @@
 #define MMC_POWER_OFF		0
 #define MMC_POWER_UP		1
 #define MMC_POWER_ON		2
+
+	unsigned char	bus_width;		/* data bus width */
+
+#define MMC_BUS_WIDTH_1		0
+#define MMC_BUS_WIDTH_4		2
 };
 
 struct mmc_host_ops {
@@ -69,7 +74,11 @@
 	unsigned int		f_max;
 	u32			ocr_avail;
 	char			host_name[8];
+	
+	unsigned long		caps;		/* Host capabilities */
 
+#define MMC_CAP_4_BIT_DATA	(1 << 0)	/* Can the host do 4 bit transfers */
+
 	/* host specific block data */
 	unsigned int		max_seg_size;	/* see blk_queue_max_segment_size */
 	unsigned short		max_hw_segs;	/* see blk_queue_max_hw_segments */
Index: linux-sd/include/linux/mmc/protocol.h
===
--- linux-sd/include/linux/mmc/protocol.h	(revision 136)
+++ linux-sd/include/linux/mmc/protocol.h	(working copy)
@@ -209,5 +209,12 @@
 #define CSD_SPEC_VER_2  2   /* Implements system specification 2.0 - 2.2 */
 #define CSD_SPEC_VER_3  3   /* Implements system specification 3.1 */
 
+
+/*
+ * SD bus widths
+ */
+#define SD_BUS_WIDTH_1  0
+#define SD_BUS_WIDTH_4  2
+
 #endif  /* MMC_MMC_PROTOCOL_H */
 
Index: linux-sd/drivers/mmc/mmc.c
===
--- linux-sd/drivers/mmc/mmc.c	(revision 139)
+++ linux-sd/drivers/mmc/mmc.c	(working copy)
@@ -335,6 +335,40 @@
 	if (err != MMC_ERR_NONE)
 		return err;
 
+	/*
+	 * Default bus width is 1 bit.
+	 */
+	host->ios.bus_width = MMC_BUS_WIDTH_1;
+	
+	/*
+	 * We can only change the bus width of the selected
+	 * card so therefore we have to put the handling
+	 * here.
+	 */
+	if (host->caps & MMC_CAP_4_BIT_DATA) {
+		/*
+		 * The card is in 1 bit mode by default so
+		 * we only need to change if it supports the
+		 * wider version.
+		 */
+		if (mmc_card_sd(card) &&
+			(card->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) {
+			struct mmc_command cmd;
+			cmd.opcode = SD_APP_SET_BUS_WIDTH;
+			cmd.arg = SD_BUS_WIDTH_4;
+			cmd.flags = MMC_RSP_R1;
+			
+			err = mmc_wait_for_app_cmd(host, card->rca, ,
+CMD_RETRIES);
+			if (err != MMC_ERR_NONE)
+return err;
+			
+			host->ios.bus_width = MMC_BUS_WIDTH_4;
+		}
+	}
+
+	host->ops->set_ios(host, >ios);
+
 	return MMC_ERR_NONE;
 }
 
@@ -644,6 +678,7 @@
 	host->ios.vdd = bit;
 	host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN;
 	host->ios.power_mode = MMC_POWER_UP;
+	host->ios.bus_width = MMC_BUS_WIDTH_1;
 	host->ops->set_ios(host, >ios);
 
 	mmc_delay(1);
@@ -661,6 +696,7 @@
 	host->ios.vdd = 0;
 	host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN;
 	host->ios.power_mode = MMC_POWER_OFF;
+	host->ios.bus_width = MMC_BUS_WIDTH_1;
 	host->ops->set_ios(host, >ios);
 }
 


ptrace and setuid problem

2005-03-05 Thread Tom Horsley
No, not a new security hole (exactly), more of a philosophy
question:
If I exec a setuid program under ptrace, I can read the image via
PEEKDATA requests. Could (or should) that be considered a security
hole?  Come to think of it, should any executable with no read
access (setuid or not) be debuggable where ptrace will be able to
peek at it even without read access?
Looking at most of the linux systems I've used, setuid program are
typically installed as execute only, not readable. The /proc files
are also readable only by the appropriate user, etc. Every attempt
seems to be made to prevent anyone from doing anything other than
just executing the program.  (This seems to have gotten more and
more draconian over time - at one time I couldn't readlink()
the exe file, but I could read the maps file and find the
executable name listed in there, thus digging up the exe name via
a backdoor.  In newer kernels I see I can't read the maps file
either, so as a debugger developer I'm reduced to digging through
the argv vector to try and deduce which program is running).
Wouldn't it make more sense to have setuid programs simply not be
ptraced?  Is there good cause to add a new even more draconian
restriction?  Perhaps put ptraced setuid programs in a special
state where no peek/poke stuff works (maybe all requests return
EPERM so the debugger can tell it has hit a setuid wall) and the
debugger has only two options: PTRACE_DETACH or PTRACE_KILL? If
detach was selected, the program could continue to execute as a
setuid program (since we know the debugger wasn't able to diddle
the program in any way, that should still be secure).
If a patch to implement this were to be generated, what would be
the odds of it being accepted? :-).
(I could try and watch any discussion this generates on the
archives, but probably best to CC me in any replies as I am not
subscribed to lkml).
Disclosure: My ulterior motive for bringing this up as a security
issue is to get the "detach and let run as setuid" feature to work
so I don't have to go to all the trouble of figuring out how to
patch the program to re-exec() itself so I can then detach and let
it run normally as a setuid program - which is what I really want
to happen in my debugger :-).
P.S. Sorry if this shows up twice, but I sent it originally about
three days ago and have yet to see it show up, so I'm trying
again from a different account.
-
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][MMC][5/6] Secure Digital (SD) support : sysfs

2005-03-05 Thread Pierre Ossman
SCR sysfs access.
This provides access to the SCR register via sysfs. Since the latest bk 
contains some changes to the sysfs part this probably needs updating. 
The patch is trivial though so it should be easy.

Index: linux-sd/drivers/mmc/mmc_sysfs.c
===
--- linux-sd/drivers/mmc/mmc_sysfs.c	(revision 135)
+++ linux-sd/drivers/mmc/mmc_sysfs.c	(working copy)
@@ -163,6 +163,7 @@
 	card->raw_cid[2], card->raw_cid[3]);
 MMC_ATTR(csd, "%08x%08x%08x%08x\n", card->raw_csd[0], card->raw_csd[1],
 	card->raw_csd[2], card->raw_csd[3]);
+MMC_ATTR(scr, "%08x%08x\n", card->raw_scr[0], card->raw_scr[1]);
 MMC_ATTR(date, "%02d/%04d\n", card->cid.month, card->cid.year);
 MMC_ATTR(fwrev, "0x%x\n", card->cid.fwrev);
 MMC_ATTR(hwrev, "0x%x\n", card->cid.hwrev);
@@ -174,6 +175,7 @@
 static struct device_attribute *mmc_dev_attributes[] = {
 	_attr_cid,
 	_attr_csd,
+	_attr_scr,
 	_attr_date,
 	_attr_fwrev,
 	_attr_hwrev,


Re: [PATCH][MMC][4/6] Secure Digital (SD) support : SCR

2005-03-05 Thread Pierre Ossman
SCR download.
This patch downloads the SCR register from the card. Unlike the other 
registers this one is transfered over the data bus. That required some 
changes to other routines to allow a card to be selected after the host 
was aquired.

This is one of the more error prone parts. The transfer is very small (8 
bytes) and might trigger corner cases in the drivers.

Index: linux-sd/include/linux/mmc/card.h
===
--- linux-sd/include/linux/mmc/card.h	(revision 138)
+++ linux-sd/include/linux/mmc/card.h	(working copy)
@@ -33,6 +33,13 @@
 	unsigned int		capacity;
 };
 
+struct sd_scr {
+	unsigned char		sda_vsn;
+	unsigned char		bus_widths;
+#define SD_SCR_BUS_WIDTH_1	(1<<0)
+#define SD_SCR_BUS_WIDTH_4	(1<<2)
+};
+
 struct mmc_host;
 
 /*
@@ -51,8 +58,10 @@
 #define MMC_STATE_READONLY	(1<<4)		/* card is read-only */
 	u32			raw_cid[4];	/* raw card CID */
 	u32			raw_csd[4];	/* raw card CSD */
+	u32			raw_scr[2];	/* raw card SCR */
 	struct mmc_cid		cid;		/* card identification */
 	struct mmc_csd		csd;		/* card specific */
+	struct sd_scr		scr;		/* extra SD information */
 };
 
 #define mmc_card_present(c)	((c)->state & MMC_STATE_PRESENT)
Index: linux-sd/drivers/mmc/mmc.c
===
--- linux-sd/drivers/mmc/mmc.c	(revision 138)
+++ linux-sd/drivers/mmc/mmc.c	(working copy)
@@ -16,6 +16,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -246,6 +248,8 @@
 
 EXPORT_SYMBOL(mmc_wait_for_app_cmd);
 
+static int mmc_select_card(struct mmc_host *host, struct mmc_card *card);
+
 /**
  *	__mmc_claim_host - exclusively claim a host
  *	@host: mmc host to claim
@@ -278,16 +282,10 @@
 	spin_unlock_irqrestore(>lock, flags);
 	remove_wait_queue(>wq, );
 
-	if (card != (void *)-1 && host->card_selected != card) {
-		struct mmc_command cmd;
-
-		host->card_selected = card;
-
-		cmd.opcode = MMC_SELECT_CARD;
-		cmd.arg = card->rca << 16;
-		cmd.flags = MMC_RSP_R1;
-
-		err = mmc_wait_for_cmd(host, , CMD_RETRIES);
+	if (card != (void *)-1) {
+		err = mmc_select_card(host, card);
+		if (err != MMC_ERR_NONE)
+			return err;
 	}
 
 	return err;
@@ -317,6 +315,29 @@
 
 EXPORT_SYMBOL(mmc_release_host);
 
+static int mmc_select_card(struct mmc_host *host, struct mmc_card *card)
+{
+	int err;
+	struct mmc_command cmd;
+
+	BUG_ON(host->card_busy == NULL);
+	
+	if (host->card_selected == card)
+		return MMC_ERR_NONE;
+
+	host->card_selected = card;
+
+	cmd.opcode = MMC_SELECT_CARD;
+	cmd.arg = card->rca << 16;
+	cmd.flags = MMC_RSP_R1;
+
+	err = mmc_wait_for_cmd(host, , CMD_RETRIES);
+	if (err != MMC_ERR_NONE)
+		return err;
+
+	return MMC_ERR_NONE;
+}
+
 /*
  * Ensure that no card is selected.
  */
@@ -528,6 +549,32 @@
 }
 
 /*
+ * Given a 64-bit response, decode to our card SCR structure.
+ */
+static void mmc_decode_scr(struct mmc_card *card)
+{
+	struct sd_scr *scr = >scr;
+	unsigned int scr_struct;
+	u32 resp[4];
+
+	BUG_ON(!mmc_card_sd(card));
+	
+	resp[3] = card->raw_scr[1];
+	resp[2] = card->raw_scr[0];
+	
+	scr_struct = UNSTUFF_BITS(resp, 60, 4);
+	if (scr_struct != 0) {
+		printk("%s: unrecognised SCR structure version %d\n",
+			card->host->host_name, scr_struct);
+		mmc_card_set_bad(card);
+		return;
+	}
+	
+	scr->sda_vsn = UNSTUFF_BITS(resp, 56, 4);
+	scr->bus_widths = UNSTUFF_BITS(resp, 48, 4);
+}
+
+/*
  * Locate a MMC card on this MMC host given a raw CID.
  */
 static struct mmc_card *mmc_find_card(struct mmc_host *host, u32 *raw_cid)
@@ -781,6 +828,80 @@
 	}
 }
 
+static void mmc_read_scrs(struct mmc_host *host)
+{
+	int err;
+	struct mmc_card *card;
+	
+	struct mmc_request mrq;
+	struct mmc_command cmd;
+	struct mmc_data data;
+
+	struct scatterlist sg;
+	
+	list_for_each_entry(card, >cards, node) {
+		if (card->state & (MMC_STATE_DEAD|MMC_STATE_PRESENT))
+			continue;
+		if (!mmc_card_sd(card))
+			continue;
+		
+		err = mmc_select_card(host, card);
+		if (err != MMC_ERR_NONE)
+		{
+			mmc_card_set_dead(card);
+			continue;
+		}
+		
+		memset(, 0, sizeof(struct mmc_command));
+		
+		cmd.opcode = MMC_APP_CMD;
+		cmd.arg = card->rca << 16;
+		cmd.flags = MMC_RSP_R1;
+		
+		err = mmc_wait_for_cmd(host, , 0);
+		if ((err != MMC_ERR_NONE) || !(cmd.resp[0] & R1_APP_CMD)) {
+			mmc_card_set_dead(card);
+			continue;
+		}
+		
+		memset(, 0, sizeof(struct mmc_command));
+		
+		cmd.opcode = SD_APP_SEND_SCR;
+		cmd.arg = 0;
+		cmd.flags = MMC_RSP_R1;
+		
+		memset(, 0, sizeof(struct mmc_data));
+		
+		data.timeout_ns = card->csd.tacc_ns * 10;
+		data.timeout_clks = card->csd.tacc_clks * 10;
+		data.blksz_bits = 3;
+		data.blocks = 1;
+		data.flags = MMC_DATA_READ;
+		data.sg = 
+		data.sg_len = 1;
+		
+		memset(, 0, sizeof(struct mmc_request));
+		
+		mrq.cmd = 
+		mrq.data = 
+		
+		sg_init_one(, (u8*)card->raw_scr, 64);
+		
+		err = mmc_wait_for_req(host, );
+		if (err != MMC_ERR_NONE) {
+			mmc_card_set_dead(card);
+			continue;
+		}
+		
+		card->raw_scr[0] = 

Re: [PATCH][MMC][3/6] Secure Digital (SD) support : ro

2005-03-05 Thread Pierre Ossman
Read-only support.
This patch adds a new callback for the drivers to facilitate reading the 
SD card read-only switch. If the callback is not provided then a warning 
will be printed and it will default to write-enable.

The read-only switch is a host enforced read-only so the MMC block layer 
has been changed to not allow rw mounts of ro cards. It also prints a 
'(ro)' for read-only cards.

Index: linux-sd/include/linux/mmc/card.h
===
--- linux-sd/include/linux/mmc/card.h	(revision 137)
+++ linux-sd/include/linux/mmc/card.h	(working copy)
@@ -48,6 +48,7 @@
 #define MMC_STATE_DEAD		(1<<1)		/* device no longer in stack */
 #define MMC_STATE_BAD		(1<<2)		/* unrecognised device */
 #define MMC_STATE_SDCARD	(1<<3)		/* is an SD card */
+#define MMC_STATE_READONLY	(1<<4)		/* card is read-only */
 	u32			raw_cid[4];	/* raw card CID */
 	u32			raw_csd[4];	/* raw card CSD */
 	struct mmc_cid		cid;		/* card identification */
@@ -58,11 +59,13 @@
 #define mmc_card_dead(c)	((c)->state & MMC_STATE_DEAD)
 #define mmc_card_bad(c)		((c)->state & MMC_STATE_BAD)
 #define mmc_card_sd(c)		((c)->state & MMC_STATE_SDCARD)
+#define mmc_card_readonly(c)	((c)->state & MMC_STATE_READONLY)
 
 #define mmc_card_set_present(c)	((c)->state |= MMC_STATE_PRESENT)
 #define mmc_card_set_dead(c)	((c)->state |= MMC_STATE_DEAD)
 #define mmc_card_set_bad(c)	((c)->state |= MMC_STATE_BAD)
 #define mmc_card_set_sd(c)	((c)->state |= MMC_STATE_SDCARD)
+#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY)
 
 #define mmc_card_name(c)	((c)->cid.prod_name)
 #define mmc_card_id(c)		((c)->dev.bus_id)
Index: linux-sd/include/linux/mmc/host.h
===
--- linux-sd/include/linux/mmc/host.h	(revision 137)
+++ linux-sd/include/linux/mmc/host.h	(working copy)
@@ -56,6 +56,7 @@
 struct mmc_host_ops {
 	void	(*request)(struct mmc_host *host, struct mmc_request *req);
 	void	(*set_ios)(struct mmc_host *host, struct mmc_ios *ios);
+	int	(*get_ro)(struct mmc_host *host);
 };
 
 struct mmc_card;
Index: linux-sd/drivers/mmc/mmc_block.c
===
--- linux-sd/drivers/mmc/mmc_block.c	(revision 135)
+++ linux-sd/drivers/mmc/mmc_block.c	(working copy)
@@ -95,6 +95,10 @@
 		if (md->usage == 2)
 			check_disk_change(inode->i_bdev);
 		ret = 0;
+		
+		if ((filp->f_mode & FMODE_WRITE) &&
+			mmc_card_readonly(md->queue.card))
+			ret = -EROFS;
 	}
 
 	return ret;
@@ -400,9 +404,10 @@
 	if (err)
 		goto out;
 
-	printk(KERN_INFO "%s: %s %s %dKiB\n",
+	printk(KERN_INFO "%s: %s %s %dKiB %s\n",
 		md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
-		(card->csd.capacity << card->csd.read_blkbits) / 1024);
+		(card->csd.capacity << card->csd.read_blkbits) / 1024,
+		mmc_card_readonly(card)?"(ro)":"");
 
 	mmc_set_drvdata(card, md);
 	add_disk(md->disk);
Index: linux-sd/drivers/mmc/mmc.c
===
--- linux-sd/drivers/mmc/mmc.c	(revision 137)
+++ linux-sd/drivers/mmc/mmc.c	(working copy)
@@ -726,8 +726,20 @@
 			err = mmc_wait_for_cmd(host, , CMD_RETRIES);
 			if (err != MMC_ERR_NONE)
 mmc_card_set_dead(card);
-			else
+			else {			
 card->rca = cmd.resp[0] >> 16;
+
+if (!host->ops->get_ro) {
+	printk(KERN_WARNING "%s: host does not "
+		"support reading read-only "
+		"switch. assuming write-enable.\n",
+		host->host_name);
+}
+else {
+	if (host->ops->get_ro(host))
+		mmc_card_set_readonly(card);
+}
+			}
 		}
 		else {
 			cmd.opcode = MMC_SET_RELATIVE_ADDR;


Re: [PATCH][MMC][2/6] Secure Digital (SD) support : init

2005-03-05 Thread Pierre Ossman
SD card initialisation.
This patch contains the central parts of the SD support.
The system first tries to detect MMC cards, and if none are found then 
it procedes to look for an SD card. This is incorrect acording to SD 
specifications but I find it odd that MMC is supposed to cope with SD 
commands and not the other way around (since MMC is the older of the 
two). This behaviour is the one Windows uses and has posed no problems 
with any cards tested so far.

It provides flags for the card and host to mark them as SD. The host 
needs to be marked because the MMC layer needs to determine if it should 
send MMC or SD commands at points where no specific card is involved.

A new helper function called mmc_wait_for_app_cmd() is added to handle 
the APP commands which are used frequently with SD.

CID and CSD parsing are extended to handle SD formats.
Index: linux-sd/include/linux/mmc/card.h
===
--- linux-sd/include/linux/mmc/card.h	(revision 135)
+++ linux-sd/include/linux/mmc/card.h	(working copy)
@@ -47,6 +47,7 @@
 #define MMC_STATE_PRESENT	(1<<0)		/* present in sysfs */
 #define MMC_STATE_DEAD		(1<<1)		/* device no longer in stack */
 #define MMC_STATE_BAD		(1<<2)		/* unrecognised device */
+#define MMC_STATE_SDCARD	(1<<3)		/* is an SD card */
 	u32			raw_cid[4];	/* raw card CID */
 	u32			raw_csd[4];	/* raw card CSD */
 	struct mmc_cid		cid;		/* card identification */
@@ -56,10 +57,12 @@
 #define mmc_card_present(c)	((c)->state & MMC_STATE_PRESENT)
 #define mmc_card_dead(c)	((c)->state & MMC_STATE_DEAD)
 #define mmc_card_bad(c)		((c)->state & MMC_STATE_BAD)
+#define mmc_card_sd(c)		((c)->state & MMC_STATE_SDCARD)
 
 #define mmc_card_set_present(c)	((c)->state |= MMC_STATE_PRESENT)
 #define mmc_card_set_dead(c)	((c)->state |= MMC_STATE_DEAD)
 #define mmc_card_set_bad(c)	((c)->state |= MMC_STATE_BAD)
+#define mmc_card_set_sd(c)	((c)->state |= MMC_STATE_SDCARD)
 
 #define mmc_card_name(c)	((c)->cid.prod_name)
 #define mmc_card_id(c)		((c)->dev.bus_id)
Index: linux-sd/include/linux/mmc/mmc.h
===
--- linux-sd/include/linux/mmc/mmc.h	(revision 136)
+++ linux-sd/include/linux/mmc/mmc.h	(working copy)
@@ -88,6 +88,8 @@
 
 extern int mmc_wait_for_req(struct mmc_host *, struct mmc_request *);
 extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int);
+extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int,
+	struct mmc_command *, int);
 
 extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card);
 
Index: linux-sd/include/linux/mmc/host.h
===
--- linux-sd/include/linux/mmc/host.h	(revision 135)
+++ linux-sd/include/linux/mmc/host.h	(working copy)
@@ -79,6 +79,10 @@
 	/* private data */
 	struct mmc_ios		ios;		/* current io bus settings */
 	u32			ocr;		/* the current OCR setting */
+	
+	unsigned int		mode;		/* current card mode of host */
+#define MMC_MODE_MMC		0
+#define MMC_MODE_SD		1
 
 	struct list_head	cards;		/* devices attached to this host */
 
Index: linux-sd/drivers/mmc/mmc.c
===
--- linux-sd/drivers/mmc/mmc.c	(revision 135)
+++ linux-sd/drivers/mmc/mmc.c	(working copy)
@@ -172,8 +172,80 @@
 
 EXPORT_SYMBOL(mmc_wait_for_cmd);
 
+/**
+ *	mmc_wait_for_app_cmd - start an application command and wait for
+ 			   completion
+ *	@host: MMC host to start command
+ *	@rca: RCA to send MMC_APP_CMD to
+ *	@cmd: MMC command to start
+ *	@retries: maximum number of retries
+ *
+ *	Sends a MMC_APP_CMD, checks the card response, sends the command
+ *	in the parameter and waits for it to complete. Return any error
+ *	that occurred while the command was executing.  Do not attempt to
+ *	parse the response.
+ */
+int mmc_wait_for_app_cmd(struct mmc_host *host, unsigned int rca,
+	struct mmc_command *cmd, int retries)
+{
+	struct mmc_request mrq;
+	struct mmc_command appcmd;
+	
+	int i, err;
 
+	BUG_ON(host->card_busy == NULL);
+	BUG_ON(retries < 0);
+	
+	err = MMC_ERR_INVALID;
+	
+	/*
+	 * We have to resend MMC_APP_CMD for each attempt so
+	 * we cannot use the retries field in mmc_command.
+	 */
+	for (i = 0;i <= retries;i++) {
+		memset(, 0, sizeof(struct mmc_request));
 
+		appcmd.opcode = MMC_APP_CMD;
+		appcmd.arg = rca << 16;
+		appcmd.flags = MMC_RSP_R1;
+		appcmd.retries = 0;
+		memset(appcmd.resp, 0, sizeof(appcmd.resp));
+		appcmd.data = NULL;
+		
+		mrq.cmd = 
+		appcmd.data = NULL;
+		
+		mmc_wait_for_req(host, );
+		
+		if (appcmd.error) {
+			err = appcmd.error;
+			continue;
+		}
+		
+		/* Check that card supported application commands */
+		if (!(appcmd.resp[0] & R1_APP_CMD))
+			return MMC_ERR_FAILED;
+
+		memset(, 0, sizeof(struct mmc_request));
+
+		memset(cmd->resp, 0, sizeof(cmd->resp));
+		cmd->retries = 0;
+
+		mrq.cmd = cmd;
+		cmd->data = NULL;
+
+		mmc_wait_for_req(host, );
+		
+		err = 

[PATCH] driver/media/video/saa7134/saa7134-dvd.c fix videobuf_dvb_register() on 2.6.11

2005-03-05 Thread Auzanneau Gregory

Fix parameters of videobuf_dvb_register

Signed-off-by: Gregory Auzanneau <[EMAIL PROTECTED]>

 drivers/media/video/saa7134/saa7134-dvb.c |   2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

--- drivers/media/video/saa7134/saa7134-dvb.c.old   2005-03-02
08:38:12.0 +0100
+++ drivers/media/video/saa7134/saa7134-dvb.c   2005-03-06
02:20:39.243386096 +0100
@@ -53,7 +53,7 @@ static int dvb_init(struct saa7134_dev *
return -1;

/* register everything else */
-   return videobuf_dvb_register(>dvb);
+   return videobuf_dvb_register(>dvb, THIS_MODULE, dev);
 }

 static int dvb_fini(struct saa7134_dev *dev)

-- 
Auzanneau Grégory
GPG 0x99137BEE
-
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][MMC][1/6] Secure Digital (SD) support : protocol

2005-03-05 Thread Pierre Ossman
Protocol definitions.
The basic commands needed for the later patches. The R1_APP_CMD seems to 
be misdefined in protocol.h so this patch changes it.

Index: linux-sd/include/linux/mmc/mmc.h
===
--- linux-sd/include/linux/mmc/mmc.h	(revision 135)
+++ linux-sd/include/linux/mmc/mmc.h	(working copy)
@@ -37,6 +37,7 @@
 #define MMC_RSP_R1B	(MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_BUSY)
 #define MMC_RSP_R2	(MMC_RSP_LONG|MMC_RSP_CRC)
 #define MMC_RSP_R3	(MMC_RSP_SHORT)
+#define MMC_RSP_R6	(MMC_RSP_SHORT|MMC_RSP_CRC)
 
 	unsigned int		retries;	/* max number of retries */
 	unsigned int		error;		/* command error */
Index: linux-sd/include/linux/mmc/protocol.h
===
--- linux-sd/include/linux/mmc/protocol.h	(revision 135)
+++ linux-sd/include/linux/mmc/protocol.h	(working copy)
@@ -76,6 +76,16 @@
 #define MMC_APP_CMD  55   /* ac   [31:16] RCAR1  */
 #define MMC_GEN_CMD  56   /* adtc [0] RD/WR  R1b */
 
+/* SD commands   type  argument response */
+  /* class 8 */
+/* This is basically the same command as for MMC with some quirks. */
+#define SD_SEND_RELATIVE_ADDR 3   /* ac  R6  */
+
+  /* Application commands */
+#define SD_APP_SET_BUS_WIDTH  6   /* ac   [1:0] bus widthR1  */
+#define SD_APP_OP_COND   41   /* bcr  [31:0] OCR R3  */
+#define SD_APP_SEND_SCR  51   /* adtcR1  */
+
 /*
   MMC status in R1
   Type
@@ -113,7 +123,7 @@
 #define R1_STATUS(x)(x & 0xE000)
 #define R1_CURRENT_STATE(x)	((x & 0x1E00) >> 9)	/* sx, b (4 bits) */
 #define R1_READY_FOR_DATA	(1 << 8)	/* sx, a */
-#define R1_APP_CMD		(1 << 7)	/* sr, c */
+#define R1_APP_CMD		(1 << 5)	/* sr, c */
 
 /* These are unpacked versions of the actual responses */
 


[PATCH][MMC][0/6] Secure Digital (SD) support

2005-03-05 Thread Pierre Ossman
As promised, here is the patch broken down into smaller pieces. The 
patch is now divided into six distinct parts:

* Protocol definitions.
* SD card initialisation.
* Reading read-only switch.
* Getting SCR register.
* Exposing SCR register through sysfs.
* Wide (4-bit) bus support.
Rgds
Pierre
-
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: amd64 2.6.11 oops on modprobe

2005-03-05 Thread Randy.Dunlap
Andrei Mikhailovsky wrote:
I get the oops during the boot up process. This did not happen in
2.6.10/2.6.9.
Here is the output from dmesg:
Unable to handle kernel paging request at 880db000 RIP: 
{:saa7110:saa7110_write_block+127}
PGD 103027 PUD 105027 PMD 3ee64067 PTE 0
Oops:  [1] 
CPU 0 
Modules linked in: adv7175 saa7110 zr36067 videocodec videodev sata_nv
libata snd_intel8x0 snd_ac97_codec snd_pcm_oss snd_mixer_oss snd_pcm
snd_timer snd snd_page_alloc i2c_nforce2 it87 eeprom i2c_sensor i2c_isa
sk98lin
Pid: 2604, comm: modprobe Not tainted 2.6.11-amd64
RIP: 0010:[]
{:saa7110:saa7110_write_block+127}
RSP: 0018:81003f6c5b78  EFLAGS: 00010287
RAX: 139f RBX: ec36 RCX: 002a
RDX: 009f RSI: 0001 RDI: 880bf838
RBP: 139f R08:  R09: 81003efd63a8
R10: 0001 R11: 802f75d0 R12: 880db000
R13: 81003f3e0200 R14: 81003e0df200 R15: 0001
FS:  2aac5520() GS:80500180()
knlGS:
CS:  0010 DS:  ES:  CR0: 8005003b
CR2: 880db000 CR3: 3e125000 CR4: 06e0
Process modprobe (pid: 2604, threadinfo 81003f6c4000, task
81003ed59700)
Stack: 0076  
 
     
81003e0df228 
   002a0001004e 81003f6c5b78 
Call Trace:{:saa7110:saa7110_detect_client+0} 
   {:saa7110:saa7110_detect_client+388} 
   {i2c_probe+642}
{i2c_add_adapter+468} 
   {i2c_bit_add_bus+840}
{:zr36067:init_dc10_cards+1536} 
   {sys_init_module+5857}
{do_lookup+55} 
   {prio_tree_insert+48}
{:zr36067:init_dc10_cards+0} 
   {sys_mmap+191} {system_call
+126} 
   

Code: 41 0f b6 04 24 ff c5 49 ff c4 41 88 44 15 00 88 04 0c 8b 44 
RIP {:saa7110:saa7110_write_block+127} RSP

CR2: 880db000

If anyone need more debugging info, I am ready to help
Hm, not much change in that driver from 2.6.10.
Is this easily reproducible?
If so, please boot with "kstack=32" for more stack dump.
And send me your saa7110.o (object) file since mine isn't
like yours.
--
~Randy
darn, kstack= needs to be added to kernel-parameters.txt...
-
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 0/6] Open-iSCSI High-Performance Initiator for Linux

2005-03-05 Thread Mike Christie
Alex Aizman wrote:
This is to announce Open-iSCSI project: High-Performance iSCSI Initiator for
Linux.
MOTIVATION
==
Our initial motivations for the project were: (1) implement the right
user/kernel split, and (2) design iSCSI data path for performance. Recently
we added (3): get accepted into the mainline kernel.
 
As far as user/kernel, the existing iSCSI initiators bloat the kernel with
ever-growing control plane code, including but not limited to: iSCSI
discovery, Login (Authentication and Operational), session and connection
management,
For iscsi-sfnet, I know it does login and auth and session and connection
management/recovery in kernel becuase nobody has been able to write a usersapce
daemon that can survive memory allocation failures and being paged out - are
there other problems when dealing with usersapce like this. Open-iscsi seems
to suffer from those problems too, but they seem like they can be fixed 
relatively
quickly. Do you know how long it will take? Is it still two months with some of
the items I descibed on the open-iscsi list in mind and after looking at what dm
multipath has had to do to perform failback and path checking?
As you know I agree it should be done in usersapce so please spare me the usual
advertisements and magic I normally get ;) I do not need to be sold on the
concept. I am just trying to get a better picture of if people will merge the
kernel part with a unreliable userspace component. If so then many sourceforge
devs can help test as there is no point in target vendors on that list
fixing the same bugs on multiple stacks like I have been doing (almost had
Pyx fixed with IBM DS300 too).
If the problems of doing recovery/login/auth in usersapce are solved and
well known should dm multipath move its failover to usersapce too? Doing
explicit failover is essentialy the same problem and there is no point in
sticking in a kernel interface for dm hw handlers when it can be done in
usersapce. I mention this becuase of the MCS embargo, and the fact the
I cannot imagine many storage admins running iSCSI without some sort
of multipath or failover so I would like to get that ironed out too.
-
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/


NMI watchdog question

2005-03-05 Thread Pallai Roland

Hi,
 I'm playing with the NMI watchdog (nmi_watchdog=1) on a reproductable
hard lockup (no keyboard, etc) but seems like it doesn't works and I
can't understand why, please explain to me the possible causes.. I
belive it should work in this situation..

environment:
 P4C800 motherboard, P4-2.4 cpu (APIC 2.0 on)
 Promise 20378 SATA controller on the motherboard (sil_promise driver)
 Maxtor diamondmax plus 9 200G sata disk
 (and an empty PCI expander plus some more other under-testing hardware
which doesn't matter in the experiment)

 mainline kernel 2.6.11
 serial and VGA console, root on NFS


steps to the lockup:
 1. booting the machine with sata drive on the promise controller
 2. dd if=/dev/sda of=/dev/null bs=4k
 3. unplug the power from drive
 4. waiting about 2 seconds
 5. plug the power back

 dd stucked in 'D' here for 10-15 seconds and than the kernel say:
  ata1: command timeout

 and voila, the box is dead, but without any message from the NMI
watchdog :(


 thanks in advance!



dap:# cat /proc/interrupts 
   CPU0   
  0: 685561IO-APIC-edge  timer
  1:  8IO-APIC-edge  i8042
  4:   2666IO-APIC-edge  serial
  8:  4IO-APIC-edge  rtc
  9:  1   IO-APIC-level  acpi
 12: 93IO-APIC-edge  i8042
 14:  12810IO-APIC-edge  ide0
169:  90085   IO-APIC-level  eth0, uhci_hcd
177:  4   IO-APIC-level  ehci_hcd, libata
185:  7   IO-APIC-level  ide2
193:  0   IO-APIC-level  uhci_hcd, uhci_hcd
201:103   IO-APIC-level  uhci_hcd
209:  0   IO-APIC-level  Intel ICH5
NMI: 686357 
LOC: 685462 
ERR:  0
MIS:  0

dap:# lspci 
:00:00.0 Host bridge: Intel Corp. 82875P Memory Controller Hub (rev 02)
:00:01.0 PCI bridge: Intel Corp. 82875P Processor to AGP Controller (rev 02)
:00:03.0 PCI bridge: Intel Corp. 82875P Processor to PCI to CSA Bridge (rev 
02)
:00:1d.0 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #1 
(rev 02)
:00:1d.1 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #2 
(rev 02)
:00:1d.2 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #3 
(rev 02)
:00:1d.3 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #4 
(rev 02)
:00:1d.7 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 EHCI 
Controller (rev 02)
:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev c2)
:00:1f.0 ISA bridge: Intel Corp. 82801EB/ER (ICH5/ICH5R) LPC Bridge (rev 02)
:00:1f.1 IDE interface: Intel Corp. 82801EB/ER (ICH5/ICH5R) Ultra ATA 100 
Storage Controller (rev 02)
:00:1f.3 SMBus: Intel Corp. 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 
02)
:00:1f.5 Multimedia audio controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) 
AC'97 Audio Controller (rev 02)
:01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 
400] (rev a1)
:02:01.0 Ethernet controller: Intel Corp. 82547EI Gigabit Ethernet 
Controller (LOM)
:03:04.0 RAID bus controller: Promise Technology, Inc. PDC20378 (FastTrak 
378/SATA 378) (rev 02)
:03:0b.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 
05)
:03:0c.0 RAID bus controller: Silicon Image, Inc. (formerly CMD Technology 
Inc) PCI0680 Ultra ATA-133 Host Controller (rev 02)
:03:0d.0 PCI bridge: Digital Equipment Corporation DECchip 21150 (rev 04)
:04:04.0 PCI bridge: Digital Equipment Corporation DECchip 21150 (rev 04)
:05:04.0 PCI bridge: Digital Equipment Corporation DECchip 21150 (rev 04)
:05:08.0 PCI bridge: Digital Equipment Corporation DECchip 21150 (rev 04)

dmesg:
Linux version 2.6.11 ([EMAIL PROTECTED]) (gcc version 3.4.2 20041017 (Red Hat 
3.4.2-6.f
c3)) #1 SMP Sat Mar 5 17:01:53 CET 2005
BIOS-provided physical RAM map:
 BIOS-e820:  - 0009fc00 (usable)
 BIOS-e820: 0009fc00 - 000a (reserved)
 BIOS-e820: 000e8000 - 0010 (reserved)
 BIOS-e820: 0010 - 1ff3 (usable)
 BIOS-e820: 1ff3 - 1ff4 (ACPI data)
 BIOS-e820: 1ff4 - 1fff (ACPI NVS)
 BIOS-e820: 1fff - 2000 (reserved)
 BIOS-e820: ffb8 - 0001 (reserved)
0MB HIGHMEM available.
511MB LOWMEM available.
found SMP MP-table at 000ff780
On node 0 totalpages: 130864
  DMA zone: 4096 pages, LIFO batch:1
  Normal zone: 126768 pages, LIFO batch:16
  HighMem zone: 0 pages, LIFO batch:1
DMI 2.3 present.
ACPI: RSDP (v002 ACPIAM) @ 0x000f9e30
ACPI: XSDT (v001 A M I  OEMXSDT  0x11000321 MSFT 0x0097) @ 0x1ff30100
ACPI: FADT (v003 A M I  OEMFACP  0x11000321 MSFT 0x0097) @ 0x1ff30290
ACPI: MADT (v001 A M I  OEMAPIC  0x11000321 MSFT 0x0097) @ 0x1ff30390
ACPI: OEMB (v001 A M I  OEMBIOS  0x11000321 MSFT 0x0097) @ 0x1ff40040
ACPI: DSDT (v001  P4CED P4CED096 0x0096 INTL 0x02002026) @ 0x
ACPI: Local APIC address 0xfee0
ACPI: LAPIC 

Re: [patch] inotify for 2.6.11

2005-03-05 Thread Robert Love
On Sun, 2005-03-06 at 00:04 +, Christoph Hellwig wrote:

> The user interface is still bogus.

I presume you are talking about the ioctl.  I have tried to engage you
and others on what exactly you prefer instead.  I have said that moving
to a write interface is fine but I don't see how ut is _any_ better than
the ioctl.  Write is less typed, in fact, since we lose the command
versus argument delineation.

But if it is a anonymous decision, I'll switch it.  Or take patches. ;-)
It isn't a big deal.

> Also now version of it has stayed in -mm long enough because bad
> bugs pop up almost weekly.

I don't follow this sentence.

Best,

Robert Love


-
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 02/15] block/xd: replace schedule_timeout() with msleep()/msleep_interruptible()

2005-03-05 Thread domen



Any comments would be appreciated. 

Use msleep() or msleep_interruptible() [as appropriate]
instead of schedule_timeout() to gurantee the task delays as
expected. As a result changed the units of the timeout variable from
jiffies to msecs.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Maximilian Attems <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/xd.c |   14 +-
 1 files changed, 5 insertions(+), 9 deletions(-)

diff -puN drivers/block/xd.c~msleep-drivers_block_xd drivers/block/xd.c
--- kj/drivers/block/xd.c~msleep-drivers_block_xd   2005-03-05 
16:09:12.0 +0100
+++ kj-domen/drivers/block/xd.c 2005-03-05 16:09:12.0 +0100
@@ -62,7 +62,7 @@ static int xd[5] = { -1,-1,-1,-1, };
 
 #define XD_DONT_USE_DMA0  /* Initial value. may be overriden 
using
  "nodma" module option */
-#define XD_INIT_DISK_DELAY (30*HZ/1000)  /* 30 ms delay during disk 
initialization */
+#define XD_INIT_DISK_DELAY (30)  /* 30 ms delay during disk initialization 
*/
 
 /* Above may need to be increased if a problem with the 2nd drive detection
(ST11M controller) or resetting a controller (WD) appears */
@@ -633,14 +633,12 @@ static u_char __init xd_initdrives (void
for (i = 0; i < XD_MAXDRIVES; i++) {
xd_build(cmdblk,CMD_TESTREADY,i,0,0,0,0,0);
if (!xd_command(cmdblk,PIO_MODE,NULL,NULL,NULL,XD_TIMEOUT*8)) {
-   set_current_state(TASK_INTERRUPTIBLE);
-   schedule_timeout(XD_INIT_DISK_DELAY);
+   msleep_interruptible(XD_INIT_DISK_DELAY);
 
init_drive(count);
count++;
 
-   set_current_state(TASK_INTERRUPTIBLE);
-   schedule_timeout(XD_INIT_DISK_DELAY);
+   msleep_interruptible(XD_INIT_DISK_DELAY);
}
}
return (count);
@@ -761,8 +759,7 @@ static void __init xd_wd_init_controller
 
outb(0,XD_RESET);   /* reset the controller */
 
-   set_current_state(TASK_UNINTERRUPTIBLE);
-   schedule_timeout(XD_INIT_DISK_DELAY);
+   msleep(XD_INIT_DISK_DELAY);
 }
 
 static void __init xd_wd_init_drive (u_char drive)
@@ -936,8 +933,7 @@ If you need non-standard settings use th
xd_maxsectors = 0x01;
outb(0,XD_RESET);   /* reset the controller */
 
-   set_current_state(TASK_UNINTERRUPTIBLE);
-   schedule_timeout(XD_INIT_DISK_DELAY);
+   msleep(XD_INIT_DISK_DELAY);
 }
 
 static void __init xd_xebec_init_drive (u_char drive)
_
-
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: Undefined symbols in 2.6.11-rc5-mm1

2005-03-05 Thread Christoph Hellwig
On Sat, Mar 05, 2005 at 11:36:23AM -0500, Kai Germaschewski wrote:
> However, I spoke too soon. There actually is a legitimate use for 
> EXPORT_SYMBOL() in a lib-y object, e.g. lib/dump_stack.c. This provides a 
> default implementation for dump_stack(). Most archs provide their own 
> implementation (and EXPORT_SYMBOL() it), and in this case we definitely 
> want the default version in lib to be thrown away, including its 
> EXPORT_SYMBOL. So the appended patch throws false positives and thus can 
> not be applied.

.. and should be replaced by CONFIG_GENERIC_DUMP_STACK or
__HAVE_ARCH_DUMP_STACK or something similar

-
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 5/13] hc_crisv10: Clean up printk()'s in drivers/usb/host/hc_crisv10.c

2005-03-05 Thread James Nelson
Add KERN_ constants to printk()s missing them, and fix the debugging macros in
drivers/usb/host/hc_crisv10.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/host/hc_crisv10.c 
linux-2.6.11-mm1/drivers/usb/host/hc_crisv10.c
--- linux-2.6.11-mm1-original/drivers/usb/host/hc_crisv10.c 2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/host/hc_crisv10.c  2005-03-05 
15:21:06.0 -0500
@@ -32,16 +32,14 @@
 
 #include "hc_crisv10.h"
 
+#define PFX "hc_crisv10: "
+
 #define ETRAX_USB_HC_IRQ USB_HC_IRQ_NBR
 #define ETRAX_USB_RX_IRQ USB_DMA_RX_IRQ_NBR
 #define ETRAX_USB_TX_IRQ USB_DMA_TX_IRQ_NBR
 
 static const char *usb_hcd_version = "$Revision: 1.2 $";
 
-#undef KERN_DEBUG
-#define KERN_DEBUG ""
-
-
 #undef USB_DEBUG_RH
 #undef USB_DEBUG_EPID
 #undef USB_DEBUG_SB
@@ -54,50 +52,50 @@ static const char *usb_hcd_version = "$R
 #undef USB_DEBUG_ISOC
 
 #ifdef USB_DEBUG_RH
-#define dbg_rh(format, arg...) printk(KERN_DEBUG __FILE__ ": (RH) " format 
"\n" , ## arg)
+#define dbg_rh(format, arg...) printk(KERN_DEBUG PFX "(RH) " format "\n" , ## 
arg)
 #else
 #define dbg_rh(format, arg...) do {} while (0)
 #endif
 
 #ifdef USB_DEBUG_EPID
-#define dbg_epid(format, arg...) printk(KERN_DEBUG __FILE__ ": (EPID) " format 
"\n" , ## arg)
+#define dbg_epid(format, arg...) printk(KERN_DEBUG PFX "(EPID) " format "\n" , 
## arg)
 #else
 #define dbg_epid(format, arg...) do {} while (0)
 #endif
 
 #ifdef USB_DEBUG_SB
-#define dbg_sb(format, arg...) printk(KERN_DEBUG __FILE__ ": (SB) " format 
"\n" , ## arg)
+#define dbg_sb(format, arg...) printk(KERN_DEBUG PFX "(SB) " format "\n" , ## 
arg)
 #else
 #define dbg_sb(format, arg...) do {} while (0)
 #endif
 
 #ifdef USB_DEBUG_CTRL
-#define dbg_ctrl(format, arg...) printk(KERN_DEBUG __FILE__ ": (CTRL) " format 
"\n" , ## arg)
+#define dbg_ctrl(format, arg...) printk(KERN_DEBUG PFX "(CTRL) " format "\n" , 
## arg)
 #else
 #define dbg_ctrl(format, arg...) do {} while (0)
 #endif
 
 #ifdef USB_DEBUG_BULK
-#define dbg_bulk(format, arg...) printk(KERN_DEBUG __FILE__ ": (BULK) " format 
"\n" , ## arg)
+#define dbg_bulk(format, arg...) printk(KERN_DEBUG PFX "(BULK) " format "\n" , 
## arg)
 #else
 #define dbg_bulk(format, arg...) do {} while (0)
 #endif
 
 #ifdef USB_DEBUG_INTR
-#define dbg_intr(format, arg...) printk(KERN_DEBUG __FILE__ ": (INTR) " format 
"\n" , ## arg)
+#define dbg_intr(format, arg...) printk(KERN_DEBUG PFX "(INTR) " format "\n" , 
## arg)
 #else
 #define dbg_intr(format, arg...) do {} while (0)
 #endif
 
 #ifdef USB_DEBUG_ISOC
-#define dbg_isoc(format, arg...) printk(KERN_DEBUG __FILE__ ": (ISOC) " format 
"\n" , ## arg)
+#define dbg_isoc(format, arg...) printk(KERN_DEBUG PFX "(ISOC) " format "\n" , 
## arg)
 #else
 #define dbg_isoc(format, arg...) do {} while (0)
 #endif
 
 #ifdef USB_DEBUG_TRACE
-#define DBFENTER (printk(": Entering: %s\n", __FUNCTION__))
-#define DBFEXIT  (printk(": Exiting:  %s\n", __FUNCTION__))
+#define DBFENTER (printk(PFX "%s(): entering\n", __FUNCTION__))
+#define DBFEXIT  (printk(PFX "%s(): exiting\n",  __FUNCTION__))
 #else
 #define DBFENTER do {} while (0)
 #define DBFEXIT  do {} while (0)
@@ -522,32 +520,36 @@ static struct usb_operations etrax_usb_d
USB_DEBUG_URB macros. */
 static void __dump_urb(struct urb* purb)
 {
-   printk("\nurb  :0x%08lx\n", (unsigned long)purb);
-   printk("dev   :0x%08lx\n", (unsigned long)purb->dev);
-   printk("pipe  :0x%08x\n", purb->pipe);
-   printk("status:%d\n", purb->status);
-   printk("transfer_flags:0x%08x\n", purb->transfer_flags);
-   printk("transfer_buffer   :0x%08lx\n", (unsigned 
long)purb->transfer_buffer);
-   printk("transfer_buffer_length:%d\n", purb->transfer_buffer_length);
-   printk("actual_length :%d\n", purb->actual_length);
-   printk("setup_packet  :0x%08lx\n", (unsigned 
long)purb->setup_packet);
-   printk("start_frame   :%d\n", purb->start_frame);
-   printk("number_of_packets :%d\n", purb->number_of_packets);
-   printk("interval  :%d\n", purb->interval);
-   printk("error_count   :%d\n", purb->error_count);
-   printk("context   :0x%08lx\n", (unsigned 
long)purb->context);
-   printk("complete  :0x%08lx\n\n", (unsigned 
long)purb->complete);
+   pr_info(PFX "%s(): start\n");
+   pr_info(PFX "urb  :0x%08lx\n", (unsigned long)purb);
+   pr_info(PFX "dev   :0x%08lx\n", (unsigned 
long)purb->dev);
+   pr_info(PFX "pipe  :0x%08x\n", purb->pipe);
+   pr_info(PFX "status:%d\n", purb->status);
+   pr_info(PFX "transfer_flags:0x%08x\n", purb->transfer_flags);
+   pr_info(PFX "transfer_buffer   :0x%08lx\n", (unsigned 
long)purb->transfer_buffer);
+   pr_info(PFX 

Re: Linux 2.6.11

2005-03-05 Thread J.A. Magallon

On 03.02, Linus Torvalds wrote:
> 
> Ok,
>  there it is. Only small stuff lately  - as promised. Shortlog from -rc5 
> appended, nothing exciting there, mostly some fixes from various code 
> checkers (like fixed init sections, and some coverity tool finds).
> 
> So it's now _officially_ all bug-free.
> 

Mmm, conflicts in NFS ?

nfsd/nfsctl.c reads:

static int __init init_nfsd(void)
{
...
if (proc_mkdir("fs/nfs", NULL)) {
struct proc_dir_entry *entry;
entry = create_proc_entry("fs/nfs/exports", 0, NULL);
if (entry)
entry->proc_fops =  _operations;
}
...

But nfs-utils 1.0.7 say that you can mount nfsd at /proc/fs/nfsd.
What 'exports' would kernel use ? Just duplicate info or a bug ?

TIA

--
J.A. Magallon  \   Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrakelinux release 10.2 (Cooker) for i586
Linux 2.6.11-jam1 (gcc 3.4.3 (Mandrakelinux 10.2 3.4.3-3mdk)) #1


-
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 13/13] sddr55: Clean up printk()'s in drivers/usb/storage/sddr55.c

2005-03-05 Thread James Nelson
Clean up printk()s and add KERN_ constants in drivers/usb/storage/sddr55.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/storage/sddr55.c 
linux-2.6.11-mm1/drivers/usb/storage/sddr55.c
--- linux-2.6.11-mm1-original/drivers/usb/storage/sddr55.c  2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/storage/sddr55.c   2005-03-05 
17:49:49.0 -0500
@@ -37,6 +37,7 @@
 #include "debug.h"
 #include "sddr55.h"
 
+#define PFX "sddr55: "
 
 #define short_pack(lsb,msb) ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) )
 #define LSB_of(s) ((s)&0xFF)
@@ -105,7 +106,7 @@ static int sddr55_status(struct us_data 
result = sddr55_bulk_transport(us,
DMA_TO_DEVICE, command, 8);
 
-   US_DEBUGP("Result for send_command in status %d\n",
+   US_DEBUGP(PFX "Result for send_command in status %d\n",
result);
 
if (result != USB_STOR_XFER_GOOD) {
@@ -196,7 +197,7 @@ static int sddr55_read_data(struct us_da
info->blocksize - page);
len = pages << info->pageshift;
 
-   US_DEBUGP("Read %02X pages, from PBA %04X"
+   US_DEBUGP(PFX "Read %02X pages, from PBA %04X"
" (LBA %04X) page %02X\n",
pages, pba, lba, page);
 
@@ -221,7 +222,7 @@ static int sddr55_read_data(struct us_da
result = sddr55_bulk_transport(us,
DMA_TO_DEVICE, command, 8);
 
-   US_DEBUGP("Result for send_command in read_data %d\n",
+   US_DEBUGP(PFX "Result for send_command in read_data 
%d\n",
result);
 
if (result != USB_STOR_XFER_GOOD) {
@@ -326,7 +327,7 @@ static int sddr55_write_data(struct us_d
usb_stor_access_xfer_buf(buffer, len, us->srb,
, , FROM_XFER_BUF);
 
-   US_DEBUGP("Write %02X pages, to PBA %04X"
+   US_DEBUGP(PFX "Write %02X pages, to PBA %04X"
" (LBA %04X) page %02X\n",
pages, pba, lba, page);

@@ -342,7 +343,7 @@ static int sddr55_write_data(struct us_d
/* set pba to first block in zone lba is in */
pba = (lba / 1000) * 1024;
 
-   US_DEBUGP("No PBA for LBA %04X\n",lba);
+   US_DEBUGP(PFX "No PBA for LBA %04X\n",lba);
 
if (max_pba > 1024)
max_pba = 1024;
@@ -365,14 +366,14 @@ static int sddr55_write_data(struct us_d
 
if (pba == -1) {
/* oh dear */
-   US_DEBUGP("Couldn't find unallocated block\n");
+   US_DEBUGP(PFX "Couldn't find unallocated 
block\n");
 
set_sense_info (3, 0x31, 0);/* medium error 
*/
result = USB_STOR_TRANSPORT_FAILED;
goto leave;
}
 
-   US_DEBUGP("Allocating PBA %04X for LBA %04X\n", pba, 
lba);
+   US_DEBUGP(PFX "Allocating PBA %04X for LBA %04X\n", 
pba, lba);
 
/* set writing to unallocated block flag */
command[4] = 0x40;
@@ -397,7 +398,7 @@ static int sddr55_write_data(struct us_d
DMA_TO_DEVICE, command, 8);
 
if (result != USB_STOR_XFER_GOOD) {
-   US_DEBUGP("Result for send_command in write_data %d\n",
+   US_DEBUGP(PFX "Result for send_command in write_data 
%d\n",
result);
 
/* set_sense_info is superfluous here? */
@@ -411,7 +412,7 @@ static int sddr55_write_data(struct us_d
DMA_TO_DEVICE, buffer, len);
 
if (result != USB_STOR_XFER_GOOD) {
-   US_DEBUGP("Result for send_data in write_data %d\n",
+   US_DEBUGP(PFX "Result for send_data in write_data %d\n",
  result);
 
/* set_sense_info is superfluous here? */
@@ -424,7 +425,7 @@ static int sddr55_write_data(struct us_d
result = sddr55_bulk_transport(us, DMA_FROM_DEVICE, status, 6);
 
if (result != USB_STOR_XFER_GOOD) {
-   US_DEBUGP("Result for get_status in write_data %d\n",
+   US_DEBUGP(PFX "Result for get_status in write_data 
%d\n",
  result);
 
/* set_sense_info is superfluous here? */
@@ -445,7 +446,7 @@ static int sddr55_write_data(struct us_d
goto leave;
}
 
-   US_DEBUGP("Updating maps for LBA 

Re: [PATCH] ppc64-implement-a-vdso-and-use-it-for-signal-trampoline gas workaround

2005-03-05 Thread Andrew Morton
Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote:
>
> On Sat, 2005-03-05 at 17:33 +, Linux Kernel Mailing List wrote:
>  > ChangeSet 1.2212, 2005/03/05 09:33:46-08:00, [EMAIL PROTECTED]
>  > 
>  >[PATCH] ppc64-implement-a-vdso-and-use-it-for-signal-trampoline gas 
> workaround
>  >
>  >I cannot find a version of binutils which doesn't either do
>  >
>  >arch/ppc64/kernel/vdso32/gettimeofday.S: Assembler messages:
>  >arch/ppc64/kernel/vdso32/gettimeofday.S:33: Error: syntax error; found 
> `@' but expected `,'
> 
>  Ugh... Do that still happen once you finally get it to build with a 32
>  bits compiler and not a 64 bits one ? The @local is actually needed for
>  the 32 bits build.

Yes, you're right.  We can revert 1.2212 please.
-
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 2/13] usbaudio: Clean up printk()'s in drivers/usb/class/audio.c

2005-03-05 Thread James Nelson
Fix a badly-implemented debugging printk macro, and clean up the other printk()s
in drivers/usb/class/audio.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/class/audio.c 
linux-2.6.11-mm1/drivers/usb/class/audio.c
--- linux-2.6.11-mm1-original/drivers/usb/class/audio.c 2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/class/audio.c  2005-03-05 14:47:44.0 
-0500
@@ -179,6 +179,10 @@
 
 /*/
 
+#ifdef CONFIG_USB_DEBUG
+#define DEBUG
+#endif /*CONFIG_USB_DEBUG*/
+
 #include 
 #include 
 #include 
@@ -206,11 +210,13 @@
 #define DRIVER_AUTHOR "Alan Cox <[EMAIL PROTECTED]>, Thomas Sailer ([EMAIL 
PROTECTED])"
 #define DRIVER_DESC "USB Audio Class driver"
 
+#define PFX "usbaudio: "
+
 #define AUDIO_DEBUG 1
 
 #define SND_DEV_DSP16   5
 
-#define dprintk(x)
+#define DPRINTK(fmt, args...) pr_debug (PFX "%s(): ", fmt, __FUNCTION__, 
##args)
 
 /* - */
 
@@ -490,10 +496,11 @@ static int dmabuf_init(struct dmabuf *db
}
db->bufsize = nr << PAGE_SHIFT;
db->ready = 1;
-   dprintk((KERN_DEBUG "usbaudio: dmabuf_init bytepersec %d bufs %d 
ossfragshift %d ossmaxfrags %d "
-"fragshift %d fragsize %d numfrag %d dmasize %d bufsize %d fmt 
0x%x srate %d\n",
-bytepersec, bufs, db->ossfragshift, db->ossmaxfrags, 
db->fragshift, db->fragsize,
-db->numfrag, db->dmasize, db->bufsize, db->format, db->srate));
+   DPRINTK("bytepersec %d bufs %d ossfragshift %d ossmaxfrags %d "
+   "fragshift %d fragsize %d numfrag %d dmasize %d bufsize %d "
+   "fmt 0x%x srate %d\n", bytepersec, bufs,db->ossfragshift,
+   db->ossmaxfrags, db->fragshift, db->fragsize, db->numfrag,
+   db->dmasize, db->bufsize, db->format, db->srate);
return 0;
 }
 
@@ -851,7 +858,7 @@ static int usbin_retire_desc(struct usbi
for (i = 0; i < DESCFRAMES; i++) {
cp = ((unsigned char *)urb->transfer_buffer) + 
urb->iso_frame_desc[i].offset;
if (urb->iso_frame_desc[i].status) {
-   dprintk((KERN_DEBUG "usbin_retire_desc: frame %u status 
%d\n", i, urb->iso_frame_desc[i].status));
+   DPRINTK("frame %u status %d\n", i, 
urb->iso_frame_desc[i].status);
continue;
}
scnt = urb->iso_frame_desc[i].actual_length >> ufmtsh;
@@ -869,11 +876,11 @@ static int usbin_retire_desc(struct usbi
u->dma.count += cnt;
if (u->format == u->dma.format) {
/* we do not need format conversion */
-   dprintk((KERN_DEBUG "usbaudio: no sample format 
conversion\n"));
+   DPRINTK("no sample format conversion\n");
dmabuf_copyin(>dma, cp, cnt);
} else {
/* we need sampling format conversion */
-   dprintk((KERN_DEBUG "usbaudio: sample format conversion 
%x != %x\n", u->format, u->dma.format));
+   DPRINTK("sample format conversion %x != %x\n", 
u->format, u->dma.format);
usbin_convert(u, cp, scnt);
}
}
@@ -893,7 +900,8 @@ static void usbin_completed(struct urb *
int suret = 0;
 
 #if 0
-   printk(KERN_DEBUG "usbin_completed: status %d errcnt %d flags 0x%x\n", 
urb->status, urb->error_count, u->flags);
+   printk(KERN_DEBUG PFX "%s(): status %d errcnt %d flags 0x%x\n",
+   __FUNCTION__, urb->status, urb->error_count, u->flags);
 #endif
if (urb == u->durb[0].urb)
mask = FLG_URB0RUNNING;
@@ -901,7 +909,7 @@ static void usbin_completed(struct urb *
mask = FLG_URB1RUNNING;
else {
mask = 0;
-   printk(KERN_ERR "usbin_completed: panic: unknown URB\n");
+   printk(KERN_ERR PFX "%s(): unknown URB\n", __FUNCTION__);
}
urb->dev = as->state->usbdev;
spin_lock_irqsave(>lock, flags);
@@ -913,7 +921,8 @@ static void usbin_completed(struct urb *
} else {
u->flags &= ~(mask | FLG_RUNNING);
wake_up(>dma.wait);
-   printk(KERN_DEBUG "usbin_completed: descriptor not restarted 
(usb_submit_urb: %d)\n", suret);
+   printk(KERN_DEBUG PFX "%s(): descriptor not restarted 
(usb_submit_urb: %d)\n",
+   __FUNCTION__, suret);
}
spin_unlock_irqrestore(>lock, flags);
 }
@@ -946,7 +955,7 @@ static int usbin_sync_retire_desc(struct

for (i = 0; i < SYNCFRAMES; i++)
if (urb->iso_frame_desc[0].status)
-   dprintk((KERN_DEBUG "usbin_sync_retire_desc: frame %u 
status %d\n", i, 

[PATCH 1/13] speedtch: Clean up printk()'s in drivers/usb/atm/speedtch.c

2005-03-05 Thread James Nelson
Add a KERN_WARNING constant to a printk() that is missing it, and add a driver
prefix to another two in drivers/usb/atm/speedtch.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/atm/speedtch.c 
linux-2.6.11-mm1/drivers/usb/atm/speedtch.c
--- linux-2.6.11-mm1-original/drivers/usb/atm/speedtch.c2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/atm/speedtch.c 2005-03-05 13:36:44.0 
-0500
@@ -192,8 +192,8 @@ static int speedtch_set_swbuff(struct sp
  0x32, 0x40, state ? 0x01 : 0x00,
  0x00, NULL, 0, 100);
if (ret < 0) {
-   printk("Warning: %sabling SW buffering: usb_control_msg 
returned %d\n",
-state ? "En" : "Dis", ret);
+   printk(KERN_WARNING "%s: %sabling SW buffering: usb_control_msg 
returned %d\n",
+speedtch_driver_name, state ? "En" : "Dis", ret);
return ret;
}
 
@@ -252,7 +252,8 @@ static int speedtch_start_synchro(struct
  0x12, 0xc0, 0x04, 0x00,
  buf, sizeof(buf), CTRL_TIMEOUT);
if (ret < 0) {
-   printk(KERN_WARNING "SpeedTouch: Failed to start ADSL 
synchronisation: %d\n", ret);
+   printk(KERN_WARNING "%s: Failed to start ADSL synchronisation: 
%d\n",
+   speedtch_driver_name, ret);
return ret;
}
 
@@ -374,8 +375,8 @@ static void speedtch_poll_status(struct 
 
ret = speedtch_get_status(instance, buf);
if (ret) {
-   printk(KERN_WARNING
-  "SpeedTouch: Error %d fetching device status\n", ret);
+   printk(KERN_WARNING "%s: Error %d fetching device status\n",
+   speedtch_driver_name, ret);
return;
}
 
-
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] inotify for 2.6.11

2005-03-05 Thread Christoph Hellwig
On Fri, Mar 04, 2005 at 01:37:24PM -0500, Robert Love wrote:
> Below is inotify, diffed against 2.6.11.
> 
> I greatly reworked much of the data structures and their interactions,
> to lay the groundwork for sanitizing the locking.  I then, I hope,
> sanitized the locking.  It looks right, I am happy.  Comments welcome.
> I surely could of missed something.  Maybe even something big.
> 
> But, regardless, this release is a huge jump from the previous, fixing
> all known issues and greatly improving the locking.
>

The user interface is still bogus.  Also now version of it has stayed in
-mm long enough because bad bugs pop up almost weekly.

-
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] FAT: Support synchronous updates

2005-03-05 Thread OGAWA Hirofumi
[It seems that my first e-mail was lost, so this is re-post. If you
received duplicated email, sorry.]

Hi,

These patches adds the `-o sync' and `-o dirsync' supports to fatfs.
If user specified that option, the fatfs does traditional ordered
updates by using synchronous writes.  If compared to before, these
patches will show a improvement of robustness I think.

`-o sync'- writes all buffers out before returning from syscall.
`-o dirsync' - writes the directory's metadata, and unreferencing
   operations of data block.

remaining to be done
 fat_generic_ioctl(), fat_notify_change(),
 ATTR_ARCH of fat_xxx_write[v],
 and probably, filling hole in cont_prepare_write(),

NOTE: Since fatfs doesn't have link-count, unfortunately ->rename() is
not safe order at all.  It may make the shared blocks, but user
shouldn't lose the data by ->rename().

Please apply.
-- 
OGAWA Hirofumi <[EMAIL PROTECTED]>
-
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/


[2.6.11 Permedia-2 Framebuffer] driver broken (?).

2005-03-05 Thread Guennadi Liakhovetski
Hi

Worked on 2.6.10-rc2. With 2.6.11 during boot upon switching to fb, text 
becomes orange, penguins look sick (not sharp). X starts and runs normal 
(doesn't use fb), switching to vt not possible any more. Disabling 
fb-console in kernel config fixes VTs. Reverting pm2fb.c fixes the 
problem.

No unusual output in dmesg.

System: Compaq AP400 with a TI card:

01:00.0 VGA compatible controller: Texas Instruments TVP4020 [Permedia 2] (rev 
11) (prog-if 00 [VGA])
Subsystem: Elsa AG GLoria Synergy
Flags: bus master, 66Mhz, medium devsel, latency 66, IRQ 22
Memory at 5100 (32-bit, non-prefetchable) [size=128K]
Memory at 5000 (32-bit, non-prefetchable) [size=8M]
Memory at 5080 (32-bit, non-prefetchable) [size=8M]
Expansion ROM at  [disabled] [size=64K]
Capabilities: [4c] Power Management version 1
Capabilities: [40] AGP version 1.0

CPUs: 2 * Pentium II 400MHz full cpuinfo available on request)

.config (fb / video):

CONFIG_FB=y
CONFIG_FB_MODE_HELPERS=y
# CONFIG_FB_TILEBLITTING is not set
# CONFIG_FB_CIRRUS is not set
CONFIG_FB_PM2=y
CONFIG_FB_PM2_FIFO_DISCONNECT=y
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_VESA is not set
CONFIG_VIDEO_SELECT=y
# CONFIG_FB_HGA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_I810 is not set
# CONFIG_FB_INTEL is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON_OLD is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_VIRTUAL is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y

#
# Logo configuration
#
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set

Thanks
Guennadi
---
Guennadi Liakhovetski

-
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] blockdev: fixes race between mount/umount

2005-03-05 Thread Christoph Hellwig
On Fri, Mar 04, 2005 at 03:04:45PM -0500, Jeffrey Mahoney wrote:
> This patch fixes a race between mount and umount in set_blocksize. The results
> can vary between buffer errors and infinite loops in __getblk_slow, and
> possibly others.
> 
> The patch makes set_blocksize run under the bdev_lock if it is the sole holder
> of the block device.
> 
> Changes:
> - Added missing sync_blockdev in kill_block_super, lost in the shuffle.

Please follow proper kernel codingstyle, thanks.

-
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: Undefined symbols in 2.6.11-rc5-mm1

2005-03-05 Thread Christoph Hellwig
On Sat, Mar 05, 2005 at 10:19:23AM -0500, Kai Germaschewski wrote:
> On Sat, 5 Mar 2005, Adrian Bunk wrote:
> 
> > And this can break as soon as the "unused" object files contains 
> > EXPORT_SYMBOL's.
> > 
> > Is it really worth it doing it in this non-intuitive way?
> 
> I don't think it non-intuitive, it's how libraries work. However, as you 
> say, it is broken for files containing EXPORT_SYMBOL.
> 
> The obvious fix for this case is the one that akpm mentioned way earlier 
> in this thread, move parser.o into $(obj-y).
> 
> It should be rather easy to have the kernel build system warn you when you 
> compile library objects exporting symbols.

Or rather get rid of librarz objects completely.  We manage to have explicit
depencies for 99% of our needs, do we really need a special cases that breaks
for most of it's current users?

-
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-05 Thread Christoph Hellwig
On Fri, Mar 04, 2005 at 08:41:34PM +0100, Jesper Juhl wrote:
> That's true. I guess my lack of trust in vendor kernels is part being 
> bitten by them in the past where my own custom build vanilla kernels have 
> worked fine, and part the fear of getting locked-in to some vendor 
> specific feature... Perhaps things are different these days and I should 
> reevaluate my view on vendor kernels - but that's why I haven't been 
> trusting them.

Traditionally the vendor kernels from the big two vendors have been full
of crap, for one of them it seems to be slowly changing now..

-
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 4/13] lh7a40x_udc: Clean up printk()'s in drivers/usb/gadget/lh7a40x_udc.c

2005-03-05 Thread James Nelson
Add KERN_ constants to drivers/usb/gadget/lh7a40x_udc.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/gadget/lh7a40x_udc.c 
linux-2.6.11-mm1/drivers/usb/gadget/lh7a40x_udc.c
--- linux-2.6.11-mm1-original/drivers/usb/gadget/lh7a40x_udc.c  2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/gadget/lh7a40x_udc.c   2005-03-05 
15:04:10.0 -0500
@@ -437,7 +437,7 @@ int usb_gadget_register_driver(struct us
device_add(>gadget.dev);
retval = driver->bind(>gadget);
if (retval) {
-   printk("%s: bind to driver %s --> error %d\n", dev->gadget.name,
+   printk(KERN_ERR "%s: bind to driver %s --> error %d\n", 
dev->gadget.name,
   driver->driver.name, retval);
device_del(>gadget.dev);
 
@@ -450,7 +450,7 @@ int usb_gadget_register_driver(struct us
 * for set_configuration as well as eventual disconnect.
 * NOTE:  this shouldn't power up until later.
 */
-   printk("%s: registered gadget driver '%s'\n", dev->gadget.name,
+   pr_info("%s: registered gadget driver '%s'\n", dev->gadget.name,
   driver->driver.name);
 
udc_enable(dev);
@@ -585,7 +585,7 @@ static int read_fifo(struct lh7a40x_ep *
 * discard the extra data.
 */
if (req->req.status != -EOVERFLOW)
-   printk("%s overflow %d\n", ep->ep.name, count);
+   printk(KERN_ERR "%s overflow %d\n", 
ep->ep.name, count);
req->req.status = -EOVERFLOW;
} else {
*buf++ = byte;
@@ -835,7 +835,7 @@ static void lh7a40x_out_epn(struct lh7a4
   queue);
 
if (!req) {
-   printk("%s: NULL REQ %d\n",
+   printk(KERN_WARNING "%s: NULL REQ %d\n",
   __FUNCTION__, ep_idx);
flush(ep);
break;
@@ -848,7 +848,7 @@ static void lh7a40x_out_epn(struct lh7a4
 
} else {
/* Throw packet away.. */
-   printk("%s: No descriptor?!?\n", __FUNCTION__);
+   printk(KERN_WARNING "%s: no descriptor\n", __FUNCTION__);
flush(ep);
}
 }
-
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 12/13] sddr09: Clean up printk()'s in drivers/usb/storage/sddr09.c

2005-03-05 Thread James Nelson
Clean up debug printk()s and macros in drivers/usb/storage/sddr09.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/storage/sddr09.c 
linux-2.6.11-mm1/drivers/usb/storage/sddr09.c
--- linux-2.6.11-mm1-original/drivers/usb/storage/sddr09.c  2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/storage/sddr09.c   2005-03-05 
17:42:15.0 -0500
@@ -41,6 +41,10 @@
  * EF: compute checksum (?)
  */
 
+#ifdef CONFIG_USB_DEBUG
+#define DEBUG
+#endif /*DEBUG*/
+
 #include 
 #include 
 #include 
@@ -54,13 +58,13 @@
 #include "debug.h"
 #include "sddr09.h"
 
+#define PFX "sddr09: "
+#define DPRINTK(fmt, args...) pr_debug(PFX "%s(): ", fmt, __FUNCTION__, ## 
args)
 
 #define short_pack(lsb,msb) ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) )
 #define LSB_of(s) ((s)&0xFF)
 #define MSB_of(s) ((s)>>8)
 
-/* #define US_DEBUGP printk */
-
 /*
  * First some stuff that does not belong here:
  * data on SmartMedia and other cards, completely
@@ -286,7 +290,7 @@ sddr09_test_unit_ready(struct us_data *u
 
result = sddr09_send_scsi_command(us, command, 6);
 
-   US_DEBUGP("sddr09_test_unit_ready returns %d\n", result);
+   DPRINTK("returns %d\n", result);
 
return result;
 }
@@ -309,17 +313,17 @@ sddr09_request_sense(struct us_data *us,
 
result = sddr09_send_scsi_command(us, command, 12);
if (result != USB_STOR_TRANSPORT_GOOD) {
-   US_DEBUGP("request sense failed\n");
+   DPRINTK("request sense failed\n");
return result;
}
 
result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
sensebuf, buflen, NULL);
if (result != USB_STOR_XFER_GOOD) {
-   US_DEBUGP("request sense bulk in failed\n");
+   DPRINTK("request sense bulk in failed\n");
return USB_STOR_TRANSPORT_ERROR;
} else {
-   US_DEBUGP("request sense worked\n");
+   DPRINTK("request sense worked\n");
return USB_STOR_TRANSPORT_GOOD;
}
 }
@@ -370,7 +374,7 @@ sddr09_readX(struct us_data *us, int x, 
result = sddr09_send_scsi_command(us, command, 12);
 
if (result != USB_STOR_TRANSPORT_GOOD) {
-   US_DEBUGP("Result for send_control in sddr09_read2%d %d\n",
+   DPRINTK("result for send_control in sddr09_read2%d %d\n",
  x, result);
return result;
}
@@ -379,7 +383,7 @@ sddr09_readX(struct us_data *us, int x, 
   buf, bulklen, use_sg, NULL);
 
if (result != USB_STOR_XFER_GOOD) {
-   US_DEBUGP("Result for bulk_transfer in sddr09_read2%d %d\n",
+   DPRINTK("result for bulk_transfer in sddr09_read2%d %d\n",
  x, result);
return USB_STOR_TRANSPORT_ERROR;
}
@@ -441,8 +445,7 @@ sddr09_read22(struct us_data *us, unsign
  int nr_of_pages, int pageshift, unsigned char *buf, int use_sg) {
 
int bulklen = (nr_of_pages << pageshift) + (nr_of_pages << 
CONTROL_SHIFT);
-   US_DEBUGP("sddr09_read22: reading %d pages, %d bytes\n",
- nr_of_pages, bulklen);
+   DPRINTK("reading %d pages, %d bytes\n", nr_of_pages, bulklen);
return sddr09_readX(us, 2, fromaddress, nr_of_pages, bulklen,
buf, use_sg);
 }
@@ -485,7 +488,7 @@ sddr09_erase(struct us_data *us, unsigne
unsigned char *command = us->iobuf;
int result;
 
-   US_DEBUGP("sddr09_erase: erase address %lu\n", Eaddress);
+   DPRINTK("erase address %lu\n", Eaddress);
 
memset(command, 0, 12);
command[0] = 0xEA;
@@ -498,7 +501,7 @@ sddr09_erase(struct us_data *us, unsigne
result = sddr09_send_scsi_command(us, command, 12);
 
if (result != USB_STOR_TRANSPORT_GOOD)
-   US_DEBUGP("Result for send_control in sddr09_erase %d\n",
+   DPRINTK("result for send_control in sddr09_erase %d\n",
  result);
 
return result;
@@ -556,7 +559,7 @@ sddr09_writeX(struct us_data *us,
result = sddr09_send_scsi_command(us, command, 12);
 
if (result != USB_STOR_TRANSPORT_GOOD) {
-   US_DEBUGP("Result for send_control in sddr09_writeX %d\n",
+   DPRINTK("result for send_control in sddr09_writeX %d\n",
  result);
return result;
}
@@ -565,7 +568,7 @@ sddr09_writeX(struct us_data *us,
   buf, bulklen, use_sg, NULL);
 
if (result != USB_STOR_XFER_GOOD) {
-   US_DEBUGP("Result for bulk_transfer in sddr09_writeX %d\n",
+   DPRINTK("result for bulk_transfer in sddr09_writeX %d\n",
  result);
return USB_STOR_TRANSPORT_ERROR;
}
@@ -634,7 +637,7 @@ 

[PATCH 9/13] vicam: Clean up printk()'s in drivers/usb/media/vicam.c

2005-03-05 Thread James Nelson
Fix confusing debugging macro and add KERN_ constants, nwelines, and driver 
prefixes
where needed in drivers/usb/media/vicam.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/media/vicam.c 
linux-2.6.11-mm1/drivers/usb/media/vicam.c
--- linux-2.6.11-mm1-original/drivers/usb/media/vicam.c 2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/media/vicam.c  2005-03-05 15:56:17.0 
-0500
@@ -34,6 +34,11 @@
  *camera controls and wrote the first generation driver.
  */
 
+#define PFX "vicam: "
+#ifdef CONFIG_USB_DEBUG
+#define DEBUG
+#endif /*CONFIG_USB_DEBUG*/
+
 #include 
 #include 
 #include 
@@ -44,14 +49,7 @@
 #include 
 #include "usbvideo.h"
 
-// #define VICAM_DEBUG
-
-#ifdef VICAM_DEBUG
-#define ADBG(lineno,fmt,args...) printk(fmt, jiffies, __FUNCTION__, lineno, 
##args)
-#define DBG(fmt,args...) ADBG((__LINE__),KERN_DEBUG __FILE__"(%ld):%s 
(%d):"fmt,##args)
-#else
-#define DBG(fmn,args...) do {} while(0)
-#endif
+#define DBG(fmt,args...) pr_debug(PFX "(%ld):%s (%d):" fmt, jiffies, 
__FUNCTION__, __LINE__, ##args )
 
 #define DRIVER_AUTHOR   "Joe Burks, [EMAIL PROTECTED]"
 #define DRIVER_DESC "ViCam WebCam Driver"
@@ -446,7 +444,7 @@ static int __send_control_msg(struct vic
status = min(status, 0);
 
if (status < 0) {
-   printk(KERN_INFO "Failed sending control message, error %d.\n",
+   printk(KERN_INFO PFX "failed sending control message, error 
%d\n",
   status);
}
 
@@ -691,7 +689,8 @@ vicam_ioctl(struct inode *inode, struct 
break;
}
 
-   DBG("VIDIOCMCAPTURE frame=%d, height=%d, width=%d, 
format=%d.\n",vm.frame,vm.width,vm.height,vm.format);
+   DBG("VIDIOCMCAPTURE frame=%d, height=%d, width=%d, 
format=%d\n",
+   vm.frame,vm.width,vm.height,vm.format);
 
if ( vm.frame >= VICAM_FRAMES || vm.format != 
VIDEO_PALETTE_RGB24 )
retval = -EINVAL;
@@ -761,8 +760,7 @@ vicam_open(struct inode *inode, struct f
DBG("open\n");
 
if (!cam) {
-   printk(KERN_ERR
-  "vicam video_device improperly initialized");
+   printk(KERN_ERR PFX "device improperly initialized\n");
}
 
/* the videodev_lock held above us protects us from
@@ -771,8 +769,8 @@ vicam_open(struct inode *inode, struct f
 */
 
if (cam->open_count > 0) {
-   printk(KERN_INFO
-  "vicam_open called on already opened camera");
+   printk(KERN_INFO PFX "%s(): called on already opened camera\n",
+   __FUNCTION__);
return -EBUSY;
}
 
@@ -969,8 +967,7 @@ read_frame(struct vicam_camera *cam, int
n = __send_control_msg(cam, 0x51, 0x80, 0, request, 16);
 
if (n < 0) {
-   printk(KERN_ERR
-  " Problem sending frame capture control message");
+   printk(KERN_ERR PFX "problem sending frame capture control 
message\n");
goto done;
}
 
@@ -980,7 +977,7 @@ read_frame(struct vicam_camera *cam, int
 512 * 242 + 128, _length, 1);
 
if (n < 0) {
-   printk(KERN_ERR "Problem during bulk read of frame data: %d\n",
+   printk(KERN_ERR PFX "problem during bulk read of frame data: 
%d\n",
   n);
}
 
@@ -993,7 +990,7 @@ vicam_read( struct file *file, char __us
 {
struct vicam_camera *cam = file->private_data;
 
-   DBG("read %d bytes.\n", (int) count);
+   DBG("read %d bytes\n", (int) count);
 
if (*ppos >= VICAM_MAX_FRAME_SIZE) {
*ppos = 0;
@@ -1035,7 +1032,7 @@ vicam_mmap(struct file *file, struct vm_
if (!cam)
return -ENODEV;
 
-   DBG("vicam_mmap: %ld\n", size);
+   DBG("size = %ld\n", size);
 
/* We let mmap allocate as much as it wants because Linux was adding 
2048 bytes
 * to the size the application requested for mmap and it was screwing 
apps up.
@@ -1153,8 +1150,7 @@ vicam_create_proc_root(void)
if (vicam_proc_root)
vicam_proc_root->owner = THIS_MODULE;
else
-   printk(KERN_ERR
-  "could not create /proc entry for vicam!");
+   printk(KERN_ERR PFX "could not create /proc entry for vicam\n");
 }
 
 static void
@@ -1170,11 +1166,10 @@ vicam_create_proc_entry(struct vicam_cam
char name[64];
struct proc_dir_entry *ent;
 
-   DBG(KERN_INFO "vicam: creating proc entry\n");
+   DBG("creating proc entry\n");
 
if (!vicam_proc_root || !cam) {
-   printk(KERN_INFO
-  "vicam: could not create proc entry, %s pointer is 
null.\n",

[PATCH 8/13] powermate: Clean up printk()'s in drivers/usb/input/powermate.c

2005-03-05 Thread James Nelson
Add newlines and KERN_ constants to printk()s neeeding them in
drivers/usb/input/powermate.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/input/powermate.c 
linux-2.6.11-mm1/drivers/usb/input/powermate.c
--- linux-2.6.11-mm1-original/drivers/usb/input/powermate.c 2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/input/powermate.c  2005-03-05 
15:46:40.0 -0500
@@ -170,7 +170,7 @@ static void powermate_sync_state(struct 
pm->configcr->wIndex = cpu_to_le16( pm->static_brightness );
pm->requires_update &= ~UPDATE_STATIC_BRIGHTNESS;
}else{
-   printk(KERN_ERR "powermate: unknown update required");
+   printk(KERN_ERR "powermate: unknown update required\n");
pm->requires_update = 0; /* fudge the bug */
return;
}
@@ -188,7 +188,7 @@ static void powermate_sync_state(struct 
pm->config->transfer_flags |= URB_NO_SETUP_DMA_MAP;
 
if (usb_submit_urb(pm->config, GFP_ATOMIC))
-   printk(KERN_ERR "powermate: usb_submit_urb(config) failed");
+   printk(KERN_ERR "powermate: usb_submit_urb(config) failed\n");
 }
 
 /* Called when our asynchronous control message completes. We may need to 
issue another immediately */
@@ -357,7 +357,7 @@ static int powermate_probe(struct usb_in
maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
 
if(maxp < POWERMATE_PAYLOAD_SIZE_MIN || maxp > 
POWERMATE_PAYLOAD_SIZE_MAX){
-   printk("powermate: Expected payload of %d--%d bytes, found %d 
bytes!\n",
+   printk(KERN_WARNING "powermate: Expected payload of %d--%d 
bytes, found %d bytes!\n",
POWERMATE_PAYLOAD_SIZE_MIN, POWERMATE_PAYLOAD_SIZE_MAX, 
maxp);
maxp = POWERMATE_PAYLOAD_SIZE_MAX;
}
-
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 7/13] hidcore: Clean up printk()'s in drivers/usb/input/hid-core.c

2005-03-05 Thread James Nelson
Add a KERN_ERR constant and a driver prefix to printk()s needing them in
drivers/usb/input/hid-core.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/input/hid-core.c 
linux-2.6.11-mm1/drivers/usb/input/hid-core.c
--- linux-2.6.11-mm1-original/drivers/usb/input/hid-core.c  2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/input/hid-core.c   2005-03-05 
15:45:44.0 -0500
@@ -1758,12 +1758,12 @@ static int hid_probe(struct usb_interfac
usb_set_intfdata(intf, hid);
 
if (!hid->claimed) {
-   printk ("HID device not claimed by input or hiddev\n");
+   printk (KERN_ERR "HID device not claimed by input or hiddev\n");
hid_disconnect(intf);
return -EIO;
}
 
-   printk(KERN_INFO);
+   printk(KERN_INFO "usbhid: ");
 
if (hid->claimed & HID_CLAIMED_INPUT)
printk("input");
-
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 3/13] usb: Clean up printk()'s in drivers/usb/gadget/ether.c

2005-03-05 Thread James Nelson
Clean up debugging printk() macros in drivers/usb/gadget/ether.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/gadget/ether.c 
linux-2.6.11-mm1/drivers/usb/gadget/ether.c
--- linux-2.6.11-mm1-original/drivers/usb/gadget/ether.c2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/gadget/ether.c 2005-03-05 14:57:41.0 
-0500
@@ -20,8 +20,8 @@
  */
 
 
-// #define DEBUG 1
-// #define VERBOSE
+#undef DEBUG
+#undef VERBOSE
 
 #include 
 #include 
@@ -296,20 +296,19 @@ module_param (qmult, uint, S_IRUGO|S_IWU
printk(level "%s: " fmt , (d)->net->name , ## args)
 
 #ifdef DEBUG
-#undef DEBUG
-#define DEBUG(dev,fmt,args...) \
-   xprintk(dev , KERN_DEBUG , fmt , ## args)
+#define DPRINTK(dev,fmt,args...) \
+   xprintk(dev , KERN_DEBUG , "%s(): ",fmt , __FUNCTION__, ## args)
 #else
-#define DEBUG(dev,fmt,args...) \
+#define DPRINTK(dev,fmt,args...) \
do { } while (0)
 #endif /* DEBUG */
 
 #ifdef VERBOSE
-#define VDEBUG DEBUG
+#define VDEBUG DPRINTK
 #else
 #define VDEBUG(dev,fmt,args...) \
do { } while (0)
-#endif /* DEBUG */
+#endif /* VERBOSE */
 
 #define ERROR(dev,fmt,args...) \
xprintk(dev , KERN_ERR , fmt , ## args)
@@ -1068,7 +1067,7 @@ set_ether_config (struct eth_dev *dev, i
 #endif
 
if (result == 0)
-   DEBUG (dev, "qlen %d\n", qlen (gadget));
+   DPRINTK (dev, "qlen %d\n", qlen (gadget));
 
/* caller is responsible for cleanup on error */
return result;
@@ -1081,7 +1080,7 @@ static void eth_reset_config (struct eth
if (dev->config == 0)
return;
 
-   DEBUG (dev, "%s\n", __FUNCTION__);
+   DPRINTK (dev, "start\n");
 
netif_stop_queue (dev->net);
netif_carrier_off (dev->net);
@@ -1220,11 +1219,11 @@ static void eth_status_complete (struct 
 
req->length = 16;
value = usb_ep_queue (ep, req, GFP_ATOMIC);
-   DEBUG (dev, "send SPEED_CHANGE --> %d\n", value);
+   DPRINTK (dev, "send SPEED_CHANGE --> %d\n", value);
if (value == 0)
return;
} else
-   DEBUG (dev, "event %02x --> %d\n",
+   DPRINTK (dev, "event %02x --> %d\n",
event->bNotificationType, value);
 
/* free when done */
@@ -1238,7 +1237,7 @@ static void issue_start_status (struct e
struct usb_cdc_notification *event;
int value;
  
-   DEBUG (dev, "%s, flush old status first\n", __FUNCTION__);
+   DPRINTK (dev, "flush old status first\n");
 
/* flush old status
 *
@@ -1253,13 +1252,13 @@ static void issue_start_status (struct e
/* FIXME make these allocations static like dev->req */
req = usb_ep_alloc_request (dev->status_ep, GFP_ATOMIC);
if (req == 0) {
-   DEBUG (dev, "status ENOMEM\n");
+   DPRINTK (dev, "status ENOMEM\n");
return;
}
req->buf = usb_ep_alloc_buffer (dev->status_ep, 16,
>req->dma, GFP_ATOMIC);
if (req->buf == 0) {
-   DEBUG (dev, "status buf ENOMEM\n");
+   DPRINTK (dev, "status buf ENOMEM\n");
 free_req:
usb_ep_free_request (dev->status_ep, req);
return;
@@ -1279,7 +1278,7 @@ free_req:
req->complete = eth_status_complete;
value = usb_ep_queue (dev->status_ep, req, GFP_ATOMIC);
if (value < 0) {
-   DEBUG (dev, "status buf queue --> %d\n", value);
+   DPRINTK (dev, "status buf queue --> %d\n", value);
usb_ep_free_buffer (dev->status_ep,
req->buf, dev->req->dma, 16);
goto free_req;
@@ -1293,7 +1292,7 @@ free_req:
 static void eth_setup_complete (struct usb_ep *ep, struct usb_request *req)
 {
if (req->status || req->actual != req->length)
-   DEBUG ((struct eth_dev *) ep->driver_data,
+   DPRINTK ((struct eth_dev *) ep->driver_data,
"setup complete --> %d, %d/%d\n",
req->status, req->actual, req->length);
 }
@@ -1303,7 +1302,7 @@ static void eth_setup_complete (struct u
 static void rndis_response_complete (struct usb_ep *ep, struct usb_request 
*req)
 {
if (req->status || req->actual != req->length)
-   DEBUG ((struct eth_dev *) ep->driver_data,
+   DPRINTK ((struct eth_dev *) ep->driver_data,
"rndis response complete --> %d, %d/%d\n",
req->status, req->actual, req->length);
 
@@ -1394,9 +1393,9 @@ eth_setup (struct usb_gadget *gadget, co
if (ctrl->bRequestType != 0)
break;
if (gadget->a_hnp_support)
-   DEBUG (dev, "HNP 

[PATCH 6/13] pxa27x-ohci: Clean up printk()'s in drivers/usb/host/ohci-pxa27x.c

2005-03-05 Thread James Nelson
Add KERN_ constants to printk()s missing them, and add driver prefixes in
drivers/usb/host/ohci-pxa27x.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/host/ohci-pxa27x.c 
linux-2.6.11-mm1/drivers/usb/host/ohci-pxa27x.c
--- linux-2.6.11-mm1-original/drivers/usb/host/ohci-pxa27x.c2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/host/ohci-pxa27x.c 2005-03-05 
15:30:00.0 -0500
@@ -24,6 +24,7 @@
 #include 
 #include 
 
+#define PFX "pxa27x-ohci: "
 
 #define PMM_NPS_MODE   1
 #define PMM_GLOBAL_MODE2
@@ -64,8 +65,8 @@ static int pxa27x_ohci_select_pmm( int m
UHCRHDB |= (0x7<<17);
break;
default:
-   printk( KERN_ERR
-   "Invalid mode %d, set to non-power switch mode.\n", 
+   printk( KERN_ERR PFX
+   "invalid mode %d, set to non-power switch mode\n", 
mode );
 
pxa27x_ohci_pmm_state = PMM_NPS_MODE;
@@ -172,7 +173,7 @@ int usb_hcd_pxa27x_probe (const struct h
struct usb_hcd *hcd;
 
if (dev->resource[1].flags != IORESOURCE_IRQ) {
-   pr_debug ("resource[1] is not IORESOURCE_IRQ");
+   pr_debug (PFX "resource[1] is not IORESOURCE_IRQ\n");
return -ENOMEM;
}
 
@@ -183,14 +184,14 @@ int usb_hcd_pxa27x_probe (const struct h
hcd->rsrc_len = dev->resource[0].end - dev->resource[0].start + 1;
 
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
-   pr_debug("request_mem_region failed");
+   pr_debug(PFX "request_mem_region failed\n");
retval = -EBUSY;
goto err1;
}
 
hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
if (!hcd->regs) {
-   pr_debug("ioremap failed");
+   pr_debug(PFX "ioremap failed\n");
retval = -ENOMEM;
goto err2;
}
@@ -202,13 +203,13 @@ int usb_hcd_pxa27x_probe (const struct h
 
/* If choosing PMM_PERPORT_MODE, we should set the port power before we 
use it. */
if (pxa27x_ohci_set_port_power(1) < 0)
-   printk(KERN_ERR "Setting port 1 power failed.\n");
+   printk(KERN_ERR PFX "setting port 1 power failed\n");
 
if (pxa27x_ohci_clear_port_power(2) < 0)
-   printk(KERN_ERR "Setting port 2 power failed.\n");
+   printk(KERN_ERR PFX "setting port 2 power failed\n");
 
if (pxa27x_ohci_clear_port_power(3) < 0)
-   printk(KERN_ERR "Setting port 3 power failed.\n");
+   printk(KERN_ERR PFX"etting port 3 power failed\n");
 
ohci_hcd_init(hcd_to_ohci(hcd));
 
@@ -319,7 +320,7 @@ static int ohci_hcd_pxa27x_drv_probe(str
struct platform_device *pdev = to_platform_device(dev);
int ret;
 
-   pr_debug ("In ohci_hcd_pxa27x_drv_probe");
+   pr_debug (PFX "%s(): start\n", __FUNCTION__);
 
if (usb_disabled())
return -ENODEV;
@@ -341,7 +342,7 @@ static int ohci_hcd_pxa27x_drv_suspend(s
 {
 // struct platform_device *pdev = to_platform_device(dev);
 // struct usb_hcd *hcd = dev_get_drvdata(dev);
-   printk("%s: not implemented yet\n", __FUNCTION__);
+   printk(KERN_ERR "%s: not implemented yet\n", __FUNCTION__);
 
return 0;
 }
@@ -350,7 +351,7 @@ static int ohci_hcd_pxa27x_drv_resume(st
 {
 // struct platform_device *pdev = to_platform_device(dev);
 // struct usb_hcd *hcd = dev_get_drvdata(dev);
-   printk("%s: not implemented yet\n", __FUNCTION__);
+   printk(KERN_ERR "%s: not implemented yet\n", __FUNCTION__);
 
return 0;
 }
@@ -368,7 +369,7 @@ static struct device_driver ohci_hcd_pxa
 static int __init ohci_hcd_pxa27x_init (void)
 {
pr_debug (DRIVER_INFO " (pxa27x)");
-   pr_debug ("block sizes: ed %d td %d\n",
+   pr_debug (PFX "block sizes: ed %d td %d\n",
sizeof (struct ed), sizeof (struct td));
 
return driver_register(_hcd_pxa27x_driver);
-
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 10/13] uss720: Clean up printk()'s in drivers/usb/misc/uss720.c

2005-03-05 Thread James Nelson
Add a KERN_ constant and fix two driver prefixes in the printk()s in
drivers/usb/misc/uss720.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/misc/uss720.c 
linux-2.6.11-mm1/drivers/usb/misc/uss720.c
--- linux-2.6.11-mm1-original/drivers/usb/misc/uss720.c 2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/misc/uss720.c  2005-03-05 15:58:13.0 
-0500
@@ -564,7 +564,7 @@ static int uss720_probe(struct usb_inter
if (!(priv = kmalloc(sizeof(struct parport_uss720_private), 
GFP_KERNEL)))
return -ENOMEM;
if (!(pp = parport_register_port(0, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, 
_uss720_ops))) {
-   printk(KERN_WARNING "usb-uss720: could not register parport\n");
+   printk(KERN_WARNING "uss720: could not register parport\n");
goto probe_abort;
}
 
@@ -578,7 +578,7 @@ static int uss720_probe(struct usb_inter
set_1284_register(pp, 2, 0x0c);
/* debugging */
get_1284_register(pp, 0, NULL);
-   printk("uss720: reg: %02x %02x %02x %02x %02x %02x %02x\n",
+   printk(KERN_DEBUG "uss720: reg: %02x %02x %02x %02x %02x %02x %02x\n",
   priv->reg[0], priv->reg[1], priv->reg[2], priv->reg[3], 
priv->reg[4], priv->reg[5], priv->reg[6]);
 
endpoint = >endpoint[2];
@@ -589,7 +589,7 @@ static int uss720_probe(struct usb_inter
  uss720_irq, endpoint->bInterval,
  pp, >irqhandle);
if (i) {
-   printk (KERN_WARNING "usb-uss720: usb_request_irq failed 
(0x%x)\n", i);
+   printk (KERN_WARNING "uss720: usb_request_irq failed (0x%x)\n", 
i);
goto probe_abort_port;
}
 #endif
-
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.6.11.1

2005-03-05 Thread Gene Heskett
On Saturday 05 March 2005 17:06, Lee Revell wrote:
>On Sat, 2005-03-05 at 16:49 -0500, Gene Heskett wrote:
>> What he said!  Perfectly good patches, which fix real problems
>> would appear to be sitting in testing/broken_out till bit rot or
>> ???.
>>
>> If you want a testers testimony, I'm running the
>> bk-ieee1394.patch, and all I can say at this point is that it Just
>> Works(TM).  I have NDI how it got a yesterdays Mar 4) date in the
>> directory listing there though, I've had it a bit longer than that
>> by 2-3 days as my copy shows a Mar 1 date.  I first got it via svn
>> fetch at linux-ieee1394.org or some such in January.
>>
>> Fixes for real problems that fix real problems should somehow get
>> a faster track into final.  The current firewire in the kernel as
>> of 2.6.11 is still badly borked.
>
>Driver updates are a hard problem.  Nothing annoys users more than
>unsupported hardware.  But if you aggressively add support for new
>devices you can break things that have worked for ages.
>
>A change that makes your hardware work may break someone else's. 
> There is no such thing as an obviously correct patch when you are
> flipping bits in the hardware.  You can never eliminate 100% of
> driver regressions, all you can do is minimize the impact by
> getting release candidates tested on the widest possible range of
> hardware.
>
>Lee

True up to a certain extent, Lee.  I did not own any firewire stuff 
except for a 6 year old firewire card I didn't have anything to plug 
into, a TI of some sort that supposedly needed the ti-linx driver,  
until I bought this camera.  That card quickly proved to be borked 
per comments made on the linux-firewire list, and got replaced with a 
$25 belkin card from wallyworld.  One buys whats available at your 
friendly local wallyworld as a first pass at fixing things.  That 
worked great when it felt like it, which wasn't often.  Now, with 
this patch, it Just Works(TM).

My point is that if it doesn't get into mainline, how are you going to 
know it it breaks something that formerly worked?  In my case, it 
certainly fixed something that didn't work, and didn't break anything 
that I know of *yet*.

I have quite a managerie of accessories hanging off of the various 
ports, mostly usb on this box, and I have a regular tour of them I 
make when I reboot to a newer kernel, so if something breaks sane, or 
printing, networking, x10, what have you, I usually know about it 
within 30 minutes of the reboot.

Frankly, I was surprised that this elcheapo belkin card worked so 
good!  Their bigger ups's, and this card seem to be the exception to 
the mainline and very prominent story of all their broken KVM 
switches.  A pleasant surprise in light of my reticence to even put 
fingerprints on many of the belkin boxes on the shelf at Staples et 
all.

However, that doesn't address the fact that the patch I grabbed, dated 
Mar 1, is apparently older than the one in testing/broken_out dated 
Mar 4.  Both are 265824 bytes long however, so I'm going to go with 
the theory that someone rebuilt the directory on kernel.org.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.34% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.
-
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 11/13] safe_serial: Clean up printk()'s in drivers/usb/serial/safe_serial.c

2005-03-05 Thread James Nelson
Fix missing KERN_ constants in buffer dump loops in 
drivers/usb/serial/safe_serial.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>

diff -Nurp -x dontdiff-osdl --exclude='*~' 
linux-2.6.11-mm1-original/drivers/usb/serial/safe_serial.c 
linux-2.6.11-mm1/drivers/usb/serial/safe_serial.c
--- linux-2.6.11-mm1-original/drivers/usb/serial/safe_serial.c  2005-03-05 
13:29:48.0 -0500
+++ linux-2.6.11-mm1/drivers/usb/serial/safe_serial.c   2005-03-05 
16:04:23.0 -0500
@@ -227,7 +227,10 @@ static void safe_read_bulk_callback (str
unsigned char *cp = port->read_urb->transfer_buffer;
for (i = 0; i < port->read_urb->actual_length; i++) {
if ((i % 32) == 0) {
-   printk ("\nru[%02x] ", i);
+   if (i == 0)
+   printk (KERN_DEBUG "start");
+   printk ("\n")
+   printk (KERN_DEBUG "ru[%02x] ", i);
}
printk ("%02x ", *cp++);
}
@@ -345,7 +348,10 @@ static int safe_write (struct usb_serial
unsigned char *cp = port->write_urb->transfer_buffer;
for (i = 0; i < port->write_urb->transfer_buffer_length; i++) {
if ((i % 32) == 0) {
-   printk ("\nsu[%02x] ", i);
+   if (i ==0)
+   printk (KERN_DEBUG "start");
+   printk ("\n");
+   printk (KERN_DEBUG "su[%02x] ", i);
}
printk ("%02x ", *cp++);
}
-
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/


2.6.11 breaks ALSA Intel AC97 audio

2005-03-05 Thread Lars
With Kernel 2.6.11 the Audio driver in my ThinkPad T42 stopped working.
The dsp device is detected and readable/writable, but there's no
audible sound.
Everything worked fine with 2.6.9 and 2.6.10.
Did anybody else see this?
/proc/pci:
--
  Bus  0, device  31, function  5:
Multimedia audio controller: Intel Corp. 82801DB/DBL/DBM 
(ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 1).
  IRQ 11.
  I/O at 0x1c00 [0x1cff].
  I/O at 0x18c0 [0x18ff].
  Non-prefetchable 32 bit memory at 0xcc00 [0xcdff].
  Non-prefetchable 32 bit memory at 0xc800 [0xc8ff].

Kernel sound config:

#
# Sound
#
CONFIG_SOUND=m
#
# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_RTCTIMER=m
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
#
# Generic devices
#
CONFIG_SND_MPU401_UART=m
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_VIRMIDI is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
CONFIG_SND_MPU401=m
#
# PCI devices
#
CONFIG_SND_AC97_CODEC=m
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_YMFPCI is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
CONFIG_SND_INTEL8X0=m
CONFIG_SND_INTEL8X0M=m
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VX222 is not set
Loaded Modules:
---
snd_intel8x0   28864  1
snd_ac97_codec 75256  1 snd_intel8x0
snd_pcm_oss50016  0
snd_mixer_oss  17856  1 snd_pcm_oss
snd_pcm82120  3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer  20740  1 snd_pcm
snd45156  8 
snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore   7008  1 snd
snd_page_alloc  7620  2 snd_intel8x0,snd_pcm

-
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 14/15] drivers/block/*: convert to pci_register_driver

2005-03-05 Thread Francois Romieu
[EMAIL PROTECTED] <[EMAIL PROTECTED]> :
[...]
> diff -puN drivers/block/umem.c~pci_register_driver-drivers_block 
> drivers/block/umem.c
> --- kj/drivers/block/umem.c~pci_register_driver-drivers_block 2005-03-05 
> 16:12:16.0 +0100
> +++ kj-domen/drivers/block/umem.c 2005-03-05 16:12:16.0 +0100
> @@ -1185,7 +1185,7 @@ int __init mm_init(void)
>  
>   printk(KERN_INFO DRIVER_VERSION " : " DRIVER_DESC "\n");
>  
> - retval = pci_module_init(_pci_driver);
> + retval = pci_register_driver(_pci_driver);
>   if (retval)
>   return -ENOMEM;

The return code is fine and does not need to be overwritten.
Imho it could be considered to be part of the patch.

--
Ueimor
-
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/


Scheduling while atomic on Powerbook G4

2005-03-05 Thread Theis M. Mønsted
-- 
Med venlig hilsen / Best regards
Theis M. Mønsted
[1.] One line summary of the problem:
scheduling while atomic: swapper/0x0002/0


[2.] Full description of the problem/report:
Early during boot the following call trace is printed : 
Call trace:
 [c02ca4f0] schedule+0x658/0x6d4
 [c0004640] syscall_exit_work+0x108/0x10c
 [c03c3864] proc_root_init+0x14c/0x158
 [ff847168] 0xff847168
 [c03ae5d4] start_kernel+0x140/0x16c
 [3a30] 0x3a30

There seems to be no ill effects on the system.
The system is a PowerBook G4

[3.] Keywords (i.e., modules, networking, kernel):
scheduling, atomic PowerBook, ppc


[4.] Kernel version (from /proc/version):
$ cat /proc/version
Linux version 2.6.11.1 ([EMAIL PROTECTED]) (gcc version 3.4.1 20040803 (Gentoo 
Linux 3.4.1-r3, ssp-3.4-2, pie-8.7.6.5)) #4 Sat Mar 5 21:00:07 UTC 2005


[5.] Output of Oops.. message (if applicable) with symbolic information
 resolved (see Documentation/oops-tracing.txt)
n/a


[6.] A small shell script or example program which triggers the
 problem (if possible)
n/a

[7.] Environment
[7.1.] Software (add the output of the ver_linux script here)
$ scripts/ver_linux
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.

Linux mac 2.6.11.1 #4 Sat Mar 5 21:00:07 UTC 2005 ppc 7447/7457, altivec 
supported PowerBook5,2 GNU/Linux

Gnu C  3.4.1
Gnu make   3.80
binutils   2.15.90.0.3
util-linux 2.12i
mount  2.12i
module-init-tools  3.0
e2fsprogs  1.35
reiserfsprogs  3.6.19
reiser4progs   line
Linux C Library2.3.4
Dynamic linker (ldd)   2.3.4
Procps 3.2.4
Net-tools  1.60
Kbd1.12
Sh-utils   5.2.1
udev   030
Modules Loaded i2c_dev snd_pcm_oss snd_mixer_oss snd_seq_oss 
snd_seq_midi_event snd_seq snd_seq_device snd_powermac snd_pcm snd_timer snd 
soundcore snd_page_alloc


[7.2.] Processor information (from /proc/cpuinfo):
$ cat /proc/cpuinfo
processor   : 0
cpu : 7447/7457, altivec supported
clock   : 765MHz
revision: 1.1 (pvr 8002 0101)
bogomips: 508.92
machine : PowerBook5,2
motherboard : PowerBook5,2 MacRISC3 Power Macintosh
detected as : 287 (PowerBook G4 15")
pmac flags  : 001b
L2 cache: 512K unified
memory  : 512MB
pmac-generation : NewWorld


[7.3.] Module information (from /proc/modules):
$ cat /proc/modules
i2c_dev 10048 0 - Live 0xe20c7000
snd_pcm_oss 60352 0 - Live 0xe2246000
snd_mixer_oss 19584 1 snd_pcm_oss, Live 0xe20ce000
snd_seq_oss 39540 0 - Live 0xe2229000
snd_seq_midi_event 7456 1 snd_seq_oss, Live 0xe20c4000
snd_seq 63480 4 snd_seq_oss,snd_seq_midi_event, Live 0xe2218000
snd_seq_device 8396 2 snd_seq_oss,snd_seq, Live 0xe20c
snd_powermac 43140 0 - Live 0xe220c000
snd_pcm 99332 2 snd_pcm_oss,snd_powermac, Live 0xe20dc000
snd_timer 25252 2 snd_seq,snd_pcm, Live 0xe20a8000
snd 56948 8 
snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_powermac,snd_pcm,snd_timer,
 Live 0xe20b1000
soundcore 8900 1 snd, Live 0xe209b000
snd_page_alloc 8356 1 snd_pcm, Live 0xe2097000


[7.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem)
$ cat /proc/ioports
-007f : /[EMAIL PROTECTED]
00802000-01001fff : /[EMAIL PROTECTED]
  00802400-008024ff : :00:10.0
00802400-008024ff : radeonfb
ff7fe000-dfff : /[EMAIL PROTECTED]

$ cat /proc/iomem
8000-afff : /[EMAIL PROTECTED]
  8000-8007 : 0001:10:17.0
8000-8007 : 0.8000:mac-io
  8050-807f : 0.0050:gpio
  80008000-800080ff : 0.0001:i2s
80008000-800080ff : i2s-a- Tx DMA
  80008100-800081ff : 0.0001:i2s
80008100-800081ff : i2s-a- Rx DMA
  80008200-800082ff : 0.0001:i2s
  80008300-800083ff : 0.0001:i2s
  80008800-800088ff : 0.0002:ata-3
80008800-800088ff : ide-pmac (dma)
  8001-80010fff : 0.0001:i2s
8001-80010fff : i2s-a
  80013000-80013000 : 0.00013000:ch-b
  80013010-80013010 : 0.00013000:ch-b
  80013020-80013020 : 0.00013020:ch-a
  80013030-80013030 : 0.00013020:ch-a
  80013040-80013040 : 0.00013000:ch-b
  80013050-80013050 : 0.00013020:ch-a
  80015000-80015fff : 0.00015000:timer
  80016000-80017fff : 0.00016000:via-pmu
80016000-80017fff : via-pmu
  80018000-80018fff : 0.00018000:i2c
  8002-80020fff : 0.0002:ata-3
8002-80020fff : ide-pmac (ports)
  8004-8007 : interrupt-controller
8004-8007 : 0.0004:interrup
  a000-a0ff : 0001:10:1b.2
a000-a0ff : ehci_hcd
  a0001000-a0001fff : 0001:10:1b.1
a0001000-a0001fff : ohci_hcd
  a0002000-a0002fff : 0001:10:1b.0
a0002000-a0002fff : ohci_hcd
  a0003000-a0003fff : 0001:10:1a.0
a0003000-a0003fff : 

[patch 03/15] block/swim3: replace direct assignment with set_current_state()

2005-03-05 Thread domen



Any comments would be appreciated. 

set_current_state() is used instead of direct assignment of
current->state.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Maximilian Attems <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/swim3.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -puN drivers/block/swim3.c~set_current_state-drivers_block_swim3 
drivers/block/swim3.c
--- kj/drivers/block/swim3.c~set_current_state-drivers_block_swim3  
2005-03-05 16:09:15.0 +0100
+++ kj-domen/drivers/block/swim3.c  2005-03-05 16:09:15.0 +0100
@@ -832,7 +832,7 @@ static int fd_eject(struct floppy_state 
break;
}
swim3_select(fs, RELAX);
-   current->state = TASK_INTERRUPTIBLE;
+   set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
if (swim3_readbit(fs, DISK_IN) == 0)
break;
@@ -900,7 +900,7 @@ static int floppy_open(struct inode *ino
break;
}
swim3_select(fs, RELAX);
-   current->state = TASK_INTERRUPTIBLE;
+   set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
}
if (err == 0 && (swim3_readbit(fs, SEEK_COMPLETE) == 0
@@ -984,7 +984,7 @@ static int floppy_revalidate(struct gend
if (signal_pending(current))
break;
swim3_select(fs, RELAX);
-   current->state = TASK_INTERRUPTIBLE;
+   set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
}
ret = swim3_readbit(fs, SEEK_COMPLETE) == 0
_
-
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 04/15] block/swim_iop: replace direct assignment with set_current_state()

2005-03-05 Thread domen



Any comments would be appreciated. 

set_current_state() is used instead of direct assignment of
current->state.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Maximilian Attems <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/swim_iop.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/block/swim_iop.c~set_current_state-drivers_block_swim_iop 
drivers/block/swim_iop.c
--- kj/drivers/block/swim_iop.c~set_current_state-drivers_block_swim_iop
2005-03-05 16:09:16.0 +0100
+++ kj-domen/drivers/block/swim_iop.c   2005-03-05 16:09:16.0 +0100
@@ -338,7 +338,7 @@ static int swimiop_eject(struct floppy_s
err = -EINTR;
break;
}
-   current->state = TASK_INTERRUPTIBLE;
+   set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
}
release_drive(fs);
_
-
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 14/15] drivers/block/*: convert to pci_register_driver

2005-03-05 Thread Jeff Garzik
On Sat, Mar 05, 2005 at 11:43:27PM +0100, [EMAIL PROTECTED] wrote:
> 
> convert from pci_module_init to pci_register_driver
> 
> Signed-off-by: Christophe Lucas <[EMAIL PROTECTED]>
> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
> ---
> 
> 
>  kj-domen/drivers/block/DAC960.c |2 +-
>  kj-domen/drivers/block/cciss.c  |2 +-
>  kj-domen/drivers/block/sx8.c|2 +-
>  kj-domen/drivers/block/umem.c   |2 +-


I ACK the sx8 portion.

Please CC me (the maintainer) on all sx8 patches.

Jeff



-
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 05/15] floppy: relocate devfs comment

2005-03-05 Thread domen

relocate devfs comment

Signed-off-by: James Nelson <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/floppy.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -puN drivers/block/floppy.c~comment-drivers_block_floppy.c 
drivers/block/floppy.c
--- kj/drivers/block/floppy.c~comment-drivers_block_floppy.c2005-03-05 
16:10:00.0 +0100
+++ kj-domen/drivers/block/floppy.c 2005-03-05 16:10:00.0 +0100
@@ -98,6 +98,10 @@
  */
 
 /*
+ * 1998/1/21 -- Richard Gooch <[EMAIL PROTECTED]> -- devfs support
+ */
+
+/*
  * 1998/05/07 -- Russell King -- More portability cleanups; moved definition of
  * interrupt and dma channel to asm/floppy.h. Cleaned up some formatting &
  * use of '0' for NULL.
@@ -158,10 +162,6 @@ static int print_unex = 1;
 #define FDPATCHES
 #include 
 
-/*
- * 1998/1/21 -- Richard Gooch <[EMAIL PROTECTED]> -- devfs support
- */
-
 #include 
 #include 
 
_
-
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 06/15] block/xd: replace schedule_timeout() with msleep()

2005-03-05 Thread domen



Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. The current code wishes to sleep for 1 jiffy, but I am not
sure if this is actually intended, as with the change to HZ=1000, the time
equivalent of 1 jiffy changed from 10ms to 1ms. I have assumed the former in
this case; however the patch can be easily changed to assume the latter.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/xd.c |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff -puN drivers/block/xd.c~msleep-drivers_block_xd2 drivers/block/xd.c
--- kj/drivers/block/xd.c~msleep-drivers_block_xd2  2005-03-05 
16:10:47.0 +0100
+++ kj-domen/drivers/block/xd.c 2005-03-05 16:10:47.0 +0100
@@ -47,6 +47,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -529,10 +530,8 @@ static inline u_char xd_waitport (u_shor
int success;
 
xdc_busy = 1;
-   while ((success = ((inb(port) & mask) != flags)) && 
time_before(jiffies, expiry)) {
-   set_current_state(TASK_UNINTERRUPTIBLE);
-   schedule_timeout(1);
-   }
+   while ((success = ((inb(port) & mask) != flags)) && 
time_before(jiffies, expiry))
+   msleep(10);
xdc_busy = 0;
return (success);
 }
_
-
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 1/4] delete unused file arch_arm26_boot_compressed_hw_bse.c

2005-03-05 Thread domen

Remove nowhere referenced file. (egrep "filename\." didn't find anything)

Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj/arch/arm26/boot/compressed/hw-bse.c |   74 -
 1 files changed, 74 deletions(-)

diff -L arch/arm26/boot/compressed/hw-bse.c -puN 
arch/arm26/boot/compressed/hw-bse.c~remove_file-arch_arm26_boot_compressed_hw_bse.c
 /dev/null
--- kj/arch/arm26/boot/compressed/hw-bse.c
+++ /dev/null   2005-03-02 11:34:59.0 +0100
@@ -1,74 +0,0 @@
-/*
- * Bright Star Engineering Inc.
- *
- * code for readng parameters from the
- * parameter blocks of the boot block
- * flash memory
- *
- */
-
-static int strcmp(const char *s1, const char *s2)
-{
-  while (*s1 != '\0' && *s1 == *s2)
-{
-  s1++;
-  s2++;
-}
-
-  return (*(unsigned char *) s1) - (*(unsigned char *) s2);
-}
-
-struct pblk_t {
-  char type;
-  unsigned short size;
-};
-
-static char *bse_getflashparam(char *name) {
-  unsigned int esize;
-  char *q,*r;
-  unsigned char *p,*e;
-  struct pblk_t *thepb = (struct pblk_t *) 0x4000;
-  struct pblk_t *altpb = (struct pblk_t *) 0x6000;  
-  if (thepb->type&1) {
-if (altpb->type&1) {
-  /* no valid param block */ 
-  return (char*)0;
-} else {
-  /* altpb is valid */
-  struct pblk_t *tmp;
-  tmp = thepb;
-  thepb = altpb;
-  altpb = tmp;
-}
-  }
-  p = (char*)thepb + sizeof(struct pblk_t);
-  e = p + thepb->size; 
-  while (p < e) {
-q = p;
-esize = *p;
-if (esize == 0xFF) break;
-if (esize == 0) break;
-if (esize > 127) {
-  esize = (esize&0x7F)<<8 | p[1];
-  q++;
-}
-q++;
-r=q;
-if (*r && ((name == 0) || (!strcmp(name,r {
-  while (*q++) ;
-  return q;
-}
-p+=esize;
-  }
-  return (char*)0;
-}
-
-void bse_setup(void) {
-  /* extract the linux cmdline from flash */
-  char *name=bse_getflashparam("linuxboot");
-  char *x = (char *)0xc100;
-  if (name) { 
-while (*name) *x++=*name++;
-  }
-  *x=0;
-}
_
-
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 2/4] acorn/fd1772: replace sleep_on() with wait_event()

2005-03-05 Thread domen



Use wait_event() instead of the deprecated sleep_on(). Since
wait_event() expects the condition upon which the loop should return, pass in
the negation of the current conditional.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/acorn/block/fd1772.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/acorn/block/fd1772.c~wait_event-drivers_acorn_block_fd1772 
drivers/acorn/block/fd1772.c
--- kj/drivers/acorn/block/fd1772.c~wait_event-drivers_acorn_block_fd1772   
2005-03-05 16:11:23.0 +0100
+++ kj-domen/drivers/acorn/block/fd1772.c   2005-03-05 16:11:23.0 
+0100
@@ -139,6 +139,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1283,8 +1284,7 @@ static void do_fd_request(request_queue_
if (fdc_busy) return;
save_flags(flags);
cli();
-   while (fdc_busy)
-   sleep_on(_wait);
+   wait_event(fdc_wait, !fdc_busy);
fdc_busy = 1;
ENABLE_IRQ();
restore_flags(flags);
_
-
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 08/15] block/ps2esdi: replace sleep_on() with wait_event()

2005-03-05 Thread domen



Use wait_event() instead of the deprecated sleep_on(). In all
replacements, wait_event() expects the condition to *stop* on, so the existing
conditional is negated and passed as the parameter. I am not sure if these
changes are appropriate, as the condition to pass to wait_event() to guarantee
the same behavior; I think this is the best choice, though.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/ps2esdi.c |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff -puN drivers/block/ps2esdi.c~wait_event-drivers_block_ps2esdi 
drivers/block/ps2esdi.c
--- kj/drivers/block/ps2esdi.c~wait_event-drivers_block_ps2esdi 2005-03-05 
16:11:24.0 +0100
+++ kj-domen/drivers/block/ps2esdi.c2005-03-05 16:11:24.0 +0100
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -461,8 +462,7 @@ static void __init ps2esdi_get_device_cf
cmd_blk[1] = 0;
no_int_yet = TRUE;
ps2esdi_out_cmd_blk(cmd_blk);
-   if (no_int_yet)
-   sleep_on(_int);
+   wait_event(ps2esdi_int, !no_int_yet);
 
if (ps2esdi_drives > 1) {
printk("%s: Drive 1\n", DEVICE_NAME);   /*BA */
@@ -470,8 +470,7 @@ static void __init ps2esdi_get_device_cf
cmd_blk[1] = 0;
no_int_yet = TRUE;
ps2esdi_out_cmd_blk(cmd_blk);
-   if (no_int_yet)
-   sleep_on(_int);
+   wait_event(ps2esdi_int, !no_int_yet);
}   /* if second physical drive is present */
return;
 }
_
-
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 07/15] block/swim3: replace schedule_timeout() with msleep_interruptible()

2005-03-05 Thread domen



Change the delay logic to use time_before() and
msleep_interruptible(). Rather than depend on the number of
iterations of the loop for timing accuracy, I rely on the current value of
jiffies relative to a static timeout (end_jiffies).

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/swim3.c |   30 +-
 1 files changed, 17 insertions(+), 13 deletions(-)

diff -puN drivers/block/swim3.c~msleep_interruptible-drivers_block_swim3 
drivers/block/swim3.c
--- kj/drivers/block/swim3.c~msleep_interruptible-drivers_block_swim3   
2005-03-05 16:11:00.0 +0100
+++ kj-domen/drivers/block/swim3.c  2005-03-05 16:11:00.0 +0100
@@ -820,20 +820,21 @@ static void release_drive(struct floppy_
 
 static int fd_eject(struct floppy_state *fs)
 {
-   int err, n;
+   int err;
+   unsigned long end_jiffies;
 
err = grab_drive(fs, ejecting, 1);
if (err)
return err;
swim3_action(fs, EJECT);
-   for (n = 20; n > 0; --n) {
+   end_jiffies = jiffies + 20;
+   while (time_before(jiffies, end_jiffies)) {
if (signal_pending(current)) {
err = -EINTR;
break;
}
swim3_select(fs, RELAX);
-   set_current_state(TASK_INTERRUPTIBLE);
-   schedule_timeout(1);
+   msleep_interruptible(10);
if (swim3_readbit(fs, DISK_IN) == 0)
break;
}
@@ -878,7 +879,8 @@ static int floppy_open(struct inode *ino
 {
struct floppy_state *fs = inode->i_bdev->bd_disk->private_data;
struct swim3 __iomem *sw = fs->swim3;
-   int n, err = 0;
+   int err = 0;
+   unsigned long end_jiffies, check_jiffies;
 
if (fs->ref_count == 0) {
if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD))
@@ -892,16 +894,17 @@ static int floppy_open(struct inode *ino
swim3_action(fs, MOTOR_ON);
fs->write_prot = -1;
fs->cur_cyl = -1;
-   for (n = 0; n < 2 * HZ; ++n) {
-   if (n >= HZ/30 && swim3_readbit(fs, SEEK_COMPLETE))
+   end_jiffies = jiffies + 2 * HZ;
+   check_jiffies = jiffies + HZ/30;
+   while (time_before(jiffies,end_jiffies)) {
+   if (time_after(jiffies,check_jiffies) && 
swim3_readbit(fs, SEEK_COMPLETE))
break;
if (signal_pending(current)) {
err = -EINTR;
break;
}
swim3_select(fs, RELAX);
-   set_current_state(TASK_INTERRUPTIBLE);
-   schedule_timeout(1);
+   msleep_interruptible(10);
}
if (err == 0 && (swim3_readbit(fs, SEEK_COMPLETE) == 0
 || swim3_readbit(fs, DISK_IN) == 0))
@@ -965,7 +968,8 @@ static int floppy_revalidate(struct gend
 {
struct floppy_state *fs = disk->private_data;
struct swim3 __iomem *sw;
-   int ret, n;
+   int ret;
+   unsigned long end_jiffies;
 
if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD))
return -ENXIO;
@@ -978,14 +982,14 @@ static int floppy_revalidate(struct gend
fs->write_prot = -1;
fs->cur_cyl = -1;
mdelay(1);
-   for (n = HZ; n > 0; --n) {
+   end_jiffies = jiffies + HZ;
+   while (time_before(jiffies,end_jiffies)) {
if (swim3_readbit(fs, SEEK_COMPLETE))
break;
if (signal_pending(current))
break;
swim3_select(fs, RELAX);
-   set_current_state(TASK_INTERRUPTIBLE);
-   schedule_timeout(1);
+   msleep_interruptible(10);
}
ret = swim3_readbit(fs, SEEK_COMPLETE) == 0
|| swim3_readbit(fs, DISK_IN) == 0;
_
-
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 09/15] 10/34: block/xd: remove sleep_on() usage

2005-03-05 Thread domen


Directly use wait-queues instead of the deprecated sleep_on().
This required adding a local waitqueue. Patch is compile-tested.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/xd.c |5 -
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -puN drivers/block/xd.c~sleep_on-drivers_block_xd drivers/block/xd.c
--- kj/drivers/block/xd.c~sleep_on-drivers_block_xd 2005-03-05 
16:11:45.0 +0100
+++ kj-domen/drivers/block/xd.c 2005-03-05 16:11:45.0 +0100
@@ -538,6 +538,7 @@ static inline u_char xd_waitport (u_shor
 
 static inline u_int xd_wait_for_IRQ (void)
 {
+   DEFINE_WAIT(wait);
unsigned long flags;
xd_watchdog_int.expires = jiffies + 8 * HZ;
add_timer(_watchdog_int);
@@ -546,7 +547,9 @@ static inline u_int xd_wait_for_IRQ (voi
enable_dma(xd_dma);
release_dma_lock(flags);

-   sleep_on(_wait_int);
+   prepare_to_wait(_wait_int, , TASK_UNINTERRUPTIBLE);
+   schedule();
+   finish_wait(_wait_int, );
del_timer(_watchdog_int);
xdc_busy = 0;

_
-
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: dm-crypt vs. cryptoloop reminder

2005-03-05 Thread Andries Brouwer
On Sat, Mar 05, 2005 at 10:35:24PM +0100, Alexander Nyberg wrote:

> 2.6.3-mm1 'dm-crypt vs. cryptoloop' discussion was some time ago, it is
> time to bring this up again:
> http://kerneltrap.org/node/2433

Are you a troll?

This is not something to be quoted by anybody serious.

Andrew referred to "well-known weaknesses" in cryptoloop,
and when I inquired it turned out that what he referred to
were properties of cryptoloop and dm-crypt alike, so that
his remarks that started that discussion were misguided.

Of course people may prefer dm-crypt or cryptoloop or loop-aes,
just like people prefer ide-cd or ide-scsi.

I have not yet seen a valid reason to deprecate one of these three
very soon.

Andries
-
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] ppc64-implement-a-vdso-and-use-it-for-signal-trampoline gas workaround

2005-03-05 Thread Benjamin Herrenschmidt
On Sat, 2005-03-05 at 17:33 +, Linux Kernel Mailing List wrote:
> ChangeSet 1.2212, 2005/03/05 09:33:46-08:00, [EMAIL PROTECTED]
> 
>   [PATCH] ppc64-implement-a-vdso-and-use-it-for-signal-trampoline gas 
> workaround
>   
>   I cannot find a version of binutils which doesn't either do
>   
>   arch/ppc64/kernel/vdso32/gettimeofday.S: Assembler messages:
>   arch/ppc64/kernel/vdso32/gettimeofday.S:33: Error: syntax error; found 
> `@' but expected `,'

Ugh... Do that still happen once you finally get it to build with a 32
bits compiler and not a 64 bits one ? The @local is actually needed for
the 32 bits build.

>   or
>   
>   arch/ppc64/kernel/vdso32/gettimeofday.S: Assembler messages:
>   arch/ppc64/kernel/vdso32/gettimeofday.S:33: Internal error, aborting at 
> ../../gas/config/tc-ppc.c line 2658 in md_assemble
>   
>   
>   Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
>   Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
> 
> 
> 
>  datapage.S |2 +-
>  gettimeofday.S |4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> 
> diff -Nru a/arch/ppc64/kernel/vdso32/datapage.S 
> b/arch/ppc64/kernel/vdso32/datapage.S
> --- a/arch/ppc64/kernel/vdso32/datapage.S 2005-03-05 10:30:16 -08:00
> +++ b/arch/ppc64/kernel/vdso32/datapage.S 2005-03-05 10:30:16 -08:00
> @@ -56,7 +56,7 @@
>.cfi_register lr,r12
>  
>   mr  r4,r3
> - bl  [EMAIL PROTECTED]
> + bl  __get_datapage
>   mtlrr12
>   addir3,r3,CFG_SYSCALL_MAP32
>   cmpli   cr0,r4,0
> diff -Nru a/arch/ppc64/kernel/vdso32/gettimeofday.S 
> b/arch/ppc64/kernel/vdso32/gettimeofday.S
> --- a/arch/ppc64/kernel/vdso32/gettimeofday.S 2005-03-05 10:30:16 -08:00
> +++ b/arch/ppc64/kernel/vdso32/gettimeofday.S 2005-03-05 10:30:16 -08:00
> @@ -30,9 +30,9 @@
>  
>   mr  r10,r3  /* r10 saves tv */
>   mr  r11,r4  /* r11 saves tz */
> - bl  [EMAIL PROTECTED]   /* get data page */
> + bl  __get_datapage  /* get data page */
>   mr  r9, r3  /* datapage ptr in r9 */
> - bl  [EMAIL PROTECTED]   /* get xsec from tb & kernel */
> + bl  __do_get_xsec   /* get xsec from tb & kernel */
>   bne-2f  /* out of line -> do syscall */
>  
>   /* seconds are xsec >> 20 */
> -
> To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Benjamin Herrenschmidt <[EMAIL PROTECTED]>

-
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 12/15] 9/34: block/swim_iop: replace interruptible_sleep_on() with wait_event_interruptible()

2005-03-05 Thread domen


Use wait_event_interruptible() instead of the deprecated
interruptible_sleep_on(). The change is pretty straight-forward, as the current
sleep is conditional.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/swim_iop.c |   13 ++---
 1 files changed, 6 insertions(+), 7 deletions(-)

diff -puN drivers/block/swim_iop.c~wait_event_int-drivers_block_swim_iop 
drivers/block/swim_iop.c
--- kj/drivers/block/swim_iop.c~wait_event_int-drivers_block_swim_iop   
2005-03-05 16:11:56.0 +0100
+++ kj-domen/drivers/block/swim_iop.c   2005-03-05 16:11:56.0 +0100
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -431,13 +432,11 @@ static int grab_drive(struct floppy_stat
local_irq_save(flags);
if (fs->state != idle) {
++fs->wanted;
-   while (fs->state != available) {
-   if (interruptible && signal_pending(current)) {
-   --fs->wanted;
-   local_irq_restore(flags);
-   return -EINTR;
-   }
-   interruptible_sleep_on(>wait);
+   wait_event_interruptible(fs->wait, (fs->state == available));
+   if (interruptible && signal_pending(current)) {
+   --fs->wanted;
+   local_irq_restore(flags);
+   return -EINTR;
}
--fs->wanted;
}
_
-
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 11/15] 8/34: block/swim3: replace interruptible_sleep_on() with wait_event_interruptible()

2005-03-05 Thread domen


Use wait_event_interruptible() instead of the deprecated
interruptible_sleep_on(). The change is pretty straight-forward, as the current
sleep is conditional.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/swim3.c |   13 ++---
 1 files changed, 6 insertions(+), 7 deletions(-)

diff -puN drivers/block/swim3.c~wait_event_int-drivers_block_swim3 
drivers/block/swim3.c
--- kj/drivers/block/swim3.c~wait_event_int-drivers_block_swim3 2005-03-05 
16:11:55.0 +0100
+++ kj-domen/drivers/block/swim3.c  2005-03-05 16:11:55.0 +0100
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -792,13 +793,11 @@ static int grab_drive(struct floppy_stat
cli();
if (fs->state != idle) {
++fs->wanted;
-   while (fs->state != available) {
-   if (interruptible && signal_pending(current)) {
-   --fs->wanted;
-   restore_flags(flags);
-   return -EINTR;
-   }
-   interruptible_sleep_on(>wait);
+   wait_event_interruptible(fs->wait, (fs->state == available));
+   if (interruptible && signal_pending(current)) {
+   --fs->wanted;
+   restore_flags(flags);
+   return -EINTR;
}
--fs->wanted;
}
_
-
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 10/15] 4/34: block/acsi_slm: replace interruptible_sleep_on() with wait_event_interruptible()

2005-03-05 Thread domen


Use wait_event_interruptible() instead of the deprecated
interruptible_sleep_on(). The sleep_on() call later in the same function is
replaced with inline wait-queue code which achieves the same. This required
adding a local wait-queue, though.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/acsi_slm.c |   16 +---
 1 files changed, 9 insertions(+), 7 deletions(-)

diff -puN drivers/block/acsi_slm.c~wait_event_int-drivers_block_acsi_slm 
drivers/block/acsi_slm.c
--- kj/drivers/block/acsi_slm.c~wait_event_int-drivers_block_acsi_slm   
2005-03-05 16:11:54.0 +0100
+++ kj-domen/drivers/block/acsi_slm.c   2005-03-05 16:11:54.0 +0100
@@ -67,6 +67,7 @@ not be guaranteed. There are several way
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -625,12 +626,10 @@ static ssize_t slm_write( struct file *f
int device = iminor(node);
int n, filled, w, h;
 
-   while( SLMState == PRINTING ||
-  (SLMState == FILLING && SLMBufOwner != device) ) {
-   interruptible_sleep_on( _wait );
-   if (signal_pending(current))
-   return( -ERESTARTSYS );
-   }
+   wait_event_interruptible(slm_wait, (SLMState != PRINTING &&
+   (SLMState != FILLING || SLMBufOwner == 
device)));
+   if (signal_pending(current))
+   return -ERESTARTSYS;
if (SLMState == IDLE) {
/* first data of page: get current page size  */
if (slm_get_pagesize( device, ,  ))
@@ -654,6 +653,7 @@ static ssize_t slm_write( struct file *f
filled += n;
 
if (filled == BufferSize) {
+   DEFINE_WAIT(wait);
/* Check the paper size again! The user may have switched it in 
the
 * time between starting the data and finishing them. Would end 
up in
 * a trashy page... */
@@ -672,7 +672,9 @@ static ssize_t slm_write( struct file *f
 #endif

start_print( device );
-   sleep_on( _wait );
+   prepare_to_wait(_wait, , TASK_UNINTERRUPTIBLE);
+   schedule();
+   finish_wait(_wait, );
if (SLMError && IS_REAL_ERROR(SLMError)) {
printk( KERN_ERR "slm%d: %s\n", device, 
slm_errstr(SLMError) );
n = -EIO;
_
-
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 13/15] : block/DAC960: remove sleep_on*() usage

2005-03-05 Thread domen

On Tue, Jan 25, 2005 at 02:11:07PM -0800, Nishanth Aravamudan wrote:
> Hi,
> 
> > 
> Description: Use wait_event_interruptible_timeout() instead of the deprecated
> interruptible_sleep_on_timeout(). The existing code is complicated in the
> conditional and so is the new code. Patch is compile-tested.

The following patch should be considered instead, as it removes completely
callers of sleep_on*().

Thanks,
Nish

Use wait_event_interruptible_timeout() instead of the deprecated
interruptible_sleep_on_timeout(). The existing code is complicated in the
conditional and so is the new code. Also replace sleep_on_timeout() with direct
wait-queue usage. Patch is compile-tested.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/DAC960.c |   22 --
 1 files changed, 12 insertions(+), 10 deletions(-)

diff -puN drivers/block/DAC960.c~wait_event_int_timeout-drivers_block_DAC960 
drivers/block/DAC960.c
--- kj/drivers/block/DAC960.c~wait_event_int_timeout-drivers_block_DAC960   
2005-03-05 16:11:57.0 +0100
+++ kj-domen/drivers/block/DAC960.c 2005-03-05 16:11:57.0 +0100
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include "DAC960.h"
@@ -6127,6 +6128,7 @@ static boolean DAC960_V2_TranslatePhysic
 static boolean DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller,
unsigned char *UserCommand)
 {
+  DEFINE_WAIT(wait);
   DAC960_Command_T *Command;
   DAC960_V2_CommandMailbox_T *CommandMailbox;
   unsigned long flags;
@@ -6317,7 +6319,9 @@ static boolean DAC960_V2_ExecuteUserComm
  while (Controller->V2.NewControllerInformation->PhysicalScanActive)
{
  DAC960_ExecuteCommand(Command);
- sleep_on_timeout(>CommandWaitQueue, HZ);
+ prepare_to_wait(>CommandWaitQueue, , 
TASK_UNINTERRUPTIBLE);
+ schedule_timeout(HZ);
+ finish_wait(>CommandWaitQueue, );
}
  DAC960_UserCritical("Discovery Completed\n", Controller);
}
@@ -6917,15 +6921,13 @@ static int DAC960_gam_ioctl(struct inode
   GetHealthStatus.HealthStatusBuffer,
   sizeof(DAC960_V2_HealthStatusBuffer_T)))
return -EFAULT;
-   while (Controller->V2.HealthStatusBuffer->StatusChangeCounter
-  == HealthStatusBuffer.StatusChangeCounter &&
-  Controller->V2.HealthStatusBuffer->NextEventSequenceNumber
-  == HealthStatusBuffer.NextEventSequenceNumber)
- {
-   interruptible_sleep_on_timeout(>HealthStatusWaitQueue,
-  DAC960_MonitoringTimerInterval);
-   if (signal_pending(current)) return -EINTR;
- }
+   wait_event_interruptible_timeout(Controller->HealthStatusWaitQueue,
+   (Controller->V2.HealthStatusBuffer->StatusChangeCounter
+!= HealthStatusBuffer.StatusChangeCounter ||
+
Controller->V2.HealthStatusBuffer->NextEventSequenceNumber
+!= HealthStatusBuffer.NextEventSequenceNumber),
+DAC960_MonitoringTimerInterval);
+   if (signal_pending(current)) return -EINTR;
if (copy_to_user(GetHealthStatus.HealthStatusBuffer,
 Controller->V2.HealthStatusBuffer,
 sizeof(DAC960_V2_HealthStatusBuffer_T)))
_
-
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 14/15] drivers/block/*: convert to pci_register_driver

2005-03-05 Thread domen

convert from pci_module_init to pci_register_driver

Signed-off-by: Christophe Lucas <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/DAC960.c |2 +-
 kj-domen/drivers/block/cciss.c  |2 +-
 kj-domen/drivers/block/sx8.c|2 +-
 kj-domen/drivers/block/umem.c   |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff -puN drivers/block/DAC960.c~pci_register_driver-drivers_block 
drivers/block/DAC960.c
--- kj/drivers/block/DAC960.c~pci_register_driver-drivers_block 2005-03-05 
16:12:15.0 +0100
+++ kj-domen/drivers/block/DAC960.c 2005-03-05 16:12:16.0 +0100
@@ -7067,7 +7067,7 @@ static int DAC960_init_module(void)
 {
int ret;
 
-   ret =  pci_module_init(_pci_driver);
+   ret =  pci_register_driver(_pci_driver);
 #ifdef DAC960_GAM_MINOR
if (!ret)
DAC960_gam_init();
diff -puN drivers/block/cciss.c~pci_register_driver-drivers_block 
drivers/block/cciss.c
--- kj/drivers/block/cciss.c~pci_register_driver-drivers_block  2005-03-05 
16:12:15.0 +0100
+++ kj-domen/drivers/block/cciss.c  2005-03-05 16:12:16.0 +0100
@@ -2880,7 +2880,7 @@ int __init cciss_init(void)
printk(KERN_INFO DRIVER_NAME "\n");
 
/* Register for our PCI devices */
-   return pci_module_init(_pci_driver);
+   return pci_register_driver(_pci_driver);
 }
 
 static int __init init_cciss_module(void)
diff -puN drivers/block/sx8.c~pci_register_driver-drivers_block 
drivers/block/sx8.c
--- kj/drivers/block/sx8.c~pci_register_driver-drivers_block2005-03-05 
16:12:15.0 +0100
+++ kj-domen/drivers/block/sx8.c2005-03-05 16:12:16.0 +0100
@@ -1750,7 +1750,7 @@ static void carm_remove_one (struct pci_
 
 static int __init carm_init(void)
 {
-   return pci_module_init(_driver);
+   return pci_register_driver(_driver);
 }
 
 static void __exit carm_exit(void)
diff -puN drivers/block/umem.c~pci_register_driver-drivers_block 
drivers/block/umem.c
--- kj/drivers/block/umem.c~pci_register_driver-drivers_block   2005-03-05 
16:12:16.0 +0100
+++ kj-domen/drivers/block/umem.c   2005-03-05 16:12:16.0 +0100
@@ -1185,7 +1185,7 @@ int __init mm_init(void)
 
printk(KERN_INFO DRIVER_VERSION " : " DRIVER_DESC "\n");
 
-   retval = pci_module_init(_pci_driver);
+   retval = pci_register_driver(_pci_driver);
if (retval)
return -ENOMEM;
 
_
-
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 15/15] remove unused LOCAL_END_REQUEST

2005-03-05 Thread domen


Remove last occurence of LOCAL_END_REQUEST.

[EMAIL PROTECTED]:~/kernel/c$ grep LOCAL_END_REQUEST -R .
./drivers/block/floppy.c:#define LOCAL_END_REQUEST

Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/floppy.c |1 -
 1 files changed, 1 deletion(-)

diff -puN drivers/block/floppy.c~unused_define-drivers_block_floppy 
drivers/block/floppy.c
--- kj/drivers/block/floppy.c~unused_define-drivers_block_floppy
2005-03-05 16:13:19.0 +0100
+++ kj-domen/drivers/block/floppy.c 2005-03-05 16:13:19.0 +0100
@@ -242,7 +242,6 @@ static int allowed_drive_mask = 0x33;
 
 static int irqdma_allocated;
 
-#define LOCAL_END_REQUEST
 #define DEVICE_NAME "floppy"
 
 #include 
_
-
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 3/4] acorn: clean up printk()'s in drivers/acorn/block/fd1772.c

2005-03-05 Thread domen

This patch puts KERN_ constants in printk()'s and makes the debugging printk()'s
more consistent in drivers/acorn/block/fd1772.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/acorn/block/fd1772.c |  138 --
 1 files changed, 68 insertions(+), 70 deletions(-)

diff -puN drivers/acorn/block/fd1772.c~printk-drivers_acorn_block_fd1772 
drivers/acorn/block/fd1772.c
--- kj/drivers/acorn/block/fd1772.c~printk-drivers_acorn_block_fd1772   
2005-03-05 16:11:43.0 +0100
+++ kj-domen/drivers/acorn/block/fd1772.c   2005-03-05 16:11:43.0 
+0100
@@ -124,6 +124,8 @@
  *Minor parameter, name layouts for 2.4.x differences
  */
 
+#undef DEBUG /* define to enable debugging statements */
+
 #include 
 #include 
 #include 
@@ -166,13 +168,6 @@
 /* Ditto worries for Arc - DAG */
 #define FD_MAX_UNITS 4
 #define TRACKBUFFER 0
-/*#define DEBUG*/
-
-#ifdef DEBUG
-#define DPRINT(a)  printk a
-#else
-#define DPRINT(a)
-#endif
 
 static struct request_queue *floppy_queue;
 
@@ -181,6 +176,9 @@ static struct request_queue *floppy_queu
 #define DEVICE_NAME "floppy"
 #define QUEUE (floppy_queue)
 #define CURRENT elv_next_request(floppy_queue)
+#define PFX DEVICE_NAME ": "
+
+#define DBG(fmt, args...) pr_debug(PFX "%s(): " fmt, __FUNCTION__ , ## args)
 
 /* Disk types: DD */
 static struct archy_disk_type {
@@ -241,9 +239,9 @@ extern volatile int fdc1772_fdc_int_done
 void FDC1772_WRITE(int reg, unsigned char val)
 {
if (reg == FDC1772REG_CMD) {
-   DPRINT(("FDC1772_WRITE new command 0x%x @ %d\n", val,jiffies));
+   DBG("new command 0x%x @ %d\n", val,jiffies);
if (fdc1772_fdc_int_done) {
-   DPRINT(("FDC1772_WRITE: Hmm fdc1772_fdc_int_done true - 
resetting\n"));
+   DBG("Hmm fdc1772_fdc_int_done true - resetting\n");
fdc1772_fdc_int_done = 0;
};
};
@@ -410,9 +408,7 @@ static void fd_select_side(int side)
 
 static void fd_select_drive(int drive)
 {
-#ifdef DEBUG
-   printk("fd_select_drive:%d\n", drive);
-#endif
+   DBG("%d\n", drive);
/* Hmm - nowhere do we seem to turn the motor on - I'm going to do it 
here! */
oldlatch_aupdate(LATCHA_MOTOR | LATCHA_INUSE, 0);
 
@@ -435,7 +431,7 @@ static void fd_deselect(void)
 {
unsigned long flags;
 
-   DPRINT(("fd_deselect\n"));
+   DBG("start\n");
 
oldlatch_aupdate(LATCHA_FDSELALL | LATCHA_MOTOR | LATCHA_INUSE, 0xf | 
LATCHA_MOTOR | LATCHA_INUSE);
 
@@ -475,7 +471,7 @@ static void fd_motor_off_timer(unsigned 
 * off on the Arc, since the motor control is actually on
 * Latch A
 */
-   DPRINT(("fdc1772: deselecting in fd_motor_off_timer\n"));
+   DBG("deselecting\n");
fd_deselect();
MotorOn = 0;
restore_flags(flags);
@@ -524,7 +520,7 @@ static void check_change(unsigned long d
/* The idea here is that if the write protect line has changed 
then
the disc must have changed */
if (stat != unit[drive].wpstat) {
-   DPRINT(("wpstat[%d] = %d\n", drive, stat));
+   DBG("wpstat[%d] = %d\n", drive, stat);
unit[drive].wpstat = stat;
set_bit(drive, _floppies);
}
@@ -580,12 +576,13 @@ static void floppy_irqconsequencehandler
if (handler) {
nop();
status = (unsigned char) fdc1772_comendstatus;
-   DPRINT(("FDC1772 irq, status = %02x handler = %08lx\n", 
(unsigned int) status, (unsigned long) handler));
+   DBG("status = %02x handler = %08lx\n", (unsigned int) status,
+   (unsigned long) handler);
handler(status);
} else {
-   DPRINT(("FDC1772 irq, no handler status=%02x\n", 
fdc1772_comendstatus));
+   DBG("no handler status=%02x\n", fdc1772_comendstatus);
}
-   DPRINT(("FDC1772 irq: end of floppy_irq\n"));
+   DBG("end\n");
 }
 
 
@@ -595,16 +592,16 @@ static void floppy_irqconsequencehandler
 
 static void fd_error(void)
 {
-   printk("FDC1772: fd_error\n");
+   DBG("start\n");
/*panic("fd1772: fd_error"); *//* DAG tmp */
if (!CURRENT)
return;
CURRENT->errors++;
if (CURRENT->errors >= MAX_ERRORS) {
-   printk("fd%d: too many errors.\n", SelectedDrive);
+   printk(KERN_ERR "fd%d: too many errors, giving up\n", 
SelectedDrive);
end_request(CURRENT, 0);
} else if (CURRENT->errors == RECALIBRATE_ERRORS) {
-   printk("fd%d: recalibrating\n", SelectedDrive);
+   printk(KERN_ERR "fd%d: error, recalibrating...\n", 
SelectedDrive);
if 

[patch 4/4] acorn: clean up printk()'s in drivers/acorn/block/mfmhd.c

2005-03-05 Thread domen

This patch puts KERN_ constants in printk()'s and makes the debugging printk()'s
more consistent in drivers/acorn/block/mfmhd.c

Signed-off-by: James Nelson <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/acorn/block/mfmhd.c |  151 +++
 1 files changed, 66 insertions(+), 85 deletions(-)

diff -puN drivers/acorn/block/mfmhd.c~printk-drivers_acorn_block_mfmhd 
drivers/acorn/block/mfmhd.c
--- kj/drivers/acorn/block/mfmhd.c~printk-drivers_acorn_block_mfmhd 
2005-03-05 16:11:44.0 +0100
+++ kj-domen/drivers/acorn/block/mfmhd.c2005-03-05 16:11:44.0 
+0100
@@ -98,6 +98,8 @@
  *  This would be a performance boost with dual drive systems.
  */
 
+#undef DEBUG /* define to enable debugging statements */
+
 #include 
 #include 
 #include 
@@ -126,6 +128,7 @@ static void (*do_mfm)(void) = NULL;
 static struct request_queue *mfm_queue;
 static DEFINE_SPINLOCK(mfm_lock);
 
+#define PFX "mfm: "
 #define MAJOR_NR   MFM_ACORN_MAJOR
 #define QUEUE (mfm_queue)
 #define CURRENT elv_next_request(mfm_queue)
@@ -153,12 +156,7 @@ struct hd_geometry {
  * Linux I/O address of onboard MFM controller or 0 to disable this
  */
 #define ONBOARD_MFM_ADDRESS ((0x002d >> 2) | 0x8000)
-/*
- * Uncomment this to enable debugging in the MFM driver...
- */
-#ifndef DEBUG
-/*#define DEBUG */
-#endif
+
 /*
  * End of configuration
  */
@@ -300,28 +298,8 @@ int number_mfm_drives = 1;
 #define STAT_POL   0x0200  /* Polling */
 
 /* 
--
 */
-#ifdef DEBUG
-static void console_printf(const char *fmt,...)
-{
-   static char buffer[2048];   /* Arbitary! */
-   extern void console_print(const char *);
-   unsigned long flags;
-   va_list ap;
-
-   local_irq_save(flags);
-
-   va_start(ap, fmt);
-   vsprintf(buffer, fmt, ap);
-   console_print(buffer);
-   va_end(fmt);
 
-   local_irq_restore(flags);
-}; /* console_printf */
-
-#define DBG(x...) console_printf(x)
-#else
-#define DBG(x...)
-#endif
+#define DBG(fmt, args...) pr_debug(PFX "%s(): " fmt, __FUNCTION__ , ## args)
 
 static void print_status(void)
 {
@@ -377,23 +355,23 @@ static void issue_command(int command, u
int status;
 #ifdef DEBUG
int i;
-   console_printf("issue_command: %02X: ", command);
+   DBG("%02X:", command);
for (i = 0; i < len; i++)
-   console_printf("%02X ", cmdb[i]);
-   console_printf("\n");
+   printk(" %02X", cmdb[i]);
+   printk("\n");
 #endif
 
do {
status = inw(MFM_STATUS);
} while (status & (STAT_BSY | STAT_POL));
-   DBG("issue_command: status after pol/bsy loop: %02X:\n ", status >> 8);
+   DBG("status after pol/bsy loop: %02X:\n", status >> 8);
 
if (status & (STAT_CPR | STAT_CED | STAT_SED | STAT_DER | STAT_ABN)) {
outw(CMD_RCAL, MFM_COMMAND);
while (inw(MFM_STATUS) & STAT_BSY);
}
status = inw(MFM_STATUS);
-   DBG("issue_command: status before parameter issue: %02X:\n ", status >> 
8);
+   DBG("status before parameter issue: %02X:\n", status >> 8);
 
while (len > 0) {
outw(cmdb[1] | (cmdb[0] << 8), MFM_DATAOUT);
@@ -401,11 +379,11 @@ static void issue_command(int command, u
cmdb += 2;
}
status = inw(MFM_STATUS);
-   DBG("issue_command: status before command issue: %02X:\n ", status >> 
8);
+   DBG("status before command issue: %02X:\n", status >> 8);
 
outw(command, MFM_COMMAND);
status = inw(MFM_STATUS);
-   DBG("issue_command: status immediately after command issue: %02X:\n ", 
status >> 8);
+   DBG("status immediately after command issue: %02X:\n", status >> 8);
 }
 
 static void wait_for_completion(void)
@@ -434,7 +412,7 @@ static void mfm_rw_intr(void)
 {
int old_status; /* Holds status on entry, we read to see if the 
command just finished */
 #ifdef DEBUG
-   console_printf("mfm_rw_intr...dataleft=%d\n", hdc63463_dataleft);
+   DBG("dataleft=%d ", hdc63463_dataleft);
print_status();
 #endif
 
@@ -443,7 +421,7 @@ static void mfm_rw_intr(void)
/* Something has gone wrong - let's try that again */
outw(CMD_RCAL, MFM_COMMAND);/* Clear interrupt condition */
if (cont) {
-   DBG("mfm_rw_intr: DER/ABN err\n");
+   DBG("DER/ABN err\n");
cont->error();
cont->redo();
};
@@ -457,7 +435,7 @@ static void mfm_rw_intr(void)
if (CURRENT->cmd == WRITE) {
extern void hdc63463_writedma(void);
if ((hdc63463_dataleft <= 0) && (!(mfm_status & STAT_CED))) {
-   printk("mfm_rw_intr: Apparent DMA write request when no 
more to DMA\n");

[patch 01/15] replace PRINTK with pr_debug in block/umem.c

2005-03-05 Thread domen






Removed unused dprintk, replaced PRINTK with pr_debug.
Compile tested.

Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
Signed-off-by: Maximilian Attems <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/block/umem.c |   11 ---
 1 files changed, 4 insertions(+), 7 deletions(-)

diff -puN drivers/block/umem.c~pr_debug-drivers_block_umem drivers/block/umem.c
--- kj/drivers/block/umem.c~pr_debug-drivers_block_umem 2005-03-05 
16:09:08.0 +0100
+++ kj-domen/drivers/block/umem.c   2005-03-05 16:09:08.0 +0100
@@ -34,6 +34,7 @@
  *  - set initialised bit then.
  */
 
+//#define DEBUG /* uncomment if you want debugging info (pr_debug) */
 #include 
 #include 
 #include 
@@ -58,10 +59,6 @@
 #include 
 #include 
 
-#define PRINTK(x...) do {} while (0)
-#define dprintk(x...) do {} while (0)
-/*#define dprintk(x...) printk(x) */
-
 #define MM_MAXCARDS 4
 #define MM_RAHEAD 2  /* two sectors */
 #define MM_BLKSIZE 1024  /* 1k blocks */
@@ -299,7 +296,7 @@ static void mm_start_io(struct cardinfo 
 
/* make the last descriptor end the chain */
page = >mm_pages[card->Active];
-   PRINTK("start_io: %d %d->%d\n", card->Active, page->headcnt, 
page->cnt-1);
+   pr_debug("start_io: %d %d->%d\n", card->Active, page->headcnt, 
page->cnt-1);
desc = >desc[page->cnt-1];
 
desc->control_bits |= cpu_to_le32(DMASCR_CHAIN_COMP_EN);
@@ -532,7 +529,7 @@ static void process_page(unsigned long d
activate(card);
} else {
/* haven't finished with this one yet */
-   PRINTK("do some more\n");
+   pr_debug("do some more\n");
mm_start_io(card);
}
  out_unlock:
@@ -555,7 +552,7 @@ static void process_page(unsigned long d
 static int mm_make_request(request_queue_t *q, struct bio *bio)
 {
struct cardinfo *card = q->queuedata;
-   PRINTK("mm_make_request %ld %d\n", bh->b_rsector, bh->b_size);
+   pr_debug("mm_make_request %ld %d\n", bh->b_rsector, bh->b_size);
 
bio->bi_phys_segments = bio->bi_idx; /* count of completed segments*/
spin_lock_irq(>lock);
_
-
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 3/4] delete unused file include_asm_arm_hardware_linkup_l1110.h

2005-03-05 Thread domen

Remove nowhere referenced file. (egrep "filename\." didn't find anything)

Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj/include/asm-arm/hardware/linkup-l1110.h |   48 -
 1 files changed, 48 deletions(-)

diff -L include/asm-arm/hardware/linkup-l1110.h -puN 
include/asm-arm/hardware/linkup-l1110.h~remove_file-include_asm_arm_hardware_linkup_l1110.h
 /dev/null
--- kj/include/asm-arm/hardware/linkup-l1110.h
+++ /dev/null   2005-03-02 11:34:59.0 +0100
@@ -1,48 +0,0 @@
-/*
-*
-* Definitions for H3600 Handheld Computer
-*
-* Copyright 2001 Compaq Computer Corporation.
-*
-* Use consistent with the GNU GPL is permitted,
-* provided that this copyright notice is
-* preserved in its entirety in all copies and derived works.
-*
-* COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
-* AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
-* FITNESS FOR ANY PARTICULAR PURPOSE.
-*
-* Author: Jamey Hicks.
-*
-*/
-
-/* LinkUp Systems PCCard/CompactFlash Interface for SA-1100 */
-
-/* PC Card Status Register */
-#define LINKUP_PRS_S1  (1 << 0) /* voltage control bits S1-S4 */
-#define LINKUP_PRS_S2  (1 << 1)
-#define LINKUP_PRS_S3  (1 << 2)
-#define LINKUP_PRS_S4  (1 << 3)
-#define LINKUP_PRS_BVD1(1 << 4)
-#define LINKUP_PRS_BVD2(1 << 5)
-#define LINKUP_PRS_VS1 (1 << 6)
-#define LINKUP_PRS_VS2 (1 << 7)
-#define LINKUP_PRS_RDY (1 << 8)
-#define LINKUP_PRS_CD1 (1 << 9)
-#define LINKUP_PRS_CD2 (1 << 10)
-
-/* PC Card Command Register */
-#define LINKUP_PRC_S1  (1 << 0)
-#define LINKUP_PRC_S2  (1 << 1)
-#define LINKUP_PRC_S3  (1 << 2)
-#define LINKUP_PRC_S4  (1 << 3)
-#define LINKUP_PRC_RESET (1 << 4)
-#define LINKUP_PRC_APOE(1 << 5) /* Auto Power Off Enable: clears S1-S4 
when either nCD goes high */
-#define LINKUP_PRC_CFE (1 << 6) /* CompactFlash mode Enable: addresses A[10:0] 
only, A[25:11] high */
-#define LINKUP_PRC_SOE (1 << 7) /* signal output driver enable */
-#define LINKUP_PRC_SSP (1 << 8) /* sock select polarity: 0 for socket 0, 1 for 
socket 1 */
-#define LINKUP_PRC_MBZ (1 << 15) /* must be zero */
-
-struct linkup_l1110 {
-   volatile short prc;
-};
_
-
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 4/4] arm/cpu-sa1110: replace schedule_timeout() with msleep()

2005-03-05 Thread domen



Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. Neither signals nor wait-queue events are important at this
point in the code, I believe.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/arch/arm/mach-sa1100/cpu-sa1110.c |3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN 
arch/arm/mach-sa1100/cpu-sa1110.c~msleep-arch_arm_mach-sa1100_cpu-sa1110 
arch/arm/mach-sa1100/cpu-sa1110.c
--- kj/arch/arm/mach-sa1100/cpu-sa1110.c~msleep-arch_arm_mach-sa1100_cpu-sa1110 
2005-03-05 16:10:43.0 +0100
+++ kj-domen/arch/arm/mach-sa1100/cpu-sa1110.c  2005-03-05 16:10:43.0 
+0100
@@ -271,8 +271,7 @@ static int sa1110_target(struct cpufreq_
 */
sdram_set_refresh(2);
if (!irqs_disabled()) {
-   set_current_state(TASK_UNINTERRUPTIBLE);
-   schedule_timeout(20 * HZ / 1000);
+   msleep(20);
} else {
mdelay(20);
}
_
-
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 2/4] delete unused file include_asm_arm_arch_epxa10db_pld_conf00.h

2005-03-05 Thread domen

Remove nowhere referenced file. (egrep "filename\." didn't find anything)

Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj/include/asm-arm/arch-epxa10db/pld_conf00.h |   73 --
 1 files changed, 73 deletions(-)

diff -L include/asm-arm/arch-epxa10db/pld_conf00.h -puN 
include/asm-arm/arch-epxa10db/pld_conf00.h~remove_file-include_asm_arm_arch_epxa10db_pld_conf00.h
 /dev/null
--- kj/include/asm-arm/arch-epxa10db/pld_conf00.h
+++ /dev/null   2005-03-02 11:34:59.0 +0100
@@ -1,73 +0,0 @@
-#ifndef __PLD_CONF00_H
-#define __PLD_CONF00_H
-
-/*
- * Register definitions for the PLD Configuration Logic
- */
-
-/*
- *  
- *  This file contains the register definitions for the Excalibur
- *  Interrupt controller INT_CTRL00.
- *
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
- 
-#define CONFIG_CONTROL(BASE_ADDR) (PLD_CONF00_TYPE (BASE_ADDR))  
-#define CONFIG_CONTROL_LK_MSK (0x1)
-#define CONFIG_CONTROL_LK_OFST (0)
-#define CONFIG_CONTROL_CO_MSK (0x2)
-#define CONFIG_CONTROL_CO_OFST (1)
-#define CONFIG_CONTROL_B_MSK  (0x4)
-#define CONFIG_CONTROL_B_OFST (2)
-#define CONFIG_CONTROL_PC_MSK (0x8)
-#define CONFIG_CONTROL_PC_OFST (3)
-#define CONFIG_CONTROL_E_MSK (0x10)
-#define CONFIG_CONTROL_E_OFST (4)
-#define CONFIG_CONTROL_ES_MSK (0xE0)
-#define CONFIG_CONTROL_ES_OFST (5)
-#define CONFIG_CONTROL_ES_0_MSK (0x20)
-#define CONFIG_CONTROL_ES_1_MSK (0x40)
-#define CONFIG_CONTROL_ES_2_MSK (0x80)
-
-#define CONFIG_CONTROL_CLOCK(BASE_ADDR) (PLD_CONF00_TYPE (BASE_ADDR  + 0x4 ))
-#define CONFIG_CONTROL_CLOCK_RATIO_MSK (0x)
-#define CONFIG_CONTROL_CLOCK_RATIO_OFST (0)
-
-#define CONFIG_CONTROL_DATA(BASE_ADDR) (PLD_CONF00_TYPE (BASE_ADDR  + 0x8 ))
-#define CONFIG_CONTROL_DATA_MSK (0x)
-#define CONFIG_CONTROL_DATA_OFST (0)
-
-#define CONFIG_UNLOCK(BASE_ADDR) (PLD_CONF00_TYPE (BASE_ADDR  + 0xC )) 
-#define CONFIG_UNLOCK_MSK (0x)
-#define CONFIG_UNLOCK_OFST (0)
-
-#define CONFIG_UNLOCK_MAGIC (0x554E4C4B)
-
-#endif /* __PLD_CONF00_H */
-
-
-
-
-
-
-
-
-
-
-
-
_
-
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 1/4] delete unused file include_asm_arm_arch_epxa10db_mode_ctrl00.h

2005-03-05 Thread domen

Remove nowhere referenced file. (egrep "filename\." didn't find anything)

Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj/include/asm-arm/arch-epxa10db/mode_ctrl00.h |   80 -
 1 files changed, 80 deletions(-)

diff -L include/asm-arm/arch-epxa10db/mode_ctrl00.h -puN 
include/asm-arm/arch-epxa10db/mode_ctrl00.h~remove_file-include_asm_arm_arch_epxa10db_mode_ctrl00.h
 /dev/null
--- kj/include/asm-arm/arch-epxa10db/mode_ctrl00.h
+++ /dev/null   2005-03-02 11:34:59.0 +0100
@@ -1,80 +0,0 @@
-#ifndef __MODE_CTRL00_H
-#define __MODE_CTRL00_H
-
-/*
- * Register definitions for the reset and mode control
- */
-
-/*
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-
-
-#define BOOT_CR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  ))
-#define BOOT_CR_BF_MSK (0x1)
-#define BOOT_CR_BF_OFST (0)
-#define BOOT_CR_HM_MSK (0x2)
-#define BOOT_CR_HM_OFST (1)
-#define BOOT_CR_RE_MSK (0x4)
-#define BOOT_CR_RE_OFST (2)
-
-#define RESET_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x4 ))
-#define RESET_SR_WR_MSK (0x1)
-#define RESET_SR_WR_OFST (0)
-#define RESET_SR_CR_MSK (0x2)
-#define RESET_SR_CR_OFST (1)
-#define RESET_SR_JT_MSK (0x4)
-#define RESET_SR_JT_OFST (2)
-#define RESET_SR_ER_MSK (0x8)
-#define RESET_SR_ER_OFST (3)
-
-#define ID_CODE(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x08 ))
-
-#define SRAM0_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x20 ))
-#define SRAM0_SR_SIZE_MSK (0xF000)
-#define SRAM0_SR_SIZE_OFST (12)
-
-#define SRAM1_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x24 ))
-#define SRAM1_SR_SIZE_MSK (0xF000)
-#define SRAM1_SR_SIZE_OFST (12)
-
-#define DPSRAM0_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x30 ))
-
-#define DPSRAM0_SR_MODE_MSK (0xF)
-#define DPSRAM0_SR_MODE_OFST (0)
-#define DPSRAM0_SR_GLBL_MSK (0x30)
-#define DPSRAM0_SR_SIZE_MSK (0xF000)
-#define DPSRAM0_SR_SIZE_OFST (12)
-
-#define DPSRAM0_LCR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x34 ))
-#define DPSRAM0_LCR_LCKADDR_MSK (0x1FFE0)
-#define DPSRAM0_LCR_LCKADDR_OFST (4)
-
-#define DPSRAM1_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x38 ))
-#define DPSRAM1_SR_MODE_MSK (0xF)
-#define DPSRAM1_SR_MODE_OFST (0)
-#define DPSRAM1_SR_GLBL_MSK (0x30)
-#define DPSRAM1_SR_GLBL_OFST (4)
-#define DPSRAM1_SR_SIZE_MSK (0xF000)
-#define DPSRAM1_SR_SIZE_OFST (12)
-
-#define DPSRAM1_LCR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x3C ))
-#define DPSRAM1_LCR_LCKADDR_MSK (0x1FFE0)
-#define DPSRAM1_LCR_LCKADDR_OFST (4)
-
-#endif /* __MODE_CTRL00_H */
_
-
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/


hard freeze on vanilla 2.6.11 with reiser3 on x86_64

2005-03-05 Thread Mark Nipper
After much effort, the best I can come up with so far
with CONFIG_MAGIC_SYSRQ=y and CONFIG_REISERFS_CHECK=y is:
---
ReiserFS: hdb6: warning: vs-8301: reiserfs_kmalloc: allocated memory 201464

I'll describe the rest below and I'm attaching multiple
informational files.  Let me know if I can try anything else to
help debug this.

The system is a newly installed (as of today) Debian
Sarge x86_64 system.  The kernel was compiled from vanilla source
post installation.

Without CONFIG_MAGIC_SYSRQ or CONFIG_REISERFS_CHECK
initially, the first sign of trouble was quite some time after I
had the base system installed.  I was running a rather large
dselect installation and I was at the point where packages were
being unpacked and configured, so disk access was medium to high.
At some point in this, the machine just froze solid.

I decided to add CONFIG_MAGIC_SYSRQ to try to debug,
recompiled and rebooted, then tried to finish off the
installation via dselect of the last dozen packages or so which
had been aborted due to the last hang.  The system hangs again
and I get nothing from SysRq.

I reboot again, check SysRq while the system is running
normally just to make sure the trusty IBM Model M is generating
good codes.  Alt+SysRq+[mpt] all show information.  All is well
with SysRq under normal conditions.  So I finally add
CONFIG_REISERFS_CHECK and reboot again.

This time when I run the dselect installation again to
finish off the last dozen packages or so, it seems to finish fine
but throws the error mentioned above.  That was it.

Of course, I don't trust the state of the system at this
point anyway as I see lots of unlinking messages from fsck during
previous startups, so I run 'debsums -ca' to check as many
package files as have known MD5 sums, and sure enough, a good
couple or dozen so packages have missing or corrupt files.  So I
go ahead and reinstall all of these, and at this point the system
seems happy, albeit with Reiser 3 debugging enabled still.

So I'll keep the system as is for the time being.  Let me
know if I can do anything to provide additional debugging
information.  It's worth mentioning that no proprietary or other
modules were loaded during any of this and everything else is
static in the kernel.

-- 
Mark Nippere-contacts:
4475 Carter Creek Parkway   [EMAIL PROTECTED]
Apartment 724   http://nipsy.bitgnome.net/
Bryan, Texas, 77802-4481   AIM/Yahoo: texasnipsy ICQ: 66971617
(979)575-3193  MSN: [EMAIL PROTECTED]

-BEGIN GEEK CODE BLOCK-
Version: 3.1
GG/IT d- s++:+ a- C++$ UBL$ P--->+++ L+++$ !E---
W++(--) N+ o K++ w(---) O++ M V(--) PS+++(+) PE(--)
Y+ PGP t+ 5 X R tv b+++@ DI+(++) D+ G e h r++ y+(**)
--END GEEK CODE BLOCK--

---begin random quote of the moment---
"Puritanism: The haunting fear that someone, somewhere, may be
happy."
 -- H. L. Mencken, _A Book of Burlesques_, "Sententiae", 1920
end random quote of the moment
Bootdata ok (command line is root=/dev/hdb1 ro )
Linux version 2.6.11 ([EMAIL PROTECTED]) (gcc version 3.3.5 (Debian 1:3.3.5-8)) 
#1 Sat Mar 5 15:40:47 CST 2005
BIOS-provided physical RAM map:
 BIOS-e820:  - 0009fc00 (usable)
 BIOS-e820: 0009fc00 - 000a (reserved)
 BIOS-e820: 000f - 0010 (reserved)
 BIOS-e820: 0010 - 3fff (usable)
 BIOS-e820: 3fff - 3fff3000 (ACPI NVS)
 BIOS-e820: 3fff3000 - 4000 (ACPI data)
 BIOS-e820: fec0 - fec01000 (reserved)
 BIOS-e820: fee0 - fee01000 (reserved)
 BIOS-e820:  - 0001 (reserved)
ACPI: RSDP (v000 Nvidia) @ 0x000f6720
ACPI: RSDT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x01010101) @ 
0x3fff3000
ACPI: FADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x01010101) @ 
0x3fff3040
ACPI: MADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x01010101) @ 
0x3fff7cc0
ACPI: DSDT (v001 NVIDIA AWRDACPI 0x1000 MSFT 0x010c) @ 
0x
On node 0 totalpages: 262128
  DMA zone: 4096 pages, LIFO batch:1
  Normal zone: 258032 pages, LIFO batch:16
  HighMem zone: 0 pages, LIFO batch:1
Nvidia board detected. Ignoring ACPI timer override.
ACPI: Local APIC address 0xfee0
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 15:12 APIC version 16
ACPI: LAPIC_NMI (acpi_id[0x00] dfl dfl lint[0x1])
ACPI: IOAPIC (id[0x02] address[0xfec0] gsi_base[0])
IOAPIC[0]: apic_id 2, version 17, address 0xfec0, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: BIOS IRQ0 pin2 override ignored.
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ9 used by override.
Setting APIC routing to flat
Using ACPI (MADT) for SMP 

Re: RivaFB and GeForce FX

2005-03-05 Thread Alan Jenkins
> I've tried adding the format and vpllB but I can't see any difference.

...

> I'll get 2.6.6 (the version your patch applies to) and try with and
> without your full patch.  Hopefully I'll be able to see the difference.
> Otherwise I might have to ask you to try the trivial and full patches
> I'm using for 2.6.11.

I see gross screen corruption without the full patch on 2.6.6, but this
is gone in 2.6.11. 

I suspect I am preempting someone elses work, but they haven't (yet)
come forward, and as I said I haven't been able to get in touch with the
drivers maintainer.  I'll ask the framebuffer layer maintainer about it.
I've not CC'd him in this email because my habit of stripping quotes has
left it without context.

-
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.11-mm1 (x86-abstract-discontigmem-setup.patch)

2005-03-05 Thread Alexey Dobriyan
On Saturday 05 March 2005 20:58, Dave Hansen wrote:
> On Sat, 2005-03-05 at 15:35 +0200, Alexey Dobriyan wrote:
> > > + }
> > > + printk(KERN_DEBUG "\n");
> >^^
> > > +}
> > 
> > Too much KERN_DEBUG.
> 
> On my system, that ends up printing out 4 or 5 lines of output per node,
> but it's quite invaluable if you're debugging early memory setup issues.
> It is KERN_DEBUG after all.  What does it do on your system?
> 
> I'm not horribly opposed to removing some of this output, let's just
> make sure...

You misundestood. I'm not proposing to remove these printk's altogether. I'm
for removing KERN_DEBUG solely in the middle of the line.

Try the following program with and without 3-rd and 4-th KERN_DEBUG.

Alexey

#include 

#define KERN_DEBUG "<7>"

int main(void)
{
int i;

printf(KERN_DEBUG "  Setting physnode_map array to node:\n");
printf(KERN_DEBUG "  ");
for (i = 0; i < 10; i++)
printf(KERN_DEBUG "%d ", i);
printf(KERN_DEBUG "\n");

return 0;
}
-
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.6.11.1

2005-03-05 Thread Lee Revell
On Sat, 2005-03-05 at 16:49 -0500, Gene Heskett wrote:
> What he said!  Perfectly good patches, which fix real problems would 
> appear to be sitting in testing/broken_out till bit rot or ???.
> 
> If you want a testers testimony, I'm running the bk-ieee1394.patch, 
> and all I can say at this point is that it Just Works(TM).  I have 
> NDI how it got a yesterdays Mar 4) date in the directory listing 
> there though, I've had it a bit longer than that by 2-3 days as my 
> copy shows a Mar 1 date.  I first got it via svn fetch at 
> linux-ieee1394.org or some such in January.
> 
> Fixes for real problems that fix real problems should somehow get a 
> faster track into final.  The current firewire in the kernel as of 
> 2.6.11 is still badly borked.

Driver updates are a hard problem.  Nothing annoys users more than
unsupported hardware.  But if you aggressively add support for new
devices you can break things that have worked for ages.

A change that makes your hardware work may break someone else's.  There
is no such thing as an obviously correct patch when you are flipping
bits in the hardware.  You can never eliminate 100% of driver
regressions, all you can do is minimize the impact by getting release
candidates tested on the widest possible range of hardware.

Lee

-
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: s4bios: does anyone use it?

2005-03-05 Thread Stefan Seyfried
Brice Goglin wrote:

>  From what I remember, I didn't see any difference between S4 and S4Bios in
> recent vanilla kernels.

I have seen exactly the same thing and concluded that S4bios is broken.
Since it is tricky to set up (you usually need a special hibernation
partition or a special file in a FAT partition) and probably slow as
hell (at least if it has anything to do with the APM BIOS suspend to
disk routines, and i assume it does), i'd shed no tears if it would go
away ;-)
-- 
Stefan Seyfried, QA / R Team Mobile Devices, SUSE LINUX Nürnberg.

"Any ideas, John?"
"Well, surrounding them's out."
-
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/


swsusp memory freeing [was Re: swsusp: allow resume from initramfs]

2005-03-05 Thread Pavel Machek
Hi!

> > > By the way, did you see the effect of the memory eating patch? I didn't
> > > think about it until someone emailed me, but the improvement was 50x
> > > speed in the best case!
> > 
> > Well, more interesting was that you actually freed much more memory
> > with your patch. *You actually made memory freeing to work*. So yes, I
> > like that one.
> 
> You might be misreading me. When you set the image size limit setting in
> Suspend2, it's a soft limit. The image size wouldn't actually get down
> to 2 meg; Suspend would just aim for that and eat memory until it saw it
> wasn't getting anywhere.

Well, numbers looked like with same 2MB soft limit, "new" version
actually freed more memory. Perhaps that's not the case...
Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
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] Re: diff command line?

2005-03-05 Thread Gene Heskett
On Saturday 05 March 2005 16:08, Willy Tarreau wrote:
>On Sat, Mar 05, 2005 at 09:47:44PM +0100, Bodo Eggert wrote:
>> Russell King <[EMAIL PROTECTED]> wrote:
>> > On Sat, Mar 05, 2005 at 10:48:00AM -0500, Gene Heskett wrote:
>> >> What are the options normally used to generate a diff for
>> >> public consumption on this list?
>> >
>> > diff -urpN orig new
>> >
>> > where "orig" and "new" both contain the top level "linux"
>> > directory, so the resulting patch can be applied with patch -p1.
>>
>> This seems to be a common mistake.
>
>I often use a simple trick to make my single file patches compatible
>with both -p0 and -p1 :
>
>diff -pruN ./dir/file.orig ./dir/file.new
>
>The './' can either get stripped by -p1 or left as is, thus the
> patch works for different scripts or people. The main disadvantage
> is that there's no base version indication in the patch with this
> method.
>
>Regards,
>Willy

Neat, Willy.  Are such patches generally acceptable here?

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.34% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.
-
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.6.11.1

2005-03-05 Thread Gene Heskett
On Saturday 05 March 2005 16:17, Linus Torvalds wrote:
>On Sat, 5 Mar 2005, Russell King wrote:
>> On Sat, Mar 05, 2005 at 09:40:59AM -0800, Linus Torvalds wrote:
>> > I love BK, but what BK does well is merging and maintaining
>> > trees full of good stuff. What BK sucks at is experimental stuff
>> > where you don't know whether something should be eventually used
>> > or not.
>>
>> Wait a minute - why would stuff going into 2.6.x.y be
>> "experimental" stuff?  Wasn't stability the whole point of this
>> tree?
>
>The point being that _before_ a patch gets accepted, it's in that
> "limbo" state, waiting for people to veto it or say "yes".
>
>That limbo state is not well done with BK.
>
>  Linus

What he said!  Perfectly good patches, which fix real problems would 
appear to be sitting in testing/broken_out till bit rot or ???.

If you want a testers testimony, I'm running the bk-ieee1394.patch, 
and all I can say at this point is that it Just Works(TM).  I have 
NDI how it got a yesterdays Mar 4) date in the directory listing 
there though, I've had it a bit longer than that by 2-3 days as my 
copy shows a Mar 1 date.  I first got it via svn fetch at 
linux-ieee1394.org or some such in January.

Fixes for real problems that fix real problems should somehow get a 
faster track into final.  The current firewire in the kernel as of 
2.6.11 is still badly borked.

If that diff in the dates means I should update and retest, please 
advise.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.34% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.
-
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: s4bios: does anyone use it?

2005-03-05 Thread Brice Goglin
Hmm, your system says it supports s4bios. But if you can see 

Writing data to swap (XXX pages)... XXX %
then you are definitely using swsusp. Strange.
That's what I see.
Thanks,
Brice
-
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: s4bios: does anyone use it?

2005-03-05 Thread Richard Mittendorfer
Also sprach Pavel Machek <[EMAIL PROTECTED]> (Sat, 5 Mar 2005 20:14:05
+0100):
> Hi!

hi!

> Is there single user of s4bios? It used to work for me 4 notebooks
> ago, but I never really used it. I think I'm the only person that ever
> seen it working, but I could be wrong. Is there anyone using s4bios in
> 2.6.11?
> 
> If not, I guess we should remove that code from kernel. It is not
> usefull, and it is likely broken.
>   Pavel

it doesn't work here (libretto). it goes to sleep but hangs on wakeup.

would be fine if.. but i'm satisfied with s3 and halt. never tried
swsuspend. also havn't tried since 2.6.9

as 2.6 is IMHO t large there should be something done about it (make
it configurable?patchable).

sl ritch.
-
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/


dm-crypt vs. cryptoloop reminder

2005-03-05 Thread Alexander Nyberg
2.6.3-mm1 'dm-crypt vs. cryptoloop' discussion was some time ago, it is
time to bring this up again:
http://kerneltrap.org/node/2433

I'm no cryptanalyst, but googling a bit shows a bunch of problems with
it (also see above thread), there is no maintainer and most importantly
there is a replacement for it that has active maintainers. Redundant
security solutions is a risky thing to me.



= Documentation/feature-removal-schedule.txt 1.4 vs edited =
--- 1.4/Documentation/feature-removal-schedule.txt  2005-01-14 22:22:44 
+01:00
+++ edited/Documentation/feature-removal-schedule.txt   2005-03-05 22:13:12 
+01:00
@@ -15,3 +15,10 @@ Why: It has been unmaintained for a numb
against the LSB, and can be replaced by using udev.
 Who:   Greg Kroah-Hartman <[EMAIL PROTECTED]>
 
+
+What:  cryptoloop
+When:  July 2005
+Files: drivers/block/cryptoloop.c and parts of drivers/block/loop.c
+Why:   Unmaintained, has vulnerabilities that haven't been fixed.
+   Superseded by dm-crypt that has been in mainline for a long time 
+   now: http://www.saout.de/misc/dm-crypt/


-
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: s4bios: does anyone use it?

2005-03-05 Thread Pavel Machek
Hi!

> >Can you try cat /proc/acpi/sleep? If there's no difference between S4
> >and S4bios, than you are probably just using plain S4...
> 
> puligny:~% cat /proc/acpi/sleep
> S0 S1 S3 S4 S4bios S5
> 
> Where am I suppose to see a difference between S4 and S4Bios here ?

Hmm, your system says it supports s4bios. But if you can see 

Writing data to swap (XXX pages)... XXX %

then you are definitely using swsusp. Strange.

Pavel

-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
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: s4bios: does anyone use it?

2005-03-05 Thread Brice Goglin
Pavel Machek a écrit :
Can you try cat /proc/acpi/sleep? If there's no difference between S4
and S4bios, than you are probably just using plain S4...
puligny:~% cat /proc/acpi/sleep
S0 S1 S3 S4 S4bios S5
Where am I suppose to see a difference between S4 and S4Bios here ?
From what I see in acpi_system_write_sleep in drivers/acpi/sleep/proc.c
4 uses software_suspend while 4b uses acpi_suspend(4)
(SOFTWARE_SUSPEND is set in my .config)
Is this code the right one ?
/* Check for S4 bios request */
if (!strcmp(str,"4b")) {
error = acpi_suspend(4);
goto Done;
}
state = simple_strtoul(str, NULL, 0);
#ifdef CONFIG_SOFTWARE_SUSPEND
if (state == 4) {
error = software_suspend();
goto Done;
}
#endif
error = acpi_suspend(state);
Yes, but it will take quite long to do it properly. pm_message_t
framework needs to go in, first.
Ok, great! I'll be happy to test it soon :)
Brice
-
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] EFI missing failure handling

2005-03-05 Thread Matt Domsch
On Sat, Mar 05, 2005 at 09:17:34PM +0100, Panagiotis Issaris wrote:
> Hi,
> 
> On Sat, Mar 05, 2005 at 07:06:29PM +0200 or thereabouts, Alexey Dobriyan 
> wrote:
> > On Saturday 05 March 2005 17:38, Panagiotis Issaris wrote:
> > 
> > > The EFI driver allocates memory and writes into it without checking the
> > > success of the allocation:
> > > 
> > > 668 efi_char16_t *variable_name = kmalloc(1024, GFP_KERNEL);
> > > ...
> > > 696 memset(variable_name, 0, 1024);
> > 
> > > --- linux-2.6.11-orig/drivers/firmware/efivars.c
> > > +++ linux-2.6.11-pi/drivers/firmware/efivars.c
> > > @@ -670,6 +670,9 @@ efivars_init(void)
> > 
> > > + if (!variable_name)
> > > + return -ENOMEM;
> > > +
> > >   if (!efi_enabled)
> > >   return -ENODEV; 
> > 
> > I'd better move kmalloc() and checking for success down right before
> > memset(). Otherwise you leak if efi_enabled == 0.
> > Oh, and efivars_init() wants to return "error", not unconditionally 0.
> > 
> > Alexey
> 
> Thanks! How about the updated patch?

Looks good to me.  Good catch, and thanks for the patch!  Please
forward to Andrew Morton ([EMAIL PROTECTED]) directly, following the
format described here: http://linux.yyz.us/patch-format.html

Thanks,
Matt

-- 
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
-
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: s4bios: does anyone use it?

2005-03-05 Thread Pavel Machek
Hi!

> >Is there single user of s4bios? It used to work for me 4 notebooks
> >ago, but I never really used it. I think I'm the only person that ever
> >seen it working, but I could be wrong. Is there anyone using s4bios in
> >2.6.11?
> >
> >If not, I guess we should remove that code from kernel. It is not
> >usefull, and it is likely broken.
> > Pavel

> I always suspend my Compaq Evo N6OOc to disk using "echo 4b > 
> /proc/acpi/sleep".
> I don't remember the reason why I originally did choose this one instead of 
> S4.
> I just checked that S4 and S4Bios work the same on 2.6.11-mm1 (even with my
> PCMCIA wireless card connected, great!).
> From what I remember, I didn't see any difference between S4 and S4Bios in
> recent vanilla kernels.

Can you try cat /proc/acpi/sleep? If there's no difference between S4
and S4bios, than you are probably just using plain S4...

> By the way, it seems that Radeon makes suspend slower because it needs
> to be blanked or something like that. Is there any way to avoid this ?

Yes, but it will take quite long to do it properly. pm_message_t
framework needs to go in, first.

Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
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.6.11.1

2005-03-05 Thread Linus Torvalds


On Sat, 5 Mar 2005, Russell King wrote:
>
> On Sat, Mar 05, 2005 at 09:40:59AM -0800, Linus Torvalds wrote:
> > I love BK, but what BK does well is merging and maintaining trees full of 
> > good stuff. What BK sucks at is experimental stuff where you don't know 
> > whether something should be eventually used or not.
> 
> Wait a minute - why would stuff going into 2.6.x.y be "experimental"
> stuff?  Wasn't stability the whole point of this tree?

The point being that _before_ a patch gets accepted, it's in that "limbo" 
state, waiting for people to veto it or say "yes".

That limbo state is not well done with BK. 

Linus
-
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] Re: diff command line?

2005-03-05 Thread Willy Tarreau
On Sat, Mar 05, 2005 at 09:47:44PM +0100, Bodo Eggert wrote:
> Russell King <[EMAIL PROTECTED]> wrote:
> > On Sat, Mar 05, 2005 at 10:48:00AM -0500, Gene Heskett wrote:
> 
> >> What are the options normally used to generate a diff for public
> >> consumption on this list?
> > 
> > diff -urpN orig new
> > 
> > where "orig" and "new" both contain the top level "linux" directory,
> > so the resulting patch can be applied with patch -p1.
> 
> This seems to be a common mistake.

I often use a simple trick to make my single file patches compatible
with both -p0 and -p1 :

diff -pruN ./dir/file.orig ./dir/file.new

The './' can either get stripped by -p1 or left as is, thus the patch
works for different scripts or people. The main disadvantage is that
there's no base version indication in the patch with this method.

Regards,
Willy

-
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: Logitech MX1000 Horizontal Scrolling

2005-03-05 Thread Jeremy Nickurak
On sab, 2005-03-05 at 13:52 +0100, Esben Stien wrote:
>Sorry, false report. 2.6.11-rc3 makes my tilt button show up as 2
>buttons being pressed simultaneously, just like that previous report.
>
>I also tried linux-2.6.11 today and it was the same. 
>
>It shows up as both button 4 and 12 being pressed simultaneously.

Right, this is just a result of our different xmodmap configurations.
Otherwise we're seeing exactly the same symptoms.

-- 
Jeremy Nickurak <[EMAIL PROTECTED]>


signature.asc
Description: This is a digitally signed message part


Re: [PATCH] raw1394 missing failure handling

2005-03-05 Thread Gene Heskett
On Saturday 05 March 2005 13:47, Jody McIntyre wrote:
>On Thu, Mar 03, 2005 at 11:55:09PM +0100, Panagiotis Issaris wrote:
>> Adds the missing failure handling for a __copy_to_user call.
>>
>>
>> Signed-off-by: Panagiotis Issaris <[EMAIL PROTECTED]>
>
>Sorry I didn't notice this sooner, but this was already fixed and
> has been sent to Linus (hopefully to appear in 2.6.12.)
>
>Jody

Jody, Panagiotis;  A much more complete patch is already sitting in 
the bk queue.  This is a relatively small piece of that one.  You can 
get it from:



As the bk-ieee1394.patch you can see there.

>> diff -pruN linux-2.6.11/drivers/ieee1394/raw1394.c
>> linux-2.6.11-pi/drivers/ieee1394/raw1394.c ---
>> linux-2.6.11/drivers/ieee1394/raw1394.c 2005-03-02
>> 11:44:26.0 +0100 +++
>> linux-2.6.11-pi/drivers/ieee1394/raw1394.c 2005-03-02
>> 15:27:15.0 +0100 @@ -443,7 +443,10 @@ static ssize_t
>> raw1394_read(struct file req->req.error = RAW1394_ERROR_MEMFAULT;
>> }
>>  }
>> -__copy_to_user(buffer, >req, sizeof(req->req));
>> +if (__copy_to_user(buffer, >req, sizeof(req->req)))
>> { +free_pending_request(req);
>> +return -EFAULT;
>> +}
>>
>>  free_pending_request(req);
>>  return sizeof(struct raw1394_request);
>>
>>
>> --
>>   K.U.Leuven, Mechanical Eng.,  Mechatronics & Robotics Research
>> Group http://people.mech.kuleuven.ac.be/~pissaris/
>>
>> -
>> 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/

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.34% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.
-
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: s4bios: does anyone use it?

2005-03-05 Thread Brice Goglin
Pavel Machek a écrit :
Hi!
Is there single user of s4bios? It used to work for me 4 notebooks
ago, but I never really used it. I think I'm the only person that ever
seen it working, but I could be wrong. Is there anyone using s4bios in
2.6.11?
If not, I guess we should remove that code from kernel. It is not
usefull, and it is likely broken.
Pavel
Hi Pavel,
I always suspend my Compaq Evo N6OOc to disk using "echo 4b > /proc/acpi/sleep".
I don't remember the reason why I originally did choose this one instead of S4.
I just checked that S4 and S4Bios work the same on 2.6.11-mm1 (even with my
PCMCIA wireless card connected, great!).
From what I remember, I didn't see any difference between S4 and S4Bios in
recent vanilla kernels.
By the way, it seems that Radeon makes suspend slower because it needs
to be blanked or something like that. Is there any way to avoid this ?
Regards
Brice
-
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/


[BK PATCHES] 2.6.x net driver updates

2005-03-05 Thread Jeff Garzik
Just sent this to Andrew/Linus.  The patch was too large (500K) to send 
to mailing lists.
Please do a

bk pull bk://gkernel.bkbits.net/net-drivers-2.6

This will update the following files:

 Documentation/networking/e100.txt |3 
 arch/arm/mach-pxa/lubbock.c   |2 
 arch/arm/mach-sa1100/neponset.c   |2 
 drivers/net/Kconfig   |   17 
 drivers/net/e1000/e1000.h |3 
 drivers/net/e1000/e1000_ethtool.c |   11 
 drivers/net/e1000/e1000_hw.c  |   86 
 drivers/net/e1000/e1000_hw.h  |   11 
 drivers/net/e1000/e1000_main.c|  249 +
 drivers/net/eepro100.c|9 
 drivers/net/ixgb/ixgb.h   |3 
 drivers/net/ixgb/ixgb_ee.c|   16 
 drivers/net/ixgb/ixgb_ee.h|3 
 drivers/net/ixgb/ixgb_ethtool.c   |5 
 drivers/net/ixgb/ixgb_hw.c|2 
 drivers/net/ixgb/ixgb_hw.h|2 
 drivers/net/ixgb/ixgb_ids.h   |2 
 drivers/net/ixgb/ixgb_main.c  |   73 
 drivers/net/ixgb/ixgb_osdep.h |2 
 drivers/net/ixgb/ixgb_param.c |2 
 drivers/net/smc91x.c  |  275 +
 drivers/net/smc91x.h  |   79 
 drivers/net/tulip/de2104x.c   |2 
 drivers/net/typhoon-firmware.h| 5568 +-
 drivers/net/typhoon.c |  244 +
 drivers/net/wan/sbni.c|2 
 26 files changed, 3304 insertions(+), 3369 deletions(-)

through these ChangeSets:

:
  o e1000: Driver version white space,
  o e1000: Fixes related to Cable length
  o e1000: Report failure code when loopback
  o e1000: Checks for desc ring/rx data
  o e1000: Patch from Peter Kjellstroem --
  o e1000: Fix WOL settings in 82544 based
  o e1000: Delay clean-up of last Tx buffer
  o e1000: Avoid race between e1000_watchdog
  o e1000: use netif_poll_{enable|disable}
  o e1000: Robert Olsson's fix and refinement
  o ixgb: Driver version, white space, other stuff
  o ixgb: Invalidate software cache, when EEPROM write occurs
  o ixgb: Robert Olsson's fix and refinement to poll
  o ixgb: Avoid race e1000_watchdog and ixgb_clean_tx_irq
  o ixgb: use netif_poll_{enable|disable}

Alexander Viro:
  o smc91x iomem annotations

David Dillow:
  o Bump version and release date
  o Version 03.001.008 of the Typhoon firmware, courtesy of 3Com
  o Fixup the version reporting to match 3Com
  o Use module_param() and add descriptions
  o Teach typhoon to use port IO on machines that need it. It will attempt to 
use MMIO, but if that fails (or the user asks), it will fallback to port IO.
  o Enable bus mastering before saving our state, or we'll only be able to load 
the modules one time.

Ian Campbell:
  o smc91x: power down PHY on suspend
  o use datacs in smc91x driver

Nicolas Pitre:
  o smc91x: allow RX of VLAN packets

Randy Dunlap:
  o tulip/de2104x: don't mix __init & __devinit sections
  o net/wan/sbni: fix section usage

Scott Feldman:
  o eepro100: remove ID for 82556
  o e100: remove reference to NAPI config option

Tony Lindgren:
  o Add OMAP support to smc91x Ethernet driver

Xose Vazquez Perez:
  o 2.6 eepro100: replace and delete duplicate ids



[PATCH] Re: diff command line?

2005-03-05 Thread Bodo Eggert
Russell King <[EMAIL PROTECTED]> wrote:
> On Sat, Mar 05, 2005 at 10:48:00AM -0500, Gene Heskett wrote:

>> What are the options normally used to generate a diff for public
>> consumption on this list?
> 
> diff -urpN orig new
> 
> where "orig" and "new" both contain the top level "linux" directory,
> so the resulting patch can be applied with patch -p1.

This seems to be a common mistake.

Signed-Off-By: Bodo Eggert <[EMAIL PROTECTED]>

--- linux-2.6.11/Documentation/SubmittingPatches.ori2005-03-05
21:29:26.0 +0100
+++ linux-2.6.11/Documentation/SubmittingPatches2005-03-05
21:38:40.0 +0100
@@ -24,6 +24,7 @@ SECTION 1 - CREATING AND SENDING YOUR CH
 

 Use "diff -up" or "diff -uprN" to create patches.
+The resulting patch must apply with -p1 from within the linux directory.

 All changes to the Linux kernel occur in the form of patches, as
 generated by diff(1).  When creating your patch, make sure to create it

-
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 18/29] FAT: Allocate the cluster before adding the directory entry

2005-03-05 Thread OGAWA Hirofumi

With this change, ->mkdir() uses the correct updating order.

Signed-off-by: OGAWA Hirofumi <[EMAIL PROTECTED]>
---

 fs/fat/dir.c |  155 +--
 fs/fat/fatent.c  |3 
 fs/msdos/namei.c |   54 +++-
 fs/vfat/namei.c  |   59 -
 include/linux/msdos_fs.h |2 
 5 files changed, 169 insertions(+), 104 deletions(-)

diff -puN fs/fat/dir.c~sync07-fat_dir5 fs/fat/dir.c
--- linux-2.6.11/fs/fat/dir.c~sync07-fat_dir5   2005-03-06 02:36:53.0 
+0900
+++ linux-2.6.11-hirofumi/fs/fat/dir.c  2005-03-06 02:36:53.0 +0900
@@ -869,6 +869,118 @@ int fat_remove_entries(struct inode *dir
 
 EXPORT_SYMBOL(fat_remove_entries);
 
+static int fat_zeroed_cluster(struct inode *dir, sector_t blknr, int nr_used,
+ struct buffer_head **bhs, int nr_bhs)
+{
+   struct super_block *sb = dir->i_sb;
+   sector_t last_blknr = blknr + MSDOS_SB(sb)->sec_per_clus;
+   int err, i, n;
+
+   /* Zeroing the unused blocks on this cluster */
+   blknr += nr_used;
+   n = nr_used;
+   while (blknr < last_blknr) {
+   bhs[n] = sb_getblk(sb, blknr);
+   if (!bhs[n]) {
+   err = -ENOMEM;
+   goto error;
+   }
+   memset(bhs[n]->b_data, 0, sb->s_blocksize);
+   set_buffer_uptodate(bhs[n]);
+   mark_buffer_dirty(bhs[n]);
+
+   n++;
+   blknr++;
+   if (n == nr_bhs) {
+   if (IS_DIRSYNC(dir)) {
+   err = fat_sync_bhs(bhs, n);
+   if (err)
+   goto error;
+   }
+   for (i = 0; i < n; i++)
+   brelse(bhs[i]);
+   n = 0;
+   }
+   }
+   if (IS_DIRSYNC(dir)) {
+   err = fat_sync_bhs(bhs, n);
+   if (err)
+   goto error;
+   }
+   for (i = 0; i < n; i++)
+   brelse(bhs[i]);
+
+   return 0;
+
+error:
+   for (i = 0; i < n; i++)
+   bforget(bhs[i]);
+   return err;
+}
+
+int fat_alloc_new_dir(struct inode *dir, struct timespec *ts)
+{
+   struct super_block *sb = dir->i_sb;
+   struct msdos_sb_info *sbi = MSDOS_SB(sb);
+   struct buffer_head *bhs[MAX_BUF_PER_PAGE];
+   struct msdos_dir_entry *de;
+   sector_t blknr;
+   __le16 date, time;
+   int err, cluster;
+
+   err = fat_alloc_clusters(dir, , 1);
+   if (err)
+   goto error;
+
+   blknr = fat_clus_to_blknr(sbi, cluster);
+   bhs[0] = sb_getblk(sb, blknr);
+   if (!bhs[0]) {
+   err = -ENOMEM;
+   goto error_free;
+   }
+
+   fat_date_unix2dos(ts->tv_sec, , );
+
+   de = (struct msdos_dir_entry *)bhs[0]->b_data;
+   /* filling the new directory slots ("." and ".." entries) */
+   memcpy(de[0].name, MSDOS_DOT, MSDOS_NAME);
+   memcpy(de[1].name, MSDOS_DOTDOT, MSDOS_NAME);
+   de->attr = de[1].attr = ATTR_DIR;
+   de[0].lcase = de[1].lcase = 0;
+   de[0].time = de[1].time = time;
+   de[0].date = de[1].date = date;
+   de[0].ctime_cs = de[1].ctime_cs = 0;
+   if (sbi->options.isvfat) {
+   /* extra timestamps */
+   de[0].ctime = de[1].ctime = time;
+   de[0].adate = de[0].cdate = de[1].adate = de[1].cdate = date;
+   } else {
+   de[0].ctime = de[1].ctime = 0;
+   de[0].adate = de[0].cdate = de[1].adate = de[1].cdate = 0;
+   }
+   de[0].start = cpu_to_le16(cluster);
+   de[0].starthi = cpu_to_le16(cluster >> 16);
+   de[1].start = cpu_to_le16(MSDOS_I(dir)->i_logstart);
+   de[1].starthi = cpu_to_le16(MSDOS_I(dir)->i_logstart >> 16);
+   de[0].size = de[1].size = 0;
+   memset(de + 2, 0, sb->s_blocksize - 2 * sizeof(*de));
+   set_buffer_uptodate(bhs[0]);
+   mark_buffer_dirty(bhs[0]);
+
+   err = fat_zeroed_cluster(dir, blknr, 1, bhs, MAX_BUF_PER_PAGE);
+   if (err)
+   goto error_free;
+
+   return cluster;
+
+error_free:
+   fat_free_clusters(dir, cluster);
+error:
+   return err;
+}
+
+EXPORT_SYMBOL(fat_alloc_new_dir);
+
 static struct buffer_head *fat_extend_dir(struct inode *inode)
 {
struct super_block *sb = inode->i_sb;
@@ -960,46 +1072,3 @@ int fat_add_entries(struct inode *dir,in
 }
 
 EXPORT_SYMBOL(fat_add_entries);
-
-int fat_new_dir(struct inode *dir, struct inode *parent, int is_vfat)
-{
-   struct super_block *sb = dir->i_sb;
-   struct buffer_head *bh;
-   struct msdos_dir_entry *de;
-   __le16 date, time;
-
-   bh = fat_extend_dir(dir);
-   if (IS_ERR(bh))
-   return PTR_ERR(bh);
-
-   /* zeroed out, so... */
-   fat_date_unix2dos(dir->i_mtime.tv_sec, , );
-  

  1   2   3   4   5   >