-Index: linux-2.6.23/drivers/net/b44.c
-===================================================================
---- linux-2.6.23.orig/drivers/net/b44.c 2007-10-13 10:58:27.872607266 +0200
-+++ linux-2.6.23/drivers/net/b44.c 2007-10-13 11:00:46.916530927 +0200
+--- a/drivers/net/b44.c
++++ b/drivers/net/b44.c
@@ -1,7 +1,9 @@
-/* b44.c: Broadcom 4400 device driver.
+/* b44.c: Broadcom 4400/47xx device driver.
bw32(bp, B44_RCV_LAZY, 0);
bw32(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE);
b44_wait_bit(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE, 200, 1);
-@@ -1294,19 +1242,23 @@
+@@ -1294,19 +1242,24 @@
}
bw32(bp, B44_DMARX_CTRL, 0);
bp->rx_prod = bp->rx_cons = 0;
+ & MDIO_CTRL_MAXF_MASK)));
+ break;
+ case SSB_BUSTYPE_PCI:
++ case SSB_BUSTYPE_PCMCIA:
+ bw32(bp, B44_MDIO_CTRL, (MDIO_CTRL_PREAMBLE |
(0x0d & MDIO_CTRL_MAXF_MASK)));
+ break;
br32(bp, B44_MDIO_CTRL);
if (!(br32(bp, B44_DEVCTRL) & DEVCTRL_IPP)) {
-@@ -1349,6 +1301,7 @@
+@@ -1349,6 +1302,7 @@
{
struct b44 *bp = netdev_priv(dev);
struct sockaddr *addr = p;
if (netif_running(dev))
return -EBUSY;
-@@ -1359,7 +1312,11 @@
+@@ -1359,7 +1313,11 @@
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
spin_lock_irq(&bp->lock);
spin_unlock_irq(&bp->lock);
return 0;
-@@ -1445,18 +1402,6 @@
+@@ -1445,18 +1403,6 @@
return err;
}
#ifdef CONFIG_NET_POLL_CONTROLLER
/*
* Polling receive - used by netconsole and other diagnostic tools
-@@ -1570,7 +1515,6 @@
+@@ -1570,7 +1516,6 @@
static void b44_setup_wol(struct b44 *bp)
{
u32 val;
bw32(bp, B44_RXCONFIG, RXCONFIG_ALLMULTI);
-@@ -1594,13 +1538,6 @@
+@@ -1594,13 +1539,6 @@
} else {
b44_setup_pseudo_magicp(bp);
}
}
static int b44_close(struct net_device *dev)
-@@ -1700,7 +1637,7 @@
+@@ -1700,7 +1638,7 @@
val = br32(bp, B44_RXCONFIG);
val &= ~(RXCONFIG_PROMISC | RXCONFIG_ALLMULTI);
val |= RXCONFIG_PROMISC;
bw32(bp, B44_RXCONFIG, val);
} else {
-@@ -1747,12 +1684,8 @@
+@@ -1747,12 +1685,8 @@
static void b44_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo *info)
{
}
static int b44_nway_reset(struct net_device *dev)
-@@ -2035,6 +1968,245 @@
+@@ -2035,6 +1969,245 @@
.get_ethtool_stats = b44_get_ethtool_stats,
};
static int b44_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct mii_ioctl_data *data = if_mii(ifr);
-@@ -2044,40 +2216,64 @@
+@@ -2044,40 +2217,64 @@
if (!netif_running(dev))
goto out;
- bp->dev->dev_addr[5] = eeprom[82];
+ switch (instance) {
+ case 1:
-+ addr = sdev->bus->sprom.r1.et0mac;
-+ bp->phy_addr = sdev->bus->sprom.r1.et0phyaddr;
++ addr = sdev->bus->sprom.et0mac;
++ bp->phy_addr = sdev->bus->sprom.et0phyaddr;
+ break;
+ default:
-+ addr = sdev->bus->sprom.r1.et1mac;
-+ bp->phy_addr = sdev->bus->sprom.r1.et1phyaddr;
++ addr = sdev->bus->sprom.et1mac;
++ bp->phy_addr = sdev->bus->sprom.et1phyaddr;
+ break;
+ }
+
if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){
printk(KERN_ERR PFX "Invalid MAC address found in EEPROM\n");
-@@ -2086,103 +2282,52 @@
+@@ -2086,103 +2283,52 @@
memcpy(bp->dev->perm_addr, bp->dev->dev_addr, bp->dev->addr_len);
bp->rx_pending = B44_DEF_RX_RING_PENDING;
bp->tx_pending = B44_DEF_TX_RING_PENDING;
-@@ -2201,16 +2346,16 @@
+@@ -2201,16 +2347,16 @@
dev->poll_controller = b44_poll_controller;
#endif
dev->change_mtu = b44_change_mtu;
}
bp->mii_if.dev = dev;
-@@ -2229,61 +2374,52 @@
+@@ -2229,61 +2375,52 @@
err = register_netdev(dev);
if (err) {
del_timer_sync(&bp->timer);
-@@ -2301,33 +2437,22 @@
+@@ -2301,33 +2438,22 @@
b44_init_hw(bp, B44_PARTIAL_RESET);
b44_setup_wol(bp);
}
return rc;
}
-@@ -2346,29 +2471,31 @@
+@@ -2346,29 +2472,31 @@
return 0;
}
}
module_init(b44_init);
-Index: linux-2.6.23/drivers/net/b44.h
-===================================================================
---- linux-2.6.23.orig/drivers/net/b44.h 2007-10-13 10:58:27.880607722 +0200
-+++ linux-2.6.23/drivers/net/b44.h 2007-10-13 11:00:46.904530245 +0200
+--- a/drivers/net/b44.h
++++ b/drivers/net/b44.h
@@ -129,6 +129,7 @@
#define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */
#define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */
struct net_device *dev;
dma_addr_t rx_ring_dma, tx_ring_dma;
-Index: linux-2.6.23/drivers/net/Kconfig
-===================================================================
---- linux-2.6.23.orig/drivers/net/Kconfig 2007-10-13 10:58:27.888608180 +0200
-+++ linux-2.6.23/drivers/net/Kconfig 2007-10-13 11:00:46.912530699 +0200
+--- a/drivers/net/Kconfig
++++ b/drivers/net/Kconfig
@@ -1577,7 +1577,7 @@
config B44