Skip to contentSkip to conversation

sending uevent form SATA promise driver.

DISCUSSION Padmini Krishnamurthy 2 participants 4 messages Oct 27, 2008

lore
Share & tools
lore
#0 lore raw

I am adding hotplug support to our SATA promise driver. Can I send a uevent from promise driver directly instead of using the hotplug support provided by acpi?. We do not have acpi support .

Thanks,
Padmini

#1 lore raw
Quoted 3 lines · Padmini Krishnamurthy

I am adding hotplug support to our SATA promise driver. Can I send a uevent from promise driver directly instead of using the hotplug support provided by acpi?. We do not have acpi support .

What do you mean? I guess you create and remove devices in the kernel device tree, which represent the hotplugged devices connected to your controller. These devices will send uevents on their own, there is usually no need to send any events with the driver. Just run "udevadm monitor" while you connect/diconnect any device, and you will see hotplugged devices coming and going depending on the bus they live on.

Kay

#2 lore raw
In reply to Padmini Krishnamurthy

Our test device is connected to the promise card which sits on a PCI slot on the PC. Our test SATA driver drives this device. The driver is loaded during bootup. I am seeing output of both udevadm and /var/log/messages when I turn on the device. I see the interrupt handling messages on /var/log/messages but udevadm does not report any event recived. So, I ported some of the hotplug support from libata. But there I see that the hotplug event notification is handled in acpi. So, I am not sure, if I have to add this in our driver at the device attach routine?
How would the uevent be sent to udev when the device is attached?

Thanks,
Padmini

Quoted 27 lines · Kay Sievers

From: Kay Sievers <[email protected]>
Subject: Re: sending uevent form SATA promise driver.
To: "Padmini Krishnamurthy" <[email protected]>
Cc: [email protected]
Date: Monday, October 27, 2008, 9:50 AM

Quoted 1 line · Padmini Krishnamurthy

I am adding hotplug support to our SATA promise

driver. Can I send a uevent

Quoted 1 line

from promise driver directly instead of using the

hotplug support provided

Quoted 1 line

by acpi?. We do not have acpi support .

What do you mean? I guess you create and remove devices in the kernel
device tree, which represent the hotplugged devices connected to your
controller. These devices will send uevents on their own, there is
usually no need to send any events with the driver. Just run "udevadm
monitor" while you connect/diconnect any device, and you will see
hotplugged devices coming and going depending on the bus they live on.

Kay

#3 lore raw
In reply to Padmini Krishnamurthy
Quoted 3 lines · Padmini Krishnamurthy

Our test device is connected to the promise card which sits on a PCI slot on the PC. Our test SATA driver drives this device. The driver is loaded during bootup. I am seeing output of both udevadm and /var/log/messages when I turn on the device. I see the interrupt handling messages on /var/log/messages but udevadm does not report any event recived. So, I ported some of the hotplug support from libata. But there I see that the hotplug event notification is handled in acpi. So, I am not sure, if I have to add this in our driver at the device attach routine?
How would the uevent be sent to udev when the device is attached?

What kind of devices does this driver create in the kernel? What are the parent devices of the block devices it offers? SCSI, libata, whatever?

Your driver should just create devices representing the stuff that is connected to the controller, the creation of these devices will do the uevent, you do not create custom events on your own in any usual driver code.

Kay