Re: usb/105186: USB 2.0/ehci on FreeBSD 6.2-PRE/AMD64 crashes box

2007-08-16 Thread Khairil Yusof
Sorry this is out of thread order, these hangs only seem to effect my
server. 

Here is the info you requested, I hope it is useful.



diskinfo /dev/afd0

/dev/afd0   512 500107861504976773167   969020  16  63


The debug messages from the start are as follows:

Aug 16 13:45:34 gambit kernel: usb0: 12MBps Full Speed USB v1.0
Aug 16 13:45:34 gambit kernel: uhub0: SiS OHCI root hub, class 9/0, rev
1.00/1.00, addr 127
Aug 16 13:45:34 gambit kernel: uhub0: 3 ports with 3 removable, self
powered
Aug 16 13:45:34 gambit kernel: usb1: 12MBps Full Speed USB v1.0
Aug 16 13:45:34 gambit kernel: uhub1: SiS OHCI root hub, class 9/0, rev
1.00/1.00, addr 127
Aug 16 13:45:34 gambit kernel: uhub1: 3 ports with 3 removable, self
powered
Aug 16 13:45:34 gambit kernel: usb2: 12MBps Full Speed USB v1.0
Aug 16 13:45:34 gambit kernel: uhub2: SiS OHCI root hub, class 9/0, rev
1.00/1.00, addr 127
Aug 16 13:45:34 gambit kernel: uhub2: 2 ports with 2 removable, self
powered
Aug 16 13:45:34 gambit kernel: usb3: 480MBps High Speed USB v2.0
Aug 16 13:45:34 gambit kernel: uhub3: SiS EHCI root hub, class 9/0, rev
2.00/1.00, addr 127
Aug 16 13:45:34 gambit kernel: uhub3: 8 ports with 8 removable, self
powered
Aug 16 13:45:34 gambit kernel: atausb0: Seagate FreeAgentDesktop, class
0/0, rev 2.00/0.00, addr 126
Aug 16 13:45:34 gambit kernel: atausb0: using SCSI over Bulk-Only
Aug 16 13:45:34 gambit kernel: ata2: USB lun 0 on atausb0
Aug 16 13:45:34 gambit kernel: ipfw2 (+ipv6) initialized, divert
loadable, rule-based forwarding enabled, default to deny, logging
limited to 100 packets/entry by default
Aug 16 13:45:34 gambit kernel: ad0: 76319MB WDC WD800JB-00JJC0
05.01C05 at ata0-master UDMA100
Aug 16 13:45:34 gambit kernel: GEOM_MIRROR: Device gm0 created
(id=260458111).
Aug 16 13:45:34 gambit kernel: GEOM_MIRROR: Device gm0: provider ad0
detected.
Aug 16 13:45:34 gambit kernel: ad1: 76319MB WDC WD800JB-00JJC0
05.01C05 at ata0-slave UDMA100
Aug 16 13:45:34 gambit kernel: GEOM_MIRROR: Device gm0: provider ad1
detected.
Aug 16 13:45:34 gambit kernel: GEOM_MIRROR: Device gm0: provider ad1
activated.
Aug 16 13:45:34 gambit kernel: GEOM_MIRROR: Device gm0: provider ad0
activated.
Aug 16 13:45:34 gambit kernel: GEOM_MIRROR: Device gm0: provider
mirror/gm0 launched.
Aug 16 13:45:34 gambit kernel: acd0: CDRW SONY CD-RW CRX320EE/RYK3 at
ata1-master UDMA33
Aug 16 13:45:34 gambit kernel: unknown: begin_transaction ATAPI_IDENTIFY
Aug 16 13:45:34 gambit kernel: atausb0: BBB transfer 4
Aug 16 13:45:34 gambit kernel: atausb0: atausb_t_bbb_data_read_callback:
max_bulk=131072, ata_bytecount=255
Aug 16 13:45:34 gambit kernel: atausb0: atausb_t_bbb_data_read_callback:
max_bulk=131072, ata_bytecount=0
Aug 16 13:45:34 gambit kernel: atausb0: BBB transfer 8
Aug 16 13:45:34 gambit kernel: atausb0: atausb_t_bbb_status_callback:
depreciated unlock!
Aug 16 13:45:34 gambit kernel: unknown: end_transaction INQUIRY
Aug 16 13:45:34 gambit kernel: afd0: begin_transaction TEST_UNIT_READY
Aug 16 13:45:34 gambit kernel: atausb0: BBB transfer 8
Aug 16 13:45:34 gambit kernel: atausb0: atausb_t_bbb_status_callback:
depreciated unlock!
Aug 16 13:45:34 gambit kernel: afd0: end_transaction TEST_UNIT_READY
Aug 16 13:45:34 gambit kernel: afd0: begin_transaction READ_CAPACITY
Aug 16 13:45:34 gambit kernel: atausb0: BBB transfer 4
Aug 16 13:45:34 gambit kernel: atausb0: atausb_t_bbb_data_read_callback:
max_bulk=131072, ata_bytecount=8
Aug 16 13:45:34 gambit kernel: atausb0: atausb_t_bbb_data_read_callback:
max_bulk=131072, ata_bytecount=0
Aug 16 13:45:34 gambit kernel: atausb0: BBB transfer 8
Aug 16 13:45:34 gambit kernel: atausb0: atausb_t_bbb_status_callback:
depreciated unlock!
Aug 16 13:45:34 gambit kernel: afd0: end_transaction READ_CAPACITY
Aug 16 13:45:34 gambit kernel: afd0: begin_transaction TEST_UNIT_READY
Aug 16 13:45:34 gambit kernel: atausb0: BBB transfer 8
Aug 16 13:45:34 gambit kernel: atausb0: atausb_t_bbb_status_callback:
depreciated unlock!
Aug 16 13:45:34 gambit kernel: afd0: end_transaction TEST_UNIT_READY
Aug 16 13:45:34 gambit kernel: afd0: 476940MB FreeAgentDesktop 100D at
ata2-master USB2
Aug 16 13:45:34 gambit kernel: afd0: begin_transaction TEST_UNIT_READY
Aug 16 13:45:34 gambit kernel: atausb0: BBB transfer 8
Aug 16 13:45:34 gambit kernel: atausb0: atausb_t_bbb_status_callback:
depreciated unlock!
Aug 16 13:45:34 gambit kernel: afd0: end_transaction TEST_UNIT_READY
Aug 16 13:45:34 gambit kernel: afd0: begin_transaction PREVENT_ALLOW
Aug 16 13:45:34 gambit kernel: atausb0: BBB transfer 8
Aug 16 13:45:34 gambit kernel: atausb0: CSWSTATUS_FAILED
Aug 16 13:45:34 gambit kernel: atausb0: atausb_t_bbb_status_callback:
depreciated unlock!
Aug 16 13:45:34 gambit kernel: afd0: end_transaction PREVENT_ALLOW
Aug 16 13:45:34 gambit kernel: afd0: begin_transaction REQUEST_SENSE
Aug 16 13:45:34 gambit kernel: atausb0: BBB transfer 4
Aug 16 13:45:34 gambit kernel: atausb0: atausb_t_bbb_data_read_callback:
max_bulk=131072, ata_bytecount=18
Aug 16 

