Re: [PATCH] 3c589_cs: add cis(firmware) of 3Com multifunction pcmcia card

Previous thread: [GIT]: Networking by David Miller on Saturday, April 4, 2009 - 5:17 pm. (1 message)

Next thread: [PATCH 2/2] smsc911x: remove unused #include <linux/version.h> by Huang Weiyi on Saturday, April 4, 2009 - 6:53 pm. (2 messages)
From: Ken Kawasaki
Date: Saturday, April 4, 2009 - 5:49 pm

axnet_cs:

(1) Some Asix phy return bogus value except 0 or 0xffff.
    Skip this phy_id.

(2) Some Asix chip need to set &quot;select Internal PHY&quot; bit
    at AX88190_init.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.29-git1/drivers/net/pcmcia/axnet_cs.c.orig	2009-03-29 11:55:26.000000000 +0900
+++ linux-2.6.29-git1/drivers/net/pcmcia/axnet_cs.c	2009-03-29 12:01:40.000000000 +0900
@@ -339,7 +339,7 @@ static int axnet_config(struct pcmcia_de
 {
     struct net_device *dev = link-&gt;priv;
     axnet_dev_t *info = PRIV(dev);
-    int i, j, last_ret, last_fn;
+    int i, j, j2, last_ret, last_fn;
 
     DEBUG(0, &quot;axnet_config(0x%p)\n&quot;, link);
 
@@ -388,6 +388,8 @@ static int axnet_config(struct pcmcia_de
 
     for (i = 0; i &lt; 32; i++) {
 	j = mdio_read(dev-&gt;base_addr + AXNET_MII_EEP, i, 1);
+	j2 = mdio_read(dev-&gt;base_addr + AXNET_MII_EEP, i, 2);
+	if (j == j2) continue;
 	if ((j != 0) &amp;&amp; (j != 0xffff)) break;
     }
 
@@ -398,6 +400,8 @@ static int axnet_config(struct pcmcia_de
  	pcmcia_access_configuration_register(link, &amp;reg);
 	for (i = 0; i &lt; 32; i++) {
 	    j = mdio_read(dev-&gt;base_addr + AXNET_MII_EEP, i, 1);
+	    j2 = mdio_read(dev-&gt;base_addr + AXNET_MII_EEP, i, 2);
+	    if (j == j2) continue;
 	    if ((j != 0) &amp;&amp; (j != 0xffff)) break;
 	}
     }
@@ -1767,6 +1771,9 @@ static void AX88190_init(struct net_devi
 	ei_local-&gt;tx1 = ei_local-&gt;tx2 = 0;
 	ei_local-&gt;txing = 0;
 
+	if (info-&gt;flags &amp; IS_AX88790)	/* select Internal PHY */
+		outb(0x10, e8390_base + AXNET_GPIO);
+
 	if (startp) 
 	{
 		outb_p(0xff,  e8390_base + EN0_ISR);


--

From: David Miller
Date: Monday, April 6, 2009 - 5:42 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied.
--

From: Ken Kawasaki
Date: Saturday, April 18, 2009 - 4:44 pm

pcnet_cs: add cis(firmware) of the Allied Telesis LA-PCM


Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

diff -uprN linux-2.6.30-rc2.orig/drivers/net/pcmcia/pcnet_cs.c linux-2.6.30-rc2/drivers/net/pcmcia/pcnet_cs.c
--- linux-2.6.30-rc2.orig/drivers/net/pcmcia/pcnet_cs.c	2009-04-12 20:42:39.000000000 +0900
+++ linux-2.6.30-rc2/drivers/net/pcmcia/pcnet_cs.c	2009-04-12 20:29:09.000000000 +0900
@@ -1758,7 +1758,7 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, &quot;DAYNA COMMUNICATIONS&quot;, &quot;LAN AND MODEM MULTIFUNCTION&quot;, 0x8fdf8f89, 0xdd5ed9e8, &quot;DP83903.cis&quot;),
 	PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, &quot;NSC MF LAN/Modem&quot;, 0x58fc6056, &quot;DP83903.cis&quot;),
 	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, &quot;DP83903.cis&quot;),
-	PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, &quot;LA-PCM.cis&quot;),
+	PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, &quot;cis/LA-PCM.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;KTI&quot;, &quot;PE520 PLUS&quot;, 0xad180345, 0x9d58d392, &quot;PE520.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;NDC&quot;, &quot;Ethernet&quot;, 0x01c43ae1, 0x00b2e941, &quot;NE2K.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;PMX   &quot;, &quot;PE-200&quot;, 0x34f3f1c8, 0x10b59f8c, &quot;PE-200.cis&quot;),
diff -uprN linux-2.6.30-rc2.orig/firmware/cis/LA-PCM.cis.ihex linux-2.6.30-rc2/firmware/cis/LA-PCM.cis.ihex
--- linux-2.6.30-rc2.orig/firmware/cis/LA-PCM.cis.ihex	1970-01-01 09:00:00.000000000 +0900
+++ linux-2.6.30-rc2/firmware/cis/LA-PCM.cis.ihex	2009-04-12 20:23:44.000000000 +0900
@@ -0,0 +1,20 ...
From: Ken Kawasaki
Date: Sunday, April 26, 2009 - 12:29 am

3c589_cs,3c574_cs,serial_cs:

 (1)add cis(firmware) of 3Com lan&amp;modem mulitifunction pcmcia card.
 (2)load correct configuration register for 3Com card
 
 
Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;
 
---

 drivers/net/pcmcia/3c574_cs.c   |    2 +-
 drivers/net/pcmcia/3c589_cs.c   |    4 ++--
 drivers/serial/serial_cs.c      |   22 +++++++++++++++++-----
 firmware/Makefile               |    2 ++
 firmware/WHENCE                 |   20 ++++++++++++++++++++
 firmware/cis/3CCFEM556.cis.ihex |   13 +++++++++++++
 firmware/cis/3CXEM556.cis.ihex  |   13 +++++++++++++
 7 files changed, 68 insertions(+), 8 deletions(-)

diff -uprN linux-2.6.30-rc3-git1.orig/drivers/net/pcmcia/3c589_cs.c linux-2.6.30-rc3-git1/drivers/net/pcmcia/3c589_cs.c
--- linux-2.6.30-rc3-git1.orig/drivers/net/pcmcia/3c589_cs.c	2009-04-25 14:44:41.000000000 +0900
+++ linux-2.6.30-rc3-git1/drivers/net/pcmcia/3c589_cs.c	2009-04-25 15:07:47.000000000 +0900
@@ -967,8 +967,8 @@ static struct pcmcia_device_id tc589_ids
 	PCMCIA_MFC_DEVICE_PROD_ID1(0, &quot;Motorola MARQUIS&quot;, 0xf03e4e77),
 	PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0589),
 	PCMCIA_DEVICE_PROD_ID12(&quot;Farallon&quot;, &quot;ENet&quot;, 0x58d93fc4, 0x992c2202),
-	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x0035, &quot;3CXEM556.cis&quot;),
-	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x003d, &quot;3CXEM556.cis&quot;),
+	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x0035, &quot;cis/3CXEM556.cis&quot;),
+	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x003d, &quot;cis/3CXEM556.cis&quot;),
 	PCMCIA_DEVICE_NULL,
 };
 MODULE_DEVICE_TABLE(pcmcia, tc589_ids);
diff -uprN linux-2.6.30-rc3-git1.orig/drivers/serial/serial_cs.c linux-2.6.30-rc3-git1/drivers/serial/serial_cs.c
--- linux-2.6.30-rc3-git1.orig/drivers/serial/serial_cs.c	2009-03-24 08:12:14.000000000 +0900
+++ linux-2.6.30-rc3-git1/drivers/serial/serial_cs.c	2009-04-25 15:12:19.000000000 +0900
@@ -681,7 +681,7 @@ static int serial_config(struct pcmcia_d
 	u_char *buf;
 	cisparse_t *parse;
 	cistpl_cftable_entry_t *cf;
-	int i;
+	int i, last_ret, ...
From: Ben Hutchings
Date: Sunday, April 26, 2009 - 6:33 am

[...]

Please read and follow firmware/README.AddingFirmware.

Ben.

From: Ken Kawasaki
Date: Monday, April 27, 2009 - 5:48 am

On Sun, 26 Apr 2009 14:33:02 +0100


OK. Thanks,

Ken.
--

From: Ken Kawasaki
Date: Saturday, September 12, 2009 - 3:22 pm

pcnet_cs,serial_cs:
 
add cis of Linksys lan&amp;modem mulitifunction pcmcia card
and some modem card(MT5634ZLX, RS-COM-2P).

  
Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;
 
---
 
 drivers/net/pcmcia/pcnet_cs.c   |   10 +++++-----
 drivers/serial/serial_cs.c      |   14 +++++++-------
 firmware/Makefile               |    3 ++-
 firmware/WHENCE                 |   12 ++++++++++++
 firmware/cis/MT5634ZLX.cis.ihex |   11 +++++++++++
 firmware/cis/PCMLM28.cis.ihex   |   18 ++++++++++++++++++
 firmware/cis/RS-COM-2P.cis.ihex |   10 ++++++++++
 7 files changed, 65 insertions(+), 13 deletions(-)

diff -uprN linux-2.6.31.orig/drivers/net/pcmcia/pcnet_cs.c linux-2.6.31/drivers/net/pcmcia/pcnet_cs.c
--- linux-2.6.31.orig/drivers/net/pcmcia/pcnet_cs.c	2009-09-10 07:13:59.000000000 +0900
+++ linux-2.6.31/drivers/net/pcmcia/pcnet_cs.c	2009-09-12 19:59:57.000000000 +0900
@@ -1751,11 +1751,11 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_DEVICE_PROD_ID2(&quot;EN-6200P2&quot;, 0xa996d078),
 	/* too generic! */
 	/* PCMCIA_DEVICE_PROD_ID12(&quot;PCMCIA&quot;, &quot;10/100 Ethernet Card&quot;, 0x281f1c5d, 0x11b0ffc0), */
-	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;PCMCIA&quot;, &quot;EN2218-LAN/MODEM&quot;, 0x281f1c5d, 0x570f348e, &quot;PCMLM28.cis&quot;),
-	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;PCMCIA&quot;, &quot;UE2218-LAN/MODEM&quot;, 0x281f1c5d, 0x6fdcacee, &quot;PCMLM28.cis&quot;),
-	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;Psion Dacom&quot;, &quot;Gold Card V34 Ethernet&quot;, 0xf5f025c2, 0x338e8155, &quot;PCMLM28.cis&quot;),
-	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;Psion Dacom&quot;, &quot;Gold Card V34 Ethernet GSM&quot;, 0xf5f025c2, 0x4ae85d35, &quot;PCMLM28.cis&quot;),
-	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;LINKSYS&quot;, &quot;PCMLM28&quot;, 0xf7cb0b07, 0x66881874, &quot;PCMLM28.cis&quot;),
+	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;PCMCIA&quot;, &quot;EN2218-LAN/MODEM&quot;, 0x281f1c5d, 0x570f348e, &quot;cis/PCMLM28.cis&quot;),
+	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;PCMCIA&quot;, &quot;UE2218-LAN/MODEM&quot;, 0x281f1c5d, 0x6fdcacee, &quot;cis/PCMLM28.cis&quot;),
+	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;Psion Dacom&quot;, &quot;Gold Card V34 Ethernet&quot;, 0xf5f025c2, 0x338e8155, ...
From: Ken Kawasaki
Date: Sunday, September 20, 2009 - 9:10 pm

3c574_cs:
 spin_lock the set_multicast_list,
 and clean up the set_rx_mode function.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---
  
