Identifying serial ports

2009-11-24 Thread Trevor Blackwell


I have two USB devices that work as serial ports:

ugen2.2.0: umodem0: class 2/0, rev 2.00/1.00, addr 2>
ugen2.3.0: uplcom0: class 0/0, rev 1.10/3.00, addr 3>


and they appear as serial devices /dev/cuaU0 and /dev/cuaU1. But I  
can't find a general-purpose way to figure out which is which. It  
depends on which gets enumerated first. In FreeBSD 7, the USB device  
minor # seemed to correspond to the cuaU device number, but here they  
are both zero. Any ideas?


--
Trevor Blackwellt...@anybots.com650 776 7870




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


RE: 8.0-RC USB/FS problem

2009-11-24 Thread Guojun Jin
Interesting now by some incident :-)

The single CPU machine (Intel P4) with 8.0 works fine on the USB drives
and the USB stick.

So, installed 8.0 on another AMD Turion64 HP Pavilion dv5210us Laptop,
it
comes the same problem -- accessing the USB hard drive causes system
panic
and reboot:

Took the previously dump/restored USB drive and mount it on this Laptop,
tried to remove the data before dump/restore, it crashed the system
after 
hit ^C and unplugged USB hard drive when the LED on USB hard drive
becomes
solid red and spiting out numbers of lines Operation not permitted 
(the user is root, so this means accessing hard drive is not possible):

rm: bin/... : Operation not permitted
..

A second try causes the system locks up After ^C.

So, try to re-partitioning the USB hard drive on AMD laptop and
dump/restore, partitioning passed, but dump/restore crashed.

Since hw.usb.umass.debug=-1 does not tell a USB problem beside the
RESET,
What other debug shall we turn on to analyze this problem.


-Original Message-
From: Guojun Jin 
Sent: Tuesday, November 24, 2009 12:13 AM
To: Guojun Jin; Hans Petter Selasky; freebsd-usb@freebsd.org
Cc: b...@freebsd.org; freebsd-sta...@freebsd.org
Subject: RE: 8.0-RC USB/FS problem

Freshly installed 8.0-RELEASE on two differnt machines, and USB stick
work well so far, but the USB hard drive
still has crash on this SMP (4-core AMD phenom 9600) during the
dump/restore. I will try it on the single CPU
machine tomorrow.

Re-tested dump/restore with FreeBSD 6.3/6.4 on this SMP machine and they
are working well.

Also the another strange thing ocurred during the mount a partition on
/tmp, which ended with two /tmp,
and the last one mounted is on the top (the first should be hidden):

: df
Filesystem  1K-blocks UsedAvail Capacity  Mounted on
/dev/ad0s1a756750   165484   53072624%/
devfs   110   100%/dev
/dev/ad0s2e  43194318 27833648 1190512670%/data
/dev/ad0s2d   9135182  5870390  253397870%/home
/dev/ad0s1e50763034882   432138 7%/tmp
/dev/ad0s1f  13246730  1424522 1076247012%/usr
/dev/ad0s1d   507703812700  4658176 0%/var
/dev/da0s2 661176   487660   12062280%/mnt
/dev/da1s3d   91351824  8404364 0%/dist
/dev/da1s3e  749389484 68943830 0%/tmp

: df /tmp
Filesystem  1K-blocks UsedAvail Capacity  Mounted on
/dev/da1s3e  749389484 68943830 0%/tmp

-Original Message-
From: Guojun Jin
Sent: Sun 11/22/2009 7:59 PM
To: Hans Petter Selasky; freebsd-usb@freebsd.org
Cc: b...@freebsd.org; freebsd-sta...@freebsd.org
Subject: RE: 8.0-RC USB/FS problem
 
>From more intensive diagnose, it looks like more related USB layer.

repeated a few time on following process and ithe crash happened at
different USB access phase at each time.

dd if=/dev/zero of=/dev/da0 count=1000 bs=4k
sysinstall
partition 
 slice 1 (da0s1) 18GB ID=12
 slice 2 (da0s2) 10-15GB Id=165
 slice 3 (da0s3) rest ID=165
 W ---> OK
label
 da0s3d 9GB /mnt
 da0s3e rest/dist
 W ---> da0s3e  device is not configured.

w# ll /dev/da0*  # after sysinstall did partition + W at 1st time
crw-r-  1 root  operator0,  97 Nov 22 11:23 /dev/da0
crw-r-  1 root  operator0,  98 Nov 22 11:23 /dev/da0s1
crw-r-  1 root  operator0,  99 Nov 22 11:23 /dev/da0s2
crw-r-  1 root  operator0, 100 Nov 22 11:23 /dev/da0s3

