diff mbox

[5/5] net-next:asix: update VERSION and white space changes

Message ID 1321312921-7748-5-git-send-email-grundler@chromium.org
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Grant Grundler Nov. 14, 2011, 11:22 p.m. UTC
No functional changes. Three things targeted:
o update VERSION to reflect previous changes.
o fix up white space/formatting of some lines
o define 150 to be AX_SWRESET_MDELAY (self documenting code)

Signed-off-by: Grant Grundler <grundler@chromium.org>
---
 drivers/net/usb/asix.c |   46 +++++++++++++++++++++-------------------------
 1 files changed, 21 insertions(+), 25 deletions(-)

Comments

David Miller Nov. 14, 2011, 11:42 p.m. UTC | #1
From: Grant Grundler <grundler@chromium.org>
Date: Mon, 14 Nov 2011 15:22:01 -0800

> No functional changes. Three things targeted:
> o update VERSION to reflect previous changes.
> o fix up white space/formatting of some lines
> o define 150 to be AX_SWRESET_MDELAY (self documenting code)
> 
> Signed-off-by: Grant Grundler <grundler@chromium.org>

Why have such a wonderful set of real bug fixes that I can apply right
now and send off to Linus's tree, only to sabotage it with whitespace
changes at the end which are no appropriate?

Please, just submit this without the whitespace and other cleanup
stuff.  Restrict it to real bug fixes, and I'll push it around.

The whitespace and other bits can be submitted for net-next afterwards.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Grant Grundler Nov. 15, 2011, 12:39 a.m. UTC | #2
On Mon, Nov 14, 2011 at 3:42 PM, David Miller <davem@davemloft.net> wrote:
> From: Grant Grundler <grundler@chromium.org>
> Date: Mon, 14 Nov 2011 15:22:01 -0800
>
>> No functional changes. Three things targeted:
>> o update VERSION to reflect previous changes.
>> o fix up white space/formatting of some lines
>> o define 150 to be AX_SWRESET_MDELAY (self documenting code)
>>
>> Signed-off-by: Grant Grundler <grundler@chromium.org>
>
> Why have such a wonderful set of real bug fixes that I can apply right
> now and send off to Linus's tree, only to sabotage it with whitespace
> changes at the end which are no appropriate?
>
> Please, just submit this without the whitespace and other cleanup
> stuff.  Restrict it to real bug fixes, and I'll push it around.

No Problem! :)

I wasn't expecting this to go to linus immediately but it makes that it should.

> The whitespace and other bits can be submitted for net-next afterwards.

Will do.

cheers,
grant
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Grant Grundler Nov. 15, 2011, 12:54 a.m. UTC | #3
On Mon, Nov 14, 2011 at 3:42 PM, David Miller <davem@davemloft.net> wrote:
...
> Please, just submit this without the whitespace and other cleanup
> stuff.  Restrict it to real bug fixes, and I'll push it around.

I just sent a "v2" of 5/5 patch which only has the VERSION change. Is
that sufficient or should I resend all 5?

thanks!
grant
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Nov. 15, 2011, 2:32 a.m. UTC | #4
From: Grant Grundler <grundler@chromium.org>
Date: Mon, 14 Nov 2011 16:54:35 -0800

> On Mon, Nov 14, 2011 at 3:42 PM, David Miller <davem@davemloft.net> wrote:
> ...
>> Please, just submit this without the whitespace and other cleanup
>> stuff.  Restrict it to real bug fixes, and I'll push it around.
> 
> I just sent a "v2" of 5/5 patch which only has the VERSION change. Is
> that sufficient or should I resend all 5?

Just respinning #5 is fine, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Nov. 15, 2011, 2:41 a.m. UTC | #5
From: David Miller <davem@davemloft.net>

Date: Mon, 14 Nov 2011 21:32:55 -0500 (EST)

> From: Grant Grundler <grundler@chromium.org>

> Date: Mon, 14 Nov 2011 16:54:35 -0800

> 

>> On Mon, Nov 14, 2011 at 3:42 PM, David Miller <davem@davemloft.net> wrote:

>> ...

>>> Please, just submit this without the whitespace and other cleanup

>>> stuff.  Restrict it to real bug fixes, and I'll push it around.

