Usb_deregister_dev(interface, &cypress_class) Printk(KERN_ALERT "%s Failed to register USB device. Minor = usb_register_dev(interface, &cypress_class) * register device and ask for a minor number */ Printk(KERN_ALERT "%s Failed to find suitable bulk out endpoint in interface", DRIVER_NAME) Printk(KERN_INFO "%s Found suitable bulk out endpoint in interface", DRIVER_NAME) If(!usb_find_bulk_out_endpoint(intf_desc, &endpoint))Ĭyp->bulk_out_size = endpoint->wMaxPacketSize Ĭyp->bulk_out_endpointAddr = endpoint->bEndpointAddress * check if bulk out endpoint is available in the probed interface */ Printk(KERN_ALERT "%s Failed to find suitable bulk in endpoint in interface", DRIVER_NAME) Printk(KERN_INFO "%s Found suitable bulk in endpoint in interface", DRIVER_NAME) If(!usb_find_bulk_in_endpoint(intf_desc, &endpoint))Ĭyp->bulk_in_size = endpoint->wMaxPacketSize Ĭyp->bulk_in_endpointAddr = endpoint->bEndpointAddress * check if bulk in endpoint is available in the probed interface */ Printk(KERN_INFO "%s\t\t EP->wMaxPacketSize: 0x%04X (%d)", DRIVER_NAME, i, endpoint->wMaxPacketSize, endpoint->wMaxPacketSize) Printk(KERN_INFO "%s\t\t EP->bDescriptorType: 0x%02X", DRIVER_NAME, i, endpoint->bDescriptorType) Printk(KERN_INFO "%s\t\t EP->bEndpointAddress: 0x%02X", DRIVER_NAME, i, endpoint->bEndpointAddress) Printk(KERN_INFO "%s Interface %d with class %02X and %d endpoints now probed", \ĭRIVER_NAME, intf_desc->desc.bInterfaceNumber, intf_desc->desc.bInterfaceClass, intf_desc->desc.bNumEndpoints) Printk(KERN_INFO "%s Cypress USB BULK Transfer device detected (Vendor:%04X Product:%04X)", DRIVER_NAME, id->idVendor, id->idProduct) * get pointer to interface descriptor */ * get container device from interface pointer */ Printk(KERN_ALERT "%s Failed to allocate memory for the device.", DRIVER_NAME) Struct usb_endpoint_descriptor *endpoint Ĭyp = kzalloc(sizeof(struct cypress_usb_dev), GFP_KERNEL) Static int cypress_probe(struct usb_interface *interface, const struct usb_device_id *id) * probe function is called on device insertation through the USB core */ Usb_free_coherent(cyp->device, cyp->bulk_in_size, cyp->buffer_urb_in2, cyp->dma_buffer_urb_in2) Usb_free_coherent(cyp->device, cyp->bulk_in_size, cyp->buffer_urb_in1, cyp->dma_buffer_urb_in1) Usb_kill_anchored_urbs(&cyp->write_urbs) #define DRIVER_NAME "Cypress_USB_Bulk_Transfer_Driver" #include /* wait_queue_head_t, wait_event_interruptible, wake_up_interruptible */ Can someone explain to me what happens here? #include In the syslog I can not find any helpful information. When sending more than 2000Bytes the whole system suddenly crashes. The magic barrier seems to be round about 2000Bytes. Basically this works, but only for small amounts of data. The USB interface on the Cypress PSoC is configured to send any data it receives via the bulk in endpoint back out via the bulk out endpoint. I am trying to write my own USB driver for my Cypress CY8CKIT-059 PSoC 5LP. So again,ĬONFIG_DEBUG_SLAB will catch this kind of thing.I am using Linux ubuntu 5.4.0-1026-raspi. > + if (atomic_read(&kref->refcount) = 1)īut again, if this happens the memory will be freed. > So this patch also set kref counter to zero here: > trying to reduce the number of atomic_dec_and_test() > But the kref counter usually does not become zero. > bio.c: BIO_BUG_ON(!atomic_read(&bio->bi_cnt)) > ll_rw_blk.c: BUG_ON(atomic_read(&ioc->refcount) = 0) > from BUG_ON()es in blocks/ll_rw_blk.c and fs/bio.c > The idea of detection kref_put() with unreferenced object was stolen > How can this ever be true? If the refcount _ever_ goes below 1, the > + WARN_ON(atomic_read(&kref->refcount) > > int kref_put(struct kref *kref, void (*release)(struct kref *kref))
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |