Re: [PATCH 5/5] libata: add @disable_on_err argument to ata_set_mode()

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

 



Tejun Heo wrote:
ata_set_mode() used to disable whole port on failure.  This patch adds
@disable_on_err which makes ata_set_mode() disable failing devices
when non-zero, and simply return when zero.  Due to the port-wide
characteristic of ATA xfer mode configuration, ata_mode_set() is the
final place to determine device offlining; thus, the @disable_on_err
mechanism to tell it which action to take on failure.

Now port is disabled only if all devices on the port is disabled.
This behavior change is intentional.

Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>

What about this scenario:

* set features - xfer mode fails
* we offline failed device
* we talk to another device on the same bus
* now the PATA cable is possibly spewing something the failed device won't like

Another scenario: some of the drivers/ide hardware supported only by the 'generic' driver. Some of the hardware, we can do what the device is already programmed to do, and that's it. It might be in DMA mode, in which case we can DMA. But we can't [re]tune it at all.

Thus if set features - xfer mode fails, we can do the easy thing -- stop talking to the port completely -- or the hard thing, recovery. Recovery should involve attempting to see if the device, which by definition responded to IDENTIFY DEVICE successfully, will once again respond to IDENTIFY DEVICE. That will tell us what mode the drive is in, tell us if its responding, and allow us to decide how safe it is to program the OTHER device at a higher speed.

	Jeff


-
: 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