* [27/27] ALSA: hda - Add position_fix quirk for Dell Inspiron 1010
From: Greg KH @ 2011-10-23 6:24 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Takashi Iwai
In-Reply-To: <20111023062833.GA8126@kroah.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 051a8cb6550d917225ead1cd008b5966350f6d53 upstream.
The previous fix for the position-buffer check gives yet another
regression on a Dell laptop. The safest fix right now is to add a
static quirk for this device (and better to apply it for stable
kernels too).
Reported-by: Éric Piel <Eric.Piel@tremplin-utc.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/hda_intel.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2352,6 +2352,7 @@ static struct snd_pci_quirk position_fix
SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
+ SND_PCI_QUIRK(0x1028, 0x02c6, "Dell Inspiron 1010", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1028, 0x0470, "Dell Inspiron 1120", POS_FIX_LPIB),
SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
^ permalink raw reply
* [21/27] firewire: sbp2: fix panic after rmmod with slow targets
From: Greg KH @ 2011-10-23 6:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Chris Boot, Stefan Richter
In-Reply-To: <20111023062833.GA8126@kroah.com>
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Chris Boot <bootc@bootc.net>
commit 0278ccd9d53e07c4e699432b2fed9de6c56f506c upstream.
If firewire-sbp2 starts a login to a target that doesn't complete ORBs
in a timely manner (and has to retry the login), and the module is
removed before the operation times out, you end up with a null-pointer
dereference and a kernel panic.
[SR: This happens because sbp2_target_get/put() do not maintain
module references. scsi_device_get/put() do, but at occasions like
Chris describes one, nobody holds a reference to an SBP-2 sdev.]
This patch cancels pending work for each unit in sbp2_remove(), which
hopefully means there are no extra references around that prevent us
from unloading. This fixes my crash.
Signed-off-by: Chris Boot <bootc@bootc.net>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/firewire/sbp2.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -1198,6 +1198,10 @@ static int sbp2_remove(struct device *de
{
struct fw_unit *unit = fw_unit(dev);
struct sbp2_target *tgt = dev_get_drvdata(&unit->device);
+ struct sbp2_logical_unit *lu;
+
+ list_for_each_entry(lu, &tgt->lu_list, link)
+ cancel_delayed_work_sync(&lu->work);
sbp2_target_put(tgt);
return 0;
^ permalink raw reply
* [26/27] ALSA: HDA: conexant support for Lenovo T520/W520
From: Greg KH @ 2011-10-23 6:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel Suchy, Takashi Iwai
In-Reply-To: <20111023062833.GA8126@kroah.com>
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel Suchy <danny@danysek.cz>
commit ca201c096269ee2d40037fea96a59fd0695888c4 upstream.
This is patch for Conexant codec of Intel HDA driver, adding new quirk
for Lenovo Thinkpad T520 and W520. Conexant autodetection works fine for
T520 (similar subsystem ID is used also in W520 model) and detects more
mixer features compared to generic (fallback) Lenovo quirk with
hardcoded options in Conexant codec.
Patch was activelly tested with Linux 3.0.4, 3.0.6 and 3.0.7 without any
problems.
Signed-off-by: Daniel Suchy <danny@danysek.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/patch_conexant.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -3097,6 +3097,7 @@ static const struct snd_pci_quirk cxt506
SND_PCI_QUIRK(0x17aa, 0x21c5, "Thinkpad Edge 13", CXT5066_THINKPAD),
SND_PCI_QUIRK(0x17aa, 0x21c6, "Thinkpad Edge 13", CXT5066_ASUS),
SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD),
+ SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520 & W520", CXT5066_AUTO),
SND_PCI_QUIRK(0x17aa, 0x21da, "Lenovo X220", CXT5066_THINKPAD),
SND_PCI_QUIRK(0x17aa, 0x21db, "Lenovo X220-tablet", CXT5066_THINKPAD),
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo U350", CXT5066_ASUS),
^ permalink raw reply
* [24/27] x25: Prevent skb overreads when checking call user data
From: Greg KH @ 2011-10-23 6:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Matthew Daley, Eric Dumazet,
Andrew Hendry, David S. Miller
In-Reply-To: <20111023062833.GA8126@kroah.com>
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Matthew Daley <mattjd@gmail.com>
commit 7f81e25befdfb3272345a2e775f520e1d515fa20 upstream.
x25_find_listener does not check that the amount of call user data given
in the skb is big enough in per-socket comparisons, hence buffer
overreads may occur. Fix this by adding a check.
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Andrew Hendry <andrew.hendry@gmail.com>
Acked-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/x25/af_x25.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -295,7 +295,8 @@ static struct sock *x25_find_listener(st
* Found a listening socket, now check the incoming
* call user data vs this sockets call user data
*/
- if(skb->len > 0 && x25_sk(s)->cudmatchlength > 0) {
+ if (x25_sk(s)->cudmatchlength > 0 &&
+ skb->len >= x25_sk(s)->cudmatchlength) {
if((memcmp(x25_sk(s)->calluserdata.cuddata,
skb->data,
x25_sk(s)->cudmatchlength)) == 0) {
^ permalink raw reply
* [22/27] VFS: Fix automount for negative autofs dentries
From: Greg KH @ 2011-10-23 6:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David Howells, Ian Kent,
Al Viro, Chuck Ebbert
In-Reply-To: <20111023062833.GA8126@kroah.com>
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Howells <dhowells@redhat.com>
commit 5a30d8a2b8ddd5102c440c7e5a7c8e1fd729c818 upstream.
[ backport for 3.0.x: LOOKUP_PARENT => LOOKUP_CONTINUE by Chuck Ebbert
<cebbert@redhat.com> ]
Autofs may set the DCACHE_NEED_AUTOMOUNT flag on negative dentries. These
need attention from the automounter daemon regardless of the LOOKUP_FOLLOW flag.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/namei.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -779,19 +779,25 @@ static int follow_automount(struct path
if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_CONTINUE))
return -EISDIR; /* we actually want to stop here */
- /* We want to mount if someone is trying to open/create a file of any
- * type under the mountpoint, wants to traverse through the mountpoint
- * or wants to open the mounted directory.
- *
+ /*
* We don't want to mount if someone's just doing a stat and they've
* set AT_SYMLINK_NOFOLLOW - unless they're stat'ing a directory and
* appended a '/' to the name.
*/
- if (!(flags & LOOKUP_FOLLOW) &&
- !(flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY |
- LOOKUP_OPEN | LOOKUP_CREATE)))
- return -EISDIR;
-
+ if (!(flags & LOOKUP_FOLLOW)) {
+ /* We do, however, want to mount if someone wants to open or
+ * create a file of any type under the mountpoint, wants to
+ * traverse through the mountpoint or wants to open the mounted
+ * directory.
+ * Also, autofs may mark negative dentries as being automount
+ * points. These will need the attentions of the daemon to
+ * instantiate them before they can be used.
+ */
+ if (!(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY |
+ LOOKUP_OPEN | LOOKUP_CREATE)) &&
+ path->dentry->d_inode)
+ return -EISDIR;
+ }
current->total_link_count++;
if (current->total_link_count >= 40)
return -ELOOP;
^ permalink raw reply
* [06/27] drm/radeon/kms/atom: fix handling of FB scratch indices
From: Greg KH @ 2011-10-23 6:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alex Deucher, Dave Airlie
In-Reply-To: <20111023062833.GA8126@kroah.com>
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 5a6e8482a16e61250a9121fc9ec719ab0529e760 upstream.
FB scratch indices are dword indices, but we were treating
them as byte indices. As such, we were getting the wrong
FB scratch data for non-0 indices. Fix the indices and
guard the indexing against indices larger than the scratch
allocation.
Fixes memory corruption on some boards if data was written
past the end of the FB scratch array.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reported-by: Dave Airlie <airlied@redhat.com>
Tested-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/radeon/atom.c | 15 +++++++++++++--
drivers/gpu/drm/radeon/atom.h | 1 +
2 files changed, 14 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/radeon/atom.c
+++ b/drivers/gpu/drm/radeon/atom.c
@@ -277,7 +277,12 @@ static uint32_t atom_get_src_int(atom_ex
case ATOM_ARG_FB:
idx = U8(*ptr);
(*ptr)++;
- val = gctx->scratch[((gctx->fb_base + idx) / 4)];
+ if ((gctx->fb_base + (idx * 4)) > gctx->scratch_size_bytes) {
+ DRM_ERROR("ATOM: fb read beyond scratch region: %d vs. %d\n",
+ gctx->fb_base + (idx * 4), gctx->scratch_size_bytes);
+ val = 0;
+ } else
+ val = gctx->scratch[(gctx->fb_base / 4) + idx];
if (print)
DEBUG("FB[0x%02X]", idx);
break;
@@ -531,7 +536,11 @@ static void atom_put_dst(atom_exec_conte
case ATOM_ARG_FB:
idx = U8(*ptr);
(*ptr)++;
- gctx->scratch[((gctx->fb_base + idx) / 4)] = val;
+ if ((gctx->fb_base + (idx * 4)) > gctx->scratch_size_bytes) {
+ DRM_ERROR("ATOM: fb write beyond scratch region: %d vs. %d\n",
+ gctx->fb_base + (idx * 4), gctx->scratch_size_bytes);
+ } else
+ gctx->scratch[(gctx->fb_base / 4) + idx] = val;
DEBUG("FB[0x%02X]", idx);
break;
case ATOM_ARG_PLL:
@@ -1367,11 +1376,13 @@ int atom_allocate_fb_scratch(struct atom
usage_bytes = firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb * 1024;
}
+ ctx->scratch_size_bytes = 0;
if (usage_bytes == 0)
usage_bytes = 20 * 1024;
/* allocate some scratch memory */
ctx->scratch = kzalloc(usage_bytes, GFP_KERNEL);
if (!ctx->scratch)
return -ENOMEM;
+ ctx->scratch_size_bytes = usage_bytes;
return 0;
}
--- a/drivers/gpu/drm/radeon/atom.h
+++ b/drivers/gpu/drm/radeon/atom.h
@@ -137,6 +137,7 @@ struct atom_context {
int cs_equal, cs_above;
int io_mode;
uint32_t *scratch;
+ int scratch_size_bytes;
};
extern int atom_debug;
^ permalink raw reply
* Re: [review/test 3/5] python, python-native: upgrade from 2.6.6 to 2.7.2
From: Martin Jansa @ 2011-10-23 6:28 UTC (permalink / raw)
To: Kamble, Nitin A; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <9DA5872FEF993D41B7173F58FCF6BE94E33A6D8D@orsmsx504.amr.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 3746 bytes --]
On Sat, Oct 22, 2011 at 04:54:00PM -0700, Kamble, Nitin A wrote:
> Hi Martin,
> I have kept my python work at nitin/python branch on poky contrib. the 2.7.2 python is working for all arches except arm. And I am going on vacation for few days, and I could not finish the python arm issue arm, so if you get a chance you can look into the arm issue, if you have not resolved it already then I will look into it again once I am back from my vacation on 13th Nov.
Hi Nitin,
I've tried already and failed, but I'll try again and I guess qemux86-64
(linking to host libc and failing if it's not same version as the one in
sysroot) is also still broken and should be taken care of too, right?
Regards,
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> > Martin Jansa
> > Sent: Friday, October 14, 2011 2:12 AM
> > To: Patches and discussions about the oe-core layer
> > Subject: Re: [OE-core] [review/test 3/5] python, python-native: upgrade
> > from 2.6.6 to 2.7.2
> >
> > On Fri, Oct 14, 2011 at 10:19:39AM +0200, Martin Jansa wrote:
> > > On Thu, Oct 13, 2011 at 04:06:13PM -0700, nitin.a.kamble@intel.com
> > wrote:
> > > > From: Nitin A Kamble <nitin.a.kamble@intel.com>
> > > >
> > >
> > > This patch does not apply after
> > > 9f9612d15acc6ee3b71f52bdb3f1ec4cb56b1a17
> > >
> > > can you rebase on top of oe-core?
> > >
> > > Also please drop
> > > DEFAULT_PREFERENCE = "-27"
> > >
> > > we have only one python version so I guess it's not usefull at all
> > > anymore
> > >
> > > I'll apply it manually, test it here.. and report if those modules
> > are
> > > build later..
> >
> > seems the same as with previous version..
> >
> > log.do_compile full of
> > /OE/shr-core/tmp/sysroots/x86_64-linux/usr/lib/libpython2.7.so: file
> > not recognized: File format not recognized
> > collect2: ld returned 1 exit status
> >
> > and only built module is sqlite
> > OE @ ~/shr-core/tmp/work/armv4t-oe-linux-gnueabi/python-2.7.2-r0.0 $ ls
> > Python-2.7.2/build/lib.linux-x86_64-2.7/
> > _sqlite3.so
> >
> > while with 2.6 we had a lot of modules
> > $ ls Python-2.6.6/build/lib.linux-x86_64-2.6/
> > _bisect.so _codecs_jp.so _ctypes.so _fileio.so
> > _json.so _random.so _testcapi.so bz2.so
> > datetime.so itertools.so parser.so spwd.so
> > unicodedata.so
> > _bytesio.so _codecs_kr.so _ctypes_test.so _functools.so
> > _locale.so _socket.so _weakref.so cPickle.so fcntl.so
> > math.so pyexpat.so strop.so zlib.so
> > _codecs_cn.so _codecs_tw.so _curses.so _hashlib.so
> > _lsprof.so _sqlite3.so array.so cStringIO.so
> > future_builtins.so mmap.so readline.so syslog.so
> > _codecs_hk.so _collections.so _curses_panel.so _heapq.so
> > _multibytecodec.so _ssl.so audioop.so cmath.so gdbm.so
> > nis.so resource.so termios.so
> > _codecs_iso2022.so _csv.so _elementtree.so _hotshot.so
> > _multiprocessing.so _struct.so binascii.so crypt.so grp.so
> > operator.so select.so time.so
> >
> > Can you please test that you have non-empty python-syslog python-
> > resource python-elementtree python-fcntl python-zlib?
> > And test build for qemuarm, because I guess that it links to -native
> > libpython2.7 when you're building qemux86 on x86 host.
> >
> > But it seems that python runtime works now, thanks!
> >
> > Regards,
> > --
> > Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply
* [02/27] ARM: 7117/1: perf: fix HW_CACHE_* events on Cortex-A9
From: Greg KH @ 2011-10-23 6:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jean Pihet, Will Deacon,
Russell King
In-Reply-To: <20111023062833.GA8126@kroah.com>
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Will Deacon <will.deacon@arm.com>
commit 29a541f6c1f6e4a85628bb86071b9e72c9f8be2c upstream.
Using COHERENT_LINE_{MISS,HIT} for cache misses and references
respectively is completely wrong. Instead, use the L1D events which
are a better and more useful approximation despite ignoring instruction
traffic.
Reported-by: Alasdair Grant <alasdair.grant@arm.com>
Reported-by: Matt Horsnell <matt.horsnell@arm.com>
Reported-by: Michael Williams <michael.williams@arm.com>
Cc: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/arm/kernel/perf_event_v7.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -264,8 +264,8 @@ static const unsigned armv7_a9_perf_map[
[PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES,
[PERF_COUNT_HW_INSTRUCTIONS] =
ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE,
- [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_COHERENT_LINE_HIT,
- [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_COHERENT_LINE_MISS,
+ [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_DCACHE_ACCESS,
+ [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_DCACHE_REFILL,
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE,
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
[PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES,
^ permalink raw reply
* [03/27] HID: usbhid: Add support for SiGma Micro chip
From: Greg KH @ 2011-10-23 6:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jeremiah Matthey,
Jiri Kosina, Jonathan Nieder
In-Reply-To: <20111023062833.GA8126@kroah.com>
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jeremiah Matthey <sprg86@gmail.com>
commit f5e4282586dc0c9dab8c7d32e6c43aa07f68586b upstream.
Patch to add SiGma Micro-based keyboards (1c4f:0002) to hid-quirks.
These keyboards dont seem to allow the records to be initialized, and hence a
timeout occurs when the usbhid driver attempts to initialize them. The patch
just adds the signature for these keyboards to the hid-quirks list with the
setting HID_QUIRK_NO_INIT_REPORTS. This removes the 5-10 second wait for the
timeout to occur.
Signed-off-by: Jeremiah Matthey <sprg86@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hid/hid-ids.h | 3 +++
drivers/hid/usbhid/hid-quirks.c | 1 +
2 files changed, 4 insertions(+)
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -568,6 +568,9 @@
#define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001
#define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE 0x0600
+#define USB_VENDOR_ID_SIGMA_MICRO 0x1c4f
+#define USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD 0x0002
+
#define USB_VENDOR_ID_SKYCABLE 0x1223
#define USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER 0x3F07
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -89,6 +89,7 @@ static const struct hid_blacklist {
{ USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH, HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS, HID_QUIRK_MULTI_INPUT },
+ { USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD, HID_QUIRK_NO_INIT_REPORTS },
{ 0, 0 }
};
^ permalink raw reply
* [04/27] hwmon: (w83627ehf) Properly report thermal diode sensors
From: Greg KH @ 2011-10-23 6:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jean Delvare, Guenter Roeck
In-Reply-To: <20111023062833.GA8126@kroah.com>
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jean Delvare <khali@linux-fr.org>
commit bf164c58e58328c40ebc597a8ac00cc6840f9703 upstream.
The w83627ehf driver is improperly reporting thermal diode sensors as
type 2, instead of 3. This caused "sensors" and possibly other
monitoring tools to report these sensors as "transistor" instead of
"thermal diode".
Furthermore, diode subtype selection (CPU vs. external) is only
supported by the original W83627EHF/EHG. All later models only support
CPU diode type, and some (NCT6776F) don't even have the register in
question so we should avoid reading from it.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hwmon/w83627ehf.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -1715,7 +1715,8 @@ static void w83627ehf_device_remove_file
}
/* Get the monitoring functions started */
-static inline void __devinit w83627ehf_init_device(struct w83627ehf_data *data)
+static inline void __devinit w83627ehf_init_device(struct w83627ehf_data *data,
+ enum kinds kind)
{
int i;
u8 tmp, diode;
@@ -1746,10 +1747,16 @@ static inline void __devinit w83627ehf_i
w83627ehf_write_value(data, W83627EHF_REG_VBAT, tmp | 0x01);
/* Get thermal sensor types */
- diode = w83627ehf_read_value(data, W83627EHF_REG_DIODE);
+ switch (kind) {
+ case w83627ehf:
+ diode = w83627ehf_read_value(data, W83627EHF_REG_DIODE);
+ break;
+ default:
+ diode = 0x70;
+ }
for (i = 0; i < 3; i++) {
if ((tmp & (0x02 << i)))
- data->temp_type[i] = (diode & (0x10 << i)) ? 1 : 2;
+ data->temp_type[i] = (diode & (0x10 << i)) ? 1 : 3;
else
data->temp_type[i] = 4; /* thermistor */
}
@@ -2016,7 +2023,7 @@ static int __devinit w83627ehf_probe(str
}
/* Initialize the chip */
- w83627ehf_init_device(data);
+ w83627ehf_init_device(data, sio_data->kind);
data->vrm = vid_which_vrm();
superio_enter(sio_data->sioreg);
^ permalink raw reply
* [16/27] xfs: start periodic workers later
From: Greg KH @ 2011-10-23 6:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, greg, Christoph Hellwig
In-Reply-To: <20111023062833.GA8126@kroah.com>
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Christoph Hellwig <hch@infradead.org>
commit 2bcf6e970f5a88fa05dced5eeb0326e13d93c4a1 upstream
Start the periodic sync workers only after we have finished xfs_mountfs
and thus fully set up the filesystem structures. Without this we can
call into xfs_qm_sync before the quotainfo strucute is set up if the
mount takes unusually long, and probably hit other incomplete states
as well.
Also clean up the xfs_fs_fill_super error path by using consistent
label names, and removing an impossible to reach case.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/xfs/linux-2.6/xfs_super.c | 35 ++++++++++++++---------------------
1 file changed, 14 insertions(+), 21 deletions(-)
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -1412,37 +1412,35 @@ xfs_fs_fill_super(
sb->s_time_gran = 1;
set_posix_acl_flag(sb);
- error = xfs_syncd_init(mp);
- if (error)
- goto out_filestream_unmount;
-
xfs_inode_shrinker_register(mp);
error = xfs_mountfs(mp);
if (error)
- goto out_syncd_stop;
+ goto out_filestream_unmount;
+
+ error = xfs_syncd_init(mp);
+ if (error)
+ goto out_unmount;
root = igrab(VFS_I(mp->m_rootip));
if (!root) {
error = ENOENT;
- goto fail_unmount;
+ goto out_syncd_stop;
}
if (is_bad_inode(root)) {
error = EINVAL;
- goto fail_vnrele;
+ goto out_syncd_stop;
}
sb->s_root = d_alloc_root(root);
if (!sb->s_root) {
error = ENOMEM;
- goto fail_vnrele;
+ goto out_iput;
}
return 0;
- out_syncd_stop:
- xfs_inode_shrinker_unregister(mp);
- xfs_syncd_stop(mp);
out_filestream_unmount:
+ xfs_inode_shrinker_unregister(mp);
xfs_filestream_unmount(mp);
out_free_sb:
xfs_freesb(mp);
@@ -1456,17 +1454,12 @@ xfs_fs_fill_super(
out:
return -error;
- fail_vnrele:
- if (sb->s_root) {
- dput(sb->s_root);
- sb->s_root = NULL;
- } else {
- iput(root);
- }
-
- fail_unmount:
- xfs_inode_shrinker_unregister(mp);
+ out_iput:
+ iput(root);
+ out_syncd_stop:
xfs_syncd_stop(mp);
+ out_unmount:
+ xfs_inode_shrinker_unregister(mp);
/*
* Blow away any referenced inode in the filestreams cache.
^ permalink raw reply
* [15/27] CIFS: Fix ERR_PTR dereference in cifs_get_root
From: Greg KH @ 2011-10-23 6:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Pavel Shilovsky,
Steve French, Josh Boyer
In-Reply-To: <20111023062833.GA8126@kroah.com>
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Pavel Shilovsky <piastryyy@gmail.com>
commit 5b980b01212199833ee8023770fa4cbf1b85e9f4 upstream.
move it to the beginning of the loop.
Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Cc: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/cifs/cifsfs.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -566,6 +566,12 @@ cifs_get_root(struct smb_vol *vol, struc
struct inode *dir = dentry->d_inode;
struct dentry *child;
+ if (!dir) {
+ dput(dentry);
+ dentry = ERR_PTR(-ENOENT);
+ break;
+ }
+
/* skip separators */
while (*s == sep)
s++;
@@ -581,10 +587,6 @@ cifs_get_root(struct smb_vol *vol, struc
mutex_unlock(&dir->i_mutex);
dput(dentry);
dentry = child;
- if (!dentry->d_inode) {
- dput(dentry);
- dentry = ERR_PTR(-ENOENT);
- }
} while (!IS_ERR(dentry));
_FreeXid(xid);
kfree(full_path);
^ permalink raw reply
* [11/27] [media] uvcvideo: Fix crash when linking entities
From: Greg KH @ 2011-10-23 6:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Laurent Pinchart,
Mauro Carvalho Chehab, Josh Boyer
In-Reply-To: <20111023062833.GA8126@kroah.com>
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
commit 4d9b2ebd335d83044b9e6656d0e604e8e1300334 upstream.
The uvc_mc_register_entity() function wrongfully selects the
media_entity associated with a UVC entity when creating links. This
results in access to uninitialized media_entity structures and can hit a
BUG_ON statement in media_entity_create_link(). Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/media/video/uvc/uvc_entity.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/video/uvc/uvc_entity.c
+++ b/drivers/media/video/uvc/uvc_entity.c
@@ -49,7 +49,7 @@ static int uvc_mc_register_entity(struct
if (remote == NULL)
return -EINVAL;
- source = (UVC_ENTITY_TYPE(remote) != UVC_TT_STREAMING)
+ source = (UVC_ENTITY_TYPE(remote) == UVC_TT_STREAMING)
? (remote->vdev ? &remote->vdev->entity : NULL)
: &remote->subdev.entity;
if (source == NULL)
^ permalink raw reply
* [00/27] 3.0.8-stable review
From: Greg KH @ 2011-10-23 6:28 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan
This is the start of the stable review cycle for the 3.0.8 release.
There are @num@ patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let us know. If anyone is a maintainer of the proper subsystem, and
wants to add a Signed-off-by: line to the patch, please respond with it.
Responses should be made by Tuesday, Oct 25 07:00:00 UTC 2011
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.0.8-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
Makefile | 4 +-
arch/arm/kernel/perf_event_v7.c | 4 +-
arch/arm/mm/init.c | 7 ++
crypto/ghash-generic.c | 6 +
drivers/firewire/sbp2.c | 4 +
drivers/gpu/drm/radeon/atom.c | 15 +++-
drivers/gpu/drm/radeon/atom.h | 1 +
drivers/gpu/drm/ttm/ttm_bo.c | 10 +-
drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +-
drivers/hid/hid-ids.h | 3 +
drivers/hid/hid-magicmouse.c | 10 ++-
drivers/hid/usbhid/hid-quirks.c | 1 +
drivers/hwmon/w83627ehf.c | 15 ++-
drivers/media/video/uvc/uvc_entity.c | 2 +-
drivers/platform/x86/samsung-laptop.c | 10 ++
fs/cifs/cifsfs.c | 10 +-
fs/fuse/dev.c | 12 ++-
fs/hfsplus/hfsplus_fs.h | 16 +++-
fs/hfsplus/part_tbl.c | 32 +++---
fs/hfsplus/super.c | 12 +-
fs/hfsplus/wrapper.c | 83 +++++++++++----
fs/namei.c | 24 +++--
fs/xfs/linux-2.6/xfs_linux.h | 2 +
fs/xfs/linux-2.6/xfs_super.c | 48 +++------
fs/xfs/quota/xfs_dquot_item.c | 10 ++-
fs/xfs/xfs_buf_item.c | 3 +-
fs/xfs/xfs_inode_item.c | 10 ++-
fs/xfs/xfs_trans.c | 27 ++++-
fs/xfs/xfs_trans.h | 2 +-
fs/xfs/xfs_trans_ail.c | 192 +++++++++++++++++++++++----------
fs/xfs/xfs_trans_priv.h | 18 ++--
kernel/posix-cpu-timers.c | 7 +-
kernel/sys.c | 2 +-
mm/migrate.c | 8 +-
net/x25/af_x25.c | 3 +-
sound/pci/hda/hda_intel.c | 1 +
sound/pci/hda/patch_conexant.c | 1 +
37 files changed, 421 insertions(+), 196 deletions(-)
^ permalink raw reply
* [PATCH 2/2] wl12xx: handle idle changes per-interface
From: Arik Nemtsov @ 2011-10-23 6:21 UTC (permalink / raw)
To: linux-wireless; +Cc: Luciano Coelho, Eliad Peller, Arik Nemtsov
In-Reply-To: <1319350915-31222-1-git-send-email-arik@wizery.com>
From: Eliad Peller <eliad@wizery.com>
Idle changes are currently handled per hardware.
However, some operations should be done only per-interface.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
---
drivers/net/wireless/wl12xx/main.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 75adc76..b65816d 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -2540,13 +2540,6 @@ static int wl12xx_config_vif(struct wl1271 *wl, struct wl12xx_vif *wlvif,
}
}
- if (changed & IEEE80211_CONF_CHANGE_IDLE && !is_ap) {
- ret = wl1271_sta_handle_idle(wl, wlvif,
- conf->flags & IEEE80211_CONF_IDLE);
- if (ret < 0)
- wl1271_warning("idle mode change failed %d", ret);
- }
-
/*
* if mac80211 changes the PSM mode, make sure the mode is not
* incorrectly changed after the pspoll failure active window.
@@ -3619,6 +3612,12 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
do_join = true;
}
+ if (changed & BSS_CHANGED_IDLE) {
+ ret = wl1271_sta_handle_idle(wl, wlvif, bss_conf->idle);
+ if (ret < 0)
+ wl1271_warning("idle mode change failed %d", ret);
+ }
+
if ((changed & BSS_CHANGED_CQM)) {
bool enable = false;
if (bss_conf->cqm_rssi_thold)
--
1.7.5.4
^ permalink raw reply related
* [PATCH 1/2] wl12xx: leave IV calculation to HW for CCMP
From: Arik Nemtsov @ 2011-10-23 6:21 UTC (permalink / raw)
To: linux-wireless; +Cc: Luciano Coelho, Arik Nemtsov
Use an appropriate mac80211 flags in CCMP keys to indicate we are
calculating the CCMP IV in HW, but require room for the IV to be reserved
in the skb. The space is reserved by mac80211.
depends on "mac80211: support adding IV-room in the skb for CCMP keys".
Signed-off-by: Arik Nemtsov <arik@wizery.com>
---
drivers/net/wireless/wl12xx/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index f76be5a..75adc76 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -2992,7 +2992,7 @@ static int wl1271_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
case WLAN_CIPHER_SUITE_CCMP:
key_type = KEY_AES;
- key_conf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
+ key_conf->flags |= IEEE80211_KEY_FLAG_PUT_IV_SPACE;
tx_seq_32 = WL1271_TX_SECURITY_HI32(wlvif->tx_security_seq);
tx_seq_16 = WL1271_TX_SECURITY_LO16(wlvif->tx_security_seq);
break;
--
1.7.5.4
^ permalink raw reply related
* [PATCH] mac80211: support adding IV-room in the skb for CCMP keys
From: Arik Nemtsov @ 2011-10-23 6:21 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, Arik Nemtsov
Some cards can generate CCMP IVs in HW, but require the space for the IV
to be pre-allocated in the frame at the correct offset. Add a key flag
that allows us to achieve this.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
---
include/net/mac80211.h | 5 +++++
net/mac80211/key.c | 9 +++++++--
net/mac80211/wpa.c | 8 +++++++-
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index cd108df..a3ea227 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -899,6 +899,10 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
* @IEEE80211_KEY_FLAG_SW_MGMT: This flag should be set by the driver for a
* CCMP key if it requires CCMP encryption of management frames (MFP) to
* be done in software.
+ * @IEEE80211_KEY_FLAG_PUT_IV_SPACE: This flag should be set by the driver
+ * for a CCMP key if space should be prepared for the IV, but the IV
+ * itself should not be generated. Do not set together with
+ * @IEEE80211_KEY_FLAG_GENERATE_IV on the same key.
*/
enum ieee80211_key_flags {
IEEE80211_KEY_FLAG_WMM_STA = 1<<0,
@@ -906,6 +910,7 @@ enum ieee80211_key_flags {
IEEE80211_KEY_FLAG_GENERATE_MMIC= 1<<2,
IEEE80211_KEY_FLAG_PAIRWISE = 1<<3,
IEEE80211_KEY_FLAG_SW_MGMT = 1<<4,
+ IEEE80211_KEY_FLAG_PUT_IV_SPACE = 1<<5,
};
/**
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 756b157..17a5220 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -133,9 +133,13 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE;
if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) ||
- (key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)))
+ (key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV) ||
+ (key->conf.flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE)))
sdata->crypto_tx_tailroom_needed_cnt--;
+ WARN_ON((key->conf.flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE) &&
+ (key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV));
+
return 0;
}
@@ -178,7 +182,8 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
sdata = key->sdata;
if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) ||
- (key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)))
+ (key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV) ||
+ (key->conf.flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE)))
increment_tailroom_need_count(sdata);
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index 7bc8702..ae58f4d 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -389,7 +389,8 @@ static int ccmp_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
u8 scratch[6 * AES_BLOCK_SIZE];
if (info->control.hw_key &&
- !(info->control.hw_key->flags & IEEE80211_KEY_FLAG_GENERATE_IV)) {
+ !(info->control.hw_key->flags & IEEE80211_KEY_FLAG_GENERATE_IV) &&
+ !(info->control.hw_key->flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE)) {
/*
* hwaccel has no need for preallocated room for CCMP
* header or MIC fields
@@ -411,6 +412,11 @@ static int ccmp_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
pos = skb_push(skb, CCMP_HDR_LEN);
memmove(pos, pos + CCMP_HDR_LEN, hdrlen);
+
+ /* the HW only needs room for the IV, but not the actual IV */
+ if (info->control.hw_key->flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE)
+ return 0;
+
hdr = (struct ieee80211_hdr *) pos;
pos += hdrlen;
--
1.7.5.4
^ permalink raw reply related
* [Qemu-devel] [PATCH] exec-all: Fix void pointer arithmetic
From: Stefan Weil @ 2011-10-23 6:19 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil
Adding an offset to a void pointer works with gcc but is not allowed
by the current C standards. With -pedantic, gcc complains:
exec-all.h:344: error: pointer of type ‘void *’ used in arithmetic
Fix this, and also replace (unsigned int) by (uintptr_t) in the same
statement.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
exec-all.h | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/exec-all.h b/exec-all.h
index 69fd5e4..0f10393 100644
--- a/exec-all.h
+++ b/exec-all.h
@@ -358,8 +358,7 @@ static inline tb_page_addr_t get_page_addr_code(CPUState *env1, target_ulong add
cpu_abort(env1, "Trying to execute code outside RAM or ROM at 0x" TARGET_FMT_lx "\n", addr);
#endif
}
- p = (void *)(unsigned long)addr
- + env1->tlb_table[mmu_idx][page_index].addend;
+ p = (void *)((uintptr_t)addr + env1->tlb_table[mmu_idx][page_index].addend);
return qemu_ram_addr_from_host_nofail(p);
}
#endif
--
1.7.2.5
^ permalink raw reply related
* Re: Linux 3.1-rc10
From: Dave Airlie @ 2011-10-23 6:16 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Valdis.Kletnieks, Linux Kernel Mailing List
In-Reply-To: <CA+55aFygxqqz_67c9n2PtwZEWgpRMCdCpUhZK-xvdqW-BJ0LLA@mail.gmail.com>
On Sun, Oct 23, 2011 at 1:47 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Sat, Oct 22, 2011 at 8:31 AM, <Valdis.Kletnieks@vt.edu> wrote:
>>
>> Actually, the question was "Are there enough Linus cycles to do KS
>> and all the merges in 2 weeks?". ;)
>
> I think there will be.
>
> The kernel summit is only two days, and then I have another day of
> LinuxCon Europe, and basically a day of travel. So it's four days out
> of the 2 weeks, and I can actually do the time-consuming part of the
> merges while traveling (ie *looking* at them if I need to: the
> technical merge action itself is usually never the problem).
>
> Additionally, the first few days (which is KS/etc), I'll probably be
> merging mainly from people who have already got k.org accounts because
> they got into the trust network early, so it's going to be slightly
> limited by the fact that it will invariably take some time to get the
> gpg signing and k.org account setup a day or two.
Are you going to accept pull requests from non-k.org remotes?
Like I'm getting close to can't be arsed wrt getting a k.org a/c
again, and if freedesktop is good enough for pull reqs I might not
bother.
I am interested in the view that the hacking of k.org has done one
thing which is you are now more conditions to pulling from misc
non-k.org places than previously. Maybe thats all the terrorists want
:)
Dave.
^ permalink raw reply
* Re: [PATCH 1/2] LSM: Do not apply mmap_min_addr check to PROT_NONE mappings
From: Kevin Easton @ 2011-10-23 5:21 UTC (permalink / raw)
To: Linus Torvalds
Cc: Roland McGrath, Andrew Morton, James Morris, Eric Paris,
Stephen Smalley, selinux, John Johansen, linux-security-module,
linux-kernel
In-Reply-To: <CA+55aFydaGYx2nkeGps2kO2k=eV1m6xcFgH5okeqy1G8H=z+_w@mail.gmail.com>
Quoting Linus Torvalds <torvalds@linux-foundation.org>:
> [ Resent, this seems to have gotten dropped by something. Sorry if it
> shows up twice ]
My fault, looks like lkml.org trims the CC list to an unreasonably small
value.
> On Sun, Oct 23, 2011 at 2:08 AM, Kevin Easton <kevin@guarana.org> wrote:
>>
>> Won't this still allow silent probing, because the malicious user can
>> just try to create the mapping, then check in /proc/self/maps to see
>> if it really worked?
>
> Yup, right you are.
>
> So we shouldn't do that either, and probably just leave the current
> semantics, unless Roland (or others) can convince me that complicating
> the kernel mmap security model really is worth it.
>
> Linus
^ permalink raw reply
* Re: [PATCH 00/36] Staging: cx25821: Clean up patch series
From: Mauro Carvalho Chehab @ 2011-10-23 5:36 UTC (permalink / raw)
To: Greg KH
Cc: Leonid V. Fedorenchik, Namhyung Kim, Palash Bandyopadhyay,
Joe Perches, Ilia Mirkin, Youquan Song, devel, linux-kernel
In-Reply-To: <20111022081941.GA5443@suse.de>
Em 22-10-2011 10:19, Greg KH escreveu:
> On Sat, Oct 22, 2011 at 01:43:20PM +0800, Leonid V. Fedorenchik wrote:
>> This patch series fixes some style issues in drivers/staging/cx25821
>> Mostly I was hoping to improve readability and fix some issues found by
>> checkpatch.pl script.
>
> These are for Mauro to take through his tree.
Yes. I'll put them on my queue.
Thanks,
Mauro
^ permalink raw reply
* [PATCH 02/15] ATA : vortex86 : fix vortex86dx/sx hardware CRC bug.
From: Paul Schilling @ 2011-10-23 5:05 UTC (permalink / raw)
To: Jeff Garzik, David S. Miller, Jesse Barnes, linux-ide,
linux-kernel, linux-pci
Cc: Paul Schilling, Paul Schilling
In-Reply-To: <fix vortex86>
This fixes a DMA issue related to a CRC bug on
the RDC pata peripherial found on the vortex86sx and vortex86dx.
Signed-off-by: Paul Schilling <paul.s.schilling@gmail.com>
---
drivers/ata/pata_it821x.c | 22 ++++++++++++++++++----
drivers/ata/pata_rdc.c | 29 ++++++++++++++++++++++++-----
drivers/ide/it821x.c | 9 +++++++--
include/linux/pci_ids.h | 2 ++
4 files changed, 51 insertions(+), 11 deletions(-)
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index c5532b9..5f8a54a 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -897,7 +897,16 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
static const struct ata_port_info info_rdc_11 = {
.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = ATA_PIO4,
- .mwdma_mask = ATA_MWDMA2,
+ .mwdma_mask = 0,
+ .udma_mask = 0,
+ /* No UDMA */
+ .port_ops = &it821x_rdc_port_ops
+ };
+ static const struct ata_port_info info_rdc_01 = {
+ .flags = ATA_FLAG_SLAVE_POSS,
+ .pio_mask = ATA_PIO4,
+ .mwdma_mask = 0,
+ .udma_mask = 0,
/* No UDMA */
.port_ops = &it821x_rdc_port_ops
};
@@ -911,11 +920,16 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
return rc;
if (pdev->vendor == PCI_VENDOR_ID_RDC) {
- /* Deal with Vortex86SX */
- if (pdev->revision == 0x11)
+ if (((pdev->revision == 0x11) || (pdev->revision == 0x13)) &&
+ (pdev->device == PCI_DEVICE_ID_RDC_D1010)) {
+ /* Deal with Vortex86SX */
ppi[0] = &info_rdc_11;
- else
+ printk(KERN_INFO DRV_NAME
+ ": Detected Vortex86SX/DX Bug.\n");
+ printk(KERN_INFO DRV_NAME ": Disabling UDMA.\n");
+ } else {
ppi[0] = &info_rdc;
+ }
} else {
/* Force the card into bypass mode if so requested */
if (it8212_noraid) {
diff --git a/drivers/ata/pata_rdc.c b/drivers/ata/pata_rdc.c
index 2b38127..441521c 100644
--- a/drivers/ata/pata_rdc.c
+++ b/drivers/ata/pata_rdc.c
@@ -290,6 +290,16 @@ static struct ata_port_info rdc_port_info = {
.port_ops = &rdc_pata_ops,
};
+static struct ata_port_info vortex_port_info = {
+ .flags = ATA_FLAG_SLAVE_POSS,
+ .pio_mask = ATA_PIO4,
+ .mwdma_mask = 0,
+ .udma_mask = 0,
+ /* No UDMA */
+ .port_ops = &rdc_pata_ops,
+};
+
+
static struct scsi_host_template rdc_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -322,16 +332,25 @@ static int __devinit rdc_init_one(struct pci_dev *pdev,
ata_print_version_once(&pdev->dev, DRV_VERSION);
- port_info[0] = rdc_port_info;
- port_info[1] = rdc_port_info;
-
- port_flags = port_info[0].flags;
-
/* enable device and prepare host */
rc = pcim_enable_device(pdev);
if (rc)
return rc;
+ if ((pdev->revision == 0x01) &&
+ (pdev->device == PCI_DEVICE_ID_RDC_D1011)) {
+ /* Deal with Vortex86DX */
+ port_info[0] = vortex_port_info;
+ port_info[1] = vortex_port_info;
+ printk(KERN_INFO DRV_NAME ": Detected Vortex86DX Bug.\n");
+ printk(KERN_INFO DRV_NAME ": Disabling UDMA.\n");
+ } else {
+ port_info[0] = rdc_port_info;
+ port_info[1] = rdc_port_info;
+ }
+
+ port_flags = port_info[0].flags;
+
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
if (!hpriv)
return -ENOMEM;
diff --git a/drivers/ide/it821x.c b/drivers/ide/it821x.c
index 2e3169f..82c6bc7 100644
--- a/drivers/ide/it821x.c
+++ b/drivers/ide/it821x.c
@@ -581,10 +581,14 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif)
hwif->ultra_mask = ATA_UDMA6;
hwif->mwdma_mask = ATA_MWDMA2;
- /* Vortex86SX quirk: prevent Ultra-DMA mode to fix BadCRC issue */
+ /* Vortex86SX and Vortex86DX quirk: prevent
+ * Ultra-DMA mode to fix BadCRC issue when
+ * using DMA mode */
if (idev->quirks & QUIRK_VORTEX86) {
- if (dev->revision == 0x11)
+ if (((dev->revision == 0x11) || (dev->revision == 0x13))
+ || (dev->revision == 0x01)) {
hwif->ultra_mask = 0;
+ }
}
}
@@ -680,6 +684,7 @@ static const struct pci_device_id it821x_pci_tbl[] = {
{ PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 },
{ PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 },
{ PCI_VDEVICE(RDC, PCI_DEVICE_ID_RDC_D1010), QUIRK_VORTEX86 },
+ { PCI_VDEVICE(RDC, PCI_DEVICE_ID_RDC_D1011), QUIRK_VORTEX86 },
{ 0, },
};
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index ae96bbe..237da92 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2259,6 +2259,8 @@
#define PCI_DEVICE_ID_RDC_R6060 0x6060
#define PCI_DEVICE_ID_RDC_R6061 0x6061
#define PCI_DEVICE_ID_RDC_D1010 0x1010
+#define PCI_DEVICE_ID_RDC_D1011 0x1011
+#define PCI_DEVICE_ID_RDC_D1012 0x1012
#define PCI_VENDOR_ID_LENOVO 0x17aa
--
1.7.6.4
^ permalink raw reply related
* Gratulujeme!
From: PAYMENT OFFICER @ 2011-10-23 5:56 UTC (permalink / raw)
Predmet: GRATULUJEME v Yahoo! MSN (Windows Live), ceny programu
Gratulujeme!
Sme potešení Vám oznámit, že ste vyhrali súctom deviatich
Set tisíc amerických dolárov len. $ 900,000.00 od Yahoo!
MSN (Windows Live) Awards program.
Yahoo! zbiera všetky e-mailovej adresy ludí, ktorí sú aktívne
on-line, medzi milióny ludí, ktoré upísal na Yahoo a Hotmail a
Niekolko z iných e-mailových služieb. Šest ludí sa vyberajú mesacné
využit túto ponuku a ste jedným z vybraných vítaza.
PLATBA CENA a tvrdí,
Vítazi musia byt uhradené v súlade s jeho / jej vysporiadanie
Centre.Yahoo Cena ocenenie sa musí uplatnit najneskôr do 15 dní odo dna
odo dna oznámenia Draw. Všetky ceny netvrdil, pocas tejto doby
sa prepadá.
Uvedené nižšie sú vaše identifikacné císla:
Císlo šarže: YPA/07-43658
Referencné císlo: 2007234522
PIN: 1206
Ste sa poradit sa dostat spät k nám, že budete kontaktovat so svojimi
Vôle Officer Rev.Fr.GREG MICHAEL. svoj nárok u svojej údaje nižšie / ..
1. Vaše meno a priezvisko
2. Vašu adresu
3. Svoje povolanie
4. Vaše telefónne císlo
5.YOUR AGE
6.Budete platit 185eur za registráciu vašej cenu Spojených národu
agenta penažné.
Kontakt: Rev.Fr.GREG MICHAEL
Email: agen004@live.com
Priamy Mobile / +447031917686
S úctou,
Mrs.Carol Jones
Online koordinátor pre
YAHOO Ocenenie a Windows LIVE PROGRAM, stávky Medzinárodný program.
VAROVANIE! Nehovorte ludom o vašu cenu cenu až do svoje peniaze
úspešné odovzdanie k vám, aby sa zabránilo zákaz cinnosti, môžu
vyplývajú z dvojitej nárok.
Môžete tiež dostat podobné e-maily od ludí, zobrazovat sa
iných organizácií alebo Yahoo Inc. Toto je len vyzdvihnút
osobné údaje od vás a uplatnit nárok na výhru. V
prípade, že budete dostávat e-mailom na podobné oznámenia list
, Ktorý bol poslaný k vám, prosím odstránit z vášho e-mailovej schránky
a dat žiadne
dalšie korešpondenciu takejto osobe alebo orgánu. Yahoo! nebude
zodpovedný za akúkolvek stratu fondu vyplývajúce z vyššie uvedeného
^ permalink raw reply
* [PATCH 01/15] ATA : it821x and rdc : fix code formating.
From: Paul Schilling @ 2011-10-23 5:01 UTC (permalink / raw)
To: Jeff Garzik, David S. Miller, Jesse Barnes, linux-ide,
linux-kernel, linux-pci
Cc: Paul Schilling, Paul Schilling
In-Reply-To: <ATA it821x rdc>
This fixes a DMA issue related to a CRC bug on
the RDC pata peripherial found on the vortex86sx and vortex86dx.
Signed-off-by: Paul Schilling <paul.s.schilling@gmail.com>
---
drivers/ata/pata_it821x.c | 221 ++++++++++++++++++++++-----------------------
drivers/ata/pata_rdc.c | 4 +-
2 files changed, 112 insertions(+), 113 deletions(-)
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index 62c5d00..c5532b9 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -1,5 +1,5 @@
/*
- * pata_it821x.c - IT821x PATA for new ATA layer
+ * pata_it821x.c - IT821x PATA for new ATA layer
* (C) 2005 Red Hat Inc
* Alan Cox <alan@lxorguk.ukuu.org.uk>
* (C) 2007 Bartlomiej Zolnierkiewicz
@@ -16,7 +16,7 @@
* Based in part on the ITE vendor provided SCSI driver.
*
* Documentation available from IT8212F_V04.pdf
- * http://www.ite.com.tw/EN/products_more.aspx?CategoryID=3&ID=5,91
+ * http://www.ite.com.tw/EN/products_more.aspx?CategoryID=3&ID=5,91
* Some other documents are NDA.
*
* The ITE8212 isn't exactly a standard IDE controller. It has two
@@ -79,22 +79,20 @@
#include <scsi/scsi_host.h>
#include <linux/libata.h>
-
#define DRV_NAME "pata_it821x"
#define DRV_VERSION "0.4.2"
-struct it821x_dev
-{
- unsigned int smart:1, /* Are we in smart raid mode */
- timing10:1; /* Rev 0x10 */
- u8 clock_mode; /* 0, ATA_50 or ATA_66 */
- u8 want[2][2]; /* Mode/Pri log for master slave */
+struct it821x_dev {
+ unsigned int smart:1, /* Are we in smart raid mode */
+ timing10:1; /* Rev 0x10 */
+ u8 clock_mode; /* 0, ATA_50 or ATA_66 */
+ u8 want[2][2]; /* Mode/Pri log for master slave */
/* We need these for switching the clock when DMA goes on/off
The high byte is the 66Mhz timing */
- u16 pio[2]; /* Cached PIO values */
- u16 mwdma[2]; /* Cached MWDMA values */
- u16 udma[2]; /* Cached UDMA values (per drive) */
- u16 last_device; /* Master or slave loaded ? */
+ u16 pio[2]; /* Cached PIO values */
+ u16 mwdma[2]; /* Cached MWDMA values */
+ u16 udma[2]; /* Cached UDMA values (per drive) */
+ u16 last_device; /* Master or slave loaded ? */
};
#define ATA_66 0
@@ -124,7 +122,8 @@ static int it8212_noraid;
* the DMA start/stop sequence as with the old driver.
*/
-static void it821x_program(struct ata_port *ap, struct ata_device *adev, u16 timing)
+static void it821x_program(struct ata_port *ap, struct ata_device *adev,
+ u16 timing)
{
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
struct it821x_dev *itdev = ap->private_data;
@@ -139,7 +138,6 @@ static void it821x_program(struct ata_port *ap, struct ata_device *adev, u16 tim
pci_write_config_byte(pdev, 0x54 + 4 * channel, conf);
}
-
/**
* it821x_program_udma - program the UDMA registers
* @ap: ATA port
@@ -152,7 +150,8 @@ static void it821x_program(struct ata_port *ap, struct ata_device *adev, u16 tim
* here and partly in start_dma.
*/
-static void it821x_program_udma(struct ata_port *ap, struct ata_device *adev, u16 timing)
+static void it821x_program_udma(struct ata_port *ap, struct ata_device *adev,
+ u16 timing)
{
struct it821x_dev *itdev = ap->private_data;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
@@ -227,16 +226,16 @@ static void it821x_clock_strategy(struct ata_port *ap, struct ata_device *adev)
pci_write_config_byte(pdev, 0x50, v);
/*
- * Reprogram the UDMA/PIO of the pair drive for the switch
- * MWDMA will be dealt with by the dma switcher
+ * Reprogram the UDMA/PIO of the pair drive for the switch
+ * MWDMA will be dealt with by the dma switcher
*/
- if (pair && itdev->udma[1-unit] != UDMA_OFF) {
- it821x_program_udma(ap, pair, itdev->udma[1-unit]);
- it821x_program(ap, pair, itdev->pio[1-unit]);
+ if (pair && itdev->udma[1 - unit] != UDMA_OFF) {
+ it821x_program_udma(ap, pair, itdev->udma[1 - unit]);
+ it821x_program(ap, pair, itdev->pio[1 - unit]);
}
/*
- * Reprogram the UDMA/PIO of our drive for the switch.
- * MWDMA will be dealt with by the dma switcher
+ * Reprogram the UDMA/PIO of our drive for the switch.
+ * MWDMA will be dealt with by the dma switcher
*/
if (itdev->udma[unit] != UDMA_OFF) {
it821x_program_udma(ap, adev, itdev->udma[unit]);
@@ -253,11 +252,13 @@ static void it821x_clock_strategy(struct ata_port *ap, struct ata_device *adev)
* shared by PIO and MWDMA and for both channels.
*/
-static void it821x_passthru_set_piomode(struct ata_port *ap, struct ata_device *adev)
+static void it821x_passthru_set_piomode(struct ata_port *ap,
+ struct ata_device *adev)
{
/* Spec says 89 ref driver uses 88 */
- static const u16 pio[] = { 0xAA88, 0xA382, 0xA181, 0x3332, 0x3121 };
- static const u8 pio_want[] = { ATA_66, ATA_66, ATA_66, ATA_66, ATA_ANY };
+ static const u16 pio[] = { 0xAA88, 0xA382, 0xA181, 0x3332, 0x3121 };
+ static const u8 pio_want[] = {
+ ATA_66, ATA_66, ATA_66, ATA_66, ATA_ANY };
struct it821x_dev *itdev = ap->private_data;
int unit = adev->devno;
@@ -283,12 +284,17 @@ static void it821x_passthru_set_piomode(struct ata_port *ap, struct ata_device *
* we switch devices and mode.
*/
-static void it821x_passthru_set_dmamode(struct ata_port *ap, struct ata_device *adev)
+static void it821x_passthru_set_dmamode(struct ata_port *ap,
+ struct ata_device *adev)
{
- static const u16 dma[] = { 0x8866, 0x3222, 0x3121 };
- static const u8 mwdma_want[] = { ATA_ANY, ATA_66, ATA_ANY };
- static const u16 udma[] = { 0x4433, 0x4231, 0x3121, 0x2121, 0x1111, 0x2211, 0x1111 };
- static const u8 udma_want[] = { ATA_ANY, ATA_50, ATA_ANY, ATA_66, ATA_66, ATA_50, ATA_66 };
+ static const u16 dma[] = { 0x8866, 0x3222, 0x3121 };
+ static const u8 mwdma_want[] = { ATA_ANY, ATA_66, ATA_ANY };
+ static const u16 udma[] = {
+ 0x4433, 0x4231, 0x3121,
+ 0x2121, 0x1111, 0x2211, 0x1111 };
+ static const u8 udma_want[] = {
+ ATA_ANY, ATA_50, ATA_ANY,
+ ATA_66, ATA_66, ATA_50, ATA_66 };
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
struct it821x_dev *itdev = ap->private_data;
@@ -309,9 +315,9 @@ static void it821x_passthru_set_dmamode(struct ata_port *ap, struct ata_device *
/* UDMA on. Again revision 0x10 must do the pair */
pci_read_config_byte(pdev, 0x50, &conf);
if (itdev->timing10)
- conf &= channel ? 0x9F: 0xE7;
+ conf &= channel ? 0x9F : 0xE7;
else
- conf &= ~ (1 << (3 + 2 * channel + unit));
+ conf &= ~(1 << (3 + 2 * channel + unit));
pci_write_config_byte(pdev, 0x50, conf);
it821x_clock_strategy(ap, adev);
it821x_program_udma(ap, adev, itdev->udma[unit]);
@@ -326,7 +332,7 @@ static void it821x_passthru_set_dmamode(struct ata_port *ap, struct ata_device *
/* UDMA bits off - Revision 0x10 do them in pairs */
pci_read_config_byte(pdev, 0x50, &conf);
if (itdev->timing10)
- conf |= channel ? 0x60: 0x18;
+ conf |= channel ? 0x60 : 0x18;
else
conf |= 1 << (3 + 2 * channel + unit);
pci_write_config_byte(pdev, 0x50, conf);
@@ -378,7 +384,6 @@ static void it821x_passthru_bmdma_stop(struct ata_queued_cmd *qc)
it821x_program(ap, adev, itdev->pio[unit]);
}
-
/**
* it821x_passthru_dev_select - Select master/slave
* @ap: ATA port
@@ -387,8 +392,7 @@ static void it821x_passthru_bmdma_stop(struct ata_queued_cmd *qc)
* Device selection hook. If necessary perform clock switching
*/
-static void it821x_passthru_dev_select(struct ata_port *ap,
- unsigned int device)
+static void it821x_passthru_dev_select(struct ata_port *ap, unsigned int device)
{
struct it821x_dev *itdev = ap->private_data;
if (itdev && device != itdev->last_device) {
@@ -410,29 +414,29 @@ static void it821x_passthru_dev_select(struct ata_port *ap,
static unsigned int it821x_smart_qc_issue(struct ata_queued_cmd *qc)
{
- switch(qc->tf.command)
- {
+ switch (qc->tf.command) {
/* Commands the firmware supports */
- case ATA_CMD_READ:
- case ATA_CMD_READ_EXT:
- case ATA_CMD_WRITE:
- case ATA_CMD_WRITE_EXT:
- case ATA_CMD_PIO_READ:
- case ATA_CMD_PIO_READ_EXT:
- case ATA_CMD_PIO_WRITE:
- case ATA_CMD_PIO_WRITE_EXT:
- case ATA_CMD_READ_MULTI:
- case ATA_CMD_READ_MULTI_EXT:
- case ATA_CMD_WRITE_MULTI:
- case ATA_CMD_WRITE_MULTI_EXT:
- case ATA_CMD_ID_ATA:
- case ATA_CMD_INIT_DEV_PARAMS:
- case 0xFC: /* Internal 'report rebuild state' */
+ case ATA_CMD_READ:
+ case ATA_CMD_READ_EXT:
+ case ATA_CMD_WRITE:
+ case ATA_CMD_WRITE_EXT:
+ case ATA_CMD_PIO_READ:
+ case ATA_CMD_PIO_READ_EXT:
+ case ATA_CMD_PIO_WRITE:
+ case ATA_CMD_PIO_WRITE_EXT:
+ case ATA_CMD_READ_MULTI:
+ case ATA_CMD_READ_MULTI_EXT:
+ case ATA_CMD_WRITE_MULTI:
+ case ATA_CMD_WRITE_MULTI_EXT:
+ case ATA_CMD_ID_ATA:
+ case ATA_CMD_INIT_DEV_PARAMS:
+ case 0xFC: /* Internal 'report rebuild state' */
/* Arguably should just no-op this one */
- case ATA_CMD_SET_FEATURES:
- return ata_bmdma_qc_issue(qc);
+ case ATA_CMD_SET_FEATURES:
+ return ata_bmdma_qc_issue(qc);
}
- printk(KERN_DEBUG "it821x: can't process command 0x%02X\n", qc->tf.command);
+ printk(KERN_DEBUG "it821x: can't process command 0x%02X\n",
+ qc->tf.command);
return AC_ERR_DEV;
}
@@ -462,7 +466,8 @@ static unsigned int it821x_passthru_qc_issue(struct ata_queued_cmd *qc)
* and respect them.
*/
-static int it821x_smart_set_mode(struct ata_link *link, struct ata_device **unused)
+static int it821x_smart_set_mode(struct ata_link *link,
+ struct ata_device **unused)
{
struct ata_device *dev;
@@ -509,8 +514,7 @@ static void it821x_dev_config(struct ata_device *adev)
if (strstr(model_num, "Integrated Technology Express")) {
/* RAID mode */
ata_dev_info(adev, "%sRAID%d volume",
- adev->id[147] ? "Bootable " : "",
- adev->id[129]);
+ adev->id[147] ? "Bootable " : "", adev->id[129]);
if (adev->id[129] != 1)
pr_cont("(%dK stripe)", adev->id[146]);
pr_cont("\n");
@@ -535,7 +539,7 @@ static void it821x_dev_config(struct ata_device *adev)
*/
static unsigned int it821x_read_id(struct ata_device *adev,
- struct ata_taskfile *tf, u16 *id)
+ struct ata_taskfile *tf, u16 * id)
{
unsigned int err_mask;
unsigned char model_num[ATA_ID_PROD_LEN + 1];
@@ -616,7 +620,7 @@ static void it821x_display_disk(int n, u8 *buf)
if (buf[52] > 4) /* No Disk */
return;
- ata_id_c_string((u16 *)buf, id, 0, 41);
+ ata_id_c_string((u16 *) buf, id, 0, 41);
if (buf[51]) {
mode = ffs(buf[51]);
@@ -635,10 +639,10 @@ static void it821x_display_disk(int n, u8 *buf)
strcpy(mbuf, "PIO");
if (buf[52] == 4)
printk(KERN_INFO "%d: %-6s %-8s %s %s\n",
- n, mbuf, types[buf[52]], id, cbl);
+ n, mbuf, types[buf[52]], id, cbl);
else
printk(KERN_INFO "%d: %-6s %-8s Volume: %1d %s %s\n",
- n, mbuf, types[buf[52]], buf[53], id, cbl);
+ n, mbuf, types[buf[52]], buf[53], id, cbl);
if (buf[125] < 100)
printk(KERN_INFO "%d: Rebuilding: %d%%\n", n, buf[125]);
}
@@ -673,7 +677,7 @@ static u8 *it821x_firmware_command(struct ata_port *ap, u8 cmd, int len)
udelay(1);
/* This should be almost immediate but a little paranoia goes a long
way. */
- while(n++ < 10) {
+ while (n++ < 10) {
status = ioread8(ap->ioaddr.status_addr);
if (status & ATA_ERR) {
kfree(buf);
@@ -681,8 +685,8 @@ static u8 *it821x_firmware_command(struct ata_port *ap, u8 cmd, int len)
return NULL;
}
if (status & ATA_DRQ) {
- ioread16_rep(ap->ioaddr.data_addr, buf, len/2);
- return (u8 *)buf;
+ ioread16_rep(ap->ioaddr.data_addr, buf, len / 2);
+ return (u8 *) buf;
}
mdelay(1);
}
@@ -711,18 +715,13 @@ static void it821x_probe_firmware(struct ata_port *ap)
if (buf != NULL) {
printk(KERN_INFO "pata_it821x: Firmware %02X/%02X/%02X%02X\n",
- buf[505],
- buf[506],
- buf[507],
- buf[508]);
+ buf[505], buf[506], buf[507], buf[508]);
for (i = 0; i < 4; i++)
- it821x_display_disk(i, buf + 128 * i);
+ it821x_display_disk(i, buf + 128 * i);
kfree(buf);
}
}
-
-
/**
* it821x_port_start - port setup
* @ap: ATA port being set up
@@ -772,7 +771,8 @@ static int it821x_port_start(struct ata_port *ap)
itdev->timing10 = 1;
/* Need to disable ATAPI DMA for this case */
if (!itdev->smart)
- printk(KERN_WARNING DRV_NAME": Revision 0x10, workarounds activated.\n");
+ printk(KERN_WARNING DRV_NAME
+ ": Revision 0x10, workarounds activated.\n");
}
return 0;
@@ -802,57 +802,57 @@ static struct scsi_host_template it821x_sht = {
};
static struct ata_port_operations it821x_smart_port_ops = {
- .inherits = &ata_bmdma_port_ops,
+ .inherits = &ata_bmdma_port_ops,
- .check_atapi_dma= it821x_check_atapi_dma,
- .qc_issue = it821x_smart_qc_issue,
+ .check_atapi_dma = it821x_check_atapi_dma,
+ .qc_issue = it821x_smart_qc_issue,
- .cable_detect = ata_cable_80wire,
- .set_mode = it821x_smart_set_mode,
- .dev_config = it821x_dev_config,
- .read_id = it821x_read_id,
+ .cable_detect = ata_cable_80wire,
+ .set_mode = it821x_smart_set_mode,
+ .dev_config = it821x_dev_config,
+ .read_id = it821x_read_id,
- .port_start = it821x_port_start,
+ .port_start = it821x_port_start,
};
static struct ata_port_operations it821x_passthru_port_ops = {
- .inherits = &ata_bmdma_port_ops,
+ .inherits = &ata_bmdma_port_ops,
- .check_atapi_dma= it821x_check_atapi_dma,
- .sff_dev_select = it821x_passthru_dev_select,
- .bmdma_start = it821x_passthru_bmdma_start,
- .bmdma_stop = it821x_passthru_bmdma_stop,
- .qc_issue = it821x_passthru_qc_issue,
+ .check_atapi_dma = it821x_check_atapi_dma,
+ .sff_dev_select = it821x_passthru_dev_select,
+ .bmdma_start = it821x_passthru_bmdma_start,
+ .bmdma_stop = it821x_passthru_bmdma_stop,
+ .qc_issue = it821x_passthru_qc_issue,
- .cable_detect = ata_cable_unknown,
- .set_piomode = it821x_passthru_set_piomode,
- .set_dmamode = it821x_passthru_set_dmamode,
+ .cable_detect = ata_cable_unknown,
+ .set_piomode = it821x_passthru_set_piomode,
+ .set_dmamode = it821x_passthru_set_dmamode,
- .port_start = it821x_port_start,
+ .port_start = it821x_port_start,
};
static struct ata_port_operations it821x_rdc_port_ops = {
- .inherits = &ata_bmdma_port_ops,
+ .inherits = &ata_bmdma_port_ops,
- .check_atapi_dma= it821x_check_atapi_dma,
- .sff_dev_select = it821x_passthru_dev_select,
- .bmdma_start = it821x_passthru_bmdma_start,
- .bmdma_stop = it821x_passthru_bmdma_stop,
- .qc_issue = it821x_passthru_qc_issue,
+ .check_atapi_dma = it821x_check_atapi_dma,
+ .sff_dev_select = it821x_passthru_dev_select,
+ .bmdma_start = it821x_passthru_bmdma_start,
+ .bmdma_stop = it821x_passthru_bmdma_stop,
+ .qc_issue = it821x_passthru_qc_issue,
- .cable_detect = it821x_rdc_cable,
- .set_piomode = it821x_passthru_set_piomode,
- .set_dmamode = it821x_passthru_set_dmamode,
+ .cable_detect = it821x_rdc_cable,
+ .set_piomode = it821x_passthru_set_piomode,
+ .set_dmamode = it821x_passthru_set_dmamode,
- .port_start = it821x_port_start,
+ .port_start = it821x_port_start,
};
static void it821x_disable_raid(struct pci_dev *pdev)
{
/* Neither the RDC nor the IT8211 */
if (pdev->vendor != PCI_VENDOR_ID_ITE ||
- pdev->device != PCI_DEVICE_ID_ITE_8212)
- return;
+ pdev->device != PCI_DEVICE_ID_ITE_8212)
+ return;
/* Reset local CPU, and set BIOS not ready */
pci_write_config_byte(pdev, 0x5E, 0x01);
@@ -864,12 +864,11 @@ static void it821x_disable_raid(struct pci_dev *pdev)
PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
pci_write_config_word(pdev, 0x40, 0xA0F3);
- pci_write_config_dword(pdev,0x4C, 0x02040204);
+ pci_write_config_dword(pdev, 0x4C, 0x02040204);
pci_write_config_byte(pdev, 0x42, 0x36);
pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x20);
}
-
static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
{
u8 conf;
@@ -926,8 +925,8 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
pci_read_config_byte(pdev, 0x50, &conf);
conf &= 1;
- printk(KERN_INFO DRV_NAME": controller in %s mode.\n",
- mode[conf]);
+ printk(KERN_INFO DRV_NAME ": controller in %s mode.\n",
+ mode[conf]);
if (conf == 0)
ppi[0] = &info_passthru;
else
@@ -983,12 +982,12 @@ static void __exit it821x_exit(void)
}
MODULE_AUTHOR("Alan Cox");
-MODULE_DESCRIPTION("low-level driver for the IT8211/IT8212 IDE RAID controller");
+MODULE_DESCRIPTION
+("low-level driver for the IT8211/IT8212 IDE RAID controller");
MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(pci, it821x);
MODULE_VERSION(DRV_VERSION);
-
module_param_named(noraid, it8212_noraid, int, S_IRUGO);
MODULE_PARM_DESC(noraid, "Force card into bypass mode");
diff --git a/drivers/ata/pata_rdc.c b/drivers/ata/pata_rdc.c
index 4d318f8..2b38127 100644
--- a/drivers/ata/pata_rdc.c
+++ b/drivers/ata/pata_rdc.c
@@ -365,8 +365,8 @@ static void rdc_remove_one(struct pci_dev *pdev)
}
static const struct pci_device_id rdc_pci_tbl[] = {
- { PCI_DEVICE(0x17F3, 0x1011), },
- { PCI_DEVICE(0x17F3, 0x1012), },
+ { PCI_VDEVICE(RDC, PCI_DEVICE_ID_RDC_D1011), },
+ { PCI_VDEVICE(RDC, PCI_DEVICE_ID_RDC_D1012), },
{ } /* terminate list */
};
--
1.7.6.4
^ permalink raw reply related
* Re: [PATCH 00/22] Refactor to accept NUL in commit messages
From: Junio C Hamano @ 2011-10-23 5:51 UTC (permalink / raw)
To: Nguyen Thai Ngoc Duy; +Cc: git, peff, Ævar Arnfjörð
In-Reply-To: <CACsJy8B=TsC4A=R6b3jyYBCvorEDBYHQ8uA864WrB0-3pgNyKA@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
> We could allocate just one block with length as the first field:
>
> struct commit_buffer {
> unsigned long len;
> char buf[FLEX_ARRAY];
> };
>
> The downside is commit_buffer field type in struct commit changes,
> which impacts many codepaths.
I think that is a good thing overall to _force_ us to audit all the code,
*if* our goal were to avoid losing bytes. And the solution above is better
than adding a length field to "struct commit". It certainly is better than
quoting NUL byte to ^@, keep using the "char *" field and risking some
codepaths forget to convert it back to NUL. For types of payloads for
which losing everything after the first NUL matters, converting NUL to ^@
and then forgetting to convert it back to NUL is equally bad breakage to
the payload anyway, so such a conversion would not be a particularly good
approach to avoid losing bytes.
But as Jeff suggested, we should step back a bit and think what our goal
is.
The low level object format of our commit is textual header fields, each
of which is terminated with a LF, followed by a LF to mark the end of
header fields, and then opaque payload that can contain any bytes. It does
not forbid a non-Git application to reuse the object store infrastructure
to store ASN.1 binary goo there, and the low level interface we give such
as cat-file is a perfectly valid way to inspect such a "commit" object.
But when it comes to "Git" Porcelains (e.g. the log family of commands),
we do assume people do not store random binary byte sequences in commits,
and we do take advantage of that assumption by splitting each "line" at
LF, indenting them with 4 spaces, etc. In other words, a commit log in the
Git context _is_ pretty much text and not arbitrary byte sequence. Even
the "--pretty=raw" option for "log" family is not about the "raw" body;
the "raw"-ness applies only to the header fields. So even if we _were_ to
update the codepaths involved to avoid losing bytes, the end result will
not be useful for users to whom ability to include NUL matters.
So in that sense, I do not think it is unreasonable to chop it off at the
first NUL, which is the current behaviour. IOW, it is entirely sane to
argue that there is nothing to fix.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.