device-driver

.INF files and NCF_HAS_UI: how to write .dll for displaying advanced properties tab of network driver?

為{幸葍}努か 提交于 2019-12-10 11:33:31
问题 I have a NDIS driver, which gets listed both in connection properties's installed items list and in device manager; the question is, how do I write an extension which will be used for managing driver's properties, and how to install it? Of course, a plain GUI program may communicate with the driver, set properties, get version numbers and other statistical info etc, that's what DeviceIoControl exists for; but, does this means that no dedicated interface exists to inform the driver about

Error in installing windows printer driver

人走茶凉 提交于 2019-12-10 10:47:51
问题 I am trying to install a windows printer driver(OEMUNI) provided as a sample in WDK(Windows Driver Kit). But I keep getting following error from add printer wizard: " Printer driver was not installed. Operation could not be completed (error 0x00000002) ". I have tried running the add printer wizard with admin privileges but I still get the same problem. I am using windows 7, 64-bit version. Can somebody help me here ? Also, what would the error code:0x00000002 signify ? Following is my INF

what happens when you plug in a new USB device?

若如初见. 提交于 2019-12-10 10:27:28
问题 I have an embedded device with a USB connection. When the user plugs the device into their PC (Windows, OSX), how does the operating system discover what drivers to install? How do I get my drivers to be selected? Can they reside on some central server (run by the OS vendor)? 回答1: This is for Windows : When a USB device is plugged into the system, the USB bus driver is notified. The bus driver sends a standard USB request (USB_DEVICE_DESCRIPTOR) to the device. With this the device reports its

How to set errno in Linux device driver?

别等时光非礼了梦想. 提交于 2019-12-10 02:02:16
问题 I am designing a Linux character device driver. I want to set errno when error occurs in ioctl() system call. long my_own_ioctl(struct file *file, unsigned int req, unsigned long arg) { long ret = 0; BOOL isErr = FALSE; // some operation // ... if (isErr) { // set errno // ... <--- What should I do? ret = -1; } return ret; } What should I do to achieve that? Thank you at advance! Please allow me to explain my application with more detail. My device is located in /dev/myCharDev. My user space

Is there a way to programmatically find chipset's north bridge, south bridge names and other hardware info on windows?

点点圈 提交于 2019-12-08 19:41:35
问题 Is there a way to programmatically find system chipset's north bridge, south bridge names and other hardware info on windows ? I don't think WMI provides this information. I'm trying to find out how tools like hwinfo and cpuinfo find this information. 回答1: People normally do this kind of stuff through WMI, but it fails to provide useful information a lot of times, even providing "wrong" info because sometimes it relies on vendor filled info from the BIOS (via SMBIOS), which frequently comes

Which processor would execute hardware interrupt in a muticore system

帅比萌擦擦* 提交于 2019-12-08 19:38:31
In general hardware interrupts need to be processed immediately, at least so as to acknowledge it and do some first level of processing. As I understand this is not scheduled activity. Please correct me. So the question is how to choose a processor that would actually execute this hardware interrupt handler? One can answer this for Linux and/or BSD systems In general, this depends on the functionality offered by multi-core processor and OS. While using multi-core processors, you might need to configure the affinity of the interrupt as per your requirement. In the case of linux , the /proc file

Linux allocates memory at specific physical address

試著忘記壹切 提交于 2019-12-08 13:17:23
问题 I am testing a PCI Endpoint driver, I would like to do simple copy from the PCI RootPort side to the PCI Endpoint side. In PCI Endpoint side, we have address translation from PCI address to CPU physical address. We can configure the CPU physical address in the translation so that it maps to the specific DRAM region. The problem is how can we allocate a memory buffer at that specific CPU physical address to make sure the write from RootPort side really works? Any recommendations are

programming touchpad of laptop

随声附和 提交于 2019-12-08 12:37:20
问题 I want to write a program which can control my cursor movements depending on the the way I move my finger on the touchpad. I want my program to get the location where the user touched the touchpad, then I want to control mouse movement using my own program. I want do this in Java. Can I do this in Java? I would like to run it on Windows OS. Does my laptops touchpad device driver provide some API by which I can get the info about when and where the user touched the touchpad? 回答1: Think about

How to pass a bitfield (by reference) to a function?

我怕爱的太早我们不能终老 提交于 2019-12-08 08:19:28
My question is how to pass a bitfield instance by reference to a function. I have performed this as shown below, but when i eneter the function DAC_set_gain_code, the processor throws an interupt fault. Is what i am doing correct as far as passing the bitfield goes? I have created a bitfield (see below) which represents a 24bit register on an DAC chip, which i want to write into and lives in the .h file. typedef struct { uint8_t rdwr_u8: 1; uint8_t not_used_u8: 3; uint8_t address_u8: 4; uint8_t reserved_u8: 8; uint8_t data_u8: 8; }GAIN_REG_st; I have a function which initialises the bitfield

Can ndo_start_xmit() be called from atomic contexts?

放肆的年华 提交于 2019-12-08 07:56:16
问题 Is ndo_start_xmit() called (or could it be called) from atomic contexts? Please provide documentation references. More specifically, is ndo_start_xmit() forbidden from directly doing any of the following: reading and writing a TCP socket? locking a mutex or semaphore? sleeping? calling kmalloc() without GFP_ATOMIC ? I did some simple tests, and at least the first 3 cases fail at least occasionally. Calls to ndo_start_xmit() driven by network operations involving less queueing seem to fail