[MTD] [NAND] nand_base.c: fix type of eccpos pointer

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=515495a1da9abf339b922b7919c4950e85b87b42
Commit: 515495a1da9abf339b922b7919c4950e85b87b42
Parent: a4265f8d9241ba583e48380f1b9e60cfcb798449
Author: Ben Dooks <[EMAIL PROTECTED]>
AuthorDate: Mon May 28 19:17:54 2007 +0100
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 21:47:01 2007 +0100

[MTD] [NAND] nand_base.c: fix type of eccpos pointer

The nand_base.c driver implicitly casts the uint32_t
eccpos array to 'int *', which is not only not guaranteed
to be the same sign as the source, but is not guaranteed
to be the same size.

Fix by changing nand_base.c to use uint32_t
referencing the eccpos fields.

Signed-off-by: Ben Dooks <[EMAIL PROTECTED]>
Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 drivers/mtd/nand/nand_base.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 4b019c6..24ac677 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -772,7 +772,7 @@ static int nand_read_page_swecc(struct mtd_info *mtd, 
struct nand_chip *chip,
uint8_t *p = buf;
uint8_t *ecc_calc = chip->buffers->ecccalc;
uint8_t *ecc_code = chip->buffers->ecccode;
-   int *eccpos = chip->ecc.layout->eccpos;
+   uint32_t *eccpos = chip->ecc.layout->eccpos;
 
chip->ecc.read_page_raw(mtd, chip, buf);
 
@@ -814,7 +814,7 @@ static int nand_read_page_hwecc(struct mtd_info *mtd, 
struct nand_chip *chip,
uint8_t *p = buf;
uint8_t *ecc_calc = chip->buffers->ecccalc;
uint8_t *ecc_code = chip->buffers->ecccode;
-   int *eccpos = chip->ecc.layout->eccpos;
+   uint32_t *eccpos = chip->ecc.layout->eccpos;
 
for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
chip->ecc.hwctl(mtd, NAND_ECC_READ);
@@ -1420,7 +1420,7 @@ static void nand_write_page_swecc(struct mtd_info *mtd, 
struct nand_chip *chip,
int eccsteps = chip->ecc.steps;
uint8_t *ecc_calc = chip->buffers->ecccalc;
const uint8_t *p = buf;
-   int *eccpos = chip->ecc.layout->eccpos;
+   uint32_t *eccpos = chip->ecc.layout->eccpos;
 
/* Software ecc calculation */
for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize)
@@ -1446,7 +1446,7 @@ static void nand_write_page_hwecc(struct mtd_info *mtd, 
struct nand_chip *chip,
int eccsteps = chip->ecc.steps;
uint8_t *ecc_calc = chip->buffers->ecccalc;
const uint8_t *p = buf;
-   int *eccpos = chip->ecc.layout->eccpos;
+   uint32_t *eccpos = chip->ecc.layout->eccpos;
 
for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
chip->ecc.hwctl(mtd, NAND_ECC_WRITE);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MTD] [NAND] at91_nand rdy_pin fix

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a4265f8d9241ba583e48380f1b9e60cfcb798449
Commit: a4265f8d9241ba583e48380f1b9e60cfcb798449
Parent: 06a7643cd3d440a1d15a6b3aa7ee431f3f4791b4
Author: Ivan Kuten <[EMAIL PROTECTED]>
AuthorDate: Thu May 24 14:35:58 2007 +0300
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 21:46:48 2007 +0100

[MTD] [NAND] at91_nand rdy_pin fix

The patch below fixes nand driver for AT91 boards which do not have NAND
R/B signal connected to gpio (rdy_pin is not connected).

Signed-off-by: Ivan Kuten <[EMAIL PROTECTED]>
Acked-by: Andrew Victor <[EMAIL PROTECTED]>
Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 drivers/mtd/nand/at91_nand.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/at91_nand.c b/drivers/mtd/nand/at91_nand.c
index 512e999..b2a5672 100644
--- a/drivers/mtd/nand/at91_nand.c
+++ b/drivers/mtd/nand/at91_nand.c
@@ -128,7 +128,10 @@ static int __init at91_nand_probe(struct platform_device 
*pdev)
nand_chip->IO_ADDR_R = host->io_base;
nand_chip->IO_ADDR_W = host->io_base;
nand_chip->cmd_ctrl = at91_nand_cmd_ctrl;
-   nand_chip->dev_ready = at91_nand_device_ready;
+
+   if (host->board->rdy_pin)
+   nand_chip->dev_ready = at91_nand_device_ready;
+
nand_chip->ecc.mode = NAND_ECC_SOFT;/* enable ECC */
nand_chip->chip_delay = 20; /* 20us command delay time */
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MTD] [NAND] fix race in nand_base.c

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=06a7643cd3d440a1d15a6b3aa7ee431f3f4791b4
Commit: 06a7643cd3d440a1d15a6b3aa7ee431f3f4791b4
Parent: 9d7b4b5562b60c826c71cf2e1b7b63add42e527f
Author: Artem Bityutskiy <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 16:06:50 2007 +0300
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 21:46:21 2007 +0100

[MTD] [NAND] fix race in nand_base.c

When we mark block bad we have to get chip because this involves
writing to the page's OOB. We hit this bug in UBI - we observed
random obscure crashes when it marks block bad from the background
thread and there is some parallel task which utilizes flash.

This patch also adds a TODO note about BBT table protection which
it seems does not exist.

Signed-off-by: Artem Bityutskiy <[EMAIL PROTECTED]>
Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 drivers/mtd/nand/nand_base.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 7e68203..4b019c6 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -24,6 +24,7 @@
  * if we have HW ecc support.
  * The AG-AND chips have nice features for speed improvement,
  * which are not supported yet. Read / program 4 pages in one go.
+ * BBT table is not serialized, has to be fixed
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -360,6 +361,7 @@ static int nand_default_block_markbad(struct mtd_info *mtd, 
loff_t ofs)
/* We write two bytes, so we dont have to mess with 16 bit
 * access
 */
+   nand_get_device(chip, mtd, FL_WRITING);
ofs += mtd->oobsize;
chip->ops.len = chip->ops.ooblen = 2;
chip->ops.datbuf = NULL;
@@ -367,9 +369,11 @@ static int nand_default_block_markbad(struct mtd_info 
*mtd, loff_t ofs)
chip->ops.ooboffs = chip->badblockpos & ~0x01;
 
ret = nand_do_write_oob(mtd, ofs, &chip->ops);
+   nand_release_device(mtd);
}
if (!ret)
mtd->ecc_stats.badblocks++;
+
return ret;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MTD] [NAND] Fix refactoring of EDB7312 hwcontrol function.

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9d7b4b5562b60c826c71cf2e1b7b63add42e527f
Commit: 9d7b4b5562b60c826c71cf2e1b7b63add42e527f
Parent: 47af05dd4b98b57eeb682596a0df42d106e02167
Author: Roland Stigge <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 18 14:56:11 2007 +0200
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 21:46:07 2007 +0100

[MTD] [NAND] Fix refactoring of EDB7312 hwcontrol function.

The patch ensures that the current code (kernel 2.6.22) uses the bits
like the code prior to the refactoring. The variable "bits" is employed
in a useful way now.

