From owner-freebsd-usb@FreeBSD.ORG Mon Aug 18 07:00:22 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1D2A1065699 for ; Mon, 18 Aug 2008 07:00:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D959C8FC19 for ; Mon, 18 Aug 2008 07:00:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7I70MEM087625 for ; Mon, 18 Aug 2008 07:00:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7I70MKB087624; Mon, 18 Aug 2008 07:00:22 GMT (envelope-from gnats) Date: Mon, 18 Aug 2008 07:00:22 GMT Message-Id: <200808180700.m7I70MKB087624@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Brian Cox Cc: Subject: Re: kern/123224: [ums] Scroll wheel breakage w/ USB MS Wireless Intellimouse Explorer X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Brian Cox List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 07:00:23 -0000 The following reply was made to PR kern/123224; it has been noted by GNATS. From: Brian Cox To: Kai Wang Cc: bug-followup@freebsd.org Subject: Re: kern/123224: [ums] Scroll wheel breakage w/ USB MS Wireless Intellimouse Explorer Date: Mon, 18 Aug 2008 02:42:39 -0400 On Monday 11 August 2008 10:10:55 am Kai Wang wrote: > I think the regression you metioned is indeed there. > > Could you please try the following patch against -CURRENT or -STABLE > and see if it fixes the problem? I applied the patch against the latest RELENG_6 (as of approx. 18 Aug 2008 02:00 -0400). The kernel now detects the Z dir and scrolling with the wheel works. - Brian From owner-freebsd-usb@FreeBSD.ORG Mon Aug 18 11:06:59 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A0771065677 for ; Mon, 18 Aug 2008 11:06:59 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 22BAD8FC2B for ; Mon, 18 Aug 2008 11:06:59 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7IB6xhN079984 for ; Mon, 18 Aug 2008 11:06:59 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7IB6wXL079980 for freebsd-usb@FreeBSD.org; Mon, 18 Aug 2008 11:06:58 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 18 Aug 2008 11:06:58 GMT Message-Id: <200808181106.m7IB6wXL079980@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-usb@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-usb@FreeBSD.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 11:06:59 -0000 Current FreeBSD problem reports Critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- f usb/84750 usb [hang] 6-BETA2 reboot/shutdown with root_fs on externa o usb/91629 usb usbd_abort_pipe() may result in infinite loop 2 problems total. Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o i386/46371 usb USB controller cannot be initialized on IBM Netfinity o bin/57255 usb usbd(8) and multi-function devices o usb/63621 usb [umass] [panic] USB MemoryStick Reader stalls/crashes o usb/67301 usb [uftdi] [panic] RTS and system panic o usb/69006 usb [usbdevs] [patch] Apple Cinema Display hangs USB ports o usb/71155 usb [ulpt] misbehaving usb-printer hangs processes, causes o usb/73307 usb [panic] Kernel panics on USB disconnect o usb/74771 usb [umass] [hang] mounting write-protected umass device a o usb/75705 usb [umass] [panic] da0 attach / Optio S4 (with backtrace) o usb/75797 usb [sound] 5.3-STABLE(2005 1/4) detect USB headset, But c o usb/76395 usb [uhci] USB printer does not work, usbdevs says "addr 0 o usb/77184 usb [umass] [panic] kernel panic on USB device disconnect, o usb/77294 usb [ucom] [panic] ucom + ulpcom panic o usb/79269 usb [ohci] USB ohci da0 plug/unplug causes crashes and loc o usb/79287 usb [uhci] [hang] UHCI hang after interrupt transfer o usb/79524 usb [ulpt] printing to Minolta PagePro 1[23]xxW via USB fa a usb/79656 usb [ehci] RHSC interrupts lost o usb/79722 usb [ehci] wrong alignments in ehci.h o usb/80040 usb [hang] Use of sound mixer causes system freeze with ua o usb/80361 usb [umass] [patch] mounting of Dell usb-stick fails o usb/80829 usb [modules] [panic] possible panic when loading USB-modu o usb/80862 usb [patch] USB locking issues: missing some Giant calls o usb/82350 usb [ucom] [panic] null pointer dereference in USB stack o usb/82520 usb [udbp] [reboot] Reboot when USL101 connected s usb/82569 usb [umass] [panic] USB mass storage plug/unplug causes sy o usb/82660 usb [ehci] [panic] EHCI: I/O stuck in state 'physrd'/panic o usb/83504 usb [kernel] [patch] SpeedTouch USB stop working on recent o usb/83563 usb [umass] [panic] Page Fault while detaching Mpman Usb d f usb/83677 usb [usb] [request] usb controller often not detected (Sun o usb/83756 usb [ums] [patch] Microsoft Intellimouse Explorer 4.0A doe o usb/83977 usb [ucom] [panic] ucom1: open bulk out error (addr 2): IN o usb/84326 usb [umass] Panic trying to connect SCSI tape drive via US s usb/84336 usb [usb] [reboot] instant system reboot when unmounting a o usb/86767 usb [umass] [patch] bogus "slice starts beyond end of the o usb/88743 usb [hang] [regression] USB makes kernel hang at boot (reg s usb/89003 usb [request] LaCie Firewire drive not properly supported o usb/89954 usb [umass] [panic] USB Disk driver race condition? o usb/90700 usb [umass] [panic] Kernel panic on connect/mount/use umas o usb/91238 usb [umass] USB tape unit fails to write a second tape fil o usb/91283 usb [boot] [regression] booting very slow with usb devices o usb/91538 usb [ulpt] [patch] Unable to print to EPSON CX3500 o usb/91906 usb [ehci] [hang] FreeBSD hangs while booting with USB leg o usb/92052 usb [ulpt] usbd causes defunct process with busy file-hand o usb/92083 usb [ural] [panic] panic using WPA on ural NIC in 6.0-RELE o usb/92142 usb [uhub] SET_ADDR_FAILED and SHORT_XFER errors from usb o usb/92171 usb [panic] panic unplugging Vodafone Mobile Connect (UMTS o usb/93155 usb [ulpt] /dev/ulpt0: device busy, USB printer does not w o usb/93408 usb [mouse] hw.acpi.cpu.cx_lowest=C3 on AMD Turion causes o usb/93828 usb [ohci] [panic] ohci causes panic on boot (HP Pavillion o usb/94384 usb [panic] kernel panic with usb2 hardware o usb/94717 usb [ulpt] Reading from /dev/ulpt can break work of a UHCI o usb/94897 usb [panic] Kernel Panic when cleanly unmounting USB disk s usb/95348 usb [keyboard] USB keyboard unplug causes noise on screen o usb/95562 usb [umass] Write Stress in USB Mass drive causes "vinvalb s usb/95636 usb [umass] [boot] 5 minute delay at boot when using VT620 s usb/96120 usb [ums] [request] USB mouse not always detected o usb/96224 usb [usb] [msdosfs] mount_msdosfs cause page fault in sync o usb/96457 usb [umass] [panic] fatback on umass = reboot s usb/97286 usb [mouse] [request] MS Wireless Intellimouse Explorer 2. o usb/99431 usb [keyboard] FreeBSD on MSI 6566E (Intel 845E motherboar o usb/101096 usb [ural] [panic] USB WLAN occasionally causes kernel-pan o usb/101448 usb [ohci] FBSD 6.1-STABLE/AMD64 crashes under heavy USB/O o usb/101752 usb [umass] [panic] 6.1-RELEASE kernel panic on usb device o usb/102066 usb [ukbd] usb keyboard and multimedia keys don't work f usb/102096 usb [patch] usbd(8) does not handle multiple devices in on o usb/103025 usb [uhub] [panic] wrong detection of USB device for FreeB o usb/104292 usb [umass] [hang] system lockup on forced umount of usb-s o usb/104830 usb [umass] system crashes when copying data to umass devi o usb/105186 usb [ehci] [panic] USB 2.0/ehci on FreeBSD 6.2-PRE/AMD64 c o usb/106615 usb [uftdi] uftdi module does not automatically load with o usb/106648 usb [umass] [hang] USB Floppy on D1950 10 min Hang on Inse s usb/106832 usb USB HP printer is not detected by kernel when ACPI ena o usb/107248 usb [umass] [patch] scsi_da.c quirk for Cowon iAUDIO X5 MP o usb/107446 usb [umass] umass problems (usb and fw disks) o usb/107827 usb [ohci] [panic] ohci_add_done addr not found o usb/107848 usb [umass] [request] cannot access Samsung flash disk o usb/107924 usb [patch] usbd(8) does not call detach o usb/108513 usb [umass] Creative MuVo TX FM fails in 6.2-RELEASE [regr o usb/109274 usb [usb] MCP55 USB Controller fails to attach in AMD64 Cu o usb/109397 usb [panic] on boot from USB flash o usb/110856 usb [ugen] [patch] interrupt in msgs are truncated when bu o usb/110988 usb [umass] [patch] Handling of quirk IGNORE_RESIDUE is um o usb/111753 usb [uhid] [panic] Replicable system panic involving UHID s usb/112568 usb [umass] [request] USB mode may wrong when mounting Pla o usb/112631 usb [panic] Problem with SONY DSC-S80 camera on umount o usb/112640 usb [usb] [hang] Kernel freezes when writing a file to an s usb/113629 usb [ukbd] Dropped USB keyboard events on Dell Latitude D6 o usb/113672 usb [ehci] [panic] Kernel panic with AEWIN CB6971 s usb/113977 usb [request] Need a way to set mode of USB disk's write c o usb/114310 usb [libusb] [patch] [panic] USB hub attachment panics ker o usb/114682 usb [umass] generic USB media-card reader unusable o kern/114780 usb [uplcom] [panic] Panics while stress testing the uplco o usb/115298 usb [ulpt] [panic] Turning off USB printer panics kernel o usb/116561 usb [umodem] [panic] RELENG_6 umodem panic "trying to slee o usb/116699 usb [usbhid] USB HID devices do not initialize at system b o usb/116947 usb [ukbd] [patch] [regression] enable boot protocol on th o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117313 usb [umass] [panic] panic on usb camera insertion o usb/117613 usb [uhci] [irq] uhci interrupt storm & USB leaked memory o usb/117946 usb [panic] D-Link DUB-E100 rev. B1 crashes FreeBSD 7.0-BE o usb/117955 usb [umass] [panic] inserting minolta dimage a2 crashes OS o usb/118140 usb [ucom] [patch] quick hack for ucom to get it behave wi o usb/118141 usb [ucom] usb serial and nokia phones ucomreadcb ucomread o usb/118353 usb [panic] [ppp] repeatable kernel panic during ppp(4) se o usb/118480 usb [umass] Timeout in USB mass storage freezes vfs layer o usb/119201 usb [cam] [patch] Quirks for Olympus FE-210 camera, LG and o usb/119481 usb [hang] FreeBSD not responding after connecting USB-Mas o usb/119509 usb USB flaky on Dell Optiplex 755 o usb/119513 usb [irq] inserting dlink dwl-g630 wireless card results i o usb/119977 usb [ums] Mouse does not work in a Cherry-USB keyboard/mou o usb/120017 usb [ehci] [patch] CS5536 (AMD Geode) USB 2.0 quirk o usb/120034 usb [hang] 6.2 & 6.3 hangs on boot at usb0: OHCI with 1.5 o usb/120283 usb [panic] Automation reboot with wireless keyboard & mou o usb/120321 usb [hang] System hangs when transferring data to WD MyBoo o usb/120729 usb [panic] fault while in kernel mode with connecting USB o usb/120786 usb Kernel panic when forced umount of a dettached USB Har o usb/121232 usb remove PCCARD rebooted system o usb/121275 usb [boot] FreeBSD fails to boot with usb legacy support e o usb/121474 usb [cam] [patch] QUIRK: SAMSUNG HM250JI in LaCie usb hard o usb/121708 usb [keyboard] nforce 650i mobo w/ usb keyboard infinite k o usb/121734 usb [ugen] ugen HP1022 printer device not working since up o usb/121755 usb [ohci] [patch] Fix panic after ohci/uhub cardbus devic o usb/122483 usb [panic] [ulpt] Repeatable panic in 7.0-STABLE o usb/122539 usb [ohci] [panic] AnyDATA ADU-E1000D - kernel panic: ohci o usb/122905 usb [ubsa] [patch] add Huawei E220 to ubsa o kern/123510 usb [ums] Mouse Wheel Fails to Work [regression] o usb/123690 usb Panic on USB device insertion when usb loaded as a mod o usb/123714 usb Panic when hald-storage-probe runs with umass device i o usb/124708 usb [panic] Kernel panic on USB KVM reattach o usb/124758 usb rum panics SMP kernel o kern/124777 usb [ucom] USB cua devices don't revert to tty devices whe o usb/124980 usb [panic] kernel panic on detaching unmounted umass devi o usb/125088 usb Touchpad not detected on Adesso AKB-430UG USB kbd/pad o usb/125450 usb [panic] Removing USB flash card while being accessed c o usb/125631 usb [usb][ums] kernel panic during bootup while 'Logitech o kern/126396 usb [panic] kernel panic after unplug USB Bluetooth device o usb/126519 usb [usb] [panic] panic when plugging in an iphone 137 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem o usb/40948 usb [umass] [request] USB HP CDW8200 does not work s usb/51958 usb [urio] [patch] update for urio driver s usb/52026 usb [usb] [request] umass driver support for InSystem ISD2 o usb/59698 usb [keyboard] [patch] Rework of ukbd HID to AT code trans s usb/62257 usb [umass] [request] card reader UCR-61S2B is only half-s o usb/66547 usb [ucom] Palm Tungsten T USB does not initialize correct o usb/68232 usb [ugen] [patch] ugen(4) isochronous handling correction o usb/70523 usb [umct] [patch] umct sending/receiving wrong characters o usb/71280 usb [aue] aue0 device (linksys usb100tx) doesn't work in 1 o usb/71416 usb [ugen] Cryptoflex e-gate USB token (ugen0) detach is n o usb/71417 usb [ugen] Cryptoflex e-gate USB token (ugen0) communicati o usb/71455 usb [umass] Slow USB umass performance of 5.3 s usb/72733 usb [ucom] [request] Kyocera 7135 Palm OS connection probl o usb/74211 usb [umass] USB flash drive causes CAM status 0x4 on 4.10R a usb/74453 usb [umass] [patch] Q-lity CD-RW USB ECW-043 (ScanLogic SL o usb/75764 usb [umass] [patch] "umass0: Phase Error" - no device for o usb/75800 usb [ucom] ucom1: init failed STALLED error in time of syn s usb/75928 usb [umass] [request] Cytronix SmartMedia card (SMC) reade o usb/76461 usb [umass] disklabel of umass(4)-CAM(4)-da(4) not used by o usb/76653 usb [umass] [patch] Problem with Asahi Optical usb device o usb/76732 usb Mouse problems with USB KVM Switch o usb/78984 usb [umass] [patch] Creative MUVO umass failure o usb/79723 usb [usb] [request] prepare for high speed isochronous tra o usb/80774 usb [patch] have "usbd_find_desc" in line with the other " s usb/80776 usb [udav] [request] UDAV device driver shouldn't use usb_ s usb/80777 usb [request] usb_rem_task() should wait for callback to c o usb/80854 usb [patch] [request] suggestion for new iface-no-probe me o usb/80935 usb [uvisor] [patch] uvisor.c is not work with CLIE TH55. o usb/81621 usb [ehci] [hang] external hd hangs under load on ehci o usb/83863 usb [ugen] Communication problem between opensc/openct via s usb/85067 usb [uscanner] Cannot attach ScanJet 4300C to usb device o usb/86298 usb [mouse] Known good USB mouse won't work with correct s o usb/87224 usb Cannot mount USB Zip750 o usb/87648 usb [mouse] Logitech USB-optical mouse problem. o usb/88408 usb [axe] axe0 read PHY failed o usb/91546 usb [umodem] [patch] Nokia 6630 mobile phone does not work o usb/91811 usb [umass] Compact Flash in HP Photosmart 2610 return " o usb/91896 usb camcontrol(8): Serial Number of USB Memory Sticks is n o usb/92852 usb [ums] [patch] Vertical scroll not working properly on o usb/93389 usb [umass] [patch] Digital Camera Pentax S60 don't work o usb/93872 usb [cam] [patch] SCSI quirk required for ELTA 8061 OL USB o usb/95037 usb [umass] USB disk not recognized on hot-plug. o usb/96381 usb [cam] [patch] add a quirk table entry for a flash ram o usb/96599 usb [usb] [patch] Sony Handycam DCR-HC32E memory stick slo o usb/97175 usb [umass] [hang] USB cardreader hangs system o usb/97472 usb [cam] [patch] add support for Olympus C150,D390 o usb/98343 usb [boot] BBB reset failed errors with Creative Muvo MP3 o usb/99538 usb [keyboard] while using USB keyboard default params of o usb/100746 usb [keyboard] system does not boot due to USB keyboard pr o usb/101761 usb [usb] [patch] [request] usb.h: increase maximal size o o usb/101775 usb [libusbhid] [patch] possible error in report descripto o usb/102678 usb [keyboard] Dell PowerEdge DRAC5 USB Keyboard does not o usb/102976 usb [panic] Casio Exilim Digital Camera causes panic on in o usb/103046 usb [ulpt] [patch] ulpt event driven I/O with select(2) an o usb/103289 usb [request] USB 2.0 problems on AMD LX-800 CPU and CS-55 o usb/103418 usb [usbhidctl] [patch] [request] usbhidctl: add ability t o usb/103917 usb [uhub] USB driver reports "Addr 0 should never happen" o usb/104290 usb [umass] [patch] quirk: TOSHIBA DVD-RAM drive (libretto o usb/104352 usb [ural] [patch] ural driver doesnt work o usb/104645 usb [umass] [request] Rave C-201 MP3 player does not commu o usb/105065 usb [ata] SATA - USB Bridge o usb/105361 usb [panic] Kernel panic during unmounting mass storage (C o usb/106041 usb [usb] [request] FreeBSD does not recognise Mustek Bear o usb/106621 usb [axe] [patch] DLINK DUB-E100 support broken o usb/106861 usb [usbdevs] [patch]: usbdevs update: Add product ACER Ze o usb/107243 usb [cam] [patch] Apacer USB Flash Drive quirk o usb/107388 usb [patch] [request] new driver: add utoppy device from N o usb/107496 usb [uhub] USB device problem on RELENG_6_2 (SHORT_XFER) [ o usb/107935 usb [uplcom] [panic] panic while accessing /dev/cuaU0 o usb/108056 usb [ohci] Mouse gets powered off during device probe when s usb/108344 usb [panic] kernel with atausb panics when unplugging USB o usb/110197 usb [umass] Sony PSP umass device does not detach from EHC s usb/110991 usb [usbdevs] [patch] QUIRK: Super Top IDE DEVICE (depends o usb/112461 usb [ehci] [request] ehci USB 2.0 doesn't work on nforce4 o usb/112463 usb [umass] problem with Samsung USB DVD writer, libscg an o usb/112944 usb [ulpt] [patch] Bi-directional access to HP LaserJet 10 o usb/113060 usb [usbdevs] [patch] Samsung printer not working in bidir o usb/113432 usb [ucom] WARNING: attempt to net_add_domain(netgraph) af o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff o usb/114068 usb [umass] [patch] Problems with connection of the umass o usb/114916 usb [umass] [patch] USB Maxtor drive (L300RO) requires qui o usb/115400 usb [ehci] Problem with EHCI on ASUS M2N4-SLI o usb/115933 usb [uftdi] [patch] RATOC REX-USB60F (usb serial converter o usb/115935 usb [usbdevs] [patch] kernel counterproductively attaches o usb/116282 usb [ulpt] Cannot print on USB HP LJ1018 or LJ1300 o usb/117075 usb [scsi_da] [patch] quirk: USB Samsung YP-U3 MP3 o usb/117183 usb [panic] USB/fusefs -- panic while transferring large a o usb/117185 usb [umodem] [patch] Add support for UNION interface descr o usb/117205 usb [uscanner] [patch] uscanner support for HP ScanJet 447 o usb/117546 usb [uftdi] [patch] Add MaxStream ZigBee product ID to uft o usb/117598 usb [uaudio] [patch] Not possible to record with Plantroni o usb/117893 usb [umass] Lacie USB DVD writing failing o usb/117911 usb [ums] [request] Mouse Gembird MUSWC not work o usb/117938 usb [ums] [patch] Adding support for MS WL Natural and MS o usb/118098 usb [umass] 6th gen iPod causes problems when disconnectin o usb/118485 usb [usbdevs] [patch] Logitech Headset Workaround o usb/118686 usb [usbdevs] [patch] teach usbdevs / ubsa(4) about Huawei o usb/119150 usb [usbdevs] [patch] new usbdevs for CDMA 1xEVDO devices o usb/119227 usb [ubsa] [patch] ubsa buffer is too small; should be tun o usb/119389 usb [umass] Sony DSC-W1 CBI reset failed, STALLED [regress o usb/119633 usb [umass] umass0: BBB reset failed, IOERROR [regression] o usb/119653 usb [cam] [patch] iriver s7 player sync cache error patch o usb/119981 usb [axe] [patch] add support for LOGITEC LAN-GTJ/U2 gigab o usb/120572 usb [umass] [patch] quirk to support ASUS P535 as umass (a o usb/121045 usb [uftdi] [patch] Add support for PC-OP-RS1 and KURO-RS o usb/121169 usb [umass] Issues with usb mp3 player o usb/121184 usb [uipaq] [patch] add ids from linux ipaq driver (plus a o usb/121426 usb [patch] [uscanner] add HP ScanJet 3570C o usb/122025 usb [patch] uscanner does not attach to Epson RX620 printe o usb/122119 usb [umass] umass device causes creation of daX but not da o usb/122547 usb [ehci] USB Printer not being recognized after reboot p usb/122610 usb Add Verizon v740 support to ubsa(4) o usb/122621 usb [patch] [request] New driver for Sierra Wireless 3G US o usb/122712 usb [usbdevs] [patch] Sony Vaio RF keyboard/mouse receiver o usb/122813 usb [udbp] [request] udbp driver should be removed in favo o usb/122819 usb Patch to provide dynamic additions to the usb quirks t o usb/122936 usb [ucom][ubsa] Device does not receive interrupt o usb/122956 usb Support for Novatel Wireless XU870 3G Card o usb/122992 usb MotoROKR Z6 Phone not recognised by umass as USB disk. p usb/123148 usb [uscanner] [patch] Epson DX8400/50 needs uscanner to s p usb/123211 usb [udav] if_udav driver doesn't support Davicom 9601 USB o kern/123224 usb [ums] Scroll wheel breakage w/ USB MS Wireless Intelli o usb/123351 usb Add Reiner SCT cyberJack, Omnikey [26]020, Fujitsu Sie o usb/123352 usb Add Option GTMAX3.6/7.2 and Quallcomm MMC module devic o usb/123509 usb [umass] continuous reset Samsung SGH-G600 phone o usb/123611 usb [usb] BBB reset failed, STALLED from Imation/Mitsumi U o usb/123691 usb usbd(8): usbd hangs o usb/123969 usb Supermicro H8SMi-2 usb problem o usb/124604 usb Wireless Mouse doesn't work o usb/125072 usb [uplcom] [patch] add Mobile Action MA-620 Infrared Ada o usb/125238 usb Habu Mouse turns off in X o usb/125264 usb [patch] sysctl for set usb mouse rate (very useful for o usb/125510 usb repeated plug and unplug of USB mass storage devices l o usb/125736 usb [ukbd] [hang] system hangs after AT keyboard detect if o usb/125941 usb [ums] not working wheel on my microsoft notebook optic 136 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Aug 18 16:30:05 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB5D1106567F for ; Mon, 18 Aug 2008 16:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D6F708FC28 for ; Mon, 18 Aug 2008 16:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7IGU5vV012148 for ; Mon, 18 Aug 2008 16:30:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7IGU5l8012145; Mon, 18 Aug 2008 16:30:05 GMT (envelope-from gnats) Date: Mon, 18 Aug 2008 16:30:05 GMT Message-Id: <200808181630.m7IGU5l8012145@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/123224: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 16:30:06 -0000 The following reply was made to PR kern/123224; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/123224: commit references a PR Date: Mon, 18 Aug 2008 16:29:35 +0000 (UTC) kaiw 2008-08-18 16:29:13 UTC FreeBSD src repository Modified files: sys/dev/usb ums.c Log: SVN rev 181839 on 2008-08-18 16:29:13Z by kaiw Re-add Microsoft Intellimouse 2.0 TWHEEL quirk. Tested by: Merritt Draney, Brian Cox PR: kern/123224 PR: kern/123510 MFC after: 3 days Revision Changes Path 1.100 +3 -0 src/sys/dev/usb/ums.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Mon Aug 18 16:30:09 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EF4610656A1 for ; Mon, 18 Aug 2008 16:30:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3A2138FC16 for ; Mon, 18 Aug 2008 16:30:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7IGU901012389 for ; Mon, 18 Aug 2008 16:30:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7IGU9Fq012388; Mon, 18 Aug 2008 16:30:09 GMT (envelope-from gnats) Date: Mon, 18 Aug 2008 16:30:09 GMT Message-Id: <200808181630.m7IGU9Fq012388@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/123510: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 16:30:09 -0000 The following reply was made to PR kern/123510; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/123510: commit references a PR Date: Mon, 18 Aug 2008 16:29:36 +0000 (UTC) kaiw 2008-08-18 16:29:13 UTC FreeBSD src repository Modified files: sys/dev/usb ums.c Log: SVN rev 181839 on 2008-08-18 16:29:13Z by kaiw Re-add Microsoft Intellimouse 2.0 TWHEEL quirk. Tested by: Merritt Draney, Brian Cox PR: kern/123224 PR: kern/123510 MFC after: 3 days Revision Changes Path 1.100 +3 -0 src/sys/dev/usb/ums.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Mon Aug 18 16:50:07 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC0B2106566C for ; Mon, 18 Aug 2008 16:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C6B908FC0A for ; Mon, 18 Aug 2008 16:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7IGo7ck014751 for ; Mon, 18 Aug 2008 16:50:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7IGo7PT014750; Mon, 18 Aug 2008 16:50:07 GMT (envelope-from gnats) Date: Mon, 18 Aug 2008 16:50:07 GMT Message-Id: <200808181650.m7IGo7PT014750@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: usb/125941: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 16:50:08 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/125941: commit references a PR Date: Mon, 18 Aug 2008 16:49:13 +0000 (UTC) kaiw 2008-08-18 16:48:53 UTC FreeBSD src repository Modified files: sys/dev/usb hid.c Log: SVN rev 181841 on 2008-08-18 16:48:53Z by kaiw In the hid parser, if a INPUT/OUTPUT/FEATURE item is skipped, its corresponding USAGE should be skipped as well. For example, below is a report desc fragment of some mouse: COLLECTION ... USAGE TWHEEL FEATURE ... ... USAGE WHEEL INPUT ... ... END COLLECTION "USAGE TWHEEL" should be consumed after the FEATURE item is skipped, otherwise, the INPUT item will be assigned to "USAGE TWHEEL" later, other than "USAGE WHEEL". Tested by: Grzegorz Blach PR: usb/125941 Revision Changes Path 1.30 +12 -3 src/sys/dev/usb/hid.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Mon Aug 18 17:02:50 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B84041065671 for ; Mon, 18 Aug 2008 17:02:50 +0000 (UTC) (envelope-from spamtrap@tczyhatczsche.eu) Received: from ange.vhost.lt (ange.vhost.lt [77.79.12.20]) by mx1.freebsd.org (Postfix) with ESMTP id 275768FC16 for ; Mon, 18 Aug 2008 17:02:49 +0000 (UTC) (envelope-from spamtrap@tczyhatczsche.eu) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=tczyhatczsche.eu; h=Received:Received:Date:From:To:Subject:Message-ID:Mime-Version:Content-Type:Content-Disposition:User-Agent:X-AntiAbuse:X-AntiAbuse:X-AntiAbuse:X-AntiAbuse:X-AntiAbuse:X-Source:X-Source-Args:X-Source-Dir; b=Jf/YYVRYJ1VlGw1RIMhyaCMDO/rZ8I3OVIUQhBPQVt9T3EHzCwMIAeeRloakPNpIGD8kfmKbQBMd1HlRIyW4tGs4vbq8NaJyDci/q0U1538OIrQUYON9S2PKPgel/5ng; Received: from [78.59.147.157] (helo=johnny.mnemoni.ca) by ange.vhost.lt with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1KV7F7-000587-LJ for freebsd-usb@freebsd.org; Mon, 18 Aug 2008 19:06:05 +0300 Received: by johnny.mnemoni.ca (Postfix, from userid 1001) id 3846B5CFC; Mon, 18 Aug 2008 19:05:52 +0300 (EEST) Date: Mon, 18 Aug 2008 19:05:52 +0300 From: Jonathan Lee To: freebsd-usb@freebsd.org Message-ID: <20080818160552.GC1091@johnny.mnemoni.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ange.vhost.lt X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tczyhatczsche.eu X-Source: X-Source-Args: X-Source-Dir: Subject: DWA-110 is supported by if_rum X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 17:02:50 -0000 I've tested D-LINK's DWA-110 on % uname -a FreeBSD johnny.mnemoni.ca 7.0-STABLE FreeBSD 7.0-STABLE #5: Sun Aug 10 15:26:30 EEST 2008 root@johnny.mnemoni.ca:/usr/obj/usr/src/sys/JOHNNY i386 It works OK, except for some errors: Aug 12 11:00:36 johnny kernel: wpi0: timeout resetting Tx ring 1 Aug 12 11:00:36 johnny kernel: wpi0: timeout resetting Tx ring 3 Aug 12 11:00:36 johnny kernel: wpi0: timeout resetting Tx ring 4 Aug 14 22:49:26 johnny kernel: rum0: on uhub4 Aug 14 22:49:26 johnny kernel: rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528 Aug 14 22:49:27 johnny kernel: rum0: WARNING: using obsoleted IFF_NEEDSGIANT flag You can see my original message to freebsd-drivers: http://lists.freebsd.org/pipermail/freebsd-drivers/2008-August/000753.html Anyway, the device is supported. Someone responsible could add the following to /usr/src/sys/dev/usb/: usbdevs: -------- product DLINK2 DWA110 0x3c07 DWA-110 -------- if_rum.c: -------- { USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA110 }, -------- EOF. From owner-freebsd-usb@FreeBSD.ORG Mon Aug 18 22:41:19 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1C47106564A for ; Mon, 18 Aug 2008 22:41:19 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 60ECD8FC17 for ; Mon, 18 Aug 2008 22:41:19 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 8971641C6A3; Tue, 19 Aug 2008 00:24:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id aK8ljy9uaRcc; Tue, 19 Aug 2008 00:24:12 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 9B8DA41C6A1; Tue, 19 Aug 2008 00:24:12 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id BC26244487F; Mon, 18 Aug 2008 22:21:10 +0000 (UTC) Date: Mon, 18 Aug 2008 22:21:10 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Alfred Perlstein In-Reply-To: <20080818205914.GJ16977@elvis.mu.org> Message-ID: <20080818214711.J88849@maildrop.int.zabbadoz.net> References: <20080818205914.GJ16977@elvis.mu.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-usb@freebsd.org Subject: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-usb@freebsd.org List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 22:41:19 -0000 On Mon, 18 Aug 2008, Alfred Perlstein wrote: Hi Alfred, CC:ing freebsd-usb for additional review. A few initial comments on the patch > The delta is here: > http://mu.org/~bright/usb4bsd.diff.gz The patch only includes kernel parts, is there any impact on userland? There are various style bugs introduced. That could be fixed easily I guess? In kern/subr_bus.c you are taking steps to avoid zero size allocations, which haven't been there up to now. Why do we need that? There is a question about whether to avoid the conditional locking in dev/sound/pcm/channel.c in favour of recursive locking? The locking in dev/sound/pcm/mixer.c appears to be strange; the locking appears to have substantially changed without corresponding changes to the non-USB drivers. Some of the new sound drivers are Giant-locked? I am not sure we should be adding new drivers that are not mpsafe. There seems to be a README.TXT but no manpages for the new API or drivers. Are these pending? Some of the files have $FreeBSD$ strings already expanded, probably because they were copied from existing files. Why is the diff to compat/ndis/ntoskrnl_var.h necessary? Regards, Bjoern, Kris, Ed S., Ollivier (sitting together at king's, cam.ac.uk devsummit) -- Bjoern A. Zeeb Stop bit received. Insert coin for new game. From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 01:54:11 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73975106566B for ; Tue, 19 Aug 2008 01:54:11 +0000 (UTC) (envelope-from kevlo@kevlo.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 0BA428FC0C for ; Tue, 19 Aug 2008 01:54:10 +0000 (UTC) (envelope-from kevlo@kevlo.org) Received: from [127.0.0.1] (ns.kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.3/8.14.3) with ESMTP id m7J1r1GV041783; Tue, 19 Aug 2008 09:54:12 +0800 (CST) (envelope-from kevlo@kevlo.org) X-Authentication-Warning: ns.kevlo.org: Host ns.kevlo.org [220.128.136.52] claimed to be [127.0.0.1] From: Kevin Lo To: Jonathan Lee In-Reply-To: <20080818160552.GC1091@johnny.mnemoni.ca> References: <20080818160552.GC1091@johnny.mnemoni.ca> Content-Type: text/plain Date: Tue, 19 Aug 2008 09:52:45 +0800 Message-Id: <1219110765.7981.0.camel@nsl> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: DWA-110 is supported by if_rum X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 01:54:11 -0000 Jonathan Lee wrote: > I've tested D-LINK's DWA-110 on > > % uname -a > FreeBSD johnny.mnemoni.ca 7.0-STABLE > FreeBSD 7.0-STABLE #5: Sun Aug 10 15:26:30 EEST 2008 > root@johnny.mnemoni.ca:/usr/obj/usr/src/sys/JOHNNY i386 > > It works OK, except for some errors: > > Aug 12 11:00:36 johnny kernel: wpi0: timeout resetting Tx ring 1 > Aug 12 11:00:36 johnny kernel: wpi0: timeout resetting Tx ring 3 > Aug 12 11:00:36 johnny kernel: wpi0: timeout resetting Tx ring 4 > > Aug 14 22:49:26 johnny kernel: rum0: on uhub4 > Aug 14 22:49:26 johnny kernel: rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528 > Aug 14 22:49:27 johnny kernel: rum0: WARNING: using obsoleted IFF_NEEDSGIANT flag > > You can see my original message to freebsd-drivers: > > http://lists.freebsd.org/pipermail/freebsd-drivers/2008-August/000753.html > > Anyway, the device is supported. Someone responsible > could add the following to /usr/src/sys/dev/usb/: > > usbdevs: > -------- > product DLINK2 DWA110 0x3c07 DWA-110 > -------- > > if_rum.c: > -------- > { USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA110 }, > -------- Added, thanks. > > EOF. Kevin From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 06:15:54 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FEC8106566B for ; Tue, 19 Aug 2008 06:15:54 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 43CFC8FC19 for ; Tue, 19 Aug 2008 06:15:54 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 374301A4D8D; Mon, 18 Aug 2008 22:58:21 -0700 (PDT) Date: Mon, 18 Aug 2008 22:58:21 -0700 From: Alfred Perlstein To: freebsd-usb@freebsd.org Message-ID: <20080819055821.GO16977@elvis.mu.org> References: <20080818205914.GJ16977@elvis.mu.org> <20080818214711.J88849@maildrop.int.zabbadoz.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080818214711.J88849@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 06:15:54 -0000 Hans, here's some final review questions, I've added responses where I can recall off the top of my head answers, but I need you to fill in the rest. Hans, can you please resend the answers to these that you've given me? Please include short examples why the changes are needed. I've noted the questions I've forgotten with "??Hans??", please fill those out. I'm quite certain we've already covered all of these points but I would like to be sure. They're not in the front of my brain and you can answer this much easier than I can. FYI, I plan on committing the code tomorrow night based on the following two issues: need to wait for smp tty code. need your reply to this email. -Alfred * Bjoern A. Zeeb [080818 15:24] wrote: > On Mon, 18 Aug 2008, Alfred Perlstein wrote: > > Hi Alfred, > > CC:ing freebsd-usb for additional review. > > A few initial comments on the patch > > >The delta is here: > > http://mu.org/~bright/usb4bsd.diff.gz > > The patch only includes kernel parts, is there any impact on userland? I think the userland tools need to be switched to the new headers, however what's more likely to happen is that after a soak period of a few weeks, we will move the new to replace the old and userland should be just fine. > There are various style bugs introduced. That could be fixed easily I > guess? Yes, this is a LOT of new code, let's leave a few whitespace nits for others to play with. :) > In kern/subr_bus.c you are taking steps to avoid zero size > allocations, which haven't been there up to now. Why do we need that? ??Hans?? > > There is a question about whether to avoid the conditional locking in > dev/sound/pcm/channel.c in favour of recursive locking? ??Hans?? > The locking in dev/sound/pcm/mixer.c appears to be strange; the > locking appears to have substantially changed without corresponding > changes to the non-USB drivers. ??Hans?? > Some of the new sound drivers are Giant-locked? I am not sure we > should be adding new drivers that are not mpsafe. I think this will be addressed shortly... but.. ??Hans?? (please comment) > > There seems to be a README.TXT but no manpages for the new API or > drivers. Are these pending? Hans has documented a LOT of headers and functions far past what is in the old code from what I can tell. If there are specific changes you have questions about I think we can attend to those relatively easily, Hans has been very forthcoming with information. > Some of the files have $FreeBSD$ strings already expanded, probably > because they were copied from existing files. Yes, committing them should fix that. If the tags aren't obliterated they'll serve as a guide as to what files they were based on, if they are obliterated it's not that important anyhow. I consider this a wash. > > Why is the diff to compat/ndis/ntoskrnl_var.h necessary? It's needed for compiling usb2_ndis, but... ??Hans?? -- - Alfred Perlstein From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 12:18:22 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 980EE106567B for ; Tue, 19 Aug 2008 12:18:22 +0000 (UTC) (envelope-from sk.paix@gmail.com) Received: from office.xitex.net (excite.donbass.com [195.184.200.34]) by mx1.freebsd.org (Postfix) with ESMTP id 43DC38FC22 for ; Tue, 19 Aug 2008 12:18:22 +0000 (UTC) (envelope-from sk.paix@gmail.com) Received: from office.xitex.net (localhost [127.0.0.1]) by office.xitex.net (Postfix) with ESMTP id 985D5242D3 for ; Tue, 19 Aug 2008 14:59:31 +0300 (EEST) Received: from [192.168.0.77] (unknown [192.168.0.77]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by office.xitex.net (Postfix) with ESMTP id 6292D242D2 for ; Tue, 19 Aug 2008 14:59:30 +0300 (EEST) Message-ID: <48AAB5A2.5060801@gmail.com> Date: Tue, 19 Aug 2008 14:59:30 +0300 From: Sergej Kandyla User-Agent: Thunderbird 2.0.0.14 (X11/20080709) MIME-Version: 1.0 To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: ugensa patch, CDMA ZTE AC8700 modem X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 12:18:22 -0000 Hi! I've tried to get working CDMA Evdo USB modem ZTE AC8700 (http://www.mobile-8.com/id/devices/zte_ac8700) under Releng_7 with ugensa kernel module http://people.FreeBSD.org/~lioux/ugensa.tar.gz The module was compiled without any problems and after reboot I've get next: #dmesg ugensa0: on uhub0 ugensa_attach: sc = 0xc2bb3e00 ugensa0: unexpected endpoint But there are no devices ugensa.... # ls -l /dev/u* crw-r--r-- 1 root operator 0, 82 Aug 19 14:21 /dev/ums0 lrwxr-xr-x 1 root wheel 6 Aug 19 14:21 /dev/urandom -> random crw-rw---- 1 root operator 0, 35 Aug 19 14:21 /dev/usb crw-rw---- 1 root operator 0, 34 Aug 19 14:21 /dev/usb0 crw-rw---- 1 root operator 0, 36 Aug 19 14:21 /dev/usb1 crw-rw---- 1 root operator 0, 37 Aug 19 14:21 /dev/usb2 crw-rw---- 1 root operator 0, 38 Aug 19 14:21 /dev/usb3 # uname -a FreeBSD adminbook.intranet 7.0-STABLE FreeBSD 7.0-STABLE #4: Fri Aug 15 22:27:32 EEST 2008 root@adminbook.intranet:/usr/obj/usr/src/sys/PAIX1 i386 #kldstat 5 1 0xc0a0f000 2858 ugensa.ko By default modem looks as: Jul 11 17:07:44 adminbook root: Unknown USB device: vendor 0x19d2 product 0xfffe bus uhub1 Jul 11 17:07:44 adminbook kernel: ugen0: on uhub1 Also, I've tried ugencom patch http://www.cs.cmu.edu/~dga/dot/fbsd_pc5220 but it's working only for releng_6 and fails on releng_7 Thanks for advice! -- Best Wishes, PAIX-UANIC | SK3929-RIPE From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 15:56:42 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FC98106567B; Tue, 19 Aug 2008 15:56:41 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id 6DFE88FC1C; Tue, 19 Aug 2008 15:56:40 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=H3poPDSvFasA:10 a=fj6dw-CIB2gA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=0jSLOROhmK_VzV8gvdAA:9 a=5eGnDjGkjP9OXkW9gi0A:7 a=gKewa5rg63DhOPo01Ei2gJBcWtkA:4 a=50e4U0PicR4A:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1043339304; Tue, 19 Aug 2008 17:56:38 +0200 From: Hans Petter Selasky To: Alfred Perlstein Date: Tue, 19 Aug 2008 17:58:21 +0200 User-Agent: KMail/1.9.7 References: <20080818205914.GJ16977@elvis.mu.org> <20080818214711.J88849@maildrop.int.zabbadoz.net> <20080819055821.GO16977@elvis.mu.org> In-Reply-To: <20080819055821.GO16977@elvis.mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808191758.22981.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 15:56:42 -0000 Hi, On Tuesday 19 August 2008, Alfred Perlstein wrote: > Hans, here's some final review questions, I've added responses > where I can recall off the top of my head answers, but I need > you to fill in the rest. > > need to wait for smp tty code. If this requires changes in the USB serial port drivers there will be trouble. > > > > The patch only includes kernel parts, is there any impact on userland? No. Userland will build like before. The current USB userland utilities and libusb from ports will only work with the old USB stack. I'm working on a replacement for "usbdevs" called "usbconfig" which has some more functionality and a FreeBSD specific libusb, which is compatible with libusb from sourceforge. I have most of it finished in my private SVN repository, and will add it to my P4 repository soon. > > I think the userland tools need to be switched to the new headers, > however what's more likely to happen is that after a soak period of > a few weeks, we will move the new to replace the old and userland should > be just fine. > > > There are various style bugs introduced. That could be fixed easily I > > guess? > > Yes, this is a LOT of new code, let's leave a few whitespace nits for > others to play with. :) All code has been and is continuously styled with a modified "indent" utility: (cat $F | indent -Toss_mixerinfo -TFILE -Tu_char -Tu_int -Tu_long \ -TTAILQ_HEAD -TLIST_HEAD -TTAILQ_ENTRY -TLIST_ENTRY \ -TSTAILQ_HEAD -TSTAILQ_ENTRY \ -Tu_short -Tfd_set -ta -st -bad -bap -nbbb -nbc -br -nbs \ -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj -ei -nfc1 \ -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc \ -nsob -nv | sed -e "s/_HEAD [(]/_HEAD(/g" | sed -e "s/_ENTRY [(]/_ENTRY(/g" | sed -e "s/ __packed/ __packed/g" | sed -e "s/ __aligned/ __aligned/g" | sed -e "s/^#define /#define /g") > temp If there are any more options I can add, then please let me know. > > > In kern/subr_bus.c you are taking steps to avoid zero size > > allocations, which haven't been there up to now. Why do we need that? > It is a workaround. USB2 defines the following function, which can be called when there are no children on a device, which must be handled correctly cross-platform. If this function could be directly implemented in subr_bus.c we would not require the modifications to "device_get_children" at all or any memory allocation. int device_delete_all_children(device_t dev) { device_t *devlist; int devcount; int error; error = device_get_children(dev, &devlist, &devcount); if (error == 0) { while (devcount-- > 0) { error = device_delete_child(dev, devlist[devcount]); if (error) { break; } } free(devlist, M_TEMP); } return (error); } > ??Hans?? > > > There is a question about whether to avoid the conditional locking in > > dev/sound/pcm/channel.c in favour of recursive locking? > That is also possible. The type of the mutex in question can be changed. The feedback I've gotten so far has been against the use of recursive mutexes. Alternativly, expose two variants of the function in question: xxx_unlocked() xxx_locked() > > The locking in dev/sound/pcm/mixer.c appears to be strange; the > > locking appears to have substantially changed without corresponding > > changes to the non-USB drivers. > All the mixer changes are in the detach code for the mixer and should not require any changes to non-USB drivers. > > > Some of the new sound drivers are Giant-locked? I am not sure we > > should be adding new drivers that are not mpsafe. > I assume that you mean USB drivers? s/sound/USB/ Regarding Giant use: All USB drivers that can work without Giant has been converted to work without Giant. Some USB drivers like USB serial port drivers cannot work without Giant because they depend on a Giant locked TTY layer. Same with keyboard. Another example is UHUB which use Giant simply because the device_xxx() functions require Giant. The Giant lock is not used in any critical paths. > I think this will be addressed shortly... but.. > > > (please comment) > > > There seems to be a README.TXT but no manpages for the new API or > > drivers. Are these pending? The manpages are not ready. This is something I need to do. I would appreciate some help here like where I find manpage templates and where I should put these files. > > > Why is the diff to compat/ndis/ntoskrnl_var.h necessary? > > It's needed for compiling usb2_ndis, but... Without this patch the usb2_ndis module will not compile on certain architectures. If you remove this patch you will need to decouple the usb2_ndis module, which is not complete anyway, from the default build. --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 16:10:45 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2B9A106567E for ; Tue, 19 Aug 2008 16:10:45 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 5219B8FC0A for ; Tue, 19 Aug 2008 16:10:45 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A562C9.dip.t-dialin.net [84.165.98.201]) by redbull.bpaserver.net (Postfix) with ESMTP id 8FB952E168; Tue, 19 Aug 2008 17:53:38 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id AAC8810C1B0; Tue, 19 Aug 2008 17:53:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1219161215; bh=zZs48TMVnrjdS4NjJWat4TgmYGX0N15Dp qaEtVqg9Iw=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Iro9qF9UKv7J7znBl9XjHBaHaLyOgFXJ5G4z6TA1BYAzGajTekx7t6Sn3lMGX/9Jh gzrtBNSC5ZaBaF1xfBdyfuH3ZPn40UacWCi2pVGF1Rt6oabl/Jyb4yCD/08PS8+FOdX I2eAsyUqsyDzNskWxTndhImjT9BjzPkUrYbXHeuibdFdkJavSWsH9nbkU/ECSHfXnf+ HLb65xSsd9x0fNEI1yHEP9yF7SkwDAIKErdHxBvsmbc55jl+PRDRDxSk/4a/EIBDaPI lVhtqAfDAO6dGgewVRlWhm65jVNuphBBg1+p68s5Ts9GjdImqCXL/Djqc79ehzHNLGV In5gayyeQ== Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id m7JFrWJ8085433; Tue, 19 Aug 2008 17:53:32 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 19 Aug 2008 17:53:32 +0200 Message-ID: <20080819175332.482767np3ciixag4@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Tue, 19 Aug 2008 17:53:32 +0200 From: "Alexander Leidinger" To: "Peter B" References: <200808191305.m7JD5Tbl007123@brother.ludd.ltu.se> In-Reply-To: <200808191305.m7JD5Tbl007123@brother.ludd.ltu.se> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.2) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 8FB952E168.ED172 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-13.427, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, MIME_QP_LONG_LINE 1.40, RDNS_DYNAMIC 0.10, TW_UV 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: usb@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: USB Video class X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 16:10:45 -0000 Quoting "Peter B" (from Tue, 19 Aug 2008 15:05:29 =20 +0200 (MEST)): > > Is there any ongoing project towards USB Video class support in FreeBSD ..= ? This is better asked on usb@ (CCed). I'm not aware of such an effort, =20 feel free to start it (you better wait some days until the new USB =20 stack hits CVS). Bye, Alexander. > (Looking at the Asus eee builtin webcam 0x04F2 (CHICONY) 0xB071) > > Some links: > http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/usb/ uvideo.c > http://developer.berlios.de/projects/linux-uvc > http://www.usb.org/developers/devclass_docs/USB_Video_Class_1_1.zip > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > --=20 While you don't greatly need the outside world, it's still very reassuring to know that it's still there. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 18:04:44 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA6B61065688 for ; Tue, 19 Aug 2008 18:04:44 +0000 (UTC) (envelope-from pb@ludd.ltu.se) Received: from mother.ludd.ltu.se (mother.ludd.ltu.se [130.240.16.3]) by mx1.freebsd.org (Postfix) with ESMTP id 07D888FC1F for ; Tue, 19 Aug 2008 18:04:43 +0000 (UTC) (envelope-from pb@ludd.ltu.se) Received: from brother.ludd.ltu.se (root@brother.ludd.ltu.se [130.240.16.78]) by mother.ludd.ltu.se (8.13.6+Sun/8.12.10) with ESMTP id m7JHnCTe003334 for ; Tue, 19 Aug 2008 19:49:13 +0200 (MEST) Received: from brother.ludd.ltu.se (pb@localhost [127.0.0.1]) by brother.ludd.ltu.se (8.13.6+Sun/8.12.2) with ESMTP id m7JHnCvM016671 for ; Tue, 19 Aug 2008 19:49:12 +0200 (MEST) Received: (from pb@localhost) by brother.ludd.ltu.se (8.13.6+Sun/8.13.6/Submit) id m7JHnCdR016669 for freebsd-usb@freebsd.org; Tue, 19 Aug 2008 19:49:12 +0200 (MEST) From: Peter B Message-Id: <200808191749.m7JHnCdR016669@brother.ludd.ltu.se> To: freebsd-usb@freebsd.org Date: Tue, 19 Aug 2008 19:49:12 +0200 (MEST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: USB Video Class, port/driver? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 18:04:44 -0000 Is there any ongoing project to create an USB Video Class driver project ..? Otherwise it seems porting the OpenBSD USB UVC driver is the least cumbersome path: http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/usb/uvideo.h?rev=1.27&content-type=text/plain http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/usb/uvideo.c?rev=1.82&content-type=text/plain Maybe someone could at least convert the kernel interfaces such that there is something to work with. At least to get started. Improvements could be "later". (linux: http://developer.berlios.de/projects/linux-uvc) From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 19:47:11 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E59191065678; Tue, 19 Aug 2008 19:47:11 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7970F8FC18; Tue, 19 Aug 2008 19:47:10 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48AB233C.2010602@FreeBSD.org> Date: Tue, 19 Aug 2008 20:47:08 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Hans Petter Selasky References: <20080818205914.GJ16977@elvis.mu.org> <20080818214711.J88849@maildrop.int.zabbadoz.net> <20080819055821.GO16977@elvis.mu.org> <200808191758.22981.hselasky@c2i.net> In-Reply-To: <200808191758.22981.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 19:47:12 -0000 Hans Petter Selasky wrote: > Hi, > > On Tuesday 19 August 2008, Alfred Perlstein wrote: >> Hans, here's some final review questions, I've added responses >> where I can recall off the top of my head answers, but I need >> you to fill in the rest. Just so we are clear, this is actually an "initial review" since it's the first time the commit candidate has been posted for public review, as far as I can tell. >> need to wait for smp tty code. > > If this requires changes in the USB serial port drivers there will be trouble. I am not sure what you mean by this statement, since it can be interpreted in several ways, some not so friendly. >>> The patch only includes kernel parts, is there any impact on userland? > > No. Userland will build like before. The current USB userland utilities and > libusb from ports will only work with the old USB stack. I'm working on a > replacement for "usbdevs" called "usbconfig" which has some more > functionality and a FreeBSD specific libusb, which is compatible with libusb > from sourceforge. I have most of it finished in my private SVN repository, > and will add it to my P4 repository soon. This raises the question of why the kernel changes need to be committed now, and what benefit they bring in the absence of a compatible userland. Shouldn't the commit happen after both kernel and userland are ready (and reviewed)? Another comment: the new code seems to bundle all new drivers into "subsystems" but not allow them to be loaded individually. This is quite contrary to how the rest of the kernel is structured, and seems to be of questionable benefit. For example, users will rarely have more than one USB ethernet driver in use on a given system but "device usb2_ethernet" will compile in all 7 drivers. >> I think the userland tools need to be switched to the new headers, >> however what's more likely to happen is that after a soak period of >> a few weeks, we will move the new to replace the old and userland should >> be just fine. >> >>> There are various style bugs introduced. That could be fixed easily I >>> guess? >> Yes, this is a LOT of new code, let's leave a few whitespace nits for >> others to play with. :) > > All code has been and is continuously styled with a modified "indent" utility: > > (cat $F | indent -Toss_mixerinfo -TFILE -Tu_char -Tu_int -Tu_long \ > -TTAILQ_HEAD -TLIST_HEAD -TTAILQ_ENTRY -TLIST_ENTRY \ > -TSTAILQ_HEAD -TSTAILQ_ENTRY \ > -Tu_short -Tfd_set -ta -st -bad -bap -nbbb -nbc -br -nbs \ > -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj -ei -nfc1 \ > -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc \ > -nsob -nv | > sed -e "s/_HEAD [(]/_HEAD(/g" | > sed -e "s/_ENTRY [(]/_ENTRY(/g" | > sed -e "s/ __packed/ __packed/g" | > sed -e "s/ __aligned/ __aligned/g" | > sed -e "s/^#define /#define /g") > temp > > If there are any more options I can add, then please let me know. Mechanical indent tools can be a useful starting point for style(9) compliance but are not the end point of that process. Usually there will need to be manual tweaks. >>> In kern/subr_bus.c you are taking steps to avoid zero size >>> allocations, which haven't been there up to now. Why do we need that? > > It is a workaround. USB2 defines the following function, which can be called > when there are no children on a device, which must be handled correctly > cross-platform. If this function could be directly implemented in subr_bus.c > we would not require the modifications to "device_get_children" at all or any > memory allocation. What do the newbus guys say about this? Adding a workaround in underlying code for a problem caused by your own code is often a signal that you're not going about it the right way. At the very least the reason for the special case should be documented here. > int > device_delete_all_children(device_t dev) > { > device_t *devlist; > int devcount; > int error; > > error = device_get_children(dev, &devlist, &devcount); > if (error == 0) { > while (devcount-- > 0) { > error = device_delete_child(dev, devlist[devcount]); > if (error) { > break; > } > } > free(devlist, M_TEMP); > } > return (error); > } > >> ??Hans?? >> >>> There is a question about whether to avoid the conditional locking in >>> dev/sound/pcm/channel.c in favour of recursive locking? > > That is also possible. The type of the mutex in question can be changed. The > feedback I've gotten so far has been against the use of recursive mutexes. > Alternativly, expose two variants of the function in question: > > xxx_unlocked() > xxx_locked() It is correct that in general recursive locking is considered undesirable, but you should also not play games to work around the fact that your locking is in fact being called recursively, as in: - CHN_LOCK(c); + uint8_t do_unlock; + if (CHN_LOCK_OWNED(c)) { + /* + * Allow sound drivers to call this function with + * "CHN_LOCK()" locked: + */ + do_unlock = 0; + } else { + do_unlock = 1; + CHN_LOCK(c); + } >>> The locking in dev/sound/pcm/mixer.c appears to be strange; the >>> locking appears to have substantially changed without corresponding >>> changes to the non-USB drivers. > > All the mixer changes are in the detach code for the mixer and should not > require any changes to non-USB drivers. The change here: - snd_mtxlock(m->lock); + /* mixer uninit can sleep --hps */ MIXER_UNINIT(m); @@ -704,14 +704,24 @@ return EBUSY; } + /* destroy dev can sleep --hps */ + + snd_mtxunlock(m->lock); + pdev->si_drv1 = NULL; destroy_dev(pdev); + snd_mtxlock(m->lock); + for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) mixer_set(m, i, 0); mixer_setrecsrc(m, SOUND_MASK_MIC); + snd_mtxunlock(m->lock); seems to change locking since you remove a mtx_lock and don't add it back anywhere. However it looks like it may have been a bug in the old code, I am not sure. Also is it safe to drop and reacquire the lock here? What do the sound maintainers think about these changes? >>> Some of the new sound drivers are Giant-locked? I am not sure we >>> should be adding new drivers that are not mpsafe. > > I assume that you mean USB drivers? s/sound/USB/ I am referring to this: +struct mtx * +mixer_get_lock(struct snd_mixer *m) +{ + if (m->lock == NULL) { + return (&Giant); + } + return (m->lock); +} This seems to say that m->lock now may be NULL in situations where it was not before (since there is no handling for m->lock == NULL in existing parts of the code), so the Giant locking is new. > Regarding Giant use: > > All USB drivers that can work without Giant has been converted to work without > Giant. Some USB drivers like USB serial port drivers cannot work without > Giant because they depend on a Giant locked TTY layer. Same with keyboard. > Another example is UHUB which use Giant simply because the device_xxx() > functions require Giant. > > The Giant lock is not used in any critical paths. > >> I think this will be addressed shortly... but.. >> > >> (please comment) >> >>> There seems to be a README.TXT but no manpages for the new API or >>> drivers. Are these pending? > > The manpages are not ready. This is something I need to do. I would appreciate > some help here like where I find manpage templates and where I should put > these files. The doc@ folks can probably answer this question if you ask them. It's also worth recalling that people asked for this 3 months ago as part of the process of getting this code commit-ready. >>> Why is the diff to compat/ndis/ntoskrnl_var.h necessary? >> It's needed for compiling usb2_ndis, but... > > Without this patch the usb2_ndis module will not compile on certain > architectures. If you remove this patch you will need to decouple the > usb2_ndis module, which is not complete anyway, from the default build. Why will it not compile? This looks like a workaround for some other issue that should be solved directly. Anyway, if the module is not complete then it should probably not be imported until it is. Kris From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:00:18 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23EF61065688; Tue, 19 Aug 2008 20:00:18 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 05A928FC22; Tue, 19 Aug 2008 20:00:17 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id E21441A4D80; Tue, 19 Aug 2008 13:00:17 -0700 (PDT) Date: Tue, 19 Aug 2008 13:00:17 -0700 From: Alfred Perlstein To: Kris Kennaway Message-ID: <20080819200017.GC16977@elvis.mu.org> References: <20080818205914.GJ16977@elvis.mu.org> <20080818214711.J88849@maildrop.int.zabbadoz.net> <20080819055821.GO16977@elvis.mu.org> <200808191758.22981.hselasky@c2i.net> <48AB233C.2010602@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48AB233C.2010602@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:00:18 -0000 * Kris Kennaway [080819 12:47] wrote: > Hans Petter Selasky wrote: > >Hi, > > > >On Tuesday 19 August 2008, Alfred Perlstein wrote: > >>Hans, here's some final review questions, I've added responses > >>where I can recall off the top of my head answers, but I need > >>you to fill in the rest. > > Just so we are clear, this is actually an "initial review" since it's > the first time the commit candidate has been posted for public review, > as far as I can tell. Kris, Hans usb code has been in a public repository with patches posted to the lists for a long time. > >>need to wait for smp tty code. > > > >If this requires changes in the USB serial port drivers there will be > >trouble. > > I am not sure what you mean by this statement, since it can be > interpreted in several ways, some not so friendly. I think hans means that there might be trouble in the usb2 system, but that doesn't spread out to anything else. If there's a problem in usb2, then don't use it, we'll fix it shortly. > >>>The patch only includes kernel parts, is there any impact on userland? > > > >No. Userland will build like before. The current USB userland utilities > >and libusb from ports will only work with the old USB stack. I'm working > >on a replacement for "usbdevs" called "usbconfig" which has some more > >functionality and a FreeBSD specific libusb, which is compatible with > >libusb from sourceforge. I have most of it finished in my private SVN > >repository, and will add it to my P4 repository soon. > > This raises the question of why the kernel changes need to be committed > now, and what benefit they bring in the absence of a compatible > userland. Shouldn't the commit happen after both kernel and userland > are ready (and reviewed)? This is a huge amount of code to haul around... again, we are not getting rid of "oldusb", if you don't want to be bleeding edge usb2, then you don't need it. > Another comment: the new code seems to bundle all new drivers into > "subsystems" but not allow them to be loaded individually. This is > quite contrary to how the rest of the kernel is structured, and seems to > be of questionable benefit. For example, users will rarely have more > than one USB ethernet driver in use on a given system but "device > usb2_ethernet" will compile in all 7 drivers. Interem issue, this is just to reduce the complexity for the time being, we will "remodularize it" before it replaces "oldusb" or as needed. > >>I think the userland tools need to be switched to the new headers, > >>however what's more likely to happen is that after a soak period of > >>a few weeks, we will move the new to replace the old and userland should > >>be just fine. > >> > >>>There are various style bugs introduced. That could be fixed easily I > >>>guess? > >>Yes, this is a LOT of new code, let's leave a few whitespace nits for > >>others to play with. :) > > > >All code has been and is continuously styled with a modified "indent" > >utility: > > > >(cat $F | indent -Toss_mixerinfo -TFILE -Tu_char -Tu_int -Tu_long \ > > -TTAILQ_HEAD -TLIST_HEAD -TTAILQ_ENTRY -TLIST_ENTRY \ > > -TSTAILQ_HEAD -TSTAILQ_ENTRY \ > > -Tu_short -Tfd_set -ta -st -bad -bap -nbbb -nbc -br -nbs \ > > -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj -ei -nfc1 \ > > -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc \ > > -nsob -nv | > > sed -e "s/_HEAD [(]/_HEAD(/g" | > > sed -e "s/_ENTRY [(]/_ENTRY(/g" | > > sed -e "s/ __packed/ __packed/g" | > > sed -e "s/ __aligned/ __aligned/g" | > > sed -e "s/^#define /#define /g") > temp > > > >If there are any more options I can add, then please let me know. > > Mechanical indent tools can be a useful starting point for style(9) > compliance but are not the end point of that process. Usually there > will need to be manual tweaks. That is fine. > > >>>In kern/subr_bus.c you are taking steps to avoid zero size > >>>allocations, which haven't been there up to now. Why do we need that? > > > >It is a workaround. USB2 defines the following function, which can be > >called when there are no children on a device, which must be handled > >correctly cross-platform. If this function could be directly implemented > >in subr_bus.c we would not require the modifications to > >"device_get_children" at all or any memory allocation. > > What do the newbus guys say about this? Adding a workaround in > underlying code for a problem caused by your own code is often a signal > that you're not going about it the right way. At the very least the > reason for the special case should be documented here. I need to think about this, Hans gave me a better argument on AIM earlier for it, I need to reload this in my head. > >int > >device_delete_all_children(device_t dev) > >{ > > device_t *devlist; > > int devcount; > > int error; > > > > error = device_get_children(dev, &devlist, &devcount); > > if (error == 0) { > > while (devcount-- > 0) { > > error = device_delete_child(dev, > > devlist[devcount]); > > if (error) { > > break; > > } > > } > > free(devlist, M_TEMP); > > } > > return (error); > >} > > > >>??Hans?? > >> > >>>There is a question about whether to avoid the conditional locking in > >>>dev/sound/pcm/channel.c in favour of recursive locking? > > > >That is also possible. The type of the mutex in question can be changed. > >The feedback I've gotten so far has been against the use of recursive > >mutexes. Alternativly, expose two variants of the function in question: > > > >xxx_unlocked() > >xxx_locked() > > It is correct that in general recursive locking is considered > undesirable, but you should also not play games to work around the fact > that your locking is in fact being called recursively, as in: > > - CHN_LOCK(c); > + uint8_t do_unlock; > + if (CHN_LOCK_OWNED(c)) { > + /* > + * Allow sound drivers to call this function with > + * "CHN_LOCK()" locked: > + */ > + do_unlock = 0; > + } else { > + do_unlock = 1; > + CHN_LOCK(c); > + } Yes, but sometimes it's hard to do so. I think such things can be addressed. Do consider the amount of progress here, and realize it's a giant step forward with a few nits we can address with time. > >>>The locking in dev/sound/pcm/mixer.c appears to be strange; the > >>>locking appears to have substantially changed without corresponding > >>>changes to the non-USB drivers. > > > >All the mixer changes are in the detach code for the mixer and should not > >require any changes to non-USB drivers. > > The change here: > > - snd_mtxlock(m->lock); > + /* mixer uninit can sleep --hps */ > > MIXER_UNINIT(m); > > @@ -704,14 +704,24 @@ > return EBUSY; > } > > + /* destroy dev can sleep --hps */ > + > + snd_mtxunlock(m->lock); > + > pdev->si_drv1 = NULL; > destroy_dev(pdev); > > + snd_mtxlock(m->lock); > + > for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) > mixer_set(m, i, 0); > > mixer_setrecsrc(m, SOUND_MASK_MIC); > > + snd_mtxunlock(m->lock); > > seems to change locking since you remove a mtx_lock and don't add it > back anywhere. However it looks like it may have been a bug in the old > code, I am not sure. Also is it safe to drop and reacquire the lock here? > > What do the sound maintainers think about these changes? > > >>>Some of the new sound drivers are Giant-locked? I am not sure we > >>>should be adding new drivers that are not mpsafe. > > > >I assume that you mean USB drivers? s/sound/USB/ > > I am referring to this: > > +struct mtx * > +mixer_get_lock(struct snd_mixer *m) > +{ > + if (m->lock == NULL) { > + return (&Giant); > + } > + return (m->lock); > +} > > This seems to say that m->lock now may be NULL in situations where it > was not before (since there is no handling for m->lock == NULL in > existing parts of the code), so the Giant locking is new. > > >Regarding Giant use: > > > >All USB drivers that can work without Giant has been converted to work > >without Giant. Some USB drivers like USB serial port drivers cannot work > >without Giant because they depend on a Giant locked TTY layer. Same with > >keyboard. Another example is UHUB which use Giant simply because the > >device_xxx() functions require Giant. > > > >The Giant lock is not used in any critical paths. > > > >>I think this will be addressed shortly... but.. > >> > > > >>(please comment) > >> > >>>There seems to be a README.TXT but no manpages for the new API or > >>>drivers. Are these pending? > > > >The manpages are not ready. This is something I need to do. I would > >appreciate some help here like where I find manpage templates and where I > >should put these files. > > The doc@ folks can probably answer this question if you ask them. It's > also worth recalling that people asked for this 3 months ago as part of > the process of getting this code commit-ready. Can we consider leveraging the doc people and doing the docs post commit? I think we can get something nice in short time. > > >>>Why is the diff to compat/ndis/ntoskrnl_var.h necessary? > >>It's needed for compiling usb2_ndis, but... > > > >Without this patch the usb2_ndis module will not compile on certain > >architectures. If you remove this patch you will need to decouple the > >usb2_ndis module, which is not complete anyway, from the default build. > > Why will it not compile? This looks like a workaround for some other > issue that should be solved directly. > > Anyway, if the module is not complete then it should probably not be > imported until it is. Yes, but it breaks the module without it, so it's a chicken and egg issue, having to haul around a patch that will eventually have to go in anyhow doesn't make much sense. At the end of this all, there are some small requests in here along with some large requests, if you take the time to add up the time needed to get all of this according to your request, it pushes back the delivery of the essential kernel functionality by several weeks if not months. -- - Alfred Perlstein From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:00:54 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73A88106568A for ; Tue, 19 Aug 2008 20:00:54 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 6705C8FC16 for ; Tue, 19 Aug 2008 20:00:54 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id ABDDA1A4D83; Tue, 19 Aug 2008 12:44:13 -0700 (PDT) Date: Tue, 19 Aug 2008 12:44:13 -0700 From: Alfred Perlstein To: current@freebsd.org Message-ID: <20080819194413.GB16977@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: usb@freebsd.org Subject: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:00:54 -0000 After a long period of review and testing I am on the verge of committing Hans Peter's new usb stack to -current. The patchset requires a SMALL _493_ line diff to the main code, mostly bug fixes to arm. And then a large number of new files for the usb system. The new usb system will be committed as separate files with the intention of folding them over the old files before the 9.0 release. The diff to the main files is here: http://mu.org/~bright/usb2/usb2_release_001.diff The whole diff, including new files is here: http://mu.org/~bright/usb2/usb4bsd.diff.gz FAQ: Q. Has this been reviewed? A. Yes, pretty strongly by myself and we've consulted with various others, Warner, Scott and Andrew for review/testing. I wouldn't say that Warner or Scott have given full review but just about all questions have been answered. Q. Can we change the name from "usb2_" to my favorite name? A. No. This is for a short period, stop being so annoying. Q. What about the old usb code? A. What about it? :D Q. What about ttys? A. I don't know, we'll address the mpsafe aspects of ttys shortly, Hans is very responsive to SMP issues. Q. Shouldn't you wait? A. Wait for what? No. Q. I have some whitespace nits, can you do those? A. No. It's a 100k line diff and a 3meg delta, we tried really hard to get all whitespace right, but you're welcome to point things out after the commit. Thanks! -- - Alfred Perlstein From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:01:52 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D612106566B; Tue, 19 Aug 2008 20:01:52 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 87EE08FC2B; Tue, 19 Aug 2008 20:01:52 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 7734C1A4D83; Tue, 19 Aug 2008 13:01:52 -0700 (PDT) Date: Tue, 19 Aug 2008 13:01:52 -0700 From: Alfred Perlstein To: Wilko Bulte Message-ID: <20080819200152.GD16977@elvis.mu.org> References: <20080819194413.GB16977@elvis.mu.org> <20080819195738.GB45668@freebie.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080819195738.GB45668@freebie.xs4all.nl> User-Agent: Mutt/1.4.2.3i Cc: usb@freebsd.org, FreeBSD core team , current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:01:52 -0000 * Wilko Bulte [080819 12:59] wrote: > Quoting Alfred Perlstein, who wrote on Tue, Aug 19, 2008 at 12:44:13PM -0700 .. > > After a long period of review and testing I am on the verge of > > committing Hans Peter's new usb stack to -current. > > > > The patchset requires a SMALL _493_ line diff to the main code, > > mostly bug fixes to arm. And then a large number of new files > > for the usb system. > > > > The new usb system will be committed as separate files with > > the intention of folding them over the old files before the > > 9.0 release. > > > > The diff to the main files is here: > > http://mu.org/~bright/usb2/usb2_release_001.diff > > > > The whole diff, including new files is here: > > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > > > FAQ: > > Q. Has this been reviewed? > > A. Yes, pretty strongly by myself and we've consulted with > > various others, Warner, Scott and Andrew for review/testing. > > I wouldn't say that Warner or Scott have given full review > > but just about all questions have been answered. > > > > Q. Can we change the name from "usb2_" to my favorite name? > > A. No. This is for a short period, stop being so annoying. > > > > Q. What about the old usb code? > > A. What about it? :D > > > > Q. What about ttys? > > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > > Hans is very responsive to SMP issues. > > > > Q. Shouldn't you wait? > > A. Wait for what? No. > > Well, Robert *explicitely* asked to wait for the tty stuff from Ed > to get into the tree. > > Apparantly you are planning on simply ignoring that request? I have acknowledged it, I don't find it necessary and am annoyed by it. I don't plan on side stepping it, but I do protest it, strongly as just unneeded process. I think I am entitled to an opinion and to gather support for my opinions, right? -- - Alfred Perlstein From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:16:36 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2F051065674; Tue, 19 Aug 2008 20:16:36 +0000 (UTC) (envelope-from wb@freebie.xs4all.nl) Received: from smtp-vbr12.xs4all.nl (smtp-vbr12.xs4all.nl [194.109.24.32]) by mx1.freebsd.org (Postfix) with ESMTP id 5CC508FC1F; Tue, 19 Aug 2008 20:16:36 +0000 (UTC) (envelope-from wb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (freebie.xs4all.nl [82.95.250.254]) by smtp-vbr12.xs4all.nl (8.13.8/8.13.8) with ESMTP id m7JJx4dc050238; Tue, 19 Aug 2008 21:59:05 +0200 (CEST) (envelope-from wb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (localhost [127.0.0.1]) by freebie.xs4all.nl (8.14.2/8.14.2) with ESMTP id m7JJvjAH047616; Tue, 19 Aug 2008 21:57:45 +0200 (CEST) (envelope-from wb@freebie.xs4all.nl) Received: (from wb@localhost) by freebie.xs4all.nl (8.14.2/8.14.2/Submit) id m7JJvdDa047615; Tue, 19 Aug 2008 21:57:39 +0200 (CEST) (envelope-from wb) Date: Tue, 19 Aug 2008 21:57:39 +0200 From: Wilko Bulte To: Alfred Perlstein Message-ID: <20080819195738.GB45668@freebie.xs4all.nl> References: <20080819194413.GB16977@elvis.mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080819194413.GB16977@elvis.mu.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: usb@freebsd.org, FreeBSD core team , current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:16:36 -0000 Quoting Alfred Perlstein, who wrote on Tue, Aug 19, 2008 at 12:44:13PM -0700 .. > After a long period of review and testing I am on the verge of > committing Hans Peter's new usb stack to -current. > > The patchset requires a SMALL _493_ line diff to the main code, > mostly bug fixes to arm. And then a large number of new files > for the usb system. > > The new usb system will be committed as separate files with > the intention of folding them over the old files before the > 9.0 release. > > The diff to the main files is here: > http://mu.org/~bright/usb2/usb2_release_001.diff > > The whole diff, including new files is here: > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > FAQ: > Q. Has this been reviewed? > A. Yes, pretty strongly by myself and we've consulted with > various others, Warner, Scott and Andrew for review/testing. > I wouldn't say that Warner or Scott have given full review > but just about all questions have been answered. > > Q. Can we change the name from "usb2_" to my favorite name? > A. No. This is for a short period, stop being so annoying. > > Q. What about the old usb code? > A. What about it? :D > > Q. What about ttys? > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > Hans is very responsive to SMP issues. > > Q. Shouldn't you wait? > A. Wait for what? No. Well, Robert *explicitely* asked to wait for the tty stuff from Ed to get into the tree. Apparantly you are planning on simply ignoring that request? Wilko From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:17:45 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A796A1065688; Tue, 19 Aug 2008 20:17:45 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swipnet.se [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id A1FC68FC20; Tue, 19 Aug 2008 20:17:44 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=H3poPDSvFasA:10 a=fj6dw-CIB2gA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=r3QWF4mezmgulWj3MVkA:9 a=nWsatMDgZTJ8sheTY0oA:7 a=zML3vKV0_yQ_J_QS1C5eEBnLJFkA:4 a=50e4U0PicR4A:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 656052876; Tue, 19 Aug 2008 22:17:42 +0200 From: Hans Petter Selasky To: Kris Kennaway Date: Tue, 19 Aug 2008 22:19:14 +0200 User-Agent: KMail/1.9.7 References: <20080818205914.GJ16977@elvis.mu.org> <200808191758.22981.hselasky@c2i.net> <48AB233C.2010602@FreeBSD.org> In-Reply-To: <48AB233C.2010602@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808192219.19246.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:17:45 -0000 Hi, On Tuesday 19 August 2008, Kris Kennaway wrote: > Hans Petter Selasky wrote: > > Hi, > > > > On Tuesday 19 August 2008, Alfred Perlstein wrote: > >> Hans, here's some final review questions, I've added responses > >> where I can recall off the top of my head answers, but I need > >> you to fill in the rest. > > Just so we are clear, this is actually an "initial review" since it's > the first time the commit candidate has been posted for public review, > as far as I can tell. > > >> need to wait for smp tty code. > > > > If this requires changes in the USB serial port drivers there will be > > trouble. > > I am not sure what you mean by this statement, since it can be > interpreted in several ways, some not so friendly. I mean I need to make another patchset. And that the current patchset will break the kernel compilation if blindly committed after mpsafetty. > > >>> The patch only includes kernel parts, is there any impact on userland? > > > > No. Userland will build like before. The current USB userland utilities > > and libusb from ports will only work with the old USB stack. I'm working > > on a replacement for "usbdevs" called "usbconfig" which has some more > > functionality and a FreeBSD specific libusb, which is compatible with > > libusb from sourceforge. I have most of it finished in my private SVN > > repository, and will add it to my P4 repository soon. > > This raises the question of why the kernel changes need to be committed > now, and what benefit they bring in the absence of a compatible > userland. Shouldn't the commit happen after both kernel and userland > are ready (and reviewed)? I think that is correct. > > Another comment: the new code seems to bundle all new drivers into > "subsystems" but not allow them to be loaded individually. This is > quite contrary to how the rest of the kernel is structured, and seems to > be of questionable benefit. For example, users will rarely have more > than one USB ethernet driver in use on a given system but "device > usb2_ethernet" will compile in all 7 drivers. It is still possible to separate the USB drivers. In my experience grouping the drivers gives a more user-friendly experience. For example you have a USB serial port adapter and plug it in. Then all you need to do is to kldload usb2_serial regardless of adapter. It is like a container module. I don't opponent that for kernel compilation you can have a more fine-grained control what drivers are actually included. I will see about fixing that. > > >> I think the userland tools need to be switched to the new headers, > >> however what's more likely to happen is that after a soak period of > >> a few weeks, we will move the new to replace the old and userland should > >> be just fine. > >> > >>> There are various style bugs introduced. That could be fixed easily I > >>> guess? > >> > >> Yes, this is a LOT of new code, let's leave a few whitespace nits for > >> others to play with. :) > > > > All code has been and is continuously styled with a modified "indent" > > utility: > > > > (cat $F | indent -Toss_mixerinfo -TFILE -Tu_char -Tu_int -Tu_long \ > > -TTAILQ_HEAD -TLIST_HEAD -TTAILQ_ENTRY -TLIST_ENTRY \ > > -TSTAILQ_HEAD -TSTAILQ_ENTRY \ > > -Tu_short -Tfd_set -ta -st -bad -bap -nbbb -nbc -br -nbs \ > > -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj -ei -nfc1 \ > > -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc \ > > -nsob -nv | > > sed -e "s/_HEAD [(]/_HEAD(/g" | > > sed -e "s/_ENTRY [(]/_ENTRY(/g" | > > sed -e "s/ __packed/ __packed/g" | > > sed -e "s/ __aligned/ __aligned/g" | > > sed -e "s/^#define /#define /g") > temp > > > > If there are any more options I can add, then please let me know. > > Mechanical indent tools can be a useful starting point for style(9) > compliance but are not the end point of that process. Usually there > will need to be manual tweaks. > > >>> In kern/subr_bus.c you are taking steps to avoid zero size > >>> allocations, which haven't been there up to now. Why do we need that? > > > > It is a workaround. USB2 defines the following function, which can be > > called when there are no children on a device, which must be handled > > correctly cross-platform. If this function could be directly implemented > > in subr_bus.c we would not require the modifications to > > "device_get_children" at all or any memory allocation. > > What do the newbus guys say about this? Adding a workaround in > underlying code for a problem caused by your own code is often a signal > that you're not going about it the right way. At the very least the > reason for the special case should be documented here. > > > int > > device_delete_all_children(device_t dev) > > { > > device_t *devlist; > > int devcount; > > int error; > > > > error = device_get_children(dev, &devlist, &devcount); > > if (error == 0) { > > while (devcount-- > 0) { > > error = device_delete_child(dev, > > devlist[devcount]); if (error) { > > break; > > } > > } > > free(devlist, M_TEMP); > > } > > return (error); > > } > > > >> ??Hans?? > >> > >>> There is a question about whether to avoid the conditional locking in > >>> dev/sound/pcm/channel.c in favour of recursive locking? > > > > That is also possible. The type of the mutex in question can be changed. > > The feedback I've gotten so far has been against the use of recursive > > mutexes. Alternativly, expose two variants of the function in question: > > > > xxx_unlocked() > > xxx_locked() > > It is correct that in general recursive locking is considered > undesirable, but you should also not play games to work around the fact > that your locking is in fact being called recursively, as in: > > - CHN_LOCK(c); > + uint8_t do_unlock; > + if (CHN_LOCK_OWNED(c)) { > + /* > + * Allow sound drivers to call this function with > + * "CHN_LOCK()" locked: > + */ > + do_unlock = 0; > + } else { > + do_unlock = 1; > + CHN_LOCK(c); > + } > > >>> The locking in dev/sound/pcm/mixer.c appears to be strange; the > >>> locking appears to have substantially changed without corresponding > >>> changes to the non-USB drivers. > > > > All the mixer changes are in the detach code for the mixer and should not > > require any changes to non-USB drivers. > > The change here: > > - snd_mtxlock(m->lock); > + /* mixer uninit can sleep --hps */ > > MIXER_UNINIT(m); > > @@ -704,14 +704,24 @@ > return EBUSY; > } > > + /* destroy dev can sleep --hps */ > + > + snd_mtxunlock(m->lock); > + > pdev->si_drv1 = NULL; > destroy_dev(pdev); > > + snd_mtxlock(m->lock); > + > for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) > mixer_set(m, i, 0); > > mixer_setrecsrc(m, SOUND_MASK_MIC); > > + snd_mtxunlock(m->lock); > > seems to change locking since you remove a mtx_lock and don't add it > back anywhere. This is because the mtx_lock/unlock was unbalanced in the first place! The original code used to call mtx_destroy with the mutex locked. Now I added an unlock before the destroy. snd_mtxunlock(m->lock); /* mixer uninit can sleep --hps */ MIXER_UNINIT(m); snd_mtxfree(m->lock); > However it looks like it may have been a bug in the old > code, I am not sure. Right. > Also is it safe to drop and reacquire the lock here? You have to drop the lock, else I get witness warnings. > > What do the sound maintainers think about these changes? > > >>> Some of the new sound drivers are Giant-locked? I am not sure we > >>> should be adding new drivers that are not mpsafe. > > > > I assume that you mean USB drivers? s/sound/USB/ > > I am referring to this: > > +struct mtx * > +mixer_get_lock(struct snd_mixer *m) > +{ > + if (m->lock == NULL) { > + return (&Giant); > + } > + return (m->lock); > +} > > This seems to say that m->lock now may be NULL in situations where it > was not before (since there is no handling for m->lock == NULL in > existing parts of the code), so the Giant locking is new. That is just a safety measure, because the Sound code has some ifdef's to enable it to run without mutexes, and in that case Giant must be used. > > > Regarding Giant use: > > > > All USB drivers that can work without Giant has been converted to work > > without Giant. Some USB drivers like USB serial port drivers cannot work > > without Giant because they depend on a Giant locked TTY layer. Same with > > keyboard. Another example is UHUB which use Giant simply because the > > device_xxx() functions require Giant. > > > > The Giant lock is not used in any critical paths. > > > >> I think this will be addressed shortly... but.. > >> > >> > >> (please comment) > >> > >>> There seems to be a README.TXT but no manpages for the new API or > >>> drivers. Are these pending? > > > > The manpages are not ready. This is something I need to do. I would > > appreciate some help here like where I find manpage templates and where I > > should put these files. > > The doc@ folks can probably answer this question if you ask them. It's > also worth recalling that people asked for this 3 months ago as part of > the process of getting this code commit-ready. > > >>> Why is the diff to compat/ndis/ntoskrnl_var.h necessary? > >> > >> It's needed for compiling usb2_ndis, but... > > > > Without this patch the usb2_ndis module will not compile on certain > > architectures. If you remove this patch you will need to decouple the > > usb2_ndis module, which is not complete anyway, from the default build. > > Why will it not compile? This looks like a workaround for some other > issue that should be solved directly. There are multiple issues: 1) If PAGE_SIZE is 16384 bytes, then the code simply fails. 2) Sometimes PAGE_SHIFT is already defined. #if PAGE_SIZE == 4096 #define PAGE_SHIFT 12 #elif PAGE_SIZE == 8192 #define PAGE_SHIFT 13 #else #error PAGE_SHIFT undefined! #endif > > Anyway, if the module is not complete then it should probably not be > imported until it is. Yes, I agree about that. --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:20:06 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 210CD1065671; Tue, 19 Aug 2008 20:20:06 +0000 (UTC) (envelope-from oberman@es.net) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.freebsd.org (Postfix) with ESMTP id EDB098FC20; Tue, 19 Aug 2008 20:20:05 +0000 (UTC) (envelope-from oberman@es.net) Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id ZCC34511; Tue, 19 Aug 2008 13:09:11 -0700 Received: from ptavv.es.net (ptavv.es.net [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 224754500F; Tue, 19 Aug 2008 13:09:11 -0700 (PDT) To: Alfred Perlstein In-Reply-To: Your message of "Tue, 19 Aug 2008 12:44:13 PDT." <20080819194413.GB16977@elvis.mu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1219176551_26888P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Tue, 19 Aug 2008 13:09:11 -0700 From: "Kevin Oberman" Message-Id: <20080819200911.224754500F@ptavv.es.net> X-Sender-IP: 198.128.4.29 X-Sender-Domain: es.net X-Recipent: ;;; X-Sender: X-To_Name: Alfred Perlstein X-To_Domain: freebsd.org X-To: Alfred Perlstein X-To_Email: alfred@freebsd.org X-To_Alias: alfred Cc: usb@freebsd.org, current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:20:06 -0000 --==_Exmh_1219176551_26888P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > Date: Tue, 19 Aug 2008 12:44:13 -0700 > From: Alfred Perlstein > Sender: owner-freebsd-current@freebsd.org > > After a long period of review and testing I am on the verge of > committing Hans Peter's new usb stack to -current. > > The patchset requires a SMALL _493_ line diff to the main code, > mostly bug fixes to arm. And then a large number of new files > for the usb system. > > The new usb system will be committed as separate files with > the intention of folding them over the old files before the > 9.0 release. > > The diff to the main files is here: > http://mu.org/~bright/usb2/usb2_release_001.diff > > The whole diff, including new files is here: > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > FAQ: > Q. Has this been reviewed? > A. Yes, pretty strongly by myself and we've consulted with > various others, Warner, Scott and Andrew for review/testing. > I wouldn't say that Warner or Scott have given full review > but just about all questions have been answered. > > Q. Can we change the name from "usb2_" to my favorite name? > A. No. This is for a short period, stop being so annoying. > > Q. What about the old usb code? > A. What about it? :D > > Q. What about ttys? > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > Hans is very responsive to SMP issues. > > Q. Shouldn't you wait? > A. Wait for what? No. > > Q. I have some whitespace nits, can you do those? > A. No. It's a 100k line diff and a 3meg delta, we tried really hard > to get all whitespace right, but you're welcome to point things out after > the commit. Cool! I've been waiting for this for a loooooong time. Thanks to you, Hans Peter and all of the folks who have helped! Not on the FAQ: Q: Other then no longer requiring giant [MPSAFE], what does usb2 give us? Does it fix the battery-eating on laptops? Does it allow the system to reach C3 and lower sleep states? (These are at least closely linked issues.) I have not been running current for a while and this might be enough incentive to get me to kick the tires. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 --==_Exmh_1219176551_26888P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Exmh version 2.5 06/03/2002 iD8DBQFIqyhnkn3rs5h7N1ERAn2aAJwJe+e7pZwMbIVwhxkj2kxs5nMV/wCfalld 3R1HYYQ9ie+Uq6NOd1fwjDI= =VPUL -----END PGP SIGNATURE----- --==_Exmh_1219176551_26888P-- From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:27:02 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 752781065702; Tue, 19 Aug 2008 20:27:02 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe15.swipnet.se [212.247.155.193]) by mx1.freebsd.org (Postfix) with ESMTP id 83EB38FC18; Tue, 19 Aug 2008 20:27:01 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=H3poPDSvFasA:10 a=fj6dw-CIB2gA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=3KYg0pR1Xb4fHWQ9kKcA:9 a=tj716jywtbLrFEIbY1QA:7 a=1YIwwewWvihx4zNiTmpyUEW7NckA:4 a=MxZ3bB5I4kYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe15.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 302565072; Tue, 19 Aug 2008 22:26:59 +0200 From: Hans Petter Selasky To: Alfred Perlstein Date: Tue, 19 Aug 2008 22:28:36 +0200 User-Agent: KMail/1.9.7 References: <20080818205914.GJ16977@elvis.mu.org> <48AB233C.2010602@FreeBSD.org> <20080819200017.GC16977@elvis.mu.org> In-Reply-To: <20080819200017.GC16977@elvis.mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808192228.39015.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:27:02 -0000 > > > > What do the newbus guys say about this? Adding a workaround in > > underlying code for a problem caused by your own code is often a signal > > that you're not going about it the right way. At the very least the > > reason for the special case should be documented here. > > I need to think about this, Hans gave me a better argument on > AIM earlier for it, I need to reload this in my head. > > > >int > > >device_delete_all_children(device_t dev) > > >{ > > > device_t *devlist; > > > int devcount; > > > int error; > > > > > > error = device_get_children(dev, &devlist, &devcount); > > > if (error == 0) { > > > while (devcount-- > 0) { > > > error = device_delete_child(dev, > > > devlist[devcount]); > > > if (error) { > > > break; > > > } > > > } > > > free(devlist, M_TEMP); > > > } > > > return (error); > > >} > > > In the existing kernel code, "device_get_children()" is used many places without checking the error code. I have patches, but they are not part of the patch-set. Also freeing a pointer to zero bytes is not logical. I'm not sure if this is allowed in kernel space? ptr = malloc(0, ... ) free(0); The device_get_children() could have returned an error if there are no children, but again, the existing code does not check this return value. --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:27:58 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE197106564A; Tue, 19 Aug 2008 20:27:57 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id DDBB68FC0C; Tue, 19 Aug 2008 20:27:57 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id BD88D1A4D80; Tue, 19 Aug 2008 13:27:57 -0700 (PDT) Date: Tue, 19 Aug 2008 13:27:57 -0700 From: Alfred Perlstein To: Stefan Lambrev Message-ID: <20080819202757.GG16977@elvis.mu.org> References: <20080819194413.GB16977@elvis.mu.org> <48AB2A1C.4080808@moneybookers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48AB2A1C.4080808@moneybookers.com> User-Agent: Mutt/1.4.2.3i Cc: usb@freebsd.org, current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:27:59 -0000 * Stefan Lambrev [080819 13:16] wrote: > Alfred Perlstein wrote: > >After a long period of review and testing I am on the verge of > >committing Hans Peter's new usb stack to -current. > > > >The patchset requires a SMALL _493_ line diff to the main code, > >mostly bug fixes to arm. And then a large number of new files > >for the usb system. > > > >The new usb system will be committed as separate files with > >the intention of folding them over the old files before the > >9.0 release. > > > >The diff to the main files is here: > >http://mu.org/~bright/usb2/usb2_release_001.diff > > > >The whole diff, including new files is here: > >http://mu.org/~bright/usb2/usb4bsd.diff.gz > > > >FAQ: > >Q. Has this been reviewed? > >A. Yes, pretty strongly by myself and we've consulted with > >various others, Warner, Scott and Andrew for review/testing. > >I wouldn't say that Warner or Scott have given full review > >but just about all questions have been answered. > > > >Q. Can we change the name from "usb2_" to my favorite name? > >A. No. This is for a short period, stop being so annoying. > > > >Q. What about the old usb code? > >A. What about it? :D > > > >Q. What about ttys? > >A. I don't know, we'll address the mpsafe aspects of ttys shortly, > >Hans is very responsive to SMP issues. > > > >Q. Shouldn't you wait? > >A. Wait for what? No. > > > >Q. I have some whitespace nits, can you do those? > >A. No. It's a 100k line diff and a 3meg delta, we tried really hard > >to get all whitespace right, but you're welcome to point things out after > >the commit. > > > >Thanks! > > > > > Is this the same as usb4bsd - http://turbocat.net/~hselasky/usb4bsd/ ? Yes. > > As user I think this is great news. Old usb is so buggy and there are > lot of PR that are not addressed > only because in the new usb stack they are fixed or just does not exist > and nobody care for the old usb anymore. Yup! :) -- - Alfred Perlstein From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:28:35 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F1E31065680; Tue, 19 Aug 2008 20:28:35 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 2EAD28FC20; Tue, 19 Aug 2008 20:28:35 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 0F2561A4D83; Tue, 19 Aug 2008 13:28:35 -0700 (PDT) Date: Tue, 19 Aug 2008 13:28:34 -0700 From: Alfred Perlstein To: Kevin Oberman Message-ID: <20080819202834.GH16977@elvis.mu.org> References: <20080819194413.GB16977@elvis.mu.org> <20080819200911.224754500F@ptavv.es.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080819200911.224754500F@ptavv.es.net> User-Agent: Mutt/1.4.2.3i Cc: usb@freebsd.org, current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:28:35 -0000 * Kevin Oberman [080819 13:20] wrote: > > Date: Tue, 19 Aug 2008 12:44:13 -0700 > > From: Alfred Perlstein > > Sender: owner-freebsd-current@freebsd.org > > > > After a long period of review and testing I am on the verge of > > committing Hans Peter's new usb stack to -current. > > > > The patchset requires a SMALL _493_ line diff to the main code, > > mostly bug fixes to arm. And then a large number of new files > > for the usb system. > > > > The new usb system will be committed as separate files with > > the intention of folding them over the old files before the > > 9.0 release. > > > > The diff to the main files is here: > > http://mu.org/~bright/usb2/usb2_release_001.diff > > > > The whole diff, including new files is here: > > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > > > FAQ: > > Q. Has this been reviewed? > > A. Yes, pretty strongly by myself and we've consulted with > > various others, Warner, Scott and Andrew for review/testing. > > I wouldn't say that Warner or Scott have given full review > > but just about all questions have been answered. > > > > Q. Can we change the name from "usb2_" to my favorite name? > > A. No. This is for a short period, stop being so annoying. > > > > Q. What about the old usb code? > > A. What about it? :D > > > > Q. What about ttys? > > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > > Hans is very responsive to SMP issues. > > > > Q. Shouldn't you wait? > > A. Wait for what? No. > > > > Q. I have some whitespace nits, can you do those? > > A. No. It's a 100k line diff and a 3meg delta, we tried really hard > > to get all whitespace right, but you're welcome to point things out after > > the commit. > > Cool! I've been waiting for this for a loooooong time. Thanks to you, > Hans Peter and all of the folks who have helped! thanks! > > Not on the FAQ: > > Q: Other then no longer requiring giant [MPSAFE], what does usb2 give > us? Does it fix the battery-eating on laptops? Does it allow the > system to reach C3 and lower sleep states? (These are at least > closely linked issues.) > > I have not been running current for a while and this might be enough > incentive to get me to kick the tires. I don't know, I'm not aware as that being a feature, but Hans is pretty ambitious, he might jump on it. -Alfred From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:34:05 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04F0E1065672 for ; Tue, 19 Aug 2008 20:34:05 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id AC4578FC1F for ; Tue, 19 Aug 2008 20:34:04 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id 48EBD1B10EF2; Tue, 19 Aug 2008 22:16:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on malcho.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, J_CHICKENPOX_33 autolearn=no version=3.2.4 Received: from cheffo.freebsd-bg.org (unknown [192.168.25.10]) by blah.sun-fish.com (Postfix) with ESMTP id 160E51B10EF1; Tue, 19 Aug 2008 22:16:29 +0200 (CEST) Message-ID: <48AB2A1C.4080808@moneybookers.com> Date: Tue, 19 Aug 2008 23:16:28 +0300 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.14 (X11/20080702) MIME-Version: 1.0 To: Alfred Perlstein References: <20080819194413.GB16977@elvis.mu.org> In-Reply-To: <20080819194413.GB16977@elvis.mu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.93.3/8058/Tue Aug 19 17:20:36 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: usb@freebsd.org, current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:34:05 -0000 Alfred Perlstein wrote: > After a long period of review and testing I am on the verge of > committing Hans Peter's new usb stack to -current. > > The patchset requires a SMALL _493_ line diff to the main code, > mostly bug fixes to arm. And then a large number of new files > for the usb system. > > The new usb system will be committed as separate files with > the intention of folding them over the old files before the > 9.0 release. > > The diff to the main files is here: > http://mu.org/~bright/usb2/usb2_release_001.diff > > The whole diff, including new files is here: > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > FAQ: > Q. Has this been reviewed? > A. Yes, pretty strongly by myself and we've consulted with > various others, Warner, Scott and Andrew for review/testing. > I wouldn't say that Warner or Scott have given full review > but just about all questions have been answered. > > Q. Can we change the name from "usb2_" to my favorite name? > A. No. This is for a short period, stop being so annoying. > > Q. What about the old usb code? > A. What about it? :D > > Q. What about ttys? > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > Hans is very responsive to SMP issues. > > Q. Shouldn't you wait? > A. Wait for what? No. > > Q. I have some whitespace nits, can you do those? > A. No. It's a 100k line diff and a 3meg delta, we tried really hard > to get all whitespace right, but you're welcome to point things out after > the commit. > > Thanks! > > Is this the same as usb4bsd - http://turbocat.net/~hselasky/usb4bsd/ ? As user I think this is great news. Old usb is so buggy and there are lot of PR that are not addressed only because in the new usb stack they are fixed or just does not exist and nobody care for the old usb anymore. From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:36:23 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B0E11065687; Tue, 19 Aug 2008 20:36:23 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id D51AF8FC28; Tue, 19 Aug 2008 20:36:22 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id 197B41B10EF1; Tue, 19 Aug 2008 22:36:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on malcho.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, J_CHICKENPOX_33 autolearn=no version=3.2.4 Received: from cheffo.freebsd-bg.org (unknown [192.168.25.10]) by blah.sun-fish.com (Postfix) with ESMTP id 3C7851B10EF4; Tue, 19 Aug 2008 22:36:19 +0200 (CEST) Message-ID: <48AB2EC3.1030603@moneybookers.com> Date: Tue, 19 Aug 2008 23:36:19 +0300 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.14 (X11/20080702) MIME-Version: 1.0 To: Kevin Oberman References: <20080819200911.224754500F@ptavv.es.net> In-Reply-To: <20080819200911.224754500F@ptavv.es.net> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.93.3/8058/Tue Aug 19 17:20:36 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: usb@freebsd.org, current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:36:23 -0000 Kevin Oberman wrote: >> Date: Tue, 19 Aug 2008 12:44:13 -0700 >> From: Alfred Perlstein >> Sender: owner-freebsd-current@freebsd.org >> >> After a long period of review and testing I am on the verge of >> committing Hans Peter's new usb stack to -current. >> >> The patchset requires a SMALL _493_ line diff to the main code, >> mostly bug fixes to arm. And then a large number of new files >> for the usb system. >> >> The new usb system will be committed as separate files with >> the intention of folding them over the old files before the >> 9.0 release. >> >> The diff to the main files is here: >> http://mu.org/~bright/usb2/usb2_release_001.diff >> >> The whole diff, including new files is here: >> http://mu.org/~bright/usb2/usb4bsd.diff.gz >> >> FAQ: >> Q. Has this been reviewed? >> A. Yes, pretty strongly by myself and we've consulted with >> various others, Warner, Scott and Andrew for review/testing. >> I wouldn't say that Warner or Scott have given full review >> but just about all questions have been answered. >> >> Q. Can we change the name from "usb2_" to my favorite name? >> A. No. This is for a short period, stop being so annoying. >> >> Q. What about the old usb code? >> A. What about it? :D >> >> Q. What about ttys? >> A. I don't know, we'll address the mpsafe aspects of ttys shortly, >> Hans is very responsive to SMP issues. >> >> Q. Shouldn't you wait? >> A. Wait for what? No. >> >> Q. I have some whitespace nits, can you do those? >> A. No. It's a 100k line diff and a 3meg delta, we tried really hard >> to get all whitespace right, but you're welcome to point things out after >> the commit. >> > > Cool! I've been waiting for this for a loooooong time. Thanks to you, > Hans Peter and all of the folks who have helped! > > Not on the FAQ: > > Q: Other then no longer requiring giant [MPSAFE], what does usb2 give > us? I'm using usb4bsd on 7-stable even before 7R. It fixes few known kernel panics for me. I had a bad experience with base usb + GPRS card from vodafone which works on pcmci slot but is detected as usb device. I'm sure this is not the only improvement :) > Does it fix the battery-eating on laptops? Does it allow the > system to reach C3 and lower sleep states? (These are at least > closely linked issues.) > > I have not been running current for a while and this might be enough > incentive to get me to kick the tires. > From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:42:14 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 472041065675; Tue, 19 Aug 2008 20:42:14 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CE4408FC16; Tue, 19 Aug 2008 20:42:12 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48AB3023.2030307@FreeBSD.org> Date: Tue, 19 Aug 2008 21:42:11 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Alfred Perlstein References: <20080818205914.GJ16977@elvis.mu.org> <20080818214711.J88849@maildrop.int.zabbadoz.net> <20080819055821.GO16977@elvis.mu.org> <200808191758.22981.hselasky@c2i.net> <48AB233C.2010602@FreeBSD.org> <20080819200017.GC16977@elvis.mu.org> In-Reply-To: <20080819200017.GC16977@elvis.mu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:42:14 -0000 Alfred Perlstein wrote: > * Kris Kennaway [080819 12:47] wrote: >> Hans Petter Selasky wrote: >>> Hi, >>> >>> On Tuesday 19 August 2008, Alfred Perlstein wrote: >>>> Hans, here's some final review questions, I've added responses >>>> where I can recall off the top of my head answers, but I need >>>> you to fill in the rest. >> Just so we are clear, this is actually an "initial review" since it's >> the first time the commit candidate has been posted for public review, >> as far as I can tell. > > Kris, Hans usb code has been in a public repository with patches > posted to the lists for a long time. Having a public p4 branch is fine, but it's his active development branch including lots of stuff that may or may not be stable, finalized, intended for commit at all, etc. If you recall when you proposed the integration back in May, 3-4 people asked for the commit candidate patch then and didn't get one, and I haven't seen it posted on a mailing list since then either. If I missed a "commit candidate" email from you or Hans that was prior to last night's "post attempted commit", then I apologise, but as far as several of us can determine none was posted except possibly to some people in private email. The general intention of a USB integration in the future was well known for the past 3 months, but I think the fact that it you had intended to do it last night came as a complete surprise to many people who were expecting prior scheduling. >>>>> The patch only includes kernel parts, is there any impact on userland? >>> No. Userland will build like before. The current USB userland utilities >>> and libusb from ports will only work with the old USB stack. I'm working >>> on a replacement for "usbdevs" called "usbconfig" which has some more >>> functionality and a FreeBSD specific libusb, which is compatible with >>> libusb from sourceforge. I have most of it finished in my private SVN >>> repository, and will add it to my P4 repository soon. >> This raises the question of why the kernel changes need to be committed >> now, and what benefit they bring in the absence of a compatible >> userland. Shouldn't the commit happen after both kernel and userland >> are ready (and reviewed)? > > This is a huge amount of code to haul around... again, we are not > getting rid of "oldusb", if you don't want to be bleeding edge > usb2, then you don't need it. It just strikes me as odd that one half of the code needs to be committed urgently when the other is not finished. I was of the belief that you and Hans considered the USB code to be "complete" and hence ready for integration, but it sounds like there are large parts still incomplete or in flux. Some explanation of why this is not the case would help to clarify things. >>>>> There is a question about whether to avoid the conditional locking in >>>>> dev/sound/pcm/channel.c in favour of recursive locking? >>> That is also possible. The type of the mutex in question can be changed. >>> The feedback I've gotten so far has been against the use of recursive >>> mutexes. Alternativly, expose two variants of the function in question: >>> >>> xxx_unlocked() >>> xxx_locked() >> It is correct that in general recursive locking is considered >> undesirable, but you should also not play games to work around the fact >> that your locking is in fact being called recursively, as in: >> >> - CHN_LOCK(c); >> + uint8_t do_unlock; >> + if (CHN_LOCK_OWNED(c)) { >> + /* >> + * Allow sound drivers to call this function with >> + * "CHN_LOCK()" locked: >> + */ >> + do_unlock = 0; >> + } else { >> + do_unlock = 1; >> + CHN_LOCK(c); >> + } > > Yes, but sometimes it's hard to do so. > > I think such things can be addressed. Do consider the amount of > progress here, and realize it's a giant step forward with a few > nits we can address with time. I am taking no position on the bits of code I didn't review, but I hope we can agree that technical questions about subsets of the patch that were reviewed are worth resolving. Usually such concerns are resolved as part of the process of preparation for a commit. >>>>> There seems to be a README.TXT but no manpages for the new API or >>>>> drivers. Are these pending? >>> The manpages are not ready. This is something I need to do. I would >>> appreciate some help here like where I find manpage templates and where I >>> should put these files. >> The doc@ folks can probably answer this question if you ask them. It's >> also worth recalling that people asked for this 3 months ago as part of >> the process of getting this code commit-ready. > > Can we consider leveraging the doc people and doing the docs post > commit? I think we can get something nice in short time. It sounds reasonable to me if you and Hans are going to work together on that with the doc guys. Presumably this process would not just involve someone from doc@ writing all the manpages though. >>>>> Why is the diff to compat/ndis/ntoskrnl_var.h necessary? >>>> It's needed for compiling usb2_ndis, but... >>> Without this patch the usb2_ndis module will not compile on certain >>> architectures. If you remove this patch you will need to decouple the >>> usb2_ndis module, which is not complete anyway, from the default build. >> Why will it not compile? This looks like a workaround for some other >> issue that should be solved directly. >> >> Anyway, if the module is not complete then it should probably not be >> imported until it is. > > Yes, but it breaks the module without it, so it's a chicken and egg > issue, having to haul around a patch that will eventually have to go > in anyhow doesn't make much sense. It is the "have to go in anyhow" that I am querying. If there is a real solution that avoids the need for this patch then that is obviously preferable. > At the end of this all, there are some small requests in here along > with some large requests, if you take the time to add up the time > needed to get all of this according to your request, it pushes back > the delivery of the essential kernel functionality by several weeks > if not months. Keep in mind that any delay at this point to address review concerns could have been handled 3 months ago when the commit candidate diff was first requested, and are usually handled as part of the standard development practises we use in FreeBSD (posting diffs for public comment with a pre-announced timetable, dealing with technical review, etc). If following those steps after not previously having done so means you now have to push back the timetable, that is unfortunate, but necessary. Kris From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:42:48 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D78D10656A1; Tue, 19 Aug 2008 20:42:48 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id 2563B8FC23; Tue, 19 Aug 2008 20:42:46 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Z-K7CIdMrfcA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=ZmIiC_jQAAAA:8 a=EefsVvPHetFHRtI6n0gA:9 a=o5k9PgyAjtNbs-7AC8AA:7 a=r_UeW9xqSvrJZZrrIShO6R6qptYA:4 a=SV7veod9ZcQA:10 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1023382153; Tue, 19 Aug 2008 22:42:45 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Tue, 19 Aug 2008 22:44:20 +0200 User-Agent: KMail/1.9.7 References: <20080819200911.224754500F@ptavv.es.net> In-Reply-To: <20080819200911.224754500F@ptavv.es.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808192244.24034.hselasky@c2i.net> Cc: usb@freebsd.org, current@freebsd.org, Kevin Oberman Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:42:48 -0000 On Tuesday 19 August 2008, Kevin Oberman wrote: > > Date: Tue, 19 Aug 2008 12:44:13 -0700 > > From: Alfred Perlstein > > Sender: owner-freebsd-current@freebsd.org > > > > After a long period of review and testing I am on the verge of > > committing Hans Peter's new usb stack to -current. > > > > The patchset requires a SMALL _493_ line diff to the main code, > > mostly bug fixes to arm. And then a large number of new files > > for the usb system. > > > > The new usb system will be committed as separate files with > > the intention of folding them over the old files before the > > 9.0 release. > > > > The diff to the main files is here: > > http://mu.org/~bright/usb2/usb2_release_001.diff > > > > The whole diff, including new files is here: > > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > > > FAQ: > > Q. Has this been reviewed? > > A. Yes, pretty strongly by myself and we've consulted with > > various others, Warner, Scott and Andrew for review/testing. > > I wouldn't say that Warner or Scott have given full review > > but just about all questions have been answered. > > > > Q. Can we change the name from "usb2_" to my favorite name? > > A. No. This is for a short period, stop being so annoying. > > > > Q. What about the old usb code? > > A. What about it? :D > > > > Q. What about ttys? > > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > > Hans is very responsive to SMP issues. > > > > Q. Shouldn't you wait? > > A. Wait for what? No. > > > > Q. I have some whitespace nits, can you do those? > > A. No. It's a 100k line diff and a 3meg delta, we tried really hard > > to get all whitespace right, but you're welcome to point things out after > > the commit. > > Cool! I've been waiting for this for a loooooong time. Thanks to you, > Hans Peter and all of the folks who have helped! > > Not on the FAQ: > > Q: Other then no longer requiring giant [MPSAFE], what does usb2 give > us? Does it fix the battery-eating on laptops? Does it allow the > system to reach C3 and lower sleep states? (These are at least > closely linked issues.) Hi, Regarding power save there is no news. But I have been thinking about it, and a simple patch like turning off the ASYNC and SYNC schedules when no devices are plugged is not impossible. Only that it hasn't been done yet, because there is already plenty of USB stuff to do. New stuff (all of which I can remember right now): - Full support for Split transactions, which means you can use your full speed USB audio on a high speed USB HUB. - Full support for HS ISOC transactions, which makes writing drivers for various HS webcams possible, for example - Full support for USB on embedded platforms, mostly cache flushing and buffer invalidating stuff. - Safer parsing of USB descriptors. - Autodetect of annoying USB install disks. - Support for USB device side (and a handful of USB device side chips) - Support for USB transfers like I/O vectors, means more throughput and less interrupts. - New UGEN backend and libusb library, finally solves the "driver unloading" problem. - A new USB API. - Many USB drivers are now running Giant free. - Linux USB kernel compat layer. - ... see the FreeBSD quarterly status reports --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:55:33 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42F721065671; Tue, 19 Aug 2008 20:55:33 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.freebsd.org (Postfix) with ESMTP id 175D68FC0A; Tue, 19 Aug 2008 20:55:31 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Z-K7CIdMrfcA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=8ZSDV9mLko-BYEmfmnoA:9 a=64Y5Jm8OSJOQbNVCX9UOKNJsWywA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe06.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1045895287; Tue, 19 Aug 2008 22:55:30 +0200 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Tue, 19 Aug 2008 22:57:11 +0200 User-Agent: KMail/1.9.7 References: <20080819194413.GB16977@elvis.mu.org> <48AB32D4.5040904@FreeBSD.org> In-Reply-To: <48AB32D4.5040904@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808192257.13576.hselasky@c2i.net> Cc: usb@freebsd.org, Maxim Sobolev , current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:55:33 -0000 On Tuesday 19 August 2008, Maxim Sobolev wrote: > Alfred Perlstein wrote: > > Q. Can we change the name from "usb2_" to my favorite name? > > A. No. This is for a short period, stop being so annoying. > > Why not just "usb_"? You can then leave it as is then avoiding violating > POLA second time. Otherwise people would confuse it with USB 2.0. > Else you get symbol collisions with the old USB stack ... --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 20:57:48 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 183171065685; Tue, 19 Aug 2008 20:57:48 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A2E7A8FC16; Tue, 19 Aug 2008 20:57:46 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48AB33C9.9010203@FreeBSD.org> Date: Tue, 19 Aug 2008 21:57:45 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Hans Petter Selasky References: <20080818205914.GJ16977@elvis.mu.org> <20080819200017.GC16977@elvis.mu.org> <48AB3023.2030307@FreeBSD.org> <200808192253.26152.hselasky@c2i.net> In-Reply-To: <200808192253.26152.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 20:57:48 -0000 Hans Petter Selasky wrote: > Hi, > > On Tuesday 19 August 2008, Kris Kennaway wrote: >> Keep in mind that any delay at this point to address review concerns >> could have been handled 3 months ago when the commit candidate diff was >> first requested, and are usually handled as part of the standard >> development practises we use in FreeBSD (posting diffs for public >> comment with a pre-announced timetable, dealing with technical review, >> etc). If following those steps after not previously having done so >> means you now have to push back the timetable, that is unfortunate, but >> necessary. > > To not draw away any attention from the old USB stack I have not made any > public postings to any FreeBSD lists about the new USB stack as an agreement > with some of the core FreeBSD developers during the last couple of months. OK, but this was surely not intended to block alfred from preparing to finalize and commit your work. Kris From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 21:04:23 2008 Return-Path: Delivered-To: usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9615B106566B for ; Tue, 19 Aug 2008 21:04:23 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 48AE88FC12 for ; Tue, 19 Aug 2008 21:04:23 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.0.9] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id m7JKreEs075872 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Aug 2008 13:53:41 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <48AB32D4.5040904@FreeBSD.org> Date: Tue, 19 Aug 2008 13:53:40 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Alfred Perlstein References: <20080819194413.GB16977@elvis.mu.org> In-Reply-To: <20080819194413.GB16977@elvis.mu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: usb@FreeBSD.org, current@FreeBSD.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 21:04:23 -0000 Alfred Perlstein wrote: > Q. Can we change the name from "usb2_" to my favorite name? > A. No. This is for a short period, stop being so annoying. Why not just "usb_"? You can then leave it as is then avoiding violating POLA second time. Otherwise people would confuse it with USB 2.0. -Maxim From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 21:04:24 2008 Return-Path: Delivered-To: usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23307106566C for ; Tue, 19 Aug 2008 21:04:24 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id C990B8FC20 for ; Tue, 19 Aug 2008 21:04:23 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.0.9] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id m7JKwn0d076130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Aug 2008 13:58:49 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <48AB3408.4030703@FreeBSD.org> Date: Tue, 19 Aug 2008 13:58:48 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Maxim Sobolev References: <20080819194413.GB16977@elvis.mu.org> <48AB32D4.5040904@FreeBSD.org> In-Reply-To: <48AB32D4.5040904@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: usb@FreeBSD.org, Alfred Perlstein , current@FreeBSD.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 21:04:24 -0000 Maxim Sobolev wrote: > Alfred Perlstein wrote: >> Q. Can we change the name from "usb2_" to my favorite name? >> A. No. This is for a short period, stop being so annoying. > > Why not just "usb_"? You can then leave it as is then avoiding violating > POLA second time. Otherwise people would confuse it with USB 2.0. P.S. I am talking about entries for kernel config here, not about names of directories and source files. -Maxim From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 21:27:17 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA4BB106566B; Tue, 19 Aug 2008 21:27:17 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (mail.bitblocks.com [64.142.15.60]) by mx1.freebsd.org (Postfix) with ESMTP id A1C178FC0A; Tue, 19 Aug 2008 21:27:17 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost.bitblocks.com [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 6CD685B4D; Tue, 19 Aug 2008 14:18:14 -0700 (PDT) To: Hans Petter Selasky In-reply-to: Your message of "Tue, 19 Aug 2008 22:44:20 +0200." <200808192244.24034.hselasky@c2i.net> Date: Tue, 19 Aug 2008 14:18:13 -0700 From: Bakul Shah Message-Id: <20080819211814.6CD685B4D@mail.bitblocks.com> Cc: usb@freebsd.org, current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 21:27:18 -0000 On Tue, 19 Aug 2008 22:44:20 +0200 Hans Petter Selasky wrote: > > New stuff (all of which I can remember right now): ... Accidentally unplugging a mounted USB disk (without unmounting it) resulted in a hang or a crash. Is this fixed? Thx! From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 21:35:31 2008 Return-Path: Delivered-To: usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97C591065671; Tue, 19 Aug 2008 21:35:31 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 61C6E8FC0A; Tue, 19 Aug 2008 21:35:31 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 7D2A746BC6; Tue, 19 Aug 2008 17:16:47 -0400 (EDT) Date: Tue, 19 Aug 2008 22:16:47 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Maxim Sobolev In-Reply-To: <48AB3408.4030703@FreeBSD.org> Message-ID: References: <20080819194413.GB16977@elvis.mu.org> <48AB32D4.5040904@FreeBSD.org> <48AB3408.4030703@FreeBSD.org> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: usb@FreeBSD.org, Alfred Perlstein , current@FreeBSD.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 21:35:31 -0000 On Tue, 19 Aug 2008, Maxim Sobolev wrote: > Maxim Sobolev wrote: >> Alfred Perlstein wrote: >>> Q. Can we change the name from "usb2_" to my favorite name? A. No. This >>> is for a short period, stop being so annoying. >> >> Why not just "usb_"? You can then leave it as is then avoiding violating >> POLA second time. Otherwise people would confuse it with USB 2.0. > > P.S. I am talking about entries for kernel config here, not about names of > directories and source files. With the move to Subversion, there's a significantly lower technical barrier to renaming files in the tree, especially if they exist only in HEAD. Let's assume that, when the time comes to remove the old USB implementation, we will do whatever renaming of directories, files, and symbols that may make sense. That is to say, let's leave the names as-is and focus on the semantics. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 21:37:17 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02E121065671 for ; Tue, 19 Aug 2008 21:37:17 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (bitblocks.com [64.142.15.60]) by mx1.freebsd.org (Postfix) with ESMTP id E376A8FC1B for ; Tue, 19 Aug 2008 21:37:16 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost.bitblocks.com [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 6CD685B4D; Tue, 19 Aug 2008 14:18:14 -0700 (PDT) To: Hans Petter Selasky In-reply-to: Your message of "Tue, 19 Aug 2008 22:44:20 +0200." <200808192244.24034.hselasky@c2i.net> Date: Tue, 19 Aug 2008 14:18:13 -0700 From: Bakul Shah Message-Id: <20080819211814.6CD685B4D@mail.bitblocks.com> Cc: usb@freebsd.org, current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 21:37:17 -0000 On Tue, 19 Aug 2008 22:44:20 +0200 Hans Petter Selasky wrote: > > New stuff (all of which I can remember right now): ... Accidentally unplugging a mounted USB disk (without unmounting it) resulted in a hang or a crash. Is this fixed? Thx! From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 21:38:05 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD13A1065673; Tue, 19 Aug 2008 21:38:04 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C69218FC15; Tue, 19 Aug 2008 21:38:03 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48AB3D3A.4040303@FreeBSD.org> Date: Tue, 19 Aug 2008 22:38:02 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Hans Petter Selasky References: <20080818205914.GJ16977@elvis.mu.org> <200808191758.22981.hselasky@c2i.net> <48AB233C.2010602@FreeBSD.org> <200808192219.19246.hselasky@c2i.net> In-Reply-To: <200808192219.19246.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 21:38:05 -0000 Hans Petter Selasky wrote: >> I am not sure what you mean by this statement, since it can be >> interpreted in several ways, some not so friendly. > > I mean I need to make another patchset. And that the current patchset will > break the kernel compilation if blindly committed after mpsafetty. OK, thanks for clarifying. >>>>> The patch only includes kernel parts, is there any impact on userland? >>> No. Userland will build like before. The current USB userland utilities >>> and libusb from ports will only work with the old USB stack. I'm working >>> on a replacement for "usbdevs" called "usbconfig" which has some more >>> functionality and a FreeBSD specific libusb, which is compatible with >>> libusb from sourceforge. I have most of it finished in my private SVN >>> repository, and will add it to my P4 repository soon. >> This raises the question of why the kernel changes need to be committed >> now, and what benefit they bring in the absence of a compatible >> userland. Shouldn't the commit happen after both kernel and userland >> are ready (and reviewed)? > > I think that is correct. OK, so does this mean we should expect to see a revised commit candidate patch from you and/or alfred later once that is finished? >> Another comment: the new code seems to bundle all new drivers into >> "subsystems" but not allow them to be loaded individually. This is >> quite contrary to how the rest of the kernel is structured, and seems to >> be of questionable benefit. For example, users will rarely have more >> than one USB ethernet driver in use on a given system but "device >> usb2_ethernet" will compile in all 7 drivers. > > It is still possible to separate the USB drivers. In my experience grouping > the drivers gives a more user-friendly experience. For example you have a USB > serial port adapter and plug it in. Then all you need to do is to kldload > usb2_serial regardless of adapter. It is like a container module. I don't > opponent that for kernel compilation you can have a more fine-grained control > what drivers are actually included. I will see about fixing that. You could look at what the sound code does, (I think it is specifically the snd_driver module). This implements auto-loading of the "right" drivers by loading them and then unloading the ones that don't attach. This still has overhead though, so users often will just compile in the ones they know they have. >> Also is it safe to drop and reacquire the lock here? > > You have to drop the lock, else I get witness warnings. Yes, and presumably rightly so. It doesn't mean that dropping the lock and later reacquiring it is safe though; it could introduce races. >> This seems to say that m->lock now may be NULL in situations where it >> was not before (since there is no handling for m->lock == NULL in >> existing parts of the code), so the Giant locking is new. > > That is just a safety measure, because the Sound code has some ifdef's to > enable it to run without mutexes, and in that case Giant must be used. OK, this seems unrelated to USB then and is something you should discuss with the sound maintainers. It sounds to me like the ability to "run without mutexes" is the real bug here, and "support" for that should be removed completely instead of patching it up downstream. >>>> It's needed for compiling usb2_ndis, but... >>> Without this patch the usb2_ndis module will not compile on certain >>> architectures. If you remove this patch you will need to decouple the >>> usb2_ndis module, which is not complete anyway, from the default build. >> Why will it not compile? This looks like a workaround for some other >> issue that should be solved directly. > > There are multiple issues: > > 1) If PAGE_SIZE is 16384 bytes, then the code simply fails. > 2) Sometimes PAGE_SHIFT is already defined. > > #if PAGE_SIZE == 4096 > #define PAGE_SHIFT 12 > #elif PAGE_SIZE == 8192 > #define PAGE_SHIFT 13 > #else > #error PAGE_SHIFT undefined! > #endif OK, but again, why? If some architecture is not defining the same symbols as the others then maybe that architecture should be fixed, instead of working around the effect downstream. Kris P.S. There were a number of questions you didn't answer, can I assume those will follow later? From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 21:42:49 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58AC81065677; Tue, 19 Aug 2008 21:42:49 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id 89C768FC14; Tue, 19 Aug 2008 21:42:48 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Z-K7CIdMrfcA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=ZmIiC_jQAAAA:8 a=EefsVvPHetFHRtI6n0gA:9 a=o5k9PgyAjtNbs-7AC8AA:7 a=r_UeW9xqSvrJZZrrIShO6R6qptYA:4 a=SV7veod9ZcQA:10 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1023382153; Tue, 19 Aug 2008 22:42:45 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Tue, 19 Aug 2008 22:44:20 +0200 User-Agent: KMail/1.9.7 References: <20080819200911.224754500F@ptavv.es.net> In-Reply-To: <20080819200911.224754500F@ptavv.es.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808192244.24034.hselasky@c2i.net> Cc: usb@freebsd.org, current@freebsd.org, Kevin Oberman Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 21:42:49 -0000 On Tuesday 19 August 2008, Kevin Oberman wrote: > > Date: Tue, 19 Aug 2008 12:44:13 -0700 > > From: Alfred Perlstein > > Sender: owner-freebsd-current@freebsd.org > > > > After a long period of review and testing I am on the verge of > > committing Hans Peter's new usb stack to -current. > > > > The patchset requires a SMALL _493_ line diff to the main code, > > mostly bug fixes to arm. And then a large number of new files > > for the usb system. > > > > The new usb system will be committed as separate files with > > the intention of folding them over the old files before the > > 9.0 release. > > > > The diff to the main files is here: > > http://mu.org/~bright/usb2/usb2_release_001.diff > > > > The whole diff, including new files is here: > > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > > > FAQ: > > Q. Has this been reviewed? > > A. Yes, pretty strongly by myself and we've consulted with > > various others, Warner, Scott and Andrew for review/testing. > > I wouldn't say that Warner or Scott have given full review > > but just about all questions have been answered. > > > > Q. Can we change the name from "usb2_" to my favorite name? > > A. No. This is for a short period, stop being so annoying. > > > > Q. What about the old usb code? > > A. What about it? :D > > > > Q. What about ttys? > > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > > Hans is very responsive to SMP issues. > > > > Q. Shouldn't you wait? > > A. Wait for what? No. > > > > Q. I have some whitespace nits, can you do those? > > A. No. It's a 100k line diff and a 3meg delta, we tried really hard > > to get all whitespace right, but you're welcome to point things out after > > the commit. > > Cool! I've been waiting for this for a loooooong time. Thanks to you, > Hans Peter and all of the folks who have helped! > > Not on the FAQ: > > Q: Other then no longer requiring giant [MPSAFE], what does usb2 give > us? Does it fix the battery-eating on laptops? Does it allow the > system to reach C3 and lower sleep states? (These are at least > closely linked issues.) Hi, Regarding power save there is no news. But I have been thinking about it, and a simple patch like turning off the ASYNC and SYNC schedules when no devices are plugged is not impossible. Only that it hasn't been done yet, because there is already plenty of USB stuff to do. New stuff (all of which I can remember right now): - Full support for Split transactions, which means you can use your full speed USB audio on a high speed USB HUB. - Full support for HS ISOC transactions, which makes writing drivers for various HS webcams possible, for example - Full support for USB on embedded platforms, mostly cache flushing and buffer invalidating stuff. - Safer parsing of USB descriptors. - Autodetect of annoying USB install disks. - Support for USB device side (and a handful of USB device side chips) - Support for USB transfers like I/O vectors, means more throughput and less interrupts. - New UGEN backend and libusb library, finally solves the "driver unloading" problem. - A new USB API. - Many USB drivers are now running Giant free. - Linux USB kernel compat layer. - ... see the FreeBSD quarterly status reports --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 21:51:47 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FF0B1065673 for ; Tue, 19 Aug 2008 21:51:47 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swip.net [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id 05F598FC20 for ; Tue, 19 Aug 2008 21:51:46 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=H3poPDSvFasA:10 a=fj6dw-CIB2gA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=GxPc1SQWMHlKOkJephUA:9 a=kivDu32Ki7hCD3vV2o8PZyZnGpIA:4 a=50e4U0PicR4A:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 656081274; Tue, 19 Aug 2008 22:51:43 +0200 From: Hans Petter Selasky To: Kris Kennaway Date: Tue, 19 Aug 2008 22:53:24 +0200 User-Agent: KMail/1.9.7 References: <20080818205914.GJ16977@elvis.mu.org> <20080819200017.GC16977@elvis.mu.org> <48AB3023.2030307@FreeBSD.org> In-Reply-To: <48AB3023.2030307@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808192253.26152.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 21:51:47 -0000 Hi, On Tuesday 19 August 2008, Kris Kennaway wrote: > > Keep in mind that any delay at this point to address review concerns > could have been handled 3 months ago when the commit candidate diff was > first requested, and are usually handled as part of the standard > development practises we use in FreeBSD (posting diffs for public > comment with a pre-announced timetable, dealing with technical review, > etc). If following those steps after not previously having done so > means you now have to push back the timetable, that is unfortunate, but > necessary. To not draw away any attention from the old USB stack I have not made any public postings to any FreeBSD lists about the new USB stack as an agreement with some of the core FreeBSD developers during the last couple of months. --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 21:59:19 2008 Return-Path: Delivered-To: usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B5D11065680; Tue, 19 Aug 2008 21:59:19 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 332658FC17; Tue, 19 Aug 2008 21:59:19 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.0.9] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id m7JLxHAK079095 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Aug 2008 14:59:17 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <48AB4234.80502@FreeBSD.org> Date: Tue, 19 Aug 2008 14:59:16 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Robert Watson References: <20080819194413.GB16977@elvis.mu.org> <48AB32D4.5040904@FreeBSD.org> <48AB3408.4030703@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: usb@FreeBSD.org, Alfred Perlstein , current@FreeBSD.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 21:59:19 -0000 Robert Watson wrote: > On Tue, 19 Aug 2008, Maxim Sobolev wrote: > >> Maxim Sobolev wrote: >>> Alfred Perlstein wrote: >>>> Q. Can we change the name from "usb2_" to my favorite name? A. No. >>>> This is for a short period, stop being so annoying. >>> >>> Why not just "usb_"? You can then leave it as is then avoiding >>> violating POLA second time. Otherwise people would confuse it with >>> USB 2.0. >> >> P.S. I am talking about entries for kernel config here, not about >> names of directories and source files. > > With the move to Subversion, there's a significantly lower technical > barrier to renaming files in the tree, especially if they exist only in > HEAD. Let's assume that, when the time comes to remove the old USB > implementation, we will do whatever renaming of directories, files, and > symbols that may make sense. That is to say, let's leave the names as-is > and focus on the semantics. See my other e-mail. I am talking about entries for kernel config here, not about names of directories and source files. -Maxim From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 22:05:30 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6671E1065672; Tue, 19 Aug 2008 22:05:30 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 087B68FC16; Tue, 19 Aug 2008 22:05:29 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7JM2LCv090765; Tue, 19 Aug 2008 16:02:21 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 19 Aug 2008 16:02:21 -0600 (MDT) Message-Id: <20080819.160221.41717240.imp@bsdimp.com> To: hselasky@c2i.net From: Warner Losh In-Reply-To: <200808192228.39015.hselasky@c2i.net> References: <48AB233C.2010602@FreeBSD.org> <20080819200017.GC16977@elvis.mu.org> <200808192228.39015.hselasky@c2i.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 22:05:30 -0000 From: Hans Petter Selasky Subject: Re: usb4bsd patch review [was Re: ...] Date: Tue, 19 Aug 2008 22:28:36 +0200 > > > > > > What do the newbus guys say about this? Adding a workaround in > > > underlying code for a problem caused by your own code is often a signal > > > that you're not going about it the right way. At the very least the > > > reason for the special case should be documented here. > > > > I need to think about this, Hans gave me a better argument on > > AIM earlier for it, I need to reload this in my head. > > > > > >int > > > >device_delete_all_children(device_t dev) > > > >{ > > > > device_t *devlist; > > > > int devcount; > > > > int error; > > > > > > > > error = device_get_children(dev, &devlist, &devcount); > > > > if (error == 0) { > > > > while (devcount-- > 0) { > > > > error = device_delete_child(dev, > > > > devlist[devcount]); > > > > if (error) { > > > > break; > > > > } > > > > } > > > > free(devlist, M_TEMP); > > > > } > > > > return (error); > > > >} > > > > > > In the existing kernel code, "device_get_children()" is used many places > without checking the error code. I have patches, but they are not part of the > patch-set. > > Also freeing a pointer to zero bytes is not logical. I'm not sure if this is > allowed in kernel space? > > ptr = malloc(0, ... ) > free(0); > > The device_get_children() could have returned an error if there are no > children, but again, the existing code does not check this return value. The existing code is fine when there's no children. The semantics of the kernel allocation routines are such that there's no problem. I don't think there's a bug here at all. The bug here is that the interface is impossible to lock, but that's another issue.... Having said that, I rather like the idea of having a device_delete_all_children. Warner From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 22:09:05 2008 Return-Path: Delivered-To: usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2F211065686; Tue, 19 Aug 2008 22:09:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 668B68FC16; Tue, 19 Aug 2008 22:09:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7JM4db2090782; Tue, 19 Aug 2008 16:04:39 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 19 Aug 2008 16:04:39 -0600 (MDT) Message-Id: <20080819.160439.71174078.imp@bsdimp.com> To: sobomax@FreeBSD.org From: Warner Losh In-Reply-To: <48AB3408.4030703@FreeBSD.org> References: <20080819194413.GB16977@elvis.mu.org> <48AB32D4.5040904@FreeBSD.org> <48AB3408.4030703@FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: usb@FreeBSD.org, alfred@FreeBSD.org, current@FreeBSD.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 22:09:05 -0000 > Maxim Sobolev wrote: > > Alfred Perlstein wrote: > >> Q. Can we change the name from "usb2_" to my favorite name? > >> A. No. This is for a short period, stop being so annoying. > > > > Why not just "usb_"? You can then leave it as is then avoiding violating > > POLA second time. Otherwise people would confuse it with USB 2.0. > > P.S. I am talking about entries for kernel config here, not about names > of directories and source files. In the fullness of time, this is a great idea. Now, given the other reviews that have been offered of the code, I don't think it is a good use of time to deal with changes of this order. We should note it and move on. Warner From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 22:09:10 2008 Return-Path: Delivered-To: usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2B1A1065691; Tue, 19 Aug 2008 22:09:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6A5688FC22; Tue, 19 Aug 2008 22:09:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7JM5Ai7090812; Tue, 19 Aug 2008 16:05:11 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 19 Aug 2008 16:05:10 -0600 (MDT) Message-Id: <20080819.160510.104119134.imp@bsdimp.com> To: bakul@bitblocks.com From: Warner Losh In-Reply-To: <20080819211814.6CD685B4D@mail.bitblocks.com> References: <200808192244.24034.hselasky@c2i.net> <20080819211814.6CD685B4D@mail.bitblocks.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: usb@FreeBSD.org, current@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 22:09:10 -0000 From: Bakul Shah Subject: Re: HEADSUP new usb code coming in. Date: Tue, 19 Aug 2008 14:18:13 -0700 > On Tue, 19 Aug 2008 22:44:20 +0200 Hans Petter Selasky wrote: > > > > New stuff (all of which I can remember right now): > ... > > Accidentally unplugging a mounted USB disk (without > unmounting it) resulted in a hang or a crash. Is this fixed? That's fixed in -current right now with the old stack. It isn't a usb issue at all, but a buffer cache issue. Warner From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 22:09:10 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2B1A1065691; Tue, 19 Aug 2008 22:09:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6A5688FC22; Tue, 19 Aug 2008 22:09:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7JM5Ai7090812; Tue, 19 Aug 2008 16:05:11 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 19 Aug 2008 16:05:10 -0600 (MDT) Message-Id: <20080819.160510.104119134.imp@bsdimp.com> To: bakul@bitblocks.com From: Warner Losh In-Reply-To: <20080819211814.6CD685B4D@mail.bitblocks.com> References: <200808192244.24034.hselasky@c2i.net> <20080819211814.6CD685B4D@mail.bitblocks.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: usb@FreeBSD.org, current@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 22:09:10 -0000 From: Bakul Shah Subject: Re: HEADSUP new usb code coming in. Date: Tue, 19 Aug 2008 14:18:13 -0700 > On Tue, 19 Aug 2008 22:44:20 +0200 Hans Petter Selasky wrote: > > > > New stuff (all of which I can remember right now): > ... > > Accidentally unplugging a mounted USB disk (without > unmounting it) resulted in a hang or a crash. Is this fixed? That's fixed in -current right now with the old stack. It isn't a usb issue at all, but a buffer cache issue. Warner From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 22:37:59 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8EE0106566B for ; Tue, 19 Aug 2008 22:37:59 +0000 (UTC) (envelope-from prvs=pschmehl_lists=110c216bf@tx.rr.com) Received: from ip-relay-001.utdallas.edu (ip-relay-001.utdallas.edu [129.110.20.111]) by mx1.freebsd.org (Postfix) with ESMTP id 8BA598FC28 for ; Tue, 19 Aug 2008 22:37:59 +0000 (UTC) (envelope-from prvs=pschmehl_lists=110c216bf@tx.rr.com) X-Group: RELAYLIST X-IronPort-AV: E=Sophos;i="4.31,320,1215406800"; d="scan'208";a="7022324" Received: from smtp3.utdallas.edu ([129.110.20.110]) by ip-relay-001.utdallas.edu with ESMTP; 19 Aug 2008 17:09:25 -0500 Received: from utd65257.utdallas.edu (utd65257.utdallas.edu [129.110.3.28]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp3.utdallas.edu (Postfix) with ESMTPSA id AE99A23DF2 for ; Tue, 19 Aug 2008 17:09:25 -0500 (CDT) Date: Tue, 19 Aug 2008 17:09:26 -0500 From: Paul Schmehl To: usb@freebsd.org Message-ID: <20F9B757C07EEBCC1BB1B762@utd65257.utdallas.edu> In-Reply-To: <20080819202757.GG16977@elvis.mu.org> References: <20080819194413.GB16977@elvis.mu.org> <48AB2A1C.4080808@moneybookers.com> <20080819202757.GG16977@elvis.mu.org> X-Mailer: Mulberry/4.0.6 (Linux/x86) X-Munged-Reply-To: Figure it out MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 22:37:59 -0000 So, if we're running 7.0 STABLE, will these changes show up with csup so we can rebuild kernel? Or are these diffs something you need to download and build separately? -- Paul Schmehl, Senior Infosec Analyst As if it wasn't already obvious, my opinions are my own and not those of my employer. ******************************************* Check the headers before clicking on Reply. From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 22:46:44 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E834106566C for ; Tue, 19 Aug 2008 22:46:44 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id AE2828FC1A for ; Tue, 19 Aug 2008 22:46:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7JMiNrl091571; Tue, 19 Aug 2008 16:44:24 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 19 Aug 2008 16:44:54 -0600 (MDT) Message-Id: <20080819.164454.282837106.imp@bsdimp.com> To: pschmehl_lists_nada@tx.rr.com, pschmehl_lists@tx.rr.com From: "M. Warner Losh" In-Reply-To: <20F9B757C07EEBCC1BB1B762@utd65257.utdallas.edu> References: <48AB2A1C.4080808@moneybookers.com> <20080819202757.GG16977@elvis.mu.org> <20F9B757C07EEBCC1BB1B762@utd65257.utdallas.edu> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 22:46:44 -0000 In message: <20F9B757C07EEBCC1BB1B762@utd65257.utdallas.edu> Paul Schmehl writes: : So, if we're running 7.0 STABLE, will these changes show up with : csup so we can rebuild kernel? Or are these diffs something you : need to download and build separately? This code won't be committed to RELENG_7... However I think hps has patches for it... Warner From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 23:12:09 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D7381065672; Tue, 19 Aug 2008 23:12:09 +0000 (UTC) (envelope-from oberman@es.net) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.freebsd.org (Postfix) with ESMTP id D4F4A8FC1B; Tue, 19 Aug 2008 23:12:08 +0000 (UTC) (envelope-from oberman@es.net) Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id ZFU96136; Tue, 19 Aug 2008 16:01:36 -0700 Received: from ptavv.es.net (ptavv.es.net [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id B5CAD4500F; Tue, 19 Aug 2008 16:01:36 -0700 (PDT) To: Hans Petter Selasky In-Reply-To: Your message of "Tue, 19 Aug 2008 22:44:20 +0200." <200808192244.24034.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1219186896_26888P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Tue, 19 Aug 2008 16:01:36 -0700 From: "Kevin Oberman" Message-Id: <20080819230136.B5CAD4500F@ptavv.es.net> X-Sender-IP: 198.128.4.29 X-Sender-Domain: es.net X-Recipent: ; ; ; ; ; X-Sender: X-To_Name: Hans Petter Selasky X-To_Domain: c2i.net X-To: Hans Petter Selasky X-To_Email: hselasky@c2i.net X-To_Alias: hselasky Cc: usb@freebsd.org, current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 23:12:09 -0000 --==_Exmh_1219186896_26888P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > From: Hans Petter Selasky > Date: Tue, 19 Aug 2008 22:44:20 +0200 > > On Tuesday 19 August 2008, Kevin Oberman wrote: > > > Date: Tue, 19 Aug 2008 12:44:13 -0700 > > > From: Alfred Perlstein > > > Sender: owner-freebsd-current@freebsd.org > > > > > > After a long period of review and testing I am on the verge of > > > committing Hans Peter's new usb stack to -current. > > > > > > The patchset requires a SMALL _493_ line diff to the main code, > > > mostly bug fixes to arm. And then a large number of new files > > > for the usb system. > > > > > > The new usb system will be committed as separate files with > > > the intention of folding them over the old files before the > > > 9.0 release. > > > > > > The diff to the main files is here: > > > http://mu.org/~bright/usb2/usb2_release_001.diff > > > > > > The whole diff, including new files is here: > > > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > > > > > FAQ: > > > Q. Has this been reviewed? > > > A. Yes, pretty strongly by myself and we've consulted with > > > various others, Warner, Scott and Andrew for review/testing. > > > I wouldn't say that Warner or Scott have given full review > > > but just about all questions have been answered. > > > > > > Q. Can we change the name from "usb2_" to my favorite name? > > > A. No. This is for a short period, stop being so annoying. > > > > > > Q. What about the old usb code? > > > A. What about it? :D > > > > > > Q. What about ttys? > > > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > > > Hans is very responsive to SMP issues. > > > > > > Q. Shouldn't you wait? > > > A. Wait for what? No. > > > > > > Q. I have some whitespace nits, can you do those? > > > A. No. It's a 100k line diff and a 3meg delta, we tried really hard > > > to get all whitespace right, but you're welcome to point things out after > > > the commit. > > > > Cool! I've been waiting for this for a loooooong time. Thanks to you, > > Hans Peter and all of the folks who have helped! > > > > Not on the FAQ: > > > > Q: Other then no longer requiring giant [MPSAFE], what does usb2 give > > us? Does it fix the battery-eating on laptops? Does it allow the > > system to reach C3 and lower sleep states? (These are at least > > closely linked issues.) > > Hi, > > Regarding power save there is no news. But I have been thinking about it, and > a simple patch like turning off the ASYNC and SYNC schedules when no devices > are plugged is not impossible. Only that it hasn't been done yet, because > there is already plenty of USB stuff to do. > > New stuff (all of which I can remember right now): > > - Full support for Split transactions, which means you can use your full > speed USB audio on a high speed USB HUB. > - Full support for HS ISOC transactions, which makes writing drivers for > various HS webcams possible, for example > - Full support for USB on embedded platforms, mostly cache flushing and > buffer invalidating stuff. > - Safer parsing of USB descriptors. > - Autodetect of annoying USB install disks. > - Support for USB device side (and a handful of USB device side chips) > - Support for USB transfers like I/O vectors, means more throughput and less > interrupts. > - New UGEN backend and libusb library, finally solves the "driver unloading" > problem. > - A new USB API. > - Many USB drivers are now running Giant free. > - Linux USB kernel compat layer. > - ... see the FreeBSD quarterly status reports > > --HPS > Very impressive. Yes, turning off polling when there are no connected devices would help with the battery drain in that regard, but I don't see how this would solve the problem of getting to C3 or lower when a USB device is connected. I know that Windows once had this problem early in the XP days and they fixed it in some way. I am not at all expert on USB, so I don't know at what frequency USB polls, but I would hope it's not so high that a system can't even get to C3, but with the current stack, C2 is the best you can get and C2 does not save a lot of power on most systems. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 --==_Exmh_1219186896_26888P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Exmh version 2.5 06/03/2002 iD8DBQFIq1DQkn3rs5h7N1ERAnnnAKCye7xsnZt3XEsoQIQGwgUlxyXoMgCgrysf NJ2GRfPMmeAd70Vs8ym5M5Q= =+CqL -----END PGP SIGNATURE----- --==_Exmh_1219186896_26888P-- From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 23:12:09 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D7381065672; Tue, 19 Aug 2008 23:12:09 +0000 (UTC) (envelope-from oberman@es.net) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.freebsd.org (Postfix) with ESMTP id D4F4A8FC1B; Tue, 19 Aug 2008 23:12:08 +0000 (UTC) (envelope-from oberman@es.net) Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id ZFU96136; Tue, 19 Aug 2008 16:01:36 -0700 Received: from ptavv.es.net (ptavv.es.net [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id B5CAD4500F; Tue, 19 Aug 2008 16:01:36 -0700 (PDT) To: Hans Petter Selasky In-Reply-To: Your message of "Tue, 19 Aug 2008 22:44:20 +0200." <200808192244.24034.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1219186896_26888P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Tue, 19 Aug 2008 16:01:36 -0700 From: "Kevin Oberman" Message-Id: <20080819230136.B5CAD4500F@ptavv.es.net> X-Sender-IP: 198.128.4.29 X-Sender-Domain: es.net X-Recipent: ; ; ; ; ; X-Sender: X-To_Name: Hans Petter Selasky X-To_Domain: c2i.net X-To: Hans Petter Selasky X-To_Email: hselasky@c2i.net X-To_Alias: hselasky Cc: usb@freebsd.org, current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 23:12:09 -0000 --==_Exmh_1219186896_26888P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > From: Hans Petter Selasky > Date: Tue, 19 Aug 2008 22:44:20 +0200 > > On Tuesday 19 August 2008, Kevin Oberman wrote: > > > Date: Tue, 19 Aug 2008 12:44:13 -0700 > > > From: Alfred Perlstein > > > Sender: owner-freebsd-current@freebsd.org > > > > > > After a long period of review and testing I am on the verge of > > > committing Hans Peter's new usb stack to -current. > > > > > > The patchset requires a SMALL _493_ line diff to the main code, > > > mostly bug fixes to arm. And then a large number of new files > > > for the usb system. > > > > > > The new usb system will be committed as separate files with > > > the intention of folding them over the old files before the > > > 9.0 release. > > > > > > The diff to the main files is here: > > > http://mu.org/~bright/usb2/usb2_release_001.diff > > > > > > The whole diff, including new files is here: > > > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > > > > > FAQ: > > > Q. Has this been reviewed? > > > A. Yes, pretty strongly by myself and we've consulted with > > > various others, Warner, Scott and Andrew for review/testing. > > > I wouldn't say that Warner or Scott have given full review > > > but just about all questions have been answered. > > > > > > Q. Can we change the name from "usb2_" to my favorite name? > > > A. No. This is for a short period, stop being so annoying. > > > > > > Q. What about the old usb code? > > > A. What about it? :D > > > > > > Q. What about ttys? > > > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > > > Hans is very responsive to SMP issues. > > > > > > Q. Shouldn't you wait? > > > A. Wait for what? No. > > > > > > Q. I have some whitespace nits, can you do those? > > > A. No. It's a 100k line diff and a 3meg delta, we tried really hard > > > to get all whitespace right, but you're welcome to point things out after > > > the commit. > > > > Cool! I've been waiting for this for a loooooong time. Thanks to you, > > Hans Peter and all of the folks who have helped! > > > > Not on the FAQ: > > > > Q: Other then no longer requiring giant [MPSAFE], what does usb2 give > > us? Does it fix the battery-eating on laptops? Does it allow the > > system to reach C3 and lower sleep states? (These are at least > > closely linked issues.) > > Hi, > > Regarding power save there is no news. But I have been thinking about it, and > a simple patch like turning off the ASYNC and SYNC schedules when no devices > are plugged is not impossible. Only that it hasn't been done yet, because > there is already plenty of USB stuff to do. > > New stuff (all of which I can remember right now): > > - Full support for Split transactions, which means you can use your full > speed USB audio on a high speed USB HUB. > - Full support for HS ISOC transactions, which makes writing drivers for > various HS webcams possible, for example > - Full support for USB on embedded platforms, mostly cache flushing and > buffer invalidating stuff. > - Safer parsing of USB descriptors. > - Autodetect of annoying USB install disks. > - Support for USB device side (and a handful of USB device side chips) > - Support for USB transfers like I/O vectors, means more throughput and less > interrupts. > - New UGEN backend and libusb library, finally solves the "driver unloading" > problem. > - A new USB API. > - Many USB drivers are now running Giant free. > - Linux USB kernel compat layer. > - ... see the FreeBSD quarterly status reports > > --HPS > Very impressive. Yes, turning off polling when there are no connected devices would help with the battery drain in that regard, but I don't see how this would solve the problem of getting to C3 or lower when a USB device is connected. I know that Windows once had this problem early in the XP days and they fixed it in some way. I am not at all expert on USB, so I don't know at what frequency USB polls, but I would hope it's not so high that a system can't even get to C3, but with the current stack, C2 is the best you can get and C2 does not save a lot of power on most systems. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 --==_Exmh_1219186896_26888P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Exmh version 2.5 06/03/2002 iD8DBQFIq1DQkn3rs5h7N1ERAnnnAKCye7xsnZt3XEsoQIQGwgUlxyXoMgCgrysf NJ2GRfPMmeAd70Vs8ym5M5Q= =+CqL -----END PGP SIGNATURE----- --==_Exmh_1219186896_26888P-- From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 23:38:01 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16B93106566B; Tue, 19 Aug 2008 23:38:01 +0000 (UTC) (envelope-from fbsd-current@mawer.org) Received: from outbound.icp-qv1-irony-out2.iinet.net.au (outbound.icp-qv1-irony-out2.iinet.net.au [203.59.1.107]) by mx1.freebsd.org (Postfix) with ESMTP id 1DFDD8FC08; Tue, 19 Aug 2008 23:37:59 +0000 (UTC) (envelope-from fbsd-current@mawer.org) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AikBAGnzqkjLzq3r/2dsb2JhbAAItliBWw X-IronPort-AV: E=Sophos;i="4.32,237,1217779200"; d="scan'208";a="356392335" Received: from unknown (HELO [10.24.1.1]) ([203.206.173.235]) by outbound.icp-qv1-irony-out2.iinet.net.au with ESMTP; 20 Aug 2008 07:27:48 +0800 Message-ID: <48AB566B.5010507@mawer.org> Date: Wed, 20 Aug 2008 09:25:31 +1000 From: Antony Mawer User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Warner Losh References: <200808192244.24034.hselasky@c2i.net> <20080819211814.6CD685B4D@mail.bitblocks.com> <20080819.160510.104119134.imp@bsdimp.com> In-Reply-To: <20080819.160510.104119134.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: usb@FreeBSD.org, current@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 23:38:01 -0000 Warner Losh wrote: > From: Bakul Shah > Subject: Re: HEADSUP new usb code coming in. > Date: Tue, 19 Aug 2008 14:18:13 -0700 > >> On Tue, 19 Aug 2008 22:44:20 +0200 Hans Petter Selasky wrote: >>> New stuff (all of which I can remember right now): >> ... >> >> Accidentally unplugging a mounted USB disk (without >> unmounting it) resulted in a hang or a crash. Is this fixed? > > That's fixed in -current right now with the old stack. It isn't a usb > issue at all, but a buffer cache issue. Is this change that is likely to be MFC'd in time for 7.1? And/or is there a specific patch that can manually be applied to -STABLE to fix this? --Antony From owner-freebsd-usb@FreeBSD.ORG Tue Aug 19 23:38:01 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16B93106566B; Tue, 19 Aug 2008 23:38:01 +0000 (UTC) (envelope-from fbsd-current@mawer.org) Received: from outbound.icp-qv1-irony-out2.iinet.net.au (outbound.icp-qv1-irony-out2.iinet.net.au [203.59.1.107]) by mx1.freebsd.org (Postfix) with ESMTP id 1DFDD8FC08; Tue, 19 Aug 2008 23:37:59 +0000 (UTC) (envelope-from fbsd-current@mawer.org) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AikBAGnzqkjLzq3r/2dsb2JhbAAItliBWw X-IronPort-AV: E=Sophos;i="4.32,237,1217779200"; d="scan'208";a="356392335" Received: from unknown (HELO [10.24.1.1]) ([203.206.173.235]) by outbound.icp-qv1-irony-out2.iinet.net.au with ESMTP; 20 Aug 2008 07:27:48 +0800 Message-ID: <48AB566B.5010507@mawer.org> Date: Wed, 20 Aug 2008 09:25:31 +1000 From: Antony Mawer User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Warner Losh References: <200808192244.24034.hselasky@c2i.net> <20080819211814.6CD685B4D@mail.bitblocks.com> <20080819.160510.104119134.imp@bsdimp.com> In-Reply-To: <20080819.160510.104119134.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: usb@FreeBSD.org, current@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 23:38:01 -0000 Warner Losh wrote: > From: Bakul Shah > Subject: Re: HEADSUP new usb code coming in. > Date: Tue, 19 Aug 2008 14:18:13 -0700 > >> On Tue, 19 Aug 2008 22:44:20 +0200 Hans Petter Selasky wrote: >>> New stuff (all of which I can remember right now): >> ... >> >> Accidentally unplugging a mounted USB disk (without >> unmounting it) resulted in a hang or a crash. Is this fixed? > > That's fixed in -current right now with the old stack. It isn't a usb > issue at all, but a buffer cache issue. Is this change that is likely to be MFC'd in time for 7.1? And/or is there a specific patch that can manually be applied to -STABLE to fix this? --Antony From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 00:04:38 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 109501065696; Wed, 20 Aug 2008 00:04:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C50608FC24; Wed, 20 Aug 2008 00:04:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7K04KBS093129; Tue, 19 Aug 2008 18:04:20 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 19 Aug 2008 18:04:50 -0600 (MDT) Message-Id: <20080819.180450.-867152686.imp@bsdimp.com> To: fbsd-current@mawer.org From: "M. Warner Losh" In-Reply-To: <48AB566B.5010507@mawer.org> References: <20080819211814.6CD685B4D@mail.bitblocks.com> <20080819.160510.104119134.imp@bsdimp.com> <48AB566B.5010507@mawer.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: usb@freebsd.org, current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 00:04:38 -0000 In message: <48AB566B.5010507@mawer.org> Antony Mawer writes: : Warner Losh wrote: : > From: Bakul Shah : > Subject: Re: HEADSUP new usb code coming in. : > Date: Tue, 19 Aug 2008 14:18:13 -0700 : > : >> On Tue, 19 Aug 2008 22:44:20 +0200 Hans Petter Selasky wrote: : >>> New stuff (all of which I can remember right now): : >> ... : >> : >> Accidentally unplugging a mounted USB disk (without : >> unmounting it) resulted in a hang or a crash. Is this fixed? : > : > That's fixed in -current right now with the old stack. It isn't a usb : > issue at all, but a buffer cache issue. : : Is this change that is likely to be MFC'd in time for 7.1? And/or is : there a specific patch that can manually be applied to -STABLE to fix this? I should spend the time to dig into the changes in current. There turned out to be several little changes... And I need to verify all the edge cases were covered... Warner From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 00:04:38 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 109501065696; Wed, 20 Aug 2008 00:04:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C50608FC24; Wed, 20 Aug 2008 00:04:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7K04KBS093129; Tue, 19 Aug 2008 18:04:20 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 19 Aug 2008 18:04:50 -0600 (MDT) Message-Id: <20080819.180450.-867152686.imp@bsdimp.com> To: fbsd-current@mawer.org From: "M. Warner Losh" In-Reply-To: <48AB566B.5010507@mawer.org> References: <20080819211814.6CD685B4D@mail.bitblocks.com> <20080819.160510.104119134.imp@bsdimp.com> <48AB566B.5010507@mawer.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: usb@freebsd.org, current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 00:04:38 -0000 In message: <48AB566B.5010507@mawer.org> Antony Mawer writes: : Warner Losh wrote: : > From: Bakul Shah : > Subject: Re: HEADSUP new usb code coming in. : > Date: Tue, 19 Aug 2008 14:18:13 -0700 : > : >> On Tue, 19 Aug 2008 22:44:20 +0200 Hans Petter Selasky wrote: : >>> New stuff (all of which I can remember right now): : >> ... : >> : >> Accidentally unplugging a mounted USB disk (without : >> unmounting it) resulted in a hang or a crash. Is this fixed? : > : > That's fixed in -current right now with the old stack. It isn't a usb : > issue at all, but a buffer cache issue. : : Is this change that is likely to be MFC'd in time for 7.1? And/or is : there a specific patch that can manually be applied to -STABLE to fix this? I should spend the time to dig into the changes in current. There turned out to be several little changes... And I need to verify all the edge cases were covered... Warner From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 06:08:42 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BA841065674; Wed, 20 Aug 2008 06:08:42 +0000 (UTC) (envelope-from fbsd-current@mawer.org) Received: from outbound.icp-qv1-irony-out1.iinet.net.au (outbound.icp-qv1-irony-out1.iinet.net.au [203.59.1.108]) by mx1.freebsd.org (Postfix) with ESMTP id 6A8E28FC18; Wed, 20 Aug 2008 06:08:41 +0000 (UTC) (envelope-from fbsd-current@mawer.org) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AikBAOxOq0jLzq3r/2dsb2JhbAAItU6BWw X-IronPort-AV: E=Sophos;i="4.32,238,1217779200"; d="scan'208";a="371944787" Received: from unknown (HELO [10.24.1.1]) ([203.206.173.235]) by outbound.icp-qv1-irony-out1.iinet.net.au with ESMTP; 20 Aug 2008 13:58:31 +0800 Message-ID: <48ABB1FA.5070609@mawer.org> Date: Wed, 20 Aug 2008 15:56:10 +1000 From: Antony Mawer User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: "M. Warner Losh" References: <20080819211814.6CD685B4D@mail.bitblocks.com> <20080819.160510.104119134.imp@bsdimp.com> <48AB566B.5010507@mawer.org> <20080819.180450.-867152686.imp@bsdimp.com> In-Reply-To: <20080819.180450.-867152686.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: usb@freebsd.org, current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 06:08:42 -0000 M. Warner Losh wrote: > In message: <48AB566B.5010507@mawer.org> > Antony Mawer writes: > : Warner Losh wrote: > : > From: Bakul Shah > : > Subject: Re: HEADSUP new usb code coming in. > : > Date: Tue, 19 Aug 2008 14:18:13 -0700 > : > > : >> On Tue, 19 Aug 2008 22:44:20 +0200 Hans Petter Selasky wrote: > : >>> New stuff (all of which I can remember right now): > : >> ... > : >> > : >> Accidentally unplugging a mounted USB disk (without > : >> unmounting it) resulted in a hang or a crash. Is this fixed? > : > > : > That's fixed in -current right now with the old stack. It isn't a usb > : > issue at all, but a buffer cache issue. > : > : Is this change that is likely to be MFC'd in time for 7.1? And/or is > : there a specific patch that can manually be applied to -STABLE to fix this? > > I should spend the time to dig into the changes in current. There > turned out to be several little changes... And I need to verify all > the edge cases were covered... I'd be happy to test patches if you do end up doing this.. it would be really nice to have in 7.1, or at least available as a patchset if it isn't suitable for MFC (eg. ABI changes)... --Antony From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 06:08:42 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BA841065674; Wed, 20 Aug 2008 06:08:42 +0000 (UTC) (envelope-from fbsd-current@mawer.org) Received: from outbound.icp-qv1-irony-out1.iinet.net.au (outbound.icp-qv1-irony-out1.iinet.net.au [203.59.1.108]) by mx1.freebsd.org (Postfix) with ESMTP id 6A8E28FC18; Wed, 20 Aug 2008 06:08:41 +0000 (UTC) (envelope-from fbsd-current@mawer.org) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AikBAOxOq0jLzq3r/2dsb2JhbAAItU6BWw X-IronPort-AV: E=Sophos;i="4.32,238,1217779200"; d="scan'208";a="371944787" Received: from unknown (HELO [10.24.1.1]) ([203.206.173.235]) by outbound.icp-qv1-irony-out1.iinet.net.au with ESMTP; 20 Aug 2008 13:58:31 +0800 Message-ID: <48ABB1FA.5070609@mawer.org> Date: Wed, 20 Aug 2008 15:56:10 +1000 From: Antony Mawer User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: "M. Warner Losh" References: <20080819211814.6CD685B4D@mail.bitblocks.com> <20080819.160510.104119134.imp@bsdimp.com> <48AB566B.5010507@mawer.org> <20080819.180450.-867152686.imp@bsdimp.com> In-Reply-To: <20080819.180450.-867152686.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: usb@freebsd.org, current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 06:08:42 -0000 M. Warner Losh wrote: > In message: <48AB566B.5010507@mawer.org> > Antony Mawer writes: > : Warner Losh wrote: > : > From: Bakul Shah > : > Subject: Re: HEADSUP new usb code coming in. > : > Date: Tue, 19 Aug 2008 14:18:13 -0700 > : > > : >> On Tue, 19 Aug 2008 22:44:20 +0200 Hans Petter Selasky wrote: > : >>> New stuff (all of which I can remember right now): > : >> ... > : >> > : >> Accidentally unplugging a mounted USB disk (without > : >> unmounting it) resulted in a hang or a crash. Is this fixed? > : > > : > That's fixed in -current right now with the old stack. It isn't a usb > : > issue at all, but a buffer cache issue. > : > : Is this change that is likely to be MFC'd in time for 7.1? And/or is > : there a specific patch that can manually be applied to -STABLE to fix this? > > I should spend the time to dig into the changes in current. There > turned out to be several little changes... And I need to verify all > the edge cases were covered... I'd be happy to test patches if you do end up doing this.. it would be really nice to have in 7.1, or at least available as a patchset if it isn't suitable for MFC (eg. ABI changes)... --Antony From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 12:11:27 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 262CE1065688 for ; Wed, 20 Aug 2008 12:11:27 +0000 (UTC) (envelope-from pb@ludd.ltu.se) Received: from mother.ludd.ltu.se (mother.ludd.ltu.se [130.240.16.3]) by mx1.freebsd.org (Postfix) with ESMTP id A3FF48FC20 for ; Wed, 20 Aug 2008 12:11:26 +0000 (UTC) (envelope-from pb@ludd.ltu.se) Received: from brother.ludd.ltu.se (root@brother.ludd.ltu.se [130.240.16.78]) by mother.ludd.ltu.se (8.13.6+Sun/8.12.10) with ESMTP id m7KCBOpx014883 for ; Wed, 20 Aug 2008 14:11:24 +0200 (MEST) Received: from brother.ludd.ltu.se (pb@localhost [127.0.0.1]) by brother.ludd.ltu.se (8.13.6+Sun/8.12.2) with ESMTP id m7KCBOxk010714 for ; Wed, 20 Aug 2008 14:11:24 +0200 (MEST) Received: (from pb@localhost) by brother.ludd.ltu.se (8.13.6+Sun/8.13.6/Submit) id m7KCBLhK010712 for freebsd-usb@freebsd.org; Wed, 20 Aug 2008 14:11:21 +0200 (MEST) From: Peter B Message-Id: <200808201211.m7KCBLhK010712@brother.ludd.ltu.se> To: freebsd-usb@freebsd.org Date: Wed, 20 Aug 2008 14:11:21 +0200 (MEST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: USB Video Class, port/driver. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 12:11:27 -0000 NetBSD is getting USB Video Class support with help of Google Summer of Code. http://netbsd-soc.sourceforge.net/projects/uvc/ http://netbsd-soc.cvs.sourceforge.net/netbsd-soc/uvc/ Should be even less complicated than an OpenBSD port. Especially considering that several NetBSD drivers has already been imported before (like uscanner). Last update as of 2008-08-18, Nearly Complete Status Update: UVC driver (uvideo) * Supports isoc cameras with frame-based formats (MJPEG and uncompressed) * Supports immediate (non-interrupt) controls * Uses mi video driver for external API Video driver (video) * Implements Video4Linux2 API. Only supports capture interface (video input), format settings, and camera controls (brightness, etc.). * Supports capture via read() or mmap() modes. * Successfully compiled and use MPlayer with the video driver (webpage includes patch). * Initial documentation of userland API in video(4) and kernel interface in video(9). * Has been used with a second webcam driver, Jared's pseye. TODO before end of GSoC * Test another V4L2 app such as VLC or xawtv. * Add more controls to uvideo (currently only has a few as proof-of-concept; adding the other controls is trivial). * Add uvideo(4) manpage. Maybe TODO depending on time * Implement bulk xfers in uvideo. I can't test this directly due to lack of hardware with bulk endpoints. UVC spec: http://www.usb.org/developers/devclass_docs/USB_Video_Class_1_1.zip From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 14:49:14 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CF4D1065704 for ; Wed, 20 Aug 2008 14:49:14 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mx1.freebsd.org (Postfix) with ESMTP id F00588FC25 for ; Wed, 20 Aug 2008 14:49:13 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so188967yxb.13 for ; Wed, 20 Aug 2008 07:49:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=g6f/NW2waYqtnkLLlrF5yOZhPCwB+8EwTn6TA8ym+lo=; b=C2lsBhnornHsqIqXZLPfWeijAv8d13JVhVansuhec8fHtoH0+eBfJhDImDFcLel5ZJ ahqrFIjo3mh8HIFYzR2x1npv8sHiJkazo6eFTMwPzmBk1/ptWYgRLAOxJLSmLgzGp57u xX0psmDw0gpshYQaBD0dJA5bIGN/lhi1gBxRg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; b=TyoD9jpBIfwvNPVrrO4mpIGIYaVUwM+82VlicXMNg1fAP7LQVOE12yc8EBQyYGb5sK nFZ/peMaTSklBSsUGMpY27M1mfBbiWb6vhzAtEOwWKHg8ViYJHdpWejOnds3GC01sY3y fCavL6hYP6bnQHQSm/mMxHP+a/CmdnExhbv3c= Received: by 10.103.203.4 with SMTP id f4mr119047muq.8.1219242000619; Wed, 20 Aug 2008 07:20:00 -0700 (PDT) Received: from ?0.0.0.0? ( [196.34.241.123]) by mx.google.com with ESMTPS id j10sm192351muh.1.2008.08.20.07.19.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 20 Aug 2008 07:19:59 -0700 (PDT) From: David Naylor Organization: Private To: Alfred Perlstein Date: Wed, 20 Aug 2008 16:19:19 +0200 User-Agent: KMail/1.9.7 References: <20080819194413.GB16977@elvis.mu.org> In-Reply-To: <20080819194413.GB16977@elvis.mu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1417307.G4x0lHzYpO"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200808201619.22720.naylor.b.david@gmail.com> Cc: usb@freebsd.org, current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 14:49:14 -0000 --nextPart1417307.G4x0lHzYpO Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 19 August 2008 21:44:13 Alfred Perlstein wrote: > After a long period of review and testing I am on the verge of > committing Hans Peter's new usb stack to -current. > > The patchset requires a SMALL _493_ line diff to the main code, > mostly bug fixes to arm. And then a large number of new files > for the usb system. > > The new usb system will be committed as separate files with > the intention of folding them over the old files before the > 9.0 release. > > The diff to the main files is here: > http://mu.org/~bright/usb2/usb2_release_001.diff > > The whole diff, including new files is here: > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > FAQ: > Q. Has this been reviewed? > A. Yes, pretty strongly by myself and we've consulted with > various others, Warner, Scott and Andrew for review/testing. > I wouldn't say that Warner or Scott have given full review > but just about all questions have been answered. > > Q. Can we change the name from "usb2_" to my favorite name? > A. No. This is for a short period, stop being so annoying. > > Q. What about the old usb code? > A. What about it? :D > > Q. What about ttys? > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > Hans is very responsive to SMP issues. > > Q. Shouldn't you wait? > A. Wait for what? No. > > Q. I have some whitespace nits, can you do those? > A. No. It's a 100k line diff and a 3meg delta, we tried really hard > to get all whitespace right, but you're welcome to point things out after > the commit. > > Thanks! This sounds great :-) I see that in the patch usb2 is not enabled in the kernel by default. Is=20 there a timeline for it to be enabled and/or could you provide an alternate= =20 kernel config with usb2 enabled (temporarily)? Lastly, is there a web-page where one can check up on the progress of the=20 integration of the new code (and the removal of the old code) [preferably a= n=20 up-to-date web-page].=20 Thanks for the great work Regards David --nextPart1417307.G4x0lHzYpO Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBIrCfqUaaFgP9pFrIRAgltAKCBQAXbbXT+Z4gx48kd8mWgFsfBqQCcDipW yjR45oIPj9slbocW/8Lex7E= =gWAc -----END PGP SIGNATURE----- --nextPart1417307.G4x0lHzYpO-- From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 15:33:17 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 351761065675 for ; Wed, 20 Aug 2008 15:33:17 +0000 (UTC) (envelope-from janusz.dziedzic@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171]) by mx1.freebsd.org (Postfix) with ESMTP id 01A878FC15 for ; Wed, 20 Aug 2008 15:33:16 +0000 (UTC) (envelope-from janusz.dziedzic@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so432171wfg.7 for ; Wed, 20 Aug 2008 08:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=iTrSZOvr/49L8jWwfWd5SlxrJxYkfej/7Cne+2dzYw8=; b=qVeufasGnKMNiERrShtm7nwsgpY8nQv0Ex7my4G3Yc3uk56RcU5/VySJ8l9zceZ7Ig +AcREeSs7OowysHYus8R2vlM0GYVe19D6PvRCnovYSJEAyTJZsl0cN3zcGsZiOrtd0Y7 3sWlMd5EnvtmlXpjEKXMVfO9EBSoHi96pD37s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=DFvBWhYUKpbb2YDTWmxHY5Zp58qhaeNJm2T87/SbgeqF5XVBStcBqSsMPs/75rgXUf prKtPKzeA0FUxp9XPq41MieSS7Z0vFkL6qT1IVkWCVWM7rTJtxWQKnrTNQPQZ/EqizbM MqSlG8pQtmWzlxi5iPSlWw/obZKTsXH1MUgYw= Received: by 10.142.186.9 with SMTP id j9mr54319wff.348.1219244745310; Wed, 20 Aug 2008 08:05:45 -0700 (PDT) Received: by 10.142.134.10 with HTTP; Wed, 20 Aug 2008 08:05:45 -0700 (PDT) Message-ID: <2266b73c0808200805j3a77dbcbgbabb2ac9e56df7d@mail.gmail.com> Date: Wed, 20 Aug 2008 17:05:45 +0200 From: "Janusz Dziedzic" To: "Hans Petter Selasky" In-Reply-To: <200808192244.24034.hselasky@c2i.net> MIME-Version: 1.0 References: <20080819200911.224754500F@ptavv.es.net> <200808192244.24034.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: usb@freebsd.org, current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 15:33:17 -0000 Nice job. Thanks Hans Peter :) -- Janusz Dziedzic From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 15:34:13 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A6E1106566C for ; Wed, 20 Aug 2008 15:34:13 +0000 (UTC) (envelope-from janusz.dziedzic@gmail.com) Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4C7B68FC20 for ; Wed, 20 Aug 2008 15:34:13 +0000 (UTC) (envelope-from janusz.dziedzic@gmail.com) Received: by el-out-1112.google.com with SMTP id v27so83320ele.13 for ; Wed, 20 Aug 2008 08:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=iTrSZOvr/49L8jWwfWd5SlxrJxYkfej/7Cne+2dzYw8=; b=qVeufasGnKMNiERrShtm7nwsgpY8nQv0Ex7my4G3Yc3uk56RcU5/VySJ8l9zceZ7Ig +AcREeSs7OowysHYus8R2vlM0GYVe19D6PvRCnovYSJEAyTJZsl0cN3zcGsZiOrtd0Y7 3sWlMd5EnvtmlXpjEKXMVfO9EBSoHi96pD37s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=DFvBWhYUKpbb2YDTWmxHY5Zp58qhaeNJm2T87/SbgeqF5XVBStcBqSsMPs/75rgXUf prKtPKzeA0FUxp9XPq41MieSS7Z0vFkL6qT1IVkWCVWM7rTJtxWQKnrTNQPQZ/EqizbM MqSlG8pQtmWzlxi5iPSlWw/obZKTsXH1MUgYw= Received: by 10.142.186.9 with SMTP id j9mr54319wff.348.1219244745310; Wed, 20 Aug 2008 08:05:45 -0700 (PDT) Received: by 10.142.134.10 with HTTP; Wed, 20 Aug 2008 08:05:45 -0700 (PDT) Message-ID: <2266b73c0808200805j3a77dbcbgbabb2ac9e56df7d@mail.gmail.com> Date: Wed, 20 Aug 2008 17:05:45 +0200 From: "Janusz Dziedzic" To: "Hans Petter Selasky" In-Reply-To: <200808192244.24034.hselasky@c2i.net> MIME-Version: 1.0 References: <20080819200911.224754500F@ptavv.es.net> <200808192244.24034.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: usb@freebsd.org, current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 15:34:13 -0000 Nice job. Thanks Hans Peter :) -- Janusz Dziedzic From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 15:48:11 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34F0D1065675; Wed, 20 Aug 2008 15:48:11 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 0489B8FC12; Wed, 20 Aug 2008 15:48:09 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Z-K7CIdMrfcA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=ZmIiC_jQAAAA:8 a=cg22DNGm0EXMjJ7ajg0A:9 a=IsgZ0CdjHdk2yjm2WjwA:7 a=8G8OKl_lQF0n8BLTan8PtZpJnjIA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1044948009; Wed, 20 Aug 2008 17:48:07 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 20 Aug 2008 17:49:50 +0200 User-Agent: KMail/1.9.7 References: <20080819194413.GB16977@elvis.mu.org> <200808201619.22720.naylor.b.david@gmail.com> In-Reply-To: <200808201619.22720.naylor.b.david@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808201749.51953.hselasky@c2i.net> Cc: usb@freebsd.org, David Naylor , current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 15:48:11 -0000 On Wednesday 20 August 2008, David Naylor wrote: > On Tuesday 19 August 2008 21:44:13 Alfred Perlstein wrote: > > After a long period of review and testing I am on the verge of > > committing Hans Peter's new usb stack to -current. > > > > The patchset requires a SMALL _493_ line diff to the main code, > > mostly bug fixes to arm. And then a large number of new files > > for the usb system. > > > > The new usb system will be committed as separate files with > > the intention of folding them over the old files before the > > 9.0 release. > > > > The diff to the main files is here: > > http://mu.org/~bright/usb2/usb2_release_001.diff > > > > The whole diff, including new files is here: > > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > > > FAQ: > > Q. Has this been reviewed? > > A. Yes, pretty strongly by myself and we've consulted with > > various others, Warner, Scott and Andrew for review/testing. > > I wouldn't say that Warner or Scott have given full review > > but just about all questions have been answered. > > > > Q. Can we change the name from "usb2_" to my favorite name? > > A. No. This is for a short period, stop being so annoying. > > > > Q. What about the old usb code? > > A. What about it? :D > > > > Q. What about ttys? > > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > > Hans is very responsive to SMP issues. > > > > Q. Shouldn't you wait? > > A. Wait for what? No. > > > > Q. I have some whitespace nits, can you do those? > > A. No. It's a 100k line diff and a 3meg delta, we tried really hard > > to get all whitespace right, but you're welcome to point things out after > > the commit. > > > > Thanks! > > This sounds great :-) > > I see that in the patch usb2 is not enabled in the kernel by default. Is > there a timeline for it to be enabled and/or could you provide an alternate > kernel config with usb2 enabled (temporarily)? For KB920X boards the USB2 is enabled by default. It is not much you need: +device usb2_core +device usb2_controller # EHCI/OHCI/UHCI/AT91DCI +device usb2_storage # USB mass storage support +device usb2_ethernet # USB ethernet support +device usb2_wlan # USB wireless LAN support +device usb2_serial # USB serial support +device usb2_quirk # USB quirks +device usb2_template # Device Side Mode USB templates +device usb2_image # USB Scanner support > > Lastly, is there a web-page where one can check up on the progress of the > integration of the new code (and the removal of the old code) [preferably > an up-to-date web-page]. No, there is no such webpage. --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 15:48:11 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34F0D1065675; Wed, 20 Aug 2008 15:48:11 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 0489B8FC12; Wed, 20 Aug 2008 15:48:09 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Z-K7CIdMrfcA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=ZmIiC_jQAAAA:8 a=cg22DNGm0EXMjJ7ajg0A:9 a=IsgZ0CdjHdk2yjm2WjwA:7 a=8G8OKl_lQF0n8BLTan8PtZpJnjIA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1044948009; Wed, 20 Aug 2008 17:48:07 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 20 Aug 2008 17:49:50 +0200 User-Agent: KMail/1.9.7 References: <20080819194413.GB16977@elvis.mu.org> <200808201619.22720.naylor.b.david@gmail.com> In-Reply-To: <200808201619.22720.naylor.b.david@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808201749.51953.hselasky@c2i.net> Cc: usb@freebsd.org, David Naylor , current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 15:48:11 -0000 On Wednesday 20 August 2008, David Naylor wrote: > On Tuesday 19 August 2008 21:44:13 Alfred Perlstein wrote: > > After a long period of review and testing I am on the verge of > > committing Hans Peter's new usb stack to -current. > > > > The patchset requires a SMALL _493_ line diff to the main code, > > mostly bug fixes to arm. And then a large number of new files > > for the usb system. > > > > The new usb system will be committed as separate files with > > the intention of folding them over the old files before the > > 9.0 release. > > > > The diff to the main files is here: > > http://mu.org/~bright/usb2/usb2_release_001.diff > > > > The whole diff, including new files is here: > > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > > > FAQ: > > Q. Has this been reviewed? > > A. Yes, pretty strongly by myself and we've consulted with > > various others, Warner, Scott and Andrew for review/testing. > > I wouldn't say that Warner or Scott have given full review > > but just about all questions have been answered. > > > > Q. Can we change the name from "usb2_" to my favorite name? > > A. No. This is for a short period, stop being so annoying. > > > > Q. What about the old usb code? > > A. What about it? :D > > > > Q. What about ttys? > > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > > Hans is very responsive to SMP issues. > > > > Q. Shouldn't you wait? > > A. Wait for what? No. > > > > Q. I have some whitespace nits, can you do those? > > A. No. It's a 100k line diff and a 3meg delta, we tried really hard > > to get all whitespace right, but you're welcome to point things out after > > the commit. > > > > Thanks! > > This sounds great :-) > > I see that in the patch usb2 is not enabled in the kernel by default. Is > there a timeline for it to be enabled and/or could you provide an alternate > kernel config with usb2 enabled (temporarily)? For KB920X boards the USB2 is enabled by default. It is not much you need: +device usb2_core +device usb2_controller # EHCI/OHCI/UHCI/AT91DCI +device usb2_storage # USB mass storage support +device usb2_ethernet # USB ethernet support +device usb2_wlan # USB wireless LAN support +device usb2_serial # USB serial support +device usb2_quirk # USB quirks +device usb2_template # Device Side Mode USB templates +device usb2_image # USB Scanner support > > Lastly, is there a web-page where one can check up on the progress of the > integration of the new code (and the removal of the old code) [preferably > an up-to-date web-page]. No, there is no such webpage. --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 16:07:42 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 498D51065672; Wed, 20 Aug 2008 16:07:42 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.swip.net [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id 78FDE8FC1A; Wed, 20 Aug 2008 16:07:40 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=H3poPDSvFasA:10 a=fj6dw-CIB2gA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=k7MpXmahIRxDmIvtiesA:9 a=GSmDXhpSTZAsr4AeHNwA:7 a=rJbHtURiJZAUo5E553eUbjVKRswA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 306102669; Wed, 20 Aug 2008 18:07:39 +0200 From: Hans Petter Selasky To: Kris Kennaway Date: Wed, 20 Aug 2008 18:09:23 +0200 User-Agent: KMail/1.9.7 References: <20080818205914.GJ16977@elvis.mu.org> <200808192219.19246.hselasky@c2i.net> <48AB3D3A.4040303@FreeBSD.org> In-Reply-To: <48AB3D3A.4040303@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808201809.24620.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 16:07:42 -0000 On Tuesday 19 August 2008, Kris Kennaway wrote: > Hans Petter Selasky wrote: > >> This raises the question of why the kernel changes need to be committed > >> now, and what benefit they bring in the absence of a compatible > >> userland. Shouldn't the commit happen after both kernel and userland > >> are ready (and reviewed)? > > > > I think that is correct. > > OK, so does this mean we should expect to see a revised commit candidate > patch from you and/or alfred later once that is finished? Alfred, I leave this up to you. > > You could look at what the sound code does, (I think it is specifically > the snd_driver module). This implements auto-loading of the "right" > drivers by loading them and then unloading the ones that don't attach. > This still has overhead though, so users often will just compile in the > ones they know they have. > > >> Also is it safe to drop and reacquire the lock here? > > > > You have to drop the lock, else I get witness warnings. > > Yes, and presumably rightly so. It doesn't mean that dropping the lock > and later reacquiring it is safe though; it could introduce races. Yes, I know. > > OK, this seems unrelated to USB then and is something you should discuss > with the sound maintainers. It sounds to me like the ability to "run > without mutexes" is the real bug here, and "support" for that should be > removed completely instead of patching it up downstream. Yes, and it would be nice if the sound maintainers would try out the new USB stack, and propose how they want to solve the problems that exist in the sound system. > > > > There are multiple issues: > > > > 1) If PAGE_SIZE is 16384 bytes, then the code simply fails. > > 2) Sometimes PAGE_SHIFT is already defined. > > > > #if PAGE_SIZE == 4096 > > #define PAGE_SHIFT 12 > > #elif PAGE_SIZE == 8192 > > #define PAGE_SHIFT 13 > > #else > > #error PAGE_SHIFT undefined! > > #endif > > OK, but again, why? If some architecture is not defining the same > symbols as the others then maybe that architecture should be fixed, > instead of working around the effect downstream. Yes, but then there will be even more patches, and I've been told to reduce the number of patches outside USB. > P.S. There were a number of questions you didn't answer, can I assume > those will follow later? Could you please repeat the questions you did not get an answer to? --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 16:08:39 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AC31106569D; Wed, 20 Aug 2008 16:08:39 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 8C4628FC17; Wed, 20 Aug 2008 16:08:38 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Z-K7CIdMrfcA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=W0GTfPMHHVoHWQiP8B4A:9 a=oE_fwWmgcGKyBd5EtChpTJbb0lAA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 944313543; Wed, 20 Aug 2008 18:08:36 +0200 From: Hans Petter Selasky To: Kostik Belousov Date: Wed, 20 Aug 2008 18:10:21 +0200 User-Agent: KMail/1.9.7 References: <20080819194413.GB16977@elvis.mu.org> <200808201749.51953.hselasky@c2i.net> <20080820155936.GE1803@deviant.kiev.zoral.com.ua> In-Reply-To: <20080820155936.GE1803@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808201810.22498.hselasky@c2i.net> Cc: usb@freebsd.org, David Naylor , current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 16:08:39 -0000 On Wednesday 20 August 2008, Kostik Belousov wrote: > On Wed, Aug 20, 2008 at 05:49:50PM +0200, Hans Petter Selasky wrote: > > On Wednesday 20 August 2008, David Naylor wrote: > > > I see that in the patch usb2 is not enabled in the kernel by default. > > > Is there a timeline for it to be enabled and/or could you provide an > > > alternate kernel config with usb2 enabled (temporarily)? > > > > For KB920X boards the USB2 is enabled by default. It is not much you > > need: > > > > +device usb2_core > > +device usb2_controller # EHCI/OHCI/UHCI/AT91DCI > > +device usb2_storage # USB mass storage support > > +device usb2_ethernet # USB ethernet support > > +device usb2_wlan # USB wireless LAN support > > +device usb2_serial # USB serial support > > +device usb2_quirk # USB quirks > > +device usb2_template # Device Side Mode USB templates > > +device usb2_image # USB Scanner support > > Are new usb components built as modules ? Yes, there are corresponding modules. kldload usb2_core kldload usb2_controller ... --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 16:08:39 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AC31106569D; Wed, 20 Aug 2008 16:08:39 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 8C4628FC17; Wed, 20 Aug 2008 16:08:38 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Z-K7CIdMrfcA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=W0GTfPMHHVoHWQiP8B4A:9 a=oE_fwWmgcGKyBd5EtChpTJbb0lAA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 944313543; Wed, 20 Aug 2008 18:08:36 +0200 From: Hans Petter Selasky To: Kostik Belousov Date: Wed, 20 Aug 2008 18:10:21 +0200 User-Agent: KMail/1.9.7 References: <20080819194413.GB16977@elvis.mu.org> <200808201749.51953.hselasky@c2i.net> <20080820155936.GE1803@deviant.kiev.zoral.com.ua> In-Reply-To: <20080820155936.GE1803@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808201810.22498.hselasky@c2i.net> Cc: usb@freebsd.org, David Naylor , current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 16:08:39 -0000 On Wednesday 20 August 2008, Kostik Belousov wrote: > On Wed, Aug 20, 2008 at 05:49:50PM +0200, Hans Petter Selasky wrote: > > On Wednesday 20 August 2008, David Naylor wrote: > > > I see that in the patch usb2 is not enabled in the kernel by default. > > > Is there a timeline for it to be enabled and/or could you provide an > > > alternate kernel config with usb2 enabled (temporarily)? > > > > For KB920X boards the USB2 is enabled by default. It is not much you > > need: > > > > +device usb2_core > > +device usb2_controller # EHCI/OHCI/UHCI/AT91DCI > > +device usb2_storage # USB mass storage support > > +device usb2_ethernet # USB ethernet support > > +device usb2_wlan # USB wireless LAN support > > +device usb2_serial # USB serial support > > +device usb2_quirk # USB quirks > > +device usb2_template # Device Side Mode USB templates > > +device usb2_image # USB Scanner support > > Are new usb components built as modules ? Yes, there are corresponding modules. kldload usb2_core kldload usb2_controller ... --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 16:17:48 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C014106567E for ; Wed, 20 Aug 2008 16:17:48 +0000 (UTC) (envelope-from mezz7@cox.net) Received: from eastrmmtai102.cox.net (eastrmmtai102.cox.net [68.230.240.21]) by mx1.freebsd.org (Postfix) with ESMTP id 9636A8FC20 for ; Wed, 20 Aug 2008 16:17:47 +0000 (UTC) (envelope-from mezz7@cox.net) Received: from eastrmimpo03.cox.net ([68.1.16.126]) by eastrmmtao103.cox.net (InterMail vM.7.08.02.01 201-2186-121-102-20070209) with ESMTP id <20080820160328.KKOI22820.eastrmmtao103.cox.net@eastrmimpo03.cox.net>; Wed, 20 Aug 2008 12:03:28 -0400 Received: from mezz.mezzweb.com ([24.255.149.218]) by eastrmimpo03.cox.net with bizsmtp id 4g3U1a00J4iy4EG02g3V1X; Wed, 20 Aug 2008 12:03:29 -0400 Date: Wed, 20 Aug 2008 11:03:36 -0500 To: "Hans Petter Selasky" From: "Jeremy Messenger" Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 References: <20080819194413.GB16977@elvis.mu.org> <48AB32D4.5040904@FreeBSD.org> <200808192257.13576.hselasky@c2i.net> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <200808192257.13576.hselasky@c2i.net> User-Agent: Opera Mail/9.51 (Linux) Cc: usb@freebsd.org, freebsd-current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 16:17:48 -0000 On Tue, 19 Aug 2008 15:57:11 -0500, Hans Petter Selasky wrote: > On Tuesday 19 August 2008, Maxim Sobolev wrote: >> Alfred Perlstein wrote: >> > Q. Can we change the name from "usb2_" to my favorite name? >> > A. No. This is for a short period, stop being so annoying. >> >> Why not just "usb_"? You can then leave it as is then avoiding violating >> POLA second time. Otherwise people would confuse it with USB 2.0. >> > > Else you get symbol collisions with the old USB stack ... At least, can you document it? Like add an explain about that usb2 is just a name, not USB 2.0, that way no users can mistake it for USB 2.0. Even smarter people can mistake it for USB 2.0, btw. Cheers, Mezz > --HPS -- mezz7@cox.net - mezz@FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 16:21:57 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86B841065679; Wed, 20 Aug 2008 16:21:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 262F88FC0A; Wed, 20 Aug 2008 16:21:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KVq63-00050d-A9; Wed, 20 Aug 2008 18:59:43 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m7KFxbp6041150 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Aug 2008 18:59:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m7KFxbeU032810; Wed, 20 Aug 2008 18:59:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m7KFxbAc032808; Wed, 20 Aug 2008 18:59:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 20 Aug 2008 18:59:36 +0300 From: Kostik Belousov To: Hans Petter Selasky Message-ID: <20080820155936.GE1803@deviant.kiev.zoral.com.ua> References: <20080819194413.GB16977@elvis.mu.org> <200808201619.22720.naylor.b.david@gmail.com> <200808201749.51953.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="chE8DYtGH5bd9Y2b" Content-Disposition: inline In-Reply-To: <200808201749.51953.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KVq63-00050d-A9 4ddef5bb066ee4c8549a5609280e57e8 X-Terabit: YES Cc: usb@freebsd.org, David Naylor , current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 16:21:57 -0000 --chE8DYtGH5bd9Y2b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 20, 2008 at 05:49:50PM +0200, Hans Petter Selasky wrote: > On Wednesday 20 August 2008, David Naylor wrote: > > I see that in the patch usb2 is not enabled in the kernel by default. = Is > > there a timeline for it to be enabled and/or could you provide an alter= nate > > kernel config with usb2 enabled (temporarily)? >=20 > For KB920X boards the USB2 is enabled by default. It is not much you need: >=20 > +device usb2_core > +device usb2_controller # EHCI/OHCI/UHCI/AT91DCI > +device usb2_storage # USB mass storage support > +device usb2_ethernet # USB ethernet support > +device usb2_wlan # USB wireless LAN support > +device usb2_serial # USB serial support > +device usb2_quirk # USB quirks > +device usb2_template # Device Side Mode USB templates > +device usb2_image # USB Scanner support Are new usb components built as modules ? --chE8DYtGH5bd9Y2b Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkisP2gACgkQC3+MBN1Mb4g/6wCgy6Y6WifsTzxx1LbwIdcXEg4K 1VQAoJvtpNW22GqCzgjFPsbEiASjs0cH =TPvF -----END PGP SIGNATURE----- --chE8DYtGH5bd9Y2b-- From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 16:21:57 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86B841065679; Wed, 20 Aug 2008 16:21:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 262F88FC0A; Wed, 20 Aug 2008 16:21:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KVq63-00050d-A9; Wed, 20 Aug 2008 18:59:43 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m7KFxbp6041150 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Aug 2008 18:59:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m7KFxbeU032810; Wed, 20 Aug 2008 18:59:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m7KFxbAc032808; Wed, 20 Aug 2008 18:59:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 20 Aug 2008 18:59:36 +0300 From: Kostik Belousov To: Hans Petter Selasky Message-ID: <20080820155936.GE1803@deviant.kiev.zoral.com.ua> References: <20080819194413.GB16977@elvis.mu.org> <200808201619.22720.naylor.b.david@gmail.com> <200808201749.51953.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="chE8DYtGH5bd9Y2b" Content-Disposition: inline In-Reply-To: <200808201749.51953.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KVq63-00050d-A9 4ddef5bb066ee4c8549a5609280e57e8 X-Terabit: YES Cc: usb@freebsd.org, David Naylor , current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 16:21:57 -0000 --chE8DYtGH5bd9Y2b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 20, 2008 at 05:49:50PM +0200, Hans Petter Selasky wrote: > On Wednesday 20 August 2008, David Naylor wrote: > > I see that in the patch usb2 is not enabled in the kernel by default. = Is > > there a timeline for it to be enabled and/or could you provide an alter= nate > > kernel config with usb2 enabled (temporarily)? >=20 > For KB920X boards the USB2 is enabled by default. It is not much you need: >=20 > +device usb2_core > +device usb2_controller # EHCI/OHCI/UHCI/AT91DCI > +device usb2_storage # USB mass storage support > +device usb2_ethernet # USB ethernet support > +device usb2_wlan # USB wireless LAN support > +device usb2_serial # USB serial support > +device usb2_quirk # USB quirks > +device usb2_template # Device Side Mode USB templates > +device usb2_image # USB Scanner support Are new usb components built as modules ? --chE8DYtGH5bd9Y2b Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkisP2gACgkQC3+MBN1Mb4g/6wCgy6Y6WifsTzxx1LbwIdcXEg4K 1VQAoJvtpNW22GqCzgjFPsbEiASjs0cH =TPvF -----END PGP SIGNATURE----- --chE8DYtGH5bd9Y2b-- From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 16:32:23 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4E1B106566B for ; Wed, 20 Aug 2008 16:32:23 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from fallbackmx06.syd.optusnet.com.au (fallbackmx06.syd.optusnet.com.au [211.29.132.8]) by mx1.freebsd.org (Postfix) with ESMTP id 305D18FC1B for ; Wed, 20 Aug 2008 16:32:22 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail14.syd.optusnet.com.au (mail14.syd.optusnet.com.au [211.29.132.195]) by fallbackmx06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m7K7gDGP003973 for ; Wed, 20 Aug 2008 17:42:13 +1000 Received: from server.vk2pj.dyndns.org (c122-106-215-175.belrs3.nsw.optusnet.com.au [122.106.215.175]) by mail14.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m7K7g6Go032759 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Aug 2008 17:42:06 +1000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.2) with ESMTP id m7K7g6To062704; Wed, 20 Aug 2008 17:42:06 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m7K7g53w062703; Wed, 20 Aug 2008 17:42:05 +1000 (EST) (envelope-from peter) Date: Wed, 20 Aug 2008 17:42:05 +1000 From: Peter Jeremy To: Hans Petter Selasky Message-ID: <20080820074205.GC32539@server.vk2pj.dyndns.org> References: <20080818205914.GJ16977@elvis.mu.org> <200808191758.22981.hselasky@c2i.net> <48AB233C.2010602@FreeBSD.org> <200808192219.19246.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gDGSpKKIBgtShtf+" Content-Disposition: inline In-Reply-To: <200808192219.19246.hselasky@c2i.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 16:32:23 -0000 --gDGSpKKIBgtShtf+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2008-Aug-19 22:19:14 +0200, Hans Petter Selasky wrote: >On Tuesday 19 August 2008, Kris Kennaway wrote: >> Hans Petter Selasky wrote: >> > On Tuesday 19 August 2008, Alfred Perlstein wrote: >> >> need to wait for smp tty code. >> > >> > If this requires changes in the USB serial port drivers there will be >> > trouble. >> >> I am not sure what you mean by this statement, since it can be >> interpreted in several ways, some not so friendly. > >I mean I need to make another patchset. And that the current patchset will= =20 >break the kernel compilation if blindly committed after mpsafetty. I am concerned that the current plans appear to have both mpsafetty and usb4bsd committed at virtually the same time. With the best will in the world, it's still likely that one or both imports will have some rough edges. IMHO, there should be a reasonable period between major kernel subsystem upheavals to allow things to stabilise. Having both a new USB stack and a new TTY subsystem would appear to make it unnecessarily difficult to identify the cause of USB serial port issues. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --gDGSpKKIBgtShtf+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkirys0ACgkQ/opHv/APuIfMCACdH3VJIjAEt1E2TPVdvZA+uz0r se8An2FPXWLmd525j2138tnGfU/b2kAR =tolJ -----END PGP SIGNATURE----- --gDGSpKKIBgtShtf+-- From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 16:43:41 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FCA61065688 for ; Wed, 20 Aug 2008 16:43:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id D3ACB8FC15 for ; Wed, 20 Aug 2008 16:43:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7KGfMbm019343; Wed, 20 Aug 2008 10:41:22 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 20 Aug 2008 10:41:22 -0600 (MDT) Message-Id: <20080820.104122.41652728.imp@bsdimp.com> To: peterjeremy@optushome.com.au From: Warner Losh In-Reply-To: <20080820074205.GC32539@server.vk2pj.dyndns.org> References: <48AB233C.2010602@FreeBSD.org> <200808192219.19246.hselasky@c2i.net> <20080820074205.GC32539@server.vk2pj.dyndns.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 16:43:41 -0000 > On 2008-Aug-19 22:19:14 +0200, Hans Petter Selasky wrote: > >On Tuesday 19 August 2008, Kris Kennaway wrote: > >> Hans Petter Selasky wrote: > >> > On Tuesday 19 August 2008, Alfred Perlstein wrote: > >> >> need to wait for smp tty code. > >> > > >> > If this requires changes in the USB serial port drivers there will be > >> > trouble. > >> > >> I am not sure what you mean by this statement, since it can be > >> interpreted in several ways, some not so friendly. > > > >I mean I need to make another patchset. And that the current patchset will > >break the kernel compilation if blindly committed after mpsafetty. > > I am concerned that the current plans appear to have both mpsafetty > and usb4bsd committed at virtually the same time. With the best will > in the world, it's still likely that one or both imports will have > some rough edges. IMHO, there should be a reasonable period between > major kernel subsystem upheavals to allow things to stabilise. Having > both a new USB stack and a new TTY subsystem would appear to make it > unnecessarily difficult to identify the cause of USB serial port > issues. The new tty layer is in place now. The new usb code likely is going to have lots of issues, and the new tty code isn't likely going to be any worse at obscuring them than other changes to the system that have happened during the new usb code's development. Warner From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 17:30:34 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C27271065681; Wed, 20 Aug 2008 17:30:34 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 037378FC37; Wed, 20 Aug 2008 17:30:33 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48AC54B8.4040406@FreeBSD.org> Date: Wed, 20 Aug 2008 19:30:32 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Hans Petter Selasky References: <20080818205914.GJ16977@elvis.mu.org> <200808192219.19246.hselasky@c2i.net> <48AB3D3A.4040303@FreeBSD.org> <200808201809.24620.hselasky@c2i.net> In-Reply-To: <200808201809.24620.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 17:30:34 -0000 Hans Petter Selasky wrote: > On Tuesday 19 August 2008, Kris Kennaway wrote: >> Hans Petter Selasky wrote: > >>>> This raises the question of why the kernel changes need to be committed >>>> now, and what benefit they bring in the absence of a compatible >>>> userland. Shouldn't the commit happen after both kernel and userland >>>> are ready (and reviewed)? >>> I think that is correct. >> OK, so does this mean we should expect to see a revised commit candidate >> patch from you and/or alfred later once that is finished? > > Alfred, I leave this up to you. > >> You could look at what the sound code does, (I think it is specifically >> the snd_driver module). This implements auto-loading of the "right" >> drivers by loading them and then unloading the ones that don't attach. >> This still has overhead though, so users often will just compile in the >> ones they know they have. >> >>>> Also is it safe to drop and reacquire the lock here? >>> You have to drop the lock, else I get witness warnings. >> Yes, and presumably rightly so. It doesn't mean that dropping the lock >> and later reacquiring it is safe though; it could introduce races. > > Yes, I know. ...so what is the answer? >> OK, this seems unrelated to USB then and is something you should discuss >> with the sound maintainers. It sounds to me like the ability to "run >> without mutexes" is the real bug here, and "support" for that should be >> removed completely instead of patching it up downstream. > > Yes, and it would be nice if the sound maintainers would try out the new USB > stack, and propose how they want to solve the problems that exist in the > sound system. This is backwards. If you perceive problems in other subsystems you should take the lead on engaging with the relevant developers and resolving those problems to your mutual satisfaction, instead of inviting them to come to you. >>> There are multiple issues: >>> >>> 1) If PAGE_SIZE is 16384 bytes, then the code simply fails. >>> 2) Sometimes PAGE_SHIFT is already defined. >>> >>> #if PAGE_SIZE == 4096 >>> #define PAGE_SHIFT 12 >>> #elif PAGE_SIZE == 8192 >>> #define PAGE_SHIFT 13 >>> #else >>> #error PAGE_SHIFT undefined! >>> #endif >> OK, but again, why? If some architecture is not defining the same >> symbols as the others then maybe that architecture should be fixed, >> instead of working around the effect downstream. > > Yes, but then there will be even more patches, and I've been told to reduce > the number of patches outside USB. The way you minimize patches outside of USB is by submitting separate patches that fix upstream issues at their source, instead of adding workarounds like several of those that appeared in this diff. >> P.S. There were a number of questions you didn't answer, can I assume >> those will follow later? > > Could you please repeat the questions you did not get an answer to? I've repeated some of them already. e.g. in this mail you still didn't answer the "is it safe to drop the locks" question which was asked twice. Rather than me repeating them yet again, I'd suggest you go back and take another close read over my emails and your responses, and reply to the questions that are still not resolved. Thanks, Kris From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 20:06:38 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D94A31065671 for ; Wed, 20 Aug 2008 20:06:38 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id A0F9E8FC24 for ; Wed, 20 Aug 2008 20:06:38 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id 3948F6D453; Wed, 20 Aug 2008 21:48:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I1jIac6YWSkA; Wed, 20 Aug 2008 21:48:07 +0200 (CEST) Received: by mx1.rink.nu (Postfix, from userid 1000) id 73D856D450; Wed, 20 Aug 2008 21:48:07 +0200 (CEST) Date: Wed, 20 Aug 2008 21:48:07 +0200 From: Rink Springer To: Alfred Perlstein Message-ID: <20080820194807.GE33396@rink.nu> References: <20080819194413.GB16977@elvis.mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080819194413.GB16977@elvis.mu.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 20:06:38 -0000 Hi Alfred, On Tue, Aug 19, 2008 at 12:44:13PM -0700, Alfred Perlstein wrote: > http://mu.org/~bright/usb2/usb4bsd.diff.gz Whenever I try this patch, my build dies with: cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I../../.. -I../../../contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -Werror ../../../dev/usb2/core/usb2_generic.c cc1: warnings being treated as errors ../../../dev/usb2/core/usb2_generic.c: In function 'ugen_ioctl': ../../../dev/usb2/core/usb2_generic.c:1409: warning: 'ep_index' may be used uninitialized in this function ../../../dev/usb2/core/usb2_generic.c:1409: note: 'ep_index' was declared here *** Error code 1 I'm using a small patch to get it to compile: - uint8_t ep_index; + uint8_t ep_index = 0; However, I am unsure if this is correct. Futhermore, 'device usb2_bluetooth' gives a lot of compile errors. Am I using the right patch here? Regards, -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 20:14:42 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 890731065671; Wed, 20 Aug 2008 20:14:42 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id 5F2918FC1C; Wed, 20 Aug 2008 20:14:41 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Z-K7CIdMrfcA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=ZmIiC_jQAAAA:8 a=8KjBBD_sWHmvH5y-Dw0A:9 a=WxFkC44wLPp91otqOY324vnvNeIA:4 a=50e4U0PicR4A:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1051403161; Wed, 20 Aug 2008 22:14:39 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 20 Aug 2008 22:16:18 +0200 User-Agent: KMail/1.9.7 References: <20080819194413.GB16977@elvis.mu.org> <20080820194807.GE33396@rink.nu> In-Reply-To: <20080820194807.GE33396@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808202216.21060.hselasky@c2i.net> Cc: usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 20:14:42 -0000 Hi, On Wednesday 20 August 2008, Rink Springer wrote: > Hi Alfred, > > On Tue, Aug 19, 2008 at 12:44:13PM -0700, Alfred Perlstein wrote: > > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > Whenever I try this patch, my build dies with: > > cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes > -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign > -fformat-extensions -nostdinc -I. -I../../.. -I../../../contrib/altq > -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common > -finline-limit=8000 --param inline-unit-growth=100 --param > large-function-growth=1000 -mno-align-long-strings > -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 > -mno-sse3 -ffreestanding -fstack-protector -Werror > ../../../dev/usb2/core/usb2_generic.c > cc1: warnings being treated as errors > ../../../dev/usb2/core/usb2_generic.c: In function 'ugen_ioctl': > ../../../dev/usb2/core/usb2_generic.c:1409: warning: 'ep_index' may be > used uninitialized in this function > ../../../dev/usb2/core/usb2_generic.c:1409: note: 'ep_index' was > declared here > *** Error code 1 > > I'm using a small patch to get it to compile: > > - uint8_t ep_index; > + uint8_t ep_index = 0; > > However, I am unsure if this is correct. Your patch is Ok. "ep_index" is not used uninitialized. Try adding the patch in "ugen_fs_get_complete()" instead: 1002 static uint8_t 1003 ugen_fs_get_complete(struct usb2_fifo *f, uint8_t *pindex) 1004 { 1005 struct usb2_mbuf *m; 1006 1007 USB_IF_DEQUEUE(&f->used_q, m); 1008 1009 if (m) { 1010 *pindex = *((uint8_t *)(m->cur_data_ptr)); 1011 1012 USB_IF_ENQUEUE(&f->free_q, m); 1013 1014 return (0); /* success */ 1015 } else { 1016 f->flag_iscomplete = 0; --here-- >> *pindex = 0; /* fix compiler warning */ 1017 } 1018 return (1); /* failure */ 1019 } > > Futhermore, 'device usb2_bluetooth' gives a lot of compile errors. Am I > using the right patch here? usb2_bluetooth depends on Netgraph which needs some extra options in the kernel config. You maybe want to build the module instead. --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 20:14:42 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 890731065671; Wed, 20 Aug 2008 20:14:42 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id 5F2918FC1C; Wed, 20 Aug 2008 20:14:41 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Z-K7CIdMrfcA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=ZmIiC_jQAAAA:8 a=8KjBBD_sWHmvH5y-Dw0A:9 a=WxFkC44wLPp91otqOY324vnvNeIA:4 a=50e4U0PicR4A:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1051403161; Wed, 20 Aug 2008 22:14:39 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 20 Aug 2008 22:16:18 +0200 User-Agent: KMail/1.9.7 References: <20080819194413.GB16977@elvis.mu.org> <20080820194807.GE33396@rink.nu> In-Reply-To: <20080820194807.GE33396@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808202216.21060.hselasky@c2i.net> Cc: usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 20:14:42 -0000 Hi, On Wednesday 20 August 2008, Rink Springer wrote: > Hi Alfred, > > On Tue, Aug 19, 2008 at 12:44:13PM -0700, Alfred Perlstein wrote: > > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > Whenever I try this patch, my build dies with: > > cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes > -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign > -fformat-extensions -nostdinc -I. -I../../.. -I../../../contrib/altq > -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common > -finline-limit=8000 --param inline-unit-growth=100 --param > large-function-growth=1000 -mno-align-long-strings > -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 > -mno-sse3 -ffreestanding -fstack-protector -Werror > ../../../dev/usb2/core/usb2_generic.c > cc1: warnings being treated as errors > ../../../dev/usb2/core/usb2_generic.c: In function 'ugen_ioctl': > ../../../dev/usb2/core/usb2_generic.c:1409: warning: 'ep_index' may be > used uninitialized in this function > ../../../dev/usb2/core/usb2_generic.c:1409: note: 'ep_index' was > declared here > *** Error code 1 > > I'm using a small patch to get it to compile: > > - uint8_t ep_index; > + uint8_t ep_index = 0; > > However, I am unsure if this is correct. Your patch is Ok. "ep_index" is not used uninitialized. Try adding the patch in "ugen_fs_get_complete()" instead: 1002 static uint8_t 1003 ugen_fs_get_complete(struct usb2_fifo *f, uint8_t *pindex) 1004 { 1005 struct usb2_mbuf *m; 1006 1007 USB_IF_DEQUEUE(&f->used_q, m); 1008 1009 if (m) { 1010 *pindex = *((uint8_t *)(m->cur_data_ptr)); 1011 1012 USB_IF_ENQUEUE(&f->free_q, m); 1013 1014 return (0); /* success */ 1015 } else { 1016 f->flag_iscomplete = 0; --here-- >> *pindex = 0; /* fix compiler warning */ 1017 } 1018 return (1); /* failure */ 1019 } > > Futhermore, 'device usb2_bluetooth' gives a lot of compile errors. Am I > using the right patch here? usb2_bluetooth depends on Netgraph which needs some extra options in the kernel config. You maybe want to build the module instead. --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 21:01:36 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E5D8106567B; Wed, 20 Aug 2008 21:01:36 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 41C0C8FC0A; Wed, 20 Aug 2008 21:01:36 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 227DB1A4D80; Wed, 20 Aug 2008 14:01:36 -0700 (PDT) Date: Wed, 20 Aug 2008 14:01:36 -0700 From: Alfred Perlstein To: Hans Petter Selasky Message-ID: <20080820210136.GY16977@elvis.mu.org> References: <20080818205914.GJ16977@elvis.mu.org> <200808192219.19246.hselasky@c2i.net> <48AB3D3A.4040303@FreeBSD.org> <200808201809.24620.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200808201809.24620.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 21:01:36 -0000 * Hans Petter Selasky [080820 09:07] wrote: > On Tuesday 19 August 2008, Kris Kennaway wrote: > > Hans Petter Selasky wrote: > > > >> This raises the question of why the kernel changes need to be committed > > >> now, and what benefit they bring in the absence of a compatible > > >> userland. Shouldn't the commit happen after both kernel and userland > > >> are ready (and reviewed)? > > > > > > I think that is correct. > > > > OK, so does this mean we should expect to see a revised commit candidate > > patch from you and/or alfred later once that is finished? > > Alfred, I leave this up to you. I think we'll be committing the kernel portion first. There are several reasons that justify this: 1) The old usb code remains and is on by default so no one is really affected by it. 2) This is a rather large delta and it has been getting quite difficult to get in, the larger the delta, the more problems we will have bringing it in. > > P.S. There were a number of questions you didn't answer, can I assume > > those will follow later? > > Could you please repeat the questions you did not get an answer to? I agree, there has been so many reviews/opinions posted that it would be easier to repeat the missed questions than to expect the person that unintentionally missed them to pick them up again. -- - Alfred Perlstein From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 21:07:24 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CEBB106566B for ; Wed, 20 Aug 2008 21:07:24 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 4FD828FC16 for ; Wed, 20 Aug 2008 21:07:24 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 30ADB1A4D80; Wed, 20 Aug 2008 14:07:24 -0700 (PDT) Date: Wed, 20 Aug 2008 14:07:24 -0700 From: Alfred Perlstein To: Peter Jeremy Message-ID: <20080820210724.GZ16977@elvis.mu.org> References: <20080818205914.GJ16977@elvis.mu.org> <200808191758.22981.hselasky@c2i.net> <48AB233C.2010602@FreeBSD.org> <200808192219.19246.hselasky@c2i.net> <20080820074205.GC32539@server.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080820074205.GC32539@server.vk2pj.dyndns.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 21:07:24 -0000 * Peter Jeremy [080820 09:32] wrote: > On 2008-Aug-19 22:19:14 +0200, Hans Petter Selasky wrote: > >On Tuesday 19 August 2008, Kris Kennaway wrote: > >> Hans Petter Selasky wrote: > >> > On Tuesday 19 August 2008, Alfred Perlstein wrote: > >> >> need to wait for smp tty code. > >> > > >> > If this requires changes in the USB serial port drivers there will be > >> > trouble. > >> > >> I am not sure what you mean by this statement, since it can be > >> interpreted in several ways, some not so friendly. > > > >I mean I need to make another patchset. And that the current patchset will > >break the kernel compilation if blindly committed after mpsafetty. > > I am concerned that the current plans appear to have both mpsafetty > and usb4bsd committed at virtually the same time. With the best will > in the world, it's still likely that one or both imports will have > some rough edges. IMHO, there should be a reasonable period between > major kernel subsystem upheavals to allow things to stabilise. Having > both a new USB stack and a new TTY subsystem would appear to make it > unnecessarily difficult to identify the cause of USB serial port > issues. Again, the usb2 code is completely optional, you won't see any changes unless you change your kernel config file to use the "usb2" stack. This is sort of like oldcard/newcard, you pick and choose. -- - Alfred Perlstein From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 21:08:27 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 015A51065676; Wed, 20 Aug 2008 21:08:27 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id E8A4A8FC17; Wed, 20 Aug 2008 21:08:26 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id AE1F01A4D8B; Wed, 20 Aug 2008 14:08:26 -0700 (PDT) Date: Wed, 20 Aug 2008 14:08:26 -0700 From: Alfred Perlstein To: Jeremy Messenger Message-ID: <20080820210826.GA16977@elvis.mu.org> References: <20080819194413.GB16977@elvis.mu.org> <48AB32D4.5040904@FreeBSD.org> <200808192257.13576.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: usb@freebsd.org, freebsd-current@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 21:08:27 -0000 * Jeremy Messenger [080820 09:03] wrote: > On Tue, 19 Aug 2008 15:57:11 -0500, Hans Petter Selasky > wrote: > > >On Tuesday 19 August 2008, Maxim Sobolev wrote: > >>Alfred Perlstein wrote: > >>> Q. Can we change the name from "usb2_" to my favorite name? > >>> A. No. This is for a short period, stop being so annoying. > >> > >>Why not just "usb_"? You can then leave it as is then avoiding violating > >>POLA second time. Otherwise people would confuse it with USB 2.0. > >> > > > >Else you get symbol collisions with the old USB stack ... > > At least, can you document it? Like add an explain about that usb2 is just > a name, not USB 2.0, that way no users can mistake it for USB 2.0. Even > smarter people can mistake it for USB 2.0, btw. This is not necessary, usb2 will replace usb in short order if things go well. "usb2" is not expected to live past 8.0-release so "users" shouldn't be confused. -Alfred From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 21:10:21 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E92B1065677; Wed, 20 Aug 2008 21:10:21 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 4F63A8FC14; Wed, 20 Aug 2008 21:10:21 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 1018A1A4D80; Wed, 20 Aug 2008 14:10:21 -0700 (PDT) Date: Wed, 20 Aug 2008 14:10:21 -0700 From: Alfred Perlstein To: Hans Petter Selasky Message-ID: <20080820211021.GB16977@elvis.mu.org> References: <20080819194413.GB16977@elvis.mu.org> <200808201619.22720.naylor.b.david@gmail.com> <200808201749.51953.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200808201749.51953.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i Cc: usb@freebsd.org, David Naylor , current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 21:10:21 -0000 FYI Hans, I'm not planning on taking that part of your patch, no kernels will by default run usb2 for a few weeks. That's the only part I'm rejecting for the time being. I don't want anyone to be "surprised". -Alfred * Hans Petter Selasky [080820 08:48] wrote: > On Wednesday 20 August 2008, David Naylor wrote: > > On Tuesday 19 August 2008 21:44:13 Alfred Perlstein wrote: > > > After a long period of review and testing I am on the verge of > > > committing Hans Peter's new usb stack to -current. > > > > > > The patchset requires a SMALL _493_ line diff to the main code, > > > mostly bug fixes to arm. And then a large number of new files > > > for the usb system. > > > > > > The new usb system will be committed as separate files with > > > the intention of folding them over the old files before the > > > 9.0 release. > > > > > > The diff to the main files is here: > > > http://mu.org/~bright/usb2/usb2_release_001.diff > > > > > > The whole diff, including new files is here: > > > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > > > > > FAQ: > > > Q. Has this been reviewed? > > > A. Yes, pretty strongly by myself and we've consulted with > > > various others, Warner, Scott and Andrew for review/testing. > > > I wouldn't say that Warner or Scott have given full review > > > but just about all questions have been answered. > > > > > > Q. Can we change the name from "usb2_" to my favorite name? > > > A. No. This is for a short period, stop being so annoying. > > > > > > Q. What about the old usb code? > > > A. What about it? :D > > > > > > Q. What about ttys? > > > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > > > Hans is very responsive to SMP issues. > > > > > > Q. Shouldn't you wait? > > > A. Wait for what? No. > > > > > > Q. I have some whitespace nits, can you do those? > > > A. No. It's a 100k line diff and a 3meg delta, we tried really hard > > > to get all whitespace right, but you're welcome to point things out after > > > the commit. > > > > > > Thanks! > > > > This sounds great :-) > > > > I see that in the patch usb2 is not enabled in the kernel by default. Is > > there a timeline for it to be enabled and/or could you provide an alternate > > kernel config with usb2 enabled (temporarily)? > > For KB920X boards the USB2 is enabled by default. It is not much you need: > > +device usb2_core > +device usb2_controller # EHCI/OHCI/UHCI/AT91DCI > +device usb2_storage # USB mass storage support > +device usb2_ethernet # USB ethernet support > +device usb2_wlan # USB wireless LAN support > +device usb2_serial # USB serial support > +device usb2_quirk # USB quirks > +device usb2_template # Device Side Mode USB templates > +device usb2_image # USB Scanner support > > > > > Lastly, is there a web-page where one can check up on the progress of the > > integration of the new code (and the removal of the old code) [preferably > > an up-to-date web-page]. > > No, there is no such webpage. > > --HPS -- - Alfred Perlstein From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 21:10:21 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E92B1065677; Wed, 20 Aug 2008 21:10:21 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 4F63A8FC14; Wed, 20 Aug 2008 21:10:21 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 1018A1A4D80; Wed, 20 Aug 2008 14:10:21 -0700 (PDT) Date: Wed, 20 Aug 2008 14:10:21 -0700 From: Alfred Perlstein To: Hans Petter Selasky Message-ID: <20080820211021.GB16977@elvis.mu.org> References: <20080819194413.GB16977@elvis.mu.org> <200808201619.22720.naylor.b.david@gmail.com> <200808201749.51953.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200808201749.51953.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i Cc: usb@freebsd.org, David Naylor , current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 21:10:21 -0000 FYI Hans, I'm not planning on taking that part of your patch, no kernels will by default run usb2 for a few weeks. That's the only part I'm rejecting for the time being. I don't want anyone to be "surprised". -Alfred * Hans Petter Selasky [080820 08:48] wrote: > On Wednesday 20 August 2008, David Naylor wrote: > > On Tuesday 19 August 2008 21:44:13 Alfred Perlstein wrote: > > > After a long period of review and testing I am on the verge of > > > committing Hans Peter's new usb stack to -current. > > > > > > The patchset requires a SMALL _493_ line diff to the main code, > > > mostly bug fixes to arm. And then a large number of new files > > > for the usb system. > > > > > > The new usb system will be committed as separate files with > > > the intention of folding them over the old files before the > > > 9.0 release. > > > > > > The diff to the main files is here: > > > http://mu.org/~bright/usb2/usb2_release_001.diff > > > > > > The whole diff, including new files is here: > > > http://mu.org/~bright/usb2/usb4bsd.diff.gz > > > > > > FAQ: > > > Q. Has this been reviewed? > > > A. Yes, pretty strongly by myself and we've consulted with > > > various others, Warner, Scott and Andrew for review/testing. > > > I wouldn't say that Warner or Scott have given full review > > > but just about all questions have been answered. > > > > > > Q. Can we change the name from "usb2_" to my favorite name? > > > A. No. This is for a short period, stop being so annoying. > > > > > > Q. What about the old usb code? > > > A. What about it? :D > > > > > > Q. What about ttys? > > > A. I don't know, we'll address the mpsafe aspects of ttys shortly, > > > Hans is very responsive to SMP issues. > > > > > > Q. Shouldn't you wait? > > > A. Wait for what? No. > > > > > > Q. I have some whitespace nits, can you do those? > > > A. No. It's a 100k line diff and a 3meg delta, we tried really hard > > > to get all whitespace right, but you're welcome to point things out after > > > the commit. > > > > > > Thanks! > > > > This sounds great :-) > > > > I see that in the patch usb2 is not enabled in the kernel by default. Is > > there a timeline for it to be enabled and/or could you provide an alternate > > kernel config with usb2 enabled (temporarily)? > > For KB920X boards the USB2 is enabled by default. It is not much you need: > > +device usb2_core > +device usb2_controller # EHCI/OHCI/UHCI/AT91DCI > +device usb2_storage # USB mass storage support > +device usb2_ethernet # USB ethernet support > +device usb2_wlan # USB wireless LAN support > +device usb2_serial # USB serial support > +device usb2_quirk # USB quirks > +device usb2_template # Device Side Mode USB templates > +device usb2_image # USB Scanner support > > > > > Lastly, is there a web-page where one can check up on the progress of the > > integration of the new code (and the removal of the old code) [preferably > > an up-to-date web-page]. > > No, there is no such webpage. > > --HPS -- - Alfred Perlstein From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 21:16:45 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AF2F1065681; Wed, 20 Aug 2008 21:16:45 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 2175B8FC0C; Wed, 20 Aug 2008 21:16:44 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id D50F81A4D80; Wed, 20 Aug 2008 14:16:44 -0700 (PDT) Date: Wed, 20 Aug 2008 14:16:44 -0700 From: Alfred Perlstein To: Kris Kennaway Message-ID: <20080820211644.GD16977@elvis.mu.org> References: <20080818205914.GJ16977@elvis.mu.org> <200808192219.19246.hselasky@c2i.net> <48AB3D3A.4040303@FreeBSD.org> <200808201809.24620.hselasky@c2i.net> <48AC54B8.4040406@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48AC54B8.4040406@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 21:16:45 -0000 [[ Reply to Hans at end of this ]] [[ Reply to Kris inline ]] * Kris Kennaway [080820 10:30] wrote: > Hans Petter Selasky wrote: > >On Tuesday 19 August 2008, Kris Kennaway wrote: > >> > >>>>Also is it safe to drop and reacquire the lock here? > >>>You have to drop the lock, else I get witness warnings. > >>Yes, and presumably rightly so. It doesn't mean that dropping the lock > >>and later reacquiring it is safe though; it could introduce races. > > > >Yes, I know. > > ...so what is the answer? > > >>OK, this seems unrelated to USB then and is something you should discuss > >>with the sound maintainers. It sounds to me like the ability to "run > >>without mutexes" is the real bug here, and "support" for that should be > >>removed completely instead of patching it up downstream. > > > >Yes, and it would be nice if the sound maintainers would try out the new > >USB stack, and propose how they want to solve the problems that exist in > >the sound system. > > This is backwards. If you perceive problems in other subsystems you > should take the lead on engaging with the relevant developers and > resolving those problems to your mutual satisfaction, instead of > inviting them to come to you. I think there has been a huge amount of effort just on the usb side, I think expecting Hans to come up with a patch that is "fix all freebsd issues" is a bit too much. I think we can proceed in an organic matter and clean up these small nits as time goes on, just like we do with almost every other problem... except for when we don't do require a completionist solution and never produce anything. (ie, the SMP lag). > >>>There are multiple issues: > >>> > >>>1) If PAGE_SIZE is 16384 bytes, then the code simply fails. > >>>2) Sometimes PAGE_SHIFT is already defined. > >>> > >>>#if PAGE_SIZE == 4096 > >>>#define PAGE_SHIFT 12 > >>>#elif PAGE_SIZE == 8192 > >>>#define PAGE_SHIFT 13 > >>>#else > >>>#error PAGE_SHIFT undefined! > >>>#endif > >>OK, but again, why? If some architecture is not defining the same > >>symbols as the others then maybe that architecture should be fixed, > >>instead of working around the effect downstream. > > > >Yes, but then there will be even more patches, and I've been told to > >reduce the number of patches outside USB. > > The way you minimize patches outside of USB is by submitting separate > patches that fix upstream issues at their source, instead of adding > workarounds like several of those that appeared in this diff. It's a two line ifdef, I dare say we're being a bit pedantic here. How much of a showstopper is this in reality? How _wrong_ is it compared to how _wrong_ the old usb code is? Are you taking into account that these nits can be fixed easily compared to the extra effort we will have to go through to submit all these stuff just for a two line delta? > >>P.S. There were a number of questions you didn't answer, can I assume > >>those will follow later? > > > >Could you please repeat the questions you did not get an answer to? > > I've repeated some of them already. e.g. in this mail you still didn't > answer the "is it safe to drop the locks" question which was asked > twice. Rather than me repeating them yet again, I'd suggest you go back > and take another close read over my emails and your responses, and reply > to the questions that are still not resolved. Hans, let's just leave sound the way it is. I will remove that part of the patch. It might be better to leave a bad locking in that generates a warning rather than obscure the locking issue by removing the warning without fully understanding the issues. -- - Alfred Perlstein From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 21:55:35 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CBD3106567D; Wed, 20 Aug 2008 21:55:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id D44408FC1C; Wed, 20 Aug 2008 21:55:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7KLqdmh024381; Wed, 20 Aug 2008 15:52:39 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 20 Aug 2008 15:53:07 -0600 (MDT) Message-Id: <20080820.155307.1102526075.imp@bsdimp.com> To: alfred@freebsd.org From: "M. Warner Losh" In-Reply-To: <20080820211644.GD16977@elvis.mu.org> References: <200808201809.24620.hselasky@c2i.net> <48AC54B8.4040406@FreeBSD.org> <20080820211644.GD16977@elvis.mu.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 21:55:35 -0000 In message: <20080820211644.GD16977@elvis.mu.org> Alfred Perlstein writes: : [[ Reply to Hans at end of this ]] : [[ Reply to Kris inline ]] : : * Kris Kennaway [080820 10:30] wrote: : > Hans Petter Selasky wrote: : > >On Tuesday 19 August 2008, Kris Kennaway wrote: : > >> : > >>>>Also is it safe to drop and reacquire the lock here? : > >>>You have to drop the lock, else I get witness warnings. : > >>Yes, and presumably rightly so. It doesn't mean that dropping the lock : > >>and later reacquiring it is safe though; it could introduce races. : > > : > >Yes, I know. : > : > ...so what is the answer? : > : > >>OK, this seems unrelated to USB then and is something you should discuss : > >>with the sound maintainers. It sounds to me like the ability to "run : > >>without mutexes" is the real bug here, and "support" for that should be : > >>removed completely instead of patching it up downstream. : > > : > >Yes, and it would be nice if the sound maintainers would try out the new : > >USB stack, and propose how they want to solve the problems that exist in : > >the sound system. : > : > This is backwards. If you perceive problems in other subsystems you : > should take the lead on engaging with the relevant developers and : > resolving those problems to your mutual satisfaction, instead of : > inviting them to come to you. : : I think there has been a huge amount of effort just on the usb : side, I think expecting Hans to come up with a patch that : is "fix all freebsd issues" is a bit too much. I think we can : proceed in an organic matter and clean up these small nits as : time goes on, just like we do with almost every other problem... We should at least tag these, understand them and make sure they don't drop on the floor rather than just dismissing things out of hand... I have a few action items here because things have dropped on the floor in the past... : > >>>There are multiple issues: : > >>> : > >>>1) If PAGE_SIZE is 16384 bytes, then the code simply fails. : > >>>2) Sometimes PAGE_SHIFT is already defined. : > >>> : > >>>#if PAGE_SIZE == 4096 : > >>>#define PAGE_SHIFT 12 : > >>>#elif PAGE_SIZE == 8192 : > >>>#define PAGE_SHIFT 13 : > >>>#else : > >>>#error PAGE_SHIFT undefined! : > >>>#endif : > >>OK, but again, why? If some architecture is not defining the same : > >>symbols as the others then maybe that architecture should be fixed, : > >>instead of working around the effect downstream. : > > : > >Yes, but then there will be even more patches, and I've been told to : > >reduce the number of patches outside USB. : > : > The way you minimize patches outside of USB is by submitting separate : > patches that fix upstream issues at their source, instead of adding : > workarounds like several of those that appeared in this diff. : : It's a two line ifdef, I dare say we're being a bit pedantic here. : : How much of a showstopper is this in reality? How _wrong_ is it : compared to how _wrong_ the old usb code is? Are you taking into : account that these nits can be fixed easily compared to the extra : effort we will have to go through to submit all these stuff just for : a two line delta? Why not just use PAGE_SHIFT w/o defining it again? It looks like it is defined everywhere these days... It is part of the defined interface that the MD code is supposed to provide for everybody... Warner From owner-freebsd-usb@FreeBSD.ORG Wed Aug 20 22:18:38 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1E1F1065687; Wed, 20 Aug 2008 22:18:38 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C41958FC35; Wed, 20 Aug 2008 22:18:37 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48AC983B.4020409@FreeBSD.org> Date: Thu, 21 Aug 2008 00:18:35 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Alfred Perlstein References: <20080818205914.GJ16977@elvis.mu.org> <200808192219.19246.hselasky@c2i.net> <48AB3D3A.4040303@FreeBSD.org> <200808201809.24620.hselasky@c2i.net> <48AC54B8.4040406@FreeBSD.org> <20080820211644.GD16977@elvis.mu.org> In-Reply-To: <20080820211644.GD16977@elvis.mu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 22:18:38 -0000 Alfred Perlstein wrote: >>> Yes, and it would be nice if the sound maintainers would try out the new >>> USB stack, and propose how they want to solve the problems that exist in >>> the sound system. >> This is backwards. If you perceive problems in other subsystems you >> should take the lead on engaging with the relevant developers and >> resolving those problems to your mutual satisfaction, instead of >> inviting them to come to you. > > I think there has been a huge amount of effort just on the usb > side, I think expecting Hans to come up with a patch that > is "fix all freebsd issues" is a bit too much. This is a straw man argument, since no-one except you has mentioned "fixing all freebsd issues" in this thread about importing a new USB stack. The issue under discussion is a particular part of the patch that you and Hans are proposing to commit, which introduces changes to non-USB parts of the system that it turns out are completely unrelated to USB. Anyway, we now agree that this should not be part of the USB import, and I urge you or Hans to follow the normal FreeBSD process, which involves sending mail to the relevant developers. >>>>> There are multiple issues: >>>>> >>>>> 1) If PAGE_SIZE is 16384 bytes, then the code simply fails. >>>>> 2) Sometimes PAGE_SHIFT is already defined. >>>>> >>>>> #if PAGE_SIZE == 4096 >>>>> #define PAGE_SHIFT 12 >>>>> #elif PAGE_SIZE == 8192 >>>>> #define PAGE_SHIFT 13 >>>>> #else >>>>> #error PAGE_SHIFT undefined! >>>>> #endif >>>> OK, but again, why? If some architecture is not defining the same >>>> symbols as the others then maybe that architecture should be fixed, >>>> instead of working around the effect downstream. >>> Yes, but then there will be even more patches, and I've been told to >>> reduce the number of patches outside USB. >> The way you minimize patches outside of USB is by submitting separate >> patches that fix upstream issues at their source, instead of adding >> workarounds like several of those that appeared in this diff. > > It's a two line ifdef, I dare say we're being a bit pedantic here. > > How much of a showstopper is this in reality? How _wrong_ is it > compared to how _wrong_ the old usb code is? Are you taking into > account that these nits can be fixed easily compared to the extra > effort we will have to go through to submit all these stuff just for > a two line delta? Calling me pedantic is not an argument, nor is saying "but the old code is worse". If neither you nor Hans can explain why this part of the diff is the best solution to some incompletely specified problem, then it's likely not to be. What architecture is this change even relevant for? >>>> P.S. There were a number of questions you didn't answer, can I assume >>>> those will follow later? >>> Could you please repeat the questions you did not get an answer to? >> I've repeated some of them already. e.g. in this mail you still didn't >> answer the "is it safe to drop the locks" question which was asked >> twice. Rather than me repeating them yet again, I'd suggest you go back >> and take another close read over my emails and your responses, and reply >> to the questions that are still not resolved. > > Hans, let's just leave sound the way it is. I will remove that > part of the patch. It might be better to leave a bad locking > in that generates a warning rather than obscure the locking issue > by removing the warning without fully understanding the issues. OK. Based on this review thread I think we have agreed that: * The ARM changes were already imported separately by warner * the sound changes will not go in since they're unrelated to USB and there are some unresolved questions there. It sounds like there are real bugs identified and possibly also fixed there, so I continue to encourage you or Hans to follow up with the sound developers so the problems can be resolved separately. * the newbus change is not needed (but warner liked Hans's helper function so maybe that should be committed separately) * the ndis module is not complete and will not go in yet, and the question about the above #ifdef will be resolved in the meantime * hans is going to work on adding back the individual drivers instead of bundling them * you and hans will work on the manpages post-commit with help from the doc guys Questions remaining: * Why is the PAGE_SHIFT change necessary? * The $FreeBSD$ expansion in files that were copied - will this confuse SVN or the CVS exporter? In CVS we had to make sure not to import expanded tags. Easiest solution is to just unexpand them. * How much of the userland support is incomplete or in flux, and what functionality is missing for users of the usb2 code until it is finished? Kris From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 07:04:17 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 369C11065698; Thu, 21 Aug 2008 07:04:17 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id F28F08FC08; Thu, 21 Aug 2008 07:04:15 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=H3poPDSvFasA:10 a=fj6dw-CIB2gA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=SKRtMQ3HR3uuMNcyNf4A:9 a=ukNOB5yV7h3YP6qRMhUA:7 a=wxQuF6-wC1qPsGBkqf3EvnflXeQA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1045643101; Thu, 21 Aug 2008 09:04:14 +0200 From: Hans Petter Selasky To: Alfred Perlstein Date: Thu, 21 Aug 2008 09:05:57 +0200 User-Agent: KMail/1.9.7 References: <20080818205914.GJ16977@elvis.mu.org> <48AC54B8.4040406@FreeBSD.org> <20080820211644.GD16977@elvis.mu.org> In-Reply-To: <20080820211644.GD16977@elvis.mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808210905.59150.hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 07:04:17 -0000 On Wednesday 20 August 2008, Alfred Perlstein wrote: > [[ Reply to Hans at end of this ]] > [[ Reply to Kris inline ]] > Hi, I've CC'ed multimedia. We have the following diff to mixer.c. Can anyone tell if it will have any negative consequences: --- sys/dev/sound/pcm/mixer.c August 2008 +++ sys.new/dev/sound/pcm/mixer.c August 2008 @@ -589,7 +589,7 @@ KASSERT(m->type == MIXER_TYPE_SECONDARY, ("%s(): illegal mixer type=%d", __func__, m->type)); - snd_mtxlock(m->lock); + /* mixer uninit can sleep --hps */ MIXER_UNINIT(m); @@ -704,14 +704,24 @@ return EBUSY; } + /* destroy dev can sleep --hps */ + + snd_mtxunlock(m->lock); + pdev->si_drv1 = NULL; destroy_dev(pdev); + snd_mtxlock(m->lock); + for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) mixer_set(m, i, 0); mixer_setrecsrc(m, SOUND_MASK_MIC); + snd_mtxunlock(m->lock); + + /* mixer uninit can sleep --hps */ + MIXER_UNINIT(m); snd_mtxfree(m->lock); @@ -1280,3 +1290,16 @@ return (EINVAL); } > > >>P.S. There were a number of questions you didn't answer, can I assume > > >>those will follow later? > > > > > >Could you please repeat the questions you did not get an answer to? > > > > I've repeated some of them already. e.g. in this mail you still didn't > > answer the "is it safe to drop the locks" question which was asked > > twice. Rather than me repeating them yet again, I'd suggest you go back > > and take another close read over my emails and your responses, and reply > > to the questions that are still not resolved. > > Hans, let's just leave sound the way it is. I will remove that > part of the patch. It might be better to leave a bad locking > in that generates a warning rather than obscure the locking issue > by removing the warning without fully understanding the issues. USB audio is the only sound device I know about that is regularly plugged in and out, which is causing this code path to be executed, unless you load unload a sound module, which I think is very rarely done. The lock in question has never before been exposed to the underlying layers, so the funtions that are called should not have any knowledge about it and consequently not depend on it either. Alfred: Just make sure that everything builds. We can fix up these issues afterwards. If USB sound support is broken it is not that critical. ---HPS From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 07:22:40 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AF61106564A; Thu, 21 Aug 2008 07:22:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C32268FC1C; Thu, 21 Aug 2008 07:22:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7L7LHMT031426; Thu, 21 Aug 2008 01:21:17 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 21 Aug 2008 01:21:46 -0600 (MDT) Message-Id: <20080821.012146.1791046933.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200808210905.59150.hselasky@c2i.net> References: <48AC54B8.4040406@FreeBSD.org> <20080820211644.GD16977@elvis.mu.org> <200808210905.59150.hselasky@c2i.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-multimedia@FreeBSD.org, alfred@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 07:22:40 -0000 In message: <200808210905.59150.hselasky@c2i.net> Hans Petter Selasky writes: : USB audio is the only sound device I know about that is regularly plugged in : and out, which is causing this code path to be executed, unless you load : unload a sound module, which I think is very rarely done. There's a number of CardBus sound cards that I've helped people debug over the years. Also, I know many people will load and unload the sound driver as a way to keep power usage down since doing so puts the device into D3 state. I've fielded many bugs over the years where people have issues with sound because they suddenly removed it while things were playing. Warner From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 15:27:36 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25324106564A for ; Thu, 21 Aug 2008 15:27:36 +0000 (UTC) (envelope-from aminoff@perlw2.nber.org) Received: from mail2.nber.org (mail2.nber.org [66.251.72.79]) by mx1.freebsd.org (Postfix) with ESMTP id B64D88FC0C for ; Thu, 21 Aug 2008 15:27:35 +0000 (UTC) (envelope-from aminoff@perlw2.nber.org) Received: from perlw2.nber.org (perlw2.nber.org [66.251.72.172]) by mail2.nber.org (8.14.1/8.13.8) with ESMTP id m7LEmROi052136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 21 Aug 2008 10:48:28 -0400 (EDT) (envelope-from aminoff@perlw2.nber.org) Received: from perlw2.nber.org (localhost [127.0.0.1]) by perlw2.nber.org (8.14.1/8.12.8) with ESMTP id m7LEmRW0023464 for ; Thu, 21 Aug 2008 10:48:27 -0400 Received: (from aminoff@localhost) by perlw2.nber.org (8.14.1/8.14.1/Submit) id m7LEmQYa023463 for freebsd-usb@freebsd.org; Thu, 21 Aug 2008 10:48:26 -0400 Date: Thu, 21 Aug 2008 10:48:26 -0400 From: Alex Aminoff To: freebsd-usb@freebsd.org Message-ID: <20080821144826.GD13934@perlw2.nber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-Anti-Virus: Kaspersky Anti-Virus for Sendmail with Milter API 5.6.20, bases: 20080821 #997686, check: 20080821 clean Subject: USB thumb drive does not newfs under FreeBSD 7.0 (but does under 6.2) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 15:27:36 -0000 We seem to have a USB thumb drive that works under FreeBSD 6.2 but does not newfs under 7.0. We hope that there is some package or library we have failed to upgrade. Any advice on how to proceed to resolve this would be greatly appreciated. If this is the wrong place to ask, please point us to the correct place. The versions of FreeBSD in question are 6.2-RELEASE-p9 vs 7.0-RELEASE-p2 both are generic kernels. It is the same hardware booted to one or the other OS. dmesg says: da1 at umass-sim0 bus 0 target 0 lun 0 da1: Removable Direct Access SCSI-0 device da1: 1.000MB/s transfers da1: 15424MB (31588352 512 byte sectors: 255H 63S/T 1966C) # fdisk -I /dev/da1 succeeds on both OSs # newfs /dev/da1s1 On 6.2, this succeeds, and we can mount and use the filesystem. On 7.0, newfs dies with cg 0: bad magic number Some searching on that error string turns up stuff about needing to reserve space at the beginning of a disk for the partition table. We have tried adjusting the parameters of the slice with fdisk with no success. In any case it seems strange that this would happen under 7 but not 6.2. Thanks, - Alex Aminoff BaseSpace.net National Bureau of Economic Research (nber.org) From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 15:43:55 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D75581065681 for ; Thu, 21 Aug 2008 15:43:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 831098FC0A for ; Thu, 21 Aug 2008 15:43:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7LFhJ7b044671; Thu, 21 Aug 2008 09:43:20 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 21 Aug 2008 09:43:48 -0600 (MDT) Message-Id: <20080821.094348.1257475537.imp@bsdimp.com> To: aminoff@nber.org From: "M. Warner Losh" In-Reply-To: <20080821144826.GD13934@perlw2.nber.org> References: <20080821144826.GD13934@perlw2.nber.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-usb@FreeBSD.org Subject: Re: USB thumb drive does not newfs under FreeBSD 7.0 (but does under 6.2) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 15:43:55 -0000 In message: <20080821144826.GD13934@perlw2.nber.org> Alex Aminoff writes: : : : We seem to have a USB thumb drive that works under FreeBSD 6.2 but : does not newfs under 7.0. We hope that there is some package or : library we have failed to upgrade. Any advice on how to proceed to : resolve this would be greatly appreciated. If this is the wrong place : to ask, please point us to the correct place. : : The versions of FreeBSD in question are : : 6.2-RELEASE-p9 : vs : 7.0-RELEASE-p2 : : both are generic kernels. It is the same hardware booted to one or the : other OS. : : dmesg says: : : da1 at umass-sim0 bus 0 target 0 lun 0 : da1: Removable Direct Access SCSI-0 device : da1: 1.000MB/s transfers : da1: 15424MB (31588352 512 byte sectors: 255H 63S/T 1966C) : : # fdisk -I /dev/da1 : : succeeds on both OSs : : # newfs /dev/da1s1 : : On 6.2, this succeeds, and we can mount : and use the filesystem. On 7.0, newfs dies with : : cg 0: bad magic number : : Some searching on that error string turns up stuff about needing to : reserve space at the beginning of a disk for the partition table. We : have tried adjusting the parameters of the slice with fdisk with no : success. In any case it seems strange that this would happen under 7 : but not 6.2. Does something like "dd if=/dev/zero of=/dev/da1s1 bs=1m" work? Warner From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 15:50:09 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FC90106564A; Thu, 21 Aug 2008 15:50:09 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 950F68FC1B; Thu, 21 Aug 2008 15:50:08 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=H3poPDSvFasA:10 a=fj6dw-CIB2gA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=nw_ldT7Q0Dlw-qXl5yYA:9 a=fzuyTjGVRBe3JV5IUCwA:7 a=RjU2Z8bJbJ1mUxWB5XXfqcYuIsEA:4 a=50e4U0PicR4A:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 945512004; Thu, 21 Aug 2008 17:50:06 +0200 From: Hans Petter Selasky To: Kris Kennaway Date: Thu, 21 Aug 2008 17:51:49 +0200 User-Agent: KMail/1.9.7 References: <20080818205914.GJ16977@elvis.mu.org> <20080820211644.GD16977@elvis.mu.org> <48AC983B.4020409@FreeBSD.org> In-Reply-To: <48AC983B.4020409@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808211751.51465.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 15:50:09 -0000 Hi, > OK. Based on this review thread I think we have agreed that: > > * The ARM changes were already imported separately by warner Great. > * the sound changes will not go in since they're unrelated to USB and > there are some unresolved questions there. It sounds like there are > real bugs identified and possibly also fixed there, so I continue to > encourage you or Hans to follow up with the sound developers so the > problems can be resolved separately. Fine. > > * the newbus change is not needed (but warner liked Hans's helper > function so maybe that should be committed separately) Fine. > > * the ndis module is not complete and will not go in yet, and the > question about the above #ifdef will be resolved in the meantime > Fine. > * hans is going to work on adding back the individual drivers instead of > bundling them Fine. > > * you and hans will work on the manpages post-commit with help from the > doc guys Fine. > > Questions remaining: > > * Why is the PAGE_SHIFT change necessary? According to what Warner stated in a recent e-mail, the page PAGE_SHIFT re-definition by the NDIS is redundant and can be removed. > * The $FreeBSD$ expansion in files that were copied - will this confuse > SVN or the CVS exporter? In CVS we had to make sure not to import > expanded tags. Easiest solution is to just unexpand them. Alfred, you have to answer this. > * How much of the userland support is incomplete or in flux, and what > functionality is missing for users of the usb2 code until it is finished? The USB userland library is nearly complete. All it lacks is proper documentation: svn --username anonsvn --password anonsvn \ checkout svn://svn.turbocat.net/i4b/trunk/libusb20 The USB config utility is also starting to become finished. It will be renamed to usbconfig. Currently it is called usbview : svn --username anonsvn --password anonsvn \ checkout svn://svn.turbocat.net/i4b/trunk/usbview --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 16:25:47 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10C981065689; Thu, 21 Aug 2008 16:25:47 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 600BC8FC17; Thu, 21 Aug 2008 16:25:45 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48AD9708.5000106@FreeBSD.org> Date: Thu, 21 Aug 2008 18:25:44 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Hans Petter Selasky References: <20080818205914.GJ16977@elvis.mu.org> <20080820211644.GD16977@elvis.mu.org> <48AC983B.4020409@FreeBSD.org> <200808211751.51465.hselasky@c2i.net> In-Reply-To: <200808211751.51465.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 16:25:47 -0000 Hans Petter Selasky wrote: >> * How much of the userland support is incomplete or in flux, and what >> functionality is missing for users of the usb2 code until it is finished? > > The USB userland library is nearly complete. All it lacks is proper > documentation: > > svn --username anonsvn --password anonsvn \ > checkout svn://svn.turbocat.net/i4b/trunk/libusb20 > > The USB config utility is also starting to become finished. It will be renamed > to usbconfig. Currently it is called usbview : > > svn --username anonsvn --password anonsvn \ > checkout svn://svn.turbocat.net/i4b/trunk/usbview So...what functionality is missing for users of the usb2 code until it is finished? Stated even more clearly, what things will users of the USB2 code not be able to do until the above userland code is imported? Seriously, I'm trying to understand this! Kris From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 16:38:32 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 967781065694; Thu, 21 Aug 2008 16:38:32 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe11.swipnet.se [212.247.155.65]) by mx1.freebsd.org (Postfix) with ESMTP id C6F8D8FC23; Thu, 21 Aug 2008 16:38:31 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=H3poPDSvFasA:10 a=fj6dw-CIB2gA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=kMfnargn3hZBwkAgilEA:9 a=YiwrDinwbRF3u5ZI4k8A:7 a=_x8omI0gelwrMb0UcvMmOq6uXVcA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe11.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 875722074; Thu, 21 Aug 2008 18:38:29 +0200 From: Hans Petter Selasky To: Kris Kennaway Date: Thu, 21 Aug 2008 18:40:10 +0200 User-Agent: KMail/1.9.7 References: <20080818205914.GJ16977@elvis.mu.org> <200808211751.51465.hselasky@c2i.net> <48AD9708.5000106@FreeBSD.org> In-Reply-To: <48AD9708.5000106@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808211840.13109.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 16:38:32 -0000 On Thursday 21 August 2008, Kris Kennaway wrote: > Hans Petter Selasky wrote: > >> * How much of the userland support is incomplete or in flux, and what > >> functionality is missing for users of the usb2 code until it is > >> finished? > > > > The USB userland library is nearly complete. All it lacks is proper > > documentation: > > > > svn --username anonsvn --password anonsvn \ > > checkout svn://svn.turbocat.net/i4b/trunk/libusb20 > > > > The USB config utility is also starting to become finished. It will be > > renamed to usbconfig. Currently it is called usbview : > > > > svn --username anonsvn --password anonsvn \ > > checkout svn://svn.turbocat.net/i4b/trunk/usbview > > So...what functionality is missing for users of the usb2 code until it > is finished? > > Stated even more clearly, what things will users of the USB2 code not be > able to do until the above userland code is imported? > > Seriously, I'm trying to understand this! > Hi, There are some USB drivers which run in userland that will not work until this library is complete. These are currently not part of the FreeBSD distribution. You find them in /usr/ports : grep libusb /usr/ports/INDEX The kernel USB drivers provided under /sys/dev/usb2 do not directly depend on any userland utilities, but rather indirectly through the TTY, KBD, NET ... One exception is the USB mouse driver which depends on "moused", and currently have some warnings because moused tries to load the old ums module, which fails. --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 16:45:17 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDF851065673; Thu, 21 Aug 2008 16:45:17 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A1B998FC2A; Thu, 21 Aug 2008 16:45:15 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48AD9B9A.8070403@FreeBSD.org> Date: Thu, 21 Aug 2008 18:45:14 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Hans Petter Selasky References: <20080818205914.GJ16977@elvis.mu.org> <200808211751.51465.hselasky@c2i.net> <48AD9708.5000106@FreeBSD.org> <200808211840.13109.hselasky@c2i.net> In-Reply-To: <200808211840.13109.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 16:45:17 -0000 Hans Petter Selasky wrote: > On Thursday 21 August 2008, Kris Kennaway wrote: >> Hans Petter Selasky wrote: >>>> * How much of the userland support is incomplete or in flux, and what >>>> functionality is missing for users of the usb2 code until it is >>>> finished? >>> The USB userland library is nearly complete. All it lacks is proper >>> documentation: >>> >>> svn --username anonsvn --password anonsvn \ >>> checkout svn://svn.turbocat.net/i4b/trunk/libusb20 >>> >>> The USB config utility is also starting to become finished. It will be >>> renamed to usbconfig. Currently it is called usbview : >>> >>> svn --username anonsvn --password anonsvn \ >>> checkout svn://svn.turbocat.net/i4b/trunk/usbview >> So...what functionality is missing for users of the usb2 code until it >> is finished? >> >> Stated even more clearly, what things will users of the USB2 code not be >> able to do until the above userland code is imported? >> >> Seriously, I'm trying to understand this! >> > > Hi, > > There are some USB drivers which run in userland that will not work until this > library is complete. These are currently not part of the FreeBSD > distribution. You find them in /usr/ports : > > grep libusb /usr/ports/INDEX > > The kernel USB drivers provided under /sys/dev/usb2 do not directly depend on > any userland utilities, but rather indirectly through the TTY, KBD, NET ... > > One exception is the USB mouse driver which depends on "moused", and currently > have some warnings because moused tries to load the old ums module, which > fails. OK, now we're approaching half way. The moused thing should be documented somewhere with a workaround (or fix). If the new ums2 module is present before moused is started will it still try to load the old one? Is there another workaround? What about the second thing: usbconfig? Kris From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 16:55:08 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46006106567C; Thu, 21 Aug 2008 16:55:08 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 4324F8FC0A; Thu, 21 Aug 2008 16:55:07 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=H3poPDSvFasA:10 a=fj6dw-CIB2gA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=9UItJYpkcyEP4MyO7hIA:9 a=1qabWvTrhFJkOkx2v0UA:7 a=6jMmGxPlq1hyuJy46mqx6ircJH0A:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1050459343; Thu, 21 Aug 2008 18:55:05 +0200 From: Hans Petter Selasky To: Kris Kennaway Date: Thu, 21 Aug 2008 18:56:45 +0200 User-Agent: KMail/1.9.7 References: <20080818205914.GJ16977@elvis.mu.org> <200808211840.13109.hselasky@c2i.net> <48AD9B9A.8070403@FreeBSD.org> In-Reply-To: <48AD9B9A.8070403@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808211856.47568.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 16:55:08 -0000 On Thursday 21 August 2008, Kris Kennaway wrote: > Hans Petter Selasky wrote: > > On Thursday 21 August 2008, Kris Kennaway wrote: > >> Hans Petter Selasky wrote: > >>>> * How much of the userland support is incomplete or in flux, and what > >>>> functionality is missing for users of the usb2 code until it is > >>>> finished? > >>> > >>> The USB userland library is nearly complete. All it lacks is proper > >>> documentation: > >>> > >>> svn --username anonsvn --password anonsvn \ > >>> checkout svn://svn.turbocat.net/i4b/trunk/libusb20 > >>> > >>> The USB config utility is also starting to become finished. It will be > >>> renamed to usbconfig. Currently it is called usbview : > >>> > >>> svn --username anonsvn --password anonsvn \ > >>> checkout svn://svn.turbocat.net/i4b/trunk/usbview > >> > >> So...what functionality is missing for users of the usb2 code until it > >> is finished? > >> > >> Stated even more clearly, what things will users of the USB2 code not be > >> able to do until the above userland code is imported? > >> > >> Seriously, I'm trying to understand this! > > > > Hi, > > > > There are some USB drivers which run in userland that will not work until > > this library is complete. These are currently not part of the FreeBSD > > distribution. You find them in /usr/ports : > > > > grep libusb /usr/ports/INDEX > > > > The kernel USB drivers provided under /sys/dev/usb2 do not directly > > depend on any userland utilities, but rather indirectly through the TTY, > > KBD, NET ... > > > > One exception is the USB mouse driver which depends on "moused", and > > currently have some warnings because moused tries to load the old ums > > module, which fails. > > OK, now we're approaching half way. The moused thing should be > documented somewhere with a workaround (or fix). If the new ums2 module > is present before moused is started will it still try to load the old > one? Is there another workaround? Hi, What happens is this: 1. devd reports "ums0" like before. 2. moused is started 3. moused tries to kldload ums 4. The ums module depens on the usb module which is also tried loaded. 5. Loading the usb module fails. 6. moused finally tries to open /dev/ums0 and the mouse works like before. ums0: on usbus3 ums0: 3 buttons and [XYZ] coordinates Symlink: ums0 -> usb3.3.0.16 module_register: module pci/uhci already exists! Module pci/uhci failed to register: 17 module_register: module cardbus/uhci already exists! Module cardbus/uhci failed to register: 17 module_register: module pci/ohci already exists! Module pci/ohci failed to register: 17 module_register: module cardbus/ohci already exists! Module cardbus/ohci failed to register: 17 module_register: module pci/ehci already exists! Module pci/ehci failed to register: 17 module_register: module cardbus/ehci already exists! Module cardbus/ehci failed to register: 17 KLD ums.ko: depends on usb - not available > > What about the second thing: usbconfig? The USB stack will work fine without "usbconfig". Its purpose is mostly to view the currently attached USB devices, where the USB devices are located and to select a non-default USB configuration. One thing which might be missed is to change owner and permission of a USB device, which means you must be either UID=root or GID=OPERATOR to be able to use USB devices that create devices under /dev/ . --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 17:03:05 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C4F81065674 for ; Thu, 21 Aug 2008 17:03:05 +0000 (UTC) (envelope-from pfgshield-freebsd@yahoo.com) Received: from web32701.mail.mud.yahoo.com (web32701.mail.mud.yahoo.com [68.142.207.245]) by mx1.freebsd.org (Postfix) with SMTP id D6AD18FC1F for ; Thu, 21 Aug 2008 17:03:04 +0000 (UTC) (envelope-from pfgshield-freebsd@yahoo.com) Received: (qmail 80272 invoked by uid 60001); 21 Aug 2008 16:36:24 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=qduCAkejG6U8sRBhniCazHjSg2F+lHAOA1Y2Ps1VQ+33Rrwxx+3uDpSyZb1Wg3Er+sOg2GzBiDbxwxez1AkTZbCmEaVeJIPV7H4gFY5PkVr+UBx9i8kj8oXEPArJBT3GccMfrbR6pvqHM/Oti0uCNcqdWwzONWK5Am/2TtCiHEU=; X-YMail-OSG: EkM0csAVM1liIaJ99A5KZa7MVx3xYHLOfdKX8t3G3UWO.twq6nyWoRkgMBabYUrw8liEELfX4Jb1R_rVBKl1TBD7ZPsgjvhGtzqPlkh8LFU2qv06KCFSchkxfWHJ1F7XdP_QSfqFIrpQaQWmeF9_OSU- Received: from [190.158.44.53] by web32701.mail.mud.yahoo.com via HTTP; Thu, 21 Aug 2008 09:36:24 PDT X-Mailer: YahooMailWebService/0.7.218.2 Date: Thu, 21 Aug 2008 09:36:24 -0700 (PDT) From: Pedro Giffuni To: Peter B MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <548051.80257.qm@web32701.mail.mud.yahoo.com> Cc: usb@freebsd.org Subject: Re: USB Video class X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfgshield-freebsd@yahoo.com List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 17:03:05 -0000 BTW; There was/is also a NetBSD GSoC project: http://netbsd-soc.sourceforge.net/projects/uvc/ cheers, Pedro.=0A=0A__________________________________________________=0ADo You= Yahoo!?=0APoco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e t= i da tanto spazio gratuito per i tuoi file e i messaggi =0Ahttp://mail.yaho= o.it From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 17:26:54 2008 Return-Path: Delivered-To: FreeBSD-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDCA11065671 for ; Thu, 21 Aug 2008 17:26:54 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: from mail1.sea5.speakeasy.net (mail1.sea5.speakeasy.net [69.17.117.3]) by mx1.freebsd.org (Postfix) with ESMTP id BAE538FC14 for ; Thu, 21 Aug 2008 17:26:54 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: (qmail 15107 invoked from network); 21 Aug 2008 17:26:54 -0000 Received: from april.chuckr.org (HELO april.telenix.org) (chuckr@[66.92.151.30]) (envelope-sender ) by mail1.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 21 Aug 2008 17:26:54 -0000 Message-ID: <48ADA51C.5020107@telenix.org> Date: Thu, 21 Aug 2008 13:25:48 -0400 From: Chuck Robey User-Agent: Thunderbird 2.0.0.6 (X11/20071107) MIME-Version: 1.0 To: FreeBSD USB List X-Enigmail-Version: 0.95.5 OpenPGP: id=F3DCA0E9; url=http://pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: trying out the new usb stuff ... X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 17:26:54 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm not sure how to change my config to try out the new usb2 code. I saw where you mentioned the new config lines, but I'm not sure what to do with the devices I have in my kernel now (I don't use the modules for usb). I mean, things like usb, ohci, ehci, etc., do you keep them in or change them (and what's the complete list of required changes, not only the additions?) Lastly, are there any changes contemplated in the usb hid code? I'm not sure if it's my own ineptness, or bugs in the usbhid code, but there are parts of that libhibhid code that I've never been able to get to work (I needed to write my own), so I'm really interested if the usbhid stuff is going to change or not. Thanks. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkitpRwACgkQz62J6PPcoOkCFwCfYMkUkqgCnH26ScSe8p6q4VJF MOkAoJr9BFzpxhx17ZMaK1B1cHknUgBe =gEqx -----END PGP SIGNATURE----- From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 17:31:24 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AD8C1065671; Thu, 21 Aug 2008 17:31:24 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C0DA48FC17; Thu, 21 Aug 2008 17:31:22 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48ADA66A.3040906@FreeBSD.org> Date: Thu, 21 Aug 2008 19:31:22 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Hans Petter Selasky References: <20080818205914.GJ16977@elvis.mu.org> <200808211840.13109.hselasky@c2i.net> <48AD9B9A.8070403@FreeBSD.org> <200808211856.47568.hselasky@c2i.net> In-Reply-To: <200808211856.47568.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review [was Re: ...] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 17:31:24 -0000 Hans Petter Selasky wrote: > On Thursday 21 August 2008, Kris Kennaway wrote: >> Hans Petter Selasky wrote: >>> On Thursday 21 August 2008, Kris Kennaway wrote: >>>> Hans Petter Selasky wrote: >>>>>> * How much of the userland support is incomplete or in flux, and what >>>>>> functionality is missing for users of the usb2 code until it is >>>>>> finished? >>>>> The USB userland library is nearly complete. All it lacks is proper >>>>> documentation: >>>>> >>>>> svn --username anonsvn --password anonsvn \ >>>>> checkout svn://svn.turbocat.net/i4b/trunk/libusb20 >>>>> >>>>> The USB config utility is also starting to become finished. It will be >>>>> renamed to usbconfig. Currently it is called usbview : >>>>> >>>>> svn --username anonsvn --password anonsvn \ >>>>> checkout svn://svn.turbocat.net/i4b/trunk/usbview >>>> So...what functionality is missing for users of the usb2 code until it >>>> is finished? >>>> >>>> Stated even more clearly, what things will users of the USB2 code not be >>>> able to do until the above userland code is imported? >>>> >>>> Seriously, I'm trying to understand this! >>> Hi, >>> >>> There are some USB drivers which run in userland that will not work until >>> this library is complete. These are currently not part of the FreeBSD >>> distribution. You find them in /usr/ports : >>> >>> grep libusb /usr/ports/INDEX >>> >>> The kernel USB drivers provided under /sys/dev/usb2 do not directly >>> depend on any userland utilities, but rather indirectly through the TTY, >>> KBD, NET ... >>> >>> One exception is the USB mouse driver which depends on "moused", and >>> currently have some warnings because moused tries to load the old ums >>> module, which fails. >> OK, now we're approaching half way. The moused thing should be >> documented somewhere with a workaround (or fix). If the new ums2 module >> is present before moused is started will it still try to load the old >> one? Is there another workaround? > > Hi, > > What happens is this: > > 1. devd reports "ums0" like before. > 2. moused is started > 3. moused tries to kldload ums > 4. The ums module depens on the usb module which is also tried loaded. > 5. Loading the usb module fails. > 6. moused finally tries to open /dev/ums0 and the mouse works like before. > > ums0: 1.10/3.00, addr 3> on usbus3 > ums0: 3 buttons and [XYZ] coordinates > Symlink: ums0 -> usb3.3.0.16 > > module_register: module pci/uhci already exists! > Module pci/uhci failed to register: 17 > module_register: module cardbus/uhci already exists! > Module cardbus/uhci failed to register: 17 > module_register: module pci/ohci already exists! > Module pci/ohci failed to register: 17 > module_register: module cardbus/ohci already exists! > Module cardbus/ohci failed to register: 17 > module_register: module pci/ehci already exists! > Module pci/ehci failed to register: 17 > module_register: module cardbus/ehci already exists! > Module cardbus/ehci failed to register: 17 > KLD ums.ko: depends on usb - not available OK, so just cosmetic. It kind of sounds like moused is doing the wrong thing, but this can hopefully be fixed later. >> What about the second thing: usbconfig? > > The USB stack will work fine without "usbconfig". Its purpose is mostly to > view the currently attached USB devices, where the USB devices are located > and to select a non-default USB configuration. One thing which might be > missed is to change owner and permission of a USB device, which means you > must be either UID=root or GID=OPERATOR to be able to use USB devices that > create devices under /dev/ . OK great, this isn't critical either. I think all of the issues I raised are agreed upon now! Unfortunately since Alfred is going away for 3 weeks it looks like that is now going to put this on hold for a bit. It's probably a good thing that the initial import was delayed actually, since he is going to need to be available for the inevitable followup work after it gets imported, and leaving 3 days after the planned import would have really hurt that process. Unless someone else comes forward to take over from Alfred, here's what I recommend as a plan: * post the revised diff with the minor changes/bits left out that we have agreed upon. Users can continue to test this commit candidate while Alfred is away. * When Alfred gets back and has a block of free time, he will proceed with the import and handle followup commits to fix issues that are identified. * If the "commit candidate diff" changes in the meantime due to bug fixes etc, then you should keep the mailing list updated regularly with a pointer to the latest version of the commit candidate diff. Other new stuff like the forthcoming userland changes should stay out of this first diff for now so we don't invalidate things that have already been reviewed. * In the meantime you can continue to work on the missing stuff like manpages, userland, unbundling drivers, etc. With luck, some or all of this will also be ready by the time Alfred gets back, and you can post a second diff for review and subsequent commit around the same time. How does this plan sound to you? Kris From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 17:53:40 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 603661065691 for ; Thu, 21 Aug 2008 17:53:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 04B748FC24 for ; Thu, 21 Aug 2008 17:53:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7LHpfgc046889; Thu, 21 Aug 2008 11:51:41 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 21 Aug 2008 11:52:10 -0600 (MDT) Message-Id: <20080821.115210.-524876976.imp@bsdimp.com> In-Reply-To: <48ADA66A.3040906@FreeBSD.org> References: <48AD9B9A.8070403@FreeBSD.org> <200808211856.47568.hselasky@c2i.net> <48ADA66A.3040906@FreeBSD.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 17:53:40 -0000 In message: <48ADA66A.3040906@FreeBSD.org> Kris Kennaway writes: : Hans Petter Selasky wrote: : > On Thursday 21 August 2008, Kris Kennaway wrote: : >> Hans Petter Selasky wrote: : >>> On Thursday 21 August 2008, Kris Kennaway wrote: : >>>> Hans Petter Selasky wrote: : >>>>>> * How much of the userland support is incomplete or in flux, and what : >>>>>> functionality is missing for users of the usb2 code until it is : >>>>>> finished? : >>>>> The USB userland library is nearly complete. All it lacks is proper : >>>>> documentation: : >>>>> : >>>>> svn --username anonsvn --password anonsvn \ : >>>>> checkout svn://svn.turbocat.net/i4b/trunk/libusb20 : >>>>> : >>>>> The USB config utility is also starting to become finished. It will be : >>>>> renamed to usbconfig. Currently it is called usbview : : >>>>> : >>>>> svn --username anonsvn --password anonsvn \ : >>>>> checkout svn://svn.turbocat.net/i4b/trunk/usbview : >>>> So...what functionality is missing for users of the usb2 code until it : >>>> is finished? : >>>> : >>>> Stated even more clearly, what things will users of the USB2 code not be : >>>> able to do until the above userland code is imported? : >>>> : >>>> Seriously, I'm trying to understand this! : >>> Hi, : >>> : >>> There are some USB drivers which run in userland that will not work until : >>> this library is complete. These are currently not part of the FreeBSD : >>> distribution. You find them in /usr/ports : : >>> : >>> grep libusb /usr/ports/INDEX : >>> : >>> The kernel USB drivers provided under /sys/dev/usb2 do not directly : >>> depend on any userland utilities, but rather indirectly through the TTY, : >>> KBD, NET ... : >>> : >>> One exception is the USB mouse driver which depends on "moused", and : >>> currently have some warnings because moused tries to load the old ums : >>> module, which fails. : >> OK, now we're approaching half way. The moused thing should be : >> documented somewhere with a workaround (or fix). If the new ums2 module : >> is present before moused is started will it still try to load the old : >> one? Is there another workaround? : > : > Hi, : > : > What happens is this: : > : > 1. devd reports "ums0" like before. : > 2. moused is started : > 3. moused tries to kldload ums : > 4. The ums module depens on the usb module which is also tried loaded. : > 5. Loading the usb module fails. : > 6. moused finally tries to open /dev/ums0 and the mouse works like before. : > : > ums0: 1.10/3.00, addr 3> on usbus3 : > ums0: 3 buttons and [XYZ] coordinates : > Symlink: ums0 -> usb3.3.0.16 : > : > module_register: module pci/uhci already exists! : > Module pci/uhci failed to register: 17 : > module_register: module cardbus/uhci already exists! : > Module cardbus/uhci failed to register: 17 : > module_register: module pci/ohci already exists! : > Module pci/ohci failed to register: 17 : > module_register: module cardbus/ohci already exists! : > Module cardbus/ohci failed to register: 17 : > module_register: module pci/ehci already exists! : > Module pci/ehci failed to register: 17 : > module_register: module cardbus/ehci already exists! : > Module cardbus/ehci failed to register: 17 : > KLD ums.ko: depends on usb - not available : : OK, so just cosmetic. It kind of sounds like moused is doing the wrong : thing, but this can hopefully be fixed later. : : >> What about the second thing: usbconfig? : > : > The USB stack will work fine without "usbconfig". Its purpose is mostly to : > view the currently attached USB devices, where the USB devices are located : > and to select a non-default USB configuration. One thing which might be : > missed is to change owner and permission of a USB device, which means you : > must be either UID=root or GID=OPERATOR to be able to use USB devices that : > create devices under /dev/ . : : OK great, this isn't critical either. I think all of the issues I : raised are agreed upon now! : : Unfortunately since Alfred is going away for 3 weeks it looks like that : is now going to put this on hold for a bit. It's probably a good thing : that the initial import was delayed actually, since he is going to need : to be available for the inevitable followup work after it gets imported, : and leaving 3 days after the planned import would have really hurt that : process. : : Unless someone else comes forward to take over from Alfred, here's what : I recommend as a plan: : : * post the revised diff with the minor changes/bits left out that we : have agreed upon. Users can continue to test this commit candidate : while Alfred is away. : : * When Alfred gets back and has a block of free time, he will proceed : with the import and handle followup commits to fix issues that are : identified. : : * If the "commit candidate diff" changes in the meantime due to bug : fixes etc, then you should keep the mailing list updated regularly with : a pointer to the latest version of the commit candidate diff. Other new : stuff like the forthcoming userland changes should stay out of this : first diff for now so we don't invalidate things that have already been : reviewed. : : * In the meantime you can continue to work on the missing stuff like : manpages, userland, unbundling drivers, etc. With luck, some or all of : this will also be ready by the time Alfred gets back, and you can post a : second diff for review and subsequent commit around the same time. : : How does this plan sound to you? I'd be willing to pick up the ball a little bit here: There's some base system (not driver) issues that can be resolved so that we can improve the quality of the commit candidates and underlying FreeBSD. Warner From owner-freebsd-usb@FreeBSD.ORG Thu Aug 21 18:07:09 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 938C8106568A for ; Thu, 21 Aug 2008 18:07:09 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id 290348FC23 for ; Thu, 21 Aug 2008 18:07:08 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=fyLvYZp7xZAA:10 a=BbDwgmqKlHIA:10 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=lqGwVcz9kNzltA7ObZcA:9 a=WCjZRPY8LiIybvBY3d0A:7 a=SSKbopsvdwRBJ7mfdZ_BU5VA41QA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1052523031; Thu, 21 Aug 2008 20:07:07 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 21 Aug 2008 20:08:48 +0200 User-Agent: KMail/1.9.7 References: <48ADA51C.5020107@telenix.org> In-Reply-To: <48ADA51C.5020107@telenix.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808212008.50544.hselasky@c2i.net> Cc: Subject: Re: trying out the new usb stuff ... X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 18:07:09 -0000 On Thursday 21 August 2008, Chuck Robey wrote: > I'm not sure how to change my config to try out the new usb2 code. I saw > where you mentioned the new config lines, but I'm not sure what to do with > the devices I have in my kernel now (I don't use the modules for usb). I > mean, things like usb, ohci, ehci, etc., do you keep them in or change them > (and what's the complete list of required changes, not only the additions?) Hi Chuck, 1. Remove all the USB modules from the kernel config. 2. Add this to your /boot/loader.conf after installing the patches and building a new kernel. usb2_core_load=YES usb2_controller_load=YES usb2_input_load=YES > Lastly, are there any changes contemplated in the usb hid code? I'm not > sure if it's my own ineptness, or bugs in the usbhid code, but there are > parts of that libhibhid code that I've never been able to get to work (I > needed to write my own), so I'm really interested if the usbhid stuff is > going to change or not. Yes, there are some new IOCTLs which might solve some of your problems. /* Generic HID device */ #define USB_GET_REPORT_DESC _IOR ('U', 21, struct usb2_gen_descriptor) #define USB_SET_IMMED _IOW ('U', 22, int) #define USB_GET_REPORT _IOWR('U', 23, struct usb2_gen_descriptor) #define USB_SET_REPORT _IOW ('U', 24, struct usb2_gen_descriptor) #define USB_GET_REPORT_ID _IOR ('U', 25, int) struct usb2_gen_descriptor { void *ugd_data; uint16_t ugd_lang_id; uint16_t ugd_maxlen; uint16_t ugd_actlen; uint16_t ugd_offset; uint8_t ugd_config_index; uint8_t ugd_string_index; uint8_t ugd_iface_index; uint8_t ugd_altif_index; uint8_t ugd_endpt_index; uint8_t ugd_report_type; uint8_t reserved[8]; }; For UHID you only need to initialise ugd_data, ugd_maxlen and ugd_report_type . --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Aug 22 08:45:47 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE3F31065687 for ; Fri, 22 Aug 2008 08:45:47 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 60C658FC1B for ; Fri, 22 Aug 2008 08:45:46 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A55D8B.dip.t-dialin.net [84.165.93.139]) by redbull.bpaserver.net (Postfix) with ESMTP id 08BEC2E0F5; Fri, 22 Aug 2008 10:29:28 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 759BE1301F5; Fri, 22 Aug 2008 10:29:25 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id m7M8TPTH030350; Fri, 22 Aug 2008 10:29:25 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 22 Aug 2008 10:29:25 +0200 Message-ID: <20080822102925.12906gou50yqgpvw@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Fri, 22 Aug 2008 10:29:25 +0200 From: "Alexander Leidinger" To: "M. Warner Losh" References: <48AD9B9A.8070403@FreeBSD.org> <200808211856.47568.hselasky@c2i.net> <48ADA66A.3040906@FreeBSD.org> <20080821.115210.-524876976.imp@bsdimp.com> In-Reply-To: <20080821.115210.-524876976.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.2) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 08BEC2E0F5.43373 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-11.627, required 6, BAYES_00 -15.00, J_CHICKENPOX_33 0.60, J_CHICKENPOX_34 0.60, J_CHICKENPOX_38 0.60, MIME_QP_LONG_LINE 1.40, RDNS_DYNAMIC 0.10, TW_EV 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2008 08:45:47 -0000 Quoting "M. Warner Losh" (from Thu, 21 Aug 2008 =20 11:52:10 -0600 (MDT)): > In message: <48ADA66A.3040906@FreeBSD.org> > Kris Kennaway writes: > : Hans Petter Selasky wrote: > : > The USB stack will work fine without "usbconfig". Its purpose is =20 > : > mostly to > : > view the currently attached USB devices, where the USB devices : =20 > > are located > : > and to select a non-default USB configuration. One thing which might b= e > : > missed is to change owner and permission of a USB device, which means = you > : > must be either UID=3Droot or GID=3DOPERATOR to be able to use USB : = =20 > > devices that > : > create devices under /dev/ . > : > : OK great, this isn't critical either. I think all of the issues I > : raised are agreed upon now! Wait a moment. Does this mean the devfs stuff to handle the access =20 rights (devfs.rules or manual chown/chmod by root) does not work with =20 the new usb stuff? If the answer is yes, I would see this as some kind =20 of nasty bug (I don't think this shall be a showstopper, as long as =20 this is fixed later). Bye, Alexander. --=20 The scratch on the record is always through the song you like most. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-usb@FreeBSD.ORG Fri Aug 22 08:59:43 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 881B41065673 for ; Fri, 22 Aug 2008 08:59:43 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2296D8FC1D; Fri, 22 Aug 2008 08:59:41 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48AE7FFA.7070502@FreeBSD.org> Date: Fri, 22 Aug 2008 10:59:38 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Alexander Leidinger References: <48AD9B9A.8070403@FreeBSD.org> <200808211856.47568.hselasky@c2i.net> <48ADA66A.3040906@FreeBSD.org> <20080821.115210.-524876976.imp@bsdimp.com> <20080822102925.12906gou50yqgpvw@webmail.leidinger.net> In-Reply-To: <20080822102925.12906gou50yqgpvw@webmail.leidinger.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2008 08:59:43 -0000 Alexander Leidinger wrote: > Quoting "M. Warner Losh" (from Thu, 21 Aug 2008 > 11:52:10 -0600 (MDT)): > >> In message: <48ADA66A.3040906@FreeBSD.org> >> Kris Kennaway writes: >> : Hans Petter Selasky wrote: > >> : > The USB stack will work fine without "usbconfig". Its purpose is : >> > mostly to >> : > view the currently attached USB devices, where the USB devices : > >> are located >> : > and to select a non-default USB configuration. One thing which >> might be >> : > missed is to change owner and permission of a USB device, which >> means you >> : > must be either UID=root or GID=OPERATOR to be able to use USB : > >> devices that >> : > create devices under /dev/ . >> : >> : OK great, this isn't critical either. I think all of the issues I >> : raised are agreed upon now! > > Wait a moment. Does this mean the devfs stuff to handle the access > rights (devfs.rules or manual chown/chmod by root) does not work with > the new usb stuff? If the answer is yes, I would see this as some kind > of nasty bug (I don't think this shall be a showstopper, as long as this > is fixed later). Yes, he said it will be fixed later. Kris From owner-freebsd-usb@FreeBSD.ORG Fri Aug 22 09:37:47 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B0831065693 for ; Fri, 22 Aug 2008 09:37:47 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id BCE048FC2D for ; Fri, 22 Aug 2008 09:37:46 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A55B75.dip.t-dialin.net [84.165.91.117]) by redbull.bpaserver.net (Postfix) with ESMTP id 111AB2E15A; Fri, 22 Aug 2008 11:37:42 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 3A90A1396AB; Fri, 22 Aug 2008 11:37:39 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id m7M9bcUb041874; Fri, 22 Aug 2008 11:37:38 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 22 Aug 2008 11:37:38 +0200 Message-ID: <20080822113738.75855zbz0hkckp8o@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Fri, 22 Aug 2008 11:37:38 +0200 From: "Alexander Leidinger" To: "Kris Kennaway" References: <48AD9B9A.8070403@FreeBSD.org> <200808211856.47568.hselasky@c2i.net> <48ADA66A.3040906@FreeBSD.org> <20080821.115210.-524876976.imp@bsdimp.com> <20080822102925.12906gou50yqgpvw@webmail.leidinger.net> <48AE7FFA.7070502@FreeBSD.org> In-Reply-To: <48AE7FFA.7070502@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.2) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 111AB2E15A.A46B7 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-11.627, required 6, BAYES_00 -15.00, J_CHICKENPOX_33 0.60, J_CHICKENPOX_34 0.60, J_CHICKENPOX_38 0.60, MIME_QP_LONG_LINE 1.40, RDNS_DYNAMIC 0.10, TW_EV 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-usb@FreeBSD.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2008 09:37:47 -0000 Quoting "Kris Kennaway" (from Fri, 22 Aug 2008 =20 10:59:38 +0200): > Alexander Leidinger wrote: >> Quoting "M. Warner Losh" (from Thu, 21 Aug 2008 =20 >> 11:52:10 -0600 (MDT)): >> >>> In message: <48ADA66A.3040906@FreeBSD.org> >>> Kris Kennaway writes: >>> : Hans Petter Selasky wrote: >> >>> : > The USB stack will work fine without "usbconfig". Its purpose =20 >>> is : > mostly to >>> : > view the currently attached USB devices, where the USB devices =20 >>> : > are located >>> : > and to select a non-default USB configuration. One thing which might= be >>> : > missed is to change owner and permission of a USB device, =20 >>> which means you >>> : > must be either UID=3Droot or GID=3DOPERATOR to be able to use USB = =20 >>> : > devices that >>> : > create devices under /dev/ . >>> : >>> : OK great, this isn't critical either. I think all of the issues I >>> : raised are agreed upon now! >> >> Wait a moment. Does this mean the devfs stuff to handle the access =20 >> rights (devfs.rules or manual chown/chmod by root) does not work =20 >> with the new usb stuff? If the answer is yes, I would see this as =20 >> some kind of nasty bug (I don't think this shall be a showstopper, =20 >> as long as this is fixed later). > > Yes, he said it will be fixed later. You are aware that I point out that this may or may not suggest that =20 HPS is circumventing the normal devfs infrastructure and that this may =20 or may not be a problem and should be reviewed by someone with =20 knowledge about the devfs infrastructure? And as he mentioned that in the context of the userland utilities, it =20 may be interesting if this means if an USB specific userland utility =20 will be responsible to change the ownership and file access or not. If =20 yes, what are the consequences from a security point of view and what =20 about POLA (devfs.rules, chown/chmod)? I want to see this new USB subsystem, but if the answer to the above =20 paragraph is yes, then this would be a showstopper for me (IMO the =20 replacement should work in this regard as before, I don't say it can =20 not be changed after enough people agree that the replacement was =20 successful). Bye, Alexander. --=20 Such a fine first dream! But they laughed at me; they said I had made it up. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-usb@FreeBSD.ORG Fri Aug 22 15:30:04 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 796551065684 for ; Fri, 22 Aug 2008 15:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 57A748FC20 for ; Fri, 22 Aug 2008 15:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7MFU4Me054356 for ; Fri, 22 Aug 2008 15:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7MFU4no054352; Fri, 22 Aug 2008 15:30:04 GMT (envelope-from gnats) Resent-Date: Fri, 22 Aug 2008 15:30:04 GMT Resent-Message-Id: <200808221530.m7MFU4no054352@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Aled Morris Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E060106570B for ; Fri, 22 Aug 2008 15:29:55 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 1E5808FC1F for ; Fri, 22 Aug 2008 15:29:55 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m7MFTs8o065283 for ; Fri, 22 Aug 2008 15:29:54 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m7MFTsOT065282; Fri, 22 Aug 2008 15:29:54 GMT (envelope-from nobody) Message-Id: <200808221529.m7MFTsOT065282@www.freebsd.org> Date: Fri, 22 Aug 2008 15:29:54 GMT From: Aled Morris To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/126740: ulpt doesn't work on 7.0-RELEASE X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2008 15:30:04 -0000 >Number: 126740 >Category: usb >Synopsis: ulpt doesn't work on 7.0-RELEASE >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 22 15:30:03 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Aled Morris >Release: 7.0-RELEASE >Organization: >Environment: FreeBSD kryten.carneddi.net 7.0-RELEASE FreeBSD 7.0-RELEASE #1: Fri Aug 22 15:21:55 BST 2008 aledm@kryten.carneddi.net:/usr/src/sys/i386/compile/DELL i386 >Description: Trying to print to a Dymo label printer 400 connected via USB to my Dell 6000 laptop running 7.0-RELEASE. This used to work on this hardware under an older release of FreeBSD 5. The printer works on the same hardware if I boot Windows XP. The symptom is that writing to the USB port times out and returns an error EIO. I am trying to use CUPS however the problem also appears if you just do: # echo hello >/dev/ulpt0 su: echo: write error: Input/output error There is a delay of exactly 10 seconds before the error message is printed. Here is the output of dmesg with USB_DEBUG set to 999: ulptopen: flags=0x0 ulpt_reset usbd_alloc_xfer() = 0xc58ea600 usbd_transfer: xfer=0xc58ea600, flags=2, pipe=0xc5414800, running=0 usbd_dump_queue: pipe=0xc5414800 usb_insert_transfer: pipe=0xc5414800 running=0 timeout=5000 usb_event_thread: woke up usb_discover usb_add_task: task=0xc58ea790 usb_task_thread: woke up task=0xc58ea790 usb_schedsoftintr: polling=0 usb_transfer_complete: pipe=0xc5414800 xfer=0xc58ea600 status=15 actlen=0 usb_transfer_complete: repeat=0 new head=0 usbd_start_next: pipe=0xc5414800, xfer=0 usbd_free_xfer: 0xc58ea600 usbd_alloc_xfer() = 0xc58ea600 usbd_transfer: xfer=0xc58ea600, flags=2, pipe=0xc5414800, running=0 usbd_dump_queue: pipe=0xc5414800 usb_insert_transfer: pipe=0xc5414800 running=0 timeout=5000 usb_add_task: task=0xc58ea790 usb_task_thread: woke up task=0xc58ea790 usb_schedsoftintr: polling=0 usb_transfer_complete: pipe=0xc5414800 xfer=0xc58ea600 status=15 actlen=0 usb_transfer_complete: repeat=0 new head=0 usbd_start_next: pipe=0xc5414800, xfer=0 usbd_free_xfer: 0xc58ea600 usbd_open_pipe: iface=0xc655cd60 address=0x2 flags=0x0 usbd_setup_pipe: dev=0xc6796780 iface=0xc655cd60 ep=0xc655c8cc pipe=0xe7b4f9a8 usbd_alloc_xfer() = 0xc58ea600 ulpt_open: open input pipe usbd_open_pipe: iface=0xc655cd60 address=0x82 flags=0x0 usbd_setup_pipe: dev=0xc6796780 iface=0xc655cd60 ep=0xc655c8c0 pipe=0xe7b4f9a8 usbd_alloc_xfer() = 0xc527d200 ulpt_open: start read callout ulptopen: done, error=0 ulptwrite usbd_alloc_xfer() = 0xc58ea400 usbd_transfer: xfer=0xc58ea400, flags=2, pipe=0xc5414800, running=0 usbd_dump_queue: pipe=0xc5414800 usb_insert_transfer: pipe=0xc5414800 running=0 timeout=5000 usb_schedsoftintr: polling=0 usb_transfer_complete: pipe=0xc5414800 xfer=0xc58ea400 status=0 actlen=1 usb_transfer_complete: repeat=0 new head=0 usbd_start_next: pipe=0xc5414800, xfer=0 usbd_free_xfer: 0xc58ea400 ulpt_status: status=0x18 err=0 ulptwrite: transfer 6 bytes usbd_bulk_transfer: start transfer 6 bytes usbd_transfer: xfer=0xc58ea600, flags=1, pipe=0xc6796400, running=0 usbd_dump_queue: pipe=0xc6796400 usb_insert_transfer: pipe=0xc6796400 running=0 timeout=0 usb_schedsoftintr: polling=0 usb_transfer_complete: pipe=0xc6796400 xfer=0xc58ea600 status=17 actlen=6 usb_transfer_complete: repeat=0 new head=0 usbd_start_next: pipe=0xc6796400, xfer=0 usbd_bulk_transfer: transferred 6 usbd_bulk_transfer: error=17 usbd_clear_endpoint_stall usbd_alloc_xfer() = 0xc58ea400 usbd_transfer: xfer=0xc58ea400, flags=2, pipe=0xc5414800, running=0 usbd_dump_queue: pipe=0xc5414800 usb_insert_transfer: pipe=0xc5414800 running=0 timeout=5000 usb_schedsoftintr: polling=0 usb_schedsoftintr: polling=0 usb_transfer_complete: pipe=0xc5414800 xfer=0xc58ea400 status=0 actlen=0 usb_transfer_complete: repeat=0 new head=0 usbd_start_next: pipe=0xc5414800, xfer=0 usbd_free_xfer: 0xc58ea400 ulptwrite: error=17 usbd_ar_pipe: pipe=0xc6796400 usbd_dump_queue: pipe=0xc6796400 usbd_free_xfer: 0xc58ea600 usbd_ar_pipe: pipe=0xc61d1800 usbd_dump_queue: pipe=0xc61d1800 usbd_free_xfer: 0xc527d200 ulptclose: closed >How-To-Repeat: echo hello >/dev/ulpt0 >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Fri Aug 22 16:07:45 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C36141065672 for ; Fri, 22 Aug 2008 16:07:45 +0000 (UTC) (envelope-from danfe@regency.nsu.ru) Received: from mx.nsu.ru (mx.nsu.ru [212.192.164.5]) by mx1.freebsd.org (Postfix) with ESMTP id 73AE08FC22 for ; Fri, 22 Aug 2008 16:07:45 +0000 (UTC) (envelope-from danfe@regency.nsu.ru) Received: from regency.nsu.ru ([193.124.210.26]) by mx.nsu.ru with esmtp (Exim 4.50) id 1KWYGq-0007rM-OQ for freebsd-usb@freebsd.org; Fri, 22 Aug 2008 22:09:48 +0700 Received: from regency.nsu.ru (localhost [127.0.0.1]) by regency.nsu.ru (8.14.2/8.14.2) with ESMTP id m7MFC97s029980 for ; Fri, 22 Aug 2008 22:12:09 +0700 (NOVST) (envelope-from danfe@regency.nsu.ru) Received: (from danfe@localhost) by regency.nsu.ru (8.14.2/8.14.2/Submit) id m7MFC1Tj029894 for freebsd-usb@freebsd.org; Fri, 22 Aug 2008 22:12:01 +0700 (NOVST) (envelope-from danfe) Date: Fri, 22 Aug 2008 22:12:01 +0700 From: Alexey Dokuchaev To: freebsd-usb@freebsd.org Message-ID: <20080822151201.GA23538@regency.nsu.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: PR usb/117185 anyone? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2008 16:07:45 -0000 Hi there, I'm wondering if anyone can take a look at PR usb/117185 and possibly commit it? It looks those patches were well-tested for quite a few months already. I'm eager to provide any needed assistance with this patch (further review, testing, etc.). Patches for RELENG_6|7 and -CURRENT available. Thanks. ./danfe From owner-freebsd-usb@FreeBSD.ORG Fri Aug 22 19:48:47 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DE19106567E for ; Fri, 22 Aug 2008 19:48:47 +0000 (UTC) (envelope-from pb@ludd.ltu.se) Received: from mother.ludd.ltu.se (mother.ludd.ltu.se [130.240.16.3]) by mx1.freebsd.org (Postfix) with ESMTP id CFD8E8FC1D for ; Fri, 22 Aug 2008 19:48:46 +0000 (UTC) (envelope-from pb@ludd.ltu.se) Received: from brother.ludd.ltu.se (root@brother.ludd.ltu.se [130.240.16.78]) by mother.ludd.ltu.se (8.13.6+Sun/8.12.10) with ESMTP id m7MJmg3a029455 for ; Fri, 22 Aug 2008 21:48:42 +0200 (MEST) Received: from brother.ludd.ltu.se (pb@localhost [127.0.0.1]) by brother.ludd.ltu.se (8.13.6+Sun/8.12.2) with ESMTP id m7MJmgPL004099 for ; Fri, 22 Aug 2008 21:48:42 +0200 (MEST) Received: (from pb@localhost) by brother.ludd.ltu.se (8.13.6+Sun/8.13.6/Submit) id m7MJmglt004097 for freebsd-usb@freebsd.org; Fri, 22 Aug 2008 21:48:42 +0200 (MEST) From: Peter B Message-Id: <200808221948.m7MJmglt004097@brother.ludd.ltu.se> To: freebsd-usb@freebsd.org Date: Fri, 22 Aug 2008 21:48:42 +0200 (MEST) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: usb match() function X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2008 19:48:47 -0000 Within the usb drivers (/usr/src/sys/dev/usb/u*.c) there's an matching routine where the 'uaa->iface' is supposed to be assigned before the routine is called. However for a new device or class this doesn't seem to work. Instead 'uaa' is set like for an generic device (two interfaces, no "default" in my case). So how is one supposed to make the kernel fill in 'uaa->iface' ..? Code excerpt: static int *_match(device_t self) { struct usb_attach_arg *uaa = device_get_ivars(self); usb_interface_descriptor_t *id; DPRINTFN(10,("*_match\n")); if (uaa->iface == NULL) return (UMATCH_NONE); From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 06:02:25 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 822F0106567A; Sat, 23 Aug 2008 06:02:25 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.tele2.se [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id B5A658FC1C; Sat, 23 Aug 2008 06:02:24 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=FNElq6XFfkv-g7DqHw4A:9 a=a_PVOH4tN_K0U0LFHgQA:7 a=f4vTnEZIY0p6JHzP18tWycpgGysA:4 a=SV7veod9ZcQA:10 a=cvZW9r6VXHAA:10 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 659827833; Sat, 23 Aug 2008 08:02:22 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 23 Aug 2008 08:03:55 +0200 User-Agent: KMail/1.9.7 References: <48AD9B9A.8070403@FreeBSD.org> <48AE7FFA.7070502@FreeBSD.org> <20080822113738.75855zbz0hkckp8o@webmail.leidinger.net> In-Reply-To: <20080822113738.75855zbz0hkckp8o@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808230804.03275.hselasky@c2i.net> Cc: Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 06:02:25 -0000 On Friday 22 August 2008, Alexander Leidinger wrote: > Quoting "Kris Kennaway" (from Fri, 22 Aug 2008 > > 10:59:38 +0200): > > Alexander Leidinger wrote: > >> Quoting "M. Warner Losh" (from Thu, 21 Aug 2008 > >> > >> 11:52:10 -0600 (MDT)): > >>> In message: <48ADA66A.3040906@FreeBSD.org> > >>> > >>> Kris Kennaway writes: > >>> : Hans Petter Selasky wrote: > >>> : > The USB stack will work fine without "usbconfig". Its purpose > >>> > >>> is : > mostly to > >>> > >>> : > view the currently attached USB devices, where the USB devices > >>> : > are located > >>> : > and to select a non-default USB configuration. One thing which > >>> : > might be missed is to change owner and permission of a USB device, > >>> > >>> which means you > >>> > >>> : > must be either UID=root or GID=OPERATOR to be able to use USB > >>> : > devices that > >>> : > create devices under /dev/ . > >>> : > >>> : OK great, this isn't critical either. I think all of the issues I > >>> : raised are agreed upon now! > >> > >> Wait a moment. Does this mean the devfs stuff to handle the access > >> rights (devfs.rules or manual chown/chmod by root) does not work > >> with the new usb stuff? If the answer is yes, I would see this as > >> some kind of nasty bug (I don't think this shall be a showstopper, > >> as long as this is fixed later). > > > > Yes, he said it will be fixed later. > > You are aware that I point out that this may or may not suggest that > HPS is circumventing the normal devfs infrastructure and that this may > or may not be a problem and should be reviewed by someone with > knowledge about the devfs infrastructure? > > And as he mentioned that in the context of the userland utilities, it > may be interesting if this means if an USB specific userland utility > will be responsible to change the ownership and file access or not. If > yes, what are the consequences from a security point of view and what > about POLA (devfs.rules, chown/chmod)? > > I want to see this new USB subsystem, but if the answer to the above > paragraph is yes, then this would be a showstopper for me (IMO the > replacement should work in this regard as before, I don't say it can > not be changed after enough people agree that the replacement was > successful). > > Bye, > Alexander. Hi Alexander, You have to ask Paul Henning Kamp about that. He does not like the idea about /dev/ being the inventory list. Besides, there are no more visible /dev/ devices. All devices are so-called cloneable and invisible, so you need a separate utility. The good news is that you can set the permissions on a USB subtree (a HUB and all subdevices) before devices are eventually plugged ! --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 06:11:22 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19F7B106566B for ; Sat, 23 Aug 2008 06:11:22 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.swip.net [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id A29768FC14 for ; Sat, 23 Aug 2008 06:11:21 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=FpyXMhlm8Iw7h970FWUA:9 a=oaoaxbByU1mF0bYq7Z8A:7 a=ITY0qFmhrg5hg_3tk3qhEYI8-k4A:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 308905427; Sat, 23 Aug 2008 08:11:19 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 23 Aug 2008 08:13:05 +0200 User-Agent: KMail/1.9.7 References: <200808221948.m7MJmglt004097@brother.ludd.ltu.se> In-Reply-To: <200808221948.m7MJmglt004097@brother.ludd.ltu.se> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808230813.05981.hselasky@c2i.net> Cc: Peter B Subject: Re: usb match() function X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 06:11:22 -0000 On Friday 22 August 2008, Peter B wrote: > Within the usb drivers (/usr/src/sys/dev/usb/u*.c) there's an matching > routine where the 'uaa->iface' is supposed to be assigned before the > routine is called. > > However for a new device or class this doesn't seem to work. Instead 'uaa' > is set like for an generic device (two interfaces, no "default" in my > case). > > So how is one supposed to make the kernel fill in 'uaa->iface' ..? > > Code excerpt: > static int > *_match(device_t self) > { > struct usb_attach_arg *uaa = device_get_ivars(self); > usb_interface_descriptor_t *id; > > DPRINTFN(10,("*_match\n")); > if (uaa->iface == NULL) > return (UMATCH_NONE); It is usually like this the the probe function is called once with iface == NULL, to give the driver a chance to claim the whole device. The you have to set the config yourself. If this fails, the iface is set to the various interfaces to hook on interface specific drivers. BTW: This feature is going away. All probes will be interface specific and the config can only be set from userland in the future. --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 07:39:57 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85FDB106564A; Sat, 23 Aug 2008 07:39:57 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 2BD148FC19; Sat, 23 Aug 2008 07:39:57 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A55B75.dip.t-dialin.net [84.165.91.117]) by redbull.bpaserver.net (Postfix) with ESMTP id C31452E51C; Sat, 23 Aug 2008 09:39:45 +0200 (CEST) Received: from deskjail (deskjail.Leidinger.net [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id 35150130C30; Sat, 23 Aug 2008 09:39:41 +0200 (CEST) Date: Sat, 23 Aug 2008 09:39:40 +0200 From: Alexander Leidinger To: Hans Petter Selasky Message-ID: <20080823093940.179e54ec@deskjail> In-Reply-To: <200808230804.03275.hselasky@c2i.net> References: <48AD9B9A.8070403@FreeBSD.org> <48AE7FFA.7070502@FreeBSD.org> <20080822113738.75855zbz0hkckp8o@webmail.leidinger.net> <200808230804.03275.hselasky@c2i.net> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i686-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: C31452E51C.F2228 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-12.423, required 6, BAYES_00 -15.00, J_CHICKENPOX_33 0.60, J_CHICKENPOX_34 0.60, J_CHICKENPOX_38 0.60, J_CHICKENPOX_55 0.60, RDNS_DYNAMIC 0.10, TW_EV 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 07:39:57 -0000 Quoting Hans Petter Selasky (Sat, 23 Aug 2008 08:03:55 +0200): > On Friday 22 August 2008, Alexander Leidinger wrote: > > Quoting "Kris Kennaway" (from Fri, 22 Aug 2008 > > > > 10:59:38 +0200): > > > Alexander Leidinger wrote: > > >> Quoting "M. Warner Losh" (from Thu, 21 Aug 2008 > > >> > > >> 11:52:10 -0600 (MDT)): > > >>> In message: <48ADA66A.3040906@FreeBSD.org> > > >>> > > >>> Kris Kennaway writes: > > >>> : Hans Petter Selasky wrote: > > >>> : > The USB stack will work fine without "usbconfig". Its purpose > > >>> > > >>> is : > mostly to > > >>> > > >>> : > view the currently attached USB devices, where the USB devices > > >>> : > are located > > >>> : > and to select a non-default USB configuration. One thing which > > >>> : > might be missed is to change owner and permission of a USB device, > > >>> > > >>> which means you > > >>> > > >>> : > must be either UID=root or GID=OPERATOR to be able to use USB > > >>> : > devices that > > >>> : > create devices under /dev/ . > > >>> : > > >>> : OK great, this isn't critical either. I think all of the issues I > > >>> : raised are agreed upon now! > > >> > > >> Wait a moment. Does this mean the devfs stuff to handle the access > > >> rights (devfs.rules or manual chown/chmod by root) does not work > > >> with the new usb stuff? If the answer is yes, I would see this as > > >> some kind of nasty bug (I don't think this shall be a showstopper, > > >> as long as this is fixed later). > > > > > > Yes, he said it will be fixed later. > > > > You are aware that I point out that this may or may not suggest that > > HPS is circumventing the normal devfs infrastructure and that this may > > or may not be a problem and should be reviewed by someone with > > knowledge about the devfs infrastructure? > > > > And as he mentioned that in the context of the userland utilities, it > > may be interesting if this means if an USB specific userland utility > > will be responsible to change the ownership and file access or not. If > > yes, what are the consequences from a security point of view and what > > about POLA (devfs.rules, chown/chmod)? > > > > I want to see this new USB subsystem, but if the answer to the above > > paragraph is yes, then this would be a showstopper for me (IMO the > > replacement should work in this regard as before, I don't say it can > > not be changed after enough people agree that the replacement was > > successful). > > > > Bye, > > Alexander. > > Hi Alexander, > > You have to ask Paul Henning Kamp about that. He does not like the idea > about /dev/ being the inventory list. We already have a lot of cloning devices, so it's not about showing a device node in /dev or not, I'm talking about chmod/chflags/devfs.rules. > Besides, there are no more visible /dev/ devices. All devices are so-called > cloneable and invisible, so you need a separate utility. The good news is No, devfs.rules is handling this case already, no need for another utility: ---snip--- NAME devfs.rules -- devfs configuration information DESCRIPTION The devfs.rules file provides an easy way to create and apply devfs(8) rules, even for devices that are not available at boot. For devices available at boot, see devfs.conf(5). ---snip--- With your new utility you are changing the security policy, and this without discussing this in public (who is able to change the permissions, are changes permanent and survive a reboot, ...). With devfs.rules we already have a tested and reviewed feature where root can configure access. > that you can set the permissions on a USB subtree (a HUB and all subdevices) > before devices are eventually plugged ! I don't know of a scenario where this is useful, but I'm not surprised if someone has an use for this. And I think this feature can be available while respecting the current semantics of devfs and devfs.rules (e.g. if your feature is used, give priority to it, else respect devfs.rules). Bye, Alexander. -- Ferengi Rule of Acquisition #7: Keep your ears open. -- ST:DS9, "In the Hands of the Prophets" http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 08:33:12 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E649F1065677; Sat, 23 Aug 2008 08:33:11 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id EA57D8FC18; Sat, 23 Aug 2008 08:33:10 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=6MIg2jpqvhTpo/gR8GzG7Q==:17 a=5gPc6H2cNbsBM-1_2b4A:9 a=DoRn7lymv3yAQVxjFuMA:7 a=RSDQO-m5Q2LyUzdJ3xywOdCo5ocA:4 a=9aOQ2cSd83gA:10 a=SV7veod9ZcQA:10 a=cvZW9r6VXHAA:10 a=50e4U0PicR4A:10 Received: from [62.113.133.243] (account mc467741@c2i.net [62.113.133.243] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1047474294; Sat, 23 Aug 2008 10:33:08 +0200 From: Hans Petter Selasky To: Alexander Leidinger Date: Sat, 23 Aug 2008 10:34:53 +0200 User-Agent: KMail/1.9.7 References: <48AD9B9A.8070403@FreeBSD.org> <200808230804.03275.hselasky@c2i.net> <20080823093940.179e54ec@deskjail> In-Reply-To: <20080823093940.179e54ec@deskjail> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808231034.54484.hselasky@c2i.net> Cc: phk@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 08:33:12 -0000 Hi, I've CC'ed PHK in case he has any comments on this issue. I think the solution is that you use "devd.conf" instead of "devfs.conf" to do this in the future. The problem about "devfs.rules" with regard to USB is that you don't know what you are giving permissions to. A rule that gives permission to "/dev/ulpt0" will give permissions to the first printer you plug into the USB system. That is not neccessarily what the user wants. --HPS On Saturday 23 August 2008, Alexander Leidinger wrote: > Quoting Hans Petter Selasky (Sat, 23 Aug 2008 08:03:55 +0200): > > On Friday 22 August 2008, Alexander Leidinger wrote: > > > Quoting "Kris Kennaway" (from Fri, 22 Aug 2008 > > > > > > 10:59:38 +0200): > > > > Alexander Leidinger wrote: > > > >> Quoting "M. Warner Losh" (from Thu, 21 Aug 2008 > > > >> > > > >> 11:52:10 -0600 (MDT)): > > > >>> In message: <48ADA66A.3040906@FreeBSD.org> > > > >>> > > > >>> Kris Kennaway writes: > > > >>> : Hans Petter Selasky wrote: > > > >>> : > The USB stack will work fine without "usbconfig". Its purpose > > > >>> > > > >>> is : > mostly to > > > >>> > > > >>> : > view the currently attached USB devices, where the USB devices > > > >>> : > are located > > > >>> : > and to select a non-default USB configuration. One thing which > > > >>> : > might be missed is to change owner and permission of a USB > > > >>> : > device, > > > >>> > > > >>> which means you > > > >>> > > > >>> : > must be either UID=root or GID=OPERATOR to be able to use USB > > > >>> : > devices that > > > >>> : > create devices under /dev/ . > > > >>> : > > > >>> : OK great, this isn't critical either. I think all of the issues > > > >>> : I raised are agreed upon now! > > > >> > > > >> Wait a moment. Does this mean the devfs stuff to handle the access > > > >> rights (devfs.rules or manual chown/chmod by root) does not work > > > >> with the new usb stuff? If the answer is yes, I would see this as > > > >> some kind of nasty bug (I don't think this shall be a showstopper, > > > >> as long as this is fixed later). > > > > > > > > Yes, he said it will be fixed later. > > > > > > You are aware that I point out that this may or may not suggest that > > > HPS is circumventing the normal devfs infrastructure and that this may > > > or may not be a problem and should be reviewed by someone with > > > knowledge about the devfs infrastructure? > > > > > > And as he mentioned that in the context of the userland utilities, it > > > may be interesting if this means if an USB specific userland utility > > > will be responsible to change the ownership and file access or not. If > > > yes, what are the consequences from a security point of view and what > > > about POLA (devfs.rules, chown/chmod)? > > > > > > I want to see this new USB subsystem, but if the answer to the above > > > paragraph is yes, then this would be a showstopper for me (IMO the > > > replacement should work in this regard as before, I don't say it can > > > not be changed after enough people agree that the replacement was > > > successful). > > > > > > Bye, > > > Alexander. > > > > Hi Alexander, > > > > You have to ask Paul Henning Kamp about that. He does not like the idea > > about /dev/ being the inventory list. > > We already have a lot of cloning devices, so it's not about showing a > device node in /dev or not, I'm talking about chmod/chflags/devfs.rules. > > > Besides, there are no more visible /dev/ devices. All devices are > > so-called cloneable and invisible, so you need a separate utility. The > > good news is > > No, devfs.rules is handling this case already, no need for another > utility: > ---snip--- > NAME > devfs.rules -- devfs configuration information > > DESCRIPTION > The devfs.rules file provides an easy way to create and apply devfs(8) > rules, even for devices that are not available at boot. > > For devices available at boot, see devfs.conf(5). > ---snip--- > > With your new utility you are changing the security policy, and this > without discussing this in public (who is able to change the > permissions, are changes permanent and survive a reboot, ...). With > devfs.rules we already have a tested and reviewed feature where root > can configure access. > > > that you can set the permissions on a USB subtree (a HUB and all > > subdevices) before devices are eventually plugged ! > > I don't know of a scenario where this is useful, but I'm not surprised > if someone has an use for this. And I think this feature can be > available while respecting the current semantics of devfs and > devfs.rules (e.g. if your feature is used, give priority to it, else > respect devfs.rules). From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 10:25:42 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EB1A106566B; Sat, 23 Aug 2008 10:25:42 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from frontmail.ipactive.de (frontmail.maindns.de [85.214.95.103]) by mx1.freebsd.org (Postfix) with ESMTP id 1B00C8FC16; Sat, 23 Aug 2008 10:25:41 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from mail.vtec.ipme.de (Q7cf8.q.ppp-pool.de [89.53.124.248]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by frontmail.ipactive.de (Postfix) with ESMTP id C9771128846; Sat, 23 Aug 2008 12:08:41 +0200 (CEST) Received: from cesar.sz.vwsoft.com (cesar.sz.vwsoft.com [192.168.16.3]) by mail.vtec.ipme.de (Postfix) with ESMTP id 5084A2E90F; Sat, 23 Aug 2008 12:08:17 +0200 (CEST) Message-ID: <48AFE196.7050100@vwsoft.com> Date: Sat, 23 Aug 2008 12:08:22 +0200 From: Volker User-Agent: Thunderbird 2.0.0.16 (X11/20080727) MIME-Version: 1.0 To: Antony Mawer References: <20080819211814.6CD685B4D@mail.bitblocks.com> <20080819.160510.104119134.imp@bsdimp.com> <48AB566B.5010507@mawer.org> <20080819.180450.-867152686.imp@bsdimp.com> <48ABB1FA.5070609@mawer.org> In-Reply-To: <48ABB1FA.5070609@mawer.org> X-Enigmail-Version: 0.95.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit MailScanner-NULL-Check: 1220090901.73887@yRUAEXD68Ayl7eeeK9dLGw X-MailScanner-ID: 5084A2E90F.AF770 X-VWSoft-MailScanner: Found to be clean X-MailScanner-From: volker@vwsoft.com X-ipactive-MailScanner-Information: Please contact the ISP for more information X-ipactive-MailScanner: Found to be clean X-ipactive-MailScanner-From: volker@vwsoft.com Cc: usb@freebsd.org, freebsd-usb@freebsd.org, current@freebsd.org Subject: Re: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 10:25:42 -0000 On 12/23/-58 20:59, Antony Mawer wrote: > M. Warner Losh wrote: >> In message: <48AB566B.5010507@mawer.org> >> Antony Mawer writes: >> : Warner Losh wrote: >> : > From: Bakul Shah >> : > Subject: Re: HEADSUP new usb code coming in. : > Date: Tue, 19 Aug >> 2008 14:18:13 -0700 >> : > : >> On Tue, 19 Aug 2008 22:44:20 +0200 Hans Petter Selasky >> wrote: >> : >>> New stuff (all of which I can remember right now): >> : >> ... >> : >> >> : >> Accidentally unplugging a mounted USB disk (without >> : >> unmounting it) resulted in a hang or a crash. Is this fixed? >> : > : > That's fixed in -current right now with the old stack. It >> isn't a usb >> : > issue at all, but a buffer cache issue. >> : : Is this change that is likely to be MFC'd in time for 7.1? And/or >> is : there a specific patch that can manually be applied to -STABLE to >> fix this? >> >> I should spend the time to dig into the changes in current. There >> turned out to be several little changes... And I need to verify all >> the edge cases were covered... > > I'd be happy to test patches if you do end up doing this.. it would be > really nice to have in 7.1, or at least available as a patchset if it > isn't suitable for MFC (eg. ABI changes)... > > --Antony Antony, I'm a bit behind with reading emails. Please forgive me if this has already been answered. Don't expect the new USB stack for 7.1-R. It's too short and the new USB stack will introduce an ABI breakage. For that, all drivers written for the old USB stack need to be rewritten and I guess, we need to take care about 3rd party developers and inform them in advance about that massive change. I would not wonder if this will never get MFC'd but I don't know actually. HTH Volker From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 10:25:42 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EB1A106566B; Sat, 23 Aug 2008 10:25:42 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from frontmail.ipactive.de (frontmail.maindns.de [85.214.95.103]) by mx1.freebsd.org (Postfix) with ESMTP id 1B00C8FC16; Sat, 23 Aug 2008 10:25:41 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from mail.vtec.ipme.de (Q7cf8.q.ppp-pool.de [89.53.124.248]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by frontmail.ipactive.de (Postfix) with ESMTP id C9771128846; Sat, 23 Aug 2008 12:08:41 +0200 (CEST) Received: from cesar.sz.vwsoft.com (cesar.sz.vwsoft.com [192.168.16.3]) by mail.vtec.ipme.de (Postfix) with ESMTP id 5084A2E90F; Sat, 23 Aug 2008 12:08:17 +0200 (CEST) Message-ID: <48AFE196.7050100@vwsoft.com> Date: Sat, 23 Aug 2008 12:08:22 +0200 From: Volker User-Agent: Thunderbird 2.0.0.16 (X11/20080727) MIME-Version: 1.0 To: Antony Mawer References: <20080819211814.6CD685B4D@mail.bitblocks.com> <20080819.160510.104119134.imp@bsdimp.com> <48AB566B.5010507@mawer.org> <20080819.180450.-867152686.imp@bsdimp.com> <48ABB1FA.5070609@mawer.org> In-Reply-To: <48ABB1FA.5070609@mawer.org> X-Enigmail-Version: 0.95.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit MailScanner-NULL-Check: 1220090901.73887@yRUAEXD68Ayl7eeeK9dLGw X-MailScanner-ID: 5084A2E90F.AF770 X-VWSoft-MailScanner: Found to be clean X-MailScanner-From: volker@vwsoft.com X-ipactive-MailScanner-Information: Please contact the ISP for more information X-ipactive-MailScanner: Found to be clean X-ipactive-MailScanner-From: volker@vwsoft.com Cc: usb@freebsd.org, freebsd-usb@freebsd.org, current@freebsd.org Subject: Re: Re: HEADSUP new usb code coming in. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 10:25:42 -0000 On 12/23/-58 20:59, Antony Mawer wrote: > M. Warner Losh wrote: >> In message: <48AB566B.5010507@mawer.org> >> Antony Mawer writes: >> : Warner Losh wrote: >> : > From: Bakul Shah >> : > Subject: Re: HEADSUP new usb code coming in. : > Date: Tue, 19 Aug >> 2008 14:18:13 -0700 >> : > : >> On Tue, 19 Aug 2008 22:44:20 +0200 Hans Petter Selasky >> wrote: >> : >>> New stuff (all of which I can remember right now): >> : >> ... >> : >> >> : >> Accidentally unplugging a mounted USB disk (without >> : >> unmounting it) resulted in a hang or a crash. Is this fixed? >> : > : > That's fixed in -current right now with the old stack. It >> isn't a usb >> : > issue at all, but a buffer cache issue. >> : : Is this change that is likely to be MFC'd in time for 7.1? And/or >> is : there a specific patch that can manually be applied to -STABLE to >> fix this? >> >> I should spend the time to dig into the changes in current. There >> turned out to be several little changes... And I need to verify all >> the edge cases were covered... > > I'd be happy to test patches if you do end up doing this.. it would be > really nice to have in 7.1, or at least available as a patchset if it > isn't suitable for MFC (eg. ABI changes)... > > --Antony Antony, I'm a bit behind with reading emails. Please forgive me if this has already been answered. Don't expect the new USB stack for 7.1-R. It's too short and the new USB stack will introduce an ABI breakage. For that, all drivers written for the old USB stack need to be rewritten and I guess, we need to take care about 3rd party developers and inform them in advance about that massive change. I would not wonder if this will never get MFC'd but I don't know actually. HTH Volker From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 15:05:18 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A66C1106566C; Sat, 23 Aug 2008 15:05:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4C3218FC20; Sat, 23 Aug 2008 15:05:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7NF1WLW000640; Sat, 23 Aug 2008 09:01:32 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 23 Aug 2008 09:02:05 -0600 (MDT) Message-Id: <20080823.090205.-696512487.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200808231034.54484.hselasky@c2i.net> References: <200808230804.03275.hselasky@c2i.net> <20080823093940.179e54ec@deskjail> <200808231034.54484.hselasky@c2i.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: phk@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 15:05:18 -0000 In message: <200808231034.54484.hselasky@c2i.net> Hans Petter Selasky writes: : I think the solution is that you use "devd.conf" instead of "devfs.conf" to do : this in the future. No, I think it should be devfs.conf to control permissions, etc. : The problem about "devfs.rules" with regard to USB is that you don't know what : you are giving permissions to. A rule that gives permission to "/dev/ulpt0" : will give permissions to the first printer you plug into the USB system. That : is not neccessarily what the user wants. It is. Until we have better wiring of devices to drivers, it will have to do. Better to solve that problem more generically.. Warner : --HPS : : On Saturday 23 August 2008, Alexander Leidinger wrote: : > Quoting Hans Petter Selasky (Sat, 23 Aug 2008 08:03:55 : +0200): : > > On Friday 22 August 2008, Alexander Leidinger wrote: : > > > Quoting "Kris Kennaway" (from Fri, 22 Aug 2008 : > > > : > > > 10:59:38 +0200): : > > > > Alexander Leidinger wrote: : > > > >> Quoting "M. Warner Losh" (from Thu, 21 Aug 2008 : > > > >> : > > > >> 11:52:10 -0600 (MDT)): : > > > >>> In message: <48ADA66A.3040906@FreeBSD.org> : > > > >>> : > > > >>> Kris Kennaway writes: : > > > >>> : Hans Petter Selasky wrote: : > > > >>> : > The USB stack will work fine without "usbconfig". Its purpose : > > > >>> : > > > >>> is : > mostly to : > > > >>> : > > > >>> : > view the currently attached USB devices, where the USB devices : > > > >>> : > are located : > > > >>> : > and to select a non-default USB configuration. One thing which : > > > >>> : > might be missed is to change owner and permission of a USB : > > > >>> : > device, : > > > >>> : > > > >>> which means you : > > > >>> : > > > >>> : > must be either UID=root or GID=OPERATOR to be able to use USB : > > > >>> : > devices that : > > > >>> : > create devices under /dev/ . : > > > >>> : : > > > >>> : OK great, this isn't critical either. I think all of the issues : > > > >>> : I raised are agreed upon now! : > > > >> : > > > >> Wait a moment. Does this mean the devfs stuff to handle the access : > > > >> rights (devfs.rules or manual chown/chmod by root) does not work : > > > >> with the new usb stuff? If the answer is yes, I would see this as : > > > >> some kind of nasty bug (I don't think this shall be a showstopper, : > > > >> as long as this is fixed later). : > > > > : > > > > Yes, he said it will be fixed later. : > > > : > > > You are aware that I point out that this may or may not suggest that : > > > HPS is circumventing the normal devfs infrastructure and that this may : > > > or may not be a problem and should be reviewed by someone with : > > > knowledge about the devfs infrastructure? : > > > : > > > And as he mentioned that in the context of the userland utilities, it : > > > may be interesting if this means if an USB specific userland utility : > > > will be responsible to change the ownership and file access or not. If : > > > yes, what are the consequences from a security point of view and what : > > > about POLA (devfs.rules, chown/chmod)? : > > > : > > > I want to see this new USB subsystem, but if the answer to the above : > > > paragraph is yes, then this would be a showstopper for me (IMO the : > > > replacement should work in this regard as before, I don't say it can : > > > not be changed after enough people agree that the replacement was : > > > successful). : > > > : > > > Bye, : > > > Alexander. : > > : > > Hi Alexander, : > > : > > You have to ask Paul Henning Kamp about that. He does not like the idea : > > about /dev/ being the inventory list. : > : > We already have a lot of cloning devices, so it's not about showing a : > device node in /dev or not, I'm talking about chmod/chflags/devfs.rules. : > : > > Besides, there are no more visible /dev/ devices. All devices are : > > so-called cloneable and invisible, so you need a separate utility. The : > > good news is : > : > No, devfs.rules is handling this case already, no need for another : > utility: : > ---snip--- : > NAME : > devfs.rules -- devfs configuration information : > : > DESCRIPTION : > The devfs.rules file provides an easy way to create and apply devfs(8) : > rules, even for devices that are not available at boot. : > : > For devices available at boot, see devfs.conf(5). : > ---snip--- : > : > With your new utility you are changing the security policy, and this : > without discussing this in public (who is able to change the : > permissions, are changes permanent and survive a reboot, ...). With : > devfs.rules we already have a tested and reviewed feature where root : > can configure access. : > : > > that you can set the permissions on a USB subtree (a HUB and all : > > subdevices) before devices are eventually plugged ! : > : > I don't know of a scenario where this is useful, but I'm not surprised : > if someone has an use for this. And I think this feature can be : > available while respecting the current semantics of devfs and : > devfs.rules (e.g. if your feature is used, give priority to it, else : > respect devfs.rules). : _______________________________________________ : freebsd-usb@freebsd.org mailing list : http://lists.freebsd.org/mailman/listinfo/freebsd-usb : To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" : : From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 15:54:39 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BD6C1065674 for ; Sat, 23 Aug 2008 15:54:39 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 2A6D08FC12 for ; Sat, 23 Aug 2008 15:54:38 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 847C7170E4; Sat, 23 Aug 2008 15:27:25 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.2/8.14.2) with ESMTP id m7NFROdu010491; Sat, 23 Aug 2008 15:27:24 GMT (envelope-from phk@critter.freebsd.dk) To: Hans Petter Selasky From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 23 Aug 2008 10:34:53 +0200." <200808231034.54484.hselasky@c2i.net> Date: Sat, 23 Aug 2008 15:27:24 +0000 Message-ID: <10490.1219505244@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 15:54:39 -0000 In message <200808231034.54484.hselasky@c2i.net>, Hans Petter Selasky writes: >The problem about "devfs.rules" with regard to USB is that you don't know what >you are giving permissions to. A rule that gives permission to "/dev/ulpt0" >will give permissions to the first printer you plug into the USB system. That >is not neccessarily what the user wants. I think this might be a good time to consider the devd/devfs distribution of work. The reason devfs(8) works like "firewall rules" is that we did not want some mandatory daemon to set the modes, in particular on embedded systems. The alternative solution is to always create device nodes "root:wheel r--" and let the daemon set the mode as desired. This model has the advantage of not needing the uid, gid and mode arguments to make_dev, something that has always been acknowleded as a kludge. The down side is that devd(8) becomes a mandatory daemon on most systems. Given that devfs(8) has not exactly been a stellar success and that it often and repeatedly bites people with it slightly pedantic semantics, transitioning in that direction might be a good thing. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 16:01:53 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B00CC106564A for ; Sat, 23 Aug 2008 16:01:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6BD838FC0C for ; Sat, 23 Aug 2008 16:01:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m7NG1N65001805; Sat, 23 Aug 2008 10:01:23 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 23 Aug 2008 10:01:55 -0600 (MDT) Message-Id: <20080823.100155.1310242209.imp@bsdimp.com> To: phk@phk.freebsd.dk From: "M. Warner Losh" In-Reply-To: <10490.1219505244@critter.freebsd.dk> References: <200808231034.54484.hselasky@c2i.net> <10490.1219505244@critter.freebsd.dk> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 16:01:53 -0000 In message: <10490.1219505244@critter.freebsd.dk> "Poul-Henning Kamp" writes: : In message <200808231034.54484.hselasky@c2i.net>, Hans Petter Selasky writes: : : : >The problem about "devfs.rules" with regard to USB is that you don't know what : >you are giving permissions to. A rule that gives permission to "/dev/ulpt0" : >will give permissions to the first printer you plug into the USB system. That : >is not neccessarily what the user wants. : : I think this might be a good time to consider the devd/devfs : distribution of work. : : The reason devfs(8) works like "firewall rules" is that we did not want : some mandatory daemon to set the modes, in particular on embedded : systems. : : The alternative solution is to always create device nodes "root:wheel r--" : and let the daemon set the mode as desired. : : This model has the advantage of not needing the uid, gid and mode arguments : to make_dev, something that has always been acknowleded as a kludge. : : The down side is that devd(8) becomes a mandatory daemon on most systems. : : Given that devfs(8) has not exactly been a stellar success and that it : often and repeatedly bites people with it slightly pedantic semantics, : transitioning in that direction might be a good thing. While this may be a good idea, I'm hesitant about races that it may introduce. This is the classic point of attack: do something between steps of a formerly atomic operation that was made non-atomic. I can't think of anything off the top of my head, but I'm still concerned. Warner From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 16:45:46 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A35A21065671; Sat, 23 Aug 2008 16:45:46 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 5772F8FC13; Sat, 23 Aug 2008 16:45:40 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A55FA9.dip.t-dialin.net [84.165.95.169]) by redbull.bpaserver.net (Postfix) with ESMTP id 2506F2E1FB; Sat, 23 Aug 2008 18:45:37 +0200 (CEST) Received: from deskjail (deskjail.Leidinger.net [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id 7F893102D81; Sat, 23 Aug 2008 18:45:34 +0200 (CEST) Date: Sat, 23 Aug 2008 18:45:34 +0200 From: Alexander Leidinger To: "Poul-Henning Kamp" Message-ID: <20080823184534.575803d0@deskjail> In-Reply-To: <10490.1219505244@critter.freebsd.dk> References: <200808231034.54484.hselasky@c2i.net> <10490.1219505244@critter.freebsd.dk> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i686-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 2506F2E1FB.115A3 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-14.3, required 6, BAYES_00 -15.00, J_CHICKENPOX_33 0.60, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 16:45:46 -0000 Quoting "Poul-Henning Kamp" (Sat, 23 Aug 2008 15:27:24 +0000): > In message <200808231034.54484.hselasky@c2i.net>, Hans Petter Selasky writes: > > > >The problem about "devfs.rules" with regard to USB is that you don't know what > >you are giving permissions to. A rule that gives permission to "/dev/ulpt0" > >will give permissions to the first printer you plug into the USB system. That > >is not neccessarily what the user wants. > > I think this might be a good time to consider the devd/devfs > distribution of work. > > The reason devfs(8) works like "firewall rules" is that we did not want > some mandatory daemon to set the modes, in particular on embedded > systems. > > The alternative solution is to always create device nodes "root:wheel r--" > and let the daemon set the mode as desired. > > This model has the advantage of not needing the uid, gid and mode arguments > to make_dev, something that has always been acknowleded as a kludge. > > The down side is that devd(8) becomes a mandatory daemon on most systems. A downside which belongs into its own discussion, an not into the already huge back and forth for the new USB subsystem. > Given that devfs(8) has not exactly been a stellar success and that it > often and repeatedly bites people with it slightly pedantic semantics, > transitioning in that direction might be a good thing. Unpredictable behavior (except you know by heard which entry is behaving how... something someone should not need to know) instead of doing it right by doing all at once? I don't think this is a good idea, and it seems Warner thinks the same (see his answer to the mail you answered to). Bye, Alexander. -- Ferengi Rule of Acquisition #177: Know your enemies... but do business with them always. -- ST: Legends of the Ferengi http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 17:15:42 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFE991065679 for ; Sat, 23 Aug 2008 17:15:42 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 9FF728FC15 for ; Sat, 23 Aug 2008 17:15:42 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id B0339170E4; Sat, 23 Aug 2008 17:15:40 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.2/8.14.2) with ESMTP id m7NHFcVs010827; Sat, 23 Aug 2008 17:15:39 GMT (envelope-from phk@critter.freebsd.dk) To: "M. Warner Losh" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 23 Aug 2008 10:01:55 CST." <20080823.100155.1310242209.imp@bsdimp.com> Date: Sat, 23 Aug 2008 17:15:38 +0000 Message-ID: <10826.1219511738@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: freebsd-usb@freebsd.org Subject: Re: usb4bsd patch review X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 17:15:43 -0000 In message <20080823.100155.1310242209.imp@bsdimp.com>, "M. Warner Losh" writes : >While this may be a good idea, I'm hesitant about races that it may >introduce. This is the classic point of attack: do something between >steps of a formerly atomic operation that was made non-atomic. I >can't think of anything off the top of my head, but I'm still >concerned. We have ways of closing the race if need be, but they're all slightly kludgy, but I am not overly concerned about those races as long as the default is to not give access. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 17:40:03 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 785C4106564A for ; Sat, 23 Aug 2008 17:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 63BA08FC16 for ; Sat, 23 Aug 2008 17:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7NHe3GF038642 for ; Sat, 23 Aug 2008 17:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7NHe3Fm038641; Sat, 23 Aug 2008 17:40:03 GMT (envelope-from gnats) Date: Sat, 23 Aug 2008 17:40:03 GMT Message-Id: <200808231740.m7NHe3Fm038641@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/123224: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 17:40:03 -0000 The following reply was made to PR kern/123224; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/123224: commit references a PR Date: Sat, 23 Aug 2008 17:33:13 +0000 (UTC) kaiw 2008-08-23 17:32:43 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/dev/usb ums.c Log: SVN rev 182072 on 2008-08-23 17:32:43Z by kaiw MFC r181839: Re-add Microsoft Intellimouse 2.0 TWHEEL quirk. Tested by: Merritt Draney, Brian Cox PR: kern/123224 PR: kern/123510 Revision Changes Path 1.96.2.4 +3 -0 src/sys/dev/usb/ums.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 17:40:06 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C7FB1065680 for ; Sat, 23 Aug 2008 17:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EC31B8FC18 for ; Sat, 23 Aug 2008 17:40:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7NHe5Ul038673 for ; Sat, 23 Aug 2008 17:40:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7NHe5gZ038672; Sat, 23 Aug 2008 17:40:05 GMT (envelope-from gnats) Date: Sat, 23 Aug 2008 17:40:05 GMT Message-Id: <200808231740.m7NHe5gZ038672@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/123510: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 17:40:06 -0000 The following reply was made to PR kern/123510; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/123510: commit references a PR Date: Sat, 23 Aug 2008 17:33:13 +0000 (UTC) kaiw 2008-08-23 17:32:43 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/dev/usb ums.c Log: SVN rev 182072 on 2008-08-23 17:32:43Z by kaiw MFC r181839: Re-add Microsoft Intellimouse 2.0 TWHEEL quirk. Tested by: Merritt Draney, Brian Cox PR: kern/123224 PR: kern/123510 Revision Changes Path 1.96.2.4 +3 -0 src/sys/dev/usb/ums.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 17:40:08 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EA5D1065671 for ; Sat, 23 Aug 2008 17:40:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6A1A78FC12 for ; Sat, 23 Aug 2008 17:40:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7NHe8VO038723 for ; Sat, 23 Aug 2008 17:40:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7NHe8hU038722; Sat, 23 Aug 2008 17:40:08 GMT (envelope-from gnats) Date: Sat, 23 Aug 2008 17:40:08 GMT Message-Id: <200808231740.m7NHe8hU038722@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: usb/125941: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 17:40:08 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/125941: commit references a PR Date: Sat, 23 Aug 2008 17:38:46 +0000 (UTC) kaiw 2008-08-23 17:38:24 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/dev/usb hid.c Log: SVN rev 182074 on 2008-08-23 17:38:24Z by kaiw MFC r181841: In the hid parser, if a INPUT/OUTPUT/FEATURE item is skipped, its corresponding USAGE should be skipped as well. Tested by: Grzegorz Blach PR: usb/125941 Revision Changes Path 1.29.2.1 +12 -3 src/sys/dev/usb/hid.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 18:18:35 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DC911065676; Sat, 23 Aug 2008 18:18:35 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 106B58FC1C; Sat, 23 Aug 2008 18:18:35 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from freefall.freebsd.org (kaiw@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7NIIYo5041484; Sat, 23 Aug 2008 18:18:34 GMT (envelope-from kaiw@freefall.freebsd.org) Received: (from kaiw@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7NIIYFl041480; Sat, 23 Aug 2008 18:18:34 GMT (envelope-from kaiw) Date: Sat, 23 Aug 2008 18:18:34 GMT Message-Id: <200808231818.m7NIIYFl041480@freefall.freebsd.org> To: Magik@back-up.pl, kaiw@FreeBSD.org, freebsd-usb@FreeBSD.org From: kaiw@FreeBSD.org Cc: Subject: Re: usb/125941: [ums] not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 18:18:35 -0000 Synopsis: [ums] not working wheel on my microsoft notebook optical mouse 3000 State-Changed-From-To: open->closed State-Changed-By: kaiw State-Changed-When: Sat Aug 23 18:17:27 UTC 2008 State-Changed-Why: Patch committed. http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 18:51:22 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2354A106567E; Sat, 23 Aug 2008 18:51:22 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EAA2D8FC1F; Sat, 23 Aug 2008 18:51:21 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from freefall.freebsd.org (kaiw@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7NIpLoE044480; Sat, 23 Aug 2008 18:51:21 GMT (envelope-from kaiw@freefall.freebsd.org) Received: (from kaiw@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7NIpLD7044476; Sat, 23 Aug 2008 18:51:21 GMT (envelope-from kaiw) Date: Sat, 23 Aug 2008 18:51:21 GMT Message-Id: <200808231851.m7NIpLD7044476@freefall.freebsd.org> To: coxbrian@msu.edu, kaiw@FreeBSD.org, freebsd-usb@FreeBSD.org From: kaiw@FreeBSD.org Cc: Subject: Re: kern/123224: [ums] Scroll wheel breakage w/ USB MS Wireless Intellimouse Explorer 2.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 18:51:22 -0000 Synopsis: [ums] Scroll wheel breakage w/ USB MS Wireless Intellimouse Explorer 2.0 State-Changed-From-To: open->closed State-Changed-By: kaiw State-Changed-When: Sat Aug 23 18:50:55 UTC 2008 State-Changed-Why: Patched. http://www.freebsd.org/cgi/query-pr.cgi?pr=123224 From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 18:51:51 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26163106570B; Sat, 23 Aug 2008 18:51:51 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EDA748FC1C; Sat, 23 Aug 2008 18:51:50 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from freefall.freebsd.org (kaiw@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7NIpo5q044527; Sat, 23 Aug 2008 18:51:50 GMT (envelope-from kaiw@freefall.freebsd.org) Received: (from kaiw@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7NIpoNR044523; Sat, 23 Aug 2008 18:51:50 GMT (envelope-from kaiw) Date: Sat, 23 Aug 2008 18:51:50 GMT Message-Id: <200808231851.m7NIpoNR044523@freefall.freebsd.org> To: tmdraney@verizon.net, kaiw@FreeBSD.org, freebsd-usb@FreeBSD.org From: kaiw@FreeBSD.org Cc: Subject: Re: kern/123510: [ums] Mouse Wheel Fails to Work [regression] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 18:51:51 -0000 Synopsis: [ums] Mouse Wheel Fails to Work [regression] State-Changed-From-To: open->closed State-Changed-By: kaiw State-Changed-When: Sat Aug 23 18:51:35 UTC 2008 State-Changed-Why: Patched. http://www.freebsd.org/cgi/query-pr.cgi?pr=123510 From owner-freebsd-usb@FreeBSD.ORG Sat Aug 23 21:26:29 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CF28106567E for ; Sat, 23 Aug 2008 21:26:29 +0000 (UTC) (envelope-from asim@nm.ru) Received: from flock1.newmail.ru (flock1.newmail.ru [82.204.219.207]) by mx1.freebsd.org (Postfix) with SMTP id 81AD28FC0C for ; Sat, 23 Aug 2008 21:26:27 +0000 (UTC) (envelope-from asim@nm.ru) Received: (qmail 18322 invoked by alias); 23 Aug 2008 21:13:22 -0000 From: =?koi8-r?B?7cHLwdLFzsvP1yDhzMXL08HOxNIg88XNz9fJ3iA=?= To: freebsd-usb@freebsd.org X-Priority: 3 MIME-Version: 1.0 X-Mailer: DenMail v1.0 by ORC X-Uid: 20047 X-RemoteIP: 213.85.246.177 Date: Sun, 24 Aug 2008 01:13:22 +0400 Message-ID: <1219526002.17589.denwebmail-344@makarenkov> Content-type: text/plain; charset="windows-1251" x-dummy: 0 Cc: amb@amb.kiev.ua Subject: Microsoft Wireless Optical Desktop 3000 doesn't work correctly X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 21:26:29 -0000 Hi, Andrew! Recently. I had a similar problem with Microsoft Wireless MultiMedia Keyboard 1.1 and FreeBSD 7.0 i386 Below the letter my ums.c that working correctly with this hardware. My modifications of ums.c was inspired by http://accima.com/members/dhesser/fbsd_mouse_stuff/ The most significant modification in this source file is: else if ( id->bInterfaceClass == UICLASS_HID && uaa->product == 0x009d && uaa->vendor == 0x045e && uaa->ifaceno == 1 // iface0 for keyboard, iface1 for mice ){ id->bInterfaceSubClass = UISUBCLASS_BOOT; id->bInterfaceProtocol = UIPROTO_MOUSE; printf("\nMicosoft Wireles Desktop Mouse\n"); ret = UMATCH_IFACECLASS; } Please, keep in mind, that I wrote product and vendor code especially for my hardware. You may have to use another values. Have a good time, Alexander Makarenkov /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Lennart Augustsson (lennart@augustsson.net) at * Carlstedt Research & Technology. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the NetBSD * Foundation, Inc. and its contributors. * 4. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include __FBSDID("$FreeBSD: src/sys/dev/usb/ums.c,v 1.96.2.3 2008/06/12 16:45:46 kaiw Exp $"); /* * HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "usbdevs.h" #include #include #include #ifdef USB_DEBUG #define DPRINTF(x) if (umsdebug) printf x #define DPRINTFN(n,x) if (umsdebug>(n)) printf x int umsdebug = 0; SYSCTL_NODE(_hw_usb, OID_AUTO, ums, CTLFLAG_RW, 0, "USB ums"); SYSCTL_INT(_hw_usb_ums, OID_AUTO, debug, CTLFLAG_RW, &umsdebug, 0, "ums debug level"); #else #define DPRINTF(x) #define DPRINTFN(n,x) #endif #define UMSUNIT(s) (minor(s)&0x1f) #define MS_TO_TICKS(ms) ((ms) * hz / 1000) #define QUEUE_BUFSIZE 400 /* MUST be divisible by 5 _and_ 8 */ struct ums_softc { device_t sc_dev; /* base device */ usbd_interface_handle sc_iface; /* interface */ usbd_pipe_handle sc_intrpipe; /* interrupt pipe */ int sc_ep_addr; u_char *sc_ibuf; u_int8_t sc_iid; int sc_isize; struct hid_location sc_loc_x, sc_loc_y, sc_loc_z, sc_loc_t, sc_loc_w; struct hid_location *sc_loc_btn; struct callout callout_handle; /* for spurious button ups */ int sc_enabled; int sc_disconnected; /* device is gone */ int flags; /* device configuration */ #define UMS_Z 0x01 /* z direction available */ #define UMS_SPUR_BUT_UP 0x02 /* spurious button up events */ #define UMS_T 0x04 /* aa direction available (tilt) */ #define UMS_REVZ 0x08 /* Z-axis is reversed */ int nbuttons; #define MAX_BUTTONS 31 /* chosen because sc_buttons is int */ u_char qbuf[QUEUE_BUFSIZE]; /* must be divisable by 3&4 */ u_char dummy[100]; /* XXX just for safety and for now */ int qcount, qhead, qtail; mousehw_t hw; mousemode_t mode; mousestatus_t status; int state; # define UMS_ASLEEP 0x01 /* readFromDevice is waiting */ # define UMS_SELECT 0x02 /* select is waiting */ struct selinfo rsel; /* process waiting in select */ struct cdev *dev; /* specfs */ }; #define MOUSE_FLAGS_MASK (HIO_CONST|HIO_RELATIVE) #define MOUSE_FLAGS (HIO_RELATIVE) static void ums_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status); static void ums_add_to_queue(struct ums_softc *sc, int dx, int dy, int dz, int dt, int buttons); static void ums_add_to_queue_timeout(void *priv); static int ums_enable(void *); static void ums_disable(void *); static d_open_t ums_open; static d_close_t ums_close; static d_read_t ums_read; static d_ioctl_t ums_ioctl; static d_poll_t ums_poll; static struct cdevsw ums_cdevsw = { .d_version = D_VERSION, .d_flags = D_NEEDGIANT, .d_open = ums_open, .d_close = ums_close, .d_read = ums_read, .d_ioctl = ums_ioctl, .d_poll = ums_poll, .d_name = "ums", }; static device_probe_t ums_match; static device_attach_t ums_attach; static device_detach_t ums_detach; static device_method_t ums_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ums_match), DEVMETHOD(device_attach, ums_attach), DEVMETHOD(device_detach, ums_detach), { 0, 0 } }; static driver_t ums_driver = { "ums", ums_methods, sizeof(struct ums_softc) }; static devclass_t ums_devclass; static int ums_match(device_t self) { struct usb_attach_arg *uaa = device_get_ivars(self); usb_interface_descriptor_t *id; int size, ret; void *desc; usbd_status err; if (!uaa->iface) return (UMATCH_NONE); id = usbd_get_interface_descriptor(uaa->iface); if (!id || id->bInterfaceClass != UICLASS_HID) { //printf("\nNot a HID\n"); return (UMATCH_NONE); } err = usbd_read_report_desc(uaa->iface, &desc, &size, M_TEMP); if (err){ //printf("\nERR\n"); return (UMATCH_NONE); } //printf("\nOK1\n"); if (hid_is_collection(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE))){ //printf("\nOK2\n"); ret = UMATCH_IFACECLASS; } else if ( id->bInterfaceClass == UICLASS_HID && id->bInterfaceSubClass == UISUBCLASS_BOOT && id->bInterfaceProtocol == UIPROTO_MOUSE ){ //printf("\nOK3\n"); ret = UMATCH_IFACECLASS; } else if ( id->bInterfaceClass == UICLASS_HID && uaa->product == 0x009d && uaa->vendor == 0x045e && uaa->ifaceno == 1 ){ id->bInterfaceSubClass = UISUBCLASS_BOOT; id->bInterfaceProtocol = UIPROTO_MOUSE; printf("\nMicosoft Wireles Desktop Mouse\n"); ret = UMATCH_IFACECLASS; } else { // printf("\nOK4\n"); ret = UMATCH_NONE; } free(desc, M_TEMP); return (ret); } static int ums_attach(device_t self) { struct ums_softc *sc = device_get_softc(self); struct usb_attach_arg *uaa = device_get_ivars(self); usbd_interface_handle iface = uaa->iface; usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; int size; void *desc; usbd_status err; u_int32_t flags; int i, wheel; struct hid_location loc_btn; sc->sc_disconnected = 1; sc->sc_iface = iface; id = usbd_get_interface_descriptor(iface); sc->sc_dev = self; ed = usbd_interface2endpoint_descriptor(iface, 0); if (!ed) { printf("%s: could not read endpoint descriptor\n", device_get_nameunit(sc->sc_dev)); return ENXIO; } DPRINTFN(10,("ums_attach: bLength=%d bDescriptorType=%d " "bEndpointAddress=%d-%s bmAttributes=%d wMaxPacketSize=%d" " bInterval=%d\n", ed->bLength, ed->bDescriptorType, UE_GET_ADDR(ed->bEndpointAddress), UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN ? "in":"out", UE_GET_XFERTYPE(ed->bmAttributes), UGETW(ed->wMaxPacketSize), ed->bInterval)); if (UE_GET_DIR(ed->bEndpointAddress) != UE_DIR_IN || UE_GET_XFERTYPE(ed->bmAttributes) != UE_INTERRUPT) { printf("%s: unexpected endpoint\n", device_get_nameunit(sc->sc_dev)); return ENXIO; } err = usbd_read_report_desc(uaa->iface, &desc, &size, M_TEMP); if (err) return ENXIO; if (!hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), hid_input, &sc->sc_loc_x, &flags)) { printf("%s: mouse has no X report\n", device_get_nameunit(sc->sc_dev)); return ENXIO; } if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { printf("%s: X report 0x%04x not supported\n", device_get_nameunit(sc->sc_dev), flags); return ENXIO; } if (!hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y), hid_input, &sc->sc_loc_y, &flags)) { printf("%s: mouse has no Y report\n", device_get_nameunit(sc->sc_dev)); return ENXIO; } if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { printf("%s: Y report 0x%04x not supported\n", device_get_nameunit(sc->sc_dev), flags); return ENXIO; } /* Try the wheel first as the Z activator since it's tradition. */ wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), hid_input, &sc->sc_loc_z, &flags); if (wheel) { if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { printf("\n%s: Wheel report 0x%04x not supported\n", device_get_nameunit(sc->sc_dev), flags); sc->sc_loc_z.size = 0; /* Bad Z coord, ignore it */ } else { sc->flags |= UMS_Z; if (usbd_get_quirks(uaa->device)->uq_flags & UQ_MS_REVZ) { /* Some wheels need the Z axis reversed. */ sc->flags |= UMS_REVZ; } } /* * We might have both a wheel and Z direction, if so put * put the Z on the W coordinate. */ if (hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Z), hid_input, &sc->sc_loc_w, &flags)) { if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { printf("\n%s: Z report 0x%04x not supported\n", device_get_nameunit(sc->sc_dev), flags); sc->sc_loc_w.size = 0; /* Bad Z, ignore */ } } } else if (hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Z), hid_input, &sc->sc_loc_z, &flags)) { if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { printf("\n%s: Z report 0x%04x not supported\n", device_get_nameunit(sc->sc_dev), flags); sc->sc_loc_z.size = 0; /* Bad Z coord, ignore it */ } else { sc->flags |= UMS_Z; } } /* * The Microsoft Wireless Intellimouse 2.0 reports it's wheel * using 0x0048 (i've called it HUG_TWHEEL) and seems to expect * you to know that the byte after the wheel is the tilt axis. * There are no other HID axis descriptors other than X,Y and * TWHEEL */ if (hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_TWHEEL), hid_input, &sc->sc_loc_t, &flags)) { sc->sc_loc_t.pos = sc->sc_loc_t.pos + 8; sc->flags |= UMS_T; } /* figure out the number of buttons */ for (i = 1; i <= MAX_BUTTONS; i++) if (!hid_locate(desc, size, HID_USAGE2(HUP_BUTTON, i), hid_input, &loc_btn, 0)) break; sc->nbuttons = i - 1; sc->sc_loc_btn = malloc(sizeof(struct hid_location)*sc->nbuttons, M_USBDEV, M_NOWAIT); if (!sc->sc_loc_btn) { printf("%s: no memory\n", device_get_nameunit(sc->sc_dev)); return ENXIO; } printf("%s: %d buttons%s%s.\n", device_get_nameunit(sc->sc_dev), sc->nbuttons, sc->flags & UMS_Z? " and Z dir" : "", sc->flags & UMS_T?" and a TILT dir": ""); for (i = 1; i <= sc->nbuttons; i++) hid_locate(desc, size, HID_USAGE2(HUP_BUTTON, i), hid_input, &sc->sc_loc_btn[i-1], 0); sc->sc_isize = hid_report_size(desc, size, hid_input, &sc->sc_iid); sc->sc_ibuf = malloc(sc->sc_isize, M_USB, M_NOWAIT); if (!sc->sc_ibuf) { printf("%s: no memory\n", device_get_nameunit(sc->sc_dev)); free(sc->sc_loc_btn, M_USB); return ENXIO; } /* * The Microsoft Wireless Notebook Optical Mouse seems to be in worse * shape than the Wireless Intellimouse 2.0, as its X, Y, wheel, and * all of its other button positions are all off. It also reports that * it has two addional buttons and a tilt wheel. */ if (usbd_get_quirks(uaa->device)->uq_flags & UQ_MS_BAD_CLASS) { sc->flags = UMS_Z; sc->flags |= UMS_SPUR_BUT_UP; sc->nbuttons = 3; sc->sc_isize = 5; sc->sc_iid = 0; /* 1st byte of descriptor report contains garbage */ sc->sc_loc_x.pos = 16; sc->sc_loc_y.pos = 24; sc->sc_loc_z.pos = 32; sc->sc_loc_btn[0].pos = 8; sc->sc_loc_btn[1].pos = 9; sc->sc_loc_btn[2].pos = 10; } /* * The Microsoft Wireless Notebook Optical Mouse 3000 Model 1049 has * five Report IDs: 19 23 24 17 18 (in the order they appear in report * descriptor), it seems that report id 17 contains the necessary * mouse information(3-buttons,X,Y,wheel) so we specify it manually. */ if ((uaa->vendor == USB_VENDOR_MICROSOFT && uaa->product == USB_PRODUCT_MICROSOFT_WLNOTEBOOK3) ||( uaa->product == 0x009d && uaa->vendor == 0x045e && uaa->ifaceno == 1 ) ){ sc->flags = UMS_Z; sc->nbuttons = 3; sc->sc_isize = 5; sc->sc_iid = 17; sc->sc_loc_x.pos = 8; sc->sc_loc_y.pos = 16; sc->sc_loc_z.pos = 24; sc->sc_loc_btn[0].pos = 0; sc->sc_loc_btn[1].pos = 1; sc->sc_loc_btn[2].pos = 2; } sc->sc_ep_addr = ed->bEndpointAddress; sc->sc_disconnected = 0; free(desc, M_TEMP); #ifdef USB_DEBUG DPRINTF(("ums_attach: sc=%p\n", sc)); DPRINTF(("ums_attach: X\t%d/%d\n", sc->sc_loc_x.pos, sc->sc_loc_x.size)); DPRINTF(("ums_attach: Y\t%d/%d\n", sc->sc_loc_y.pos, sc->sc_loc_y.size)); if (sc->flags & UMS_Z) DPRINTF(("ums_attach: Z\t%d/%d\n", sc->sc_loc_z.pos, sc->sc_loc_z.size)); for (i = 1; i <= sc->nbuttons; i++) { DPRINTF(("ums_attach: B%d\t%d/%d\n", i, sc->sc_loc_btn[i-1].pos,sc->sc_loc_btn[i-1].size)); } DPRINTF(("ums_attach: size=%d, id=%d\n", sc->sc_isize, sc->sc_iid)); #endif if (sc->nbuttons > MOUSE_MSC_MAXBUTTON) sc->hw.buttons = MOUSE_MSC_MAXBUTTON; else sc->hw.buttons = sc->nbuttons; sc->hw.iftype = MOUSE_IF_USB; sc->hw.type = MOUSE_MOUSE; sc->hw.model = MOUSE_MODEL_GENERIC; sc->hw.hwid = 0; sc->mode.protocol = MOUSE_PROTO_MSC; sc->mode.rate = -1; sc->mode.resolution = MOUSE_RES_UNKNOWN; sc->mode.accelfactor = 0; sc->mode.level = 0; sc->mode.packetsize = MOUSE_MSC_PACKETSIZE; sc->mode.syncmask[0] = MOUSE_MSC_SYNCMASK; sc->mode.syncmask[1] = MOUSE_MSC_SYNC; sc->status.flags = 0; sc->status.button = sc->status.obutton = 0; sc->status.dx = sc->status.dy = sc->status.dz = 0; sc->dev = make_dev(&ums_cdevsw, device_get_unit(self), UID_ROOT, GID_OPERATOR, 0644, "ums%d", device_get_unit(self)); callout_init(&sc->callout_handle, 0); if (usbd_get_quirks(uaa->device)->uq_flags & UQ_SPUR_BUT_UP) { DPRINTF(("%s: Spurious button up events\n", device_get_nameunit(sc->sc_dev))); sc->flags |= UMS_SPUR_BUT_UP; } return 0; } static int ums_detach(device_t self) { struct ums_softc *sc = device_get_softc(self); if (sc->sc_enabled) ums_disable(sc); DPRINTF(("%s: disconnected\n", device_get_nameunit(self))); free(sc->sc_loc_btn, M_USB); free(sc->sc_ibuf, M_USB); /* someone waiting for data */ /* * XXX If we wakeup the process here, the device will be gone by * the time the process gets a chance to notice. *_close and friends * should be fixed to handle this case. * Or we should do a delayed detach for this. * Does this delay now force tsleep to exit with an error? */ if (sc->state & UMS_ASLEEP) { sc->state &= ~UMS_ASLEEP; wakeup(sc); } if (sc->state & UMS_SELECT) { sc->state &= ~UMS_SELECT; selwakeuppri(&sc->rsel, PZERO); } destroy_dev(sc->dev); return 0; } void ums_intr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status) { struct ums_softc *sc = addr; u_char *ibuf; int dx, dy, dz, dw, dt; int buttons = 0; int i; #define UMS_BUT(i) ((i) < 3 ? (((i) + 2) % 3) : (i)) DPRINTFN(5, ("ums_intr: sc=%p status=%d\n", sc, status)); DPRINTFN(5, ("ums_intr: data =")); for (i = 0; i < sc->sc_isize; i++) DPRINTFN(5, (" %02x", sc->sc_ibuf[i])); DPRINTFN(5, ("\n")); if (status == USBD_CANCELLED) return; if (status != USBD_NORMAL_COMPLETION) { DPRINTF(("ums_intr: status=%d\n", status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall_async(sc->sc_intrpipe); if(status != USBD_IOERROR) return; } ibuf = sc->sc_ibuf; /* * The M$ Wireless Intellimouse 2.0 sends 1 extra leading byte of * data compared to most USB mice. This byte frequently switches * from 0x01 (usual state) to 0x02. I assume it is to allow * extra, non-standard, reporting (say battery-life). However * at the same time it generates a left-click message on the button * byte which causes spurious left-click's where there shouldn't be. * This should sort that. * Currently it's the only user of UMS_T so use it as an identifier. * We probably should switch to some more official quirk. * * UPDATE: This problem affects the M$ Wireless Notebook Optical Mouse, * too. However, the leading byte for this mouse is normally 0x11, * and the phantom mouse click occurs when its 0x14. */ if (sc->flags & UMS_T) { if (sc->sc_iid) { if (*ibuf++ == 0x02) return; } } else if (sc->flags & UMS_SPUR_BUT_UP) { DPRINTFN(5, ("ums_intr: #### ibuf[0] =3D %d ####\n", *ibuf)); if (*ibuf == 0x14 || *ibuf == 0x15) return; } else { if (sc->sc_iid) { if (*ibuf++ != sc->sc_iid) return; } } dx = hid_get_data(ibuf, &sc->sc_loc_x); dy = -hid_get_data(ibuf, &sc->sc_loc_y); dz = -hid_get_data(ibuf, &sc->sc_loc_z); dw = hid_get_data(ibuf, &sc->sc_loc_w); if (sc->flags & UMS_REVZ) dz = -dz; if (sc->flags & UMS_T) dt = -hid_get_data(ibuf, &sc->sc_loc_t); else dt = 0; for (i = 0; i < sc->nbuttons; i++) if (hid_get_data(ibuf, &sc->sc_loc_btn[i])) buttons |= (1 << UMS_BUT(i)); if (dx || dy || dz || dt || dw || (sc->flags & UMS_Z) || buttons != sc->status.button) { DPRINTFN(5, ("ums_intr: x:%d y:%d z:%d w:%d t:%d buttons:0x%x\n", dx, dy, dz, dw, dt, buttons)); sc->status.button = buttons; sc->status.dx += dx; sc->status.dy += dy; sc->status.dz += dz; /* sc->status.dt += dt; */ /* no way to export this yet */ /* sc->status.dw += dw; */ /* idem */ /* Discard data in case of full buffer */ if (sc->qcount == sizeof(sc->qbuf)) { DPRINTF(("Buffer full, discarded packet")); return; }