Re: Polymorphic devices

2024-01-06 Thread Iain Hibbert
On Fri, 5 Jan 2024, Brad Spencer wrote: > I see a few options for doing this, such as simply matching all of the > possible children and using sysctl to enable the one you want. Probably > followed by a rescan call. That seems ugly, however. The use of > 'drvctl -r -a ' seemed to hold promise.

Re: ehci: fix error handling?

2019-05-25 Thread Iain Hibbert
On Sat, 25 May 2019, Maxime Villard wrote: > To fix this problem, we need to fix the error handling in ehci_pci_attach(), > so that goto fail does not leave 'sc' in an inconsistent state. > > What is the best way to do that? Should I somehow forcibly unregister the > device, or should I add a

Re: To get net ioctl number

2019-02-27 Thread Iain Hibbert
On Thu, 28 Feb 2019, Masanobu SAITOH wrote: > I'd like to get new number for new ioctl. How should I find unused number > for it? I'm going to add new SIOCXXX. It may not enough to grep sys/net/*.h, > so I made usr.bin/kdump-ioctl.c and did > > grep \'i kdump-ioctl.c | sort -n -k 5,5 |

Re: Reboot resistant USB bug

2018-10-13 Thread Iain Hibbert
On Thu, 11 Oct 2018, Emmanuel Dreyfus wrote: > Hello > > On both netbsd-8 and -current, I have a problem with USB devices that > get stuck in a non-functionning state even after a reboot. > > This happens after interrupting transfer with different NFC readers > from different vendors, and the

Re: PMFE_RADIO_TOGGLE events

2017-12-04 Thread Iain Hibbert
On Mon, 4 Dec 2017, Martin Husemann wrote: > On Mon, Dec 04, 2017 at 12:29:10PM +0100, Manuel Bouyer wrote: > > The question would then be: how do radio device know the state > > at e.g. ifconfig up time ? > > It wouldn't ;-) > But the backend drivers could inform it of changes induced by

Re: PMFE_RADIO_TOGGLE events

2017-12-04 Thread Iain Hibbert
On Mon, 4 Dec 2017, Robert Elz wrote: > Most would never appear in ifconfig and no-one would want them to. > That is despite the fact that the interface uses sockets, and is > a (limited) network protocol. When Bluetooth is used to carry general networking, a network interface will be created

Re: PMFE_RADIO_TOGGLE events

2017-12-03 Thread Iain Hibbert
On Sun, 3 Dec 2017, Mouse wrote: > >> As for a list of interfaces? Do what ifconfig -l does and then > >> filter based on type, would be my raction. > > but how do you handle bluetooth interfaces then ? > > I don't know. I have never used bluetooth at all, much less on NetBSD. > If bluetooth

Re: Adding sc_pid to SCM_CREDS

2016-03-30 Thread Iain Hibbert
On Tue, 29 Mar 2016, Roy Marples wrote: > Attached is a patch which adds sc_pid to struct sockcred and correctly > fills it out. The old sockcred structure is available as osockcred in > compat/sys/socket.h and guarded by COMPAT_70. > > Everything seems to work ok with old binaries, but would

Re: Removing ARCNET stuffs

2015-06-01 Thread Iain Hibbert
On Mon, 1 Jun 2015, Andrew Cagney wrote: PCC, as a classic C compiler, only generates debug information at -O0. This this is because the stabs code is restricted to the un-optimized code generator path. this is not actually the case btw, and I don't recall it being like that in the last few

Re: Dealing with debugging macros for printing as part of aprint clean-up

2015-02-17 Thread Iain Hibbert
On Sun, 15 Feb 2015, Izaak wrote: Perhaps fixing the DPRINTF's that deal with autoconf to aprint_debug is the way to go after all... But that introduces code bloat? I am not sure how that introduces code bloat -- it is a simple exchange of calls -- but I only have superficial knowledge of

Re: Dead code: double return

2014-08-18 Thread Iain Hibbert
On Mon, 18 Aug 2014, Christos Zoulas wrote: In article 53f1c72d.9070...@m00nbsd.net, Maxime Villard m...@m00nbsd.net wrote: Also, I get several panic(XX); return;/break;/continue; in many places; it's ok if I start removing these return;/break;/continue;? I'd fix them. But

Re: Obtaining list of created sockets

2014-06-30 Thread Iain Hibbert
On Mon, 30 Jun 2014, Johnny Billquist wrote: On 2014-06-30 08:29, Will Dignazio wrote: Hi, I've dug through the so* code, and haven't found any table or list dedicated to created sockets. The exception only seems to be fsocreate, which attaches a file descriptor that could be used to

Re: Periodic clock synchronization in vmt(4)

2013-03-14 Thread Iain Hibbert
On Thu, 14 Mar 2013, Julio Merino wrote: Could anyone please review the attached patch? It appears to work as intended, but the sysctl API is really confusing and I don't know if I got all details right. seems ok but as you make the machdep.vmt.clock_sync.period node, what happens if more

enum vtype forward reference

2013-02-20 Thread Iain Hibbert
Hi, C99 section 6.7.2.3 (Tags) Note 3 states that: A type specifier of the form enum identifier without an enumerator list shall only appear after the type it specifies is complete. but the changes to sys/sys/kauth.h last year introduced an forward declaration of enum vtype; which

Re: USB_DEBUG mess

2013-01-05 Thread Iain Hibbert
On Sat, 5 Jan 2013, Christos Zoulas wrote: USB_DEBUG is defopt'ed and it is used as a global knob in usb.h: [...] This is done for drivers which don't include opt_usb.h so they will not recognize when USB_DEBUG changes. Since when has this defopt been the case? Ok, answering my own question,

Re: cprng sysctl: WARNING pseudorandom rekeying.

2012-11-19 Thread Iain Hibbert
On Wed, 14 Nov 2012, Iain Hibbert wrote: On Wed, 14 Nov 2012, Iain Hibbert wrote: On Mon, 12 Nov 2012, Iain Hibbert wrote: On Fri, 9 Nov 2012, Thor Lancelot Simon wrote: On Sat, Nov 10, 2012 at 12:39:59AM +0700, Robert Elz wrote: How? And if that's something

Re: cprng sysctl: WARNING pseudorandom rekeying.

2012-11-14 Thread Iain Hibbert
On Mon, 12 Nov 2012, Iain Hibbert wrote: On Fri, 9 Nov 2012, Thor Lancelot Simon wrote: On Sat, Nov 10, 2012 at 12:39:59AM +0700, Robert Elz wrote: How? And if that's something that is supposed to be enabled, why does the default install not just enable it? Did you install

Re: cprng sysctl: WARNING pseudorandom rekeying.

2012-11-14 Thread Iain Hibbert
On Wed, 14 Nov 2012, Iain Hibbert wrote: On Mon, 12 Nov 2012, Iain Hibbert wrote: On Fri, 9 Nov 2012, Thor Lancelot Simon wrote: On Sat, Nov 10, 2012 at 12:39:59AM +0700, Robert Elz wrote: How? And if that's something that is supposed to be enabled, why does

Re: cprng sysctl: WARNING pseudorandom rekeying.

2012-11-12 Thread Iain Hibbert
On Fri, 9 Nov 2012, Thor Lancelot Simon wrote: On Sat, Nov 10, 2012 at 12:39:59AM +0700, Robert Elz wrote: How? And if that's something that is supposed to be enabled, why does the default install not just enable it? Did you install by upgrading? If so, I think what you've run into

Re: cprng sysctl: WARNING pseudorandom rekeying.

2012-11-10 Thread Iain Hibbert
On Sat, 10 Nov 2012, Robert Elz wrote: Date:Fri, 9 Nov 2012 19:34:05 -0500 From:Thor Lancelot Simon t...@panix.com Message-ID: 20121110003405.ga4...@panix.com | No, the cprng named kernel is used _inside_ the kernel. It hadn't occurred to me before that that

Re: cprng sysctl: WARNING pseudorandom rekeying.

2012-11-10 Thread Iain Hibbert
On Sat, 10 Nov 2012, Iain Hibbert wrote: On Sat, 10 Nov 2012, Robert Elz wrote: Date:Fri, 9 Nov 2012 19:34:05 -0500 From:Thor Lancelot Simon t...@panix.com Message-ID: 20121110003405.ga4...@panix.com | No, the cprng named kernel is used _inside_

cprng sysctl: WARNING pseudorandom rekeying.

2012-11-09 Thread Iain Hibbert
Hi I get the above message during boot up. Every boot. Twice. At the same place.. Why is it necessary to SHOUT a warning, about what seems to be a normal occurrence? regards, iain

Re: cprng sysctl: WARNING pseudorandom rekeying.

2012-11-09 Thread Iain Hibbert
On Fri, 9 Nov 2012, Thor Lancelot Simon wrote: On Fri, Nov 09, 2012 at 05:07:38PM +, Iain Hibbert wrote: I get the above message during boot up. Every boot. Twice. At the same place.. Why is it necessary to SHOUT a warning, about what seems to be a normal occurrence? It should

Re: Serious WAPL performance problems

2012-10-29 Thread Iain Hibbert
On Mon, 29 Oct 2012, Roger Pau Monné wrote: time seq 1 3 | xargs touch I did this inside of a NetBSD DomU, and the time to perform the operation when using FFSv2 and WAPL is between 27-28s. Also, when the operation finishes, and I get the time results, it takes some time for the shell

Re: USB Bluetooth (ubt) detection on MacBook Air 11 inch (mid 2012)

2012-10-02 Thread Iain Hibbert
On Tue, 2 Oct 2012, Ryo ONODERA wrote: Hi, As mentioned in PR kern/46992, USB Bluetooth device on MacBook Air 5,1 reports wrong uaa-class value in ubt_match function, so 0xff (UDCLASS_VENDOR) instead of correct 0xe0 (UDCLASS_WIRELESS). To identify it as ubt(4) device, I want to introduce

Re: Parent device selection in kernel configuration

2012-09-23 Thread Iain Hibbert
On Sat, 22 Sep 2012, Bexley Hall wrote: Hopefully the correct list for this question... I'm looking for some guidance in deciding criteria that affect your (i.e., *my*) decision as to which of (for example): lpt* at acpi? lpt* at isa? lpt* at pnpbios? to use in a particular

Re: Tips on programming usb devices?

2012-09-11 Thread Iain Hibbert
On Tue, 11 Sep 2012, Brett Lymn wrote: On Mon, Sep 10, 2012 at 03:05:48PM +0100, Iain Hibbert wrote: The first 4 interfaces present themselves as general communications ports, of which the first permits standard serial connections through which modem Hayes style AT commands can

Re: Tips on programming usb devices?

2012-09-10 Thread Iain Hibbert
On Thu, 6 Sep 2012, Brian Buhrow wrote: For those of you who haven't been following the thread, I'm working on a driver for the Novatel 551L USB modem. I believe this device is based on the Qualcomm Gobi 3,000 chip set and features a multi-interface USB device. do you know if this

Re: ENOATTR vs ENODATA

2012-04-30 Thread Iain Hibbert
On Mon, 30 Apr 2012, Emmanuel Dreyfus wrote: Martin Husemann mar...@duskware.de wrote: I don't know - you could nuke ENOATTR from NetBSD and just make the kernel return ENODATA. I think this is the best way : ENOATTR does not seem to exist in any standard. We only use it in extended

Re: introduce device_is_attached()

2012-04-16 Thread Iain Hibbert
On Mon, 16 Apr 2012, Christoph Egger wrote: On 16.04.12 19:12, Matt Thomas wrote: On Apr 16, 2012, at 9:52 AM, Christoph Egger wrote: Hi, I want to introduce a new function to sys/devices.h: bool device_is_attached(device_t parent, cfdata_t cf); I'd prefer

Re: pmf(9) clarifications

2012-04-06 Thread Iain Hibbert
On Thu, 5 Apr 2012, David Young wrote: On Wed, Apr 04, 2012 at 07:25:55AM +0100, Iain Hibbert wrote: Hi Regarding pmf(9) API, is it safe to call pmf_device_deregister() if the device was not successfully registered as a power handler? The documentation does not mention this (though

Re: pmf(9) clarifications

2012-04-05 Thread Iain Hibbert
On Thu, 5 Apr 2012, David Young wrote: On Wed, Apr 04, 2012 at 07:25:55AM +0100, Iain Hibbert wrote: Hi Regarding pmf(9) API, is it safe to call pmf_device_deregister() if the device was not successfully registered as a power handler? The documentation does not mention this (though

pmf(9) clarifications

2012-04-04 Thread Iain Hibbert
Hi Regarding pmf(9) API, is it safe to call pmf_device_deregister() if the device was not successfully registered as a power handler? The documentation does not mention this (though the code looks as if that would work fine), nor the device_pmf_is_registered() function which may not be actually

Re: CVS commit: src/tests/modules

2012-03-22 Thread Iain Hibbert
On Thu, 22 Mar 2012, Martin Husemann wrote: On Thu, Mar 22, 2012 at 03:33:18AM -0400, Matthew Mondor wrote: I like the kern.module.supported, or perhaps kern.module.enabled, as I have systems built without module loading support yet still have a few module sysctls around under that same

Re: Audio drivers- Difference between start_output and trigger_output.

2011-12-14 Thread Iain Hibbert
On Wed, 14 Dec 2011, Nat Sloss wrote: Is is possible to rewrite btsco so that it uses trigger_output/input? Any thoughts appreciated. I don't think trigger_input/output is very useful for btsco(4), as it just forwards the output it receives it rather than producing/consuming audio in real

Re: KASSERTMSG fix

2011-09-26 Thread Iain Hibbert
On Mon, 26 Sep 2011, Joerg Sonnenberger wrote: On Sun, Sep 25, 2011 at 11:28:18PM +0200, Jean-Yves Migeon wrote: On 25.09.2011 20:17, Joerg Sonnenberger wrote: Just to practical notes: (1) Please test that lint(1) is not stupid enough to bail out on it. (2) Kill the !__STDC__

Re: KASSERTMSG fix

2011-09-26 Thread Iain Hibbert
On Mon, 26 Sep 2011, Joerg Sonnenberger wrote: On Mon, Sep 26, 2011 at 01:13:03AM +0200, Jean-Yves Migeon wrote: Just curious: clang comes with a static analyzer nowadays; wouldn't it be any better than the old lint, or is it missing features that can't make it a decent replacement for

Re: Where are the specific WARNS=n defined?

2011-08-23 Thread Iain Hibbert
On Tue, 23 Aug 2011, Mouse wrote: [...] gcc errors due to comparison of signed and unsigned values. It is best to fix the errors. What errors? It is not necessarily an error to compare signed and unsigned values. In my experience, that warning produces so many more false positives than

Re: autoclean mode for tmpfs

2011-08-08 Thread Iain Hibbert
On Sun, 7 Aug 2011, David Holland wrote: On Sun, Aug 07, 2011 at 06:29:01PM +0200, Marc Balmer wrote: And what is auto-erasing files good for in the first place? I don't get the point, for me it's calling for trouble. Traditionally, it's so /tmp doesn't grow without bound, which once

Re: modload_03.diff, was: Don't load kernel modules from the current directory

2011-08-05 Thread Iain Hibbert
On Fri, 5 Aug 2011, Marc Balmer wrote: This is the third iteration of the patch to make kernel module loading more secure. The only change to the previous patch is that the code, when loading a module from /stand/... now checks that the module name does not contain a path separator

Re: Sun keyboard on i386?

2011-07-13 Thread Iain Hibbert
On Wed, 13 Jul 2011, Mouse wrote: Isn't there a way a userland programm can inject events into wskbd(4) / wsmux(4)? Hm, I should look at that then. Might be difficult to figure out how, but it also might not. I don't recall exactly the problems I had, but I think injecting keyboard

Re: RFC: New security model secmodel_securechroot(9)

2011-07-09 Thread Iain Hibbert
On Sat, 9 Jul 2011, Alan Barrett wrote: On Sat, 09 Jul 2011, Aleksey Cheusov wrote: · Adding and enabling a ppp(4) interface is not allowed. · Adding and enabling a sl(4) interface is not allowed. · Adding and enabling a strip(4) interface is not allowed. ·

Re: CVS commit: pcc/arch/i386

2011-05-10 Thread Iain Hibbert
On Mon, 9 May 2011, Anders Magnusson wrote: Modified Files: pcc/arch/i386: table.c Log Message: Simple fix to avoid bug reported in Jira#PCC-343 by Iain Hibbert. and so, pcc achieves another milestone.. kernel text is mapped with 3 large pages and 302 normal pages Loaded initial

Re: GNU vs C99 extern inline

2011-04-20 Thread Iain Hibbert
On Tue, 19 Apr 2011, David Young wrote: 2. kern/kern_sleepq.c:sleepq_insert() The only place this is called aside from that file is compat_sa.c so its probably a gross invasion of the API. Probably a gross invasion. considering what to do about this one, I thought to make it static

Re: GNU vs C99 extern inline

2011-04-17 Thread Iain Hibbert
On Sun, 17 Apr 2011, Joerg Sonnenberger wrote: On Sat, Apr 16, 2011 at 09:27:41PM +0100, Iain Hibbert wrote: returning to GNUC vs C99 semantics for inline functions, this is now partly handled with a __c99inline keyword but there are several files in the kernel containing functions marked

GNU vs C99 extern inline

2011-04-16 Thread Iain Hibbert
Hi returning to GNUC vs C99 semantics for inline functions, this is now partly handled with a __c99inline keyword but there are several files in the kernel containing functions marked inline that yet require external linkage as they are also called from other source modules.. this is provided by

Re: NetBSD kernel modules.

2010-12-07 Thread Iain Hibbert
On Tue, 7 Dec 2010, John Nemeth wrote: On Apr 28, 10:22am, Piotr Adamus wrote: } } I have one simple question: is it possible to compile these drivers } into modules only: sdhc, ubt, uaudio? At this moment I don't have } NetBSD installed. These drivers don't have suspend support enabled.

Apple Magic Mouse driver

2010-05-15 Thread Iain Hibbert
Hi, I wrote a driver for the Apple Magic Mouse, as the protocol was mostly decoded by a Linux developer, and Somebody was kind enough to send me one.. http://www.netbsd.org/~plunky/btmagic.4 http://www.netbsd.org/~plunky/btmagic.c The mouse itself is a wireless Bluetooth mouse and

Re: Using proplist ioctl's from within the kernel

2010-03-26 Thread Iain Hibbert
On Thu, 25 Mar 2010, Paul Goyette wrote: So would it be appropriate for me to expose sysmon_envsys's global mutex and its device list in order for acpi_apm to scan for battery sensors and A/C adapters? I think better to not expose subsystem internals.. but can you split the sysmon_envsys API

Re: (Semi-random) thoughts on device tree structure and devfs

2010-03-12 Thread Iain Hibbert
On Fri, 12 Mar 2010, David Holland wrote: On Thu, Mar 11, 2010 at 03:33:27PM +, Iain Hibbert wrote: Could you show one (or more) real example(s) / senario(s)? That would help to understand problems clarify requirements... Well, a line discipline which takes serial IO

Re: (Semi-random) thoughts on device tree structure and devfs

2010-03-10 Thread Iain Hibbert
On Tue, 9 Mar 2010, Johnny Billquist wrote: The problem you are highlighting is another one, and one which I agree it would be nice to have a solution to. But the only solution I can come up with is to be able to refer to disks by their name in the disk label, or something similar, which is

Re: (Semi-random) thoughts on device tree structure and devfs

2010-03-09 Thread Iain Hibbert
On Mon, 8 Mar 2010, David Young wrote: On Mon, Mar 08, 2010 at 12:34:23PM -0700, Ted Lemon wrote: On Mar 8, 2010, at 12:47 AM, Masao Uebayashi wrote: How do you write a kernel config which can always identify my USB disk as sd0a, even if I plug random devices? You'd need to put the

Re: (Semi-random) thoughts on device tree structure and devfs

2010-03-09 Thread Iain Hibbert
On Tue, 9 Mar 2010, Joerg Sonnenberger wrote: On Tue, Mar 09, 2010 at 08:09:57AM +, Iain Hibbert wrote: I have never used wedges but, for the disk case, would it not be better to make a method of configuring a dk in advance, so that whenever a disk appears with the correct parameters

Re: btuart and SOCKET Bluetooth CF

2010-01-20 Thread Iain Hibbert
On Wed, 20 Jan 2010, KIYOHARA Takashi wrote: also - should this value reflect the real length (including the pad)? eg data stream: I know, DTL operates following packet format. In acldata case: { { uint8 type; uint8 rsvd; uint16 len; } NOKIA DTL header; {

vdevgone

2010-01-01 Thread Iain Hibbert
Hi, I wonder what happens when vdevgone() is called? The reason I ask is that I have a driver that provides some tty ports. In the detach function (below), I basically do the following 0. deregister pmf functions 1. abort all pending transfers 2. wait for refcnt to