On Fri, Jun 11, 2010 at 2:39 PM, Amit Nagal <helloin.amit@xxxxxxxxx> wrote: > Hi Greg , > > Thanx for the reply . > > So what i have understood is this : > > 1) On host , userspace program will receive usb connect / disconnect > events via udev . > > by this time device is connected in usb mass storage configuration . > > 2) upon receive usb connect , to select 2nd configuration > > program shud do > > echo 2 > /sys/bus/usb/devices/.../bConfigurationValue to the device . > > now here is some glitch , when we do disconnect like this , > > usb device also shows "disconnect display" before setting to 2nd > configuration > > as commanded by host , which looks odd , as while user has connected > his device > > device will display disconnected notification for a while . > > How this situation can be handled ? Is this a development environment requirement or a product requirement? If the user application is developed in house such messages can always be managed!! > > Regards > > Amit Nagal > > > > > > > > > > > > > > > > > > > On Fri, Jun 11, 2010 at 9:56 AM, Greg KH <greg@xxxxxxxxx> wrote: >> On Fri, Jun 11, 2010 at 09:16:21AM +0530, Amit Nagal wrote: >>> HI Alen , >>> >>> Thanx for the reply . it will certainly help my cause . >>> >>> But my problem is , before a userspace program send the command >>> >>> echo N >/sys/bus/usb/devices/.../bConfigurationValue to the device , >>> >>> usb host will already select default mass storage configuration on >>> device plugin >>> >>> (device exposes default 1st configuration as mass storage and we have >>> no control over device firmware ). >>> >>> this is not desired . what i want is , usb host on detecting this >>> multi configuration device , >>> >>> instead of selecting default configuration , invoke some userspace binary >>> >>> where depending upon "echo N >>> >/sys/bus/usb/devices/.../bConfigurationValue to the device " >>> >>> desired configuration can be selected . >>> >>> so how i can handle this signalling from usb host to userspace . >> >> Userspace is notified, just do the disconnect from a program that gets >> the udev event when the device is found. >> >> It's no problem to disconnect from the usb-storage device. >> >> thanks, >> >> greg k-h >> > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > 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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html