--- linux-2.6.31-git9.orig/drivers/net/pcmcia/3c574_cs.c	2009-09-20 06:53:31.000000000 +0900
+++ linux-2.6.31-git9/drivers/net/pcmcia/3c574_cs.c	2009-09-20 07:03:39.000000000 +0900
@@ -251,6 +251,7 @@ static void el3_tx_timeout(struct net_de
 static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 static const struct ethtool_ops netdev_ethtool_ops;
 static void set_rx_mode(struct net_device *dev);
+static void set_multicast_list(struct net_device *dev);
 
 static void tc574_detach(struct pcmcia_device *p_dev);
 
@@ -266,7 +267,7 @@ static const struct net_device_ops el3_n
 	.ndo_tx_timeout 	= el3_tx_timeout,
 	.ndo_get_stats		= el3_get_stats,
 	.ndo_do_ioctl		= el3_ioctl,
-	.ndo_set_multicast_list = set_rx_mode,
+	.ndo_set_multicast_list = set_multicast_list,
 	.ndo_change_mtu		= eth_change_mtu,
 	.ndo_set_mac_address 	= eth_mac_addr,
 	.ndo_validate_addr	= eth_validate_addr,
@@ -1153,12 +1154,23 @@ static void set_rx_mode(struct net_devic
 	unsigned int ioaddr = dev-&gt;base_addr;
 
 	if (dev-&gt;flags &amp; IFF_PROMISC)
-		outw(SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm,
-			 ioaddr + EL3_CMD);
+		outw(SetRxFilter|RxStation|RxMulticast|RxBroadcast|RxProm,
+			ioaddr + EL3_CMD);
 	else if (dev-&gt;mc_count || (dev-&gt;flags &amp; IFF_ALLMULTI))
-		outw(SetRxFilter|RxStation|RxMulticast|RxBroadcast, ioaddr + EL3_CMD);
+		outw(SetRxFilter|RxStation|RxMulticast|RxBroadcast,
+			ioaddr + EL3_CMD);
 	else
-		outw(SetRxFilter | RxStation | RxBroadcast, ioaddr + EL3_CMD);
+		outw(SetRxFilter|RxStation|RxBroadcast, ioaddr + EL3_CMD);
+}
+
+static void set_multicast_list(struct net_device *dev)
+{
+	struct el3_private *lp = netdev_priv(dev);
+	unsigned long flags;
+
+	spin_lock_irqsave(&amp;lp-&gt;window_lock, flags);
+	set_rx_mode(dev);
+	spin_unlock_irqrestore(&amp;lp-&gt;window_lock, flags);
 }
 
 static ...
From: Ken Kawasaki
Date: Sunday, September 13, 2009 - 1:22 am

pcnet_cs,serial_cs:
 
add cis of Linksys lan&amp;modem mulitifunction pcmcia card
and some modem card(MT5634ZLX, RS-COM-2P).

  
Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;
 
---

for kernel 2.6.31 

 drivers/net/pcmcia/pcnet_cs.c   |   10 +++++-----
 drivers/serial/serial_cs.c      |   14 +++++++-------
 firmware/Makefile               |    3 ++-
 firmware/WHENCE                 |   12 ++++++++++++
 firmware/cis/MT5634ZLX.cis.ihex |   11 +++++++++++
 firmware/cis/PCMLM28.cis.ihex   |   18 ++++++++++++++++++
 firmware/cis/RS-COM-2P.cis.ihex |   10 ++++++++++
 7 files changed, 65 insertions(+), 13 deletions(-)

diff -uprN linux-2.6.31.orig/drivers/net/pcmcia/pcnet_cs.c linux-2.6.31/drivers/net/pcmcia/pcnet_cs.c
--- linux-2.6.31.orig/drivers/net/pcmcia/pcnet_cs.c	2009-09-10 07:13:59.000000000 +0900
+++ linux-2.6.31/drivers/net/pcmcia/pcnet_cs.c	2009-09-12 19:59:57.000000000 +0900
@@ -1751,11 +1751,11 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_DEVICE_PROD_ID2(&quot;EN-6200P2&quot;, 0xa996d078),
 	/* too generic! */
 	/* PCMCIA_DEVICE_PROD_ID12(&quot;PCMCIA&quot;, &quot;10/100 Ethernet Card&quot;, 0x281f1c5d, 0x11b0ffc0), */
-	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;PCMCIA&quot;, &quot;EN2218-LAN/MODEM&quot;, 0x281f1c5d, 0x570f348e, &quot;PCMLM28.cis&quot;),
-	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;PCMCIA&quot;, &quot;UE2218-LAN/MODEM&quot;, 0x281f1c5d, 0x6fdcacee, &quot;PCMLM28.cis&quot;),
-	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;Psion Dacom&quot;, &quot;Gold Card V34 Ethernet&quot;, 0xf5f025c2, 0x338e8155, &quot;PCMLM28.cis&quot;),
-	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;Psion Dacom&quot;, &quot;Gold Card V34 Ethernet GSM&quot;, 0xf5f025c2, 0x4ae85d35, &quot;PCMLM28.cis&quot;),
-	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;LINKSYS&quot;, &quot;PCMLM28&quot;, 0xf7cb0b07, 0x66881874, &quot;PCMLM28.cis&quot;),
+	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;PCMCIA&quot;, &quot;EN2218-LAN/MODEM&quot;, 0x281f1c5d, 0x570f348e, &quot;cis/PCMLM28.cis&quot;),
+	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;PCMCIA&quot;, &quot;UE2218-LAN/MODEM&quot;, 0x281f1c5d, 0x6fdcacee, &quot;cis/PCMLM28.cis&quot;),
+	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;Psion Dacom&quot;, &quot;Gold Card V34 Ethernet&quot;, 0xf5f025c2, 0x338e8155, ...
From: David Miller
Date: Tuesday, September 15, 2009 - 2:42 am

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thank you.
--

From: Ken Kawasaki
Date: Saturday, October 3, 2009 - 3:32 pm

pcnet_cs,serial_cs:
  
add cis of National Semicondoctor's lan&amp;modem mulitifunction pcmcia card,
NE2K, tamarack ethernet card,
and some serial card(COMpad2, COMpad4).

   
Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

 drivers/net/pcmcia/pcnet_cs.c  |   10 +++++-----
 drivers/serial/serial_cs.c     |   12 ++++++------
 firmware/Makefile              |    7 +++++--
 firmware/WHENCE                |    5 +++++
 firmware/cis/COMpad2.cis.ihex  |   11 +++++++++++
 firmware/cis/COMpad4.cis.ihex  |    9 +++++++++
 firmware/cis/DP83903.cis.ihex  |   14 ++++++++++++++
 firmware/cis/NE2K.cis.ihex     |    8 ++++++++
 firmware/cis/tamarack.cis.ihex |   10 ++++++++++
 9 files changed, 73 insertions(+), 13 deletions(-)

diff -uprN linux-2.6.32-rc1.orig/drivers/net/pcmcia/pcnet_cs.c linux-2.6.32-rc1/drivers/net/pcmcia/pcnet_cs.c
--- linux-2.6.32-rc1.orig/drivers/net/pcmcia/pcnet_cs.c	2009-10-03 10:52:41.000000000 +0900
+++ linux-2.6.32-rc1/drivers/net/pcmcia/pcnet_cs.c	2009-10-03 11:13:10.000000000 +0900
@@ -1754,14 +1754,14 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;Psion Dacom&quot;, &quot;Gold Card V34 Ethernet&quot;, 0xf5f025c2, 0x338e8155, &quot;cis/PCMLM28.cis&quot;),
 	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;Psion Dacom&quot;, &quot;Gold Card V34 Ethernet GSM&quot;, 0xf5f025c2, 0x4ae85d35, &quot;cis/PCMLM28.cis&quot;),
 	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;LINKSYS&quot;, &quot;PCMLM28&quot;, 0xf7cb0b07, 0x66881874, &quot;cis/PCMLM28.cis&quot;),
-	PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, &quot;DAYNA COMMUNICATIONS&quot;, &quot;LAN AND MODEM MULTIFUNCTION&quot;, 0x8fdf8f89, 0xdd5ed9e8, &quot;DP83903.cis&quot;),
-	PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, &quot;NSC MF LAN/Modem&quot;, 0x58fc6056, &quot;DP83903.cis&quot;),
-	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, &quot;DP83903.cis&quot;),
+	PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, &quot;DAYNA COMMUNICATIONS&quot;, &quot;LAN AND MODEM MULTIFUNCTION&quot;, 0x8fdf8f89, 0xdd5ed9e8, &quot;cis/DP83903.cis&quot;),
+	PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, &quot;NSC MF LAN/Modem&quot;, 0x58fc6056, &quot;cis/DP83903.cis&quot;),
+	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, ...
From: David Miller
Date: Monday, October 5, 2009 - 12:40 am

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thanks.
--

From: Ken Kawasaki
Date: Sunday, October 11, 2009 - 5:12 am

3c574_cs:
 spin_lock the set_multicast_list function.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

3c574_cs.c |   13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

--- linux-2.6.32-rc3/drivers/net/pcmcia/3c574_cs.c.orig	2009-10-10 15:08:05.000000000 +0900
+++ linux-2.6.32-rc3/drivers/net/pcmcia/3c574_cs.c	2009-10-10 15:10:27.000000000 +0900
@@ -251,6 +251,7 @@ static void el3_tx_timeout(struct net_de
 static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 static const struct ethtool_ops netdev_ethtool_ops;
 static void set_rx_mode(struct net_device *dev);
+static void set_multicast_list(struct net_device *dev);
 
 static void tc574_detach(struct pcmcia_device *p_dev);
 
@@ -266,7 +267,7 @@ static const struct net_device_ops el3_n
 	.ndo_tx_timeout 	= el3_tx_timeout,
 	.ndo_get_stats		= el3_get_stats,
 	.ndo_do_ioctl		= el3_ioctl,
-	.ndo_set_multicast_list = set_rx_mode,
+	.ndo_set_multicast_list = set_multicast_list,
 	.ndo_change_mtu		= eth_change_mtu,
 	.ndo_set_mac_address 	= eth_mac_addr,
 	.ndo_validate_addr	= eth_validate_addr,
@@ -1161,6 +1162,16 @@ static void set_rx_mode(struct net_devic
 		outw(SetRxFilter | RxStation | RxBroadcast, ioaddr + EL3_CMD);
 }
 
+static void set_multicast_list(struct net_device *dev)
+{
+	struct el3_private *lp = netdev_priv(dev);
+	unsigned long flags;
+
+	spin_lock_irqsave(&amp;lp-&gt;window_lock, flags);
+	set_rx_mode(dev);
+	spin_unlock_irqrestore(&amp;lp-&gt;window_lock, flags);
+}
+
 static int el3_close(struct net_device *dev)
 {
 	unsigned int ioaddr = dev-&gt;base_addr;
--

From: David Miller
Date: Tuesday, October 13, 2009 - 12:33 am

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thanks!

--

From: Ken Kawasaki
Date: Saturday, October 17, 2009 - 6:39 pm

pcnet_cs,serial_cs:

add cis of PreMax ethernet pcmcia card,
and some Sierra Wireless serial card(AC555, AC7xx, AC8xx).

use PROD_ID for AC7xx, because MANF_ID of AC7xx and AC8xx are the same.


Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

 drivers/net/pcmcia/pcnet_cs.c    |    2 +-
 drivers/serial/serial_cs.c       |    8 ++++----
 firmware/Makefile                |    6 ++++--
 firmware/WHENCE                  |    4 ++++
 firmware/cis/PE-200.cis.ihex     |    9 +++++++++
 firmware/cis/SW_555_SER.cis.ihex |   12 ++++++++++++
 firmware/cis/SW_7xx_SER.cis.ihex |   13 +++++++++++++
 firmware/cis/SW_8xx_SER.cis.ihex |   13 +++++++++++++
 8 files changed, 60 insertions(+), 7 deletions(-)

diff -urpN linux-2.6.32-rc5.orig/drivers/net/pcmcia/pcnet_cs.c linux-2.6.32-rc5/drivers/net/pcmcia/pcnet_cs.c
--- linux-2.6.32-rc5.orig/drivers/net/pcmcia/pcnet_cs.c	2009-10-17 15:53:44.000000000 +0900
+++ linux-2.6.32-rc5/drivers/net/pcmcia/pcnet_cs.c	2009-10-17 16:07:12.000000000 +0900
@@ -1760,7 +1760,7 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, &quot;cis/LA-PCM.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;KTI&quot;, &quot;PE520 PLUS&quot;, 0xad180345, 0x9d58d392, &quot;PE520.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;NDC&quot;, &quot;Ethernet&quot;, 0x01c43ae1, 0x00b2e941, &quot;cis/NE2K.cis&quot;),
-	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;PMX   &quot;, &quot;PE-200&quot;, 0x34f3f1c8, 0x10b59f8c, &quot;PE-200.cis&quot;),
+	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;PMX   &quot;, &quot;PE-200&quot;, 0x34f3f1c8, 0x10b59f8c, &quot;cis/PE-200.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;TAMARACK&quot;, &quot;Ethernet&quot;, 0xcf434fba, 0x00b2e941, &quot;cis/tamarack.cis&quot;),
 	PCMCIA_DEVICE_PROD_ID12(&quot;Ethernet&quot;, &quot;CF Size PC Card&quot;, 0x00b2e941, 0x43ac239b),
 	PCMCIA_DEVICE_PROD_ID123(&quot;Fast Ethernet&quot;, &quot;CF Size PC Card&quot;, &quot;1.0&quot;,
diff -urpN linux-2.6.32-rc5.orig/drivers/serial/serial_cs.c linux-2.6.32-rc5/drivers/serial/serial_cs.c
--- linux-2.6.32-rc5.orig/drivers/serial/serial_cs.c	2009-10-17 15:53:45.000000000 +0900
+++ linux-2.6.32-rc5/drivers/serial/serial_cs.c	2009-10-17 ...
From: Dan Williams
Date: Wednesday, October 21, 2009 - 12:18 pm

Random question: are CIS files copyrightable?  What exactly do they
contain, just updates to the the CIS data on the card itself that the
manufacturer forgot to burn before shipping the card?

Also, I've got a Sierra AC860 here that reports as &quot;prod_id(2):
&quot;AC860&quot;&quot;, and has the same manf_id (0x0192) and card_id (0x710) as the
AC850.

manf_id: 0x0192 card_id: 0x0710
function: 6 (network)
prod_id(1): &quot;Sierra Wireless&quot; (0xd85f6206)
prod_id(2): &quot;AC860&quot; (0x698f93db)
prod_id(3): &quot;3G Network Adapter&quot; (0xab3c6f47)
prod_id(4): &quot;R1&quot; (0xd9533fec)

It currently requests the 7xx CIS file because there isn't a specific
check for it in the driver and it uses the default 7xx manfid/prodid,
should I submit something like:

+	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;Sierra Wireless&quot;, &quot;AC860&quot;, 0xd85f6206, 0x698f93db, &quot;cis/SW_8xx_SER.cis&quot;), /* Sierra Wireless AC860 3G Network Adapter R1 */