# ll /dev/da0*  # after sysinstall start at 2nd time
crw-r-  1 root  operator0,  97 Nov 22 11:27 /dev/da0
System crashed

The crash log is available at
http:/www.daemonfun.com/archives/pub/USB/crash1-reset.bz2
(All logs are based on hw.usb.umass.debug=-1)

After system reboot, and repeated above processes, the da0s3e was
mounted on /dist, but da0s3d cannot.
It tunred out that newfs fail inside labeling process in sysinstall.
Manually did newfs on da0s3d, and
it cannot be mounted on /mnt, but access to it caused crash.
The crash log is available at
http:/www.daemonfun.com/archives/pub/USB/newfs

Tried entire process again, this time, both partitons are formatted
(newfs) inside labaling process (sysinstall)
but crahsed system during dump/restore on da0s3e (/dist).
The crash log is available at
http:/www.daemonfun.com/archives/pub/USB/usb-log.crash2.bz2, which is
huge one.
It contains two parts, one dump/restore IDE to da0s3d (passed), and the
rest is dump/restore to da0s3e (crashed).

I am going to reinstall the system with the new ISO from Nov 21
8.0-RELEASE to see if anything will improve.

-Original Message-
From: Hans Petter Selasky [mailto:hsela...@c2i.net]
Sent: Sun 11/22/2009 1:47 AM
To: freebsd-usb@freebsd.org
Cc: Guojun Jin; b...@freebsd.org; freebsd-sta...@freebsd.org
Subject: Re: 8.0-RC USB/FS problem
 
On Sunday 22 November 2009 05:38:13 Guojun Jin wrote:
> Tried on the USB hard drive:

Re: USB mouse not working on 8.0-RELEASE

2009-11-24 Thread Hans Petter Selasky
On Tuesday 24 November 2009 21:59:53 Ondřej Majerech wrote:
> 2009/11/23 Ondřej Majerech :
> > 2009/11/23 Hans Petter Selasky :
> >> On Monday 23 November 2009 19:04:22 Ondřej Majerech wrote:
> >>> Hello,
> >>>
> >>> I've just upgraded my box to 8.0-RELEASE (FreeBSD starlight
> >>> 8.0-RELEASE FreeBSD 8.0-RELEASE #9: Mon Nov 23 17:52:12 CET 2009
> >>> r...@starlight:/usr/obj/usr/src/sys/STARLIGHT  i386) via csup'ing to
> >>> RELENG_8_0 and the usual suite of buildworld, buildkernel,
> >>> installkernel, mergemaster -p, installworld, mergemaster.
> >>>
> >>> My USB mouse doesn't work now.  While booting, I can see error
> >>> messages from the USB part of the kernel; the same messages also
> >>> reappear when I disconnect and reconnect the thing.  They read the
> >>> following: (Grabbed from /var/log/messages after having dis- and
> >>> re-connected the mouse.)
> >>>
> >>> Nov 23 18:54:19 starlight kernel: usb_alloc_device:1586: set address 2
> >>> failed (USB_ERR_TIMEOUT, ignored)
> >>> Nov 23 18:54:20 starlight kernel: usb_alloc_device:1624: getting
> >>> device descriptor at addr 2 failed, USB_ERR_TIMEOUT!
> >>> Nov 23 18:54:21 starlight kernel: usbd_req_re_enumerate:1539: addr=2,
> >>> set address failed! (USB_ERR_TIMEOUT, ignored)
> >>> Nov 23 18:54:22 starlight kernel: usbd_req_re_enumerate:1553: getting
> >>> device descriptor at addr 2 failed, USB_ERR_TIMEOUT!
> >>> Nov 23 18:54:24 starlight kernel: usbd_req_re_enumerate:1539: addr=2,
> >>> set address failed! (USB_ERR_TIMEOUT, ignored)
> >>> Nov 23 18:54:25 starlight kernel: usbd_req_re_enumerate:1553: getting
> >>> device descriptor at addr 2 failed, USB_ERR_TIMEOUT!
> >>> Nov 23 18:54:25 starlight kernel: ugen0.2: <(null)> at usbus0
> >>> (disconnected) Nov 23 18:54:25 starlight kernel:
> >>> uhub_reattach_port:435: could not allocate new device!
> >>>
> >>> The mouse was working without any problems whatsoever on 8.0-RC3 and
> >>> all older FBSD versions that I used.
> >>>
> >>> Other USB devices work as they should, without producing anything
> >>> unusual in dmesg.
> >>>
> >>> So, what's up?  Any clues?
> >>
> >> Hi,
> >>
> >> This looks like a regression issue. There has been some changes with
> >> regard to USB legacy support handling. Try disabling USB legacy support
> >> in the BIOS or try to see if the problem is present in a 9-current
> >> kernel.
> >>
> >> Thanks for reporting your issue!
> >>
> >> --HPS
> >
> > The only option in my BIOS regarding legacy USB is "Legacy USB storage
> > detect" -- I set this one to Disabled and booted with the mouse
> > disabled -- when I connected it to the running system, it got detected
> > properly, but it simply wouldn't work in X.
> >
> > When I rebooted with the mouse plugged in, the same thing as before
> > happened -- error messages during boot, and un- and re-plugging
> > produced the same errors.
> >
> > I'll try 9-CURRENT sometime tomorrow and report back how that turned out.
> >
> > ~ Ondra
>
> Alright, I tried with 9-CURRENT and indeed, it works without problems.
>
> So, shall I file a bug?  I'd prefer to continue using -RELEASE, but
> I'd also like to have my mouse working. x)

