Re: libata hotplug question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2009-12-01 at 13:43 +1100, Benjamin Herrenschmidt wrote:
> > Oh... yeah, that was the original intention when adding those
> > functions but you wouldn't need them for hot plug/unplug.  Just set
> > probe mask and freeze the port.  EH will do the right thing.

 .../...

> But for that to work right, I need to be able to prevent probing when
> setting up the host, when I know that the bay is empty, which the link
> stuff would cover nicely too, don't you think ? Or do you have a better
> idea ?
> 
> I also have to be careful of a possible race if the hotplug callback
> since it can potentially happen as soon as I enter my driver->probe()
> (it comes from the macio "bus" layer). What is the harm of triggering a
> hotplug if nothing was actually unplugged ? Will libata silently just
> keep things as they were ?

So I tried with implementing the link_online and link_offline callbacks
and it doesn't fly very high.

When I unplug the bay, it displays:

ata3: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0xe frozen
ata3: EH complete

and doesn't really "unplug" it (ie, trying to access the device then
causes all sorts of errors to pile up in the log). Plugging it back then
causes it to soft reset and restore the DMA timings and it works again.

But it's overall sub optimal. Comparatively, it worked better without
the link callbacks though I would call it sub-optimal :-)

What would be the best way to tell libata to just remove the device and
not bother poking the HW again on an unplug and do as it does today on a
plug without the link callbacks ?

Cheers,
Ben.

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux