Re: Two questions: how to specify module-load function for driver module and which name of driver is better (according to standards)
On Friday 19 November 2010 16:55:27 Lev Serebryakov wrote: Hello, Freebsd-usb. I've implemented driver (ucom-subdriver) for MosChip 7820 and 7840 USB2COM multiport bridges. I have two questions: Hi, (1) How should I specify module-load function? DRIVER_MODULE() doesn't help much. I need to run some code only once, at very beginning, not for each probe/attach. GEOM modules have methods for it, but I can not find such methods for drivers. Look at ubt_modevent in sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c. Or use a so-called SYSINIT() or SYSUNINIT(). (2) Which name should I choose? Working name of module/driver/device is mos7840, but it seems, that it is bad name: (a) All existing ucom-based drivers is uXXXcom (b) Driver instances looks ugly (like mos78400) umos78400 ? Is umos7840com good name or it is too long? :) We have umoscom driver for older MosChip chip in base already. Maybe someone else has some comments. --HPS ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: Two questions: how to specify module-load function for driver module and which name of driver is better (according to standards)
Hello, Andriy. You wrote 19 ноября 2010 г., 19:29:35: I've implemented driver (ucom-subdriver) for MosChip 7820 and 7840 USB2COM multiport bridges. I have two questions: (1) How should I specify module-load function? DRIVER_MODULE() doesn't help much. Are you sure? The last two arguments to DRIVER_MODULE() look like what you want. Yes, it my fault, it works after hint from Hans Petter Selasky. -- // Black Lion AKA Lev Serebryakov l...@serebryakov.spb.ru ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: Two questions: how to specify module-load function for driver module and which name of driver is better (according to standards)
on 19/11/2010 17:55 Lev Serebryakov said the following: Hello, Freebsd-usb. I've implemented driver (ucom-subdriver) for MosChip 7820 and 7840 USB2COM multiport bridges. I have two questions: (1) How should I specify module-load function? DRIVER_MODULE() doesn't help much. Are you sure? The last two arguments to DRIVER_MODULE() look like what you want. I need to run some code only once, at very beginning, not for each probe/attach. -- Andriy Gapon ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: Two questions: how to specify module-load function for driver module and which name of driver is better (according to standards)
Hello, Paul. You wrote 19 ноября 2010 г., 19:56:26: Is it possible/sane to integrate two drivers in one? No, they are almost totally different. -- // Black Lion AKA Lev Serebryakov l...@serebryakov.spb.ru ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org