Commit 49a83f00 authored by Radhey Shyam Pandey's avatar Radhey Shyam Pandey Committed by David S. Miller

net: emaclite: Fix block comments style

This patch fixes below checkpatch warnings-

WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines
WARNING: networking block comments don't use an empty /* line,
use /* Comment
Signed-off-by: default avatarRadhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f713d50f
...@@ -70,7 +70,8 @@ ...@@ -70,7 +70,8 @@
#define XEL_TSR_XMIT_IE_MASK 0x00000008 /* Tx interrupt enable bit */ #define XEL_TSR_XMIT_IE_MASK 0x00000008 /* Tx interrupt enable bit */
#define XEL_TSR_XMIT_ACTIVE_MASK 0x80000000 /* Buffer is active, SW bit #define XEL_TSR_XMIT_ACTIVE_MASK 0x80000000 /* Buffer is active, SW bit
* only. This is not documented * only. This is not documented
* in the HW spec */ * in the HW spec
*/
/* Define for programming the MAC address into the EmacLite */ /* Define for programming the MAC address into the EmacLite */
#define XEL_TSR_PROG_MAC_ADDR (XEL_TSR_XMIT_BUSY_MASK | XEL_TSR_PROGRAM_MASK) #define XEL_TSR_PROG_MAC_ADDR (XEL_TSR_XMIT_BUSY_MASK | XEL_TSR_PROGRAM_MASK)
...@@ -336,7 +337,8 @@ static int xemaclite_send_data(struct net_local *drvdata, u8 *data, ...@@ -336,7 +337,8 @@ static int xemaclite_send_data(struct net_local *drvdata, u8 *data,
drvdata->next_tx_buf_to_use ^= XEL_BUFFER_OFFSET; drvdata->next_tx_buf_to_use ^= XEL_BUFFER_OFFSET;
} else if (drvdata->tx_ping_pong != 0) { } else if (drvdata->tx_ping_pong != 0) {
/* If the expected buffer is full, try the other buffer, /* If the expected buffer is full, try the other buffer,
* if it is configured in HW */ * if it is configured in HW
*/
addr = (void __iomem __force *)((u32 __force)addr ^ addr = (void __iomem __force *)((u32 __force)addr ^
XEL_BUFFER_OFFSET); XEL_BUFFER_OFFSET);
...@@ -357,7 +359,8 @@ static int xemaclite_send_data(struct net_local *drvdata, u8 *data, ...@@ -357,7 +359,8 @@ static int xemaclite_send_data(struct net_local *drvdata, u8 *data,
/* Update the Tx Status Register to indicate that there is a /* Update the Tx Status Register to indicate that there is a
* frame to send. Set the XEL_TSR_XMIT_ACTIVE_MASK flag which * frame to send. Set the XEL_TSR_XMIT_ACTIVE_MASK flag which
* is used by the interrupt handler to check whether a frame * is used by the interrupt handler to check whether a frame
* has been transmitted */ * has been transmitted
*/
reg_data = xemaclite_readl(addr + XEL_TSR_OFFSET); reg_data = xemaclite_readl(addr + XEL_TSR_OFFSET);
reg_data |= (XEL_TSR_XMIT_BUSY_MASK | XEL_TSR_XMIT_ACTIVE_MASK); reg_data |= (XEL_TSR_XMIT_BUSY_MASK | XEL_TSR_XMIT_ACTIVE_MASK);
xemaclite_writel(reg_data, addr + XEL_TSR_OFFSET); xemaclite_writel(reg_data, addr + XEL_TSR_OFFSET);
...@@ -395,7 +398,8 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data, int maxlen) ...@@ -395,7 +398,8 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data, int maxlen)
/* The instance is out of sync, try other buffer if other /* The instance is out of sync, try other buffer if other
* buffer is configured, return 0 otherwise. If the instance is * buffer is configured, return 0 otherwise. If the instance is
* out of sync, do not update the 'next_rx_buf_to_use' since it * out of sync, do not update the 'next_rx_buf_to_use' since it
* will correct on subsequent calls */ * will correct on subsequent calls
*/
if (drvdata->rx_ping_pong != 0) if (drvdata->rx_ping_pong != 0)
addr = (void __iomem __force *)((u32 __force)addr ^ addr = (void __iomem __force *)((u32 __force)addr ^
XEL_BUFFER_OFFSET); XEL_BUFFER_OFFSET);
...@@ -409,13 +413,15 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data, int maxlen) ...@@ -409,13 +413,15 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data, int maxlen)
return 0; /* No data was available */ return 0; /* No data was available */
} }
/* Get the protocol type of the ethernet frame that arrived */ /* Get the protocol type of the ethernet frame that arrived
*/
proto_type = ((ntohl(xemaclite_readl(addr + XEL_HEADER_OFFSET + proto_type = ((ntohl(xemaclite_readl(addr + XEL_HEADER_OFFSET +
XEL_RXBUFF_OFFSET)) >> XEL_HEADER_SHIFT) & XEL_RXBUFF_OFFSET)) >> XEL_HEADER_SHIFT) &
XEL_RPLR_LENGTH_MASK); XEL_RPLR_LENGTH_MASK);
/* Check if received ethernet frame is a raw ethernet frame /* Check if received ethernet frame is a raw ethernet frame
* or an IP packet or an ARP packet */ * or an IP packet or an ARP packet
*/
if (proto_type > ETH_DATA_LEN) { if (proto_type > ETH_DATA_LEN) {
if (proto_type == ETH_P_IP) { if (proto_type == ETH_P_IP) {
...@@ -431,7 +437,8 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data, int maxlen) ...@@ -431,7 +437,8 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data, int maxlen)
length = XEL_ARP_PACKET_SIZE + ETH_HLEN + ETH_FCS_LEN; length = XEL_ARP_PACKET_SIZE + ETH_HLEN + ETH_FCS_LEN;
else else
/* Field contains type other than IP or ARP, use max /* Field contains type other than IP or ARP, use max
* frame size and let user parse it */ * frame size and let user parse it
*/
length = ETH_FRAME_LEN + ETH_FCS_LEN; length = ETH_FRAME_LEN + ETH_FCS_LEN;
} else } else
/* Use the length in the frame, plus the header and trailer */ /* Use the length in the frame, plus the header and trailer */
...@@ -602,11 +609,11 @@ static void xemaclite_rx_handler(struct net_device *dev) ...@@ -602,11 +609,11 @@ static void xemaclite_rx_handler(struct net_device *dev)
return; return;
} }
/* /* A new skb should have the data halfword aligned, but this code is
* A new skb should have the data halfword aligned, but this code is
* here just in case that isn't true. Calculate how many * here just in case that isn't true. Calculate how many
* bytes we should reserve to get the data to start on a word * bytes we should reserve to get the data to start on a word
* boundary */ * boundary
*/
align = BUFFER_ALIGN(skb->data); align = BUFFER_ALIGN(skb->data);
if (align) if (align)
skb_reserve(skb, align); skb_reserve(skb, align);
...@@ -708,8 +715,8 @@ static int xemaclite_mdio_wait(struct net_local *lp) ...@@ -708,8 +715,8 @@ static int xemaclite_mdio_wait(struct net_local *lp)
unsigned long end = jiffies + 2; unsigned long end = jiffies + 2;
/* wait for the MDIO interface to not be busy or timeout /* wait for the MDIO interface to not be busy or timeout
after some time. * after some time.
*/ */
while (xemaclite_readl(lp->base_addr + XEL_MDIOCTRL_OFFSET) & while (xemaclite_readl(lp->base_addr + XEL_MDIOCTRL_OFFSET) &
XEL_MDIOCTRL_MDIOSTS_MASK) { XEL_MDIOCTRL_MDIOSTS_MASK) {
if (time_before_eq(end, jiffies)) { if (time_before_eq(end, jiffies)) {
...@@ -1029,7 +1036,8 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev) ...@@ -1029,7 +1036,8 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
if (xemaclite_send_data(lp, (u8 *) new_skb->data, len) != 0) { if (xemaclite_send_data(lp, (u8 *) new_skb->data, len) != 0) {
/* If the Emaclite Tx buffer is busy, stop the Tx queue and /* If the Emaclite Tx buffer is busy, stop the Tx queue and
* defer the skb for transmission during the ISR, after the * defer the skb for transmission during the ISR, after the
* current transmission is complete */ * current transmission is complete
*/
netif_stop_queue(dev); netif_stop_queue(dev);
lp->deferred_skb = new_skb; lp->deferred_skb = new_skb;
/* Take the time stamp now, since we can't do this in an ISR. */ /* Take the time stamp now, since we can't do this in an ISR. */
......
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