axnet_cs:
(1) Some Asix phy return bogus value except 0 or 0xffff.
Skip this phy_id.
(2) Some Asix chip need to set "select Internal PHY" bit
at AX88190_init.
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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->priv;
axnet_dev_t *info = PRIV(dev);
- int i, j, last_ret, last_fn;
+ int i, j, j2, last_ret, last_fn;
DEBUG(0, "axnet_config(0x%p)\n", link);
@@ -388,6 +388,8 @@ static int axnet_config(struct pcmcia_de
for (i = 0; i < 32; i++) {
j = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 1);
+ j2 = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 2);
+ if (j == j2) continue;
if ((j != 0) && (j != 0xffff)) break;
}
@@ -398,6 +400,8 @@ static int axnet_config(struct pcmcia_de
pcmcia_access_configuration_register(link, &reg);
for (i = 0; i < 32; i++) {
j = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 1);
+ j2 = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 2);
+ if (j == j2) continue;
if ((j != 0) && (j != 0xffff)) break;
}
}
@@ -1767,6 +1771,9 @@ static void AX88190_init(struct net_devi
ei_local->tx1 = ei_local->tx2 = 0;
ei_local->txing = 0;
+ if (info->flags & IS_AX88790) /* select Internal PHY */
+ outb(0x10, e8390_base + AXNET_GPIO);
+
if (startp)
{
outb_p(0xff, e8390_base + EN0_ISR);
--
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied. --
pcnet_cs: add cis(firmware) of the Allied Telesis LA-PCM Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- 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, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "DP83903.cis"), PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, "NSC MF LAN/Modem", 0x58fc6056, "DP83903.cis"), PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "DP83903.cis"), - PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, "LA-PCM.cis"), + PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, "cis/LA-PCM.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "PE520.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "NE2K.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "PE-200.cis"), 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 ...
3c589_cs,3c574_cs,serial_cs: (1)add cis(firmware) of 3Com lan&modem mulitifunction pcmcia card. (2)load correct configuration register for 3Com card Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- 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, "Motorola MARQUIS", 0xf03e4e77), PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0589), PCMCIA_DEVICE_PROD_ID12("Farallon", "ENet", 0x58d93fc4, 0x992c2202), - PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x0035, "3CXEM556.cis"), - PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x003d, "3CXEM556.cis"), + PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x0035, "cis/3CXEM556.cis"), + PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x003d, "cis/3CXEM556.cis"), 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, ...
[...] Please read and follow firmware/README.AddingFirmware. Ben.
On Sun, 26 Apr 2009 14:33:02 +0100 OK. Thanks, Ken. --
pcnet_cs,serial_cs: add cis of Linksys lan&modem mulitifunction pcmcia card and some modem card(MT5634ZLX, RS-COM-2P). Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- 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("EN-6200P2", 0xa996d078), /* too generic! */ /* PCMCIA_DEVICE_PROD_ID12("PCMCIA", "10/100 Ethernet Card", 0x281f1c5d, 0x11b0ffc0), */ - PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "PCMCIA", "EN2218-LAN/MODEM", 0x281f1c5d, 0x570f348e, "PCMLM28.cis"), - PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "PCMCIA", "UE2218-LAN/MODEM", 0x281f1c5d, 0x6fdcacee, "PCMLM28.cis"), - PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "PCMLM28.cis"), - PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "PCMLM28.cis"), - PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "PCMLM28.cis"), + PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "PCMCIA", "EN2218-LAN/MODEM", 0x281f1c5d, 0x570f348e, "cis/PCMLM28.cis"), + PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "PCMCIA", "UE2218-LAN/MODEM", 0x281f1c5d, 0x6fdcacee, "cis/PCMLM28.cis"), + PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, ...
3c574_cs:
spin_lock the set_multicast_list,
and clean up the set_rx_mode function.
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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->base_addr;
if (dev->flags & IFF_PROMISC)
- outw(SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm,
- ioaddr + EL3_CMD);
+ outw(SetRxFilter|RxStation|RxMulticast|RxBroadcast|RxProm,
+ ioaddr + EL3_CMD);
else if (dev->mc_count || (dev->flags & 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(&lp->window_lock, flags);
+ set_rx_mode(dev);
+ spin_unlock_irqrestore(&lp->window_lock, flags);
}
static ...pcnet_cs,serial_cs: add cis of Linksys lan&modem mulitifunction pcmcia card and some modem card(MT5634ZLX, RS-COM-2P). Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- 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("EN-6200P2", 0xa996d078), /* too generic! */ /* PCMCIA_DEVICE_PROD_ID12("PCMCIA", "10/100 Ethernet Card", 0x281f1c5d, 0x11b0ffc0), */ - PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "PCMCIA", "EN2218-LAN/MODEM", 0x281f1c5d, 0x570f348e, "PCMLM28.cis"), - PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "PCMCIA", "UE2218-LAN/MODEM", 0x281f1c5d, 0x6fdcacee, "PCMLM28.cis"), - PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "PCMLM28.cis"), - PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "PCMLM28.cis"), - PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "PCMLM28.cis"), + PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "PCMCIA", "EN2218-LAN/MODEM", 0x281f1c5d, 0x570f348e, "cis/PCMLM28.cis"), + PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "PCMCIA", "UE2218-LAN/MODEM", 0x281f1c5d, 0x6fdcacee, "cis/PCMLM28.cis"), + PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, ...
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thank you. --
pcnet_cs,serial_cs: add cis of National Semicondoctor's lan&modem mulitifunction pcmcia card, NE2K, tamarack ethernet card, and some serial card(COMpad2, COMpad4). Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- 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, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"), PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "cis/PCMLM28.cis"), PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "cis/PCMLM28.cis"), - PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "DP83903.cis"), - PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, "NSC MF LAN/Modem", 0x58fc6056, "DP83903.cis"), - PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "DP83903.cis"), + PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "cis/DP83903.cis"), + PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, "NSC MF LAN/Modem", 0x58fc6056, "cis/DP83903.cis"), + PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, ...
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thanks. --
3c574_cs:
spin_lock the set_multicast_list function.
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
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(&lp->window_lock, flags);
+ set_rx_mode(dev);
+ spin_unlock_irqrestore(&lp->window_lock, flags);
+}
+
static int el3_close(struct net_device *dev)
{
unsigned int ioaddr = dev->base_addr;
--
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thanks! --
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 <ken_kawasaki@spring.nifty.jp> --- 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, "cis/LA-PCM.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "PE520.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "cis/NE2K.cis"), - PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "PE-200.cis"), + PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "cis/PE-200.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("TAMARACK", "Ethernet", 0xcf434fba, 0x00b2e941, "cis/tamarack.cis"), PCMCIA_DEVICE_PROD_ID12("Ethernet", "CF Size PC Card", 0x00b2e941, 0x43ac239b), PCMCIA_DEVICE_PROD_ID123("Fast Ethernet", "CF Size PC Card", "1.0", 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 ...
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 "prod_id(2): "AC860"", 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): "Sierra Wireless" (0xd85f6206) prod_id(2): "AC860" (0x698f93db) prod_id(3): "3G Network Adapter" (0xab3c6f47) prod_id(4): "R1" (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("Sierra Wireless", "AC860", 0xd85f6206, 0x698f93db, "cis/SW_8xx_SER.cis"), /* Sierra Wireless AC860 3G Network Adapter R1 */ ? --
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, "Sierra Wireless", "AC850", "3G Network Adapter", "R1" 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. --
[...] 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: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied to net-2.6, thanks. --
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 <ken_kawasaki@spring.nifty.jp> --- 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, "NSC MF LAN/Modem", 0x58fc6056, "cis/DP83903.cis"), PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "cis/DP83903.cis"), PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, "cis/LA-PCM.cis"), - PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "PE520.cis"), + PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "cis/PE520.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "cis/NE2K.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "cis/PE-200.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("TAMARACK", "Ethernet", 0xcf434fba, 0x00b2e941, "cis/tamarack.cis"), @@ -1754,7 +1754,7 @@ MODULE_DEVICE_TABLE(pcmcia, pcnet_ids); MODULE_FIRMWARE("cis/PCMLM28.cis"); MODULE_FIRMWARE("cis/DP83903.cis"); MODULE_FIRMWARE("cis/LA-PCM.cis"); -MODULE_FIRMWARE("PE520.cis"); +MODULE_FIRMWARE("cis/PE520.cis"); MODULE_FIRMWARE("cis/NE2K.cis"); MODULE_FIRMWARE("cis/PE-200.cis"); MODULE_FIRMWARE("cis/tamarack.cis"); diff -uprN ...
The phrase "AS IS" is usually used in a disclaimer of warranty. It is By "intellectual property" 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.
pcnet_cs,serial_cs: add cis of KTI PE520 pcmcia network card, and serial card(Sierra Wireless AC860). Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- 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, "NSC MF LAN/Modem", 0x58fc6056, "cis/DP83903.cis"), PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "cis/DP83903.cis"), PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, "cis/LA-PCM.cis"), - PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "PE520.cis"), + PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "cis/PE520.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "cis/NE2K.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "cis/PE-200.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("TAMARACK", "Ethernet", 0xcf434fba, 0x00b2e941, "cis/tamarack.cis"), @@ -1754,7 +1754,7 @@ MODULE_DEVICE_TABLE(pcmcia, pcnet_ids); MODULE_FIRMWARE("cis/PCMLM28.cis"); MODULE_FIRMWARE("cis/DP83903.cis"); MODULE_FIRMWARE("cis/LA-PCM.cis"); -MODULE_FIRMWARE("PE520.cis"); +MODULE_FIRMWARE("cis/PE520.cis"); MODULE_FIRMWARE("cis/NE2K.cis"); MODULE_FIRMWARE("cis/PE-200.cis"); MODULE_FIRMWARE("cis/tamarack.cis"); 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 ...
axnet_cs:
remove unnecessary spin_unlock_irqrestore,spin_lock_irqsave.
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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(&ei_local->page_lock, flags);
outb_p(0x00, e8390_base + EN0_IMR);
- spin_unlock_irqrestore(&ei_local->page_lock, flags);
/*
* Slow phase with lock held.
*/
- spin_lock_irqsave(&ei_local->page_lock, flags);
-
ei_local->irqlock = 1;
send_length = max(length, ETH_ZLEN);
--
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied to net-next-2.6 --
pcnet_cs,serial_cs: add cis of KTI PE520 pcmcia network card, and serial card(Sierra Wireless AC860). Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- 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, "NSC MF LAN/Modem", 0x58fc6056, "cis/DP83903.cis"), PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "cis/DP83903.cis"), PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, "cis/LA-PCM.cis"), - PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "PE520.cis"), + PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "cis/PE520.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "cis/NE2K.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "cis/PE-200.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("TAMARACK", "Ethernet", 0xcf434fba, 0x00b2e941, "cis/tamarack.cis"), @@ -1754,7 +1754,7 @@ MODULE_DEVICE_TABLE(pcmcia, pcnet_ids); MODULE_FIRMWARE("cis/PCMLM28.cis"); MODULE_FIRMWARE("cis/DP83903.cis"); MODULE_FIRMWARE("cis/LA-PCM.cis"); -MODULE_FIRMWARE("PE520.cis"); +MODULE_FIRMWARE("cis/PE520.cis"); MODULE_FIRMWARE("cis/NE2K.cis"); MODULE_FIRMWARE("cis/PE-200.cis"); MODULE_FIRMWARE("cis/tamarack.cis"); 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 <ken_kawasaki@spring.nifty.jp> Applied to net-2.6, thanks. --
fmvj18x_cs, serial_cs: add new id Panasonic lan & modem card (model name:AL-VML101) Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- --- 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, "NEC", "PK-UG-J001" ,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, "PCMCIAs", "LanModem", 0xdcfe12d3, 0xc67c648f), PCMCIA_PFC_DEVICE_PROD_ID12(1, "TDK", "GlobalNetworker 3410/3412", 0x1eae9475, 0xd9a93bed), PCMCIA_PFC_DEVICE_PROD_ID12(1, "Xircom", "CreditCard Ethernet+Modem II", 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), --
axnet_cs: add new id (corega PCC-TXM) Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- --- 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("CNet", "CNF301", 0xbc477dde, 0x78c5f40b), PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FEther PCC-TXD", 0x5261440f, 0x436768c5), PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FEtherII PCC-TXD", 0x5261440f, 0x730df72e), + PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FEther PCC-TXM", 0x5261440f, 0x3abbd061), PCMCIA_DEVICE_PROD_ID12("Dynalink", "L100C16", 0x55632fd5, 0x66bc2a90), PCMCIA_DEVICE_PROD_ID12("IO DATA", "ETXPCM", 0x547e66dc, 0x233adac2), PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8), --
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thanks. --
pcnet_cs: *add new id (Allied Telesis LM33-PCM-T Lan&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 <ken_kawasaki@spring.nifty.jp> --- --- 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, "AnyCom", "Fast Ethernet + 56K COMBO", 0x578ba6e7, 0xb0ac62c4), + PCMCIA_PFC_DEVICE_PROD_ID12(0, "ATKK", "LM33-PCM-T", 0xba9eb7e2, 0x077c174e), PCMCIA_PFC_DEVICE_PROD_ID12(0, "D-Link", "DME336T", 0x1a424a1c, 0xb23897ff), PCMCIA_PFC_DEVICE_PROD_ID12(0, "Grey Cell", "GCS3000", 0x2a151fac, 0x48b932ae), PCMCIA_PFC_DEVICE_PROD_ID12(0, "Linksys", "EtherFast 10&100 + 56K PC Card (PCMLM56)", 0x0733cc81, 0xb3765033), @@ -1740,7 +1741,7 @@ static struct pcmcia_device_id pcnet_ids PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "cis/DP83903.cis"), PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, "NSC MF LAN/Modem", 0x58fc6056, "cis/DP83903.cis"), PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "cis/DP83903.cis"), - PCMCIA_DEVICE_CIS_MANF_CARD(0xc00f, 0x0002, "cis/LA-PCM.cis"), + PCMCIA_DEVICE_CIS_PROD_ID12("Allied Telesis,K.K", "Ethernet LAN Card", 0x2ad62f3c, 0x9fd2f0a2, "cis/LA-PCM.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("KTI", "PE520 PLUS", 0xad180345, 0x9d58d392, "cis/PE520.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "cis/NE2K.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "cis/PE-200.cis"), --- 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: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thanks Ken. --
smc91c92_cs:
*cvt_ascii_address returns 0, if success.
*call free_netdev, if we can't find hardware address.
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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, &parse))
return -EINVAL;
- if ((parse.version_1.ns > 3) &&
- (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 > 3) && (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, &buf);
if (buf && len >= 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 "smc91c92_cs: Unable to find hardware address.\n");
- goto config_undo;
+ goto config_failed;
}
smc->duplex = 0;
@@ -998,6 +999,7 @@ config_undo:
unregister_netdev(dev);
config_failed:
smc91c92_release(link);
+ free_netdev(dev);
return -ENODEV;
} /* smc91c92_config */
--
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thanks. --
smc91c92_cs:
* define multicast_table as unsigned char
* remove unnecessary "#ifndef final_version"
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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->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->flags & 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->dmi_addr);
-#ifndef final_version /* Verify multicast address. */
- if ((mc_addr->dmi_addr[0] & 1) == 0)
- continue;
-#endif
multicast_table[position >> 29] |= 1 << ((position >> 26) & 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(&smc->lock, flags);
SMC_SELECT_BANK(3);
- outl(multicast_table[0], ioaddr + MULTICAST0);
- outl(multicast_table[1], ioaddr + MULTICAST4);
+ for (i = 0; i < 8; i++)
+ outb(multicast_table[i], ioaddr + MULTICAST0 + i);
SMC_SELECT_BANK(0);
outw(rx_cfg_setting, ioaddr + RCR);
SMC_SELECT_BANK(2);
--
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> It is clear there are not too many testers of multicast with this driver :-) Thanks for fixing this bug, patch applied. --
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 <ken_kawasaki@spring.nifty.jp>
---
--- 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) & CFG_AUI_SELECT) ? 2 : 1;
+ SMC_SELECT_BANK(saved_bank);
+ spin_unlock_irqrestore(&smc->lock, flags);
+
/* Check for pending interrupt with watchdog flag set: with
this, we can limp along even if the interrupt is blocked */
if (smc->watchdog++ && ((i>>8) & i)) {
if (!smc->fast_poll)
printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name);
+ local_irq_save(flags);
smc_interrupt(dev->irq, dev);
+ local_irq_restore(flags);
smc->fast_poll = HZ;
}
if (smc->fast_poll) {
smc->fast_poll--;
smc->media.expires = jiffies + HZ/100;
add_timer(&smc->media);
- SMC_SELECT_BANK(saved_bank);
- spin_unlock_irqrestore(&smc->lock, flags);
return;
}
+ spin_lock_irqsave(&smc->lock, flags);
+
+ saved_bank = inw(ioaddr + BANK_SELECT);
+
if (smc->cfg & CFG_MII_SELECT) {
if (smc->mii_if.phy_id < 0)
goto reschedule;
@@ -1978,15 +1985,16 @@ static int smc_get_settings(struct net_d
unsigned int ioaddr = dev->base_addr;
u16 saved_bank = inw(ioaddr + BANK_SELECT);
int ret;
+ unsigned long flags;
- spin_lock_irq(&smc->lock);
+ spin_lock_irqsave(&smc->lock, flags);
SMC_SELECT_BANK(3);
if (smc->cfg & CFG_MII_SELECT)
ret = mii_ethtool_gset(&smc->mii_if, ecmd);
else
ret = smc_netdev_get_ecmd(dev, ecmd);
SMC_SELECT_BANK(saved_bank);
- spin_unlock_irq(&smc->lock);
+ spin_unlock_irqrestore(&smc->lock, flags);
return ret;
}
@@ -1996,15 +2004,16 @@ static ...From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thank you. --
pcnet_cs:
serial_cs:
add new id (TOSHIBA Modem/LAN Card)
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "cis/PCMLM28.cis"),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "cis/PCMLM28.cis"),
+ PCMCIA_PFC_DEVICE_CIS_PROD_ID12(0, "TOSHIBA", "Modem/LAN Card", 0xb4585a1a, 0x53f922f8, "cis/PCMLM28.cis"),
PCMCIA_MFC_DEVICE_CIS_PROD_ID12(0, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "cis/DP83903.cis"),
PCMCIA_MFC_DEVICE_CIS_PROD_ID4(0, "NSC MF LAN/Modem", 0x58fc6056, "cis/DP83903.cis"),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0175, 0x0000, "cis/DP83903.cis"),
--- 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, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "Psion Dacom", "Gold Card V34 Ethernet GSM", 0xf5f025c2, 0x4ae85d35, "cis/PCMLM28.cis"),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "cis/PCMLM28.cis"),
+ PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "TOSHIBA", "Modem/LAN Card", 0xb4585a1a, 0x53f922f8, "cis/PCMLM28.cis"),
PCMCIA_MFC_DEVICE_CIS_PROD_ID12(1, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "cis/DP83903.cis"),
PCMCIA_MFC_DEVICE_CIS_PROD_ID4(1, "NSC MF LAN/Modem", ...From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thanks. --
smc91c92_cs:
Fix the problem that lan & 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 <ken_kawasaki@spring.nifty.jp>
--
--- 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 & ~COR_IREQ_ENA, smc->base + MOT_LAN + CISREG_COR);
writeb(cor, smc->base + MOT_LAN + CISREG_COR);
}
-#ifdef DOES_NOT_WORK
- if (smc->base != NULL) { /* Megahertz MFC's */
- readb(smc->base+MEGAHERTZ_ISR);
- readb(smc->base+MEGAHERTZ_ISR);
+
+ if ((smc->base != NULL) && /* Megahertz MFC's */
+ (smc->manfid == MANFID_MEGAHERTZ) &&
+ (smc->cardid == PRODID_MEGAHERTZ_EM3288)) {
+
+ u_char tmp;
+ tmp = readb(smc->base+MEGAHERTZ_ISR);
+ tmp = readb(smc->base+MEGAHERTZ_ISR);
+
+ /* Retrigger interrupt if needed */
+ writeb(tmp, smc->base + MEGAHERTZ_ISR);
+ writeb(tmp, smc->base + MEGAHERTZ_ISR);
}
-#endif
+
spin_unlock(&smc->lock);
return IRQ_RETVAL(handled);
}
--
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied. --
axnet_cs:
local_irq_save before calling ei_irq_wrapper.
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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->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->stale++ && (inb_p(nic_base + EN0_ISR) & ENISR_ALL)) {
if (!info->fast_poll)
printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name);
+ local_irq_save(flags);
ei_irq_wrapper(dev->irq, dev);
+ local_irq_restore(flags);
+
info->fast_poll = HZ;
}
if (info->fast_poll) {
--
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> 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. --
axnet_cs:
use spin_lock_irqsave instead of spin_lock in ax_interrupt
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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->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(&ei_local->page_lock);
+ spin_lock_irqsave(&ei_local->page_lock, flags);
if (ei_local->irqlock)
{
@@ -1188,7 +1189,7 @@ static irqreturn_t ax_interrupt(int irq,
dev->name, inb_p(e8390_base + EN0_ISR),
inb_p(e8390_base + EN0_IMR));
#endif
- spin_unlock(&ei_local->page_lock);
+ spin_unlock_irqrestore(&ei_local->page_lock, flags);
return IRQ_NONE;
}
@@ -1261,7 +1262,7 @@ static irqreturn_t ax_interrupt(int irq,
ei_local->irqlock = 0;
outb_p(ENISR_ALL, e8390_base + EN0_IMR);
- spin_unlock(&ei_local->page_lock);
+ spin_unlock_irqrestore(&ei_local->page_lock, flags);
return IRQ_RETVAL(handled);
}
--
[...] 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: Ben Hutchings <bhutchings@solarflare.com> 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. --
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: Ben Hutchings <bhutchings@solarflare.com> 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 ->poll_controller() which we pretty much expect every modern and future driver to do. --
pcnet_cs:
add new_id: "KENTRONICS KEP-230" 10Base-T PCMCIA card.
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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("IO DATA", "PCETTX", 0x547e66dc, 0x6fc5459b),
PCMCIA_DEVICE_PROD_ID12("iPort", "10/100 Ethernet Card", 0x56c538d2, 0x11b0ffc0),
PCMCIA_DEVICE_PROD_ID12("KANSAI ELECTRIC CO.,LTD", "KLA-PCM/T", 0xb18dc3b4, 0xcc51a956),
+ PCMCIA_DEVICE_PROD_ID12("KENTRONICS", "KEP-230", 0xaf8144c9, 0x868f6616),
PCMCIA_DEVICE_PROD_ID12("KCI", "PE520 PCMCIA Ethernet Adapter", 0xa89b87d3, 0x1eb88e64),
PCMCIA_DEVICE_PROD_ID12("KINGMAX", "EN10T2T", 0x7bcb459a, 0xa5c81fa5),
PCMCIA_DEVICE_PROD_ID12("Kingston", "KNE-PC2", 0x1128e633, 0xce2a89b3),
--
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thank you. --
pcnet_cs:
add new_id: "corega Ether CF-TD" 10Base-T PCMCIA card.
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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("COMPU-SHACK", "FASTline PCMCIA 10/100 Fast-Ethernet", 0xfa2e424d, 0x3953d9b9),
PCMCIA_DEVICE_PROD_ID12("CONTEC", "C-NET(PC)C-10L", 0x21cab552, 0xf6f90722),
PCMCIA_DEVICE_PROD_ID12("corega", "FEther PCC-TXF", 0x0a21501a, 0xa51564a2),
+ PCMCIA_DEVICE_PROD_ID12("corega", "Ether CF-TD", 0x0a21501a, 0x6589340a),
PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega EtherII PCC-T", 0x5261440f, 0xfa9d85bd),
PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega EtherII PCC-TD", 0x5261440f, 0xc49bd73d),
PCMCIA_DEVICE_PROD_ID12("Corega K.K.", "corega EtherII PCC-TD", 0xd4fdcbd8, 0xc49bd73d),
--
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied. --
axnet_cs:
Some Ax88790 chip need to reinitialize the CISREG_CCSR register
after resume.
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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->flags & IS_AX88790)
outb(0x10, dev->base_addr + AXNET_GPIO); /* select Internal PHY */
+ info->active_low = 0;
+
for (i = 0; i < 32; i++) {
j = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 1);
j2 = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 2);
@@ -329,15 +332,18 @@ static int axnet_config(struct pcmcia_de
if ((j != 0) && (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 < 32; i++) {
j = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 1);
j2 = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 2);
if (j == j2) continue;
- if ((j != 0) && (j != 0xffff)) break;
+ if ((j != 0) && (j != 0xffff)) {
+ info->active_low = 1;
+ break;
+ }
}
}
@@ -383,8 +389,12 @@ static int axnet_suspend(struct pcmcia_d
...From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thank you. --
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 <ken_kawasaki@spring.nifty.jp>
---
--- 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[] = {
"IC PLUS IP1000 1000/100/10 based NIC",
"Sundance Technology ST2021 based NIC",
"Tamarack Microelectronics TC9020/9021 based NIC",
- "Tamarack Microelectronics TC9020/9021 based NIC",
"D-Link NIC IP1000A"
};
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: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thank you. --
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 <ken_kawasaki@spring.nifty.jp>
---
--- 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: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thank you. --
The licence of GLOBETROTTER.cis is unclear, I will drop this. Best Regards Ken --
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> 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. --
3c574_cs, 3c589_cs:
disable irq before calling el3_interrupt
in the media_check function.
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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) & IntLatch) && (inb(ioaddr + Timer) == 0xff)) {
if (!lp->fast_poll)
printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name);
+
+ local_irq_save(flags);
el3_interrupt(dev->irq, dev);
+ local_irq_restore(flags);
+
lp->fast_poll = HZ;
}
if (lp->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->fast_poll)
printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name);
+
+ local_irq_save(flags);
el3_interrupt(dev->irq, dev);
+ local_irq_restore(flags);
+
lp->fast_poll = HZ;
}
if (lp->fast_poll) {
--
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Applied, thanks. --
lib8390: use "spin_lock_irqsave", "local_irq_save" instead of "disable_irq". Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- --- 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->irq); - spin_lock(&ei_local->page_lock); + spin_lock_irqsave(&ei_local->page_lock, flags); /* Try to restart the card. Perhaps the user has fixed something. */ ei_reset_8390(dev); __NS8390_init(dev, 1); - spin_unlock(&ei_local->page_lock); - enable_irq_lockdep(dev->irq); + spin_unlock_irqrestore(&ei_local->page_lock, flags); netif_wake_queue(dev); } @@ -323,17 +321,11 @@ static netdev_tx_t __ei_start_xmit(struc spin_lock_irqsave(&ei_local->page_lock, flags); ei_outb_p(0x00, e8390_base + EN0_IMR); - spin_unlock_irqrestore(&ei_local->page_lock, flags); - /* * Slow phase with lock held. */ - disable_irq_nosync_lockdep_irqsave(dev->irq, &flags); - - spin_lock(&ei_local->page_lock); - ei_local->irqlock = 1; /* @@ -368,8 +360,7 @@ static netdev_tx_t __ei_start_xmit(struc ei_local->irqlock = 0; netif_stop_queue(dev); ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR); - spin_unlock(&ei_local->page_lock); - enable_irq_lockdep_irqrestore(dev->irq, &flags); + spin_unlock_irqrestore(&ei_local->page_lock, flags); dev->stats.tx_errors++; return NETDEV_TX_BUSY; } @@ -409,8 +400,7 @@ static netdev_tx_t __ei_start_xmit(struc ei_local->irqlock = 0; ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR); - spin_unlock(&ei_local->page_lock); - enable_irq_lockdep_irqrestore(dev->irq, &flags); + spin_unlock_irqrestore(&ei_local->page_lock, flags); dev_kfree_skb (skb); dev->stats.tx_bytes += send_length; @@ -526,9 +516,11 @@ static irqreturn_t ...
lib8390: write the value "ENISR_ALL" to register "EN0_IMR" after enable_irq_lockdep_irqrestore. This patch avoids frequent transmit error on SMP system. Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- --- 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->name, ei_local->tx1, ei_local->tx2, ei_local->lasttx); ei_local->irqlock = 0; netif_stop_queue(dev); - ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR); spin_unlock(&ei_local->page_lock); enable_irq_lockdep_irqrestore(dev->irq, &flags); + ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR); dev->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->irqlock = 0; - ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR); spin_unlock(&ei_local->page_lock); enable_irq_lockdep_irqrestore(dev->irq, &flags); + ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR); dev_kfree_skb (skb); dev->stats.tx_bytes += send_length; --
Sorry, I cancel this patch and test it again. Best Regards --
3c589_cs,3c574_cs,serial_cs: (1)add cis(firmware) of 3Com lan&modem mulitifunction pcmcia card. (2)load correct configuration register for 3Com card Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- 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, "Motorola MARQUIS", 0xf03e4e77), PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0589), PCMCIA_DEVICE_PROD_ID12("Farallon", "ENet", 0x58d93fc4, 0x992c2202), - PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x0035, "3CXEM556.cis"), - PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x003d, "3CXEM556.cis"), + PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x0035, "cis/3CXEM556.cis"), + PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x003d, "cis/3CXEM556.cis"), 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: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> 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. --
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 <ken_kawasaki@spring.nifty.jp>
---
--- 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 & 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 >= 0; i--) {
dataval = (asic_data & (1 << i)) ? EE_ADOT : 0;
@@ -1727,6 +1728,7 @@ static struct pcmcia_device_id pcnet_ids
PCMCIA_DEVICE_PROD_ID12("PRETEC", "Ethernet CompactLAN 10BaseT 3.3V", 0xebf91155, 0x7f5a4f50),
PCMCIA_DEVICE_PROD_ID12("Psion Dacom", "Gold Card Ethernet", 0xf5f025c2, 0x3a30e110),
PCMCIA_DEVICE_PROD_ID12("=RELIA==", "Ethernet", 0xcdd0644a, 0x00b2e941),
+ PCMCIA_DEVICE_PROD_ID12("RIOS Systems Co.", "PC CARD3 ETHERNET", 0x7dd33481, 0x10b41826),
PCMCIA_DEVICE_PROD_ID12("RP", "1625B Ethernet NE2000 Compatible", 0xe3e66e22, 0xb96150df),
PCMCIA_DEVICE_PROD_ID12("RPTI", "EP400 Ethernet NE2000 Compatible", 0xdc6f88fd, ...From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> These are three seperate changes, could you split this up into three seperate patches? Thank you. --
On Tue, 30 Jun 2009 07:19:55 -0700 (PDT) Sorry, I cancel the use_shmem patch. (for re-test). Ken. --
add new id (RIOS System PC CARD3 ETHERNET). Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> --- --- 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("PRETEC", "Ethernet CompactLAN 10BaseT 3.3V", 0xebf91155, 0x7f5a4f50), PCMCIA_DEVICE_PROD_ID12("Psion Dacom", "Gold Card Ethernet", 0xf5f025c2, 0x3a30e110), PCMCIA_DEVICE_PROD_ID12("=RELIA==", "Ethernet", 0xcdd0644a, 0x00b2e941), + PCMCIA_DEVICE_PROD_ID12("RIOS Systems Co.", "PC CARD3 ETHERNET", 0x7dd33481, 0x10b41826), PCMCIA_DEVICE_PROD_ID12("RP", "1625B Ethernet NE2000 Compatible", 0xe3e66e22, 0xb96150df), PCMCIA_DEVICE_PROD_ID12("RPTI", "EP400 Ethernet NE2000 Compatible", 0xdc6f88fd, 0x4a7e2ae0), PCMCIA_DEVICE_PROD_ID12("RPTI", "EP401 Ethernet NE2000 Compatible", 0xdc6f88fd, 0x4bcbd7fd), --
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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 & 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 >= 0; i--) {
dataval = (asic_data & (1 << i)) ? EE_ADOT : 0;
--
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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 & 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 >= 0; i--) {
dataval = (asic_data & (1 << i)) ? EE_ADOT : 0;
--
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> 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. --
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 <ken_kawasaki@spring.nifty.jp>
---
--- 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 & 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 >= 0; i--) {
dataval = (asic_data & (1 << i)) ? EE_ADOT : 0;
--
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> "Who" 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. --
On Fri, 10 Jul 2009 20:26:09 -0700 (PDT) OK. Thanks. --
3c589_cs:
re-initialize the multicast in the tc589_reset,
and spin_lock the set_multicast_list function.
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
---
--- 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 & 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->p_dev;
unsigned int ioaddr = dev->base_addr;
u16 opts = SetRxFilter | RxStation | RxBroadcast;
- if (!pcmcia_dev_present(link)) return;
if (dev->flags & IFF_PROMISC)
opts |= ...From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> 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. --
On Mon, 20 Jul 2009 08:29:06 -0700 (PDT) OK. Thanks! --