Signed-off-by: Roland Stigge <[EMAIL PROTECTED]>
Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 drivers/mtd/nand/edb7312.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/nand/edb7312.c b/drivers/mtd/nand/edb7312.c
index 1daf823..0146cdc 100644
--- a/drivers/mtd/nand/edb7312.c
+++ b/drivers/mtd/nand/edb7312.c
@@ -74,7 +74,7 @@ static struct mtd_partition partition_info[] = {
 /*
  * hardware specific access to control-lines
  *
- * NAND_NCE: bit 0 -> bit 7
+ * NAND_NCE: bit 0 -> bit 6 (bit 7 = 1)
  * NAND_CLE: bit 1 -> bit 4
  * NAND_ALE: bit 2 -> bit 5
  */
@@ -83,12 +83,12 @@ static void ep7312_hwcontrol(struct mtd_info *mtd, int cmd, 
unsigned int ctrl)
struct nand_chip *chip = mtd->priv;
 
if (ctrl & NAND_CTRL_CHANGE) {
-   unsigned char bits;
+   unsigned char bits = 0x80;
 
-   bits = (ctrl & (NAND_CLE | NAND_ALE)) << 3;
-   bits = (ctrl & NAND_NCE) << 7;
+   bits |= (ctrl & (NAND_CLE | NAND_ALE)) << 3;
+   bits |= (ctrl & NAND_NCE) ? 0x00 : 0x40;
 
-   clps_writeb((clps_readb(ep7312_pxdr)  & 0xB0) | 0x10,
+   clps_writeb((clps_readb(ep7312_pxdr)  & 0xF0) | bits,
ep7312_pxdr);
}
if (cmd != NAND_CMD_NONE)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MTD] Fix potential leak in rfd_ftl_add_mtd

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=47af05dd4b98b57eeb682596a0df42d106e02167
Commit: 47af05dd4b98b57eeb682596a0df42d106e02167
Parent: b8e3ec30c232eb76c96ecab52205fe46e8b0473a
Author: Florin Malita <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 19 16:45:18 2007 -0400
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 21:44:10 2007 +0100

[MTD] Fix potential leak in rfd_ftl_add_mtd

This fixes a leak in the !mtd->erasesize error path (Coverity 1765).

Signed-off-by: Florin Malita <[EMAIL PROTECTED]>
Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 drivers/mtd/rfd_ftl.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c
index d4b1ba8..006c03a 100644
--- a/drivers/mtd/rfd_ftl.c
+++ b/drivers/mtd/rfd_ftl.c
@@ -779,6 +779,7 @@ static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, 
struct mtd_info *mtd)
else {
if (!mtd->erasesize) {
printk(KERN_WARNING PREFIX "please provide block_size");
+   kfree(part);
return;
}
else
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[JFFS2] Print correct node offset when complaining about broken data CRC

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b8e3ec30c232eb76c96ecab52205fe46e8b0473a
Commit: b8e3ec30c232eb76c96ecab52205fe46e8b0473a
Parent: 7b687707d769112aee220bafd50fa113363717ff
Author: David Woodhouse <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 5 01:57:26 2007 -0400
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 21:43:46 2007 +0100

[JFFS2] Print correct node offset when complaining about broken data CRC

Debugging the hardware problems in OLPC trac #1905 would be a whole lot
easier if the correct node offsets were printed for the offending nodes.

Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 fs/jffs2/readinode.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index 170da20..b5baa35 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -104,7 +104,7 @@ static int check_node_data(struct jffs2_sb_info *c, struct 
jffs2_tmp_dnode_info
 
if (crc != tn->data_crc) {
JFFS2_NOTICE("wrong data CRC in data node at 0x%08x: read 
%#08x, calculated %#08x.\n",
-   ofs, tn->data_crc, crc);
+ref_offset(ref), tn->data_crc, crc);
return 1;
}
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[JFFS2] Fix suspend failure with JFFS2 GC thread.

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b687707d769112aee220bafd50fa113363717ff
Commit: 7b687707d769112aee220bafd50fa113363717ff
Parent: 71c23397752c0e40722d931ab9152342e9673336
Author: David Woodhouse <[EMAIL PROTECTED]>
AuthorDate: Thu Jun 28 19:49:36 2007 +0100
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 21:43:03 2007 +0100

[JFFS2] Fix suspend failure with JFFS2 GC thread.

The try_to_freeze() call was in the wrong place; we need it in the
signal-pending loop now that a pending freeze also makes
signal_pending() return true.

Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 fs/jffs2/background.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c
index 143c553..504643f 100644
--- a/fs/jffs2/background.c
+++ b/fs/jffs2/background.c
@@ -84,7 +84,7 @@ static int jffs2_garbage_collect_thread(void *_c)
set_freezable();
for (;;) {
allow_signal(SIGHUP);
-
+   again:
if (!jffs2_thread_should_wake(c)) {
set_current_state (TASK_INTERRUPTIBLE);
D1(printk(KERN_DEBUG "jffs2_garbage_collect_thread 
sleeping...\n"));
@@ -95,9 +95,6 @@ static int jffs2_garbage_collect_thread(void *_c)
schedule();
}
 
-   if (try_to_freeze())
-   continue;
-
/* This thread is purely an optimisation. But if it runs when
   other things could be running, it actually makes things a
   lot worse. Use yield() and put it at the back of the runqueue
@@ -112,6 +109,9 @@ static int jffs2_garbage_collect_thread(void *_c)
siginfo_t info;
unsigned long signr;
 
+   if (try_to_freeze())
+   goto again;
+
signr = dequeue_signal_lock(current, ¤t->blocked, 
&info);
 
switch(signr) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[JFFS2] Deletion dirents should be REF_NORMAL, not REF_PRISTINE.

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=71c23397752c0e40722d931ab9152342e9673336
Commit: 71c23397752c0e40722d931ab9152342e9673336
Parent: 5bd5c03c317085339deb044ba52fce131a6a0b67
Author: David Woodhouse <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 29 13:39:57 2007 +0100
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 21:39:50 2007 +0100

[JFFS2] Deletion dirents should be REF_NORMAL, not REF_PRISTINE.

Otherwise they'll never actually get garbage-collected.
Noted by Jonathan Larmour.

Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 fs/jffs2/nodelist.h  |5 +
 fs/jffs2/readinode.c |2 +-
 fs/jffs2/scan.c  |3 ++-
 fs/jffs2/write.c |3 ++-
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h
index 25126a0..bc5509f 100644
--- a/fs/jffs2/nodelist.h
+++ b/fs/jffs2/nodelist.h
@@ -139,6 +139,11 @@ static inline struct jffs2_inode_cache 
*jffs2_raw_ref_to_ic(struct jffs2_raw_nod
 #define ref_obsolete(ref)  (((ref)->flash_offset & 3) == REF_OBSOLETE)
 #define mark_ref_normal(ref)do { (ref)->flash_offset = ref_offset(ref) | 
REF_NORMAL; } while(0)
 
+/* Dirent nodes should be REF_PRISTINE only if they are not a deletion
+   dirent. Deletion dirents should be REF_NORMAL so that GC gets to
+   throw them away when appropriate */
+#define dirent_node_state(rd)  ( 
(je32_to_cpu((rd)->ino)?REF_PRISTINE:REF_NORMAL) )
+
 /* NB: REF_PRISTINE for an inode-less node (ref->next_in_ino == NULL) indicates
it is an unknown node of type JFFS2_NODETYPE_RWCOMPAT_COPY, so it'll get
copied. If you need to do anything different to GC inode-less nodes, then
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index 7b36378..170da20 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -613,7 +613,7 @@ static inline int read_direntry(struct jffs2_sb_info *c, 
struct jffs2_raw_node_r
jeb->unchecked_size -= len;
c->used_size += len;
c->unchecked_size -= len;
-   ref->flash_offset = ref_offset(ref) | REF_PRISTINE;
+   ref->flash_offset = ref_offset(ref) | dirent_node_state(rd);
spin_unlock(&c->erase_completion_lock);
}
 
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index 2a1c976..6c75cd4 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -1049,7 +1049,8 @@ static int jffs2_scan_dirent_node(struct jffs2_sb_info 
*c, struct jffs2_eraseblo
return -ENOMEM;
}
 
-   fd->raw = jffs2_link_node_ref(c, jeb, ofs | REF_PRISTINE, 
PAD(je32_to_cpu(rd->totlen)), ic);
+   fd->raw = jffs2_link_node_ref(c, jeb, ofs | dirent_node_state(rd),
+ PAD(je32_to_cpu(rd->totlen)), ic);
 
fd->next = NULL;
fd->version = je32_to_cpu(rd->version);
diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c
index 1406f2c..bc61859 100644
--- a/fs/jffs2/write.c
+++ b/fs/jffs2/write.c
@@ -296,7 +296,8 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct 
jffs2_sb_info *c, struct jff
return ERR_PTR(ret?ret:-EIO);
}
/* Mark the space used */
-   fd->raw = jffs2_add_physical_node_ref(c, flash_ofs | REF_PRISTINE, 
PAD(sizeof(*rd)+namelen), f->inocache);
+   fd->raw = jffs2_add_physical_node_ref(c, flash_ofs | 
dirent_node_state(rd),
+ PAD(sizeof(*rd)+namelen), 
f->inocache);
if (IS_ERR(fd->raw)) {
void *hold_err = fd->raw;
/* Release the full_dirent which is now useless, and return */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[JFFS2] Prevent oops after 'node added in wrong place' debug check

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5bd5c03c317085339deb044ba52fce131a6a0b67
Commit: 5bd5c03c317085339deb044ba52fce131a6a0b67
Parent: 370504cf7c68b953de55c41d5e0be97d30f3cf00
Author: Joakim Tjernlund <[EMAIL PROTECTED]>
AuthorDate: Sun Jun 24 19:22:29 2007 +0200
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 21:36:35 2007 +0100

[JFFS2] Prevent oops after 'node added in wrong place' debug check

jffs2_add_physical_node_ref() should never really return error -- it's
an internal debugging check which triggered. We really need to work out
why and stop it happening. But in the meantime, let's make the failure
mode a little less nasty.

Signed-off-by: Joakim Tjernlund <[EMAIL PROTECTED]>
Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 fs/jffs2/write.c |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c
index c9fe0ab..1406f2c 100644
--- a/fs/jffs2/write.c
+++ b/fs/jffs2/write.c
@@ -173,6 +173,12 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct 
jffs2_sb_info *c, struct jffs2
flash_ofs |= REF_NORMAL;
}
fn->raw = jffs2_add_physical_node_ref(c, flash_ofs, 
PAD(sizeof(*ri)+datalen), f->inocache);
+   if (IS_ERR(fn->raw)) {
+   void *hold_err = fn->raw;
+   /* Release the full_dnode which is now useless, and return */
+   jffs2_free_full_dnode(fn);
+   return ERR_PTR(PTR_ERR(hold_err));
+   }
fn->ofs = je32_to_cpu(ri->offset);
fn->size = je32_to_cpu(ri->dsize);
fn->frags = 0;
@@ -291,6 +297,12 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct 
jffs2_sb_info *c, struct jff
}
/* Mark the space used */
fd->raw = jffs2_add_physical_node_ref(c, flash_ofs | REF_PRISTINE, 
PAD(sizeof(*rd)+namelen), f->inocache);
+   if (IS_ERR(fd->raw)) {
+   void *hold_err = fd->raw;
+   /* Release the full_dirent which is now useless, and return */
+   jffs2_free_full_dirent(fd);
+   return ERR_PTR(PTR_ERR(hold_err));
+   }
 
if (retried) {
jffs2_dbg_acct_sanity_check(c,NULL);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[x86 setup] Document grub < 0.93 as broken

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c3887cd7253299cac2a6dc5ea792613a5ba5bf6a
Commit: c3887cd7253299cac2a6dc5ea792613a5ba5bf6a
Parent: 463c9a9f7d1f746c251761cef3af5c808394b7e1
Author: H. Peter Anvin <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 13:50:43 2007 -0400
Committer:  H. Peter Anvin <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 13:50:43 2007 -0400

[x86 setup] Document grub < 0.93 as broken

Grub older than 0.93 are broken when the kernel setup is bigger than
8K.  This was fixed in 2002, and 0.93 was the first grub version which
fixed this bug.

Signed-off-by: H. Peter Anvin <[EMAIL PROTECTED]>
---
 Documentation/Changes |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Documentation/Changes b/Documentation/Changes
index 73a8617..cb2b141 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -45,6 +45,7 @@ o  nfs-utils  1.0.5   # showmount 
--version
 o  procps 3.2.0   # ps --version
 o  oprofile   0.9 # oprofiled --version
 o  udev   081 # udevinfo -V
+o  grub   0.93# grub --version
 
 Kernel compilation
 ==
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[x86 setup] EDD: add missing =m constraint

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=463c9a9f7d1f746c251761cef3af5c808394b7e1
Commit: 463c9a9f7d1f746c251761cef3af5c808394b7e1
Parent: 59acc08fd95aefb5430458a08a82b15a4174ed74
Author: H. Peter Anvin <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 13:45:49 2007 -0400
Committer:  H. Peter Anvin <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 13:45:49 2007 -0400

[x86 setup] EDD: add missing =m constraint

Add a missing =m constraint to the EDD-probing code, that could have
caused improper dead-code elimination.

Signed-off-by: H. Peter Anvin <[EMAIL PROTECTED]>
---
 arch/i386/boot/edd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/i386/boot/edd.c b/arch/i386/boot/edd.c
index 77d92da..658834d 100644
--- a/arch/i386/boot/edd.c
+++ b/arch/i386/boot/edd.c
@@ -127,7 +127,7 @@ static int get_edd_info(u8 devno, struct edd_info *ei)
ax = 0x4800;
dx = devno;
asm("pushfl; int $0x13; popfl"
-   : "+a" (ax), "+d" (dx)
+   : "+a" (ax), "+d" (dx), "=m" (ei->params)
: "S" (&ei->params)
: "ebx", "ecx", "edi");
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[x86 setup] video setup: Fix VBE DDC reading

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=59acc08fd95aefb5430458a08a82b15a4174ed74
Commit: 59acc08fd95aefb5430458a08a82b15a4174ed74
Parent: 1ed4395035a6791ebbbf618429a58ab9c207cc83
Author: Antonino A. Daplas <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 18:16:46 2007 +0800
Committer:  H. Peter Anvin <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 11:08:27 2007 -0400

[x86 setup] video setup: Fix VBE DDC reading

Add memory operand constraint and write-only modifier to the inline
assembly to effect the writing of the EDID block to boot_params.edid_info.

Without this, gcc would think the EDID query was dead code and would
eliminate it.

Signed-off-by: Antonino Daplas <[EMAIL PROTECTED]>
Signed-off-by: H. Peter Anvin <[EMAIL PROTECTED]>
---
 arch/i386/boot/video-vesa.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/i386/boot/video-vesa.c b/arch/i386/boot/video-vesa.c
index e6aa9eb..f1bc71e 100644
--- a/arch/i386/boot/video-vesa.c
+++ b/arch/i386/boot/video-vesa.c
@@ -268,7 +268,7 @@ void vesa_store_edid(void)
dx = 0; /* EDID block number */
di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */
asm(INT10
-   : "+a" (ax), "+b" (bx), "+d" (dx)
+   : "+a" (ax), "+b" (bx), "+d" (dx), "=m" (boot_params.edid_info)
: "c" (cx), "D" (di)
: "esi");
 #endif /* CONFIG_FIRMWARE_EDID */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sched: reduce debug code

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6cfb0d5d06bea2b8791f32145eae539d524e5f6c
Commit: 6cfb0d5d06bea2b8791f32145eae539d524e5f6c
Parent: 8179ca23d513717cc5e3dc81a1ffe01af0955468
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 17:41:40 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 17:41:40 2007 +0200

[PATCH] sched: reduce debug code

move the rest of the debugging/instrumentation code to under
CONFIG_SCHEDSTATS too. This reduces code size and speeds code up:

textdata bss dec hex filename
   330444122  28   37194914a sched.o.before
   327084122  28   368588ffa sched.o.after

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched.c   |   28 ++--
 kernel/sched_debug.c |   22 --
 kernel/sched_fair.c  |4 ++--
 kernel/sched_rt.c|4 ++--
 4 files changed, 38 insertions(+), 20 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index a9d3740..72bb948 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -983,18 +983,21 @@ void set_task_cpu(struct task_struct *p, unsigned int 
new_cpu)
u64 clock_offset, fair_clock_offset;
 
clock_offset = old_rq->clock - new_rq->clock;
-   fair_clock_offset = old_rq->cfs.fair_clock -
-new_rq->cfs.fair_clock;
-   if (p->se.wait_start)
-   p->se.wait_start -= clock_offset;
+   fair_clock_offset = old_rq->cfs.fair_clock - new_rq->cfs.fair_clock;
+
if (p->se.wait_start_fair)
p->se.wait_start_fair -= fair_clock_offset;
+   if (p->se.sleep_start_fair)
+   p->se.sleep_start_fair -= fair_clock_offset;
+
+#ifdef CONFIG_SCHEDSTATS
+   if (p->se.wait_start)
+   p->se.wait_start -= clock_offset;
if (p->se.sleep_start)
p->se.sleep_start -= clock_offset;
if (p->se.block_start)
p->se.block_start -= clock_offset;
-   if (p->se.sleep_start_fair)
-   p->se.sleep_start_fair -= fair_clock_offset;
+#endif
 
__set_task_cpu(p, new_cpu);
 }
@@ -1555,17 +1558,19 @@ int fastcall wake_up_state(struct task_struct *p, 
unsigned int state)
 static void __sched_fork(struct task_struct *p)
 {
p->se.wait_start_fair   = 0;
-   p->se.wait_start= 0;
p->se.exec_start= 0;
p->se.sum_exec_runtime  = 0;
p->se.delta_exec= 0;
p->se.delta_fair_run= 0;
p->se.delta_fair_sleep  = 0;
p->se.wait_runtime  = 0;
+   p->se.sleep_start_fair  = 0;
+
+#ifdef CONFIG_SCHEDSTATS
+   p->se.wait_start= 0;
p->se.sum_wait_runtime  = 0;
p->se.sum_sleep_runtime = 0;
p->se.sleep_start   = 0;
-   p->se.sleep_start_fair  = 0;
p->se.block_start   = 0;
p->se.sleep_max = 0;
p->se.block_max = 0;
@@ -1573,6 +1578,7 @@ static void __sched_fork(struct task_struct *p)
p->se.wait_max  = 0;
p->se.wait_runtime_overruns = 0;
p->se.wait_runtime_underruns= 0;
+#endif
 
INIT_LIST_HEAD(&p->run_list);
p->se.on_rq = 0;
@@ -6579,12 +6585,14 @@ void normalize_rt_tasks(void)
do_each_thread(g, p) {
p->se.fair_key  = 0;
p->se.wait_runtime  = 0;
+   p->se.exec_start= 0;
p->se.wait_start_fair   = 0;
+   p->se.sleep_start_fair  = 0;
+#ifdef CONFIG_SCHEDSTATS
p->se.wait_start= 0;
-   p->se.exec_start= 0;
p->se.sleep_start   = 0;
-   p->se.sleep_start_fair  = 0;
p->se.block_start   = 0;
+#endif
task_rq(p)->cfs.fair_clock  = 0;
task_rq(p)->clock   = 0;
 
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 0eca442..1c61e53 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -44,11 +44,16 @@ print_task(struct seq_file *m, struct rq *rq, struct 
task_struct *p, u64 now)
(long long)p->se.wait_runtime,
(long long)(p->nvcsw + p->nivcsw),
p->prio,
+#ifdef CONFIG_SCHEDSTATS
(long long)p->se.sum_exec_runtime,
(long long)p->se.sum_wait_runtime,
(long long)p->se.sum_sleep_runtime,
(long long)p->se.wait_runtime_overruns,
-   (long long)p->se.wait_runtime_underruns);
+   (long long)p->se.wait_runtime_underruns
+#else
+   0LL, 0LL, 0LL, 0LL, 0LL
+#endi

[PATCH] sched: reduce task_struct size

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=94c18227d1e3f02de5b345bd3cd5c960214dc9c8
Commit: 94c18227d1e3f02de5b345bd3cd5c960214dc9c8
Parent: 6cfb0d5d06bea2b8791f32145eae539d524e5f6c
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 17:41:40 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 17:41:40 2007 +0200

[PATCH] sched: reduce task_struct size

more task_struct size reduction, by moving the debugging/instrumentation
fields to under CONFIG_SCHEDSTATS:

 (i386, nodebug):

  size
  
 pre-CFS  1328
 CFS  1472
 CFS+patch1376

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 include/linux/sched.h |   21 +
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index c9e0c2a..17249fa 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -904,23 +904,28 @@ struct sched_entity {
struct rb_node  run_node;
unsigned inton_rq;
 
+   u64 exec_start;
+   u64 sum_exec_runtime;
u64 wait_start_fair;
+   u64 sleep_start_fair;
+
+#ifdef CONFIG_SCHEDSTATS
u64 wait_start;
-   u64 exec_start;
+   u64 wait_max;
+   s64 sum_wait_runtime;
+
u64 sleep_start;
-   u64 sleep_start_fair;
-   u64 block_start;
u64 sleep_max;
+   s64 sum_sleep_runtime;
+
+   u64 block_start;
u64 block_max;
u64 exec_max;
-   u64 wait_max;
-   u64 last_ran;
 
-   u64 sum_exec_runtime;
-   s64 sum_wait_runtime;
-   s64 sum_sleep_runtime;
unsigned long   wait_runtime_overruns;
unsigned long   wait_runtime_underruns;
+#endif
+
 #ifdef CONFIG_FAIR_GROUP_SCHED
struct sched_entity *parent;
/* rq on which this entity is (to be) queued: */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sched: uninline calc_delta_mine()

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cb1c4fc924d7eeb3fb723ad72705d4a70e9781fd
Commit: cb1c4fc924d7eeb3fb723ad72705d4a70e9781fd
Parent: ecf691daf7afb418537ba459290191a0a5853be5
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 17:41:40 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 17:41:40 2007 +0200

[PATCH] sched: uninline calc_delta_mine()

uninline calc_delta_mine():

   textdata bss dec hex filename
   291624162  24   333488244 sched.o.before
   290394162  24   3322581c9 sched.o.after

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index b2bc8fa..ff4aa17 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -637,7 +637,7 @@ static u64 div64_likely32(u64 divident, unsigned long 
divisor)
 
 #define WMULT_SHIFT32
 
-static inline unsigned long
+static unsigned long
 calc_delta_mine(unsigned long delta_exec, unsigned long weight,
struct load_weight *lw)
 {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sched: use schedstat_set() API

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8179ca23d513717cc5e3dc81a1ffe01af0955468
Commit: 8179ca23d513717cc5e3dc81a1ffe01af0955468
Parent: c3c7011969274768818842b0a08ec45d88f45b4f
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 17:41:40 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 17:41:40 2007 +0200

[PATCH] sched: use schedstat_set() API

make use of the new schedstat_set() API to eliminate two #ifdef sections.

No functional changes:

textdata bss dec hex filename
   290094122  28   331598187 sched.o.before
   290094122  28   331598187 sched.o.after

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched_fair.c |   13 ++---
 1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 243da6c..5bf7285 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -292,10 +292,7 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity 
*curr, u64 now)
return;
 
delta_exec = curr->delta_exec;
-#ifdef CONFIG_SCHEDSTATS
-   if (unlikely(delta_exec > curr->exec_max))
-   curr->exec_max = delta_exec;
-#endif
+   schedstat_set(curr->exec_max, max((u64)delta_exec, curr->exec_max));
 
curr->sum_exec_runtime += delta_exec;
cfs_rq->exec_clock += delta_exec;
@@ -425,13 +422,7 @@ __update_stats_wait_end(struct cfs_rq *cfs_rq, struct 
sched_entity *se, u64 now)
 {
unsigned long delta_fair = se->delta_fair_run;
 
-#ifdef CONFIG_SCHEDSTATS
-   {
-   s64 delta_wait = now - se->wait_start;
-   if (unlikely(delta_wait > se->wait_max))
-   se->wait_max = delta_wait;
-   }
-#endif
+   schedstat_set(se->wait_max, max(se->wait_max, now - se->wait_start));
 
if (unlikely(se->load.weight != NICE_0_LOAD))
delta_fair = calc_weighted(delta_fair, se->load.weight,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sched: add schedstat_set() API

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c3c7011969274768818842b0a08ec45d88f45b4f
Commit: c3c7011969274768818842b0a08ec45d88f45b4f
Parent: 9c2172459a47c99adf9c968180a8a57d9ff84efa
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 17:41:40 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 17:41:40 2007 +0200

[PATCH] sched: add schedstat_set() API

add the schedstat_set() API, to allow the reduction of
CONFIG_SCHEDSTAT related #ifdefs. No code changed.

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched_stats.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h
index c63c38f..c20a94d 100644
--- a/kernel/sched_stats.h
+++ b/kernel/sched_stats.h
@@ -116,6 +116,7 @@ rq_sched_info_depart(struct rq *rq, unsigned long long 
delta)
 }
 # define schedstat_inc(rq, field)  do { (rq)->field++; } while (0)
 # define schedstat_add(rq, field, amt) do { (rq)->field += (amt); } while (0)
+# define schedstat_set(var, val)   do { var = (val); } while (0)
 #else /* !CONFIG_SCHEDSTATS */
 static inline void
 rq_sched_info_arrive(struct rq *rq, unsigned long long delta)
@@ -125,6 +126,7 @@ rq_sched_info_depart(struct rq *rq, unsigned long long 
delta)
 {}
 # define schedstat_inc(rq, field)  do { } while (0)
 # define schedstat_add(rq, field, amt) do { } while (0)
+# define schedstat_set(var, val)   do { } while (0)
 #endif
 
 #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sched: ->task_new cleanup

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cad60d93e18ba52b6f069b2edb031c89bf603b07
Commit: cad60d93e18ba52b6f069b2edb031c89bf603b07
Parent: 4e6f96f313561d86d248edf0eaff2336d8217e1b
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 17:41:40 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 17:41:40 2007 +0200

[PATCH] sched: ->task_new cleanup

make sched_class.task_new == NULL a 'default method', this
allows the removal of task_rt_new.

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 include/linux/sched.h |2 +-
 kernel/sched.c|   11 ---
 kernel/sched_fair.c   |4 +---
 kernel/sched_rt.c |   10 --
 4 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 81eec7e..c9e0c2a 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -874,7 +874,7 @@ struct sched_class {
 
void (*set_curr_task) (struct rq *rq);
void (*task_tick) (struct rq *rq, struct task_struct *p);
-   void (*task_new) (struct rq *rq, struct task_struct *p);
+   void (*task_new) (struct rq *rq, struct task_struct *p, u64 now);
 };
 
 struct load_weight {
diff --git a/kernel/sched.c b/kernel/sched.c
index 7bed2c5..915c75e 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1641,22 +1641,27 @@ void fastcall wake_up_new_task(struct task_struct *p, 
unsigned long clone_flags)
unsigned long flags;
struct rq *rq;
int this_cpu;
+   u64 now;
 
rq = task_rq_lock(p, &flags);
BUG_ON(p->state != TASK_RUNNING);
this_cpu = smp_processor_id(); /* parent's CPU */
+   now = rq_clock(rq);
 
p->prio = effective_prio(p);
 
-   if (!sysctl_sched_child_runs_first || (clone_flags & CLONE_VM) ||
-   task_cpu(p) != this_cpu || !current->se.on_rq) {
+   if (!p->sched_class->task_new || !sysctl_sched_child_runs_first ||
+   (clone_flags & CLONE_VM) || task_cpu(p) != this_cpu ||
+   !current->se.on_rq) {
+
activate_task(rq, p, 0);
} else {
/*
 * Let the scheduling class do new task startup
 * management (if any):
 */
-   p->sched_class->task_new(rq, p);
+   p->sched_class->task_new(rq, p, now);
+   inc_nr_running(p, rq, now);
}
check_preempt_curr(rq, p);
task_rq_unlock(rq, &flags);
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 6971db0..243da6c 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1041,11 +1041,10 @@ static void task_tick_fair(struct rq *rq, struct 
task_struct *curr)
  * monopolize the CPU. Note: the parent runqueue is locked,
  * the child is not running yet.
  */
-static void task_new_fair(struct rq *rq, struct task_struct *p)
+static void task_new_fair(struct rq *rq, struct task_struct *p, u64 now)
 {
struct cfs_rq *cfs_rq = task_cfs_rq(p);
struct sched_entity *se = &p->se;
-   u64 now = rq_clock(rq);
 
sched_info_queued(p);
 
@@ -1072,7 +1071,6 @@ static void task_new_fair(struct rq *rq, struct 
task_struct *p)
p->se.wait_runtime = -(sysctl_sched_granularity / 2);
 
__enqueue_entity(cfs_rq, se);
-   inc_nr_running(p, rq, now);
 }
 
 #ifdef CONFIG_FAIR_GROUP_SCHED
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 1192a27..ade20dc 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -229,15 +229,6 @@ static void task_tick_rt(struct rq *rq, struct task_struct 
*p)
requeue_task_rt(rq, p);
 }
 
-/*
- * No parent/child timeslice management necessary for RT tasks,
- * just activate them:
- */
-static void task_new_rt(struct rq *rq, struct task_struct *p)
-{
-   activate_task(rq, p, 1);
-}
-
 static struct sched_class rt_sched_class __read_mostly = {
.enqueue_task   = enqueue_task_rt,
.dequeue_task   = dequeue_task_rt,
@@ -251,5 +242,4 @@ static struct sched_class rt_sched_class __read_mostly = {
.load_balance   = load_balance_rt,
 
.task_tick  = task_tick_rt,
-   .task_new   = task_new_rt,
 };
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sched: move load-calculation functions

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9c2172459a47c99adf9c968180a8a57d9ff84efa
Commit: 9c2172459a47c99adf9c968180a8a57d9ff84efa
Parent: cad60d93e18ba52b6f069b2edb031c89bf603b07
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 17:41:40 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 17:41:40 2007 +0200

[PATCH] sched: move load-calculation functions

move load-calculation functions so that they can use the per-policy
declarations and methods.

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched.c |  132 
 1 files changed, 66 insertions(+), 66 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 915c75e..a9d3740 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -678,46 +678,6 @@ static void update_load_sub(struct load_weight *lw, 
unsigned long dec)
lw->inv_weight = 0;
 }
 
-static void __update_curr_load(struct rq *rq, struct load_stat *ls)
-{
-   if (rq->curr != rq->idle && ls->load.weight) {
-   ls->delta_exec += ls->delta_stat;
-   ls->delta_fair += calc_delta_fair(ls->delta_stat, &ls->load);
-   ls->delta_stat = 0;
-   }
-}
-
-/*
- * Update delta_exec, delta_fair fields for rq.
- *
- * delta_fair clock advances at a rate inversely proportional to
- * total load (rq->ls.load.weight) on the runqueue, while
- * delta_exec advances at the same rate as wall-clock (provided
- * cpu is not idle).
- *
- * delta_exec / delta_fair is a measure of the (smoothened) load on this
- * runqueue over any given interval. This (smoothened) load is used
- * during load balance.
- *
- * This function is called /before/ updating rq->ls.load
- * and when switching tasks.
- */
-static void update_curr_load(struct rq *rq, u64 now)
-{
-   struct load_stat *ls = &rq->ls;
-   u64 start;
-
-   start = ls->load_update_start;
-   ls->load_update_start = now;
-   ls->delta_stat += now - start;
-   /*
-* Stagger updates to ls->delta_fair. Very frequent updates
-* can be expensive.
-*/
-   if (ls->delta_stat >= sysctl_sched_stat_granularity)
-   __update_curr_load(rq, ls);
-}
-
 /*
  * To aid in avoiding the subversion of "niceness" due to uneven distribution
  * of tasks with abnormal "nice" values across CPUs the contribution that
@@ -768,32 +728,6 @@ static const u32 prio_to_wmult[40] = {
 /*  15 */ 119304647, 148102320, 186737708, 238609294, 286331153,
 };
 
-static inline void
-inc_load(struct rq *rq, const struct task_struct *p, u64 now)
-{
-   update_curr_load(rq, now);
-   update_load_add(&rq->ls.load, p->se.load.weight);
-}
-
-static inline void
-dec_load(struct rq *rq, const struct task_struct *p, u64 now)
-{
-   update_curr_load(rq, now);
-   update_load_sub(&rq->ls.load, p->se.load.weight);
-}
-
-static void inc_nr_running(struct task_struct *p, struct rq *rq, u64 now)
-{
-   rq->nr_running++;
-   inc_load(rq, p, now);
-}
-
-static void dec_nr_running(struct task_struct *p, struct rq *rq, u64 now)
-{
-   rq->nr_running--;
-   dec_load(rq, p, now);
-}
-
 static void activate_task(struct rq *rq, struct task_struct *p, int wakeup);
 
 /*
@@ -824,6 +758,72 @@ static int balance_tasks(struct rq *this_rq, int this_cpu, 
struct rq *busiest,
 
 #define sched_class_highest (&rt_sched_class)
 
+static void __update_curr_load(struct rq *rq, struct load_stat *ls)
+{
+   if (rq->curr != rq->idle && ls->load.weight) {
+   ls->delta_exec += ls->delta_stat;
+   ls->delta_fair += calc_delta_fair(ls->delta_stat, &ls->load);
+   ls->delta_stat = 0;
+   }
+}
+
+/*
+ * Update delta_exec, delta_fair fields for rq.
+ *
+ * delta_fair clock advances at a rate inversely proportional to
+ * total load (rq->ls.load.weight) on the runqueue, while
+ * delta_exec advances at the same rate as wall-clock (provided
+ * cpu is not idle).
+ *
+ * delta_exec / delta_fair is a measure of the (smoothened) load on this
+ * runqueue over any given interval. This (smoothened) load is used
+ * during load balance.
+ *
+ * This function is called /before/ updating rq->ls.load
+ * and when switching tasks.
+ */
+static void update_curr_load(struct rq *rq, u64 now)
+{
+   struct load_stat *ls = &rq->ls;
+   u64 start;
+
+   start = ls->load_update_start;
+   ls->load_update_start = now;
+   ls->delta_stat += now - start;
+   /*
+* Stagger updates to ls->delta_fair. Very frequent updates
+* can be expensive.
+*/
+   if (ls->delta_stat >= sysctl_sched_stat_granularity)
+   __update_curr_load(rq, ls);
+}
+
+static inline void
+inc_load(struct rq *rq, const struct task_struct *p, u64 now)
+{
+   update_curr_load(rq, now);
+   update_load_add(&rq->ls.load, p->se.load.weight);
+}
+
+static inline void
+d

[PATCH] sched: calc_delta_mine(): use fixed limit

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ecf691daf7afb418537ba459290191a0a5853be5
Commit: ecf691daf7afb418537ba459290191a0a5853be5
Parent: 5a4f3ea77e1b0c72a3ec136c881eb0d64aa1d25e
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 17:41:40 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 17:41:40 2007 +0200

[PATCH] sched: calc_delta_mine(): use fixed limit

use fixed limit in calc_delta_mine() - this saves an instruction :)

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index ed8cebf..b2bc8fa 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -657,7 +657,7 @@ calc_delta_mine(unsigned long delta_exec, unsigned long 
weight,
tmp = (tmp * lw->inv_weight) >> WMULT_SHIFT;
}
 
-   return (unsigned long)min(tmp, (u64)sysctl_sched_runtime_limit);
+   return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX);
 }
 
 static inline unsigned long
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sched: uninline inc/dec_nr_running()

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4e6f96f313561d86d248edf0eaff2336d8217e1b
Commit: 4e6f96f313561d86d248edf0eaff2336d8217e1b
Parent: cb1c4fc924d7eeb3fb723ad72705d4a70e9781fd
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 17:41:40 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 17:41:40 2007 +0200

[PATCH] sched: uninline inc/dec_nr_running()

uninline inc_nr_running() and dec_nr_running():

   textdata bss dec hex filename
   290394162  24   3322581c9 sched.o.before
   290274162  24   3321381bd sched.o.after

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index ff4aa17..7bed2c5 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -782,13 +782,13 @@ dec_load(struct rq *rq, const struct task_struct *p, u64 
now)
update_load_sub(&rq->ls.load, p->se.load.weight);
 }
 
-static inline void inc_nr_running(struct task_struct *p, struct rq *rq, u64 
now)
+static void inc_nr_running(struct task_struct *p, struct rq *rq, u64 now)
 {
rq->nr_running++;
inc_load(rq, p, now);
 }
 
-static inline void dec_nr_running(struct task_struct *p, struct rq *rq, u64 
now)
+static void dec_nr_running(struct task_struct *p, struct rq *rq, u64 now)
 {
rq->nr_running--;
dec_load(rq, p, now);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sched: tidy up left over smpnice code

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5a4f3ea77e1b0c72a3ec136c881eb0d64aa1d25e
Commit: 5a4f3ea77e1b0c72a3ec136c881eb0d64aa1d25e
Parent: 362a7016637648c6aefc98b706298baedfaa1543
Author: Peter Williams <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 17:41:40 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 17:41:40 2007 +0200

[PATCH] sched: tidy up left over smpnice code

1. The only place that RTPRIO_TO_LOAD_WEIGHT() is used is in the call to
move_tasks() in the function active_load_balance() and its purpose here
is just to make sure that the load to be moved is big enough to ensure
that exactly one task is moved (if there's one available).  This can be
accomplished by using ULONG_MAX instead and this allows
RTPRIO_TO_LOAD_WEIGHT() to be deleted.

2. This, in turn, allows PRIO_TO_LOAD_WEIGHT() to be deleted.

3. This allows load_weight() to be deleted which allows
TIME_SLICE_NICE_ZERO to be deleted along with the comment above it.

Signed-off-by: Peter Williams <[EMAIL PROTECTED]>
Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched.c |   16 +---
 1 files changed, 1 insertions(+), 15 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 1641235..ed8cebf 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -727,19 +727,6 @@ static void update_curr_load(struct rq *rq, u64 now)
  * slice expiry etc.
  */
 
-/*
- * Assume: static_prio_timeslice(NICE_TO_PRIO(0)) == DEF_TIMESLICE
- * If static_prio_timeslice() is ever changed to break this assumption then
- * this code will need modification
- */
-#define TIME_SLICE_NICE_ZERO DEF_TIMESLICE
-#define load_weight(lp) \
-   (((lp) * SCHED_LOAD_SCALE) / TIME_SLICE_NICE_ZERO)
-#define PRIO_TO_LOAD_WEIGHT(prio) \
-   load_weight(static_prio_timeslice(prio))
-#define RTPRIO_TO_LOAD_WEIGHT(rp) \
-   (PRIO_TO_LOAD_WEIGHT(MAX_RT_PRIO) + load_weight(rp))
-
 #define WEIGHT_IDLEPRIO2
 #define WMULT_IDLEPRIO (1 << 31)
 
@@ -2908,8 +2895,7 @@ static void active_load_balance(struct rq *busiest_rq, 
int busiest_cpu)
schedstat_inc(sd, alb_cnt);
 
if (move_tasks(target_rq, target_cpu, busiest_rq, 1,
-  RTPRIO_TO_LOAD_WEIGHT(100), sd, CPU_IDLE,
-  NULL))
+  ULONG_MAX, sd, CPU_IDLE, NULL))
schedstat_inc(sd, alb_pushed);
else
schedstat_inc(sd, alb_failed);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB HID: fix memory leak of usbhid_device

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cda5ecf80bad94b4113722f037af818e7453dd2d
Commit: cda5ecf80bad94b4113722f037af818e7453dd2d
Parent: de1a7b03282310d143cb0add74e909daffedda01
Author: Jiri Kosina <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 30 15:40:06 2007 +0200
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 13:48:03 2007 +0200

USB HID: fix memory leak of usbhid_device

Add forgotten freeing of usbhid_device structure.

Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
---
 drivers/hid/usbhid/hid-core.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 3ff7468..6e73934 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -877,6 +877,7 @@ fail:
usb_free_urb(usbhid->urbin);
usb_free_urb(usbhid->urbout);
usb_free_urb(usbhid->urbctrl);
+   kfree(usbhid);
 fail_no_usbhid:
hid_free_buffers(dev, hid);
hid_free_device(hid);
@@ -912,6 +913,7 @@ static void hid_disconnect(struct usb_interface *intf)
usb_free_urb(usbhid->urbin);
usb_free_urb(usbhid->urbctrl);
usb_free_urb(usbhid->urbout);
+   kfree(usbhid);
 
hid_free_buffers(hid_to_usb_dev(hid), hid);
hid_free_device(hid);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Net/Security: fix memory leaks from security_secid_to_secctx()

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e6e0871cce2ae04f5790543ad2f4ec36b23260ba
Commit: e6e0871cce2ae04f5790543ad2f4ec36b23260ba
Parent: 088999e98b8caecd31adc3b62223a228555c5ab7
Author: Paul Moore <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 1 11:12:59 2007 -0400
Committer:  James Morris <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 11:52:26 2007 -0400

Net/Security: fix memory leaks from security_secid_to_secctx()

The security_secid_to_secctx() function returns memory that must be freed
by a call to security_release_secctx() which was not always happening.  This
patch fixes two of these problems (all that I could find in the kernel 
source
at present).

Signed-off-by: Paul Moore <[EMAIL PROTECTED]>
Acked-by:  Stephen Smalley <[EMAIL PROTECTED]>
Signed-off-by: James Morris <[EMAIL PROTECTED]>
---
 net/netlabel/netlabel_user.c |4 +++-
 net/xfrm/xfrm_policy.c   |5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/net/netlabel/netlabel_user.c b/net/netlabel/netlabel_user.c
index 89dcc48..85a96a3 100644
--- a/net/netlabel/netlabel_user.c
+++ b/net/netlabel/netlabel_user.c
@@ -113,8 +113,10 @@ struct audit_buffer *netlbl_audit_start_common(int type,
if (audit_info->secid != 0 &&
security_secid_to_secctx(audit_info->secid,
 &secctx,
-&secctx_len) == 0)
+&secctx_len) == 0) {
audit_log_format(audit_buf, " subj=%s", secctx);
+   security_release_secctx(secctx, secctx_len);
+   }
 
return audit_buf;
 }
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 95a4730..e5a3be0 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2195,9 +2195,10 @@ void xfrm_audit_log(uid_t auid, u32 sid, int type, int 
result,
}
 
if (sid != 0 &&
-   security_secid_to_secctx(sid, &secctx, &secctx_len) == 0)
+   security_secid_to_secctx(sid, &secctx, &secctx_len) == 0) {
audit_log_format(audit_buf, " subj=%s", secctx);
-   else
+   security_release_secctx(secctx, secctx_len);
+   } else
audit_log_task_context(audit_buf);
 
if (xp) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sched: remove cache_hot_time

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=362a7016637648c6aefc98b706298baedfaa1543
Commit: 362a7016637648c6aefc98b706298baedfaa1543
Parent: 1ed4395035a6791ebbbf618429a58ab9c207cc83
Author: Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 17:41:40 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 17:41:40 2007 +0200

[PATCH] sched: remove cache_hot_time

remove the last unused remains of cache_hot_time.

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 include/linux/sched.h|1 -
 include/linux/topology.h |1 -
 kernel/sched.c   |2 --
 3 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2e49027..81eec7e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -734,7 +734,6 @@ struct sched_domain {
unsigned long max_interval; /* Maximum balance interval ms */
unsigned int busy_factor;   /* less balancing by factor if busy */
unsigned int imbalance_pct; /* No balance until over watermark */
-   unsigned long long cache_hot_time; /* Task considered cache hot (ns) */
unsigned int cache_nice_tries;  /* Leave cache hot tasks for # tries */
unsigned int busy_idx;
unsigned int idle_idx;
diff --git a/include/linux/topology.h b/include/linux/topology.h
index d0890a7..525d437 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -185,7 +185,6 @@
.max_interval   = 64*num_online_cpus(), \
.busy_factor= 128,  \
.imbalance_pct  = 133,  \
-   .cache_hot_time = (10*100), \
.cache_nice_tries   = 1,\
.busy_idx   = 3,\
.idle_idx   = 3,\
diff --git a/kernel/sched.c b/kernel/sched.c
index 238a769..1641235 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5269,8 +5269,6 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
sizeof(int), 0644, proc_dointvec_minmax);
set_table_entry(&table[8], 9, "imbalance_pct", &sd->imbalance_pct,
sizeof(int), 0644, proc_dointvec_minmax);
-   set_table_entry(&table[9], 10, "cache_hot_time", &sd->cache_hot_time,
-   sizeof(long long), 0644, proc_doulongvec_minmax);
set_table_entry(&table[10], 11, "cache_nice_tries",
&sd->cache_nice_tries,
sizeof(int), 0644, proc_dointvec_minmax);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB HID: Add all Logitech Harmonies to blacklist

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9fdcfed8ebc4f5273179f8ff00ab83a6403016de
Commit: 9fdcfed8ebc4f5273179f8ff00ab83a6403016de
Parent: 2dea64b4aace953924848ac9ab05217da20a7932
Author: Phil Dibowitz <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 30 12:00:48 2007 +0200
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 13:48:03 2007 +0200