Yes, file a bug report.

--HPS

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


Re: USB mouse not working on 8.0-RELEASE

2009-11-24 Thread Ondřej Majerech
2009/11/23 Ondřej Majerech :
> 2009/11/23 Hans Petter Selasky :
>> On Monday 23 November 2009 19:04:22 Ondřej Majerech wrote:
>>> Hello,
>>>
>>> I've just upgraded my box to 8.0-RELEASE (FreeBSD starlight
>>> 8.0-RELEASE FreeBSD 8.0-RELEASE #9: Mon Nov 23 17:52:12 CET 2009
>>> r...@starlight:/usr/obj/usr/src/sys/STARLIGHT  i386) via csup'ing to
>>> RELENG_8_0 and the usual suite of buildworld, buildkernel,
>>> installkernel, mergemaster -p, installworld, mergemaster.
>>>
>>> My USB mouse doesn't work now.  While booting, I can see error
>>> messages from the USB part of the kernel; the same messages also
>>> reappear when I disconnect and reconnect the thing.  They read the
>>> following: (Grabbed from /var/log/messages after having dis- and
>>> re-connected the mouse.)
>>>
>>> Nov 23 18:54:19 starlight kernel: usb_alloc_device:1586: set address 2
>>> failed (USB_ERR_TIMEOUT, ignored)
>>> Nov 23 18:54:20 starlight kernel: usb_alloc_device:1624: getting
>>> device descriptor at addr 2 failed, USB_ERR_TIMEOUT!
>>> Nov 23 18:54:21 starlight kernel: usbd_req_re_enumerate:1539: addr=2,
>>> set address failed! (USB_ERR_TIMEOUT, ignored)
>>> Nov 23 18:54:22 starlight kernel: usbd_req_re_enumerate:1553: getting
>>> device descriptor at addr 2 failed, USB_ERR_TIMEOUT!
>>> Nov 23 18:54:24 starlight kernel: usbd_req_re_enumerate:1539: addr=2,
>>> set address failed! (USB_ERR_TIMEOUT, ignored)
>>> Nov 23 18:54:25 starlight kernel: usbd_req_re_enumerate:1553: getting
>>> device descriptor at addr 2 failed, USB_ERR_TIMEOUT!
>>> Nov 23 18:54:25 starlight kernel: ugen0.2: <(null)> at usbus0
>>> (disconnected) Nov 23 18:54:25 starlight kernel: uhub_reattach_port:435:
>>> could not allocate new device!
>>>
>>> The mouse was working without any problems whatsoever on 8.0-RC3 and
>>> all older FBSD versions that I used.
>>>
>>> Other USB devices work as they should, without producing anything
>>> unusual in dmesg.
>>>
>>> So, what's up?  Any clues?
>>
>> Hi,
>>
>> This looks like a regression issue. There has been some changes with regard 
>> to
>> USB legacy support handling. Try disabling USB legacy support in the BIOS or
>> try to see if the problem is present in a 9-current kernel.
>>
>> Thanks for reporting your issue!
>>
>> --HPS
>>
>>
>
> The only option in my BIOS regarding legacy USB is "Legacy USB storage
> detect" -- I set this one to Disabled and booted with the mouse
> disabled -- when I connected it to the running system, it got detected
> properly, but it simply wouldn't work in X.
>
> When I rebooted with the mouse plugged in, the same thing as before
> happened -- error messages during boot, and un- and re-plugging
> produced the same errors.
>
> I'll try 9-CURRENT sometime tomorrow and report back how that turned out.
>
> ~ Ondra
>

