Re: [PATCH 1/3] remove irq_sem from atl1

2007-02-27 Thread Jeff Garzik

Chris Snook wrote:

From: Chris Snook [EMAIL PROTECTED]

Remove unnecessary irq_sem code from atl1 driver.  Tested with no problems.

Signed-off-by: Chris Snook [EMAIL PROTECTED]
Signed-off-by: Jay Cliburn [EMAIL PROTECTED]


ACK, but patch does not apply:


Applying 'remove irq_sem from atl1'

error: patch fragment without header at line 7: @@ -236,7 +236,6 @@ 
struct atl1_adapter {
error: patch fragment without header at line 21: @@ -163,7 +163,6 @@ 
static int __devinit atl1_sw_init(struct
error: patch fragment without header at line 29: @@ -272,8 +271,7 @@ 
err_nomem:
error: patch fragment without header at line 39: @@ -1205,7 +1203,6 @@ 
static u32 atl1_configure(struct atl1_ad

error: No changes
Patch failed at 0004.
When you have resolved this problem run git-am --resolved.
If you would prefer to skip this patch, instead run git-am --skip.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] remove irq_sem from atl1

2007-02-27 Thread Chris Snook

Jeff Garzik wrote:

Chris Snook wrote:

From: Chris Snook [EMAIL PROTECTED]

Remove unnecessary irq_sem code from atl1 driver.  Tested with no 
problems.


Signed-off-by: Chris Snook [EMAIL PROTECTED]
Signed-off-by: Jay Cliburn [EMAIL PROTECTED]


ACK, but patch does not apply:


Applying 'remove irq_sem from atl1'

error: patch fragment without header at line 7: @@ -236,7 +236,6 @@ 
struct atl1_adapter {
error: patch fragment without header at line 21: @@ -163,7 +163,6 @@ 
static int __devinit atl1_sw_init(struct
error: patch fragment without header at line 29: @@ -272,8 +271,7 @@ 
err_nomem:
error: patch fragment without header at line 39: @@ -1205,7 +1203,6 @@ 
static u32 atl1_configure(struct atl1_ad

error: No changes
Patch failed at 0004.
When you have resolved this problem run git-am --resolved.
If you would prefer to skip this patch, instead run git-am --skip.


Huh, looks like my mailer line-wrapped the headers.  Patch didn't 
complain, but I guess git is pickier.  I've attached the patch to avoid 
text mangling.  Were there any problems with the e1000 and ixgb patches?


-- Chris
diff -urp linux-2.6.20-git14.orig/drivers/net/atl1/atl1.h linux-2.6.20-git14/drivers/net/atl1/atl1.h
--- linux-2.6.20-git14.orig/drivers/net/atl1/atl1.h	2007-02-19 14:32:15.0 -0500
+++ linux-2.6.20-git14/drivers/net/atl1/atl1.h	2007-02-19 15:10:07.0 -0500
@@ -236,7 +236,6 @@ struct atl1_adapter {
 	u16 link_speed;
 	u16 link_duplex;
 	spinlock_t lock;
-	atomic_t irq_sem;
 	struct work_struct tx_timeout_task;
 	struct work_struct link_chg_task;
 	struct work_struct pcie_dma_to_rst_task;
diff -urp linux-2.6.20-git14.orig/drivers/net/atl1/atl1_main.c linux-2.6.20-git14/drivers/net/atl1/atl1_main.c
--- linux-2.6.20-git14.orig/drivers/net/atl1/atl1_main.c	2007-02-19 14:32:15.0 -0500
+++ linux-2.6.20-git14/drivers/net/atl1/atl1_main.c	2007-02-19 15:10:44.0 -0500
@@ -163,7 +163,6 @@ static int __devinit atl1_sw_init(struct
 	hw-cmb_tx_timer = 1;	/* about 2us */
 	hw-smb_timer = 10;	/* about 200ms */
 
-	atomic_set(adapter-irq_sem, 0);
 	spin_lock_init(adapter-lock);
 	spin_lock_init(adapter-mb_lock);
 
@@ -272,8 +271,7 @@ err_nomem:
  */
 static void atl1_irq_enable(struct atl1_adapter *adapter)
 {
-	if (likely(!atomic_dec_and_test(adapter-irq_sem)))
-		iowrite32(IMR_NORMAL_MASK, adapter-hw.hw_addr + REG_IMR);
+	iowrite32(IMR_NORMAL_MASK, adapter-hw.hw_addr + REG_IMR);
 }
 
 static void atl1_clear_phy_int(struct atl1_adapter *adapter)
@@ -1205,7 +1203,6 @@ static u32 atl1_configure(struct atl1_ad
  */
 static void atl1_irq_disable(struct atl1_adapter *adapter)
 {
-	atomic_inc(adapter-irq_sem);
 	iowrite32(0, adapter-hw.hw_addr + REG_IMR);
 	ioread32(adapter-hw.hw_addr + REG_IMR);
 	synchronize_irq(adapter-pdev-irq);


[PATCH 1/3] remove irq_sem from atl1

2007-02-19 Thread Chris Snook
From: Chris Snook [EMAIL PROTECTED]

Remove unnecessary irq_sem code from atl1 driver.  Tested with no problems.

Signed-off-by: Chris Snook [EMAIL PROTECTED]
Signed-off-by: Jay Cliburn [EMAIL PROTECTED]
--
diff -urp linux-2.6.20-git14.orig/drivers/net/atl1/atl1.h
linux-2.6.20-git14/drivers/net/atl1/atl1.h
--- linux-2.6.20-git14.orig/drivers/net/atl1/atl1.h 2007-02-19
14:32:15.0 -0500
+++ linux-2.6.20-git14/drivers/net/atl1/atl1.h  2007-02-19 15:10:07.0
-0500
@@ -236,7 +236,6 @@ struct atl1_adapter {
u16 link_speed;
u16 link_duplex;
spinlock_t lock;
-   atomic_t irq_sem;
struct work_struct tx_timeout_task;
struct work_struct link_chg_task;
struct work_struct pcie_dma_to_rst_task;
diff -urp linux-2.6.20-git14.orig/drivers/net/atl1/atl1_main.c
linux-2.6.20-git14/drivers/net/atl1/atl1_main.c
--- linux-2.6.20-git14.orig/drivers/net/atl1/atl1_main.c2007-02-19
14:32:15.0 -0500
+++ linux-2.6.20-git14/drivers/net/atl1/atl1_main.c 2007-02-19
15:10:44.0 -0500
@@ -163,7 +163,6 @@ static int __devinit atl1_sw_init(struct
hw-cmb_tx_timer = 1;   /* about 2us */
hw-smb_timer = 10; /* about 200ms */

-   atomic_set(adapter-irq_sem, 0);
spin_lock_init(adapter-lock);
spin_lock_init(adapter-mb_lock);

@@ -272,8 +271,7 @@ err_nomem:
  */
 static void atl1_irq_enable(struct atl1_adapter *adapter)
 {
-   if (likely(!atomic_dec_and_test(adapter-irq_sem)))
-   iowrite32(IMR_NORMAL_MASK, adapter-hw.hw_addr + REG_IMR);
+   iowrite32(IMR_NORMAL_MASK, adapter-hw.hw_addr + REG_IMR);
 }

 static void atl1_clear_phy_int(struct atl1_adapter *adapter)
@@ -1205,7 +1203,6 @@ static u32 atl1_configure(struct atl1_ad
  */
 static void atl1_irq_disable(struct atl1_adapter *adapter)
 {
-   atomic_inc(adapter-irq_sem);
iowrite32(0, adapter-hw.hw_addr + REG_IMR);
ioread32(adapter-hw.hw_addr + REG_IMR);
synchronize_irq(adapter-pdev-irq);

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html