configuring OTG port in BB-XM RevC

Hi,
I am very new to beagleboard, working on a project where any USB mass
storage device connected to USB port of BB, will be detected and
mounted in PC. The USB port of my PC (linux ubuntu 10.4 , kernel
2.6.32) is connected to OTG port of BB (kernel 2.6.34).

I am planning to mimic GSoC project (USB sniffer) to implement this.

My Question is, as per this requirement, whether I need configure the
OTG port as host/gadget/OTG type.
I am configuring this using menuconfig :

USB support -->
  <M> inventra High Speed Dual Role Controller (TI,ADI,...)
   Driver Mode (USB Host) -->

Although this question is very silly, please answer this.
Thanks,
Barun

My OTG port was detected by setting OTG as gadget.

USB support →

inventra High Speed Dual Role Controller (TI,ADI,…)

Driver Mode (USB Peripheral(gadget stack)) →

STEP1 :After I connect my USB mouse to BB-xM RevC, it’s detected in BB.
[ 2719.196594] input: PIXART USB OPTICAL MOUSE as /devices/platform/ehci-omap.0/usb1/1-2/1-2.4/1-2.4:1.0/input/input3

STEP2: After that I unbind the device.
#./unbind vendor-id product-id
The script to Unbind :
VENDOR=$1
PRODUCT=$2

if [ n$VENDOR = n ] || [ n$PRODUCT = n ]; then
echo “Unbinding the first non-hub device…”

ID=`grep -l “^0$” /sys/bus/usb/drivers/usb/*/maxchild | sed -e "s|/sys/b

VENDOR=cat /sys/bus/usb/drivers/usb/$ID/idVendor
PRODUCT=cat /sys/bus/usb/drivers/usb/$ID/idProduct

echo $ID > /sys/bus/usb/drivers/usb/unbind

echo “Device found ($VENDOR:$PRODUCT), and unbound!”

STEP3 :Now I am insmoding the proxy driver so that it will be claimed by proxy driver.

#insmod kernel/drivers/usb/gadget/g_proxy.ko
[ 2853.388916] Proxy Gadget: Proxy Gadget, version: 2010 … debug=0
[ 2853.395874] Proxy Gadget: device_probe (093a:2510)
[ 2853.400695] Proxy Gadget: Attaching!
[ 2853.404571] Proxy Gadget: Using full speed.
[ 2853.408782] Proxy Gadget: ERROR(device_probe): usb_gadget_register_driver failed -16
[ 2853.416809] proxy: probe of 1-2.4 failed with error -16
[ 2853.423309] usbcore: registered new device driver proxy

The proxy code is google-summer-code 2010, for USB sniffer.
Any clue ??

With Thanks and Regards,
Barun

Now My USB mouse and keyboard seem to work fine.
But there seem to be some issue with USB Mass Storage device (pen
drive), which mounts to PC after detection, but after some time (1-2
mins), it gets disconnected.
Dmesg from BB-xm RevC does not give any error.
But dmesg (PC End) shows this :

[174344.112033] usb 1-6: reset high speed USB device using ehci_hcd
and address 63

[174359.224030] usb 1-6: device descriptor read/64, error -110

[174374.440033] usb 1-6: device descriptor read/64, error -110

[174374.656032] usb 1-6: reset high speed USB device using ehci_hcd
and address 63

[174389.768031] usb 1-6: device descriptor read/64, error -110

[174404.984032] usb 1-6: device descriptor read/64, error -110

[174405.200030] usb 1-6: reset high speed USB device using ehci_hcd
and address 63

[174410.220081] usb 1-6: device descriptor read/8, error -110

[174415.340062] usb 1-6: device descriptor read/8, error -110

[174415.556038] usb 1-6: reset high speed USB device using ehci_hcd
and address 63

[174420.576397] usb 1-6: device descriptor read/8, error -110

[174425.696141] usb 1-6: device descriptor read/8, error -110

[174425.800056] usb 1-6: USB disconnect, address 63

[174425.800395] sd 14:0:0:0: Device offlined - not ready after error
recovery

[174425.800503] sd 14:0:0:0: [sdb] Unhandled error code

[174425.800507] sd 14:0:0:0: [sdb] Result: hostbyte=DID_NO_CONNECT
driverbyte=DRIVER_OK

[174425.800512] sd 14:0:0:0: [sdb] CDB: Write(10): 2a 00 00 00 00 3f
00 00 01 00

[174425.800524] end_request: I/O error, dev sdb, sector 63

[174425.800531] Buffer I/O error on device sdb1, logical block 1

[174425.800534] lost page write due to I/O error on sdb1

[174425.879791] scsi: killing requests for dead queue

[174425.928043] usb 1-6: new high speed USB device using ehci_hcd and
address 64

I am unable to determine if this is bcse of my PC (Ubuntu 10.04 Lucid,
kernel 2.6.32) or something else.

Any help will be appreciated.