ACPI: EC: Fix "no battery" regression

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c019b1933015ee31366eeaa085bad3ee9516991c
Commit: c019b1933015ee31366eeaa085bad3ee9516991c
Parent: 39d3520c92cf7a28c07229ca00cc35a1e8026c77
Author: Alexey Starikovskiy <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 01:03:42 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 01:03:42 2007 -0400

ACPI: EC: Fix "no battery" regression

Restore deleted call to register query methods.

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

Signed-off-by: Alexey Starikovskiy <[EMAIL PROTECTED]>
Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/ec.c |   17 +
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 2300d81..56bee9e 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -652,6 +652,19 @@ static struct acpi_ec *make_acpi_ec(void)
 }
 
 static acpi_status
+acpi_ec_register_query_methods(acpi_handle handle, u32 level,
+  void *context, void **return_value)
+{
+   struct acpi_namespace_node *node = handle;
+   struct acpi_ec *ec = context;
+   int value = 0;
+   if (sscanf(node->name.ascii, "_Q%x", &value) == 1) {
+   acpi_ec_add_query_handler(ec, value, handle, NULL, NULL);
+   }
+   return AE_OK;
+}
+
+static acpi_status
 ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
 {
acpi_status status;
@@ -668,6 +681,10 @@ ec_parse_device(acpi_handle handle, u32 Level, void 
*context, void **retval)
if (ACPI_FAILURE(status))
return status;
 
+   /* Find and register all query methods */
+   acpi_walk_namespace(ACPI_TYPE_METHOD, handle, 1,
+   acpi_ec_register_query_methods, ec, NULL);
+
/* Use the global lock for all EC transactions? */
acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock);
 
-
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


myri10ge: Use the pause counter to avoid a needless device reset

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=626fda948839fc2f488f527076b8f42b1b7a4687
Commit: 626fda948839fc2f488f527076b8f42b1b7a4687
Parent: b47157f00414f368f2847697ce48b76f1a5e5110
Author: Brice Goglin <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 9 09:02:14 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 01:27:10 2007 -0400

myri10ge: Use the pause counter to avoid a needless device reset

Use the pause counter to avoid a needless device reset, and
print a message telling the admin that our link partner is
flow controlling us down to 0 pkts/sec.

Signed-off-by: Brice Goglin <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/myri10ge/myri10ge.c |   25 ++---
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index deca653..ae9bb7b 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -191,6 +191,7 @@ struct myri10ge_priv {
struct timer_list watchdog_timer;
int watchdog_tx_done;
int watchdog_tx_req;
+   int watchdog_pause;
int watchdog_resets;
int tx_linearized;
int pause;
@@ -2800,6 +2801,7 @@ static void myri10ge_watchdog(struct work_struct *work)
 static void myri10ge_watchdog_timer(unsigned long arg)
 {
struct myri10ge_priv *mgp;
+   u32 rx_pause_cnt;
 
mgp = (struct myri10ge_priv *)arg;
 
@@ -2816,19 +2818,28 @@ static void myri10ge_watchdog_timer(unsigned long arg)
myri10ge_fill_thresh)
mgp->rx_big.watchdog_needed = 0;
}
+   rx_pause_cnt = ntohl(mgp->fw_stats->dropped_pause);
 
if (mgp->tx.req != mgp->tx.done &&
mgp->tx.done == mgp->watchdog_tx_done &&
-   mgp->watchdog_tx_req != mgp->watchdog_tx_done)
+   mgp->watchdog_tx_req != mgp->watchdog_tx_done) {
/* nic seems like it might be stuck.. */
-   schedule_work(&mgp->watchdog_work);
-   else
-   /* rearm timer */
-   mod_timer(&mgp->watchdog_timer,
- jiffies + myri10ge_watchdog_timeout * HZ);
-
+   if (rx_pause_cnt != mgp->watchdog_pause) {
+   if (net_ratelimit())
+   printk(KERN_WARNING "myri10ge %s:"
+  "TX paused, check link partner\n",
+  mgp->dev->name);
+   } else {
+   schedule_work(&mgp->watchdog_work);
+   return;
+   }
+   }
+   /* rearm timer */
+   mod_timer(&mgp->watchdog_timer,
+ jiffies + myri10ge_watchdog_timeout * HZ);
mgp->watchdog_tx_done = mgp->tx.done;
mgp->watchdog_tx_req = mgp->tx.req;
+   mgp->watchdog_pause = rx_pause_cnt;
 }
 
 static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id 
*ent)
-
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


ax88796 printk fixes

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b4efe22cc987f4cd68ff838556580c0cc8c64cbc
Commit: b4efe22cc987f4cd68ff838556580c0cc8c64cbc
Parent: 626fda948839fc2f488f527076b8f42b1b7a4687
Author: Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 14:05:21 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 01:34:53 2007 -0400

ax88796 printk fixes