?


--

From: Ken Kawasaki
Date: Thursday, October 22, 2009 - 4:10 am

The CIS contains the IRQ, ioport-range, voltage information etc
like the PCI config space.
So I think it is not copyrightable.

The reason for the CIS update is original CIS does not conform to the pcmcia spec,

Actually, not all Sierra Wireless card need the CIS update.

Could you remove the PCMCIA_DEVICE_CIS_PROD_ID12 and PCMCIA_DEVICE_CIS_MANF_CARD
definition of the Sierra Wireless card,
and check the AC860 works or not?


Here is the output of dumpcis for SW_8xx_SER.cis.

Socket 0
offset 0x02, tuple 0x01, link 0x01
  ff 
dev_info
  no_info

offset 0x05, tuple 0x17, link 0x03
  41 00 ff 
attr_dev_info
  EEPROM 250ns, 512b

offset 0x0a, tuple 0x20, link 0x04
  92 01 10 07 
manfid 0x0192, 0x0710

offset 0x10, tuple 0x21, link 0x02
  02 00 
funcid serial_port

offset 0x14, tuple 0x15, link 0x2f
  07 00 53 69 65 72 72 61 20 57 69 72 65 6c 65 73 
  73 00 41 43 38 35 30 00 33 47 20 4e 65 74 77 6f 
  72 6b 20 41 64 61 70 74 65 72 00 52 31 00 ff 
vers_1 7.0, &quot;Sierra Wireless&quot;, &quot;AC850&quot;, &quot;3G Network Adapter&quot;, &quot;R1&quot;

offset 0x45, tuple 0x1a, link 0x05
  01 03 00 07 73 
config base 0x0700 mask 0x0073 last_index 0x03

offset 0x4c, tuple 0x1b, link 0x10
  e0 01 19 78 4d 55 5d 25 a3 60 f8 48 07 30 bc 86 
cftable_entry 0x20 [default]
  Vcc Istatic 45mA Iavg 50mA Ipeak 55mA Idown 20mA
  io 0x48f8-0x48ff [lines=3] [8bit] [range]
  irq mask 0x86bc [level]

offset 0x5e, tuple 0x1b, link 0x08
  a1 01 08 a3 60 f8 47 07 
cftable_entry 0x21
  io 0x47f8-0x47ff [lines=3] [8bit] [range]

offset 0x68, tuple 0x1b, link 0x08
  a2 01 08 a3 60 e8 48 07 
cftable_entry 0x22
  io 0x48e8-0x48ef [lines=3] [8bit] [range]

offset 0x72, tuple 0x1b, link 0x08
  a3 01 08 a3 60 e8 47 07 
cftable_entry 0x23
  io 0x47e8-0x47ef [lines=3] [8bit] [range]

offset 0x7c, tuple 0x1b, link 0x04
  a4 01 08 23 
cftable_entry 0x24
  io 0x0000-0x0007 [lines=3] [8bit]

offset 0x82, tuple 0x14, link 0x00
no_long_link


Best Regards
Ken.
--

From: Ben Hutchings
Date: Saturday, October 24, 2009 - 1:33 pm

[...]

If it is subject to copyright - which apparently they think it is - then
when redistributing under GPL we must be able to provide the 'preferred
form for modification'.  So that leads to the question, is this blob or
hex file the preferred form?

I know very little about CIS but it appears to have a fairly simple
structure that could perhaps be constructed with a hex editor.  However,
if a manufacturer or a later maintainer actually compiles it from a file
in some other format which has extra information like comments or named
constants then I think that should be included in the kernel source.

Ben.

-- 
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption] would be
development of an easy way to factor large prime numbers. - Bill Gates
From: David Miller
Date: Thursday, October 29, 2009 - 10:51 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied to net-2.6, thanks.
--

From: Ken Kawasaki
Date: Monday, December 21, 2009 - 4:58 am

pcnet_cs,serial_cs:

add cis of KTI PE520 pcmcia network card,
and some serial card(GLOBETROTTER, Sierra Wireless AC860).

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

 drivers/net/pcmcia/pcnet_cs.c      |    4 ++--
 drivers/serial/serial_cs.c         |   16 +++++++++++++++-
 firmware/Makefile                  |    5 +++--
 firmware/WHENCE                    |   11 +++++++++++
 firmware/cis/GLOBETROTTER.cis.ihex |   15 +++++++++++++++
 firmware/cis/PE520.cis.ihex        |    9 +++++++++
 6 files changed, 55 insertions(+), 5 deletions(-)

diff -uprN linux-2.6.33-rc1.orig/drivers/net/pcmcia/pcnet_cs.c linux-2.6.33-rc1/drivers/net/pcmcia/pcnet_cs.c
--- linux-2.6.33-rc1.orig/drivers/net/pcmcia/pcnet_cs.c	2009-12-20 18:17:04.000000000 +0900
+++ linux-2.6.33-rc1/drivers/net/pcmcia/pcnet_cs.c	2009-12-20 18:30:54.000000000 +0900
@@ -1741,7 +1741,7 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, &quot;NSC MF LAN/Modem&quot;, 0x58fc6056, &quot;cis/DP83903.cis&quot;),
 	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, &quot;cis/DP83903.cis&quot;),
 	PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, &quot;cis/LA-PCM.cis&quot;),
-	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;KTI&quot;, &quot;PE520 PLUS&quot;, 0xad180345, 0x9d58d392, &quot;PE520.cis&quot;),
+	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;KTI&quot;, &quot;PE520 PLUS&quot;, 0xad180345, 0x9d58d392, &quot;cis/PE520.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;NDC&quot;, &quot;Ethernet&quot;, 0x01c43ae1, 0x00b2e941, &quot;cis/NE2K.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;PMX   &quot;, &quot;PE-200&quot;, 0x34f3f1c8, 0x10b59f8c, &quot;cis/PE-200.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;TAMARACK&quot;, &quot;Ethernet&quot;, 0xcf434fba, 0x00b2e941, &quot;cis/tamarack.cis&quot;),
@@ -1754,7 +1754,7 @@ MODULE_DEVICE_TABLE(pcmcia, pcnet_ids);
 MODULE_FIRMWARE(&quot;cis/PCMLM28.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/DP83903.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/LA-PCM.cis&quot;);
-MODULE_FIRMWARE(&quot;PE520.cis&quot;);
+MODULE_FIRMWARE(&quot;cis/PE520.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/NE2K.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/PE-200.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/tamarack.cis&quot;);
diff -uprN ...
From: Ben Hutchings
Date: Tuesday, December 22, 2009 - 7:50 pm

The phrase &quot;AS IS&quot; is usually used in a disclaimer of warranty.  It is

By &quot;intellectual property&quot; do you mean copyright, or do they claim
patent rights in it as well?

You need to be explicit.

Ben.

-- 
Ben Hutchings
Experience is what causes a person to make new mistakes instead of old ones.
From: Ken Kawasaki
Date: Wednesday, December 23, 2009 - 1:10 am

pcnet_cs,serial_cs:

add cis of KTI PE520 pcmcia network card,
and serial card(Sierra Wireless AC860).

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

 drivers/net/pcmcia/pcnet_cs.c |    4 ++--
 drivers/serial/serial_cs.c    |   16 +++++++++++++++-
 firmware/Makefile             |    3 ++-
 firmware/WHENCE               |    1 +
 firmware/cis/PE520.cis.ihex   |    9 +++++++++
 5 files changed, 29 insertions(+), 4 deletions(-)

diff -uprN linux-2.6.33-rc1.orig/drivers/net/pcmcia/pcnet_cs.c linux-2.6.33-rc1/drivers/net/pcmcia/pcnet_cs.c
--- linux-2.6.33-rc1.orig/drivers/net/pcmcia/pcnet_cs.c	2009-12-20 18:17:04.000000000 +0900
+++ linux-2.6.33-rc1/drivers/net/pcmcia/pcnet_cs.c	2009-12-20 18:30:54.000000000 +0900
@@ -1741,7 +1741,7 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, &quot;NSC MF LAN/Modem&quot;, 0x58fc6056, &quot;cis/DP83903.cis&quot;),
 	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, &quot;cis/DP83903.cis&quot;),
 	PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, &quot;cis/LA-PCM.cis&quot;),
-	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;KTI&quot;, &quot;PE520 PLUS&quot;, 0xad180345, 0x9d58d392, &quot;PE520.cis&quot;),
+	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;KTI&quot;, &quot;PE520 PLUS&quot;, 0xad180345, 0x9d58d392, &quot;cis/PE520.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;NDC&quot;, &quot;Ethernet&quot;, 0x01c43ae1, 0x00b2e941, &quot;cis/NE2K.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;PMX   &quot;, &quot;PE-200&quot;, 0x34f3f1c8, 0x10b59f8c, &quot;cis/PE-200.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;TAMARACK&quot;, &quot;Ethernet&quot;, 0xcf434fba, 0x00b2e941, &quot;cis/tamarack.cis&quot;),
@@ -1754,7 +1754,7 @@ MODULE_DEVICE_TABLE(pcmcia, pcnet_ids);
 MODULE_FIRMWARE(&quot;cis/PCMLM28.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/DP83903.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/LA-PCM.cis&quot;);
-MODULE_FIRMWARE(&quot;PE520.cis&quot;);
+MODULE_FIRMWARE(&quot;cis/PE520.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/NE2K.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/PE-200.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/tamarack.cis&quot;);
diff -uprN linux-2.6.33-rc1.orig/drivers/serial/serial_cs.c linux-2.6.33-rc1/drivers/serial/serial_cs.c
--- linux-2.6.33-rc1.orig/drivers/serial/serial_cs.c	2009-12-20 ...
From: Ken Kawasaki
Date: Monday, December 28, 2009 - 6:17 pm

axnet_cs:
    remove unnecessary spin_unlock_irqrestore,spin_lock_irqsave.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.33-rc2/drivers/net/pcmcia/axnet_cs.c.orig	2009-12-27 18:21:59.000000000 +0900
+++ linux-2.6.33-rc2/drivers/net/pcmcia/axnet_cs.c	2009-12-27 18:22:38.000000000 +0900
@@ -1065,14 +1065,11 @@ static netdev_tx_t axnet_start_xmit(stru
 	   
 	spin_lock_irqsave(&amp;ei_local-&gt;page_lock, flags);
 	outb_p(0x00, e8390_base + EN0_IMR);
-	spin_unlock_irqrestore(&amp;ei_local-&gt;page_lock, flags);
 	
 	/*
 	 *	Slow phase with lock held.
 	 */
 	 
-	spin_lock_irqsave(&amp;ei_local-&gt;page_lock, flags);
-	
 	ei_local-&gt;irqlock = 1;
 
 	send_length = max(length, ETH_ZLEN);
--

From: David Miller
Date: Sunday, January 3, 2010 - 10:52 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied to net-next-2.6
--

From: Ken Kawasaki
Date: Monday, January 4, 2010 - 4:34 am

pcnet_cs,serial_cs:

add cis of KTI PE520 pcmcia network card,
and serial card(Sierra Wireless AC860).

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

 drivers/net/pcmcia/pcnet_cs.c |    4 ++--
 drivers/serial/serial_cs.c    |   15 ++++++++++++++-
 firmware/Makefile             |    3 ++-
 firmware/WHENCE               |    1 +
 firmware/cis/PE520.cis.ihex   |    9 +++++++++
 5 files changed, 28 insertions(+), 4 deletions(-)

diff -uprN linux-2.6.33-rc1.orig/drivers/net/pcmcia/pcnet_cs.c linux-2.6.33-rc1/drivers/net/pcmcia/pcnet_cs.c
--- linux-2.6.33-rc1.orig/drivers/net/pcmcia/pcnet_cs.c	2009-12-20 18:17:04.000000000 +0900
+++ linux-2.6.33-rc1/drivers/net/pcmcia/pcnet_cs.c	2009-12-20 18:30:54.000000000 +0900
@@ -1741,7 +1741,7 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, &quot;NSC MF LAN/Modem&quot;, 0x58fc6056, &quot;cis/DP83903.cis&quot;),
 	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, &quot;cis/DP83903.cis&quot;),
 	PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, &quot;cis/LA-PCM.cis&quot;),
