RE: Mounting USB flash drive

2008-01-29 Thread Peter Trifonov
Dear Henrik,



> Peter, I think you may be overly optimistic here. The patches that you
> Just so you know what you're into, the partial fix may seem to work,
Thank you very much for your warning.


> but
> can give you a system panic after up to a few hundred detach attempts.
> Or after less than ten attempts. It's really a random timing issue.
In my case system stability is not the key issue, since I am just setting up
a terminal to be used by students. But I will print warnings everywhere...



Just a small suggestion for your patch set. The /etc/devd/umass script
contains the following:

# Verify that there is a slice to mount
if [ ! -e /dev/${drv}s1 ]; then
exit 1;
fi

I have seen some flash drives which do not contain any partitions, i.e. they
look like a big floppy.
In this case one should not look for /dev/daXsY, but mount /dev/daX. 


I am using the following devd script, which manages mount points in /mnt
directory:

--
#!/usr/bin/perl
#This script should be invoked every time USB device is attached or detached
#Copyright (c) 2008 Peter Trifonov  [EMAIL PROTECTED]
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#notice, this list of conditions and the following disclaimer in the
#documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.


#wait for devices to settle
sleep (2);

#get a list of devices
$DevNodes=`ls /dev/`;
@DevNodes=($DevNodes=~m/(da\d+(?:s\d+)?)/g);

#get a list of mount points
$DirNodes=`ls /mnt/`;
@DirNodes=($DirNodes=~m/(da\d+(?:s\d+)?)/g);
foreach $Dev(@DevNodes)
{
   $DevNodes{$Dev}+=1;
   #if there is a device called daNsMM, daN should be excluded
   if ($Dev=~m/(da\d+)s\d+/)
   {
   print "Skipping $1\n";
   $DevNodes{$1}-=1;
   };
};
foreach $Dir(@DirNodes)
{
   $DirNodes{$Dir}=1;
};