USB HID: Add all Logitech Harmonies to blacklist

This patch adds the entire range of Logitech's ProductIDs that are reserved
for their Harmony remotes. The in-kernel HID driver can't do anything with
these, and now there is a GPL user-space application that can handle them:
  http://www.sf.net/projects/harmonycontrol

Signed-off-by: Phil Dibowitz <[EMAIL PROTECTED]>
Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
---
 drivers/hid/usbhid/hid-quirks.c |  132 +++
 1 files changed, 132 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index 2b7e2de..09743c5 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -197,6 +197,70 @@
 
 #define USB_VENDOR_ID_LOGITECH 0x046d
 #define USB_DEVICE_ID_LOGITECH_RECEIVER0xc101
+#define USB_DEVICE_ID_LOGITECH_HARMONY  0xc110
+#define USB_DEVICE_ID_LOGITECH_HARMONY_2 0xc111
+#define USB_DEVICE_ID_LOGITECH_HARMONY_3 0xc112
+#define USB_DEVICE_ID_LOGITECH_HARMONY_4 0xc113
+#define USB_DEVICE_ID_LOGITECH_HARMONY_5 0xc114
+#define USB_DEVICE_ID_LOGITECH_HARMONY_6 0xc115
+#define USB_DEVICE_ID_LOGITECH_HARMONY_7 0xc116
+#define USB_DEVICE_ID_LOGITECH_HARMONY_8 0xc117
+#define USB_DEVICE_ID_LOGITECH_HARMONY_9 0xc118
+#define USB_DEVICE_ID_LOGITECH_HARMONY_10 0xc119
+#define USB_DEVICE_ID_LOGITECH_HARMONY_11 0xc11a
+#define USB_DEVICE_ID_LOGITECH_HARMONY_12 0xc11b
+#define USB_DEVICE_ID_LOGITECH_HARMONY_13 0xc11c
+#define USB_DEVICE_ID_LOGITECH_HARMONY_14 0xc11d
+#define USB_DEVICE_ID_LOGITECH_HARMONY_15 0xc11e
+#define USB_DEVICE_ID_LOGITECH_HARMONY_16 0xc11f
+#define USB_DEVICE_ID_LOGITECH_HARMONY_17 0xc120
+#define USB_DEVICE_ID_LOGITECH_HARMONY_18 0xc121
+#define USB_DEVICE_ID_LOGITECH_HARMONY_19 0xc122
+#define USB_DEVICE_ID_LOGITECH_HARMONY_20 0xc123
+#define USB_DEVICE_ID_LOGITECH_HARMONY_21 0xc124
+#define USB_DEVICE_ID_LOGITECH_HARMONY_22 0xc125
+#define USB_DEVICE_ID_LOGITECH_HARMONY_23 0xc126
+#define USB_DEVICE_ID_LOGITECH_HARMONY_24 0xc127
+#define USB_DEVICE_ID_LOGITECH_HARMONY_25 0xc128
+#define USB_DEVICE_ID_LOGITECH_HARMONY_26 0xc129
+#define USB_DEVICE_ID_LOGITECH_HARMONY_27 0xc12a
+#define USB_DEVICE_ID_LOGITECH_HARMONY_28 0xc12b
+#define USB_DEVICE_ID_LOGITECH_HARMONY_29 0xc12c
+#define USB_DEVICE_ID_LOGITECH_HARMONY_30 0xc12d
+#define USB_DEVICE_ID_LOGITECH_HARMONY_31 0xc12e
+#define USB_DEVICE_ID_LOGITECH_HARMONY_32 0xc12f
+#define USB_DEVICE_ID_LOGITECH_HARMONY_33 0xc130
+#define USB_DEVICE_ID_LOGITECH_HARMONY_34 0xc131
+#define USB_DEVICE_ID_LOGITECH_HARMONY_35 0xc132
+#define USB_DEVICE_ID_LOGITECH_HARMONY_36 0xc133
+#define USB_DEVICE_ID_LOGITECH_HARMONY_37 0xc134
+#define USB_DEVICE_ID_LOGITECH_HARMONY_38 0xc135
+#define USB_DEVICE_ID_LOGITECH_HARMONY_39 0xc136
+#define USB_DEVICE_ID_LOGITECH_HARMONY_40 0xc137
+#define USB_DEVICE_ID_LOGITECH_HARMONY_41 0xc138
+#define USB_DEVICE_ID_LOGITECH_HARMONY_42 0xc139
+#define USB_DEVICE_ID_LOGITECH_HARMONY_43 0xc13a
+#define USB_DEVICE_ID_LOGITECH_HARMONY_44 0xc13b
+#define USB_DEVICE_ID_LOGITECH_HARMONY_45 0xc13c
+#define USB_DEVICE_ID_LOGITECH_HARMONY_46 0xc13d
+#define USB_DEVICE_ID_LOGITECH_HARMONY_47 0xc13e
+#define USB_DEVICE_ID_LOGITECH_HARMONY_48 0xc13f
+#define USB_DEVICE_ID_LOGITECH_HARMONY_49 0xc140
+#define USB_DEVICE_ID_LOGITECH_HARMONY_50 0xc141
+#define USB_DEVICE_ID_LOGITECH_HARMONY_51 0xc142
+#define USB_DEVICE_ID_LOGITECH_HARMONY_52 0xc143
+#define USB_DEVICE_ID_LOGITECH_HARMONY_53 0xc144
+#define USB_DEVICE_ID_LOGITECH_HARMONY_54 0xc145
+#define USB_DEVICE_ID_LOGITECH_HARMONY_55 0xc146
+#define USB_DEVICE_ID_LOGITECH_HARMONY_56 0xc147
+#define USB_DEVICE_ID_LOGITECH_HARMONY_57 0xc148
+#define USB_DEVICE_ID_LOGITECH_HARMONY_58 0xc149
+#define USB_DEVICE_ID_LOGITECH_HARMONY_59 0xc14a
+#define USB_DEVICE_ID_LOGITECH_HARMONY_60 0xc14b
+#define USB_DEVICE_ID_LOGITECH_HARMONY_61 0xc14c
+#define USB_DEVICE_ID_LOGITECH_HARMONY_62 0xc14d
+#define USB_DEVICE_ID_LOGITECH_HARMONY_63 0xc14e
+#define USB_DEVICE_ID_LOGITECH_HARMONY_64 0xc14f
 #define USB_DEVICE_ID_LOGITECH_WHEEL   0xc294
 #define USB_DEVICE_ID_LOGITECH_KBD 0xc311
 #define USB_DEVICE_ID_S510_RECEIVER0xc50c
@@ -220,6 +284,9 @@
 #define USB_DEVICE_ID_NCR_FIRST0x0300
 #define USB_DEVICE_ID_NCR_LAST 0x03ff
 
+#define USB_VENDOR_ID_NATIONAL_SEMICONDUCTOR 0x0400
+#define USB_DEVICE_ID_N_S_HARMONY   0xc359
+
 #define USB_VENDOR_ID_NEC  0x073e
 #define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301
 
@@ -461,6 +528,71 @@ static c

SELinux: remove redundant pointer checks before calling kfree()

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=088999e98b8caecd31adc3b62223a228555c5ab7
Commit: 088999e98b8caecd31adc3b62223a228555c5ab7
Parent: 9534f71ca33e5a9de26dfd43c76af86e005005dd
Author: Paul Moore <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 1 11:12:58 2007 -0400
Committer:  James Morris <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 11:52:23 2007 -0400

SELinux: remove redundant pointer checks before calling kfree()

We don't need to check for NULL pointers before calling kfree().

Signed-off-by: Paul Moore <[EMAIL PROTECTED]>
Acked-by:  Stephen Smalley <[EMAIL PROTECTED]>
Signed-off-by: James Morris <[EMAIL PROTECTED]>
---
 security/selinux/hooks.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 0fac682..6237933 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -4658,8 +4658,7 @@ static int selinux_secid_to_secctx(u32 secid, char 
**secdata, u32 *seclen)
 
 static void selinux_release_secctx(char *secdata, u32 seclen)
 {
-   if (secdata)
-   kfree(secdata);
+   kfree(secdata);
 }
 
 #ifdef CONFIG_KEYS
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


HID: Never call hid_free_buffers() when usbhid_device has been freed

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=22f675f320f721e9eaa2bbf7b883316b408c6c8f
Commit: 22f675f320f721e9eaa2bbf7b883316b408c6c8f
Parent: cda5ecf80bad94b4113722f037af818e7453dd2d
Author: Jiri Kosina <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 1 12:32:27 2007 +0200
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 13:48:04 2007 +0200

HID: Never call hid_free_buffers() when usbhid_device has been freed

We can't call hid_free_buffers() when the underlying usbhid_device
has already been freed.

Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
---
 drivers/hid/usbhid/hid-core.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 6e73934..0a1f2b5 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -877,9 +877,9 @@ fail:
usb_free_urb(usbhid->urbin);
usb_free_urb(usbhid->urbout);
usb_free_urb(usbhid->urbctrl);
+   hid_free_buffers(dev, hid);
kfree(usbhid);
 fail_no_usbhid:
-   hid_free_buffers(dev, hid);
hid_free_device(hid);
 
return NULL;
@@ -913,9 +913,9 @@ static void hid_disconnect(struct usb_interface *intf)
usb_free_urb(usbhid->urbin);
usb_free_urb(usbhid->urbctrl);
usb_free_urb(usbhid->urbout);
-   kfree(usbhid);
 
