2005-01-10 14:53:11

by Adam Anthony

[permalink] [raw]
Subject: [PATCH] /driver/net/wan/sbs520

SGI and Kernel Maintainers,
With the permission of my employer, SBS Technologies, Inc., I have
released a patch for 2.4 kernels that supports the 520 Series of WAN
adapters. (A similar patch for 2.6 kernels will soon follow) The driver
itself has been tested by many customers, but as of this morning, the patch
has only been tested by me.
I have created a Source Forge project for the patch/GPL driver, which
can be viewed at the following location:
"https://sourceforge.net/projects/sbs520lnxdrv/". The patch can be
downloaded directly from the following link:
"http://prdownloads.sourceforge.net/sbs520lnxdrv/sbs520patch.bz2?download"
It would be great to receive some feedback on our work, and we hope
that this driver will eventually be added to the kernel.
Best regards,
Adam

Signed-off-by: Adam T. Anthony <[email protected]>



For limitations on the use and distribution of this message, please visit http://www.sbs.com/emaildisclaimer.


2005-01-10 16:49:20

by Alexey Dobriyan

[permalink] [raw]
Subject: Re: [PATCH] /driver/net/wan/sbs520

On Mon, 10 Jan 2005 07:46:52 -0700, Adam Anthony wrote:

> With the permission of my employer, SBS Technologies, Inc., I have
> released a patch for 2.4 kernels that supports the 520 Series of WAN
> adapters.

My editor shows ^M at the end of every line of new Documentation/Configure.help,
MAINTAINERS (add ~63400 bogus lines!). Please, look at the patch _after_
generating it.

> +obj-$(CONFIG_LANMEDIA) += syncppp.o^M

> +subdir-$(CONFIG_LANMEDIA) += lmc^M

Also random ^M's.

--- linux-2.4.28-virgin/drivers/net/wan/sbs520/lnxosl.c
+++ /usr/src/linux-2.4.28/drivers/net/wan/sbs520/lnxosl.c

> +// Programming Language: C^M
> +// Target Processor: Any^M
> +// Target Operating System: Linux^M

Well, this is pretty obvious to everyone here. :-)

> +// This software may be used and distributed according to the terms^M
> +// of the GNU General Public License, incorporated herein by reference.^M

Stupid question: do you mean GPL version 2 or something else?

Alexey

2005-01-10 17:48:07

by Matthias-Christian Ott

[permalink] [raw]
Subject: Re: [PATCH] /driver/net/wan/sbs520

Alexey Dobriyan wrote:

>On Mon, 10 Jan 2005 07:46:52 -0700, Adam Anthony wrote:
>
>
>
>>With the permission of my employer, SBS Technologies, Inc., I have
>>released a patch for 2.4 kernels that supports the 520 Series of WAN
>>adapters.
>>
>>
>
>My editor shows ^M at the end of every line of new Documentation/Configure.help,
>MAINTAINERS (add ~63400 bogus lines!). Please, look at the patch _after_
>generating it.
>
>
>
>>+obj-$(CONFIG_LANMEDIA) += syncppp.o^M
>>
>>
>
>
>
>>+subdir-$(CONFIG_LANMEDIA) += lmc^M
>>
>>
>
>Also random ^M's.
>
>--- linux-2.4.28-virgin/drivers/net/wan/sbs520/lnxosl.c
>+++ /usr/src/linux-2.4.28/drivers/net/wan/sbs520/lnxosl.c
>
>
>
>>+// Programming Language: C^M
>>+// Target Processor: Any^M
>>+// Target Operating System: Linux^M
>>
>>
>
>Well, this is pretty obvious to everyone here. :-)
>
>
>
>>+// This software may be used and distributed according to the terms^M
>>+// of the GNU General Public License, incorporated herein by reference.^M
>>
>>
>
>Stupid question: do you mean GPL version 2 or something else?
>
> Alexey
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>
>
That's ugly, that are Microsoft line endings.

Matthias-Christian Ott

2005-01-10 18:23:13

by Francois Romieu

[permalink] [raw]
Subject: Re: [PATCH] /driver/net/wan/sbs520

Adam Anthony <[email protected]> :
[...]
> It would be great to receive some feedback on our work, and we hope
> that this driver will eventually be added to the kernel.

It will probably require a few extra steps:
- read Documentation/CodingStyle (mixed case, typedef from hell, ugly #ifdef);
- grep ^static
-> no static functions ? Uh ?
- use non-obsolete API (pci_find_device in 2005 ?);
- convert the os independant wrappers.

Btw it would probably make sense 1) to figure out what can be merged with
the in-tree DSCC4 driver and 2) to integrate the driver with the existing
hdlc stack. Imho there is some duplicated work/code.

--
Ueimor

2005-01-10 19:51:48

by Adam Anthony

[permalink] [raw]
Subject: RE: [PATCH] /driver/net/wan/sbs520

Thank you for the heads up A&M. I have destroyed the evil [^M]'s, and
updated the package.
http://prdownloads.sourceforge.net/sbs520lnxdrv/sbs520patch.bz2?download
-AA