#look for new devices
foreach $Dev(@DevNodes)
{
   if (!$DirNodes{$Dev}&&($DevNodes{$Dev}>0))
   {
  print "Mounting $Dev...\n";
  mkdir "/mnt/$Dev";
  system("/sbin/mount_msdosfs  -m 777 -L ru_RU.KOI8-R  /dev/$Dev
/mnt/$Dev");
   };
};
#look for mountpoints to be eliminated
foreach $Dir(@DirNodes)
{
   if (!$DevNodes{$Dir})
   {
  print "Unmounting $Dir...\n";
  system("umount -f /mnt/$Dir");
  rmdir "/mnt/$Dir";
   };
};

-

With best regards,
P. Trifonov


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


USB serial port vs 6.1

2008-01-29 Thread perryh
Does 6.1 have some fundamental problem with USB serial devices?

I'm trying a USB-serial converter after getting nowhere with
connecting a USB modem directly -- the modem also has a DB9 --
and getting the same unexpected behavior from the converter as
from the modem.

When connected, the console reports:

ugen0: FIDI usb serial converter, rev 1.10/4.00, addr 3

Device nodes are created:

# ls -l /dev/ug*
crw-r--r--  1 root  operator1,  15 Nov 24 21:17 /dev/ugen0
crw-r--r--  1 root  operator1,  16 Nov 24 21:17 /dev/ugen0.1
crw-r--r--  1 root  operator1,  17 Nov 24 21:17 /dev/ugen0.2

but the endpoints misbehave like those created for the ZyXEL modem
earlier this month:

# ./usbEpProbe /dev/ugen0.1
usbEpProbe: Cannot open '/dev/ugen0.1': Device not configured
# ./usbEpProbe /dev/ugen0.2
usbEpProbe: Cannot open '/dev/ugen0.2': Device not configured
# ./usbEpProbe /dev/ugen0
usbEpProbe: Cannot set short XFER
: Invalid argument
# cat /dev/ugen0.1 > /dev/null
cat: /dev/ugen0.1: Input/output error
# cat /dev/ugen0.2 > /dev/null
cat: /dev/ugen0.2: Device not configured
# cat /dev/ugen0 > /dev/null
cat: /dev/ugen0: Operation not supported by device

# udesc_dump /dev/ugen0
Standard Device Descriptor:
  bLength18
  bDescriptorType01
  bcdUSB 0110
  bDeviceClass   00
  bDeviceSubClass00
  bDeviceProtocol00
  bMaxPacketSize 8
  idVendor   0403
  idProduct  6001
  bcdDevice  0400
  iManufacturer  1
  iProduct   2
  iSerialNumber  3
  bNumConfigurations 1

Configuration 0:
Standard Configuration Descriptor:
  bLength 9
  bDescriptorType 02
  wTotalLength32
  bNumInterface   1
  bConfigurationValue 1
  iConfiguration  0
  bmAttributesa0 (remote-wakeup)
  bMaxPower   22 (44 mA)

Standard Interface Descriptor:
  bLength9
  bDescriptorType04
  bInterfaceNumber   0
  bAlternateSetting  0
  bNumEndpoints  2
  bInterfaceClassff
  bInterfaceSubClass ff
  bInterfaceProtocol ff
  iInterface 2

Standard Endpoint Descriptor:
  bLength  7
  bDescriptorType  05
  bEndpointAddress 81 (in)
  bmAttributes 02 (Bulk)
  wMaxPacketSize   64
  bInterval0

Standard Endpoint Descriptor:
  bLength  7
  bDescriptorType  05
  bEndpointAddress 02 (out)
  bmAttributes 02 (Bulk)
  wMaxPacketSize   64
  bInterval0

Codes Representing Languages by the Device:
  bLength  4
  bDescriptorType  03
  wLANGID[0]   0409

String (index 1): FIDI

String (index 2): usb serial converter

String (index 3): FTBSW3LS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: usb/95131: [install] Boot/setup process does not accept key strokes

2008-01-29 Thread linimon
Synopsis: [install] Boot/setup process does not accept key strokes

State-Changed-From-To: open->feedback
State-Changed-By: linimon
State-Changed-When: Tue Jan 29 09:48:44 UTC 2008
State-Changed-Why: 
Is this still a problem with recent versions of FreeBSD?


Responsible-Changed-From-To: freebsd-usb->linimon
Responsible-Changed-By: linimon
Responsible-Changed-When: Tue Jan 29 09:48:44 UTC 2008
Responsible-Changed-Why: 

http://www.freebsd.org/cgi/query-pr.cgi?pr=95131
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: usb/95636: [umass] [boot] 5 minute delay at boot when using VT6205 based USB card reader

2008-01-29 Thread linimon
Synopsis: [umass] [boot] 5 minute delay at boot when using VT6205 based USB 
card reader

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Tue Jan 29 09:47:32 UTC 2008
State-Changed-Why: 
Mark suspended awaiting patches.

http://www.freebsd.org/cgi/query-pr.cgi?pr=95636
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: usb/75928: [umass] [request] Cytronix SmartMedia card (SMC) reader has problems when card changed

2008-01-29 Thread linimon
Synopsis: [umass] [request] Cytronix SmartMedia card (SMC) reader has problems 
when card changed

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Tue Jan 29 10:25:12 UTC 2008
State-Changed-Why: 
Mark suspended awaiting patches.

http://www.freebsd.org/cgi/query-pr.cgi?pr=75928
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: usb/89003: [request] LaCie Firewire drive not properly supported under 6.0

2008-01-29 Thread linimon
Synopsis: [request] LaCie Firewire drive not properly supported under 6.0

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Tue Jan 29 10:05:21 UTC 2008
State-Changed-Why: 
Mark suspended awaiting patches.

http://www.freebsd.org/cgi/query-pr.cgi?pr=89003
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: usb/85067: [uscanner] Cannot attach ScanJet 4300C to usb device

2008-01-29 Thread linimon
Synopsis: [uscanner] Cannot attach ScanJet 4300C to usb device

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Tue Jan 29 10:06:34 UTC 2008
State-Changed-Why: 
Mark suspended awaiting patches.

http://www.freebsd.org/cgi/query-pr.cgi?pr=85067
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: usb/97286: [mouse] [request] MS Wireless Intellimouse Explorer 2.0 doesn't work

2008-01-29 Thread linimon
Synopsis: [mouse] [request] MS Wireless Intellimouse Explorer 2.0 doesn't work

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Tue Jan 29 09:44:00 UTC 2008
State-Changed-Why: 
Mark suspended awaiting patches.

http://www.freebsd.org/cgi/query-pr.cgi?pr=97286
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: usb/96120: [ums] [request] USB mouse not always detected

2008-01-29 Thread linimon
Synopsis: [ums] [request] USB mouse not always detected

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Tue Jan 29 09:46:45 UTC 2008
State-Changed-Why: 
Mark suspended awaiting patches.

http://www.freebsd.org/cgi/query-pr.cgi?pr=96120
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: usb/95348: [kbd] USB keyboard unplug causes noise on screen

2008-01-29 Thread linimon
Synopsis: [kbd] USB keyboard unplug causes noise on screen

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Tue Jan 29 09:48:12 UTC 2008
State-Changed-Why: 
Mark suspended awaiting patches.

http://www.freebsd.org/cgi/query-pr.cgi?pr=95348
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: usb/80777: [request] usb_rem_task() should wait for callback to complete?

2008-01-29 Thread linimon
Synopsis: [request] usb_rem_task() should wait for callback to complete?

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Tue Jan 29 10:15:11 UTC 2008
State-Changed-Why: 
Mark suspended awaiting patches.

http://www.freebsd.org/cgi/query-pr.cgi?pr=80777
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: usb/80776: [udav] [request] UDAV device driver shouldn't use usb_add_task

2008-01-29 Thread linimon
Old Synopsis: [udav] UDAV device driver shouldn't use usb_add_task
New Synopsis: [udav] [request] UDAV device driver shouldn't use usb_add_task

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Tue Jan 29 10:15:28 UTC 2008
State-Changed-Why: 
Mark suspended awaiting patches.

http://www.freebsd.org/cgi/query-pr.cgi?pr=80776
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: usb/72733: [ucom] [request] Kyocera 7135 Palm OS connection problem.

2008-01-29 Thread linimon
Synopsis: [ucom] [request] Kyocera 7135 Palm OS connection problem.

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Tue Jan 29 10:51:31 UTC 2008
State-Changed-Why: 
Mark suspended awaiting patches.

http://www.freebsd.org/cgi/query-pr.cgi?pr=72733
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: usb/118571: [boot] [request] fix BTX issues when booting FreeBSD 7 from a USB CD-ROM

2008-01-29 Thread Rudy

[EMAIL PROTECTED] wrote:

Note: the submitter is offering a bounty to whoever can fix the problem.

http://www.freebsd.org/cgi/query-pr.cgi?pr=118571




Bounty still holds.  To get it, the FreeBSD 7.0-RELEASE will be used to test.  
I'll download it from
  ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/ISO-IMAGES/7.0/
burn it to a CD, and attempt to install it on a Supermicro motherboard via a USB-CDROM.  If it 
works, I'll pay the bounty.


:)

