Re: Multiple USB ethernet devices on one usb port (with hub)?

2003-09-29 Thread Andrew Thomas
Bernd,

Bernd Walter <[EMAIL PROTECTED]> wrote:
> You might take power consumption into acount.
> If your hub is not powered it can't supply more then 100mA per port.
> check the required consumption of your ethernet devices with
> usbdevs -v.  In case they require more then 100mA you *must* use
> a self powered hub.  Many cheap hub lie about their power state,
> but that doesn't change the requirements at all.

Thanks for the pointer!  It looks like I need to try a powered
hub:

laptop# usbdevs -v
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x),
 Intel(0x), rev 1.00
port 1 addr 2: full speed, power 300 mA, config 1, USB 2.0 Ethernet
 adapter(0x1040), BayNETGEAR(0x0846), rev 0.01
port 2 powered

I'll scrounge up a powered one and report back.

Thanks again.

Andy

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Multiple USB ethernet devices on one usb port (with hub)?

2003-09-29 Thread Bernd Walter
On Sat, Sep 27, 2003 at 10:34:04AM -0700, Andrew Thomas wrote:
> --- Ian Dowse <[EMAIL PROTECTED]> wrote:
> > There is definitely one problem that stops you from using two
> > identical USB ethernet devices, but I don't know if it's the only
> > one: the "axe" driver uses a static (global) stucture for some
> > per-interface data, so it clobbers this state with two interfaces.
> > 
> > I had said to Bill Paul (cc'd) that I would suggest a patch to fix
> > this, but I never managed to get my two USB ethernet interfaces in
> > the same place at the same time to test them! Would you be able to
> > try out the following patch to see if it helps? Just apply it in
> > /usr/src and rebuild the kernel.
> 
> To follow up on this...
> 
> I tried Ian's changes to no avail.  I applied the patches and rebuilt
> the kernel.  Upon rebooting with both netgear fa120 ethernet devices
> attached (with the new axe driver), both devices are recognized, one
> is configured and nothing works (i.e., in spite of the one device
> being configured, it is dead).

You might take power consumption into acount.
If your hub is not powered it can't supply more then 100mA per port.
check the required consumption of  your ethernet devices with
usbdevs -v.
In case they require more then 100mA you *must* use a self powered
hub.
Many cheap hub lie about their power state, but that doesn't change
the requirements at all.

-- 
B.Walter   BWCThttp://www.bwct.de
[EMAIL PROTECTED]  [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Multiple USB ethernet devices on one usb port (with hub)?

2003-09-27 Thread Andrew Thomas
--- Ian Dowse <[EMAIL PROTECTED]> wrote:
> There is definitely one problem that stops you from using two
> identical USB ethernet devices, but I don't know if it's the only
> one: the "axe" driver uses a static (global) stucture for some
> per-interface data, so it clobbers this state with two interfaces.
> 
> I had said to Bill Paul (cc'd) that I would suggest a patch to fix
> this, but I never managed to get my two USB ethernet interfaces in
> the same place at the same time to test them! Would you be able to
> try out the following patch to see if it helps? Just apply it in
> /usr/src and rebuild the kernel.

To follow up on this...

I tried Ian's changes to no avail.  I applied the patches and rebuilt
the kernel.  Upon rebooting with both netgear fa120 ethernet devices
attached (with the new axe driver), both devices are recognized, one
is configured and nothing works (i.e., in spite of the one device
being configured, it is dead).

Thanks for the help Ian.

I wonder if anyone else has any ideas.  Or, maybe I should head over
to the 'current' group and try there?

Andy

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Multiple USB ethernet devices on one usb port (with hub)?

2003-09-24 Thread Ian Dowse
In message <[EMAIL PROTECTED]>, Andrew Thomas 
writes:
>I've got an older Dell Latitude (CPi) laptop that I'm trying to
>setup as a router/firewall/??? machine.  I'm using 5.1-R with a
>compiled kernel that I'm slowly reducing to the minimum I need.
>
>I decided to try using usb ethernet adapters since they seemed
>so easy.  However, the laptop only has one usb port.  So, I
>picked up a cheap 4 port hub so I could connect my two adapters
>(both netgear FA120 devices).
>
>The boot log shows that both devices are recognized.  However,
>only one gets configured properly (it gets an address and
>actually works).  The other adapter can't be configured (at
>boot time or on the command line).  This is whether the devices
>are plugged in before booting or after.  If I try to remove
>either of them after booting I usually get a kernel panic and
>a reboot.
>
>Am I trying to do something that can't be done (do I need two
>physical ports on the machine for this to work)?  Is this
>merely a bug in 5.1 that would be fixed if I go to 'CURRENT'?
>Does anyone have any comments?  For completeness I'm appending
>the relevant lines from my config.
>
>Any help would be appreciated.

There is definitely one problem that stops you from using two
identical USB ethernet devices, but I don't know if it's the only
one: the "axe" driver uses a static (global) stucture for some
per-interface data, so it clobbers this state with two interfaces.

I had said to Bill Paul (cc'd) that I would suggest a patch to fix
this, but I never managed to get my two USB ethernet interfaces in
the same place at the same time to test them! Would you be able to
try out the following patch to see if it helps? Just apply it in
/usr/src and rebuild the kernel.

Thanks,

Ian

Index: sys/dev/usb/if_axe.c
===
RCS file: /dump/FreeBSD-CVS/src/sys/dev/usb/if_axe.c,v
retrieving revision 1.7
diff -u -r1.7 if_axe.c
--- sys/dev/usb/if_axe.c24 Aug 2003 17:55:54 -  1.7
+++ sys/dev/usb/if_axe.c24 Sep 2003 23:26:45 -
@@ -118,8 +118,6 @@
{ 0, 0 }
 };
 
-Static struct usb_qdat axe_qdat;
-
 Static int axe_match(device_ptr_t);
 Static int axe_attach(device_ptr_t);
 Static int axe_detach(device_ptr_t);
@@ -521,8 +519,8 @@
ifp->if_baudrate = 1000;
ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
 
-   axe_qdat.ifp = ifp;
-   axe_qdat.if_rxstart = axe_rxstart;
+   sc->axe_qdat.ifp = ifp;
+   sc->axe_qdat.if_rxstart = axe_rxstart;
 
if (mii_phy_probe(self, &sc->axe_miibus,
axe_ifmedia_upd, axe_ifmedia_sts)) {
@@ -724,7 +722,7 @@
}
 
ifp->if_ipackets++;
-   m->m_pkthdr.rcvif = (struct ifnet *)&axe_qdat;
+   m->m_pkthdr.rcvif = (struct ifnet *)&sc->axe_qdat;
m->m_pkthdr.len = m->m_len = total_len;
 
/* Put the packet on the special USB input queue. */
Index: sys/dev/usb/if_axereg.h
===
RCS file: /dump/FreeBSD-CVS/src/sys/dev/usb/if_axereg.h,v
retrieving revision 1.2
diff -u -r1.2 if_axereg.h
--- sys/dev/usb/if_axereg.h 15 Jun 2003 21:45:43 -  1.2
+++ sys/dev/usb/if_axereg.h 24 Sep 2003 23:25:52 -
@@ -168,6 +168,7 @@
unsigned char   axe_ipgs[3];
unsigned char   axe_phyaddrs[2];
struct timeval  axe_rx_notice;
+   struct usb_qdat axe_qdat;
 };
 
 #if 0
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"