diff options
author | Len Brown <len.brown@intel.com> | 2012-04-06 21:48:59 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-04-06 21:48:59 -0400 |
commit | eeaab2d8af2cf1d36d7086f22e9de42d6dd2995c (patch) | |
tree | 369b9c91a6d808944f07d2290fec6f9fe2731904 /drivers/net/tokenring | |
parent | ee01e663373343c63e0e3d364d09f6155378dbcc (diff) | |
parent | aaef292acf3a78d9c0bb6fb72226077d286b45d7 (diff) |
Merge branches 'idle-fix' and 'misc' into release
Diffstat (limited to 'drivers/net/tokenring')
-rw-r--r-- | drivers/net/tokenring/3c359.c | 5 | ||||
-rw-r--r-- | drivers/net/tokenring/abyss.c | 1 | ||||
-rw-r--r-- | drivers/net/tokenring/ibmtr_cs.c | 1 | ||||
-rw-r--r-- | drivers/net/tokenring/lanstreamer.c | 1 | ||||
-rw-r--r-- | drivers/net/tokenring/madgemc.c | 2 | ||||
-rw-r--r-- | drivers/net/tokenring/olympic.c | 1 | ||||
-rw-r--r-- | drivers/net/tokenring/proteon.c | 1 | ||||
-rw-r--r-- | drivers/net/tokenring/skisa.c | 1 | ||||
-rw-r--r-- | drivers/net/tokenring/smctr.c | 1 | ||||
-rw-r--r-- | drivers/net/tokenring/tms380tr.c | 180 | ||||
-rw-r--r-- | drivers/net/tokenring/tmspci.c | 1 |
11 files changed, 67 insertions, 128 deletions
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index ef9fdf3652f..b15ac81d46f 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c @@ -68,7 +68,6 @@ #include <net/checksum.h> #include <asm/io.h> -#include <asm/system.h> #include "3c359.h" @@ -674,15 +673,11 @@ static int xl_open(struct net_device *dev) /* These MUST be on 8 byte boundaries */ xl_priv->xl_tx_ring = kzalloc((sizeof(struct xl_tx_desc) * XL_TX_RING_SIZE) + 7, GFP_DMA | GFP_KERNEL); if (xl_priv->xl_tx_ring == NULL) { - printk(KERN_WARNING "%s: Not enough memory to allocate tx buffers.\n", - dev->name); free_irq(dev->irq,dev); return -ENOMEM; } xl_priv->xl_rx_ring = kzalloc((sizeof(struct xl_rx_desc) * XL_RX_RING_SIZE) +7, GFP_DMA | GFP_KERNEL); if (xl_priv->xl_rx_ring == NULL) { - printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers.\n", - dev->name); free_irq(dev->irq,dev); kfree(xl_priv->xl_tx_ring); return -ENOMEM; diff --git a/drivers/net/tokenring/abyss.c b/drivers/net/tokenring/abyss.c index 515f122777a..b715e6b444d 100644 --- a/drivers/net/tokenring/abyss.c +++ b/drivers/net/tokenring/abyss.c @@ -33,7 +33,6 @@ #include <linux/netdevice.h> #include <linux/trdevice.h> -#include <asm/system.h> #include <asm/io.h> #include <asm/irq.h> diff --git a/drivers/net/tokenring/ibmtr_cs.c b/drivers/net/tokenring/ibmtr_cs.c index 91b684630fc..356e28e4881 100644 --- a/drivers/net/tokenring/ibmtr_cs.c +++ b/drivers/net/tokenring/ibmtr_cs.c @@ -63,7 +63,6 @@ #include <asm/uaccess.h> #include <asm/io.h> -#include <asm/system.h> #define PCMCIA #include "ibmtr.c" diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index 8d71e0d2906..3e4b4f09111 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c @@ -127,7 +127,6 @@ #include <net/checksum.h> #include <asm/io.h> -#include <asm/system.h> #include "lanstreamer.h" diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c index 6153cfd696b..28adcdf3b14 100644 --- a/drivers/net/tokenring/madgemc.c +++ b/drivers/net/tokenring/madgemc.c @@ -28,7 +28,6 @@ static const char version[] = "madgemc.c: v0.91 23/01/2000 by Adam Fritzler\n"; #include <linux/netdevice.h> #include <linux/trdevice.h> -#include <asm/system.h> #include <asm/io.h> #include <asm/irq.h> @@ -171,7 +170,6 @@ static int __devinit madgemc_probe(struct device *device) card = kmalloc(sizeof(struct card_info), GFP_KERNEL); if (card==NULL) { - printk("madgemc: unable to allocate card struct\n"); ret = -ENOMEM; goto getout1; } diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c index fd8dce90c95..0e234741cc7 100644 --- a/drivers/net/tokenring/olympic.c +++ b/drivers/net/tokenring/olympic.c @@ -106,7 +106,6 @@ #include <net/net_namespace.h> #include <asm/io.h> -#include <asm/system.h> #include "olympic.h" diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c index 8d362e64a40..62d90e40f9e 100644 --- a/drivers/net/tokenring/proteon.c +++ b/drivers/net/tokenring/proteon.c @@ -31,7 +31,6 @@ static const char version[] = "proteon.c: v1.00 02/01/2003 by Jochen Friedrich\n #include <linux/trdevice.h> #include <linux/platform_device.h> -#include <asm/system.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/pci.h> diff --git a/drivers/net/tokenring/skisa.c b/drivers/net/tokenring/skisa.c index 46db5c5395b..ee11e93dc30 100644 --- a/drivers/net/tokenring/skisa.c +++ b/drivers/net/tokenring/skisa.c @@ -38,7 +38,6 @@ static const char version[] = "skisa.c: v1.03 09/12/2002 by Jochen Friedrich\n"; #include <linux/trdevice.h> #include <linux/platform_device.h> -#include <asm/system.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/pci.h> diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index 029846a9863..cb35fb79e01 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c @@ -49,7 +49,6 @@ #include <linux/bitops.h> #include <linux/firmware.h> -#include <asm/system.h> #include <asm/io.h> #include <asm/dma.h> #include <asm/irq.h> diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c index 65e9cf3a71f..be4813e0366 100644 --- a/drivers/net/tokenring/tms380tr.c +++ b/drivers/net/tokenring/tms380tr.c @@ -98,7 +98,6 @@ static const char version[] = "tms380tr.c: v1.10 30/12/2002 by Christoph Goos, A #include <linux/firmware.h> #include <linux/bitops.h> -#include <asm/system.h> #include <asm/io.h> #include <asm/dma.h> #include <asm/irq.h> @@ -1525,10 +1524,8 @@ static void tms380tr_chk_outstanding_cmds(struct net_device *dev) /* Check if adapter is opened, avoiding COMMAND_REJECT * interrupt by the adapter! */ - if(tp->AdapterOpenFlag == 0) - { - if(tp->CMDqueue & OC_OPEN) - { + if (tp->AdapterOpenFlag == 0) { + if (tp->CMDqueue & OC_OPEN) { /* Execute OPEN command */ tp->CMDqueue ^= OC_OPEN; @@ -1536,21 +1533,17 @@ static void tms380tr_chk_outstanding_cmds(struct net_device *dev) tp->scb.Parm[0] = LOWORD(Addr); tp->scb.Parm[1] = HIWORD(Addr); tp->scb.CMD = OPEN; - } - else + } else /* No OPEN command queued, but adapter closed. Note: * We'll try to re-open the adapter in DriverPoll() */ return; /* No adapter command issued */ - } - else - { + } else { /* Adapter is open; evaluate command queue: try to execute * outstanding commands (depending on priority!) CLOSE * command queued */ - if(tp->CMDqueue & OC_CLOSE) - { + if (tp->CMDqueue & OC_CLOSE) { tp->CMDqueue ^= OC_CLOSE; tp->AdapterOpenFlag = 0; tp->scb.Parm[0] = 0; /* Parm[0], Parm[1] are ignored */ @@ -1560,109 +1553,70 @@ static void tms380tr_chk_outstanding_cmds(struct net_device *dev) tp->CMDqueue |= OC_OPEN; /* re-open adapter */ else tp->CMDqueue = 0; /* no more commands */ - } - else - { - if(tp->CMDqueue & OC_RECEIVE) - { - tp->CMDqueue ^= OC_RECEIVE; - Addr = htonl(((char *)tp->RplHead - (char *)tp) + tp->dmabuffer); - tp->scb.Parm[0] = LOWORD(Addr); - tp->scb.Parm[1] = HIWORD(Addr); - tp->scb.CMD = RECEIVE; - } - else - { - if(tp->CMDqueue & OC_TRANSMIT_HALT) - { - /* NOTE: TRANSMIT.HALT must be checked - * before TRANSMIT. - */ - tp->CMDqueue ^= OC_TRANSMIT_HALT; - tp->scb.CMD = TRANSMIT_HALT; - - /* Parm[0] and Parm[1] are ignored - * but should be set to zero! - */ - tp->scb.Parm[0] = 0; - tp->scb.Parm[1] = 0; - } - else - { - if(tp->CMDqueue & OC_TRANSMIT) - { - /* NOTE: TRANSMIT must be - * checked after TRANSMIT.HALT - */ - if(tp->TransmitCommandActive) - { - if(!tp->TransmitHaltScheduled) - { - tp->TransmitHaltScheduled = 1; - tms380tr_exec_cmd(dev, OC_TRANSMIT_HALT) ; - } - tp->TransmitCommandActive = 0; - return; - } - - tp->CMDqueue ^= OC_TRANSMIT; - tms380tr_cancel_tx_queue(tp); - Addr = htonl(((char *)tp->TplBusy - (char *)tp) + tp->dmabuffer); - tp->scb.Parm[0] = LOWORD(Addr); - tp->scb.Parm[1] = HIWORD(Addr); - tp->scb.CMD = TRANSMIT; - tp->TransmitCommandActive = 1; - } - else - { - if(tp->CMDqueue & OC_MODIFY_OPEN_PARMS) - { - tp->CMDqueue ^= OC_MODIFY_OPEN_PARMS; - tp->scb.Parm[0] = tp->ocpl.OPENOptions; /* new OPEN options*/ - tp->scb.Parm[0] |= ENABLE_FULL_DUPLEX_SELECTION; - tp->scb.Parm[1] = 0; /* is ignored but should be zero */ - tp->scb.CMD = MODIFY_OPEN_PARMS; - } - else - { - if(tp->CMDqueue & OC_SET_FUNCT_ADDR) - { - tp->CMDqueue ^= OC_SET_FUNCT_ADDR; - tp->scb.Parm[0] = LOWORD(tp->ocpl.FunctAddr); - tp->scb.Parm[1] = HIWORD(tp->ocpl.FunctAddr); - tp->scb.CMD = SET_FUNCT_ADDR; - } - else - { - if(tp->CMDqueue & OC_SET_GROUP_ADDR) - { - tp->CMDqueue ^= OC_SET_GROUP_ADDR; - tp->scb.Parm[0] = LOWORD(tp->ocpl.GroupAddr); - tp->scb.Parm[1] = HIWORD(tp->ocpl.GroupAddr); - tp->scb.CMD = SET_GROUP_ADDR; - } - else - { - if(tp->CMDqueue & OC_READ_ERROR_LOG) - { - tp->CMDqueue ^= OC_READ_ERROR_LOG; - Addr = htonl(((char *)&tp->errorlogtable - (char *)tp) + tp->dmabuffer); - tp->scb.Parm[0] = LOWORD(Addr); - tp->scb.Parm[1] = HIWORD(Addr); - tp->scb.CMD = READ_ERROR_LOG; - } - else - { - printk(KERN_WARNING "CheckForOutstandingCommand: unknown Command\n"); - tp->CMDqueue = 0; - return; - } - } - } - } - } + } else if (tp->CMDqueue & OC_RECEIVE) { + tp->CMDqueue ^= OC_RECEIVE; + Addr = htonl(((char *)tp->RplHead - (char *)tp) + tp->dmabuffer); + tp->scb.Parm[0] = LOWORD(Addr); + tp->scb.Parm[1] = HIWORD(Addr); + tp->scb.CMD = RECEIVE; + } else if (tp->CMDqueue & OC_TRANSMIT_HALT) { + /* NOTE: TRANSMIT.HALT must be checked + * before TRANSMIT. + */ + tp->CMDqueue ^= OC_TRANSMIT_HALT; + tp->scb.CMD = TRANSMIT_HALT; + + /* Parm[0] and Parm[1] are ignored + * but should be set to zero! + */ + tp->scb.Parm[0] = 0; + tp->scb.Parm[1] = 0; + } else if (tp->CMDqueue & OC_TRANSMIT) { + /* NOTE: TRANSMIT must be + * checked after TRANSMIT.HALT + */ + if (tp->TransmitCommandActive) { + if (!tp->TransmitHaltScheduled) { + tp->TransmitHaltScheduled = 1; + tms380tr_exec_cmd(dev, OC_TRANSMIT_HALT); } + tp->TransmitCommandActive = 0; + return; } + + tp->CMDqueue ^= OC_TRANSMIT; + tms380tr_cancel_tx_queue(tp); + Addr = htonl(((char *)tp->TplBusy - (char *)tp) + tp->dmabuffer); + tp->scb.Parm[0] = LOWORD(Addr); + tp->scb.Parm[1] = HIWORD(Addr); + tp->scb.CMD = TRANSMIT; + tp->TransmitCommandActive = 1; + } else if (tp->CMDqueue & OC_MODIFY_OPEN_PARMS) { + tp->CMDqueue ^= OC_MODIFY_OPEN_PARMS; + tp->scb.Parm[0] = tp->ocpl.OPENOptions; /* new OPEN options*/ + tp->scb.Parm[0] |= ENABLE_FULL_DUPLEX_SELECTION; + tp->scb.Parm[1] = 0; /* is ignored but should be zero */ + tp->scb.CMD = MODIFY_OPEN_PARMS; + } else if (tp->CMDqueue & OC_SET_FUNCT_ADDR) { + tp->CMDqueue ^= OC_SET_FUNCT_ADDR; + tp->scb.Parm[0] = LOWORD(tp->ocpl.FunctAddr); + tp->scb.Parm[1] = HIWORD(tp->ocpl.FunctAddr); + tp->scb.CMD = SET_FUNCT_ADDR; + } else if (tp->CMDqueue & OC_SET_GROUP_ADDR) { + tp->CMDqueue ^= OC_SET_GROUP_ADDR; + tp->scb.Parm[0] = LOWORD(tp->ocpl.GroupAddr); + tp->scb.Parm[1] = HIWORD(tp->ocpl.GroupAddr); + tp->scb.CMD = SET_GROUP_ADDR; + } else if (tp->CMDqueue & OC_READ_ERROR_LOG) { + tp->CMDqueue ^= OC_READ_ERROR_LOG; + Addr = htonl(((char *)&tp->errorlogtable - (char *)tp) + tp->dmabuffer); + tp->scb.Parm[0] = LOWORD(Addr); + tp->scb.Parm[1] = HIWORD(Addr); + tp->scb.CMD = READ_ERROR_LOG; + } else { + printk(KERN_WARNING "CheckForOutstandingCommand: unknown Command\n"); + tp->CMDqueue = 0; + return; } } diff --git a/drivers/net/tokenring/tmspci.c b/drivers/net/tokenring/tmspci.c index d3e788a9cd1..fb9918da579 100644 --- a/drivers/net/tokenring/tmspci.c +++ b/drivers/net/tokenring/tmspci.c @@ -34,7 +34,6 @@ #include <linux/netdevice.h> #include <linux/trdevice.h> -#include <asm/system.h> #include <asm/io.h> #include <asm/irq.h> |