drivers/net/ax88796.c: In function `ax_probe':
drivers/net/ax88796.c:825: warning: size_t format, different type arg (arg 
4)
drivers/net/ax88796.c:825: warning: size_t format, different type arg (arg 
5)

resource_size_t isn't size_t.

Cc: Jeff Garzik <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/ax88796.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c
index 83da177..90e0734 100644
--- a/drivers/net/ax88796.c
+++ b/drivers/net/ax88796.c
@@ -821,8 +821,9 @@ static int ax_probe(struct platform_device *pdev)
dev->base_addr = (unsigned long)ei_status.mem;
 
if (ei_status.mem == NULL) {
-   dev_err(&pdev->dev, "Cannot ioremap area (%08zx,%08zx)\n",
-   res->start, res->end);
+   dev_err(&pdev->dev, "Cannot ioremap area (%08llx,%08llx)\n",
+   (unsigned long long)res->start,
+   (unsigned long long)res->end);
 
ret = -ENXIO;
goto exit_req;
-
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


3c59x maintainer

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a6d89915aa668776494fec8568d46aa6043ff848
Commit: a6d89915aa668776494fec8568d46aa6043ff848
Parent: 373492d0bdc66680ee598fd5a63e1914631b2522
Author: Steffen Klassert <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 14:05:27 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 01:38:37 2007 -0400

3c59x maintainer

Add 3c59x maintainer.

Signed-off-by: Steffen Klassert <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 MAINTAINERS |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index d3a0684..e4dde7f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -97,6 +97,12 @@ M:   [EMAIL PROTECTED]
 L: [EMAIL PROTECTED]
 S: Maintained
 
+3C59X NETWORK DRIVER
+P: Steffen Klassert
+M: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
+S: Maintained
+
 3CR990 NETWORK DRIVER
 P: David Dillow
 M: [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


via-rhine: disable rx_copybreak on archs that don't allow unaligned DMA access

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b47157f00414f368f2847697ce48b76f1a5e5110
Commit: b47157f00414f368f2847697ce48b76f1a5e5110
Parent: 39d3520c92cf7a28c07229ca00cc35a1e8026c77
Author: Dustin Marquess <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 14:05:15 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 01:27:10 2007 -0400

via-rhine: disable rx_copybreak on archs that don't allow unaligned DMA 
access

Patch to disable the rx_copybreak feature on hardware architectures that
don't allow unaligned DMA access.

#ifdef code taken from tulip_core.c.  Problem pointed out by Ivan
Kokshaysky.

Signed-off-by: Dustin Marquess <[EMAIL PROTECTED]>
Cc: Francois Romieu <[EMAIL PROTECTED]>
Cc: Ivan Kokshaysky <[EMAIL PROTECTED]>
Cc: Jeff Garzik <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/via-rhine.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index c3fe230..b56dff2 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -42,7 +42,13 @@ static int max_interrupt_work = 20;
 
 /* Set the copy breakpoint for the copy-only-tiny-frames scheme.
Setting to > 1518 effectively disables this feature. */
+#if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \
+   || defined(CONFIG_SPARC) || defined(__ia64__) \
+   || defined(__sh__) || defined(__mips__)
+static int rx_copybreak = 1518;
+#else
 static int rx_copybreak;
+#endif
 
 /* Work-around for broken BIOSes: they are unable to get the chip back out of
power state D3 so PXE booting fails. bootparam(7): via-rhine.avoid_D3=1 */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


natsemi: fix netdev error acounting

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c76720cf7ba63a3d179b6da8675653c8b01b6c0b
Commit: c76720cf7ba63a3d179b6da8675653c8b01b6c0b
Parent: b4efe22cc987f4cd68ff838556580c0cc8c64cbc
Author: Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 14:05:23 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 01:36:39 2007 -0400

natsemi: fix netdev error acounting

When a detailed netdev error is counted, we also must account for it in the
aggregated error count.

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

Cc: Tim Hockin <[EMAIL PROTECTED]>
Cc: Jeff Garzik <[EMAIL PROTECTED]>
Cc: Chongfeng Hu <[EMAIL PROTECTED]>
Cc: Natalie Protasevich <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/natsemi.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 6bb48ba..b47a12d 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -2438,13 +2438,16 @@ static void netdev_error(struct net_device *dev, int 
intr_status)
dev->name);
}
np->stats.rx_fifo_errors++;
+   np->stats.rx_errors++;
}
/* Hm, it's not clear how to recover from PCI faults. */
if (intr_status & IntrPCIErr) {
printk(KERN_NOTICE "%s: PCI error %#08x\n", dev->name,
intr_status & IntrPCIErr);
np->stats.tx_fifo_errors++;
+   np->stats.tx_errors++;
np->stats.rx_fifo_errors++;
+   np->stats.rx_errors++;
}
spin_unlock(&np->lock);
 }
-
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


xen-netfront: Avoid deref'ing skbafter it is potentially freed.

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=10a273a67343e1f317652d69b09a212ee0284b44
Commit: 10a273a67343e1f317652d69b09a212ee0284b44
Parent: a6d89915aa668776494fec8568d46aa6043ff848
Author: Jeremy Fitzhardinge <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 13 12:54:37 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 01:51:09 2007 -0400

xen-netfront: Avoid deref'ing skbafter it is potentially freed.

xennet_tx_bug_gc can free the skb before we use it, so make sure we don't.

Signed-off-by: Keir Fraser <[EMAIL PROTECTED]>
Signed-off-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]>
Cc: Jeff Garzik <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/xen-netfront.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 489f69c..4445810 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -566,6 +566,10 @@ static int xennet_start_xmit(struct sk_buff *skb, struct 
net_device *dev)
if (notify)
notify_remote_via_irq(np->netdev->irq);
 
+   np->stats.tx_bytes += skb->len;
+   np->stats.tx_packets++;
+
+   /* Note: It is not safe to access skb after xennet_tx_buf_gc()! */
xennet_tx_buf_gc(dev);
 
if (!netfront_tx_slot_available(np))
@@ -573,9 +577,6 @@ static int xennet_start_xmit(struct sk_buff *skb, struct 
net_device *dev)
 
spin_unlock_irq(&np->tx_lock);
 
-   np->stats.tx_bytes += skb->len;
-   np->stats.tx_packets++;
-
return 0;
 
  drop:
-
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


[ATM]: fore200e_param_bs_queue() must be __devinit

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8aee929eda10b2502fd76c0bf2003f89f7992820
Commit: 8aee929eda10b2502fd76c0bf2003f89f7992820
Parent: 39d3520c92cf7a28c07229ca00cc35a1e8026c77
Author: Adrian Bunk <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:14:18 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:51:58 2007 -0700

[ATM]: fore200e_param_bs_queue() must be __devinit

WARNING: drivers/built-in.o(.text+0x6203bb): Section mismatch: reference to 
.init.text:fore200e_param_bs_queue (between 'fore200e_initialize' and 
'fore200e_monitor_putc')

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/atm/fore200e.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 405ee5e..8b12925 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -2435,7 +2435,7 @@ fore200e_init_cmd_queue(struct fore200e* fore200e)
 }
 
 
-static void __init
+static void __devinit
 fore200e_param_bs_queue(struct fore200e* fore200e,
enum buffer_scheme scheme, enum buffer_magn magn,
int queue_length, int pool_size, int supply_blksize)
-
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


e1000: Add device IDs of new 82571 board variants

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ce57a02c64052c3f1c62f30a902a937e6c316d88
Commit: ce57a02c64052c3f1c62f30a902a937e6c316d88
Parent: 10a273a67343e1f317652d69b09a212ee0284b44
Author: Auke Kok <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 9 14:09:34 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 01:54:47 2007 -0400

e1000: Add device IDs of new 82571 board variants

This patch adds support for 2 new board variants:
- A Quad port fiber 82571 board
- A blade version of the 82571 quad copper board

Signed-off-by: Auke Kok <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/e1000/e1000_ethtool.c |2 ++
 drivers/net/e1000/e1000_hw.c  |5 +
 drivers/net/e1000/e1000_hw.h  |3 +++
 drivers/net/e1000/e1000_main.c|4 
 4 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/net/e1000/e1000_ethtool.c 
b/drivers/net/e1000/e1000_ethtool.c
index c90c92e..4c3785c 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -1706,6 +1706,7 @@ static int e1000_wol_exclusion(struct e1000_adapter 
*adapter, struct ethtool_wol
case E1000_DEV_ID_82545EM_COPPER:
case E1000_DEV_ID_82546GB_QUAD_COPPER:
case E1000_DEV_ID_82546GB_PCIE:
+   case E1000_DEV_ID_82571EB_SERDES_QUAD:
/* these don't support WoL at all */
wol->supported = 0;
break;
@@ -1723,6 +1724,7 @@ static int e1000_wol_exclusion(struct e1000_adapter 
*adapter, struct ethtool_wol
retval = 0;
break;
case E1000_DEV_ID_82571EB_QUAD_COPPER:
+   case E1000_DEV_ID_82571EB_QUAD_FIBER:
case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
/* quad port adapters only support WoL on port A */
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 9be4469..ba120f7 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -384,7 +384,10 @@ e1000_set_mac_type(struct e1000_hw *hw)
case E1000_DEV_ID_82571EB_COPPER:
case E1000_DEV_ID_82571EB_FIBER:
case E1000_DEV_ID_82571EB_SERDES:
+   case E1000_DEV_ID_82571EB_SERDES_DUAL:
+   case E1000_DEV_ID_82571EB_SERDES_QUAD:
case E1000_DEV_ID_82571EB_QUAD_COPPER:
+   case E1000_DEV_ID_82571EB_QUAD_FIBER:
case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
hw->mac_type = e1000_82571;
break;
@@ -485,6 +488,8 @@ e1000_set_media_type(struct e1000_hw *hw)
 case E1000_DEV_ID_82545GM_SERDES:
 case E1000_DEV_ID_82546GB_SERDES:
 case E1000_DEV_ID_82571EB_SERDES:
+case E1000_DEV_ID_82571EB_SERDES_DUAL:
+case E1000_DEV_ID_82571EB_SERDES_QUAD:
 case E1000_DEV_ID_82572EI_SERDES:
 case E1000_DEV_ID_80003ES2LAN_SERDES_DPT:
 hw->media_type = e1000_media_type_internal_serdes;
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index bd000b8..fe87146 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -475,7 +475,10 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
 #define E1000_DEV_ID_82571EB_FIBER   0x105F
 #define E1000_DEV_ID_82571EB_SERDES  0x1060
 #define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4
+#define E1000_DEV_ID_82571EB_QUAD_FIBER  0x10A5
 #define E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE  0x10BC
+#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9
+#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA
 #define E1000_DEV_ID_82572EI_COPPER  0x107D
 #define E1000_DEV_ID_82572EI_FIBER   0x107E
 #define E1000_DEV_ID_82572EI_SERDES  0x107F
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index f48b659..4a22595 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -100,6 +100,7 @@ static struct pci_device_id e1000_pci_tbl[] = {
INTEL_E1000_ETHERNET_DEVICE(0x1099),
INTEL_E1000_ETHERNET_DEVICE(0x109A),
INTEL_E1000_ETHERNET_DEVICE(0x10A4),
+   INTEL_E1000_ETHERNET_DEVICE(0x10A5),
INTEL_E1000_ETHERNET_DEVICE(0x10B5),
INTEL_E1000_ETHERNET_DEVICE(0x10B9),
INTEL_E1000_ETHERNET_DEVICE(0x10BA),
@@ -107,6 +108,8 @@ static struct pci_device_id e1000_pci_tbl[] = {
INTEL_E1000_ETHERNET_DEVICE(0x10BC),
INTEL_E1000_ETHERNET_DEVICE(0x10C4),
INTEL_E1000_ETHERNET_DEVICE(0x10C5),
+   INTEL_E1000_ETHERNET_DEVICE(0x10D9),
+   INTEL_E1000_ETHERNET_DEVICE(0x10DA),
/* required last entry */
{0,}
 };
@@ -1096,6 +1099,7 @@ e1000_probe(struct pci_dev *pdev,
break;
case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
case E1000_DEV_ID_82571EB_QUAD_COPPER:
+   case E1000_DEV_ID_82571EB_QUAD_FIBER:
case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:

[IPCONFIG]: ip_auto_config fix

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dcbdc93c6c64daf20622d6deae774d1e740efb8d
Commit: dcbdc93c6c64daf20622d6deae774d1e740efb8d
Parent: 8aee929eda10b2502fd76c0bf2003f89f7992820
Author: Joakim Tjernlund <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:14:54 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:51:59 2007 -0700

[IPCONFIG]: ip_auto_config fix

The following commandline:

 root=/dev/mtdblock6 rw rootfstype=jffs2 
ip=192.168.1.10:::255.255.255.0:localhost.localdomain:eth1:off 
console=ttyS0,115200

makes ip_auto_config fall back to DHCP and complain "IP-Config: Incomplete
network configuration information." depending on if CONFIG_IP_PNP_DHCP is
set or not.

The only way I can make ip_auto_config accept my IP config is to add an
entry for the server IP:

ip=192.168.1.10:192.168.1.15::255.255.255.0:localhost.localdomain:eth1:off

I think this is a bug since I am not using a NFS root FS.

The following patch fixes the above problem.

From: Andrew Morton <[EMAIL PROTECTED]>

Davem said (in February!):

  Well, first of all the change in question is not in 2.4.x either.  I just
  checked the current 2.4.x GIT tree and the test is exactly:

if (ic_myaddr == INADDR_NONE ||
#ifdef CONFIG_ROOT_NFS
(MAJOR(ROOT_DEV) == UNNAMED_MAJOR
 && root_server_addr == INADDR_NONE
 && ic_servaddr == INADDR_NONE) ||
#endif
ic_first_dev->next) {

  which matches 2.6.x

  I even checked 2.4.x when it was branched for 2.5.x and the test was the
  same at the point in time too.

  Looking at the proposed change a bit it appears that it is probably
  correct, as it's trying to check that ROOT_DEV is nfs root.  But if it is
  correct then the UNNAMED_MAJOR comparison in the same code block should be
  removed as it becomes superfluous.

  I'm happy to apply this patch with that modification made.

Signed-off-by: Joakim Tjernlund <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/ipconfig.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 342ca8d..c5b2470 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -1281,9 +1281,9 @@ static int __init ip_auto_config(void)
 */
if (ic_myaddr == NONE ||
 #ifdef CONFIG_ROOT_NFS
-   (MAJOR(ROOT_DEV) == UNNAMED_MAJOR
-&& root_server_addr == NONE
-&& ic_servaddr == NONE) ||
+   (root_server_addr == NONE
+&& ic_servaddr == NONE
+&& ROOT_DEV == Root_NFS) ||
 #endif
ic_first_dev->next) {
 #ifdef IPCONFIG_DYNAMIC
-
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


[ATM]: Clean up duplicate includes in drivers/atm/

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=af3502184aee8a0af6da8678e84c3d5bc5cdb83f
Commit: af3502184aee8a0af6da8678e84c3d5bc5cdb83f
Parent: dcbdc93c6c64daf20622d6deae774d1e740efb8d
Author: Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:15:55 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:00 2007 -0700

[ATM]: Clean up duplicate includes in drivers/atm/

This patch cleans up duplicate includes in
drivers/atm/

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/atm/lanai.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index 55fd1b4..144a49f 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -65,7 +65,6 @@
 #include 
 #include 
 #include 
-#include 
 
 /*  TUNABLE PARAMATERS: */
 
-
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


[ATM]: Clean up duplicate includes in net/atm/

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6869a35b365c027b7acf50585c5bb34e34d4c41c
Commit: 6869a35b365c027b7acf50585c5bb34e34d4c41c
Parent: af3502184aee8a0af6da8678e84c3d5bc5cdb83f
Author: Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:16:42 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:01 2007 -0700

[ATM]: Clean up duplicate includes in net/atm/

This patch cleans up duplicate includes in
net/atm/

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/atm/lec.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/atm/lec.c b/net/atm/lec.c
index 2770fb4..59d5aa3 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -21,7 +21,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 /* TokenRing if needed */
-
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


[IPV6]: Clean up duplicate includes in net/ipv6/

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=703310e645c639a84e7f4b35d8a508acde9ef360
Commit: 703310e645c639a84e7f4b35d8a508acde9ef360
Parent: f49f9967b263cc88b48d912172afdc621bcb0a3c
Author: Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:17:58 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:03 2007 -0700

[IPV6]: Clean up duplicate includes in net/ipv6/

This patch cleans up duplicate includes in
net/ipv6/

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv6/tcp_ipv6.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index cbdb784..0f7defb 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -56,7 +56,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-
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]: Clean up duplicate includes in net/ipv4/

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f49f9967b263cc88b48d912172afdc621bcb0a3c
Commit: f49f9967b263cc88b48d912172afdc621bcb0a3c
Parent: 6869a35b365c027b7acf50585c5bb34e34d4c41c
Author: Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:17:24 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:02 2007 -0700

[IPV4]: Clean up duplicate includes in net/ipv4/

This patch cleans up duplicate includes in
net/ipv4/

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/ip_output.c   |1 -
 net/ipv4/ipvs/ip_vs_ctl.c  |1 -
 net/ipv4/netfilter/ipt_CLUSTERIP.c |1 -
 3 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index c9e2b5e..0f1d7be 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -75,7 +75,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index e1052bc..c32781d 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -29,7 +29,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c 
b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index dcc12b1..69bd362 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -19,7 +19,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-
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


3c59x: fix duplex configuration

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=373492d0bdc66680ee598fd5a63e1914631b2522
Commit: 373492d0bdc66680ee598fd5a63e1914631b2522
Parent: c76720cf7ba63a3d179b6da8675653c8b01b6c0b
Author: Steffen Klassert <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 14:05:26 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 01:38:37 2007 -0400

3c59x: fix duplex configuration

A special sequence of ifconfig up/down and plug/unplug the cable can break
the duplex configuration of the driver.

Setting
vp->mii.full_duplex = vp->full_duplex
in vortex_up should fix this.

Addresses Bug 8575 3c59x duplex configuration broken
http://bugzilla.kernel.org/show_bug.cgi?id=8575

Cc: Martin Buck <[EMAIL PROTECTED]>
Signed-off-by: Steffen Klassert <[EMAIL PROTECTED]>
Cc: Natalie Protasevich <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/3c59x.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 001c66d..a8c0f43 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -1555,6 +1555,7 @@ vortex_up(struct net_device *dev)
mii_reg1 = mdio_read(dev, vp->phys[0], MII_BMSR);
mii_reg5 = mdio_read(dev, vp->phys[0], MII_LPA);
vp->partner_flow_ctrl = ((mii_reg5 & 0x0400) != 0);
+   vp->mii.full_duplex = vp->full_duplex;
 
vortex_check_media(dev, 1);
}
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PKT_SCHED]: Clean up duplicate includes in net/sched/

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a26f4cdc207db14a8e7192bac5a7c84d9e2390a
Commit: 0a26f4cdc207db14a8e7192bac5a7c84d9e2390a
Parent: 703310e645c639a84e7f4b35d8a508acde9ef360
Author: Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:18:31 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:04 2007 -0700

[PKT_SCHED]: Clean up duplicate includes in net/sched/

This patch cleans up duplicate includes in
net/sched/

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/sched/act_police.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index bf90e60..6085be5 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -16,7 +16,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-
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]: Clean up duplicate includes in net/sunrpc/

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=08dd2e29468d55f67fa346ede07ddfc58a60536b
Commit: 08dd2e29468d55f67fa346ede07ddfc58a60536b
Parent: 0a26f4cdc207db14a8e7192bac5a7c84d9e2390a
Author: Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:19:09 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:05 2007 -0700

[SUNRPC]: Clean up duplicate includes in net/sunrpc/

This patch cleans up duplicate includes in
net/sunrpc/

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/sunrpc/auth_gss/svcauth_gss.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/sunrpc/auth_gss/svcauth_gss.c 
b/net/sunrpc/auth_gss/svcauth_gss.c
index dc2f41e..7da7050 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -42,7 +42,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
-
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


[XFRM]: Clean up duplicate includes in net/xfrm/

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b5890d8ba47741425fe3c0d753e1b57bc0561b7b
Commit: b5890d8ba47741425fe3c0d753e1b57bc0561b7b
Parent: 897c77cab0c386103e1c51fe8f3fc7eb5d1eb37f
Author: Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:20:21 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:08 2007 -0700

[XFRM]: Clean up duplicate includes in net/xfrm/

This patch cleans up duplicate includes in
net/xfrm/

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/xfrm/xfrm_policy.c |3 +--
 net/xfrm/xfrm_state.c  |3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index e5a3be0..7012891 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -23,10 +23,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
-#include 
-#include 
 
 #include "xfrm_hash.h"
 
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 31be405..d4356e6 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -19,9 +19,8 @@
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
+#include 
 
 #include "xfrm_hash.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


[TIPC]: Clean up duplicate includes in net/tipc/

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=897c77cab0c386103e1c51fe8f3fc7eb5d1eb37f
Commit: 897c77cab0c386103e1c51fe8f3fc7eb5d1eb37f
Parent: 08dd2e29468d55f67fa346ede07ddfc58a60536b
Author: Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:19:43 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:07 2007 -0700

[TIPC]: Clean up duplicate includes in net/tipc/

This patch cleans up duplicate includes in
net/tipc/

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/tipc/port.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/tipc/port.c b/net/tipc/port.c
index 5d2b9ce..7608815 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -41,7 +41,6 @@
 #include "addr.h"
 #include "link.h"
 #include "node.h"
-#include "port.h"
 #include "name_table.h"
 #include "user_reg.h"
 #include "msg.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


[DCCP]: fix theoretical ccids_{read,write}_lock() race

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d725fdc8027a4cd961f58d92917fbb91b171abfa
Commit: d725fdc8027a4cd961f58d92917fbb91b171abfa
Parent: b5890d8ba47741425fe3c0d753e1b57bc0561b7b
Author: Oleg Nesterov <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:21:17 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:09 2007 -0700

[DCCP]: fix theoretical ccids_{read,write}_lock() race

Make sure that spin_unlock_wait() is properly ordered wrt atomic_inc().

(akpm: can't we convert this code to use rwlocks?)

Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/dccp/ccid.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c
index ccbf72c..c45088b 100644
--- a/net/dccp/ccid.c
+++ b/net/dccp/ccid.c
@@ -40,6 +40,7 @@ static inline void ccids_write_unlock(void)
 static inline void ccids_read_lock(void)
 {
atomic_inc(&ccids_lockct);
+   smp_mb__after_atomic_inc();
spin_unlock_wait(&ccids_lock);
 }
 
-
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


[DCCP]: fix memory leak and clean up style - dccp_feat_empty_confirm()

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e576de82ee628f68e5a44527c7ee99eadeab2e62
Commit: e576de82ee628f68e5a44527c7ee99eadeab2e62
Parent: d725fdc8027a4cd961f58d92917fbb91b171abfa
Author: Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:23:54 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:10 2007 -0700

[DCCP]: fix memory leak and clean up style - dccp_feat_empty_confirm()

There's a memory leak in net/dccp/feat.c::dccp_feat_empty_confirm().  If we
hit the 'default:' case of the 'switch' statement, then we return without
freeing 'opt', thus leaking 'struct dccp_opt_pend' bytes.

The leak is fixed easily enough by adding a kfree(opt); before the return
statement.

The patch also changes the layout of the 'switch' to be more in line with
CodingStyle.

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
Acked-by: Ian McDonald <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/dccp/feat.c |   14 ++
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/net/dccp/feat.c b/net/dccp/feat.c
index cd845df..5ebdd86 100644
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -327,10 +327,16 @@ static void dccp_feat_empty_confirm(struct dccp_minisock 
*dmsk,
}
 
switch (type) {
-   case DCCPO_CHANGE_L: opt->dccpop_type = DCCPO_CONFIRM_R; break;
-   case DCCPO_CHANGE_R: opt->dccpop_type = DCCPO_CONFIRM_L; break;
-   default: DCCP_WARN("invalid type %d\n", type); return;
-
+   case DCCPO_CHANGE_L:
+   opt->dccpop_type = DCCPO_CONFIRM_R;
+   break;
+   case DCCPO_CHANGE_R:
+   opt->dccpop_type = DCCPO_CONFIRM_L;
+   break;
+   default:
+   DCCP_WARN("invalid type %d\n", type);
+   kfree(opt);
+   return;
}
opt->dccpop_feat = feature;
opt->dccpop_val  = 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


[WAN] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1ee325438cdbe374ebea6e3d2f19204072c15038
Commit: 1ee325438cdbe374ebea6e3d2f19204072c15038
Parent: e576de82ee628f68e5a44527c7ee99eadeab2e62
Author: Mariusz Kozlowski <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:24:50 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:11 2007 -0700

[WAN] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc

 drivers/net/wan/hdlc_fr.c | 31260 -> 31223 (-37 bytes)
 drivers/net/wan/hdlc_fr.o | 144872 -> 144728 (-144 bytes)

Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
Acked-by: Krzysztof Halasa <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
 drivers/net/wan/hdlc_fr.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c
index 15b6e07..071a64c 100644
--- a/drivers/net/wan/hdlc_fr.c
+++ b/drivers/net/wan/hdlc_fr.c
@@ -212,14 +212,13 @@ static pvc_device* add_pvc(struct net_device *dev, u16 
dlci)
pvc_p = &(*pvc_p)->next;
}
 
-   pvc = kmalloc(sizeof(pvc_device), GFP_ATOMIC);
+   pvc = kzalloc(sizeof(pvc_device), GFP_ATOMIC);
 #ifdef DEBUG_PVC
printk(KERN_DEBUG "add_pvc: allocated pvc %p, frad %p\n", pvc, dev);
 #endif
if (!pvc)
return NULL;
 
-   memset(pvc, 0, sizeof(pvc_device));
pvc->dlci = dlci;
pvc->frad = dev;
pvc->next = *pvc_p; /* Put it in the chain */
-
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


[IRDA] irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=48e3eeb1a1a89a3ea256cf6d3c898e753787cfaa
Commit: 48e3eeb1a1a89a3ea256cf6d3c898e753787cfaa
Parent: 1ee325438cdbe374ebea6e3d2f19204072c15038
Author: Mariusz Kozlowski <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:25:40 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:12 2007 -0700

[IRDA] irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc

 drivers/net/irda/irda-usb.c | 59694 -> 59541 (-153 bytes)
 drivers/net/irda/irda-usb.o | 170588 -> 169256 (-1332 bytes)

Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/irda/irda-usb.c |   24 ++--
 1 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
index 0ac240c..3b0fd83 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -1561,10 +1561,9 @@ static inline struct irda_class_desc 
*irda_usb_find_class_desc(struct usb_interf
struct irda_class_desc *desc;
int ret;
 
-   desc = kmalloc(sizeof (*desc), GFP_KERNEL);
-   if (desc == NULL) 
+   desc = kzalloc(sizeof(*desc), GFP_KERNEL);
+   if (!desc)
return NULL;
-   memset(desc, 0, sizeof(*desc));
 
/* USB-IrDA class spec 1.0:
 *  6.1.3: Standard "Get Descriptor" Device Request is not
@@ -1617,7 +1616,7 @@ static int irda_usb_probe(struct usb_interface *intf,
 {
struct net_device *net;
struct usb_device *dev = interface_to_usbdev(intf);
-   struct irda_usb_cb *self = NULL;
+   struct irda_usb_cb *self;
struct usb_host_interface *interface;
struct irda_class_desc *irda_desc;
int ret = -ENOMEM;
@@ -1655,7 +1654,7 @@ static int irda_usb_probe(struct usb_interface *intf,
self->header_length = USB_IRDA_HEADER;
}
 
-   self->rx_urb = kzalloc(self->max_rx_urb * sizeof(struct urb *),
+   self->rx_urb = kcalloc(self->max_rx_urb, sizeof(struct urb *),
GFP_KERNEL);
 
for (i = 0; i < self->max_rx_urb; i++) {
@@ -1715,7 +1714,7 @@ static int irda_usb_probe(struct usb_interface *intf,
/* Find IrDA class descriptor */
irda_desc = irda_usb_find_class_desc(intf);
ret = -ENODEV;
-   if (irda_desc == NULL)
+   if (!irda_desc)
goto err_out_3;
 
if (self->needspatch) {
@@ -1738,15 +1737,13 @@ static int irda_usb_probe(struct usb_interface *intf,
/* Don't change this buffer size and allocation without doing
 * some heavy and complete testing. Don't ask why :-(
 * Jean II */
-   self->speed_buff = kmalloc(IRDA_USB_SPEED_MTU, GFP_KERNEL);
-   if (self->speed_buff == NULL) 
+   self->speed_buff = kzalloc(IRDA_USB_SPEED_MTU, GFP_KERNEL);
+   if (!self->speed_buff)
goto err_out_3;
 
-   memset(self->speed_buff, 0, IRDA_USB_SPEED_MTU);
-
self->tx_buff = kzalloc(IRDA_SKB_MAX_MTU + self->header_length,
GFP_KERNEL);
-   if (self->tx_buff == NULL)
+   if (!self->tx_buff)
goto err_out_4;
 
ret = irda_usb_open(self);
@@ -1767,12 +1764,11 @@ static int irda_usb_probe(struct usb_interface *intf,
 
/* replace IrDA class descriptor with what patched device is 
now reporting */
irda_desc = irda_usb_find_class_desc (self->usbintf);
-   if (irda_desc == NULL) {
+   if (!irda_desc) {
ret = -ENODEV;
goto err_out_6;
}
-   if (self->irda_desc)
-   kfree (self->irda_desc);
+   kfree(self->irda_desc);
self->irda_desc = irda_desc;
irda_usb_init_qos(self);
}
-
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


[ATM] drivers/atm/iphase.c: mostly kmalloc + memset conversion to kzalloc

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f71417614d63932cf56ed98a0947568d6259d11e
Commit: f71417614d63932cf56ed98a0947568d6259d11e
Parent: 48e3eeb1a1a89a3ea256cf6d3c898e753787cfaa
Author: Mariusz Kozlowski <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:26:18 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:13 2007 -0700

[ATM] drivers/atm/iphase.c: mostly kmalloc + memset conversion to kzalloc

 drivers/atm/iphase.c | 111508 -> 111431 (-77 bytes)
 drivers/atm/iphase.o | 254740 -> 254260 (-480 bytes)

Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/atm/iphase.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index a3b605a..ef52452 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -1601,14 +1601,14 @@ static int rx_init(struct atm_dev *dev)
   
skb_queue_head_init(&iadev->rx_dma_q);  
iadev->rx_free_desc_qhead = NULL;   
-   iadev->rx_open = kmalloc(4*iadev->num_vc,GFP_KERNEL);
-   if (!iadev->rx_open)  
-   {  
+
+   iadev->rx_open = kzalloc(4 * iadev->num_vc, GFP_KERNEL);
+   if (!iadev->rx_open) {
printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n",
dev->number);  
goto err_free_dle;
}  
-   memset(iadev->rx_open, 0, 4*iadev->num_vc);  
+
 iadev->rxing = 1;
 iadev->rx_pkt_cnt = 0;
/* Mode Register */  
@@ -3171,12 +3171,12 @@ static int __devinit ia_init_one(struct pci_dev *pdev,
 unsigned long flags;
int ret;
 
-   iadev = kmalloc(sizeof(*iadev), GFP_KERNEL); 
+   iadev = kzalloc(sizeof(*iadev), GFP_KERNEL);
if (!iadev) {
ret = -ENOMEM;
goto err_out;
}
-   memset(iadev, 0, sizeof(*iadev));
+
iadev->pci = pdev;
 
IF_INIT(printk("ia detected at bus:%d dev: %d function:%d\n",
-
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]: Share correct feature code between bridging and bonding

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7f353bf29e162459f2f1e2ca25e41011fae65241
Commit: 7f353bf29e162459f2f1e2ca25e41011fae65241
Parent: f71417614d63932cf56ed98a0947568d6259d11e
Author: Herbert Xu <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:47:58 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:14 2007 -0700

[NET]: Share correct feature code between bridging and bonding

http://bugzilla.kernel.org/show_bug.cgi?id=8797 shows that the
bonding driver may produce bogus combinations of the checksum
flags and SG/TSO.

For example, if you bond devices with NETIF_F_HW_CSUM and
NETIF_F_IP_CSUM you'll end up with a bonding device that
has neither flag set.  If both have TSO then this produces
an illegal combination.

The bridge device on the other hand has the correct code to
deal with this.

In fact, the same code can be used for both.  So this patch
moves that logic into net/core/dev.c and uses it for both
bonding and bridging.

In the process I've made small adjustments such as only
setting GSO_ROBUST if at least one constituent device
supports it.

Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/bonding/bond_main.c |   34 +-
 include/linux/netdevice.h   |2 ++
 net/bridge/br_device.c  |2 +-
 net/bridge/br_if.c  |   36 
 net/core/dev.c  |   39 +++
 5 files changed, 59 insertions(+), 54 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 070b78d..1afda32 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1202,43 +1202,35 @@ static int bond_sethwaddr(struct net_device *bond_dev,
return 0;
 }
 
-#define BOND_INTERSECT_FEATURES \
-   (NETIF_F_SG | NETIF_F_ALL_CSUM | NETIF_F_TSO | NETIF_F_UFO)
+#define BOND_VLAN_FEATURES \
+   (NETIF_F_VLAN_CHALLENGED | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX | \
+NETIF_F_HW_VLAN_FILTER)
 
 /* 
  * Compute the common dev->feature set available to all slaves.  Some
- * feature bits are managed elsewhere, so preserve feature bits set on
- * master device that are not part of the examined set.
+ * feature bits are managed elsewhere, so preserve those feature bits
+ * on the master device.
  */
 static int bond_compute_features(struct bonding *bond)
 {
-   unsigned long features = BOND_INTERSECT_FEATURES;
struct slave *slave;
struct net_device *bond_dev = bond->dev;
+   unsigned long features = bond_dev->features;
unsigned short max_hard_header_len = ETH_HLEN;
int i;
 
+   features &= ~(NETIF_F_ALL_CSUM | BOND_VLAN_FEATURES);
+   features |= NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
+   NETIF_F_GSO_MASK | NETIF_F_NO_CSUM;
+
bond_for_each_slave(bond, slave, i) {
-   features &= (slave->dev->features & BOND_INTERSECT_FEATURES);
+   features = netdev_compute_features(features,
+  slave->dev->features);
if (slave->dev->hard_header_len > max_hard_header_len)
max_hard_header_len = slave->dev->hard_header_len;
}
 
-   if ((features & NETIF_F_SG) && 
-   !(features & NETIF_F_ALL_CSUM))
-   features &= ~NETIF_F_SG;
-
-   /* 
-* features will include NETIF_F_TSO (NETIF_F_UFO) iff all 
-* slave devices support NETIF_F_TSO (NETIF_F_UFO), which 
-* implies that all slaves also support scatter-gather 
-* (NETIF_F_SG), which implies that features also includes 
-* NETIF_F_SG. So no need to check whether we have an  
-* illegal combination of NETIF_F_{TSO,UFO} and 
-* !NETIF_F_SG 
-*/
-
-   features |= (bond_dev->features & ~BOND_INTERSECT_FEATURES);
+   features |= (bond_dev->features & BOND_VLAN_FEATURES);
bond_dev->features = features;
bond_dev->hard_header_len = max_hard_header_len;
 
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 4a616d7..e679b27 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1131,6 +1131,8 @@ extern void dev_seq_stop(struct seq_file *seq, void *v);
 
 extern void linkwatch_run_queue(void);
 
+extern int netdev_compute_features(unsigned long all, unsigned long one);
+
 static inline int net_gso_ok(int features, int gso_type)
 {
int feature = gso_type << NETIF_F_GSO_SHIFT;
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 5e1892d..0eded17 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -179,5 +179,5 @@ void br_dev_setup(struct net_device *dev)
dev->pr

[IPVS]: Use IP_VS_WAIT_WHILE when encessary.

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cae7ca3d3de48851e929de9469397749638df779
Commit: cae7ca3d3de48851e929de9469397749638df779
Parent: 7f353bf29e162459f2f1e2ca25e41011fae65241
Author: Heiko Carstens <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 15:50:30 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Aug 13 22:52:15 2007 -0700

[IPVS]: Use IP_VS_WAIT_WHILE when encessary.

For architectures that don't have a volatile atomic_ts constructs like
while (atomic_read(&something)); might result in endless loops since a
barrier() is missing which forces the compiler to generate code that
actually reads memory contents.
Fix this in ipvs by using the IP_VS_WAIT_WHILE macro which resolves to
while (expr) { cpu_relax(); }
(why isn't this open coded btw?)

Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]>
Signed-off-by: Simon Horman <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/ipvs/ip_vs_ctl.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index c32781d..902fd57 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -908,7 +908,7 @@ ip_vs_edit_dest(struct ip_vs_service *svc, struct 
ip_vs_dest_user *udest)
write_lock_bh(&__ip_vs_svc_lock);
 
/* Wait until all other svc users go away */
-   while (atomic_read(&svc->usecnt) > 1) {};
+   IP_VS_WAIT_WHILE(atomic_read(&svc->usecnt) > 1);
 
/* call the update_service, because server weight may be changed */
svc->scheduler->update_service(svc);
-
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


i2c-i801: Typo: erroneous

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=002cf63191eb8b68b7fed48f014b87c456188acc
Commit: 002cf63191eb8b68b7fed48f014b87c456188acc
Parent: 39d3520c92cf7a28c07229ca00cc35a1e8026c77
Author: Jean Delvare <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 18:37:13 2007 +0200
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 18:37:13 2007 +0200

i2c-i801: Typo: erroneous

Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/busses/i2c-i801.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 8f5c686..289816d 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -272,11 +272,11 @@ static int i801_block_transaction_byte_by_byte(union 
i2c_smbus_data *data,
/* Make sure the SMBus host is ready to start transmitting */
temp = inb_p(SMBHSTSTS);
if (i == 1) {
-   /* Erronenous conditions before transaction:
+   /* Erroneous conditions before transaction:
 * Byte_Done, Failed, Bus_Err, Dev_Err, Intr, Host_Busy 
*/
errmask = 0x9f;
} else {
-   /* Erronenous conditions during transaction:
+   /* Erroneous conditions during transaction:
 * Failed, Bus_Err, Dev_Err, Intr */
errmask = 0x1e;
}
-
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


i2c-mpc: Pass correct dev_id to free_irq on error path

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=322454a65371477bed0eb1d189c50d781ebd7f85
Commit: 322454a65371477bed0eb1d189c50d781ebd7f85
Parent: 002cf63191eb8b68b7fed48f014b87c456188acc
Author: Scott Wood <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 18:37:14 2007 +0200
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 18:37:14 2007 +0200

i2c-mpc: Pass correct dev_id to free_irq on error path

Signed-off-by: Scott Wood <[EMAIL PROTECTED]>
Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/busses/i2c-mpc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 851c3ed..f7a81e9 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -362,7 +362,7 @@ static int fsl_i2c_probe(struct platform_device *pdev)
 
   fail_add:
if (i2c->irq != 0)
-   free_irq(i2c->irq, NULL);
+   free_irq(i2c->irq, i2c);
   fail_irq:
iounmap(i2c->base);
   fail_map:
-
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


i2c/isp1301_omap: Build fixes, whitespace

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=25da383d26a1dcca4f0205769a24e5eac79c6d35
Commit: 25da383d26a1dcca4f0205769a24e5eac79c6d35
Parent: 322454a65371477bed0eb1d189c50d781ebd7f85
Author: David Brownell <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 18:37:14 2007 +0200
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 18:37:14 2007 +0200

i2c/isp1301_omap: Build fixes, whitespace

Build fixes for isp1301_omap driver.  I think an earlier version
of this must have gotten lost somewhere, or maybe it only went
into the Linux-OMAP tree.

Also, some whitespace fixes to bring this more into sync with the
version of this found in the Linux-OMAP tree.  (That version has
updates for the OTG controller on the OMAP 1710 which break that
functionality on OMAP 161x boards like the H2, so merging all of
it is not currently an option.)

Signed-off-by: David Brownell <[EMAIL PROTECTED]>
Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/chips/isp1301_omap.c |   42 +++---
 1 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c
index 9fafadb..fe04e46 100644
--- a/drivers/i2c/chips/isp1301_omap.c
+++ b/drivers/i2c/chips/isp1301_omap.c
@@ -18,8 +18,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-#undef DEBUG
-#undef VERBOSE
 
 #include 
 #include 
@@ -44,7 +42,7 @@
 
 
 #defineDRIVER_VERSION  "24 August 2004"
-#defineDRIVER_NAME (isp1301_driver.name)
+#defineDRIVER_NAME (isp1301_driver.driver.name)
 
 MODULE_DESCRIPTION("ISP1301 USB OTG Transceiver Driver");
 MODULE_LICENSE("GPL");
@@ -55,6 +53,7 @@ struct isp1301 {
void(*i2c_release)(struct device *dev);
 
int irq;
+   int irq_type;
 
u32 last_otg_ctrl;
unsignedworking:1;
@@ -63,7 +62,7 @@ struct isp1301 {
 
/* use keventd context to change the state for us */
struct work_struct  work;
-   
+
unsigned long   todo;
 #  define WORK_UPDATE_ISP  0   /* update ISP from OTG */
 #  define WORK_UPDATE_OTG  1   /* update OTG from ISP */
@@ -94,7 +93,7 @@ struct isp1301 {
 
 /* board-specific PM hooks */
 
-#include 
+#include 
 #include 
 #include 
 
@@ -291,7 +290,7 @@ static void power_up(struct isp1301 *isp)
 {
// isp1301_clear_bits(isp, ISP1301_MODE_CONTROL_2, MC2_GLOBAL_PWR_DN);
isp1301_clear_bits(isp, ISP1301_MODE_CONTROL_1, MC1_SUSPEND_REG);
-   
+
/* do this only when cpu is driving transceiver,
 * so host won't see a low speed device...
 */
@@ -799,7 +798,7 @@ static irqreturn_t omap_otg_irq(int irq, void *_isp)
/* role is host */
} else {
if (!(otg_ctrl & OTG_ID)) {
-   otg_ctrl &= OTG_CTRL_MASK & ~OTG_XCEIV_INPUTS;
+   otg_ctrl &= OTG_CTRL_MASK & ~OTG_XCEIV_INPUTS;
OTG_CTRL_REG = otg_ctrl | OTG_A_BUSREQ;
}
 
@@ -1100,9 +1099,9 @@ static u8 isp1301_clear_latch(struct isp1301 *isp)
 }
 
 static void
-isp1301_work(void *data)
+isp1301_work(struct work_struct *work)
 {
-   struct isp1301  *isp = data;
+   struct isp1301  *isp = container_of(work, struct isp1301, work);
int stop;
 
/* implicit lock:  we're the only task using this device */
@@ -1244,7 +1243,7 @@ static int isp1301_detach_client(struct i2c_client *i2c)
  *  - DEVICE mode, for when there's a B/Mini-B (device) connector
  *
  * As a rule, you won't have an isp1301 chip unless it's there to
- * support the OTG mode.  Other modes help testing USB controllers 
+ * support the OTG mode.  Other modes help testing USB controllers
  * in isolation from (full) OTG support, or maybe so later board
  * revisions can help to support those feature.
  */
@@ -1260,9 +1259,9 @@ static int isp1301_otg_enable(struct isp1301 *isp)
 * a few more interrupts than are strictly needed.
 */
isp1301_set_bits(isp, ISP1301_INTERRUPT_RISING,
-   INTR_VBUS_VLD | INTR_SESS_VLD | INTR_ID_GND);
+   INTR_VBUS_VLD | INTR_SESS_VLD | INTR_ID_GND);
isp1301_set_bits(isp, ISP1301_INTERRUPT_FALLING,
-   INTR_VBUS_VLD | INTR_SESS_VLD | INTR_ID_GND);
+   INTR_VBUS_VLD | INTR_SESS_VLD | INTR_ID_GND);
 
dev_info(&isp->client.dev, "ready for dual-role USB ...\n");
 
@@ -1306,9 +1305,9 @@ isp1301_set_host(struct otg_transceiver *otg, struct 
usb_bus *host)
 
dev_info(&isp->client.dev, "A-Host sessions ok\n");
isp1301_set_bits(isp, ISP1301_INTE

i2c-iop3xx: Set I2C_CLASS_HWMON to adapter class

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=432ca994bf7107e88916fd9606ca7402a4571359
Commit: 432ca994bf7107e88916fd9606ca7402a4571359
Parent: 25da383d26a1dcca4f0205769a24e5eac79c6d35
Author: Arnaud Patard <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 18:37:14 2007 +0200
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 18:37:14 2007 +0200

i2c-iop3xx: Set I2C_CLASS_HWMON to adapter class

In order to be able to use sensors on the IOP3xx SoCs, one needs to set
the adapter class to I2C_CLASS_HWMON.

Signed-off-by: Arnaud Patard <[EMAIL PROTECTED]>
Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/busses/i2c-iop3xx.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c
index 440342b..ace644e 100644
--- a/drivers/i2c/busses/i2c-iop3xx.c
+++ b/drivers/i2c/busses/i2c-iop3xx.c
@@ -490,6 +490,7 @@ iop3xx_i2c_probe(struct platform_device *pdev)
memcpy(new_adapter->name, pdev->name, strlen(pdev->name));
new_adapter->id = I2C_HW_IOP3XX;
new_adapter->owner = THIS_MODULE;
+   new_adapter->class = I2C_CLASS_HWMON;
new_adapter->dev.parent = &pdev->dev;
new_adapter->nr = pdev->id;
 
-
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


i2c-mpc: Don't disable I2C module on stop condition

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5af0e07f87e7d9be2a9db514af1e338341240f6d
Commit: 5af0e07f87e7d9be2a9db514af1e338341240f6d
Parent: 432ca994bf7107e88916fd9606ca7402a4571359
Author: Domen Puncer <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 18:37:14 2007 +0200
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 18:37:14 2007 +0200

i2c-mpc: Don't disable I2C module on stop condition

Disabling module on stop doesn't work on some CPUs (ie. mpc8241,
as reported by Guennadi Liakhovetski), so remove that.

Disable I2C module on errors/interrupts to prevent it from
locking up on mpc5200b.

Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
Acked-by: Guennadi Liakhovetski <[EMAIL PROTECTED]>
Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/busses/i2c-mpc.c |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index f7a81e9..d8de4ac 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -105,6 +105,7 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, 
int writing)
schedule();
if (time_after(jiffies, orig_jiffies + timeout)) {
pr_debug("I2C: timeout\n");
+   writeccr(i2c, 0);
result = -EIO;
break;
}
@@ -116,10 +117,12 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned 
timeout, int writing)
result = wait_event_interruptible_timeout(i2c->queue,
(i2c->interrupt & CSR_MIF), timeout * HZ);
 
-   if (unlikely(result < 0))
+   if (unlikely(result < 0)) {
pr_debug("I2C: wait interrupted\n");
-   else if (unlikely(!(i2c->interrupt & CSR_MIF))) {
+   writeccr(i2c, 0);
+   } else if (unlikely(!(i2c->interrupt & CSR_MIF))) {
pr_debug("I2C: wait timeout\n");
+   writeccr(i2c, 0);
result = -ETIMEDOUT;
}
 
@@ -172,7 +175,6 @@ static void mpc_i2c_start(struct mpc_i2c *i2c)
 static void mpc_i2c_stop(struct mpc_i2c *i2c)
 {
writeccr(i2c, CCR_MEN);
-   writeccr(i2c, 0);
 }
 
 static int mpc_write(struct mpc_i2c *i2c, int target,
@@ -261,6 +263,7 @@ static int mpc_xfer(struct i2c_adapter *adap, struct 
i2c_msg *msgs, int num)
while (readb(i2c->base + MPC_I2C_SR) & CSR_MBB) {
if (signal_pending(current)) {
pr_debug("I2C: Interrupted\n");
+   writeccr(i2c, 0);
return -EINTR;
}
if (time_after(jiffies, orig_jiffies + HZ)) {
-
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


i2c-mv64xxx: Reinitialize hw and driver on I2C bus hang

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a07ad1cc0300931bfd76bfcd2da3ddad743f4a89
Commit: a07ad1cc0300931bfd76bfcd2da3ddad743f4a89
Parent: 5af0e07f87e7d9be2a9db514af1e338341240f6d
Author: Dale Farnsworth <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 18:37:14 2007 +0200
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 18:37:14 2007 +0200

i2c-mv64xxx: Reinitialize hw and driver on I2C bus hang

Under certain conditions, the mv64xxx I2C bus can hang preventing
further operation.  To make the driver more robust, we now reset
the I2C hardware and the driver state machine when such hangs are
detected.

Signed-off-by: Dale Farnsworth <[EMAIL PROTECTED]>
Acked-by: Mark A. Greer <[EMAIL PROTECTED]>
Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/busses/i2c-mv64xxx.c |   31 +--
 1 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 251154a..bb7bf68 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -107,6 +107,21 @@ struct mv64xxx_i2c_data {
  *
  *
  */
+
+/* Reset hardware and initialize FSM */
+static void
+mv64xxx_i2c_hw_init(struct mv64xxx_i2c_data *drv_data)
+{
+   writel(0, drv_data->reg_base + MV64XXX_I2C_REG_SOFT_RESET);
+   writeldrv_data->freq_m & 0xf) << 3) | (drv_data->freq_n & 0x7)),
+   drv_data->reg_base + MV64XXX_I2C_REG_BAUD);
+   writel(0, drv_data->reg_base + MV64XXX_I2C_REG_SLAVE_ADDR);
+   writel(0, drv_data->reg_base + MV64XXX_I2C_REG_EXT_SLAVE_ADDR);
+   writel(MV64XXX_I2C_REG_CONTROL_TWSIEN | MV64XXX_I2C_REG_CONTROL_STOP,
+   drv_data->reg_base + MV64XXX_I2C_REG_CONTROL);
+   drv_data->state = MV64XXX_I2C_STATE_IDLE;
+}
+
 static void
 mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status)
 {
@@ -203,7 +218,7 @@ mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 
status)
 drv_data->state, status, drv_data->msg->addr,
 drv_data->msg->flags);
drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP;
-   drv_data->state = MV64XXX_I2C_STATE_IDLE;
+   mv64xxx_i2c_hw_init(drv_data);
drv_data->rc = -EIO;
}
 }
@@ -367,6 +382,7 @@ mv64xxx_i2c_wait_for_completion(struct mv64xxx_i2c_data 
*drv_data)
"mv64xxx: I2C bus locked, block: %d, "
"time_left: %d\n", drv_data->block,
(int)time_left);
+   mv64xxx_i2c_hw_init(drv_data);
}
} else
spin_unlock_irqrestore(&drv_data->lock, flags);
@@ -443,19 +459,6 @@ static const struct i2c_algorithm mv64xxx_i2c_algo = {
  *
  *
  */
-static void __devinit
-mv64xxx_i2c_hw_init(struct mv64xxx_i2c_data *drv_data)
-{
-   writel(0, drv_data->reg_base + MV64XXX_I2C_REG_SOFT_RESET);
-   writeldrv_data->freq_m & 0xf) << 3) | (drv_data->freq_n & 0x7)),
-   drv_data->reg_base + MV64XXX_I2C_REG_BAUD);
-   writel(0, drv_data->reg_base + MV64XXX_I2C_REG_SLAVE_ADDR);
-   writel(0, drv_data->reg_base + MV64XXX_I2C_REG_EXT_SLAVE_ADDR);
-   writel(MV64XXX_I2C_REG_CONTROL_TWSIEN | MV64XXX_I2C_REG_CONTROL_STOP,
-   drv_data->reg_base + MV64XXX_I2C_REG_CONTROL);
-   drv_data->state = MV64XXX_I2C_STATE_IDLE;
-}
-
 static int __devinit
 mv64xxx_i2c_map_regs(struct platform_device *pd,
struct mv64xxx_i2c_data *drv_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


i2c/menelaus: Build fix

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c1147cc6d18389f6530bae27741b9b2665e862e6
Commit: c1147cc6d18389f6530bae27741b9b2665e862e6
Parent: a07ad1cc0300931bfd76bfcd2da3ddad743f4a89
Author: David Brownell <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 18:37:14 2007 +0200
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 18:37:14 2007 +0200

i2c/menelaus: Build fix

Fix Menelaus build error, and remove needless "#define DEBUG".

Signed-off-by: David Brownell <[EMAIL PROTECTED]>
Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/chips/menelaus.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/chips/menelaus.c b/drivers/i2c/chips/menelaus.c
index 48a7e2f..d9c92c5 100644
--- a/drivers/i2c/chips/menelaus.c
+++ b/drivers/i2c/chips/menelaus.c
@@ -1,4 +1,3 @@
-#define DEBUG
 /*
  * Copyright (C) 2004 Texas Instruments, Inc.
  *
@@ -933,7 +932,7 @@ static int menelaus_set_time(struct device *dev, struct 
rtc_time *t)
return status;
status = menelaus_write_reg(MENELAUS_RTC_WKDAY, BIN2BCD(t->tm_wday));
if (status < 0) {
-   dev_err(&the_menelaus->client->dev, "rtc write reg %02x",
+   dev_err(&the_menelaus->client->dev, "rtc write reg %02x "
"err %d\n", MENELAUS_RTC_WKDAY, status);
return 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


i2c-s3c2410: Build fix

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b5d0b4ba389711183b5af71438fe21b40ee32d6d
Commit: b5d0b4ba389711183b5af71438fe21b40ee32d6d
Parent: c1147cc6d18389f6530bae27741b9b2665e862e6
Author: Ben Dooks <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 18:37:15 2007 +0200
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 18:37:15 2007 +0200

i2c-s3c2410: Build fix

Fixup the include files after the arch moves that
where included in 2.6.23.

Signed-off-by: Ben Dooks <[EMAIL PROTECTED]>
Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/busses/i2c-s3c2410.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index e4540fc..c44ada5 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -39,8 +39,8 @@
 #include 
 
 #include 
-#include 
-#include 
+#include 
+#include 
 
 /* i2c controller state */
 
-
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


[DLM] Clear othercon pointers when a connection is closed

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=25720c2d73058f4f929f16093f60817ed52a285c
Commit: 25720c2d73058f4f929f16093f60817ed52a285c
Parent: 39d3520c92cf7a28c07229ca00cc35a1e8026c77
Author: Patrick Caulfield <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 11 13:39:43 2007 +0100
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 10:28:05 2007 +0100

[DLM] Clear othercon pointers when a connection is closed

This patch clears the othercon pointer and frees the memory when a 
connnection
is closed. This could cause a small memory leak when nodes leave the 
cluster.

Signed-Off-By: Patrick Caulfield <[EMAIL PROTECTED]>
Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/dlm/lowcomms.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index dd36273..d15fd5f 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -327,6 +327,8 @@ static void close_connection(struct connection *con, bool 
and_other)
if (con->othercon && and_other) {
/* Will only re-enter once. */
close_connection(con->othercon, false);
+   kmem_cache_free(con_cache, con->othercon);
+   con->othercon = NULL;
}
if (con->rx_page) {
__free_page(con->rx_page);
-
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


[DLM] fix NULL ls usage

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=41684f9547455b395ffd65e5b7961067d20a2872
Commit: 41684f9547455b395ffd65e5b7961067d20a2872
Parent: 25720c2d73058f4f929f16093f60817ed52a285c
Author: David Teigland <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 13 14:49:06 2007 -0500
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 10:28:44 2007 +0100

[DLM] fix NULL ls usage

Fix regression in recent patch "[DLM] variable allocation" which
attempts to dereference an "ls" struct when it's NULL.

Signed-off-by: David Teigland <[EMAIL PROTECTED]>
Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/dlm/rcom.c |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c
index e3a1527..188b91c 100644
--- a/fs/dlm/rcom.c
+++ b/fs/dlm/rcom.c
@@ -386,8 +386,7 @@ static void receive_rcom_lock_reply(struct dlm_ls *ls, 
struct dlm_rcom *rc_in)
dlm_recover_process_copy(ls, rc_in);
 }
 
-static int send_ls_not_ready(struct dlm_ls *ls, int nodeid,
-struct dlm_rcom *rc_in)
+static int send_ls_not_ready(int nodeid, struct dlm_rcom *rc_in)
 {
struct dlm_rcom *rc;
struct rcom_config *rf;
@@ -395,7 +394,7 @@ static int send_ls_not_ready(struct dlm_ls *ls, int nodeid,
char *mb;
int mb_len = sizeof(struct dlm_rcom) + sizeof(struct rcom_config);
 
-   mh = dlm_lowcomms_get_buffer(nodeid, mb_len, ls->ls_allocation, &mb);
+   mh = dlm_lowcomms_get_buffer(nodeid, mb_len, GFP_NOFS, &mb);
if (!mh)
return -ENOBUFS;
memset(mb, 0, mb_len);
@@ -465,7 +464,7 @@ void dlm_receive_rcom(struct dlm_header *hd, int nodeid)
log_print("lockspace %x from %d type %x not found",
  hd->h_lockspace, nodeid, rc->rc_type);
if (rc->rc_type == DLM_RCOM_STATUS)
-   send_ls_not_ready(ls, nodeid, rc);
+   send_ls_not_ready(nodeid, rc);
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


[DLM] zero unused parts of sockaddr_storage

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=01c8cab25863de007fe8c598d0033919ea8ae65e
Commit: 01c8cab25863de007fe8c598d0033919ea8ae65e
Parent: 41684f9547455b395ffd65e5b7961067d20a2872
Author: Patrick Caulfield <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 16:53:15 2007 +0100
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 10:29:27 2007 +0100

[DLM] zero unused parts of sockaddr_storage

When we build a sockaddr_storage for an IP address, clear the unused parts 
as
they could be used for node comparisons.

I have seen this occasionally make sctp connections fail.

Signed-Off-By: Patrick Caulfield <[EMAIL PROTECTED]>
Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/dlm/lowcomms.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index d15fd5f..631bc43 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -313,6 +313,7 @@ static void make_sockaddr(struct sockaddr_storage *saddr, 
uint16_t port,
in6_addr->sin6_port = cpu_to_be16(port);
*addr_len = sizeof(struct sockaddr_in6);
}
+   memset((char *)saddr + *addr_len, 0, sizeof(struct sockaddr_storage) - 
*addr_len);
 }
 
 /* Close a remote connection and tidy up */
-
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


[DLM] Fix memory leak in dlm_add_member() when dlm_node_weight() returns less than zero

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1a2bf2eefb63a267aea7f3f80d6ac59160e20810
Commit: 1a2bf2eefb63a267aea7f3f80d6ac59160e20810
Parent: 01c8cab25863de007fe8c598d0033919ea8ae65e
Author: Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 19 00:27:43 2007 +0200
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 10:30:04 2007 +0100

[DLM] Fix memory leak in dlm_add_member() when dlm_node_weight() returns 
less than zero

There's a memory leak in fs/dlm/member.c::dlm_add_member().

If "dlm_node_weight(ls->ls_name, nodeid)" returns < 0, then
we'll return without freeing the memory allocated to the (at
that point yet unused) 'memb'.
This patch frees the allocated memory in that case and thus
avoids the leak.

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
Signed-off-by: David Teigland <[EMAIL PROTECTED]>
Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/dlm/member.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/dlm/member.c b/fs/dlm/member.c
index 073599d..d099775 100644
--- a/fs/dlm/member.c
+++ b/fs/dlm/member.c
@@ -56,8 +56,10 @@ static int dlm_add_member(struct dlm_ls *ls, int nodeid)
return -ENOMEM;
 
w = dlm_node_weight(ls->ls_name, nodeid);
-   if (w < 0)
+   if (w < 0) {
+   kfree(memb);
return w;
+   }
 
memb->nodeid = nodeid;
memb->weight = w;
-
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


[DLM] More othercon fixes

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9e5f2825a8b721360b291f14f42cd7a25781156b
Commit: 9e5f2825a8b721360b291f14f42cd7a25781156b
Parent: 1a2bf2eefb63a267aea7f3f80d6ac59160e20810
Author: Patrick Caulfield <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 14:58:14 2007 +0100
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 10:30:36 2007 +0100

[DLM] More othercon fixes

The last patch to clean out 'othercon' structures only fixed half the 
problem.
The attached addresses the other situations too, and fixes bz#238490

Signed-Off-By: Patrick Caulfield <[EMAIL PROTECTED]>
Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/dlm/lowcomms.c |   25 +++--
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 631bc43..9e9d2e8 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -328,15 +328,24 @@ static void close_connection(struct connection *con, bool 
and_other)
if (con->othercon && and_other) {
/* Will only re-enter once. */
close_connection(con->othercon, false);
-   kmem_cache_free(con_cache, con->othercon);
-   con->othercon = NULL;
}
if (con->rx_page) {
__free_page(con->rx_page);
con->rx_page = NULL;
}
-   con->retries = 0;
-   mutex_unlock(&con->sock_mutex);
+
+   /* If we are an 'othercon' then NULL the pointer to us
+  from the parent and tidy ourself up */
+   if (test_bit(CF_IS_OTHERCON, &con->flags)) {
+   struct connection *parent = __nodeid2con(con->nodeid, 0);
+   parent->othercon = NULL;
+   kmem_cache_free(con_cache, con);
+   }
+   else {
+   /* Parent connections get reused */
+   con->retries = 0;
+   mutex_unlock(&con->sock_mutex);
+   }
 }
 
 /* We only send shutdown messages to nodes that are not part of the cluster */
@@ -634,7 +643,7 @@ out_resched:
 
 out_close:
mutex_unlock(&con->sock_mutex);
-   if (ret != -EAGAIN && !test_bit(CF_IS_OTHERCON, &con->flags)) {
+   if (ret != -EAGAIN) {
close_connection(con, false);
/* Reconnect when there is something to send */
}
@@ -1125,8 +1134,6 @@ static int tcp_listen_for_all(void)
 
log_print("Using TCP for communications");
 
-   set_bit(CF_IS_OTHERCON, &con->flags);
-
sock = tcp_create_listen_sock(con, dlm_local_addr[0]);
if (sock) {
add_sock(sock, con);
@@ -1410,7 +1417,7 @@ void dlm_lowcomms_stop(void)
for (i = 0; i <= max_nodeid; i++) {
con = __nodeid2con(i, 0);
if (con) {
-   con->flags |= 0xFF;
+   con->flags |= 0x0F;
if (con->sock)
con->sock->sk->sk_user_data = NULL;
}
@@ -1426,8 +1433,6 @@ void dlm_lowcomms_stop(void)
con = __nodeid2con(i, 0);
if (con) {
close_connection(con, true);
-   if (con->othercon)
-   kmem_cache_free(con_cache, con->othercon);
kmem_cache_free(con_cache, con);
}
}
-
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


[DLM] fix basts for granted PR waiting CW

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3650925893469ccb03dbcc6a440c5d363350f591
Commit: 3650925893469ccb03dbcc6a440c5d363350f591
Parent: 9e5f2825a8b721360b291f14f42cd7a25781156b
Author: David Teigland <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 7 09:44:48 2007 -0500
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 10:31:02 2007 +0100

[DLM] fix basts for granted PR waiting CW

Fix a long standing bug where a blocking callback would be missed
when there's a granted lock in PR mode and waiting locks in both
PR and CW modes (and the PR lock was added to the waiting queue
before the CW lock).  The logic simply compared the numerical values
of the modes to determine if a blocking callback was required, but in
the one case of PR and CW, the lower valued CW mode blocks the higher
valued PR mode.  We just need to add a special check for this PR/CW
case in the tests that decide when a blocking callback is needed.

Signed-off-by: David Teigland <[EMAIL PROTECTED]>
Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/dlm/lock.c |   69 +---
 1 files changed, 55 insertions(+), 14 deletions(-)

diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index b455919..2082daf 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -1670,9 +1670,10 @@ static int can_be_granted(struct dlm_rsb *r, struct 
dlm_lkb *lkb, int now,
with a deadlk here, we'd have to generate something like grant_lock with
the deadlk error.) */
 
-/* returns the highest requested mode of all blocked conversions */
+/* Returns the highest requested mode of all blocked conversions; sets
+   cw if there's a blocked conversion to DLM_LOCK_CW. */
 
-static int grant_pending_convert(struct dlm_rsb *r, int high)
+static int grant_pending_convert(struct dlm_rsb *r, int high, int *cw)
 {
struct dlm_lkb *lkb, *s;
int hi, demoted, quit, grant_restart, demote_restart;
@@ -1709,6 +1710,9 @@ static int grant_pending_convert(struct dlm_rsb *r, int 
high)
}
 
hi = max_t(int, lkb->lkb_rqmode, hi);
+
+   if (cw && lkb->lkb_rqmode == DLM_LOCK_CW)
+   *cw = 1;
}
 
if (grant_restart)
@@ -1721,29 +1725,52 @@ static int grant_pending_convert(struct dlm_rsb *r, int 
high)
return max_t(int, high, hi);
 }
 
-static int grant_pending_wait(struct dlm_rsb *r, int high)
+static int grant_pending_wait(struct dlm_rsb *r, int high, int *cw)
 {
struct dlm_lkb *lkb, *s;
 
list_for_each_entry_safe(lkb, s, &r->res_waitqueue, lkb_statequeue) {
if (can_be_granted(r, lkb, 0, NULL))
grant_lock_pending(r, lkb);
-else
+else {
high = max_t(int, lkb->lkb_rqmode, high);
+   if (lkb->lkb_rqmode == DLM_LOCK_CW)
+   *cw = 1;
+   }
}
 
return high;
 }
 
+/* cw of 1 means there's a lock with a rqmode of DLM_LOCK_CW that's blocked
+   on either the convert or waiting queue.
+   high is the largest rqmode of all locks blocked on the convert or
+   waiting queue. */
+
+static int lock_requires_bast(struct dlm_lkb *gr, int high, int cw)
+{
+   if (gr->lkb_grmode == DLM_LOCK_PR && cw) {
+   if (gr->lkb_highbast < DLM_LOCK_EX)
+   return 1;
+   return 0;
+   }
+
+   if (gr->lkb_highbast < high &&
+   !__dlm_compat_matrix[gr->lkb_grmode+1][high+1])
+   return 1;
+   return 0;
+}
+
 static void grant_pending_locks(struct dlm_rsb *r)
 {
struct dlm_lkb *lkb, *s;
int high = DLM_LOCK_IV;
+   int cw = 0;
 
DLM_ASSERT(is_master(r), dlm_dump_rsb(r););
 
-   high = grant_pending_convert(r, high);
-   high = grant_pending_wait(r, high);
+   high = grant_pending_convert(r, high, &cw);
+   high = grant_pending_wait(r, high, &cw);
 
if (high == DLM_LOCK_IV)
return;
@@ -1751,27 +1778,41 @@ static void grant_pending_locks(struct dlm_rsb *r)
/*
 * If there are locks left on the wait/convert queue then send blocking
 * ASTs to granted locks based on the largest requested mode (high)
-* found above. FIXME: highbast < high comparison not valid for PR/CW.
+* found above.
 */
 
list_for_each_entry_safe(lkb, s, &r->res_grantqueue, lkb_statequeue) {
-   if (lkb->lkb_bastaddr && (lkb->lkb_highbast < high) &&
-   !__dlm_compat_matrix[lkb->lkb_grmode+1][high+1]) {
-   queue_bast(r, lkb, high);
+   if (lkb->lkb_bastaddr && lock_requires_bast(lkb, high, cw)) {
+   if (cw && high == DLM_LOCK_PR)
+   queue_bast(r, lkb, DLM_LOCK_CW);
+   else

[GFS2] soft lockup detected in databuf_lo_before_commit

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bdcb88562ca90e6cfac13130e147c63aaa4f9e41
Commit: bdcb88562ca90e6cfac13130e147c63aaa4f9e41
Parent: 3650925893469ccb03dbcc6a440c5d363350f591
Author: Bob Peterson <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 11 15:55:23 2007 -0500
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 10:32:04 2007 +0100

[GFS2] soft lockup detected in databuf_lo_before_commit

This is part 2 of the patch for bug #245832, part 1 of which is already
in the git tree.

The problem was that sdp->sd_log_num_databuf was not always being
protected by the gfs2_log_lock spinlock, but the sd_log_le_databuf
(which it is supposed to reflect) was protected.  That meant there
was a timing window during which gfs2_log_flush called
databuf_lo_before_commit and the count didn't match what was
really on the linked list in that window.  So when it ran out of
items on the linked list, it decremented total_dbuf from 0 to -1 and
thus never left the "while(total_dbuf)" loop.

The solution is to protect the variable sdp->sd_log_num_databuf so
that the value will always match the contents of the linked list,
and therefore the number will never go negative, and therefore, the
loop will be exited properly.

Signed-off-by: Bob Peterson <[EMAIL PROTECTED]>
Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/gfs2/lops.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index aff70f0..3b395c4 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -486,8 +486,8 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct 
gfs2_log_element *le)
gfs2_pin(sdp, bd->bd_bh);
tr->tr_num_databuf_new++;
}
-   sdp->sd_log_num_databuf++;
gfs2_log_lock(sdp);
+   sdp->sd_log_num_databuf++;
list_add(&le->le_list, &sdp->sd_log_le_databuf);
gfs2_log_unlock(sdp);
 }
@@ -523,7 +523,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp)
struct buffer_head *bh = NULL,*bh1 = NULL;
struct gfs2_log_descriptor *ld;
unsigned int limit;
-   unsigned int total_dbuf = sdp->sd_log_num_databuf;
+   unsigned int total_dbuf;
unsigned int total_jdata = sdp->sd_log_num_jdata;
unsigned int num, n;
__be64 *ptr = NULL;
@@ -535,6 +535,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp)
 * into the log along with a header
 */
gfs2_log_lock(sdp);
+   total_dbuf = sdp->sd_log_num_databuf;
bd2 = bd1 = list_prepare_entry(bd1, &sdp->sd_log_le_databuf,
   bd_le.le_list);
while(total_dbuf) {
@@ -653,6 +654,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp)
break;
}
bh = NULL;
+   BUG_ON(total_dbuf < num);
total_dbuf -= num;
total_jdata -= num;
}
-
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


[GFS2] soft lockup in rgblk_search

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=24c7387333c77b602ece7ecd6a85fc94f8f16d8c
Commit: 24c7387333c77b602ece7ecd6a85fc94f8f16d8c
Parent: bdcb88562ca90e6cfac13130e147c63aaa4f9e41
Author: Bob Peterson <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 12 16:58:50 2007 -0500
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 10:32:43 2007 +0100

[GFS2] soft lockup in rgblk_search

This patch seems to fix the problem described in bugzilla bug 246114.
It was written by Steve Whitehouse with some tweaking by me.

The code was looping in the relatively new section of code designed to
search for and reuse unlinked inodes.  In cases where it was finding an
appropriate inode to reuse, it was looping around and finding the same
block over and over because a "<=" check should have been a "<" when
comparing the goal block to the last unlinked block found.

Signed-off-by: Bob Peterson <[EMAIL PROTECTED]>
Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/gfs2/rgrp.c |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index e4e0406..bb58e69 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -863,16 +863,19 @@ static struct inode *try_rgrp_unlink(struct gfs2_rgrpd 
*rgd, u64 *last_unlinked)
u64 no_addr;
 
for(;;) {
+   if (goal >= rgd->rd_data)
+   break;
goal = rgblk_search(rgd, goal, GFS2_BLKST_UNLINKED,
GFS2_BLKST_UNLINKED);
if (goal == 0)
-   return 0;
+   break;
no_addr = goal + rgd->rd_data0;
-   if (no_addr <= *last_unlinked)
+   goal++;
+   if (no_addr < *last_unlinked)
continue;
*last_unlinked = no_addr;
inode = gfs2_inode_lookup(rgd->rd_sbd->sd_vfs, DT_UNKNOWN,
-   no_addr, -1);
+ no_addr, -1);
if (!IS_ERR(inode))
return 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


[GFS2] Fix incorrect return code in rgrp.c

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6eefaf61f664053c1dd6534a994cab3f8bb07263
Commit: 6eefaf61f664053c1dd6534a994cab3f8bb07263
Parent: 24c7387333c77b602ece7ecd6a85fc94f8f16d8c
Author: Steven Whitehouse <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 10:26:56 2007 +0100
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 10:33:15 2007 +0100

[GFS2] Fix incorrect return code in rgrp.c

The following patch fixes a bug where 0 was being used as a return code
to indicate "nothing to do" when in fact 0 was a valid block location
which might be returned by the function.

Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/gfs2/rgrp.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index bb58e69..ce48c45 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -867,7 +867,7 @@ static struct inode *try_rgrp_unlink(struct gfs2_rgrpd 
*rgd, u64 *last_unlinked)
break;
goal = rgblk_search(rgd, goal, GFS2_BLKST_UNLINKED,
GFS2_BLKST_UNLINKED);
-   if (goal == 0)
+   if (goal == BFITNOENT)
break;
no_addr = goal + rgd->rd_data0;
goal++;
@@ -1316,7 +1316,7 @@ static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal,
bi->bi_len, blk, new_state);
}
 
-   return (blk == BFITNOENT) ? 0 : (bi->bi_start * GFS2_NBBY) + blk;
+   return (blk == BFITNOENT) ? blk : (bi->bi_start * GFS2_NBBY) + blk;
 }
 
 /**
@@ -1396,6 +1396,7 @@ u64 gfs2_alloc_data(struct gfs2_inode *ip)
goal = rgd->rd_last_alloc_data;
 
blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED);
+   BUG_ON(blk == BFITNOENT);
rgd->rd_last_alloc_data = blk;
 
block = rgd->rd_data0 + blk;
@@ -1440,6 +1441,7 @@ u64 gfs2_alloc_meta(struct gfs2_inode *ip)
goal = rgd->rd_last_alloc_meta;
 
blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED);
+   BUG_ON(blk == BFITNOENT);
rgd->rd_last_alloc_meta = blk;
 
block = rgd->rd_data0 + blk;
@@ -1481,6 +1483,7 @@ u64 gfs2_alloc_di(struct gfs2_inode *dip, u64 *generation)
 
blk = rgblk_search(rgd, rgd->rd_last_alloc_meta,
   GFS2_BLKST_FREE, GFS2_BLKST_DINODE);
+   BUG_ON(blk == BFITNOENT);
 
rgd->rd_last_alloc_meta = blk;
 
-
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


[GFS2] Fix setting of inherit jdata attr

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b9af7ca6d37d541fb0ed96355fd5c65501cbbda8
Commit: b9af7ca6d37d541fb0ed96355fd5c65501cbbda8
Parent: a867bb28c1cb49ae86d034d8bd8fe6dbcbb19566
Author: Steven Whitehouse <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 18 11:40:06 2007 +0100
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 10:34:11 2007 +0100

[GFS2] Fix setting of inherit jdata attr

Due to a mix up between the jdata attribute and inherit jdata attribute
it has not been possible to set the inherit jdata attribute on
directories. This is now fixed and the ioctl will report the inherit
jdata attribute for directories rather than the jdata attribute as it
did previously. This stems from our need to have the one bit in the
ioctl attr flags mean two different things according to whether the
underlying inode is a directory or not.

Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/gfs2/ops_file.c |   29 +
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 7734211..94d76ac 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -177,8 +177,8 @@ static const u32 fsflags_to_gfs2[32] = {
[5] = GFS2_DIF_APPENDONLY,
[7] = GFS2_DIF_NOATIME,
[12] = GFS2_DIF_EXHASH,
-   [14] = GFS2_DIF_JDATA,
-   [20] = GFS2_DIF_DIRECTIO,
+   [14] = GFS2_DIF_INHERIT_JDATA,
+   [20] = GFS2_DIF_INHERIT_DIRECTIO,
 };
 
 static const u32 gfs2_to_fsflags[32] = {
@@ -187,8 +187,6 @@ static const u32 gfs2_to_fsflags[32] = {
[gfs2fl_AppendOnly] = FS_APPEND_FL,
[gfs2fl_NoAtime] = FS_NOATIME_FL,
[gfs2fl_ExHash] = FS_INDEX_FL,
-   [gfs2fl_Jdata] = FS_JOURNAL_DATA_FL,
-   [gfs2fl_Directio] = FS_DIRECTIO_FL,
[gfs2fl_InheritDirectio] = FS_DIRECTIO_FL,
[gfs2fl_InheritJdata] = FS_JOURNAL_DATA_FL,
 };
@@ -207,6 +205,12 @@ static int gfs2_get_flags(struct file *filp, u32 __user 
*ptr)
return error;
 
fsflags = fsflags_cvt(gfs2_to_fsflags, ip->i_di.di_flags);
+   if (!S_ISDIR(inode->i_mode)) {
+   if (ip->i_di.di_flags & GFS2_DIF_JDATA)
+   fsflags |= FS_JOURNAL_DATA_FL;
+   if (ip->i_di.di_flags & GFS2_DIF_DIRECTIO)
+   fsflags |= FS_DIRECTIO_FL;
+   }
if (put_user(fsflags, ptr))
error = -EFAULT;
 
@@ -270,13 +274,6 @@ static int do_gfs2_set_flags(struct file *filp, u32 
reqflags, u32 mask)
if ((new_flags ^ flags) == 0)
goto out;
 
-   if (S_ISDIR(inode->i_mode)) {
-   if ((new_flags ^ flags) & GFS2_DIF_JDATA)
-   new_flags ^= (GFS2_DIF_JDATA|GFS2_DIF_INHERIT_JDATA);
-   if ((new_flags ^ flags) & GFS2_DIF_DIRECTIO)
-   new_flags ^= 
(GFS2_DIF_DIRECTIO|GFS2_DIF_INHERIT_DIRECTIO);
-   }
-
error = -EINVAL;
if ((new_flags ^ flags) & ~GFS2_FLAGS_USER_SET)
goto out;
@@ -315,11 +312,19 @@ out:
 
 static int gfs2_set_flags(struct file *filp, u32 __user *ptr)
 {
+   struct inode *inode = filp->f_path.dentry->d_inode;
u32 fsflags, gfsflags;
if (get_user(fsflags, ptr))
return -EFAULT;
gfsflags = fsflags_cvt(fsflags_to_gfs2, fsflags);
-   return do_gfs2_set_flags(filp, gfsflags, ~0);
+   if (!S_ISDIR(inode->i_mode)) {
+   if (gfsflags & GFS2_DIF_INHERIT_JDATA)
+   gfsflags ^= (GFS2_DIF_JDATA | GFS2_DIF_INHERIT_JDATA);
+   if (gfsflags & GFS2_DIF_INHERIT_DIRECTIO)
+   gfsflags ^= (GFS2_DIF_DIRECTIO | 
GFS2_DIF_INHERIT_DIRECTIO);
+   return do_gfs2_set_flags(filp, gfsflags, ~0);
+   }
+   return do_gfs2_set_flags(filp, gfsflags, ~GFS2_DIF_JDATA);
 }
 
 static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
-
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


[GFS2] Fix incorrect error path in prepare_write()

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a867bb28c1cb49ae86d034d8bd8fe6dbcbb19566
Commit: a867bb28c1cb49ae86d034d8bd8fe6dbcbb19566
Parent: 6eefaf61f664053c1dd6534a994cab3f8bb07263
Author: Steven Whitehouse <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 10:29:02 2007 +0100
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 10:33:44 2007 +0100

[GFS2] Fix incorrect error path in prepare_write()

The error path in prepare_write() was incorrect in the (very rare) event
that the transaction fails to start. The following prevents a NULL
pointer dereference,

Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/gfs2/ops_address.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index ce90032..42a5f58 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -416,7 +416,7 @@ static int gfs2_prepare_write(struct file *file, struct 
page *page,
 
error = gfs2_trans_begin(sdp, rblocks, 0);
if (error)
-   goto out;
+   goto out_trans_fail;
 
if (gfs2_is_stuffed(ip)) {
if (end > sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode)) {
@@ -434,6 +434,7 @@ prepare_write:
 out:
if (error) {
gfs2_trans_end(sdp);
+out_trans_fail:
if (alloc_required) {
gfs2_inplace_release(ip);
 out_qunlock:
-
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


[GFS2] Revert remounting w/o acl option leaves acls enabled

2007-08-14 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d18c4d687dd4625360ee14047d7eb454217719ee
Commit: d18c4d687dd4625360ee14047d7eb454217719ee
Parent: b9af7ca6d37d541fb0ed96355fd5c65501cbbda8
Author: Steven Whitehouse <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 19 16:12:50 2007 +0100
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 10:34:40 2007 +0100

[GFS2] Revert remounting w/o acl option leaves acls enabled

This reverts commit 569a7b6c2e8965ff4908003b925757703a3d649c. The
code was correct originally. The default setting for ACLs after a
remount should be to be the same as before the remount.

Signed-off-by: Abhijith Das <[EMAIL PROTECTED]>
Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/gfs2/mount.c |   25 +
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/fs/gfs2/mount.c b/fs/gfs2/mount.c
index 6f006a8..4864659 100644
--- a/fs/gfs2/mount.c
+++ b/fs/gfs2/mount.c
@@ -82,19 +82,20 @@ int gfs2_mount_args(struct gfs2_sbd *sdp, char *data_arg, 
int remount)
char *options, *o, *v;
int error = 0;
 
-   /*  If someone preloaded options, use those instead  */
-   spin_lock(&gfs2_sys_margs_lock);
-   if (!remount && gfs2_sys_margs) {
-   data = gfs2_sys_margs;
-   gfs2_sys_margs = NULL;
-   }
-   spin_unlock(&gfs2_sys_margs_lock);
+   if (!remount) {
+   /*  If someone preloaded options, use those instead  */
+   spin_lock(&gfs2_sys_margs_lock);
+   if (gfs2_sys_margs) {
+   data = gfs2_sys_margs;
+   gfs2_sys_margs = NULL;
+   }
+   spin_unlock(&gfs2_sys_margs_lock);
 
-   /*  Set some defaults  */
-   memset(args, 0, sizeof(struct gfs2_args));
-   args->ar_num_glockd = GFS2_GLOCKD_DEFAULT;
-   args->ar_quota = GFS2_QUOTA_DEFAULT;
-   args->ar_data = GFS2_DATA_DEFAULT;
+   /*  Set some defaults  */
+   args->ar_num_glockd = GFS2_GLOCKD_DEFAULT;
+   args->ar_quota = GFS2_QUOTA_DEFAULT;
+   args->ar_data = GFS2_DATA_DEFAULT;
+   }
 
/* Split the options into tokens with the "," character and
   process them */
-
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