>> 

>> I just sent a "v2" of 5/5 patch which only has the VERSION change. Is

>> that sufficient or should I resend all 5?

> 

> Just respinning #5 is fine, thanks.


But the fact that the other bits don't even compile... that's not fine.

drivers/net/usb/asix.c: In function ‘ax88178_bind’:
drivers/net/usb/asix.c:1463:2: error: implicit declaration of function ‘ax88178_sw_reset’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

[davem@boricha net]$ git grep ax88178_sw_reset
drivers/net/usb/asix.c:	ax88178_sw_reset(dev, 0);

Come on man... are you kidding me?
David Miller Nov. 15, 2011, 2:45 a.m. UTC | #6
From: David Miller <davem@davemloft.net>
Date: Mon, 14 Nov 2011 21:41:51 -0500 (EST)

> Come on man... are you kidding me?

Want to know what really pisses me off about this?

All of Mark Lord's hard work to bring the entire vendor driver over
was thrown out.

And it was thrown out in favor of this!  Code that doesn't even
compile.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Lord Nov. 15, 2011, 3:19 p.m. UTC | #7
On 11-11-14 09:45 PM, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Mon, 14 Nov 2011 21:41:51 -0500 (EST)
> 
>> Come on man... are you kidding me?
> 
> Want to know what really pisses me off about this?
> 
> All of Mark Lord's hard work to bring the entire vendor driver over
> was thrown out.


Well, ASIX and I appear to be back on track again.

So once the dust settles in net-dev with Grant's patches,
I will take over development of the asix driver,
and start sending you (Dave) patches to merge the
rest of the vendor's driver code.

With luck, it might all make it in there in time for the next (3.3) merge.

Cheers
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Grant Grundler Nov. 15, 2011, 3:58 p.m. UTC | #8
On Mon, Nov 14, 2011 at 6:45 PM, David Miller <davem@davemloft.net> wrote:
> From: David Miller <davem@davemloft.net>
> Date: Mon, 14 Nov 2011 21:41:51 -0500 (EST)
>
>> Come on man... are you kidding me?

Dave,
my apologies. That's obviously my fail.

The problem is I can't test your git tree on my systems...but I should
have at least compile tested it. Or just submitted the changes
straight from chromium.org tree. *sigh*

> Want to know what really pisses me off about this?
>
> All of Mark Lord's hard work to bring the entire vendor driver over
> was thrown out.

Not entirely correct as Mark pointed out. I was able to convince ASIX
they should be working with Mark and they committed to doing so.

> And it was thrown out in favor of this!  Code that doesn't even
> compile.

*sigh* sorry...I'll resubmit the entire mess and compile test first. /o\

thanks for your patience,
grant
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Nov. 15, 2011, 9:41 p.m. UTC | #9
From: Mark Lord <kernel@teksavvy.com>
Date: Tue, 15 Nov 2011 10:19:59 -0500

> On 11-11-14 09:45 PM, David Miller wrote:
>> From: David Miller <davem@davemloft.net>
>> Date: Mon, 14 Nov 2011 21:41:51 -0500 (EST)
>> 
>>> Come on man... are you kidding me?
>> 
>> Want to know what really pisses me off about this?
>> 
>> All of Mark Lord's hard work to bring the entire vendor driver over
>> was thrown out.
> 
> 
> Well, ASIX and I appear to be back on track again.

That's great news.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index c07dd26..29598dc 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -36,7 +36,7 @@ 
 #include <linux/usb/usbnet.h>
 #include <linux/slab.h>
 
-#define DRIVER_VERSION "26-Sep-2011"
+#define DRIVER_VERSION "08-Nov-2011"
 #define DRIVER_NAME "asix"
 
 /* ASIX AX8817X based USB 2.0 Ethernet Devices */
@@ -94,6 +94,8 @@ 
 #define AX_SWRESET_IPRL			0x20
 #define AX_SWRESET_IPPD			0x40
 
+#define AX_SWRESET_MDELAY	150
+
 #define AX88772_IPG0_DEFAULT		0x15
 #define AX88772_IPG1_DEFAULT		0x0c
 #define AX88772_IPG2_DEFAULT		0x12
