Harald Schmalzbauer
2013-Sep-16 16:11 UTC
umcs (4-Port-USB-serial) triggering way too much ehci IRQs
Hello, I have some of these 4-Port-Serial-USB-Hubs: http://www.delock.com/produkte/F_673_USB---Seriell_87414/merkmale.html They have the MosChip MCS7840 inside, wich also understands RS485/422 besides RS232. FreeBSDs umcs(4) supports the RS232 mode with standard baudrates and works with that device. Unfortunately, as soon as I open any of the 4 cuaU0.x ports, there are 500irq/s from ehci. These irqs also accur if the port is closed again (until I unload the umcs module). These irqs prevent virtual machines and also real hardware from deeper sleeping. In my case, it's a huge ammount of lost power saving. I also saw that the windows driver of the MCS7840 consuming a lot of CPU-cycles (XP-ESXi guest). Is there any chance to tranquilize? The 4-Port prolific model (http://www.delock.com/produkte/F_673_USB---Seriell_61518/merkmale.html) doesn't show these unneccessary irqs btw.! Thanks, -Harry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 196 bytes Desc: OpenPGP digital signature URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20130916/e88437db/attachment.sig>
Lev Serebryakov
2013-Sep-16 21:37 UTC
umcs (4-Port-USB-serial) triggering way too much ehci IRQs
Hello, Harald. You wrote 16 ???????? 2013 ?., 20:11:38: HS> I have some of these 4-Port-Serial-USB-Hubs: HS> http://www.delock.com/produkte/F_673_USB---Seriell_87414/merkmale.html HS> They have the MosChip MCS7840 inside, wich also understands RS485/422 HS> besides RS232. HS> FreeBSDs umcs(4) supports the RS232 mode with standard baudrates and HS> works with that device. HS> Unfortunately, as soon as I open any of the 4 cuaU0.x ports, there are HS> 500irq/s from ehci. I have only one 2-port noname adapter with this chip, which I used to write this driver. And it works fine (at least right now): usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 12Mbps Full Speed USB v1.0 usbus3: 480Mbps High Speed USB v2.0 .... ugen3.2: <vendor 0x9710> at usbus3 umcs78400: <vendor 0x9710 product 0x7840, rev 2.00/0.01, addr 2> on usbus3 umcs78400: Chip mcs7840, found 2 active ports umcs78400: On-die confguration: RST: active low, HRD: yes, PLL: avail, POR: avail, Ports: 4, EEPROM write disabled, IrDA is not available % vmstat -i interrupt total rate irq1: atkbd0 799 0 irq18: uhci2 ehci0+ 1210 0 irq20: hpet0 529850590 647 irq21: uhci1 2861007 3 irq23: uhci3 ehci1 2181202 2 irq256: em0 1139745179 1393 irq257: ahci0 76093174 93 Total 1750731961 2140 I have never seen other devices on this chip and I have never had chance to try it with 4-port version of device... To be honest, I didn't know much about USB at all, I wrote this driver without complete understanding USB magic and use USB only as transport to access MCS7840 registers... Maybe, local USB Guru Hans Petter Selasky could give cime advicec how to debug this situation. I've added freebsd-usb@ to CC: -- // Black Lion AKA Lev Serebryakov <lev at FreeBSD.org>
Hans Petter Selasky
2013-Sep-17 05:14 UTC
umcs (4-Port-USB-serial) triggering way too much ehci IRQs
Hi, Check using usbdump -i usbusX -f Y -s 65536 -vvv what is going on. Maybe some USB transfers are returning zero length data from the chip. --HPS -----Original message-----> From:Lev Serebryakov <lev at FreeBSD.org <mailto:lev at FreeBSD.org> > > Sent: Monday 16th September 2013 23:38 > To: Harald Schmalzbauer <h.schmalzbauer at omnilan.de <mailto:h.schmalzbauer at omnilan.de> > > Cc: FreeBSD Stable <freebsd-stable at FreeBSD.org <mailto:freebsd-stable at FreeBSD.org> >; freebsd-usb at freebsd.org <mailto:freebsd-usb at freebsd.org> > Subject: Re: umcs (4-Port-USB-serial) triggering way too much ehci IRQs > > Hello, Harald. > You wrote 16 ???????? 2013 ?., 20:11:38: > > HS> I have some of these 4-Port-Serial-USB-Hubs: > HS> http://www.delock.com/produkte/F_673_USB---Seriell_87414/merkmale.html <http://www.delock.com/produkte/F_673_USB---Seriell_87414/merkmale.html> > HS> They have the MosChip MCS7840 inside, wich also understands RS485/422 > HS> besides RS232. > > HS> FreeBSDs umcs(4) supports the RS232 mode with standard baudrates and > HS> works with that device. > > HS> Unfortunately, as soon as I open any of the 4 cuaU0.x ports, there are > HS> 500irq/s from ehci. > I have only one 2-port noname adapter with this chip, which I used to > write this driver. And it works fine (at least right now): > > usbus0: 12Mbps Full Speed USB v1.0 > usbus1: 12Mbps Full Speed USB v1.0 > usbus2: 12Mbps Full Speed USB v1.0 > usbus3: 480Mbps High Speed USB v2.0 > .... > ugen3.2: <vendor 0x9710> at usbus3 > umcs78400: <vendor 0x9710 product 0x7840, rev 2.00/0.01, addr 2> on usbus3 > umcs78400: Chip mcs7840, found 2 active ports > umcs78400: On-die confguration: RST: active low, HRD: yes, PLL: avail, POR: avail, Ports: 4, EEPROM write disabled, IrDA is not available > > % vmstat -i > interrupt total rate > irq1: atkbd0 799 0 > irq18: uhci2 ehci0+ 1210 0 > irq20: hpet0 529850590 647 > irq21: uhci1 2861007 3 > irq23: uhci3 ehci1 2181202 2 > irq256: em0 1139745179 1393 > irq257: ahci0 76093174 93 > Total 1750731961 2140 > > I have never seen other devices on this chip and I have never had chance > to try it with 4-port version of device... > > To be honest, I didn't know much about USB at all, I wrote this driver > without complete understanding USB magic and use USB only as transport to > access MCS7840 registers... > > Maybe, local USB Guru Hans Petter Selasky could give cime advicec how to > debug this situation. I've added freebsd-usb@ to CC: > > -- > // Black Lion AKA Lev Serebryakov <lev at FreeBSD.org <mailto:lev at FreeBSD.org> > > > _______________________________________________ > freebsd-usb at freebsd.org <mailto:freebsd-usb at freebsd.org> mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-usb <http://lists.freebsd.org/mailman/listinfo/freebsd-usb> > To unsubscribe, send any mail to "freebsd-usb-unsubscribe at freebsd.org <mailto:freebsd-usb-unsubscribe at freebsd.org> "