I'm going through the probe function of the following driver
/drivers/net/ethernet/smsc/smsc911x.c
Inside the probe function it has been commented that
/* Ensure interrupts are globally disabled before connecting ISR */
smsc911x_disable_irq_chip(dev);
retval = request_irq(dev->irq, smsc911x_irqhandler,
irq_flags | IRQF_SHARED, dev->name, dev);
But I don't see it is TRUE in case of every other device driver ,so why it is in case of this particular Network driver?
Why interrupts are globally disabled before connecting ISR?
The comment says that the interrupts are disabled globally; but as in the function call below, the interrupts are disabled only for the device smsc driver attaches to. This is normally done to avoid getting interrupts well before driver preparing itself for processing interrupts. Since this is for an Ethernet driver, interrupts are enabled most likely during interface up.
The code snip in question gets executed during module load which is well before the interface up.
Related
I tried on Latitude 3500 Ubuntu kernel 5.13.1. Its pci switch 1d:0.0 is rp supporting aer/dpc, and connected to Eth port at 1:0.0 that support aer.
With aer_inject I can run all examples, generate aer interrupt from Eth port. I modified dpc.c to enable rp dpc and monitored dpc irq/handler, no dpc irq can be raised. Then I added code on aer_inject to replace the irq_inject_interrupt() with dpc s/w trigger which works. My questions are:
1.Why there is no dpc_inject? any possibility to do a dpc_inject?
2.irq_inject_interrupt() works for aer because its status reg is r/w, not work for dpc because its status reg is RO?
3.Per spec certain aer errors shall raise dpc interrupt, it doesn't work. would the the reason be I used aer_inject no real h/w error happens?
Recently I was Trying to work with Qualcomm platform device. I was looking at Flow of touchscreen hbtp_input device driver, the driver is getting registered and calling init function but it doesn't call probe function.Does drivers work without probe functions?
I'm testing a mcu PIC in ide ccs, in loopback mode. But when I send a message, can see it in can-bus.
The datasheet says:
The Loopback mode is a silent mode, meaning no messages will be transmitted while in this state (including error flags or Acknowledge signals). The TXCAN pin will be in a recessive state.
at read the register CANSTAT, I see in bit 7-5(OPMODE) - 010b, which means the operation mode is correct, but the loopback not silent.
where am I wrong in this?
I have a device driver with misc_register() API being called to create a serial device. Now, I want to call misc_deregister() because the device does not function any more due to hardware change (for example removal of cable of the serial port). Now the application has opened this device and performing operations on it, so there is an open file descriptor for this device.
I want to know if the driver wait for the application to call release (or close() API) on the device before calling misc_deregister()? Or can the driver call misc_deregister() and then it can still receive a (last) release callback?
I have written a custom PLB core for my design, and added interrupt functionality during custom core generation. Interrupt generation logic is designed in custom peripheral. For interrupt control, I added XPS interrupt controller (v2.01a) to the system and connected my custom core's interrupt ports to INTC via master bus. However, as I need to connect IRQ output of INTC to Interrupt input of Microblaze (v8.40), I cannot connect those two ports using Ports tab of System Assembly View, there is no connection option except external port and core's itself. I tried to do it manually on .MHS file, but still I cannot see IRQ and Interrupt ports connected in Graphical Design View. Besides, in Bus Interfaces tab of Assembly View, I can see INTERRUPT port of Microblaze but again, no change can be made.
Use AXI_INTC insteed of XPS_INTC and it should work.
There you will find two bus :
AXI BUS
INTERRUPT BUS.
You will be able to connect the interrupt bus to your MicroBlaze component