# [SOLVED] usb probe fails with error -22

## nekromancer

Hi

I'm running Gentoo Linux kernel 2.6.28-gentoo-r5 and I am trying to get a magentic stripe card reader (USB) to work on it. It seems to work fine on a windows XP machine. Just plug it in and open notepad, as I swipe a card it outputs the numbers in notepad.

On gentoo I get an error message in my dmesg saying

```

usb 5-2: new low speed USB device using uhci_hcd and address 3

usb 5-2: configuration #1 chosen from 1 choice

generic-usb: prob of 0003:04B4:ED81.0004 failed with error -22

```

I have no idea what the problem is and what to actually look for. Anyone can figure it out.Last edited by nekromancer on Mon Aug 17, 2009 10:26 pm; edited 1 time in total

----------

## nekromancer

I still can't figure this out. I've managed to get some info on the device.

lsusb -vv output

```

Bus 004 Device 006: ID 04b4:ed81 Cypress Semiconductor Corp. 

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               1.10

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0         8

  idVendor           0x04b4 Cypress Semiconductor Corp.

  idProduct          0xed81 

  bcdDevice            2.50

  iManufacturer           1 Guest

  iProduct                2 Generic KB-HID

  iSerial                 0 

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength           34

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          4 HID KB

    bmAttributes         0xa0

      (Bus Powered)

      Remote Wakeup

    MaxPower              100mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           1

      bInterfaceClass         3 Human Interface Device

      bInterfaceSubClass      1 Boot Interface Subclass

      bInterfaceProtocol      1 Keyboard

      iInterface              5 EP1

        HID Device Descriptor:

          bLength                 9

          bDescriptorType        33

          bcdHID               1.00

          bCountryCode            0 Not supported

          bNumDescriptors         1

          bDescriptorType        34 Report

          wDescriptorLength      64

         Report Descriptors: 

           ** UNAVAILABLE **

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x81  EP 1 IN

        bmAttributes            3

          Transfer Type            Interrupt

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0008  1x 8 bytes

        bInterval              10

Device Status:     0x0002

  (Bus Powered)

  Remote Wakeup Enabled

```

/proc/bus/usb/devices output pertaining to bus 004

```

T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  6 Spd=1.5 MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=04b4 ProdID=ed81 Rev= 2.50

S:  Manufacturer=Guest

S:  Product=Generic KB-HID

C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid

E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

```

I looked through the kernel config and found some references to Cypress devices. Added them for support and still I get this error

```

Aug 18 00:35:16 toshi usb 4-2: USB disconnect, address 5

Aug 18 00:35:20 toshi usb 4-2: new low speed USB device using uhci_hcd and address 6

Aug 18 00:35:20 toshi usb 4-2: configuration #1 chosen from 1 choice

Aug 18 00:35:20 toshi generic-usb: probe of 0003:04B4:ED81.0005 failed with error -22

```

Still don't know what the problem is, does it need a driver? does windows recognize the device and linux doesn't ? Is this some Xorg issue if it sees it as a second keyboard ?

----------

## nekromancer

Amazing how there is very little info on this anywhere.

Solve the problem by modularizing hid support in the kernel. Making usbkbd and usbmouse (simple boot) as modules. Before they were compiled in. Then I boot gentoo, run modprobe usbkbd, and the card reader works now.

hooray for me.

----------

