mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Peter Holik" <peter@holik.at>
To: "Florian Fainelli" <florian@openwrt.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb driver for intellon based PLC like devolo dlan duo
Date: Sat, 18 Apr 2009 08:48:22 +0200 (CEST)	[thread overview]
Message-ID: <a3ca03e82d9afad72346dc5b4ae251c7.squirrel@webmail.it-technology.at> (raw)
In-Reply-To: <200904171632.26091.florian@openwrt.org>

> Hi Peter,
>
> Nice to see such a driver coming up!

thanks

> Le Friday 17 April 2009 16:10:24 Peter Holik, vous avez écrit :
>> Signed-off-by: Peter Holik <peter@holik.at>
>> ---
>>  drivers/net/usb/Kconfig    |    7 +
>>  drivers/net/usb/Makefile   |    2 +-
>>  drivers/net/usb/intellon.c |  273
>> ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 281
>> insertions(+), 1 deletions(-)
>>  create mode 100644 drivers/net/usb/intellon.c
>>
>> diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
>> index 8ee2103..068faa5 100644
>> --- a/drivers/net/usb/Kconfig
>> +++ b/drivers/net/usb/Kconfig
>> @@ -345,4 +345,11 @@ config USB_HSO
>>  	  To compile this driver as a module, choose M here: the
>>  	  module will be called hso.
>>
>> +config USB_NET_INTELLON
>> +	tristate "Intellon PLC based usb adapter"
>> +	depends on USB_USBNET
>> +	help
>> +	  Choose this option if you're using a PLC (Powerline Communications)
>> +	  solution with an Intellon chip, like the "devolo dLan duo".
>> +
>
> Please be more specific, i.e: using a USB-based PLC (...) solution.

> There might be support for PLC PHYs connected to a MII-bus in a near future, even
> though they will not reside in drivers/net/usb/.

What do you mean with the last sentence?

>>  endmenu
>> diff --git a/drivers/net/usb/Makefile b/drivers/net/usb/Makefile
>> index 88a87ee..0fccfe9 100644
>> --- a/drivers/net/usb/Makefile
>> +++ b/drivers/net/usb/Makefile
>> @@ -19,4 +19,4 @@ obj-$(CONFIG_USB_NET_CDC_SUBSET)	+= cdc_subset.o
>>  obj-$(CONFIG_USB_NET_ZAURUS)	+= zaurus.o
>>  obj-$(CONFIG_USB_NET_MCS7830)	+= mcs7830.o
>>  obj-$(CONFIG_USB_USBNET)	+= usbnet.o
>> -
>> +obj-$(CONFIG_USB_NET_INTELLON)	+= intellon.o
>
> I would not name this intellon for the same reasons as explained below, but
> rather int51x1.c since this driver will for instance not work with HomePlug
> AV designs which use different Intellon integrated chips like the 6000 and
> 6300 series.

work in progress...

>> diff --git a/drivers/net/usb/intellon.c b/drivers/net/usb/intellon.c
>> new file mode 100644
>> index 0000000..c9fcc38
>> --- /dev/null
>> +++ b/drivers/net/usb/intellon.c
>> @@ -0,0 +1,273 @@
>> +/*
>> + * Copyright (c) 2009 Peter Holik
>> + *
>> + * Intellon PLC (Powerline Communications) usb net driver
>
> Intellon INT51x1 PLC ...
> [snip]
>
>> +
>> +static u8 nibble(unsigned char c)
>> +{
>> +	if (likely(isdigit(c)))
>> +		return c - '0';
>> +	c = toupper(c);
>> +	if (likely(isxdigit(c)))
>> +		return 10 + c - 'A';
>> +	return 0;
>> +}
>
> Please prefix this with intellon_ (or int51x1_) for instance to avoid any
> possible namespace clash.
>
>> +
>> +static inline int get_ethernet_addr(struct usbnet *dev)
>> +{
>> +	int             tmp, i;
>> +	unsigned char   buf [13];
>> +
>> +	tmp = usb_string(dev->udev, 3, buf, sizeof buf);
>> +	if (tmp != 12) {
>> +		devdbg(dev, "bad MAC string fetch, %d\n", tmp);
>> +		if (tmp >= 0)
>> +			tmp = -EINVAL;
>> +		return tmp;
>> +	}
>> +	for (i = tmp = 0; i < 6; i++, tmp += 2)
>> +		dev->net->dev_addr [i] =
>> +			(nibble(buf [tmp]) << 4) + nibble(buf [tmp + 1]);
>> +	return 0;
>> +}
>
> Same here.

Disagree, because i've taken "nibble" and "get_ethernet_addr" from cdc_ether.c
to have the same code (the version of Jan was different).

> Please fix the intellon prefixing with something more specific to the driver
> like int51x1_ and I am ok with that driver.

ok

cu Peter


  parent reply	other threads:[~2009-04-18  6:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17 14:10 Peter Holik
2009-04-17 14:32 ` Florian Fainelli
2009-04-17 19:07   ` Guennadi Liakhovetski
2009-04-18  8:55     ` David Miller
2009-04-18 19:54       ` Guennadi Liakhovetski
2009-04-19  4:15         ` David Miller
2009-04-19  4:24           ` David Miller
2009-04-19  8:32           ` Guennadi Liakhovetski
2009-04-19  8:35             ` David Miller
2009-04-18  6:48   ` Peter Holik [this message]
2009-04-18 10:22     ` Florian Fainelli
2009-04-18 13:42       ` Jon Smirl
2009-04-17 14:41 ` Oliver Neukum
2009-04-18  7:16   ` Peter Holik
2009-04-18  7:38     ` Oliver Neukum
2009-04-18  8:41       ` Peter Holik
2009-04-18  8:49         ` Oliver Neukum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3ca03e82d9afad72346dc5b4ae251c7.squirrel@webmail.it-technology.at \
    --to=peter@holik.at \
    --cc=florian@openwrt.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®