Re: [PATCH] make ata_exec_internal_sg honor DMADIR

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

 



Hello,

Le lundi 20 mai 2013 09:30:12, Tejun Heo a écrit :
> > Unplugging the drive would, in my understanding, loose the setting if
> > stored at the device level. Is there another way to trigger a new
> > initialisation attempt after changing the setting ?
> > Should I add a "rescan" device attribute ?
> 
> But isn't that what we want?  We don't really know to which side the
> bridge is attached but given SATA supports hotplug while PATA doesn't,
> it's natural to assume the bridge to be part of the device rather than
> bus and reset the state on device hotplug, no?

Semantically, I agree that the bridge is part of the device.

Putting the knob on the port is just a way I thought about to hold the 
configuration before the drive is plugged into the system (because so far I 
was focussed on host-side being hot-pluggable, I indeed didn't consider the 
opposite situation) so it can be used before libata tries to access the 
device.

So it would be something like:
- plug device (or boot up)
  -> detection times out, device "half" configured (sysfs node present, drive
     not usable)
- cd $DEVICE_IN_SYSFS
- echo 1 > atapi_dmadir
- echo 1 > (rescan|reinit|...)

If it's ok, I'll write a patch to add a rescan write-only file (will also be 
independent from the 2 other patches).
I'll certainly need a few days to get it though: I feel I'll have some 
difficulty finding the right function to call, and to call it correctly (I 
feel interrupt handler & locking, which I'm not familiar with at kernel 
level). Pointers welcome !

Regards,
-- 
Vincent Pelletier
--
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