[PATCH] remove special HPET_EMULATE_RTC config option

2005-08-05 Thread Linux Kernel Mailing List
tree 3f19ec2917f15fdf2428b60941a4d5c9d7e0422d
parent 1c5ad84516ae7ea4ec868436a910a6bd8d20215a
author Venkatesh Pallipadi [EMAIL PROTECTED] Fri, 05 Aug 2005 05:36:10 -0700
committer Linus Torvalds [EMAIL PROTECTED] Fri, 05 Aug 2005 06:27:58 -0700

[PATCH] remove special HPET_EMULATE_RTC config option

We had a user whose apps weren't working correctly because his rtc wasn't
working fully.

For the sake of simplicity, it seems sensible to always enable HPET RTC
emulation.

Remove a special config option for HPET_EMULATE_RTC and make it directly
depend on HPET_TIMER and RTC. This will avoid the hangs when EMULATE_RTC
is not configured and when some userlevel script depends on RTC interrupt,
as in:

http://bugzilla.kernel.org/show_bug.cgi?id=4904

Signed-off-by: Venkatesh Pallipadi [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/i386/Kconfig |3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -454,8 +454,9 @@ config HPET_TIMER
  Choose N to continue using the legacy 8254 timer.
 
 config HPET_EMULATE_RTC
-   bool Provide RTC interrupt
+   bool
depends on HPET_TIMER  RTC=y
+   default y
 
 config SMP
bool Symmetric multi-processing support
-
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] md: yet another attempt to get bitmap-based resync to do the right thing in all cases...

2005-08-05 Thread Linux Kernel Mailing List
tree f9b62479cd7062c65e54641cc6190975f529a08b
parent 193f1c931517592ec4188d15bf261e4bff368207
author NeilBrown [EMAIL PROTECTED] Fri, 05 Aug 2005 02:53:34 -0700
committer Linus Torvalds [EMAIL PROTECTED] Fri, 05 Aug 2005 03:00:54 -0700

[PATCH] md: yet another attempt to get bitmap-based resync to do the right 
thing in all cases...

Firstly, R1BIO_Degraded was being set in a number of places in the resync
code, but is never used there, so get rid of those settings.

Then: When doing a resync, we want to clear the bit in the bitmap iff the
array will be non-degraded when the sync has completed.  However the current
code would clear the bitmap if the array was non-degraded when the resync
*started*, which obviously isn't right (it is for 'resync' but not for
'recovery' - i.e.  rebuilding a failed drive).

This patch calculated 'still_degraded' and uses the to tell bitmap_start_sync
whether this sync should clear the corresponding bit.

Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/md/raid1.c |   29 +++--
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -893,7 +893,6 @@ static int end_sync_read(struct bio *bio
if (!uptodate) {
md_error(r1_bio-mddev,
 conf-mirrors[r1_bio-read_disk].rdev);
-   set_bit(R1BIO_Degraded, r1_bio-state);
} else
set_bit(R1BIO_Uptodate, r1_bio-state);
rdev_dec_pending(conf-mirrors[r1_bio-read_disk].rdev, conf-mddev);
@@ -918,10 +917,9 @@ static int end_sync_write(struct bio *bi
mirror = i;
break;
}
-   if (!uptodate) {
+   if (!uptodate)
md_error(mddev, conf-mirrors[mirror].rdev);
-   set_bit(R1BIO_Degraded, r1_bio-state);
-   }
+
update_head_pos(mirror, r1_bio);
 
if (atomic_dec_and_test(r1_bio-remaining)) {
@@ -1109,6 +1107,7 @@ static sector_t sync_request(mddev_t *md
int i;
int write_targets = 0;
int sync_blocks;
+   int still_degraded = 0;
 
if (!conf-r1buf_pool)
{
@@ -1137,7 +1136,10 @@ static sector_t sync_request(mddev_t *md
return 0;
}
 
-   if (!bitmap_start_sync(mddev-bitmap, sector_nr, sync_blocks, 
mddev-degraded) 
+   /* before building a request, check if we can skip these blocks..
+* This call the bitmap_start_sync doesn't actually record anything
+*/
+   if (!bitmap_start_sync(mddev-bitmap, sector_nr, sync_blocks, 1) 
!conf-fullsync) {
/* We can skip this block, and probably several more */
*skipped = 1;
@@ -1203,24 +1205,23 @@ static sector_t sync_request(mddev_t *md
if (i == disk) {
bio-bi_rw = READ;
bio-bi_end_io = end_sync_read;
-   } else if (conf-mirrors[i].rdev 
-  !conf-mirrors[i].rdev-faulty 
-  (!conf-mirrors[i].rdev-in_sync ||
-   sector_nr + RESYNC_SECTORS  mddev-recovery_cp)) {
+   } else if (conf-mirrors[i].rdev == NULL ||
+  conf-mirrors[i].rdev-faulty) {
+   still_degraded = 1;
+   continue;
+   } else if (!conf-mirrors[i].rdev-in_sync ||
+  sector_nr + RESYNC_SECTORS  mddev-recovery_cp) {
bio-bi_rw = WRITE;
bio-bi_end_io = end_sync_write;
write_targets ++;
} else
+   /* no need to read or write here */
continue;
bio-bi_sector = sector_nr + conf-mirrors[i].rdev-data_offset;
bio-bi_bdev = conf-mirrors[i].rdev-bdev;
bio-bi_private = r1_bio;
}
 
-   if (write_targets + 1  conf-raid_disks)
-   /* array degraded, can't clear bitmap */
-   set_bit(R1BIO_Degraded, r1_bio-state);
-
if (write_targets == 0) {
/* There is nowhere to write, so all non-sync
 * drives must be failed - so we are finished
@@ -1243,7 +1244,7 @@ static sector_t sync_request(mddev_t *md
break;
if (sync_blocks == 0) {
if (!bitmap_start_sync(mddev-bitmap, sector_nr,
-   sync_blocks, mddev-degraded) 
+   sync_blocks, still_degraded) 
!conf-fullsync)
break;
if (sync_blocks  (PAGE_SIZE9))
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a 

[PATCH] Update in-kernel zlib routines

2005-08-05 Thread Linux Kernel Mailing List
tree c313006c1e59a41914a96c0c0b5b2b557736a0a9
parent 00a5dfdb93f74e4d95fb0d83c890728e331f8810
author Tim Yamin [EMAIL PROTECTED] Mon, 25 Jul 2005 23:16:13 +0100
committer Linus Torvalds [EMAIL PROTECTED] Sat, 06 Aug 2005 06:23:21 -0700

[PATCH] Update in-kernel zlib routines

These bugs have been fixed in the standard zlib for a while.

See for example

 a) http://sources.redhat.com/ml/bug-gnu-utils/1999-06/msg00183.html
 b) http://bugs.gentoo.org/show_bug.cgi?id=94584

Signed-off-by: Tim Yamin [EMAIL PROTECTED]
Signed-off-by: Tavis Ormandy [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/ppc64/boot/zlib.c  |3 ++-
 lib/inflate.c   |   16 +---
 lib/zlib_inflate/inftrees.c |2 +-
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/ppc64/boot/zlib.c b/arch/ppc64/boot/zlib.c
--- a/arch/ppc64/boot/zlib.c
+++ b/arch/ppc64/boot/zlib.c
@@ -1307,7 +1307,7 @@ local int huft_build(
   {
 *t = (inflate_huft *)Z_NULL;
 *m = 0;
-return Z_OK;
+return Z_DATA_ERROR;
   }
 
 
@@ -1351,6 +1351,7 @@ local int huft_build(
 if ((j = *p++) != 0)
   v[x[j]++] = i;
   } while (++i  n);
+  n = x[g];/* set n to length of v */
 
 
   /* Generate the Huffman codes and for each, make the table entries */
diff --git a/lib/inflate.c b/lib/inflate.c
--- a/lib/inflate.c
+++ b/lib/inflate.c
@@ -326,7 +326,7 @@ DEBG(huft1 );
   {
 *t = (struct huft *)NULL;
 *m = 0;
-return 0;
+return 2;
   }
 
 DEBG(huft2 );
@@ -374,6 +374,7 @@ DEBG(huft5 );
 if ((j = *p++) != 0)
   v[x[j]++] = i;
   } while (++i  n);
+  n = x[g];   /* set n to length of v */
 
 DEBG(h6 );
 
@@ -410,12 +411,13 @@ DEBG1(1 );
 DEBG1(2 );
   f -= a + 1;   /* deduct codes from patterns left */
   xp = c + k;
-  while (++j  z)   /* try smaller tables up to z bits */
-  {
-if ((f = 1) = *++xp)
-  break;/* enough codes to use up j bits */
-f -= *xp;   /* else deduct codes from patterns */
-  }
+  if (j  z)
+while (++j  z)   /* try smaller tables up to z bits */
+{
+  if ((f = 1) = *++xp)
+break;/* enough codes to use up j bits */
+  f -= *xp;   /* else deduct codes from patterns */
+}
 }
 DEBG1(3 );
 z = 1  j; /* table entries for j-bit table */
diff --git a/lib/zlib_inflate/inftrees.c b/lib/zlib_inflate/inftrees.c
--- a/lib/zlib_inflate/inftrees.c
+++ b/lib/zlib_inflate/inftrees.c
@@ -141,7 +141,7 @@ static int huft_build(
   {
 *t = NULL;
 *m = 0;
-return Z_OK;
+return Z_DATA_ERROR;
   }
 
 
-
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] ppc32: fix ppc440 pagetable attributes

2005-08-05 Thread Linux Kernel Mailing List
tree 7a10674e549b63257d9c95405f258480267efea8
parent 4aad724d3e52238e1ce005f166fbba5b4072a7f6
author Matt Porter [EMAIL PROTECTED] Sat, 06 Aug 2005 06:10:10 -0700
committer Linus Torvalds [EMAIL PROTECTED] Sat, 06 Aug 2005 06:53:03 -0700

[PATCH] ppc32: fix ppc440 pagetable attributes

This patch fixes a bug in the PPC440 pagetable attributes that breaks swap
support.  It also adds some notes on the PPC440 attribute fields.

Signed-off-by: Geoff Levand [EMAIL PROTECTED] for CELF
Signed-off-by: Matt Porter [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 include/asm-ppc/pgtable.h |   52 +++---
 1 files changed, 49 insertions(+), 3 deletions(-)

diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -202,18 +202,64 @@ extern unsigned long ioremap_bot, iorema
  *
  * Note that these bits preclude future use of a page size
  * less than 4KB.
+ *
+ *
+ * PPC 440 core has following TLB attribute fields;
+ *
+ *   TLB1:
+ *   0  1  2  3  4  ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
+ *   RPN.  -  -  -  -  -  - ERPN...
+ *
+ *   TLB2:
+ *   0  1  2  3  4  ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
+ *   -  -  -  -  -- U0 U1 U2 U3 W  I  M  G  E   - UX UW UR SX SW SR
+ *
+ * There are some constrains and options, to decide mapping software bits
+ * into TLB entry.
+ *
+ *   - PRESENT *must* be in the bottom three bits because swap cache
+ * entries use the top 29 bits for TLB2.
+ *
+ *   - FILE *must* be in the bottom three bits because swap cache
+ * entries use the top 29 bits for TLB2.
+ *
+ *   - CACHE COHERENT bit (M) has no effect on PPC440 core, because it
+ * doesn't support SMP. So we can use this as software bit, like
+ * DIRTY.
+ *
+ * PPC Book-E Linux implementation uses PPC HW PTE bit field definition,
+ * even it doesn't have HW PTE. 0-11th LSB of PTE stand for memory
+ * protection-related function. (See PTE structure in include/asm-ppc/mmu.h)
+ * Definition of _PAGE_XXX in include/asm-ppc/pagetable.h stands for
+ * above bits. Note that those bits values are CPU dependent, not
+ * architecture.
+ *
+ * Kernel PTE entry holds arch-dependent swp_entry structure under certain
+ * situation. In other words, in such situation, some portion of PTE bits
+ * are used as swp_entry. In PPC implementation, 3-24th LSB are shared with
+ * swp_entry, however 0-2nd three LSB still hold protection values.
+ * That means three protection bits are reserved for both PTE and SWAP
+ * entry at the most three LSBs.
+ *
+ * There are three protection bits available for SWAP entry;
+ * _PAGE_PRESENT
+ * _PAGE_FILE
+ * _PAGE_HASHPTE (if HW has)
+ *
+ * So those three bits have to be inside of 0-2nd LSB of PTE.
+ *
  */
+
 #define _PAGE_PRESENT  0x0001  /* S: PTE valid */
 #define_PAGE_RW0x0002  /* S: Write permission 
*/
-#define_PAGE_DIRTY 0x0004  /* S: Page dirty */
+#define _PAGE_FILE 0x0004  /* S: nonlinear file mapping */
 #define _PAGE_ACCESSED 0x0008  /* S: Page referenced */
 #define _PAGE_HWWRITE  0x0010  /* H: Dirty  RW */
 #define _PAGE_HWEXEC   0x0020  /* H: Execute permission */
 #define_PAGE_USER  0x0040  /* S: User page */
 #define_PAGE_ENDIAN0x0080  /* H: E bit */
 #define_PAGE_GUARDED   0x0100  /* H: G bit */
-#define_PAGE_COHERENT  0x0200  /* H: M bit */
-#define _PAGE_FILE 0x0400  /* S: nonlinear file mapping */
+#define_PAGE_DIRTY 0x0200  /* S: Page dirty */
 #define_PAGE_NO_CACHE  0x0400  /* H: I bit */
 #define_PAGE_WRITETHRU 0x0800  /* H: W bit */
 
-
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


[Bluetooth] Kill redundant NULL checks before kfree()

2005-08-06 Thread Linux Kernel Mailing List
tree 6ce4e75810fc0724d05c305fc6b517aba23598c0
parent dcc365d8f28d6a2332fa37e64d669858a8d017e8
author Marcel Holtmann [EMAIL PROTECTED] Sat, 06 Aug 2005 12:36:47 +0200
committer Marcel Holtmann [EMAIL PROTECTED] Sat, 06 Aug 2005 12:36:47 +0200

[Bluetooth] Kill redundant NULL checks before kfree()

There's no need to check for NULL before calling kfree() on a pointer.

Signed-off-by: Jesper Juhl [EMAIL PROTECTED]
Signed-off-by: Marcel Holtmann [EMAIL PROTECTED]

 drivers/bluetooth/bpa10x.c  |7 ++-
 drivers/bluetooth/hci_usb.c |6 ++
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -367,11 +367,8 @@ static inline void bpa10x_free_urb(struc
if (!urb)
return;
 
-   if (urb-setup_packet)
-   kfree(urb-setup_packet);
-
-   if (urb-transfer_buffer)
-   kfree(urb-transfer_buffer);
+   kfree(urb-setup_packet);
+   kfree(urb-transfer_buffer);
 
usb_free_urb(urb);
 }
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -390,10 +390,8 @@ static void hci_usb_unlink_urbs(struct h
urb = _urb-urb;
BT_DBG(%s freeing _urb %p type %d urb %p,
husb-hdev-name, _urb, _urb-type, 
urb);
-   if (urb-setup_packet)
-   kfree(urb-setup_packet);
-   if (urb-transfer_buffer)
-   kfree(urb-transfer_buffer);
+   kfree(urb-setup_packet);
+   kfree(urb-transfer_buffer);
_urb_free(_urb);
}
 
-
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


[Bluetooth] Revert session reference counting fix

2005-08-06 Thread Linux Kernel Mailing List
tree 45872ffc48be8319a88259cfcef86605a1f94a4e
parent cad0f6270c0bae5bcae6af3c7ac7bd3ae5d9b618
author Marcel Holtmann [EMAIL PROTECTED] Sat, 06 Aug 2005 12:36:42 +0200
committer Marcel Holtmann [EMAIL PROTECTED] Sat, 06 Aug 2005 12:36:42 +0200

[Bluetooth] Revert session reference counting fix

The fix for the reference counting problem of the signal DLC introduced
a race condition which leads to an oops. The reason for it is not fully
understood by now and so revert this fix, because the reference counting
problem is not crashing the RFCOMM layer and its appearance it rare.

Signed-off-by: Marcel Holtmann [EMAIL PROTECTED]

 net/bluetooth/rfcomm/core.c |4 
 1 files changed, 4 deletions(-)

diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -389,8 +389,6 @@ static int __rfcomm_dlc_close(struct rfc
rfcomm_dlc_unlock(d);
 
skb_queue_purge(d-tx_queue);
-   rfcomm_session_put(s);
-
rfcomm_dlc_unlink(d);
}
 
@@ -600,8 +598,6 @@ static struct rfcomm_session *rfcomm_ses
goto failed;
}
 
-   rfcomm_session_hold(s);
-
s-initiator = 1;
 
bacpy(addr.l2_bdaddr, dst);
-
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


[Bluetooth] Remove unused functions and cleanup symbol exports

2005-08-06 Thread Linux Kernel Mailing List
tree cf25ee6d3b555a246be9bf8b783d3a92325cf5d9
parent e9a3e671c09d419f29710d8620ed916d3bf7d7ab
author Marcel Holtmann [EMAIL PROTECTED] Sat, 06 Aug 2005 12:36:51 +0200
committer Marcel Holtmann [EMAIL PROTECTED] Sat, 06 Aug 2005 12:36:51 +0200

[Bluetooth] Remove unused functions and cleanup symbol exports

This patch removes the unused bt_dump() function and it also removes
its BT_DMP macro. It also unexports the hci_dev_get(), hci_send_cmd()
and hci_si_event() functions.

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

 drivers/bluetooth/hci_bcsp.c  |2 --
 drivers/bluetooth/hci_h4.c|5 -
 drivers/bluetooth/hci_ldisc.c |2 --
 drivers/bluetooth/hci_usb.c   |2 --
 include/net/bluetooth/bluetooth.h |8 
 net/bluetooth/hci_core.c  |2 --
 net/bluetooth/hci_event.c |1 -
 net/bluetooth/lib.c   |   25 -
 8 files changed, 47 deletions(-)

diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c
--- a/drivers/bluetooth/hci_bcsp.c
+++ b/drivers/bluetooth/hci_bcsp.c
@@ -58,8 +58,6 @@
 #ifndef CONFIG_BT_HCIUART_DEBUG
 #undef  BT_DBG
 #define BT_DBG( A... )
-#undef  BT_DMP
-#define BT_DMP( A... )
 #endif
 
 static int hciextn = 1;
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -57,8 +57,6 @@
 #ifndef CONFIG_BT_HCIUART_DEBUG
 #undef  BT_DBG
 #define BT_DBG( A... )
-#undef  BT_DMP
-#define BT_DMP( A... )
 #endif
 
 /* Initialize protocol */
@@ -125,7 +123,6 @@ static inline int h4_check_data_len(stru
 
BT_DBG(len %d room %d, len, room);
if (!len) {
-   BT_DMP(h4-rx_skb-data, h4-rx_skb-len);
hci_recv_frame(h4-rx_skb);
} else if (len  room) {
BT_ERR(Data length is too large);
@@ -169,8 +166,6 @@ static int h4_recv(struct hci_uart *hu, 
case H4_W4_DATA:
BT_DBG(Complete data);
 
-   BT_DMP(h4-rx_skb-data, h4-rx_skb-len);
-
hci_recv_frame(h4-rx_skb);
 
h4-rx_state = H4_W4_PACKET_TYPE;
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -57,8 +57,6 @@
 #ifndef CONFIG_BT_HCIUART_DEBUG
 #undef  BT_DBG
 #define BT_DBG( A... )
-#undef  BT_DMP
-#define BT_DMP( A... )
 #endif
 
 static int reset = 0;
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -57,8 +57,6 @@
 #ifndef CONFIG_BT_HCIUSB_DEBUG
 #undef  BT_DBG
 #define BT_DBG(D...)
-#undef  BT_DMP
-#define BT_DMP(D...)
 #endif
 
 #ifndef CONFIG_BT_HCIUSB_ZERO_PACKET
diff --git a/include/net/bluetooth/bluetooth.h 
b/include/net/bluetooth/bluetooth.h
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -57,12 +57,6 @@
 #define BT_DBG(fmt, arg...)  printk(KERN_INFO %s:  fmt \n , __FUNCTION__ , 
## arg)
 #define BT_ERR(fmt, arg...)  printk(KERN_ERR  %s:  fmt \n , __FUNCTION__ , 
## arg)
 
-#ifdef HCI_DATA_DUMP
-#define BT_DMP(buf, len) bt_dump(__FUNCTION__, buf, len)
-#else
-#define BT_DMP(D...)
-#endif
-
 extern struct proc_dir_entry *proc_bt;
 
 /* Connection and socket states */
@@ -174,8 +168,6 @@ static inline int skb_frags_no(struct sk
return n;
 }
 
-void bt_dump(char *pref, __u8 *buf, int count);
-
 int bt_err(__u16 code);
 
 #endif /* __BLUETOOTH_H */
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -299,7 +299,6 @@ struct hci_dev *hci_dev_get(int index)
read_unlock(hci_dev_list_lock);
return hdev;
 }
-EXPORT_SYMBOL(hci_dev_get);
 
 /*  Inquiry support  */
 static void inquiry_cache_flush(struct hci_dev *hdev)
@@ -1042,7 +1041,6 @@ int hci_send_cmd(struct hci_dev *hdev, _
 
return 0;
 }
-EXPORT_SYMBOL(hci_send_cmd);
 
 /* Get data from the previously sent command */
 void *hci_sent_cmd_data(struct hci_dev *hdev, __u16 ogf, __u16 ocf)
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1040,4 +1040,3 @@ void hci_si_event(struct hci_dev *hdev, 
hci_send_to_sock(hdev, skb);
kfree_skb(skb);
 }
-EXPORT_SYMBOL(hci_si_event);
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c
--- a/net/bluetooth/lib.c
+++ b/net/bluetooth/lib.c
@@ -34,31 +34,6 @@
 
 #include net/bluetooth/bluetooth.h
 
-void bt_dump(char *pref, __u8 *buf, int count)
-{
-   char *ptr;
-   char line[100];
-   unsigned int i;
-
-   printk(KERN_INFO %s: dump, len %d\n, pref, count);
-
-   ptr = line;
-   *ptr = 0;
-   for (i = 0; i  count; i++) {
-   ptr += sprintf(ptr,  

ppc: Export __handle_mm_fault for MOL

2005-08-06 Thread Linux Kernel Mailing List
tree cd2d71428286934c89294ad12ebe4928c9425302
parent fab5a60a29f98f17256a4183e34a414f6db67569
author Linus Torvalds [EMAIL PROTECTED] Sat, 06 Aug 2005 23:44:37 -0700
committer Linus Torvalds [EMAIL PROTECTED] Sat, 06 Aug 2005 23:44:37 -0700

ppc: Export __handle_mm_fault for MOL

When we did the handle_mm_fault cleanup and get_user_page() race fixes,
handle_mm_fault turned into an inline function that called the real
__handle_mm_fault() code.  The export needed for MOL on ppc wasn't
updated to match the new world order, though.

Turn it into a GPL export while at it, since this is all about internal
interfaces and MOL is GPL'd anwyay.

 arch/ppc/kernel/ppc_ksyms.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -324,7 +324,7 @@ EXPORT_SYMBOL(__res);
 
 EXPORT_SYMBOL(next_mmu_context);
 EXPORT_SYMBOL(set_context);
-EXPORT_SYMBOL(handle_mm_fault); /* For MOL */
+EXPORT_SYMBOL_GPL(__handle_mm_fault); /* For MOL */
 EXPORT_SYMBOL(disarm_decr);
 #ifdef CONFIG_PPC_STD_MMU
 extern long mol_trampoline;
-
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


Check input buffer size in zisofs

2005-08-06 Thread Linux Kernel Mailing List
tree eff86901dda863299501c6e729a2d621f607314f
parent 243393c90f2b7cb781fd794e22786e9c8547901a
author Linus Torvalds [EMAIL PROTECTED] Sat, 06 Aug 2005 23:42:06 -0700
committer Linus Torvalds [EMAIL PROTECTED] Sat, 06 Aug 2005 23:42:06 -0700

Check input buffer size in zisofs

This uses the new deflateBound() thing to sanity-check the input to the
zlib decompressor before we even bother to start reading in the blocks.

Problem noted by Tim Yamin [EMAIL PROTECTED]

 fs/isofs/compress.c |6 ++
 1 files changed, 6 insertions(+)

diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c
--- a/fs/isofs/compress.c
+++ b/fs/isofs/compress.c
@@ -129,8 +129,14 @@ static int zisofs_readpage(struct file *
cend = le32_to_cpu(*(__le32 *)(bh-b_data + (blockendptr  bufmask)));
brelse(bh);
 
+   if (cstart  cend)
+   goto eio;
+   
csize = cend-cstart;
 
+   if (csize  deflateBound(1UL  zisofs_block_shift))
+   goto eio;
+
/* Now page[] contains an array of pages, any of which can be NULL,
   and the locks on which we hold.  We should now read the data and
   release the pages.  If the pages are NULL the decompressed data
-
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] i386 visws: Add machine_shutdown and emergency_restart

2005-08-06 Thread Linux Kernel Mailing List
tree fa988e457ce99f4eb9a85da9daf84951b5fcfe15
parent 094528a7fb3f75a83673e5cc3271fd466f2e278d
author Eric W. Biederman [EMAIL PROTECTED] Sun, 07 Aug 2005 01:45:10 -0600
committer Linus Torvalds [EMAIL PROTECTED] Sun, 07 Aug 2005 02:54:57 -0700

[PATCH] i386 visws: Add machine_shutdown and emergency_restart

Another x86 subarchitecture bit I missed.  This adds both
machine_emergency_restart missed in my reboot fixes and
machine_shutdown needed for kexec support.

Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/i386/mach-visws/reboot.c |   11 ++-
 1 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/i386/mach-visws/reboot.c b/arch/i386/mach-visws/reboot.c
--- a/arch/i386/mach-visws/reboot.c
+++ b/arch/i386/mach-visws/reboot.c
@@ -9,12 +9,15 @@
 void (*pm_power_off)(void);
 EXPORT_SYMBOL(pm_power_off);
 
-void machine_restart(char * __unused)
+void machine_shutdown(void)
 {
 #ifdef CONFIG_SMP
smp_send_stop();
 #endif
+}
 
+void machine_emergency_restart(void)
+{
/*
 * Visual Workstations restart after this
 * register is poked on the PIIX4
@@ -22,6 +25,12 @@ void machine_restart(char * __unused)
outb(PIIX4_RESET_VAL, PIIX4_RESET_PORT);
 }
 
+void machine_restart(char * __unused)
+{
+   machine_shutdown();
+   machine_emergency_restart();
+}
+
 void machine_power_off(void)
 {
unsigned short pm_status;
-
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] x86_64: ignore machine checks from boot time

2005-08-08 Thread Linux Kernel Mailing List
tree a4a017f686f101b5817f6c1abbc84518335d497e
parent cf7bee5a0bf270a4eace0be39329d6ac0136cc47
author Andi Kleen [EMAIL PROTECTED] Sun, 07 Aug 2005 23:42:07 -0700
committer Linus Torvalds [EMAIL PROTECTED] Mon, 08 Aug 2005 00:00:37 -0700

[PATCH] x86_64: ignore machine checks from boot time

Don't log machine check events left over from boot.  Too many BIOSes leave
bogus events in there.

This unfortunately also makes it impossible to log events that caused a
reboot.  For people with non broken BIOS there is mce=bootlog

Signed-off-by: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 Documentation/x86_64/boot-options.txt |5 +
 arch/x86_64/kernel/mce.c  |   16 
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/Documentation/x86_64/boot-options.txt 
b/Documentation/x86_64/boot-options.txt
--- a/Documentation/x86_64/boot-options.txt
+++ b/Documentation/x86_64/boot-options.txt
@@ -6,6 +6,11 @@ only the AMD64 specific ones are listed 
 Machine check
 
mce=off disable machine check
+   mce=bootlog Enable logging of machine checks left over from booting.
+   Disabled by default because some BIOS leave bogus ones.
+   If your BIOS doesn't do that it's a good idea to enable though
+   to make sure you log even machine check events that result
+   in a reboot.
 
nomce (for compatibility with i386): same as mce=off
 
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c
--- a/arch/x86_64/kernel/mce.c
+++ b/arch/x86_64/kernel/mce.c
@@ -36,6 +36,7 @@ static unsigned long bank[NR_BANKS] = { 
 static unsigned long console_logged;
 static int notify_user;
 static int rip_msr;
+static int mce_bootlog;
 
 /*
  * Lockless MCE logging infrastructure.
@@ -197,10 +198,11 @@ void do_machine_check(struct pt_regs * r
rdmsrl(MSR_IA32_MC0_ADDR + i*4, m.addr);
 
mce_get_rip(m, regs);
-   if (error_code != -1)
+   if (error_code = 0)
rdtscll(m.tsc);
wrmsrl(MSR_IA32_MC0_STATUS + i*4, 0);
-   mce_log(m);
+   if (error_code != -2)
+   mce_log(m);
 
/* Did this bank cause the exception? */
/* Assume that the bank with uncorrectable errors did it,
@@ -315,7 +317,7 @@ static void mce_init(void *dummy)
 
/* Log the machine checks left over from the previous reset.
   This also clears all registers */
-   do_machine_check(NULL, -1);
+   do_machine_check(NULL, mce_bootlog ? -1 : -2);
 
set_in_cr4(X86_CR4_MCE);
 
@@ -476,11 +478,17 @@ static int __init mcheck_disable(char *s
 }
 
 /* mce=off disables machine check. Note you can reenable it later
-   using sysfs */
+   using sysfs.
+   mce=bootlog Log MCEs from before booting. Disabled by default to work
+   around buggy BIOS that leave bogus MCEs.  */
 static int __init mcheck_enable(char *str)
 {
+   if (*str == '=')
+   str++;
if (!strcmp(str, off))
mce_dont_init = 1;
+   else if (!strcmp(str, bootlog))
+   mce_bootlog = 1;
else
printk(mce= argument %s ignored. Please use /sys, str); 
return 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


[PATCH] ppc32: 8xx: convert fec driver to use work_struct

2005-08-08 Thread Linux Kernel Mailing List
tree 6bdc59e8f55e86862d71d650e023f6d766ab920c
parent 68b47139ea94ab6d05e89c654db8daa99e9a232c
author Aristeu Sergio Rozanski Filho [EMAIL PROTECTED] Sun, 07 Aug 2005 
23:42:28 -0700
committer Linus Torvalds [EMAIL PROTECTED] Mon, 08 Aug 2005 00:00:38 -0700

[PATCH] ppc32: 8xx: convert fec driver to use work_struct

8xx: convert fec driver to use work_struct

Signed-off-by: Aristeu Sergio Rozanski Filho [EMAIL PROTECTED]
Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED]
Cc: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/ppc/8xx_io/fec.c |   18 +-
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -173,7 +173,7 @@ struct fec_enet_private {
uintphy_status;
uintphy_speed;
phy_info_t  *phy;
-   struct tq_struct phy_task;
+   struct work_struct phy_task;
 
uintsequence_done;
 
@@ -1263,8 +1263,9 @@ static void mii_display_status(struct ne
printk(.\n);
 }
 
-static void mii_display_config(struct net_device *dev)
+static void mii_display_config(void *priv)
 {
+   struct net_device *dev = (struct net_device *)priv;
struct fec_enet_private *fep = dev-priv;
volatile uint *s = (fep-phy_status);
 
@@ -1294,8 +1295,9 @@ static void mii_display_config(struct ne
fep-sequence_done = 1;
 }
 
-static void mii_relink(struct net_device *dev)
+static void mii_relink(void *priv)
 {
+   struct net_device *dev = (struct net_device *)priv;
struct fec_enet_private *fep = dev-priv;
int duplex;
 
@@ -1323,18 +1325,16 @@ static void mii_queue_relink(uint mii_re
 {
struct fec_enet_private *fep = dev-priv;
 
-   fep-phy_task.routine = (void *)mii_relink;
-   fep-phy_task.data = dev;
-   schedule_task(fep-phy_task);
+   INIT_WORK(fep-phy_task, mii_relink, (void *)dev);
+   schedule_work(fep-phy_task);
 }
 
 static void mii_queue_config(uint mii_reg, struct net_device *dev)
 {
struct fec_enet_private *fep = dev-priv;
 
-   fep-phy_task.routine = (void *)mii_display_config;
-   fep-phy_task.data = dev;
-   schedule_task(fep-phy_task);
+   INIT_WORK(fep-phy_task, mii_display_config, (void *)dev);
+   schedule_work(fep-phy_task);
 }
 
 
-
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] ppc32: 8xx: fec: fix interrupt handler prototypes

2005-08-08 Thread Linux Kernel Mailing List
tree 0957806533b81aba75fd2926a9acac9421af13b5
parent fc007ddd609ccfce1cd392e65eed05aba8db32ce
author Aristeu Sergio Rozanski Filho [EMAIL PROTECTED] Sun, 07 Aug 2005 
23:42:36 -0700
committer Linus Torvalds [EMAIL PROTECTED] Mon, 08 Aug 2005 00:00:39 -0700

[PATCH] ppc32: 8xx: fec: fix interrupt handler prototypes

8xx: fec: fix interrupt handler prototypes

Signed-off-by: Aristeu Sergio Rozanski Filho [EMAIL PROTECTED]
Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED]
Cc: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/ppc/8xx_io/fec.c |   15 ++-
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -199,7 +199,8 @@ static int fec_enet_start_xmit(struct sk
 #ifdef CONFIG_USE_MDIO
 static void fec_enet_mii(struct net_device *dev);
 #endif /* CONFIG_USE_MDIO */
-static void fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs);
+static irqreturn_t fec_enet_interrupt(int irq, void * dev_id,
+   struct pt_regs * regs);
 #ifdef CONFIG_FEC_PACKETHOOK
 static void  fec_enet_tx(struct net_device *dev, __u32 regval);
 static void  fec_enet_rx(struct net_device *dev, __u32 regval);
@@ -471,7 +472,7 @@ fec_timeout(struct net_device *dev)
 /* The interrupt handler.
  * This is called from the MPC core interrupt.
  */
-static void
+static irqreturn_t
 fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
 {
struct  net_device *dev = dev_id;
@@ -525,6 +526,7 @@ printk(%s[%d] %s: unexpected FEC_ENET_M
}
 
}
+   return IRQ_RETVAL(IRQ_HANDLED);
 }
 
 
@@ -1403,11 +1405,11 @@ mii_discover_phy(uint mii_reg, struct ne
 
 /* This interrupt occurs when the PHY detects a link change.
 */
-static void
+static
 #ifdef CONFIG_RPXCLASSIC
-mii_link_interrupt(void *dev_id)
+void mii_link_interrupt(void *dev_id)
 #else
-mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs)
+irqreturn_t mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs)
 #endif
 {
 #ifdef CONFIG_USE_MDIO
@@ -1440,6 +1442,9 @@ mii_link_interrupt(int irq, void * dev_i
 printk(%s[%d] %s: unexpected Link interrupt\n, 
__FILE__,__LINE__,__FUNCTION__);
 #endif /* CONFIG_USE_MDIO */
 
+#ifndef CONFIG_RPXCLASSIC
+   return IRQ_RETVAL(IRQ_HANDLED);
+#endif /* CONFIG_RPXCLASSIC */
 }
 
 static int
-
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] ppc32: 8xx fix CPM ethernet description

2005-08-08 Thread Linux Kernel Mailing List
tree 68245a74f6d80f3501084d84d3041e0fab83b72b
parent fbccb3d7f56654dbc407f757c884f22d26264e42
author Aristeu Sergio Rozanski Filho [EMAIL PROTECTED] Sun, 07 Aug 2005 
23:42:40 -0700
committer Linus Torvalds [EMAIL PROTECTED] Mon, 08 Aug 2005 00:00:39 -0700

[PATCH] ppc32: 8xx fix CPM ethernet description

8xx: fix CPM Ethernet description

Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED]
Signed-off-by: Aristeu Sergio Rozanski Filho [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/ppc/8xx_io/Kconfig |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/ppc/8xx_io/Kconfig b/arch/ppc/8xx_io/Kconfig
--- a/arch/ppc/8xx_io/Kconfig
+++ b/arch/ppc/8xx_io/Kconfig
@@ -71,7 +71,7 @@ config ENET_BIG_BUFFERS
bool Use Big CPM Ethernet Buffers
depends on NET_ETHERNET
help
- Allocate large buffers for MPC8xx Etherenet.  Increases throughput
+ Allocate large buffers for MPC8xx Ethernet. Increases throughput
  and decreases the likelihood of dropped packets, but costs memory.
 
 config HTDMSOUND
-
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] Move the fix to align node_end_pfns to a proper location

2005-08-08 Thread Linux Kernel Mailing List
tree 80fbfdcae56d07e7bcf27c3927e383ad3e35e378
parent 079da354db3473b56eb938ca53a2cb0804ea9c8c
author Ravikiran G Thirumalai [EMAIL PROTECTED] Sun, 07 Aug 2005 23:42:50 
-0700
committer Linus Torvalds [EMAIL PROTECTED] Mon, 08 Aug 2005 00:00:39 -0700

[PATCH] Move the fix to align node_end_pfns to a proper location

Move the fix to align node_end_pfns to a proper location.  The earlier fix
made the node_remap_start_vaddr to get misaligned causing remap_numa_kva to
barf again :-/

Signed-off-by: Ravikiran Thirumalai [EMAIL PROTECTED]
Signed-off-by: Shai Fultheim [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/i386/mm/discontig.c |   19 +++
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c
--- a/arch/i386/mm/discontig.c
+++ b/arch/i386/mm/discontig.c
@@ -243,14 +243,6 @@ static unsigned long calculate_numa_rema
/* now the roundup is correct, convert to PAGE_SIZE pages */
size = size * PTRS_PER_PTE;
 
-   if (node_end_pfn[nid]  (PTRS_PER_PTE-1)) {
-   /*
-* Adjust size if node_end_pfn is not on a proper
-* pmd boundary. remap_numa_kva will barf otherwise.
-*/
-   size +=  node_end_pfn[nid]  (PTRS_PER_PTE-1);
-   }
-
/*
 * Validate the region we are allocating only contains valid
 * pages.
@@ -270,6 +262,17 @@ static unsigned long calculate_numa_rema
reserve_pages += size;
printk(Shrinking node %d from %ld pages to %ld pages\n,
nid, node_end_pfn[nid], node_end_pfn[nid] - size);
+
+   if (node_end_pfn[nid]  (PTRS_PER_PTE-1)) {
+   /*
+* Align node_end_pfn[] and node_remap_start_pfn[] to
+* pmd boundary. remap_numa_kva will barf otherwise.
+*/
+   printk(Shrinking node %d further by %ld pages for 
proper alignment\n,
+   nid, node_end_pfn[nid]  (PTRS_PER_PTE-1));
+   size +=  node_end_pfn[nid]  (PTRS_PER_PTE-1);
+   }
+
node_end_pfn[nid] -= size;
node_remap_start_pfn[nid] = node_end_pfn[nid];
}
-
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] VIA VT8235 PCI quirk

2005-08-08 Thread Linux Kernel Mailing List
tree 1ab80c4bb980fec383047e8e07a0fb8fa77b5994
parent db6778db7eb1d974e1ae0da326530f09c13585ac
author Ivan Kokshaysky [EMAIL PROTECTED] Mon, 08 Aug 2005 12:55:54 +0400
committer Linus Torvalds [EMAIL PROTECTED] Tue, 09 Aug 2005 01:46:24 -0700

[PATCH] VIA VT8235 PCI quirk

Like many other southbridges from different manufacturers, VIA VT8235
chip has two non-standard BARs for power management and SMBus registers
(see the datasheet at http://www.via.com.tw).

This new quirk routine fixes boot problem with 2.6.13-rc2/rc6 kernels on
Targa Visionary 811 Athlon64 laptop, as reported by Mikael Pettersson
[EMAIL PROTECTED].

Signed-off-by: Ivan Kokshaysky [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/pci/quirks.c |   19 +++
 1 files changed, 19 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -373,6 +373,25 @@ static void __devinit quirk_vt82c686_acp
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686_4, 
quirk_vt82c686_acpi );
 
+/*
+ * VIA VT8235 ISA Bridge: Two IO regions pointed to by words at
+ * 0x88 (128 bytes of power management registers)
+ * 0xd0 (16 bytes of SMB registers)
+ */
+static void __devinit quirk_vt8235_acpi(struct pci_dev *dev)
+{
+   u16 pm, smb;
+
+   pci_read_config_word(dev, 0x88, pm);
+   pm = PCI_BASE_ADDRESS_IO_MASK;
+   quirk_io_region(dev, pm, 128, PCI_BRIDGE_RESOURCES);
+
+   pci_read_config_word(dev, 0xd0, smb);
+   smb = PCI_BASE_ADDRESS_IO_MASK;
+   quirk_io_region(dev, smb, 16, PCI_BRIDGE_RESOURCES + 1);
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_8235, 
quirk_vt8235_acpi);
+
 
 #ifdef CONFIG_X86_IO_APIC 
 
-
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


[TG3]: Save initial PCI state before registering the netdevice.

2005-08-08 Thread Linux Kernel Mailing List
tree 790200fcdef86e91224903394023b964a3a52e47
parent 6fc0b4a7a73a81e74d0004732df358f4f9975be2
author David S. Miller [EMAIL PROTECTED] Sat, 06 Aug 2005 20:35:48 -0700
committer David S. Miller [EMAIL PROTECTED] Sat, 06 Aug 2005 20:35:48 -0700

[TG3]: Save initial PCI state before registering the netdevice.

Else on SMP systems it is possible for hotplug to execute,
invoke tg3_open(), and end up loading the uninitialized
PCI register save area into the card.

Signed-off-by: David S. Miller [EMAIL PROTECTED]

 drivers/net/tg3.c |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -66,8 +66,8 @@
 
 #define DRV_MODULE_NAMEtg3
 #define PFX DRV_MODULE_NAME: 
-#define DRV_MODULE_VERSION 3.34
-#define DRV_MODULE_RELDATE July 25, 2005
+#define DRV_MODULE_VERSION 3.35
+#define DRV_MODULE_RELDATE August 6, 2005
 
 #define TG3_DEF_MAC_MODE   0
 #define TG3_DEF_RX_MODE0
@@ -10421,6 +10421,12 @@ static int __devinit tg3_init_one(struct
 
tg3_init_coal(tp);
 
+   /* Now that we have fully setup the chip, save away a snapshot
+* of the PCI config space.  We need to restore this after
+* GRC_MISC_CFG core clock resets and some resume events.
+*/
+   pci_save_state(tp-pdev);
+
err = register_netdev(dev);
if (err) {
printk(KERN_ERR PFX Cannot register net device, 
@@ -10430,12 +10436,6 @@ static int __devinit tg3_init_one(struct
 
pci_set_drvdata(pdev, dev);
 
-   /* Now that we have fully setup the chip, save away a snapshot
-* of the PCI config space.  We need to restore this after
-* GRC_MISC_CFG core clock resets and some resume events.
-*/
-   pci_save_state(tp-pdev);
-
printk(KERN_INFO %s: Tigon3 [partno(%s) rev %04x PHY(%s)] 
(PCI%s:%s:%s) %sBaseT Ethernet ,
   dev-name,
   tp-board_part_number,
-
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


Revert [PATCH] PCI: restore BAR values...

2005-08-08 Thread Linux Kernel Mailing List
tree 893613626de4794a7b13fe6793bdebc79420c433
parent 138b9dd1fd7b44176af4f3b672060c790b0eaf55
author Linus Torvalds [EMAIL PROTECTED] Tue, 09 Aug 2005 08:46:09 -0700
committer Linus Torvalds [EMAIL PROTECTED] Tue, 09 Aug 2005 08:46:09 -0700

Revert [PATCH] PCI: restore BAR values...

Revert commit fec59a711eef002d4ef9eb8de09dd0a26986eb77, which is
breaking sparc64 that doesn't have a working pci_update_resource.

We'll re-do this after 2.6.13 when we'll do it all properly.

 arch/sparc64/kernel/pci.c |6 
 drivers/pci/pci.c |   59 +++---
 drivers/pci/setup-res.c   |2 -
 include/linux/pci.h   |3 --
 4 files changed, 5 insertions(+), 65 deletions(-)

diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -413,12 +413,6 @@ static int pci_assign_bus_resource(const
return -EBUSY;
 }
 
-void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
-{
-   /* Not implemented for sparc64... */
-   BUG();
-}
-
 int pci_assign_resource(struct pci_dev *pdev, int resource)
 {
struct pcidev_cookie *pcp = pdev-sysdata;
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -222,37 +222,6 @@ pci_find_parent_resource(const struct pc
 }
 
 /**
- * pci_restore_bars - restore a devices BAR values (e.g. after wake-up)
- * @dev: PCI device to have its BARs restored
- *
- * Restore the BAR values for a given device, so as to make it
- * accessible by its driver.
- */
-void
-pci_restore_bars(struct pci_dev *dev)
-{
-   int i, numres;
-
-   switch (dev-hdr_type) {
-   case PCI_HEADER_TYPE_NORMAL:
-   numres = 6;
-   break;
-   case PCI_HEADER_TYPE_BRIDGE:
-   numres = 2;
-   break;
-   case PCI_HEADER_TYPE_CARDBUS:
-   numres = 1;
-   break;
-   default:
-   /* Should never get here, but just in case... */
-   return;
-   }
-
-   for (i = 0; i  numres; i ++)
-   pci_update_resource(dev, dev-resource[i], i);
-}
-
-/**
  * pci_set_power_state - Set the power state of a PCI device
  * @dev: PCI device to be suspended
  * @state: PCI power state (D0, D1, D2, D3hot, D3cold) we're entering
@@ -270,7 +239,7 @@ int (*platform_pci_set_power_state)(stru
 int
 pci_set_power_state(struct pci_dev *dev, pci_power_t state)
 {
-   int pm, need_restore = 0;
+   int pm;
u16 pmcsr, pmc;
 
/* bound the state we're entering */
@@ -309,17 +278,14 @@ pci_set_power_state(struct pci_dev *dev,
return -EIO;
}
 
-   pci_read_config_word(dev, pm + PCI_PM_CTRL, pmcsr);
-
/* If we're in D3, force entire word to 0.
 * This doesn't affect PME_Status, disables PME_En, and
 * sets PowerState to 0.
 */
-   if (dev-current_state = PCI_D3hot) {
-   if (!(pmcsr  PCI_PM_CTRL_NO_SOFT_RESET))
-   need_restore = 1;
+   if (dev-current_state = PCI_D3hot)
pmcsr = 0;
-   } else {
+   else {
+   pci_read_config_word(dev, pm + PCI_PM_CTRL, pmcsr);
pmcsr = ~PCI_PM_CTRL_STATE_MASK;
pmcsr |= state;
}
@@ -342,22 +308,6 @@ pci_set_power_state(struct pci_dev *dev,
platform_pci_set_power_state(dev, state);
 
dev-current_state = state;
-
-   /* According to section 5.4.1 of the PCI BUS POWER MANAGEMENT
-* INTERFACE SPECIFICATION, REV. 1.2, a device transitioning
-* from D3hot to D0 _may_ perform an internal reset, thereby
-* going to D0 Uninitialized rather than D0 Initialized.
-* For example, at least some versions of the 3c905B and the
-* 3c556B exhibit this behaviour.
-*
-* At least some laptop BIOSen (e.g. the Thinkpad T21) leave
-* devices in a D3hot state at boot.  Consequently, we need to
-* restore at least the BARs so that the device will be
-* accessible to its driver.
-*/
-   if (need_restore)
-   pci_restore_bars(dev);
-
return 0;
 }
 
@@ -855,7 +805,6 @@ struct pci_dev *isa_bridge;
 EXPORT_SYMBOL(isa_bridge);
 #endif
 
-EXPORT_SYMBOL_GPL(pci_restore_bars);
 EXPORT_SYMBOL(pci_enable_device_bars);
 EXPORT_SYMBOL(pci_enable_device);
 EXPORT_SYMBOL(pci_disable_device);
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -26,7 +26,7 @@
 #include pci.h
 
 
-void
+static void
 pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
 {
struct pci_bus_region region;
diff --git a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -225,7 +225,6 @@
 #define  PCI_PM_CAP_PME_D3cold  0x8000  /* PME# from D3 (cold) */
 #define 

[SPARC]: Use kthread infrastructure in envctrl

2005-08-09 Thread Linux Kernel Mailing List
tree e734f30f6123ae2b4e3ba545e9017d6d0498b3e7
parent 00dd1e433967872f3997a45d5adf35056fdf2f56
author Christoph Hellwig [EMAIL PROTECTED] Wed, 10 Aug 2005 02:30:07 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 10 Aug 2005 02:30:07 -0700

[SPARC]: Use kthread infrastructure in envctrl

envctrl currently uses very odd ways to stop a thread, using various
things that should be exposed to drivers at all.

This patch (which is untested as I don't have sparc hardware) switches
it to use the proper kthread infrastructure.

Signed-off-by: Christoph Hellwig [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 drivers/sbus/char/envctrl.c |   41 ++---
 1 files changed, 10 insertions(+), 31 deletions(-)

diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -24,6 +24,7 @@
 #include linux/config.h
 #include linux/module.h
 #include linux/sched.h
+#include linux/kthread.h
 #include linux/errno.h
 #include linux/delay.h
 #include linux/ioport.h
@@ -1010,16 +1011,13 @@ static int kenvctrld(void *__unused)
 
poll_interval = 5000; /* TODO env_mon_interval */
 
-   daemonize(kenvctrld);
-   allow_signal(SIGKILL);
-
-   kenvctrld_task = current;
-
printk(KERN_INFO envctrl: %s starting...\n, current-comm);
for (;;) {
-   if(msleep_interruptible(poll_interval))
-   break;
+   msleep_interruptible(poll_interval);
 
+   if (kthread_should_stop())
+   break;
+   
for (whichcpu = 0; whichcpu  ENVCTRL_MAX_CPU; ++whichcpu) {
if (0  envctrl_read_cpu_info(whichcpu, cputemp,
  ENVCTRL_CPUTEMP_MON,
@@ -1118,9 +1116,11 @@ done:
i2c_childlist[i].addr, (0 == i) ? (\n) : ( ));
}
 
-   err = kernel_thread(kenvctrld, NULL, CLONE_FS | CLONE_FILES);
-   if (err  0)
+   kenvctrld_task = kthread_run(kenvctrld, NULL, kenvctrld);
+   if (IS_ERR(kenvctrld_task)) {
+   err = ERR_PTR(kenvctrld_task);
goto out_deregister;
+   }
 
return 0;
 
@@ -1142,28 +1142,7 @@ static void __exit envctrl_cleanup(void)
 {
int i;
 
-   if (NULL != kenvctrld_task) {
-   force_sig(SIGKILL, kenvctrld_task);
-   for (;;) {
-   struct task_struct *p;
-   int found = 0;
-
-   read_lock(tasklist_lock);
-   for_each_process(p) {
-   if (p == kenvctrld_task) {
-   found = 1;
-   break;
-   }
-   }
-   read_unlock(tasklist_lock);
-
-   if (!found)
-   break;
-
-   msleep(1000);
-   }
-   kenvctrld_task = NULL;
-   }
+   kthread_stop(kenvctrld_task);
 
iounmap(i2c);
misc_deregister(envctrl_dev);
-
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


[SPARC]: Use kthread infrastructure in bbc_envctrl

2005-08-09 Thread Linux Kernel Mailing List
tree e7e9f356f14b5353f8b07273948beb1eef0ec8f9
parent 218b29e0c3995ee15782de55ad1dd74cce1a728d
author Christoph Hellwig [EMAIL PROTECTED] Wed, 10 Aug 2005 03:32:25 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 10 Aug 2005 03:32:25 -0700

[SPARC]: Use kthread infrastructure in bbc_envctrl

Signed-off-by: Christoph Hellwig [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 drivers/sbus/char/bbc_envctrl.c |   39 ++-
 1 files changed, 10 insertions(+), 29 deletions(-)

diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c
--- a/drivers/sbus/char/bbc_envctrl.c
+++ b/drivers/sbus/char/bbc_envctrl.c
@@ -7,6 +7,7 @@
 #define __KERNEL_SYSCALLS__
 
 #include linux/kernel.h
+#include linux/kthread.h
 #include linux/sched.h
 #include linux/slab.h
 #include linux/delay.h
@@ -459,10 +460,6 @@ static struct task_struct *kenvctrld_tas
 
 static int kenvctrld(void *__unused)
 {
-   daemonize(kenvctrld);
-   allow_signal(SIGKILL);
-   kenvctrld_task = current;
-
printk(KERN_INFO bbc_envctrl: kenvctrld starting...\n);
last_warning_jiffies = jiffies - WARN_INTERVAL;
for (;;) {
@@ -470,7 +467,7 @@ static int kenvctrld(void *__unused)
struct bbc_fan_control *fp;
 
msleep_interruptible(POLL_INTERVAL);
-   if (signal_pending(current))
+   if (kthread_should_stop())
break;
 
for (tp = all_bbc_temps; tp; tp = tp-next) {
@@ -577,7 +574,6 @@ int bbc_envctrl_init(void)
int temp_index = 0;
int fan_index = 0;
int devidx = 0;
-   int err = 0;
 
while ((echild = bbc_i2c_getdev(devidx++)) != NULL) {
if (!strcmp(echild-prom_name, temperature))
@@ -585,9 +581,13 @@ int bbc_envctrl_init(void)
if (!strcmp(echild-prom_name, fan-control))
attach_one_fan(echild, fan_index++);
}
-   if (temp_index != 0  fan_index != 0)
-   err = kernel_thread(kenvctrld, NULL, CLONE_FS | CLONE_FILES);
-   return err;
+   if (temp_index != 0  fan_index != 0) {
+   kenvctrld_task = kthread_run(kenvctrld, NULL, kenvctrld);
+   if (IS_ERR(kenvctrld_task))
+   return PTR_ERR(kenvctrld_task);
+   }
+
+   return 0;
 }
 
 static void destroy_one_temp(struct bbc_cpu_temperature *tp)
@@ -607,26 +607,7 @@ void bbc_envctrl_cleanup(void)
struct bbc_cpu_temperature *tp;
struct bbc_fan_control *fp;
 
-   if (kenvctrld_task != NULL) {
-   force_sig(SIGKILL, kenvctrld_task);
-   for (;;) {
-   struct task_struct *p;
-   int found = 0;
-
-   read_lock(tasklist_lock);
-   for_each_process(p) {
-   if (p == kenvctrld_task) {
-   found = 1;
-   break;
-   }
-   }
-   read_unlock(tasklist_lock);
-   if (!found)
-   break;
-   msleep(1000);
-   }
-   kenvctrld_task = NULL;
-   }
+   kthread_stop(kenvctrld_task);
 
tp = all_bbc_temps;
while (tp != 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


[SUNRPC]: Fix nsec -- usec conversion.

2005-08-09 Thread Linux Kernel Mailing List
tree 4db1741d4400b704609d495c68728c962ea3982a
parent 00dd1e433967872f3997a45d5adf35056fdf2f56
author David S. Miller [EMAIL PROTECTED] Wed, 10 Aug 2005 04:57:12 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 10 Aug 2005 04:57:12 -0700

[SUNRPC]: Fix nsec -- usec conversion.

We need to divide, not multiply.  While we're here,
use NSEC_PER_USEC instead of a magic constant.

Based upon a report from Josip Loncaric and a patch
by Andrew Morton.

Signed-off-by: David S. Miller [EMAIL PROTECTED]

 net/sunrpc/svcsock.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -586,7 +586,7 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
}
if (skb-stamp.tv_sec == 0) {
skb-stamp.tv_sec = xtime.tv_sec; 
-   skb-stamp.tv_usec = xtime.tv_nsec * 1000; 
+   skb-stamp.tv_usec = xtime.tv_nsec / NSEC_PER_USEC; 
/* Don't enable netstamp, sunrpc doesn't 
   need that much accuracy */
}
-
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] I2O: added pci_request_regions() before using the controller

2005-08-09 Thread Linux Kernel Mailing List
tree cc0a26be95e1a93e675bbe40dd7528db7ed2baa1
parent a7df26da158ad64d56cc32934aa38a07d03a6fc9
author Markus Lidel [EMAIL PROTECTED] Wed, 10 Aug 2005 04:30:57 -0700
committer Linus Torvalds [EMAIL PROTECTED] Wed, 10 Aug 2005 07:59:52 -0700

[PATCH] I2O: added pci_request_regions() before using the controller

Added pci_request_regions() before using the controller to avoid duplicate
usage of the I2O controller when the dpt_i2o driver and I2O subsystem is
loaded at the same time.

Signed-off-by: Markus Lidel [EMAIL PROTECTED]
Cc: James Bottomley [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/message/i2o/pci.c |   10 ++
 1 files changed, 10 insertions(+)

diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c
--- a/drivers/message/i2o/pci.c
+++ b/drivers/message/i2o/pci.c
@@ -32,6 +32,8 @@
 #include linux/i2o.h
 #include core.h
 
+#define OSM_DESCRIPTIONI2O-subsystem
+
 /* PCI device id table for all I2O controllers */
 static struct pci_device_id __devinitdata i2o_pci_ids[] = {
{PCI_DEVICE_CLASS(PCI_CLASS_INTELLIGENT_I2O  8, 0x00)},
@@ -66,6 +68,8 @@ static void i2o_pci_free(struct i2o_cont
 
if (c-base.virt)
iounmap(c-base.virt);
+
+   pci_release_regions(c-pdev);
 }
 
 /**
@@ -84,6 +88,11 @@ static int __devinit i2o_pci_alloc(struc
struct device *dev = pdev-dev;
int i;
 
+   if (pci_request_regions(pdev, OSM_DESCRIPTION)) {
+   printk(KERN_ERR %s: device already claimed\n, c-name);
+   return -ENODEV;
+   }
+
for (i = 0; i  6; i++) {
/* Skip I/O spaces */
if (!(pci_resource_flags(pdev, i)  IORESOURCE_IO)) {
@@ -138,6 +147,7 @@ static int __devinit i2o_pci_alloc(struc
c-base.virt = ioremap_nocache(c-base.phys, c-base.len);
if (!c-base.virt) {
printk(KERN_ERR %s: Unable to map controller.\n, c-name);
+   i2o_pci_free(c);
return -ENOMEM;
}
 
-
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]: Fix memory leak in sys_{send,recv}msg() w/compat

2005-08-09 Thread Linux Kernel Mailing List
tree b49a930e65ed4f30b4f8f2aac4ddb08c41bc4b79
parent 3501466941347f0e1992b2672affb3feb92925fd
author Andrew Morton [EMAIL PROTECTED] Wed, 10 Aug 2005 05:29:19 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 10 Aug 2005 05:29:19 -0700

[NET]: Fix memory leak in sys_{send,recv}msg() w/compat

From: Dave Johnson [EMAIL PROTECTED]

sendmsg()/recvmsg() syscalls from o32/n32 apps to a 64bit kernel will
cause a kernel memory leak if iov_len  UIO_FASTIOV for each syscall!

This is because both sys_sendmsg() and verify_compat_iovec() kmalloc a
new iovec structure.  Only the one from sys_sendmsg() is free'ed.

I wrote a simple test program to confirm this after identifying the
problem:

http://davej.org/programs/testsendmsg.c

Note that the below fix will break solaris_sendmsg()/solaris_recvmsg() as
it also calls verify_compat_iovec() but expects it to malloc internally.

[ I fixed that. -DaveM ]

Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 arch/sparc64/solaris/socket.c |  191 +-
 net/compat.c  |9 -
 2 files changed, 118 insertions(+), 82 deletions(-)

diff --git a/arch/sparc64/solaris/socket.c b/arch/sparc64/solaris/socket.c
--- a/arch/sparc64/solaris/socket.c
+++ b/arch/sparc64/solaris/socket.c
@@ -16,6 +16,7 @@
 #include linux/net.h
 #include linux/compat.h
 #include net/compat.h
+#include net/sock.h
 
 #include asm/uaccess.h
 #include asm/string.h
@@ -297,121 +298,165 @@ asmlinkage int solaris_sendmsg(int fd, s
 {
struct socket *sock;
char address[MAX_SOCK_ADDR];
-   struct iovec iov[UIO_FASTIOV];
+   struct iovec iovstack[UIO_FASTIOV], *iov = iovstack;
unsigned char ctl[sizeof(struct cmsghdr) + 20];
unsigned char *ctl_buf = ctl;
-   struct msghdr kern_msg;
-   int err, total_len;
+   struct msghdr msg_sys;
+   int err, ctl_len, iov_size, total_len;
 
-   if(msghdr_from_user32_to_kern(kern_msg, user_msg))
-   return -EFAULT;
-   if(kern_msg.msg_iovlen  UIO_MAXIOV)
-   return -EINVAL;
-   err = verify_compat_iovec(kern_msg, iov, address, VERIFY_READ);
-   if (err  0)
+   err = -EFAULT;
+   if (msghdr_from_user32_to_kern(msg_sys, user_msg))
+   goto out;
+
+   sock = sockfd_lookup(fd, err);
+   if (!sock)
goto out;
+
+   /* do not move before msg_sys is valid */
+   err = -EMSGSIZE;
+   if (msg_sys.msg_iovlen  UIO_MAXIOV)
+   goto out_put;
+
+   /* Check whether to allocate the iovec area*/
+   err = -ENOMEM;
+   iov_size = msg_sys.msg_iovlen * sizeof(struct iovec);
+   if (msg_sys.msg_iovlen  UIO_FASTIOV) {
+   iov = sock_kmalloc(sock-sk, iov_size, GFP_KERNEL);
+   if (!iov)
+   goto out_put;
+   }
+
+   err = verify_compat_iovec(msg_sys, iov, address, VERIFY_READ);
+   if (err  0)
+   goto out_freeiov;
total_len = err;
 
-   if(kern_msg.msg_controllen) {
-   struct sol_cmsghdr __user *ucmsg = kern_msg.msg_control;
+   err = -ENOBUFS;
+   if (msg_sys.msg_controllen  INT_MAX)
+   goto out_freeiov;
+
+   ctl_len = msg_sys.msg_controllen;
+   if (ctl_len) {
+   struct sol_cmsghdr __user *ucmsg = msg_sys.msg_control;
unsigned long *kcmsg;
compat_size_t cmlen;
 
-   if (kern_msg.msg_controllen = sizeof(compat_size_t))
-   return -EINVAL;
+   err = -EINVAL;
+   if (ctl_len = sizeof(compat_size_t))
+   goto out_freeiov;
 
-   if(kern_msg.msg_controllen  sizeof(ctl)) {
+   if (ctl_len  sizeof(ctl)) {
err = -ENOBUFS;
-   ctl_buf = kmalloc(kern_msg.msg_controllen, GFP_KERNEL);
-   if(!ctl_buf)
+   ctl_buf = kmalloc(ctl_len, GFP_KERNEL);
+   if (!ctl_buf)
goto out_freeiov;
}
__get_user(cmlen, ucmsg-cmsg_len);
kcmsg = (unsigned long *) ctl_buf;
*kcmsg++ = (unsigned long)cmlen;
err = -EFAULT;
-   if(copy_from_user(kcmsg, ucmsg-cmsg_level,
- kern_msg.msg_controllen - 
sizeof(compat_size_t)))
+   if (copy_from_user(kcmsg, ucmsg-cmsg_level,
+  ctl_len - sizeof(compat_size_t)))
goto out_freectl;
-   kern_msg.msg_control = ctl_buf;
+   msg_sys.msg_control = ctl_buf;
}
-   kern_msg.msg_flags = solaris_to_linux_msgflags(user_flags);
+   msg_sys.msg_flags = solaris_to_linux_msgflags(user_flags);
 
-   lock_kernel();
-   sock = sockfd_lookup(fd, err);
-   if (sock != NULL) {
-   if 

[ARM SMP] Only enable V6K instructions on V6 MP core CPUs

2005-08-10 Thread Linux Kernel Mailing List
tree 0b1512bf41bde9d89c4076b305df7ceab9db2465
parent 86b3786078d63242d3194ffc58ae8dae1d1bbef3
author Russell King [EMAIL PROTECTED] Wed, 10 Aug 2005 14:41:45 +0100
committer Russell King [EMAIL PROTECTED] Wed, 10 Aug 2005 14:41:45 +0100

[ARM SMP] Only enable V6K instructions on V6 MP core CPUs

Signed-off-by: Russell King [EMAIL PROTECTED]

 arch/arm/lib/bitops.h |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h
--- a/arch/arm/lib/bitops.h
+++ b/arch/arm/lib/bitops.h
@@ -1,4 +1,6 @@
-#if __LINUX_ARM_ARCH__ = 6
+#include linux/config.h
+
+#if __LINUX_ARM_ARCH__ = 6  defined(CONFIG_CPU_MPCORE)
.macro  bitop, instr
mov r2, #1
and r3, r0, #7  @ Get bit offset
-
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


[ARM SMP] Clear the exclusive monitor on ARMv6 CPUs on context switch

2005-08-10 Thread Linux Kernel Mailing List
tree 9bd30de345a0bf8260db1e3edbb657dc46bbe1e9
parent 3c4ee4e2520775896efc6ab850c4c27971fbcf2a
author Russell King [EMAIL PROTECTED] Wed, 10 Aug 2005 14:52:52 +0100
committer Russell King [EMAIL PROTECTED] Wed, 10 Aug 2005 14:52:52 +0100

[ARM SMP] Clear the exclusive monitor on ARMv6 CPUs on context switch

Ensure that the exclusive monitor is cleared on context switch with
ARMv6 CPUs.

Signed-off-by: Russell King [EMAIL PROTECTED]

 arch/arm/kernel/entry-armv.S |7 +++
 1 files changed, 7 insertions(+)

diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -533,6 +533,13 @@ ENTRY(__switch_to)
ldr r3, [r2, #TI_TP_VALUE]
stmia   ip!, {r4 - sl, fp, sp, lr}  @ Store most regs on stack
ldr r6, [r2, #TI_CPU_DOMAIN]!
+#if __LINUX_ARM_ARCH__ = 6
+#ifdef CONFIG_CPU_MPCORE
+   clrex
+#else
+   strex   r3, r4, [ip]@ Clear exclusive monitor
+#endif
+#endif
 #if defined(CONFIG_CPU_XSCALE)  !defined(CONFIG_IWMMXT)
mra r4, r5, acc0
stmia   ip, {r4, r5}
-
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


[SCSI] dpt_i2o pci_request_regions fix

2005-08-10 Thread Linux Kernel Mailing List
tree f37ca7a3bd02f4eac8bb5b62d0068451666569f9
parent 5c44cd2afad3f7b015542187e147a820600172f1
author Salyzyn, Mark [EMAIL PROTECTED] Tue, 09 Aug 2005 20:57:58 -0400
committer James Bottomley [EMAIL PROTECTED](none) Tue, 09 Aug 2005 22:09:53 
-0500

[SCSI] dpt_i2o pci_request_regions fix

Originally From: Andrew Morton [EMAIL PROTECTED]

Altered By: Salyzyn, Mark [EMAIL PROTECTED]

There is an additional 'build fix' patch that Andrew Morton submitted on
the kernel list (I have changed out his dpr_i2o with dpt_i2o below
though).

Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: James Bottomley [EMAIL PROTECTED]

 drivers/scsi/dpt_i2o.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -907,7 +907,7 @@ static int adpt_install_hba(struct scsi_
raptorFlag = TRUE;
}
 
-   if (pci_request_regions(pDev)) {
+   if (pci_request_regions(pDev, dpt_i2o)) {
PERROR(dpti: adpt_config_hba: pci request region failed\n);
return -EINVAL;
}
-
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] sh: Make _syscall6() do the right thing.

2005-08-13 Thread Linux Kernel Mailing List
tree 794793d9d6d67cfaa55d141083527297bcc14bd1
parent 4bb82551e165f887448f6f61055d7bcd90aefa2a
author Paul Mundt [EMAIL PROTECTED] Sat, 13 Aug 2005 20:28:06 +0300
committer Linus Torvalds [EMAIL PROTECTED] Sun, 14 Aug 2005 04:23:39 -0700

[PATCH] sh: Make _syscall6() do the right thing.

There was a rather silly and embarrassing typo in the sh _syscall6().
For the syscall ABI we have the trapa value specified as 0x10 + number
of arguments, this was being set incorrectly in the _syscall6() case
which ended up causing some problems for users.

Signed-off-by: Paul Mundt [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 include/asm-sh/unistd.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h
--- a/include/asm-sh/unistd.h
+++ b/include/asm-sh/unistd.h
@@ -406,7 +406,7 @@ register long __sc6 __asm__ (r6) = (lo
 register long __sc7 __asm__ (r7) = (long) arg4; \
 register long __sc0 __asm__ (r0) = (long) arg5; \
 register long __sc1 __asm__ (r1) = (long) arg6; \
-__asm__ __volatile__ (trapa   #0x15 \
+__asm__ __volatile__ (trapa   #0x16 \
: =z (__sc0) \
: 0 (__sc0), r (__sc4), r (__sc5), r (__sc6), r (__sc7),  \
  r (__sc3), r (__sc1) \
-
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


Revert PCIBIOS_MIN_IO changes for 2.6.13

2005-08-14 Thread Linux Kernel Mailing List
tree f8a746aca3ca8aeb832d83e9297f2ffe636082c6
parent b4b08e581fac8e0ba9ae348bdc13246c9798c99e
author Linus Torvalds [EMAIL PROTECTED] Mon, 15 Aug 2005 08:21:30 -0700
committer Linus Torvalds [EMAIL PROTECTED] Mon, 15 Aug 2005 08:21:30 -0700

Revert PCIBIOS_MIN_IO changes for 2.6.13

This reverts commits

  71db63acff69618b3d9d3114bd061938150e146b
[PATCH] increase PCIBIOS_MIN_IO on x86

and

  0b2bfb4e7ff61f286676867c3508569bea6fbf7a
ACPI: increase PCIBIOS_MIN_IO on x86

since Lukas Sandströ[EMAIL PROTECTED] reports that this breaks
his on-board nvidia audio.

We should re-visit this later. For now we revert the change

Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/acpi/motherboard.c |2 +-
 include/asm-i386/pci.h |4 +++-
 include/asm-x86_64/pci.h   |4 +++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/motherboard.c b/drivers/acpi/motherboard.c
--- a/drivers/acpi/motherboard.c
+++ b/drivers/acpi/motherboard.c
@@ -43,7 +43,7 @@ ACPI_MODULE_NAME  (acpi_motherboard)
  */
 #define IS_RESERVED_ADDR(base, len) \
(((len)  0)  ((base)  0)  ((base) + (len)  IO_SPACE_LIMIT) \
-((base) + (len)  0x1000))
+((base) + (len)  PCIBIOS_MIN_IO))
 
 /*
  * Clearing the flag (IORESOURCE_BUSY) allows drivers to use
diff --git a/include/asm-i386/pci.h b/include/asm-i386/pci.h
--- a/include/asm-i386/pci.h
+++ b/include/asm-i386/pci.h
@@ -18,9 +18,11 @@ extern unsigned int pcibios_assign_all_b
 #define pcibios_scan_all_fns(a, b) 0
 
 extern unsigned long pci_mem_start;
-#define PCIBIOS_MIN_IO 0x4000
+#define PCIBIOS_MIN_IO 0x1000
 #define PCIBIOS_MIN_MEM(pci_mem_start)
 
+#define PCIBIOS_MIN_CARDBUS_IO 0x4000
+
 void pcibios_config_init(void);
 struct pci_bus * pcibios_scan_root(int bus);
 
diff --git a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h
--- a/include/asm-x86_64/pci.h
+++ b/include/asm-x86_64/pci.h
@@ -22,9 +22,11 @@ extern unsigned int pcibios_assign_all_b
 extern int no_iommu, force_iommu;
 
 extern unsigned long pci_mem_start;
-#define PCIBIOS_MIN_IO 0x4000
+#define PCIBIOS_MIN_IO 0x1000
 #define PCIBIOS_MIN_MEM(pci_mem_start)
 
+#define PCIBIOS_MIN_CARDBUS_IO 0x4000
+
 void pcibios_config_init(void);
 struct pci_bus * pcibios_scan_root(int bus);
 extern int (*pci_config_read)(int seg, int bus, int dev, int fn, int reg, int 
len, u32 *value);
-
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] inotify: fix idr_get_new_above usage

2005-08-15 Thread Linux Kernel Mailing List
tree c1fd8207f7d7b3e1db7d0f28ffae88f0dc205083
parent 2ba84684e8cf6f980e4e95a2300f53a505eb794e
author Robert Love [EMAIL PROTECTED] Mon, 15 Aug 2005 20:27:54 -0400
committer Linus Torvalds [EMAIL PROTECTED] Mon, 15 Aug 2005 23:48:31 -0700

[PATCH] inotify: fix idr_get_new_above usage

We are saving the wrong thing in -last_wd.  We want the wd, not the
return value.

Signed-off-by: Robert Love [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 fs/inotify.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/inotify.c b/fs/inotify.c
--- a/fs/inotify.c
+++ b/fs/inotify.c
@@ -402,7 +402,7 @@ static struct inotify_watch *create_watc
return ERR_PTR(ret);
}
 
-   dev-last_wd = ret;
+   dev-last_wd = watch-wd;
watch-mask = mask;
atomic_set(watch-count, 0);
INIT_LIST_HEAD(watch-d_list);
-
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] NFS: Ensure ACL xdr code doesn't overflow.

2005-08-16 Thread Linux Kernel Mailing List
tree 24edbecfb5875cf6c602b1fd5126c7dfce9ae127
parent 75cd968ab251ac84dd3a5dc252af7036dc4a64f4
author Trond Myklebust [EMAIL PROTECTED] Thu, 11 Aug 2005 02:15:12 -0400
committer Linus Torvalds [EMAIL PROTECTED] Tue, 16 Aug 2005 22:52:11 -0700

[PATCH] NFS: Ensure ACL xdr code doesn't overflow.

Signed-off-by: Trond Myklebust [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 fs/nfs_common/nfsacl.c |1 +
 include/linux/sunrpc/xdr.h |1 +
 net/sunrpc/xdr.c   |1 +
 3 files changed, 3 insertions(+)

diff --git a/fs/nfs_common/nfsacl.c b/fs/nfs_common/nfsacl.c
--- a/fs/nfs_common/nfsacl.c
+++ b/fs/nfs_common/nfsacl.c
@@ -239,6 +239,7 @@ nfsacl_decode(struct xdr_buf *buf, unsig
if (xdr_decode_word(buf, base, entries) ||
entries  NFS_ACL_MAX_ENTRIES)
return -EINVAL;
+   nfsacl_desc.desc.array_maxlen = entries;
err = xdr_decode_array2(buf, base + 4, nfsacl_desc.desc);
if (err)
return err;
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -177,6 +177,7 @@ typedef int (*xdr_xcode_elem_t)(struct x
 struct xdr_array2_desc {
unsigned int elem_size;
unsigned int array_len;
+   unsigned int array_maxlen;
xdr_xcode_elem_t xcode;
 };
 
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -993,6 +993,7 @@ xdr_xcode_array2(struct xdr_buf *buf, un
return -EINVAL;
} else {
if (xdr_decode_word(buf, base, desc-array_len) != 0 ||
+   desc-array_len  desc-array_maxlen ||
(unsigned long) base + 4 + desc-array_len *
desc-elem_size  buf-len)
return -EINVAL;
-
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] NFS: Ensure we always update inode-i_mode when doing O_EXCL creates

2005-08-16 Thread Linux Kernel Mailing List
tree 76a2e4f645d09b2e59b485fb2aea0af45234
parent 367ae3cd74bdc2ad32d71293427fec570b14ddcd
author Trond Myklebust [EMAIL PROTECTED] Tue, 16 Aug 2005 19:49:44 -0400
committer Linus Torvalds [EMAIL PROTECTED] Tue, 16 Aug 2005 23:30:58 -0700

[PATCH] NFS: Ensure we always update inode-i_mode when doing O_EXCL creates

When the client performs an exclusive create and opens the file for writing,
a Netapp filer will first create the file using the mode 01777. It does this
since an NFSv3/v4 exclusive create cannot immediately set the mode bits.
The 01777 mode then gets put into the inode-i_mode. After the file creation
is successful, we then do a setattr to change the mode to the correct value
(as per the NFS spec).

The problem is that nfs_refresh_inode() no longer updates inode-i_mode, so
the latter retains the 01777 mode. A bit later, the VFS notices this, and calls
remove_suid(). This of course now resets the file mode to inode-i_mode  0777.
Hey presto, the file mode on the server is now magically changed to 0777. Duh...

Fixes http://bugzilla.linux-nfs.org/show_bug.cgi?id=32

Signed-off-by: Trond Myklebust [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 fs/nfs/inode.c |   37 -
 fs/nfs/nfs3proc.c  |4 
 fs/nfs/nfs4proc.c  |   10 --
 fs/nfs/proc.c  |2 ++
 include/linux/nfs_fs.h |1 +
 5 files changed, 39 insertions(+), 15 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -814,28 +814,39 @@ nfs_setattr(struct dentry *dentry, struc
nfs_wb_all(inode);
}
error = NFS_PROTO(inode)-setattr(dentry, fattr, attr);
-   if (error == 0) {
+   if (error == 0)
nfs_refresh_inode(inode, fattr);
+   nfs_end_data_update(inode);
+   unlock_kernel();
+   return error;
+}
+
+/**
+ * nfs_setattr_update_inode - Update inode metadata after a setattr call.
+ * @inode: pointer to struct inode
+ * @attr: pointer to struct iattr
+ *
+ * Note: we do this in the *proc.c in order to ensure that
+ *   it works for things like exclusive creates too.
+ */
+void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr)
+{
+   if ((attr-ia_valid  (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0) {
if ((attr-ia_valid  ATTR_MODE) != 0) {
-   int mode;
-   mode = inode-i_mode  ~S_IALLUGO;
-   mode |= attr-ia_mode  S_IALLUGO;
+   int mode = attr-ia_mode  S_IALLUGO;
+   mode |= inode-i_mode  ~S_IALLUGO;
inode-i_mode = mode;
}
if ((attr-ia_valid  ATTR_UID) != 0)
inode-i_uid = attr-ia_uid;
if ((attr-ia_valid  ATTR_GID) != 0)
inode-i_gid = attr-ia_gid;
-   if ((attr-ia_valid  ATTR_SIZE) != 0) {
-   inode-i_size = attr-ia_size;
-   vmtruncate(inode, attr-ia_size);
-   }
-   }
-   if ((attr-ia_valid  (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0)
NFS_FLAGS(inode) |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL;
-   nfs_end_data_update(inode);
-   unlock_kernel();
-   return error;
+   }
+   if ((attr-ia_valid  ATTR_SIZE) != 0) {
+   inode-i_size = attr-ia_size;
+   vmtruncate(inode, attr-ia_size);
+   }
 }
 
 /*
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
--- a/fs/nfs/nfs3proc.c
+++ b/fs/nfs/nfs3proc.c
@@ -120,6 +120,8 @@ nfs3_proc_setattr(struct dentry *dentry,
dprintk(NFS call  setattr\n);
fattr-valid = 0;
status = rpc_call(NFS_CLIENT(inode), NFS3PROC_SETATTR, arg, fattr, 0);
+   if (status == 0)
+   nfs_setattr_update_inode(inode, sattr);
dprintk(NFS reply setattr: %d\n, status);
return status;
 }
@@ -370,6 +372,8 @@ again:
 * not sure this buys us anything (and I'd have
 * to revamp the NFSv3 XDR code) */
status = nfs3_proc_setattr(dentry, fattr, sattr);
+   if (status == 0)
+   nfs_setattr_update_inode(dentry-d_inode, sattr);
nfs_refresh_inode(dentry-d_inode, fattr);
dprintk(NFS reply setattr (post-create): %d\n, status);
}
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -753,6 +753,7 @@ static int _nfs4_do_setattr(struct nfs_s
 .rpc_argp   = arg,
 .rpc_resp   = res,
 };
+   int status;
 
 fattr-valid = 0;
 
@@ -762,7 +763,8 @@ static int _nfs4_do_setattr(struct nfs_s
} else
memcpy(arg.stateid, zero_stateid, sizeof(arg.stateid));
 
-   return rpc_call_sync(server-client, msg, 0);
+   status = rpc_call_sync(server-client, msg, 0);
+   return 

[PATCH] i386 / desc_empty macro is incorrect

2005-08-16 Thread Linux Kernel Mailing List
tree d202ce6d6529fe23e950e24cd04b4d562f28705e
parent 5153f7e6dba37390902c8fd3edc9a8cc19358ece
author Zachary Amsden [EMAIL PROTECTED] Wed, 17 Aug 2005 02:05:09 -0700
committer Linus Torvalds [EMAIL PROTECTED] Wed, 17 Aug 2005 02:18:01 -0700

[PATCH] i386 / desc_empty macro is incorrect

Chuck Ebbert noticed that the desc_empty macro is incorrect.  Fix it.

Thankfully, this is not used as a security check, but it can falsely
overwrite TLS segments with carefully chosen base / limits.  I do not
believe this is an issue in practice, but it is a kernel bug.

Signed-off-by: Zachary Amsden [EMAIL PROTECTED]
Signed-off-by: Chris Wright [EMAIL PROTECTED]

[ x86-64 had the same problem, and the same fix. Linus ]

Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 include/asm-i386/processor.h   |2 +-
 include/asm-x86_64/processor.h |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h
--- a/include/asm-i386/processor.h
+++ b/include/asm-i386/processor.h
@@ -29,7 +29,7 @@ struct desc_struct {
 };
 
 #define desc_empty(desc) \
-   (!((desc)-a + (desc)-b))
+   (!((desc)-a | (desc)-b))
 
 #define desc_equal(desc1, desc2) \
(((desc1)-a == (desc2)-a)  ((desc1)-b == (desc2)-b))
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h
--- a/include/asm-x86_64/processor.h
+++ b/include/asm-x86_64/processor.h
@@ -32,7 +32,7 @@
 #define ID_MASK0x0020
 
 #define desc_empty(desc) \
-   (!((desc)-a + (desc)-b))
+   (!((desc)-a | (desc)-b))
 
 #define desc_equal(desc1, desc2) \
(((desc1)-a == (desc2)-a)  ((desc1)-b == (desc2)-b))
-
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] PCI Hotplug: new contact info

2005-08-16 Thread Linux Kernel Mailing List
tree 1ed9def7b77b9354032fd734a3dde43bea8b8e2d
parent 4b47b0eefc37fe3bf6bffb4507c8b6df5b14348d
author Kristen Accardi [EMAIL PROTECTED] Wed, 17 Aug 2005 05:16:10 -0700
committer Linus Torvalds [EMAIL PROTECTED] Wed, 17 Aug 2005 11:06:24 -0700

[PATCH] PCI Hotplug: new contact info

Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 MAINTAINERS|   12 
 drivers/pci/hotplug/pciehp.h   |2 +-
 drivers/pci/hotplug/pciehp_core.c  |2 +-
 drivers/pci/hotplug/pciehp_ctrl.c  |2 +-
 drivers/pci/hotplug/pciehp_hpc.c   |2 +-
 drivers/pci/hotplug/pciehp_pci.c   |2 +-
 drivers/pci/hotplug/pciehprm.h |2 +-
 drivers/pci/hotplug/pciehprm_acpi.c|2 +-
 drivers/pci/hotplug/pciehprm_nonacpi.c |2 +-
 drivers/pci/hotplug/pciehprm_nonacpi.h |2 +-
 drivers/pci/hotplug/shpchp.h   |2 +-
 drivers/pci/hotplug/shpchp_core.c  |2 +-
 drivers/pci/hotplug/shpchp_ctrl.c  |2 +-
 drivers/pci/hotplug/shpchp_hpc.c   |2 +-
 drivers/pci/hotplug/shpchp_pci.c   |2 +-
 drivers/pci/hotplug/shpchprm.h |2 +-
 drivers/pci/hotplug/shpchprm_acpi.c|2 +-
 drivers/pci/hotplug/shpchprm_legacy.c  |2 +-
 drivers/pci/hotplug/shpchprm_legacy.h  |2 +-
 drivers/pci/hotplug/shpchprm_nonacpi.c |2 +-
 drivers/pci/hotplug/shpchprm_nonacpi.h |2 +-
 21 files changed, 32 insertions(+), 20 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1825,6 +1825,12 @@ P:   Greg Kroah-Hartman
 M: [EMAIL PROTECTED]
 S: Maintained
 
+PCIE HOTPLUG DRIVER
+P: Kristen Carlson Accardi
+M: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
+S: Maintained
+
 PCMCIA SUBSYSTEM
 P: Linux PCMCIA Team
 L: http://lists.infradead.org/mailman/listinfo/linux-pcmcia
@@ -2201,6 +2207,12 @@ W:   http://projects.buici.com/arm
 L: [EMAIL PROTECTED]   (subscribers-only)
 S: Maintained
 
+SHPC HOTPLUG DRIVER
+P: Kristen Carlson Accardi
+M: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
+S: Maintained
+
 SPARC (sparc32):
 P: William L. Irwin
 M: [EMAIL PROTECTED]
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 #ifndef _PCIEHP_H
diff --git a/drivers/pci/hotplug/pciehp_core.c 
b/drivers/pci/hotplug/pciehp_core.c
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c 
b/drivers/pci/hotplug/pciehp_ctrl.c
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED],[EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED],[EMAIL PROTECTED]
  *
  */
 
diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c
--- a/drivers/pci/hotplug/pciehp_pci.c
+++ b/drivers/pci/hotplug/pciehp_pci.c
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff --git a/drivers/pci/hotplug/pciehprm.h b/drivers/pci/hotplug/pciehprm.h
--- a/drivers/pci/hotplug/pciehprm.h
+++ b/drivers/pci/hotplug/pciehprm.h
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
+ * Send feedback to [EMAIL PROTECTED], [EMAIL PROTECTED]
  *
  */
 
diff --git a/drivers/pci/hotplug/pciehprm_acpi.c 
b/drivers/pci/hotplug/pciehprm_acpi.c
--- 

[PATCH] PCI: update documentation

2005-08-16 Thread Linux Kernel Mailing List
tree ad2a10d8651ea18b0b54a8fa4657e70621a7418e
parent 8cf4c19523b7694c88bba716d88fb659fa702411
author Jiri Slaby [EMAIL PROTECTED] Wed, 17 Aug 2005 05:16:26 -0700
committer Linus Torvalds [EMAIL PROTECTED] Wed, 17 Aug 2005 11:06:25 -0700

[PATCH] PCI: update documentation

This removes very old functions from pci docs, which are no longer in
the kernel.

Signed-off-by: Jiri Slaby [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 Documentation/pci.txt |   14 --
 1 files changed, 14 deletions(-)

diff --git a/Documentation/pci.txt b/Documentation/pci.txt
--- a/Documentation/pci.txt
+++ b/Documentation/pci.txt
@@ -266,20 +266,6 @@ port an old driver to the new PCI interf
 in the kernel as they aren't compatible with hotplug or PCI domains or
 having sane locking.
 
-pcibios_present() and  Since ages, you don't need to test presence
-pci_present()  of PCI subsystem when trying to talk to it.
-   If it's not there, the list of PCI devices
-   is empty and all functions for searching for
-   devices just return NULL.
-pcibios_(read|write)_* Superseded by their pci_(read|write)_*
-   counterparts.
-pcibios_find_* Superseded by their pci_get_* counterparts.
-pci_for_each_dev() Superseded by pci_get_device()
-pci_for_each_dev_reverse() Superseded by pci_find_device_reverse()
-pci_for_each_bus() Superseded by pci_find_next_bus()
 pci_find_device()  Superseded by pci_get_device()
 pci_find_subsys()  Superseded by pci_get_subsys()
 pci_find_slot()Superseded by pci_get_slot()
-pcibios_find_class()   Superseded by pci_get_class()
-pci_find_class()   Superseded by pci_get_class()
-pci_(read|write)_*_nodev() Superseded by pci_bus_(read|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


[PATCH] uml: fix the x86_64 build

2005-08-18 Thread Linux Kernel Mailing List
tree bc48f8c3596d8d7e8ca04102c23bd01096669a7e
parent 024f474795af7a0d41bd6d60061d78bd66d13f56
author Al Viro [EMAIL PROTECTED] Fri, 19 Aug 2005 01:24:23 -0700
committer Linus Torvalds [EMAIL PROTECTED] Fri, 19 Aug 2005 02:53:58 -0700

[PATCH] uml: fix the x86_64 build

asm/elf.h breaks the x86_64 build.

Signed-off-by: Jeff Dike [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/um/os-Linux/elf_aux.c |1 -
 1 files changed, 1 deletion(-)

diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c
--- a/arch/um/os-Linux/elf_aux.c
+++ b/arch/um/os-Linux/elf_aux.c
@@ -9,7 +9,6 @@
  */
 #include elf.h
 #include stddef.h
-#include asm/elf.h
 #include init.h
 #include elf_user.h
 #include mem_user.h
-
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] ppc32: fix ppc4xx stb03xxx dma build

2005-08-18 Thread Linux Kernel Mailing List
tree d53e8817bbf738754a63b918517d7d5bea271635
parent 2eaa297ca234eb518673b28dd6f3715d4b292e09
author Matt Porter [EMAIL PROTECTED] Fri, 19 Aug 2005 01:24:25 -0700
committer Linus Torvalds [EMAIL PROTECTED] Fri, 19 Aug 2005 02:53:58 -0700

[PATCH] ppc32: fix ppc4xx stb03xxx dma build

Fixes build on 4xx stb03xxx when general purpose dma engine support is
enabled.

Signed-off-by: Matt Porter [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/ppc/syslib/ppc4xx_dma.c |   10 +++---
 include/asm-ppc/ppc4xx_dma.h |2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/ppc/syslib/ppc4xx_dma.c b/arch/ppc/syslib/ppc4xx_dma.c
--- a/arch/ppc/syslib/ppc4xx_dma.c
+++ b/arch/ppc/syslib/ppc4xx_dma.c
@@ -620,6 +620,7 @@ ppc4xx_clr_dma_status(unsigned int dmanr
return DMA_STATUS_GOOD;
 }
 
+#ifdef CONFIG_PPC4xx_EDMA
 /*
  * Enables the burst on the channel (BTEN bit in the control/count register)
  * Note:
@@ -685,6 +686,11 @@ ppc4xx_set_burst_size(unsigned int dmanr
return DMA_STATUS_GOOD;
 }
 
+EXPORT_SYMBOL(ppc4xx_enable_burst);
+EXPORT_SYMBOL(ppc4xx_disable_burst);
+EXPORT_SYMBOL(ppc4xx_set_burst_size);
+#endif /* CONFIG_PPC4xx_EDMA */
+
 EXPORT_SYMBOL(ppc4xx_init_dma_channel);
 EXPORT_SYMBOL(ppc4xx_get_channel_config);
 EXPORT_SYMBOL(ppc4xx_set_channel_priority);
@@ -703,6 +709,4 @@ EXPORT_SYMBOL(ppc4xx_enable_dma_interrup
 EXPORT_SYMBOL(ppc4xx_disable_dma_interrupt);
 EXPORT_SYMBOL(ppc4xx_get_dma_status);
 EXPORT_SYMBOL(ppc4xx_clr_dma_status);
-EXPORT_SYMBOL(ppc4xx_enable_burst);
-EXPORT_SYMBOL(ppc4xx_disable_burst);
-EXPORT_SYMBOL(ppc4xx_set_burst_size);
+
diff --git a/include/asm-ppc/ppc4xx_dma.h b/include/asm-ppc/ppc4xx_dma.h
--- a/include/asm-ppc/ppc4xx_dma.h
+++ b/include/asm-ppc/ppc4xx_dma.h
@@ -285,7 +285,7 @@ typedef uint32_t sgl_handle_t;
 
 #define GET_DMA_POLARITY(chan) (DMAReq_ActiveLow(chan) | 
DMAAck_ActiveLow(chan) | EOT_ActiveLow(chan))
 
-#elif defined(CONFIG_STBXXX_DMA)   /* stb03xxx */
+#elif defined(CONFIG_STB03xxx) /* stb03xxx */
 
 #define DMA_PPC4xx_SIZE4096
 
-
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] ppc32: Fix PPC440SP SRAM controller DCRs

2005-08-18 Thread Linux Kernel Mailing List
tree b61bf02bb31ad01a0fe734dc697dd0c9583e0441
parent 28cd1d17801774561c81a5be53bfb2d632aee2a2
author Matt Porter [EMAIL PROTECTED] Fri, 19 Aug 2005 01:24:26 -0700
committer Linus Torvalds [EMAIL PROTECTED] Fri, 19 Aug 2005 02:53:58 -0700

[PATCH] ppc32: Fix PPC440SP SRAM controller DCRs

Fixes the incorrect DCR base value for the 440SP SRAM controller.

Signed-off-by: Matt Porter [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 include/asm-ppc/ibm44x.h |4 
 1 files changed, 4 deletions(-)

diff --git a/include/asm-ppc/ibm44x.h b/include/asm-ppc/ibm44x.h
--- a/include/asm-ppc/ibm44x.h
+++ b/include/asm-ppc/ibm44x.h
@@ -423,11 +423,7 @@
 #define MQ0_CONFIG_SIZE_2G 0xc000
 
 /* Internal SRAM Controller 440GX/440SP */
-#ifdef CONFIG_440SP
-#define DCRN_SRAM0_BASE0x100
-#else /* 440GX */
 #define DCRN_SRAM0_BASE0x000
-#endif
 
 #define DCRN_SRAM0_SB0CR   (DCRN_SRAM0_BASE + 0x020)
 #define DCRN_SRAM0_SB1CR   (DCRN_SRAM0_BASE + 0x021)
-
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] ide-floppy: fix IDEFLOPPY_TICKS_DELAY

2005-08-18 Thread Linux Kernel Mailing List
tree 58fc485a9ca8d3a89221dd40ee2ae1c110b46598
parent 30d5b64b63fa69af31b2cba32e6d71d68526eec9
author Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] Thu, 18 Aug 2005 22:09:21 
+0200
committer Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] Thu, 18 Aug 2005 
22:09:21 +0200

[PATCH] ide-floppy: fix IDEFLOPPY_TICKS_DELAY

* IDEFLOPPY_TICKS_DELAY assumed HZ == 100, fix it
* increase the delay to 50ms (to match comment in the code)

Thanks to Manfred Scherer [EMAIL PROTECTED]
for reporting the problem and testing the patch.

Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
 drivers/ide/ide-floppy.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -317,7 +317,7 @@ typedef struct ide_floppy_obj {
unsigned long flags;
 } idefloppy_floppy_t;
 
-#define IDEFLOPPY_TICKS_DELAY  3   /* default delay for ZIP 100 */
+#define IDEFLOPPY_TICKS_DELAY  HZ/20   /* default delay for ZIP 100 (50ms) */
 
 /*
  * Floppy flag bits values.
-
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] DM9000 - incorrect ioctl() handling

2005-08-18 Thread Linux Kernel Mailing List
tree db587b806019155a84b7e1411f398863c5fdf81f
parent 9ef9ac51cc5fa5f5811230b5fb242536b636ff47
author Ben Dooks [EMAIL PROTECTED] Sat, 23 Jul 2005 17:29:38 +0100
committer Jeff Garzik [EMAIL PROTECTED] Fri, 19 Aug 2005 00:59:14 -0400

[PATCH] DM9000 - incorrect ioctl() handling

The DM9000 driver is responding to ioctl() calls it should not be. This
can cause problems with the wireless tools incorrectly indentifying the
device as wireless capable, and crashing under certain operations.

This patch also moves the version printk() to the init call, so that
you only get it once for multiple devices, and to show it is loaded
if there are no defined dm9000s

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

 drivers/net/dm9000.c |   15 ++-
 1 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -152,7 +152,6 @@ static int dm9000_probe(struct device *)
 static int dm9000_open(struct net_device *);
 static int dm9000_start_xmit(struct sk_buff *, struct net_device *);
 static int dm9000_stop(struct net_device *);
-static int dm9000_do_ioctl(struct net_device *, struct ifreq *, int);
 
 
 static void dm9000_timer(unsigned long);
@@ -391,8 +390,6 @@ dm9000_probe(struct device *dev)
int i;
u32 id_val;
 
-   printk(KERN_INFO %s Ethernet Driver\n, CARDNAME);
-
/* Init network device */
ndev = alloc_etherdev(sizeof (struct board_info));
if (!ndev) {
@@ -547,7 +544,6 @@ dm9000_probe(struct device *dev)
ndev-stop   = dm9000_stop;
ndev-get_stats  = dm9000_get_stats;
ndev-set_multicast_list = dm9000_hash_table;
-   ndev-do_ioctl   = dm9000_do_ioctl;
 
 #ifdef DM9000_PROGRAM_EEPROM
program_eeprom(db);
@@ -851,15 +847,6 @@ dm9000_get_stats(struct net_device *dev)
return db-stats;
 }
 
-/*
- *  Process the upper socket ioctl command
- */
-static int
-dm9000_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-{
-   PRINTK1(entering %s\n,__FUNCTION__);
-   return 0;
-}
 
 /*
  *  A periodic timer routine
@@ -1213,6 +1200,8 @@ static struct device_driver dm9000_drive
 static int __init
 dm9000_init(void)
 {
+   printk(KERN_INFO %s Ethernet Driver\n, CARDNAME);
+
return driver_register(dm9000_driver); /* search board and register */
 }
 
-
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]: Fix comment in loopback driver.

2005-08-18 Thread Linux Kernel Mailing List
tree 19065dd333e9e4dd456f08cb8426544b24ba479e
parent 001dd250c1c68667a5c3b74979fa614e2edc9ceb
author Ralf Baechle [EMAIL PROTECTED] Fri, 19 Aug 2005 04:05:18 -0700
committer David S. Miller [EMAIL PROTECTED] Fri, 19 Aug 2005 04:05:18 -0700

[NET]: Fix comment in loopback driver.

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 drivers/net/loopback.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -214,7 +214,7 @@ struct net_device loopback_dev = {
.ethtool_ops= loopback_ethtool_ops,
 };
 
-/* Setup and register the of the LOOPBACK device. */
+/* Setup and register the loopback device. */
 int __init loopback_init(void)
 {
struct net_device_stats *stats;
-
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] jffs2: fix symlink error handling

2005-08-19 Thread Linux Kernel Mailing List
tree d84587462e0378c5aa9c5581d6920d76242b8c65
parent 91aa9fb573fcc50bc74d5ee64c7e9b36131f1804
author Al Viro [EMAIL PROTECTED] Fri, 19 Aug 2005 22:42:16 +0100
committer Linus Torvalds [EMAIL PROTECTED] Sat, 20 Aug 2005 07:57:19 -0700

[PATCH] jffs2: fix symlink error handling

The current calling conventions for -follow_link() are already fairly
complex.

What we have is
1) you can return -error; then you must release nameidata yourself
   and -put_link() will _not_ be called.
2) you can do nd_set_link(nd, ERR_PTR(-error)) and return 0
3) you can do nd_set_link(nd, path) and return 0
4) you can return 0 (after having moved nameidata yourself)

jffs2 follow_link() is broken - it has an exit where it returns
-EIO and leaks nameidata.

Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 fs/jffs2/symlink.c |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/jffs2/symlink.c b/fs/jffs2/symlink.c
--- a/fs/jffs2/symlink.c
+++ b/fs/jffs2/symlink.c
@@ -30,6 +30,7 @@ struct inode_operations jffs2_symlink_in
 static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
struct jffs2_inode_info *f = JFFS2_INODE_INFO(dentry-d_inode);
+   char *p = (char *)f-dents;

/*
 * We don't acquire the f-sem mutex here since the only data we
@@ -45,13 +46,14 @@ static int jffs2_follow_link(struct dent
 * nd_set_link() call.
 */

-   if (!f-dents) {
+   if (!p) {
printk(KERN_ERR jffs2_follow_link(): can't find symlink 
taerget\n);
-   return -EIO;
+   p = ERR_PTR(-EIO);
+   } else {
+   D1(printk(KERN_DEBUG jffs2_follow_link(): target path is 
'%s'\n, (char *) f-dents));
}
-   D1(printk(KERN_DEBUG jffs2_follow_link(): target path is '%s'\n, 
(char *) f-dents));
 
-   nd_set_link(nd, (char *)f-dents);
+   nd_set_link(nd, p);

/*
 * We unlock the f-sem mutex but VFS will use the f-dents string. 
This is safe
-
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


[TG3]: Update driver version and reldate.

2005-08-19 Thread Linux Kernel Mailing List
tree eec3baca8d1c1f026474906a3db3fac311753b4a
parent da6b2d01d6bd2e79fd4f7a08acd37dc4e8fcdce8
author David S. Miller [EMAIL PROTECTED] Sat, 20 Aug 2005 02:57:31 -0700
committer David S. Miller [EMAIL PROTECTED] Sat, 20 Aug 2005 02:57:31 -0700

[TG3]: Update driver version and reldate.

Signed-off-by: David S. Miller [EMAIL PROTECTED]

 drivers/net/tg3.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -66,8 +66,8 @@
 
 #define DRV_MODULE_NAMEtg3
 #define PFX DRV_MODULE_NAME: 
-#define DRV_MODULE_VERSION 3.35
-#define DRV_MODULE_RELDATE August 6, 2005
+#define DRV_MODULE_VERSION 3.36
+#define DRV_MODULE_RELDATE August 19, 2005
 
 #define TG3_DEF_MAC_MODE   0
 #define TG3_DEF_RX_MODE0
-
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


befs: fix up missed follow_link declaration change

2005-08-20 Thread Linux Kernel Mailing List
tree d5bf83467cd473ab271a052f65e1095eb2bfbb87
parent 1eecd73cce4e11ba9d67ad767f92069cfba7b589
author Linus Torvalds [EMAIL PROTECTED] Sun, 21 Aug 2005 03:20:01 -0700
committer Linus Torvalds [EMAIL PROTECTED] Sun, 21 Aug 2005 03:20:01 -0700

befs: fix up missed follow_link declaration change

We'd updated the prototype and the return value, but not the function
declaration itself.

 fs/befs/linuxvfs.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -461,7 +461,7 @@ befs_destroy_inodecache(void)
  * The data stream become link name. Unless the LONG_SYMLINK
  * flag is set.
  */
-static int
+static void *
 befs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
befs_inode_info *befs_ino = BEFS_I(dentry-d_inode);
-
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


[NETFILTER]: Fix HW checksum handling in TCPMSS target

2005-08-20 Thread Linux Kernel Mailing List
tree a7724eb37fff88f707ebd3e59cc86b8e2b582f4e
parent f93592ff4fa4a55aa7640d435fa93338e190294d
author Patrick McHardy [EMAIL PROTECTED] Sun, 21 Aug 2005 07:40:41 -0700
committer David S. Miller [EMAIL PROTECTED] Sun, 21 Aug 2005 07:40:41 -0700

[NETFILTER]: Fix HW checksum handling in TCPMSS target

Most importantly, remove bogus BUG() in receive path.

Signed-off-by: Patrick McHardy [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 net/ipv4/netfilter/ipt_TCPMSS.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/ipv4/netfilter/ipt_TCPMSS.c b/net/ipv4/netfilter/ipt_TCPMSS.c
--- a/net/ipv4/netfilter/ipt_TCPMSS.c
+++ b/net/ipv4/netfilter/ipt_TCPMSS.c
@@ -61,6 +61,10 @@ ipt_tcpmss_target(struct sk_buff **pskb,
if (!skb_ip_make_writable(pskb, (*pskb)-len))
return NF_DROP;
 
+   if ((*pskb)-ip_summed == CHECKSUM_HW 
+   skb_checksum_help(*pskb, out == NULL))
+   return NF_DROP;
+
iph = (*pskb)-nh.iph;
tcplen = (*pskb)-len - iph-ihl*4;
 
@@ -186,9 +190,6 @@ ipt_tcpmss_target(struct sk_buff **pskb,
   newmss);
 
  retmodified:
-   /* We never hw checksum SYN packets.  */
-   BUG_ON((*pskb)-ip_summed == CHECKSUM_HW);
-
(*pskb)-nfcache |= NFC_UNKNOWN | NFC_ALTERED;
return IPT_CONTINUE;
 }
-
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


[TCP]: Unconditionally clear TCP_NAGLE_PUSH in skb_entail().

2005-08-23 Thread Linux Kernel Mailing List
tree d017e5c04afcd33d99a2bf8554332c5754df8c36
parent 0fbbeb1ba43bd04f0f1d4f161b7f72437a1c8a03
author David S. Miller [EMAIL PROTECTED] Wed, 24 Aug 2005 00:13:06 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 24 Aug 2005 00:13:06 -0700

[TCP]: Unconditionally clear TCP_NAGLE_PUSH in skb_entail().

Intention of this bit is to force pushing of the existing
send queue when TCP_CORK or TCP_NODELAY state changes via
setsockopt().

But it's easy to create a situation where the bit never
clears.  For example, if the send queue starts empty:

1) set TCP_NODELAY
2) clear TCP_NODELAY
3) set TCP_CORK
4) do small write()

The current code will leave TCP_NAGLE_PUSH set after that
sequence.  Unconditionally clearing the bit when new data
is added via skb_entail() solves the problem.

Signed-off-by: David S. Miller [EMAIL PROTECTED]

 net/ipv4/tcp.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -584,7 +584,7 @@ static inline void skb_entail(struct soc
sk_charge_skb(sk, skb);
if (!sk-sk_send_head)
sk-sk_send_head = skb;
-   else if (tp-nonagleTCP_NAGLE_PUSH)
+   if (tp-nonagle  TCP_NAGLE_PUSH)
tp-nonagle = ~TCP_NAGLE_PUSH; 
 }
 
-
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]: Fix socket bitop damage

2005-08-23 Thread Linux Kernel Mailing List
tree 117e7f530fa2aa37751cfd22908cd81253fd08f8
parent 66a79a19a7c582efd99bb143c3a59fbda006eb39
author Ralf Baechle [EMAIL PROTECTED] Wed, 24 Aug 2005 00:11:30 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 24 Aug 2005 00:11:30 -0700

[NET]: Fix socket bitop damage

The socket flag cleanups that went into 2.6.12-rc1 are basically oring
the flags of an old socket into the socket just being created.
Unfortunately that one was just initialized by sock_init_data(), so already
has SOCK_ZAPPED set.  As the result zapped sockets are created and all
incoming connection will fail due to this bug which again was carefully
replicated to at least AX.25, NET/ROM or ROSE.

In order to keep the abstraction alive I've introduced sock_copy_flags()
to copy the socket flags from one sockets to another and used that
instead of the bitwise copy thing.  Anyway, the idea here has probably
been to copy all flags, so sock_copy_flags() should be the right thing.
With this the ham radio protocols are usable again, so I hope this will
make it into 2.6.13.

Signed-off-by: Ralf Baechle DL5RB [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 include/net/sock.h |5 +
 net/ax25/af_ax25.c |7 +--
 net/netrom/af_netrom.c |7 +--
 net/rose/af_rose.c |7 +--
 4 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/include/net/sock.h b/include/net/sock.h
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -384,6 +384,11 @@ enum sock_flags {
SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */
 };
 
+static inline void sock_copy_flags(struct sock *nsk, struct sock *osk)
+{
+   nsk-sk_flags = osk-sk_flags;
+}
+
 static inline void sock_set_flag(struct sock *sk, enum sock_flags flag)
 {
__set_bit(flag, sk-sk_flags);
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -875,12 +875,7 @@ struct sock *ax25_make_new(struct sock *
sk-sk_sndbuf   = osk-sk_sndbuf;
sk-sk_state= TCP_ESTABLISHED;
sk-sk_sleep= osk-sk_sleep;
-
-   if (sock_flag(osk, SOCK_DBG))
-   sock_set_flag(sk, SOCK_DBG);
-
-   if (sock_flag(osk, SOCK_ZAPPED))
-   sock_set_flag(sk, SOCK_ZAPPED);
+   sock_copy_flags(sk, osk);
 
oax25 = ax25_sk(osk);
 
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -459,12 +459,7 @@ static struct sock *nr_make_new(struct s
sk-sk_sndbuf   = osk-sk_sndbuf;
sk-sk_state= TCP_ESTABLISHED;
sk-sk_sleep= osk-sk_sleep;
-
-   if (sock_flag(osk, SOCK_ZAPPED))
-   sock_set_flag(sk, SOCK_ZAPPED);
-
-   if (sock_flag(osk, SOCK_DBG))
-   sock_set_flag(sk, SOCK_DBG);
+   sock_copy_flags(sk, osk);
 
skb_queue_head_init(nr-ack_queue);
skb_queue_head_init(nr-reseq_queue);
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -556,12 +556,7 @@ static struct sock *rose_make_new(struct
sk-sk_sndbuf   = osk-sk_sndbuf;
sk-sk_state= TCP_ESTABLISHED;
sk-sk_sleep= osk-sk_sleep;
-
-   if (sock_flag(osk, SOCK_ZAPPED))
-   sock_set_flag(sk, SOCK_ZAPPED);
-
-   if (sock_flag(osk, SOCK_DBG))
-   sock_set_flag(sk, SOCK_DBG);
+   sock_copy_flags(sk, osk);
 
init_timer(rose-timer);
init_timer(rose-idletimer);
-
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


[NETFILTER]: Fix HW checksum handling in ip_queue/ip6_queue

2005-08-23 Thread Linux Kernel Mailing List
tree 615163e271e256063ede49f73ae01e8abb39ed72
parent 1344a41637114485fac7afa1505bce2ff862807a
author Patrick McHardy [EMAIL PROTECTED] Wed, 24 Aug 2005 00:10:35 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 24 Aug 2005 00:10:35 -0700

[NETFILTER]: Fix HW checksum handling in ip_queue/ip6_queue

The checksum needs to be filled in on output, after mangling a packet
ip_summed needs to be reset.

Signed-off-by: Patrick McHardy [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 net/ipv4/netfilter/ip_queue.c  |7 +++
 net/ipv6/netfilter/ip6_queue.c |7 +++
 2 files changed, 14 insertions(+)

diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -214,6 +214,12 @@ ipq_build_packet_message(struct ipq_queu
break;

case IPQ_COPY_PACKET:
+   if (entry-skb-ip_summed == CHECKSUM_HW 
+   (*errp = skb_checksum_help(entry-skb,
+  entry-info-outdev == NULL))) {
+   read_unlock_bh(queue_lock);
+   return NULL;
+   }
if (copy_range == 0 || copy_range  entry-skb-len)
data_len = entry-skb-len;
else
@@ -385,6 +391,7 @@ ipq_mangle_ipv4(ipq_verdict_msg_t *v, st
if (!skb_ip_make_writable(e-skb, v-data_len))
return -ENOMEM;
memcpy(e-skb-data, v-payload, v-data_len);
+   e-skb-ip_summed = CHECKSUM_NONE;
e-skb-nfcache |= NFC_ALTERED;
 
/*
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -211,6 +211,12 @@ ipq_build_packet_message(struct ipq_queu
break;

case IPQ_COPY_PACKET:
+   if (entry-skb-ip_summed == CHECKSUM_HW 
+   (*errp = skb_checksum_help(entry-skb,
+  entry-info-outdev == NULL))) {
+   read_unlock_bh(queue_lock);
+   return NULL;
+   }
if (copy_range == 0 || copy_range  entry-skb-len)
data_len = entry-skb-len;
else
@@ -381,6 +387,7 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, st
if (!skb_ip_make_writable(e-skb, v-data_len))
return -ENOMEM;
memcpy(e-skb-data, v-payload, v-data_len);
+   e-skb-ip_summed = CHECKSUM_NONE;
e-skb-nfcache |= NFC_ALTERED;
 
/*
-
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


[RPC]: Kill bogus kmap in krb5

2005-08-23 Thread Linux Kernel Mailing List
tree 61c7cde232f4d241489fba3bd5386ceaefd223ac
parent 14869c388673e8db3348ab3706fa6485d0f0cf95
author Herbert Xu [EMAIL PROTECTED] Wed, 24 Aug 2005 00:09:53 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 24 Aug 2005 00:09:53 -0700

[RPC]: Kill bogus kmap in krb5

While I was going through the crypto users recently, I noticed this
bogus kmap in sunrpc.  It's totally unnecessary since the crypto
layer will do its own kmap before touching the data.  Besides, the
kmap is throwing the return value away.

Signed-off-by: Herbert Xu [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 net/sunrpc/auth_gss/gss_krb5_crypto.c |2 --
 1 files changed, 2 deletions(-)

diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c 
b/net/sunrpc/auth_gss/gss_krb5_crypto.c
--- a/net/sunrpc/auth_gss/gss_krb5_crypto.c
+++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c
@@ -185,9 +185,7 @@ make_checksum(s32 cksumtype, char *heade
sg-page = body-pages[i];
sg-offset = offset;
sg-length = thislen;
-   kmap(sg-page); /* XXX kmap_atomic? */
crypto_digest_update(tfm, sg, 1);
-   kunmap(sg-page);
len -= thislen;
i++;
offset = 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


[TCP]: Do TSO deferral even if tail SKB can go out now.

2005-08-23 Thread Linux Kernel Mailing List
tree fa5de8895166ae31371264544027941d469044f9
parent f6fdd7d9c273bb2a20ab467cb57067494f932fa3
author Dmitry Yusupov [EMAIL PROTECTED] Wed, 24 Aug 2005 00:09:27 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 24 Aug 2005 00:09:27 -0700

[TCP]: Do TSO deferral even if tail SKB can go out now.

If the tail SKB fits into the window, it is still
benefitical to defer until the goal percentage of
the window is available.  This give the application
time to feed more data into the send queue and thus
results in larger TSO frames going out.

Patch from Dmitry Yusupov [EMAIL PROTECTED].

Signed-off-by: David S. Miller [EMAIL PROTECTED]

 net/ipv4/tcp_output.c |4 
 1 files changed, 4 deletions(-)

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -925,10 +925,6 @@ static int tcp_tso_should_defer(struct s
 
limit = min(send_win, cong_win);
 
-   /* If sk_send_head can be sent fully now, just do it.  */
-   if (skb-len = limit)
-   return 0;
-
if (sysctl_tcp_tso_win_divisor) {
u32 chunk = min(tp-snd_wnd, tp-snd_cwnd * tp-mss_cache);
 
-
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


[IA64] remove unused function __ia64_get_io_port_base

2005-08-23 Thread Linux Kernel Mailing List
tree d5a2b5ef9687fd67b9897825e8011f458cb29515
parent 4aec0fb12267718c750475f3404337ad13caa8f5
author Tony Luck [EMAIL PROTECTED] Fri, 19 Aug 2005 04:40:00 -0700
committer Tony Luck [EMAIL PROTECTED] Fri, 19 Aug 2005 04:40:00 -0700

[IA64] remove unused function __ia64_get_io_port_base

Not only was this unused, but its somewhat eccentric declaration
of static inline const unsigned long gives gcc4 heartburn.

Signed-off-by: Tony Luck [EMAIL PROTECTED]

 include/asm-ia64/io.h |8 
 1 files changed, 8 deletions(-)

diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h
--- a/include/asm-ia64/io.h
+++ b/include/asm-ia64/io.h
@@ -120,14 +120,6 @@ static inline void ___ia64_mmiowb(void)
ia64_mfa();
 }
 
-static inline const unsigned long
-__ia64_get_io_port_base (void)
-{
-   extern unsigned long ia64_iobase;
-
-   return ia64_iobase;
-}
-
 static inline void*
 __ia64_mk_io_addr (unsigned long port)
 {
-
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


[IPV4]: Fix negative timer loop with lots of ipv4 peers.

2005-08-23 Thread Linux Kernel Mailing List
tree cf8f84bee2b6e23a17e97beef53791a698256f77
parent c3a20692ca5c8eb8cf5d0f489d4fc839ce7593d1
author Dave Johnson [EMAIL PROTECTED] Wed, 24 Aug 2005 00:10:15 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 24 Aug 2005 00:10:15 -0700

[IPV4]: Fix negative timer loop with lots of ipv4 peers.

From: Dave Johnson [EMAIL PROTECTED]

Found this bug while doing some scaling testing that created 500K inet
peers.

peer_check_expire() in net/ipv4/inetpeer.c isn't using inet_peer_gc_mintime
correctly and will end up creating an expire timer with less than the
minimum duration, and even zero/negative if enough active peers are
present.

If 65K peers, the timer will be less than inet_peer_gc_mintime, and with
70K peers, the timer duration will reach zero and go negative.

The timer handler will continue to schedule another zero/negative timer in
a loop until peers can be aged.  This can continue for at least a few
minutes or even longer if the peers remain active due to arriving packets
while the loop is occurring.

Bug is present in both 2.4 and 2.6.  Same patch will apply to both just
fine.

Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 net/ipv4/inetpeer.c |   11 +++
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -450,10 +450,13 @@ static void peer_check_expire(unsigned l
/* Trigger the timer after inet_peer_gc_mintime .. inet_peer_gc_maxtime
 * interval depending on the total number of entries (more entries,
 * less interval). */
-   peer_periodic_timer.expires = jiffies
-   + inet_peer_gc_maxtime
-   - (inet_peer_gc_maxtime - inet_peer_gc_mintime) / HZ *
-   peer_total / inet_peer_threshold * HZ;
+   if (peer_total = inet_peer_threshold)
+   peer_periodic_timer.expires = jiffies + inet_peer_gc_mintime;
+   else
+   peer_periodic_timer.expires = jiffies
+   + inet_peer_gc_maxtime
+   - (inet_peer_gc_maxtime - inet_peer_gc_mintime) / HZ *
+   peer_total / inet_peer_threshold * HZ;
add_timer(peer_periodic_timer);
 }
 
-
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


[AX25]: UID fixes

2005-08-23 Thread Linux Kernel Mailing List
tree ee4f22a33557bae4883eb2f4fb1359e97ac74186
parent 53b924b31fa53ac3007df3fef6870d5074a9adf8
author Ralf Baechle [EMAIL PROTECTED] Wed, 24 Aug 2005 00:11:45 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 24 Aug 2005 00:11:45 -0700

[AX25]: UID fixes

 o Brown paperbag bug - ax25_findbyuid() was always returning a NULL pointer
   as the result.  Breaks ROSE completly and AX.25 if UID policy set to deny.

 o While the list structure of AX.25's UID to callsign mapping table was
   properly protected by a spinlock, it's elements were not refcounted
   resulting in a race between removal and usage of an element.

Signed-off-by: Ralf Baechle DL5RB [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 include/net/ax25.h |   18 +-
 net/ax25/af_ax25.c |   20 +++
 net/ax25/ax25_route.c  |   12 ---
 net/ax25/ax25_uid.c|   83 +
 net/netrom/af_netrom.c |   24 +-
 net/rose/af_rose.c |   20 +++
 6 files changed, 100 insertions(+), 77 deletions(-)

diff --git a/include/net/ax25.h b/include/net/ax25.h
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -139,11 +139,25 @@ enum {
 #define AX25_DEF_DS_TIMEOUT(3 * 60 * HZ)   /* DAMA timeout 3 
minutes */
 
 typedef struct ax25_uid_assoc {
-   struct ax25_uid_assoc   *next;
+   struct hlist_node   uid_node;
+   atomic_trefcount;
uid_t   uid;
ax25_addresscall;
 } ax25_uid_assoc;
 
+#define ax25_uid_for_each(__ax25, node, list) \
+   hlist_for_each_entry(__ax25, node, list, uid_node)
+
+#define ax25_uid_hold(ax25) \
+   atomic_inc(((ax25)-refcount))
+
+static inline void ax25_uid_put(ax25_uid_assoc *assoc)
+{
+   if (atomic_dec_and_test(assoc-refcount)) {
+   kfree(assoc);
+   }
+}
+
 typedef struct {
ax25_addresscalls[AX25_MAX_DIGIS];
unsigned char   repeated[AX25_MAX_DIGIS];
@@ -376,7 +390,7 @@ extern unsigned long ax25_display_timer(
 
 /* ax25_uid.c */
 extern int  ax25_uid_policy;
-extern ax25_address *ax25_findbyuid(uid_t);
+extern ax25_uid_assoc *ax25_findbyuid(uid_t);
 extern int  ax25_uid_ioctl(int, struct sockaddr_ax25 *);
 extern struct file_operations ax25_uid_fops;
 extern void ax25_uid_free(void);
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -1002,7 +1002,8 @@ static int ax25_bind(struct socket *sock
struct sock *sk = sock-sk;
struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr;
ax25_dev *ax25_dev = NULL;
-   ax25_address *call;
+   ax25_uid_assoc *user;
+   ax25_address call;
ax25_cb *ax25;
int err = 0;
 
@@ -1021,9 +1022,15 @@ static int ax25_bind(struct socket *sock
if (addr-fsa_ax25.sax25_family != AF_AX25)
return -EINVAL;
 
-   call = ax25_findbyuid(current-euid);
-   if (call == NULL  ax25_uid_policy  !capable(CAP_NET_ADMIN)) {
-   return -EACCES;
+   user = ax25_findbyuid(current-euid);
+   if (user) {
+   call = user-call;
+   ax25_uid_put(user);
+   } else {
+   if (ax25_uid_policy  !capable(CAP_NET_ADMIN))
+   return -EACCES;
+
+   call = addr-fsa_ax25.sax25_call;
}
 
lock_sock(sk);
@@ -1034,10 +1041,7 @@ static int ax25_bind(struct socket *sock
goto out;
}
 
-   if (call == NULL)
-   ax25-source_addr = addr-fsa_ax25.sax25_call;
-   else
-   ax25-source_addr = *call;
+   ax25-source_addr = call;
 
/*
 * User already set interface with SO_BINDTODEVICE
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c
--- a/net/ax25/ax25_route.c
+++ b/net/ax25/ax25_route.c
@@ -422,8 +422,8 @@ static inline void ax25_adjust_path(ax25
  */
 int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr)
 {
+   ax25_uid_assoc *user;
ax25_route *ax25_rt;
-   ax25_address *call;
int err;
 
if ((ax25_rt = ax25_get_route(addr, NULL)) == NULL)
@@ -434,16 +434,18 @@ int ax25_rt_autobind(ax25_cb *ax25, ax25
goto put;
}
 
-   if ((call = ax25_findbyuid(current-euid)) == NULL) {
+   user = ax25_findbyuid(current-euid);
+   if (user) {
+   ax25-source_addr = user-call;
+   ax25_uid_put(user);
+   } else {
if (ax25_uid_policy  !capable(CAP_NET_BIND_SERVICE)) {
err = -EPERM;
goto put;
}
-   call = (ax25_address *)ax25-ax25_dev-dev-dev_addr;
+   ax25-source_addr = *(ax25_address 
*)ax25-ax25_dev-dev-dev_addr;
}
 
-   ax25-source_addr = *call;
-
if (ax25_rt-digipeat != NULL) {
if ((ax25-digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) 
== 

[PKT_SCHED]: Fix missing qdisc_destroy() in qdisc_create_dflt()

2005-08-23 Thread Linux Kernel Mailing List
tree 80aff375f2b1de10a69743d73977df39f356dda5
parent d2287f844187158e5eddd0d5de8e95bd607abcb7
author Thomas Graf [EMAIL PROTECTED] Wed, 24 Aug 2005 00:12:44 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 24 Aug 2005 00:12:44 -0700

[PKT_SCHED]: Fix missing qdisc_destroy() in qdisc_create_dflt()

qdisc_create_dflt() is missing to destroy the newly allocated
default qdisc if the initialization fails resulting in leaks
of all kinds. The only caller in mainline which may trigger
this bug is sch_tbf.c in tbf_create_dflt_qdisc().

Note: qdisc_create_dflt() doesn't fulfill the official locking
  requirements of qdisc_destroy() but since the qdisc could
  never be seen by the outside world this doesn't matter
  and it can stay as-is until the locking of pkt_sched
  is cleaned up.

Signed-off-by: Thomas Graf [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 net/sched/sch_generic.c |1 +
 1 files changed, 1 insertion(+)

diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -438,6 +438,7 @@ struct Qdisc * qdisc_create_dflt(struct 
if (!ops-init || ops-init(sch, NULL) == 0)
return sch;
 
+   qdisc_destroy(sch);
 errout:
return 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


[IA64] Fix simulator boot (for real this time).

2005-08-23 Thread Linux Kernel Mailing List
tree 868c53b157ceacf5be84004f9ecc464b794256c2
parent 62d75f3753647656323b0365faa43fc1a8f7be97
author Peter Chubb [EMAIL PROTECTED] Tue, 23 Aug 2005 07:50:00 -0700
committer Tony Luck [EMAIL PROTECTED] Tue, 23 Aug 2005 21:41:56 -0700

[IA64] Fix simulator boot (for real this time).

Thanks to Stephane, we've now worked out the real cause of the
`Linux  will not boot on simulator' problem.  Turns out it's a stack
overflow because the stack pointer wasn't being initialised properly
in boot_head.S (it was being initialised to the lowest instead of the
highest address of the stack, so the first push started to overwrite
data in the BSS).

Signed-off-by: Peter Chubb [EMAIL PROTECTED]
Signed-off-by: Tony Luck [EMAIL PROTECTED]

 arch/ia64/hp/sim/boot/boot_head.S |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/ia64/hp/sim/boot/boot_head.S 
b/arch/ia64/hp/sim/boot/boot_head.S
--- a/arch/ia64/hp/sim/boot/boot_head.S
+++ b/arch/ia64/hp/sim/boot/boot_head.S
@@ -22,7 +22,7 @@ GLOBAL_ENTRY(_start)
.save rp, r0
.body
movl gp = __gp
-   movl sp = stack_mem
+   movl sp = stack_mem+16384-16
bsw.1
br.call.sptk.many rp=start_bootloader
 END(_start)
-
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


[ROSE]: Fix missing unlocks in rose_route_frame()

2005-08-23 Thread Linux Kernel Mailing List
tree 0f1dcf6e5f9f57989d0aca1a565fa56701ed7556
parent d5d283751ef3c05b6766501a46800cbee84959d6
author David S. Miller [EMAIL PROTECTED] Wed, 24 Aug 2005 00:50:09 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 24 Aug 2005 00:50:09 -0700

[ROSE]: Fix missing unlocks in rose_route_frame()

Noticed by Coverity checker.

Signed-off-by: David S. Miller [EMAIL PROTECTED]

 net/rose/rose_route.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -994,8 +994,10 @@ int rose_route_frame(struct sk_buff *skb
 *  1. The frame isn't for us,
 *  2. It isn't owned by any existing route.
 */
-   if (frametype != ROSE_CALL_REQUEST) /* XXX */
-   return 0;
+   if (frametype != ROSE_CALL_REQUEST) {   /* XXX */
+   ret = 0;
+   goto out;
+   }
 
len  = (((skb-data[3]  4)  0x0F) + 1) / 2;
len += (((skb-data[3]  0)  0x0F) + 1) / 2;
-
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] Kconfig fix (alpha NUMA)

2005-08-23 Thread Linux Kernel Mailing List
tree 2309d142ab9b80c64172d3cad43bb2420086d9d2
parent 81065e2f415af6c028eac13f481fb9e60a0b487b
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:44:50 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:39 -0700

[PATCH] Kconfig fix (alpha NUMA)

NUMA is broken on alpha; marked as such

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/alpha/Kconfig |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -522,7 +522,7 @@ source mm/Kconfig
 
 config NUMA
bool NUMA Support (EXPERIMENTAL)
-   depends on DISCONTIGMEM
+   depends on DISCONTIGMEM  BROKEN
help
  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
  Access).  This option is for configuring high-end multiprocessor
-
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] Kconfig fix (ISA_DMA_API and sound/*)

2005-08-23 Thread Linux Kernel Mailing List
tree 5fb22ae8b2ef903d27850f7894ed669fabce96ad
parent e9bcb173dd1747075214a1ccdb65dc6320cae49d
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:45:06 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:40 -0700

[PATCH] Kconfig fix (ISA_DMA_API and sound/*)

fixed kconfig dependencies on ISA_DMA_API for parts of sound/* that rely
on it.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 include/sound/core.h |2 ++
 sound/Kconfig|2 +-
 sound/core/Makefile  |2 +-
 sound/core/sound.c   |2 +-
 sound/isa/Kconfig|2 +-
 sound/oss/Kconfig|6 +++---
 sound/pci/Kconfig|2 +-
 7 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/include/sound/core.h b/include/sound/core.h
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -360,11 +360,13 @@ int snd_device_free_all(snd_card_t *card
 
 /* isadma.c */
 
+#ifdef CONFIG_ISA_DMA_API
 #define DMA_MODE_NO_ENABLE 0x0100
 
 void snd_dma_program(unsigned long dma, unsigned long addr, unsigned int size, 
unsigned short mode);
 void snd_dma_disable(unsigned long dma);
 unsigned int snd_dma_pointer(unsigned long dma, unsigned int size);
+#endif
 
 /* misc.c */
 
diff --git a/sound/Kconfig b/sound/Kconfig
--- a/sound/Kconfig
+++ b/sound/Kconfig
@@ -77,7 +77,7 @@ source sound/parisc/Kconfig
 endmenu
 
 menu Open Sound System
-   depends on SOUND!=n  (BROKEN || (!SPARC32  !SPARC64))
+   depends on SOUND!=n
 
 config SOUND_PRIME
tristate Open Sound System (DEPRECATED)
diff --git a/sound/core/Makefile b/sound/core/Makefile
--- a/sound/core/Makefile
+++ b/sound/core/Makefile
@@ -5,7 +5,7 @@
 
 snd-objs := sound.o init.o memory.o info.o control.o misc.o \
 device.o wrappers.o
-ifeq ($(CONFIG_ISA),y)
+ifeq ($(CONFIG_ISA_DMA_API),y)
 snd-objs += isadma.o
 endif
 ifeq ($(CONFIG_SND_OSSEMUL),y)
diff --git a/sound/core/sound.c b/sound/core/sound.c
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -432,7 +432,7 @@ EXPORT_SYMBOL(snd_device_new);
 EXPORT_SYMBOL(snd_device_register);
 EXPORT_SYMBOL(snd_device_free);
   /* isadma.c */
-#ifdef CONFIG_ISA
+#ifdef CONFIG_ISA_DMA_API
 EXPORT_SYMBOL(snd_dma_program);
 EXPORT_SYMBOL(snd_dma_disable);
 EXPORT_SYMBOL(snd_dma_pointer);
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
--- a/sound/isa/Kconfig
+++ b/sound/isa/Kconfig
@@ -1,7 +1,7 @@
 # ALSA ISA drivers
 
 menu ISA devices
-   depends on SND!=n  ISA
+   depends on SND!=n  ISA  ISA_DMA_API
 
 config SND_AD1848_LIB
 tristate
diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig
--- a/sound/oss/Kconfig
+++ b/sound/oss/Kconfig
@@ -80,7 +80,7 @@ config SOUND_EMU10K1
 
 config MIDI_EMU10K1
bool Creative SBLive! MIDI (EXPERIMENTAL)
-   depends on SOUND_EMU10K1  EXPERIMENTAL
+   depends on SOUND_EMU10K1  EXPERIMENTAL  ISA_DMA_API
help
  Say Y if you want to be able to use the OSS /dev/sequencer
  interface.  This code is still experimental.
@@ -503,7 +503,7 @@ config SOUND_VIA82CXXX
 
 config MIDI_VIA82CXXX
bool VIA 82C686 MIDI
-   depends on SOUND_VIA82CXXX
+   depends on SOUND_VIA82CXXX  ISA_DMA_API
help
  Answer Y to use the MIDI interface of the Via686. You may need to
  enable this in the BIOS before it will work. This is for connection
@@ -512,7 +512,7 @@ config MIDI_VIA82CXXX
 
 config SOUND_OSS
tristate OSS sound modules
-   depends on SOUND_PRIME
+   depends on SOUND_PRIME  ISA_DMA_API
help
  OSS is the Open Sound System suite of sound card drivers.  They make
  sound programming easier since they provide a common API.  Say Y or
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
--- a/sound/pci/Kconfig
+++ b/sound/pci/Kconfig
@@ -314,7 +314,7 @@ config SND_YMFPCI
 
 config SND_ALS4000
tristate Avance Logic ALS4000
-   depends on SND
+   depends on SND  ISA_DMA_API
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_PCM
-
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] Kconfig fix (epca on 64bit)

2005-08-23 Thread Linux Kernel Mailing List
tree f6ca23abfd0777f7e3c571efbd58b67af3eaf1e8
parent ac6babd26ce514e0017ec5809051ea6cdc44c8f6
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:45:01 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:39 -0700

[PATCH] Kconfig fix (epca on 64bit)

epca is broken on 64bit; marked as such

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/char/Kconfig |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -138,7 +138,7 @@ config CYZ_INTR
 
 config DIGIEPCA
tristate Digiboard Intelligent Async Support
-   depends on SERIAL_NONSTANDARD  BROKEN_ON_SMP
+   depends on SERIAL_NONSTANDARD  BROKEN_ON_SMP  (!64BIT || BROKEN)
---help---
  This is a driver for Digi International's Xx, Xeve, and Xem series
  of cards which provide multiple serial ports. You would need
-
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


libata: release prep (bump versions, etc.)

2005-08-23 Thread Linux Kernel Mailing List
tree c1960e7a0fa37330b6e8ad9ba228ea31a97d22c7
parent f6fdd7d9c273bb2a20ab467cb57067494f932fa3
author Jeff Garzik [EMAIL PROTECTED] Tue, 23 Aug 2005 10:53:51 -0400
committer Jeff Garzik [EMAIL PROTECTED] Tue, 23 Aug 2005 10:53:51 -0400

libata: release prep (bump versions, etc.)

- bump versions where necessary
- remove two duplicated+outdated doc comments
- add MODULE_VERSION() to AHCI driver

 drivers/scsi/ahci.c |1 +
 drivers/scsi/ata_piix.c |2 +-
 drivers/scsi/libata-core.c  |   25 -
 drivers/scsi/libata.h   |2 +-
 drivers/scsi/sata_promise.c |2 +-
 5 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -1105,6 +1105,7 @@ MODULE_AUTHOR(Jeff Garzik);
 MODULE_DESCRIPTION(AHCI SATA low-level driver);
 MODULE_LICENSE(GPL);
 MODULE_DEVICE_TABLE(pci, ahci_pci_tbl);
+MODULE_VERSION(DRV_VERSION);
 
 module_init(ahci_init);
 module_exit(ahci_exit);
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -32,7 +32,7 @@
 #include linux/libata.h
 
 #define DRV_NAME   ata_piix
-#define DRV_VERSION1.03
+#define DRV_VERSION1.04
 
 enum {
PIIX_IOCFG  = 0x54, /* IDE I/O configuration register */
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2268,19 +2268,6 @@ void ata_qc_prep(struct ata_queued_cmd *
  * spin_lock_irqsave(host_set lock)
  */
 
-
-
-/**
- * ata_sg_init_one - Prepare a one-entry scatter-gather list.
- * @qc:  Queued command
- * @buf:  transfer buffer
- * @buflen:  length of buf
- *
- * Builds a single-entry scatter-gather list to initiate a
- * transfer utilizing the specified buffer.
- *
- * LOCKING:
- */
 void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen)
 {
struct scatterlist *sg;
@@ -2312,18 +2299,6 @@ void ata_sg_init_one(struct ata_queued_c
  * spin_lock_irqsave(host_set lock)
  */
 
-
-/**
- * ata_sg_init - Assign a scatter gather list to a queued command
- * @qc:  Queued command
- * @sg:  Scatter-gather list
- * @n_elem:  length of sg list
- *
- * Attaches a scatter-gather list to a queued command.
- *
- * LOCKING:
- */
-
 void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
 unsigned int n_elem)
 {
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -26,7 +26,7 @@
 #define __LIBATA_H__
 
 #define DRV_NAME   libata
-#define DRV_VERSION1.11  /* must be exactly four chars */
+#define DRV_VERSION1.12  /* must be exactly four chars */
 
 struct ata_scsi_args {
u16 *id;
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
--- a/drivers/scsi/sata_promise.c
+++ b/drivers/scsi/sata_promise.c
@@ -40,7 +40,7 @@
 #include sata_promise.h
 
 #define DRV_NAME   sata_promise
-#define DRV_VERSION1.01
+#define DRV_VERSION1.02
 
 
 enum {
-
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] Kconfig fix (arv)

2005-08-23 Thread Linux Kernel Mailing List
tree f5fdcf5dd425fc6df501971ac2575360d7c37c05
parent a2b2f45be7e9138bde7fcba3b8e9257fea04d087
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:45:46 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:41 -0700

[PATCH] Kconfig fix (arv)

arv uses constants provided only by include/asm-m32r/m32700ut/m32700ut_lan.h
It won't build for any subarchitecture other than M32700UT; marked as such.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/media/video/Kconfig |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -356,7 +356,7 @@ config VIDEO_M32R_AR
 
 config VIDEO_M32R_AR_M64278
tristate Use Colour AR module M64278(VGA)
-   depends on VIDEO_M32R_AR
+   depends on VIDEO_M32R_AR  PLAT_M32700UT
---help---
  Say Y here to use the Renesas M64278E-800 camera module,
  which supports VGA(640x480 pixcels) size of images.
-
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] Kconfig fix (airo_cs on m32r)

2005-08-23 Thread Linux Kernel Mailing List
tree 2fd70a093445ca3a0806141ca6d8fa4f926b1861
parent a4d544fdd30111a1183ab92ea25febb8b6460214
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:45:56 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:41 -0700

[PATCH] Kconfig fix (airo_cs on m32r)

airo_cs is broken on m32r; marked as such. [Proper fix would involve
separating PCI-dependent parts and making sure they don't get in the
way _and_ arranging for asm/scatterlist.h getting picked on m32r]

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/net/wireless/Kconfig |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -270,7 +270,7 @@ config PCMCIA_HERMES
 
 config AIRO_CS
tristate Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards
-   depends on NET_RADIO  PCMCIA
+   depends on NET_RADIO  PCMCIA  (BROKEN || !M32R)
---help---
  This is the standard Linux driver to support Cisco/Aironet PCMCIA
  802.11 wireless cards.  This driver is the same as the Aironet
-
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] Kconfig fix (M32R_PLDSIO dependecies)

2005-08-23 Thread Linux Kernel Mailing List
tree a0b910b7e369ec580065a74c45ddcdc0fc8c5904
parent 14d891d20374c139acfaa379e61a7091b00df8fa
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:46:06 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:42 -0700

[PATCH] Kconfig fix (M32R_PLDSIO dependecies)

M32R_PLDSIO depends on subarchitecture providing PLD_ESIO0CR and
friends.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/serial/Kconfig |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -819,7 +819,7 @@ config SERIAL_M32R_SIO_CONSOLE
 
 config SERIAL_M32R_PLDSIO
bool M32R SIO I/F on a PLD
-   depends on SERIAL_M32R_SIO=y
+   depends on SERIAL_M32R_SIO=y  (PLAT_OPSPUT || PALT_USRV || 
PLAT_M32700UT)
default n
help
  Say Y here if you want to use the M32R serial controller
-
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] Kconfig fix (ppc32 SMP dependencies)

2005-08-23 Thread Linux Kernel Mailing List
tree b7d5afe6cf1ada72f18c0207e830d8387274d6f3
parent 51583cf108b27baf81c6db3ec718f932314986ea
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:46:26 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:42 -0700

[PATCH] Kconfig fix (ppc32 SMP dependencies)

ppc SMP is supported only for 6xx/POWER3/POWER4 - i.e. ones that have
PPC_STD_MMU.  Dependency fixed.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Acked-by: Paul Mackerras [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/ppc/Kconfig |1 +
 1 files changed, 1 insertion(+)

diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -911,6 +911,7 @@ config PPCBUG_NVRAM
default y if PPC_PREP
 
 config SMP
+   depends on PPC_STD_MMU
bool Symmetric multi-processing support
---help---
  This enables support for systems with more than one CPU. If you have
-
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] Kconfig fix (ppc 4xx and early serial)

2005-08-23 Thread Linux Kernel Mailing List
tree 909650e573cccf7d497953cbdf97a76b9423bcf1
parent c4457fb9010765620faebccf4daf83b288295154
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:46:36 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:43 -0700

[PATCH] Kconfig fix (ppc 4xx and early serial)

a bunch of ppc 4xx variants unconditionally calls early_serial_setup() and
therefore needs SERIAL_8250

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/ppc/platforms/4xx/Kconfig |   10 ++
 1 files changed, 10 insertions(+)

diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig
--- a/arch/ppc/platforms/4xx/Kconfig
+++ b/arch/ppc/platforms/4xx/Kconfig
@@ -3,6 +3,11 @@ config 4xx
depends on 40x || 44x
default y
 
+config WANT_EARLY_SERIAL
+   bool
+   select SERIAL_8250
+   default n
+
 menu IBM 4xx options
depends on 4xx
 
@@ -18,6 +23,7 @@ config ASH
 
 config BUBINGA
bool Bubinga
+   select WANT_EARLY_SERIAL
help
  This option enables support for the IBM 405EP evaluation board.
 
@@ -70,21 +76,25 @@ choice
 
 config BAMBOO
bool Bamboo
+   select WANT_EARLY_SERIAL
help
  This option enables support for the IBM PPC440EP evaluation board.
 
 config EBONY
bool Ebony
+   select WANT_EARLY_SERIAL
help
  This option enables support for the IBM PPC440GP evaluation board.
 
 config LUAN
bool Luan
+   select WANT_EARLY_SERIAL
help
  This option enables support for the IBM PPC440SP evaluation board.
 
 config OCOTEA
bool Ocotea
+   select WANT_EARLY_SERIAL
help
  This option enables support for the IBM PPC440GX evaluation board.
 
-
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] Kconfig fix (CONFIG_PM on 44x)

2005-08-23 Thread Linux Kernel Mailing List
tree 8940b518f5bc72bd05722873829884e1ab8f9dc8
parent f08243a491f3e21feabbb04476a03fb0cbc975ff
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:46:41 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:43 -0700

[PATCH] Kconfig fix (CONFIG_PM on 44x)

CONFIG_PM is broken on 44x; removed duplicate entry for CONFIG_PM, made
the inclusion of generic one conditional on BROKEN || !44x.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/ppc/Kconfig   |2 ++
 arch/ppc/platforms/4xx/Kconfig |4 
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -1122,7 +1122,9 @@ config PROC_HARDWARE
 
 source drivers/zorro/Kconfig
 
+if !44x || BROKEN
 source kernel/power/Kconfig
+endif
 
 config SECCOMP
bool Enable seccomp to safely compute untrusted bytecode
diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig
--- a/arch/ppc/platforms/4xx/Kconfig
+++ b/arch/ppc/platforms/4xx/Kconfig
@@ -240,10 +240,6 @@ config PPC_GEN550
depends on 4xx
default y
 
-config PM
-   bool Power Management support (EXPERIMENTAL)
-   depends on 4xx  EXPERIMENTAL
-
 choice
prompt TTYS0 device and default console
depends on 40x
-
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] Kconfig fix (emac dependencient)

2005-08-23 Thread Linux Kernel Mailing List
tree 55f4012ba6a1216c5eed29f59b25c321731a46f9
parent 6299afc40c8612a87358ecea80882395fe67111f
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:46:46 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:43 -0700

[PATCH] Kconfig fix (emac dependencient)

emac doesn't build modular; ibm_emac_debug doesn't build at all (missing
headers).

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/net/Kconfig |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1145,7 +1145,7 @@ config IBMVETH
  be called ibmveth.
 
 config IBM_EMAC
-   tristate IBM PPC4xx EMAC driver support
+   bool IBM PPC4xx EMAC driver support
depends on 4xx
select CRC32
---help---
@@ -1154,7 +1154,7 @@ config IBM_EMAC
 
 config IBM_EMAC_ERRMSG
bool Verbose error messages
-   depends on IBM_EMAC
+   depends on IBM_EMAC  BROKEN
 
 config IBM_EMAC_RXB
int Number of receive buffers
-
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] Kconfig fix (sparc32 drivers/char dependencies)

2005-08-23 Thread Linux Kernel Mailing List
tree 893f6c381087588c69bd0694c69fe66d33898538
parent 997183dc2a8992374d93e66f5ea0d58fa1022a47
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:46:51 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:43 -0700

[PATCH] Kconfig fix (sparc32 drivers/char dependencies)

since sparc32 Kconfig includes drivers/char/Kconfig (instead of duplicating
its parts) we need several new dependencies there to exclude the stuff
broken on sparc32 and not excluded by existing dependencies.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/char/Kconfig |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -80,7 +80,7 @@ config SERIAL_NONSTANDARD
 
 config COMPUTONE
tristate Computone IntelliPort Plus serial support
-   depends on SERIAL_NONSTANDARD  BROKEN_ON_SMP
+   depends on SERIAL_NONSTANDARD  BROKEN_ON_SMP  (BROKEN || !SPARC32)
---help---
  This driver supports the entire family of Intelliport II/Plus
  controllers with the exception of the MicroChannel controllers and
@@ -208,7 +208,7 @@ config SYNCLINK
 
 config SYNCLINKMP
tristate SyncLink Multiport support
-   depends on SERIAL_NONSTANDARD
+   depends on SERIAL_NONSTANDARD  (BROKEN || !SPARC32)
help
  Enable support for the SyncLink Multiport (2 or 4 ports)
  serial adapter, running asynchronous and HDLC communications up
@@ -735,7 +735,7 @@ config SGI_IP27_RTC
 
 config GEN_RTC
tristate Generic /dev/rtc emulation
-   depends on RTC!=y  !IA64  !ARM  !PPC64  !M32R
+   depends on RTC!=y  !IA64  !ARM  !PPC64  !M32R  !SPARC32
---help---
  If you say Y here and create a character special file /dev/rtc with
  major number 10 and minor number 135 using mknod (man mknod), you
-
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] alpha gcc4 warnings

2005-08-23 Thread Linux Kernel Mailing List
tree f1dfed1a990b8dec1269b88350b6c837973ccadc
parent a238b563502a7f458624b9c6404742e441b2f9e8
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:46:56 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:43 -0700

[PATCH] alpha gcc4 warnings

on UP smp_call_function() is expanded to expression.  Alpha oprofile
calls that puppy and ignores the return value.  And has -Werror for
arch/*...

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/alpha/oprofile/common.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/alpha/oprofile/common.c b/arch/alpha/oprofile/common.c
--- a/arch/alpha/oprofile/common.c
+++ b/arch/alpha/oprofile/common.c
@@ -65,7 +65,7 @@ op_axp_setup(void)
model-reg_setup(reg, ctr, sys);
 
/* Configure the registers on all cpus.  */
-   smp_call_function(model-cpu_setup, reg, 0, 1);
+   (void)smp_call_function(model-cpu_setup, reg, 0, 1);
model-cpu_setup(reg);
return 0;
 }
@@ -86,7 +86,7 @@ op_axp_cpu_start(void *dummy)
 static int
 op_axp_start(void)
 {
-   smp_call_function(op_axp_cpu_start, NULL, 0, 1);
+   (void)smp_call_function(op_axp_cpu_start, NULL, 0, 1);
op_axp_cpu_start(NULL);
return 0;
 }
@@ -101,7 +101,7 @@ op_axp_cpu_stop(void *dummy)
 static void
 op_axp_stop(void)
 {
-   smp_call_function(op_axp_cpu_stop, NULL, 0, 1);
+   (void)smp_call_function(op_axp_cpu_stop, NULL, 0, 1);
op_axp_cpu_stop(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


[PATCH] missing include in pcmcia_resource.c

2005-08-23 Thread Linux Kernel Mailing List
tree 1bd14fc69b8c7b9afd04d7c2acb92809dd2abeb5
parent 18415e923e90b986db316abd078f6d863cee7b18
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:47:01 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:43 -0700

[PATCH] missing include in pcmcia_resource.c

missing include of asm/irq.h

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/pcmcia/pcmcia_resource.c |1 +
 1 files changed, 1 insertion(+)

diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -41,6 +41,7 @@ module_param(io_speed, int, 0444);
 
 
 #ifdef CONFIG_PCMCIA_PROBE
+#include asm/irq.h
 /* mask of IRQs already reserved by other cards, we should avoid using them */
 static u8 pcmcia_used_irq[NR_IRQS];
 #endif
-
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] alpha xchg fix

2005-08-23 Thread Linux Kernel Mailing List
tree bcc10e8f4f576d525b4f2a617010f49077d03e6f
parent 531e5ca62bd9aabef6bd8340d8ae93bac1b5caa2
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:47:07 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:44 -0700

[PATCH] alpha xchg fix

alpha xchg has to be a macro - alpha disables always_inline and if that
puppy does not get inlined, we immediately blow up on undefined reference.
Happens even on gcc3; with gcc4 that happens a _lot_.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 include/asm-alpha/system.h |   29 +
 1 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h
--- a/include/asm-alpha/system.h
+++ b/include/asm-alpha/system.h
@@ -443,22 +443,19 @@ __xchg_u64(volatile long *m, unsigned lo
if something tries to do an invalid xchg().  */
 extern void __xchg_called_with_bad_pointer(void);
 
-static inline unsigned long
-__xchg(volatile void *ptr, unsigned long x, int size)
-{
-   switch (size) {
-   case 1:
-   return __xchg_u8(ptr, x);
-   case 2:
-   return __xchg_u16(ptr, x);
-   case 4:
-   return __xchg_u32(ptr, x);
-   case 8:
-   return __xchg_u64(ptr, x);
-   }
-   __xchg_called_with_bad_pointer();
-   return x;
-}
+#define __xchg(ptr, x, size) \
+({ \
+   unsigned long __xchg__res; \
+   volatile void *__xchg__ptr = (ptr); \
+   switch (size) { \
+   case 1: __xchg__res = __xchg_u8(__xchg__ptr, x); break; \
+   case 2: __xchg__res = __xchg_u16(__xchg__ptr, x); break; \
+   case 4: __xchg__res = __xchg_u32(__xchg__ptr, x); break; \
+   case 8: __xchg__res = __xchg_u64(__xchg__ptr, x); break; \
+   default: __xchg_called_with_bad_pointer(); __xchg__res = x; \
+   } \
+   __xchg__res; \
+})
 
 #define xchg(ptr,x) \
   ({\
-
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] alpha spinlock code and bogus constraints

2005-08-23 Thread Linux Kernel Mailing List
tree 1089c4acaa09ace254aecd72b118891f8f23aa07
parent 79fb7bdce363685b336e3f0fb8207312fd1f02fc
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:47:12 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:44 -0700

[PATCH] alpha spinlock code and bogus constraints

=m (lock-lock) / 1 (lock-lock) makes gcc4 unhappy; fixed by s/1/m/,
same as in case of i386 rwsem.h where such variant had been accepted
by both Linus and rth.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/alpha/kernel/smp.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -1036,7 +1036,7 @@ debug_spin_lock(spinlock_t * lock, const
   br  1b\n
.previous
: =r (tmp), =m (lock-lock), =r (stuck)
-   : 1 (lock-lock), 2 (stuck) : memory);
+   : m (lock-lock), 2 (stuck) : memory);
 
if (stuck  0) {
printk(KERN_WARNING
@@ -1115,7 +1115,7 @@ void _raw_write_lock(rwlock_t * lock)
.previous
: =m (*(volatile int *)lock), =r (regx), =r (regy),
  =r (stuck_lock), =r (stuck_reader)
-   : 0 (*(volatile int *)lock), 3 (stuck_lock), 4 (stuck_reader) : 
memory);
+   : m (*(volatile int *)lock), 3 (stuck_lock), 4 (stuck_reader) : 
memory);
 
if (stuck_lock  0) {
printk(KERN_WARNING write_lock stuck at %p\n, inline_pc);
@@ -1153,7 +1153,7 @@ void _raw_read_lock(rwlock_t * lock)
   br  1b\n
.previous
: =m (*(volatile int *)lock), =r (regx), =r (stuck_lock)
-   : 0 (*(volatile int *)lock), 2 (stuck_lock) : memory);
+   : m (*(volatile int *)lock), 2 (stuck_lock) : memory);
 
if (stuck_lock  0) {
printk(KERN_WARNING read_lock stuck at %p\n, inline_pc);
-
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] m32r_sio gcc4 fixes

2005-08-23 Thread Linux Kernel Mailing List
tree d2a88ac07bb1d834c33943242f8b57ffdf1cd429
parent c51d9943b11441fd1ea42c7e70cfb5eed33fe97b
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:47:27 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:44 -0700

[PATCH] m32r_sio gcc4 fixes

extern declaration followed by static in drivers/serial/m32r_sio.c

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/serial/m32r_sio.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c
--- a/drivers/serial/m32r_sio.c
+++ b/drivers/serial/m32r_sio.c
@@ -1123,7 +1123,7 @@ static int __init m32r_sio_console_setup
return uart_set_options(port, co, baud, parity, bits, flow);
 }
 
-extern struct uart_driver m32r_sio_reg;
+static struct uart_driver m32r_sio_reg;
 static struct console m32r_sio_console = {
.name   = ttyS,
.write  = m32r_sio_console_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


[PATCH] broken inline asm on s390 (misuse of labels)

2005-08-23 Thread Linux Kernel Mailing List
tree 4b7ccdab07948b5a80f28d73cc9ecb04f67c754c
parent a828b8e4e699b5e3ce0dcbb708ecb099b86f3126
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:47:32 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:44 -0700

[PATCH] broken inline asm on s390 (misuse of labels)

use of explicit labels in inline asm is a Bad Idea(tm), since gcc can
decide to inline the function in several places.  Fixed by use of 1f/f:
instead of .Lfitsin/.Lfitsin:

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/s390/kernel/cpcmd.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/s390/kernel/cpcmd.c b/arch/s390/kernel/cpcmd.c
--- a/arch/s390/kernel/cpcmd.c
+++ b/arch/s390/kernel/cpcmd.c
@@ -46,9 +46,9 @@ int  __cpcmd(const char *cmd, char *resp
lra3,0(%4)\n
lr 5,%5\n
diag   2,4,0x8\n
-   brc8, .Litfits\n
+   brc8, 1f\n
ar 5, %5\n
-   .Litfits: \n
+   1: \n
lr %0,4\n
lr %1,5\n
: =d (return_code), =d (return_len)
@@ -64,9 +64,9 @@ int  __cpcmd(const char *cmd, char *resp
sam31\n
diag   2,4,0x8\n
sam64\n
-   brc8, .Litfits\n
+   brc8, 1f\n
agr5, %5\n
-   .Litfits: \n
+   1: \n
lgr%0,4\n
lgr%1,5\n
: =d (return_code), =d (return_len)
-
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] m32r icu_data gcc4 fixes

2005-08-23 Thread Linux Kernel Mailing List
tree 18f2694b421cba1e0160db3781346d577a1e9b5a
parent e231a9c4fdf402bcfd5a7c27be49050882631a95
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:47:22 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:44 -0700

[PATCH] m32r icu_data gcc4 fixes

either icu_data declaration for SMP case should be taken out of m32102.h,
or its declarations for m32700ut and opsput should not be static for SMP.
Patch does the latter - judging by comments in m32102.h it is intended to
be non-static.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/m32r/kernel/setup_m32700ut.c |4 +++-
 arch/m32r/kernel/setup_opsput.c   |4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/m32r/kernel/setup_m32700ut.c 
b/arch/m32r/kernel/setup_m32700ut.c
--- a/arch/m32r/kernel/setup_m32700ut.c
+++ b/arch/m32r/kernel/setup_m32700ut.c
@@ -30,9 +30,11 @@
 typedef struct {
unsigned long icucr;  /* ICU Control Register */
 } icu_data_t;
+static icu_data_t icu_data[M32700UT_NUM_CPU_IRQ];
+#else
+icu_data_t icu_data[M32700UT_NUM_CPU_IRQ];
 #endif /* CONFIG_SMP */
 
-static icu_data_t icu_data[M32700UT_NUM_CPU_IRQ];
 
 static void disable_m32700ut_irq(unsigned int irq)
 {
diff --git a/arch/m32r/kernel/setup_opsput.c b/arch/m32r/kernel/setup_opsput.c
--- a/arch/m32r/kernel/setup_opsput.c
+++ b/arch/m32r/kernel/setup_opsput.c
@@ -31,9 +31,11 @@
 typedef struct {
unsigned long icucr;  /* ICU Control Register */
 } icu_data_t;
+static icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ];
+#else
+icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ];
 #endif /* CONFIG_SMP */
 
-static icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ];
 
 static void disable_opsput_irq(unsigned int irq)
 {
-
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] Kconfig fix (missing dependencies on PCI in sound/*)

2005-08-23 Thread Linux Kernel Mailing List
tree c238d57648a893504b0dc20fca42f986d71ed50e
parent eaaece266a78b8f56ade48fe23147b8b933364de
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:48:02 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:46 -0700

[PATCH] Kconfig fix (missing dependencies on PCI in sound/*)

a bunch of PCI-only drivers didn't have the right dependency

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 sound/oss/Kconfig |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig
--- a/sound/oss/Kconfig
+++ b/sound/oss/Kconfig
@@ -6,7 +6,7 @@
 # Prompt user for primary drivers.
 config SOUND_BT878
tristate BT878 audio dma
-   depends on SOUND_PRIME
+   depends on SOUND_PRIME  PCI
---help---
  Audio DMA support for bt878 based grabber boards.  As you might have
  already noticed, bt878 is listed with two functions in /proc/pci.
@@ -87,7 +87,7 @@ config MIDI_EMU10K1
 
 config SOUND_FUSION
tristate Crystal SoundFusion (CS4280/461x)
-   depends on SOUND_PRIME
+   depends on SOUND_PRIME  PCI
help
  This module drives the Crystal SoundFusion devices (CS4280/46xx
  series) when wired as native sound drivers with AC97 codecs.  If
@@ -95,7 +95,7 @@ config SOUND_FUSION
 
 config SOUND_CS4281
tristate Crystal Sound CS4281
-   depends on SOUND_PRIME
+   depends on SOUND_PRIME  PCI
help
  Picture and feature list at
  http://www.pcbroker.com/crystal4281.html.
@@ -179,7 +179,7 @@ config SOUND_HARMONY
 
 config SOUND_SONICVIBES
tristate S3 SonicVibes
-   depends on SOUND_PRIME
+   depends on SOUND_PRIME  PCI
help
  Say Y or M if you have a PCI sound card utilizing the S3
  SonicVibes chipset. To find out if your sound card uses a
@@ -226,7 +226,7 @@ config SOUND_AU1550_AC97
 
 config SOUND_TRIDENT
tristate Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core
-   depends on SOUND_PRIME
+   depends on SOUND_PRIME  PCI
---help---
  Say Y or M if you have a PCI sound card utilizing the Trident
  4DWave-DX/NX chipset or your mother board chipset has SiS 7018
-
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] cpu_exclusive sched domains on partial nodes temp fix

2005-08-23 Thread Linux Kernel Mailing List
tree c81c261274011d301dfbcfd1a3e13480b93c167e
parent ae75784bc576a1af70509c2f3ba2b70bb65a0c58
author Paul Jackson [EMAIL PROTECTED] Tue, 23 Aug 2005 15:04:27 -0700
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 10:02:52 -0700

[PATCH] cpu_exclusive sched domains on partial nodes temp fix

This keeps the kernel/cpuset.c routine update_cpu_domains() from
invoking the sched.c routine partition_sched_domains() if the cpuset in
question doesn't fall on node boundaries.

I have boot tested this on an SN2, and with the help of a couple of ad
hoc printk's, determined that it does indeed avoid calling the
partition_sched_domains() routine on partial nodes.

I did not directly verify that this avoids setting up bogus sched
domains or avoids the oops that Hawkes saw.

This patch imposes a silent artificial constraint on which cpusets can
be used to define dynamic sched domains.

This patch should allow proceeding with this new feature in 2.6.13 for
the configurations in which it is useful (node alligned sched domains)
while avoiding trying to setup sched domains in the less useful cases
that can cause the kernel corruption and oops.

Signed-off-by: Paul Jackson [EMAIL PROTECTED]
Acked-by: Ingo Molnar [EMAIL PROTECTED]
Acked-by: Dinakar Guniguntala [EMAIL PROTECTED]
Acked-by: John Hawkes [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 kernel/cpuset.c |   17 +
 1 files changed, 17 insertions(+)

diff --git a/kernel/cpuset.c b/kernel/cpuset.c
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -636,6 +636,23 @@ static void update_cpu_domains(struct cp
return;
 
/*
+* Hack to avoid 2.6.13 partial node dynamic sched domain bug.
+* Require the 'cpu_exclusive' cpuset to include all (or none)
+* of the CPUs on each node, or return w/o changing sched domains.
+* Remove this hack when dynamic sched domains fixed.
+*/
+   {
+   int i, j;
+
+   for_each_cpu_mask(i, cur-cpus_allowed) {
+   for_each_cpu_mask(j, node_to_cpumask(cpu_to_node(i))) {
+   if (!cpu_isset(j, cur-cpus_allowed))
+   return;
+   }
+   }
+   }
+
+   /*
 * Get all cpus from parent's cpus_allowed not part of exclusive
 * children
 */
-
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] Kconfig fix (infiniband and PCI)

2005-08-23 Thread Linux Kernel Mailing List
tree 6b1e668b1c7ccba11f88478413509906f5bbfd9b
parent 697ae16ac0482283741f42378108b67b492870e8
author Al Viro [EMAIL PROTECTED] Tue, 23 Aug 2005 22:45:41 +0100
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 08:43:41 -0700

[PATCH] Kconfig fix (infiniband and PCI)

infiniband uses PCI helpers all over the place (including the core parts) and
won't build without PCI.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/infiniband/Kconfig |1 +
 1 files changed, 1 insertion(+)

diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
--- a/drivers/infiniband/Kconfig
+++ b/drivers/infiniband/Kconfig
@@ -1,6 +1,7 @@
 menu InfiniBand support
 
 config INFINIBAND
+   depends on PCI || BROKEN
tristate InfiniBand support
---help---
  Core support for InfiniBand (IB).  Make sure to also select
-
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


[FIB_TRIE]: Don't ignore negative results from fib_semantic_match

2005-08-26 Thread Linux Kernel Mailing List
tree 01d66754d441b84cb09fe28f875cbb47b3b9fb0c
parent 0572e3da3ff5c3744b2f606ecf296d5f89a4bbdf
author Patrick McHardy [EMAIL PROTECTED] Wed, 24 Aug 2005 12:06:09 -0700
committer David S. Miller [EMAIL PROTECTED] Wed, 24 Aug 2005 12:06:09 -0700

[FIB_TRIE]: Don't ignore negative results from fib_semantic_match

When a semantic match occurs either success, not found or an error
(for matching unreachable routes/blackholes) is returned. fib_trie
ignores the errors and looks for a different matching route. Treat
results other than no match as success and end lookup.

Signed-off-by: Patrick McHardy [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 net/ipv4/fib_trie.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1333,9 +1333,9 @@ err:;
 }
 
 static inline int check_leaf(struct trie *t, struct leaf *l,  t_key key, int 
*plen, const struct flowi *flp,
-struct fib_result *res, int *err)
+struct fib_result *res)
 {
-   int i;
+   int err, i;
t_key mask;
struct leaf_info *li;
struct hlist_head *hhead = l-list;
@@ -1348,18 +1348,18 @@ static inline int check_leaf(struct trie
if (l-key != (key  mask))
continue;
 
-   if (((*err) = fib_semantic_match(li-falh, flp, res, l-key, 
mask, i)) == 0) {
+   if ((err = fib_semantic_match(li-falh, flp, res, l-key, 
mask, i)) = 0) {
*plen = i;
 #ifdef CONFIG_IP_FIB_TRIE_STATS
t-stats.semantic_match_passed++;
 #endif
-   return 1;
+   return err;
}
 #ifdef CONFIG_IP_FIB_TRIE_STATS
t-stats.semantic_match_miss++;
 #endif
}
-   return 0;
+   return 1;
 }
 
 static int
@@ -1386,7 +1386,7 @@ fn_trie_lookup(struct fib_table *tb, con
 
/* Just a leaf? */
if (IS_LEAF(n)) {
-   if (check_leaf(t, (struct leaf *)n, key, plen, flp, res, ret))
+   if ((ret = check_leaf(t, (struct leaf *)n, key, plen, flp, 
res)) = 0)
goto found;
goto failed;
}
@@ -1508,7 +1508,7 @@ fn_trie_lookup(struct fib_table *tb, con
   continue;
}
if (IS_LEAF(n)) {
-   if (check_leaf(t, (struct leaf *)n, key, plen, flp, 
res, ret))
+   if ((ret = check_leaf(t, (struct leaf *)n, key, plen, 
flp, res)) = 0)
goto found;
   }
 backtrace:
-
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


[TG3]: Fix ethtool loopback test lockup

2005-08-26 Thread Linux Kernel Mailing List
tree 3984a1dc8378d7a976be60523021036c8265a167
parent 06c7427021f1cc83703f14659d8405ca773ba1ef
author Michael Chan [EMAIL PROTECTED] Fri, 26 Aug 2005 05:31:41 -0700
committer David S. Miller [EMAIL PROTECTED] Fri, 26 Aug 2005 05:31:41 -0700

[TG3]: Fix ethtool loopback test lockup

The tg3_abort_hw() call in tg3_test_loopback() is causing lockups on
some devices. tg3_abort_hw() disables the memory arbiter, causing
tg3_reset_hw() to hang when it tries to write the pre-reset signature.
tg3_abort_hw() should only be called after the pre-reset signature has
been written. This is all done in tg3_reset_hw() so the tg3_abort_hw()
call is unnecessary and can be removed.

[ Also bump driver version and release date. -DaveM ]

Signed-off-by: Michael Chan [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

 drivers/net/tg3.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -66,8 +66,8 @@
 
 #define DRV_MODULE_NAMEtg3
 #define PFX DRV_MODULE_NAME: 
-#define DRV_MODULE_VERSION 3.36
-#define DRV_MODULE_RELDATE August 19, 2005
+#define DRV_MODULE_VERSION 3.37
+#define DRV_MODULE_RELDATE August 25, 2005
 
 #define TG3_DEF_MAC_MODE   0
 #define TG3_DEF_RX_MODE0
@@ -7865,8 +7865,6 @@ static int tg3_test_loopback(struct tg3 
 
err = -EIO;
 
-   tg3_abort_hw(tp, 1);
-
tg3_reset_hw(tp);
 
mac_mode = (tp-mac_mode  ~MAC_MODE_PORT_MODE_MASK) |
-
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] Fix oops in fs/locks.c on close of file with pending locks

2005-08-26 Thread Linux Kernel Mailing List
tree 2fff144b1b85cdf362c1a774e77b34f204b93ebf
parent fd589e0b662c1ea8cfb1e0d20d60a2510979865b
author Steve French [EMAIL PROTECTED] Sat, 27 Aug 2005 00:42:59 -0500
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 06:05:35 -0700

[PATCH] Fix oops in fs/locks.c on close of file with pending locks

The recent change to locks_remove_flock code in fs/locks.c changes how
byte range locks are removed from closing files, which shows up a bug in
cifs.

The assumption in the cifs code was that the close call sent to the
server would remove any pending locks on the server on this file, but
that is no longer safe as the fs/locks.c code on the client wants unlock
of 0 to PATH_MAX to remove all locks (at least from this client, it is
not possible AFAIK to remove all locks from other clients made to the
server copy of the file).

Note that cifs locks are different from posix locks - and it is not
possible to map posix locks perfectly on the wire yet, due to
restrictions of the cifs network protocol, even to Samba without adding
a new request type to the network protocol (which we plan to do for
Samba 3.0.21 within a few months), but the local client will have the
correct, posix view, of the lock in most cases.

The correct fix for cifs for this would involve a bigger change than I
would like to do this late in the 2.6.13-rc cycle - and would involve
cifs keeping track of all unmerged (uncoalesced) byte range locks for
each remote inode and scanning that list to remove locks that intersect
or fall wholly within the range - locks that intersect may have to be
reaquired with the smaller, remaining range.

Signed-off-by: Steve French [EMAIL PROTECTED]
Signed-off-by: Dave Kleikamp [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 fs/cifs/file.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/file.c b/fs/cifs/file.c
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -643,7 +643,7 @@ int cifs_lock(struct file *file, int cmd
 netfid, length,
 pfLock-fl_start, numUnlock, numLock, lockType,
 wait_flag);
-   if (rc == 0  (pfLock-fl_flags  FL_POSIX))
+   if (pfLock-fl_flags  FL_POSIX)
posix_lock_file_wait(file, pfLock);
FreeXid(xid);
return rc;
-
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] drivers/hwmon/*: kfree() correct pointers

2005-08-26 Thread Linux Kernel Mailing List
tree 0db3419ab73cabed542a18cd5c7da50b03df896c
parent d634cc15e8f2038dc9c078beae79f9382ada
author Alexey Dobriyan [EMAIL PROTECTED] Fri, 26 Aug 2005 01:49:14 +0400
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 06:30:30 -0700

[PATCH] drivers/hwmon/*: kfree() correct pointers

The adm9240 driver, in adm9240_detect(), allocates a structure.  The
error path attempts to kfree() -client field of it (second one),
resulting in an oops (or slab corruption) if the hardware is not present.

-client field in adm1026, adm1031, smsc47b397 and smsc47m1 is the first in
${HWMON}_data structure, but fix them too.

Signed-off-by: Jonathan Corbet [EMAIL PROTECTED]
Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/hwmon/adm1026.c|2 +-
 drivers/hwmon/adm1031.c|2 +-
 drivers/hwmon/adm9240.c|2 +-
 drivers/hwmon/smsc47b397.c |2 +-
 drivers/hwmon/smsc47m1.c   |2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c
--- a/drivers/hwmon/adm1026.c
+++ b/drivers/hwmon/adm1026.c
@@ -1691,7 +1691,7 @@ int adm1026_detect(struct i2c_adapter *a
 
/* Error out and cleanup code */
 exitfree:
-   kfree(new_client);
+   kfree(data);
 exit:
return err;
 }
diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c
--- a/drivers/hwmon/adm1031.c
+++ b/drivers/hwmon/adm1031.c
@@ -834,7 +834,7 @@ static int adm1031_detect(struct i2c_ada
return 0;
 
 exit_free:
-   kfree(new_client);
+   kfree(data);
 exit:
return err;
 }
diff --git a/drivers/hwmon/adm9240.c b/drivers/hwmon/adm9240.c
--- a/drivers/hwmon/adm9240.c
+++ b/drivers/hwmon/adm9240.c
@@ -616,7 +616,7 @@ static int adm9240_detect(struct i2c_ada
 
return 0;
 exit_free:
-   kfree(new_client);
+   kfree(data);
 exit:
return err;
 }
diff --git a/drivers/hwmon/smsc47b397.c b/drivers/hwmon/smsc47b397.c
--- a/drivers/hwmon/smsc47b397.c
+++ b/drivers/hwmon/smsc47b397.c
@@ -298,7 +298,7 @@ static int smsc47b397_detect(struct i2c_
return 0;
 
 error_free:
-   kfree(new_client);
+   kfree(data);
 error_release:
release_region(addr, SMSC_EXTENT);
return err;
diff --git a/drivers/hwmon/smsc47m1.c b/drivers/hwmon/smsc47m1.c
--- a/drivers/hwmon/smsc47m1.c
+++ b/drivers/hwmon/smsc47m1.c
@@ -495,7 +495,7 @@ static int smsc47m1_detect(struct i2c_ad
return 0;
 
 error_free:
-   kfree(new_client);
+   kfree(data);
 error_release:
release_region(address, SMSC_EXTENT);
return err;
-
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] bogus iounmap() in emac

2005-08-26 Thread Linux Kernel Mailing List
tree 1d6d1e779fcbaed6f06bf49ed4ad630ecdf58ed1
parent 1f57ff89fee47a317e9e8ca63bf0f139802cc116
author Al Viro [EMAIL PROTECTED] Thu, 25 Aug 2005 22:59:48 +0100
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 06:30:30 -0700

[PATCH] bogus iounmap() in emac

Dumb typo: iounmap(local_pointer_variable).

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/net/ibm_emac/ibm_emac_core.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ibm_emac/ibm_emac_core.c 
b/drivers/net/ibm_emac/ibm_emac_core.c
--- a/drivers/net/ibm_emac/ibm_emac_core.c
+++ b/drivers/net/ibm_emac/ibm_emac_core.c
@@ -1253,7 +1253,7 @@ static int emac_init_tah(struct ocp_enet
 TAH_MR_CVR | TAH_MR_ST_768 | TAH_MR_TFS_10KB | TAH_MR_DTFP |
 TAH_MR_DIG);
 
-   iounmap(tahp);
+   iounmap(tahp);
 
return 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


[PATCH] bogus function type in qdio

2005-08-26 Thread Linux Kernel Mailing List
tree c550c6ef8439e867ea2f73aebfca0fca0e09b64a
parent b6a9ad73897acb7ea4cf56aae0fc39ba1c471fba
author Al Viro [EMAIL PROTECTED] Thu, 25 Aug 2005 23:03:35 +0100
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 06:30:30 -0700

[PATCH] bogus function type in qdio

In qdio_get_micros() volatile in return type is plain noise (even with old
gccisms it would make no sense - noreturn function returning __u64 is a
bit odd ;-)

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/s390/cio/qdio.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
--- a/drivers/s390/cio/qdio.c
+++ b/drivers/s390/cio/qdio.c
@@ -112,7 +112,7 @@ qdio_min(int a,int b)
 
 /* SCRUBBER HELPER ROUTINES **/
 
-static inline volatile __u64 
+static inline __u64 
 qdio_get_micros(void)
 {
 return (get_clock()  10); /* time12 is microseconds */
-
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] I2C hwmon: kfree fixes

2005-08-26 Thread Linux Kernel Mailing List
tree b88e2d0d55bbc9788337c256dfd25b54d684e49e
parent 32818c2eb6b83ea5065c89e0c3cf774abc4dc02b
author Mark M. Hoffman [EMAIL PROTECTED] Sat, 27 Aug 2005 08:34:08 -0700
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 09:37:12 -0700

[PATCH] I2C hwmon: kfree fixes

This patch fixes several instances of hwmon drivers kfree'ing the wrong
pointer; the existing code works somewhat by accident.

(akpm: plucked from Greg's queue based on lkml discussion.  Finishes off the
patch from Jon Corbet)

Signed-off-by: Mark M. Hoffman [EMAIL PROTECTED]
Signed-off-by: Jean Delvare [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/hwmon/adm1026.c |2 +-
 drivers/hwmon/adm1031.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c
--- a/drivers/hwmon/adm1026.c
+++ b/drivers/hwmon/adm1026.c
@@ -325,7 +325,7 @@ int adm1026_attach_adapter(struct i2c_ad
 int adm1026_detach_client(struct i2c_client *client)
 {
i2c_detach_client(client);
-   kfree(client);
+   kfree(i2c_get_clientdata(client));
return 0;
 }
 
diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c
--- a/drivers/hwmon/adm1031.c
+++ b/drivers/hwmon/adm1031.c
@@ -845,7 +845,7 @@ static int adm1031_detach_client(struct 
if ((ret = i2c_detach_client(client)) != 0) {
return ret;
}
-   kfree(client);
+   kfree(i2c_get_clientdata(client));
return 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


[PATCH] x86_64: Tell VM about holes in nodes

2005-08-26 Thread Linux Kernel Mailing List
tree c75562513489f62c8dcfd41acd467bca3d3202cc
parent bebf4688e9dbbfdd421736685d607bced91a3c91
author Andi Kleen [EMAIL PROTECTED] Sat, 27 Aug 2005 08:34:10 -0700
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 09:37:12 -0700

[PATCH] x86_64: Tell VM about holes in nodes

Some nodes can have large holes on x86-64.

This fixes problems with the VM allowing too many dirty pages because it
overestimates the number of available RAM in a node.  In extreme cases you
can end up with all RAM filled with dirty pages which can lead to deadlocks
and other nasty behaviour.

This patch just tells the VM about the known holes from e820.  Reserved
(like the kernel text or mem_map) is still not taken into account, but that
should be only a few percent error now.

Small detail is that the flat setup uses the NUMA free_area_init_node() now
too because it offers more flexibility.

(akpm: lotsa thanks to Martin for working this problem out)

Cc: Martin Bligh [EMAIL PROTECTED]
Signed-off-by: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/x86_64/kernel/e820.c |   34 ++
 arch/x86_64/mm/init.c |   16 
 arch/x86_64/mm/numa.c |8 +++-
 include/asm-x86_64/e820.h |2 ++
 4 files changed, 55 insertions(+), 5 deletions(-)

diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -185,6 +185,40 @@ unsigned long __init e820_end_of_ram(voi
 }
 
 /* 
+ * Compute how much memory is missing in a range.
+ * Unlike the other functions in this file the arguments are in page numbers.
+ */
+unsigned long __init
+e820_hole_size(unsigned long start_pfn, unsigned long end_pfn)
+{
+   unsigned long ram = 0;
+   unsigned long start = start_pfn  PAGE_SHIFT;
+   unsigned long end = end_pfn  PAGE_SHIFT;
+   int i;
+   for (i = 0; i  e820.nr_map; i++) {
+   struct e820entry *ei = e820.map[i];
+   unsigned long last, addr;
+
+   if (ei-type != E820_RAM ||
+   ei-addr+ei-size = start ||
+   ei-addr = end)
+   continue;
+
+   addr = round_up(ei-addr, PAGE_SIZE);
+   if (addr  start)
+   addr = start;
+
+   last = round_down(ei-addr + ei-size, PAGE_SIZE);
+   if (last = end)
+   last = end;
+
+   if (last  addr)
+   ram += last - addr;
+   }
+   return ((end - start) - ram)  PAGE_SHIFT;
+}
+
+/*
  * Mark e820 reserved areas as busy for the resource manager.
  */
 void __init e820_reserve_resources(void)
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -322,18 +322,26 @@ void zap_low_mappings(void)
 void __init paging_init(void)
 {
{
-   unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
+   unsigned long zones_size[MAX_NR_ZONES];
+   unsigned long holes[MAX_NR_ZONES];
unsigned int max_dma;
 
+   memset(zones_size, 0, sizeof(zones_size));
+   memset(holes, 0, sizeof(holes));
+
max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS)  PAGE_SHIFT;
 
-   if (end_pfn  max_dma)
+   if (end_pfn  max_dma) {
zones_size[ZONE_DMA] = end_pfn;
-   else {
+   holes[ZONE_DMA] = e820_hole_size(0, end_pfn);
+   } else {
zones_size[ZONE_DMA] = max_dma;
+   holes[ZONE_DMA] = e820_hole_size(0, max_dma);
zones_size[ZONE_NORMAL] = end_pfn - max_dma;
+   holes[ZONE_NORMAL] = e820_hole_size(max_dma, end_pfn);
}
-   free_area_init(zones_size);
+   free_area_init_node(0, NODE_DATA(0), zones_size,
+__pa(PAGE_OFFSET)  PAGE_SHIFT, holes);
}
return;
 }
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c
--- a/arch/x86_64/mm/numa.c
+++ b/arch/x86_64/mm/numa.c
@@ -126,9 +126,11 @@ void __init setup_node_zones(int nodeid)
 { 
unsigned long start_pfn, end_pfn; 
unsigned long zones[MAX_NR_ZONES];
+   unsigned long holes[MAX_NR_ZONES];
unsigned long dma_end_pfn;
 
memset(zones, 0, sizeof(unsigned long) * MAX_NR_ZONES); 
+   memset(holes, 0, sizeof(unsigned long) * MAX_NR_ZONES);
 
start_pfn = node_start_pfn(nodeid);
end_pfn = node_end_pfn(nodeid);
@@ -139,13 +141,17 @@ void __init setup_node_zones(int nodeid)
dma_end_pfn = __pa(MAX_DMA_ADDRESS)  PAGE_SHIFT; 
if (start_pfn  dma_end_pfn) { 
zones[ZONE_DMA] = dma_end_pfn - start_pfn;
+   holes[ZONE_DMA] = e820_hole_size(start_pfn, dma_end_pfn);

[PATCH] arm: fix IXP4xx flash resource range

2005-08-26 Thread Linux Kernel Mailing List
tree 662163e453ee6514a13e844993700e96baa09260
parent 485761bd6a72d33b3d4fa884927b2b0d983b701e
author Deepak Saxena [EMAIL PROTECTED] Sat, 27 Aug 2005 08:34:11 -0700
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 09:37:12 -0700

[PATCH] arm: fix IXP4xx flash resource range

We are currently reserving one byte more than actually needed by the flash
device and overlapping into the next I/O expansion bus window.  This a)
causes us to allocate an extra page of VM due to ARM ioremap() alignment
code and b) could cause problems if another driver tries to request the
next expansion bus window.

Signed-off-by: Deepak Saxena [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/arm/mach-ixp4xx/coyote-setup.c   |2 +-
 arch/arm/mach-ixp4xx/gtwx5715-setup.c |2 +-
 arch/arm/mach-ixp4xx/ixdp425-setup.c  |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c 
b/arch/arm/mach-ixp4xx/coyote-setup.c
--- a/arch/arm/mach-ixp4xx/coyote-setup.c
+++ b/arch/arm/mach-ixp4xx/coyote-setup.c
@@ -36,7 +36,7 @@ static struct flash_platform_data coyote
 
 static struct resource coyote_flash_resource = {
.start  = COYOTE_FLASH_BASE,
-   .end= COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE,
+   .end= COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE - 1,
.flags  = IORESOURCE_MEM,
 };
 
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c 
b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
--- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
@@ -114,7 +114,7 @@ static struct flash_platform_data gtwx57
 
 static struct resource gtwx5715_flash_resource = {
.start  = GTWX5715_FLASH_BASE,
-   .end= GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE,
+   .end= GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE - 1,
.flags  = IORESOURCE_MEM,
 };
 
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c 
b/arch/arm/mach-ixp4xx/ixdp425-setup.c
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -36,7 +36,7 @@ static struct flash_platform_data ixdp42
 
 static struct resource ixdp425_flash_resource = {
.start  = IXDP425_FLASH_BASE,
-   .end= IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE,
+   .end= IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE - 1,
.flags  = IORESOURCE_MEM,
 };
 
-
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] IB: fix use-after-free in user verbs cleanup

2005-08-26 Thread Linux Kernel Mailing List
tree 01c6de89a3d60c35d2133c0b6b1903509a8f1df8
parent 1c9cf6f9861f8d27303ee2531b3b7686269c71ce
author Roland Dreier [EMAIL PROTECTED] Sat, 27 Aug 2005 08:34:14 -0700
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 09:37:12 -0700

[PATCH] IB: fix use-after-free in user verbs cleanup

Fix a use-after-free bug in userspace verbs cleanup: we can't touch
mr-device after we free mr by calling ib_dereg_mr().

Signed-off-by: Roland Dreier [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/infiniband/core/uverbs_main.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/uverbs_main.c 
b/drivers/infiniband/core/uverbs_main.c
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -130,13 +130,14 @@ static int ib_dealloc_ucontext(struct ib
 
list_for_each_entry_safe(uobj, tmp, context-mr_list, list) {
struct ib_mr *mr = idr_find(ib_uverbs_mr_idr, uobj-id);
+   struct ib_device *mrdev = mr-device;
struct ib_umem_object *memobj;
 
idr_remove(ib_uverbs_mr_idr, uobj-id);
ib_dereg_mr(mr);
 
memobj = container_of(uobj, struct ib_umem_object, uobject);
-   ib_umem_release_on_close(mr-device, memobj-umem);
+   ib_umem_release_on_close(mrdev, memobj-umem);
 
list_del(uobj-list);
kfree(memobj);
-
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] md: create a MODULE_ALIAS for md corresponding to its block major number.

2005-08-26 Thread Linux Kernel Mailing List
tree 23660dd9234016c927b8c135c9e48b685cb16207
parent e1bcfcaa0b3bec2a67b22c565a0bf508ea90db1d
author NeilBrown [EMAIL PROTECTED] Sat, 27 Aug 2005 08:34:15 -0700
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 09:37:12 -0700

[PATCH] md: create a MODULE_ALIAS for md corresponding to its block major 
number.

I just discovered this is needed for module auto-loading.

Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/md/md.c |1 +
 1 files changed, 1 insertion(+)

diff --git a/drivers/md/md.c b/drivers/md/md.c
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4011,3 +4011,4 @@ EXPORT_SYMBOL(md_print_devices);
 EXPORT_SYMBOL(md_check_recovery);
 MODULE_LICENSE(GPL);
 MODULE_ALIAS(md);
+MODULE_ALIAS_BLOCKDEV_MAJOR(MD_MAJOR);
-
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] md: clear the 'recovery' flags when starting an md array.

2005-08-26 Thread Linux Kernel Mailing List
tree 35b09cbecef683302adaddb9e8f7047462e7a848
parent 72008652dae7d10fa668d7b2ada3bddff7403d86
author NeilBrown [EMAIL PROTECTED] Sat, 27 Aug 2005 08:34:16 -0700
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 09:37:13 -0700

[PATCH] md: clear the 'recovery' flags when starting an md array.

It's possible for this to still have flags in it and a previous instance
has been stopped, and that confused the new array using the same mddev.

Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/md/md.c |1 +
 1 files changed, 1 insertion(+)

diff --git a/drivers/md/md.c b/drivers/md/md.c
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1689,6 +1689,7 @@ static int do_md_run(mddev_t * mddev)
mddev-pers = pers[pnum];
spin_unlock(pers_lock);
 
+   mddev-recovery = 0;
mddev-resync_max_sectors = mddev-size  1; /* may be over-ridden by 
personality */
 
/* before we start the array running, initialise the bitmap */
-
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] Document idr_get_new_above() semantics, update inotify

2005-08-26 Thread Linux Kernel Mailing List
tree 5e1ae11c320ea00488b33224cc982d0be2d986d6
parent 755528c860b05fcecda1c88a2bdaffcb50760a7f
author John McCutchan [EMAIL PROTECTED] Fri, 26 Aug 2005 22:02:04 -0400
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 01:32:57 -0700

[PATCH] Document idr_get_new_above() semantics, update inotify

There is an off by one problem with idr_get_new_above.

The comment and function name suggest that it will return an id 
starting_id, but it actually returned an id = starting_id, and kernel
callers other than inotify treated it as such.

The patch below fixes the comment, and fixes inotifys usage.  The
function name still doesn't match the behaviour, but it never did.

Signed-off-by: John McCutchan [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 fs/inotify.c |2 +-
 lib/idr.c|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/inotify.c b/fs/inotify.c
--- a/fs/inotify.c
+++ b/fs/inotify.c
@@ -353,7 +353,7 @@ static int inotify_dev_get_wd(struct ino
do {
if (unlikely(!idr_pre_get(dev-idr, GFP_KERNEL)))
return -ENOSPC;
-   ret = idr_get_new_above(dev-idr, watch, dev-last_wd, 
watch-wd);
+   ret = idr_get_new_above(dev-idr, watch, dev-last_wd+1, 
watch-wd);
} while (ret == -EAGAIN);
 
return ret;
diff --git a/lib/idr.c b/lib/idr.c
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -207,7 +207,7 @@ build_up:
 }
 
 /**
- * idr_get_new_above - allocate new idr entry above a start id
+ * idr_get_new_above - allocate new idr entry above or equal to a start id
  * @idp: idr handle
  * @ptr: pointer you want associated with the ide
  * @start_id: id to start search at
-
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] Fixup symlink function pointers for hppfs [for 2.6.13]

2005-08-26 Thread Linux Kernel Mailing List
tree 80a3d59724cc0faf0a5cb07f7e426c9f41d87e67
parent 7c657f2f25d50c602df9291bc6242b98fc090759
author Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Fri, 26 Aug 2005 
16:57:44 +0200
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 01:39:19 -0700

[PATCH] Fixup symlink function pointers for hppfs [for 2.6.13]

Update hppfs for the symlink functions prototype change.

Yes, I know the code I leave there is still _bogus_, see next patch for
this.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 fs/hppfs/hppfs_kern.c |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/fs/hppfs/hppfs_kern.c b/fs/hppfs/hppfs_kern.c
--- a/fs/hppfs/hppfs_kern.c
+++ b/fs/hppfs/hppfs_kern.c
@@ -679,25 +679,25 @@ static int hppfs_readlink(struct dentry 
return(n);
 }
 
-static int hppfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void* hppfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
struct file *proc_file;
struct dentry *proc_dentry;
-   int (*follow_link)(struct dentry *, struct nameidata *);
-   int err, n;
+   void * (*follow_link)(struct dentry *, struct nameidata *);
+   void *ret;
 
proc_dentry = HPPFS_I(dentry-d_inode)-proc_dentry;
proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY);
-   err = PTR_ERR(proc_dentry);
-   if(IS_ERR(proc_dentry))
-   return(err);
+
+   if (IS_ERR(proc_dentry))
+   return proc_dentry;
 
follow_link = proc_dentry-d_inode-i_op-follow_link;
-   n = (*follow_link)(proc_dentry, nd);
+   ret = (*follow_link)(proc_dentry, nd);
 
fput(proc_file);
 
-   return(n);
+   return ret;
 }
 
 static struct inode_operations hppfs_dir_iops = {
-
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] hppfs: fix symlink error path

2005-08-26 Thread Linux Kernel Mailing List
tree 5c281ab99184fa6dcfb09586064ea7751c32fd4c
parent d7a60d50d7713b65a3fd88f11d5717b83a6b6a97
author Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Fri, 26 Aug 2005 
16:57:53 +0200
committer Linus Torvalds [EMAIL PROTECTED] Sat, 27 Aug 2005 01:39:19 -0700

[PATCH] hppfs: fix symlink error path

While touching this code I noticed the error handling is bogus, so I
fixed it up.

I've removed the IS_ERR(proc_dentry) check, which will never trigger and
is clearly a typo: we must check proc_file instead.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 fs/hppfs/hppfs_kern.c |   24 +---
 1 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/fs/hppfs/hppfs_kern.c b/fs/hppfs/hppfs_kern.c
--- a/fs/hppfs/hppfs_kern.c
+++ b/fs/hppfs/hppfs_kern.c
@@ -38,7 +38,7 @@ struct hppfs_inode_info {
 
 static inline struct hppfs_inode_info *HPPFS_I(struct inode *inode)
 {
-   return(list_entry(inode, struct hppfs_inode_info, vfs_inode));
+   return container_of(inode, struct hppfs_inode_info, vfs_inode);
 }
 
 #define HPPFS_SUPER_MAGIC 0xb0ee
@@ -662,38 +662,32 @@ static int hppfs_readlink(struct dentry 
 {
struct file *proc_file;
struct dentry *proc_dentry;
-   int (*readlink)(struct dentry *, char *, int);
-   int err, n;
+   int ret;
 
proc_dentry = HPPFS_I(dentry-d_inode)-proc_dentry;
proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY);
-   err = PTR_ERR(proc_dentry);
-   if(IS_ERR(proc_dentry))
-   return(err);
+   if (IS_ERR(proc_file))
+   return PTR_ERR(proc_file);
 
-   readlink = proc_dentry-d_inode-i_op-readlink;
-   n = (*readlink)(proc_dentry, buffer, buflen);
+   ret = proc_dentry-d_inode-i_op-readlink(proc_dentry, buffer, buflen);
 
fput(proc_file);
 
-   return(n);
+   return ret;
 }
 
 static void* hppfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
struct file *proc_file;
struct dentry *proc_dentry;
-   void * (*follow_link)(struct dentry *, struct nameidata *);
void *ret;
 
proc_dentry = HPPFS_I(dentry-d_inode)-proc_dentry;
proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY);
+   if (IS_ERR(proc_file))
+   return proc_file;
 
-   if (IS_ERR(proc_dentry))
-   return proc_dentry;
-
-   follow_link = proc_dentry-d_inode-i_op-follow_link;
-   ret = (*follow_link)(proc_dentry, nd);
+   ret = proc_dentry-d_inode-i_op-follow_link(proc_dentry, nd);
 
fput(proc_file);
 
-
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] Export pcibios_bus_to_resource

2005-08-24 Thread Linux Kernel Mailing List
tree 209aa1f61d73f84046bd8735c7b4ef306b30e3cc
parent b7561524765a30334bf31c56b523aeb3c1a04c7d
author Keith Owens [EMAIL PROTECTED] Wed, 24 Aug 2005 16:06:25 +1000
committer Linus Torvalds [EMAIL PROTECTED] Thu, 25 Aug 2005 00:22:44 -0700

[PATCH] Export pcibios_bus_to_resource

pcibios_bus_to_resource is exported on all architectures except ia64
and sparc.  Add exports for the two missing architectures.  Needed when
Yenta socket support is compiled as a module.

Signed-off-by: Keith Owens [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/ia64/pci/pci.c   |1 +
 arch/sparc64/kernel/pci.c |1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -380,6 +380,7 @@ void pcibios_bus_to_resource(struct pci_
res-start = region-start + offset;
res-end = region-end + offset;
 }
+EXPORT_SYMBOL(pcibios_bus_to_resource);
 
 static int __devinit is_valid_resource(struct pci_dev *dev, int idx)
 {
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -540,6 +540,7 @@ void pcibios_bus_to_resource(struct pci_
 
pbm-parent-resource_adjust(pdev, res, root);
 }
+EXPORT_SYMBOL(pcibios_bus_to_resource);
 
 char * __init pcibios_setup(char *str)
 {
-
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] cpu_exclusive sched domains build fix

2005-08-24 Thread Linux Kernel Mailing List
tree d7db18d3d5f75fe4309ddc7aa373f3213f845b41
parent 40bb0c3ef52d872de348e1eb5432a43a147d
author Paul Jackson [EMAIL PROTECTED] Wed, 24 Aug 2005 18:15:10 -0700
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 23:40:45 -0700

[PATCH] cpu_exclusive sched domains build fix

As reported by Paul Mackerras [EMAIL PROTECTED], the previous patch
cpu_exclusive sched domains fix broke the ppc64 build with
CONFIC_CPUSET, yielding error messages:

kernel/cpuset.c: In function 'update_cpu_domains':
kernel/cpuset.c:648: error: invalid lvalue in unary ''
kernel/cpuset.c:648: error: invalid lvalue in unary ''

On some arch's, the node_to_cpumask() is a function, returning
a cpumask_t.  But the for_each_cpu_mask() requires an lvalue mask.

The following patch fixes this build failure by making a copy
of the cpumask_t on the stack.

Signed-off-by: Paul Jackson [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 kernel/cpuset.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/cpuset.c b/kernel/cpuset.c
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -645,7 +645,9 @@ static void update_cpu_domains(struct cp
int i, j;
 
for_each_cpu_mask(i, cur-cpus_allowed) {
-   for_each_cpu_mask(j, node_to_cpumask(cpu_to_node(i))) {
+   cpumask_t mask = node_to_cpumask(cpu_to_node(i));
+
+   for_each_cpu_mask(j, mask) {
if (!cpu_isset(j, cur-cpus_allowed))
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


[PATCH] m68k: fix broken macros causing compile errors

2005-08-24 Thread Linux Kernel Mailing List
tree fb0a64a7e4c53fa05a75d1ebb429a27b5c44de3b
parent 0572e3da3ff5c3744b2f606ecf296d5f89a4bbdf
author Andreas Schwab [EMAIL PROTECTED] Wed, 24 Aug 2005 17:36:21 +0200
committer Linus Torvalds [EMAIL PROTECTED] Wed, 24 Aug 2005 23:37:40 -0700

[PATCH] m68k: fix broken macros causing compile errors

Add parens around macro parameters.

Signed-off-by: Andreas Schwab [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 include/asm-m68k/page.h |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h
--- a/include/asm-m68k/page.h
+++ b/include/asm-m68k/page.h
@@ -138,13 +138,13 @@ extern unsigned long m68k_memoffset;
 #define __pa(vaddr)((unsigned long)(vaddr)+m68k_memoffset)
 #define __va(paddr)((void *)((unsigned 
long)(paddr)-m68k_memoffset))
 #else
-#define __pa(vaddr)virt_to_phys((void *)vaddr)
-#define __va(paddr)phys_to_virt((unsigned long)paddr)
+#define __pa(vaddr)virt_to_phys((void *)(vaddr))
+#define __va(paddr)phys_to_virt((unsigned long)(paddr))
 #endif
 
 #else  /* !CONFIG_SUN3 */
 /* This #define is a horrible hack to suppress lots of warnings. --m */
-#define __pa(x) ___pa((unsigned long)x)
+#define __pa(x) ___pa((unsigned long)(x))
 static inline unsigned long ___pa(unsigned long x)
 {
  if(x == 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


[PATCH] x86_64: update defconfig - reenable fusion

2005-08-24 Thread Linux Kernel Mailing List
tree e45d7e074f82778666db9d51d15dd0e66f8efdbb
parent 5477d30e841e0f707fd2daddc8cb6949858476ee
author Andi Kleen [EMAIL PROTECTED] Wed, 24 Aug 2005 07:37:37 +0200
committer Linus Torvalds [EMAIL PROTECTED] Thu, 25 Aug 2005 00:22:44 -0700

[PATCH] x86_64: update defconfig - reenable fusion

I mistakedly disabled fusion support in an earlier update. Fusion
is commonly used on many x86-64 systems, so this was a problem.
This patch fixes that.

Signed-off-by: And Kleen [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 arch/x86_64/defconfig |   21 +
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig
--- a/arch/x86_64/defconfig
+++ b/arch/x86_64/defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.13-rc3
-# Fri Jul 22 16:47:31 2005
+# Linux kernel version: 2.6.13-rc6-git3
+# Fri Aug 12 16:40:34 2005
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -284,10 +284,6 @@ CONFIG_IPV6=y
 # Network testing
 #
 # CONFIG_NET_PKTGEN is not set
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
@@ -463,6 +459,7 @@ CONFIG_AIC79XX_DEBUG_MASK=0
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 CONFIG_SCSI_SATA=y
+# CONFIG_SCSI_SATA_AHCI is not set
 # CONFIG_SCSI_SATA_SVW is not set
 CONFIG_SCSI_ATA_PIIX=y
 # CONFIG_SCSI_SATA_NV is not set
@@ -492,6 +489,7 @@ CONFIG_SCSI_QLA2XXX=y
 # CONFIG_SCSI_QLA2300 is not set
 # CONFIG_SCSI_QLA2322 is not set
 # CONFIG_SCSI_QLA6312 is not set
+# CONFIG_SCSI_QLA24XX is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
@@ -512,9 +510,11 @@ CONFIG_BLK_DEV_DM=y
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
+CONFIG_FUSION=y
+CONFIG_FUSION_SPI=y
 # CONFIG_FUSION_FC is not set
+CONFIG_FUSION_MAX_SGE=128
+# CONFIG_FUSION_CTL is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -585,6 +585,7 @@ CONFIG_8139TOO=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 CONFIG_E1000=y
+# CONFIG_E1000_NAPI is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -624,6 +625,10 @@ CONFIG_S2IO=m
 # CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 CONFIG_NETCONSOLE=y
+CONFIG_NETPOLL=y
+# CONFIG_NETPOLL_RX is not set
+# CONFIG_NETPOLL_TRAP is not set
+CONFIG_NET_POLL_CONTROLLER=y
 
 #
 # ISDN subsystem
-
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] acpi_shutdown: Only prepare for power off on power_off

2005-08-27 Thread Linux Kernel Mailing List
tree 26d82a3ea3f1b7be05468ae7e811775851a06731
parent 6a029a90f5b93e2b50bcbbaef05ef91fa0c1d6b3
author Eric W. Biederman [EMAIL PROTECTED] Sat, 27 Aug 2005 12:56:18 -0600
committer Linus Torvalds [EMAIL PROTECTED] Sun, 28 Aug 2005 00:11:40 -0700

[PATCH] acpi_shutdown: Only prepare for power off on power_off

When acpi_sleep_prepare was moved into a shutdown method we
started calling it for all shutdowns.

It appears this triggers some systems to power off on reboot.

Avoid this by only calling acpi_sleep_prepare if we are going to power
off the system.

Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/acpi/sleep/poweroff.c |6 +-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c
--- a/drivers/acpi/sleep/poweroff.c
+++ b/drivers/acpi/sleep/poweroff.c
@@ -55,7 +55,11 @@ void acpi_power_off(void)
 
 static int acpi_shutdown(struct sys_device *x)
 {
-   return acpi_sleep_prepare(ACPI_STATE_S5);
+   if (system_state == SYSTEM_POWER_OFF) {
+   /* Prepare if we are going to power off the system */
+   return acpi_sleep_prepare(ACPI_STATE_S5);
+   }
+   return 0;
 }
 
 static struct sysdev_class acpi_sysclass = {
-
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] fix for race problem in DVB USB drivers (dibusb)

2005-08-27 Thread Linux Kernel Mailing List
tree c810f8f13be0e2eeec2f0bf9d92b21d746d3f15f
parent 820d220de400cfaaf846a2d8b5de93f9ea5a9b80
author Patrick Boettcher [EMAIL PROTECTED] Sat, 27 Aug 2005 19:30:30 +0200
committer Linus Torvalds [EMAIL PROTECTED] Sun, 28 Aug 2005 01:03:45 -0700

[PATCH] fix for race problem in DVB USB drivers (dibusb)

Fixed race between submitting streaming URBs in the driver and starting
the actual transfer in hardware (demodulator and USB controller) which
sometimes lead to garbled data transfers. URBs are now submitted first,
then the transfer is enabled. Dibusb devices and clones are now fully
functional again.

Signed-off-by: Patrick Boettcher [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/media/dvb/dvb-usb/dibusb-common.c |   19 ++-
 drivers/media/dvb/dvb-usb/dvb-usb-dvb.c   |5 +++--
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c 
b/drivers/media/dvb/dvb-usb/dibusb-common.c
--- a/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-common.c
@@ -70,13 +70,22 @@ EXPORT_SYMBOL(dibusb_power_ctrl);
 
 int dibusb2_0_streaming_ctrl(struct dvb_usb_device *d, int onoff)
 {
-   u8 b[2];
-   b[0] = DIBUSB_REQ_SET_IOCTL;
-   b[1] = onoff ? DIBUSB_IOCTL_CMD_ENABLE_STREAM : 
DIBUSB_IOCTL_CMD_DISABLE_STREAM;
+   u8 b[3] = { 0 };
+   int ret;
 
-   dvb_usb_generic_write(d,b,3);
+   if ((ret = dibusb_streaming_ctrl(d,onoff))  0)
+   return ret;
 
-   return dibusb_streaming_ctrl(d,onoff);
+   if (onoff) {
+   b[0] = DIBUSB_REQ_SET_STREAMING_MODE;
+   b[1] = 0x00;
+   if ((ret = dvb_usb_generic_write(d,b,2))  0)
+   return ret;
+   }
+
+   b[0] = DIBUSB_REQ_SET_IOCTL;
+   b[1] = onoff ? DIBUSB_IOCTL_CMD_ENABLE_STREAM : 
DIBUSB_IOCTL_CMD_DISABLE_STREAM;
+   return dvb_usb_generic_write(d,b,3);
 }
 EXPORT_SYMBOL(dibusb2_0_streaming_ctrl);
 
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c 
b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
--- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
@@ -23,12 +23,12 @@ static int dvb_usb_ctrl_feed(struct dvb_
 */
if (newfeedcount == 0) {
deb_ts(stop feeding\n);
+   dvb_usb_urb_kill(d);
 
if (d-props.streaming_ctrl != NULL)
if ((ret = d-props.streaming_ctrl(d,0)))
err(error while stopping stream.);
 
-   dvb_usb_urb_kill(d);
}
 
d-feedcount = newfeedcount;
@@ -44,6 +44,8 @@ static int dvb_usb_ctrl_feed(struct dvb_
 * for reception.
 */
if (d-feedcount == onoff  d-feedcount  0) {
+   deb_ts(submitting all URBs\n);
+   dvb_usb_urb_submit(d);
 
deb_ts(controlling pid parser\n);
if (d-props.caps  DVB_USB_HAS_PID_FILTER 
@@ -59,7 +61,6 @@ static int dvb_usb_ctrl_feed(struct dvb_
return -ENODEV;
}
 
-   dvb_usb_urb_submit(d);
}
return 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


[PATCH] sg.c: fix a memory leak in devices seq_file implementation

2005-08-27 Thread Linux Kernel Mailing List
tree f92ee98a709264984ef6e3e8d6c3ee4f3462797f
parent 8126fdbc76351bdf99c6737ef4fecf88a22fa538
author Jan Blunck [EMAIL PROTECTED] Sun, 28 Aug 2005 01:07:52 -0700
committer Linus Torvalds [EMAIL PROTECTED] Sun, 28 Aug 2005 01:22:27 -0700

[PATCH] sg.c: fix a memory leak in devices seq_file implementation

I know that scsi procfs is legacy code but this is a fix for a memory leak.

While reading through sg.c I realized that the implementation of
/proc/scsi/sg/devices with seq_file is leaking memory due to freeing the
pointer returned by the next() iterator method.  Since next() might return
NULL or an error this is wrong.  This patch fixes it through using the
seq_files private field for holding the reference to the iterator object.

Here is a small bash script to trigger the leak. Use slabtop to watch
the size-32 usage grow and grow.

#!/bin/sh

while true; do
cat /proc/scsi/sg/devices  /dev/null
done

Signed-off-by: Jan Blunck [EMAIL PROTECTED]
Acked-by: James Bottomley [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/scsi/sg.c |   13 ++---
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -2971,23 +2971,22 @@ static void * dev_seq_start(struct seq_f
 {
struct sg_proc_deviter * it = kmalloc(sizeof(*it), GFP_KERNEL);
 
+   s-private = it;
if (! it)
return NULL;
+
if (NULL == sg_dev_arr)
-   goto err1;
+   return NULL;
it-index = *pos;
it-max = sg_last_dev();
if (it-index = it-max)
-   goto err1;
+   return NULL;
return it;
-err1:
-   kfree(it);
-   return NULL;
 }
 
 static void * dev_seq_next(struct seq_file *s, void *v, loff_t *pos)
 {
-   struct sg_proc_deviter * it = (struct sg_proc_deviter *) v;
+   struct sg_proc_deviter * it = s-private;
 
*pos = ++it-index;
return (it-index  it-max) ? it : NULL;
@@ -2995,7 +2994,7 @@ static void * dev_seq_next(struct seq_fi
 
 static void dev_seq_stop(struct seq_file *s, void *v)
 {
-   kfree (v);
+   kfree(s-private);
 }
 
 static int sg_proc_open_dev(struct inode *inode, struct file *file)
-
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] zfcp: add rports to enable scsi_add_device to work again

2005-08-27 Thread Linux Kernel Mailing List
tree a0f09490a7295bab3d299efdae5bd29c55c58c3a
parent 729d70f5dfd663b44bca68a4479c96bde7e535d6
author Andreas Herrmann [EMAIL PROTECTED] Sun, 28 Aug 2005 01:07:54 -0700
committer Linus Torvalds [EMAIL PROTECTED] Sun, 28 Aug 2005 01:22:36 -0700

[PATCH] zfcp: add rports to enable scsi_add_device to work again

This patch fixes a severe problem with 2.6.13-rc7.

Due to recent SCSI changes it is not possible to add any LUNs to the zfcp
device driver anymore.  With registration of remote ports this is fixed.

Signed-off-by: Andreas Herrmann [EMAIL PROTECTED]
Acked-by: James Bottomley [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]

 drivers/s390/scsi/zfcp_aux.c  |   29 +++--
 drivers/s390/scsi/zfcp_ccw.c  |   10 ++
 drivers/s390/scsi/zfcp_def.h  |2 +-
 drivers/s390/scsi/zfcp_erp.c  |   25 ++---
 drivers/s390/scsi/zfcp_ext.h  |2 ++
 drivers/s390/scsi/zfcp_fsf.c  |1 +
 drivers/s390/scsi/zfcp_scsi.c |   25 -
 7 files changed, 63 insertions(+), 31 deletions(-)

diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -1299,13 +1299,10 @@ struct zfcp_port *
 zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status,
  u32 d_id)
 {
-   struct zfcp_port *port, *tmp_port;
+   struct zfcp_port *port;
int check_wwpn;
-   scsi_id_t scsi_id;
-   int found;
 
check_wwpn = !(status  ZFCP_STATUS_PORT_NO_WWPN);
-
/*
 * check that there is no port with this WWPN already in list
 */
@@ -1368,7 +1365,7 @@ zfcp_port_enqueue(struct zfcp_adapter *a
} else {
snprintf(port-sysfs_device.bus_id,
 BUS_ID_SIZE, 0x%016llx, wwpn);
-   port-sysfs_device.parent = adapter-ccw_device-dev;
+   port-sysfs_device.parent = adapter-ccw_device-dev;
}
port-sysfs_device.release = zfcp_sysfs_port_release;
dev_set_drvdata(port-sysfs_device, port);
@@ -1388,24 +1385,8 @@ zfcp_port_enqueue(struct zfcp_adapter *a
 
zfcp_port_get(port);
 
-   scsi_id = 1;
-   found = 0;
write_lock_irq(zfcp_data.config_lock);
-   list_for_each_entry(tmp_port, adapter-port_list_head, list) {
-   if (atomic_test_mask(ZFCP_STATUS_PORT_NO_SCSI_ID,
-tmp_port-status))
-   continue;
-   if (tmp_port-scsi_id != scsi_id) {
-   found = 1;
-   break;
-   }
-   scsi_id++;
-   }
-   port-scsi_id = scsi_id;
-   if (found)
-   list_add_tail(port-list, tmp_port-list);
-   else
-   list_add_tail(port-list, adapter-port_list_head);
+   list_add_tail(port-list, adapter-port_list_head);
atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, port-status);
atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING, port-status);
if (d_id == ZFCP_DID_DIRECTORY_SERVICE)
@@ -1422,11 +1403,15 @@ zfcp_port_enqueue(struct zfcp_adapter *a
 void
 zfcp_port_dequeue(struct zfcp_port *port)
 {
+   struct fc_port *rport;
+
zfcp_port_wait(port);
write_lock_irq(zfcp_data.config_lock);
list_del(port-list);
port-adapter-ports--;
write_unlock_irq(zfcp_data.config_lock);
+   if (port-rport)
+   fc_remote_port_delete(rport);
zfcp_adapter_put(port-adapter);
zfcp_sysfs_port_remove_files(port-sysfs_device,
 atomic_read(port-status));
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c
--- a/drivers/s390/scsi/zfcp_ccw.c
+++ b/drivers/s390/scsi/zfcp_ccw.c
@@ -202,9 +202,19 @@ static int
 zfcp_ccw_set_offline(struct ccw_device *ccw_device)
 {
struct zfcp_adapter *adapter;
+   struct zfcp_port *port;
+   struct fc_port *rport;
 
down(zfcp_data.config_sema);
adapter = dev_get_drvdata(ccw_device-dev);
+   /* might be racy, but we cannot take config_lock due to the fact that
+  fc_remote_port_delete might sleep */
+   list_for_each_entry(port, adapter-port_list_head, list)
+   if (port-rport) {
+   rport = port-rport;
+   port-rport = NULL;
+   fc_remote_port_delete(rport);
+   }
zfcp_erp_adapter_shutdown(adapter, 0);
zfcp_erp_wait(adapter);
zfcp_adapter_scsi_unregister(adapter);
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -906,6 +906,7 @@ struct zfcp_adapter {
  */
 struct zfcp_port {
struct device  sysfs_device;   /* sysfs device */
+   struct fc_rport*rport; /* rport of fc transport 

  1   2   3   4   5   6   7   8   9   10   >