hid_free_buffers(hid_to_usb_dev(hid), hid);
+   kfree(usbhid);
hid_free_device(hid);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SELinux: restore proper NetLabel caching behavior

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9534f71ca33e5a9de26dfd43c76af86e005005dd
Commit: 9534f71ca33e5a9de26dfd43c76af86e005005dd
Parent: 1ed4395035a6791ebbbf618429a58ab9c207cc83
Author: Paul Moore <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 30 16:33:26 2007 -0400
Committer:  James Morris <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 11:52:21 2007 -0400

SELinux: restore proper NetLabel caching behavior

A small fix to the SELinux/NetLabel glue code to ensure that the NetLabel
cache is utilized when possible.  This was broken when the SELinux/NetLabel
glue code was reorganized in the last kernel release.

Signed-off-by: Paul Moore <[EMAIL PROTECTED]>
Acked-by:  Stephen Smalley <[EMAIL PROTECTED]>
Signed-off-by: James Morris <[EMAIL PROTECTED]>
---
 include/net/netlabel.h  |2 ++
 security/selinux/netlabel.c |   16 
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/include/net/netlabel.h b/include/net/netlabel.h
index ffbc7f2..2e5b2f6 100644
--- a/include/net/netlabel.h
+++ b/include/net/netlabel.h
@@ -132,6 +132,8 @@ struct netlbl_lsm_secattr_catmap {
 #define NETLBL_SECATTR_CACHE0x0002
 #define NETLBL_SECATTR_MLS_LVL  0x0004
 #define NETLBL_SECATTR_MLS_CAT  0x0008
+#define NETLBL_SECATTR_CACHEABLE(NETLBL_SECATTR_MLS_LVL | \
+NETLBL_SECATTR_MLS_CAT)
 struct netlbl_lsm_secattr {
u32 flags;
 
diff --git a/security/selinux/netlabel.c b/security/selinux/netlabel.c
index 051b14c..d243ddc 100644
--- a/security/selinux/netlabel.c
+++ b/security/selinux/netlabel.c
@@ -162,9 +162,13 @@ int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, u32 
base_sid, u32 *sid)
 