Alright, I tried with 9-CURRENT and indeed, it works without problems.

So, shall I file a bug?  I'd prefer to continue using -RELEASE, but
I'd also like to have my mouse working. x)

~ Ondra
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: 8.0-RC USB/FS problem

2009-11-24 Thread Tom Evans
On Tue, Nov 24, 2009 at 5:13 PM, Hans Petter Selasky wrote:

> On Tuesday 24 November 2009 17:58:47 Guojun Jin wrote:
> > Sorry for the typo -- it is public not pub in the middle. The others
> should
> > be all public.
> >
> > http:/www.daemonfun.com/archives/public/USB/crash1-reset.bz2
> >
>
> %fetch http:/www.daemonfun.com/archives/public/USB/crash1-reset.bz2
> fetch: http:/www.daemonfun.com/archives/public/USB/crash1-reset.bz2: No
> address record
>
>
You need two '/' for a URL :)

Try:

http://www.daemonfun.com/archives/public/USB/crash1-reset.bz2

Cheers

Tom
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: 8.0-RC USB/FS problem

2009-11-24 Thread Hans Petter Selasky
On Tuesday 24 November 2009 17:58:47 Guojun Jin wrote:
> Sorry for the typo -- it is public not pub in the middle. The others should
> be all public.
>
> http:/www.daemonfun.com/archives/public/USB/crash1-reset.bz2
>

%fetch http:/www.daemonfun.com/archives/public/USB/crash1-reset.bz2
fetch: http:/www.daemonfun.com/archives/public/USB/crash1-reset.bz2: No 
address record

--HPS

> -Original Message-
> From: Hans Petter Selasky [mailto:hsela...@c2i.net]
> Sent: Tue 11/24/2009 12:33 AM
> To: Guojun Jin
> Cc: freebsd-usb@freebsd.org; b...@freebsd.org; freebsd-sta...@freebsd.org
> Subject: Re: 8.0-RC USB/FS problem
>
> On Tuesday 24 November 2009 09:12:45 Guojun Jin wrote:
> > http:/www.daemonfun.com/archives/pub/USB/crash1-reset.bz2
>
> I'm not able to fetch this file. Could you extract the panic backtrace?
>
> --HPS

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


RE: 8.0-RC USB/FS problem

2009-11-24 Thread Guojun Jin
Sorry for the typo -- it is public not pub in the middle. The others should be 
all public.

http:/www.daemonfun.com/archives/public/USB/crash1-reset.bz2

-Original Message-
From: Hans Petter Selasky [mailto:hsela...@c2i.net]
Sent: Tue 11/24/2009 12:33 AM
To: Guojun Jin
Cc: freebsd-usb@freebsd.org; b...@freebsd.org; freebsd-sta...@freebsd.org
Subject: Re: 8.0-RC USB/FS problem
 
On Tuesday 24 November 2009 09:12:45 Guojun Jin wrote:
> http:/www.daemonfun.com/archives/pub/USB/crash1-reset.bz2

I'm not able to fetch this file. Could you extract the panic backtrace?

--HPS

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


Re: 8.0-RC USB/FS problem

2009-11-24 Thread Hans Petter Selasky
On Tuesday 24 November 2009 09:12:45 Guojun Jin wrote:
> http:/www.daemonfun.com/archives/pub/USB/crash1-reset.bz2

I'm not able to fetch this file. Could you extract the panic backtrace?

--HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


RE: 8.0-RC USB/FS problem

2009-11-24 Thread Guojun Jin
Freshly installed 8.0-RELEASE on two differnt machines, and USB stick work well 
so far, but the USB hard drive
still has crash on this SMP (4-core AMD phenom 9600) during the dump/restore. I 
will try it on the single CPU
machine tomorrow.

Re-tested dump/restore with FreeBSD 6.3/6.4 on this SMP machine and they are 
working well.

Also the another strange thing ocurred during the mount a partition on /tmp, 
which ended with two /tmp,
and the last one mounted is on the top (the first should be hidden):

: df
Filesystem  1K-blocks UsedAvail Capacity  Mounted on
/dev/ad0s1a756750   165484   53072624%/
devfs   110   100%/dev
/dev/ad0s2e  43194318 27833648 1190512670%/data
/dev/ad0s2d   9135182  5870390  253397870%/home
/dev/ad0s1e50763034882   432138 7%/tmp
/dev/ad0s1f  13246730  1424522 1076247012%/usr
/dev/ad0s1d   507703812700  4658176 0%/var
/dev/da0s2 661176   487660   12062280%/mnt
/dev/da1s3d   91351824  8404364 0%/dist
/dev/da1s3e  749389484 68943830 0%/tmp