@@ -494,9 +496,9 @@  static int asix_sw_reset(struct usbnet *dev, u8 flags)
 {
 	int ret;
 
-        ret = asix_write_cmd(dev, AX_CMD_SW_RESET, flags, 0, 0, NULL);
+	ret = asix_write_cmd(dev, AX_CMD_SW_RESET, flags, 0, 0, NULL);
 	if (ret < 0)
-		netdev_err(dev->net, "Failed to send software reset: %02x\n", ret);
+		netdev_err(dev->net, "Failed to send SW_RESET: %02x\n", ret);
 
 	return ret;
 }
@@ -540,7 +542,6 @@  static u16 asix_read_medium_status(struct usbnet *dev)
 	}
 
 	return le16_to_cpu(v);
-
 }
 
 static int asix_write_medium_mode(struct usbnet *dev, u16 mode)
@@ -792,9 +793,9 @@  static int asix_set_mac_address(struct net_device *net, void *p)
 	return 0;
 }
 
-/* We need to override some ethtool_ops so we require our
-   own structure so we don't interfere with other usbnet
-   devices that may be connected at the same time. */
+/* We override some ethtool_ops to access per device data.
+ * Multiple usbnet devices may be connected at the same time.
+ */
 static const struct ethtool_ops ax88172_ethtool_ops = {
 	.get_drvinfo		= asix_get_drvinfo,
 	.get_link		= asix_get_link,
@@ -994,25 +995,20 @@  static int ax88772_reset(struct usbnet *dev)
 	if (ret < 0)
 		goto out;
 
-	msleep(150);
+	msleep(AX_SWRESET_MDELAY);
 
 	ret = asix_sw_reset(dev, AX_SWRESET_CLEAR);
 	if (ret < 0)
 		goto out;
 
-	msleep(150);
+	msleep(AX_SWRESET_MDELAY);
 
-	if (embd_phy) {
-		ret = asix_sw_reset(dev, AX_SWRESET_IPRL);
-		if (ret < 0)
-			goto out;
-	} else {
-		ret = asix_sw_reset(dev, AX_SWRESET_PRTE);
-		if (ret < 0)
-			goto out;
-	}
+	ret = asix_sw_reset(dev, embd_phy ? AX_SWRESET_IPRL : AX_SWRESET_PRTE);
+	if (ret < 0)
+		goto out;
+
+	msleep(AX_SWRESET_MDELAY);
 
-	msleep(150);
 	rx_ctl = asix_read_rx_ctl(dev);
 	dbg("RX_CTL is 0x%04x after software reset", rx_ctl);
 	ret = asix_write_rx_ctl(dev, 0x0000);
@@ -1026,13 +1022,13 @@  static int ax88772_reset(struct usbnet *dev)
 	if (ret < 0)
 		goto out;
 
-	msleep(150);
+	msleep(AX_SWRESET_MDELAY);
 
 	ret = asix_sw_reset(dev, AX_SWRESET_IPRL | AX_SWRESET_PRL);
 	if (ret < 0)
 		goto out;
 
-	msleep(150);
+	msleep(AX_SWRESET_MDELAY);
 
 	asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET);
 	asix_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE,
@@ -1290,10 +1286,10 @@  static int ax88178_reset(struct usbnet *dev)
 	asix_write_cmd(dev, AX_CMD_SW_PHY_SELECT, 0, 0, 0, NULL);
 
 	asix_sw_reset(dev, 0);
-	msleep(150);
+	msleep(AX_SWRESET_MDELAY);
 
 	asix_sw_reset(dev, AX_SWRESET_PRL | AX_SWRESET_IPPD);
-	msleep(150);
+	msleep(AX_SWRESET_MDELAY);
 
 	asix_write_rx_ctl(dev, 0);
 
@@ -1672,13 +1668,13 @@  static struct usb_driver asix_driver = {
 
 static int __init asix_init(void)
 {
- 	return usb_register(&asix_driver);
+	return usb_register(&asix_driver);
 }
 module_init(asix_init);
 
 static void __exit asix_exit(void)
 {
- 	usb_deregister(&asix_driver);
+	usb_deregister(&asix_driver);
 }
 module_exit(asix_exit);