d-link usb wifi device ids

2013-09-28 Thread frantisek holop
hi there,

after inserting this D-LINK DWA-125 rev A3 usb wifi, i get:

ugen1 at uhub0 port 6 Ralink 11n Adapter rev 2.00/1.01 addr 5

which is kind of true, as it is supposed to be
powered by Ralink RT5370.  but according to
/sys/dev/usb/usbdevs, 0x2001 is DLINK and 0x3c19 is not even in there.

to add more to my confusion usbdevs -v shows:

$ usbdevs -v | grep Ralink
 port 2 addr 2: high speed, power 450 mA, config 1, 802.11 n WLAN(0x01a2), 
Ralink(0x0411), rev 1.01, iSerialNumber 1.0
 port 6 addr 5: high speed, power 450 mA, config 1, 11n Adapter(0x3c19), 
Ralink(0x2001), rev 1.01, iSerialNumber 1.0

what is that other device?

-f
-- 
computers run on smoke. if it leaks out they won't work.



Re: d-link usb wifi device ids

2013-09-28 Thread Remco
frantisek holop wrote:

Unless you include the code to make these devices work in your mail, I think 
you should send stuff like this to misc@.

 hi there,
 
 after inserting this D-LINK DWA-125 rev A3 usb wifi, i get:
 
 ugen1 at uhub0 port 6 Ralink 11n Adapter rev 2.00/1.01 addr 5
 
 which is kind of true, as it is supposed to be
 powered by Ralink RT5370.  but according to
 /sys/dev/usb/usbdevs, 0x2001 is DLINK and 0x3c19 is not even in there.
 
 to add more to my confusion usbdevs -v shows:
 
 $ usbdevs -v | grep Ralink
  port 2 addr 2: high speed, power 450 mA, config 1, 802.11 n WLAN(0x01a2),
  Ralink(0x0411), rev 1.01, iSerialNumber 1.0
  port 6 addr 5: high speed, power 450 mA, config 1, 11n Adapter(0x3c19),
  Ralink(0x2001), rev 1.01,  iSerialNumber 1.0 
 
 what is that other device?
 
 -f

I suspect your computer already has a USB WLAN adapter built-in.
If so, pulling the D-Link adapter should leave the other device in place.
(the dmesg may also shed more light on this)



loongson panic on current

2013-09-28 Thread Otto Moerbeek
Hi,

I recently upgraded my yeeloong and now I'm seeing this panic, it
happened twice already.

All hand-transcribed.

panic: kernel diagnostic assertion p-p_wchan == NULL failed: file
../../../../kern/kern_sched.c, line 322

trace:
Debugger+0x4
panic+0xe4
addupc_intr+0x0

active process is 
2 0 0 0 2 0x40100200 usbsyn idle0

The machine is using a axe(4) USB ethernet interface, since the
on-board rl(4) interface was fried by lightning. 

dmesg below

-Otto

