Re: [linux-usb-devel] Fwd: Re: linux as a hub?
Hi Matt, Do you work for the government? Replacing a $1 hub chip with a $1000 computer? :) More below: On Mon, 11 Dec 2006, Matt wrote: Hi, I'm wondering if it's feasible to implement a gadget driver that turns a Linux system into a hub. The hub specification in the usb spec, which I admit to not reading, is fairly hefty and makes me think there's probably a fair bit more to it then just proxying data to an outbound port or one of the gadget developers would have done it already. This is something I'd like to try to do so any thoughts or comments would be much appreciated. Where would one start? Cheers, It isn't possible. Alan is right, it is not possible. The main reason is the required timings. Hubs have very strict requirements in terms of the number of bit times things can be delayed passing through a hub. This is so 5 hubs can be connected together in a line and the ack/nak/stall following an EOP can still meet the required timing. Among other problems, a full-speed hub has to be able to handle both low-speed and full-speed devices attached to its downstream ports, in spite of the fact that the upstream port is full-speed. If a low-speed device was attached to a downstream port then the upstream port would receive data at low speed, and would not be able to understand that data or forward it to the downstream port. This is not true. Alan, you are confusing High speed with Full speed. All full and low speed transactions appear on the downstream ports of all full speed hubs. Upstream only goes up through the chain directly to the root - what I mean is hubs don't echo downstream data that is going upstream. But the upstream data is still sent at low speed, if that is what the device sends. A PRE pid is sent to tell full speed devices that a low speed packet is coming. This is mainly so the hubs can direct the low speed traffic downstream. It is true that a low speed device should never see a full speed bit stream. Regards, Steve _ Talk now to your Hotmail contacts with Windows Live Messenger. http://clk.atdmt.com/MSN/go/msnnkwme002001msn/direct/01/?href=http://get.live.com/messenger/overview - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Fwd: Re: linux as a hub?
On Mon, 11 Dec 2006, Steve Calfee wrote: Among other problems, a full-speed hub has to be able to handle both low-speed and full-speed devices attached to its downstream ports, in spite of the fact that the upstream port is full-speed. If a low-speed device was attached to a downstream port then the upstream port would receive data at low speed, and would not be able to understand that data or forward it to the downstream port. This is not true. Alan, you are confusing High speed with Full speed. All full and low speed transactions appear on the downstream ports of all full speed hubs. Upstream only goes up through the chain directly to the root - what I mean is hubs don't echo downstream data that is going upstream. But the upstream data is still sent at low speed, if that is what the device sends. You misunderstood me. I was talking about downstream data, not upstream data. Data destined for a device behind a hub is received at the hub's upstream-facing port at the speed used by the device, not the speed used by the hub. In more detail: Suppose you have a Linux box with a full-speed USB device interface as the upstream port and you want to use it as though it were a hub, connecting to a low-speed device on the downstream side. Now when the actual host (i.e., not the Linux box mentioned above but the host connected to its upstream port) wants to talk to the low-speed device, it will send a packet using low-speed bit timings. This packet will not be received by the Linux box's device interface, which can handle only full-speed timings. Hence the Linux box won't be aware of the packet and won't forward it to the low-speed device. Alan Stern - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Fwd: Re: linux as a hub?
From: Alan Stern [EMAIL PROTECTED] To: Steve Calfee [EMAIL PROTECTED] CC: linux-usb-devel@lists.sourceforge.net Subject: Re: [linux-usb-devel] Fwd: Re: linux as a hub? Date: Mon, 11 Dec 2006 15:27:23 -0500 (EST) On Mon, 11 Dec 2006, Steve Calfee wrote: Among other problems, a full-speed hub has to be able to handle both low-speed and full-speed devices attached to its downstream ports, in spite of the fact that the upstream port is full-speed. If a low-speed device was attached to a downstream port then the upstream port would receive data at low speed, and would not be able to understand that data or forward it to the downstream port. This is not true. Alan, you are confusing High speed with Full speed. All full and low speed transactions appear on the downstream ports of all full speed hubs. Upstream only goes up through the chain directly to the root - what I mean is hubs don't echo downstream data that is going upstream. But the upstream data is still sent at low speed, if that is what the device sends. You misunderstood me. I was talking about downstream data, not upstream data. Data destined for a device behind a hub is received at the hub's upstream-facing port at the speed used by the device, not the speed used by the hub. In more detail: Suppose you have a Linux box with a full-speed USB device interface as the upstream port and you want to use it as though it were a hub, connecting to a low-speed device on the downstream side. Now when the actual host (i.e., not the Linux box mentioned above but the host connected to its upstream port) wants to talk to the low-speed device, it will send a packet using low-speed bit timings. This packet will not be received by the Linux box's device interface, which can handle only full-speed timings. Hence the Linux box won't be aware of the packet and won't forward it to the low-speed device. Alan Stern Oh, I see I did misunderstand you, sorry. What you are saying is that whatever gadget hardware interface you have on your PC cannot recognize a PRE pid and downshift to low speed. That is probably true - I have never seen one in any gadget type USB interface. But a HW interface could do that (for example, all fs hubs) - but it still would not be possilble to emulate a hub without real hub repeater electronics in the hw interface. Sorry about the noise, Steve _ All-in-one security and maintenance for your PC. Get a free 90-day trial! http://clk.atdmt.com/MSN/go/msnnkwlo005002msn/direct/01/?href=http://clk.atdmt.com/MSN/go/msnnkwlo005001msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Fwd: Re: linux as a hub?
On Monday 11 December 2006 1:18 pm, Steve Calfee wrote: But a HW interface could do that (for example, all fs hubs) - but it still would not be possilble to emulate a hub without real hub repeater electronics in the hw interface. I've seen 8 bit microcontrollers integrated into hubs, to support compound devices (e.g. keyboard + hub ports), but nothing with a Linux-capable plus the hub electronics. - Dave - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel