diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-12-22 20:46:49 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-12-22 20:46:49 +0000 |
commit | feda47451f4d526c68ded54ae9dfab802422270a (patch) | |
tree | 60730caa4af6ed8174d53474b102969afd270e33 /target/linux/oxnas/patches-3.18 | |
parent | 3113bf4cb88449a68d6ab6760cb133663ea54aa4 (diff) | |
download | upstream-feda47451f4d526c68ded54ae9dfab802422270a.tar.gz upstream-feda47451f4d526c68ded54ae9dfab802422270a.tar.bz2 upstream-feda47451f4d526c68ded54ae9dfab802422270a.zip |
oxnas: sata_oxnas: refactoring phase 1
locking for 2nd port and hwraid was added from vendor's GPL code which
doesn't comply with current kernel coding style.
- moved all global variables into host_priv
- renamed locks
- sanetized acquire() and release() parameter list
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
SVN-Revision: 43766
Diffstat (limited to 'target/linux/oxnas/patches-3.18')
-rw-r--r-- | target/linux/oxnas/patches-3.18/999-libata-hacks.patch | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/target/linux/oxnas/patches-3.18/999-libata-hacks.patch b/target/linux/oxnas/patches-3.18/999-libata-hacks.patch index 39d9e51cf0..a1c80d89eb 100644 --- a/target/linux/oxnas/patches-3.18/999-libata-hacks.patch +++ b/target/linux/oxnas/patches-3.18/999-libata-hacks.patch @@ -6,9 +6,9 @@ Index: linux-3.18-rc7/drivers/ata/libata-core.c return AC_ERR_SYSTEM; } -+ if (ap->ops->acquire_hw && !ap->ops->acquire_hw(ap->port_no, 0, 0)) { ++ if (ap->ops->acquire_hw && !ap->ops->acquire_hw(ap, 0, 0)) { + spin_unlock_irqrestore(ap->lock, flags); -+ if (!ap->ops->acquire_hw(ap->port_no, 1, (2*HZ))) { ++ if (!ap->ops->acquire_hw(ap, 1, (2*HZ))) { + return AC_ERR_TIMEOUT; + } + spin_lock_irqsave(ap->lock, flags); @@ -49,11 +49,12 @@ Index: linux-3.18-rc7/include/linux/libata.h /* * Configuration and exception handling -@@ -974,6 +976,8 @@ struct ata_port_operations { +@@ -974,6 +976,9 @@ struct ata_port_operations { void (*phy_reset)(struct ata_port *ap); void (*eng_timeout)(struct ata_port *ap); -+ int (*acquire_hw)(int port_no, int may_sleep, int timeout_jiffies); ++ int (*acquire_hw)(struct ata_port *ap, int may_sleep, ++ int timeout_jiffies); + /* * ->inherits must be the last field and all the preceding |