Re: usbd_set_config_no vs. usbd_set_config_index

2007-08-16 Thread Andriy Gapon
on 16/08/2007 19:15 Hans Petter Selasky said the following:
 Hi,
 
 I would say that usbd_set_config_index() is more reliable and faster 
 than usbd_set_config_no(). I tried to get rid of 
 all usbd_set_config_no().

Hmm, then I am puzzled how my change from *_index() to *_no() helped in
my case. Maybe some parameters were incorrect, or maybe different
devices need different parameters and that's where _no() comes useful.

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


Re: usbd_set_config_no vs. usbd_set_config_index

2007-08-16 Thread Andriy Gapon
on 16/08/2007 19:41 Hans Petter Selasky said the following:
 On Thursday 16 August 2007, Andriy Gapon wrote:
 on 16/08/2007 19:15 Hans Petter Selasky said the following:
 Hi,

 I would say that usbd_set_config_index() is more reliable and faster
 than usbd_set_config_no(). I tried to get rid of
 all usbd_set_config_no().
 Hmm, then I am puzzled how my change from *_index() to *_no() helped in
 my case. Maybe some parameters were incorrect, or maybe different
 devices need different parameters and that's where _no() comes useful.
 
 What config number are you setting?
 
 Have you dumped the configuration of your device using udesc_dump 
 (See /usr/ports/sysutils/udesc_dump) ?

