Commit 23acb2fc authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

net: systemport: align multiple lines correctly

checkpatch.pl flagged a bunch of: "CHECK: Alignment should match open
parenthesis" problems, fix all of them.
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 316158fe
...@@ -81,14 +81,14 @@ static inline void dma_desc_set_addr(struct bcm_sysport_priv *priv, ...@@ -81,14 +81,14 @@ static inline void dma_desc_set_addr(struct bcm_sysport_priv *priv,
{ {
#ifdef CONFIG_PHYS_ADDR_T_64BIT #ifdef CONFIG_PHYS_ADDR_T_64BIT
__raw_writel(upper_32_bits(addr) & DESC_ADDR_HI_MASK, __raw_writel(upper_32_bits(addr) & DESC_ADDR_HI_MASK,
d + DESC_ADDR_HI_STATUS_LEN); d + DESC_ADDR_HI_STATUS_LEN);
#endif #endif
__raw_writel(lower_32_bits(addr), d + DESC_ADDR_LO); __raw_writel(lower_32_bits(addr), d + DESC_ADDR_LO);
} }
static inline void tdma_port_write_desc_addr(struct bcm_sysport_priv *priv, static inline void tdma_port_write_desc_addr(struct bcm_sysport_priv *priv,
struct dma_desc *desc, struct dma_desc *desc,
unsigned int port) unsigned int port)
{ {
/* Ports are latched, so write upper address first */ /* Ports are latched, so write upper address first */
tdma_writel(priv, desc->addr_status_len, TDMA_WRITE_PORT_HI(port)); tdma_writel(priv, desc->addr_status_len, TDMA_WRITE_PORT_HI(port));
...@@ -108,7 +108,7 @@ static int bcm_sysport_set_settings(struct net_device *dev, ...@@ -108,7 +108,7 @@ static int bcm_sysport_set_settings(struct net_device *dev,
} }
static int bcm_sysport_get_settings(struct net_device *dev, static int bcm_sysport_get_settings(struct net_device *dev,
struct ethtool_cmd *cmd) struct ethtool_cmd *cmd)
{ {
struct bcm_sysport_priv *priv = netdev_priv(dev); struct bcm_sysport_priv *priv = netdev_priv(dev);
...@@ -119,7 +119,7 @@ static int bcm_sysport_get_settings(struct net_device *dev, ...@@ -119,7 +119,7 @@ static int bcm_sysport_get_settings(struct net_device *dev,
} }
static int bcm_sysport_set_rx_csum(struct net_device *dev, static int bcm_sysport_set_rx_csum(struct net_device *dev,
netdev_features_t wanted) netdev_features_t wanted)
{ {
struct bcm_sysport_priv *priv = netdev_priv(dev); struct bcm_sysport_priv *priv = netdev_priv(dev);
u32 reg; u32 reg;
...@@ -145,7 +145,7 @@ static int bcm_sysport_set_rx_csum(struct net_device *dev, ...@@ -145,7 +145,7 @@ static int bcm_sysport_set_rx_csum(struct net_device *dev,
} }
static int bcm_sysport_set_tx_csum(struct net_device *dev, static int bcm_sysport_set_tx_csum(struct net_device *dev,
netdev_features_t wanted) netdev_features_t wanted)
{ {
struct bcm_sysport_priv *priv = netdev_priv(dev); struct bcm_sysport_priv *priv = netdev_priv(dev);
u32 reg; u32 reg;
...@@ -165,7 +165,7 @@ static int bcm_sysport_set_tx_csum(struct net_device *dev, ...@@ -165,7 +165,7 @@ static int bcm_sysport_set_tx_csum(struct net_device *dev,
} }
static int bcm_sysport_set_features(struct net_device *dev, static int bcm_sysport_set_features(struct net_device *dev,
netdev_features_t features) netdev_features_t features)
{ {
netdev_features_t changed = features ^ dev->features; netdev_features_t changed = features ^ dev->features;
netdev_features_t wanted = dev->wanted_features; netdev_features_t wanted = dev->wanted_features;
...@@ -261,7 +261,7 @@ static const struct bcm_sysport_stats bcm_sysport_gstrings_stats[] = { ...@@ -261,7 +261,7 @@ static const struct bcm_sysport_stats bcm_sysport_gstrings_stats[] = {
/* RXCHK misc statistics */ /* RXCHK misc statistics */
STAT_RXCHK("rxchk_bad_csum", mib.rxchk_bad_csum, RXCHK_BAD_CSUM_CNTR), STAT_RXCHK("rxchk_bad_csum", mib.rxchk_bad_csum, RXCHK_BAD_CSUM_CNTR),
STAT_RXCHK("rxchk_other_pkt_disc", mib.rxchk_other_pkt_disc, STAT_RXCHK("rxchk_other_pkt_disc", mib.rxchk_other_pkt_disc,
RXCHK_OTHER_DISC_CNTR), RXCHK_OTHER_DISC_CNTR),
/* RBUF misc statistics */ /* RBUF misc statistics */
STAT_RBUF("rbuf_ovflow_cnt", mib.rbuf_ovflow_cnt, RBUF_OVFL_DISC_CNTR), STAT_RBUF("rbuf_ovflow_cnt", mib.rbuf_ovflow_cnt, RBUF_OVFL_DISC_CNTR),
STAT_RBUF("rbuf_err_cnt", mib.rbuf_err_cnt, RBUF_ERR_PKT_CNTR), STAT_RBUF("rbuf_err_cnt", mib.rbuf_err_cnt, RBUF_ERR_PKT_CNTR),
...@@ -270,7 +270,7 @@ static const struct bcm_sysport_stats bcm_sysport_gstrings_stats[] = { ...@@ -270,7 +270,7 @@ static const struct bcm_sysport_stats bcm_sysport_gstrings_stats[] = {
#define BCM_SYSPORT_STATS_LEN ARRAY_SIZE(bcm_sysport_gstrings_stats) #define BCM_SYSPORT_STATS_LEN ARRAY_SIZE(bcm_sysport_gstrings_stats)
static void bcm_sysport_get_drvinfo(struct net_device *dev, static void bcm_sysport_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info) struct ethtool_drvinfo *info)
{ {
strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver)); strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
strlcpy(info->version, "0.1", sizeof(info->version)); strlcpy(info->version, "0.1", sizeof(info->version));
...@@ -303,7 +303,7 @@ static int bcm_sysport_get_sset_count(struct net_device *dev, int string_set) ...@@ -303,7 +303,7 @@ static int bcm_sysport_get_sset_count(struct net_device *dev, int string_set)
} }
static void bcm_sysport_get_strings(struct net_device *dev, static void bcm_sysport_get_strings(struct net_device *dev,
u32 stringset, u8 *data) u32 stringset, u8 *data)
{ {
int i; int i;
...@@ -311,8 +311,8 @@ static void bcm_sysport_get_strings(struct net_device *dev, ...@@ -311,8 +311,8 @@ static void bcm_sysport_get_strings(struct net_device *dev,
case ETH_SS_STATS: case ETH_SS_STATS:
for (i = 0; i < BCM_SYSPORT_STATS_LEN; i++) { for (i = 0; i < BCM_SYSPORT_STATS_LEN; i++) {
memcpy(data + i * ETH_GSTRING_LEN, memcpy(data + i * ETH_GSTRING_LEN,
bcm_sysport_gstrings_stats[i].stat_string, bcm_sysport_gstrings_stats[i].stat_string,
ETH_GSTRING_LEN); ETH_GSTRING_LEN);
} }
break; break;
default: default:
...@@ -362,7 +362,7 @@ static void bcm_sysport_update_mib_counters(struct bcm_sysport_priv *priv) ...@@ -362,7 +362,7 @@ static void bcm_sysport_update_mib_counters(struct bcm_sysport_priv *priv)
} }
static void bcm_sysport_get_stats(struct net_device *dev, static void bcm_sysport_get_stats(struct net_device *dev,
struct ethtool_stats *stats, u64 *data) struct ethtool_stats *stats, u64 *data)
{ {
struct bcm_sysport_priv *priv = netdev_priv(dev); struct bcm_sysport_priv *priv = netdev_priv(dev);
int i; int i;
...@@ -404,7 +404,7 @@ static void bcm_sysport_get_wol(struct net_device *dev, ...@@ -404,7 +404,7 @@ static void bcm_sysport_get_wol(struct net_device *dev,
} }
static int bcm_sysport_set_wol(struct net_device *dev, static int bcm_sysport_set_wol(struct net_device *dev,
struct ethtool_wolinfo *wol) struct ethtool_wolinfo *wol)
{ {
struct bcm_sysport_priv *priv = netdev_priv(dev); struct bcm_sysport_priv *priv = netdev_priv(dev);
struct device *kdev = &priv->pdev->dev; struct device *kdev = &priv->pdev->dev;
...@@ -419,9 +419,9 @@ static int bcm_sysport_set_wol(struct net_device *dev, ...@@ -419,9 +419,9 @@ static int bcm_sysport_set_wol(struct net_device *dev,
/* Program the SecureOn password */ /* Program the SecureOn password */
if (wol->wolopts & WAKE_MAGICSECURE) { if (wol->wolopts & WAKE_MAGICSECURE) {
umac_writel(priv, get_unaligned_be16(&wol->sopass[0]), umac_writel(priv, get_unaligned_be16(&wol->sopass[0]),
UMAC_PSW_MS); UMAC_PSW_MS);
umac_writel(priv, get_unaligned_be32(&wol->sopass[2]), umac_writel(priv, get_unaligned_be32(&wol->sopass[2]),
UMAC_PSW_LS); UMAC_PSW_LS);
} }
/* Flag the device and relevant IRQ as wakeup capable */ /* Flag the device and relevant IRQ as wakeup capable */
...@@ -464,7 +464,7 @@ static int bcm_sysport_rx_refill(struct bcm_sysport_priv *priv, ...@@ -464,7 +464,7 @@ static int bcm_sysport_rx_refill(struct bcm_sysport_priv *priv,
} }
mapping = dma_map_single(kdev, cb->skb->data, mapping = dma_map_single(kdev, cb->skb->data,
RX_BUF_LENGTH, DMA_FROM_DEVICE); RX_BUF_LENGTH, DMA_FROM_DEVICE);
ret = dma_mapping_error(kdev, mapping); ret = dma_mapping_error(kdev, mapping);
if (ret) { if (ret) {
bcm_sysport_free_cb(cb); bcm_sysport_free_cb(cb);
...@@ -528,22 +528,20 @@ static unsigned int bcm_sysport_desc_rx(struct bcm_sysport_priv *priv, ...@@ -528,22 +528,20 @@ static unsigned int bcm_sysport_desc_rx(struct bcm_sysport_priv *priv,
to_process = p_index - priv->rx_c_index; to_process = p_index - priv->rx_c_index;
netif_dbg(priv, rx_status, ndev, netif_dbg(priv, rx_status, ndev,
"p_index=%d rx_c_index=%d to_process=%d\n", "p_index=%d rx_c_index=%d to_process=%d\n",
p_index, priv->rx_c_index, to_process); p_index, priv->rx_c_index, to_process);
while ((processed < to_process) &&
(processed < budget)) {
while ((processed < to_process) && (processed < budget)) {
cb = &priv->rx_cbs[priv->rx_read_ptr]; cb = &priv->rx_cbs[priv->rx_read_ptr];
skb = cb->skb; skb = cb->skb;
dma_unmap_single(kdev, dma_unmap_addr(cb, dma_addr), dma_unmap_single(kdev, dma_unmap_addr(cb, dma_addr),
RX_BUF_LENGTH, DMA_FROM_DEVICE); RX_BUF_LENGTH, DMA_FROM_DEVICE);
/* Extract the Receive Status Block prepended */ /* Extract the Receive Status Block prepended */
rsb = (struct bcm_rsb *)skb->data; rsb = (struct bcm_rsb *)skb->data;
len = (rsb->rx_status_len >> DESC_LEN_SHIFT) & DESC_LEN_MASK; len = (rsb->rx_status_len >> DESC_LEN_SHIFT) & DESC_LEN_MASK;
status = (rsb->rx_status_len >> DESC_STATUS_SHIFT) & status = (rsb->rx_status_len >> DESC_STATUS_SHIFT) &
DESC_STATUS_MASK; DESC_STATUS_MASK;
processed++; processed++;
priv->rx_read_ptr++; priv->rx_read_ptr++;
...@@ -551,9 +549,9 @@ static unsigned int bcm_sysport_desc_rx(struct bcm_sysport_priv *priv, ...@@ -551,9 +549,9 @@ static unsigned int bcm_sysport_desc_rx(struct bcm_sysport_priv *priv,
priv->rx_read_ptr = 0; priv->rx_read_ptr = 0;
netif_dbg(priv, rx_status, ndev, netif_dbg(priv, rx_status, ndev,
"p=%d, c=%d, rd_ptr=%d, len=%d, flag=0x%04x\n", "p=%d, c=%d, rd_ptr=%d, len=%d, flag=0x%04x\n",
p_index, priv->rx_c_index, priv->rx_read_ptr, p_index, priv->rx_c_index, priv->rx_read_ptr,
len, status); len, status);
if (unlikely(!skb)) { if (unlikely(!skb)) {
netif_err(priv, rx_err, ndev, "out of memory!\n"); netif_err(priv, rx_err, ndev, "out of memory!\n");
...@@ -612,9 +610,9 @@ static unsigned int bcm_sysport_desc_rx(struct bcm_sysport_priv *priv, ...@@ -612,9 +610,9 @@ static unsigned int bcm_sysport_desc_rx(struct bcm_sysport_priv *priv,
} }
static void bcm_sysport_tx_reclaim_one(struct bcm_sysport_priv *priv, static void bcm_sysport_tx_reclaim_one(struct bcm_sysport_priv *priv,
struct bcm_sysport_cb *cb, struct bcm_sysport_cb *cb,
unsigned int *bytes_compl, unsigned int *bytes_compl,
unsigned int *pkts_compl) unsigned int *pkts_compl)
{ {
struct device *kdev = &priv->pdev->dev; struct device *kdev = &priv->pdev->dev;
struct net_device *ndev = priv->netdev; struct net_device *ndev = priv->netdev;
...@@ -623,8 +621,8 @@ static void bcm_sysport_tx_reclaim_one(struct bcm_sysport_priv *priv, ...@@ -623,8 +621,8 @@ static void bcm_sysport_tx_reclaim_one(struct bcm_sysport_priv *priv,
ndev->stats.tx_bytes += cb->skb->len; ndev->stats.tx_bytes += cb->skb->len;
*bytes_compl += cb->skb->len; *bytes_compl += cb->skb->len;
dma_unmap_single(kdev, dma_unmap_addr(cb, dma_addr), dma_unmap_single(kdev, dma_unmap_addr(cb, dma_addr),
dma_unmap_len(cb, dma_len), dma_unmap_len(cb, dma_len),
DMA_TO_DEVICE); DMA_TO_DEVICE);
ndev->stats.tx_packets++; ndev->stats.tx_packets++;
(*pkts_compl)++; (*pkts_compl)++;
bcm_sysport_free_cb(cb); bcm_sysport_free_cb(cb);
...@@ -632,7 +630,7 @@ static void bcm_sysport_tx_reclaim_one(struct bcm_sysport_priv *priv, ...@@ -632,7 +630,7 @@ static void bcm_sysport_tx_reclaim_one(struct bcm_sysport_priv *priv,
} else if (dma_unmap_addr(cb, dma_addr)) { } else if (dma_unmap_addr(cb, dma_addr)) {
ndev->stats.tx_bytes += dma_unmap_len(cb, dma_len); ndev->stats.tx_bytes += dma_unmap_len(cb, dma_len);
dma_unmap_page(kdev, dma_unmap_addr(cb, dma_addr), dma_unmap_page(kdev, dma_unmap_addr(cb, dma_addr),
dma_unmap_len(cb, dma_len), DMA_TO_DEVICE); dma_unmap_len(cb, dma_len), DMA_TO_DEVICE);
dma_unmap_addr_set(cb, dma_addr, 0); dma_unmap_addr_set(cb, dma_addr, 0);
} }
} }
...@@ -666,8 +664,8 @@ static unsigned int __bcm_sysport_tx_reclaim(struct bcm_sysport_priv *priv, ...@@ -666,8 +664,8 @@ static unsigned int __bcm_sysport_tx_reclaim(struct bcm_sysport_priv *priv,
last_tx_cn = num_tx_cbs - last_c_index + c_index; last_tx_cn = num_tx_cbs - last_c_index + c_index;
netif_dbg(priv, tx_done, ndev, netif_dbg(priv, tx_done, ndev,
"ring=%d c_index=%d last_tx_cn=%d last_c_index=%d\n", "ring=%d c_index=%d last_tx_cn=%d last_c_index=%d\n",
ring->index, c_index, last_tx_cn, last_c_index); ring->index, c_index, last_tx_cn, last_c_index);
while (last_tx_cn-- > 0) { while (last_tx_cn-- > 0) {
cb = ring->cbs + last_c_index; cb = ring->cbs + last_c_index;
...@@ -684,8 +682,8 @@ static unsigned int __bcm_sysport_tx_reclaim(struct bcm_sysport_priv *priv, ...@@ -684,8 +682,8 @@ static unsigned int __bcm_sysport_tx_reclaim(struct bcm_sysport_priv *priv,
netif_tx_wake_queue(txq); netif_tx_wake_queue(txq);
netif_dbg(priv, tx_done, ndev, netif_dbg(priv, tx_done, ndev,
"ring=%d c_index=%d pkts_compl=%d, bytes_compl=%d\n", "ring=%d c_index=%d pkts_compl=%d, bytes_compl=%d\n",
ring->index, ring->c_index, pkts_compl, bytes_compl); ring->index, ring->c_index, pkts_compl, bytes_compl);
return pkts_compl; return pkts_compl;
} }
...@@ -890,8 +888,9 @@ static int bcm_sysport_insert_tsb(struct sk_buff *skb, struct net_device *dev) ...@@ -890,8 +888,9 @@ static int bcm_sysport_insert_tsb(struct sk_buff *skb, struct net_device *dev)
csum_info |= L4_LENGTH_VALID; csum_info |= L4_LENGTH_VALID;
if (ip_proto == IPPROTO_UDP && ip_ver == ETH_P_IP) if (ip_proto == IPPROTO_UDP && ip_ver == ETH_P_IP)
csum_info |= L4_UDP; csum_info |= L4_UDP;
} else } else {
csum_info = 0; csum_info = 0;
}
tsb->l4_ptr_dest_map = csum_info; tsb->l4_ptr_dest_map = csum_info;
} }
...@@ -955,7 +954,7 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb, ...@@ -955,7 +954,7 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb,
mapping = dma_map_single(kdev, skb->data, skb_len, DMA_TO_DEVICE); mapping = dma_map_single(kdev, skb->data, skb_len, DMA_TO_DEVICE);
if (dma_mapping_error(kdev, mapping)) { if (dma_mapping_error(kdev, mapping)) {
netif_err(priv, tx_err, dev, "DMA map failed at %p (len=%d)\n", netif_err(priv, tx_err, dev, "DMA map failed at %p (len=%d)\n",
skb->data, skb_len); skb->data, skb_len);
ret = NETDEV_TX_OK; ret = NETDEV_TX_OK;
goto out; goto out;
} }
...@@ -973,7 +972,7 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb, ...@@ -973,7 +972,7 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb,
len_status = upper_32_bits(mapping) & DESC_ADDR_HI_MASK; len_status = upper_32_bits(mapping) & DESC_ADDR_HI_MASK;
len_status |= (skb_len << DESC_LEN_SHIFT); len_status |= (skb_len << DESC_LEN_SHIFT);
len_status |= (DESC_SOP | DESC_EOP | TX_STATUS_APP_CRC) << len_status |= (DESC_SOP | DESC_EOP | TX_STATUS_APP_CRC) <<
DESC_STATUS_SHIFT; DESC_STATUS_SHIFT;
if (skb->ip_summed == CHECKSUM_PARTIAL) if (skb->ip_summed == CHECKSUM_PARTIAL)
len_status |= (DESC_L4_CSUM << DESC_STATUS_SHIFT); len_status |= (DESC_L4_CSUM << DESC_STATUS_SHIFT);
...@@ -998,7 +997,7 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb, ...@@ -998,7 +997,7 @@ static netdev_tx_t bcm_sysport_xmit(struct sk_buff *skb,
netif_tx_stop_queue(txq); netif_tx_stop_queue(txq);
netif_dbg(priv, tx_queued, dev, "ring=%d desc_count=%d, curr_desc=%d\n", netif_dbg(priv, tx_queued, dev, "ring=%d desc_count=%d, curr_desc=%d\n",
ring->index, ring->desc_count, ring->curr_desc); ring->index, ring->desc_count, ring->curr_desc);
ret = NETDEV_TX_OK; ret = NETDEV_TX_OK;
out: out:
...@@ -1136,14 +1135,14 @@ static int bcm_sysport_init_tx_ring(struct bcm_sysport_priv *priv, ...@@ -1136,14 +1135,14 @@ static int bcm_sysport_init_tx_ring(struct bcm_sysport_priv *priv,
napi_enable(&ring->napi); napi_enable(&ring->napi);
netif_dbg(priv, hw, priv->netdev, netif_dbg(priv, hw, priv->netdev,
"TDMA cfg, size=%d, desc_cpu=%p\n", "TDMA cfg, size=%d, desc_cpu=%p\n",
ring->size, ring->desc_cpu); ring->size, ring->desc_cpu);
return 0; return 0;
} }
static void bcm_sysport_fini_tx_ring(struct bcm_sysport_priv *priv, static void bcm_sysport_fini_tx_ring(struct bcm_sysport_priv *priv,
unsigned int index) unsigned int index)
{ {
struct bcm_sysport_tx_ring *ring = &priv->tx_rings[index]; struct bcm_sysport_tx_ring *ring = &priv->tx_rings[index];
struct device *kdev = &priv->pdev->dev; struct device *kdev = &priv->pdev->dev;
...@@ -1174,7 +1173,7 @@ static void bcm_sysport_fini_tx_ring(struct bcm_sysport_priv *priv, ...@@ -1174,7 +1173,7 @@ static void bcm_sysport_fini_tx_ring(struct bcm_sysport_priv *priv,
/* RDMA helper */ /* RDMA helper */
static inline int rdma_enable_set(struct bcm_sysport_priv *priv, static inline int rdma_enable_set(struct bcm_sysport_priv *priv,
unsigned int enable) unsigned int enable)
{ {
unsigned int timeout = 1000; unsigned int timeout = 1000;
u32 reg; u32 reg;
...@@ -1201,7 +1200,7 @@ static inline int rdma_enable_set(struct bcm_sysport_priv *priv, ...@@ -1201,7 +1200,7 @@ static inline int rdma_enable_set(struct bcm_sysport_priv *priv,
/* TDMA helper */ /* TDMA helper */
static inline int tdma_enable_set(struct bcm_sysport_priv *priv, static inline int tdma_enable_set(struct bcm_sysport_priv *priv,
unsigned int enable) unsigned int enable)
{ {
unsigned int timeout = 1000; unsigned int timeout = 1000;
u32 reg; u32 reg;
...@@ -1272,8 +1271,8 @@ static int bcm_sysport_init_rx_ring(struct bcm_sysport_priv *priv) ...@@ -1272,8 +1271,8 @@ static int bcm_sysport_init_rx_ring(struct bcm_sysport_priv *priv)
rdma_writel(priv, 1, RDMA_MBDONE_INTR); rdma_writel(priv, 1, RDMA_MBDONE_INTR);
netif_dbg(priv, hw, priv->netdev, netif_dbg(priv, hw, priv->netdev,
"RDMA cfg, num_rx_bds=%d, rx_bds=%p\n", "RDMA cfg, num_rx_bds=%d, rx_bds=%p\n",
priv->num_rx_bds, priv->rx_bds); priv->num_rx_bds, priv->rx_bds);
return 0; return 0;
} }
...@@ -1293,8 +1292,8 @@ static void bcm_sysport_fini_rx_ring(struct bcm_sysport_priv *priv) ...@@ -1293,8 +1292,8 @@ static void bcm_sysport_fini_rx_ring(struct bcm_sysport_priv *priv)
cb = &priv->rx_cbs[i]; cb = &priv->rx_cbs[i];
if (dma_unmap_addr(cb, dma_addr)) if (dma_unmap_addr(cb, dma_addr))
dma_unmap_single(&priv->pdev->dev, dma_unmap_single(&priv->pdev->dev,
dma_unmap_addr(cb, dma_addr), dma_unmap_addr(cb, dma_addr),
RX_BUF_LENGTH, DMA_FROM_DEVICE); RX_BUF_LENGTH, DMA_FROM_DEVICE);
bcm_sysport_free_cb(cb); bcm_sysport_free_cb(cb);
} }
...@@ -1322,7 +1321,7 @@ static void bcm_sysport_set_rx_mode(struct net_device *dev) ...@@ -1322,7 +1321,7 @@ static void bcm_sysport_set_rx_mode(struct net_device *dev)
} }
static inline void umac_enable_set(struct bcm_sysport_priv *priv, static inline void umac_enable_set(struct bcm_sysport_priv *priv,
u32 mask, unsigned int enable) u32 mask, unsigned int enable)
{ {
u32 reg; u32 reg;
...@@ -1365,7 +1364,7 @@ static inline int umac_reset(struct bcm_sysport_priv *priv) ...@@ -1365,7 +1364,7 @@ static inline int umac_reset(struct bcm_sysport_priv *priv)
} }
static void umac_set_hw_addr(struct bcm_sysport_priv *priv, static void umac_set_hw_addr(struct bcm_sysport_priv *priv,
unsigned char *addr) unsigned char *addr)
{ {
umac_writel(priv, (addr[0] << 24) | (addr[1] << 16) | umac_writel(priv, (addr[0] << 24) | (addr[1] << 16) |
(addr[2] << 8) | addr[3], UMAC_MAC0); (addr[2] << 8) | addr[3], UMAC_MAC0);
...@@ -1474,7 +1473,7 @@ static int bcm_sysport_open(struct net_device *dev) ...@@ -1474,7 +1473,7 @@ static int bcm_sysport_open(struct net_device *dev)
ret = bcm_sysport_init_tx_ring(priv, i); ret = bcm_sysport_init_tx_ring(priv, i);
if (ret) { if (ret) {
netdev_err(dev, "failed to initialize TX ring %d\n", netdev_err(dev, "failed to initialize TX ring %d\n",
i); i);
goto out_free_tx_ring; goto out_free_tx_ring;
} }
} }
...@@ -1692,7 +1691,7 @@ static int bcm_sysport_probe(struct platform_device *pdev) ...@@ -1692,7 +1691,7 @@ static int bcm_sysport_probe(struct platform_device *pdev)
/* Request the WOL interrupt and advertise suspend if available */ /* Request the WOL interrupt and advertise suspend if available */
priv->wol_irq_disabled = 1; priv->wol_irq_disabled = 1;
ret = devm_request_irq(&pdev->dev, priv->wol_irq, ret = devm_request_irq(&pdev->dev, priv->wol_irq,
bcm_sysport_wol_isr, 0, dev->name, priv); bcm_sysport_wol_isr, 0, dev->name, priv);
if (!ret) if (!ret)
device_set_wakeup_capable(&pdev->dev, 1); device_set_wakeup_capable(&pdev->dev, 1);
...@@ -1717,10 +1716,10 @@ static int bcm_sysport_probe(struct platform_device *pdev) ...@@ -1717,10 +1716,10 @@ static int bcm_sysport_probe(struct platform_device *pdev)
priv->rev = topctrl_readl(priv, REV_CNTL) & REV_MASK; priv->rev = topctrl_readl(priv, REV_CNTL) & REV_MASK;
dev_info(&pdev->dev, dev_info(&pdev->dev,
"Broadcom SYSTEMPORT" REV_FMT "Broadcom SYSTEMPORT" REV_FMT
" at 0x%p (irqs: %d, %d, TXQs: %d, RXQs: %d)\n", " at 0x%p (irqs: %d, %d, TXQs: %d, RXQs: %d)\n",
(priv->rev >> 8) & 0xff, priv->rev & 0xff, (priv->rev >> 8) & 0xff, priv->rev & 0xff,
priv->base, priv->irq0, priv->irq1, txq, rxq); priv->base, priv->irq0, priv->irq1, txq, rxq);
return 0; return 0;
err: err:
...@@ -1869,7 +1868,7 @@ static int bcm_sysport_resume(struct device *d) ...@@ -1869,7 +1868,7 @@ static int bcm_sysport_resume(struct device *d)
ret = bcm_sysport_init_tx_ring(priv, i); ret = bcm_sysport_init_tx_ring(priv, i);
if (ret) { if (ret) {
netdev_err(dev, "failed to initialize TX ring %d\n", netdev_err(dev, "failed to initialize TX ring %d\n",
i); i);
goto out_free_tx_rings; goto out_free_tx_rings;
} }
} }
......
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