>Sent: Monday, February 11, 2008 8:51 PM >> Dear all: > >> 2. What is the "device address" used for in QH? > >There is no "device address" field in a QH -- at least, there isn't in >uhci-hcd or ehci-hcd. Maybe other controller drivers do have such a >field.
I have a doubt - Referring to ehci spec 3.6, looks like the QH has a Device Address that gets tracked in qh->hw_info1 field. Refer - qh_make ( ... info1 |= usb_pipeendpoint (urb->pipe) << 8; info1 |= usb_pipedevice (urb->pipe) << 0; ... qh->hw_info1 = cpu_to_hc32(ehci, info1); ... Isn't the QH identifying the destination pipe by an Endpoint Number + Device Address? > >> I cannot find any information about "device address" in device descriptor >> at chapter 9 of usb2.0 spec. > >The device address isn't part of the device descriptor. It is >described in section 9.1 of the spec. > >> Since we can get endpoint address in endpoint descriptor and set the ep# >> before controller determine where the data he sent out. >> But how about device address? >> Is this value randomly set by host when more than 1 device connected to it? > >The address is set by the host when more than 0 devices are connected. >The values are not random; they are chosen sequentially: The first >device has address 1, the second device has address 2, and so on. > >> 3. can 2 QHDs point to the same endpoint? >> Ex: QHD[0]--> ep0 >> QHD[1]--> ep0 > >No. > >> 4. if the answer of 3 is Yes, can we set different device address and >> different maximum packet length on several QHs, which point to the same end >> point. >> Ex: >> pQH[0]->bTerminate=0; //data is valid >> pQH[0]->bType=0x01; //QH type >> pQH[0]->bEp=0x00; //ep0 >> pQH[0]->uDeviceAddress= 0x00; >> pQH[0]->uMaxPacketSize=0x08; >> >> pQH[1]->bTerminate=0; //data is valid >> pQH[1]->bType=0x01; //QH type >> pQH[1]->bEp=0x00; //ep0 >> pQH[1]->uDeviceAddress= 0x01; >> pQH[1]->uMaxPacketSize=0x40; > >If the device addresses are different then the QHs don't refer to the >same endpoint. In your example, pQH[0] refers to ep0 on device 0 and >pQH[1] refers to ep0 on device 1 -- those are two different endpoints. > >Alan Stern > >- >To unsubscribe from this list: send the line "unsubscribe linux-usb" in >the body of a message to [EMAIL PROTECTED] >More majordomo info at http://vger.kernel.org/majordomo-info.html - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html