01 Mar, 2012

9 commits

  • [ Upstream commit 936d7de3d736e0737542641269436f4b5968e9ef ]

    Commit a0417fa3a18a ("net: Make qdisc_skb_cb upper size bound
    explicit.") made it possible for a netdev driver to use skb->cb
    between its header_ops.create method and its .ndo_start_xmit
    method. Use this in ipoib_hard_header() to stash away the LL address
    (GID + QPN), instead of the "ipoib_pseudoheader" hack. This allows
    IPoIB to stop lying about its hard_header_len, which will let us fix
    the L2 check for GRO.

    Signed-off-by: Roland Dreier
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Roland Dreier
     
  • [ Upstream commit b530b1930bbd9d005345133f0ff0c556d2a52b19 ]

    Initially diagnosed on Ubuntu 11.04 with kernel 2.6.38.

    velocity_close is not called during a suspend / resume cycle in this
    driver and it has no business playing directly with power states.

    Signed-off-by: David Lv
    Acked-by: Francois Romieu
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    David Lv
     
  • [ Upstream commit 237114384ab22c174ec4641e809f8e6cbcfce774 ]

    VETH_INFO_PEER carries struct ifinfomsg plus optional IFLA
    attributes. A minimal size of sizeof(struct ifinfomsg) must be
    enforced or we may risk accessing that struct beyond the limits
    of the netlink message.

    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Hagen Paul Pfeifer
     
  • [ Upstream commit 3013dc0cceb9baaf25d5624034eeaa259bf99004 ]

    Jean Delvare reported bonding on top of 3c59x adapters was not detecting
    network cable removal fast enough.

    3c59x indeed uses a 60 seconds timer to check link status if carrier is
    on, and 5 seconds if carrier is off.

    This patch reduces timer period to 5 seconds if device is a bonding
    slave.

    Reported-by: Jean Delvare
    Acked-by: Jean Delvare
    Acked-by: Steffen Klassert
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Eric Dumazet
     
  • commit 4d6144de8ba263eb3691a737c547e5b2fdc45287 upstream.

    If the read or write buffer size associated with the command sent
    through the mmc_blk_ioctl is zero, do not prepare data buffer.

    This enables a ioctl(2) call to for instance send a MMC_SWITCH to set
    a byte in the ext_csd.

    Signed-off-by: Johan Rudholm
    Signed-off-by: Chris Ball
    Signed-off-by: Greg Kroah-Hartman

    Johan Rudholm
     
  • commit 61cddc57dc14a5dffa0921d9a24fd68edbb374ac upstream.

    Currently registers with a value of 0 are ignored when initializing the register
    defaults from raw defaults. This worked in the past, because registers without a
    explicit default were assumed to have a default value of 0. This was changed in
    commit b03622a8 ("regmap: Ensure rbtree syncs registers set to zero properly").
    As a result registers, which have a raw default value of 0 are now assumed to
    have no default. This again can result in unnecessary writes when syncing the
    cache. It will also result in unnecessary reads for e.g. the first update
    operation. In the case where readback is not possible this will even let the
    update operation fail, if the register has not been written to before.

    So this patch removes the check. Instead it adds a check to ignore raw defaults
    for registers which are volatile, since those registers are not cached.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Lars-Peter Clausen
     
  • commit 72ba009b8a159e995e40d3b4e5d7d265acead983 upstream.

    BugLink: http://bugs.launchpad.net/bugs/900802

    Signed-off-by: Till Kamppeter
    Signed-off-by: Tim Gardner
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Tim Gardner
     
  • commit 71f6bd4a23130cd2f4b036010c5790b1295290b9 upstream.

    Fixes PCI device detection on IBM xSeries IBM 3850 M2 / x3950 M2
    when using ACPI resources (_CRS).
    This is default, a manual workaround (without this patch)
    would be pci=nocrs boot param.

    V2: Add dev_warn if the workaround is hit. This should reveal
    how common such setups are (via google) and point to possible
    problems if things are still not working as expected.
    -> Suggested by Jan Beulich.

    Tested-by: garyhade@us.ibm.com
    Signed-off-by: Yinghai Lu
    Signed-off-by: Jesse Barnes
    Signed-off-by: Greg Kroah-Hartman

    Yinghai Lu
     
  • commit b7f5b7dec3d539a84734f2bcb7e53fbb1532a40b upstream.

    MSI_REARM_EN register is a write only trigger register.
    There is no need RMW when re-arming.

    May fix:
    https://bugs.freedesktop.org/show_bug.cgi?id=41668

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie
    Signed-off-by: Greg Kroah-Hartman

    Alex Deucher
     

21 Feb, 2012

12 commits

  • commit f9c2a0dc42a6938ff2a80e55ca2bbd1d5581c72e upstream.

    Current PIO mode makes a kernel crash with CONFIG_HIGHMEM.
    Highmem pages have a NULL from sg_virt(sg).
    This patch fixes the following problem.

    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = c0004000
    [00000000] *pgd=00000000
    Internal error: Oops: 817 [#1] PREEMPT SMP
    Modules linked in:
    CPU: 0 Not tainted (3.0.15-01423-gdbf465f #589)
    PC is at dw_mci_pull_data32+0x4c/0x9c
    LR is at dw_mci_read_data_pio+0x54/0x1f0
    pc : [] lr : [] psr: 20000193
    sp : c0619d48 ip : c0619d70 fp : c0619d6c
    r10: 00000000 r9 : 00000002 r8 : 00001000
    r7 : 00000200 r6 : 00000000 r5 : e1dd3100 r4 : 00000000
    r3 : 65622023 r2 : 0000007f r1 : eeb96000 r0 : e1dd3100
    Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment
    xkernel
    Control: 10c5387d Table: 61e2004a DAC: 00000015
    Process swapper (pid: 0, stack limit = 0xc06182f0)
    Stack: (0xc0619d48 to 0xc061a000)
    9d40: e1dd3100 e1a4f000 00000000 e1dd3100 e1a4f000 00000200
    9d60: c0619da4 c0619d70 c035988c c03587e4 c0619d9c e18158f4 e1dd3100 e1dd3100
    9d80: 00000020 00000000 00000000 00000020 c06e8a84 00000000 c0619e04 c0619da8
    9da0: c0359b24 c0359844 e18158f4 e1dd3164 e1dd3168 e1dd3150 3d02fc79 e1dd3154
    9dc0: e1dd3178 00000000 00000020 00000000 e1dd3150 00000000 c10dd7e8 e1a84900
    9de0: c061e7cc 00000000 00000000 0000008d c06e8a84 c061e780 c0619e4c c0619e08
    9e00: c00c4738 c0359a34 3d02fc79 00000000 c0619e4c c05a1698 c05a1670 c05a165c
    9e20: c04de8b0 c061e780 c061e7cc e1a84900 ffffed68 0000008d c0618000 00000000
    9e40: c0619e6c c0619e50 c00c48b4 c00c46c8 c061e780 c00423ac c061e7cc ffffed68
    9e60: c0619e8c c0619e70 c00c7358 c00c487c 0000008d ffffee38 c0618000 ffffed68
    9e80: c0619ea4 c0619e90 c00c4258 c00c72b0 c00423ac ffffee38 c0619ecc c0619ea8
    9ea0: c004241c c00c4234 ffffffff f8810000 0000006d 00000002 00000001 7fffffff
    9ec0: c0619f44 c0619ed0 c0048bc0 c00423c4 220ae7a9 00000000 386f0d30 0005d3a4
    9ee0: c00423ac c10dd0b8 c06f2cd8 c0618000 c0594778 c003a674 7fffffff c0619f44
    9f00: 386f0d30 c0619f18 c00a6f94 c005be3c 80000013 ffffffff 386f0d30 0005d3a4
    9f20: 386f0d30 0005d2d1 c10dd0a8 c10dd0b8 c06f2cd8 c0618000 c0619f74 c0619f48
    9f40: c0345858 c005be00 c00a2440 c0618000 c0618000 c00410d8 c06c1944 c00410fc
    9f60: c0594778 c003a674 c0619f9c c0619f78 c004a7e8 c03457b4 c0618000 c06c18f8
    9f80: 00000000 c0039c70 c06c18d4 c003a674 c0619fb4 c0619fa0 c04ceafc c004a714
    9fa0: c06287b4 c06c18f8 c0619ff4 c0619fb8 c0008b68 c04cea68 c0008578 00000000
    9fc0: 00000000 c003a674 00000000 10c5387d c0628658 c003aa78 c062f1c4 4000406a
    9fe0: 413fc090 00000000 00000000 c0619ff8 40008044 c0008858 00000000 00000000
    Backtrace:
    [] (dw_mci_pull_data32+0x0/0x9c) from [] (dw_mci_read_data_pio+0x54/0x1f0)
    r6:00000200 r5:e1a4f000 r4:e1dd3100
    [] (dw_mci_read_data_pio+0x0/0x1f0) from [] (dw_mci_interrupt+0xfc/0x4a4)
    [] (dw_mci_interrupt+0x0/0x4a4) from [] (handle_irq_event_percpu+0x7c/0x1b4)
    [] (handle_irq_event_percpu+0x0/0x1b4) from [] (handle_irq_event+0x44/0x64)
    [] (handle_irq_event+0x0/0x64) from [] (handle_fasteoi_irq+0xb4/0x124)
    r7:ffffed68 r6:c061e7cc r5:c00423ac r4:c061e780
    [] (handle_fasteoi_irq+0x0/0x124) from [] (generic_handle_irq+0x30/0x38)
    r7:ffffed68 r6:c0618000 r5:ffffee38 r4:0000008d
    [] (generic_handle_irq+0x0/0x38) from [] (asm_do_IRQ+0x64/0xe0)
    r5:ffffee38 r4:c00423ac
    [] (asm_do_IRQ+0x0/0xe0) from [] (__irq_svc+0x80/0x14c)
    Exception stack(0xc0619ed0 to 0xc0619f18)

    Signed-off-by: Seungwon Jeon
    Acked-by: Will Newton
    Signed-off-by: Chris Ball
    Signed-off-by: Greg Kroah-Hartman

    Seungwon Jeon
     
  • commit 18ee684b8ab666329e0a0a72d8b70f16fb0e2243 upstream.

    Sometimes a software reset is needed. Then some registers are saved and
    restored but the interrupt mask register is missing. It causes issues
    with sdio devices whose interrupts are masked after reset.

    Signed-off-by: Ludovic Desroches
    Signed-off-by: Nicolas Ferre
    Signed-off-by: Chris Ball
    Signed-off-by: Greg Kroah-Hartman

    Ludovic Desroches
     
  • 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

    Nikolaus Schulz
     
  • commit a1728800bed3b93b231d99e97c756f622b9991c2 upstream.

    8
    Date: Wed, 16 Nov 2011 09:33:50 +0100
    Subject: net: enable TC35815 for MIPS again

    TX493[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

    Atsushi Nemoto
     
  • 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

    Nikolaus Schulz
     
  • 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

    Felix Fietkau
     
  • 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

    Felix Fietkau
     
  • 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 running

    while true
    do
    sudo modprobe -v ath9k
    sleep 3
    sudo modprobe -r ath9k
    sleep 3
    done

    EIP: [] __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/0xab

    Cc: 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

    Mohammed Shafi Shajakhan
     
  • 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

    Daniel Vetter
     
  • 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

    Keith Packard
     
  • 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

    Greg Rose
     
  • 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

    Greg Rose
     

14 Feb, 2012

19 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

    Andreas Herrmann
     
  • 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

    Andreas Herrmann
     
  • commit b5266ea675c5a041e2852c7ccec4cf2d4f5e0cf4 upstream.

    Signed-off-by: Axel Lin
    Acked-by: Michał Mirosław
    Signed-off-by: Greg Kroah-Hartman

    Axel Lin
     
  • 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

    Dan Magenheimer
     
  • 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

    Dan Magenheimer
     
  • 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

    Rui li
     
  • commit 90451e6973a5da155c6f315a409ca0a8d3ce6b76 upstream.

    Signed-off-by: Milan Kocian
    Signed-off-by: Greg Kroah-Hartman

    Milan Kocian
     
  • 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

    Jayachandran C
     
  • 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

    Timo Juhani Lindfors
     
  • 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

    Larry Finger
     
  • 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

    Larry Finger
     
  • 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/0x66

    Call 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/0x1b

    This 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

    Pekka Paalanen
     
  • 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 -0500

    Staging: 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

    Pekka Paalanen
     
  • 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

    Roland Dreier
     
  • 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

    Roland Dreier
     
  • 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 0

    This 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.c

    Reported-by: Roland Dreier
    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Greg Kroah-Hartman

    Nicholas Bellinger
     
  • 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 00

    While 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 00

    with 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

    Roland Dreier
     
  • 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

    Marco Sanvido
     
  • 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

    Marco Sanvido