21 Feb, 2012
10 commits
-
commit 09e87e5c4f9af656af2a8a3afc03487c5d9287c3 upstream.
In order to enable temperature mode aka automatic mode for the F75373 and
F75375 chips, the two FANx_MODE bits in the fan configuration register
need be set to 01, not 10.Signed-off-by: Nikolaus Schulz
Signed-off-by: Greg Kroah-Hartman -
commit a1728800bed3b93b231d99e97c756f622b9991c2 upstream.
8
Date: Wed, 16 Nov 2011 09:33:50 +0100
Subject: net: enable TC35815 for MIPS againTX493[8,9] MIPS SoCs support 2 Ethernet channels of type TC35815
which are connected to the internal PCI controller.
And JMR3927 MIPS board has a TC35815 chip on board.
These dependencies were lost on movement to drivers/net/ethernet/toshiba.Signed-off-by: Ralf Roesch
Signed-off-by: Atsushi Nemoto
Signed-off-by: David S. Miller
Signed-off-by: Greg Kroah-Hartman -
commit eb2f255b2d360df3f500042a2258dcf2fcbe89a2 upstream.
In order to extract the high byte of the 16-bit word, shift the word to
the right, not to the left.Signed-off-by: Nikolaus Schulz
Signed-off-by: Guenter Roeck
Signed-off-by: Greg Kroah-Hartman -
commit 55a2bb4a6d5e8c7b324d003e130fd9aaf33be4e6 upstream.
commit adb5066 "ath9k_hw: do not apply the 2.4 ghz ack timeout
workaround to cts" reduced the hardware CTS timeout to the normal
values specified by the standard, but it turns out while it doesn't
need the same extra time that it needs for the ACK timeout, it
does need more than the value specified in the standard, but only
for 2.4 GHz.This patch brings the CTS timeout value in sync with the initialization
values, while still allowing adjustment for bigger distances.Signed-off-by: Felix Fietkau
Reported-by: Seth Forshee
Reported-by: Marek Lindner
Signed-off-by: John W. Linville
Signed-off-by: Greg Kroah-Hartman -
commit f88373fa47f3ce6590fdfaa742d0ddacc2ae017f upstream.
commit b4a82a0 "ath9k_hw: fix interpretation of the rx KeyMiss flag"
fixed the interpretation of the KeyMiss flag for keycache based lookups,
however WEP encryption uses a static index, so KeyMiss is always asserted
for it, even though frames are decrypted properly.
Fix this by clearing the ATH9K_RXERR_KEYMISS flag if no keycache based
lookup was performed.Signed-off-by: Felix Fietkau
Reported-by: Laurent Bonnans
Reported-by: Jurica Vukadin
Signed-off-by: John W. Linville
Signed-off-by: Greg Kroah-Hartman -
commit 07445f688218a48bde72316aed9de4fdcc173131 upstream.
all works need to be initialized before ieee80211_register_hw
to prevent mac80211 call backs such as drv_start, drv_config
getting started. otherwise we would queue/cancel works before
initializing them and it leads to kernel panic.
this issue can be recreated with the following script
in Chrome laptops with AR928X cards, with background scan
running (or) Network manager is runningwhile true
do
sudo modprobe -v ath9k
sleep 3
sudo modprobe -r ath9k
sleep 3
doneEIP: [] __cancel_work_timer+0xb8/0xe1 SS:ESP 0068:f6be9d70
---[ end trace 4f86d6139a9900ef ]---
Registered led device: ath9k-phy0
ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xf88a0000,
irq=16
Kernel panic - not syncing: Fatal exception
Pid: 456, comm: wpa_supplicant Tainted: G D
3.0.13 #1
Call Trace:
[] panic+0x53/0x14a
[] oops_end+0x73/0x81
[] die+0x4c/0x55
[] do_trap+0x7c/0x83
[] ? do_bounds+0x58/0x58
[] do_invalid_op+0x77/0x81
[] ? __cancel_work_timer+0xb8/0xe1
[] ? sched_clock_cpu+0x81/0x11f
[] ? wait_on_work+0xe2/0xf7
[] error_code+0x67/0x6c
[] ? wait_consider_task+0x4ba/0x84c
[] ? __cancel_work_timer+0xb8/0xe1
[] ? try_to_del_timer_sync+0x5f/0x67
[] cancel_work_sync+0xf/0x11
[] ath_set_channel+0x62/0x25c [ath9k]
[] ? ath9k_tx_last_beacon+0x26a/0x85c [ath9k]
[] ath_radio_disable+0x3f1/0x68e [ath9k]
[] ieee80211_hw_config+0x111/0x116 [mac80211]
[] __ieee80211_recalc_idle+0x919/0xa37 [mac80211]
[] __ieee80211_recalc_idle+0xa33/0xa37 [mac80211]
[] __dev_open+0x82/0xabCc: Gary Morain
Cc: Paul Stewart
Cc: Vasanthakumar Thiagarajan
Tested-by: Mohammed Shafi Shajakhan
Signed-off-by: Rajkumar Manoharan
Signed-off-by: Mohammed Shafi Shajakhan
Signed-off-by: John W. Linville
Signed-off-by: Greg Kroah-Hartman -
commit e57b6886f555ab57f40a01713304e2053efe51ec upstream.
According to a bug report, it doesn't have one.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44263
Acked-by: Chris Wilson
Signed-Off-by: Daniel Vetter
Signed-off-by: Keith Packard
Signed-off-by: Greg Kroah-Hartman -
commit c898261c0dad617f0f1080bedc02d507a2fcfb92 upstream.
It is never correct to use intel_crtc->bpp in intel_dp_link_required,
so instead pass an explicit bpp in to this function. This patch
only supports 18bpp and 24bpp modes, which means that 10bpc modes will
be computed incorrectly. Fixing that will require more extensive
changes, and so must be addressed separately from this bugfix.intel_dp_link_required is called from intel_dp_mode_valid and
intel_dp_mode_fixup.* intel_dp_mode_valid is called to list supported modes; in this case,
the current crtc values cannot be relevant as the modes in question
may never be selected. Thus, using intel_crtc->bpp is never right.* intel_dp_mode_fixup is called during mode setting, but it is run
well before ironlake_crtc_mode_set is called to set intel_crtc->bpp,
so using intel_crtc-bpp in this path can only ever get a stale
value.Cc: Lubos Kolouch
Cc: Adam Jackson
Reviewed-by: Daniel Vetter
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42263
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44881
Tested-by: Dave Airlie
Tested-by: camalot@picnicpark.org (Dell Latitude 6510)
Tested-by: Roland Dreier
Signed-off-by: Keith Packard
Signed-off-by: Greg Kroah-Hartman -
commit 0629292117572a60465f38cdedde2f8164c3df0b upstream.
Recent addition of code to find already allocated VFs failed to take
account that systems with 2 or more multi-port SR-IOV capable controllers
might have already enabled VFs. Make sure that the VFs the function is
finding are actually subordinate to the particular instance of the adapter
that is looking for them and not subordinate to some device that has
previously enabled SR-IOV.This is applicable to 3.2+ kernels.
Reported-by: David Ahern
Signed-off-by: Greg Rose
Tested-by: Robert E Garrett
Signed-off-by: Jeff Kirsher
Signed-off-by: Greg Kroah-Hartman -
commit a4b08329c74985e5cc3a44b6d2b2c59444ed8079 upstream.
Recent addition of code to find already allocated VFs failed to take
account that systems with 2 or more multi-port SR-IOV capable controllers
might have already enabled VFs. Make sure that the VFs the function is
finding are actually subordinate to the particular instance of the adapter
that is looking for them and not subordinate to some device that has
previously enabled SR-IOV.This bug exists in 3.2 stable as well as 3.3 release candidates.
Reported-by: David Ahern
Signed-off-by: Greg Rose
Tested-by: Robert E Garrett
Signed-off-by: Jeff Kirsher
Signed-off-by: Greg Kroah-Hartman
14 Feb, 2012
30 commits
-
commit a8eb28480e9b637cc78b9aa5e08612ba97e1317a upstream.
The driver uses the pstate number from the status register as index in
its table of ACPI pstates (powernow_table). This is wrong as this is
not a 1-to-1 mapping.For example we can have _PSS information to just utilize Pstate 0 and
Pstate 4, ie.powernow-k8: Core Performance Boosting: on.
powernow-k8: 0 : pstate 0 (2200 MHz)
powernow-k8: 1 : pstate 4 (1400 MHz)In this example the driver's powernow_table has just 2 entries. Using
the pstate number (4) as index into this table is just plain wrong.Signed-off-by: Andreas Herrmann
Signed-off-by: Dave Jones
Signed-off-by: Greg Kroah-Hartman -
commit 201bf0f129e1715a33568d1563d9a75b840ab4d3 upstream.
Due to CPB we can't directly map SW Pstates to Pstate MSRs. Get rid of
the paranoia check. (assuming that the ACPI Pstate information is
correct.)Signed-off-by: Andreas Herrmann
Signed-off-by: Dave Jones
Signed-off-by: Greg Kroah-Hartman -
commit b5266ea675c5a041e2852c7ccec4cf2d4f5e0cf4 upstream.
Signed-off-by: Axel Lin
Acked-by: Michał Mirosław
Signed-off-by: Greg Kroah-Hartman -
commit 9256a4789be3dae37d00924c03546ba7958ea5a3 upstream.
I discovered this deadlock condition awhile ago working on RAMster
but it affects zcache as well. The list spinlock must be
locked prior to the page spinlock and released after. As
a result, the page copy must also be done while the locks are held.Applies to 3.2. Konrad, please push (via GregKH?)...
this is definitely a bug fix so need not be pushed during
a -rc0 window.Signed-off-by: Dan Magenheimer
Acked-by: Konrad Rzeszutek Wilk
Signed-off-by: Greg Kroah-Hartman -
commit e8b4553457e78bcff90f70a31212a40a8fd4f0db upstream.
SWIZ_BITS > 8 results in a much larger number of "tmem_obj"
allocations, likely one per page-placed-in-frontswap. The
tmem_obj is not huge (roughly 100 bytes), but it is large
enough to add a not-insignificant memory overhead to zcache.The SWIZ_BITS=8 will get roughly the same lock contention
without the space wastage.The effect of SWIZ_BITS can be thought of as "2^SWIZ_BITS is
the number of unique oids that be generated" (This concept is
limited to frontswap's use of tmem).Acked-by: Seth Jennings
Signed-off-by: Konrad Rzeszutek Wilk
Signed-off-by: Greg Kroah-Hartman -
commit 1608ea5f4b5d6262cd6e808839491cfb2a67405a upstream.
As ZTE have and will use more pid for new products this year,
so we need to add some new zte 3g-dongle's pid on option.c ,
and delete one pid 0x0154 because it use for mass-storage port.Signed-off-by: Rui li
Signed-off-by: Greg Kroah-Hartman -
commit 90451e6973a5da155c6f315a409ca0a8d3ce6b76 upstream.
Signed-off-by: Milan Kocian
Signed-off-by: Greg Kroah-Hartman -
commit e4436a7c17ac2b5e138f93f83a541cba9b311685 upstream.
The Netlogic XLP SoC's on-chip USB controller appears as a PCI
USB device, but does not need the EHCI/OHCI handoff done in
usb/host/pci-quirks.c.The pci-quirks.c is enabled for all vendors and devices, and is
enabled if USB and PCI are configured.If we do not skip the qurik handling on XLP, the readb() call in
ehci_bios_handoff() will cause a crash since byte access is not
supported for EHCI registers in XLP.Signed-off-by: Jayachandran C
Acked-by: Alan Stern
Signed-off-by: Greg Kroah-Hartman -
commit 683da59d7b8ae04891636d4b59893cd4e9b0b7e5 upstream.
ab943a2e125b (USB: gadget: gadget zero uses new suspend/resume hooks)
introduced a copy-paste error where f_loopback.c writes to a variable
declared in f_sourcesink.c. This prevents one from creating gadgets
that only have a loopback function.Signed-off-by: Timo Juhani Lindfors
Signed-off-by: Felipe Balbi
Signed-off-by: Greg Kroah-Hartman -
commit 8c213fa59199f9673d66970d6940fa093186642f upstream.
In https://bugs.archlinux.org/task/27996, failure of driver r8712u is
reported, with a timeout during module loading due to synchronous loading
of the firmware. The code now uses request_firmware_nowait().Signed-off-by: Larry Finger
Signed-off-by: Greg Kroah-Hartman -
commit 1793bf1deddc8ce25dc41925d5dbe64536c841b6 upstream.
Add USB ID for SITECOM WLA-1000 V1 001 WLAN
Reported-and-tested-by: Roland Gruber
Reported-and-tested-by: Dario Lucia
Signed-off-by: Larry Finger
Signed-off-by: Greg Kroah-Hartman -
commit 3589e74595a4332ebf77b5ed006f3c6686071ecd upstream.
Asus_oled triggers the following bug on module unloading:
usbcore: deregistering interface driver asus-oled
BUG: unable to handle kernel NULL pointer dereference at 0000000000000038
IP: [] sysfs_delete_link+0x30/0x66Call Trace:
[] device_remove_class_symlinks+0x6b/0x70
[] device_del+0x9f/0x1ab
[] device_unregister+0x11/0x1e
[] asus_oled_disconnect+0x4f/0x9e [asus_oled]
[] usb_unbind_interface+0x54/0x103
[] __device_release_driver+0xa2/0xeb
[] driver_detach+0x87/0xad
[] bus_remove_driver+0x91/0xc1
[] driver_unregister+0x66/0x6e
[] usb_deregister+0xbb/0xc4
[] asus_oled_exit+0x2f/0x31 [asus_oled]
[] sys_delete_module+0x1b8/0x21b
[] ? do_munmap+0x2ef/0x313
[] system_call_fastpath+0x16/0x1bThis is due to an incorrect destruction sequence in asus_oled_exit().
Fix the order, fixes the bug. Tested on an Asus G50V laptop only.
Cc: Jakub Schmidtke
Signed-off-by: Pekka Paalanen
Signed-off-by: Greg Kroah-Hartman -
commit 635032cb397b396241372fa0ff36ae758e658b23 upstream.
Programming an image was broken, because odev->buf_offs was not advanced
for val == 0 in append_values(). This regression was introduced in:commit 1ff12a4aa354bed093a0240d5e6347b1e27601bc
Author: Kevin A. Granade
Date: Sat Sep 5 01:03:39 2009 -0500Staging: asus_oled: Cleaned up checkpatch issues.
Fix the image processing by special-casing val == 0.
I have tested this change on an Asus G50V laptop only.
Cc: Jakub Schmidtke
Cc: Kevin A. Granade
Signed-off-by: Pekka Paalanen
Signed-off-by: Greg Kroah-Hartman -
commit bf0053550aebe56f3bb5dd793e9de69238b5b945 upstream.
My draft of SPC-4 says:
If the PAGE CODE field is not set to zero when the EVPD bit is set
to zero, the command shall be terminated with CHECK CONDITION
status, with the sense key set to ILLEGAL REQUEST, and the
additional sense code set to INVALID FIELD IN CDB.Signed-off-by: Roland Dreier
Signed-off-by: Nicholas Bellinger
Signed-off-by: Greg Kroah-Hartman -
commit bb1acb2ee038a6c13ee99e0b9fb44dacb4a9de84 upstream.
My draft of SPC-4 says:
If the device server does not implement the requested vital product
data page, then the command shall be terminated with CHECK CONDITION
status, with the sense key set to ILLEGAL REQUEST, and the
additional sense code set to INVALID FIELD IN CDB.Signed-off-by: Roland Dreier
Signed-off-by: Nicholas Bellinger
Signed-off-by: Greg Kroah-Hartman -
commit 91ec1d3535b2acf12c599045cc19ad9be3c6a47b upstream.
This patch adds a work-around for handling zero allocation length
control CDBs (type SCF_SCSI_CONTROL_SG_IO_CDB) that was causing an
OOPs with the following raw calls:# sg_raw -v /dev/sdd 3 0 0 0 0 0
# sg_raw -v /dev/sdd 0x1a 0 1 0 0 0This patch will follow existing zero-length handling for data I/O
and silently return with GOOD status. This addresses the zero length
issue, but the proper long-term resolution for handling arbitary
allocation lengths will be to refactor out data-phase handling in
individual CDB emulation logic within target_core_cdb.cReported-by: Roland Dreier
Signed-off-by: Nicholas Bellinger
Signed-off-by: Greg Kroah-Hartman -
commit 9fbc8909876a2160044e71d376848973b9bfdc3f upstream.
According to SPC-4, the sense key for commands that are failed with
INVALID FIELD IN PARAMETER LIST and INVALID FIELD IN CDB should be
ILLEGAL REQUEST (5h) rather than ABORTED COMMAND (Bh). Without this
patch, a tcm_loop LUN incorrectly gives:# sg_raw -r 1 -v /dev/sda 3 1 0 0 ff 0
Sense Information:
Fixed format, current; Sense key: Aborted Command
Additional sense: Invalid field in cdb
Raw sense data (in hex):
70 00 0b 00 00 00 00 0a 00 00 00 00 24 00 00 00
00 00While a real SCSI disk gives:
Sense Information:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid field in cdb
Raw sense data (in hex):
70 00 05 00 00 00 00 18 00 00 00 00 24 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00with the main point being that the real disk gives a sense key of
ILLEGAL REQUEST (5h).Signed-off-by: Roland Dreier
Signed-off-by: Nicholas Bellinger
Signed-off-by: Greg Kroah-Hartman -
commit 6816966a8418b980481b4dced7eddd1796b145e8 upstream.
Initiators that aren't the active reservation holder should be able to
do a PERSISTENT RESERVE IN command in all cases, so add it to the list
of allowed CDBs in core_scsi3_pr_seq_non_holder().Signed-off-by: Marco Sanvido
Signed-off-by: Roland Dreier
Signed-off-by: Nicholas Bellinger
Signed-off-by: Greg Kroah-Hartman -
commit 9e08e34e3735ae057eb3834da3570995811b7eb9 upstream.
The comments quote the right parts of the spec:
* d) Establish a unit attention condition for the
* initiator port associated with every I_T nexus
* that lost its registration other than the I_T
* nexus on which the PERSISTENT RESERVE OUT command
* was received, with the additional sense code set
* to REGISTRATIONS PREEMPTED.and
* e) Establish a unit attention condition for the initiator
* port associated with every I_T nexus that lost its
* persistent reservation and/or registration, with the
* additional sense code set to REGISTRATIONS PREEMPTED;but the actual code accidentally uses ASCQ_2AH_RESERVATIONS_PREEMPTED
instead of ASCQ_2AH_REGISTRATIONS_PREEMPTED. Fix this.Signed-off-by: Marco Sanvido
Signed-off-by: Roland Dreier
Signed-off-by: Nicholas Bellinger
Signed-off-by: Greg Kroah-Hartman -
commit 05df1f3c2afaef5672627f2b7095f0d4c4dbc3a0 upstream.
Error handling in msm_iommu_unmap() is broken. On some error
conditions retval is set to a non-zero value which causes
the function to return 'len' at the end. This hides the
error from the user. Zero should be returned in those error
cases.Cc: David Brown
Cc: Stepan Moskovchenko
Signed-off-by: Joerg Roedel
Acked-by: David Brown
Signed-off-by: Greg Kroah-Hartman -
commit af1be04901e27ce669b4ecde1c953d5c939498f5 upstream.
On some systems the IVRS table does not contain all PCI
devices present in the system. In case a device not present
in the IVRS table is translated by the IOMMU no DMA is
possible from that device by default.
This patch fixes this by removing the DTE entry for every
PCI device present in the system and not covered by IVRS.Signed-off-by: Joerg Roedel
Signed-off-by: Greg Kroah-Hartman -
commit 025e4ab3db07fcbf62c01e4f30d1012234beb980 upstream.
This fixes a memory-corrupting bug: not only does it cause the warning,
but as a result of dropping the refcount to zero, it causes the
pcmcia_socket0 device structure to be freed while it still has
references, causing slab caches corruption. A fatal oops quickly
follows this warning - often even just a 'dmesg' following the warning
causes the kernel to oops.While testing suspend/resume on an ARM device with PCMCIA support, and a
CF card inserted, I found that after five suspend and resumes, the
kernel would complain, and shortly die after with slab corruption.WARNING: at include/linux/kref.h:41 kobject_get+0x28/0x50()
As the message doesn't give a clue about which kobject, and the built-in
debugging in drivers/base/power/main.c happens too late, this was added
right before each get_device():printk("%s: %p [%s] %u\n", __func__, dev, kobject_name(&dev->kobj), atomic_read(&dev->kobj.kref.refcount));
and on the 3rd s2ram cycle, the following behaviour observed:
On the 3rd suspend/resume cycle:
dpm_prepare: c1a0d998 [pcmcia_socket0] 3
dpm_suspend: c1a0d998 [pcmcia_socket0] 3
dpm_suspend_noirq: c1a0d998 [pcmcia_socket0] 3
dpm_resume_noirq: c1a0d998 [pcmcia_socket0] 3
dpm_resume: c1a0d998 [pcmcia_socket0] 3
dpm_complete: c1a0d998 [pcmcia_socket0] 24th:
dpm_prepare: c1a0d998 [pcmcia_socket0] 2
dpm_suspend: c1a0d998 [pcmcia_socket0] 2
dpm_suspend_noirq: c1a0d998 [pcmcia_socket0] 2
dpm_resume_noirq: c1a0d998 [pcmcia_socket0] 2
dpm_resume: c1a0d998 [pcmcia_socket0] 2
dpm_complete: c1a0d998 [pcmcia_socket0] 15th:
dpm_prepare: c1a0d998 [pcmcia_socket0] 1
dpm_suspend: c1a0d998 [pcmcia_socket0] 1
dpm_suspend_noirq: c1a0d998 [pcmcia_socket0] 1
dpm_resume_noirq: c1a0d998 [pcmcia_socket0] 1
dpm_resume: c1a0d998 [pcmcia_socket0] 1
dpm_complete: c1a0d998 [pcmcia_socket0] 0
------------[ cut here ]------------
WARNING: at include/linux/kref.h:41 kobject_get+0x28/0x50()
Modules linked in: ucb1x00_core
Backtrace:
[] (dump_backtrace+0x0/0x110) from [] (dump_stack+0x18/0x1c)
[] (dump_stack+0x0/0x1c) from [] (warn_slowpath_common+0x50/0x68)
[] (warn_slowpath_common+0x0/0x68) from [] (warn_slowpath_null+0x24/0x28)
[] (warn_slowpath_null+0x0/0x28) from [] (kobject_get+0x28/0x50)
[] (kobject_get+0x0/0x50) from [] (get_device+0x1c/0x24)
[] (dpm_complete+0x0/0x1a0) from [] (dpm_resume_end+0x1c/0x20)
...Looking at commit 7b24e7988263 ("pcmcia: split up central event handler"),
the following change was made to cs.c:return 0;
}
#endif
-
- send_event(skt, CS_EVENT_PM_RESUME, CS_EVENT_PRI_LOW);
+ if (!(skt->state & SOCKET_CARDBUS) && (skt->callback))
+ skt->callback->early_resume(skt);
return 0;
}And the corresponding change in ds.c is from:
-static int ds_event(struct pcmcia_socket *skt, event_t event, int priority)
-{
- struct pcmcia_socket *s = pcmcia_get_socket(skt);
...
- switch (event) {
...
- case CS_EVENT_PM_RESUME:
- if (verify_cis_cache(skt) != 0) {
- dev_dbg(&skt->dev, "cis mismatch - different card\n");
- /* first, remove the card */
- ds_event(skt, CS_EVENT_CARD_REMOVAL, CS_EVENT_PRI_HIGH);
- mutex_lock(&s->ops_mutex);
- destroy_cis_cache(skt);
- kfree(skt->fake_cis);
- skt->fake_cis = NULL;
- s->functions = 0;
- mutex_unlock(&s->ops_mutex);
- /* now, add the new card */
- ds_event(skt, CS_EVENT_CARD_INSERTION,
- CS_EVENT_PRI_LOW);
- }
- break;
...
- }- pcmcia_put_socket(s);
- return 0;
-} /* ds_event */to:
+static int pcmcia_bus_early_resume(struct pcmcia_socket *skt)
+{
+ if (!verify_cis_cache(skt)) {
+ pcmcia_put_socket(skt);
+ return 0;
+ }+ dev_dbg(&skt->dev, "cis mismatch - different card\n");
+ /* first, remove the card */
+ pcmcia_bus_remove(skt);
+ mutex_lock(&skt->ops_mutex);
+ destroy_cis_cache(skt);
+ kfree(skt->fake_cis);
+ skt->fake_cis = NULL;
+ skt->functions = 0;
+ mutex_unlock(&skt->ops_mutex);+ /* now, add the new card */
+ pcmcia_bus_add(skt);
+ return 0;
+}As can be seen, the original function called pcmcia_get_socket() and
pcmcia_put_socket() around the guts, whereas the replacement code
calls pcmcia_put_socket() only in one path. This creates an imbalance
in the refcounting.Testing with pcmcia_put_socket() put removed shows that the bug is gone:
dpm_suspend: c1a10998 [pcmcia_socket0] 5
dpm_suspend_noirq: c1a10998 [pcmcia_socket0] 5
dpm_resume_noirq: c1a10998 [pcmcia_socket0] 5
dpm_resume: c1a10998 [pcmcia_socket0] 5
dpm_complete: c1a10998 [pcmcia_socket0] 5Tested-by: Russell King
Signed-off-by: Russell King
Cc: Dominik Brodowski
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
Signed-off-by: Greg Kroah-Hartman -
commit 2f9bc894c67dbacae5a6a9875818d2a18a918d18 upstream.
This patch addresses a bug with sendtargets discovery where INADDR_ANY (0.0.0.0)
+ IN6ADDR_ANY_INIT ([0:0:0:0:0:0:0:0]) network portals where incorrectly being
reported back to initiators instead of the address of the connecting interface.
To address this, save local socket ->getname() output during iscsi login setup,
and makes iscsit_build_sendtargets_response() return these TargetAddress keys
when INADDR_ANY or IN6ADDR_ANY_INIT portals are in use.Reported-by: Dax Kelson
Reported-by: Andy Grover
Cc: David S. Miller
Signed-off-by: Nicholas Bellinger
Signed-off-by: Greg Kroah-Hartman -
commit cd931ee62fd0258fc85c76a7c5499fe85e0f3436 upstream.
This patch fixes a bug where the iscsit_add_reject_from_cmd() call
from a failure to iscsit_alloc_buffs() was incorrectly passing
add_to_conn=1 and causing a double list_add after iscsi_cmd->i_list
had already been added in iscsit_handle_scsi_cmd().Signed-off-by: Nicholas Bellinger
Signed-off-by: Greg Kroah-Hartman -
commit c1ce4bd56f2846de55043374598fd929ad3b711b upstream.
This patch addresses a bug where iscsit_free_cmd() was incorrectly calling
iscsit_release_cmd() for ISCSI_OP_REJECT because iscsi_add_reject*() will
overwrite the original iscsi_cmd->iscsi_opcode assignment. This bug was
introduced with the following commit:commit 0be67f2ed8f577d2c72d917928394c5885fa9134
Author: Nicholas Bellinger
Date: Sun Oct 9 01:48:14 2011 -0700iscsi-target: Remove SCF_SE_LUN_CMD flag abuses
and was manifesting itself as list corruption with the following:
[ 131.191092] ------------[ cut here ]------------
[ 131.191092] WARNING: at lib/list_debug.c:53 __list_del_entry+0x8d/0x98()
[ 131.191092] Hardware name: VMware Virtual Platform
[ 131.191092] list_del corruption. prev->next should be ffff880022d3c100, but was 6b6b6b6b6b6b6b6b
[ 131.191092] Modules linked in: tcm_vhost ib_srpt ib_cm ib_sa ib_mad ib_core tcm_qla2xxx qla2xxx tcm_loop tcm_fc libfc scsi_transport_fc crc32c iscsi_target_mod target_core_stgt scsi_tgt target_core_pscsi target_core_file target_core_iblock target_core_mod configfs ipv6 iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi sr_mod cdrom sd_mod e1000 ata_piix libata mptspi mptscsih mptbase [last unloaded: scsi_wait_scan]
[ 131.191092] Pid: 2250, comm: iscsi_ttx Tainted: G W 3.2.0-rc4+ #42
[ 131.191092] Call Trace:
[ 131.191092] [] warn_slowpath_common+0x80/0x98
[ 131.191092] [] warn_slowpath_fmt+0x41/0x43
[ 131.191092] [] __list_del_entry+0x8d/0x98
[ 131.191092] [] transport_lun_remove_cmd+0x9b/0xb7 [target_core_mod]
[ 131.191092] [] transport_generic_free_cmd+0x5d/0x71 [target_core_mod]
[ 131.191092] [] iscsit_free_cmd+0x1e/0x27 [iscsi_target_mod]
[ 131.191092] [] iscsit_close_connection+0x14d/0x5b2 [iscsi_target_mod]
[ 131.191092] [] iscsit_take_action_for_connection_exit+0xdb/0xe0 [iscsi_target_mod]
[ 131.191092] [] iscsi_target_tx_thread+0x15cb/0x1608 [iscsi_target_mod]
[ 131.191092] [] ? check_preempt_wakeup+0x121/0x185
[ 131.191092] [] ? __dequeue_entity+0x2e/0x33
[ 131.191092] [] ? iscsit_send_text_rsp+0x25f/0x25f [iscsi_target_mod]
[ 131.191092] [] ? iscsit_send_text_rsp+0x25f/0x25f [iscsi_target_mod]
[ 131.191092] [] ? schedule+0x55/0x57
[ 131.191092] [] kthread+0x7d/0x85
[ 131.191092] [] kernel_thread_helper+0x4/0x10
[ 131.191092] [] ? kthread_worker_fn+0x16d/0x16d
[ 131.191092] [] ? gs_change+0x13/0x13Reported-by:
Signed-off-by: Nicholas Bellinger
Signed-off-by: Greg Kroah-Hartman -
commit 9f1065032ceb7e86c7c9f16bb86518857e88a172 upstream.
An error was existing in the saving of CONTRAST_CTR register
across suspend/resume.Signed-off-by: Hubert Feurstein
Signed-off-by: Nicolas Ferre
Acked-by: Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Florian Tobias Schandinat
Signed-off-by: Greg Kroah-Hartman -
commit 585c0fd8216e0c9f98e2434092af7ec0f999522d upstream.
NCT6776F can select fan input pins for fans 3 to 5 with a secondary set of
chip register bits. Check that second set of bits in addition to the first set
to detect if fans 3..5 are monitored.Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
commit 9f1f46a45a681d357d1ceedecec3671a5ae957f4 upstream.
The problem this patch solves is that the forcewake accounting
necessary for register reads is protected by dev->struct_mutex. But the
hangcheck and error_capture code need to access registers without
grabbing this mutex because we hold it while waiting for the gpu.
So a new lock is required. Because currently the error_state capture
is called from the error irq handler and the hangcheck code runs from
a timer, it needs to be an irqsafe spinlock (note that the registers
used by the irq handler (neglecting the error handling part) only uses
registers that don't need the forcewake dance).We could tune this down to a normal spinlock when we rework the
error_state capture and hangcheck code to run from a workqueue. But
we don't have any read in a fastpath that needs forcewake, so I've
decided to not care much about overhead.This prevents tests/gem_hangcheck_forcewake from i-g-t from killing my
snb on recent kernels - something must have slightly changed the
timings. On previous kernels it only trigger a WARN about the broken
locking.v2: Drop the previous patch for the register writes.
v3: Improve the commit message per Chris Wilson's suggestions.
Signed-Off-by: Daniel Vetter
Reviewed-by: Chris Wilson
Reviewed-by: Eugeni Dodonov
Signed-off-by: Keith Packard
Signed-off-by: Eugeni Dodonov
Signed-off-by: Greg Kroah-Hartman -
commit 8109021313c7a3d8947677391ce6ab9cd0bb1d28 upstream.
This was forgotten in the original multi-threaded forcewake
conversion:commit 8d715f0024f64ad1b1be85d8c081cf577944c847
Author: Keith Packard
Date: Fri Nov 18 20:39:01 2011 -0800drm/i915: add multi-threaded forcewake support
Signed-off-by: Daniel Vetter
Reviewed-by: Eugeni Dodonov
Signed-off-by: Keith Packard
Signed-off-by: Eugeni Dodonov
Signed-off-by: Greg Kroah-Hartman -
commit 07c1e8c1462fa7324de4c36ae9e55da2abd79cee upstream.
We don't need to check 3rd pipe specifically, as it shares PLL with some
other one.Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41977
Signed-off-by: Eugeni Dodonov
Reviewed-by: Jesse Barnes
Signed-off-by: Keith Packard
Signed-off-by: Greg Kroah-Hartman