If it is a patch somewhere on the site but not incorporated into the FreeBSD 7.0 RELEASE ISO, the 
bounty is not offered.  RELEASE is getting close, the RC1 did not past the test!


UPDATE, the bounty is now $70 in honor of FreeBSD 7.0!


Rudy

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


Re: usb/62257: [umass] [request] card reader UCR-61S2B is only half-supported

2008-01-29 Thread linimon
Synopsis: [umass] [request] card reader UCR-61S2B is only half-supported

State-Changed-From-To: open->suspended
State-Changed-By: linimon
State-Changed-When: Tue Jan 29 10:56:31 UTC 2008
State-Changed-Why: 
Mark suspended awaiting patches.

http://www.freebsd.org/cgi/query-pr.cgi?pr=62257
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Mounting USB flash drive

2008-01-29 Thread Henrik Gulbrandsen
On Tue, 2008-01-29 at 11:22 +0300, Peter Trifonov wrote:
> Just a small suggestion for your patch set. The /etc/devd/umass script
> contains the following:
> 
> # Verify that there is a slice to mount
> if [ ! -e /dev/${drv}s1 ]; then
>   exit 1;
> fi
> 
> I have seen some flash drives which do not contain any partitions, i.e. they
> look like a big floppy.
> In this case one should not look for /dev/daXsY, but mount /dev/daX. 

Thanks for the reminder! I know I've seen this mentioned somewhere else,
but I guess I was hoping that someone with access to one of those drives
would submit a tested patch, so I wouldn't have the risk of leaving some
stupid mistake in the code. I'll try to keep it in mind for new updates!

/Henrik


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


Re: USB serial port vs 6.1

2008-01-29 Thread Henrik Brix Andersen
On Tue, Jan 29, 2008 at 12:17:16AM -0800, [EMAIL PROTECTED] wrote:
> Does 6.1 have some fundamental problem with USB serial devices?

No (but you ought to update to 6.3).

> I'm trying a USB-serial converter after getting nowhere with
> connecting a USB modem directly -- the modem also has a DB9 --
> and getting the same unexpected behavior from the converter as
> from the modem.
> 
> When connected, the console reports:
> 
> ugen0: FIDI usb serial converter, rev 1.10/4.00, addr 3
> 
> Device nodes are created:
> 
> # ls -l /dev/ug*
> crw-r--r--  1 root  operator1,  15 Nov 24 21:17 /dev/ugen0
> crw-r--r--  1 root  operator1,  16 Nov 24 21:17 /dev/ugen0.1
> crw-r--r--  1 root  operator1,  17 Nov 24 21:17 /dev/ugen0.2

These device nodes are created by ugen(4), which is not what you want.

You need to load the uftdi(4) kernel module before plugging in the
FTDI based USB<->RS-232 device. That driver should create a /dev/ttyU0
or similar named device node.

Brix
-- 
Henrik Brix Andersen <[EMAIL PROTECTED]>


pgpTG0ZhanmDC.pgp
Description: PGP signature