RE: [BUG] g_printer: Kernel freeze at disconnect/reconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> 
> >> For enable connect/disconnect interrupt, you can enable BSVIE at otgsc
> to
> >> trigger them, the use BSV at otgsc to judge connect and disconnect
> 
> You mean the connect/disconnect interrupt at otg-operationmode ? What
> do you mean with BSV ?
> 
As I don't know detail about your USB module at your SoC, for chipidea USB
core, there should be a otgsc register. It can be enabled at device only
mode. Through otgsc, you can set id/vbus enable bit, when id/vbus changes,
the interrupt will be triggered, then clear the related status bit at otgsc.
This interrupt number is the same with USBINTR. So, you can add this interrupt
handler at fsl_udc_irq.

 
> 
> I cannot trace (via printk) the entrance of fsl_udc_irq after a reconnect.
> The last
> Kern.log entry is from the suspend from disconnecting. This only occures
> if I have
> queued some usb_requests before and do no cleanup at disconnect
> (unqueue and flush_fifos). Shouldn't the device-controller be as fault-
> tolerant
> to handle this ? Now I am doing this cleanup at suspend (see above), and
> it
> works pretty fine.
> 
No sure where is the problem maybe at udc driver, maybe at gadget driver.
As when re-connect occurs, there is bus reset, it will also call gadget driver->
disconnect.

> >
> > Please correct me if I am wrong.
> >
> > How can we fix this issue?
> Please add disconnect interrupt handler first, and at disconnect
> interrupt
> handler call your g_printer's disconnect. Then see what happening next
> 
> That is what I want to do, but the Interrupthandler (fsl_udc_irq) doesn't
> get
> called at physical disconnect (like mentioned above).
> 
Freescale upstream code seems do not enable BSVIE for vbus change.
You can do it by my description above, or refer msm_otg.c.


> >
> > best regards
> >
> > Peter Bestler
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> 
> --
> 
> >> Best Regards,
> >> Peter Chen
> 
> 
> Best Regards,
> Peter Bestler
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux