Commit e8a3edfc authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/jgarzik/net-drivers-2.6

into home.osdl.org:/home/torvalds/v2.5/linux
parents 050aa593 2b48aa91
...@@ -2042,6 +2042,17 @@ config R8169 ...@@ -2042,6 +2042,17 @@ config R8169
say M here and read <file:Documentation/modules.txt>. This is say M here and read <file:Documentation/modules.txt>. This is
recommended. The module will be called r8169. recommended. The module will be called r8169.
config SIS190
tristate "SiS190 gigabit ethernet support (EXPERIMENTAL)"
depends on PCI && EXPERIMENTAL
---help---
Say Y here if you have a SiS 190 PCI Gigabit Ethernet adapter.
If you want to compile this driver as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read <file:Documentation/modules.txt>. This is
recommended. The module will be called sis190.
config SK98LIN config SK98LIN
tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support" tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support"
depends on PCI depends on PCI
......
...@@ -41,6 +41,7 @@ obj-$(CONFIG_PCNET32) += pcnet32.o mii.o ...@@ -41,6 +41,7 @@ obj-$(CONFIG_PCNET32) += pcnet32.o mii.o
obj-$(CONFIG_EEPRO100) += eepro100.o mii.o obj-$(CONFIG_EEPRO100) += eepro100.o mii.o
obj-$(CONFIG_TLAN) += tlan.o obj-$(CONFIG_TLAN) += tlan.o
obj-$(CONFIG_EPIC100) += epic100.o mii.o obj-$(CONFIG_EPIC100) += epic100.o mii.o
obj-$(CONFIG_SIS190) += sis190.o
obj-$(CONFIG_SIS900) += sis900.o obj-$(CONFIG_SIS900) += sis900.o
obj-$(CONFIG_YELLOWFIN) += yellowfin.o obj-$(CONFIG_YELLOWFIN) += yellowfin.o
obj-$(CONFIG_ACENIC) += acenic.o obj-$(CONFIG_ACENIC) += acenic.o
......
...@@ -25,6 +25,7 @@ obj-$(CONFIG_PCMCIA_SMC91C92) += crc32.o ...@@ -25,6 +25,7 @@ obj-$(CONFIG_PCMCIA_SMC91C92) += crc32.o
obj-$(CONFIG_PCMCIA_XIRTULIP) += crc32.o obj-$(CONFIG_PCMCIA_XIRTULIP) += crc32.o
obj-$(CONFIG_PCNET32) += crc32.o obj-$(CONFIG_PCNET32) += crc32.o
obj-$(CONFIG_SGI_IOC3_ETH) += crc32.o obj-$(CONFIG_SGI_IOC3_ETH) += crc32.o
obj-$(CONFIG_SIS190) += crc32.o
obj-$(CONFIG_SIS900) += crc32.o obj-$(CONFIG_SIS900) += crc32.o
obj-$(CONFIG_SMC9194) += crc32.o obj-$(CONFIG_SMC9194) += crc32.o
obj-$(CONFIG_ADAPTEC_STARFIRE) += crc32.o obj-$(CONFIG_ADAPTEC_STARFIRE) += crc32.o
......
...@@ -97,7 +97,7 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de ...@@ -97,7 +97,7 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de
dev->base_addr = ioaddr; dev->base_addr = ioaddr;
dev->irq = pdev->irq; dev->irq = pdev->irq;
dev->dev_addr[0] = node; dev->dev_addr[0] = node;
lp->card_name = pdev->dev.name; lp->card_name = "PCI COM20020";
lp->card_flags = id->driver_data; lp->card_flags = id->driver_data;
lp->backplane = backplane; lp->backplane = backplane;
lp->clockp = clockp & 7; lp->clockp = clockp & 7;
...@@ -105,7 +105,7 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de ...@@ -105,7 +105,7 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de
lp->timeout = timeout; lp->timeout = timeout;
lp->hw.owner = THIS_MODULE; lp->hw.owner = THIS_MODULE;
if (check_region(ioaddr, ARCNET_TOTAL_SIZE)) { if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "com20020-pci")) {
BUGMSG(D_INIT, "IO region %xh-%xh already allocated.\n", BUGMSG(D_INIT, "IO region %xh-%xh already allocated.\n",
ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1); ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1);
err = -EBUSY; err = -EBUSY;
...@@ -122,6 +122,8 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de ...@@ -122,6 +122,8 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de
goto out_priv; goto out_priv;
} }
release_region(ioaddr, ARCNET_TOTAL_SIZE);
if ((err = com20020_found(dev, SA_SHIRQ)) != 0) if ((err = com20020_found(dev, SA_SHIRQ)) != 0)
goto out_priv; goto out_priv;
......
...@@ -55,7 +55,7 @@ static void com20020_copy_to_card(struct net_device *dev, int bufnum, ...@@ -55,7 +55,7 @@ static void com20020_copy_to_card(struct net_device *dev, int bufnum,
static void com20020_copy_from_card(struct net_device *dev, int bufnum, static void com20020_copy_from_card(struct net_device *dev, int bufnum,
int offset, void *buf, int count); int offset, void *buf, int count);
static void com20020_set_mc_list(struct net_device *dev); static void com20020_set_mc_list(struct net_device *dev);
static void com20020_close(struct net_device *, bool); static void com20020_close(struct net_device *);
static void com20020_copy_from_card(struct net_device *dev, int bufnum, static void com20020_copy_from_card(struct net_device *dev, int bufnum,
int offset, void *buf, int count) int offset, void *buf, int count)
...@@ -86,7 +86,7 @@ static void com20020_copy_to_card(struct net_device *dev, int bufnum, ...@@ -86,7 +86,7 @@ static void com20020_copy_to_card(struct net_device *dev, int bufnum,
/* Reset the card and check some basic stuff during the detection stage. */ /* Reset the card and check some basic stuff during the detection stage. */
int __devinit com20020_check(struct net_device *dev) int com20020_check(struct net_device *dev)
{ {
int ioaddr = dev->base_addr, status; int ioaddr = dev->base_addr, status;
struct arcnet_local *lp = dev->priv; struct arcnet_local *lp = dev->priv;
...@@ -152,7 +152,7 @@ int __devinit com20020_check(struct net_device *dev) ...@@ -152,7 +152,7 @@ int __devinit com20020_check(struct net_device *dev)
/* Set up the struct net_device associated with this card. Called after /* Set up the struct net_device associated with this card. Called after
* probing succeeds. * probing succeeds.
*/ */
int __devinit com20020_found(struct net_device *dev, int shared) int com20020_found(struct net_device *dev, int shared)
{ {
struct arcnet_local *lp; struct arcnet_local *lp;
int ioaddr = dev->base_addr; int ioaddr = dev->base_addr;
...@@ -180,6 +180,10 @@ int __devinit com20020_found(struct net_device *dev, int shared) ...@@ -180,6 +180,10 @@ int __devinit com20020_found(struct net_device *dev, int shared)
if (!dev->dev_addr[0]) if (!dev->dev_addr[0])
dev->dev_addr[0] = inb(ioaddr + 8); /* FIXME: do this some other way! */ dev->dev_addr[0] = inb(ioaddr + 8); /* FIXME: do this some other way! */
/* reserve the I/O region */
if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "arcnet (COM20020)"))
return -EBUSY;
SET_SUBADR(SUB_SETUP1); SET_SUBADR(SUB_SETUP1);
outb(lp->setup, _XREG); outb(lp->setup, _XREG);
...@@ -203,13 +207,10 @@ int __devinit com20020_found(struct net_device *dev, int shared) ...@@ -203,13 +207,10 @@ int __devinit com20020_found(struct net_device *dev, int shared)
if (request_irq(dev->irq, &arcnet_interrupt, shared, if (request_irq(dev->irq, &arcnet_interrupt, shared,
"arcnet (COM20020)", dev)) { "arcnet (COM20020)", dev)) {
BUGMSG(D_NORMAL, "Can't get IRQ %d!\n", dev->irq); BUGMSG(D_NORMAL, "Can't get IRQ %d!\n", dev->irq);
release_region(ioaddr, ARCNET_TOTAL_SIZE);
return -ENODEV; return -ENODEV;
} }
/* reserve the I/O region */
if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "arcnet (COM20020)")) {
free_irq(dev->irq, dev);
return -EBUSY;
}
dev->base_addr = ioaddr; dev->base_addr = ioaddr;
BUGMSG(D_NORMAL, "%s: station %02Xh found at %03lXh, IRQ %d.\n", BUGMSG(D_NORMAL, "%s: station %02Xh found at %03lXh, IRQ %d.\n",
...@@ -226,8 +227,8 @@ int __devinit com20020_found(struct net_device *dev, int shared) ...@@ -226,8 +227,8 @@ int __devinit com20020_found(struct net_device *dev, int shared)
clockrates[3 - ((lp->setup2 & 0xF0) >> 4) + ((lp->setup & 0x0F) >> 1)]); clockrates[3 - ((lp->setup2 & 0xF0) >> 4) + ((lp->setup & 0x0F) >> 1)]);
if (!dev->init && register_netdev(dev)) { if (!dev->init && register_netdev(dev)) {
free_irq(dev->irq, dev);
release_region(ioaddr, ARCNET_TOTAL_SIZE); release_region(ioaddr, ARCNET_TOTAL_SIZE);
free_irq(dev->irq, dev);
return -EIO; return -EIO;
} }
return 0; return 0;
...@@ -298,16 +299,14 @@ static int com20020_status(struct net_device *dev) ...@@ -298,16 +299,14 @@ static int com20020_status(struct net_device *dev)
return ASTATUS(); return ASTATUS();
} }
static void com20020_close(struct net_device *dev, bool open) static void com20020_close(struct net_device *dev)
{ {
struct arcnet_local *lp = (struct arcnet_local *) dev->priv; struct arcnet_local *lp = (struct arcnet_local *) dev->priv;
int ioaddr = dev->base_addr; int ioaddr = dev->base_addr;
if (!open) {
/* disable transmitter */ /* disable transmitter */
lp->config &= ~TXENcfg; lp->config &= ~TXENcfg;
SETCONF; SETCONF;
}
} }
/* Set or clear the multicast filter for this adaptor. /* Set or clear the multicast filter for this adaptor.
...@@ -339,7 +338,7 @@ static void com20020_set_mc_list(struct net_device *dev) ...@@ -339,7 +338,7 @@ static void com20020_set_mc_list(struct net_device *dev)
} }
} }
void __devexit com20020_remove(struct net_device *dev) void com20020_remove(struct net_device *dev)
{ {
unregister_netdev(dev); unregister_netdev(dev);
free_irq(dev->irq, dev); free_irq(dev->irq, dev);
......
...@@ -158,14 +158,14 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -158,14 +158,14 @@ static int __init com90io_probe(struct net_device *dev)
"must specify the base address!\n"); "must specify the base address!\n");
return -ENODEV; return -ENODEV;
} }
if (check_region(ioaddr, ARCNET_TOTAL_SIZE)) { if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "com90io probe")) {
BUGMSG(D_INIT_REASONS, "IO check_region %x-%x failed.\n", BUGMSG(D_INIT_REASONS, "IO check_region %x-%x failed.\n",
ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1); ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1);
return -ENXIO; return -ENXIO;
} }
if (ASTATUS() == 0xFF) { if (ASTATUS() == 0xFF) {
BUGMSG(D_INIT_REASONS, "IO address %x empty\n", ioaddr); BUGMSG(D_INIT_REASONS, "IO address %x empty\n", ioaddr);
return -ENODEV; goto err_out;
} }
inb(_RESET); inb(_RESET);
mdelay(RESETtime); mdelay(RESETtime);
...@@ -174,7 +174,7 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -174,7 +174,7 @@ static int __init com90io_probe(struct net_device *dev)
if ((status & 0x9D) != (NORXflag | RECONflag | TXFREEflag | RESETflag)) { if ((status & 0x9D) != (NORXflag | RECONflag | TXFREEflag | RESETflag)) {
BUGMSG(D_INIT_REASONS, "Status invalid (%Xh).\n", status); BUGMSG(D_INIT_REASONS, "Status invalid (%Xh).\n", status);
return -ENODEV; goto err_out;
} }
BUGMSG(D_INIT_REASONS, "Status after reset: %X\n", status); BUGMSG(D_INIT_REASONS, "Status after reset: %X\n", status);
...@@ -186,7 +186,7 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -186,7 +186,7 @@ static int __init com90io_probe(struct net_device *dev)
if (status & RESETflag) { if (status & RESETflag) {
BUGMSG(D_INIT_REASONS, "Eternal reset (status=%Xh)\n", status); BUGMSG(D_INIT_REASONS, "Eternal reset (status=%Xh)\n", status);
return -ENODEV; goto err_out;
} }
outb((0x16 | IOMAPflag) & ~ENABLE16flag, _CONFIG); outb((0x16 | IOMAPflag) & ~ENABLE16flag, _CONFIG);
...@@ -198,7 +198,7 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -198,7 +198,7 @@ static int __init com90io_probe(struct net_device *dev)
if ((status = inb(_MEMDATA)) != 0xd1) { if ((status = inb(_MEMDATA)) != 0xd1) {
BUGMSG(D_INIT_REASONS, "Signature byte not found" BUGMSG(D_INIT_REASONS, "Signature byte not found"
" (%Xh instead).\n", status); " (%Xh instead).\n", status);
return -ENODEV; goto err_out;
} }
if (!dev->irq) { if (!dev->irq) {
/* /*
...@@ -215,10 +215,15 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -215,10 +215,15 @@ static int __init com90io_probe(struct net_device *dev)
if (dev->irq <= 0) { if (dev->irq <= 0) {
BUGMSG(D_INIT_REASONS, "Autoprobe IRQ failed\n"); BUGMSG(D_INIT_REASONS, "Autoprobe IRQ failed\n");
return -ENODEV; goto err_out;
} }
} }
release_region(ioaddr, ARCNET_TOTAL_SIZE); /* end of probing */
return com90io_found(dev); return com90io_found(dev);
err_out:
release_region(ioaddr, ARCNET_TOTAL_SIZE);
return -ENODEV;
} }
......
...@@ -33,20 +33,8 @@ ...@@ -33,20 +33,8 @@
#include "8390.h" #include "8390.h"
#define NE_BASE (dev->base_addr)
#define NE_CMD (0x00*2)
#define NE_EN0_ISR (0x07*2)
#define NE_EN0_DCFG (0x0e*2) #define NE_EN0_DCFG (0x0e*2)
#define NE_EN0_RSARLO (0x08*2)
#define NE_EN0_RSARHI (0x09*2)
#define NE_EN0_RCNTLO (0x0a*2)
#define NE_EN0_RXCR (0x0c*2)
#define NE_EN0_TXCR (0x0d*2)
#define NE_EN0_RCNTHI (0x0b*2)
#define NE_EN0_IMR (0x0f*2)
#define NESM_START_PG 0x0 /* First page of TX buffer */ #define NESM_START_PG 0x0 /* First page of TX buffer */
#define NESM_STOP_PG 0x40 /* Last page +1 of RX ring */ #define NESM_STOP_PG 0x40 /* Last page +1 of RX ring */
...@@ -56,12 +44,10 @@ ...@@ -56,12 +44,10 @@
#define WORDSWAP(a) ((((a)>>8)&0xff) | ((a)<<8)) #define WORDSWAP(a) ((((a)>>8)&0xff) | ((a)<<8))
#ifdef MODULE
static struct net_device *root_hydra_dev; static struct net_device *root_hydra_dev;
#endif
static int __init hydra_probe(void); static int __init hydra_probe(void);
static int hydra_init(unsigned long board); static int __init hydra_init(unsigned long board);
static int hydra_open(struct net_device *dev); static int hydra_open(struct net_device *dev);
static int hydra_close(struct net_device *dev); static int hydra_close(struct net_device *dev);
static void hydra_reset_8390(struct net_device *dev); static void hydra_reset_8390(struct net_device *dev);
...@@ -96,11 +82,11 @@ static int __init hydra_probe(void) ...@@ -96,11 +82,11 @@ static int __init hydra_probe(void)
return err; return err;
} }
int __init hydra_init(unsigned long board) static int __init hydra_init(unsigned long board)
{ {
struct net_device *dev; struct net_device *dev;
unsigned long ioaddr = board+HYDRA_NIC_BASE; unsigned long ioaddr = board+HYDRA_NIC_BASE;
const char *name = NULL; const char name[] = "NE2000";
int start_page, stop_page; int start_page, stop_page;
int j; int j;
...@@ -136,8 +122,6 @@ int __init hydra_init(unsigned long board) ...@@ -136,8 +122,6 @@ int __init hydra_init(unsigned long board)
return -ENOMEM; return -ENOMEM;
} }
name = "NE2000";
printk("%s: hydra at 0x%08lx, address %02x:%02x:%02x:%02x:%02x:%02x (hydra.c " HYDRA_VERSION ")\n", dev->name, ZTWO_PADDR(board), printk("%s: hydra at 0x%08lx, address %02x:%02x:%02x:%02x:%02x:%02x (hydra.c " HYDRA_VERSION ")\n", dev->name, ZTWO_PADDR(board),
dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
...@@ -235,7 +219,6 @@ static void hydra_block_output(struct net_device *dev, int count, ...@@ -235,7 +219,6 @@ static void hydra_block_output(struct net_device *dev, int count,
static void __exit hydra_cleanup(void) static void __exit hydra_cleanup(void)
{ {
#ifdef MODULE
struct net_device *dev, *next; struct net_device *dev, *next;
while ((dev = root_hydra_dev)) { while ((dev = root_hydra_dev)) {
...@@ -246,7 +229,6 @@ static void __exit hydra_cleanup(void) ...@@ -246,7 +229,6 @@ static void __exit hydra_cleanup(void)
kfree(dev); kfree(dev);
root_hydra_dev = next; root_hydra_dev = next;
} }
#endif
} }
module_init(hydra_probe); module_init(hydra_probe);
......
This diff is collapsed.
...@@ -315,7 +315,7 @@ int __devinit xl_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -315,7 +315,7 @@ int __devinit xl_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->irq=pdev->irq; dev->irq=pdev->irq;
dev->base_addr=pci_resource_start(pdev,0) ; dev->base_addr=pci_resource_start(pdev,0) ;
dev->init=NULL ; /* Must be null with new api, otherwise get called twice */ dev->init=NULL ; /* Must be null with new api, otherwise get called twice */
xl_priv->xl_card_name = (char *)pdev->dev.name ; xl_priv->xl_card_name = pci_name(pdev);
xl_priv->xl_mmio=ioremap(pci_resource_start(pdev,1), XL_IO_SPACE); xl_priv->xl_mmio=ioremap(pci_resource_start(pdev,1), XL_IO_SPACE);
xl_priv->pdev = pdev ; xl_priv->pdev = pdev ;
......
...@@ -230,9 +230,10 @@ static int __devinit olympic_probe(struct pci_dev *pdev, const struct pci_device ...@@ -230,9 +230,10 @@ static int __devinit olympic_probe(struct pci_dev *pdev, const struct pci_device
dev->irq=pdev->irq; dev->irq=pdev->irq;
dev->base_addr=pci_resource_start(pdev, 0); dev->base_addr=pci_resource_start(pdev, 0);
dev->init=NULL; /* Must be NULL otherwise we get called twice */ dev->init=NULL; /* Must be NULL otherwise we get called twice */
olympic_priv->olympic_card_name = (char *)pdev->dev.name ; olympic_priv->olympic_card_name = pci_name(pdev);
olympic_priv->olympic_mmio = ioremap(pci_resource_start(pdev,1),256); olympic_priv->olympic_mmio = ioremap(pci_resource_start(pdev,1),256);
olympic_priv->olympic_lap = ioremap(pci_resource_start(pdev,2),2048); olympic_priv->olympic_lap = ioremap(pci_resource_start(pdev,2),2048);
#warning check ioremap return value
olympic_priv->pdev = pdev ; olympic_priv->pdev = pdev ;
if ((pkt_buf_sz[card_no] < 100) || (pkt_buf_sz[card_no] > 18000) ) if ((pkt_buf_sz[card_no] < 100) || (pkt_buf_sz[card_no] > 18000) )
......
...@@ -226,6 +226,7 @@ static struct pci_device_id tulip_pci_tbl[] = { ...@@ -226,6 +226,7 @@ static struct pci_device_id tulip_pci_tbl[] = {
{ 0x1737, 0xAB09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, { 0x1737, 0xAB09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
{ 0x17B3, 0xAB08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, { 0x17B3, 0xAB08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
{ 0x10b9, 0x5261, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X }, /* ALi 1563 integrated ethernet */ { 0x10b9, 0x5261, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X }, /* ALi 1563 integrated ethernet */
{ 0x10b7, 0x9300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, /* 3Com 3CSOHO100B-TX */
{ } /* terminate list */ { } /* terminate list */
}; };
MODULE_DEVICE_TABLE(pci, tulip_pci_tbl); MODULE_DEVICE_TABLE(pci, tulip_pci_tbl);
......
...@@ -890,12 +890,12 @@ int z8530_sync_dma_open(struct net_device *dev, struct z8530_channel *c) ...@@ -890,12 +890,12 @@ int z8530_sync_dma_open(struct net_device *dev, struct z8530_channel *c)
if(c->mtu > PAGE_SIZE/2) if(c->mtu > PAGE_SIZE/2)
return -EMSGSIZE; return -EMSGSIZE;
c->rx_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA); c->rx_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
if(c->rx_buf[0]==NULL) if(c->rx_buf[0]==NULL)
return -ENOBUFS; return -ENOBUFS;
c->rx_buf[1]=c->rx_buf[0]+PAGE_SIZE/2; c->rx_buf[1]=c->rx_buf[0]+PAGE_SIZE/2;
c->tx_dma_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA); c->tx_dma_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
if(c->tx_dma_buf[0]==NULL) if(c->tx_dma_buf[0]==NULL)
{ {
free_page((unsigned long)c->rx_buf[0]); free_page((unsigned long)c->rx_buf[0]);
...@@ -1080,7 +1080,7 @@ int z8530_sync_txdma_open(struct net_device *dev, struct z8530_channel *c) ...@@ -1080,7 +1080,7 @@ int z8530_sync_txdma_open(struct net_device *dev, struct z8530_channel *c)
if(c->mtu > PAGE_SIZE/2) if(c->mtu > PAGE_SIZE/2)
return -EMSGSIZE; return -EMSGSIZE;
c->tx_dma_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA); c->tx_dma_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
if(c->tx_dma_buf[0]==NULL) if(c->tx_dma_buf[0]==NULL)
return -ENOBUFS; return -ENOBUFS;
......
...@@ -1025,6 +1025,7 @@ struct airo_info { ...@@ -1025,6 +1025,7 @@ struct airo_info {
#define FLAG_802_11 0x200 #define FLAG_802_11 0x200
#define FLAG_PENDING_XMIT 0x400 #define FLAG_PENDING_XMIT 0x400
#define FLAG_PENDING_XMIT11 0x800 #define FLAG_PENDING_XMIT11 0x800
#define FLAG_PCI 0x1000
int (*bap_read)(struct airo_info*, u16 *pu16Dst, int bytelen, int (*bap_read)(struct airo_info*, u16 *pu16Dst, int bytelen,
int whichbap); int whichbap);
unsigned short *flash; unsigned short *flash;
...@@ -4093,6 +4094,7 @@ static int __devinit airo_pci_probe(struct pci_dev *pdev, ...@@ -4093,6 +4094,7 @@ static int __devinit airo_pci_probe(struct pci_dev *pdev,
return -ENODEV; return -ENODEV;
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);
((struct airo_info *)dev->priv)->flags |= FLAG_PCI;
return 0; return 0;
} }
...@@ -4134,11 +4136,19 @@ static int __init airo_init_module( void ) ...@@ -4134,11 +4136,19 @@ static int __init airo_init_module( void )
static void __exit airo_cleanup_module( void ) static void __exit airo_cleanup_module( void )
{ {
int is_pci = 0;
while( airo_devices ) { while( airo_devices ) {
printk( KERN_INFO "airo: Unregistering %s\n", airo_devices->dev->name ); printk( KERN_INFO "airo: Unregistering %s\n", airo_devices->dev->name );
#ifdef CONFIG_PCI
if (((struct airo_info *)airo_devices->dev->priv)->flags & FLAG_PCI)
is_pci = 1;
#endif
stop_airo_card( airo_devices->dev, 1 ); stop_airo_card( airo_devices->dev, 1 );
} }
remove_proc_entry("aironet", proc_root_driver); remove_proc_entry("aironet", proc_root_driver);
if (is_pci)
pci_unregister_driver(&airo_driver);
} }
#ifdef WIRELESS_EXT #ifdef WIRELESS_EXT
...@@ -5612,7 +5622,7 @@ static const struct iw_handler_def airo_handler_def = ...@@ -5612,7 +5622,7 @@ static const struct iw_handler_def airo_handler_def =
.standard = (iw_handler *) airo_handler, .standard = (iw_handler *) airo_handler,
.private = (iw_handler *) airo_private_handler, .private = (iw_handler *) airo_private_handler,
.private_args = (struct iw_priv_args *) airo_private_args, .private_args = (struct iw_priv_args *) airo_private_args,
#if 0 && WIRELESS_EXT > 15 #if WIRELESS_EXT > 15
.spy_offset = ((void *) (&((struct airo_info *) NULL)->spy_data) - .spy_offset = ((void *) (&((struct airo_info *) NULL)->spy_data) -
(void *) NULL), (void *) NULL),
#endif /* WIRELESS_EXT > 15 */ #endif /* WIRELESS_EXT > 15 */
......
...@@ -379,7 +379,6 @@ static struct { ...@@ -379,7 +379,6 @@ static struct {
/* This is strictly temporary, until PCMCIA devices get integrated into the device model. */ /* This is strictly temporary, until PCMCIA devices get integrated into the device model. */
static struct device atmel_device = { static struct device atmel_device = {
.name = "Atmel at76c50x wireless",
.bus_id = "pcmcia", .bus_id = "pcmcia",
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment