linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* T1E1 cards
@ 2009-10-23 17:08 Bob Beers
  2009-10-23 21:03 ` Bob Beers
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Bob Beers @ 2009-10-23 17:08 UTC (permalink / raw)
  To: linux-hotplug

Hi list,

I have a 4-port T1E1 card with this lspci output:

# lspci -n -s05:08
05:08.0 0280: 14f1:8474 (rev 0c)
05:08.1 0680: 14f1:8474 (rev 0c)
# lspci -v -s05:08
05:08.0 Network controller: Conexant Systems, Inc. Unknown device 8474 (rev 0c)
        Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 74
        BIST result: 00
        Memory at fe900000 (32-bit, non-prefetchable) [size=1M]

05:08.1 Bridge: Conexant Systems, Inc. Unknown device 8474 (rev 0c)
        Flags: 66MHz, medium devsel, IRQ 82
        Memory at fea00000 (32-bit, non-prefetchable) [size=1M]


I have the (GPL, but not in-kernel) driver compiled and when I
 manually modprobe it, I get a low level device. Then I have to
 set up the ports and create channels using the card specific
 cfg utility.  At this point I see new devices which I can manipulate
 with my if[up|down]-hdlc scripts.  Unfortunately, they are ethX
 instead of hdlcX, but it all still works.

So, finally, here are my questions:

1 - How can I get the driver to load automatically, and execute the
 cfg calls to create the low level device?

2 - What is the proper way to create the upper devices as hdlcX
 vs. ethX?  I know that I can use 'ip link set dev eth4 name hdlc0'
 or something like ifrename for renaming once they're created,
 but maybe I can change something in the driver code to have
 them start out with the right interface name.

Thanks in advance for any hints or links to the fine reading materials.

-Bob Beers

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: T1E1 cards
  2009-10-23 17:08 T1E1 cards Bob Beers
@ 2009-10-23 21:03 ` Bob Beers
  2009-10-23 22:17 ` Greg KH
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Bob Beers @ 2009-10-23 21:03 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Oct 23, 2009 at 1:08 PM, Bob Beers <bob.beers@gmail.com> wrote:
> So, finally, here are my questions:
>
> 1 - How can I get the driver to load automatically, and execute the
>  cfg calls to create the low level device?
>

Does this look like a sane first attempt?

I created /etc/udev/rules.d/10-local.rules with this line:

SUBSYSTEM="pci", DEVICE='0000:05:08.0", SYSFS{vendor}="14f1",
SYSFS{device}="8474", RUN+="/sbin/modprobe pmcc4"

I tried this, but did not see my driver module get loaded on next reboot.

Where can I see udev log?  Must I change udev_log in /etc/udev/udev.conf?
 It is currently udev_log=err.

Am I completely on the wrong track?

-Bob Beers

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: T1E1 cards
  2009-10-23 17:08 T1E1 cards Bob Beers
  2009-10-23 21:03 ` Bob Beers
@ 2009-10-23 22:17 ` Greg KH
  2009-10-23 22:45 ` Matthew Dharm
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2009-10-23 22:17 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Oct 23, 2009 at 01:08:49PM -0400, Bob Beers wrote:
> Hi list,
> 
> I have a 4-port T1E1 card with this lspci output:
> 
> # lspci -n -s05:08
> 05:08.0 0280: 14f1:8474 (rev 0c)
> 05:08.1 0680: 14f1:8474 (rev 0c)
> # lspci -v -s05:08
> 05:08.0 Network controller: Conexant Systems, Inc. Unknown device 8474 (rev 0c)
>         Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 74
>         BIST result: 00
>         Memory at fe900000 (32-bit, non-prefetchable) [size=1M]
> 
> 05:08.1 Bridge: Conexant Systems, Inc. Unknown device 8474 (rev 0c)
>         Flags: 66MHz, medium devsel, IRQ 82
>         Memory at fea00000 (32-bit, non-prefetchable) [size=1M]
> 
> 
> I have the (GPL, but not in-kernel) driver compiled and when I
>  manually modprobe it, I get a low level device. Then I have to
>  set up the ports and create channels using the card specific
>  cfg utility.  At this point I see new devices which I can manipulate
>  with my if[up|down]-hdlc scripts.  Unfortunately, they are ethX
>  instead of hdlcX, but it all still works.
> 
> So, finally, here are my questions:
> 
> 1 - How can I get the driver to load automatically, and execute the
>  cfg calls to create the low level device?

Fix the driver to have it load automatically.  Do you have a pointer to
the source code for it anywhere?

> 2 - What is the proper way to create the upper devices as hdlcX
>  vs. ethX?

The driver should do this for you.

>  I know that I can use 'ip link set dev eth4 name hdlc0'
>  or something like ifrename for renaming once they're created,
>  but maybe I can change something in the driver code to have
>  them start out with the right interface name.

Yes, you can, or you can write a udev rule to rename the device when it
is seen.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: T1E1 cards
  2009-10-23 17:08 T1E1 cards Bob Beers
  2009-10-23 21:03 ` Bob Beers
  2009-10-23 22:17 ` Greg KH
@ 2009-10-23 22:45 ` Matthew Dharm
  2009-10-26 13:29 ` Bob Beers
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Matthew Dharm @ 2009-10-23 22:45 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 947 bytes --]

On Fri, Oct 23, 2009 at 05:03:05PM -0400, Bob Beers wrote:
> On Fri, Oct 23, 2009 at 1:08 PM, Bob Beers <bob.beers@gmail.com> wrote:
> > So, finally, here are my questions:
> >
> > 1 - How can I get the driver to load automatically, and execute the
> >  cfg calls to create the low level device?
> >
> 
> Does this look like a sane first attempt?
> 
> I created /etc/udev/rules.d/10-local.rules with this line:
> 
> SUBSYSTEM=="pci", DEVICE=='0000:05:08.0", SYSFS{vendor}=="14f1",
> SYSFS{device}=="8474", RUN+="/sbin/modprobe pmcc4"

The quotes around the DEVICE don't match.  Or is that just a typo in the
email (and not in the rules file)?

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

Sir, for the hundreth time, we do NOT carry 600-round boxes of belt-fed 
suction darts!
					-- Salesperson to Greg
User Friendly, 12/30/1997

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: T1E1 cards
  2009-10-23 17:08 T1E1 cards Bob Beers
                   ` (2 preceding siblings ...)
  2009-10-23 22:45 ` Matthew Dharm
@ 2009-10-26 13:29 ` Bob Beers
  2009-10-26 13:50 ` Bob Beers
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Bob Beers @ 2009-10-26 13:29 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Oct 23, 2009 at 6:45 PM, Matthew Dharm
<mdharm-usb@one-eyed-alien.net> wrote:
> On Fri, Oct 23, 2009 at 05:03:05PM -0400, Bob Beers wrote:
>> On Fri, Oct 23, 2009 at 1:08 PM, Bob Beers <bob.beers@gmail.com> wrote:
>> > So, finally, here are my questions:
>> >
>> > 1 - How can I get the driver to load automatically, and execute the
>> >  cfg calls to create the low level device?
>> >
>>
>> Does this look like a sane first attempt?
>>
>> I created /etc/udev/rules.d/10-local.rules with this line:
>>
>> SUBSYSTEM="pci", DEVICE='0000:05:08.0", SYSFS{vendor}="14f1",
>> SYSFS{device}="8474", RUN+="/sbin/modprobe pmcc4"
>
> The quotes around the DEVICE don't match.  Or is that just a typo in the
> email (and not in the rules file)?
>

Hi Matt,

Good eyes.  I fixed that mismatch and it does now load the pmcc4 driver
 on  boot-up.  Now I'll see if I can replace the RUN+= argument with a more
 complete script to create the chan devices and rename them to hdlcX.

Thanks a lot,

-Bob Beers

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: T1E1 cards
  2009-10-23 17:08 T1E1 cards Bob Beers
                   ` (3 preceding siblings ...)
  2009-10-26 13:29 ` Bob Beers
@ 2009-10-26 13:50 ` Bob Beers
  2009-10-26 18:25 ` Bob Beers
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Bob Beers @ 2009-10-26 13:50 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Oct 23, 2009 at 6:17 PM, Greg KH <greg@kroah.com> wrote:
> On Fri, Oct 23, 2009 at 01:08:49PM -0400, Bob Beers wrote:
<snip>
>> 1 - How can I get the driver to load automatically, and execute the
>>  cfg calls to create the low level device?
>
> Fix the driver to have it load automatically.  Do you have a pointer to
> the source code for it anywhere?
>

Hi Greg,

 I got the code from OneStopSystems, it is for their wanPMC-CxT1E1
card.  They have a public ftp site. the file is
<ftp://ftp.onestopsystems.com/WAN-PMC-C4T1E1%20driver%20linux/wanPMC_CxT1E1_Linux_3_1B.tgz>.
(I don't know the proper etiquette for getting the login credentials to you.
 I don't think there is any problem with me sharing them with you,
 but I'm just not sure they should be published on the list.)

>> 2 - What is the proper way to create the upper devices as hdlcX
>>  vs. ethX?
>
> The driver should do this for you.

I am interested in seeing if I can make the necessary changes to the driver code
 to have this happen, but maybe this belongs in a different forum now?

>
>>  I know that I can use 'ip link set dev eth4 name hdlc0'
>>  or something like ifrename for renaming once they're created,
>>  but maybe I can change something in the driver code to have
>>  them start out with the right interface name.
>
> Yes, you can, or you can write a udev rule to rename the device when it
> is seen.
>

Since I have made a successful udev rule (thanks, Matt) to notice the card
 and load the driver, I think I will continue down this path for the short term.

> thanks,
>
> greg k-h
>

Thanks for your help,

-Bob Beers

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: T1E1 cards
  2009-10-23 17:08 T1E1 cards Bob Beers
                   ` (4 preceding siblings ...)
  2009-10-26 13:50 ` Bob Beers
@ 2009-10-26 18:25 ` Bob Beers
  2009-10-26 18:34 ` Greg KH
  2009-10-26 20:01 ` Bob Beers
  7 siblings, 0 replies; 9+ messages in thread
From: Bob Beers @ 2009-10-26 18:25 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Oct 26, 2009 at 9:50 AM, Bob Beers <bob.beers@gmail.com> wrote:
> On Fri, Oct 23, 2009 at 6:17 PM, Greg KH <greg@kroah.com> wrote:
>> On Fri, Oct 23, 2009 at 01:08:49PM -0400, Bob Beers wrote:
> <snip>
>>> 2 - What is the proper way to create the upper devices as hdlcX
>>>  vs. ethX?
>>
>> The driver should do this for you.
>
> I am interested in seeing if I can make the necessary changes to the driver code
>  to have this happen, but maybe this belongs in a different forum now?
>

Greg,

 How do I move forward with this path -- fixing the driver?

I have created a script[1] and call it in an
/etc/udev/rules.d/10-local.rules, but
 now the ether interfaces and the hdlc interfaces are created at almost the
 same time, and it seems like a real mess to sort out:

# ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: pmcc4-0: <> mtu 0 qdisc noop
    link/void
3: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:80:82:70:f8:9e brd ff:ff:ff:ff:ff:ff
4: eth1: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 32
    link/rawhdlc
    inet 192.168.10.47/24 brd 192.168.10.255 scope global eth1
5: eth2: <POINTOPOINT,NOARP> mtu 1500 qdisc noop qlen 32
    link/rawhdlc
6: eth3: <POINTOPOINT,NOARP> mtu 1500 qdisc noop qlen 32
    link/rawhdlc
7: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:80:82:70:f8:9f brd ff:ff:ff:ff:ff:ff
8: eth5: <POINTOPOINT,NOARP> mtu 1500 qdisc noop qlen 32
    link/rawhdlc
9: eth6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:80:82:70:f8:a0 brd ff:ff:ff:ff:ff:ff
10: eth7: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:80:82:70:f8:a1 brd ff:ff:ff:ff:ff:ff

I tried changing my local.rules file to 70-local.rules but,
 of course, the order that the interfaces appear is not reliable.

Shall I start a thread on net-dev, for advice on fixing the driver?

Thanks for any advice,

-Bob Beers

[1]
-------------------
# cat /etc/sysconfig/network-scripts/pmcinit.sh
#!/bin/sh

/sbin/modprobe pmcc4
for i in 0 1 2 3; do
        /sbin/pmcc4cfg port set -p$i -c0 -m T1_ESF
        /sbin/pmcc4cfg chan create -p$i -n$i
        /sbin/pmcc4cfg chan set -t RXTX -m HDLC_FCS16 -o 0-23 -n$i
done
-------------------

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: T1E1 cards
  2009-10-23 17:08 T1E1 cards Bob Beers
                   ` (5 preceding siblings ...)
  2009-10-26 18:25 ` Bob Beers
@ 2009-10-26 18:34 ` Greg KH
  2009-10-26 20:01 ` Bob Beers
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2009-10-26 18:34 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Oct 26, 2009 at 02:25:40PM -0400, Bob Beers wrote:
> On Mon, Oct 26, 2009 at 9:50 AM, Bob Beers <bob.beers@gmail.com> wrote:
> > On Fri, Oct 23, 2009 at 6:17 PM, Greg KH <greg@kroah.com> wrote:
> >> On Fri, Oct 23, 2009 at 01:08:49PM -0400, Bob Beers wrote:
> > <snip>
> >>> 2 - What is the proper way to create the upper devices as hdlcX
> >>>  vs. ethX?
> >>
> >> The driver should do this for you.
> >
> > I am interested in seeing if I can make the necessary changes to the driver code
> >  to have this happen, but maybe this belongs in a different forum now?
> >
> 
> Greg,
> 
>  How do I move forward with this path -- fixing the driver?

Try posting a copy of the driver somewhere we can see it :)

What is the license of the code?  And why isn't it already in the main
kernel tree?

> Shall I start a thread on net-dev, for advice on fixing the driver?

Yes, if the license allows it to be fixed.

Feel free to cc: me on the thread.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: T1E1 cards
  2009-10-23 17:08 T1E1 cards Bob Beers
                   ` (6 preceding siblings ...)
  2009-10-26 18:34 ` Greg KH
@ 2009-10-26 20:01 ` Bob Beers
  7 siblings, 0 replies; 9+ messages in thread
From: Bob Beers @ 2009-10-26 20:01 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Oct 26, 2009 at 2:34 PM, Greg KH <greg@kroah.com> wrote:
> On Mon, Oct 26, 2009 at 02:25:40PM -0400, Bob Beers wrote:
>>  How do I move forward with this path -- fixing the driver?
>
> Try posting a copy of the driver somewhere we can see it :)
>
> What is the license of the code?  And why isn't it already in the main
> kernel tree?
>

It is GPL.  I don't know, it has been available for years, but
 the ownership has moved a few times.  Anyway, I just got the
 ok from One Stop Systems to discuss and post the code.

>> Shall I start a thread on net-dev, for advice on fixing the driver?
>
> Yes, if the license allows it to be fixed.

I think so,

>
> Feel free to cc: me on the thread.

I will.

>
> thanks,
>
> greg k-h
>

Thank you!

-Bob Beers

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-10-26 20:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-23 17:08 T1E1 cards Bob Beers
2009-10-23 21:03 ` Bob Beers
2009-10-23 22:17 ` Greg KH
2009-10-23 22:45 ` Matthew Dharm
2009-10-26 13:29 ` Bob Beers
2009-10-26 13:50 ` Bob Beers
2009-10-26 18:25 ` Bob Beers
2009-10-26 18:34 ` Greg KH
2009-10-26 20:01 ` Bob Beers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).