From 61b5cf727cfd9201a2811dcbcffe464f61d03b34 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 2 Aug 2013 05:37:20 +0800 Subject: [PATCH] 3.0-stable patches added patches: drm-radeon-atom-initialize-more-atom-interpretor-elements-to-0.patch livelock-avoidance-in-sget.patch usb-serial-ftdi_sio-add-more-rt-systems-ftdi-devices.patch --- ...-more-atom-interpretor-elements-to-0.patch | 45 ++++++++ queue-3.0/livelock-avoidance-in-sget.patch | 100 +++++++++++++++++ queue-3.0/series | 3 + ...sio-add-more-rt-systems-ftdi-devices.patch | 105 ++++++++++++++++++ 4 files changed, 253 insertions(+) create mode 100644 queue-3.0/drm-radeon-atom-initialize-more-atom-interpretor-elements-to-0.patch create mode 100644 queue-3.0/livelock-avoidance-in-sget.patch create mode 100644 queue-3.0/usb-serial-ftdi_sio-add-more-rt-systems-ftdi-devices.patch diff --git a/queue-3.0/drm-radeon-atom-initialize-more-atom-interpretor-elements-to-0.patch b/queue-3.0/drm-radeon-atom-initialize-more-atom-interpretor-elements-to-0.patch new file mode 100644 index 00000000000..f6b945e0cc9 --- /dev/null +++ b/queue-3.0/drm-radeon-atom-initialize-more-atom-interpretor-elements-to-0.patch @@ -0,0 +1,45 @@ +From 42a21826dc54583cdb79cc8477732e911ac9c376 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Tue, 30 Jul 2013 00:22:53 -0400 +Subject: drm/radeon/atom: initialize more atom interpretor elements to 0 + +From: Alex Deucher + +commit 42a21826dc54583cdb79cc8477732e911ac9c376 upstream. + +The ProcessAuxChannel table on some rv635 boards assumes +the divmul members are initialized to 0 otherwise we get +an invalid fb offset since it has a bad mask set when +setting the fb base. While here initialize all the +atom interpretor elements to 0. + +Fixes: +https://bugzilla.kernel.org/show_bug.cgi?id=60639 + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/atom.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/gpu/drm/radeon/atom.c ++++ b/drivers/gpu/drm/radeon/atom.c +@@ -1220,12 +1220,17 @@ int atom_execute_table(struct atom_conte + int r; + + mutex_lock(&ctx->mutex); ++ /* reset data block */ ++ ctx->data_block = 0; + /* reset reg block */ + ctx->reg_block = 0; + /* reset fb window */ + ctx->fb_base = 0; + /* reset io mode */ + ctx->io_mode = ATOM_IO_MM; ++ /* reset divmul */ ++ ctx->divmul[0] = 0; ++ ctx->divmul[1] = 0; + r = atom_execute_table_locked(ctx, index, params); + mutex_unlock(&ctx->mutex); + return r; diff --git a/queue-3.0/livelock-avoidance-in-sget.patch b/queue-3.0/livelock-avoidance-in-sget.patch new file mode 100644 index 00000000000..8d07b1a4bb1 --- /dev/null +++ b/queue-3.0/livelock-avoidance-in-sget.patch @@ -0,0 +1,100 @@ +From acfec9a5a892f98461f52ed5770de99a3e571ae2 Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Sat, 20 Jul 2013 03:13:55 +0400 +Subject: livelock avoidance in sget() + +From: Al Viro + +commit acfec9a5a892f98461f52ed5770de99a3e571ae2 upstream. + +Eric Sandeen has found a nasty livelock in sget() - take a mount(2) about +to fail. The superblock is on ->fs_supers, ->s_umount is held exclusive, +->s_active is 1. Along comes two more processes, trying to mount the same +thing; sget() in each is picking that superblock, bumping ->s_count and +trying to grab ->s_umount. ->s_active is 3 now. Original mount(2) +finally gets to deactivate_locked_super() on failure; ->s_active is 2, +superblock is still ->fs_supers because shutdown will *not* happen until +->s_active hits 0. ->s_umount is dropped and now we have two processes +chasing each other: +s_active = 2, A acquired ->s_umount, B blocked +A sees that the damn thing is stillborn, does deactivate_locked_super() +s_active = 1, A drops ->s_umount, B gets it +A restarts the search and finds the same superblock. And bumps it ->s_active. +s_active = 2, B holds ->s_umount, A blocked on trying to get it +... and we are in the earlier situation with A and B switched places. + +The root cause, of course, is that ->s_active should not grow until we'd +got MS_BORN. Then failing ->mount() will have deactivate_locked_super() +shut the damn thing down. Fortunately, it's easy to do - the key point +is that grab_super() is called only for superblocks currently on ->fs_supers, +so it can bump ->s_count and grab ->s_umount first, then check MS_BORN and +bump ->s_active; we must never increment ->s_count for superblocks past +->kill_sb(), but grab_super() is never called for those. + +The bug is pretty old; we would've caught it by now, if not for accidental +exclusion between sget() for block filesystems; the things like cgroup or +e.g. mtd-based filesystems don't have anything of that sort, so they get +bitten. The right way to deal with that is obviously to fix sget()... + +Signed-off-by: Al Viro +Signed-off-by: Greg Kroah-Hartman + +--- + fs/super.c | 25 ++++++++++--------------- + 1 file changed, 10 insertions(+), 15 deletions(-) + +--- a/fs/super.c ++++ b/fs/super.c +@@ -222,19 +222,19 @@ EXPORT_SYMBOL(deactivate_super); + * and want to turn it into a full-blown active reference. grab_super() + * is called with sb_lock held and drops it. Returns 1 in case of + * success, 0 if we had failed (superblock contents was already dead or +- * dying when grab_super() had been called). ++ * dying when grab_super() had been called). Note that this is only ++ * called for superblocks not in rundown mode (== ones still on ->fs_supers ++ * of their type), so increment of ->s_count is OK here. + */ + static int grab_super(struct super_block *s) __releases(sb_lock) + { +- if (atomic_inc_not_zero(&s->s_active)) { +- spin_unlock(&sb_lock); +- return 1; +- } +- /* it's going away */ + s->s_count++; + spin_unlock(&sb_lock); +- /* wait for it to die */ + down_write(&s->s_umount); ++ if ((s->s_flags & MS_BORN) && atomic_inc_not_zero(&s->s_active)) { ++ put_super(s); ++ return 1; ++ } + up_write(&s->s_umount); + put_super(s); + return 0; +@@ -335,11 +335,6 @@ retry: + destroy_super(s); + s = NULL; + } +- down_write(&old->s_umount); +- if (unlikely(!(old->s_flags & MS_BORN))) { +- deactivate_locked_super(old); +- goto retry; +- } + return old; + } + } +@@ -512,10 +507,10 @@ restart: + if (list_empty(&sb->s_instances)) + continue; + if (sb->s_bdev == bdev) { +- if (grab_super(sb)) /* drops sb_lock */ +- return sb; +- else ++ if (!grab_super(sb)) + goto restart; ++ up_write(&sb->s_umount); ++ return sb; + } + } + spin_unlock(&sb_lock); diff --git a/queue-3.0/series b/queue-3.0/series index acbae698d3b..82f560540cd 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -14,3 +14,6 @@ powerpc-modules-module-crc-relocation-fix-causes-perf-issues.patch acpi-memhotplug-fix-a-stale-pointer-in-error-path.patch drm-radeon-fix-combios-tables-on-older-cards.patch drm-radeon-improve-dac-adjust-heuristics-for-legacy-pdac.patch +drm-radeon-atom-initialize-more-atom-interpretor-elements-to-0.patch +usb-serial-ftdi_sio-add-more-rt-systems-ftdi-devices.patch +livelock-avoidance-in-sget.patch diff --git a/queue-3.0/usb-serial-ftdi_sio-add-more-rt-systems-ftdi-devices.patch b/queue-3.0/usb-serial-ftdi_sio-add-more-rt-systems-ftdi-devices.patch new file mode 100644 index 00000000000..00165134b49 --- /dev/null +++ b/queue-3.0/usb-serial-ftdi_sio-add-more-rt-systems-ftdi-devices.patch @@ -0,0 +1,105 @@ +From fed1f1ed90bce42ea010e2904cbc04e7b8304940 Mon Sep 17 00:00:00 2001 +From: "Rick Farina (Zero_Chaos)" +Date: Mon, 29 Jul 2013 15:17:59 -0400 +Subject: USB: serial: ftdi_sio: add more RT Systems ftdi devices + +From: "Rick Farina (Zero_Chaos)" + +commit fed1f1ed90bce42ea010e2904cbc04e7b8304940 upstream. + +RT Systems makes many usb serial cables based on the ftdi_sio driver for +programming various amateur radios. This patch is a full listing of +their current product offerings and should allow these cables to all +be recognized. + +Signed-off-by: Rick Farina (Zero_Chaos) +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 31 ++++++++++++++++++++++++++++--- + drivers/usb/serial/ftdi_sio_ids.h | 34 +++++++++++++++++++++++++++++----- + 2 files changed, 57 insertions(+), 8 deletions(-) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -743,9 +743,34 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, FTDI_NDI_AURORA_SCU_PID), + .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, + { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, +- { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) }, +- { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_CT29B_PID) }, +- { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_RTS01_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_S03_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_59_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_57A_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_57B_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_29A_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_29B_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_29F_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_62B_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_S01_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_63_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_29C_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_81B_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_82B_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_K5D_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_K4Y_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_K5G_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_S05_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_60_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_61_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_62_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_63B_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_64_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_65_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_92_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_92D_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_W5R_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_A5R_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_PW1_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, + { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -815,11 +815,35 @@ + /* + * RT Systems programming cables for various ham radios + */ +-#define RTSYSTEMS_VID 0x2100 /* Vendor ID */ +-#define RTSYSTEMS_SERIAL_VX7_PID 0x9e52 /* Serial converter for VX-7 Radios using FT232RL */ +-#define RTSYSTEMS_CT29B_PID 0x9e54 /* CT29B Radio Cable */ +-#define RTSYSTEMS_RTS01_PID 0x9e57 /* USB-RTS01 Radio Cable */ +- ++#define RTSYSTEMS_VID 0x2100 /* Vendor ID */ ++#define RTSYSTEMS_USB_S03_PID 0x9001 /* RTS-03 USB to Serial Adapter */ ++#define RTSYSTEMS_USB_59_PID 0x9e50 /* USB-59 USB to 8 pin plug */ ++#define RTSYSTEMS_USB_57A_PID 0x9e51 /* USB-57A USB to 4pin 3.5mm plug */ ++#define RTSYSTEMS_USB_57B_PID 0x9e52 /* USB-57B USB to extended 4pin 3.5mm plug */ ++#define RTSYSTEMS_USB_29A_PID 0x9e53 /* USB-29A USB to 3.5mm stereo plug */ ++#define RTSYSTEMS_USB_29B_PID 0x9e54 /* USB-29B USB to 6 pin mini din */ ++#define RTSYSTEMS_USB_29F_PID 0x9e55 /* USB-29F USB to 6 pin modular plug */ ++#define RTSYSTEMS_USB_62B_PID 0x9e56 /* USB-62B USB to 8 pin mini din plug*/ ++#define RTSYSTEMS_USB_S01_PID 0x9e57 /* USB-RTS01 USB to 3.5 mm stereo plug*/ ++#define RTSYSTEMS_USB_63_PID 0x9e58 /* USB-63 USB to 9 pin female*/ ++#define RTSYSTEMS_USB_29C_PID 0x9e59 /* USB-29C USB to 4 pin modular plug*/ ++#define RTSYSTEMS_USB_81B_PID 0x9e5A /* USB-81 USB to 8 pin mini din plug*/ ++#define RTSYSTEMS_USB_82B_PID 0x9e5B /* USB-82 USB to 2.5 mm stereo plug*/ ++#define RTSYSTEMS_USB_K5D_PID 0x9e5C /* USB-K5D USB to 8 pin modular plug*/ ++#define RTSYSTEMS_USB_K4Y_PID 0x9e5D /* USB-K4Y USB to 2.5/3.5 mm plugs*/ ++#define RTSYSTEMS_USB_K5G_PID 0x9e5E /* USB-K5G USB to 8 pin modular plug*/ ++#define RTSYSTEMS_USB_S05_PID 0x9e5F /* USB-RTS05 USB to 2.5 mm stereo plug*/ ++#define RTSYSTEMS_USB_60_PID 0x9e60 /* USB-60 USB to 6 pin din*/ ++#define RTSYSTEMS_USB_61_PID 0x9e61 /* USB-61 USB to 6 pin mini din*/ ++#define RTSYSTEMS_USB_62_PID 0x9e62 /* USB-62 USB to 8 pin mini din*/ ++#define RTSYSTEMS_USB_63B_PID 0x9e63 /* USB-63 USB to 9 pin female*/ ++#define RTSYSTEMS_USB_64_PID 0x9e64 /* USB-64 USB to 9 pin male*/ ++#define RTSYSTEMS_USB_65_PID 0x9e65 /* USB-65 USB to 9 pin female null modem*/ ++#define RTSYSTEMS_USB_92_PID 0x9e66 /* USB-92 USB to 12 pin plug*/ ++#define RTSYSTEMS_USB_92D_PID 0x9e67 /* USB-92D USB to 12 pin plug data*/ ++#define RTSYSTEMS_USB_W5R_PID 0x9e68 /* USB-W5R USB to 8 pin modular plug*/ ++#define RTSYSTEMS_USB_A5R_PID 0x9e69 /* USB-A5R USB to 8 pin modular plug*/ ++#define RTSYSTEMS_USB_PW1_PID 0x9e6A /* USB-PW1 USB to 8 pin modular plug*/ + + /* + * Physik Instrumente -- 2.47.3