[PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well.

Subsystems: networking drivers, the rest

STALE3868d

5 messages, 5 authors, 2016-01-11 · open the first message on its own page

[PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well.

From: Manjeet Pawar <hidden>
Date: 2016-01-11 09:03:26

This patch enable network driver support for ARM64

Signed-off-by: Akhilesh Kumar <redacted>
Signed-off-by: Manjeet Pawar <redacted>
---
 drivers/net/ethernet/smsc/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig
index eb9230e..6e73c73 100644
--- a/drivers/net/ethernet/smsc/Kconfig
+++ b/drivers/net/ethernet/smsc/Kconfig
@@ -77,7 +77,7 @@ config SMC911X
 	tristate "SMSC LAN911[5678] support"
 	select CRC32
 	select MII
-	depends on (ARM || SUPERH || MN10300)
+	depends on (ARM || ARM64 || SUPERH || MN10300)
 	---help---
 	  This is a driver for SMSC's LAN911x series of Ethernet chipsets
 	  including the new LAN9115, LAN9116, LAN9117, and LAN9118.
-- 
1.7.9.5

Re: [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well.

From: Sergei Shtylyov <hidden>
Date: 2016-01-11 14:10:27

Hello.

On 01/11/2016 12:02 PM, Manjeet Pawar wrote:
quoted hunk
This patch enable network driver support for ARM64

Signed-off-by: Akhilesh Kumar <redacted>
Signed-off-by: Manjeet Pawar <redacted>
---
  drivers/net/ethernet/smsc/Kconfig |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig
index eb9230e..6e73c73 100644
--- a/drivers/net/ethernet/smsc/Kconfig
+++ b/drivers/net/ethernet/smsc/Kconfig
@@ -77,7 +77,7 @@ config SMC911X
  	tristate "SMSC LAN911[5678] support"
  	select CRC32
  	select MII
-	depends on (ARM || SUPERH || MN10300)
+	depends on (ARM || ARM64 || SUPERH || MN10300)
    Could as well drop useless parens...

[...]

MBR, Sergei

Re: [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well.

From: Paul Gortmaker <hidden>
Date: 2016-01-11 15:19:01

On 2016-01-11 04:02 AM, Manjeet Pawar wrote:
This patch enable network driver support for ARM64
Your commit log only repeats what is obvious from the one line
change itself.  It might be nice to indicate what platform it
was validated on, what tests were run and what features of the
driver were exercised (multicast, netpoll, ...)

Imagine if I sent you a similar patch where I added MIPS and
said nothing more than "enable network driver support for MIPS"
and Cc'd you expecting you to comment on whether it was OK.

Thanks,
Paul.

Re: [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well.

From: kbuild test robot <hidden>
Date: 2016-01-11 22:33:25

Hi Manjeet,

[auto build test WARNING on net-next/master]
[also build test WARNING on v4.4 next-20160111]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Manjeet-Pawar/smsc-Enabling-SMSC-LAN911-driver-for-ARM64-as-well/20160111-170643
config: arm64-allmodconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm64 

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/smsc/smc911x.c: In function 'smc911x_hardware_send_pkt':
quoted
drivers/net/ethernet/smsc/smc911x.c:475:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     buf = (char*)((u32)skb->data & ~0x3);
                   ^
quoted
drivers/net/ethernet/smsc/smc911x.c:475:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     buf = (char*)((u32)skb->data & ~0x3);
           ^
   drivers/net/ethernet/smsc/smc911x.c:476:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     len = (skb->len + 3 + ((u32)skb->data & 3)) & ~0x3;
                            ^
   drivers/net/ethernet/smsc/smc911x.c:477:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     cmdA = (((u32)skb->data & 0x3) << 16) |
              ^

vim +475 drivers/net/ethernet/smsc/smc911x.c

dcdf8710 drivers/net/ethernet/smsc/smc911x.c Ben Boeckel     2013-11-01  459  	DBG(SMC_DEBUG_FUNC | SMC_DEBUG_TX, dev, "--> %s\n", __func__);
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  460  	BUG_ON(lp->pending_tx_skb == NULL);
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  461  
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  462  	skb = lp->pending_tx_skb;
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  463  	lp->pending_tx_skb = NULL;
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  464  
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  465  	/* cmdA {25:24] data alignment [20:16] start offset [10:0] buffer length */
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  466  	/* cmdB {31:16] pkt tag [10:0] length */
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  467  #ifdef SMC_USE_DMA
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  468  	/* 16 byte buffer alignment mode */
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  469  	buf = (char*)((u32)(skb->data) & ~0xF);
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  470  	len = (skb->len + 0xF + ((u32)skb->data & 0xF)) & ~0xF;
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  471  	cmdA = (1<<24) | (((u32)skb->data & 0xF)<<16) |
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  472  			TX_CMD_A_INT_FIRST_SEG_ | TX_CMD_A_INT_LAST_SEG_ |
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  473  			skb->len;
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  474  #else
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19 @475  	buf = (char*)((u32)skb->data & ~0x3);
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  476  	len = (skb->len + 3 + ((u32)skb->data & 3)) & ~0x3;
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  477  	cmdA = (((u32)skb->data & 0x3) << 16) |
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  478  			TX_CMD_A_INT_FIRST_SEG_ | TX_CMD_A_INT_LAST_SEG_ |
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  479  			skb->len;
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  480  #endif
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  481  	/* tag is packet length so we can use this in stats update later */
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  482  	cmdB = (skb->len  << 16) | (skb->len & 0x7FF);
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  483  

:::::: The code at line 475 was first introduced by commit
:::::: 0a0c72c9118c4e63080eb409f0cfdf15808d23a4 [PATCH] RE: [PATCH 1/1] net driver: Add support for SMSC LAN911x line of ethernet chips

:::::: TO: Dustin McIntire [off-list ref]
:::::: CC: Jeff Garzik [off-list ref]

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Re: [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well.

From: David Miller <davem@davemloft.net>
Date: 2016-01-11 22:45:52

From: Manjeet Pawar <redacted>
Date: Mon, 11 Jan 2016 14:32:25 +0530
This patch enable network driver support for ARM64

Signed-off-by: Akhilesh Kumar <redacted>
Signed-off-by: Manjeet Pawar <redacted>
There is no _WAY_ this is valid.

This driver casts skb->data pointers to "u32" integers
and then casts it back to a pointer and proceeds to
dereference that pointer.

I don't think you even looked at the build when trying to
compile this on a 64-bit machine.

That makes me have absolutely no confidence in the changes
you submit to me.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help