Thank you for bearing with me.
To reiterate: I was trying palm/uppc-kmod on amd64 6.2 with standard USB
stack. attach routine had the following line:
err = usbd_set_config_index(dev, UPPC_CONFIG_INDEX, 1);
where UPPC_CONFIG_INDEX is defined to 1.
It failed with:
kernel: ucom0: failed to set configuration, err=STALLED
kernel: device_attach: ucom0 attach returned 6

My only change was from _index to _no and then it started to work.
Here's udesc_dump full output:

Standard Device Descriptor:
  bLength18
  bDescriptorType01
  bcdUSB 0200
  bDeviceClass   00
  bDeviceSubClass00
  bDeviceProtocol00
  bMaxPacketSize 16
  idVendor   0b05
  idProduct  420f
  bcdDevice  
  iManufacturer  1
  iProduct   2
  iSerialNumber  3
  bNumConfigurations 1

Configuration 0:
Standard Configuration Descriptor:
  bLength 9
  bDescriptorType 02
  wTotalLength32
  bNumInterface   1
  bConfigurationValue 1
  iConfiguration  0
  bmAttributes80
  bMaxPower   250 (500 mA)

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

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): ASUS

String (index 2): ASUS PPC

String (index 3): f553b4ec-0dee-9dcc-7a63-40a7b4d674b9

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


Re: scsi_da quirk for a device with no name

2007-08-16 Thread Andriy Gapon
on 16/08/2007 15:22 Andriy Gapon said the following:
 I have ASUS P535 PPC+phone with Windows Mobile 5 on it.
 It has an option to act as a USB mass storage (instead of attempting
 acivesync).
[snip]
 So I attempted the latter quirk and it helped me! But there is one not
 good thing about the way I did that - I used wild cards (*) for all
 three of vendor, product and revision. This is because they all appear
 to be empty/unset. This is shown in both kernel messages and by
 camcontrol devlist and by camcontrol inquiry.
 I am not sure if there are any risks of applying the quirk to all
 possible da devices, there will be only umass ones in my case, but I
 still would like to do something more specific to the device in question.
 
 Will empty patterns work ? I mean if I put , ,  entry into the
 quirk array. Actually, I can test this myself soon, but not today.

No, empty strings/patterns (all 3 of them) do not work.
Are there any better ways ?
I know, use the source, Luke :-)

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


Re: usb/105186: USB 2.0/ehci on FreeBSD 6.2-PRE/AMD64 crashes box

2007-08-16 Thread Khairil Yusof
On Thu, 2007-08-16 at 18:20 +0200, Hans Petter Selasky wrote:

 It looks like the block size is 512 bytes.
 
 Could you send the complete dmesg until the error happens ?

The errors then repeat continuously.

dmesg.boot:


Copyright (c) 1992-2007 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights
reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 6.2-RELEASE-p7 #12: Thu Aug 16 14:31:56 MYT 2007
[EMAIL PROTECTED]:/tmp/obj/usr/src/sys/GAMBIT
Timecounter i8254 frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) 64 Processor 3000+ (999.72-MHz K8-class CPU)
  Origin = AuthenticAMD  Id = 0xf4a  Stepping = 10

Features=0x78bfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2
  AMD Features=0xe0500800SYSCALL,NX,MMX+,LM,3DNow+,3DNow