OpenBSD 5.4-current (GENERIC) #3: Fri Sep 27 11:32:41 CEST 2013
o...@rocal.intra.drijf.net:/usr/src/sys/arch/loongson/compile/GENERIC
real mem = 1073741824 (1024MB)
avail mem = 1058979840 (1009MB)
mainbus0 at root: Lemote Yeeloong
cpu0 at mainbus0: STC Loongson2F CPU 797 MHz, STC Loongson2F FPU
cpu0: cache L1-I 64KB D 64KB 4 way, L2 512KB 4 way
bonito0 at mainbus0: memory and PCI-X controller, rev 1
pci0 at bonito0 bus 0
rl0 at pci0 dev 7 function 0 Realtek 8139 rev 0x10: irq 5, address 
00:23:8b:f2:b4:5b
rlphy0 at rl0 phy 0: RTL internal PHY
smfb0 at pci0 dev 8 function 0 Silicon Motion LynxEM+ rev 0xb0
wsdisplay0 at smfb0 mux 1: console (std, vt100 emulation)
ohci0 at pci0 dev 9 function 0 NEC USB rev 0x44: irq 7, version 1.0
ehci0 at pci0 dev 9 function 1 NEC USB rev 0x05: irq 7
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 NEC EHCI root hub rev 2.00/1.00 addr 1
glxpcib0 at pci0 dev 14 function 0 AMD CS5536 ISA rev 0x03: rev 3, 32-bit 
3579545Hz timer, watchdog, gpio, i2c
isa0 at glxpcib0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
mcclock0 at isa0 port 0x70/2: mc146818 or compatible
ykbec0 at isa0 port 0x381/3
gpio1 at glxpcib0: 32 pins
iic at glxpcib0 not configured
glxclk0 at glxpcib0: clock, prof
pciide0 at pci0 dev 14 function 2 AMD CS5536 IDE rev 0x01: DMA, channel 0 
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: WDC WD1600BEVS-00VAT0
wd0: 16-sector PIO, LBA48, 152627MB, 312581808 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
auglx0 at pci0 dev 14 function 3 AMD CS5536 Audio rev 0x01: isa irq 9, CS5536 
AC97
ac97: codec id 0x414c4760 (Avance Logic ALC655 rev 0)
audio0 at auglx0
ohci1 at pci0 dev 14 function 4 AMD CS5536 USB rev 0x02: isa irq 11, version 
1.0, legacy support
ehci1 at pci0 dev 14 function 5 AMD CS5536 USB rev 0x02: isa irq 11
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 AMD EHCI root hub rev 2.00/1.00 addr 1
usb2 at ohci0: USB revision 1.0
uhub2 at usb2 NEC OHCI root hub rev 1.00/1.00 addr 1
usb3 at ohci1: USB revision 1.0
uhub3 at usb3 AMD OHCI root hub rev 1.00/1.00 addr 1
apm0 at mainbus0
umass0 at uhub1 port 1 configuration 1 interface 0 Generic USB2.0-CRW rev 
2.00/58.87 addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: Generic-, Multi-Card, 1.00 SCSI0 0/direct 
removable serial.0bda015811417340
axe0 at uhub1 port 2 configuration 1 interface 0 ASIX Electronics AX88772 rev 
2.00/0.01 addr 3
axe0: AX88772, address 00:0c:f6:f1:40:0c
ukphy0 at axe0 phy 16: Generic IEEE 802.3u media interface, rev. 1: OUI 
0x000ec6, model 0x0006
urtw0 at uhub1 port 4 Realtek RTL8187B rev 2.00/2.00 addr 4
urtw0: RTL8187B rev E, address 00:17:c4:4e:09:d7
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
pmon bootpath: /dev/disk/wd0
boot device: wd0
root on wd0a (302295bac2fbf354.a) swap on wd0b dump on wd0b
WARNING: / was not properly unmounted



Re: d-link usb wifi device ids

2013-09-28 Thread Stuart Henderson
On 2013/09/28 11:34, frantisek holop wrote:
 hi there,
 
 after inserting this D-LINK DWA-125 rev A3 usb wifi, i get:
 
 ugen1 at uhub0 port 6 Ralink 11n Adapter rev 2.00/1.01 addr 5
 
 which is kind of true, as it is supposed to be
 powered by Ralink RT5370.  but according to
 /sys/dev/usb/usbdevs, 0x2001 is DLINK and 0x3c19 is not even in there.

Normally, strings for USB devices come from the device itself, iirc the kernel
strings are used when the device has no string.

 to add more to my confusion usbdevs -v shows:
 
 $ usbdevs -v | grep Ralink
  port 2 addr 2: high speed, power 450 mA, config 1, 802.11 n WLAN(0x01a2), 
 Ralink(0x0411), rev 1.01, iSerialNumber 1.0
  port 6 addr 5: high speed, power 450 mA, config 1, 11n Adapter(0x3c19), 
 Ralink(0x2001), rev 1.01, iSerialNumber 1.0
 
 what is that other device?

Any more clues from lsusb -v ?



Re: video.4 correction.

2013-09-28 Thread Jason McIntyre
On Fri, Sep 27, 2013 at 09:19:23PM +0200, Remco wrote:
 This should be more in line with the sys/videoio.h header.
 

