[2.6 patch] drivers/isdn/divert/isdn_divert.c: make 5 functions static

2005-03-12 Thread Adrian Bunk
This patch makes five needlessly global functions static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch was already sent on:
- 6 Feb 2005

 drivers/isdn/divert/isdn_divert.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

--- linux-2.6.11-rc3-mm1-full/drivers/isdn/divert/isdn_divert.c.old 
2005-02-05 15:39:15.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/divert/isdn_divert.c 2005-02-05 
15:39:52.0 +0100
@@ -383,7 +383,7 @@
 /*/
 /* called from common module on an incoming call */
 /*/
-int isdn_divert_icall(isdn_ctrl *ic)
+static int isdn_divert_icall(isdn_ctrl *ic)
 { int retval = 0;
   unsigned long flags;
   struct call_struc *cs = NULL; 
@@ -552,7 +552,7 @@
 //
 /* put a address including address type into buffer */
 //
-int put_address(char *st, u_char *p, int len)
+static int put_address(char *st, u_char *p, int len)
 { u_char retval = 0;
   u_char adr_typ = 0; /* network standard */
 
@@ -595,7 +595,7 @@
 /*/
 /* report a succesfull interrogation */
 /*/
-int interrogate_success(isdn_ctrl *ic, struct call_struc *cs)
+static int interrogate_success(isdn_ctrl *ic, struct call_struc *cs)
 { char *src = ic-parm.dss1_io.data;
   int restlen = ic-parm.dss1_io.datalen;
   int cnt = 1;
@@ -689,7 +689,7 @@
 /*/
 /* callback for protocol specific extensions */
 /*/
-int prot_stat_callback(isdn_ctrl *ic)
+static int prot_stat_callback(isdn_ctrl *ic)
 { struct call_struc *cs, *cs1;
   int i;
   unsigned long flags;
@@ -781,7 +781,7 @@
 /***/
 /* status callback from HL */
 /***/
-int isdn_divert_stat_callback(isdn_ctrl *ic)
+static int isdn_divert_stat_callback(isdn_ctrl *ic)
 { struct call_struc *cs, *cs1;
   unsigned long flags;
   int retval;

-
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 patch] drivers/isdn/capi/: make some code static

2005-03-12 Thread Adrian Bunk
This patch makes some needlessly global code static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch was already sent on:
- 6 Feb 2005

 drivers/isdn/capi/capi.c   |   10 +-
 drivers/isdn/capi/kcapi_proc.c |   10 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

--- linux-2.6.11-rc3-mm1-full/drivers/isdn/capi/capi.c.old  2005-02-05 
15:34:35.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/capi/capi.c  2005-02-05 
15:35:37.0 +0100
@@ -60,12 +60,12 @@
 
 static struct class_simple *capi_class;
 
-int capi_major = 68;   /* allocated */
+static int capi_major = 68;/* allocated */
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
 #define CAPINC_NR_PORTS32
 #define CAPINC_MAX_PORTS   256
-int capi_ttymajor = 191;
-int capi_ttyminors = CAPINC_NR_PORTS;
+static int capi_ttymajor = 191;
+static int capi_ttyminors = CAPINC_NR_PORTS;
 #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
 
 module_param_named(major, capi_major, uint, 0);
@@ -268,7 +268,7 @@
kfree(mp);
 }
 
-struct capiminor *capiminor_find(unsigned int minor)
+static struct capiminor *capiminor_find(unsigned int minor)
 {
struct list_head *l;
struct capiminor *p = NULL;
@@ -1166,7 +1166,7 @@
return room;
 }
 