: df /tmp
Filesystem  1K-blocks UsedAvail Capacity  Mounted on
/dev/da1s3e  749389484 68943830 0%/tmp

-Original Message-
From: Guojun Jin
Sent: Sun 11/22/2009 7:59 PM
To: Hans Petter Selasky; freebsd-usb@freebsd.org
Cc: b...@freebsd.org; freebsd-sta...@freebsd.org
Subject: RE: 8.0-RC USB/FS problem
 
>From more intensive diagnose, it looks like more related USB layer.

repeated a few time on following process and ithe crash happened at different 
USB access phase at each time.

dd if=/dev/zero of=/dev/da0 count=1000 bs=4k
sysinstall
partition 
 slice 1 (da0s1) 18GB ID=12
 slice 2 (da0s2) 10-15GB Id=165
 slice 3 (da0s3) rest ID=165
 W ---> OK
label
 da0s3d 9GB /mnt
 da0s3e rest/dist
 W ---> da0s3e  device is not configured.

w# ll /dev/da0*  # after sysinstall did partition + W at 1st time
crw-r-  1 root  operator0,  97 Nov 22 11:23 /dev/da0
crw-r-  1 root  operator0,  98 Nov 22 11:23 /dev/da0s1
crw-r-  1 root  operator0,  99 Nov 22 11:23 /dev/da0s2
crw-r-  1 root  operator0, 100 Nov 22 11:23 /dev/da0s3

# ll /dev/da0*  # after sysinstall start at 2nd time
crw-r-  1 root  operator0,  97 Nov 22 11:27 /dev/da0
System crashed

The crash log is available at 
http:/www.daemonfun.com/archives/pub/USB/crash1-reset.bz2
(All logs are based on hw.usb.umass.debug=-1)

After system reboot, and repeated above processes, the da0s3e was mounted on 
/dist, but da0s3d cannot.
It tunred out that newfs fail inside labeling process in sysinstall. Manually 
did newfs on da0s3d, and
it cannot be mounted on /mnt, but access to it caused crash.
The crash log is available at http:/www.daemonfun.com/archives/pub/USB/newfs

Tried entire process again, this time, both partitons are formatted (newfs) 
inside labaling process (sysinstall)
but crahsed system during dump/restore on da0s3e (/dist).
The crash log is available at 
http:/www.daemonfun.com/archives/pub/USB/usb-log.crash2.bz2, which is huge one.
It contains two parts, one dump/restore IDE to da0s3d (passed), and the rest is 
dump/restore to da0s3e (crashed).

I am going to reinstall the system with the new ISO from Nov 21 8.0-RELEASE to 
see if anything will improve.

-Original Message-
From: Hans Petter Selasky [mailto:hsela...@c2i.net]
Sent: Sun 11/22/2009 1:47 AM
To: freebsd-usb@freebsd.org
Cc: Guojun Jin; b...@freebsd.org; freebsd-sta...@freebsd.org
Subject: Re: 8.0-RC USB/FS problem
 
On Sunday 22 November 2009 05:38:13 Guojun Jin wrote:
> Tried on the USB hard drive:
>
> Deleted slice 3 and recreated slice 3 with two partitions s3d and s3e.
> Was happy because successfully did dump/restore on s3d, and thought it just
> partition format issue; but system crashed during dump/restore on s3e, and
> partition lost the file system type.
>
> wolf# mount /dev/da0s3e /mnt
> WARNING: /mnt was not properly dismounted
> /mnt: mount pending error: blocks 35968 files 0
> wolf# fsck da0s3e
> fsck: Could not determine filesystem type
> wolf# bsdlabel da0s3
> # /dev/da0s3:
> 8 partitions:
> #size   offsetfstype   [fsize bsize bps/cpg]
>   c: 1757350350unused0 0 # "raw" part,
> don't edi t
>   d: 1887436804.2BSD0 0 0
>   e: 156860667 188743684.2BSD0 0 0
>
> Therefore, tried directly use fsck_ufs on both USB hard drive and USB stick
> to get file system clean up. All data got back now.
>
> The machine has run with FreeBSD 6.1 all the way to 7.2 without such
> problem. How can we determine what could go wrong in 8.0? FS or USB.

Hi,

Error 5 means IO error, so probably the transport layer, USB or lower, is to 
blame.

Some things to check:

1) Make sure the connection for your memory stick is Ok.
2) Make su