From: Greg Kroah-Hartman Date: Tue, 16 Dec 2008 23:08:21 +0000 (-0800) Subject: more .27 patches X-Git-Tag: v2.6.27.10~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=692ad467261489442d4d6ca5a7aee7e53f8bf1d8;p=thirdparty%2Fkernel%2Fstable-queue.git more .27 patches --- diff --git a/queue-2.6.27/can-fix-can__flag-handling-in-can_filter.patch b/queue-2.6.27/can-fix-can__flag-handling-in-can_filter.patch new file mode 100644 index 00000000000..0d4001fbc84 --- /dev/null +++ b/queue-2.6.27/can-fix-can__flag-handling-in-can_filter.patch @@ -0,0 +1,152 @@ +From d253eee20195b25e298bf162a6e72f14bf4803e5 Mon Sep 17 00:00:00 2001 +From: Oliver Hartkopp +Date: Wed, 3 Dec 2008 15:52:35 -0800 +Subject: can: Fix CAN_(EFF|RTR)_FLAG handling in can_filter + +From: Oliver Hartkopp + +commit d253eee20195b25e298bf162a6e72f14bf4803e5 upstream. + +Due to a wrong safety check in af_can.c it was not possible to filter +for SFF frames with a specific CAN identifier without getting the +same selected CAN identifier from a received EFF frame also. + +This fix has a minimum (but user visible) impact on the CAN filter +API and therefore the CAN version is set to a new date. + +Indeed the 'old' API is still working as-is. But when now setting +CAN_(EFF|RTR)_FLAG in can_filter.can_mask you might get less traffic +than before - but still the stuff that you expected to get for your +defined filter ... + +Thanks to Kurt Van Dijck for pointing at this issue and for the review. + +Signed-off-by: Oliver Hartkopp +Acked-by: Kurt Van Dijck +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/can/core.h | 2 - + net/can/af_can.c | 63 +++++++++++++++++++++++++++++++++++------------ + net/can/bcm.c | 7 ++--- + 3 files changed, 53 insertions(+), 19 deletions(-) + +--- a/include/linux/can/core.h ++++ b/include/linux/can/core.h +@@ -19,7 +19,7 @@ + #include + #include + +-#define CAN_VERSION "20071116" ++#define CAN_VERSION "20081130" + + /* increment this number each time you change some user-space interface */ + #define CAN_ABI_VERSION "8" +--- a/net/can/af_can.c ++++ b/net/can/af_can.c +@@ -319,23 +319,52 @@ static struct dev_rcv_lists *find_dev_rc + return n ? d : NULL; + } + ++/** ++ * find_rcv_list - determine optimal filterlist inside device filter struct ++ * @can_id: pointer to CAN identifier of a given can_filter ++ * @mask: pointer to CAN mask of a given can_filter ++ * @d: pointer to the device filter struct ++ * ++ * Description: ++ * Returns the optimal filterlist to reduce the filter handling in the ++ * receive path. This function is called by service functions that need ++ * to register or unregister a can_filter in the filter lists. ++ * ++ * A filter matches in general, when ++ * ++ * & mask == can_id & mask ++ * ++ * so every bit set in the mask (even CAN_EFF_FLAG, CAN_RTR_FLAG) describe ++ * relevant bits for the filter. ++ * ++ * The filter can be inverted (CAN_INV_FILTER bit set in can_id) or it can ++ * filter for error frames (CAN_ERR_FLAG bit set in mask). For error frames ++ * there is a special filterlist and a special rx path filter handling. ++ * ++ * Return: ++ * Pointer to optimal filterlist for the given can_id/mask pair. ++ * Constistency checked mask. ++ * Reduced can_id to have a preprocessed filter compare value. ++ */ + static struct hlist_head *find_rcv_list(canid_t *can_id, canid_t *mask, + struct dev_rcv_lists *d) + { + canid_t inv = *can_id & CAN_INV_FILTER; /* save flag before masking */ + +- /* filter error frames */ ++ /* filter for error frames in extra filterlist */ + if (*mask & CAN_ERR_FLAG) { +- /* clear CAN_ERR_FLAG in list entry */ ++ /* clear CAN_ERR_FLAG in filter entry */ + *mask &= CAN_ERR_MASK; + return &d->rx[RX_ERR]; + } + +- /* ensure valid values in can_mask */ +- if (*mask & CAN_EFF_FLAG) +- *mask &= (CAN_EFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG); +- else +- *mask &= (CAN_SFF_MASK | CAN_RTR_FLAG); ++ /* with cleared CAN_ERR_FLAG we have a simple mask/value filterpair */ ++ ++#define CAN_EFF_RTR_FLAGS (CAN_EFF_FLAG | CAN_RTR_FLAG) ++ ++ /* ensure valid values in can_mask for 'SFF only' frame filtering */ ++ if ((*mask & CAN_EFF_FLAG) && !(*can_id & CAN_EFF_FLAG)) ++ *mask &= (CAN_SFF_MASK | CAN_EFF_RTR_FLAGS); + + /* reduce condition testing at receive time */ + *can_id &= *mask; +@@ -348,15 +377,19 @@ static struct hlist_head *find_rcv_list( + if (!(*mask)) + return &d->rx[RX_ALL]; + +- /* use extra filterset for the subscription of exactly *ONE* can_id */ +- if (*can_id & CAN_EFF_FLAG) { +- if (*mask == (CAN_EFF_MASK | CAN_EFF_FLAG)) { +- /* RFC: a use-case for hash-tables in the future? */ +- return &d->rx[RX_EFF]; ++ /* extra filterlists for the subscription of a single non-RTR can_id */ ++ if (((*mask & CAN_EFF_RTR_FLAGS) == CAN_EFF_RTR_FLAGS) ++ && !(*can_id & CAN_RTR_FLAG)) { ++ ++ if (*can_id & CAN_EFF_FLAG) { ++ if (*mask == (CAN_EFF_MASK | CAN_EFF_RTR_FLAGS)) { ++ /* RFC: a future use-case for hash-tables? */ ++ return &d->rx[RX_EFF]; ++ } ++ } else { ++ if (*mask == (CAN_SFF_MASK | CAN_EFF_RTR_FLAGS)) ++ return &d->rx_sff[*can_id]; + } +- } else { +- if (*mask == CAN_SFF_MASK) +- return &d->rx_sff[*can_id]; + } + + /* default: filter via can_id/can_mask */ +--- a/net/can/bcm.c ++++ b/net/can/bcm.c +@@ -64,10 +64,11 @@ + #define BCM_CAN_DLC_MASK 0x0F /* clean private flags in can_dlc by masking */ + + /* get best masking value for can_rx_register() for a given single can_id */ +-#define REGMASK(id) ((id & CAN_RTR_FLAG) | ((id & CAN_EFF_FLAG) ? \ +- (CAN_EFF_MASK | CAN_EFF_FLAG) : CAN_SFF_MASK)) ++#define REGMASK(id) ((id & CAN_EFF_FLAG) ? \ ++ (CAN_EFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG) : \ ++ (CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG)) + +-#define CAN_BCM_VERSION "20080415" ++#define CAN_BCM_VERSION CAN_VERSION + static __initdata const char banner[] = KERN_INFO + "can: broadcast manager protocol (rev " CAN_BCM_VERSION ")\n"; + diff --git a/queue-2.6.27/can-omit-received-rtr-frames-for-single-id-filter-lists.patch b/queue-2.6.27/can-omit-received-rtr-frames-for-single-id-filter-lists.patch new file mode 100644 index 00000000000..be2df2f1c5c --- /dev/null +++ b/queue-2.6.27/can-omit-received-rtr-frames-for-single-id-filter-lists.patch @@ -0,0 +1,37 @@ +From f706644d55f90e8306d87060168fef33804d6dd9 Mon Sep 17 00:00:00 2001 +From: Oliver Hartkopp +Date: Thu, 4 Dec 2008 15:01:08 -0800 +Subject: can: omit received RTR frames for single ID filter lists + +From: Oliver Hartkopp + +commit f706644d55f90e8306d87060168fef33804d6dd9 upstream. + +Since commit d253eee20195b25e298bf162a6e72f14bf4803e5 the single CAN +identifier filter lists handle only non-RTR CAN frames. + +So we need to omit the check of these filter lists when receiving RTR +CAN frames. + +Signed-off-by: Oliver Hartkopp +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/can/af_can.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/net/can/af_can.c ++++ b/net/can/af_can.c +@@ -622,7 +622,10 @@ static int can_rcv_filter(struct dev_rcv + } + } + +- /* check CAN_ID specific entries */ ++ /* check filterlists for single non-RTR can_ids */ ++ if (can_id & CAN_RTR_FLAG) ++ return matches; ++ + if (can_id & CAN_EFF_FLAG) { + hlist_for_each_entry_rcu(r, n, &d->rx[RX_EFF], list) { + if (r->can_id == can_id) { diff --git a/queue-2.6.27/e1000e-fix-double-release-of-mutex.patch b/queue-2.6.27/e1000e-fix-double-release-of-mutex.patch new file mode 100644 index 00000000000..129b892a7f5 --- /dev/null +++ b/queue-2.6.27/e1000e-fix-double-release-of-mutex.patch @@ -0,0 +1,47 @@ +From 30bb0e0dce78427f3e5cb728d6b5ea73acbefffa Mon Sep 17 00:00:00 2001 +From: Jeff Kirsher +Date: Thu, 11 Dec 2008 21:28:11 -0800 +Subject: e1000e: fix double release of mutex + +From: Jeff Kirsher + +commit 30bb0e0dce78427f3e5cb728d6b5ea73acbefffa upstream. + +During a reset, releasing the swflag after it failed to be acquired would +cause a double unlock of the mutex. Instead, test whether acquisition of +the swflag was successful and if not, do not release the swflag. The reset +must still be done to bring the device to a quiescent state. + +This resolves [BUG 12200] BUG: bad unlock balance detected! e1000e +http://bugzilla.kernel.org/show_bug.cgi?id=12200 + +Signed-off-by: Jeff Kirsher +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/e1000e/ich8lan.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +--- a/drivers/net/e1000e/ich8lan.c ++++ b/drivers/net/e1000e/ich8lan.c +@@ -1791,12 +1791,17 @@ static s32 e1000_reset_hw_ich8lan(struct + ctrl |= E1000_CTRL_PHY_RST; + } + ret_val = e1000_acquire_swflag_ich8lan(hw); ++ /* Whether or not the swflag was acquired, we need to reset the part */ + hw_dbg(hw, "Issuing a global reset to ich8lan"); + ew32(CTRL, (ctrl | E1000_CTRL_RST)); + msleep(20); + +- /* release the swflag because it is not reset by hardware reset */ +- e1000_release_swflag_ich8lan(hw); ++ if (!ret_val) { ++ /* release the swflag because it is not reset by ++ * hardware reset ++ */ ++ e1000_release_swflag_ich8lan(hw); ++ } + + ret_val = e1000e_get_auto_rd_done(hw); + if (ret_val) { diff --git a/queue-2.6.27/lib-idr.c-fix-bug-introduced-by-rcu-fix.patch b/queue-2.6.27/lib-idr.c-fix-bug-introduced-by-rcu-fix.patch new file mode 100644 index 00000000000..2e11ce86c21 --- /dev/null +++ b/queue-2.6.27/lib-idr.c-fix-bug-introduced-by-rcu-fix.patch @@ -0,0 +1,48 @@ +From 711a49a07f84f914aac26a52143f6e7526571143 Mon Sep 17 00:00:00 2001 +From: Manfred Spraul +Date: Wed, 10 Dec 2008 18:17:06 +0100 +Subject: lib/idr.c: Fix bug introduced by RCU fix + +From: Manfred Spraul + +commit 711a49a07f84f914aac26a52143f6e7526571143 upstream. + +The last patch to lib/idr.c caused a bug if idr_get_new_above() was +called on an empty idr. + +Usually, nodes stay on the same layer. New layers are added to the top +of the tree. + +The exception is idr_get_new_above() on an empty tree: In this case, the +new root node is first added on layer 0, then moved upwards. p->layer +was not updated. + +As usual: You shall never rely on the source code comments, they will +only mislead you. + +Signed-off-by: Manfred Spraul +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + lib/idr.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/lib/idr.c ++++ b/lib/idr.c +@@ -220,8 +220,14 @@ build_up: + */ + while ((layers < (MAX_LEVEL - 1)) && (id >= (1 << (layers*IDR_BITS)))) { + layers++; +- if (!p->count) ++ if (!p->count) { ++ /* special case: if the tree is currently empty, ++ * then we grow the tree by moving the top node ++ * upwards. ++ */ ++ p->layer++; + continue; ++ } + if (!(new = get_from_free_list(idp))) { + /* + * The allocation failed. If we built part of diff --git a/queue-2.6.27/libata-fix-seagate-ncq-flush-blacklist.patch b/queue-2.6.27/libata-fix-seagate-ncq-flush-blacklist.patch new file mode 100644 index 00000000000..ef9c15f5b10 --- /dev/null +++ b/queue-2.6.27/libata-fix-seagate-ncq-flush-blacklist.patch @@ -0,0 +1,99 @@ +From d10d491f842243e2e3bf5a2714020f9d649e1e38 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Thu, 11 Dec 2008 13:42:42 +0900 +Subject: libata: fix Seagate NCQ+FLUSH blacklist + +From: Tejun Heo + +commit d10d491f842243e2e3bf5a2714020f9d649e1e38 upstream. + +Due to miscommunication, P/N was mistaken as firmware revision +strings. Update it. + +Signed-off-by: Tejun Heo +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/libata-core.c | 65 +++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 59 insertions(+), 6 deletions(-) + +--- a/drivers/ata/libata-core.c ++++ b/drivers/ata/libata-core.c +@@ -3979,17 +3979,70 @@ static const struct ata_blacklist_entry + { "ST3160023AS", "3.42", ATA_HORKAGE_NONCQ }, + + /* Seagate NCQ + FLUSH CACHE firmware bug */ +- { "ST31500341AS", "9JU138", ATA_HORKAGE_NONCQ | ++ { "ST31500341AS", "SD15", ATA_HORKAGE_NONCQ | + ATA_HORKAGE_FIRMWARE_WARN }, +- { "ST31000333AS", "9FZ136", ATA_HORKAGE_NONCQ | ++ { "ST31500341AS", "SD16", ATA_HORKAGE_NONCQ | + ATA_HORKAGE_FIRMWARE_WARN }, +- { "ST3640623AS", "9FZ164", ATA_HORKAGE_NONCQ | ++ { "ST31500341AS", "SD17", ATA_HORKAGE_NONCQ | + ATA_HORKAGE_FIRMWARE_WARN }, +- { "ST3640323AS", "9FZ134", ATA_HORKAGE_NONCQ | ++ { "ST31500341AS", "SD18", ATA_HORKAGE_NONCQ | + ATA_HORKAGE_FIRMWARE_WARN }, +- { "ST3320813AS", "9FZ182", ATA_HORKAGE_NONCQ | ++ { "ST31500341AS", "SD19", ATA_HORKAGE_NONCQ | + ATA_HORKAGE_FIRMWARE_WARN }, +- { "ST3320613AS", "9FZ162", ATA_HORKAGE_NONCQ | ++ ++ { "ST31000333AS", "SD15", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST31000333AS", "SD16", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST31000333AS", "SD17", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST31000333AS", "SD18", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST31000333AS", "SD19", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ ++ { "ST3640623AS", "SD15", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3640623AS", "SD16", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3640623AS", "SD17", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3640623AS", "SD18", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3640623AS", "SD19", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ ++ { "ST3640323AS", "SD15", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3640323AS", "SD16", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3640323AS", "SD17", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3640323AS", "SD18", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3640323AS", "SD19", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ ++ { "ST3320813AS", "SD15", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3320813AS", "SD16", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3320813AS", "SD17", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3320813AS", "SD18", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3320813AS", "SD19", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ ++ { "ST3320613AS", "SD15", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3320613AS", "SD16", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3320613AS", "SD17", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3320613AS", "SD18", ATA_HORKAGE_NONCQ | ++ ATA_HORKAGE_FIRMWARE_WARN }, ++ { "ST3320613AS", "SD19", ATA_HORKAGE_NONCQ | + ATA_HORKAGE_FIRMWARE_WARN }, + + /* Blacklist entries taken from Silicon Image 3124/3132 diff --git a/queue-2.6.27/series b/queue-2.6.27/series index 34d65e1da1d..e7b59ed11ab 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -2,3 +2,8 @@ amd-iommu-enable-device-isolation-per-default.patch bonding-fix-miimon-failure-counter.patch revert-sched_clock-prevent-scd-clock-from-moving-backwards.patch x86-fix-vmi-crash-on-boot-in-2.6.28-rc8.patch +lib-idr.c-fix-bug-introduced-by-rcu-fix.patch +libata-fix-seagate-ncq-flush-blacklist.patch +e1000e-fix-double-release-of-mutex.patch +can-fix-can__flag-handling-in-can_filter.patch +can-omit-received-rtr-frames-for-single-id-filter-lists.patch