real memory  = 1040121856 (991 MB)
avail memory = 992014336 (946 MB)
ACPI APIC Table: AWARD  AWRDACPI
ioapic0 Version 1.4 irqs 0-23 on motherboard
acpi0: AWARD AWRDACPI on motherboard
acpi0: Power Button (fixed)
Timecounter ACPI-fast frequency 3579545 Hz quality 1000
acpi_timer0: 24-bit timer at 3.579545MHz port 0x1008-0x100b on acpi0
cpu0: ACPI CPU on acpi0
powernow0: Cool`n'Quiet K8 on cpu0
acpi_button0: Power Button on acpi0
acpi_button1: Sleep Button on acpi0
pcib0: ACPI Host-PCI bridge port
0xcf8-0xcff,0x480-0x48f,0x1000-0x10df,0x10e0-0x10ff on acpi0
pci0: ACPI PCI bus on pcib0
agp0: SiS 760 host to AGP bridge mem 0xe800-0xe9ff at device
0.0 on pci0
pcib1: PCI-PCI bridge at device 1.0 on pci0
pci1: PCI bus on pcib1
pci1: display, VGA at device 0.0 (no driver attached)
isab0: PCI-ISA bridge at device 2.0 on pci0
isa0: ISA bus on isab0
atapci0: SiS 964 UDMA133 controller port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x4000-0x400f at device 2.5 on pci0
ata0: ATA channel 0 on atapci0
ata1: ATA channel 1 on atapci0
ohci0: SiS 5571 USB controller mem 0xea124000-0xea124fff irq 20 at
device 3.0 on pci0
usb0: SMM does not respond, resetting
usb0: SiS 5571 USB controller on ohci0
ohci1: SiS 5571 USB controller mem 0xea12-0xea120fff irq 21 at
device 3.1 on pci0
usb1: SMM does not respond, resetting
usb1: SiS 5571 USB controller on ohci1
ohci2: SiS 5571 USB controller mem 0xea121000-0xea121fff irq 22 at
device 3.2 on pci0
usb2: SMM does not respond, resetting
usb2: SiS 5571 USB controller on ohci2
pci0: serial bus, USB at device 3.3 (no driver attached)
sis0: SiS 900 10/100BaseTX port 0xe000-0xe0ff mem
0xea123000-0xea123fff irq 19 at device 4.0 on pci0
miibus0: MII bus on sis0
rlphy0: RTL8201L 10/100 media interface on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sis0: Ethernet address: 00:01:6c:a2:0b:3b
acpi_tz0: Thermal Zone on acpi0
fdc0: floppy drive controller port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on
acpi0
fdc0: [FAST]
sio0: 16550A-compatible COM port port 0x3f8-0x3ff irq 4 flags 0x10 on
acpi0
sio0: type 16550A
sio1: 16550A-compatible COM port port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
ppc0: ECP parallel printer port port 0x378-0x37f,0x778-0x77b irq 7 drq
3 on acpi0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/16 bytes threshold
ppbus0: Parallel port bus on ppc0
plip0: PLIP network interface on ppbus0
lpt0: Printer on ppbus0
lpt0: Interrupt-driven port
ppi0: Parallel I/O on ppbus0
orm0: ISA Option ROMs at iomem 0xc-0xcbfff,0xcc000-0xd3fff on isa0
atkbdc0: Keyboard controller (i8042) at port 0x60,0x64 on isa0
atkbd0: AT Keyboard irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
sc0: System console at flags 0x100 on isa0
sc0: VGA 16 virtual consoles, flags=0x300
vga0: Generic ISA VGA at port 0x3c0-0x3df iomem 0xa-0xb on
isa0
Timecounter TSC frequency 999721151 Hz quality 800
Timecounters tick every 1.000 msec
usb0: 12MBps Full Speed USB v1.0
uhub0: SiS OHCI root hub, class 9/0, rev 1.00/1.00, addr 127
uhub0: 3 ports with 3 removable, self powered
usb1: 12MBps Full Speed USB v1.0
uhub1: SiS OHCI root hub, class 9/0, rev 1.00/1.00, addr 127
uhub1: 3 ports with 3 removable, self powered
atausb0: Seagate FreeAgentDesktop, class 0/0, rev 2.00/0.00, addr 126
atausb0: using SCSI over Bulk-Only
ata2: USB lun 0 on atausb0
usb2: 12MBps Full Speed USB v1.0
uhub2: SiS OHCI root hub, class 9/0, rev 1.00/1.00, addr 127
uhub2: 2 ports with 2 removable, self powered
ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding
enabled, default to deny, logging limited to 100 packets/entry by
default
ad0: 76319MB WDC WD800JB-00JJC0 05.01C05 at ata0-master UDMA100
GEOM_MIRROR: Device gm0 created (id=260458111).
GEOM_MIRROR: Device gm0: provider ad0 detected.
ad1: 76319MB WDC WD800JB-00JJC0 05.01C05 at ata0-slave UDMA100
GEOM_MIRROR: Device gm0: provider ad1 detected.
GEOM_MIRROR: Device gm0: provider ad1 activated.
GEOM_MIRROR: Device gm0: provider ad0 activated.
GEOM_MIRROR: Device gm0: provider mirror/gm0 launched.
acd0: CDRW