Re: USB hdd not in dmesg

2015-03-24 Thread Hendrik Meyburgh
Hi.

The patch was done.

Here is the dmesg, after the device was unplugged/plugged.

OpenBSD 5.7-current (GENERIC) #0: Tue Mar 24 08:48:05 SAST 2015
root@hendrik.voxtelecom.internal:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 8471175168 (8078MB)
avail mem = 8210534400 (7830MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe6920 (79 entries)
bios0: vendor Dell Inc. version A07 date 05/17/2012
bios0: Dell Inc. Inspiron 5520
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC UEFI ASF! HPET APIC MCFG SSDT BOOT ASPT FPDT
SSDT SSDT SSDT
acpi0: wakeup devices P0P1(S0) EHC1(S0) XHC_(S0) RP01(S3) RP02(S0) PEG0(S4)
PEGP(S4) PEGA(S4) PEG1(S4) PEG2(S4) PEG3(S4) LID0(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz, 2095.59 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 0 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 7 (RP01)
acpiprt3 at acpi0: bus 8 (RP02)
acpiprt4 at acpi0: bus 1 (PEG0)
acpiprt5 at acpi0: bus -1 (PEG1)
acpiprt6 at acpi0: bus -1 (PEG2)
acpiprt7 at acpi0: bus -1 (PEG3)
acpiec0 at acpi0
acpicpu0 at acpi0: C2, C1, PSS
acpipwrres0 at acpi0: FN00, resource for FAN0
acpipwrres1 at acpi0: FN01, resource for FAN1
acpipwrres2 at acpi0: FN02, resource for FAN2
acpipwrres3 at acpi0: FN03, resource for FAN3
acpipwrres4 at acpi0: FN04, resource for FAN4
acpitz0 at acpi0: critical temperature is 106 degC
acpitz1 at acpi0: critical temperature is 106 degC
acpibtn0 at acpi0: PWRB
acpibat0 at acpi0: BAT1 model PABAS0241231 serial 41167 type Li-Ion oem
Simplo
acpiac0 at acpi0: AC unit online
acpibtn1 at acpi0: LID0
acpivideo0 at acpi0: VGA_
acpivout0 at acpivideo0: LCD_
acpivideo1 at acpi0: GFX0
acpivout1 at acpivideo1: DD02
ipmi: unknown register spacing
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 2095 MHz: speeds: 2101, 2100, 2000, 1900, 1800,
1700, 1600, 1500, 1400, 1300, 1200 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel Core 3G Host rev 0x09
ppb0 at pci0 dev 1 function 0 Intel Core 3G PCIE rev 0x09: msi
pci1 at ppb0 bus 1
1:0:0: mem address conflict 0xfffe/0x2
radeondrm0 at pci1 dev 0 function 0 ATI Radeon HD 7670M rev 0x00
drm1 at radeondrm0
radeondrm0: msi
vga1 at pci0 dev 2 function 0 Intel HD Graphics 4000 rev 0x09
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1920x1080
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
xhci0 at pci0 dev 20 function 0 Intel 7 Series xHCI rev 0x04: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 Intel xHCI root hub rev 3.00/1.00 addr 1
uhub0: 8 ports with 8 removable, self powered
Intel 7 Series MEI rev 0x04 at pci0 dev 22 function 0 not configured
ehci0 at pci0 dev 26 function 0 Intel 7 Series USB rev 0x04: apic 0 int 16
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 Intel EHCI root hub rev 2.00/1.00 addr 1
uhub1: 2 ports with 2 removable, self powered
azalia0 at pci0 dev 27 function 0 Intel 7 Series HD Audio rev 0x04: msi
azalia0: codecs: Conexant/0x506e, Intel/0x2806, using Conexant/0x506e
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 Intel 7 Series PCIE rev 0xc4: msi
pci2 at ppb1 bus 7
re0 at pci2 dev 0 function 0 Realtek 8101E rev 0x05: RTL8105E (0x4080),
msi, address d4:be:d9:39:94:b3
rlphy0 at re0 phy 7: RTL8201E 10/100 PHY, rev. 2
ppb2 at pci0 dev 28 function 1 Intel 7 Series PCIE rev 0xc4: msi
pci3 at ppb2 bus 8
iwn0 at pci3 dev 0 function 0 Intel Centrino Wireless-N 2230 rev 0xc4:
msi, MIMO 2T2R, BGN, address 68:5d:43:60:b9:63
ehci1 at pci0 dev 29 function 0 Intel 7 Series USB rev 0x04: apic 0 int 23
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 Intel EHCI root hub rev 2.00/1.00 addr 1
uhub2: 2 ports with 2 removable, self powered
pcib0 at pci0 dev 31 function 0 Intel HM77 LPC rev 0x04
ahci0 at pci0 dev 31 function 2 Intel 7 Series AHCI rev 0x04: msi, AHCI
1.3
ahci0: port 0: 6.0Gb/s
ahci0: port 2: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: ATA, TS256GSSD720, 5.0. 

USB hdd not in dmesg

2015-03-23 Thread Hendrik Meyburgh
Hi.

The 5.7 snapshot for 18th of March is not picking up any of my external HDD
on USB, it does not show in dmesg.

Below is some information about the hardware.

I have played around with the settings in the bios, as per some previous
suggestions about disabling USB 3 and XHCI, but I only have enable/disable
usb options.

How can I debug this issue further. The system was installed via the same
usb ports and it was working in 5.6.

Here is the dmesg:

OpenBSD 5.7-current (GENERIC.MP) #895: Wed Mar 18 18:55:03 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8471175168 (8078MB)
avail mem = 8210497536 (7830MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe6920 (79 entries)
bios0: vendor Dell Inc. version A07 date 05/17/2012
bios0: Dell Inc. Inspiron 5520
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC UEFI ASF! HPET APIC MCFG SSDT BOOT ASPT FPDT
SSDT SSDT SSDT
acpi0: wakeup devices P0P1(S0) EHC1(S0) XHC_(S0) RP01(S3) RP02(S0) PEG0(S4)
PEGP(S4) PEGA(S4) PEG1(S4) PEG2(S4) PEG3(S4) LID0(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz, 2095.53 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz, 2095.24 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz, 2095.24 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz, 2095.24 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
cpu4 at mainbus0: apid 4 (application processor)
cpu4: Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz, 2095.24 MHz
cpu4:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu4: 256KB 64b/line 8-way L2 cache
cpu4: smt 0, core 2, package 0
cpu5 at mainbus0: apid 5 (application processor)
cpu5: Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz, 2095.24 MHz
cpu5:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu5: 256KB 64b/line 8-way L2 cache
cpu5: smt 1, core 2, package 0
cpu6 at mainbus0: apid 6 (application processor)
cpu6: Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz, 2095.24 MHz
cpu6:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu6: 256KB 64b/line 8-way L2 cache
cpu6: smt 0, core 3, package 0
cpu7 at mainbus0: apid 7 (application processor)
cpu7: Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz, 2095.24 MHz
cpu7:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS

Re: USB hdd not in dmesg

2015-03-23 Thread Martin Pieuchot
Hello,

On 23/03/15(Mon) 14:55, Hendrik Meyburgh wrote:
 
 The 5.7 snapshot for 18th of March is not picking up any of my external HDD
 on USB, it does not show in dmesg.
 
 Below is some information about the hardware.
 
 I have played around with the settings in the bios, as per some previous
 suggestions about disabling USB 3 and XHCI, but I only have enable/disable
 usb options.
 
 How can I debug this issue further. The system was installed via the same
 usb ports and it was working in 5.6.
 
 Here is the dmesg:
 [...]
 Hub Descriptor:
   bLength  17
   bDescriptorType  42
   nNbrPorts 8
   wHubCharacteristic 0x
 Ganged power switching
 Ganged overcurrent protection
 TT think time 8 FS bits
   bPwrOn2PwrGood   10 * 2 milli seconds
   bHubContrCurrent  0 milli Ampere
   DeviceRemovable0x00 0x00
   PortPwrCtrlMask0x00 0x00
  Hub Port Status:
Port 1: .0900 Unknown Speed Recovery
Port 2: 0001.0900 C_CONNECT Unknown Speed Recovery
   ^

So apparently your device is correctly detected as connected.  Sadly the
uhub(4) logic is a bit tricky and it's hard to tell where the problem
comes from.

Does unplugging/plugging your HDD makes OpenBSD recognize it?

The patch below should help.  Could you build a kernel with it and
UHUB_DEBUG defined, boot it then unplug/plug your disk and send me
the dmesg?

Thanks,
Martin

Index: uhub.c
===
RCS file: /cvs/src/sys/dev/usb/uhub.c,v
retrieving revision 1.83
diff -u -p -r1.83 uhub.c
--- uhub.c  12 Feb 2015 05:07:52 -  1.83
+++ uhub.c  23 Mar 2015 13:37:38 -
@@ -47,6 +47,8 @@
 
 #define UHUB_INTR_INTERVAL 255 /* ms */
 
+#define UHUB_DEBUG
+
 #ifdef UHUB_DEBUG
 #define DPRINTF(x...)  do { printf(x); } while (0)
 #else
@@ -377,8 +379,13 @@ uhub_explore(struct usbd_device *dev)
change = UGETW(up-status.wPortChange);
reconnect = up-reattach;
up-reattach = 0;
-   DPRINTF(%s: port %d status=0x%04x change=0x%04x\n,
-   sc-sc_dev.dv_xname, port, status, change);
+
+#ifdef UHUB_DEBUG
+   if (up-device != NULL || (status  UPS_CURRENT_CONNECT_STATUS))
+   printf(%s: port %d status=0x%04x change=0x%04x\n,
+   sc-sc_dev.dv_xname, port, status, change);
+#endif
+
if (change  UPS_C_PORT_ENABLED) {
usbd_clear_port_feature(dev, port, UHF_C_PORT_ENABLE);
if (change  UPS_C_CONNECT_STATUS) {
@@ -402,6 +409,10 @@ uhub_explore(struct usbd_device *dev)
   sc-sc_dev.dv_xname, port);
}
}
+
+   if (up-device == NULL  (status  UPS_CURRENT_CONNECT_STATUS))
+   change |= UPS_C_CONNECT_STATUS;
+
if (!reconnect  !(change  UPS_C_CONNECT_STATUS)) {
/* No status change, just do recursive explore. */
if (up-device != NULL  up-device-hub != NULL)