-	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;KTI&quot;, &quot;PE520 PLUS&quot;, 0xad180345, 0x9d58d392, &quot;PE520.cis&quot;),
+	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;KTI&quot;, &quot;PE520 PLUS&quot;, 0xad180345, 0x9d58d392, &quot;cis/PE520.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;NDC&quot;, &quot;Ethernet&quot;, 0x01c43ae1, 0x00b2e941, &quot;cis/NE2K.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;PMX   &quot;, &quot;PE-200&quot;, 0x34f3f1c8, 0x10b59f8c, &quot;cis/PE-200.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;TAMARACK&quot;, &quot;Ethernet&quot;, 0xcf434fba, 0x00b2e941, &quot;cis/tamarack.cis&quot;),
@@ -1754,7 +1754,7 @@ MODULE_DEVICE_TABLE(pcmcia, pcnet_ids);
 MODULE_FIRMWARE(&quot;cis/PCMLM28.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/DP83903.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/LA-PCM.cis&quot;);
-MODULE_FIRMWARE(&quot;PE520.cis&quot;);
+MODULE_FIRMWARE(&quot;cis/PE520.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/NE2K.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/PE-200.cis&quot;);
 MODULE_FIRMWARE(&quot;cis/tamarack.cis&quot;);
diff -uprN linux-2.6.33-rc1.orig/drivers/serial/serial_cs.c linux-2.6.33-rc1/drivers/serial/serial_cs.c
--- linux-2.6.33-rc1.orig/drivers/serial/serial_cs.c	2009-12-20 ...
From: David Miller
Date: Wednesday, January 6, 2010 - 9:38 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied to net-2.6, thanks.
--

From: Ken Kawasaki
Date: Friday, January 22, 2010 - 2:56 pm

fmvj18x_cs, serial_cs:
 add new id
 Panasonic lan &amp; modem card (model name:AL-VML101)

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.33-rc5/drivers/net/pcmcia/fmvj18x_cs.c.orig	2010-01-22 21:59:25.000000000 +0900
+++ linux-2.6.33-rc5/drivers/net/pcmcia/fmvj18x_cs.c	2010-01-22 21:59:44.000000000 +0900
@@ -717,6 +717,7 @@ static struct pcmcia_device_id fmvj18x_i
 	PCMCIA_PFC_DEVICE_PROD_ID12(0, &quot;NEC&quot;, &quot;PK-UG-J001&quot; ,0x18df0ba0 ,0x831b1064),
 	PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0105, 0x0d0a),
 	PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0105, 0x0e0a),
+	PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0032, 0x0e01),
 	PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0032, 0x0a05),
 	PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x0032, 0x1101),
 	PCMCIA_DEVICE_NULL,
--- linux-2.6.33-rc5/drivers/serial/serial_cs.c.orig	2010-01-22 22:00:00.000000000 +0900
+++ linux-2.6.33-rc5/drivers/serial/serial_cs.c	2010-01-22 22:00:21.000000000 +0900
@@ -758,6 +758,7 @@ static struct pcmcia_device_id serial_id
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, &quot;PCMCIAs&quot;, &quot;LanModem&quot;, 0xdcfe12d3, 0xc67c648f),
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, &quot;TDK&quot;, &quot;GlobalNetworker 3410/3412&quot;, 0x1eae9475, 0xd9a93bed),
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, &quot;Xircom&quot;, &quot;CreditCard Ethernet+Modem II&quot;, 0x2e3ee845, 0xeca401bf),
+	PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0032, 0x0e01),
 	PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0032, 0x0a05),
 	PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0032, 0x1101),
 	PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0104, 0x0070),
--

From: Ken Kawasaki
Date: Saturday, February 27, 2010 - 4:34 pm

axnet_cs:
  add new id (corega PCC-TXM)

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.33-stock/drivers/net/pcmcia/axnet_cs.c.orig	2010-02-27 20:57:19.000000000 +0900
+++ linux-2.6.33-stock/drivers/net/pcmcia/axnet_cs.c	2010-02-27 20:59:27.000000000 +0900
@@ -779,6 +779,7 @@ static struct pcmcia_device_id axnet_ids
 	PCMCIA_DEVICE_PROD_ID12(&quot;CNet&quot;, &quot;CNF301&quot;, 0xbc477dde, 0x78c5f40b),
 	PCMCIA_DEVICE_PROD_ID12(&quot;corega K.K.&quot;, &quot;corega FEther PCC-TXD&quot;, 0x5261440f, 0x436768c5),
 	PCMCIA_DEVICE_PROD_ID12(&quot;corega K.K.&quot;, &quot;corega FEtherII PCC-TXD&quot;, 0x5261440f, 0x730df72e),
+	PCMCIA_DEVICE_PROD_ID12(&quot;corega K.K.&quot;, &quot;corega FEther PCC-TXM&quot;, 0x5261440f, 0x3abbd061),
 	PCMCIA_DEVICE_PROD_ID12(&quot;Dynalink&quot;, &quot;L100C16&quot;, 0x55632fd5, 0x66bc2a90),
 	PCMCIA_DEVICE_PROD_ID12(&quot;IO DATA&quot;, &quot;ETXPCM&quot;, 0x547e66dc, 0x233adac2),
 	PCMCIA_DEVICE_PROD_ID12(&quot;Linksys&quot;, &quot;EtherFast 10/100 PC Card (PCMPC100 V3)&quot;, 0x0733cc81, 0x232019a8),
--

From: David Miller
Date: Sunday, February 28, 2010 - 2:03 am

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thanks.
--

From: Ken Kawasaki
Date: Saturday, March 27, 2010 - 1:55 pm

pcnet_cs:
 *add new id (Allied Telesis LM33-PCM-T Lan&amp;Modem multifunction card)
 *use PROD_ID for LA-PCM.(because LA-PCM and LM33-PCM-T use the same MANF_ID).

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.34-rc2/drivers/net/pcmcia/pcnet_cs.c.orig	2010-03-21 20:39:59.000000000 +0900
+++ linux-2.6.34-rc2/drivers/net/pcmcia/pcnet_cs.c	2010-03-27 14:42:34.000000000 +0900
@@ -1549,6 +1549,7 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x021b, 0x0101),
 	PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x08a1, 0xc0ab),
 	PCMCIA_PFC_DEVICE_PROD_ID12(0, &quot;AnyCom&quot;, &quot;Fast Ethernet + 56K COMBO&quot;, 0x578ba6e7, 0xb0ac62c4),
+	PCMCIA_PFC_DEVICE_PROD_ID12(0, &quot;ATKK&quot;, &quot;LM33-PCM-T&quot;, 0xba9eb7e2, 0x077c174e),
 	PCMCIA_PFC_DEVICE_PROD_ID12(0, &quot;D-Link&quot;, &quot;DME336T&quot;, 0x1a424a1c, 0xb23897ff),
 	PCMCIA_PFC_DEVICE_PROD_ID12(0, &quot;Grey Cell&quot;, &quot;GCS3000&quot;, 0x2a151fac, 0x48b932ae),
 	PCMCIA_PFC_DEVICE_PROD_ID12(0, &quot;Linksys&quot;, &quot;EtherFast 10&amp;100 + 56K PC Card (PCMLM56)&quot;, 0x0733cc81, 0xb3765033),
@@ -1740,7 +1741,7 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, &quot;DAYNA COMMUNICATIONS&quot;, &quot;LAN AND MODEM MULTIFUNCTION&quot;, 0x8fdf8f89, 0xdd5ed9e8, &quot;cis/DP83903.cis&quot;),
 	PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, &quot;NSC MF LAN/Modem&quot;, 0x58fc6056, &quot;cis/DP83903.cis&quot;),
 	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, &quot;cis/DP83903.cis&quot;),
-	PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, &quot;cis/LA-PCM.cis&quot;),
+	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;Allied Telesis,K.K&quot;, &quot;Ethernet LAN Card&quot;, 0x2ad62f3c, 0x9fd2f0a2, &quot;cis/LA-PCM.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;KTI&quot;, &quot;PE520 PLUS&quot;, 0xad180345, 0x9d58d392, &quot;cis/PE520.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;NDC&quot;, &quot;Ethernet&quot;, 0x01c43ae1, 0x00b2e941, &quot;cis/NE2K.cis&quot;),
 	PCMCIA_DEVICE_CIS_PROD_ID12(&quot;PMX   &quot;, &quot;PE-200&quot;, 0x34f3f1c8, 0x10b59f8c, &quot;cis/PE-200.cis&quot;),
--- linux-2.6.34-rc2/drivers/serial/serial_cs.c.orig	2010-03-22 06:53:31.000000000 +0900
+++ linux-2.6.34-rc2/drivers/serial/serial_cs.c	2010-03-27 14:42:53.000000000 +0900
@@ ...
From: David Miller
Date: Saturday, March 27, 2010 - 4:56 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thanks Ken.
--

From: Ken Kawasaki
Date: Saturday, April 3, 2010 - 2:14 pm

smc91c92_cs:
 *cvt_ascii_address returns 0, if success.
 *call free_netdev, if we can't find hardware address.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.34-rc3/drivers/net/pcmcia/smc91c92_cs.c.orig	2010-04-03 09:41:20.000000000 +0900