-----Original Message-----
From: Matthias-Christian Ott [mailto:[email protected]]
Sent: Monday, January 10, 2005 12:26 PM
To: Alexey Dobriyan
Cc: Adam Anthony; [email protected]; [email protected]
Subject: Re: [PATCH] /driver/net/wan/sbs520

Alexey Dobriyan wrote:

>On Mon, 10 Jan 2005 07:46:52 -0700, Adam Anthony wrote:
>
>
>
>>With the permission of my employer, SBS Technologies, Inc., I have
>>released a patch for 2.4 kernels that supports the 520 Series of WAN
>>adapters.
>>
>>
>
>My editor shows ^M at the end of every line of new
Documentation/Configure.help,
>MAINTAINERS (add ~63400 bogus lines!). Please, look at the patch _after_
>generating it.
>
>
>
>>+obj-$(CONFIG_LANMEDIA) += syncppp.o^M
>>
>>
>
>
>
>>+subdir-$(CONFIG_LANMEDIA) += lmc^M
>>
>>
>
>Also random ^M's.
>
>--- linux-2.4.28-virgin/drivers/net/wan/sbs520/lnxosl.c
>+++ /usr/src/linux-2.4.28/drivers/net/wan/sbs520/lnxosl.c
>
>
>
>>+// Programming Language: C^M
>>+// Target Processor: Any^M
>>+// Target Operating System: Linux^M
>>
>>
>
>Well, this is pretty obvious to everyone here. :-)
>
>
>
>>+// This software may be used and distributed according to the terms^M
>>+// of the GNU General Public License, incorporated herein by reference.^M
>>
>>
>
>Stupid question: do you mean GPL version 2 or something else?
>
> Alexey
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>
>
That's ugly, that are Microsoft line endings.

Matthias-Christian Ott

***This message has been scanned for virus, spam, and undesirable
content.***
***For further information, contact your mail administrator.***

For limitations on the use and distribution of this message, please visit http://www.sbs.com/emaildisclaimer.

2005-01-10 20:24:16

by Stephen Hemminger

[permalink] [raw]
Subject: Re: [PATCH] /driver/net/wan/sbs520

Like most vendor drivers, this looks ugly full of obfuscating typedef's
and MixedCase. Please make it conform to linux style.

Also, all global's should be static where possible to avoid name space pollution.
Replace volatile with wmb() and rmb() which is probably what you need anyway.
Don't bury volatile inside typedef.s


2005-01-10 20:40:11

by Francois Romieu

[permalink] [raw]
Subject: Re: [PATCH] /driver/net/wan/sbs520

Adam Anthony <[email protected]> :
> Thank you for the heads up A&M. I have destroyed the evil [^M]'s, and
> updated the package.
> http://prdownloads.sourceforge.net/sbs520lnxdrv/sbs520patch.bz2?download

o OsMapPhysToVirt
-> should be ioremap/pci_iomap()

o OsUnMapVirt
-> iounmap, etc.

o OsAllocateNonPagedMemory/OsMemcpy/OsStall/OsSleep/OsZeroMem
-> useless wrappers.

o OsAllocateDeviceMemory
Yuck, virt_to_bus !
Please read:
- linux-2.6.x/Documentation/DMA-mapping.txt
- linux-2.6.x/Documentation/DMA-API.txt
drivers/net/*.c provides a lot of good examples for recent PCI
devices.

o OsReadPciConfiguration
Please see pci_resource_{start/len} and friends.

At this point, lnxosl.c will be removable and nobody will regret it.

--
Ueimor

2005-01-10 20:52:28

by Adam Anthony

[permalink] [raw]
Subject: RE: [PATCH] /driver/net/wan/sbs520

The SBS Communications group structured their software this way
(w/useless wrappers) to make files portable from one operating system to
another. Now that this package will be taking a life of its own, the change
you propose makes perfect sense.
Thanks,
Adam

-----Original Message-----
From: Francois Romieu [mailto:[email protected]]
Sent: Monday, January 10, 2005 3:30 PM
To: Adam Anthony
Cc: Matthias-Christian Ott; Alexey Dobriyan; [email protected];
[email protected]
Subject: Re: [PATCH] /driver/net/wan/sbs520

o OsMapPhysToVirt
-> should be ioremap/pci_iomap()

o OsUnMapVirt
-> iounmap, etc.

o OsAllocateNonPagedMemory/OsMemcpy/OsStall/OsSleep/OsZeroMem
-> useless wrappers.

o OsAllocateDeviceMemory
Yuck, virt_to_bus !
Please read:
- linux-2.6.x/Documentation/DMA-mapping.txt
- linux-2.6.x/Documentation/DMA-API.txt
drivers/net/*.c provides a lot of good examples for recent PCI
devices.

o OsReadPciConfiguration
Please see pci_resource_{start/len} and friends.

At this point, lnxosl.c will be removable and nobody will regret it.

--
Ueimor

For limitations on the use and distribution of this message, please visit http://www.sbs.com/emaildisclaimer.