netlbl_secattr_init(&secattr);
rc = netlbl_skbuff_getattr(skb, &secattr);
-   if (rc == 0 && secattr.flags != NETLBL_SECATTR_NONE)
+   if (rc == 0 && secattr.flags != NETLBL_SECATTR_NONE) {
rc = security_netlbl_secattr_to_sid(&secattr, base_sid, sid);
-   else
+   if (rc == 0 &&
+   (secattr.flags & NETLBL_SECATTR_CACHEABLE) &&
+   (secattr.flags & NETLBL_SECATTR_CACHE))
+   netlbl_cache_add(skb, &secattr);
+   } else
*sid = SECSID_NULL;
netlbl_secattr_destroy(&secattr);
 
@@ -307,11 +311,15 @@ int selinux_netlbl_sock_rcv_skb(struct sk_security_struct 
*sksec,
 
netlbl_secattr_init(&secattr);
rc = netlbl_skbuff_getattr(skb, &secattr);
-   if (rc == 0 && secattr.flags != NETLBL_SECATTR_NONE)
+   if (rc == 0 && secattr.flags != NETLBL_SECATTR_NONE) {
rc = security_netlbl_secattr_to_sid(&secattr,
SECINITSID_NETMSG,
&nlbl_sid);
-   else
+   if (rc == 0 &&
+   (secattr.flags & NETLBL_SECATTR_CACHEABLE) &&
+   (secattr.flags & NETLBL_SECATTR_CACHE))
+   netlbl_cache_add(skb, &secattr);
+   } else
nlbl_sid = SECINITSID_UNLABELED;
netlbl_secattr_destroy(&secattr);
if (rc != 0)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB HID: add ASUS LCM to the blacklist

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=04a9b7ffceff4337d9e63476b5c71e9b79249969
Commit: 04a9b7ffceff4337d9e63476b5c71e9b79249969
Parent: 9fdcfed8ebc4f5273179f8ff00ab83a6403016de
Author: Christian Lamparter <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 30 14:38:26 2007 +0200
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 13:48:03 2007 +0200

USB HID: add ASUS LCM to the blacklist

Some of ASUS' notebooks (e.g G Series) include a tiny oled display, which is
attached to an internal USB bus. Unfortunatly the device reports a wrong
DeviceDescriptor and is therefore identified as a HID device...

Signed-off-by: Christian Lamparter <[EMAIL PROTECTED]>
Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
---
 drivers/hid/usbhid/hid-quirks.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index 09743c5..6b21a21 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -62,6 +62,9 @@
 #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY   0x030a
 #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY0x030b
 
+#define USB_VENDOR_ID_ASUS 0x0b05
+#define USB_DEVICE_ID_ASUS_LCM 0x1726
+
 #define USB_VENDOR_ID_ATEN 0x0557
 #define USB_DEVICE_ID_ATEN_UC100KM 0x2004
 #define USB_DEVICE_ID_ATEN_CS124U  0x2202
@@ -381,6 +384,7 @@ static const struct hid_blacklist {
{ USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232, HID_QUIRK_IGNORE },
+   { USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM, HID_QUIRK_IGNORE},
{ USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, 
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CIDC, 0x0103, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM, HID_QUIRK_IGNORE 
},
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB HID: fix a possible NULL pointer dereference when we fail to allocate memory

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=de1a7b03282310d143cb0add74e909daffedda01
Commit: de1a7b03282310d143cb0add74e909daffedda01
Parent: 04a9b7ffceff4337d9e63476b5c71e9b79249969
Author: Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 30 15:15:26 2007 +0200
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 13:48:03 2007 +0200

USB HID: fix a possible NULL pointer dereference when we fail to allocate 
memory

If, in usb_hid_configure(), we fail to allocate storage for 'usbhid',
 "if (!(usbhid = kzalloc(sizeof(struct usbhid_device), GFP_KERNEL)))",
then we'll jump to the 'fail:' label where we have this code:
usb_free_urb(usbhid->urbin);
usb_free_urb(usbhid->urbout);
usb_free_urb(usbhid->urbctrl);
Since we got here because we couldn't allocate storage for 'usbhid',
what we have here is a NULL pointer dereference - ouch...

This patch solves that little problem by adding a new
'fail_no_usbhid:' label after the problematic calls to
usb_free_urb() and jumps to that one instead, in the problem case.

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
---
 drivers/hid/usbhid/hid-core.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index b2baeae..3ff7468 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -743,7 +743,7 @@ static struct hid_device *usb_hid_configure(struct 
usb_interface *intf)
hid->quirks = quirks;
 
if (!(usbhid = kzalloc(sizeof(struct usbhid_device), GFP_KERNEL)))
-   goto fail;
+   goto fail_no_usbhid;
 
hid->driver_data = usbhid;
usbhid->hid = hid;
@@ -877,6 +877,7 @@ fail:
usb_free_urb(usbhid->urbin);
usb_free_urb(usbhid->urbout);
usb_free_urb(usbhid->urbctrl);
+fail_no_usbhid:
hid_free_buffers(dev, hid);
hid_free_device(hid);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB HID: update description of USBHID in MAINTAINERS

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2dea64b4aace953924848ac9ab05217da20a7932
Commit: 2dea64b4aace953924848ac9ab05217da20a7932
Parent: 3e1928e8793208802589aae851b6685671187242
Author: Jiri Kosina <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 11 12:12:11 2007 +0200
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 13:48:03 2007 +0200

USB HID: update description of USBHID in MAINTAINERS

Make it more clear to users what kinds of hardware USBHID handles,
so that they can send reports and queries properly.

Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
---
 MAINTAINERS |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 1e15a0e..e65e96a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3754,7 +3754,7 @@ L:[EMAIL PROTECTED]
 W: http://www.linux-usb.org/gadget
 S: Maintained
 
-USB HID/HIDBP DRIVERS
+USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...)
 P: Jiri Kosina
 M: [EMAIL PROTECTED]
 L: [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


HID: remove the Applie IR sensor from the hid_blacklist

2007-08-02 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3e1928e8793208802589aae851b6685671187242
Commit: 3e1928e8793208802589aae851b6685671187242
Parent: 1ed4395035a6791ebbbf618429a58ab9c207cc83
Author: Tino Keitel <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 12 00:11:34 2007 +0200
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 13:48:03 2007 +0200

HID: remove the Applie IR sensor from the hid_blacklist

The IR sensor in some newer Apple computers has no other
driver in the kernel, yet. However, the macmini driver in lirc
requires a HID device for the IR sensor.

Cc: Soeren Sonnenburg <[EMAIL PROTECTED]>
Signed-off-by: Tino Keitel <[EMAIL PROTECTED]>
Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
---
 drivers/hid/usbhid/hid-quirks.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index 775b9f3..2b7e2de 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -61,7 +61,6 @@
 #define USB_DEVICE_ID_APPLE_GEYSER4_JIS0x021c
 #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY   0x030a
 #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY0x030b
-#define USB_DEVICE_ID_APPLE_IR 0x8240
 
 #define USB_VENDOR_ID_ATEN 0x0557
 #define USB_DEVICE_ID_ATEN_UC100KM 0x2004
@@ -315,7 +314,6 @@ static const struct hid_blacklist {
{ USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232, HID_QUIRK_IGNORE },
-   { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IR, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, 
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CIDC, 0x0103, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM, HID_QUIRK_IGNORE 
},
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html