+++ linux-2.6.34-rc3/drivers/net/pcmcia/smc91c92_cs.c	2010-04-03 20:34:06.000000000 +0900
@@ -493,13 +493,14 @@ static int pcmcia_get_versmac(struct pcm
 {
 	struct net_device *dev = priv;
 	cisparse_t parse;
+	u8 *buf;
 
 	if (pcmcia_parse_tuple(tuple, &amp;parse))
 		return -EINVAL;
 
-	if ((parse.version_1.ns &gt; 3) &amp;&amp;
-	    (cvt_ascii_address(dev,
-			       (parse.version_1.str + parse.version_1.ofs[3]))))
+	buf = parse.version_1.str + parse.version_1.ofs[3];
+
+	if ((parse.version_1.ns &gt; 3) &amp;&amp; (cvt_ascii_address(dev, buf) == 0))
 		return 0;
 
 	return -EINVAL;
@@ -528,7 +529,7 @@ static int mhz_setup(struct pcmcia_devic
     len = pcmcia_get_tuple(link, 0x81, &amp;buf);
     if (buf &amp;&amp; len &gt;= 13) {
 	    buf[12] = '\0';
-	    if (cvt_ascii_address(dev, buf))
+	    if (cvt_ascii_address(dev, buf) == 0)
 		    rc = 0;
     }
     kfree(buf);
@@ -910,7 +911,7 @@ static int smc91c92_config(struct pcmcia
 
     if (i != 0) {
 	printk(KERN_NOTICE &quot;smc91c92_cs: Unable to find hardware address.\n&quot;);
-	goto config_undo;
+	goto config_failed;
     }
 
     smc-&gt;duplex = 0;
@@ -998,6 +999,7 @@ config_undo:
     unregister_netdev(dev);
 config_failed:
     smc91c92_release(link);
+    free_netdev(dev);
     return -ENODEV;
 } /* smc91c92_config */
 
--

From: David Miller
Date: Saturday, April 3, 2010 - 3:07 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thanks.
--

From: Ken Kawasaki
Date: Saturday, April 10, 2010 - 3:50 pm

smc91c92_cs:
  * define multicast_table as unsigned char
  * remove unnecessary &quot;#ifndef final_version&quot;

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.34-rc3-git9/drivers/net/pcmcia/smc91c92_cs.c.orig	2010-04-10 07:08:09.000000000 +0900
+++ linux-2.6.34-rc3-git9/drivers/net/pcmcia/smc91c92_cs.c	2010-04-10 07:31:47.000000000 +0900
@@ -1608,9 +1608,12 @@ static void set_rx_mode(struct net_devic
 {
     unsigned int ioaddr = dev-&gt;base_addr;
     struct smc_private *smc = netdev_priv(dev);
-    u_int multicast_table[ 2 ] = { 0, };
+    unsigned char multicast_table[8];
     unsigned long flags;
     u_short rx_cfg_setting;
+    int i;
+
+    memset(multicast_table, 0, sizeof(multicast_table));
 
     if (dev-&gt;flags &amp; IFF_PROMISC) {
 	rx_cfg_setting = RxStripCRC | RxEnable | RxPromisc | RxAllMulti;
@@ -1622,10 +1625,6 @@ static void set_rx_mode(struct net_devic
 
 	    netdev_for_each_mc_addr(mc_addr, dev) {
 		u_int position = ether_crc(6, mc_addr-&gt;dmi_addr);
-#ifndef final_version		/* Verify multicast address. */
-		if ((mc_addr-&gt;dmi_addr[0] &amp; 1) == 0)
-		    continue;
-#endif
 		multicast_table[position &gt;&gt; 29] |= 1 &lt;&lt; ((position &gt;&gt; 26) &amp; 7);
 	    }
 	}
@@ -1635,8 +1634,8 @@ static void set_rx_mode(struct net_devic
     /* Load MC table and Rx setting into the chip without interrupts. */
     spin_lock_irqsave(&amp;smc-&gt;lock, flags);
     SMC_SELECT_BANK(3);
-    outl(multicast_table[0], ioaddr + MULTICAST0);
-    outl(multicast_table[1], ioaddr + MULTICAST4);
+    for (i = 0; i &lt; 8; i++)
+	outb(multicast_table[i], ioaddr + MULTICAST0 + i);
     SMC_SELECT_BANK(0);
     outw(rx_cfg_setting, ioaddr + RCR);
     SMC_SELECT_BANK(2);
--

From: David Miller
Date: Tuesday, April 13, 2010 - 3:09 am

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

It is clear there are not too many testers of multicast
with this driver :-)

Thanks for fixing this bug, patch applied.
--

From: Ken Kawasaki
Date: Saturday, April 24, 2010 - 1:37 pm

smc91c92_cs:
  * spin_unlock_irqrestore before calling smc_interrupt() in media_check()
     to avoid lockup.
  * use spin_lock_irqsave for ethtool function.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.34-rc5/drivers/net/pcmcia/smc91c92_cs.c.orig	2010-04-24 07:33:50.000000000 +0900
+++ linux-2.6.34-rc5/drivers/net/pcmcia/smc91c92_cs.c	2010-04-24 07:42:44.000000000 +0900
@@ -1804,23 +1804,30 @@ static void media_check(u_long arg)
     SMC_SELECT_BANK(1);
     media |= (inw(ioaddr + CONFIG) &amp; CFG_AUI_SELECT) ? 2 : 1;
 
+    SMC_SELECT_BANK(saved_bank);
+    spin_unlock_irqrestore(&amp;smc-&gt;lock, flags);
+
     /* Check for pending interrupt with watchdog flag set: with
        this, we can limp along even if the interrupt is blocked */
     if (smc-&gt;watchdog++ &amp;&amp; ((i&gt;&gt;8) &amp; i)) {
 	if (!smc-&gt;fast_poll)
 	    printk(KERN_INFO &quot;%s: interrupt(s) dropped!\n&quot;, dev-&gt;name);
+	local_irq_save(flags);
 	smc_interrupt(dev-&gt;irq, dev);
+	local_irq_restore(flags);
 	smc-&gt;fast_poll = HZ;
     }
     if (smc-&gt;fast_poll) {
 	smc-&gt;fast_poll--;
 	smc-&gt;media.expires = jiffies + HZ/100;
 	add_timer(&amp;smc-&gt;media);
-	SMC_SELECT_BANK(saved_bank);
-	spin_unlock_irqrestore(&amp;smc-&gt;lock, flags);
 	return;
     }
 
+    spin_lock_irqsave(&amp;smc-&gt;lock, flags);
+
+    saved_bank = inw(ioaddr + BANK_SELECT);
+
     if (smc-&gt;cfg &amp; CFG_MII_SELECT) {
 	if (smc-&gt;mii_if.phy_id &lt; 0)
 	    goto reschedule;
@@ -1978,15 +1985,16 @@ static int smc_get_settings(struct net_d
 	unsigned int ioaddr = dev-&gt;base_addr;
 	u16 saved_bank = inw(ioaddr + BANK_SELECT);
 	int ret;
+	unsigned long flags;
 
-	spin_lock_irq(&amp;smc-&gt;lock);
+	spin_lock_irqsave(&amp;smc-&gt;lock, flags);
 	SMC_SELECT_BANK(3);
 	if (smc-&gt;cfg &amp; CFG_MII_SELECT)
 		ret = mii_ethtool_gset(&amp;smc-&gt;mii_if, ecmd);
 	else
 		ret = smc_netdev_get_ecmd(dev, ecmd);
 	SMC_SELECT_BANK(saved_bank);
-	spin_unlock_irq(&amp;smc-&gt;lock);
+	spin_unlock_irqrestore(&amp;smc-&gt;lock, flags);
 	return ret;
 }
 
@@ -1996,15 +2004,16 @@ static ...
From: David Miller
Date: Tuesday, April 27, 2010 - 2:47 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thank you.
--

From: Ken Kawasaki
Date: Saturday, June 12, 2010 - 3:17 am

pcnet_cs:
serial_cs:
    add new id (TOSHIBA Modem/LAN Card)

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.35-rc2/drivers/net/pcmcia/pcnet_cs.c.orig	2010-06-12 08:19:26.000000000 +0900
+++ linux-2.6.35-rc2/drivers/net/pcmcia/pcnet_cs.c	2010-06-12 08:21:35.000000000 +0900
@@ -1727,6 +1727,7 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;Psion Dacom&quot;, &quot;Gold Card V34 Ethernet&quot;, 0xf5f025c2, 0x338e8155, &quot;cis/PCMLM28.cis&quot;),
 	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;Psion Dacom&quot;, &quot;Gold Card V34 Ethernet GSM&quot;, 0xf5f025c2, 0x4ae85d35, &quot;cis/PCMLM28.cis&quot;),
 	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;LINKSYS&quot;, &quot;PCMLM28&quot;, 0xf7cb0b07, 0x66881874, &quot;cis/PCMLM28.cis&quot;),
+	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, &quot;TOSHIBA&quot;, &quot;Modem/LAN Card&quot;, 0xb4585a1a, 0x53f922f8, &quot;cis/PCMLM28.cis&quot;),
 	PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, &quot;DAYNA COMMUNICATIONS&quot;, &quot;LAN AND MODEM MULTIFUNCTION&quot;, 0x8fdf8f89, 0xdd5ed9e8, &quot;cis/DP83903.cis&quot;),
 	PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, &quot;NSC MF LAN/Modem&quot;, 0x58fc6056, &quot;cis/DP83903.cis&quot;),
 	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, &quot;cis/DP83903.cis&quot;),
--- linux-2.6.35-rc2/drivers/serial/serial_cs.c.orig	2010-06-12 09:08:11.000000000 +0900
+++ linux-2.6.35-rc2/drivers/serial/serial_cs.c	2010-06-12 09:08:47.000000000 +0900
@@ -821,6 +821,7 @@ static struct pcmcia_device_id serial_id
 	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, &quot;Psion Dacom&quot;, &quot;Gold Card V34 Ethernet&quot;, 0xf5f025c2, 0x338e8155, &quot;cis/PCMLM28.cis&quot;),
 	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, &quot;Psion Dacom&quot;, &quot;Gold Card V34 Ethernet GSM&quot;, 0xf5f025c2, 0x4ae85d35, &quot;cis/PCMLM28.cis&quot;),
 	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, &quot;LINKSYS&quot;, &quot;PCMLM28&quot;, 0xf7cb0b07, 0x66881874, &quot;cis/PCMLM28.cis&quot;),
+	PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, &quot;TOSHIBA&quot;, &quot;Modem/LAN Card&quot;, 0xb4585a1a, 0x53f922f8, &quot;cis/PCMLM28.cis&quot;),
 	PCMCIA_MFC_DEVICE_CIS_PROD_ID12(1, &quot;DAYNA COMMUNICATIONS&quot;, &quot;LAN AND MODEM MULTIFUNCTION&quot;, 0x8fdf8f89, 0xdd5ed9e8, &quot;cis/DP83903.cis&quot;),
 	PCMCIA_MFC_DEVICE_CIS_PROD_ID4(1, &quot;NSC MF LAN/Modem&quot;, ...
From: David Miller
Date: Wednesday, June 16, 2010 - 6:11 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thanks.
--

From: Ken Kawasaki
Date: Saturday, June 19, 2010 - 6:24 pm

smc91c92_cs:
  Fix the problem that lan &amp; modem does not work simultaneously
  in the Megahertz multi-function card.
  We need to write MEGAHERTZ_ISR to retrigger interrupt.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

--

--- linux-2.6.35-rc3/drivers/net/pcmcia/smc91c92_cs.c.orig	2010-06-19 09:42:59.000000000 +0900
+++ linux-2.6.35-rc3/drivers/net/pcmcia/smc91c92_cs.c	2010-06-19 11:25:34.000000000 +0900
@@ -1505,12 +1505,20 @@ irq_done:
 	writeb(cor &amp; ~COR_IREQ_ENA, smc-&gt;base + MOT_LAN + CISREG_COR);
 	writeb(cor, smc-&gt;base + MOT_LAN + CISREG_COR);
     }
-#ifdef DOES_NOT_WORK
-    if (smc-&gt;base != NULL) { /* Megahertz MFC's */
-	readb(smc-&gt;base+MEGAHERTZ_ISR);
-	readb(smc-&gt;base+MEGAHERTZ_ISR);
+
+    if ((smc-&gt;base != NULL) &amp;&amp;  /* Megahertz MFC's */
+	(smc-&gt;manfid == MANFID_MEGAHERTZ) &amp;&amp;
+	(smc-&gt;cardid == PRODID_MEGAHERTZ_EM3288)) {
+
+	u_char tmp;
+	tmp = readb(smc-&gt;base+MEGAHERTZ_ISR);
+	tmp = readb(smc-&gt;base+MEGAHERTZ_ISR);
+
+	/* Retrigger interrupt if needed */
+	writeb(tmp, smc-&gt;base + MEGAHERTZ_ISR);
+	writeb(tmp, smc-&gt;base + MEGAHERTZ_ISR);
     }
-#endif
+
     spin_unlock(&amp;smc-&gt;lock);
     return IRQ_RETVAL(handled);
 }
--


From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied.
--

From: Ken Kawasaki
Date: Tuesday, July 6, 2010 - 4:22 am

axnet_cs:
    local_irq_save before calling ei_irq_wrapper.


Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.35-git7/drivers/net/pcmcia/axnet_cs.c.orig	2010-07-04 08:28:15.000000000 +0900
+++ linux-2.6.35-git7/drivers/net/pcmcia/axnet_cs.c	2010-07-04 08:40:23.000000000 +0900
@@ -606,6 +606,7 @@ static void ei_watchdog(u_long arg)
     unsigned int nic_base = dev-&gt;base_addr;
     unsigned int mii_addr = nic_base + AXNET_MII_EEP;
     u_short link;
+    unsigned long flags;
 
     if (!netif_device_present(dev)) goto reschedule;
 
