[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1207222255480.31033@swampdragon.chaosbits.net>
Date: Sun, 22 Jul 2012 22:57:20 +0200 (CEST)
From: Jesper Juhl <jj@...osbits.net>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Lior Dotan <liodot@...il.com>,
Christopher Harrer <charrer@...critech.com>
Subject: [PATCH 2/2] Staging: slicoss: Clean up spaces vs tabs in slicoss.c
Make it match CodingStyle a bit better, space/tab wise.
Signed-off-by: Jesper Juhl <jj@...osbits.net>
---
drivers/staging/slicoss/slicoss.c | 809 +++++++++++++++++++-------------------
1 file changed, 397 insertions(+), 412 deletions(-)
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 77a0751..b19bded 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -59,9 +59,9 @@
#define DEBUG_MICROCODE 1
#define DBG 1
#define SLIC_INTERRUPT_PROCESS_LIMIT 1
-#define SLIC_OFFLOAD_IP_CHECKSUM 1
-#define STATS_TIMER_INTERVAL 2
-#define PING_TIMER_INTERVAL 1
+#define SLIC_OFFLOAD_IP_CHECKSUM 1
+#define STATS_TIMER_INTERVAL 2
+#define PING_TIMER_INTERVAL 1
#include <linux/kernel.h>
#include <linux/string.h>
@@ -116,14 +116,14 @@ static u32 dynamic_intagg;
static unsigned int rcv_count;
static struct dentry *slic_debugfs;
-#define DRV_NAME "slicoss"
-#define DRV_VERSION "2.0.1"
-#define DRV_AUTHOR "Alacritech, Inc. Engineering"
-#define DRV_DESCRIPTION "Alacritech SLIC Techonology(tm) "\
- "Non-Accelerated Driver"
-#define DRV_COPYRIGHT "Copyright 2000-2006 Alacritech, Inc. "\
- "All rights reserved."
-#define PFX DRV_NAME " "
+#define DRV_NAME "slicoss"
+#define DRV_VERSION "2.0.1"
+#define DRV_AUTHOR "Alacritech, Inc. Engineering"
+#define DRV_DESCRIPTION "Alacritech SLIC Techonology(tm) "\
+ "Non-Accelerated Driver"
+#define DRV_COPYRIGHT "Copyright 2000-2006 Alacritech, Inc. "\
+ "All rights reserved."
+#define PFX DRV_NAME " "
MODULE_AUTHOR(DRV_AUTHOR);
MODULE_DESCRIPTION(DRV_DESCRIPTION);
@@ -154,7 +154,7 @@ static void slic_assert_fail(void)
curr_pid = current->pid;
printk(KERN_ERR "%s CPU # %d ---- PID # %d\n",
- __func__, cpuid, curr_pid);
+ __func__, cpuid, curr_pid);
}
#ifndef ASSERT
@@ -167,29 +167,28 @@ static void slic_assert_fail(void)
} while (0)
#endif
-
-#define SLIC_GET_SLIC_HANDLE(_adapter, _pslic_handle) \
-{ \
- spin_lock_irqsave(&_adapter->handle_lock.lock, \
- _adapter->handle_lock.flags); \
- _pslic_handle = _adapter->pfree_slic_handles; \
- if (_pslic_handle) { \
- ASSERT(_pslic_handle->type == SLIC_HANDLE_FREE); \
- _adapter->pfree_slic_handles = _pslic_handle->next; \
- } \
- spin_unlock_irqrestore(&_adapter->handle_lock.lock, \
- _adapter->handle_lock.flags); \
+#define SLIC_GET_SLIC_HANDLE(_adapter, _pslic_handle) \
+{ \
+ spin_lock_irqsave(&_adapter->handle_lock.lock, \
+ _adapter->handle_lock.flags); \
+ _pslic_handle = _adapter->pfree_slic_handles; \
+ if (_pslic_handle) { \
+ ASSERT(_pslic_handle->type == SLIC_HANDLE_FREE); \
+ _adapter->pfree_slic_handles = _pslic_handle->next; \
+ } \
+ spin_unlock_irqrestore(&_adapter->handle_lock.lock, \
+ _adapter->handle_lock.flags); \
}
#define SLIC_FREE_SLIC_HANDLE(_adapter, _pslic_handle) \
{ \
- _pslic_handle->type = SLIC_HANDLE_FREE; \
- spin_lock_irqsave(&_adapter->handle_lock.lock, \
- _adapter->handle_lock.flags); \
- _pslic_handle->next = _adapter->pfree_slic_handles; \
- _adapter->pfree_slic_handles = _pslic_handle; \
- spin_unlock_irqrestore(&_adapter->handle_lock.lock, \
- _adapter->handle_lock.flags); \
+ _pslic_handle->type = SLIC_HANDLE_FREE; \
+ spin_lock_irqsave(&_adapter->handle_lock.lock, \
+ _adapter->handle_lock.flags); \
+ _pslic_handle->next = _adapter->pfree_slic_handles; \
+ _adapter->pfree_slic_handles = _pslic_handle; \
+ spin_unlock_irqrestore(&_adapter->handle_lock.lock, \
+ _adapter->handle_lock.flags); \
}
static inline void slic_reg32_write(void __iomem *reg, u32 value, bool flush)
@@ -204,7 +203,7 @@ static inline void slic_reg64_write(struct adapter *adapter, void __iomem *reg,
bool flush)
{
spin_lock_irqsave(&adapter->bit64reglock.lock,
- adapter->bit64reglock.flags);
+ adapter->bit64reglock.flags);
if (paddrh != adapter->curaddrupper) {
adapter->curaddrupper = paddrh;
writel(paddrh, regh);
@@ -213,7 +212,7 @@ static inline void slic_reg64_write(struct adapter *adapter, void __iomem *reg,
if (flush)
mb();
spin_unlock_irqrestore(&adapter->bit64reglock.lock,
- adapter->bit64reglock.flags);
+ adapter->bit64reglock.flags);
}
/*
@@ -237,9 +236,9 @@ static u32 slic_crc_init; /* Is table initialized */
static void slic_mcast_init_crc32(void)
{
u32 c; /* CRC shit reg */
- u32 e = 0; /* Poly X-or pattern */
- int i; /* counter */
- int k; /* byte being shifted into crc */
+ u32 e = 0; /* Poly X-or pattern */
+ int i; /* counter */
+ int k; /* byte being shifted into crc */
static int p[] = { 0, 1, 2, 4, 5, 7, 8, 10, 11, 12, 16, 22, 23, 26 };
@@ -307,8 +306,7 @@ static void slic_mcast_set_mask(struct adapter *adapter)
* configuration.
*/
slic_reg32_write(&slic_regs->slic_mcastlow, 0xFFFFFFFF, FLUSH);
- slic_reg32_write(&slic_regs->slic_mcasthigh, 0xFFFFFFFF,
- FLUSH);
+ slic_reg32_write(&slic_regs->slic_mcasthigh, 0xFFFFFFFF, FLUSH);
} else {
/* Commit our multicast mast to the SLIC by writing to the
* multicast address mask registers
@@ -408,7 +406,6 @@ static void slic_link_config(struct adapter *adapter,
slic_reg32_write(wphy, phy_config, FLUSH);
}
} else { /* copper gigabit */
-
/* Auto-Negotiate or 1000 Mb must be auto negotiated
* We've got a copper gigabit interface, and
* register 4 is different in copper mode than
@@ -688,16 +685,16 @@ static void slic_adapter_set_hwaddr(struct adapter *adapter)
if ((adapter->card) && (card->config_set)) {
memcpy(adapter->macaddr,
- card->config.MacInfo[adapter->functionnumber].macaddrA,
- sizeof(struct slic_config_mac));
+ card->config.MacInfo[adapter->functionnumber].macaddrA,
+ sizeof(struct slic_config_mac));
if (!(adapter->currmacaddr[0] || adapter->currmacaddr[1] ||
- adapter->currmacaddr[2] || adapter->currmacaddr[3] ||
- adapter->currmacaddr[4] || adapter->currmacaddr[5])) {
+ adapter->currmacaddr[2] || adapter->currmacaddr[3] ||
+ adapter->currmacaddr[4] || adapter->currmacaddr[5])) {
memcpy(adapter->currmacaddr, adapter->macaddr, 6);
}
if (adapter->netdev) {
memcpy(adapter->netdev->dev_addr, adapter->currmacaddr,
- 6);
+ 6);
}
}
}
@@ -716,7 +713,7 @@ static void slic_soft_reset(struct adapter *adapter)
}
slic_reg32_write(&adapter->slic_regs->slic_reset, SLIC_RESET_MAGIC,
- FLUSH);
+ FLUSH);
mdelay(1);
}
@@ -732,7 +729,7 @@ static void slic_mac_address_config(struct adapter *adapter)
slic_reg32_write(&slic_regs->slic_wraddrbl, value, FLUSH);
value2 = (u32) ((adapter->currmacaddr[0] << 8 |
- adapter->currmacaddr[1]) & 0xFFFF);
+ adapter->currmacaddr[1]) & 0xFFFF);
slic_reg32_write(&slic_regs->slic_wraddrah, value2, FLUSH);
slic_reg32_write(&slic_regs->slic_wraddrbh, value2, FLUSH);
@@ -939,7 +936,7 @@ static void slic_timer_load_check(ulong cardaddr)
intagg = &adapter->slic_regs->slic_intagg;
if ((adapter) && (adapter->state == ADAPT_UP) &&
- (card->state == CARD_UP) && (slic_global.dynamic_intagg)) {
+ (card->state == CARD_UP) && (slic_global.dynamic_intagg)) {
if (adapter->devid == SLIC_1GB_DEVICE_ID) {
if (adapter->linkspeed == LINK_1000MB)
level = 100;
@@ -1021,11 +1018,11 @@ static void slic_upr_start(struct adapter *adapter)
{
struct slic_upr *upr;
__iomem struct slic_regs *slic_regs = adapter->slic_regs;
-/*
- char * ptr1;
- char * ptr2;
- uint cmdoffset;
-*/
+ /*
+ char * ptr1;
+ char * ptr2;
+ uint cmdoffset;
+ */
upr = adapter->upr_list;
if (!upr)
return;
@@ -1037,25 +1034,23 @@ static void slic_upr_start(struct adapter *adapter)
case SLIC_UPR_STATS:
if (upr->upr_data_h == 0) {
slic_reg32_write(&slic_regs->slic_stats, upr->upr_data,
- FLUSH);
+ FLUSH);
} else {
slic_reg64_write(adapter, &slic_regs->slic_stats64,
- upr->upr_data,
- &slic_regs->slic_addr_upper,
- upr->upr_data_h, FLUSH);
+ upr->upr_data,
+ &slic_regs->slic_addr_upper,
+ upr->upr_data_h, FLUSH);
}
break;
-
case SLIC_UPR_RLSR:
slic_reg64_write(adapter, &slic_regs->slic_rlsr, upr->upr_data,
- &slic_regs->slic_addr_upper, upr->upr_data_h,
- FLUSH);
+ &slic_regs->slic_addr_upper, upr->upr_data_h,
+ FLUSH);
break;
-
case SLIC_UPR_RCONFIG:
slic_reg64_write(adapter, &slic_regs->slic_rconfig,
- upr->upr_data, &slic_regs->slic_addr_upper,
- upr->upr_data_h, FLUSH);
+ upr->upr_data, &slic_regs->slic_addr_upper,
+ upr->upr_data_h, FLUSH);
break;
case SLIC_UPR_PING:
slic_reg32_write(&slic_regs->slic_ping, 1, FLUSH);
@@ -1137,9 +1132,9 @@ static void slic_link_upr_complete(struct adapter *adapter, u32 isr)
/* link up event, but nothing has changed */
if ((adapter->linkstate == LINK_UP) &&
- (linkup == LINK_UP) &&
- (adapter->linkspeed == linkspeed) &&
- (adapter->linkduplex == linkduplex))
+ (linkup == LINK_UP) &&
+ (adapter->linkspeed == linkspeed) &&
+ (adapter->linkduplex == linkduplex))
return;
/* link has changed at this point */
@@ -1172,7 +1167,7 @@ static void slic_upr_request_complete(struct adapter *adapter, u32 isr)
if (!upr) {
ASSERT(0);
spin_unlock_irqrestore(&adapter->upr_lock.lock,
- adapter->upr_lock.flags);
+ adapter->upr_lock.flags);
return;
}
adapter->upr_list = upr->next;
@@ -1181,80 +1176,80 @@ static void slic_upr_request_complete(struct adapter *adapter, u32 isr)
ASSERT(adapter->port == upr->adapter);
switch (upr->upr_request) {
case SLIC_UPR_STATS:
- {
- struct slic_stats *slicstats =
- (struct slic_stats *) &adapter->pshmem->inicstats;
- struct slic_stats *newstats = slicstats;
- struct slic_stats *old = &adapter->inicstats_prev;
- struct slicnet_stats *stst = &adapter->slic_stats;
+ {
+ struct slic_stats *slicstats =
+ (struct slic_stats *) &adapter->pshmem->inicstats;
+ struct slic_stats *newstats = slicstats;
+ struct slic_stats *old = &adapter->inicstats_prev;
+ struct slicnet_stats *stst = &adapter->slic_stats;
+
+ if (isr & ISR_UPCERR) {
+ dev_err(&adapter->netdev->dev,
+ "SLIC_UPR_STATS command failed isr[%x]\n",
+ isr);
- if (isr & ISR_UPCERR) {
- dev_err(&adapter->netdev->dev,
- "SLIC_UPR_STATS command failed isr[%x]\n",
- isr);
+ break;
+ }
+ UPDATE_STATS_GB(stst->tcp.xmit_tcp_segs,
+ newstats->xmit_tcp_segs_gb,
+ old->xmit_tcp_segs_gb);
- break;
- }
- UPDATE_STATS_GB(stst->tcp.xmit_tcp_segs,
- newstats->xmit_tcp_segs_gb,
- old->xmit_tcp_segs_gb);
+ UPDATE_STATS_GB(stst->tcp.xmit_tcp_bytes,
+ newstats->xmit_tcp_bytes_gb,
+ old->xmit_tcp_bytes_gb);
- UPDATE_STATS_GB(stst->tcp.xmit_tcp_bytes,
- newstats->xmit_tcp_bytes_gb,
- old->xmit_tcp_bytes_gb);
+ UPDATE_STATS_GB(stst->tcp.rcv_tcp_segs,
+ newstats->rcv_tcp_segs_gb,
+ old->rcv_tcp_segs_gb);
- UPDATE_STATS_GB(stst->tcp.rcv_tcp_segs,
- newstats->rcv_tcp_segs_gb,
- old->rcv_tcp_segs_gb);
+ UPDATE_STATS_GB(stst->tcp.rcv_tcp_bytes,
+ newstats->rcv_tcp_bytes_gb,
+ old->rcv_tcp_bytes_gb);
- UPDATE_STATS_GB(stst->tcp.rcv_tcp_bytes,
- newstats->rcv_tcp_bytes_gb,
- old->rcv_tcp_bytes_gb);
+ UPDATE_STATS_GB(stst->iface.xmt_bytes,
+ newstats->xmit_bytes_gb,
+ old->xmit_bytes_gb);
- UPDATE_STATS_GB(stst->iface.xmt_bytes,
- newstats->xmit_bytes_gb,
- old->xmit_bytes_gb);
+ UPDATE_STATS_GB(stst->iface.xmt_ucast,
+ newstats->xmit_unicasts_gb,
+ old->xmit_unicasts_gb);
- UPDATE_STATS_GB(stst->iface.xmt_ucast,
- newstats->xmit_unicasts_gb,
- old->xmit_unicasts_gb);
+ UPDATE_STATS_GB(stst->iface.rcv_bytes,
+ newstats->rcv_bytes_gb,
+ old->rcv_bytes_gb);
- UPDATE_STATS_GB(stst->iface.rcv_bytes,
- newstats->rcv_bytes_gb,
- old->rcv_bytes_gb);
+ UPDATE_STATS_GB(stst->iface.rcv_ucast,
+ newstats->rcv_unicasts_gb,
+ old->rcv_unicasts_gb);
- UPDATE_STATS_GB(stst->iface.rcv_ucast,
- newstats->rcv_unicasts_gb,
- old->rcv_unicasts_gb);
+ UPDATE_STATS_GB(stst->iface.xmt_errors,
+ newstats->xmit_collisions_gb,
+ old->xmit_collisions_gb);
- UPDATE_STATS_GB(stst->iface.xmt_errors,
- newstats->xmit_collisions_gb,
- old->xmit_collisions_gb);
+ UPDATE_STATS_GB(stst->iface.xmt_errors,
+ newstats->xmit_excess_collisions_gb,
+ old->xmit_excess_collisions_gb);
- UPDATE_STATS_GB(stst->iface.xmt_errors,
- newstats->xmit_excess_collisions_gb,
- old->xmit_excess_collisions_gb);
+ UPDATE_STATS_GB(stst->iface.xmt_errors,
+ newstats->xmit_other_error_gb,
+ old->xmit_other_error_gb);
- UPDATE_STATS_GB(stst->iface.xmt_errors,
- newstats->xmit_other_error_gb,
- old->xmit_other_error_gb);
+ UPDATE_STATS_GB(stst->iface.rcv_errors,
+ newstats->rcv_other_error_gb,
+ old->rcv_other_error_gb);
- UPDATE_STATS_GB(stst->iface.rcv_errors,
- newstats->rcv_other_error_gb,
- old->rcv_other_error_gb);
+ UPDATE_STATS_GB(stst->iface.rcv_discards,
+ newstats->rcv_drops_gb,
+ old->rcv_drops_gb);
- UPDATE_STATS_GB(stst->iface.rcv_discards,
- newstats->rcv_drops_gb,
+ if (newstats->rcv_drops_gb > old->rcv_drops_gb) {
+ adapter->rcv_drops +=
+ (newstats->rcv_drops_gb -
old->rcv_drops_gb);
-
- if (newstats->rcv_drops_gb > old->rcv_drops_gb) {
- adapter->rcv_drops +=
- (newstats->rcv_drops_gb -
- old->rcv_drops_gb);
- }
- memcpy(old, newstats, sizeof(struct slic_stats));
- break;
}
+ memcpy(old, newstats, sizeof(struct slic_stats));
+ break;
+ }
case SLIC_UPR_RLSR:
slic_link_upr_complete(adapter, isr);
break;
@@ -1281,17 +1276,16 @@ static void slic_upr_request_complete(struct adapter *adapter, u32 isr)
kfree(upr);
slic_upr_start(adapter);
spin_unlock_irqrestore(&adapter->upr_lock.lock,
- adapter->upr_lock.flags);
+ adapter->upr_lock.flags);
}
-static void slic_config_get(struct adapter *adapter, u32 config,
- u32 config_h)
+static void slic_config_get(struct adapter *adapter, u32 config, u32 config_h)
{
int status;
status = slic_upr_request(adapter,
- SLIC_UPR_RCONFIG,
- (u32) config, (u32) config_h, 0, 0);
+ SLIC_UPR_RCONFIG,
+ (u32) config, (u32) config_h, 0, 0);
ASSERT(status == 0);
}
@@ -1302,7 +1296,7 @@ static void slic_config_get(struct adapter *adapter, u32 config,
*/
static ushort slic_eeprom_cksum(char *m, int len)
{
-#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x)
+#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x)
#define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; ADDCARRY(sum);\
}
@@ -1601,8 +1595,8 @@ static void slic_cmdq_addcmdpage(struct adapter *adapter, u32 *page)
if (pslic_handle == NULL)
ASSERT(0);
ASSERT(pslic_handle ==
- &adapter->slic_handles[pslic_handle->token.
- handle_index]);
+ &adapter->slic_handles[pslic_handle->token.
+ handle_index]);
pslic_handle->type = SLIC_HANDLE_CMD;
pslic_handle->address = (void *) cmd;
pslic_handle->offset = (ushort) adapter->slic_handle_ix++;
@@ -1708,9 +1702,9 @@ static void slic_cmdq_reset(struct adapter *adapter)
adapter->cmdq_free.count, adapter->cmdq_all.count);
}
spin_unlock_irqrestore(&adapter->cmdq_done.lock.lock,
- adapter->cmdq_done.lock.flags);
+ adapter->cmdq_done.lock.flags);
spin_unlock_irqrestore(&adapter->cmdq_free.lock.lock,
- adapter->cmdq_free.lock.flags);
+ adapter->cmdq_free.lock.flags);
}
static void slic_cmdq_getdone(struct adapter *adapter)
@@ -1795,9 +1789,9 @@ retry_rcvqfill:
skb = alloc_skb(SLIC_RCVQ_RCVBUFSIZE, GFP_ATOMIC);
if (skb) {
paddr = (void *)pci_map_single(adapter->pcidev,
- skb->data,
- SLIC_RCVQ_RCVBUFSIZE,
- PCI_DMA_FROMDEVICE);
+ skb->data,
+ SLIC_RCVQ_RCVBUFSIZE,
+ PCI_DMA_FROMDEVICE);
paddrl = SLIC_GET_ADDR_LOW(paddr);
paddrh = SLIC_GET_ADDR_HIGH(paddr);
@@ -1949,7 +1943,7 @@ static u32 slic_rcvqueue_reinsert(struct adapter *adapter, struct sk_buff *skb)
ASSERT(skb->len == SLIC_RCVBUF_HEADSIZE);
paddr = (void *)pci_map_single(adapter->pcidev, skb->head,
- SLIC_RCVQ_RCVBUFSIZE, PCI_DMA_FROMDEVICE);
+ SLIC_RCVQ_RCVBUFSIZE, PCI_DMA_FROMDEVICE);
rcvbuf->status = 0;
skb->next = NULL;
@@ -2000,35 +1994,35 @@ static int slic_debug_card_show(struct seq_file *seq, void *v)
seq_printf(seq, "driver_version : %s\n", slic_proc_version);
seq_printf(seq, "Microcode versions: \n");
seq_printf(seq, " Gigabit (gb) : %s %s\n",
- MOJAVE_UCODE_VERS_STRING, MOJAVE_UCODE_VERS_DATE);
+ MOJAVE_UCODE_VERS_STRING, MOJAVE_UCODE_VERS_DATE);
seq_printf(seq, " Gigabit Receiver : %s %s\n",
- GB_RCVUCODE_VERS_STRING, GB_RCVUCODE_VERS_DATE);
+ GB_RCVUCODE_VERS_STRING, GB_RCVUCODE_VERS_DATE);
seq_printf(seq, "Vendor : %s\n", slic_vendor);
seq_printf(seq, "Product Name : %s\n", slic_product_name);
#ifdef MOOKTODO
seq_printf(seq, "VendorId : %4.4X\n",
- config->VendorId);
+ config->VendorId);
seq_printf(seq, "DeviceId : %4.4X\n",
- config->DeviceId);
+ config->DeviceId);
seq_printf(seq, "RevisionId : %2.2x\n",
- config->RevisionId);
+ config->RevisionId);
seq_printf(seq, "Bus # : %d\n", card->busnumber);
seq_printf(seq, "Device # : %d\n", card->slotnumber);
seq_printf(seq, "Interfaces : %d\n", card->card_size);
seq_printf(seq, " Initialized : %d\n",
- card->adapters_activated);
+ card->adapters_activated);
seq_printf(seq, " Allocated : %d\n",
- card->adapters_allocated);
+ card->adapters_allocated);
ASSERT(card->card_size <= SLIC_NBR_MACS);
for (i = 0; i < card->card_size; i++) {
seq_printf(seq,
- " MAC%d : %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n",
- i, config->macinfo[i].macaddrA[0],
- config->macinfo[i].macaddrA[1],
- config->macinfo[i].macaddrA[2],
- config->macinfo[i].macaddrA[3],
- config->macinfo[i].macaddrA[4],
- config->macinfo[i].macaddrA[5]);
+ " MAC%d : %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n",
+ i, config->macinfo[i].macaddrA[0],
+ config->macinfo[i].macaddrA[1],
+ config->macinfo[i].macaddrA[2],
+ config->macinfo[i].macaddrA[3],
+ config->macinfo[i].macaddrA[4],
+ config->macinfo[i].macaddrA[5]);
}
seq_printf(seq, " IF Init State Duplex/Speed irq\n");
seq_printf(seq, " -------------------------------\n");
@@ -2038,158 +2032,158 @@ static int slic_debug_card_show(struct seq_file *seq, void *v)
adapter = card->adapter[i];
if (adapter) {
seq_printf(seq,
- " %d %d %s %s %s 0x%X\n",
- adapter->physport, adapter->state,
- SLIC_LINKSTATE(adapter->linkstate),
- SLIC_DUPLEX(adapter->linkduplex),
- SLIC_SPEED(adapter->linkspeed),
- (uint) adapter->irq);
+ " %d %d %s %s %s 0x%X\n",
+ adapter->physport, adapter->state,
+ SLIC_LINKSTATE(adapter->linkstate),
+ SLIC_DUPLEX(adapter->linkduplex),
+ SLIC_SPEED(adapter->linkspeed),
+ (uint) adapter->irq);
}
}
seq_printf(seq, "Generation # : %4.4X\n", card->gennumber);
seq_printf(seq, "RcvQ max entries : %4.4X\n",
- SLIC_RCVQ_ENTRIES);
+ SLIC_RCVQ_ENTRIES);
seq_printf(seq, "Ping Status : %8.8X\n",
- card->pingstatus);
+ card->pingstatus);
seq_printf(seq, "Minimum grant : %2.2x\n",
- config->MinGrant);
+ config->MinGrant);
seq_printf(seq, "Maximum Latency : %2.2x\n", config->MaxLat);
seq_printf(seq, "PciStatus : %4.4x\n",
- config->Pcistatus);
+ config->Pcistatus);
seq_printf(seq, "Debug Device Id : %4.4x\n",
- config->DbgDevId);
+ config->DbgDevId);
seq_printf(seq, "DRAM ROM Function : %4.4x\n",
- config->DramRomFn);
+ config->DramRomFn);
seq_printf(seq, "Network interface Pin 1 : %2.2x\n",
- config->NetIntPin1);
+ config->NetIntPin1);
seq_printf(seq, "Network interface Pin 2 : %2.2x\n",
- config->NetIntPin1);
+ config->NetIntPin1);
seq_printf(seq, "Network interface Pin 3 : %2.2x\n",
- config->NetIntPin1);
+ config->NetIntPin1);
seq_printf(seq, "PM capabilities : %4.4X\n",
- config->PMECapab);
+ config->PMECapab);
seq_printf(seq, "Network Clock Controls : %4.4X\n",
- config->NwClkCtrls);
+ config->NwClkCtrls);
switch (config->FruFormat) {
case ATK_FRU_FORMAT:
- {
- seq_printf(seq,
- "Vendor : Alacritech, Inc.\n");
+ {
+ seq_printf(seq,
+ "Vendor : Alacritech, Inc.\n");
+ seq_printf(seq,
+ "Assembly # : %c%c%c%c%c%c\n",
+ fru[0], fru[1], fru[2], fru[3], fru[4],
+ fru[5]);
+ seq_printf(seq,
+ "Revision # : %c%c\n",
+ fru[6], fru[7]);
+
+ if (config->OEMFruFormat == VENDOR4_FRU_FORMAT) {
seq_printf(seq,
- "Assembly # : %c%c%c%c%c%c\n",
- fru[0], fru[1], fru[2], fru[3], fru[4],
- fru[5]);
+ "Serial # : "
+ "%c%c%c%c%c%c%c%c%c%c%c%c\n",
+ fru[8], fru[9], fru[10],
+ fru[11], fru[12], fru[13],
+ fru[16], fru[17], fru[18],
+ fru[19], fru[20], fru[21]);
+ } else {
seq_printf(seq,
- "Revision # : %c%c\n",
- fru[6], fru[7]);
-
- if (config->OEMFruFormat == VENDOR4_FRU_FORMAT) {
- seq_printf(seq,
- "Serial # : "
- "%c%c%c%c%c%c%c%c%c%c%c%c\n",
- fru[8], fru[9], fru[10],
- fru[11], fru[12], fru[13],
- fru[16], fru[17], fru[18],
- fru[19], fru[20], fru[21]);
- } else {
- seq_printf(seq,
- "Serial # : "
- "%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n",
- fru[8], fru[9], fru[10],
- fru[11], fru[12], fru[13],
- fru[14], fru[15], fru[16],
- fru[17], fru[18], fru[19],
- fru[20], fru[21]);
- }
- break;
+ "Serial # : "
+ "%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n",
+ fru[8], fru[9], fru[10],
+ fru[11], fru[12], fru[13],
+ fru[14], fru[15], fru[16],
+ fru[17], fru[18], fru[19],
+ fru[20], fru[21]);
}
+ break;
+ }
default:
- {
- seq_printf(seq,
- "Vendor : Alacritech, Inc.\n");
- seq_printf(seq,
- "Serial # : Empty FRU\n");
- break;
- }
+ {
+ seq_printf(seq,
+ "Vendor : Alacritech, Inc.\n");
+ seq_printf(seq,
+ "Serial # : Empty FRU\n");
+ break;
+ }
}
switch (config->OEMFruFormat) {
case VENDOR1_FRU_FORMAT:
- {
- seq_printf(seq, "FRU Information:\n");
- seq_printf(seq, " Commodity # : %c\n",
- oemfru[0]);
- seq_printf(seq,
- " Assembly # : %c%c%c%c\n",
- oemfru[1], oemfru[2], oemfru[3], oemfru[4]);
- seq_printf(seq,
- " Revision # : %c%c\n",
- oemfru[5], oemfru[6]);
- seq_printf(seq,
- " Supplier # : %c%c\n",
- oemfru[7], oemfru[8]);
- seq_printf(seq,
- " Date : %c%c\n",
- oemfru[9], oemfru[10]);
- seq_sprintf(seq,
- " Sequence # : %c%c%c\n",
- oemfru[11], oemfru[12], oemfru[13]);
- break;
- }
+ {
+ seq_printf(seq, "FRU Information:\n");
+ seq_printf(seq, " Commodity # : %c\n",
+ oemfru[0]);
+ seq_printf(seq,
+ " Assembly # : %c%c%c%c\n",
+ oemfru[1], oemfru[2], oemfru[3], oemfru[4]);
+ seq_printf(seq,
+ " Revision # : %c%c\n",
+ oemfru[5], oemfru[6]);
+ seq_printf(seq,
+ " Supplier # : %c%c\n",
+ oemfru[7], oemfru[8]);
+ seq_printf(seq,
+ " Date : %c%c\n",
+ oemfru[9], oemfru[10]);
+ seq_sprintf(seq,
+ " Sequence # : %c%c%c\n",
+ oemfru[11], oemfru[12], oemfru[13]);
+ break;
+ }
case VENDOR2_FRU_FORMAT:
- {
- seq_printf(seq, "FRU Information:\n");
- seq_printf(seq,
- " Part # : "
- "%c%c%c%c%c%c%c%c\n",
- oemfru[0], oemfru[1], oemfru[2],
- oemfru[3], oemfru[4], oemfru[5],
- oemfru[6], oemfru[7]);
- seq_printf(seq,
- " Supplier # : %c%c%c%c%c\n",
- oemfru[8], oemfru[9], oemfru[10],
- oemfru[11], oemfru[12]);
- seq_printf(seq,
- " Date : %c%c%c\n",
- oemfru[13], oemfru[14], oemfru[15]);
- seq_sprintf(seq,
- " Sequence # : %c%c%c%c\n",
- oemfru[16], oemfru[17], oemfru[18],
- oemfru[19]);
- break;
- }
+ {
+ seq_printf(seq, "FRU Information:\n");
+ seq_printf(seq,
+ " Part # : "
+ "%c%c%c%c%c%c%c%c\n",
+ oemfru[0], oemfru[1], oemfru[2],
+ oemfru[3], oemfru[4], oemfru[5],
+ oemfru[6], oemfru[7]);
+ seq_printf(seq,
+ " Supplier # : %c%c%c%c%c\n",
+ oemfru[8], oemfru[9], oemfru[10],
+ oemfru[11], oemfru[12]);
+ seq_printf(seq,
+ " Date : %c%c%c\n",
+ oemfru[13], oemfru[14], oemfru[15]);
+ seq_sprintf(seq,
+ " Sequence # : %c%c%c%c\n",
+ oemfru[16], oemfru[17], oemfru[18],
+ oemfru[19]);
+ break;
+ }
case VENDOR3_FRU_FORMAT:
- {
- seq_printf(seq, "FRU Information:\n");
- }
+ {
+ seq_printf(seq, "FRU Information:\n");
+ }
case VENDOR4_FRU_FORMAT:
- {
- seq_printf(seq, "FRU Information:\n");
- seq_printf(seq,
- " FRU Number : "
- "%c%c%c%c%c%c%c%c\n",
- oemfru[0], oemfru[1], oemfru[2],
- oemfru[3], oemfru[4], oemfru[5],
- oemfru[6], oemfru[7]);
- seq_sprintf(seq,
- " Part Number : "
- "%c%c%c%c%c%c%c%c\n",
- oemfru[8], oemfru[9], oemfru[10],
- oemfru[11], oemfru[12], oemfru[13],
- oemfru[14], oemfru[15]);
- seq_printf(seq,
- " EC Level : "
- "%c%c%c%c%c%c%c%c\n",
- oemfru[16], oemfru[17], oemfru[18],
- oemfru[19], oemfru[20], oemfru[21],
- oemfru[22], oemfru[23]);
- break;
- }
+ {
+ seq_printf(seq, "FRU Information:\n");
+ seq_printf(seq,
+ " FRU Number : "
+ "%c%c%c%c%c%c%c%c\n",
+ oemfru[0], oemfru[1], oemfru[2],
+ oemfru[3], oemfru[4], oemfru[5],
+ oemfru[6], oemfru[7]);
+ seq_sprintf(seq,
+ " Part Number : "
+ "%c%c%c%c%c%c%c%c\n",
+ oemfru[8], oemfru[9], oemfru[10],
+ oemfru[11], oemfru[12], oemfru[13],
+ oemfru[14], oemfru[15]);
+ seq_printf(seq,
+ " EC Level : "
+ "%c%c%c%c%c%c%c%c\n",
+ oemfru[16], oemfru[17], oemfru[18],
+ oemfru[19], oemfru[20], oemfru[21],
+ oemfru[22], oemfru[23]);
+ break;
+ }
default:
break;
@@ -2205,7 +2199,7 @@ static int slic_debug_adapter_show(struct seq_file *seq, void *v)
struct net_device *netdev = adapter->netdev;
seq_printf(seq, "info: interface : %s\n",
- adapter->netdev->name);
+ adapter->netdev->name);
seq_printf(seq, "info: status : %s\n",
SLIC_LINKSTATE(adapter->linkstate));
seq_printf(seq, "info: port : %d\n",
@@ -2221,96 +2215,97 @@ static int slic_debug_adapter_show(struct seq_file *seq, void *v)
seq_printf(seq, "info: RcvQ max entries : %4.4X\n",
SLIC_RCVQ_ENTRIES);
seq_printf(seq, "info: RcvQ current : %4.4X\n",
- adapter->rcvqueue.count);
+ adapter->rcvqueue.count);
seq_printf(seq, "rx stats: packets : %8.8lX\n",
- netdev->stats.rx_packets);
+ netdev->stats.rx_packets);
seq_printf(seq, "rx stats: bytes : %8.8lX\n",
- netdev->stats.rx_bytes);
+ netdev->stats.rx_bytes);
seq_printf(seq, "rx stats: broadcasts : %8.8X\n",
- adapter->rcv_broadcasts);
+ adapter->rcv_broadcasts);
seq_printf(seq, "rx stats: multicasts : %8.8X\n",
- adapter->rcv_multicasts);
+ adapter->rcv_multicasts);
seq_printf(seq, "rx stats: unicasts : %8.8X\n",
- adapter->rcv_unicasts);
+ adapter->rcv_unicasts);
seq_printf(seq, "rx stats: errors : %8.8X\n",
- (u32) adapter->slic_stats.iface.rcv_errors);
+ (u32) adapter->slic_stats.iface.rcv_errors);
seq_printf(seq, "rx stats: Missed errors : %8.8X\n",
- (u32) adapter->slic_stats.iface.rcv_discards);
+ (u32) adapter->slic_stats.iface.rcv_discards);
seq_printf(seq, "rx stats: drops : %8.8X\n",
- (u32) adapter->rcv_drops);
+ (u32) adapter->rcv_drops);
seq_printf(seq, "tx stats: packets : %8.8lX\n",
- netdev->stats.tx_packets);
+ netdev->stats.tx_packets);
seq_printf(seq, "tx stats: bytes : %8.8lX\n",
- netdev->stats.tx_bytes);
+ netdev->stats.tx_bytes);
seq_printf(seq, "tx stats: errors : %8.8X\n",
- (u32) adapter->slic_stats.iface.xmt_errors);
+ (u32) adapter->slic_stats.iface.xmt_errors);
seq_printf(seq, "rx stats: multicasts : %8.8lX\n",
- netdev->stats.multicast);
+ netdev->stats.multicast);
seq_printf(seq, "tx stats: collision errors : %8.8X\n",
- (u32) adapter->slic_stats.iface.xmit_collisions);
+ (u32) adapter->slic_stats.iface.xmit_collisions);
seq_printf(seq, "perf: Max rcv frames/isr : %8.8X\n",
- adapter->max_isr_rcvs);
+ adapter->max_isr_rcvs);
seq_printf(seq, "perf: Rcv interrupt yields : %8.8X\n",
- adapter->rcv_interrupt_yields);
+ adapter->rcv_interrupt_yields);
seq_printf(seq, "perf: Max xmit complete/isr : %8.8X\n",
- adapter->max_isr_xmits);
+ adapter->max_isr_xmits);
seq_printf(seq, "perf: error interrupts : %8.8X\n",
- adapter->error_interrupts);
+ adapter->error_interrupts);
seq_printf(seq, "perf: error rmiss interrupts : %8.8X\n",
- adapter->error_rmiss_interrupts);
+ adapter->error_rmiss_interrupts);
seq_printf(seq, "perf: rcv interrupts : %8.8X\n",
- adapter->rcv_interrupts);
+ adapter->rcv_interrupts);
seq_printf(seq, "perf: xmit interrupts : %8.8X\n",
- adapter->xmit_interrupts);
+ adapter->xmit_interrupts);
seq_printf(seq, "perf: link event interrupts : %8.8X\n",
- adapter->linkevent_interrupts);
+ adapter->linkevent_interrupts);
seq_printf(seq, "perf: UPR interrupts : %8.8X\n",
- adapter->upr_interrupts);
+ adapter->upr_interrupts);
seq_printf(seq, "perf: interrupt count : %8.8X\n",
- adapter->num_isrs);
+ adapter->num_isrs);
seq_printf(seq, "perf: false interrupts : %8.8X\n",
- adapter->false_interrupts);
+ adapter->false_interrupts);
seq_printf(seq, "perf: All register writes : %8.8X\n",
- adapter->all_reg_writes);
+ adapter->all_reg_writes);
seq_printf(seq, "perf: ICR register writes : %8.8X\n",
- adapter->icr_reg_writes);
+ adapter->icr_reg_writes);
seq_printf(seq, "perf: ISR register writes : %8.8X\n",
- adapter->isr_reg_writes);
+ adapter->isr_reg_writes);
seq_printf(seq, "ifevents: overflow 802 errors : %8.8X\n",
- adapter->if_events.oflow802);
+ adapter->if_events.oflow802);
seq_printf(seq, "ifevents: transport overflow errors: %8.8X\n",
- adapter->if_events.Tprtoflow);
+ adapter->if_events.Tprtoflow);
seq_printf(seq, "ifevents: underflow errors : %8.8X\n",
- adapter->if_events.uflow802);
+ adapter->if_events.uflow802);
seq_printf(seq, "ifevents: receive early : %8.8X\n",
- adapter->if_events.rcvearly);
+ adapter->if_events.rcvearly);
seq_printf(seq, "ifevents: buffer overflows : %8.8X\n",
- adapter->if_events.Bufov);
+ adapter->if_events.Bufov);
seq_printf(seq, "ifevents: carrier errors : %8.8X\n",
- adapter->if_events.Carre);
+ adapter->if_events.Carre);
seq_printf(seq, "ifevents: Long : %8.8X\n",
- adapter->if_events.Longe);
+ adapter->if_events.Longe);
seq_printf(seq, "ifevents: invalid preambles : %8.8X\n",
- adapter->if_events.Invp);
+ adapter->if_events.Invp);
seq_printf(seq, "ifevents: CRC errors : %8.8X\n",
- adapter->if_events.Crc);
+ adapter->if_events.Crc);
seq_printf(seq, "ifevents: dribble nibbles : %8.8X\n",
- adapter->if_events.Drbl);
+ adapter->if_events.Drbl);
seq_printf(seq, "ifevents: Code violations : %8.8X\n",
- adapter->if_events.Code);
+ adapter->if_events.Code);
seq_printf(seq, "ifevents: TCP checksum errors : %8.8X\n",
- adapter->if_events.TpCsum);
+ adapter->if_events.TpCsum);
seq_printf(seq, "ifevents: TCP header short errors : %8.8X\n",
- adapter->if_events.TpHlen);
+ adapter->if_events.TpHlen);
seq_printf(seq, "ifevents: IP checksum errors : %8.8X\n",
- adapter->if_events.IpCsum);
+ adapter->if_events.IpCsum);
seq_printf(seq, "ifevents: IP frame incompletes : %8.8X\n",
- adapter->if_events.IpLen);
+ adapter->if_events.IpLen);
seq_printf(seq, "ifevents: IP headers shorts : %8.8X\n",
- adapter->if_events.IpHlen);
+ adapter->if_events.IpHlen);
return 0;
}
+
static int slic_debug_adapter_open(struct inode *inode, struct file *file)
{
return single_open(file, slic_debug_adapter_show, inode->i_private);
@@ -2375,11 +2370,11 @@ static void slic_debug_card_create(struct sliccard *card)
else {
card->debugfs_dir = d;
d = debugfs_create_file("cardinfo", S_IRUGO,
- slic_debugfs, card,
- &slic_debug_card_fops);
+ slic_debugfs, card,
+ &slic_debug_card_fops);
if (!d || IS_ERR(d))
pr_info(PFX "%s: debugfs create failed\n",
- name);
+ name);
else
card->debugfs_cardinfo = d;
}
@@ -2451,14 +2446,14 @@ static void slic_link_event_handler(struct adapter *adapter)
#if BITS_PER_LONG == 64
status = slic_upr_request(adapter,
- SLIC_UPR_RLSR,
- SLIC_GET_ADDR_LOW(&pshmem->linkstatus),
- SLIC_GET_ADDR_HIGH(&pshmem->linkstatus),
- 0, 0);
+ SLIC_UPR_RLSR,
+ SLIC_GET_ADDR_LOW(&pshmem->linkstatus),
+ SLIC_GET_ADDR_HIGH(&pshmem->linkstatus),
+ 0, 0);
#else
status = slic_upr_request(adapter, SLIC_UPR_RLSR,
- (u32) &pshmem->linkstatus, /* no 4GB wrap guaranteed */
- 0, 0, 0);
+ (u32) &pshmem->linkstatus, /* no 4GB wrap guaranteed */
+ 0, 0, 0);
#endif
ASSERT(status == 0);
}
@@ -2468,12 +2463,12 @@ static void slic_init_cleanup(struct adapter *adapter)
if (adapter->intrregistered) {
adapter->intrregistered = 0;
free_irq(adapter->netdev->irq, adapter->netdev);
-
}
+
if (adapter->pshmem) {
pci_free_consistent(adapter->pcidev,
- sizeof(struct slic_shmem),
- adapter->pshmem, adapter->phys_shmem);
+ sizeof(struct slic_shmem),
+ adapter->pshmem, adapter->phys_shmem);
adapter->pshmem = NULL;
adapter->phys_shmem = (dma_addr_t) NULL;
}
@@ -2555,9 +2550,9 @@ static void slic_mcast_set_list(struct net_device *dev)
return;
}
-#define XMIT_FAIL_LINK_STATE 1
-#define XMIT_FAIL_ZERO_LENGTH 2
-#define XMIT_FAIL_HOSTCMD_FAIL 3
+#define XMIT_FAIL_LINK_STATE 1
+#define XMIT_FAIL_ZERO_LENGTH 2
+#define XMIT_FAIL_HOSTCMD_FAIL 3
static void slic_xmit_build_request(struct adapter *adapter,
struct slic_hostcmd *hcmd, struct sk_buff *skb)
@@ -2571,16 +2566,16 @@ static void slic_xmit_build_request(struct adapter *adapter,
ihcmd->command = IHCMD_XMT_REQ;
ihcmd->u.slic_buffers.totlen = skb->len;
phys_addr = pci_map_single(adapter->pcidev, skb->data, skb->len,
- PCI_DMA_TODEVICE);
+ PCI_DMA_TODEVICE);
ihcmd->u.slic_buffers.bufs[0].paddrl = SLIC_GET_ADDR_LOW(phys_addr);
ihcmd->u.slic_buffers.bufs[0].paddrh = SLIC_GET_ADDR_HIGH(phys_addr);
ihcmd->u.slic_buffers.bufs[0].length = skb->len;
#if BITS_PER_LONG == 64
hcmd->cmdsize = (u32) ((((u64)&ihcmd->u.slic_buffers.bufs[1] -
- (u64) hcmd) + 31) >> 5);
+ (u64) hcmd) + 31) >> 5);
#else
hcmd->cmdsize = ((((u32) &ihcmd->u.slic_buffers.bufs[1] -
- (u32) hcmd) + 31) >> 5);
+ (u32) hcmd) + 31) >> 5);
#endif
}
@@ -2713,8 +2708,8 @@ static void slic_rcv_handle_error(struct adapter *adapter,
return;
}
-#define TCP_OFFLOAD_FRAME_PUSHFLAG 0x10000000
-#define M_FAST_PATH 0x0040
+#define TCP_OFFLOAD_FRAME_PUSHFLAG 0x10000000
+#define M_FAST_PATH 0x0040
static void slic_rcv_handler(struct adapter *adapter)
{
@@ -2784,10 +2779,9 @@ static void slic_xmit_complete(struct adapter *adapter)
slic_handle_word.handle_token = rspbuf->hosthandle;
ASSERT(slic_handle_word.handle_index);
ASSERT(slic_handle_word.handle_index <= SLIC_CMDQ_MAXCMDS);
- hcmd =
- (struct slic_hostcmd *)
+ hcmd = (struct slic_hostcmd *)
adapter->slic_handles[slic_handle_word.handle_index].
- address;
+ address;
/* hcmd = (struct slic_hostcmd *) rspbuf->hosthandle; */
ASSERT(hcmd);
ASSERT(hcmd->pslic_handle ==
@@ -2827,10 +2821,9 @@ static irqreturn_t slic_interrupt(int irq, void *dev_id)
int errors;
struct slic_rcvqueue *rcvq =
- &adapter->rcvqueue;
+ &adapter->rcvqueue;
- adapter->
- error_rmiss_interrupts++;
+ adapter->error_rmiss_interrupts++;
if (!rcvq->errors)
rcv_count = rcvq->count;
pre_count = rcvq->count;
@@ -2838,9 +2831,7 @@ static irqreturn_t slic_interrupt(int irq, void *dev_id)
while (rcvq->count <
SLIC_RCVQ_FILLTHRESH) {
- count =
- slic_rcvqueue_fill
- (adapter);
+ count = slic_rcvqueue_fill(adapter);
if (!count)
break;
}
@@ -2900,7 +2891,7 @@ static irqreturn_t slic_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
-#define NORMAL_ETHFRAME 0
+#define NORMAL_ETHFRAME 0
static netdev_tx_t slic_xmit_start(struct sk_buff *skb, struct net_device *dev)
{
@@ -2932,7 +2923,7 @@ static netdev_tx_t slic_xmit_start(struct sk_buff *skb, struct net_device *dev)
}
ASSERT(hcmd->pslic_handle);
ASSERT(hcmd->cmd64.hosthandle ==
- hcmd->pslic_handle->token.handle_token);
+ hcmd->pslic_handle->token.handle_token);
hcmd->skb = skb;
hcmd->busy = 1;
hcmd->type = SLIC_CMD_DUMB;
@@ -2954,12 +2945,12 @@ static netdev_tx_t slic_xmit_start(struct sk_buff *skb, struct net_device *dev)
#endif
if (hcmd->paddrh == 0) {
slic_reg32_write(&adapter->slic_regs->slic_cbar,
- (hcmd->paddrl | hcmd->cmdsize), DONT_FLUSH);
+ (hcmd->paddrl | hcmd->cmdsize), DONT_FLUSH);
} else {
slic_reg64_write(adapter, &adapter->slic_regs->slic_cbar64,
- (hcmd->paddrl | hcmd->cmdsize),
- &adapter->slic_regs->slic_addr_upper,
- hcmd->paddrh, DONT_FLUSH);
+ (hcmd->paddrl | hcmd->cmdsize),
+ &adapter->slic_regs->slic_addr_upper,
+ hcmd->paddrh, DONT_FLUSH);
}
xmit_done:
return NETDEV_TX_OK;
@@ -2968,7 +2959,6 @@ xmit_fail:
goto xmit_done;
}
-
static void slic_adapter_freeresources(struct adapter *adapter)
{
slic_init_cleanup(adapter);
@@ -3078,15 +3068,15 @@ static int slic_if_init(struct adapter *adapter)
#if BITS_PER_LONG == 64
slic_reg32_write(&slic_regs->slic_addr_upper,
- SLIC_GET_ADDR_HIGH(&pshmem->isr), DONT_FLUSH);
+ SLIC_GET_ADDR_HIGH(&pshmem->isr), DONT_FLUSH);
slic_reg32_write(&slic_regs->slic_isp,
- SLIC_GET_ADDR_LOW(&pshmem->isr), FLUSH);
+ SLIC_GET_ADDR_LOW(&pshmem->isr), FLUSH);
#else
slic_reg32_write(&slic_regs->slic_addr_upper, 0, DONT_FLUSH);
slic_reg32_write(&slic_regs->slic_isp, (u32)&pshmem->isr, FLUSH);
#endif
spin_unlock_irqrestore(&adapter->bit64reglock.lock,
- adapter->bit64reglock.flags);
+ adapter->bit64reglock.flags);
adapter->isp_initialized = 1;
}
@@ -3094,7 +3084,7 @@ static int slic_if_init(struct adapter *adapter)
if (!card->loadtimerset) {
init_timer(&card->loadtimer);
card->loadtimer.expires =
- jiffies + (SLIC_LOADTIMER_PERIOD * HZ);
+ jiffies + (SLIC_LOADTIMER_PERIOD * HZ);
card->loadtimer.data = (ulong) card;
card->loadtimer.function = &slic_timer_load_check;
add_timer(&card->loadtimer);
@@ -3105,7 +3095,7 @@ static int slic_if_init(struct adapter *adapter)
if (!adapter->pingtimerset) {
init_timer(&adapter->pingtimer);
adapter->pingtimer.expires =
- jiffies + (PING_TIMER_INTERVAL * HZ);
+ jiffies + (PING_TIMER_INTERVAL * HZ);
adapter->pingtimer.data = (ulong) dev;
adapter->pingtimer.function = &slic_timer_ping;
add_timer(&adapter->pingtimer);
@@ -3141,7 +3131,7 @@ static int slic_entry_open(struct net_device *dev)
netif_stop_queue(adapter->netdev);
spin_lock_irqsave(&slic_global.driver_lock.lock,
- slic_global.driver_lock.flags);
+ slic_global.driver_lock.flags);
locked = 1;
if (!adapter->activated) {
card->adapters_activated++;
@@ -3158,7 +3148,7 @@ static int slic_entry_open(struct net_device *dev)
}
if (locked) {
spin_unlock_irqrestore(&slic_global.driver_lock.lock,
- slic_global.driver_lock.flags);
+ slic_global.driver_lock.flags);
locked = 0;
}
return status;
@@ -3168,7 +3158,7 @@ static int slic_entry_open(struct net_device *dev)
if (locked) {
spin_unlock_irqrestore(&slic_global.driver_lock.lock,
- slic_global.driver_lock.flags);
+ slic_global.driver_lock.flags);
locked = 0;
}
@@ -3244,7 +3234,7 @@ static int slic_entry_halt(struct net_device *dev)
__iomem struct slic_regs *slic_regs = adapter->slic_regs;
spin_lock_irqsave(&slic_global.driver_lock.lock,
- slic_global.driver_lock.flags);
+ slic_global.driver_lock.flags);
ASSERT(card);
netif_stop_queue(adapter->netdev);
adapter->state = ADAPT_DOWN;
@@ -3276,7 +3266,7 @@ static int slic_entry_halt(struct net_device *dev)
#endif
spin_unlock_irqrestore(&slic_global.driver_lock.lock,
- slic_global.driver_lock.flags);
+ slic_global.driver_lock.flags);
return 0;
}
@@ -3325,26 +3315,22 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
DBG_IOCTL("slic_ioctl SIOCSLIC_TRACE_DUMP\n");
if (copy_from_user(data, rq->ifr_data, 28)) {
- PRINT_ERROR
- ("slic: copy_from_user FAILED getting initial simba param\n");
+ PRINT_ERROR("slic: copy_from_user FAILED getting initial simba param\n");
return -EFAULT;
}
value = data[0];
if (tracemon_request == SLIC_DUMP_DONE) {
- PRINT_ERROR
- ("ATK Diagnostic Trace Dump Requested\n");
+ PRINT_ERROR("ATK Diagnostic Trace Dump Requested\n");
tracemon_request = SLIC_DUMP_REQUESTED;
tracemon_request_type = value;
tracemon_timestamp = jiffies;
} else if ((tracemon_request == SLIC_DUMP_REQUESTED) ||
(tracemon_request ==
SLIC_DUMP_IN_PROGRESS)) {
- PRINT_ERROR
- ("ATK Diagnostic Trace Dump Requested but already in progress... ignore\n");
+ PRINT_ERROR("ATK Diagnostic Trace Dump Requested but already in progress... ignore\n");
} else {
- PRINT_ERROR
- ("ATK Diagnostic Trace Dump Requested\n");
+ PRINT_ERROR("ATK Diagnostic Trace Dump Requested\n");
tracemon_request = SLIC_DUMP_REQUESTED;
tracemon_request_type = value;
tracemon_timestamp = jiffies;
@@ -3359,10 +3345,10 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
if (ecmd.cmd == ETHTOOL_GSET) {
edata.supported = (SUPPORTED_10baseT_Half |
- SUPPORTED_10baseT_Full |
- SUPPORTED_100baseT_Half |
- SUPPORTED_100baseT_Full |
- SUPPORTED_Autoneg | SUPPORTED_MII);
+ SUPPORTED_10baseT_Full |
+ SUPPORTED_100baseT_Half |
+ SUPPORTED_100baseT_Full |
+ SUPPORTED_Autoneg | SUPPORTED_MII);
edata.port = PORT_MII;
edata.transceiver = XCVR_INTERNAL;
edata.phy_address = 0;
@@ -3404,7 +3390,7 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
edata.maxtxpkt = 1;
edata.maxrxpkt = 1;
if ((ecmd.speed != edata.speed) ||
- (ecmd.duplex != edata.duplex)) {
+ (ecmd.duplex != edata.duplex)) {
u32 speed;
u32 duplex;
@@ -3434,9 +3420,9 @@ static void slic_config_pci(struct pci_dev *pcidev)
pci_read_config_word(pcidev, PCI_COMMAND, &pci_command);
new_command = pci_command | PCI_COMMAND_MASTER
- | PCI_COMMAND_MEMORY
- | PCI_COMMAND_INVALIDATE
- | PCI_COMMAND_PARITY | PCI_COMMAND_SERR | PCI_COMMAND_FAST_BACK;
+ | PCI_COMMAND_MEMORY
+ | PCI_COMMAND_INVALIDATE
+ | PCI_COMMAND_PARITY | PCI_COMMAND_SERR | PCI_COMMAND_FAST_BACK;
if (pci_command != new_command)
pci_write_config_word(pcidev, PCI_COMMAND, new_command);
}
@@ -3478,8 +3464,8 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
if (!card->config_set) {
peeprom = pci_alloc_consistent(adapter->pcidev,
- sizeof(struct slic_eeprom),
- &phys_config);
+ sizeof(struct slic_eeprom),
+ &phys_config);
phys_configl = SLIC_GET_ADDR_LOW(phys_config);
phys_configh = SLIC_GET_ADDR_HIGH(phys_config);
@@ -3498,12 +3484,12 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
pshmem = (struct slic_shmem *)adapter->phys_shmem;
spin_lock_irqsave(&adapter->bit64reglock.lock,
- adapter->bit64reglock.flags);
+ adapter->bit64reglock.flags);
slic_reg32_write(&slic_regs->slic_addr_upper, 0, DONT_FLUSH);
slic_reg32_write(&slic_regs->slic_isp,
- SLIC_GET_ADDR_LOW(&pshmem->isr), FLUSH);
+ SLIC_GET_ADDR_LOW(&pshmem->isr), FLUSH);
spin_unlock_irqrestore(&adapter->bit64reglock.lock,
- adapter->bit64reglock.flags);
+ adapter->bit64reglock.flags);
slic_config_get(adapter, phys_configl, phys_configh);
@@ -3512,18 +3498,18 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
if (adapter->pshmem->isr & ISR_UPC) {
adapter->pshmem->isr = 0;
slic_reg64_write(adapter,
- &slic_regs->slic_isp, 0,
- &slic_regs->slic_addr_upper,
- 0, FLUSH);
+ &slic_regs->slic_isp, 0,
+ &slic_regs->slic_addr_upper,
+ 0, FLUSH);
slic_reg32_write(&slic_regs->slic_isr,
- 0, FLUSH);
+ 0, FLUSH);
slic_upr_request_complete(adapter, 0);
break;
} else {
adapter->pshmem->isr = 0;
slic_reg32_write(&slic_regs->slic_isr,
- 0, FLUSH);
+ 0, FLUSH);
}
} else {
mdelay(1);
@@ -3533,9 +3519,9 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
"%d config data fetch timed out!\n",
adapter->port);
slic_reg64_write(adapter,
- &slic_regs->slic_isp, 0,
- &slic_regs->slic_addr_upper,
- 0, FLUSH);
+ &slic_regs->slic_isp, 0,
+ &slic_regs->slic_addr_upper,
+ 0, FLUSH);
return -EINVAL;
}
}
@@ -3575,16 +3561,16 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
/* see if the EEPROM is valid by checking it's checksum */
if ((eecodesize <= MAX_EECODE_SIZE) &&
- (eecodesize >= MIN_EECODE_SIZE)) {
+ (eecodesize >= MIN_EECODE_SIZE)) {
ee_chksum =
- *(u16 *) ((char *) peeprom + (eecodesize - 2));
+ *(u16 *) ((char *) peeprom + (eecodesize - 2));
/*
calculate the EEPROM checksum
*/
calc_chksum =
- ~slic_eeprom_cksum((char *) peeprom,
- (eecodesize - 2));
+ ~slic_eeprom_cksum((char *) peeprom,
+ (eecodesize - 2));
/*
if the ucdoe chksum flag bit worked,
we wouldn't need this shit
@@ -3598,23 +3584,23 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
/* copy in the MAC address(es) */
for (i = 0; i < macaddrs; i++) {
memcpy(&card->config.MacInfo[i],
- &pmac[i], sizeof(struct slic_config_mac));
+ &pmac[i], sizeof(struct slic_config_mac));
}
/* copy the Alacritech FRU information */
card->config.FruFormat = fruformat;
memcpy(&card->config.AtkFru, patkfru,
- sizeof(struct atk_fru));
+ sizeof(struct atk_fru));
pci_free_consistent(adapter->pcidev,
- sizeof(struct slic_eeprom),
- peeprom, phys_config);
+ sizeof(struct slic_eeprom),
+ peeprom, phys_config);
if ((!card->config.EepromValid) &&
- (adapter->reg_params.fail_on_bad_eeprom)) {
+ (adapter->reg_params.fail_on_bad_eeprom)) {
slic_reg64_write(adapter, &slic_regs->slic_isp, 0,
- &slic_regs->slic_addr_upper,
- 0, FLUSH);
+ &slic_regs->slic_addr_upper,
+ 0, FLUSH);
dev_err(&adapter->pcidev->dev,
"unsupported CONFIGURATION EEPROM invalid\n");
return -EINVAL;
@@ -3706,10 +3692,10 @@ static void slic_init_adapter(struct net_device *netdev,
adapter->pfree_slic_handles = pslic_handle;
}
adapter->pshmem = (struct slic_shmem *)
- pci_alloc_consistent(adapter->pcidev,
- sizeof(struct slic_shmem),
- &adapter->
- phys_shmem);
+ pci_alloc_consistent(adapter->pcidev,
+ sizeof(struct slic_shmem),
+ &adapter->
+ phys_shmem);
ASSERT(adapter->pshmem);
memset(adapter->pshmem, 0, sizeof(struct slic_shmem));
@@ -3750,9 +3736,8 @@ static u32 slic_card_locate(struct adapter *adapter)
break;
}
- hostid_reg =
- (u16 __iomem *) (((u8 __iomem *) (adapter->slic_regs)) +
- rdhostid_offset);
+ hostid_reg = (u16 __iomem *) (((u8 __iomem *) (adapter->slic_regs)) +
+ rdhostid_offset);
/* read the 16 bit hostid from SRAM */
card_hostid = (ushort) readw(hostid_reg);
@@ -3864,7 +3849,7 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev,
pci_using_dac = 1;
if (pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64))) {
dev_err(&pcidev->dev, "unable to obtain 64-bit DMA for "
- "consistent allocations\n");
+ "consistent allocations\n");
goto err_out_disable_pci;
}
} else if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(32))) {
@@ -3915,7 +3900,7 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev,
slic_init_driver();
slic_init_adapter(netdev,
- pcidev, pci_tbl_entry, memmapped_ioaddr, cards_found);
+ pcidev, pci_tbl_entry, memmapped_ioaddr, cards_found);
status = slic_card_locate(adapter);
if (status) {
@@ -3984,7 +3969,7 @@ static int __init slic_module_init(void)
if (debug >= 0 && slic_debug != debug)
printk(KERN_DEBUG KBUILD_MODNAME ": debug level is %d.\n",
- debug);
+ debug);
if (debug >= 0)
slic_debug = debug;
--
1.7.11.2
--
Jesper Juhl <jj@...osbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists