Skip to content

Commit

Permalink
Merge 'upstream' branch of rsync://rsync.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/jgarzik/netdev-2.6
  • Loading branch information
Linus Torvalds committed Jun 27, 2005
2 parents e494f63 + e254e9b commit 61cca8c
Show file tree
Hide file tree
Showing 44 changed files with 3,642 additions and 2,460 deletions.
1 change: 1 addition & 0 deletions drivers/net/3c523.c
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,7 @@ module_param_array(irq, int, NULL, 0);
module_param_array(io, int, NULL, 0);
MODULE_PARM_DESC(io, "EtherLink/MC I/O base address(es)");
MODULE_PARM_DESC(irq, "EtherLink/MC IRQ number(s)");
MODULE_LICENSE("GPL");

int init_module(void)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ config FORCEDETH

config CS89x0
tristate "CS89x0 support"
depends on NET_PCI && (ISA || ARCH_IXDP2X01)
depends on (NET_PCI && (ISA || ARCH_IXDP2X01)) || ARCH_PNX0105
---help---
Support for CS89x0 chipset based Ethernet cards. If you have a
network (Ethernet) card of this type, say Y and read the
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,9 @@ static int b44_open(struct net_device *dev)
b44_init_hw(bp);
bp->flags |= B44_FLAG_INIT_COMPLETE;

netif_carrier_off(dev);
b44_check_phy(bp);

spin_unlock_irq(&bp->lock);

init_timer(&bp->timer);
Expand Down
40 changes: 37 additions & 3 deletions drivers/net/cs89x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ static unsigned int cs8900_irq_map[] = {1,0,0,0};
#include <asm/irq.h>
static unsigned int netcard_portlist[] __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0};
static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0};
#elif defined(CONFIG_ARCH_PNX0105)
#include <asm/irq.h>
#include <asm/arch/gpio.h>
#define CIRRUS_DEFAULT_BASE IO_ADDRESS(EXT_STATIC2_s0_BASE + 0x200000) /* = Physical address 0x48200000 */
#define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */
static unsigned int netcard_portlist[] __initdata = {CIRRUS_DEFAULT_BASE, 0};
static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0};
#else
static unsigned int netcard_portlist[] __initdata =
{ 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0};
Expand Down Expand Up @@ -431,6 +438,30 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
#endif
}

#ifdef CONFIG_ARCH_PNX0105
initialize_ebi();

/* Map GPIO registers for the pins connected to the CS8900a. */
if (map_cirrus_gpio() < 0)
return -ENODEV;

reset_cirrus();

/* Map event-router registers. */
if (map_event_router() < 0)
return -ENODEV;

enable_cirrus_irq();

unmap_cirrus_gpio();
unmap_event_router();

dev->base_addr = ioaddr;

for (i = 0 ; i < 3 ; i++)
readreg(dev, 0);
#endif

/* Grab the region so we can find another board if autoIRQ fails. */
/* WTF is going on here? */
if (!request_region(ioaddr & ~3, NETCARD_IO_EXTENT, DRV_NAME)) {
Expand Down Expand Up @@ -672,7 +703,7 @@ printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT));
} else {
i = lp->isa_config & INT_NO_MASK;
if (lp->chip_type == CS8900) {
#ifdef CONFIG_ARCH_IXDP2X01
#if defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX0105)
i = cs8900_irq_map[0];
#else
/* Translate the IRQ using the IRQ mapping table. */
Expand Down Expand Up @@ -1145,7 +1176,7 @@ net_open(struct net_device *dev)
int i;
int ret;

#ifndef CONFIG_SH_HICOSH4 /* uses irq#1, so this won't work */
#if !defined(CONFIG_SH_HICOSH4) && !defined(CONFIG_ARCH_PNX0105) /* uses irq#1, so this won't work */
if (dev->irq < 2) {
/* Allow interrupts to be generated by the chip */
/* Cirrus' release had this: */
Expand Down Expand Up @@ -1176,7 +1207,7 @@ net_open(struct net_device *dev)
else
#endif
{
#ifndef CONFIG_ARCH_IXDP2X01
#if !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX0105)
if (((1 << dev->irq) & lp->irq_map) == 0) {
printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n",
dev->name, dev->irq, lp->irq_map);
Expand Down Expand Up @@ -1261,6 +1292,9 @@ net_open(struct net_device *dev)
case A_CNF_MEDIA_10B_2: result = lp->adapter_cnf & A_CNF_10B_2; break;
default: result = lp->adapter_cnf & (A_CNF_10B_T | A_CNF_AUI | A_CNF_10B_2);
}
#ifdef CONFIG_ARCH_PNX0105
result = A_CNF_10B_T;
#endif
if (!result) {
printk(KERN_ERR "%s: EEPROM is configured for unavailable media\n", dev->name);
release_irq:
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/cs89x0.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <linux/config.h>

#ifdef CONFIG_ARCH_IXDP2X01
#if defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX0105)
/* IXDP2401/IXDP2801 uses dword-aligned register addressing */
#define CS89x0_PORT(reg) ((reg) * 2)
#else
Expand Down
25 changes: 16 additions & 9 deletions drivers/net/e100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,11 +1093,16 @@ static int e100_phy_init(struct nic *nic)
}

if((nic->mac >= mac_82550_D102) || ((nic->flags & ich) &&
(mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000) &&
(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled)))
/* enable/disable MDI/MDI-X auto-switching */
mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG,
nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH);
(mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000))) {
/* enable/disable MDI/MDI-X auto-switching.
MDI/MDI-X auto-switching is disabled for 82551ER/QM chips */
if((nic->mac == mac_82551_E) || (nic->mac == mac_82551_F) ||
(nic->mac == mac_82551_10) || (nic->mii.force_media) ||
!(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled))
mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, 0);
else
mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, NCONFIG_AUTO_SWITCH);
}

return 0;
}
Expand Down Expand Up @@ -1666,8 +1671,10 @@ static irqreturn_t e100_intr(int irq, void *dev_id, struct pt_regs *regs)
if(stat_ack & stat_ack_rnr)
nic->ru_running = RU_SUSPENDED;

e100_disable_irq(nic);
netif_rx_schedule(netdev);
if(likely(netif_rx_schedule_prep(netdev))) {
e100_disable_irq(nic);
__netif_rx_schedule(netdev);
}

return IRQ_HANDLED;
}
Expand Down Expand Up @@ -2335,11 +2342,11 @@ static int __devinit e100_probe(struct pci_dev *pdev,
goto err_out_iounmap;
}

e100_phy_init(nic);

if((err = e100_eeprom_load(nic)))
goto err_out_free;

e100_phy_init(nic);

memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN);
if(!is_valid_ether_addr(netdev->dev_addr)) {
DPRINTK(PROBE, ERR, "Invalid MAC address from "
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/e1000/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ struct e1000_adapter;
#define E1000_RX_BUFFER_WRITE 16 /* Must be power of 2 */

#define AUTO_ALL_MODES 0
#define E1000_EEPROM_82544_APM 0x0400
#define E1000_EEPROM_82544_APM 0x0004
#define E1000_EEPROM_APME 0x0400

#ifndef E1000_MASTER_SLAVE
Expand All @@ -159,7 +159,7 @@ struct e1000_adapter;
* so a DMA handle can be stored along with the buffer */
struct e1000_buffer {
struct sk_buff *skb;
uint64_t dma;
dma_addr_t dma;
unsigned long time_stamp;
uint16_t length;
uint16_t next_to_watch;
Expand Down
Loading

0 comments on commit 61cca8c

Please sign in to comment.