-int capinc_tty_chars_in_buffer(struct tty_struct *tty)
+static int capinc_tty_chars_in_buffer(struct tty_struct *tty)
 {
struct capiminor *mp = (struct capiminor *)tty-driver_data;
if (!mp || !mp-nccip) {
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/capi/kcapi_proc.c.old
2005-02-05 15:36:10.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/capi/kcapi_proc.c2005-02-05 
15:36:43.0 +0100
@@ -89,14 +89,14 @@
return 0;
 }
 
-struct seq_operations seq_controller_ops = {
+static struct seq_operations seq_controller_ops = {
.start  = controller_start,
.next   = controller_next,
.stop   = controller_stop,
.show   = controller_show,
 };
 
-struct seq_operations seq_contrstats_ops = {
+static struct seq_operations seq_contrstats_ops = {
.start  = controller_start,
.next   = controller_next,
.stop   = controller_stop,
@@ -192,14 +192,14 @@
return 0;
 }
 
-struct seq_operations seq_applications_ops = {
+static struct seq_operations seq_applications_ops = {
.start  = applications_start,
.next   = applications_next,
.stop   = applications_stop,
.show   = applications_show,
 };
 
-struct seq_operations seq_applstats_ops = {
+static struct seq_operations seq_applstats_ops = {
.start  = applications_start,
.next   = applications_next,
.stop   = applications_stop,
@@ -287,7 +287,7 @@
return 0;
 }
 
-struct seq_operations seq_capi_driver_ops = {
+static struct seq_operations seq_capi_driver_ops = {
.start  = capi_driver_start,
.next   = capi_driver_next,
.stop   = capi_driver_stop,

-
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: AGP bogosities

2005-03-12 Thread Dave Jones
On Sat, Mar 12, 2005 at 07:13:05PM -0800, Jesse Barnes wrote:
  On Friday, March 11, 2005 7:58 pm, Dave Jones wrote:
 sgi-agp.c was sent to Dave about 2 weeks ago. I assumed he was waiting
 for the TIO header files to make it from the ia64 tree into Linus's
 tree.
  
   Actually I just got swamped with other stuff, and dropped the ball.
   I still have the patch in my queue though, so I can push that along.
  
   Are those headers in mainline yet ?
  
  Yeah, I think it's all there now.  Looks like Linus did a pull from ia64 
  recently, so it *should* all build.

Ok, pushed out to bk://linux-djb.bkbits.net/agpgart

Linus, please pull.

Dave


-
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 : physical memory address and pid

2005-03-12 Thread Allison
Thanks for the answer! 

Another related question :

I need to gather all application pages by reading the page tables. 
The hard part is, I need to do this from a PCI device using DMA.  As I
understand it,  when a DMA is being performed, the pages are pinned in
memory . Since the PCI device has grabbed the bus, the processor is
not able to access memory to perform page replacement right ?
So, this is a form of mutual exclusion.

However, if I have to fetch the page struct, the process address space
of the process owning the page (I am ignoring shared pages to make
things simpler) and the page itself, will a scatter gather DMA make
sure that  the processor cannot modify any of these data structures
till the DMA is complete ? I am using Linux 2.6 and the i386
architecture.

thanks,
Allison





On Sat, 12 Mar 2005 17:23:23 -0800, Matt Mackall [EMAIL PROTECTED] wrote:
 On Sat, Mar 12, 2005 at 08:05:11PM -0500, firefly blue wrote:
  Hi,
 
  With the 2.6 Linux kernel, I want to find, from the physical page
  frame, the virtual address of the page loaded in the frame and the
  process id of the process owning it.
 
 Follow struct page-mapping to struct address_space. A page can be
 mapped into any number of processes and multiple times per process so
 you'll need to walk the data structures there.
 
 --
 Mathematics is the supreme nostalgia of our time.

-
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 patch] drivers/isdn/act2000/capi.c: #if 0 an unused function

2005-03-12 Thread Adrian Bunk
This patch #if 0's an unused function.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch was already sent on:
- 6 Feb 2005

 drivers/isdn/act2000/capi.c |2 ++
 drivers/isdn/act2000/capi.h |1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.11-rc3-mm1-full/drivers/isdn/act2000/capi.h.old   2005-02-05 
15:07:29.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/act2000/capi.h   2005-02-05 
15:07:35.0 +0100
@@ -350,7 +350,6 @@
 extern int actcapi_chkhdr(act2000_card *, actcapi_msghdr *);
 extern int actcapi_listen_req(act2000_card *);
 extern int actcapi_manufacturer_req_net(act2000_card *);
-extern int actcapi_manufacturer_req_v42(act2000_card *, ulong);
 extern int actcapi_manufacturer_req_errh(act2000_card *);
 extern int actcapi_manufacturer_req_msn(act2000_card *);
 extern int actcapi_connect_req(act2000_card *, act2000_chan *, char *, char, 
int, int);
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/act2000/capi.c.old   2005-02-05 
15:07:42.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/act2000/capi.c   2005-02-05 
15:08:02.0 +0100
@@ -224,6 +224,7 @@
 /*
  * Switch V.42 on or off
  */
+#if 0
 int
 actcapi_manufacturer_req_v42(act2000_card *card, ulong arg)
 {
@@ -242,6 +243,7 @@
ACTCAPI_QUEUE_TX;
 return 0;
 }
+#endif  /*  0  */
 
 /*
  * Set error-handler

-
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 patch] drivers/isdn/pcbit/: possible cleanups

2005-03-12 Thread Adrian Bunk
This patch contains the following possible cleanups:
- make some needlessly global functions static
- remove the following unused global functions:
  - callbacks.c: cb_out_3
  - capi.c: capi_decode_disc_conf

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch was already sent on:
- 9 Feb 2005

 drivers/isdn/pcbit/callbacks.c |   17 -
 drivers/isdn/pcbit/callbacks.h |3 ---
 drivers/isdn/pcbit/capi.c  |   10 --
 drivers/isdn/pcbit/capi.h  |1 -
 drivers/isdn/pcbit/drv.c   |   16 
 5 files changed, 8 insertions(+), 39 deletions(-)

--- linux-2.6.11-rc3-mm1-full/drivers/isdn/pcbit/callbacks.h.old
2005-02-09 03:27:18.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/pcbit/callbacks.h2005-02-09 
03:27:24.0 +0100
@@ -19,9 +19,6 @@
 extern void cb_out_2(struct pcbit_dev * dev, struct pcbit_chan* chan, 
 struct callb_data *data);
 
-extern void cb_out_3(struct pcbit_dev * dev, struct pcbit_chan* chan, 
-struct callb_data *data);
-
 extern void cb_in_1(struct pcbit_dev * dev, struct pcbit_chan* chan, 
struct callb_data *data);
 extern void cb_in_2(struct pcbit_dev * dev, struct pcbit_chan* chan, 
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/pcbit/callbacks.c.old
2005-02-09 03:27:32.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/pcbit/callbacks.c2005-02-09 
03:27:49.0 +0100
@@ -125,23 +125,6 @@
 
 
 /*
- * Disconnect received (actually RELEASE COMPLETE) 
- * This means we were not able to establish connection with remote
- * Inform the big boss above
- */
-void cb_out_3(struct pcbit_dev * dev, struct pcbit_chan* chan,
- struct callb_data *data) 
-{
-isdn_ctrl ictl;
-
-ictl.command = ISDN_STAT_DHUP;
-ictl.driver=dev-id;
-ictl.arg=chan-id;
-dev-dev_if-statcallb(ictl);
-}
-
-
-/*
  * Incoming call received
  * inform user
  */
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/pcbit/capi.h.old 2005-02-09 
03:28:06.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/pcbit/capi.h 2005-02-09 
03:28:14.0 +0100
@@ -54,7 +54,6 @@
 
 /* Connection Termination */
 extern int capi_disc_req(ushort callref, struct sk_buff **skb, u_char cause);
-extern int capi_decode_disc_conf(struct pcbit_chan *chan, struct sk_buff *skb);
 
 extern int capi_decode_disc_ind(struct pcbit_chan *chan, struct sk_buff *skb);
 extern int capi_disc_resp(struct pcbit_chan *chan, struct sk_buff **skb);
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/pcbit/capi.c.old 2005-02-09 
03:28:26.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/pcbit/capi.c 2005-02-09 
03:28:32.0 +0100
@@ -627,16 +627,6 @@
 return 0;
 }
 
-int capi_decode_disc_conf(struct pcbit_chan *chan, struct sk_buff *skb)
-{
-ushort errcode;
-
-errcode = *((ushort*) skb-data);
-skb_pull(skb, 2);
-
-return errcode;
-}
-
 #ifdef DEBUG
 int capi_decode_debug_188(u_char *hdr, ushort hdrlen)
 {
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/pcbit/drv.c.old  2005-02-09 
03:29:07.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/pcbit/drv.c  2005-02-09 
03:30:10.0 +0100
@@ -56,10 +56,10 @@
  * prototypes
  */
 
-int pcbit_command(isdn_ctrl* ctl);
-int pcbit_stat(u_char __user * buf, int len, int, int);
-int pcbit_xmit(int driver, int chan, int ack, struct sk_buff *skb);
-int pcbit_writecmd(const u_char __user *, int, int, int);
+static int pcbit_command(isdn_ctrl* ctl);
+static int pcbit_stat(u_char __user * buf, int len, int, int);
+static int pcbit_xmit(int driver, int chan, int ack, struct sk_buff *skb);
+static int pcbit_writecmd(const u_char __user *, int, int, int);
 
 static int set_protocol_running(struct pcbit_dev * dev);
 
@@ -238,7 +238,7 @@
 }
 #endif
 
-int pcbit_command(isdn_ctrl* ctl)
+static int pcbit_command(isdn_ctrl* ctl)
 {
struct pcbit_dev  *dev;
struct pcbit_chan *chan;
@@ -330,7 +330,7 @@
 }
 #endif
 
-int pcbit_xmit(int driver, int chnum, int ack, struct sk_buff *skb)
+static int pcbit_xmit(int driver, int chnum, int ack, struct sk_buff *skb)
 {
ushort hdrlen;
int refnum, len;
@@ -389,7 +389,7 @@
return len;
 }
 
-int pcbit_writecmd(const u_char __user *buf, int len, int driver, int channel)
+static int pcbit_writecmd(const u_char __user *buf, int len, int driver, int 
channel)
 {
struct pcbit_dev * dev;
int i, j;
@@ -713,7 +713,7 @@
 static int stat_st = 0;
 static int stat_end = 0;
 
-int pcbit_stat(u_char __user *buf, int len, int driver, int channel)
+static int pcbit_stat(u_char __user *buf, int len, int driver, int channel)
 {
int stat_count;
stat_count = stat_end - stat_st;

-
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 

Re: [PATCH 0/5] I8K driver facelift

2005-03-12 Thread Dmitry Torokhov
On Saturday 12 March 2005 22:41, Frank Sorenson wrote:
 Dmitry Torokhov wrote:
 | Hi,
 |
 | here are some changes that freshen I8K driver (Dell Inspiron/Latitude
 | platform driver). The patches have been tested on Inspiron 8100.
 snip
 | Please consider for inclusion.
 |
 | Thanks!
 
 These patches look pretty good.  A few comments (with a patch--tested on
 my Inspiron 9200):
 
 - The return i8k_smm(regs)  0 ? : regs.eax; construction is nice and
 tidy, but it isn't passing on the return value of the called function,
 and is returning TRUE or 1 on failure.  This makes it difficult to check
 the return value for valid data.  Old behavior returned negative, so
 I'll return -1.

Hi,

Actually I am not sure what I was thinkinhg when I wrtote it, the correct
version should be return i8k_smm(regs) ? : regs.eax; since i8k_smm
return 0 on success.

I will think about dynamically adding attributes...

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


nvidia fb licensing issue.

2005-03-12 Thread Dave Jones
The nvidia framebuffer code added recently is marked as
MODULE_LICENSE(GPL), but some things seem a little odd to me..

1. The boilerplate at the top of drivers/video/nvidia/nv_dma.h,
   drivers/video/nvidia/nv_local.h, and drivers/video/nvidia/nv_hw.c
   doesn't seem to be a GPL-compatible license. It seems to be an nvidia
   specific license with an advertising clause, and something that
   adds restrictions on rights of U.S. Govt end users.

2. Some of these files clearly came from XFree86 judging from
   the CVS idents in the source.  Was this XFree86 code
   dual-licensed by its original authors ? If so, it isn't clear.

Dave

-
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 patch] drivers/isdn/i4l/: possible cleanups

2005-03-12 Thread Adrian Bunk
This patch contains the following possible cleanups:
- make needlessly global code static
- remove the following unused global function:
  - isdn_audio.c: isdn_audio_2adpcm_flush
- remove the following unused struct:
  - isdn_net.c: isdn_concap_demand_dial_dops

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch was already sent on:
- 9 Feb 2005

 drivers/isdn/i4l/isdn_audio.c|   10 
 drivers/isdn/i4l/isdn_audio.h|1 
 drivers/isdn/i4l/isdn_common.c   |6 ++---
 drivers/isdn/i4l/isdn_common.h   |1 
 drivers/isdn/i4l/isdn_concap.c   |   15 ++--
 drivers/isdn/i4l/isdn_concap.h   |1 
 drivers/isdn/i4l/isdn_net.c  |   10 
 drivers/isdn/i4l/isdn_tty.c  |4 +--
 drivers/isdn/i4l/isdn_tty.h  |1 
 drivers/isdn/i4l/isdn_ttyfax.c   |6 ++---
 drivers/isdn/i4l/isdn_x25iface.c |   36 +++
 11 files changed, 34 insertions(+), 57 deletions(-)

--- linux-2.6.11-rc3-mm1-full/drivers/isdn/i4l/isdn_audio.h.old 2005-02-09 
03:17:36.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/i4l/isdn_audio.h 2005-02-09 
03:17:43.0 +0100
@@ -35,7 +35,6 @@
 extern adpcm_state *isdn_audio_adpcm_init(adpcm_state *, int);
 extern int isdn_audio_adpcm2xlaw(adpcm_state *, int, unsigned char *, unsigned 
char *, int);
 extern int isdn_audio_xlaw2adpcm(adpcm_state *, int, unsigned char *, unsigned 
char *, int);
-extern int isdn_audio_2adpcm_flush(adpcm_state * s, unsigned char *out);
 extern void isdn_audio_calc_dtmf(modem_info *, unsigned char *, int, int);
 extern void isdn_audio_eval_dtmf(modem_info *);
 dtmf_state *isdn_audio_dtmf_init(dtmf_state *);
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/i4l/isdn_audio.c.old 2005-02-09 
03:17:52.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/i4l/isdn_audio.c 2005-02-09 
03:18:02.0 +0100
@@ -392,16 +392,6 @@
 }
 
 int
-isdn_audio_2adpcm_flush(adpcm_state * s, unsigned char *out)
-{
-   int olen = 0;
-
-   if (s-nleft)
-   isdn_audio_put_bits(0, 8 - s-nleft, s, out, olen);
-   return olen;
-}
-
-int
 isdn_audio_xlaw2adpcm(adpcm_state * s, int fmt, unsigned char *in,
  unsigned char *out, int len)
 {
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/i4l/isdn_common.h.old
2005-02-09 03:18:20.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/i4l/isdn_common.h2005-02-09 
03:18:26.0 +0100
@@ -41,7 +41,6 @@
 extern int  isdn_writebuf_skb_stub(int, int, int, struct sk_buff *);
 extern int  register_isdn(isdn_if * i);
 extern int  isdn_msncmp( const char *,  const char *);
-extern int  isdn_add_channels(isdn_driver_t *, int, int, int);
 #if defined(ISDN_DEBUG_NET_DUMP) || defined(ISDN_DEBUG_MODEM_DUMP)
 extern void isdn_dumppkt(char *, u_char *, int, int);
 #endif
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/i4l/isdn_common.c.old
2005-02-09 03:18:39.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/i4l/isdn_common.c2005-02-09 
03:19:12.0 +0100
@@ -67,7 +67,7 @@
 static int isdn_writebuf_stub(int, int, const u_char __user *, int);
 static void set_global_features(void);
 static int isdn_wildmat(char *s, char *p);
-
+static int isdn_add_channels(isdn_driver_t *d, int drvidx, int n, int adding);
 
 static inline void
 isdn_lock_driver(isdn_driver_t *drv)
@@ -388,7 +388,7 @@
  */
 #include linux/isdn/capicmd.h
 
-int
+static int
 isdn_capi_rec_hl_msg(capi_msg *cm) {

int di;
@@ -1923,7 +1923,7 @@
return ret;
 }
 
-int
+static int
 isdn_add_channels(isdn_driver_t *d, int drvidx, int n, int adding)
 {
int j, k, m;
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/i4l/isdn_concap.h.old
2005-02-09 03:19:25.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/i4l/isdn_concap.h2005-02-09 
03:19:47.0 +0100
@@ -8,7 +8,6 @@
  */
 
 extern struct concap_device_ops isdn_concap_reliable_dl_dops;
-extern struct concap_device_ops isdn_concap_demand_dial_dops;
 extern struct concap_proto * isdn_concap_new( int );
 
 
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/i4l/isdn_concap.c.old
2005-02-09 03:19:55.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/i4l/isdn_concap.c2005-02-09 
03:21:08.0 +0100
@@ -39,7 +39,7 @@
*/
 
 
-int isdn_concap_dl_data_req(struct concap_proto *concap, struct sk_buff *skb)
+static int isdn_concap_dl_data_req(struct concap_proto *concap, struct sk_buff 
*skb)
 {
struct net_device *ndev = concap - net_dev;
isdn_net_dev *nd = ((isdn_net_local *) ndev-priv)-netdev;
@@ -58,7 +58,7 @@
 }
 
 
-int isdn_concap_dl_connect_req(struct concap_proto *concap)
+static int isdn_concap_dl_connect_req(struct concap_proto *concap)
 {
struct net_device *ndev = concap - net_dev;
isdn_net_local *lp = (isdn_net_local *) ndev-priv;
@@ -71,7 +71,7 @@
return ret;
 }
 
-int isdn_concap_dl_disconn_req(struct concap_proto *concap)
+static int 

[PATCH] Auto-append localversion for BK users needs to use CONFIG_SHELL

2005-03-12 Thread Ryan Anderson
(trimming cc: down a bit)

On Thu, Mar 10, 2005 at 06:40:11AM +0100, Sam Ravnborg wrote:
 On Wed, Mar 09, 2005 at 06:25:56PM -0800, Linus Torvalds wrote:
  On Thu, 10 Mar 2005, Benjamin Herrenschmidt wrote:
   BTW, Linus: Any chance you ever change something to version or
   extraversion in bk just after a release ? I know I already ask and it
   degenerated into a flamefest, and I don't know if that is specifically
   the case now, but I keep getting report of people saying I have a bug
   in 2.6.xx while in fact, they have some kind of bk clone of sometime
   after 2.6.xx...
  
  The answer is the same: I'd still like to have somebody (preferably Sam)  
  who is comfortable with all the build scripts get a revision-control-
  specific version at build-time, so that BK users would get the top-of-tree 
  key value, and other people could get some CVS revision or something.
 
 I have a patch somewhere in my inbox, and got one from Ryan yesterday
 also. I will see if I during the weekend find some time to look at it.

Sam, you'll probably want this on top of the patch I sent.  (I haven't
built in a clean tree in a while, found a minor problem when I was
transitioning to quilt today.)

When running scripts/setlocalversion.sh, use $(CONFIG_SHELL) so the
executable bit doesn't need to be set.

Signed-off-by: Ryan Anderson [EMAIL PROTECTED]

Index: local-quilt/Makefile
===
--- local-quilt.orig/Makefile   2005-03-12 20:36:24.0 -0500
+++ local-quilt/Makefile2005-03-12 20:54:40.0 -0500
@@ -563,7 +563,7 @@
 
 ifeq ($(CONFIG_LOCALVERSION_AUTO),y)
ifeq ($(shell ls -d $(srctree)/BitKeeper 
2/dev/null),$(srctree)/BitKeeper)
-   localversion-bk := $(shell 
$(srctree)/scripts/setlocalversion.sh $(srctree) $(objtree))
+   localversion-bk := $(shell $(CONFIG_SHELL) 
$(srctree)/scripts/setlocalversion.sh $(srctree) $(objtree))
LOCALVERSION := $(LOCALVERSION)$(localversion-bk)
endif
 endif


-- 

Ryan Anderson
  sometimes Pug Majere
-
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: AGP bogosities

2005-03-12 Thread Dave Jones
On Sat, Mar 12, 2005 at 11:08:20PM -0500, Dave Jones wrote:
  On Sat, Mar 12, 2005 at 07:13:05PM -0800, Jesse Barnes wrote:
On Friday, March 11, 2005 7:58 pm, Dave Jones wrote:
   sgi-agp.c was sent to Dave about 2 weeks ago. I assumed he was 
  waiting
   for the TIO header files to make it from the ia64 tree into Linus's
   tree.

 Actually I just got swamped with other stuff, and dropped the ball.
 I still have the patch in my queue though, so I can push that along.

 Are those headers in mainline yet ?

Yeah, I think it's all there now.  Looks like Linus did a pull from ia64 
recently, so it *should* all build.
  
  Ok, pushed out to bk://linux-djb.bkbits.net/agpgart

Erk, Personality crisis, or an unfortunate typo. s/djb/dj/ obviously.

Dave
-
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 patch] drivers/isdn/hardware/avm/: misc cleanups

2005-03-12 Thread Adrian Bunk
This patch contains the following cleanups:
- make some needlessly global functions static
- b1dma.c __init/__exit the functions b1dma_{init,exit}

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch was already sent on:
- 6 Feb 2005

 drivers/isdn/hardware/avm/b1dma.c |4 ++--
 drivers/isdn/hardware/avm/c4.c|6 +++---
 drivers/isdn/hardware/avm/t1isa.c |2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

--- linux-2.6.11-rc3-mm1-full/drivers/isdn/hardware/avm/b1dma.c.old 
2005-02-05 15:40:43.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/hardware/avm/b1dma.c 2005-02-05 
15:42:32.0 +0100
@@ -955,7 +955,7 @@
 EXPORT_SYMBOL(b1dma_send_message);
 EXPORT_SYMBOL(b1dmactl_read_proc);
 
-int b1dma_init(void)
+static int __init b1dma_init(void)
 {
char *p;
char rev[32];
@@ -972,7 +972,7 @@
return 0;
 }
 
-void b1dma_exit(void)
+static void __exit b1dma_exit(void)
 {
 }
 
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/hardware/avm/c4.c.old
2005-02-05 15:42:47.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/hardware/avm/c4.c2005-02-05 
15:43:16.0 +0100
@@ -885,7 +885,7 @@
 }
 
 
-void c4_reset_ctr(struct capi_ctr *ctrl)
+static void c4_reset_ctr(struct capi_ctr *ctrl)
 {
avmcard *card = ((avmctrl_info *)(ctrl-driverdata))-card;
avmctrl_info *cinfo;
@@ -933,7 +933,7 @@
 /* - */
 
 
-void c4_register_appl(struct capi_ctr *ctrl,
+static void c4_register_appl(struct capi_ctr *ctrl,
u16 appl,
capi_register_params *rp)
 {
@@ -978,7 +978,7 @@
 
 /* - */
 
-void c4_release_appl(struct capi_ctr *ctrl, u16 appl)
+static void c4_release_appl(struct capi_ctr *ctrl, u16 appl)
 {
avmctrl_info *cinfo = (avmctrl_info *)(ctrl-driverdata);
avmcard *card = cinfo-card;
--- linux-2.6.11-rc3-mm1-full/drivers/isdn/hardware/avm/t1isa.c.old 
2005-02-05 15:43:33.0 +0100
+++ linux-2.6.11-rc3-mm1-full/drivers/isdn/hardware/avm/t1isa.c 2005-02-05 
15:43:41.0 +0100
@@ -328,7 +328,7 @@
return 0;
 }
 
-void t1isa_reset_ctr(struct capi_ctr *ctrl)
+static void t1isa_reset_ctr(struct capi_ctr *ctrl)
 {
avmctrl_info *cinfo = (avmctrl_info *)(ctrl-driverdata);
avmcard *card = cinfo-card;

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


[PATCH] Add sysfs support to the IPMI driver

2005-03-12 Thread Corey Minyard
The IPMI driver has long needed to tie into the device model (and I've 
long been hoping someone else would do it).  I finally gave up and spent 
the time to learn how to do it.  I think this is right, it seems to work 
on on my system.

-Corey
Add support for sysfs to the IPMI device interface.

Signed-off-by: Corey Minyard [EMAIL PROTECTED]

Index: linux-2.6.11-mm1/drivers/char/ipmi/ipmi_devintf.c
===
--- linux-2.6.11-mm1.orig/drivers/char/ipmi/ipmi_devintf.c
+++ linux-2.6.11-mm1/drivers/char/ipmi/ipmi_devintf.c
@@ -44,6 +44,7 @@
 #include linux/ipmi.h
 #include asm/semaphore.h
 #include linux/init.h
+#include linux/device.h
 
 #define IPMI_DEVINTF_VERSION v33
 
@@ -519,15 +520,24 @@
 		  interface.  Other values will set the major device number
 		  to that value.);
 
+static struct class_simple *ipmi_class;
+
 static void ipmi_new_smi(int if_num)
 {
+	char  name[10];
+	dev_t dev = MKDEV(ipmi_major, if_num);
+
 	devfs_mk_cdev(MKDEV(ipmi_major, if_num),
 		  S_IFCHR | S_IRUSR | S_IWUSR,
 		  ipmidev/%d, if_num);
+
+	snprintf(name, sizeof(name), ipmi%d, if_num);
+	class_simple_device_add(ipmi_class, dev, NULL, name);
 }
 
 static void ipmi_smi_gone(int if_num)
 {
+	class_simple_device_remove(MKDEV(ipmi_major, if_num));
 	devfs_remove(ipmidev/%d, if_num);
 }
 
@@ -548,8 +558,15 @@
 	printk(KERN_INFO ipmi device interface version 
 	   IPMI_DEVINTF_VERSION \n);
 
+	ipmi_class = class_simple_create(THIS_MODULE, ipmi);
+	if (IS_ERR(ipmi_class)) {
+		printk(KERN_ERR ipmi: can't register device class\n);
+		return PTR_ERR(ipmi_class);
+	}
+
 	rv = register_chrdev(ipmi_major, DEVICE_NAME, ipmi_fops);
 	if (rv  0) {
+		class_simple_destroy(ipmi_class);
 		printk(KERN_ERR ipmi: can't get major %d\n, ipmi_major);
 		return rv;
 	}
@@ -563,6 +580,7 @@
 	rv = ipmi_smi_watcher_register(smi_watcher);
 	if (rv) {
 		unregister_chrdev(ipmi_major, DEVICE_NAME);
+		class_simple_destroy(ipmi_class);
 		printk(KERN_WARNING ipmi: can't register smi watcher\n);
 		return rv;
 	}
@@ -573,6 +591,7 @@
 
 static __exit void cleanup_ipmi(void)
 {
+	class_simple_destroy(ipmi_class);
 	ipmi_smi_watcher_unregister(smi_watcher);
 	devfs_remove(DEVICE_NAME);
 	unregister_chrdev(ipmi_major, DEVICE_NAME);


Re: binary drivers and development

2005-03-12 Thread John Richard Moser
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

You wanna give me a quick run-down on x86 of CPL and Ring levels?  It's
been bugging me.  I know they're there and have a basic idea that they
control what a context can do, don't know what CPL stands for, and
there's a visible gap in my knowledge.  I like to understand everything,
it makes things easier.

Felipe Alfaro Solana wrote:
 On Thu, 10 Mar 2005 17:32:39 -0500, John Richard Moser
 [EMAIL PROTECTED] wrote:
 
CPL=3 scares me; context switches are expensive.  can they have direct
hardware access?  I'm sure a security model to isolate user mode drivers
could be in place. . .

. . . huh.  Xen seems to run Linux at CPL=3 and give direct hardware
access, so I guess user mode drivers are possible *shrug*.  Linux isn't
a microkernel though.
 
 
 Xen hypervisor runs at Ring0, while the guest OSs it supports run at Ring1.
 

- --
All content of all messages exchanged herein are left in the
Public Domain, unless otherwise explicitly stated.

Creative brains are a valuable, limited resource. They shouldn't be
wasted on re-inventing the wheel when there are so many fascinating
new problems waiting out there.
 -- Eric Steven Raymond
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCM8kShDd4aOud5P8RAon1AKCLNWEbY3Vq32k61m9jN2CbSoD98QCeJT8m
mhgyXtmGNFL+RPzJw8md9hE=
=B/i5
-END PGP SIGNATURE-
-
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: [CHECKER] inconsistent NFS stat cache (NFS on ext3, 2.6.11)

2005-03-12 Thread Trond Myklebust
lau den 12.03.2005 Klokka 03:56 (-0800) skreiv Junfeng Yang:
 Hi,
 
 We checked NFS on top of ext3 using FiSC (our file system model checker)
 and found a case where NFS stat cache can contain inconsistent entries.
 
 Basically, to trigger this inconsistency, just do the following steps:
 1. create a file A1, write a few bytes to it, so A1 is 4 words
 2. create a hard link A2, pointing to A1
 3. stat on A2. A2's size is 4 words
 4. truncate A1 to a larger size, write a few bytes at the end. now it's
 1031 words.
 5. stat on A2. it's size is still 4 words, which should be 1031 words
 
 We have a test case to re-create this warning.  You can download it at
 http://fisc.stanford.edu/bug16/crash.c.  It includes some sudo commands
 to mount nfs partitions, which you might want to change according to your
 local settings.
 
 cat /etc/exports shows:
 /mnt/sbd0-export  localhost(rw,sync)
 /mnt/sbd1-export  localhost(rw,sync)
 
 Let me know if you have any problems reproducing the warning. We'd
 appreciate any confirmations/clarifications.
 

This is a known problem. Turn off the (default - grrr) subtree checking
export option on the server, and it will all work properly. The subtree
checking option violates the NFS standards for filehandle generation in
so many ways, that it isn't even funny.

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/


IA32 (2.6.11 - 2005-03-12.16.00) - 56 New warnings

2005-03-12 Thread John Cherry
drivers/media/dvb/frontends/dvb-pll.c:104: warning: (near initialization for 
`dvb_pll_unknown_1.entries')
drivers/media/dvb/frontends/dvb-pll.c:104: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:105: warning: (near initialization for 
`dvb_pll_unknown_1.entries')
drivers/media/dvb/frontends/dvb-pll.c:105: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:106: warning: (near initialization for 
`dvb_pll_unknown_1.entries')
drivers/media/dvb/frontends/dvb-pll.c:106: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:107: warning: (near initialization for 
`dvb_pll_unknown_1.entries')
drivers/media/dvb/frontends/dvb-pll.c:107: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:108: warning: (near initialization for 
`dvb_pll_unknown_1.entries')
drivers/media/dvb/frontends/dvb-pll.c:108: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:109: warning: (near initialization for 
`dvb_pll_unknown_1.entries')
drivers/media/dvb/frontends/dvb-pll.c:109: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:110: warning: (near initialization for 
`dvb_pll_unknown_1.entries')
drivers/media/dvb/frontends/dvb-pll.c:110: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:111: warning: (near initialization for 
`dvb_pll_unknown_1.entries')
drivers/media/dvb/frontends/dvb-pll.c:111: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:112: warning: (near initialization for 
`dvb_pll_unknown_1.entries')
drivers/media/dvb/frontends/dvb-pll.c:112: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:38: warning: (near initialization for 
`dvb_pll_thomson_dtt7579.entries')
drivers/media/dvb/frontends/dvb-pll.c:38: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:39: warning: (near initialization for 
`dvb_pll_thomson_dtt7579.entries')
drivers/media/dvb/frontends/dvb-pll.c:39: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:40: warning: (near initialization for 
`dvb_pll_thomson_dtt7579.entries')
drivers/media/dvb/frontends/dvb-pll.c:40: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:41: warning: (near initialization for 
`dvb_pll_thomson_dtt7579.entries')
drivers/media/dvb/frontends/dvb-pll.c:41: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:42: warning: (near initialization for 
`dvb_pll_thomson_dtt7579.entries')
drivers/media/dvb/frontends/dvb-pll.c:42: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:53: warning: (near initialization for 
`dvb_pll_thomson_dtt7610.entries')
drivers/media/dvb/frontends/dvb-pll.c:53: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:54: warning: (near initialization for 
`dvb_pll_thomson_dtt7610.entries')
drivers/media/dvb/frontends/dvb-pll.c:54: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:55: warning: (near initialization for 
`dvb_pll_thomson_dtt7610.entries')
drivers/media/dvb/frontends/dvb-pll.c:55: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:73: warning: (near initialization for 
`dvb_pll_thomson_dtt759x.entries')
drivers/media/dvb/frontends/dvb-pll.c:73: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:74: warning: (near initialization for 
`dvb_pll_thomson_dtt759x.entries')
drivers/media/dvb/frontends/dvb-pll.c:74: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:75: warning: (near initialization for 
`dvb_pll_thomson_dtt759x.entries')
drivers/media/dvb/frontends/dvb-pll.c:75: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:76: warning: (near initialization for 
`dvb_pll_thomson_dtt759x.entries')
drivers/media/dvb/frontends/dvb-pll.c:76: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:77: warning: (near initialization for 
`dvb_pll_thomson_dtt759x.entries')
drivers/media/dvb/frontends/dvb-pll.c:77: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:78: warning: (near initialization for 
`dvb_pll_thomson_dtt759x.entries')
drivers/media/dvb/frontends/dvb-pll.c:78: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:89: warning: (near initialization for 
`dvb_pll_lg_z201.entries')
drivers/media/dvb/frontends/dvb-pll.c:89: warning: excess elements in array 
initializer
drivers/media/dvb/frontends/dvb-pll.c:90: warning: (near initialization for 
`dvb_pll_lg_z201.entries')
drivers/media/dvb/frontends/dvb-pll.c:90: warning: excess elements in array 
initializer

Re: [PATCH][RFC] Apply umask to /proc/pid

2005-03-12 Thread Paul Jackson
 patch below makes procfs apply the umask of the processes to their
 respective /proc/pid directories and the files below them.

Ugh ...

Since there are already various umask settings done by various
/etc/*profile* and /etc/*init* scripts that head up various logins and
task families, this means that the default visibility of tasks in ps and
top will change.  I predict confusion and frustration, when people don't
know why portions of ps or top output are suppressed.

And even when they figure it out, you don't give them anyway to get back
to the previous state - of visibility in ps, top and pstree, but file
creation permissions masked off in some way.

Nice small patch ... but I don't like overloading umask with this.

-- 
  I won't rest till it's the best ...
  Programmer, Linux Scalability
  Paul Jackson [EMAIL PROTECTED] 1.650.933.1373, 
1.925.600.0401
-
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: Bad patch to schedule()

2005-03-12 Thread Roland McGrath
 called from schedule(). The problem with this is that it completely
 messes up the register allocation for i386 schedule() because it 
 does long long arithmetic. This causes gcc to spill everything
 else because it needs four registers, and i386 only has 6 usable
 ones.

The generated code I've seen does not bear out this claim.  If you are
using ancient compilers and they produce poor code, then it is time to move
on.  If you are using some recent gcc, then you'll have to show the
concrete details since they don't match what I see.


Thanks,
Roland
-
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/


Feb/Mar Stats

2005-03-12 Thread Commission Dept.
To contact us, please do_not_replyto. 
See the bottom of this email to contact us by telephone or email. 


It's true. You will get stats emails like this very soon 

Quickly, send me an email or call me and you will get real com.miss.ion 
emails with this subject line and big, big comm_ission pa.yments from all
the bus_inesses you 
pro_mote. 

To pro.ve it, for a limit_ed per_iod I will give.you 10 sign_ups (that will

p.a.y. to j.o.i.n. your bus.in.ess) and I will not ask you for a sin.gle
cent/penny 
to get you star-ted. Use these to gen_erate an in.stant in.com_e. 

Then sitback  watch the_sign_ups join_you inst_antly in their droves and 
without you having to do much_at all. 

At the end of March you will get comm_ission state_ments showing that you 
have ear.ned tens_of thou_s_ands of doll_ars from your existing 
bus..iness.oppo.rtun.it.ies. 

Miss. this and def_in.it.ely miss.out on the ea-sie.st and fas.test mo.ney 
that you will ever ma.ke from your bu.sin_ess opp.or-tuni.ty 

You can call me on 00.44 - 791 - 365 - 8094 or +44. 791 - 365 - 8094 or
from USA 00.144 
791 - 365 - 8094 or email me on [EMAIL PROTECTED] 

Please ring my number if you can't get through via email. My number is a 
normal_rate UK mobile telephone. 

Good Luck Steve Browne 


If you want to stop getting my emails please send me an email to 
[EMAIL PROTECTED] with US in the subject. 

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


Re: [PATCH] Add sysfs support to the IPMI driver

2005-03-12 Thread Greg KH
On Sat, Mar 12, 2005 at 10:57:24PM -0600, Corey Minyard wrote:
 The IPMI driver has long needed to tie into the device model (and I've 
 long been hoping someone else would do it).  I finally gave up and spent 
 the time to learn how to do it.  I think this is right, it seems to work 
 on on my system.

Looks good.  One minor question:

 +
 + snprintf(name, sizeof(name), ipmi%d, if_num);
 + class_simple_device_add(ipmi_class, dev, NULL, name);

What do ipmi class devices live on?  pci devices?  i2c devices?
platform devices?  Or are they purely virtual things?

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/


indirect lcall without `*'

2005-03-12 Thread Hacksaw
In compiling 2.4.29 I get this during the compilation of pci-pc.c:

Warning: indirect lcall without `*'

I note from looking around the net that this is an old problem, dating back 
at least to 2.4.18, if not earlier.

What does it mean? Should I care? If I shouldn't, shouldn't there be a message 
somewhere in the build process that says This isn't a problem so people 
don't write to lkml and ask about it?

Thanks in advance for your time and consideration.
-- 
That which is impossible has become necessary.
http://www.hacksaw.org -- http://www.privatecircus.com -- KB1FVD


-
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] Fix warning in gkc (make gconfig) {Scanned}

2005-03-12 Thread Andrew Morton
Sam Ravnborg [EMAIL PROTECTED] wrote:

 On Wed, Mar 09, 2005 at 09:36:12AM +0100, Romain Lievin wrote:
  Hi,
  
  this patch against 2.6.11-rc3 fixes some warnings about GtkToolButton in gkc
  (the GTK Kernel Configurator).
 
 Applied, 2 warnings fixed - 10 more to go.
 Care to take a look at them?
 Also gconfig does not support setting localversion - is this something you
 can fix too?
 

fyi, gconfig doesn't display those cute little pixmap buttons any more. 
That bug was introduced by the patch make gconfig work with gtk-2.4.

I'm planning on simply reverting that patch.  Which should motivate someone
to have another go at fixing it for gtk2.4.

-
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][2.6.11-mm3] perfctr ia32 syscalls on x86-64 fix

2005-03-12 Thread Andrew Morton
Mikael Pettersson [EMAIL PROTECTED] wrote:

 The ia32 perfctr syscalls were moved due to addition of ioprio
  syscalls, but the ia32 emulation code in x86-64 wasn't updated.

Ho hum.  The perfctr syscall API has changed so many times that whenever
someone adds a syscall I have rejects to fix up in probably ten different
patches.

It would be nice to start folding these patches together a bit to reduce
such problems, but that's rather non-trivial because there is no way to
simply join these patches together which maintains a sensible sequencing.

If we're going to do anything then it's either a major refactoring, or
simply wham the entire feature into a single diff.  That diff could then be
split into four patches: core, ppc, x86 and x86_64.  We would lose the
layering between ye olde perfctr, the inheritance implementation, the syfs
API, etc.  I could live with that.

What do you think?
-
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: [CHECKER] crash + fsck cause file systems to contain loops (msdos and vfat, 2.6.11)

2005-03-12 Thread Junfeng Yang
 Interesting.

 $ /devel/linux/works/fatfs/fatfstools/dosfstools-2.10/dosfsck/dosfsck -a 
 bug10/crash.img
 dosfsck 2.10, 22 Sep 2003, FAT32, LFN
 /0006
   Directory does not have any cluster  (. and ..).
   Dropping it.
 Reclaimed 3 unused clusters (6144 bytes) in 3 chains.
 Performing changes.
 crash.img: 8 files, 3/8167 clusters

 My fixed dosfsck found the above corruption in bug10/crash.img (bug7
 has same corruption). And probably you can see root directory via 0006
 directory, I guess your testing tree didn't have my patches yet (seems
 old behavior).

I'm using dosfsck 2.10, 22 Sep 2003, FAT32, LFN, and yes, I do see root
directory after I run dosfsck on the crashed disk image.  I'm checking
2.6.11.  By your testing tree didn't have my patches yet, you mean you
have the patch but haven't made it public?  This testing tree is the
Linux source tree?  Can you be a little bit more specific?

 BTW, what mount options did you use?

I just used default mount.  mount -t msdos source target
no -o

Thanks,
-Junfeng

-
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: nvidia fb licensing issue.

2005-03-12 Thread Andrew Morton
Dave Jones [EMAIL PROTECTED] wrote:

 The nvidia framebuffer code added recently is marked as
  MODULE_LICENSE(GPL), but some things seem a little odd to me..
 
  1. The boilerplate at the top of drivers/video/nvidia/nv_dma.h,
 drivers/video/nvidia/nv_local.h, and drivers/video/nvidia/nv_hw.c
 doesn't seem to be a GPL-compatible license. It seems to be an nvidia
 specific license with an advertising clause, and something that
 adds restrictions on rights of U.S. Govt end users.
 
  2. Some of these files clearly came from XFree86 judging from
 the CVS idents in the source.  Was this XFree86 code
 dual-licensed by its original authors ? If so, it isn't clear.

Does

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11/2.6.11-mm3/broken-out/fbdev-nvidia-licensing-clarification.patch

clear things up?
-
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/


[KBUILD] Bug in make deb-pkg when using seperate source and object directories

2005-03-12 Thread Ryan Anderson
Sam,

When running make O=something deb-pkg, I get a failure that claims I
haven't configured my kernel (I have).  Running it a second time tells
me to run make mrproper  (include/linux/version.h got built on the
first run)

I did some preliminary poking around, but kbuild is still, well, mostly
magic to me - I can't see where the object directory is getting lost.

Think you can take a look?  (Note, this failure shouldn't require
anything Debian specific on your system to trigger - it's failing, as
far as I can tell, on the $(MAKE) right before the call build the
builddeb script, so it should be easy to reproduce)

The log of when I run it follows:

[EMAIL PROTECTED] ~/dev/linux/local-quilt$ blocal deb-pkg
make
make -C /home/ryan/dev/linux/local-quilt
O=/home/ryan/dev/linux/output/local
Makefile:487: .config: No such file or directory
  Using /home/ryan/dev/linux/local-quilt as source for kernel
  CHK include/linux/version.h
  UPD include/linux/version.h
  SYMLINK include/asm - include/asm-i386
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/split-include
  HOSTCC  scripts/basic/docproc
  SHIPPED scripts/kconfig/zconf.tab.h
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/lex.zconf.c
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -s arch/i386/Kconfig
***
*** You have not yet configured your kernel!
***
*** Please run some configurator (e.g. make oldconfig or
*** make menuconfig or make xconfig).
***
make[6]: *** [silentoldconfig] Error 1
make[5]: *** [silentoldconfig] Error 2
make[4]: *** [include/linux/autoconf.h] Error 2
make[3]: *** [all] Error 2
make[2]: *** [deb-pkg] Error 2
make[1]: *** [deb-pkg] Error 2
make: *** [deb-pkg] Error 2

blocal is a simple wrapper to cut down on retyping things, it's just
this:

[EMAIL PROTECTED] ~/dev/linux/local-quilt$ cat /home/ryan/bin/blocal
#!/bin/bash -e

PWD=`pwd`

if [ $PWD != /home/ryan/dev/linux/local-quilt ]; then
cd /home/ryan/dev/linux/local-quilt
fi

make O=../output/local/ -j4 CC=ccache distcc $*



-- 

Ryan Anderson
  sometimes Pug Majere
-
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: [CHECKER] sync doesn't flush everything out (msdos and vfat, 2.6.11)

2005-03-12 Thread Junfeng Yang
 vfat and msdos doesn't support the link(), and the truncate() which
 extends size is not supported yet.

 This test seems to calling abort(0) by CHECK(ret)...

I updated the test case (basically just set CHECk to be a NOP).  Can you
please download and re-run the test case?  After reboot, run dosfsck -a on
the crashed disk, you'll see some output like:

dosfsck 2.10, 22 Sep 2003, FAT32, LFN
/å004  and
/0005
  share clusters.
  Truncating second to 0 bytes.
/0005
  File size is 4 bytes, cluster chain length is 0 bytes.
  Truncating file to 0 bytes.
Performing changes.
/dev/sbd0: 5 files, 4/8167 clusters

This causes file /0005 to be truncated to 0.

-Junfeng

-
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: [CHECKER] inconsistent NFS stat cache (NFS on ext3, 2.6.11)

2005-03-12 Thread Junfeng Yang
 This is a known problem. Turn off the (default - grrr) subtree checking
 export option on the server, and it will all work properly. The subtree
 checking option violates the NFS standards for filehandle generation in
 so many ways, that it isn't even funny.

Thanks Trond.  no_subtree_check fixes the problem.

-Junfeng

-
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: OSS Audio borked between 2.6.6 and 2.6.10

2005-03-12 Thread Patrick McFarland
On Saturday 12 March 2005 01:31 pm, Greg Stark wrote:
 OSS Audio doesn't work properly for Quake3 in 2.6.10 but it worked in
 2.6.6. In fact I have the same problems in 2.6.9-rc1 so I assume 2.6.9 is
 affected as well. This is with the Intel i810 drivers.

Why are you not using ALSA?

-- 
Patrick Diablo-D3 McFarland || [EMAIL PROTECTED]
Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd 
all be running around in darkened rooms, munching magic pills and listening to
repetitive electronic music. -- Kristian Wilson, Nintendo, Inc, 1989


pgpaDSbDHwdcP.pgp
Description: PGP signature


Re: Last night Linus bk - netfilter busted?

2005-03-12 Thread Dmitry Torokhov
On Friday 11 March 2005 17:55, Patrick McHardy wrote:
 Herbert Xu wrote:
  Patrick McHardy [EMAIL PROTECTED] wrote:
  
 You're right, good catch. IPT_RETURN is interpreted internally by
 ip_tables, but since the value changed it isn't recognized by ip_tables
 anymore and returned to nf_iterate() as NF_REPEAT. This patch restores
 the old value.
  
  
  Please fix netfilter_arp while you're at it since it does exactly
  the same thing.
 
 New patch attached, thanks.
 

If this is of any interest, yesterday's pull from Linux plus this patch
seem to be working fine here.

Thank you.

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


[CHECKER] NFS on JFS doesn't sync all file system operations (NFS on JFS, 2.6.11)

2005-03-12 Thread Junfeng Yang

Hi,

FiSC found that at link operation and unlink operation on a NFS partion on
top of JFS are not sync'ed.   These warnings show up in JFS but not in
ext2, ext3, so I suspect it's a potential JFS problem.

cat /etc/exports shows:
/mnt/sbd0-export  localhost(rw,sync,no_subtree_check)
/mnt/sbd1-export  localhost(rw,sync,no_subtree_check)

test cases can be found at:

http://fisc.stanford.edu/bug17/crash.c
http://fisc.stanford.edu/bug17/crash-unlink.c

Thanks,
-Junfeng

-
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 ppc32: move powermac backlight stuff to a workqueue

2005-03-12 Thread Benjamin Herrenschmidt
On Fri, 2005-03-11 at 16:39 +1100, Benjamin Herrenschmidt wrote:
 Hi !
 
 The powermac has a kernel-based driver for controlling the backlight
 from the keyboard that used to call into some fbdev's from interrupt
 contexts. This patch moves it to a workqueue (and additionally makes
 sure the console semaphore is taken and held).
 
 I hope I'll replace this by the new backlight framework in a future
 kernel version, but for now, this will fix the immediate issues with
 radeon.
 

It was a bad day for me last week, this one also missed a quilt ref
and thus wasn't the good version of the patch. Harmless, but useless
warnings too. This one replaces it.

Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]

Index: linux-work/arch/ppc/platforms/pmac_backlight.c
===
--- linux-work.orig/arch/ppc/platforms/pmac_backlight.c 2005-01-24 
17:09:23.0 +1100
+++ linux-work/arch/ppc/platforms/pmac_backlight.c  2005-03-13 
18:00:19.0 +1100
@@ -12,6 +12,7 @@
 #include linux/stddef.h
 #include linux/reboot.h
 #include linux/nvram.h
+#include linux/console.h
 #include asm/sections.h
 #include asm/ptrace.h
 #include asm/io.h
@@ -25,14 +26,19 @@
 #include linux/adb.h
 #include linux/pmu.h
 
-static struct backlight_controller *backlighter = NULL;
-static void* backlighter_data = NULL;
-static int backlight_autosave = 0;
+static struct backlight_controller *backlighter;
+static void* backlighter_data;
+static int backlight_autosave;
 static int backlight_level = BACKLIGHT_MAX;
 static int backlight_enabled = 1;
+static int backlight_req_level = -1;
+static int backlight_req_enable = -1;
 
-void __pmac
-register_backlight_controller(struct backlight_controller *ctrler, void *data, 
char *type)
+static void backlight_callback(void *);
+static DECLARE_WORK(backlight_work, backlight_callback, NULL);
+
+void __pmac register_backlight_controller(struct backlight_controller *ctrler,
+ void *data, char *type)
 {
struct device_node* bk_node;
char *prop;
@@ -83,16 +89,18 @@
backlight_level = req.reply[0]  4;
}
 #endif
+   acquire_console_sem();
if (!backlighter-set_enable(1, backlight_level, data))
backlight_enabled = 1;
+   release_console_sem();
 
-   printk(KERN_INFO Registered \%s\ backlight controller, level: 
%d/15\n,
-   type, backlight_level);
+   printk(KERN_INFO Registered \%s\ backlight controller,
+  level: %d/15\n, type, backlight_level);
 }
 EXPORT_SYMBOL(register_backlight_controller);
 
-void __pmac
-unregister_backlight_controller(struct backlight_controller *ctrler, void 
*data)
+void __pmac unregister_backlight_controller(struct backlight_controller
+   *ctrler, void *data)
 {
/* We keep the current backlight level (for now) */
if (ctrler == backlighter  data == backlighter_data)
@@ -100,22 +108,32 @@
 }
 EXPORT_SYMBOL(unregister_backlight_controller);
 
-int __pmac
-set_backlight_enable(int enable)
+static int __pmac __set_backlight_enable(int enable)
 {
int rc;
 
if (!backlighter)
return -ENODEV;
-   rc = backlighter-set_enable(enable, backlight_level, backlighter_data);
+   acquire_console_sem();
+   rc = backlighter-set_enable(enable, backlight_level,
+backlighter_data);
if (!rc)
backlight_enabled = enable;
+   release_console_sem();
return rc;
 }
+int __pmac set_backlight_enable(int enable)
+{
+   if (!backlighter)
+   return -ENODEV;
+   backlight_req_enable = enable;
+   schedule_work(backlight_work);
+   return 0;
+}
+
 EXPORT_SYMBOL(set_backlight_enable);
 
-int __pmac
-get_backlight_enable(void)
+int __pmac get_backlight_enable(void)
 {
if (!backlighter)
return -ENODEV;
@@ -123,8 +141,7 @@
 }
 EXPORT_SYMBOL(get_backlight_enable);
 
-int __pmac
-set_backlight_level(int level)
+static int __pmac __set_backlight_level(int level)
 {
int rc = 0;
 
@@ -134,10 +151,12 @@
level = BACKLIGHT_OFF;
if (level  BACKLIGHT_MAX)
level = BACKLIGHT_MAX;
+   acquire_console_sem();
if (backlight_enabled)
rc = backlighter-set_level(level, backlighter_data);
if (!rc)
backlight_level = level;
+   release_console_sem();
if (!rc  !backlight_autosave) {
level =1;
if (level  0x10)
@@ -146,13 +165,38 @@
}
return rc;
 }
+int __pmac set_backlight_level(int level)
+{
+   if (!backlighter)
+   return -ENODEV;
+   backlight_req_level = level;
+   schedule_work(backlight_work);
+   return 0;
+}
+
 EXPORT_SYMBOL(set_backlight_level);
 
-int __pmac
-get_backlight_level(void)
+int __pmac get_backlight_level(void)
 {
 

Re: binary drivers and development

2005-03-12 Thread Mike Galbraith
At 12:01 AM 3/13/2005 -0500, John Richard Moser wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
You wanna give me a quick run-down on x86 of CPL and Ring levels?  It's
been bugging me.  I know they're there and have a basic idea that they
control what a context can do, don't know what CPL stands for, and
there's a visible gap in my knowledge.  I like to understand everything,
it makes things easier.
http://appzone.intel.com/literature/index.asp to locate the Intel processor 
of your choice, or 
http://developer.intel.com/design/pentium4/manuals/index_new.htm#sdm_vol1 
for P4.

-Mike 

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


[CHECKER] Need help on mmap on FUSE (linux user-land file system)

2005-03-12 Thread Junfeng Yang

Does anyone know how to set up mmap on FUSE (linux user-land file system)?
Or is it even possible to have mmap on FUSE?

Our file system checker can potentially check a lot more things if we can
have mmap working on a FUSE file system.  Your help on this are well
appreciated!

-Junfeng

-
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: [MC] [CHECKER] Need help on mmap on FUSE (linux user-land file system)

2005-03-12 Thread Junfeng Yang

Forget to mention, we are checking linux 2.6.  It appears to us that mmap
doesnt' work for FUSE in linux 2.6.

-Junfeng

On Sat, 12 Mar 2005, Junfeng Yang wrote:


 Does anyone know how to set up mmap on FUSE (linux user-land file system)?
 Or is it even possible to have mmap on FUSE?

 Our file system checker can potentially check a lot more things if we can
 have mmap working on a FUSE file system.  Your help on this are well
 appreciated!

 -Junfeng


 ___
 MC mailing list
 [EMAIL PROTECTED]
 http://keeda.stanford.edu/cgi-bin/mailman/listinfo/mc


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


Linux 2.6.11.3

2005-03-12 Thread Greg KH
As there were no complaints about the patches posted a few days ago,
I've released 2.6.11.3 with them in it.

It's available now in the normal kernel.org places:
kernel.org/pub/linux/kernel/v2.6/patch-2.6.11.3.gz
which is a patch against the 2.6.11 release (note, this is different
than before, and should fix all of the previous complaints.)

I've also rediffed the 2.6.11.2 patch against the 2.6.11 release,
instead of the 2.6.11.1 release, and updated it.  There are incremental
patches between the 2.6.11.y releases at:
kernel.org/pub/linux/kernel/v2.6/incr

If anyone has any issues with the way the patches are diffed, please let
me know.

A detailed changelog can be found at:
kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.11.3

A bitkeeper tree for the 2.6.11.y releases can be found at:
bk://linux-release.bkbits.net/linux-2.6.11

The diffstat and short summary of the fixes are below.  

I'll also be replying to this message with a copy of the patch between
2.6.11.2 and 2.6.11.3, as it is small enough to do so.

thanks,
 
greg k-h

---

 Makefile   |2 +-
 arch/ppc/oprofile/op_model_fsl_booke.c |3 +--
 arch/ppc/platforms/4xx/ebony.h |4 ++--
 arch/ppc/platforms/4xx/luan.h  |6 +++---
 arch/ppc/platforms/4xx/ocotea.h|4 ++--
 drivers/char/drm/drm_ioctl.c   |2 ++
 drivers/media/video/adv7170.c  |2 +-
 drivers/media/video/adv7175.c  |2 +-
 drivers/media/video/bt819.c|2 +-
 drivers/media/video/saa7110.c  |   33 -
 drivers/media/video/saa7114.c  |2 +-
 drivers/media/video/saa7185.c  |2 +-
 drivers/net/r8169.c|   17 ++---
 drivers/net/sis900.c   |   30 ++
 drivers/net/via-rhine.c|3 +++
 drivers/pci/hotplug/pciehp_ctrl.c  |3 ++-
 fs/cramfs/inode.c  |1 +
 net/ipv4/tcp_timer.c   |1 +
 18 files changed, 63 insertions(+), 56 deletions(-)


Summary of changes from v2.6.11.2 to v2.6.11.3
==

Alexander Nyberg:
  o PCI: fix hotplug double free

David S. Miller:
  o [TCP]: Put back tcp_timer_bug_msg[] symbol export

Egbert Eich:
  o drm missing memset can crash X server

Eric Lammerts:
  o cramfs: small stat(2) fix

Greg Kroah-Hartman:
  o Linux 2.6.11.3

Herbert Xu:
  o sis900 kernel oops fix

Jean Delvare:
  o fix amd64 2.6.11 oops on modprobe (saa7110)
  o Fix i2c messsage flags in video drivers

Kumar Gala:
  o ppc32: trivial fix for e500 oprofile build

Matt Porter:
  o ppc32: Compilation fixes for Ebony, Luan and Ocotea

Olof Johansson:
  o [VIA RHINE] older chips oops on shutdown

Stephen Hemminger:
  o r8169: receive descriptor length fix

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

2005-03-12 Thread Greg KH
diff -Nru a/Makefile b/Makefile
--- a/Makefile  2005-03-12 22:45:06 -08:00
+++ b/Makefile  2005-03-12 22:45:06 -08:00
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 11
-EXTRAVERSION = .2
+EXTRAVERSION = .3
 NAME=Woozy Numbat
 
 # *DOCUMENTATION*
diff -Nru a/arch/ppc/oprofile/op_model_fsl_booke.c 
b/arch/ppc/oprofile/op_model_fsl_booke.c
--- a/arch/ppc/oprofile/op_model_fsl_booke.c2005-03-12 22:45:06 -08:00
+++ b/arch/ppc/oprofile/op_model_fsl_booke.c2005-03-12 22:45:06 -08:00
@@ -150,7 +150,6 @@
int is_kernel;
int val;
int i;
-   unsigned int cpu = smp_processor_id();
 
/* set the PMM bit (see comment below) */
mtmsr(mfmsr() | MSR_PMM);
@@ -162,7 +161,7 @@
val = ctr_read(i);
if (val  0) {
if (oprofile_running  ctr[i].enabled) {
-   oprofile_add_sample(pc, is_kernel, i, cpu);
+   oprofile_add_pc(pc, is_kernel, i);
ctr_write(i, reset_value[i]);
} else {
ctr_write(i, 0);
diff -Nru a/arch/ppc/platforms/4xx/ebony.h b/arch/ppc/platforms/4xx/ebony.h
--- a/arch/ppc/platforms/4xx/ebony.h2005-03-12 22:45:06 -08:00
+++ b/arch/ppc/platforms/4xx/ebony.h2005-03-12 22:45:06 -08:00
@@ -61,8 +61,8 @@
  */
 
 /* OpenBIOS defined UART mappings, used before early_serial_setup */
-#define UART0_IO_BASE  (u8 *) 0xE200
-#define UART1_IO_BASE  (u8 *) 0xE300
+#define UART0_IO_BASE  0xE200
+#define UART1_IO_BASE  0xE300
 
 /* external Epson SG-615P */
 #define BASE_BAUD  691200
diff -Nru a/arch/ppc/platforms/4xx/luan.h b/arch/ppc/platforms/4xx/luan.h
--- a/arch/ppc/platforms/4xx/luan.h 2005-03-12 22:45:06 -08:00
+++ b/arch/ppc/platforms/4xx/luan.h 2005-03-12 22:45:06 -08:00
@@ -47,9 +47,9 @@
 #define RS_TABLE_SIZE  3
 
 /* PIBS defined UART mappings, used before early_serial_setup */
-#define UART0_IO_BASE  (u8 *) 0xa200
-#define UART1_IO_BASE  (u8 *) 0xa300
-#define UART2_IO_BASE  (u8 *) 0xa600
+#define UART0_IO_BASE  0xa200
+#define UART1_IO_BASE  0xa300
+#define UART2_IO_BASE  0xa600
 
 #define BASE_BAUD  11059200
 #define STD_UART_OP(num)   \
diff -Nru a/arch/ppc/platforms/4xx/ocotea.h b/arch/ppc/platforms/4xx/ocotea.h
--- a/arch/ppc/platforms/4xx/ocotea.h   2005-03-12 22:45:06 -08:00
+++ b/arch/ppc/platforms/4xx/ocotea.h   2005-03-12 22:45:06 -08:00
@@ -56,8 +56,8 @@
 #define RS_TABLE_SIZE  2
 
 /* OpenBIOS defined UART mappings, used before early_serial_setup */
-#define UART0_IO_BASE  (u8 *) 0xE200
-#define UART1_IO_BASE  (u8 *) 0xE300
+#define UART0_IO_BASE  0xE200
+#define UART1_IO_BASE  0xE300
 
 #define BASE_BAUD  11059200/16
 #define STD_UART_OP(num)   \
diff -Nru a/drivers/char/drm/drm_ioctl.c b/drivers/char/drm/drm_ioctl.c
--- a/drivers/char/drm/drm_ioctl.c  2005-03-12 22:45:06 -08:00
+++ b/drivers/char/drm/drm_ioctl.c  2005-03-12 22:45:06 -08:00
@@ -326,6 +326,8 @@
 
DRM_COPY_FROM_USER_IOCTL(sv, argp, sizeof(sv));
 
+   memset(version, 0, sizeof(version));
+
dev-driver-version(version);
retv.drm_di_major = DRM_IF_MAJOR;
retv.drm_di_minor = DRM_IF_MINOR;
diff -Nru a/drivers/media/video/adv7170.c b/drivers/media/video/adv7170.c
--- a/drivers/media/video/adv7170.c 2005-03-12 22:45:06 -08:00
+++ b/drivers/media/video/adv7170.c 2005-03-12 22:45:06 -08:00
@@ -130,7 +130,7 @@
u8 block_data[32];
 
msg.addr = client-addr;
-   msg.flags = client-flags;
+   msg.flags = 0;
while (len = 2) {
msg.buf = (char *) block_data;
msg.len = 0;
diff -Nru a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c
--- a/drivers/media/video/adv7175.c 2005-03-12 22:45:06 -08:00
+++ b/drivers/media/video/adv7175.c 2005-03-12 22:45:06 -08:00
@@ -126,7 +126,7 @@
u8 block_data[32];
 
msg.addr = client-addr;
-   msg.flags = client-flags;
+   msg.flags = 0;
while (len = 2) {
msg.buf = (char *) block_data;
msg.len = 0;
diff -Nru a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c
--- a/drivers/media/video/bt819.c   2005-03-12 22:45:06 -08:00
+++ b/drivers/media/video/bt819.c   2005-03-12 22:45:06 -08:00
@@ -146,7 +146,7 @@
u8 block_data[32];
 
msg.addr = client-addr;
-   msg.flags = client-flags;
+   msg.flags = 0;
while (len = 2) {
msg.buf = (char *) block_data;
msg.len = 0;
diff -Nru a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c
--- a/drivers/media/video/saa7110.c 2005-03-12 22:45:06 

Re: Linux 2.6 : physical memory address and pid

2005-03-12 Thread Robert Hancock
Allison wrote:
Thanks for the answer! 

Another related question :
I need to gather all application pages by reading the page tables. 
The hard part is, I need to do this from a PCI device using DMA.  As I
understand it,  when a DMA is being performed, the pages are pinned in
memory . Since the PCI device has grabbed the bus, the processor is
not able to access memory to perform page replacement right ?
So, this is a form of mutual exclusion.
I don't think it works this way - if the system is modifying the pages 
which you're trying to do DMA reads on, you'll just read whatever data 
happens to be in memory at the time. The CPU is not locked out just 
because that memory is being read by a DMA transfer.

However, if I have to fetch the page struct, the process address space
of the process owning the page (I am ignoring shared pages to make
things simpler) and the page itself, will a scatter gather DMA make
sure that  the processor cannot modify any of these data structures
till the DMA is complete ? I am using Linux 2.6 and the i386
architecture.
As above, I don't think anything ensures this. Doing DMA reads on pages 
that could potentially be being modified during the transfer isn't 
something that is typically done..
-
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 3/6] PCI Express Advanced Error Reporting Driver

2005-03-12 Thread Greg KH
On Fri, Mar 11, 2005 at 04:14:40PM -0800, long wrote:
 This patch includes the source code of event-logged component of PCI
 Express Advanced Error Reporting driver.
 
 Signed-off-by: T. Long Nguyen [EMAIL PROTECTED]
 
 
 diff -urpN linux-2.6.11-rc5/drivers/pci/pcie/aer/aerdrv_event.c 
 patch-2.6.11-rc5-aerc3-split3/drivers/pci/pcie/aer/aerdrv_event.c
 --- linux-2.6.11-rc5/drivers/pci/pcie/aer/aerdrv_event.c  1969-12-31 
 19:00:00.0 -0500
 +++ patch-2.6.11-rc5-aerc3-split3/drivers/pci/pcie/aer/aerdrv_event.c 
 2005-03-09 13:26:28.0 -0500
 @@ -0,0 +1,752 @@
 +/*
 + * Copyright (C) 2005 Intel
 + * Copyright (C) Tom Long Nguyen ([EMAIL PROTECTED])
 + *
 + */
 +
 +#include linux/module.h
 +#include linux/pci.h
 +#include linux/kernel.h
 +#include linux/errno.h
 +#include linux/pm.h
 +#include linux/suspend.h
 +
 +#include aerdrv.h
 +
 +LIST_HEAD(evt_queue);/* Define Event Queue List */

Make this static?


 +/**
 + * evt_queue_push - store an event node into an event log list 
 + * @node: pointer to an event log node
 + *
 + * Invoked when a new error being recorded
 + **/
 +static void evt_queue_push(struct event_node *node)
 +{
 + struct list_head *head = evt_queue;
 + struct event_node *tmp = NULL;
 +
 + /* Lock access into an error event queue */
 + down(evt_sema);
 + if (records  eventlog_size) {
 + /* Exceed event log buffer size. Delete oldest one. */
 + tmp = container_of(head-next, struct event_node, e_node);
 + list_del(tmp-e_node);
 + } else
 + records++;
 + list_add_tail(node-e_node, head); 
 + up(evt_sema);  
 + if (tmp) 
 + free_node(tmp);
 +
 + /* Wake up event parsing thread */
 + if (aer_get_auto_mode())
 + wake_up(kevtd_wait);
 +}
 +
 +/**
 + * evt_queue_pop - restore an event node from an event log list 
 + * @where: either from top or bottom of a list
 + *
 + * Invoked when an error being consumed
 + **/
 +static struct event_node* evt_queue_pop(int where)
 +{
 + struct list_head *head = evt_queue;
 + struct event_node *evt_node = NULL;
 +
 + if (!list_empty(head)) {
 + head = ((where == GET_ERR_RECORD_TOP) ? head-prev : 
 head-next);
 + evt_node = container_of(head, struct event_node, e_node);
 + list_del(evt_node-e_node);
 + records--;
 + }
 +
 + return evt_node;
 +}

The lock is not held in the pop, like it is in the push function.  Any
reason for this?

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: [PATCH 2/6] PCI Express Advanced Error Reporting Driver

2005-03-12 Thread Greg KH
On Fri, Mar 11, 2005 at 04:13:33PM -0800, long wrote:
 +static ssize_t aer_sysfs_consume_show(struct device_driver *dev, char *buf)
 +{
 + return aer_fsprint_record(buf);
 +}
 + 
 +static ssize_t aer_sysfs_status_show(struct device_driver *dev, char *buf)
 +{
 + return aer_fsprint_devices(buf);
 +}
 + 

Why call wrapper functions that only do one thing?  Why have this extra
layer of indirection that is not needed from what I can tell?

 +static ssize_t aer_sysfs_verbose_show(struct device_driver *dev, char *buf)
 +{
 + return sprintf(buf, Verbose display set to %d\n, 
 + aer_get_verbose()); 
 +}

Just echo the value, don't print out pretty strings :)

 +static ssize_t aer_sysfs_verbose_store(struct device_driver *drv,
 + const char *buf, size_t count)  
 +{
 + aer_set_verbose(buf[0] - 0x30); 
 + return count;   
 +}

Oh, that's a problem waiting to happen... Please validate the user
provided value before acting on it.

 +static ssize_t aer_sysfs_auto_show(struct device_driver *dev, char *buf)
 +{
 + return sprintf(buf, Automatic reporting is %s\n,  
 + (aer_get_auto_mode()) ? on : off);  
 +}

Again, just print on/off.

 +static ssize_t aer_sysfs_auto_store(struct device_driver *drv,   
 + const char *buf, size_t count)  
 +{
 + aer_set_auto_mode(buf[0] - 0x30);   
 + return count;   
 +}

Also validate this.

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: [PATCH 0/6] PCI Express Advanced Error Reporting Driver

2005-03-12 Thread Greg KH
On Fri, Mar 11, 2005 at 04:10:28PM -0800, long wrote:
 
 - Report the errors to user.

This is done through the syslog, right?  Is that acceptable?

It looks like you are logging a lot of stuff, all without a kernel log
level, which is going to really mess up syslog parsers.

Have you thought about just providing userspace with access to the error
message, in binary form, from a sysfs file, and causing a kevent to wake
userspace up to know to read from the file?  That way all of the parsing
of the error log can be done in userspace, and there is no formatting of
the messages from within the kernel.

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: [PATCH 5/6] PCI Express Advanced Error Reporting Driver

2005-03-12 Thread Greg KH
On Fri, Mar 11, 2005 at 04:16:54PM -0800, long wrote:
 This patch includes the source code of core component of PCI Express
 Advanced Error Reporting driver.
 
 Signed-off-by: T. Long Nguyen [EMAIL PROTECTED]
 
 
 diff -urpN linux-2.6.11-rc5/drivers/pci/pcie/aer/aerdrv_core.c 
 patch-2.6.11-rc5-aerc3-split5/drivers/pci/pcie/aer/aerdrv_core.c
 --- linux-2.6.11-rc5/drivers/pci/pcie/aer/aerdrv_core.c   1969-12-31 
 19:00:00.0 -0500
 +++ patch-2.6.11-rc5-aerc3-split5/drivers/pci/pcie/aer/aerdrv_core.c  
 2005-03-10 10:31:09.0 -0500
 @@ -0,0 +1,911 @@
 +/*
 + * Copyright (C) 2005 Intel
 + * Copyright (C) Tom Long Nguyen ([EMAIL PROTECTED])
 + *
 + */
 +
 +#include linux/module.h
 +#include linux/pci.h
 +#include linux/kernel.h
 +#include linux/errno.h
 +#include linux/pm.h
 +#include linux/rtc.h
 +#include linux/suspend.h
 +#include linux/acpi.h
 +#include linux/pci-acpi.h
 +#include aerdrv.h
 +
 +LIST_HEAD(rc_list);  /* Define Root Complex List */

Static?


-
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] Prefaulting

2005-03-12 Thread Arjan van de Ven

 From a quick peek it seems that the patch makes negligible difference for a
 kernel compilation when prefaulting 1-2 pages and slows the workload down
 quite a lot when prefaulting up to 16 pages.

well the last time I saw prefaulting experiments (Ingo was involved
iirc) the problem was that the hitrate for the prefaults was such that
the costs for tearing down the extra redundant rmap chains was more
expensive than taking the extra faults. It seems linux has pretty
cheap faulting logic invalidating some of traditional OS assumptions... 

(fwiw one of the worst tests I remember was doing a lot of very short
shell script executions; the case where bash lives briefly so that you
get maximum cost for the extra teardowns while not a lot of bash gets
run so prefaulting doesn't make a lot of difference)


-
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/6] PCI Express Advanced Error Reporting Driver

2005-03-12 Thread Andi Kleen
long [EMAIL PROTECTED] writes:

I haven't read your code in detail, just a high level remark.

 +6. Enabling AER Aware Support in PCI Express Device Driver
 +
 +To enable AER aware support requires a software driver to configure
 +the AER capability structure within its device, to initialize its AER
 +aware callback handle and to call pcie_aer_register. Sections 6.1,
 +6.2, and 6.3 describe how to enable AER aware support in details.

[...]

There is currently discussion underway for a generic portable PCI 
error reporting interface for drivers. This is already being worked
on by some PPC64 and IA64 people. I don't think it would be a good idea
to add another incompatible PCI-E specific interface.

So I would recommend to not apply pcie_aer_register() et.al.
and coordinate with the others working on this area on a common
interface.

This would only impact the device driver interface; having
a PCI Express specific interface in sysfs is probably ok.

Otherwise we would end up with tons of ifdefs in the drivers
supporting multiple error reporting interfaces for different platforms, 
which would be bad.

Also in general I think the necessary callbacks should
be part of the basic device; not provided in a separate structure.

-Andi

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


[CHECKER] fsync doesn't sync data properly (JFS, Linux 2.6.11)

2005-03-12 Thread Junfeng Yang

Hi,

FiSC founds a potential error on JFS (Linux 2.6.11) where fsync doesn't
properly flushes out file data.  Crash after this fsync causes data loss.
The test case can be found at http://fisc.stanford.edu/bug9/crash.c

To reproduce it, download and compile crash.c, and run it on a fresh jfs
partition.  File /mnt/sbd0/0006/0010/0029/0033 should contain
-23,-69,101,-119, However, the crash-recovered version contains all 0s.

Please let me know if you need more information.

As usual, confirmations/clarifications are appreciated,
-Junfeng

-
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: ethX interface rx errors

2005-03-12 Thread Nils Radtke

Hi Omer, hi others,


# i'm wondering if you ever found a solution to the problem you
# have described here: http://lkml.org/lkml/2004/12/5/81
I'll send a small update today with this email.

# i'm having the exact same issue with one of my linux machines,
# and i would really appreciate any advice you can give.

Only symptomatical cure: reboot. 
But: Make sure you power off and boot up, consecutively!! 

Just reboot will not work (at least for me). Make your box having a complete
power cycle.

uptime: 10:55:35 up 6 days, 19:06,  1 user,  load average: 1.11, 0.89, 0.85
So far, now rx errors. Yet.
Linux service 2.6.10service #1 Thu Jan 6 21:53:31 CET 2005 i686 GNU/Linux
and
Linux service 2.6.11tf #1 Thu Jan 6 21:53:31 CET 2005 i686 GNU/Linux

[EMAIL PROTECTED]:~# ifconfig eth0 
eth0  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000 
  RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[EMAIL PROTECTED]:~# ifconfig eth1 
eth1  RX packets:27521716 errors:0 dropped:0 overruns:0 frame:0
  TX packets:43011137 errors:0 dropped:0 overruns:10 carrier:0
  collisions:0 txqueuelen:1000 
  RX bytes:2384780308 (2.2 GiB)  TX bytes:2096012953 (1.9 GiB)

Using bridge:
br0   RX packets:27490318 errors:0 dropped:0 overruns:0 frame:0
  TX packets:43026044 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0 
  RX bytes:2009612925 (1.8 GiB)  TX bytes:2082138120 (1.9 GiB)

BTW (OT): Would be great having vpn/racoon being capable getting attached to
network devices. This way you could implement transparent vpn. VPN:
WLAN -- LAN, all same (sub)net but encrypted on the wireless half.
(vrf?, hm did not chk that, so far)

Use latest (vanilla) kernels. I do not have any experiences with other
kernels, be it -ac, -mm, rh, suse, debian. Honestly, I do not want to
use them any longer. (Yes, ok, there _is_ experience, but, you know..;-)

2.6.10 had some serious trouble. I. e. (OT) suspend/resume on notebooks:
did not restore hw clock time. 2.6.11 does. 2.6.10: problem with ati
driver, but 2.6.11 does not.

There seems to be a serious relation with USB. Having whatever usb
device connected (it is _not_ important whether this device got its
modules loaded!) it accelerates the rx error count increase. 

I first suspected the binary webcam module for the philips webcams
responsible. But now, I tend to say that was rather hasardous. That
binary module is responsible for kernel Oopses in the USB context.
This might be the connection between these premisses.
Don't think too much about that module beeing responsible for the rx
errors, any more. 
And I do not use the webcam any longer.. Pity, quality is quite good.

It renders also more possible the first rx error. If w/o usb device the
first occurrence is under havy (net or not?) load after an hour, it will
quite sure be after 2 minutes with usb device attached..

There might be a correlation with samba! smbd/nmbd seems prone to cause
similar effects. 

What is no problem is to recognise remotely that you _have_ the problem rx
errors: just try to transfer a at leas 10mb file to the problematic box 
running the samba server. Let's have a coffee or sex or read a book or whatever
meanwhile. If you come back to your so long ago started upload: Do not
be stunned, it will not have finished yet. In fact, it never will..
 
# thanks very much.
You're welcome. At least we're not alone ;-)
Actually, there are about 4 to 5 known people out there having this problem.
Not too much, it seems. But it also seems an (slowly) increasing number.

AND: they are all using rtl chipset cards. But: Know that the rx error
problem occurred with 3com 3c905 also!

One more detail: in circumstances without any rx errors the maximum
throughput (using samba) reached on site is about 4-5MB per second.

Hope could help somehow..


Nils


-- 
A+
* N.Radtke@ * University of Stuttgart *icq / lc   *
*  www.Think-Future.de  *dep.comp.science * 9336272/92045 *
:xUTM 32 0515651 5394088 :)
   Overdrawn?  But I still have checks left! 
   
   
-
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/


[CHECKER] XFS doesn't respect mount -o sync (XFS, 2.6.11)

2005-03-12 Thread Junfeng Yang

Hi,

We are from the Stanford Checker team and are working on a file system
checker called FiSC.  We checked XFS and found that even when a XFS
partition is mounted -o sync, file system operations are still not sync'ed
correctly.

A simple test case would be something like this:
mkdir 0001
reboot -f -n
After reboot, directory 0001 is lost.
Let me know if you need any more information to reproduce the warning.

We are not sure if this is the expected behavior on XFS or not, so your
inputs on this are well appreciated.

-Junfeng

-
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: USB broken on nforce4, ipv6 still broken, centrino speedstep even more broken than in 2.6.10

2005-03-12 Thread Stefan Rompf
Hi,

Felix von Leitner wrote:

 Did I mention that I'm really tired of you putting stones into ATI's
 way?  You might believe you have a right to piss everyone off, after all
 people get what they paid for.  Or maybe you think you are on a crusade
 to promote open source software.  But if you keep alienating me (I'm a
 software developer) like this, I spend more time working around this
 bullshit and less time writing free software.  In the end, everyone
 loses.  I sincerely hope some day you people are done pissing in the
 pool and can create at least some semblance of semi-stable APIs.  This
 house is never going to be safe for living until you stop digging around
 the foundation.

I cannot agree more. Many developers and maintainers say they don't care about 
binary modules - but I do have the impression a few of them care a lot by 
doing changes in a way that they break the current NVIDIA drivers on every 
new kernel release. As I read now, it seems to be the same way with ATI. Even 
GPL drivers developed outside the kernel are disfigured over and over with 
#ifdefs on KERNEL_VERSION.

While I fully understand that no developer wants to support binary modules, I 
would appreciate a little less hostile behaviour. And btw., instable API 
leads to an instable kernel because not everyone can follow the changes.

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


[CHECKER] crash + fsck cause file systems to contain loops (msdos and vfat, 2.6.11)

2005-03-12 Thread Junfeng Yang

Hi,

We are from the Stanford Checker team and are currently developing a file
system checker call FiSC.  FiSC mainly focuses on finding crash-recovery
errors.  We applied it to FiSC and found a serious error where crash then
recovery cause the file system to contain loops.

To reproduce the warning, download and run our test cases at

http://fisc.stanford.edu/bug7/crash.c (for msdos)
http://fisc.stanford.edu/bug10/crash.c (for vfat)

you can also find the crashed disk images in the corresponding
directories.

We are not sure if these are bugs or not.  Your
confirmations/clarifications on this are well appreciated.

-Junfeng

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


[CHECKER] sync doesn't flush everything out (msdos and vfat, 2.6.11)

2005-03-12 Thread Junfeng Yang

Hi,

This is yet another report from FiSC :)  This time FiSC complains that
sync on msdos and vfat doesn't flush everything out.  Crash after sync
still causes data loss.

Test cases and crashed disk images can be found at
http://fisc.stanford.edu/bug8(msdos)
http://fisc.stanford.edu/bug11   (vfat)

Confirmations/clarifications are apprecitaed.

-Junfeng


-
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: [CHECKER] crash + fsck cause file systems to contain loops (msdos and vfat, 2.6.11)

2005-03-12 Thread Andrew Morton
Junfeng Yang [EMAIL PROTECTED] wrote:

 We are from the Stanford Checker team and are currently developing a file
  system checker call FiSC.  FiSC mainly focuses on finding crash-recovery
  errors.  We applied it to FiSC and found a serious error where crash then
  recovery cause the file system to contain loops.
 
  To reproduce the warning, download and run our test cases at
 
  http://fisc.stanford.edu/bug7/crash.c (for msdos)
  http://fisc.stanford.edu/bug10/crash.c (for vfat)
 
  you can also find the crashed disk images in the corresponding
  directories.
 
  We are not sure if these are bugs or not.  Your
  confirmations/clarifications on this are well appreciated.

Linus's current tree includes support for `mount -o sync' on the msdos and
vfat filesystems.

-
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: User mode drivers: part 2: PCI device handling (patch 1/2 for 2.6.11)

2005-03-12 Thread Andrew Grover
On Fri, 11 Mar 2005 14:37:17 +1100, Peter Chubb
[EMAIL PROTECTED] wrote:

 +   npages = get_user_pages(current,
 +   current-mm,
 +   (unsigned long)m.virtaddr,
 +   maxpages,
 +   write,
 +   0,
 +   imp-pages,
 +   NULL);

Can't comment on usermode drivers overall, so just some code comments.

do you need a down_read(current-mm-mmap_sem) here? I'm not sure but
that seems to be what most other users of this function are doing.

 +   /*
 +* Build scatterlist, one entry per page.
 +* Allow for partial pages at start and end.
 +*/
 +   i = 1;
 +   imp-sg[0].page = imp-pages[0];
 +   imp-sg[0].offset = ((unsigned long)m.virtaddr)  (PAGE_SIZE - 1);
 +   imp-sg[0].length = PAGE_SIZE - imp-sg[0].offset;
 +   if (imp-sg[0].length = m.size) {
 +   imp-sg[0].length = m.size;
 +   } else {
 +   unsigned long len = m.size - imp-sg[0].length;
 +   for (;len = PAGE_SIZE  i  npages ; i++) {
 +   imp-sg[i].page = imp-pages[i];
 +   imp-sg[i].offset = 0;
 +   imp-sg[i].length = PAGE_SIZE;
 +   len -= PAGE_SIZE;
 +   }
 +   if (len) {
 +   BUG_ON(i = npages);
 +   BUG_ON(len = PAGE_SIZE);
 +   imp-sg[i].page = imp-pages[i];
 +   imp-sg[i].offset = 0;
 +   imp-sg[i].length = len;
 +   i++;
 +   }
 +   }

size_t len = m.size;
int offset = (unsigned long) m.virtaddr  ~PAGE_MASK;
for (i = 0; i  npages; i++)
{
  imp-sg[i].page = imp-pages[i];
  imp-sg[i].offset = offset;
  imp-sg[i].length = min(len, PAGE_SIZE - offset);

  offset = 0;
  len -= imp-sg[i].length;
}

instead possibly?

Regards -- Andy
-
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: bouncing keys and skipping sound with 2.6.11

2005-03-12 Thread Jan Niehusmann
On Mon, Mar 07, 2005 at 08:26:32AM +0100, Stefan Seyfried wrote:
 I bet you have CONFIG_ACPI_DEBUG enabled. Disable it or try to put
 #define ACPI_ENABLE_OBJECT_CACHE 1
 at the end of include/acpi/acpi.h (before the last #endif)
 This fixed it for me (and some others).

...and for me - thanks for the hint, I've been running 2.6.11 now for a
few days without any problems.

Jan
-
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] s3c2410 watchdog power management

2005-03-12 Thread Ben Dooks
Patch from Dimitry Andric [EMAIL PROTECTED], updated
by Ben Dooks [EMAIL PROTECTED]. Patch is against 2.6.11-mm2

Add power management support to the s3c2410 watchdog, so that
it is shut-down over suspend, and re-initialised on resume.

Also add Dimitry to the list of authors.

Signed-off-by: Dimitry Andric [EMAIL PROTECTED]
Signed-off-by: Ben Dooks [EMAIL PROTECTED]

diff -urN -X ../dontdiff linux-2.6.11-mm2/drivers/char/watchdog/s3c2410_wdt.c 
linux-2.6.11-mm2-bjd1/drivers/char/watchdog/s3c2410_wdt.c
--- linux-2.6.11-mm2/drivers/char/watchdog/s3c2410_wdt.c2005-03-02 
07:38:10.0 +
+++ linux-2.6.11-mm2-bjd1/drivers/char/watchdog/s3c2410_wdt.c   2005-03-12 
11:11:08.0 +
@@ -26,6 +26,7 @@
  * 05-Oct-2004 BJD Added semaphore init to stop crashes on open
  * Fixed tmr_count / wdt_count confusion
  * Added configurable debug
+ * 25-Jan-2005 DA  Added suspend/resume support
 */
 
 #include linux/module.h
@@ -484,15 +485,57 @@
return 0;
 }
 
+#ifdef CONFIG_PM
+
+static unsigned long wtcon_save;
+static unsigned long wtdat_save;
+
+static int s3c2410wdt_suspend(struct device *dev, u32 state, u32 level)
+{
+   if (level == SUSPEND_POWER_DOWN) {
+   /* Save watchdog state, and turn it off. */
+   wtcon_save = readl(wdt_base + S3C2410_WTCON);
+   wtdat_save = readl(wdt_base + S3C2410_WTDAT);
+
+   /* Note that WTCNT doesn't need to be saved. */
+   s3c2410wdt_stop();
+   }
+
+   return 0;
+}
+
+static int s3c2410wdt_resume(struct device *dev, u32 level)
+{
+   if (level == RESUME_POWER_ON) {
+   /* Restore watchdog state. */
+
+   writel(wtdat_save, wdt_base + S3C2410_WTDAT);
+   writel(wtdat_save, wdt_base + S3C2410_WTCNT); /* Reset count */
+   writel(wtcon_save, wdt_base + S3C2410_WTCON);
+
+   printk(KERN_INFO PFX watchdog %sabled\n,
+  (wtcon_save  S3C2410_WTCON_ENABLE) ? en : dis);
+   }
+
+   return 0;
+}
+
+#else
+#define s3c2410wdt_suspend NULL
+#define s3c2410wdt_resume  NULL
+#endif /* CONFIG_PM */
+
+
 static struct device_driver s3c2410wdt_driver = {
.name   = s3c2410-wdt,
.bus= platform_bus_type,
.probe  = s3c2410wdt_probe,
.remove = s3c2410wdt_remove,
+   .suspend= s3c2410wdt_suspend,
+   .resume = s3c2410wdt_resume,
 };
 
 
-
 static char banner[] __initdata = KERN_INFO S3C2410 Watchdog Timer, (c) 2004 
Simtec Electronics\n;
 
 static int __init watchdog_init(void)
@@ -510,7 +553,8 @@
 module_init(watchdog_init);
 module_exit(watchdog_exit);
 
-MODULE_AUTHOR(Ben Dooks [EMAIL PROTECTED]);
+MODULE_AUTHOR(Ben Dooks [EMAIL PROTECTED], 
+ Dimitry Andric [EMAIL PROTECTED]);
 MODULE_DESCRIPTION(S3C2410 Watchdog Device Driver);
 MODULE_LICENSE(GPL);
 MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
diff -urN -X ../dontdiff linux-2.6.11-mm2/drivers/char/watchdog/s3c2410_wdt.c 
linux-2.6.11-mm2-bjd1/drivers/char/watchdog/s3c2410_wdt.c
--- linux-2.6.11-mm2/drivers/char/watchdog/s3c2410_wdt.c2005-03-02 
07:38:10.0 +
+++ linux-2.6.11-mm2-bjd1/drivers/char/watchdog/s3c2410_wdt.c   2005-03-12 
11:11:08.0 +
@@ -26,6 +26,7 @@
  * 05-Oct-2004 BJD Added semaphore init to stop crashes on open
  * Fixed tmr_count / wdt_count confusion
  * Added configurable debug
+ * 25-Jan-2005 DA  Added suspend/resume support
 */
 
 #include linux/module.h
@@ -484,15 +485,57 @@
return 0;
 }
 
+#ifdef CONFIG_PM
+
+static unsigned long wtcon_save;
+static unsigned long wtdat_save;
+
+static int s3c2410wdt_suspend(struct device *dev, u32 state, u32 level)
+{
+   if (level == SUSPEND_POWER_DOWN) {
+   /* Save watchdog state, and turn it off. */
+   wtcon_save = readl(wdt_base + S3C2410_WTCON);
+   wtdat_save = readl(wdt_base + S3C2410_WTDAT);
+
+   /* Note that WTCNT doesn't need to be saved. */
+   s3c2410wdt_stop();
+   }
+
+   return 0;
+}
+
+static int s3c2410wdt_resume(struct device *dev, u32 level)
+{
+   if (level == RESUME_POWER_ON) {
+   /* Restore watchdog state. */
+
+   writel(wtdat_save, wdt_base + S3C2410_WTDAT);
+   writel(wtdat_save, wdt_base + S3C2410_WTCNT); /* Reset count */
+   writel(wtcon_save, wdt_base + S3C2410_WTCON);
+
+   printk(KERN_INFO PFX watchdog %sabled\n,
+  (wtcon_save  S3C2410_WTCON_ENABLE) ? en : dis);
+   }
+
+   return 0;
+}
+
+#else
+#define s3c2410wdt_suspend NULL
+#define s3c2410wdt_resume  NULL
+#endif /* CONFIG_PM */
+
+
 static struct device_driver s3c2410wdt_driver = {
.name   = s3c2410-wdt,
.bus= 

Re: [CHECKER] crash + fsck cause file systems to contain loops (msdos and vfat, 2.6.11)

2005-03-12 Thread Junfeng Yang
 Linus's current tree includes support for `mount -o sync' on the msdos and
 vfat filesystems.

Thanks Andrew.  I can just do a bk clone from
http://linux.bkbits.net/linux-2.6 to get Linus's current tree, right?

The warning reported here doesn't need mount -o sync to trigger though.
A simple crash on a default mounted FS can usually cause the FS loop.

(Also, I realized I made many typos in my report --- this implies I'm
tired and should probably get some sleep :)

-
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] s3c2410 watchdog - replace reboot notifier

2005-03-12 Thread Ben Dooks
Patch from Dimitry Andric [EMAIL PROTECTED]

Change to using platfrom driver's .shutdown method instead
of an reboot notifier

Signed-off-by: Dimitry Andric [EMAIL PROTECTED]
Signed-off-by: Ben Dooks [EMAIL PROTECTED]

diff -urN -X ../dontdiff 
linux-2.6.11-mm2-bjd1/drivers/char/watchdog/s3c2410_wdt.c 
linux-2.6.11-mm2-bjd2/drivers/char/watchdog/s3c2410_wdt.c
--- linux-2.6.11-mm2-bjd1/drivers/char/watchdog/s3c2410_wdt.c   2005-03-12 
11:11:08.0 +
+++ linux-2.6.11-mm2-bjd2/drivers/char/watchdog/s3c2410_wdt.c   2005-03-12 
11:23:18.0 +
@@ -27,6 +27,7 @@
  * Fixed tmr_count / wdt_count confusion
  * Added configurable debug
  * 25-Jan-2005 DA  Added suspend/resume support
+ * Replaced reboot notifier with .shutdown method
 */
 
 #include linux/module.h
@@ -37,8 +38,6 @@
 #include linux/miscdevice.h
 #include linux/watchdog.h
 #include linux/fs.h
-#include linux/notifier.h
-#include linux/reboot.h
 #include linux/init.h
 #include linux/device.h
 #include linux/interrupt.h
@@ -323,20 +322,6 @@
}
 }
 
-/*
- * Notifier for system down
- */
-
-static int s3c2410wdt_notify_sys(struct notifier_block *this, unsigned long 
code,
- void *unused)
-{
-   if(code==SYS_DOWN || code==SYS_HALT) {
-   /* Turn the WDT off */
-   s3c2410wdt_stop();
-   }
-   return NOTIFY_DONE;
-}
-
 /* kernel interface */
 
 static struct file_operations s3c2410wdt_fops = {
@@ -354,10 +339,6 @@
.fops   = s3c2410wdt_fops,
 };
 
-static struct notifier_block s3c2410wdt_notifier = {
-   .notifier_call  = s3c2410wdt_notify_sys,
-};
-
 /* interrupt handler code */
 
 static irqreturn_t s3c2410wdt_irq(int irqno, void *param,
@@ -438,18 +419,10 @@
}
}
 
-   ret = register_reboot_notifier(s3c2410wdt_notifier);
-   if (ret) {
-   printk (KERN_ERR PFX cannot register reboot notifier (%d)\n,
-   ret);
-   return ret;
-   }
-
ret = misc_register(s3c2410wdt_miscdev);
if (ret) {
printk (KERN_ERR PFX cannot register miscdev on minor=%d 
(%d)\n,
WATCHDOG_MINOR, ret);
-   unregister_reboot_notifier(s3c2410wdt_notifier);
return ret;
}
 
@@ -485,6 +458,11 @@
return 0;
 }
 
+static void s3c2410wdt_shutdown(struct device *dev)
+{
+   s3c2410wdt_stop();  
+}
+
 #ifdef CONFIG_PM
 
 static unsigned long wtcon_save;
@@ -531,6 +509,7 @@
.bus= platform_bus_type,
.probe  = s3c2410wdt_probe,
.remove = s3c2410wdt_remove,
+   .shutdown   = s3c2410wdt_shutdown,
.suspend= s3c2410wdt_suspend,
.resume = s3c2410wdt_resume,
 };
@@ -547,7 +526,6 @@
 static void __exit watchdog_exit(void)
 {
driver_unregister(s3c2410wdt_driver);
-   unregister_reboot_notifier(s3c2410wdt_notifier);
 }
 
 module_init(watchdog_init);
diff -urN -X ../dontdiff 
linux-2.6.11-mm2-bjd1/drivers/char/watchdog/s3c2410_wdt.c 
linux-2.6.11-mm2-bjd2/drivers/char/watchdog/s3c2410_wdt.c
--- linux-2.6.11-mm2-bjd1/drivers/char/watchdog/s3c2410_wdt.c   2005-03-12 
11:11:08.0 +
+++ linux-2.6.11-mm2-bjd2/drivers/char/watchdog/s3c2410_wdt.c   2005-03-12 
11:23:18.0 +
@@ -27,6 +27,7 @@
  * Fixed tmr_count / wdt_count confusion
  * Added configurable debug
  * 25-Jan-2005 DA  Added suspend/resume support
+ * Replaced reboot notifier with .shutdown method
 */
 
 #include linux/module.h
@@ -37,8 +38,6 @@
 #include linux/miscdevice.h
 #include linux/watchdog.h
 #include linux/fs.h
-#include linux/notifier.h
-#include linux/reboot.h
 #include linux/init.h
 #include linux/device.h
 #include linux/interrupt.h
@@ -323,20 +322,6 @@
}
 }
 
-/*
- * Notifier for system down
- */
-
-static int s3c2410wdt_notify_sys(struct notifier_block *this, unsigned long 
code,
- void *unused)
-{
-   if(code==SYS_DOWN || code==SYS_HALT) {
-   /* Turn the WDT off */
-   s3c2410wdt_stop();
-   }
-   return NOTIFY_DONE;
-}
-
 /* kernel interface */
 
 static struct file_operations s3c2410wdt_fops = {
@@ -354,10 +339,6 @@
.fops   = s3c2410wdt_fops,
 };
 
-static struct notifier_block s3c2410wdt_notifier = {
-   .notifier_call  = s3c2410wdt_notify_sys,
-};
-
 /* interrupt handler code */
 
 static irqreturn_t s3c2410wdt_irq(int irqno, void *param,
@@ -438,18 +419,10 @@
}
}
 
-   ret = register_reboot_notifier(s3c2410wdt_notifier);
-   if (ret) {
-   printk (KERN_ERR PFX cannot register reboot notifier (%d)\n,
-   ret);
-   return ret;
-   }
-
ret = 

Re: 2.6: unused code under drivers/message/fusion/

2005-03-12 Thread Adrian Bunk
On Wed, Nov 10, 2004 at 12:58:47PM +0300, Vladislav Bolkhovitin wrote:
 Adrian Bunk wrote:
 On Wed, Nov 10, 2004 at 11:11:51AM +0300, Vladislav Bolkhovitin wrote:
 
 Moore, Eric Dean wrote:
 
 We need to hold off on this change. Yes, there are 
 customers of LSI Logic using mptstm.c, as
 part of the target-mode drivers.  
 
 The proposed generic target mode drivers proposal is yet part
 of the kernel.  
 http://scst.sourceforge.net/
 We are looking into supporting this once its available.
 
 Well, SCST is already available, stable and useful. People use it 
 without considerable problems, except with inconvenient LUNs management, 
 which we are going to fix in the next version. I don't expect it will be 
 considering for the kernel inclusion at least until 2.7. So, you can 
 start supporting it right now :-).
 
 
 With the current kernel development model, there is no 2.7 planned for 
 the next years.
 
 Linus and Andrew believe 6 was an odd number, so you could submit your 
 code now. [1]
 
 OK, I'll prepare the next version as the kernel patch.

Any news regarding this?

 Thanks,
 Vlad

Thanks
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

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


$B!z%j%K%e!%%k!%*!%W%s$7$^$7$?!z(B

2005-03-12 Thread info


$BEl5~8BDj$G%*!%W%s$7$F9%I[EMAIL 
PROTECTED](HD%5%$%H!IEl5~%i%V%9%H!%j!!I$,A49q(B

$BHG$K$F%j%K%e!%%k%*!%W%s$7$^$7$?!#Ajj$N%%I%l%98+J|Bj$G40A4$JL5NA!#:#$^$G(B

$B3Z$7$a$J$+$C$?J}!2x$7$$%5%$%H$d$5$/$i$P$+$j$G$*C2$-$N$$J$?$K#7]G=?M(B

$B$d#A#V=wM%$J$I4XO$N6H3[EMAIL PROTECTED]$C$H(B

$B%S%C%/%j6LjH[EMAIL PROTECTED][EMAIL PROTECTED](B



$BEl5~%i%V%9%H!%j!!J#P#C!7HBSNBP1~!K(B

http://loves.qsv20.com/



$B!T$4Cm0U!U(B18$B:PL$K~$NJ}$d1g=u8r:[EMAIL PROTECTED];$s!#(B

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


Capabilities across execve

2005-03-12 Thread Alexander Nyberg
This makes it possible for a root-task to pass capabilities to
nonroot-task across execve. The root-task needs to change it's
cap_inheritable mask and set prctl(PR_SET_KEEPCAPS, 1) to pass on
capabilities. 
At execve time the capabilities will be passed on to the new
nonroot-task and any non-inheritable effective and permitted
capabilities will be masked out.
The effective capability of the new nonroot-task will be set to the
maximum permitted.

From here on the inheritable mask will be passed on unchanged to the new
tasks children unless told otherwise (effectively the complete
capability state is passed on).

With a small insert of prctl(PR_SET_KEEPCAPS, 1) into pam_cap.c at the
correct place this makes pam_cap work as expected. I'm also attaching a
test-case that tests capabilities across setuid = execve (makes the new
task inherit CAP_CHOWN).


Signed-off-by: Alexander Nyberg [EMAIL PROTECTED]

= security/commoncap.c 1.15 vs edited =
--- 1.15/security/commoncap.c   2005-01-11 02:29:23 +01:00
+++ edited/security/commoncap.c 2005-03-12 12:04:34 +01:00
@@ -111,13 +111,19 @@ void cap_capset_set (struct task_struct 
 
 int cap_bprm_set_security (struct linux_binprm *bprm)
 {
-   /* Copied from fs/exec.c:prepare_binprm. */
-
-   /* We don't have VFS support for capabilities yet */
-   cap_clear (bprm-cap_inheritable);
-   cap_clear (bprm-cap_permitted);
-   cap_clear (bprm-cap_effective);
+   struct task_struct *p = current;
 
+   /*
+* Mask out the non-inheritable capabilities.
+* Note: init has a zero mask of cap_inheritable, so a root-task will 
not
+* pass on any capabilities unless explicitly told to do so. If a 
non-zero
+* inheritable mask is passed to a positive uid task it will then pass 
on 
+* its inheritable mask to all children unless told otherwise.
+*/
+   bprm-cap_permitted = cap_intersect(p-cap_permitted, 
p-cap_inheritable);
+   bprm-cap_effective = cap_intersect(p-cap_effective, 
p-cap_inheritable);
+   bprm-cap_inheritable = p-cap_inheritable;
+   
/*  To support inheritance of root-permissions and suid-root
 *  executables under compatibility mode, we raise all three
 *  capability sets for the file.
@@ -127,7 +133,7 @@ int cap_bprm_set_security (struct linux_
 */
 
if (!issecure (SECURE_NOROOT)) {
-   if (bprm-e_uid == 0 || current-uid == 0) {
+   if (bprm-e_uid == 0 || p-uid == 0) {
cap_set_full (bprm-cap_inheritable);
cap_set_full (bprm-cap_permitted);
}
@@ -139,13 +145,9 @@ int cap_bprm_set_security (struct linux_
 
 void cap_bprm_apply_creds (struct linux_binprm *bprm, int unsafe)
 {
-   /* Derived from fs/exec.c:compute_creds. */
-   kernel_cap_t new_permitted, working;
+   kernel_cap_t new_permitted;
 
new_permitted = cap_intersect (bprm-cap_permitted, cap_bset);
-   working = cap_intersect (bprm-cap_inheritable,
-current-cap_inheritable);
-   new_permitted = cap_combine (new_permitted, working);
 
if (bprm-e_uid != current-uid || bprm-e_gid != current-gid ||
!cap_issubset (new_permitted, current-cap_permitted)) {
@@ -166,14 +168,9 @@ void cap_bprm_apply_creds (struct linux_
current-suid = current-euid = current-fsuid = bprm-e_uid;
current-sgid = current-egid = current-fsgid = bprm-e_gid;
 
-   /* For init, we want to retain the capabilities set
-* in the init_task struct. Thus we skip the usual
-* capability rules */
-   if (current-pid != 1) {
-   current-cap_permitted = new_permitted;
-   current-cap_effective =
-   cap_intersect (new_permitted, bprm-cap_effective);
-   }
+   current-cap_permitted = new_permitted;
+   current-cap_effective =
+   cap_intersect (new_permitted, bprm-cap_effective);
 
/* AUD: Audit candidate if current-cap_effective is set */
 
@@ -249,9 +246,9 @@ static inline void cap_emulate_setxuid (
cap_clear (current-cap_permitted);
cap_clear (current-cap_effective);
}
-   if (old_euid == 0  current-euid != 0) {
+   if (old_euid == 0  current-euid != 0  !current-keep_capabilities)
cap_clear (current-cap_effective);
-   }
+
if (old_euid != 0  current-euid == 0) {
current-cap_effective = current-cap_permitted;
}

#include stdio.h
#include stdlib.h
#include sys/types.h
#include sys/capability.h
#include sys/prctl.h

struct caph {
	int version;
	int pid;
};

struct capd {
	__u32 effective;
	__u32 permitted;
	__u32 inheritable;
};

gid_t gid = 1000;
uid_t uid = 1000;


void printcap(char *str)
{
	int ret;
	struct caph caph;
	struct capd capd;
	
	memset(capd, 0, sizeof(capd));	
	
	caph.version = 0x19980330;
	caph.pid = getpid();

	ret = 

[CHECKER] inconsistent NFS stat cache (NFS on ext3, 2.6.11)

2005-03-12 Thread Junfeng Yang

Hi,

We checked NFS on top of ext3 using FiSC (our file system model checker)
and found a case where NFS stat cache can contain inconsistent entries.

Basically, to trigger this inconsistency, just do the following steps:
1. create a file A1, write a few bytes to it, so A1 is 4 words
2. create a hard link A2, pointing to A1
3. stat on A2. A2's size is 4 words
4. truncate A1 to a larger size, write a few bytes at the end. now it's
1031 words.
5. stat on A2. it's size is still 4 words, which should be 1031 words

We have a test case to re-create this warning.  You can download it at
http://fisc.stanford.edu/bug16/crash.c.  It includes some sudo commands
to mount nfs partitions, which you might want to change according to your
local settings.

cat /etc/exports shows:
/mnt/sbd0-export  localhost(rw,sync)
/mnt/sbd1-export  localhost(rw,sync)

Let me know if you have any problems reproducing the warning. We'd
appreciate any confirmations/clarifications.

-Junfeng

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


[CHECKER] sync, fsync and mount -o sync all not flush things out properly (hfsplus, 2.6.11)

2005-03-12 Thread Junfeng Yang

Hi,

We developed a file system checker called FiSC and recently applied it to
hfsplus.  It complains 3 things about hfsplus:

1. sync on hfsplus doesn't actually flush everything out.  Immediate crash
after sync still causes data-loss  (testcase:
http://fisc.stanford.edu/bug13/crash.c)

2. fsync on hfsplus doesn't actually flush out the file.
(http://fisc.stanford.edu/bug14/crash.c)

3. mount -o sync doesn't cause file system operations to be synchronous.
(http://fisc.stanford.edu/bug15/crash.c)

To reproduce these warnings, download the test case and run it.  You might
need to customize the test case according to your local settings.  Let me
know if you need any more information to reproduce the warnings.

Any confirmations/clarifications are appreciated.
-Junfeng

-
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-mm3

2005-03-12 Thread Jens Axboe
On Sat, Mar 12 2005, Andrew Morton wrote:
 
 ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11/2.6.11-mm3/
 
 
 - A new version of the acpi poweroff fix.  People who were having trouble
   with ACPI poweroff, please test and report.
 
 - A very large update to the CFQ I/O scheduler.  Treat with caution, run
   benchmarks.  Remember that the I/O scheduler can be selected on a per-disk
   basis with 
 
   echo as  /sys/block/sda/queue/scheduler

echo anticipatory  /sys/block/sda/queue/scheduler

I think it's really messy that AS is 'as' in some places and
'anticipatory' elsewhere. I would suggest we rename it to 'as' all over,
it's easier to type.

   echo deadline  /sys/block/sda/queue/scheduler
   echo cfq  /sys/block/sda/queue/scheduler

-- 
Jens Axboe

-
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: Strange memory leak in 2.6.x

2005-03-12 Thread Tobias Hennerich
Hello,

On Fri, Mar 11, 2005 at 07:23:40PM +0100, Alexander Nyberg wrote:
 Yikes something isn't right with these backtraces that page_owner is
 showing. Even without frame pointers it shouldn't be this noisy.

If you could send me some pointers to documents how to interpret
this output, i would appreciate it.

 I'm afraid I'm going to need to ask for more help, could you please
 select CONFIG_FRAME_POINTER under 
 Kernel hacking = Compile the kernel with frame pointers

Done. Our .config looks now like this:

...
#
# Kernel hacking
#
CONFIG_DEBUG_KERNEL=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_SCHEDSTATS is not set
# CONFIG_DEBUG_SLAB is not set
CONFIG_DEBUG_PREEMPT=y
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_HIGHMEM is not set
CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_FS is not set
CONFIG_PAGE_OWNER=y
CONFIG_FRAME_POINTER=y
CONFIG_EARLY_PRINTK=y
CONFIG_DEBUG_STACKOVERFLOW=y
# CONFIG_KPROBES is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_PAGEALLOC is not set
# CONFIG_4KSTACKS is not set
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_MPPARSE=y
... 

 And when that kernel is booted, could you directly send me the output
 of /proc/page_owner (sort or unsorted) so that I can see if something is
 wrong with the data it's producing (just to be sure).

See http://download.hennerich.de/page_owner_sorted_20050312_1040.bz2

 If it works better with CONFIG_FRAME_POINTER, i'm also going to have to
 ask you to do another one of these runs that you just did.

The cronjob which generates each 10 minutes a new actual file of 
page_owner_sorted is still running... and I'm afraid that we will
run into problems sooner or later again...

Best regardsTobias

-- 
T+T Hennerich GmbH --- Zettachring 12a --- 70567 Stuttgart
Fon:+49(711)720714-0  Fax:+49(711)720714-44  Vanity:+49(700)HENNERICH
UNIX - Linux - Java - C  Entwicklung/Beratung/Betreuung/Schulung
http://www.hennerich.de/
-
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-mm3

2005-03-12 Thread Reuben Farrelly
At 12:42 a.m. 13/03/2005, Andrew Morton wrote:
ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11/2.6.11-mm3/
- A new version of the acpi poweroff fix.  People who were having trouble
  with ACPI poweroff, please test and report.
- A very large update to the CFQ I/O scheduler.  Treat with caution, run
  benchmarks.  Remember that the I/O scheduler can be selected on a per-disk
  basis with
echo as  /sys/block/sda/queue/scheduler
echo deadline  /sys/block/sda/queue/scheduler
echo cfq  /sys/block/sda/queue/scheduler
- video-for-linux update

Ugh, NTFS is br0ken:
  CC [M]  fs/ntfs/attrib.o
fs/ntfs/attrib.c: In function 'ntfs_attr_make_non_resident':
fs/ntfs/attrib.c:1295: warning: implicit declaration of function 
'ntfs_cluster_alloc'
fs/ntfs/attrib.c:1296: error: 'DATA_ZONE' undeclared (first use in this 
function)
fs/ntfs/attrib.c:1296: error: (Each undeclared identifier is reported only once
fs/ntfs/attrib.c:1296: error: for each function it appears in.)
fs/ntfs/attrib.c:1296: warning: assignment makes pointer from integer 
without a cast
fs/ntfs/attrib.c:1435: warning: implicit declaration of function 
'flush_dcache_mft_record_page'
fs/ntfs/attrib.c:1436: warning: implicit declaration of function 
'mark_mft_record_dirty'
fs/ntfs/attrib.c:1443: warning: implicit declaration of function 
'mark_page_accessed'
fs/ntfs/attrib.c:1521: warning: implicit declaration of function 
'ntfs_cluster_free_from_rl'
make[2]: *** [fs/ntfs/attrib.o] Error 1
make[1]: *** [fs/ntfs] Error 2
make: *** [fs] Error 2

Compile goes through to completion fine if I back out bk-ntfs.patch.
Using gcc-4, but this problem did not exist in -mm2.
reuben
-
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/


Maintainer change for the sis900 driver

2005-03-12 Thread Daniele Venzano
The attached patch updates the sis900 record of MAINTAINERS file.

Signed-off-by: Daniele Venzano [EMAIL PROTECTED]

-- 
-
Daniele Venzano
Web: http://www.brownhat.org

--- a/MAINTAINERS   2005-03-12 11:40:46.0 +0100
+++ b/MAINTAINERS   2005-03-12 11:44:39.0 +0100
@@ -2017,10 +2017,11 @@
 S: Maintained
 
 SIS 900/7016 FAST ETHERNET DRIVER
-P: Ollie Lho
-M: [EMAIL PROTECTED]
+P: Daniele Venzano
+M: [EMAIL PROTECTED]
+W: http://www.brownhat.org/sis900.html
 L: linux-net@vger.kernel.org
-S: Supported
+S: Maintained
 
 SIS FRAMEBUFFER DRIVER
 P: Thomas Winischhofer


signature.asc
Description: Digital signature


Re: [ patch 1/5] drivers/serial/jsm: new serial device driver

2005-03-12 Thread Domen Puncer
Just some nitpicking...

On 11/03/05 10:29 -0500, Wen Xiong wrote:
 + * Globals
 + */
 +int  jsm_driver_state = DRIVER_INITIALIZED;
 +spinlock_t   jsm_board_head_lock = SPIN_LOCK_UNLOCKED;

DEFINE_SPINLOCK()

 +LIST_HEAD(jsm_board_head);
 +
 +static struct pci_device_id jsm_pci_tbl[] = {
 + { PCI_DEVICE (PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2DB9),  0,  
 0,  0 },
 + { PCI_DEVICE (PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2DB9PRI),   0,  
 0,  1 },
 + { PCI_DEVICE (PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45), 0,  
 0,  2 },
 + { PCI_DEVICE (PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45PRI),  0,  
 0,  3 },
 + { 0,}   /* 0 terminated list. */
 +};
 +MODULE_DEVICE_TABLE(pci, jsm_pci_tbl);
 +
 +static struct board_id jsm_Ids[] = { 

Trailing whitespace.

 + { PCI_DEVICE_NEO_2DB9_PCI_NAME, 2 },
 + { PCI_DEVICE_NEO_2DB9PRI_PCI_NAME,  2 },
 + { PCI_DEVICE_NEO_2RJ45_PCI_NAME,2 },
 + { PCI_DEVICE_NEO_2RJ45PRI_PCI_NAME, 2 },
 + { NULL, 0 }
 +};
 +
 +char *jsm_driver_state_text[] = {
 + Driver Initialized,
 + Driver Ready.
 +};
 +
 +static int jsm_finalize_board_init(struct jsm_board *brd) 

Trailing whitespace.

 +{
 + int rc = 0;
 +
 + jsm_printk(INIT, INFO, brd-pci_dev, start\n);
 +
 + if (brd-irq) {
 + rc = request_irq(brd-irq, brd-bd_ops-intr, 
 SA_INTERRUPT|SA_SHIRQ, JSM, brd);
 +
 + if (rc) {
 + printk(KERN_WARNING Failed to hook IRQ %d\n,brd-irq);
 + brd-state = BOARD_FAILED;
 + brd-dpastatus = BD_NOFEP;
 + rc = -ENODEV;
 + } else
 + jsm_printk(INIT, INFO, brd-pci_dev,
 + Requested and received usage of IRQ %d\n, 
 brd-irq);
 + }
 + return rc;
 +}
 +
 +/*
 + * jsm_found_board()
 + *
 + * A board has been found, init it.
 + */
 +static int jsm_found_board(struct pci_dev *pdev, int id)
 +{
 + struct jsm_board *brd;
 + int i = 0;
 + int rc = 0;
 + struct list_head *tmp;
 + struct jsm_board *cur_board_entry;
 + unsigned long lock_flags;
 + int adapter_count = 0;
 +
 + brd = (struct jsm_board *)kmalloc(sizeof(struct jsm_board), GFP_KERNEL);

Don't cast void pointers.

 + if (!brd) {
 + dev_err(pdev-dev, memory allocation for board structure 
 failed\n);
 + return -ENOMEM;
 + }
 + memset(brd, 0, sizeof(struct jsm_board));

sizeof(*brd)?

 +
 + spin_lock_irqsave(jsm_board_head_lock, lock_flags);
 + list_for_each(tmp, jsm_board_head) {
 + cur_board_entry = 
 + list_entry(tmp, struct jsm_board,
 + jsm_board_entry);

list_for_each_entry would make it shorter.

 + if (cur_board_entry-boardnum != adapter_count) {
 + break;
 + }
 + adapter_count++;
 + }
 +
 + list_add_tail(brd-jsm_board_entry, jsm_board_head);
 + spin_unlock_irqrestore(jsm_board_head_lock, lock_flags);
 +
 + /* store the info for the board we've found */
 + brd-boardnum = adapter_count;
 + brd-pci_dev = pdev;
 + brd-name = jsm_Ids[id].name;
 + brd-maxports = jsm_Ids[id].maxports;
 + brd-dpastatus = BD_NOFEP;
 + init_waitqueue_head(brd-state_wait);
 +
 + spin_lock_init(brd-bd_lock);
 + spin_lock_init(brd-bd_intr_lock);
 +
 + brd-state = BOARD_FOUND;
 +
 + for (i = 0; i  brd-maxports; i++) 

Trailing whitespace.

 + brd-channels[i] = NULL;
 +
 + /* store which revision we have */
 + pci_read_config_byte(pdev, PCI_REVISION_ID, brd-rev);
 +
 + brd-irq = pdev-irq;
 +
 + switch(brd-pci_dev-device) {
 +
 + case PCI_DEVICE_ID_NEO_2DB9:
 + case PCI_DEVICE_ID_NEO_2DB9PRI:
 + case PCI_DEVICE_ID_NEO_2RJ45:
 + case PCI_DEVICE_ID_NEO_2RJ45PRI:
 +
 + /*
 +  * This chip is set up 100% when we get to it.
 +  * No need to enable global interrupts or anything. 
 +  */
 + brd-dpatype = T_NEO | T_PCIBUS;
 +
 + jsm_printk(INIT, INFO, brd-pci_dev,
 + jsm_found_board - NEO adapter\n);
 +
 + /* get the PCI Base Address Registers */
 + brd-membase= pci_resource_start(pdev, 0);
 + brd-membase_end = pci_resource_end(pdev, 0);
 +
 + if (brd-membase  1)
 + brd-membase = ~3;
 + else
 + brd-membase = ~15;
 +
 + /* Assign the board_ops struct */
 + brd-bd_ops = jsm_neo_ops;
 +
 + brd-bd_uart_offset = 0x200;
 + brd-bd_dividend = 921600;
 +
 + brd-re_map_membase = ioremap(brd-membase, 0x1000);
 + jsm_printk(INIT, INFO, brd-pci_dev,
 + remapped mem: 

spin_lock error in arch/i386/kernel/time.c on APM resume

2005-03-12 Thread J. Bruce Fields
On APM resume this morning on my Thinkpad X31, I got a spin_lock is
already locked error; see below.  This doesn't happen on every resume,
though it's happened before.  The kernel is 2.6.11 plus a bunch of
(hopefully unrelated...) NFS patches.

Any ideas?

--Bruce Fields

Mar 12 07:07:29 puzzle kernel: PCI: Setting latency timer of device 
:00:1d.0 to 64
Mar 12 07:07:31 puzzle kernel: PCI: Setting latency timer of device 
:00:1d.1 to 64
Mar 12 07:07:31 puzzle kernel: PCI: Setting latency timer of device 
:00:1d.2 to 64
Mar 12 07:07:31 puzzle kernel: PCI: cache line size of 32 is not supported by 
device :00:1d.7
Mar 12 07:07:31 puzzle kernel: ehci_hcd :00:1d.7: USB 2.0 restarted, EHCI 
1.00, driver 10 Dec 2004
Mar 12 07:07:31 puzzle kernel: PCI: Found IRQ 11 for device :00:1f.1
Mar 12 07:07:31 puzzle kernel: PCI: Sharing IRQ 11 with :00:1d.2
Mar 12 07:07:31 puzzle kernel: PCI: Sharing IRQ 11 with :02:00.2
Mar 12 07:07:31 puzzle kernel: PCI: Sharing IRQ 11 with :02:02.0
Mar 12 07:07:31 puzzle kernel: PCI: Found IRQ 11 for device :00:1f.5
Mar 12 07:07:31 puzzle kernel: PCI: Sharing IRQ 11 with :00:1f.3
Mar 12 07:07:31 puzzle kernel: PCI: Sharing IRQ 11 with :00:1f.6
Mar 12 07:07:31 puzzle kernel: PCI: Sharing IRQ 11 with :02:00.1
Mar 12 07:07:31 puzzle kernel: PCI: Setting latency timer of device 
:00:1f.5 to 64
Mar 12 07:07:31 puzzle kernel: arch/i386/kernel/time.c:179: 
spin_lock(arch/i386/kernel/time.c:c0603c28) already locked by 
arch/i386/kernel/time.c/309
Mar 12 07:07:31 puzzle kernel: arch/i386/kernel/time.c:316: 
spin_unlock(arch/i386/kernel/time.c:c0603c28) not locked
Mar 12 07:07:31 puzzle kernel: PCI: Found IRQ 11 for device :01:00.0
Mar 12 07:07:31 puzzle kernel: PCI: Sharing IRQ 11 with :00:1d.0
Mar 12 07:07:31 puzzle kernel: PCI: Sharing IRQ 11 with :02:00.0
Mar 12 07:07:31 puzzle kernel: PCI: Found IRQ 11 for device :02:00.2
Mar 12 07:07:31 puzzle kernel: PCI: Sharing IRQ 11 with :00:1d.2
Mar 12 07:07:31 puzzle kernel: PCI: Sharing IRQ 11 with :00:1f.1
Mar 12 07:07:31 puzzle kernel: PCI: Sharing IRQ 11 with :02:02.0
Mar 12 07:07:31 puzzle kernel: PCI: Found IRQ 11 for device :02:08.0
Mar 12 07:07:31 puzzle kernel: agpgart: Found an AGP 2.0 compliant device at 
:00:00.0.
Mar 12 07:07:31 puzzle kernel: agpgart: Putting AGP V2 device at :00:00.0 
into 1x mode
Mar 12 07:07:31 puzzle kernel: agpgart: Putting AGP V2 device at :01:00.0 
into 1x mode
-
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: current linus bk, error mounting root

2005-03-12 Thread Alexander E. Patrakov
Jon Smirl wrote:

 Here's a big clue, if I build ata_piix in I can boot. If it is a
 module I can't. The console output definitely shows that the module is
 being loaded.

Of course I am not an expert here, but I want to rule out some trivial 
userspace things first.

Some time ago Greg KH said that even when the modprobe command returns, there 
is no guarantee that the module finished hardware detection. By rebuilding 
ata_piix as a non-module, you changed the timeline.

Could you please, for debugging, recompile ata_piix as a module again, but add 
a sleep 5 before the mkrootdev command? If that works, a bug (race) is 
officially in userspace.

Sorry if all of the above is in fact just meaningless noise.

-- 
Alexander E. Patrakov
-
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: keyboard stopped working after memory upgrade

2005-03-12 Thread Rafael J. Wysocki
Hi,

I'm just having a weird problem with 2.6.11.  Namely, the keyboard stopped
working after I'd added more RAM to the box (Asus L5D notebok, x86-64
kernel).  It works on 2.6.11-mm1.

Greets,
Rafael


-- 
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll Alice's Adventures in Wonderland
-
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-mm3: saa7134-core.c compile error

2005-03-12 Thread Adrian Bunk
On Sat, Mar 12, 2005 at 03:42:22AM -0800, Andrew Morton wrote:
...
 Changes since 2.6.11-mm2:
...
 +saa7134-update.patch
...
  v4l updates
...

This doesn't compile with CONFIG_MODULES=n:

--  snip  --

...
  CC  drivers/media/video/saa7134/saa7134-core.o
drivers/media/video/saa7134/saa7134-core.c: In function `saa7134_fini':
drivers/media/video/saa7134/saa7134-core.c:1215: error: `pending_registered' 
undeclared (first use in this function)
drivers/media/video/saa7134/saa7134-core.c:1215: error: (Each undeclared 
identifier is reported only once
drivers/media/video/saa7134/saa7134-core.c:1215: error: for each function it 
appears in.)
drivers/media/video/saa7134/saa7134-core.c:1216: error: `pending_notifier' 
undeclared (first use in this function)
make[4]: *** [drivers/media/video/saa7134/saa7134-core.o] Error 1

--  snip  --


cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
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-mm3

2005-03-12 Thread Ed Tomlinson
On Saturday 12 March 2005 06:42, Andrew Morton wrote:
 2.6.11-mm3
  From: Andrew Morton [EMAIL PROTECTED]
  To: linux-kernel@vger.kernel.org
  
 ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11/2.6.11-mm3/
 
 
 - A new version of the acpi poweroff fix.  People who were having trouble
   with ACPI poweroff, please test and report.
 
 - A very large update to the CFQ I/O scheduler.  Treat with caution, run
   benchmarks.  Remember that the I/O scheduler can be selected on a per-disk
   basis with 
 
 echo as  /sys/block/sda/queue/scheduler
 echo deadline  /sys/block/sda/queue/scheduler
 echo cfq  /sys/block/sda/queue/scheduler
 
 - video-for-linux update

Building with an -mm1 oldconfiged  on x86-64 arch I get:

  LD  fs/ntfs/built-in.o
  CC [M]  fs/ntfs/aops.o
  CC [M]  fs/ntfs/attrib.o
fs/ntfs/attrib.c: In function `ntfs_attr_make_non_resident':
fs/ntfs/attrib.c:1295: warning: implicit declaration of function 
`ntfs_cluster_alloc'
fs/ntfs/attrib.c:1296: error: `DATA_ZONE' undeclared (first use in this 
function)
fs/ntfs/attrib.c:1296: error: (Each undeclared identifier is reported only once
fs/ntfs/attrib.c:1296: error: for each function it appears in.)
fs/ntfs/attrib.c:1296: warning: assignment makes pointer from integer without a 
cast
fs/ntfs/attrib.c:1435: warning: implicit declaration of function 
`flush_dcache_mft_record_page'
fs/ntfs/attrib.c:1436: warning: implicit declaration of function 
`mark_mft_record_dirty'
fs/ntfs/attrib.c:1443: warning: implicit declaration of function 
`mark_page_accessed'
fs/ntfs/attrib.c:1521: warning: implicit declaration of function 
`ntfs_cluster_free_from_rl'
make[2]: *** [fs/ntfs/attrib.o] Error 1
make[1]: *** [fs/ntfs] Error 2
make: *** [fs] Error 2

Ed Tomlinson
-
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] mm counter operations through macros

2005-03-12 Thread Nikita Danilov
Christoph Lameter writes:
  On Fri, 11 Mar 2005, Dave Jones wrote:
  
   Splitting this last one into inc_mm_counter() and dec_mm_counter()
   means you can kill off the last argument, and get some of the
   readability back. As it stands, I think this patch adds a bunch
   of obfuscation for no clear benefit.
  
  Ok.
  -
  This patch extracts all the operations on counters protected by the
  page table lock (currently rss and anon_rss) into definitions in
  include/linux/sched.h. All rss operations are performed through
  the following macros:
  
  get_mm_counter(mm, member)   - Obtain the value of a counter
  set_mm_counter(mm, member, value)- Set the value of a counter
  update_mm_counter(mm, member, value) - Add to a counter

A nitpick, but wouldn't be it clearer to call it add_mm_counter()? As an
additional bonus this matches atomic_{inc,dec,add}() and makes macro
names more uniform.

  inc_mm_counter(mm, member)   - Increment a counter
  dec_mm_counter(mm, member)   - Decrement a counter

Nikita.
-
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/


Strange Linking Problem

2005-03-12 Thread Matthias-Christian Ott
Hi!
I hope I'm right here. I've the following assembler code:
SECTION .DATA
   hello: db 'Hello world!',10
   helloLen:  equ $-hello
SECTION .TEXT
   GLOBAL main
main:

   ; Write 'Hello world!' to the screen
   mov eax,4; 'write' system call
   mov ebx,1; file descriptor 1 = screen
   mov ecx,hello; string to write
   mov edx,helloLen ; length of string to write
   int 80h  ; call the kernel
   ; Terminate program
   mov eax,1; 'exit' system call
   mov ebx,0; exit with error code 0
   int 80h  ; call the kernel
Then I run:
nasm -f elf hello.asm
I link it with ld and run it:
ld -s -o hello hello.o
./hello
segmentation fault
I link it with the gcc and run it:
gcc hello.o -o hello
./hello
Hello world!
What's wrong with the ld?
Matthias-Christian Ott
-
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: [CHECKER] crash + fsck cause file systems to contain loops (msdos and vfat, 2.6.11)

2005-03-12 Thread OGAWA Hirofumi
Junfeng Yang [EMAIL PROTECTED] writes:

 Linus's current tree includes support for `mount -o sync' on the msdos and
 vfat filesystems.

 Thanks Andrew.  I can just do a bk clone from
 http://linux.bkbits.net/linux-2.6 to get Linus's current tree, right?

 The warning reported here doesn't need mount -o sync to trigger though.
 A simple crash on a default mounted FS can usually cause the FS loop.

 (Also, I realized I made many typos in my report --- this implies I'm
 tired and should probably get some sleep :)

Interesting.

$ /devel/linux/works/fatfs/fatfstools/dosfstools-2.10/dosfsck/dosfsck -a 
bug10/crash.img
dosfsck 2.10, 22 Sep 2003, FAT32, LFN
/0006
  Directory does not have any cluster  (. and ..).
  Dropping it.
Reclaimed 3 unused clusters (6144 bytes) in 3 chains.
Performing changes.
crash.img: 8 files, 3/8167 clusters

My fixed dosfsck found the above corruption in bug10/crash.img (bug7
has same corruption). And probably you can see root directory via 0006
directory, I guess your testing tree didn't have my patches yet (seems
old behavior).

BTW, what mount options did you use?

Thanks.
-- 
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/


Re: Strange Linking Problem

2005-03-12 Thread linux-os
On Sat, 12 Mar 2005, Matthias-Christian Ott wrote:
Hi!
I hope I'm right here. I've the following assembler code:
SECTION .DATA
  hello: db 'Hello world!',10
  helloLen:  equ $-hello
SECTION .TEXT
  GLOBAL main
main:

  ; Write 'Hello world!' to the screen
  mov eax,4; 'write' system call
  mov ebx,1; file descriptor 1 = screen
  mov ecx,hello; string to write
  mov edx,helloLen ; length of string to write
  int 80h  ; call the kernel
  ; Terminate program
  mov eax,1; 'exit' system call
  mov ebx,0; exit with error code 0
  int 80h  ; call the kernel
Then I run:
nasm -f elf hello.asm
I link it with ld and run it:
ld -s -o hello hello.o
./hello
segmentation fault
I link it with the gcc and run it:
gcc hello.o -o hello
./hello
Hello world!
What's wrong with the ld?
Nothing at all. Where is _start: ?
Remove the 'main' label and substitute _start:
It is 'C' convention that programs start with main(). They
really don't. With the Linux API, they start at _start: and
do some housekeeping before calling main. That's what the
crt.o file that the 'C' tool-chain uses, does.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.11 on an i686 machine (5537.79 BogoMips).
 Notice : All mail here is now cached for review by Dictator Bush.
 98.36% of all statistics are fiction.
-
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: out-of-line x86 put_user() implementation

2005-03-12 Thread Coywolf Qi Hunt
On Sun, 6 Feb 2005 22:23:51 -0800 (PST), Linus Torvalds
[EMAIL PROTECTED] wrote:
 
 I was looking at some of the code we generate, and happened to notice that
 we have this strange situation where the x86 get_user() macros generate
 out-of-line code to do all the address verification etc, but the
 put_user() ones do not, and do everything inline.
 
 I also noticed that (probably as a result of this), our put_user() on
 old i386 machines does not do the full magic manual page-following. Which
 means that copy-on-write doesn't necessarily work right due to the broken
 paging hw on the original 386 core.

I've noticed that put_user() ones do generate out-of-line code in 2.2.x and 
later got dropped out in patch-2.3.99-pre9.
( perhaps by http://www.uwsg.iu.edu/hypermail/linux/kernel/0005.2/0487.html )

At that time put_user is broken for i386 machines (security) - sem
stuff may be wrong too  was put on the job list. Not sure what bug it
was.


--coywolf

 
 I didn't fix the second part, but at least making things out-of-line makes
 it possible. And making put_user() be out-of-line seemed quite doable.
 
 I no longer use x86 as my main machine, so this patch is totally untested.
 I've compiled it to see that things look somewhat sane, but that doesn't
 mean much. If I forgot some register or screwed something else up, this
 will result in a totally nonworking kernel, but I thought that maybe
 somebody else would be interested in looking at whether this (a) works,
 (b) migth even shrink the kernel and (c) might make us able to DTRT wrt
 the page table following crud (old i386 cores may be hard to find these
 days, so maybe people don't care).
 
 Linus
 
 
 # This is a BitKeeper generated diff -Nru style patch.
 #
 # ChangeSet
 #   2005/02/06 22:10:04-08:00 [EMAIL PROTECTED]
 #   x86: make put_user() be out-of-line
 #
 #   It's really too big to be inlined.
 #
 # arch/i386/lib/putuser.S
 #   2005/02/06 22:09:53-08:00 [EMAIL PROTECTED] +87 -0
 #
 # include/asm-i386/uaccess.h
 #   2005/02/06 22:09:53-08:00 [EMAIL PROTECTED] +27 -3
 #   x86: make put_user() be out-of-line
 #
 #   It's really too big to be inlined.
 #
 # arch/i386/lib/putuser.S
 #   2005/02/06 22:09:53-08:00 [EMAIL PROTECTED] +0 -0
 #   BitKeeper file /home/torvalds/v2.6/linux/arch/i386/lib/putuser.S
 #
 # arch/i386/lib/Makefile
 #   2005/02/06 22:09:53-08:00 [EMAIL PROTECTED] +1 -1
 #   x86: make put_user() be out-of-line
 #
 #   It's really too big to be inlined.
 #
 # arch/i386/kernel/i386_ksyms.c
 #   2005/02/06 22:09:53-08:00 [EMAIL PROTECTED] +5 -0
 #   x86: make put_user() be out-of-line
 #
 #   It's really too big to be inlined.
 #
 diff -Nru a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c
 --- a/arch/i386/kernel/i386_ksyms.c 2005-02-06 22:12:01 -08:00
 +++ b/arch/i386/kernel/i386_ksyms.c 2005-02-06 22:12:01 -08:00
 @@ -97,6 +97,11 @@
  EXPORT_SYMBOL(__get_user_2);
  EXPORT_SYMBOL(__get_user_4);
 
 +EXPORT_SYMBOL(__put_user_1);
 +EXPORT_SYMBOL(__put_user_2);
 +EXPORT_SYMBOL(__put_user_4);
 +EXPORT_SYMBOL(__put_user_8);
 +
  EXPORT_SYMBOL(strpbrk);
  EXPORT_SYMBOL(strstr);
 
 diff -Nru a/arch/i386/lib/Makefile b/arch/i386/lib/Makefile
 --- a/arch/i386/lib/Makefile2005-02-06 22:12:01 -08:00
 +++ b/arch/i386/lib/Makefile2005-02-06 22:12:01 -08:00
 @@ -3,7 +3,7 @@
  #
 
 -lib-y = checksum.o delay.o usercopy.o getuser.o memcpy.o strstr.o \
 +lib-y = checksum.o delay.o usercopy.o getuser.o putuser.o memcpy.o strstr.o \
 bitops.o
 
  lib-$(CONFIG_X86_USE_3DNOW) += mmx.o
 diff -Nru a/arch/i386/lib/putuser.S b/arch/i386/lib/putuser.S
 --- /dev/null   Wed Dec 31 16:00:00 196900
 +++ b/arch/i386/lib/putuser.S   2005-02-06 22:12:01 -08:00
 @@ -0,0 +1,87 @@
 +/*
 + * __put_user functions.
 + *
 + * (C) Copyright 2005 Linus Torvalds
 + *
 + * These functions have a non-standard call interface
 + * to make them more efficient, especially as they
 + * return an error value in addition to the real
 + * return value.
 + */
 +#include asm/thread_info.h
 +
 +
 +/*
 + * __put_user_X
 + *
 + * Inputs: %eax[:%edx] contains the data
 + * %ecx contains the address
 + *
 + * Outputs:%eax is error code (0 or -EFAULT)
 + * %ecx is corrupted
 + *
 + * These functions should not modify any other registers,
 + * as they get called from within inline assembly.
 + */
 +
 +#define ENTER  pushl %ecx ; pushl %ebx ; GET_THREAD_INFO(%ebx)
 +#define EXIT   popl %ebx ; popl %ecx ; ret
 +
 +.text
 +.align 4
 +.globl __put_user_1
 +__put_user_1:
 +   ENTER
 +   cmpl TI_addr_limit(%ebx),%ecx
 +   jae bad_put_user
 +1: movb %al,(%ecx)
 +   xorl %eax,%eax
 +   EXIT
 +
 +.align 4
 +.globl __put_user_2
 +__put_user_2:
 +   ENTER
 +   addl $1,%ecx
 +   jc bad_put_user
 +   cmpl TI_addr_limit(%ebx),%ecx
 +   jae bad_put_user
 +2: movw %ax,-1(%ecx)
 +   xorl %eax,%eax
 +   EXIT
 +
 +.align 4
 +.globl __put_user_4
 +__put_user_4:
 +   ENTER
 

[PATCH] Support for new ipod mini (and possibly others) + usb + linux 2.6

2005-03-12 Thread Guillermo Menguez Alvarez
Just a little patch to unusual_devs.h in usb-storage in order to support
new ipods mini (ie. the new 6 gig model) and possibly other new big
models
reported to have problems through usb in linux 2.6.

Regards,
Guillermo.

--- linux-2.6.11/drivers/usb/storage/unusual_devs.h 2005-03-12 
15:52:30.0 +0100
+++ linux-2.6.11-ipod/drivers/usb/storage/unusual_devs.h2005-03-12 
15:54:43.0 +0100
@@ -497,6 +497,12 @@ UNUSUAL_DEV( 0x05ac, 0x1203, 0x0001, 0x0
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),
 
+UNUSUAL_DEV( 0x05ac, 0x1205, 0x0001, 0x0001,
+   Apple,
+   iPod,
+   US_SC_DEVICE, US_PR_DEVICE, NULL,
+   US_FL_FIX_CAPACITY ),
+
 #ifdef CONFIG_USB_STORAGE_JUMPSHOT
 UNUSUAL_DEV(  0x05dc, 0x0001, 0x, 0x0001,
Lexar,


-- 
Usuario Linux #212057 - Maquinas Linux #98894, #130864 y #168988
Proyecto LONIX: http://lonix.sourceforge.net
Lagrimas en la Lluvia: http://www.lagrimasenlalluvia.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: Strange memory leak in 2.6.x

2005-03-12 Thread Alexander Nyberg
  Yikes something isn't right with these backtraces that page_owner is
  showing. Even without frame pointers it shouldn't be this noisy.
 
 If you could send me some pointers to documents how to interpret
 this output, i would appreciate it.

The whole output indicates who has allocated whole pages from the page
allocator. It shows us a bit of the call trace of who allocated it. If
we see that someone has allocated abnormally much memory (considering
how much the caller 'should' have allocated) there is a good chance that
that caller is leaking memory.

This is for example good complete trace:
[0xc0148b9a] do_anonymous_page+170
[0xc0148cdb] do_no_page+75
[0xc0149128] handle_mm_fault+264
[0xc0113625] do_page_fault+501
[0xc0104a7b] error_code+43

The next one here is how it looks when it is not so good:
[0xc013962b] find_or_create_page+91
[0xc01596ac] grow_dev_page+44
[0xc015986a] __getblk_slow+170
[0xc0159c26] __getblk+54
[0xf8ac0a57] +1207
[0xf8abfccd] +61
[0xf8ac03c1] +241
[0xf8ac040a] +42


Stupid me, the 0xf8ac040a addresses are vmalloc space (modules). I need
to look into why it doesn't work with vmalloc but in the meantime, could
you please save a copy of /proc/kallsyms from the computer right away so
that I can look up those when the computer locks up (the copy needs to
be from the current run, addresses can change between reboots).


  And when that kernel is booted, could you directly send me the output
  of /proc/page_owner (sort or unsorted) so that I can see if something is
  wrong with the data it's producing (just to be sure).
 
 See http://download.hennerich.de/page_owner_sorted_20050312_1040.bz2
 
  If it works better with CONFIG_FRAME_POINTER, i'm also going to have to
  ask you to do another one of these runs that you just did.
 
 The cronjob which generates each 10 minutes a new actual file of 
 page_owner_sorted is still running... and I'm afraid that we will
 run into problems sooner or later again...

Thanks for helping to track this down.

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


The address displayed by ldd

2005-03-12 Thread gan_xiao_jun
Hi,

I have a small question, 
I am not sure if it belongs to kernel.
I often use ldd to find librarys needed.
In some systems,the address display by ldd not
changes,
But in other systems, it changes.

What is the reason of the difference?
Is it cause by some setting in kernel?

Thanks in advance.
gan




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250
-
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] APM: fix interrupts enabled in device_power_up

2005-03-12 Thread Zwane Mwaikambo
On Sat, 12 Mar 2005, J. Bruce Fields wrote:

 On APM resume this morning on my Thinkpad X31, I got a spin_lock is
 already locked error; see below.  This doesn't happen on every resume,
 though it's happened before.  The kernel is 2.6.11 plus a bunch of
 (hopefully unrelated...) NFS patches.

 Mar 12 07:07:31 puzzle kernel: PCI: Setting latency timer of device 
 :00:1f.5 to 64
 Mar 12 07:07:31 puzzle kernel: arch/i386/kernel/time.c:179: 
 spin_lock(arch/i386/kernel/time.c:c0603c28) already locked by 
 arch/i386/kernel/time.c/309
 Mar 12 07:07:31 puzzle kernel: arch/i386/kernel/time.c:316: 
 spin_unlock(arch/i386/kernel/time.c:c0603c28) not locked

APM was calling device_power_down and device_power_up with interrupts 
enabled, resulting in a few calls to get_cmos_time being done with 
interrupts enabled (rtc_lock needs to be acquired with interrupts 
disabled).

Signed-off-by: Zwane Mwaikambo [EMAIL PROTECTED]

= arch/i386/kernel/apm.c 1.72 vs edited =
--- 1.72/arch/i386/kernel/apm.c 2005-01-20 22:02:11 -07:00
+++ edited/arch/i386/kernel/apm.c   2005-03-12 08:17:52 -07:00
@@ -1202,10 +1202,11 @@
}
 
device_suspend(PMSG_SUSPEND);
+   local_irq_disable();
device_power_down(PMSG_SUSPEND);
 
/* serialize with the timer interrupt */
-   write_seqlock_irq(xtime_lock);
+   write_seqlock(xtime_lock);
 
/* protect against access to timer chip registers */
spin_lock(i8253_lock);
@@ -1216,20 +1217,22 @@
 * We'll undo any timer changes due to interrupts below.
 */
spin_unlock(i8253_lock);
-   write_sequnlock_irq(xtime_lock);
+   write_sequnlock(xtime_lock);
+   local_irq_enable();
 
save_processor_state();
err = set_system_power_state(APM_STATE_SUSPEND);
restore_processor_state();
 
-   write_seqlock_irq(xtime_lock);
+   local_irq_disable();
+   write_seqlock(xtime_lock);
spin_lock(i8253_lock);
reinit_timer();
set_time();
ignore_normal_resume = 1;
 
spin_unlock(i8253_lock);
-   write_sequnlock_irq(xtime_lock);
+   write_sequnlock(xtime_lock);
 
if (err == APM_NO_ERROR)
err = APM_SUCCESS;
@@ -1237,6 +1240,7 @@
apm_error(suspend, err);
err = (err == APM_SUCCESS) ? 0 : -EIO;
device_power_up();
+   local_irq_enable();
device_resume();
pm_send_all(PM_RESUME, (void *)0);
queue_event(APM_NORMAL_RESUME, NULL);
@@ -1255,17 +1259,22 @@
 {
int err;
 
+   local_irq_disable();
device_power_down(PMSG_SUSPEND);
/* serialize with the timer interrupt */
-   write_seqlock_irq(xtime_lock);
+   write_seqlock(xtime_lock);
/* If needed, notify drivers here */
get_time_diff();
-   write_sequnlock_irq(xtime_lock);
+   write_sequnlock(xtime_lock);
+   local_irq_enable();
 
err = set_system_power_state(APM_STATE_STANDBY);
if ((err != APM_SUCCESS)  (err != APM_NO_ERROR))
apm_error(standby, err);
+
+   local_irq_disable();
device_power_up();
+   local_irq_enable();
 }
 
 static apm_event_t get_event(void)
-
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] Use __init and __exit in pktcdvd

2005-03-12 Thread Peter Osterlund
This patch adds __init and __exit annotations to the pktcdvd driver.

Signed-off-by: Peter Osterlund [EMAIL PROTECTED]
---

 linux-petero/drivers/block/pktcdvd.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/block/pktcdvd.c~pktcdvd-module-init drivers/block/pktcdvd.c
--- linux/drivers/block/pktcdvd.c~pktcdvd-module-init   2005-03-11 
22:23:57.0 +0100
+++ linux-petero/drivers/block/pktcdvd.c2005-03-11 22:23:57.0 
+0100
@@ -2624,7 +2624,7 @@ static struct miscdevice pkt_misc = {
.fops   = pkt_ctl_fops
 };
 
-static int pkt_init(void)
+static int __init pkt_init(void)
 {
int ret;
 
@@ -2660,7 +2660,7 @@ out2:
return ret;
 }
 
-static void pkt_exit(void)
+static void __exit pkt_exit(void)
 {
remove_proc_entry(pktcdvd, proc_root_driver);
misc_deregister(pkt_misc);
_

-- 
Peter Osterlund - [EMAIL PROTECTED]
http://web.telia.com/~u89404340
-
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] DVD-RAM support for pktcdvd

2005-03-12 Thread Peter Osterlund
This patch makes it possible to use the packet writing driver with
DVD-RAM discs. The pktcdvd driver is not needed for writing to DVD-RAM
discs but it can improve write performance. Polgár István reports:

I wrote 178716Kb data to DVD-RAM without pktcdvd driver within
4.54 minutes. With pktcdvd driver it took me 2.33 minutes.

Signed-off-by: Peter Osterlund [EMAIL PROTECTED]
---

 linux-petero/Documentation/cdrom/packet-writing.txt |8 
 linux-petero/drivers/block/pktcdvd.c|9 +++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff -puN drivers/block/pktcdvd.c~packet-dvd-ram drivers/block/pktcdvd.c
--- linux/drivers/block/pktcdvd.c~packet-dvd-ram2005-03-11 
22:24:02.0 +0100
+++ linux-petero/drivers/block/pktcdvd.c2005-03-11 22:24:02.0 
+0100
@@ -1421,8 +1421,8 @@ static int pkt_set_write_settings(struct
char buffer[128];
int ret, size;
 
-   /* doesn't apply to DVD+RW */
-   if (pd-mmc3_profile == 0x1a)
+   /* doesn't apply to DVD+RW or DVD-RAM */
+   if ((pd-mmc3_profile == 0x1a) || (pd-mmc3_profile == 0x12))
return 0;
 
memset(buffer, 0, sizeof(buffer));
@@ -1536,6 +1536,7 @@ static int pkt_good_disc(struct pktcdvd_
break;
case 0x1a: /* DVD+RW */
case 0x13: /* DVD-RW */
+   case 0x12: /* DVD-RAM */
return 0;
default:
printk(pktcdvd: Wrong disc profile (%x)\n, 
pd-mmc3_profile);
@@ -1601,6 +1602,9 @@ static int pkt_probe_settings(struct pkt
case 0x13: /* DVD-RW */
printk(pktcdvd: inserted media is DVD-RW\n);
break;
+   case 0x12: /* DVD-RAM */
+   printk(pktcdvd: inserted media is DVD-RAM\n);
+   break;
default:
printk(pktcdvd: inserted media is CD-R%s\n, 
di.erasable ? W : );
break;
@@ -1893,6 +1897,7 @@ static int pkt_open_write(struct pktcdvd
switch (pd-mmc3_profile) {
case 0x13: /* DVD-RW */
case 0x1a: /* DVD+RW */
+   case 0x12: /* DVD-RAM */
DPRINTK(pktcdvd: write speed %ukB/s\n, write_speed);
break;
default:
diff -puN Documentation/cdrom/packet-writing.txt~packet-dvd-ram 
Documentation/cdrom/packet-writing.txt
--- linux/Documentation/cdrom/packet-writing.txt~packet-dvd-ram 2005-03-11 
22:24:02.0 +0100
+++ linux-petero/Documentation/cdrom/packet-writing.txt 2005-03-11 
22:24:02.0 +0100
@@ -62,6 +62,14 @@ generates aligned writes.
# mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime
 
 
+Packet writing for DVD-RAM media
+
+
+DVD-RAM discs are random writable, so using the pktcdvd driver is not
+necessary. However, using the pktcdvd driver can improve performance
+in the same way it does for DVD+RW media.
+
+
 Notes
 -
 
_

-- 
Peter Osterlund - [EMAIL PROTECTED]
http://web.telia.com/~u89404340
-
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-mm3

2005-03-12 Thread Anton Altaparmakov
On Sun, 13 Mar 2005, Reuben Farrelly wrote:
 At 12:42 a.m. 13/03/2005, Andrew Morton wrote:
  ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11/2.6.11-mm3/
  - A new version of the acpi poweroff fix.  People who were having trouble
with ACPI poweroff, please test and report.
  
  - A very large update to the CFQ I/O scheduler.  Treat with caution, run
benchmarks.  Remember that the I/O scheduler can be selected on a per-disk
basis with
  
  echo as  /sys/block/sda/queue/scheduler
  echo deadline  /sys/block/sda/queue/scheduler
  echo cfq  /sys/block/sda/queue/scheduler
  
  - video-for-linux update
 
 
 Ugh, NTFS is br0ken:

Thanks for the report.  All the below were already fixed in my tree except 
for the mark_page_accessed() one which is now fixed (needs include 
linux/swap.h).

Best regards,

Anton

   CC [M]  fs/ntfs/attrib.o
 fs/ntfs/attrib.c: In function 'ntfs_attr_make_non_resident':
 fs/ntfs/attrib.c:1295: warning: implicit declaration of function
 'ntfs_cluster_alloc'
 fs/ntfs/attrib.c:1296: error: 'DATA_ZONE' undeclared (first use in this
 function)
 fs/ntfs/attrib.c:1296: error: (Each undeclared identifier is reported only
 once
 fs/ntfs/attrib.c:1296: error: for each function it appears in.)
 fs/ntfs/attrib.c:1296: warning: assignment makes pointer from integer without
 a cast
 fs/ntfs/attrib.c:1435: warning: implicit declaration of function
 'flush_dcache_mft_record_page'
 fs/ntfs/attrib.c:1436: warning: implicit declaration of function
 'mark_mft_record_dirty'
 fs/ntfs/attrib.c:1443: warning: implicit declaration of function
 'mark_page_accessed'
 fs/ntfs/attrib.c:1521: warning: implicit declaration of function
 'ntfs_cluster_free_from_rl'
 make[2]: *** [fs/ntfs/attrib.o] Error 1
 make[1]: *** [fs/ntfs] Error 2
 make: *** [fs] Error 2
 
 Compile goes through to completion fine if I back out bk-ntfs.patch.
 
 Using gcc-4, but this problem did not exist in -mm2.

No, the relevant code didn't exist then either.  I only wrote it last 
week...

Best regards,

Anton
-- 
Anton Altaparmakov aia21 at cam.ac.uk (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/  http://www-stu.christs.cam.ac.uk/~aia21/
-
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: [CHECKER] sync doesn't flush everything out (msdos and vfat, 2.6.11)

2005-03-12 Thread OGAWA Hirofumi
Junfeng Yang [EMAIL PROTECTED] writes:

 Test cases and crashed disk images can be found at
 http://fisc.stanford.edu/bug8(msdos)
 http://fisc.stanford.edu/bug11   (vfat)

vfat and msdos doesn't support the link(), and the truncate() which
extends size is not supported yet.

This test seems to calling abort(0) by CHECK(ret)...
-- 
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/


Re: 2.6.11-mm3

2005-03-12 Thread Anton Altaparmakov
On Sat, 12 Mar 2005, Ed Tomlinson wrote:
 On Saturday 12 March 2005 06:42, Andrew Morton wrote:
  2.6.11-mm3
   From: Andrew Morton [EMAIL PROTECTED]
   To: linux-kernel@vger.kernel.org
   
  ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11/2.6.11-mm3/
  
  - A new version of the acpi poweroff fix.  People who were having trouble
    with ACPI poweroff, please test and report.
  
  - A very large update to the CFQ I/O scheduler.  Treat with caution, run
    benchmarks.  Remember that the I/O scheduler can be selected on a per-disk
    basis with 
  
  echo as  /sys/block/sda/queue/scheduler
  echo deadline  /sys/block/sda/queue/scheduler
  echo cfq  /sys/block/sda/queue/scheduler
  
  - video-for-linux update
 
 Building with an -mm1 oldconfiged  on x86-64 arch I get:
 
   LD  fs/ntfs/built-in.o
   CC [M]  fs/ntfs/aops.o
   CC [M]  fs/ntfs/attrib.o
 fs/ntfs/attrib.c: In function `ntfs_attr_make_non_resident':
 fs/ntfs/attrib.c:1295: warning: implicit declaration of function 
 `ntfs_cluster_alloc'
 fs/ntfs/attrib.c:1296: error: `DATA_ZONE' undeclared (first use in this 
 function)
 fs/ntfs/attrib.c:1296: error: (Each undeclared identifier is reported only 
 once
 fs/ntfs/attrib.c:1296: error: for each function it appears in.)
 fs/ntfs/attrib.c:1296: warning: assignment makes pointer from integer without 
 a cast
 fs/ntfs/attrib.c:1435: warning: implicit declaration of function 
 `flush_dcache_mft_record_page'
 fs/ntfs/attrib.c:1436: warning: implicit declaration of function 
 `mark_mft_record_dirty'
 fs/ntfs/attrib.c:1443: warning: implicit declaration of function 
 `mark_page_accessed'
 fs/ntfs/attrib.c:1521: warning: implicit declaration of function 
 `ntfs_cluster_free_from_rl'
 make[2]: *** [fs/ntfs/attrib.o] Error 1
 make[1]: *** [fs/ntfs] Error 2
 make: *** [fs] Error 2

Thanks for the report.  All the above were already fixed in my tree except
for the mark_page_accessed() one which is now fixed (needs include
linux/swap.h).

Best regards,

Anton
-- 
Anton Altaparmakov aia21 at cam.ac.uk (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/  http://www-stu.christs.cam.ac.uk/~aia21/

Badness in local_bh_enable at kernel/softirq.c:140

2005-03-12 Thread Kimmo Sundqvist
Hello

A bug I've been with for a while.  Any thoughts on this?  Just ask if you want  
more details.  This is a little firewall machine at home, with a HFC PCI ISDN 
card.  These appear in /var/log/messages about once an hour to once a day.

Linux shadowgate 2.6.10-gentoo-r6 #3 Thu Mar 10 20:40:32 EET 2005 i586 Pentium 
75 - 200 GenuineIntel GNU/Linux
shadowgate log # lsmod
Module  Size  Used by
cls_u32 7236  5 
sch_sfq 4640  3 
sch_cbq14432  1 
ipt_LOG 5888  1 
ipt_MASQUERADE  2432  1 
ipt_state   1408  2 
iptable_filter  2784  1 
ip_nat_ftp  3888  0 
iptable_nat20904  3 ipt_MASQUERADE,ip_nat_ftp
ip_conntrack_ftp   70992  1 ip_nat_ftp
ip_conntrack   38260  5 
ipt_MASQUERADE,ipt_state,ip_nat_ftp,iptable_nat,ip_conntrack_ftp
ip_tables  15008  5 
ipt_LOG,ipt_MASQUERADE,ipt_state,iptable_filter,iptable_nat
psmouse18024  0 
3c509  10708  0 
hisax 144672  3 
isdn  104704  5 hisax
slhc6304  1 isdn

PCI devices found:
  Bus  0, device   0, function  0:
Host bridge: Intel Corp. 430HX - 82439HX TXC [Triton II] (rev 1).
  Master Capable.  Latency=64.  
  Bus  0, device   7, function  0:
ISA bridge: Intel Corp. 82371SB PIIX3 ISA [Natoma/Triton II] (rev 0).
  Bus  0, device   7, function  1:
IDE interface: Intel Corp. 82371SB PIIX3 IDE [Natoma/Triton II] (rev 0).
  Master Capable.  Latency=64.  
  I/O at 0xf000 [0xf00f].
  Bus  0, device  11, function  0:
VGA compatible controller: Matrox Graphics, Inc. MGA 2164W [Millennium II] 
(rev 0).
  IRQ 10.
  Master Capable.  Latency=64.  
  Prefetchable 32 bit memory at 0xe000 [0xe0ff].
  Non-prefetchable 32 bit memory at 0xe100 [0xe1003fff].
  Non-prefetchable 32 bit memory at 0xe200 [0xe27f].
  Bus  0, device  13, function  0:
Network controller: Asustek Computer, Inc. ISDNLink P-IN100-ST-D (rev 2).
  IRQ 12.
  Master Capable.  Latency=16.  Max Lat=16.
  I/O at 0x6400 [0x6407].
  Non-prefetchable 32 bit memory at 0xe300 [0xe3ff].
  Bus  0, device  15, function  0:
Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 36).
  IRQ 7.
  Master Capable.  Latency=64.  Min Gnt=10.Max Lat=10.
  I/O at 0x6800 [0x687f].
  Non-prefetchable 32 bit memory at 0xe3001000 [0xe300107f].

Mar 12 10:39:45 shadowgate Badness in local_bh_enable at kernel/softirq.c:140
Mar 12 10:39:45 shadowgate [c0114ca4] local_bh_enable+0x64/0x70
Mar 12 10:39:45 shadowgate [c486afd7] isdn_ppp_xmit+0xf7/0x7e0 [isdn]
Mar 12 10:39:45 shadowgate [c485d646] isdn_net_xmit+0x186/0x1d0 [isdn]
Mar 12 10:39:45 shadowgate [c485d9e7] isdn_net_start_xmit+0x277/0x290 [isdn]
Mar 12 10:39:45 shadowgate [c02467c2] qdisc_restart+0x52/0x140
Mar 12 10:39:45 shadowgate [c023c78d] dev_queue_xmit+0x17d/0x200
Mar 12 10:39:45 shadowgate [c0241789] neigh_connected_output+0x89/0xd0
Mar 12 10:39:45 shadowgate [c02566ad] ip_finish_output2+0xbd/0x190
Mar 12 10:39:45 shadowgate [c02565f0] ip_finish_output2+0x0/0x190
Mar 12 10:39:45 shadowgate [c0245a27] nf_hook_slow+0x97/0xd0
Mar 12 10:39:45 shadowgate [c0252cf0] ip_forward_finish+0x0/0x40
Mar 12 10:39:45 shadowgate [c0254308] ip_finish_output+0x1b8/0x1c0
Mar 12 10:39:45 shadowgate [c02565f0] ip_finish_output2+0x0/0x190
Mar 12 10:39:45 shadowgate [c0252cf0] ip_forward_finish+0x0/0x40
Mar 12 10:39:45 shadowgate [c0252d0e] ip_forward_finish+0x1e/0x40
Mar 12 10:39:45 shadowgate [c0245a27] nf_hook_slow+0x97/0xd0
Mar 12 10:39:45 shadowgate [c0252c75] ip_forward+0x165/0x1e0
Mar 12 10:39:45 shadowgate [c0252cf0] ip_forward_finish+0x0/0x40
Mar 12 10:39:45 shadowgate [c0251d67] ip_rcv_finish+0x1c7/0x230
Mar 12 10:39:45 shadowgate [c0251ba0] ip_rcv_finish+0x0/0x230
Mar 12 10:39:45 shadowgate [c0245a27] nf_hook_slow+0x97/0xd0
Mar 12 10:39:45 shadowgate [c02519bb] ip_rcv+0x39b/0x450
Mar 12 10:39:45 shadowgate [c0251ba0] ip_rcv_finish+0x0/0x230
Mar 12 10:39:45 shadowgate [c023cd07] netif_receive_skb+0x177/0x220
Mar 12 10:39:45 shadowgate [c0117a68] __mod_timer+0x58/0x80
Mar 12 10:39:45 shadowgate [c023ce1f] process_backlog+0x6f/0x120
Mar 12 10:39:45 shadowgate [c023cf2f] net_rx_action+0x5f/0xf0
Mar 12 10:39:45 shadowgate [c0114c23] __do_softirq+0x83/0xa0
Mar 12 10:39:45 shadowgate [c0104759] do_softirq+0x39/0x40
Mar 12 10:39:45 shadowgate ===
Mar 12 10:39:45 shadowgate [c0104678] do_IRQ+0x48/0x60
Mar 12 10:39:45 shadowgate [c01030fa] common_interrupt+0x1a/0x20
Mar 12 10:39:45 shadowgate [c0100570] default_idle+0x0/0x30
Mar 12 10:39:45 shadowgate [c0100594] default_idle+0x24/0x30
Mar 12 10:39:45 shadowgate [c0100605] cpu_idle+0x25/0x40
Mar 12 10:39:45 shadowgate [c0368708] start_kernel+0x138/0x160

Please cc all replies.

-Kimmo S.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of 

Re: binary drivers and development

2005-03-12 Thread Felipe Alfaro Solana
On Thu, 10 Mar 2005 17:32:39 -0500, John Richard Moser
[EMAIL PROTECTED] wrote:
 CPL=3 scares me; context switches are expensive.  can they have direct
 hardware access?  I'm sure a security model to isolate user mode drivers
 could be in place. . .
 
 . . . huh.  Xen seems to run Linux at CPL=3 and give direct hardware
 access, so I guess user mode drivers are possible *shrug*.  Linux isn't
 a microkernel though.

Xen hypervisor runs at Ring0, while the guest OSs it supports run at Ring1.
-
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 patch] drivers/net/sis900.c: fix a warning

2005-03-12 Thread Adrian Bunk
This patch fixes the following warning, that comes from Linus' tree #if
CONFIG_NET_POLL_CONTROLLER=n:

--  snip  --

...
  CC  drivers/net/sis900.o
drivers/net/sis900.c:199: warning: 'sis900_poll' declared `static' but never 
defined
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

--- linux-2.6.11-mm3/drivers/net/sis900.c.old   2005-03-12 15:55:31.0 
+0100
+++ linux-2.6.11-mm3/drivers/net/sis900.c   2005-03-12 15:55:53.0 
+0100
@@ -196,7 +196,9 @@
 MODULE_PARM_DESC(max_interrupt_work, SiS 900/7016 maximum events handled per 
interrupt);
 MODULE_PARM_DESC(sis900_debug, SiS 900/7016 bitmapped debugging message 
level);
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
 static void sis900_poll(struct net_device *dev);
+#endif
 static int sis900_open(struct net_device *net_dev);
 static int sis900_mii_probe (struct net_device * net_dev);
 static void sis900_init_rxfilter (struct net_device * net_dev);

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


[2.6 patch] sound/oss/rme96xx.c: remove kernel 2.2 #if's

2005-03-12 Thread Adrian Bunk
This patch removes #if's for kernel 2.2 .

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

--- linux-2.6.11-mm2-full/sound/oss/rme96xx.c.old   2005-03-12 
12:24:43.0 +0100
+++ linux-2.6.11-mm2-full/sound/oss/rme96xx.c   2005-03-12 12:25:02.0 
+0100
@@ -1750,9 +1750,7 @@
 
 
 static struct file_operations rme96xx_audio_fops = {
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,4,0)
.owner   = THIS_MODULE,
-#endif
.read= rme96xx_read,
.write   = rme96xx_write,
.poll= rme96xx_poll,
@@ -1852,9 +1850,7 @@
 }
 
 static /*const*/ struct file_operations rme96xx_mixer_fops = {
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,4,0)
.owner   = THIS_MODULE,
-#endif
.ioctl   = rme96xx_mixer_ioctl,
.open= rme96xx_mixer_open,
.release = rme96xx_mixer_release,

-
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: spin_lock error in arch/i386/kernel/time.c on APM resume

2005-03-12 Thread George Anzinger
J. Bruce Fields wrote:
On APM resume this morning on my Thinkpad X31, I got a spin_lock is
already locked error; see below.  This doesn't happen on every resume,
though it's happened before.  The kernel is 2.6.11 plus a bunch of
(hopefully unrelated...) NFS patches.
Any ideas?
Yesterday's night mare, todays bug :(
Looks like we need the irq on the read clock also.  This is true both before and 
 after the prior cmos_time changes.

Andrew,
The attached replaces the patch I sent yesterday.
For those wanting to fix the kernel with out those patches, all that is needed 
its the chunk that applies, i.e. the _irq on the get_cmos_time() spinlocks.

And more... That this occures implies we are attempting to update the cmos clock 
on resume seems wrong.  One would presume that the time is wrong at this time 
and we are about to save that wrong time.  Possibly the APM code should change 
time_status to STA_UNSYNC on the way into the sleep (or what ever it is called). 
 Who should we ping with this?
~
Mar 12 07:07:31 puzzle kernel: PCI: Setting latency timer of device 
:00:1f.5 to 64
Mar 12 07:07:31 puzzle kernel: arch/i386/kernel/time.c:179: 
spin_lock(arch/i386/kernel/time.c:c0603c28) already locked by 
arch/i386/kernel/time.c/309
Mar 12 07:07:31 puzzle kernel: arch/i386/kernel/time.c:316: 
spin_unlock(arch/i386/kernel/time.c:c0603c28) not locked
~
--
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Source: MontaVista Software, Inc.
Type: Defect Fix 
Disposition: Pending
Description:

I was not happy with the locking on this.  Two changes:
1) Turn off irq while setting the clock.
2) Call the timer code only through the timer interface 
   (set a short timer to do it from the ntp call).

Signed-off-by: George Anzinger george@mvista.com

 time.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

Index: linux-2.6.12-rc/arch/i386/kernel/time.c
===
--- linux-2.6.12-rc.orig/arch/i386/kernel/time.c
+++ linux-2.6.12-rc/arch/i386/kernel/time.c
@@ -176,12 +176,12 @@ static int set_rtc_mmss(unsigned long no
int retval;
 
/* gets recalled with irq locally disabled */
-   spin_lock(rtc_lock);
+   spin_lock_irq(rtc_lock);
if (efi_enabled)
retval = efi_set_rtc_mmss(nowtime);
else
retval = mach_set_rtc_mmss(nowtime);
-   spin_unlock(rtc_lock);
+   spin_unlock_irq(rtc_lock);
 
return retval;
 }
@@ -282,14 +282,14 @@ unsigned long get_cmos_time(void)
 {
unsigned long retval;
 
-   spin_lock(rtc_lock);
+   spin_lock_irq(rtc_lock);
 
if (efi_enabled)
retval = efi_get_time();
else
retval = mach_get_cmos_time();
 
-   spin_unlock(rtc_lock);
+   spin_unlock_irq(rtc_lock);
 
return retval;
 }
@@ -338,7 +338,7 @@ static void sync_cmos_clock(unsigned lon
 }
 void notify_arch_cmos_timer(void)
 {
-   sync_cmos_clock(0);
+   mod_timer(sync_cmos_timer, jiffies + 1);
 }
 static long clock_cmos_diff, sleep_start;
 


Re: User mode drivers: part 1, interrupt handling (patch for 2.6.11)

2005-03-12 Thread Jon Smirl
On Fri, 11 Mar 2005 14:36:10 +1100, Peter Chubb
[EMAIL PROTECTED] wrote:
 
 As many of you will be aware, we've been working on infrastructure for
 user-mode PCI and other drivers.  The first step is to be able to
 handle interrupts from user space. Subsequent patches add
 infrastructure for setting up DMA for PCI devices.

I've tried implementing this before and could not get around the
interrupt problem. Most interrupts on the x86 architecture are shared.
Disabling the IRQ at the PIC blocks all of the shared IRQs. This works
(hope your userspace handler is last on the shared handler list) until
you have a problem in userspace.

Once you have a problem in userspace there is no way to acknowledge
the interrupt anymore. I tried to address that by maintaining a timer
and suspending the hardware through the D0 state to reset it. That had
some success. Not acknowledging the interrupt results in an interrupt
loop and reboot.

The problem can be mitigated by choosing what slot your hardware to
put your hardware in. This can reduce the number of shared interrupts.
If you can get exclusive use of the interrupt this method will work.

If I were designing a new bus I would make interrupt acknowledge part
of PCI config space in order to allow a single piece of code to
acknowledge them. Since we can't change the bus the only safe way to
do this is to build a hardware specific driver for each device to
acknowledge the interrupt.

Bottom line is that I could find no reliable solution for handing interrupts.

-- 
Jon Smirl
[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 patch] drivers/char/mwave/tp3780i.c: remove kernel 2.2 #if's

2005-03-12 Thread Adrian Bunk
This patch removes #if's for kernel 2.2 .

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/char/mwave/tp3780i.c |8 +---
 1 files changed, 1 insertion(+), 7 deletions(-)

--- linux-2.6.11-mm2-full/drivers/char/mwave/tp3780i.c.old  2005-03-12 
12:19:55.0 +0100
+++ linux-2.6.11-mm2-full/drivers/char/mwave/tp3780i.c  2005-03-12 
12:20:32.0 +0100
@@ -242,20 +242,14 @@
 {
int retval = 0;
DSP_3780I_CONFIG_SETTINGS *pSettings = pBDData-rDspSettings;
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,4,0)
struct resource *pres;
-#endif
 
PRINTK_2(TRACE_TP3780I,
tp3780i::tp3780I_ClaimResources entry pBDData %p\n, pBDData);
 
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,4,0)
pres = request_region(pSettings-usDspBaseIO, 16, mwave_3780i);
if ( pres == NULL ) retval = -EIO;
-#else
-   retval = check_region(pSettings-usDspBaseIO, 16);
-   if (!retval) request_region(pSettings-usDspBaseIO, 16, mwave_3780i);
-#endif
+
if (retval) {
PRINTK_ERROR(KERN_ERR_MWAVE tp3780i::tp3780I_ClaimResources: 
Error: Could not claim I/O region starting at %x\n, pSettings-usDspBaseIO);
retval = -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/


Error with Sil3112A SATA controller and Maxtor 300GB HDD

2005-03-12 Thread Guido Villa
Hello, 

I have an error as described in subject.
I couldn't find a previous report for this kind of error, so maybe you are 
interested in it. 

Motherboard: ASUS TUV4X, BIOS rev. 1005
SATA controller: Silicon Image 3112A, bios rev. 4.2.50
Hard disk: Maxtor Maxtor 6B300S0 (300GB, SATA) 

This is the only HDD attached to the controller. It is not the boot device, 
I have other HDDs on the IDE channels, but I don't think it matters. 

Kernels: 2.6.9, 2.6.10, 2.6.11.2
I also patched the 2.6.11.2 by adding this Maxtor disk to the sata_sil.c 
blacklist (once with the SIL_QUIRK_MOD15WRITE and once with the 
SIL_QUIRK_UDMA5MAX), but the behaviour did not change. 

Problem:
I create a single partition on the hard disk, I format it with ext2, I mount 
it, I begin writing onto the partition. After seconds (or minutes) of 
copying, I get this error: 

EXT2-fs error (device sda1): ext2_new_block: Allocating block in system zone 
- block = 22413316 

I have also tried with ext3, in this case it prints more error messages: 

EXT3-fs error (device sda1): ext3_new_block: Allocating block in system zone 
- block = 61997060
Aborting journal on device sda1.
EXT3-fs error (device sda1) in ext3_prepare_write: Journal has aborted
__journal_remove_journal_head: freeing b_committed_data
__journal_remove_journal_head: freeing b_frozen_data
__journal_remove_journal_head: freeing b_committed_data
__journal_remove_journal_head: freeing b_frozen_data
__journal_remove_journal_head: freeing b_committed_data
__journal_remove_journal_head: freeing b_frozen_data
__journal_remove_journal_head: freeing b_committed_data
__journal_remove_journal_head: freeing b_frozen_data
__journal_remove_journal_head: freeing b_frozen_data
ext3_abort called.
EXT3-fs error (device sda1): ext3_journal_start_sb: Detected aborted journal
Remounting filesystem read-only
EXT3-fs error (device sda1) in start_transaction: Journal has aborted 


When the disk is formatted and mounted as ext3, the error happens earlier 
that when formatted with ext2. 

Running badblocks on the disk gives random results, every time it finds a 
few bad blocks in different positions.
The powermax utility from Maxtor says that the HDD is ok, and there are no 
bad blocks, actually I do not think it is an hardware problem, but a problem 
with the SATA controller driver (and mybe some incompatibility with the 
Maxtor drive). 

Please let me know if you need any more information. 

Good bye,
Guido 

-
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 patch] drivers/scsi/dpti.h: remove kernel 2.2 #if's

2005-03-12 Thread Adrian Bunk
This patch removes #if's for kernel 2.2 .

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/dpti.h |   10 --
 1 files changed, 10 deletions(-)

--- linux-2.6.11-mm2-full/drivers/scsi/dpti.h.old   2005-03-12 
12:22:23.0 +0100
+++ linux-2.6.11-mm2-full/drivers/scsi/dpti.h   2005-03-12 12:22:46.0 
+0100
@@ -20,15 +20,9 @@
 #ifndef _DPT_H
 #define _DPT_H
 
-#ifndef LINUX_VERSION_CODE
 #include linux/version.h
-#endif

-#if LINUX_VERSION_CODE  KERNEL_VERSION(2,4,00)
-#define MAX_TO_IOP_MESSAGES   (210)
-#else
 #define MAX_TO_IOP_MESSAGES   (255)
-#endif
 #define MAX_FROM_IOP_MESSAGES (255)
 
 
@@ -321,10 +313,6 @@
 static void adpt_delay(int millisec);
 #endif
 
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2,4,0)
-static struct pci_dev* adpt_pci_find_device(uint vendor, struct pci_dev* from);
-#endif
-
 #if defined __ia64__ 
 static void adpt_ia64_info(sysInfo_S* si);
 #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: spin_lock error in arch/i386/kernel/time.c on APM resume

2005-03-12 Thread Zwane Mwaikambo
On Sat, 12 Mar 2005, George Anzinger wrote:

 Looks like we need the irq on the read clock also.  This is true both before
 and  after the prior cmos_time changes.
 
 The attached replaces the patch I sent yesterday.
 
 For those wanting to fix the kernel with out those patches, all that is needed
 its the chunk that applies, i.e. the _irq on the get_cmos_time() spinlocks.
 
 And more... That this occures implies we are attempting to update the cmos
 clock on resume seems wrong.  One would presume that the time is wrong at this
 time and we are about to save that wrong time.  Possibly the APM code should
 change time_status to STA_UNSYNC on the way into the sleep (or what ever it is
 called).  Who should we ping with this?

timer_resume, which appears to be the problem, wants to calculate amount 
of time was spent suspended, also your unconditional irq enable in 
get_cmos_time breaks the atomicity of device_power_up and would deadlock 
in sections of code which call get_time_diff() with xtime_lock held. I 
sent a patch subject APM: fix interrupts enabled in device_power_up 
which should address this.

Thanks,
Zwane

-
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: User mode drivers: part 1, interrupt handling (patch for 2.6.11)

2005-03-12 Thread Jon Smirl
On Fri, 11 Mar 2005 11:29:20 +0100, Pavel Machek [EMAIL PROTECTED] wrote:
 Hi!
 
  As many of you will be aware, we've been working on infrastructure for
  user-mode PCI and other drivers.  The first step is to be able to
  handle interrupts from user space. Subsequent patches add
  infrastructure for setting up DMA for PCI devices.
 
  The user-level interrupt code doesn't depend on the other patches, and
  is probably the most mature of this patchset.
 
 Okay, I like it; it means way easier PCI driver development.

It won't help with PCI driver development. I tried implementing this
for UML. If your driver has any bugs it won't get the interrupts
acknowledged correctly and you'll end up rebooting.

Xen just posted patches for using kgdb between two instances but I
don't see how they get out of the interrupt acknowledge problem
either.

 
 But... how do you handle shared PCI interrupts?
 
  This patch adds a new file to /proc/irq/nnn/ called irq.  Suitably
  privileged processes can open this file.  Reading the file returns the
  number of interrupts (if any) that have occurred since the last read.
  If the file is opened in blocking mode, reading it blocks until
  an interrupt occurs.  poll(2) and select(2) work as one would expect, to
  allow interrupts to be one of many events to wait for.
  (If you didn't like the file, one could have a special system call to
  return the file descriptor).
 
 This should go into Documentation/ somewhere.
 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/
 


-- 
Jon Smirl
[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: spin_lock error in arch/i386/kernel/time.c on APM resume

2005-03-12 Thread Venkatesh Pallipadi
On Sat, Mar 12, 2005 at 09:25:13AM -0700, Zwane Mwaikambo wrote:
 On Sat, 12 Mar 2005, George Anzinger wrote:
 
  And more... That this occures implies we are attempting to update the cmos
  clock on resume seems wrong.  One would presume that the time is wrong at 
  this
  time and we are about to save that wrong time.  Possibly the APM code should
  change time_status to STA_UNSYNC on the way into the sleep (or what ever it 
  is
  called).  Who should we ping with this?
 
 timer_resume, which appears to be the problem, wants to calculate amount 
 of time was spent suspended, also your unconditional irq enable in 
 get_cmos_time breaks the atomicity of device_power_up and would deadlock 
 in sections of code which call get_time_diff() with xtime_lock held. I 
 sent a patch subject APM: fix interrupts enabled in device_power_up 
 which should address this.
 

How about this patch? Also fixes one other use of rtc_lock in acpi/sleep/proc.c

Thanks,
Venki


rtc_lock is held during timer interrupts. So, we should block interrupts
while holding it.

Signed-off-by: Venkatesh Pallipadi [EMAIL PROTECTED]

--- linux-2.6.10/arch/i386/kernel/time.c.org2005-03-12 10:38:23.0 
-0800
+++ linux-2.6.10/arch/i386/kernel/time.c2005-03-12 10:40:26.0 
-0800
@@ -305,15 +305,16 @@ irqreturn_t timer_interrupt(int irq, voi
 unsigned long get_cmos_time(void)
 {
unsigned long retval;
+   unsigned long flags;
 
-   spin_lock(rtc_lock);
+   spin_lock_irqsave(rtc_lock, flags);
 
if (efi_enabled)
retval = efi_get_time();
else
retval = mach_get_cmos_time();
 
-   spin_unlock(rtc_lock);
+   spin_unlock_restore(rtc_lock, flags);
 
return retval;
 }
--- linux-2.6.10/drivers/acpi/sleep/proc.c.org  2005-03-12 10:50:40.0 
-0800
+++ linux-2.6.10/drivers/acpi/sleep/proc.c  2005-03-12 10:53:08.0 
-0800
@@ -84,10 +84,11 @@ static int acpi_system_alarm_seq_show(st
u32 sec, min, hr;
u32 day, mo, yr;
unsigned char   rtc_control = 0;
+   unsigned long   flags;
 
ACPI_FUNCTION_TRACE(acpi_system_alarm_seq_show);
 
-   spin_lock(rtc_lock);
+   spin_lock_irqsave(rtc_lock, flags);
 
sec = CMOS_READ(RTC_SECONDS_ALARM);
min = CMOS_READ(RTC_MINUTES_ALARM);
@@ -109,7 +110,7 @@ static int acpi_system_alarm_seq_show(st
else
yr = CMOS_READ(RTC_YEAR);
 
-   spin_unlock(rtc_lock);
+   spin_unlock_restore(rtc_lock, flags);
 
if (!(rtc_control  RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
BCD_TO_BIN(sec);
-
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/


Proposal: Latest Base Kernel on kernel.org

2005-03-12 Thread Mikhail Ramendik
Hello,

The Latest Stable Kernel on the main page of www.kernel.org is 2.6.11.2 and 
this is of course right.

But people who want to apply an -rc patch, or some other patchsets (e.g. -ck) 
want 2.6.11. They can currently get it only by browsing directories.

Perhaps, to enable easier usage of such patchsets, a latest Base kernel link 
should be added to the kernel.org main page? This would be the latest three 
point release. Of course it should be below stable, as stable is the 
default choice.

-- 
Yours, Mikhail Ramendik

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


Implementation of Buffer Headers in Linux kernel

2005-03-12 Thread Dinesh Ahuja
I have a few queries regarding the buffer headers in
linux. I a newbie so these queries may sound stupid to
linux gurus.

1. As per my understanding, block number in this
stucture corresponds to the block no of the data on a
logical device rather than on a physical device (hard
disk).

2. Why do we need pointer to a pointer for hash list ?
As per Maurice Bach book on OS, the hash list and free
list both are implemented as a circular, doubly link
list.

In the below, we have used a pointer for free list,
then why pointer to pointer has been used for hash
list.

struct buffer_head {
/* First cache line: */
struct buffer_head *b_next; /* Hash queue list */
struct buffer_head *b_next_free;/* lru/free list
linkage */
struct buffer_head *b_prev_free;/* doubly linked list
of buffers */
struct buffer_head **b_pprev;   /* doubly linked list
of hash-queue */
// Rest part of sructure has been stripped
off.
};


Can anyone clarify my these queries.

Thanks  Regards
Dinesh


Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
-
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: spin_lock error in arch/i386/kernel/time.c on APM resume

2005-03-12 Thread Zwane Mwaikambo
On Sat, 12 Mar 2005, Venkatesh Pallipadi wrote:

 On Sat, Mar 12, 2005 at 09:25:13AM -0700, Zwane Mwaikambo wrote:
  On Sat, 12 Mar 2005, George Anzinger wrote:
  
   And more... That this occures implies we are attempting to update the cmos
   clock on resume seems wrong.  One would presume that the time is wrong at 
   this
   time and we are about to save that wrong time.  Possibly the APM code 
   should
   change time_status to STA_UNSYNC on the way into the sleep (or what ever 
   it is
   called).  Who should we ping with this?
  
  timer_resume, which appears to be the problem, wants to calculate amount 
  of time was spent suspended, also your unconditional irq enable in 
  get_cmos_time breaks the atomicity of device_power_up and would deadlock 
  in sections of code which call get_time_diff() with xtime_lock held. I 
  sent a patch subject APM: fix interrupts enabled in device_power_up 
  which should address this.
  
 
 How about this patch? Also fixes one other use of rtc_lock in 
 acpi/sleep/proc.c

 rtc_lock is held during timer interrupts. So, we should block interrupts
 while holding it.

It's certainly a lot safer with saving/restoring eflags and the 
drivers/acpi/sleep/proc.c change is a good catch, but i think the 
get_cmos_time() callers should take care of the interrupt disabling. btw, 
s/spin_unlock_restore/spin_unlock_irqrestore/. Please submit the proc.c 
change.

Thanks,
Zwane

 Signed-off-by: Venkatesh Pallipadi [EMAIL PROTECTED]
 
 --- linux-2.6.10/arch/i386/kernel/time.c.org  2005-03-12 10:38:23.0 
 -0800
 +++ linux-2.6.10/arch/i386/kernel/time.c  2005-03-12 10:40:26.0 
 -0800
 @@ -305,15 +305,16 @@ irqreturn_t timer_interrupt(int irq, voi
  unsigned long get_cmos_time(void)
  {
   unsigned long retval;
 + unsigned long flags;
  
 - spin_lock(rtc_lock);
 + spin_lock_irqsave(rtc_lock, flags);
  
   if (efi_enabled)
   retval = efi_get_time();
   else
   retval = mach_get_cmos_time();
  
 - spin_unlock(rtc_lock);
 + spin_unlock_restore(rtc_lock, flags);
  
   return retval;
  }
 --- linux-2.6.10/drivers/acpi/sleep/proc.c.org2005-03-12 
 10:50:40.0 -0800
 +++ linux-2.6.10/drivers/acpi/sleep/proc.c2005-03-12 10:53:08.0 
 -0800
 @@ -84,10 +84,11 @@ static int acpi_system_alarm_seq_show(st
   u32 sec, min, hr;
   u32 day, mo, yr;
   unsigned char   rtc_control = 0;
 + unsigned long   flags;
  
   ACPI_FUNCTION_TRACE(acpi_system_alarm_seq_show);
  
 - spin_lock(rtc_lock);
 + spin_lock_irqsave(rtc_lock, flags);
  
   sec = CMOS_READ(RTC_SECONDS_ALARM);
   min = CMOS_READ(RTC_MINUTES_ALARM);
 @@ -109,7 +110,7 @@ static int acpi_system_alarm_seq_show(st
   else
   yr = CMOS_READ(RTC_YEAR);
  
 - spin_unlock(rtc_lock);
 + spin_unlock_restore(rtc_lock, flags);
  
   if (!(rtc_control  RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
   BCD_TO_BIN(sec);
 
-
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/


  1   2   >