@@ -614,7 +615,10 @@ static void ei_watchdog(u_long arg)
     if (info-&gt;stale++ &amp;&amp; (inb_p(nic_base + EN0_ISR) &amp; ENISR_ALL)) {
 	if (!info-&gt;fast_poll)
 	    printk(KERN_INFO &quot;%s: interrupt(s) dropped!\n&quot;, dev-&gt;name);
+	local_irq_save(flags);
 	ei_irq_wrapper(dev-&gt;irq, dev);
+	local_irq_restore(flags);
+
 	info-&gt;fast_poll = HZ;
     }
     if (info-&gt;fast_poll) {
--

From: David Miller
Date: Wednesday, July 7, 2010 - 2:51 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

An interrupt handler may not assume that interrupts are disabled when
it is invoked.

The axnet_interrupt() code needs to be fixed to use
spin_lock_irqsave() et al.

Then, this change of your's is no longer needed.
--

From: Ken Kawasaki
Date: Saturday, July 10, 2010 - 4:18 am

axnet_cs:
    use spin_lock_irqsave instead of spin_lock in ax_interrupt

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.35-git7/drivers/net/pcmcia/axnet_cs.c.orig	2010-07-04 08:28:15.000000000 +0900
+++ linux-2.6.35-git7/drivers/net/pcmcia/axnet_cs.c	2010-07-10 19:07:20.000000000 +0900
@@ -1168,6 +1168,7 @@ static irqreturn_t ax_interrupt(int irq,
 	int interrupts, nr_serviced = 0, i;
 	struct ei_device *ei_local;
     	int handled = 0;
+	unsigned long flags;
 
 	e8390_base = dev-&gt;base_addr;
 	ei_local = netdev_priv(dev);
@@ -1176,7 +1177,7 @@ static irqreturn_t ax_interrupt(int irq,
 	 *	Protect the irq test too.
 	 */
 	 
-	spin_lock(&amp;ei_local-&gt;page_lock);
+	spin_lock_irqsave(&amp;ei_local-&gt;page_lock, flags);
 
 	if (ei_local-&gt;irqlock) 
 	{
@@ -1188,7 +1189,7 @@ static irqreturn_t ax_interrupt(int irq,
 			   dev-&gt;name, inb_p(e8390_base + EN0_ISR),
 			   inb_p(e8390_base + EN0_IMR));
 #endif
-		spin_unlock(&amp;ei_local-&gt;page_lock);
+		spin_unlock_irqrestore(&amp;ei_local-&gt;page_lock, flags);
 		return IRQ_NONE;
 	}
     
@@ -1261,7 +1262,7 @@ static irqreturn_t ax_interrupt(int irq,
 	ei_local-&gt;irqlock = 0;
 	outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 
-	spin_unlock(&amp;ei_local-&gt;page_lock);
+	spin_unlock_irqrestore(&amp;ei_local-&gt;page_lock, flags);
 	return IRQ_RETVAL(handled);
 }
 
--

From: Ben Hutchings
Date: Saturday, July 10, 2010 - 7:46 pm

[...]

I assume this is because it's now called from ei_watchdog() and not only
from interrupt context.  Perhaps you should explain that in the commit
message.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--

From: David Miller
Date: Saturday, July 10, 2010 - 7:49 pm

From: Ben Hutchings &lt;bhutchings@solarflare.com&gt;

No, interrupt handlers in general may not assume that interrupts
are off or on when they are invoked.

Therefore they must use irqflags saving/restoring.
--

From: Ben Hutchings
Date: Saturday, July 10, 2010 - 8:12 pm

But an interrupt handler will not be called recursively for the same
IRQ.  Since this device only uses one IRQ, surely it was OK to use
spin_lock() in this function so long as it was only called from the
interrupt handler.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--

From: David Miller
Date: Monday, July 12, 2010 - 8:08 pm

From: Ben Hutchings &lt;bhutchings@solarflare.com&gt;

It seems your right, I'll make a note about the real reason we're
doing this in the commit message.

But frankly anything else is dangerous.  Especially if one intends to
support -&gt;poll_controller() which we pretty much expect every modern
and future driver to do.
--

From: Ken Kawasaki
Date: Saturday, August 28, 2010 - 3:45 pm

pcnet_cs:
    add new_id: &quot;KENTRONICS KEP-230&quot; 10Base-T PCMCIA card.


Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.36-rc2/drivers/net/pcmcia/pcnet_cs.c.orig	2010-08-28 09:34:10.000000000 +0900
+++ linux-2.6.36-rc2/drivers/net/pcmcia/pcnet_cs.c	2010-08-28 09:36:53.000000000 +0900
@@ -1637,6 +1637,7 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_DEVICE_PROD_ID12(&quot;IO DATA&quot;, &quot;PCETTX&quot;, 0x547e66dc, 0x6fc5459b),
 	PCMCIA_DEVICE_PROD_ID12(&quot;iPort&quot;, &quot;10/100 Ethernet Card&quot;, 0x56c538d2, 0x11b0ffc0),
 	PCMCIA_DEVICE_PROD_ID12(&quot;KANSAI ELECTRIC CO.,LTD&quot;, &quot;KLA-PCM/T&quot;, 0xb18dc3b4, 0xcc51a956),
+	PCMCIA_DEVICE_PROD_ID12(&quot;KENTRONICS&quot;, &quot;KEP-230&quot;, 0xaf8144c9, 0x868f6616),
 	PCMCIA_DEVICE_PROD_ID12(&quot;KCI&quot;, &quot;PE520 PCMCIA Ethernet Adapter&quot;, 0xa89b87d3, 0x1eb88e64),
 	PCMCIA_DEVICE_PROD_ID12(&quot;KINGMAX&quot;, &quot;EN10T2T&quot;, 0x7bcb459a, 0xa5c81fa5),
 	PCMCIA_DEVICE_PROD_ID12(&quot;Kingston&quot;, &quot;KNE-PC2&quot;, 0x1128e633, 0xce2a89b3),
--

From: David Miller
Date: Saturday, August 28, 2010 - 4:07 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thank you.
--

From: Ken Kawasaki
Date: Friday, October 29, 2010 - 3:17 pm

pcnet_cs:
    add new_id: &quot;corega Ether CF-TD&quot; 10Base-T PCMCIA card.


Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.36-git10/drivers/net/pcmcia/pcnet_cs.c.orig	2010-10-29 22:11:43.000000000 +0900
+++ linux-2.6.36-git10/drivers/net/pcmcia/pcnet_cs.c	2010-10-29 22:15:30.000000000 +0900
@@ -1536,6 +1536,7 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_DEVICE_PROD_ID12(&quot;COMPU-SHACK&quot;, &quot;FASTline PCMCIA 10/100 Fast-Ethernet&quot;, 0xfa2e424d, 0x3953d9b9),
 	PCMCIA_DEVICE_PROD_ID12(&quot;CONTEC&quot;, &quot;C-NET(PC)C-10L&quot;, 0x21cab552, 0xf6f90722),
 	PCMCIA_DEVICE_PROD_ID12(&quot;corega&quot;, &quot;FEther PCC-TXF&quot;, 0x0a21501a, 0xa51564a2),
+	PCMCIA_DEVICE_PROD_ID12(&quot;corega&quot;, &quot;Ether CF-TD&quot;, 0x0a21501a, 0x6589340a),
 	PCMCIA_DEVICE_PROD_ID12(&quot;corega K.K.&quot;, &quot;corega EtherII PCC-T&quot;, 0x5261440f, 0xfa9d85bd),
 	PCMCIA_DEVICE_PROD_ID12(&quot;corega K.K.&quot;, &quot;corega EtherII PCC-TD&quot;, 0x5261440f, 0xc49bd73d),
 	PCMCIA_DEVICE_PROD_ID12(&quot;Corega K.K.&quot;, &quot;corega EtherII PCC-TD&quot;, 0xd4fdcbd8, 0xc49bd73d),
--

From: David Miller
Date: Saturday, October 30, 2010 - 4:49 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied.
--

From: Ken Kawasaki
Date: Saturday, November 6, 2010 - 8:11 am

axnet_cs:
    Some Ax88790 chip need to reinitialize the CISREG_CCSR register
    after resume.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.37-rc1/drivers/net/pcmcia/axnet_cs.c.orig	2010-11-06 07:48:17.000000000 +0900
+++ linux-2.6.37-rc1/drivers/net/pcmcia/axnet_cs.c	2010-11-06 08:08:40.000000000 +0900
@@ -111,13 +111,14 @@ static irqreturn_t ax_interrupt(int irq,
 CISREG_CCSR
 typedef struct axnet_dev_t {
 	struct pcmcia_device	*p_dev;
-    caddr_t		base;
-    struct timer_list	watchdog;
-    int			stale, fast_poll;
-    u_short		link_status;
-    u_char		duplex_flag;
-    int			phy_id;
-    int			flags;
+	caddr_t	base;
+	struct timer_list	watchdog;
+	int	stale, fast_poll;
+	u_short	link_status;
+	u_char	duplex_flag;
+	int	phy_id;
+	int	flags;
+	int	active_low;
 } axnet_dev_t;
 
 static inline axnet_dev_t *PRIV(struct net_device *dev)
@@ -322,6 +323,8 @@ static int axnet_config(struct pcmcia_de
     if (info-&gt;flags &amp; IS_AX88790)
 	outb(0x10, dev-&gt;base_addr + AXNET_GPIO);  /* select Internal PHY */
 
+    info-&gt;active_low = 0;
+
     for (i = 0; i &lt; 32; i++) {
 	j = mdio_read(dev-&gt;base_addr + AXNET_MII_EEP, i, 1);
 	j2 = mdio_read(dev-&gt;base_addr + AXNET_MII_EEP, i, 2);
@@ -329,15 +332,18 @@ static int axnet_config(struct pcmcia_de
 	if ((j != 0) &amp;&amp; (j != 0xffff)) break;
     }
 
-    /* Maybe PHY is in power down mode. (PPD_SET = 1) 
-       Bit 2 of CCSR is active low. */ 
     if (i == 32) {
+	/* Maybe PHY is in power down mode. (PPD_SET = 1)
+	   Bit 2 of CCSR is active low. */
 	pcmcia_write_config_byte(link, CISREG_CCSR, 0x04);
 	for (i = 0; i &lt; 32; i++) {
 	    j = mdio_read(dev-&gt;base_addr + AXNET_MII_EEP, i, 1);
 	    j2 = mdio_read(dev-&gt;base_addr + AXNET_MII_EEP, i, 2);
 	    if (j == j2) continue;
-	    if ((j != 0) &amp;&amp; (j != 0xffff)) break;
+	    if ((j != 0) &amp;&amp; (j != 0xffff)) {
+		info-&gt;active_low = 1;
+		break;
+	    }
 	}
     }
 
@@ -383,8 +389,12 @@ static int axnet_suspend(struct pcmcia_d
 ...
From: David Miller
Date: Friday, November 12, 2010 - 3:01 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thank you.
--

From: Ken Kawasaki
Date: Saturday, November 13, 2010 - 4:42 pm

ipg.c:
  The id [SUNDANCE, 0x1021] (=[0x13f0, 0x1021]) is defined
  at dl2k.h and ipg.c.
  But this device works better with dl2k driver.
  
  This problem is similar with the commit 
  [25cca5352712561fba97bd37c495593d641c1d39
  ipg: Remove device claimed by dl2k from pci id table]
  at 11 Feb 2010.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.37-rc1/drivers/net/ipg.c.orig	2010-11-13 19:54:53.000000000 +0900
+++ linux-2.6.37-rc1/drivers/net/ipg.c	2010-11-13 19:57:03.000000000 +0900
@@ -88,16 +88,14 @@ static const char *ipg_brand_name[] = {
 	&quot;IC PLUS IP1000 1000/100/10 based NIC&quot;,
 	&quot;Sundance Technology ST2021 based NIC&quot;,
 	&quot;Tamarack Microelectronics TC9020/9021 based NIC&quot;,
-	&quot;Tamarack Microelectronics TC9020/9021 based NIC&quot;,
 	&quot;D-Link NIC IP1000A&quot;
 };
 
 static DEFINE_PCI_DEVICE_TABLE(ipg_pci_tbl) = {
 	{ PCI_VDEVICE(SUNDANCE,	0x1023), 0 },
 	{ PCI_VDEVICE(SUNDANCE,	0x2021), 1 },
-	{ PCI_VDEVICE(SUNDANCE,	0x1021), 2 },
-	{ PCI_VDEVICE(DLINK,	0x9021), 3 },
-	{ PCI_VDEVICE(DLINK,	0x4020), 4 },
+	{ PCI_VDEVICE(DLINK,	0x9021), 2 },
+	{ PCI_VDEVICE(DLINK,	0x4020), 3 },
 	{ 0, }
 };
 
--

From: David Miller
Date: Thursday, November 18, 2010 - 11:45 am

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thank you.
--

From: Ken Kawasaki
Date: Monday, December 13, 2010 - 5:27 am

axnet_cs:
    Accton EN2328 or compatible (id: 0x01bf, 0x2328) uses Asix chip.
    So it works better with axnet_cs instead of pcnet_cs.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.37-rc5/drivers/net/pcmcia/axnet_cs.c.orig	2010-12-12 17:26:37.000000000 +0900
+++ linux-2.6.37-rc5/drivers/net/pcmcia/axnet_cs.c	2010-12-12 17:27:22.000000000 +0900
@@ -690,6 +690,7 @@ static void block_output(struct net_devi
 static struct pcmcia_device_id axnet_ids[] = {
 	PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x016c, 0x0081),
 	PCMCIA_DEVICE_MANF_CARD(0x018a, 0x0301),
+	PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x2328),
 	PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0301),
 	PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0303),
 	PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0309),
--- linux-2.6.37-rc5/drivers/net/pcmcia/pcnet_cs.c.orig	2010-12-12 17:26:31.000000000 +0900
+++ linux-2.6.37-rc5/drivers/net/pcmcia/pcnet_cs.c	2010-12-12 17:26:58.000000000 +0900
@@ -1493,7 +1493,6 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_DEVICE_MANF_CARD(0x0149, 0x4530),
 	PCMCIA_DEVICE_MANF_CARD(0x0149, 0xc1ab),
 	PCMCIA_DEVICE_MANF_CARD(0x0186, 0x0110),
-	PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x2328),
 	PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x8041),
 	PCMCIA_DEVICE_MANF_CARD(0x0213, 0x2452),
 	PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0300),
--

From: David Miller
Date: Thursday, December 16, 2010 - 1:39 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thank you.
--

From: Ken Kawasaki
Date: Wednesday, December 23, 2009 - 1:05 am

The licence of GLOBETROTTER.cis is unclear,
I will drop this.

Best Regards
Ken

--

From: David Miller
Date: Sunday, January 3, 2010 - 10:42 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

You need to update your patch.

The GLOBETROTTER.cis file was removed, but you retained
the MODULE_FIRMWARE() line referencing it.  Please remove
that too.

Thanks.
--

From: Ken Kawasaki
Date: Saturday, December 12, 2009 - 5:44 pm

3c574_cs, 3c589_cs:
	disable irq before calling el3_interrupt
	in the media_check function.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.32-git7/drivers/net/pcmcia/3c574_cs.c.orig	2009-12-12 06:58:14.000000000 +0900
+++ linux-2.6.32-git7/drivers/net/pcmcia/3c574_cs.c	2009-12-13 08:50:18.000000000 +0900
@@ -912,7 +912,11 @@ static void media_check(unsigned long ar
 	if ((inw(ioaddr + EL3_STATUS) &amp; IntLatch) &amp;&amp; (inb(ioaddr + Timer) == 0xff)) {
 		if (!lp-&gt;fast_poll)
 			printk(KERN_INFO &quot;%s: interrupt(s) dropped!\n&quot;, dev-&gt;name);
+
+		local_irq_save(flags);
 		el3_interrupt(dev-&gt;irq, dev);
+		local_irq_restore(flags);
+
 		lp-&gt;fast_poll = HZ;
 	}
 	if (lp-&gt;fast_poll) {
--- linux-2.6.32-git7/drivers/net/pcmcia/3c589_cs.c.orig	2009-12-12 06:58:28.000000000 +0900
+++ linux-2.6.32-git7/drivers/net/pcmcia/3c589_cs.c	2009-12-13 08:50:38.000000000 +0900
@@ -711,7 +711,11 @@ static void media_check(unsigned long ar
 	(inb(ioaddr + EL3_TIMER) == 0xff)) {
 	if (!lp-&gt;fast_poll)
 	    printk(KERN_WARNING &quot;%s: interrupt(s) dropped!\n&quot;, dev-&gt;name);
+
+	local_irq_save(flags);
 	el3_interrupt(dev-&gt;irq, dev);
+	local_irq_restore(flags);
+
 	lp-&gt;fast_poll = HZ;
     }
     if (lp-&gt;fast_poll) {
--

From: David Miller
Date: Sunday, December 13, 2009 - 8:48 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, thanks.
--

From: Ken Kawasaki
Date: Saturday, March 6, 2010 - 3:02 pm

lib8390:
 use &quot;spin_lock_irqsave&quot;, &quot;local_irq_save&quot; instead of &quot;disable_irq&quot;.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.33-git11/drivers/net/lib8390.c.orig	2010-03-06 20:09:28.000000000 +0900
+++ linux-2.6.33-git11/drivers/net/lib8390.c	2010-03-07 06:42:47.000000000 +0900
@@ -279,15 +279,13 @@ static void __ei_tx_timeout(struct net_d
 
 	/* Ugly but a reset can be slow, yet must be protected */
 
-	disable_irq_nosync_lockdep(dev-&gt;irq);
-	spin_lock(&amp;ei_local-&gt;page_lock);
+	spin_lock_irqsave(&amp;ei_local-&gt;page_lock, flags);
 
 	/* Try to restart the card.  Perhaps the user has fixed something. */
 	ei_reset_8390(dev);
 	__NS8390_init(dev, 1);
 
-	spin_unlock(&amp;ei_local-&gt;page_lock);
-	enable_irq_lockdep(dev-&gt;irq);
+	spin_unlock_irqrestore(&amp;ei_local-&gt;page_lock, flags);
 	netif_wake_queue(dev);
 }
 
@@ -323,17 +321,11 @@ static netdev_tx_t __ei_start_xmit(struc
 
 	spin_lock_irqsave(&amp;ei_local-&gt;page_lock, flags);
 	ei_outb_p(0x00, e8390_base + EN0_IMR);
-	spin_unlock_irqrestore(&amp;ei_local-&gt;page_lock, flags);
-
 
 	/*
 	 *	Slow phase with lock held.
 	 */
 
-	disable_irq_nosync_lockdep_irqsave(dev-&gt;irq, &amp;flags);
-
-	spin_lock(&amp;ei_local-&gt;page_lock);
-
 	ei_local-&gt;irqlock = 1;
 
 	/*
@@ -368,8 +360,7 @@ static netdev_tx_t __ei_start_xmit(struc
 		ei_local-&gt;irqlock = 0;
 		netif_stop_queue(dev);
 		ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
-		spin_unlock(&amp;ei_local-&gt;page_lock);
-		enable_irq_lockdep_irqrestore(dev-&gt;irq, &amp;flags);
+		spin_unlock_irqrestore(&amp;ei_local-&gt;page_lock, flags);
 		dev-&gt;stats.tx_errors++;
 		return NETDEV_TX_BUSY;
 	}
@@ -409,8 +400,7 @@ static netdev_tx_t __ei_start_xmit(struc
 	ei_local-&gt;irqlock = 0;
 	ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 
-	spin_unlock(&amp;ei_local-&gt;page_lock);
-	enable_irq_lockdep_irqrestore(dev-&gt;irq, &amp;flags);
+	spin_unlock_irqrestore(&amp;ei_local-&gt;page_lock, flags);
 
 	dev_kfree_skb (skb);
 	dev-&gt;stats.tx_bytes += send_length;
@@ -526,9 +516,11 @@ static irqreturn_t ...
From: Ken Kawasaki
Date: Monday, May 3, 2010 - 3:43 am

lib8390:
	write the value &quot;ENISR_ALL&quot; to register &quot;EN0_IMR&quot;
	after enable_irq_lockdep_irqrestore. 

	This patch avoids frequent transmit error on SMP system.


Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.34-rc6/drivers/net/lib8390.c.orig	2010-05-02 16:49:57.000000000 +0900
+++ linux-2.6.34-rc6/drivers/net/lib8390.c	2010-05-02 18:09:18.000000000 +0900
@@ -367,9 +367,9 @@ static netdev_tx_t __ei_start_xmit(struc
 				dev-&gt;name, ei_local-&gt;tx1, ei_local-&gt;tx2, ei_local-&gt;lasttx);
 		ei_local-&gt;irqlock = 0;
 		netif_stop_queue(dev);
-		ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 		spin_unlock(&amp;ei_local-&gt;page_lock);
 		enable_irq_lockdep_irqrestore(dev-&gt;irq, &amp;flags);
+		ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 		dev-&gt;stats.tx_errors++;
 		return NETDEV_TX_BUSY;
 	}
@@ -407,10 +407,10 @@ static netdev_tx_t __ei_start_xmit(struc
 
 	/* Turn 8390 interrupts back on. */
 	ei_local-&gt;irqlock = 0;
-	ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 
 	spin_unlock(&amp;ei_local-&gt;page_lock);
 	enable_irq_lockdep_irqrestore(dev-&gt;irq, &amp;flags);
+	ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 
 	dev_kfree_skb (skb);
 	dev-&gt;stats.tx_bytes += send_length;
--

From: Ken Kawasaki
Date: Thursday, May 6, 2010 - 1:47 pm

Sorry, I cancel this patch
and test it again.


Best Regards

--

From: Ken Kawasaki
Date: Monday, April 27, 2009 - 5:50 am

3c589_cs,3c574_cs,serial_cs:

 (1)add cis(firmware) of 3Com lan&amp;modem mulitifunction pcmcia card.
 (2)load correct configuration register for 3Com card
 
 
Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;
 
---

 drivers/net/pcmcia/3c574_cs.c   |    2 +-
 drivers/net/pcmcia/3c589_cs.c   |    4 ++--
 drivers/serial/serial_cs.c      |   22 +++++++++++++++++-----
 firmware/Makefile               |    2 ++
 firmware/WHENCE                 |   20 ++++++++++++++++++++
 firmware/cis/3CCFEM556.cis.ihex |   13 +++++++++++++
 firmware/cis/3CXEM556.cis.ihex  |   13 +++++++++++++
 7 files changed, 68 insertions(+), 8 deletions(-)

diff -uprN linux-2.6.30-rc3-git1.orig/drivers/net/pcmcia/3c589_cs.c linux-2.6.30-rc3-git1/drivers/net/pcmcia/3c589_cs.c
--- linux-2.6.30-rc3-git1.orig/drivers/net/pcmcia/3c589_cs.c	2009-04-25 14:44:41.000000000 +0900
+++ linux-2.6.30-rc3-git1/drivers/net/pcmcia/3c589_cs.c	2009-04-25 15:07:47.000000000 +0900
@@ -967,8 +967,8 @@ static struct pcmcia_device_id tc589_ids
 	PCMCIA_MFC_DEVICE_PROD_ID1(0, &quot;Motorola MARQUIS&quot;, 0xf03e4e77),
 	PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0589),
 	PCMCIA_DEVICE_PROD_ID12(&quot;Farallon&quot;, &quot;ENet&quot;, 0x58d93fc4, 0x992c2202),
-	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x0035, &quot;3CXEM556.cis&quot;),
-	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x003d, &quot;3CXEM556.cis&quot;),
+	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x0035, &quot;cis/3CXEM556.cis&quot;),
+	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x003d, &quot;cis/3CXEM556.cis&quot;),
 	PCMCIA_DEVICE_NULL,
 };
 MODULE_DEVICE_TABLE(pcmcia, tc589_ids);
