Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3583
b: refs/heads/master
c: 9758d0f
h: refs/heads/master
i:
  3581: 762f363
  3579: d32db5a
  3575: 9ace1ec
  3567: 0a3b4a3
  3551: 66cbc5b
  3519: 2c06ab8
  3455: ae1236c
  3327: c5a9a02
  3071: 13184a5
v: v3
  • Loading branch information
Jeff Garzik authored and Jeff Garzik committed Jun 27, 2005
1 parent 86d2ca2 commit 4d0a067
Show file tree
Hide file tree
Showing 25 changed files with 114 additions and 916 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a9fe638ebdcb28bded8ec2f71d0a339ebf438ea
refs/heads/master: 9758d0f028b4c73a5222168a5ffc340606ecbea1
2 changes: 1 addition & 1 deletion trunk/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
40 changes: 37 additions & 3 deletions trunk/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 trunk/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
53 changes: 43 additions & 10 deletions trunk/drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@
* 0.31: 14 Nov 2004: ethtool support for getting/setting link
* capabilities.
* 0.32: 16 Apr 2005: RX_ERROR4 handling added.
* 0.33: 16 May 2005: Support for MCP51 added.
* 0.34: 18 Jun 2005: Add DEV_NEED_LINKTIMER to all nForce nics.
* 0.35: 26 Jun 2005: Support for MCP55 added.
*
* Known bugs:
* We suspect that on some hardware no TX done interrupts are generated.
Expand All @@ -93,7 +96,7 @@
* DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few
* superfluous timer interrupts from the nic.
*/
#define FORCEDETH_VERSION "0.32"
#define FORCEDETH_VERSION "0.35"
#define DRV_NAME "forcedeth"

#include <linux/module.h>
Expand Down Expand Up @@ -2005,7 +2008,9 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
/* handle different descriptor versions */
if (pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_1 ||
pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_2 ||
pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_3)
pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_3 ||
pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_12 ||
pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_13)
np->desc_ver = DESC_VER_1;
else
np->desc_ver = DESC_VER_2;
Expand Down Expand Up @@ -2215,56 +2220,84 @@ static struct pci_device_id pci_tbl[] = {
.device = PCI_DEVICE_ID_NVIDIA_NVENET_4,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
},
{ /* nForce3 Ethernet Controller */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NVENET_5,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
},
{ /* nForce3 Ethernet Controller */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NVENET_6,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
},
{ /* nForce3 Ethernet Controller */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NVENET_7,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
},
{ /* CK804 Ethernet Controller */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NVENET_8,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
},
{ /* CK804 Ethernet Controller */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NVENET_9,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
},
{ /* MCP04 Ethernet Controller */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NVENET_10,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
},
{ /* MCP04 Ethernet Controller */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NVENET_11,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
},
{ /* MCP51 Ethernet Controller */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NVENET_12,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
},
{ /* MCP51 Ethernet Controller */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NVENET_13,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
},
{ /* MCP55 Ethernet Controller */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NVENET_14,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
},
{ /* MCP55 Ethernet Controller */
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = PCI_DEVICE_ID_NVIDIA_NVENET_15,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
},
{0,},
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/pcnet32.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ static int pcnet32_phys_id(struct net_device *dev, u32 data)
if ((!data) || (data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ)))
data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ);

schedule_timeout(data * HZ);
msleep_interruptible(data * 1000);
del_timer_sync(&lp->blink_timer);

/* Restore the original value of the bcrs */
Expand Down
14 changes: 3 additions & 11 deletions trunk/drivers/net/sb1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ static int sb1000_close(struct net_device *dev);


/* SB1000 hardware routines to be used during open/configuration phases */
static inline void nicedelay(unsigned long usecs);
static inline int card_wait_for_busy_clear(const int ioaddr[],
const char* name);
static inline int card_wait_for_ready(const int ioaddr[], const char* name,
Expand Down Expand Up @@ -254,13 +253,6 @@ static struct pnp_driver sb1000_driver = {

static const int TimeOutJiffies = (875 * HZ) / 100;

static inline void nicedelay(unsigned long usecs)
{
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(HZ);
return;
}

/* Card Wait For Busy Clear (cannot be used during an interrupt) */
static inline int
card_wait_for_busy_clear(const int ioaddr[], const char* name)
Expand Down Expand Up @@ -475,7 +467,7 @@ sb1000_reset(const int ioaddr[], const char* name)
udelay(1000);
outb(0x0, port);
inb(port);
nicedelay(60000);
ssleep(1);
outb(0x4, port);
inb(port);
udelay(1000);
Expand Down Expand Up @@ -537,7 +529,7 @@ sb1000_activate(const int ioaddr[], const char* name)
const unsigned char Command0[6] = {0x80, 0x11, 0x00, 0x00, 0x00, 0x00};
const unsigned char Command1[6] = {0x80, 0x16, 0x00, 0x00, 0x00, 0x00};

nicedelay(50000);
ssleep(1);
if ((status = card_send_command(ioaddr, name, Command0, st)))
return status;
if ((status = card_send_command(ioaddr, name, Command1, st)))
Expand Down Expand Up @@ -944,7 +936,7 @@ sb1000_open(struct net_device *dev)
/* initialize sb1000 */
if ((status = sb1000_reset(ioaddr, name)))
return status;
nicedelay(200000);
ssleep(1);
if ((status = sb1000_check_CRC(ioaddr, name)))
return status;

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/skfp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ obj-$(CONFIG_SKFP) += skfp.o

skfp-objs := skfddi.o hwmtm.o fplustm.o smt.o cfm.o \
ecm.o pcmplc.o pmf.o queue.o rmt.o \
smtdef.o smtinit.o smttimer.o srf.o smtparse.o\
hwt.o drvfbi.o ess.o
smtdef.o smtinit.o smttimer.o srf.o hwt.o \
drvfbi.o ess.o

# NOTE:
# Compiling this driver produces some warnings (and some more are
Expand Down
Loading

0 comments on commit 4d0a067

Please sign in to comment.