fixed, thanks!
jmc

 Index: video.4
 ===
 RCS file: /home/cvs/src/share/man/man4/video.4,v
 retrieving revision 1.9
 diff -u -r1.9 video.4
 --- video.4   29 Mar 2011 20:30:51 -  1.9
 +++ video.4   27 Sep 2013 19:14:42 -
 @@ -62,7 +62,8 @@
  .Bd -literal
  struct v4l2_fmtdesc {
   u_int32_t   index;
 - enum v4l2_buf_type  flags;
 + enum v4l2_buf_type  type;
 + u_int32_t   flags;
   u_int8_tdescription[32];
   u_int32_t   pixelformat;
   u_int32_t   reserved[4];
 



Re: d-link usb wifi device ids

2013-09-28 Thread frantisek holop
hmm, on Sat, Sep 28, 2013 at 12:25:27PM +0100, Stuart Henderson said that
 On 2013/09/28 11:34, frantisek holop wrote:
  hi there,
  
  after inserting this D-LINK DWA-125 rev A3 usb wifi, i get:
  
  ugen1 at uhub0 port 6 Ralink 11n Adapter rev 2.00/1.01 addr 5
  
  which is kind of true, as it is supposed to be
  powered by Ralink RT5370.  but according to
  /sys/dev/usb/usbdevs, 0x2001 is DLINK and 0x3c19 is not even in there.
 
 Normally, strings for USB devices come from the device itself, iirc the kernel
 strings are used when the device has no string.
 
  to add more to my confusion usbdevs -v shows:
  
  $ usbdevs -v | grep Ralink
   port 2 addr 2: high speed, power 450 mA, config 1, 802.11 n WLAN(0x01a2), 
  Ralink(0x0411), rev 1.01, iSerialNumber 1.0
   port 6 addr 5: high speed, power 450 mA, config 1, 11n Adapter(0x3c19), 
  Ralink(0x2001), rev 1.01, iSerialNumber 1.0
  
  what is that other device?
 
 Any more clues from lsusb -v ?

well, the other device, that is of course my working,
other usb wifi dongle..  what threw me completely off was
that 0x0411 is Melco, the device itself is a Buffalo,
and it is shown as Ralink...

lsusb cleared that one up:

Bus 000 Device 002: ID 0411:01a2 BUFFALO INC. (formerly MelCo., Inc.) 
WLI-UC-GNM Wireless LAN Adapter
Device Descriptor:
  idVendor   0x0411 BUFFALO INC. (formerly MelCo., Inc.)
  idProduct  0x01a2 WLI-UC-GNM Wireless LAN Adapter
  iManufacturer   1 Ralink
  iProduct2 802.11 n WLAN
  iSerial 3 1.0


the D-Link device shows up as:

Bus 000 Device 005: ID 2001:3c19 D-Link Corp. 
Device Descriptor:
  idVendor   0x2001 D-Link Corp.
  idProduct  0x3c19 
  iManufacturer   1 Ralink
  iProduct2 11n Adapter
  iSerial 3 1.0


so iManufacturer and iProduct override usbdevs device ids.  i personally
find this kind of confusing, and i think it dilutes the value of dmesgs.
usbdevs(8) output is outright lying to me.  i think it should make a
disctinction between usbdevs id and iManufacturer.  in my case, i have 2
totally different devices but according to dmesg they are basically the
same, Ralink 11n Adapter and Ralink 802.11 n WLAN.

for what it's worth here is a small patch for usbdevs:


Index: usbdevs
===
RCS file: /cvs/src/sys/dev/usb/usbdevs,v
retrieving revision 1.605
diff -u -p -r1.605 usbdevs
--- usbdevs 5 Sep 2013 19:42:09 -   1.605
+++ usbdevs 29 Sep 2013 05:34:07 -
@@ -68,7 +68,7 @@ vendor QUANTA20x0408  Quanta
 vendor NEC 0x0409  NEC
 vendor KODAK   0x040a  Eastman Kodak
 vendor VIA 0x040d  VIA
-vendor MELCO   0x0411  Melco
+vendor BUFFALO 0x0411  Buffalo
 vendor LEADTEK 0x0413  Leadtek
 vendor CREATIVE0x041e  Creative Labs
 vendor NOKIA2  0x0421  Nokia
@@ -1457,6 +1457,7 @@ product DLINK RT2570  0x3c00  RT2570
 product DLINK DUBE100B10x3c05  DUB-E100 rev B1
 product DLINK RT2870   0x3c09  RT2870
 product DLINK RT3072   0x3c0a  RT3072
+product DLINK DWA125A3 0x3c19  DWA-125 rev A3
 product DLINK DSB650C  0x4000  10Mbps Ethernet
 product DLINK DSB650TX10x4001  10/100 Ethernet
 product DLINK DSB650TX 0x4002  10/100 Ethernet


-f
-- 
monday: in christian countries, the day after the footbal.