diff -uprN linux-2.6.30-rc3-git1.orig/drivers/serial/serial_cs.c linux-2.6.30-rc3-git1/drivers/serial/serial_cs.c
--- linux-2.6.30-rc3-git1.orig/drivers/serial/serial_cs.c	2009-03-24 08:12:14.000000000 +0900
+++ linux-2.6.30-rc3-git1/drivers/serial/serial_cs.c	2009-04-25 15:12:19.000000000 +0900
@@ -681,7 +681,7 @@ static int serial_config(struct pcmcia_d
 	u_char *buf;
 	cisparse_t *parse;
 	cistpl_cftable_entry_t *cf;
-	int i;
+	int i, last_ret, ...
From: David Miller
Date: Friday, May 1, 2009 - 7:22 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied to net-next-2.6.

But a few things to be mindful of next time, which I had to

These three lines started with some spaces, then a tab
character.  It should just be one tab character.

GIT warns about this when applying patches so that such
spacing errors can be caught before code goes into the
tree.
--

From: Ken Kawasaki
Date: Saturday, June 27, 2009 - 5:09 pm

pcnet_cs:

(1) add new id (RIOS System PC CARD3 ETHERNET).

(2) add odd location support for write_asic function.

(3) change default setting of use_shmem to 0.
    because shared memory does not work on some PC.

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.31-rc1/drivers/net/pcmcia/pcnet_cs.c.orig	2009-06-27 10:15:47.000000000 +0900
+++ linux-2.6.31-rc1/drivers/net/pcmcia/pcnet_cs.c	2009-06-27 10:40:34.000000000 +0900
@@ -95,7 +95,7 @@ INT_MODULE_PARM(use_big_buf,	1);	/* use 
 INT_MODULE_PARM(mem_speed,	0);	/* shared mem speed, in ns */
 INT_MODULE_PARM(delay_output,	0);	/* pause after xmit? */
 INT_MODULE_PARM(delay_time,	4);	/* in usec */
-INT_MODULE_PARM(use_shmem,	-1);	/* use shared memory? */
+INT_MODULE_PARM(use_shmem,	0);	/* use shared memory? */
 INT_MODULE_PARM(full_duplex,	0);	/* full duplex? */
 
 /* Ugh!  Let the user hardwire the hardware address for queer cards */
@@ -886,9 +886,10 @@ static void write_asic(unsigned int ioad
 		outb_p(EE_ASIC|EE_CS|EE_DI|dataval, ee_addr);
 	}
 	// sync
-	outb(EE_ASIC|EE_CS, ee_addr);
-	outb(EE_ASIC|EE_CS|EE_CK, ee_addr);
-	outb(EE_ASIC|EE_CS, ee_addr);
+	dataval = (location &amp; 1) ? EE_DO : 0;
+	outb(EE_ASIC|EE_CS|dataval, ee_addr);
+	outb(EE_ASIC|EE_CS|dataval|EE_CK, ee_addr);
+	outb(EE_ASIC|EE_CS|dataval, ee_addr);
 
 	for (i = 15; i &gt;= 0; i--) {
 		dataval = (asic_data &amp; (1 &lt;&lt; i)) ? EE_ADOT : 0;
@@ -1727,6 +1728,7 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_DEVICE_PROD_ID12(&quot;PRETEC&quot;, &quot;Ethernet CompactLAN 10BaseT 3.3V&quot;, 0xebf91155, 0x7f5a4f50),
 	PCMCIA_DEVICE_PROD_ID12(&quot;Psion Dacom&quot;, &quot;Gold Card Ethernet&quot;, 0xf5f025c2, 0x3a30e110),
 	PCMCIA_DEVICE_PROD_ID12(&quot;=RELIA==&quot;, &quot;Ethernet&quot;, 0xcdd0644a, 0x00b2e941),
+	PCMCIA_DEVICE_PROD_ID12(&quot;RIOS Systems Co.&quot;, &quot;PC CARD3 ETHERNET&quot;, 0x7dd33481, 0x10b41826),
 	PCMCIA_DEVICE_PROD_ID12(&quot;RP&quot;, &quot;1625B Ethernet NE2000 Compatible&quot;, 0xe3e66e22, 0xb96150df),
 	PCMCIA_DEVICE_PROD_ID12(&quot;RPTI&quot;, &quot;EP400 Ethernet NE2000 Compatible&quot;, 0xdc6f88fd, ...
From: David Miller
Date: Tuesday, June 30, 2009 - 7:19 am

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

These are three seperate changes, could you split this up
into three seperate patches?

Thank you.
--

From: Ken Kawasaki
Date: Sunday, July 5, 2009 - 1:34 am

On Tue, 30 Jun 2009 07:19:55 -0700 (PDT)

Sorry, I cancel the use_shmem patch. (for re-test).


Ken.
--

From: Ken Kawasaki
Date: Saturday, July 4, 2009 - 5:17 pm

add new id (RIOS System PC CARD3 ETHERNET).

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.31-rc1/drivers/net/pcmcia/pcnet_cs.c.orig	2009-06-27 10:15:47.000000000 +0900
+++ linux-2.6.31-rc1/drivers/net/pcmcia/pcnet_cs.c	2009-07-04 14:19:21.000000000 +0900
@@ -1727,6 +1727,7 @@ static struct pcmcia_device_id pcnet_ids
 	PCMCIA_DEVICE_PROD_ID12(&quot;PRETEC&quot;, &quot;Ethernet CompactLAN 10BaseT 3.3V&quot;, 0xebf91155, 0x7f5a4f50),
 	PCMCIA_DEVICE_PROD_ID12(&quot;Psion Dacom&quot;, &quot;Gold Card Ethernet&quot;, 0xf5f025c2, 0x3a30e110),
 	PCMCIA_DEVICE_PROD_ID12(&quot;=RELIA==&quot;, &quot;Ethernet&quot;, 0xcdd0644a, 0x00b2e941),
+	PCMCIA_DEVICE_PROD_ID12(&quot;RIOS Systems Co.&quot;, &quot;PC CARD3 ETHERNET&quot;, 0x7dd33481, 0x10b41826),
 	PCMCIA_DEVICE_PROD_ID12(&quot;RP&quot;, &quot;1625B Ethernet NE2000 Compatible&quot;, 0xe3e66e22, 0xb96150df),
 	PCMCIA_DEVICE_PROD_ID12(&quot;RPTI&quot;, &quot;EP400 Ethernet NE2000 Compatible&quot;, 0xdc6f88fd, 0x4a7e2ae0),
 	PCMCIA_DEVICE_PROD_ID12(&quot;RPTI&quot;, &quot;EP401 Ethernet NE2000 Compatible&quot;, 0xdc6f88fd, 0x4bcbd7fd),
--

From: David Miller
Date: Sunday, July 5, 2009 - 7:02 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied.
--

From: Ken Kawasaki
Date: Saturday, July 4, 2009 - 5:19 pm

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.31-rc1/drivers/net/pcmcia/pcnet_cs.c.orig	2009-06-27 10:15:47.000000000 +0900
+++ linux-2.6.31-rc1/drivers/net/pcmcia/pcnet_cs.c	2009-07-04 10:32:44.000000000 +0900
@@ -886,9 +886,10 @@ static void write_asic(unsigned int ioad
 		outb_p(EE_ASIC|EE_CS|EE_DI|dataval, ee_addr);
 	}
 	// sync
-	outb(EE_ASIC|EE_CS, ee_addr);
-	outb(EE_ASIC|EE_CS|EE_CK, ee_addr);
-	outb(EE_ASIC|EE_CS, ee_addr);
+	dataval = (location &amp; 1) ? EE_DO : 0;
+	outb(EE_ASIC|EE_CS|dataval, ee_addr);
+	outb(EE_ASIC|EE_CS|dataval|EE_CK, ee_addr);
+	outb(EE_ASIC|EE_CS|dataval, ee_addr);
 
 	for (i = 15; i &gt;= 0; i--) {
 		dataval = (asic_data &amp; (1 &lt;&lt; i)) ? EE_ADOT : 0;
--

From: Ken Kawasaki
Date: Wednesday, July 8, 2009 - 5:09 am

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.31-rc1/drivers/net/pcmcia/pcnet_cs.c.orig	2009-06-27 10:15:47.000000000 +0900
+++ linux-2.6.31-rc1/drivers/net/pcmcia/pcnet_cs.c	2009-07-04 10:32:44.000000000 +0900
@@ -886,9 +886,10 @@ static void write_asic(unsigned int ioad
 		outb_p(EE_ASIC|EE_CS|EE_DI|dataval, ee_addr);
 	}
 	// sync
-	outb(EE_ASIC|EE_CS, ee_addr);
-	outb(EE_ASIC|EE_CS|EE_CK, ee_addr);
-	outb(EE_ASIC|EE_CS, ee_addr);
+	dataval = (location &amp; 1) ? EE_DO : 0;
+	outb(EE_ASIC|EE_CS|dataval, ee_addr);
+	outb(EE_ASIC|EE_CS|dataval|EE_CK, ee_addr);
+	outb(EE_ASIC|EE_CS|dataval, ee_addr);
 
 	for (i = 15; i &gt;= 0; i--) {
 		dataval = (asic_data &amp; (1 &lt;&lt; i)) ? EE_ADOT : 0;
--

From: David Miller
Date: Wednesday, July 8, 2009 - 10:38 am

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

This patch is already in the patchwork queue for networking:

	http://patchwork.ozlabs.org/patch/29462/

What is this odd address support actually needed for?  You
should have provided this information in the commit message.

That's why I haven't bothered applying the patch yet, I don't
even know what needs it.
--

From: Ken Kawasaki
Date: Friday, July 10, 2009 - 5:02 pm

Currently, no one passes odd location to the write_asic function.
But this patch add odd location support for future usage of this
feature.


Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.31-rc1/drivers/net/pcmcia/pcnet_cs.c.orig	2009-06-27 10:15:47.000000000 +0900
+++ linux-2.6.31-rc1/drivers/net/pcmcia/pcnet_cs.c	2009-07-04 10:32:44.000000000 +0900
@@ -886,9 +886,10 @@ static void write_asic(unsigned int ioad
 		outb_p(EE_ASIC|EE_CS|EE_DI|dataval, ee_addr);
 	}
 	// sync
-	outb(EE_ASIC|EE_CS, ee_addr);
-	outb(EE_ASIC|EE_CS|EE_CK, ee_addr);
-	outb(EE_ASIC|EE_CS, ee_addr);
+	dataval = (location &amp; 1) ? EE_DO : 0;
+	outb(EE_ASIC|EE_CS|dataval, ee_addr);
+	outb(EE_ASIC|EE_CS|dataval|EE_CK, ee_addr);
+	outb(EE_ASIC|EE_CS|dataval, ee_addr);
 
 	for (i = 15; i &gt;= 0; i--) {
 		dataval = (asic_data &amp; (1 &lt;&lt; i)) ? EE_ADOT : 0;
--

From: David Miller
Date: Friday, July 10, 2009 - 8:26 pm

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

&quot;Who&quot; in the future will use this feature and why do they
need it?

Ideally, you should submit this patch at the same time as
the other patch which adds a need for it.
--

From: Ken Kawasaki
Date: Saturday, July 11, 2009 - 3:15 pm

On Fri, 10 Jul 2009 20:26:09 -0700 (PDT)

OK.
Thanks.


--

From: Ken Kawasaki
Date: Sunday, July 19, 2009 - 4:08 pm

3c589_cs: 
re-initialize the multicast in the tc589_reset,
and spin_lock the set_multicast_list function.  

Signed-off-by: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

---

--- linux-2.6.31-rc3/drivers/net/pcmcia/3c589_cs.c.orig	2009-07-19 19:13:10.000000000 +0900
+++ linux-2.6.31-rc3/drivers/net/pcmcia/3c589_cs.c	2009-07-19 19:26:40.000000000 +0900
@@ -156,6 +156,7 @@ static struct net_device_stats *el3_get_
 static int el3_rx(struct net_device *dev);
 static int el3_close(struct net_device *dev);
 static void el3_tx_timeout(struct net_device *dev);
+static void set_rx_mode(struct net_device *dev);
 static void set_multicast_list(struct net_device *dev);
 static const struct ethtool_ops netdev_ethtool_ops;
 
@@ -488,8 +489,7 @@ static void tc589_reset(struct net_devic
     /* Switch to register set 1 for normal use. */
     EL3WINDOW(1);
 
-    /* Accept b-cast and phys addr only. */
-    outw(SetRxFilter | RxStation | RxBroadcast, ioaddr + EL3_CMD);
+    set_rx_mode(dev);
     outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */
     outw(RxEnable, ioaddr + EL3_CMD); /* Enable the receiver. */
     outw(TxEnable, ioaddr + EL3_CMD); /* Enable transmitter. */
@@ -700,7 +700,7 @@ static irqreturn_t el3_interrupt(int irq
 		if (fifo_diag &amp; 0x2000) {
 		    /* Rx underrun */
 		    tc589_wait_for_completion(dev, RxReset);
-		    set_multicast_list(dev);
+    		    set_rx_mode(dev);
 		    outw(RxEnable, ioaddr + EL3_CMD);
 		}
 		outw(AckIntr | AdapterFailure, ioaddr + EL3_CMD);
@@ -905,14 +905,11 @@ static int el3_rx(struct net_device *dev
     return 0;
 }
 
-static void set_multicast_list(struct net_device *dev)
+static void set_rx_mode(struct net_device *dev)
 {
-    struct el3_private *lp = netdev_priv(dev);
-    struct pcmcia_device *link = lp-&gt;p_dev;
     unsigned int ioaddr = dev-&gt;base_addr;
     u16 opts = SetRxFilter | RxStation | RxBroadcast;
 
-    if (!pcmcia_dev_present(link)) return;
     if (dev-&gt;flags &amp; IFF_PROMISC)
 	opts |= ...
From: David Miller
Date: Monday, July 20, 2009 - 8:29 am

From: Ken Kawasaki &lt;ken_kawasaki@spring.nifty.jp&gt;

Applied, but you really need to fix your coding style.

I know perhaps you were trying to be consistent with the
rest of this driver, but when adding completely new code
the conventions of the rest of the kernel ought to be

One tab should begin each statement in this function, and
spin_lock and spin_unlock lines had unnecessary trailing
whitespace.

I fixed all of this up when applying your patch, but I
absolutely will not do so next time.

Thank you.
--

From: Ken Kawasaki
Date: Wednesday, July 22, 2009 - 5:23 am

On Mon, 20 Jul 2009 08:29:06 -0700 (PDT)

OK.
Thanks!
--

Previous thread: [GIT]: Networking by David Miller on Saturday, April 4, 2009 - 5:17 pm. (1 message)

Next thread: [PATCH 2/2] smsc911x: remove unused #include <linux/version.h> by Huang Weiyi on Saturday, April 4, 2009 - 6:53 pm. (2 messages)