09 Jan, 2012

14 commits

  • [Patch description from Alan Stern]

    If a child device was runtime-suspended when a system suspend began,
    then there will be nothing to prevent its parent from
    runtime-suspending as soon as it is woken up during the system resume.
    Then when the time comes to resume the child, the resume will fail
    because the parent is already back at low power.

    On the other hand, there are some devices which should remain at low
    power across an entire suspend-resume cycle. The details depend on the
    device and the platform.

    This suggests that the PM core is not the right place to solve the
    problem. One possible solution is for the subsystem or device driver
    to call pm_runtime_get_sync(dev->parent) at the start of the
    system-resume procedure and pm_runtime_put_sync(dev->parent) at the
    end.

    Acked-by: Alan Stern
    Signed-off-by: Lin Ming
    Signed-off-by: Jeff Garzik

    Lin Ming
     
  • Add platform hooks for custom suspend() and resume() functions. The
    generic suspend/resume code in drivers/ata/ahci_platform.c is adapted
    from the PCI version in drivers/ata/ahci.c.

    Signed-off-by: Brian Norris
    Signed-off-by: Jeff Garzik

    Brian Norris
     
  • Commit b3a706014e56b1356e7b275fd25b833c63175bf0 (libata: Add a
    drivers/ide style DMA disable) neglected to remove the line in
    ata_do_set_mode() it has obviously made useless/duplicated. Do this
    now, and make a line added back then wrapped properly...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • CONFIG_OF_IRQ is not available on some platforms and using of_irq_*
    breaks the build. Since resources are already populated in the platform
    device, get the irq from there instead.

    Reported-by: David S. Miller
    Signed-off-by: Rob Herring
    Signed-off-by: Jeff Garzik

    Rob Herring
     
  • This patch converts the drivers in drivers/ata/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Cc: Viresh Kumar
    Cc: Jeff Garzik
    Cc: Arnaud Patard
    Cc: Alessandro Zummo
    Cc: Sylvain Munaut
    Cc: Anton Vorontsov
    Cc: Marek Vasut
    Cc: Florian Fainelli
    Cc: Mark Miesfeld
    Cc: Ashish Kalra
    Cc: Paul Mundt
    Signed-off-by: Axel Lin
    Signed-off-by: Jeff Garzik

    Axel Lin
     
  • * Fix cable detection to also account for the slave device cable bit.

    * Disable UDMA when programming MWDMA in cs5536_set_dmamode().

    * Don't change UDMA settings in cs5536_set_piomode().

    * Add cs5536_program_dtc() helper.

    * Cleanup and uninline cs5536_[read,write]() methods.

    Cc: Martin K. Petersen
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Jeff Garzik

    Bartlomiej Zolnierkiewicz
     
  • atapi_pio_bytes() uses bare numbers for the ATAPI interrupt reason bits despite
    these are #define'd in .

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • Add ata port runtime suspend/resume/idle callbacks.
    Set ->eh_noresume to skip the runtime PM calls on scsi host
    in the error handler to avoid dead lock.

    Acked-by: Tejun Heo
    Signed-off-by: Lin Ming
    Signed-off-by: Jeff Garzik

    Lin Ming
     
  • Change ata_host_request_pm to ata_port_request_pm which performs
    port suspend/resume.

    Add ata port type driver which implements port PM callbacks.

    Signed-off-by: Lin Ming
    Signed-off-by: Jeff Garzik

    Lin Ming
     
  • sd_shutdown is called during reboot/poweroff.
    It may fail if parent device, for example, ata port, was runtime suspended.

    Fix it by checking runtime PM status of sd.
    Exit immediately if sd was runtime suspended already.

    Acked-by: Alan Stern
    Signed-off-by: Lin Ming
    Signed-off-by: Jeff Garzik

    Lin Ming
     
  • The only high-level SCSI driver that currently implements runtime PM is
    sd, and sd treats runtime suspend exactly the same as the SUSPEND and
    HIBERNATE stages of system sleep, but not the same as the FREEZE stage.

    Therefore, when entering the SUSPEND or HIBERNATE stages of system
    sleep, we can skip the callback to the driver if the device is already
    in runtime suspend. When entering the FREEZE stage, however, we should
    first issue a runtime resume. The overhead of doing this is
    negligible, because a suspended drive would be spun up during the THAW
    stage of hibernation anyway.

    Signed-off-by: Lin Ming
    Signed-off-by: Alan Stern
    Signed-off-by: Jeff Garzik

    Lin Ming
     
  • With previous change, now the ata port runtime suspend will happen as:

    disk suspend --> scsi target suspend --> scsi host suspend --> ata port
    suspend

    ata port(parent device) suspend need to schedule scsi EH which will resume
    scsi host(child device). Then the child device resume will in turn make
    parent device resume first. This is kind of recursive.

    This patch adds a new flag Scsi_Host::eh_noresume.
    ata port will set this flag to skip the runtime PM calls on scsi host.

    Acked-by: Alan Stern
    Signed-off-by: Lin Ming
    Signed-off-by: Jeff Garzik

    Lin Ming
     
  • Currently, the device tree of ata port and scsi host looks as below,

    /sys/devices/pci0000:00/0000:00:1f.2 (ahci controller)
    |-- ata1 (ata port)
    |-- host0 (scsi host)
    |-- target0:0:0 (scsi target)
    |-- 0:0:0:0 (disk)

    This patch makes ata port as parent device of scsi host, then it becomes

    /sys/devices/pci0000:00/0000:00:1f.2 (ahci controller)
    |-- ata1 (ata port)
    |-- host0 (scsi host)
    |-- target0:0:0 (scsi target)
    |-- 0:0:0:0 (disk)

    With this change, the ata port runtime PM is easier.
    For example, the ata port runtime suspend will happen as,

    disk suspend --> scsi target suspend --> scsi host suspend --> ata port
    suspend.

    Acked-by: Tejun Heo
    Signed-off-by: Lin Ming
    Signed-off-by: Jeff Garzik

    Lin Ming
     
  • This is another attempt at fixing the same problem that 270dac35c2
    (libata: ahci_start_engine compliant to AHCI spec) tried to solve.
    Unfortunately, 270dac35c2 created regressions for a lot more common
    controllers and got reverted.

    This specific AHCI IP block becomes a brick if the DMA engine is
    started while DRQ is set. It is not possible to avoid the condition
    completely but the most common occurrence is caused by spurious use of
    ahci_start_engine() from ahci_start_port() during init sequence.

    DMA engine is started after both soft and hard resets and
    ahci_start_port() is always followed by resets, so there is no reason
    to start DMA engine from ahci_start_port().

    This patch removes ahci_start_engine() invocation from
    ahci_start_port(). This change makes failure path of
    ahci_port_suspend() leave engine stopped without following resets.
    This is resolved by replacing ahci_start_port() call with
    ata_port_freeze() which forces resets afterwards, which is the better
    behavior anyway.

    Signed-off-by: Tejun Heo
    Reported-by: Brian Norris
    Reported-by: Jian Peng
    Signed-off-by: Jeff Garzik

    Tejun Heo
     

05 Jan, 2012

7 commits

  • Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    fix CAN MAINTAINERS SCM tree type
    mwifiex: fix crash during simultaneous scan and connect
    b43: fix regression in PIO case
    ath9k: Fix kernel panic in AR2427 in AP mode
    CAN MAINTAINERS update
    net: fsl: fec: fix build for mx23-only kernel
    sch_qfq: fix overflow in qfq_update_start()
    Revert "Bluetooth: Increase HCI reset timeout in hci_dev_do_close"

    Linus Torvalds
     
  • bitmap size sanity checks should be done *before* allocating ->s_root;
    there their cleanup on failure would be correct. As it is, we do iput()
    on root inode, but leak the root dentry...

    Signed-off-by: Al Viro
    Acked-by: Josh Boyer
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • This is the temporary simple fix for 3.2, we need more changes in this
    area.

    1. do_signal_stop() assumes that the running untraced thread in the
    stopped thread group is not possible. This was our goal but it is
    not yet achieved: a stopped-but-resumed tracee can clone the running
    thread which can initiate another group-stop.

    Remove WARN_ON_ONCE(!current->ptrace).

    2. A new thread always starts with ->jobctl = 0. If it is auto-attached
    and this group is stopped, __ptrace_unlink() sets JOBCTL_STOP_PENDING
    but JOBCTL_STOP_SIGMASK part is zero, this triggers WANR_ON(!signr)
    in do_jobctl_trap() if another debugger attaches.

    Change __ptrace_unlink() to set the artificial SIGSTOP for report.

    Alternatively we could change ptrace_init_task() to copy signr from
    current, but this means we can copy it for no reason and hide the
    possible similar problems.

    Acked-by: Tejun Heo
    Cc: [3.1]
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Test-case:

    int main(void)
    {
    int pid, status;

    pid = fork();
    if (!pid) {
    for (;;) {
    if (!fork())
    return 0;
    if (waitpid(-1, &status, 0) < 0) {
    printf("ERR!! wait: %m\n");
    return 0;
    }
    }
    }

    assert(ptrace(PTRACE_ATTACH, pid, 0,0) == 0);
    assert(waitpid(-1, NULL, 0) == pid);

    assert(ptrace(PTRACE_SETOPTIONS, pid, 0,
    PTRACE_O_TRACEFORK) == 0);

    do {
    ptrace(PTRACE_CONT, pid, 0, 0);
    pid = waitpid(-1, NULL, 0);
    } while (pid > 0);

    return 1;
    }

    It fails because ->real_parent sees its child in EXIT_DEAD state
    while the tracer is going to change the state back to EXIT_ZOMBIE
    in wait_task_zombie().

    The offending commit is 823b018e which moved the EXIT_DEAD check,
    but in fact we should not blame it. The original code was not
    correct as well because it didn't take ptrace_reparented() into
    account and because we can't really trust ->ptrace.

    This patch adds the additional check to close this particular
    race but it doesn't solve the whole problem. We simply can't
    rely on ->ptrace in this case, it can be cleared if the tracer
    is multithreaded by the exiting ->parent.

    I think we should kill EXIT_DEAD altogether, we should always
    remove the soon-to-be-reaped child from ->children or at least
    we should never do the DEAD->ZOMBIE transition. But this is too
    complex for 3.2.

    Reported-and-tested-by: Denys Vlasenko
    Tested-by: Lukasz Michalik
    Acked-by: Tejun Heo
    Cc: [3.0+]
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • * git://git.samba.org/sfrench/cifs-2.6:
    [CIFS] default ntlmv2 for cifs mount delayed to 3.3
    cifs: fix bad buffer length check in coalesce_t2

    Linus Torvalds
     
  • …wireless into for-davem

    John W. Linville
     

04 Jan, 2012

14 commits

  • This reverts commit 93b2ec0128c431148b216b8f7337c1a52131ef03.

    The call to "schedule_work()" in rtc_initialize_alarm() happens too
    early, and can cause oopses at bootup

    Neil Brown explains why we do it:

    "If you set an alarm in the future, then shutdown and boot again after
    that time, then you will end up with a timer_queue node which is in
    the past.

    When this happens the queue gets stuck. That entry-in-the-past won't
    get removed until and interrupt happens and an interrupt won't happen
    because the RTC only triggers an interrupt when the alarm is "now".

    So you'll find that e.g. "hwclock" will always tell you that
    'select' timed out.

    So we force the interrupt work to happen at the start just in case."

    and has a patch that convert it to do things in-process rather than with
    the worker thread, but right now it's too late to play around with this,
    so we just revert the patch that caused problems for now.

    Reported-by: Sander Eikelenboom
    Requested-by: Konrad Rzeszutek Wilk
    Requested-by: John Stultz
    Cc: Neil Brown
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Turned out the ntlmv2 (default security authentication)
    upgrade was harder to test than expected, and we ran
    out of time to test against Apple and a few other servers
    that we wanted to. Delay upgrade of default security
    from ntlm to ntlmv2 (on mount) to 3.3. Still works
    fine to specify it explicitly via "sec=ntlmv2" so this
    should be fine.

    Acked-by: Jeff Layton
    Signed-off-by: Steve French

    Steve French
     
  • The current check looks to see if the RFC1002 length is larger than
    CIFSMaxBufSize, and fails if it is. The buffer is actually larger than
    that by MAX_CIFS_HDR_SIZE.

    This bug has been around for a long time, but the fact that we used to
    cap the clients MaxBufferSize at the same level as the server tended
    to paper over it. Commit c974befa changed that however and caused this
    bug to bite in more cases.

    Reported-and-Tested-by: Konstantinos Skarlatos
    Tested-by: Shirish Pargaonkar
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • This reverts commit c0afabd3d553c521e003779c127143ffde55a16f.

    It causes failures on Toshiba laptops - instead of disabling the alarm,
    it actually seems to enable it on the affected laptops, resulting in
    (for example) the laptop powering on automatically five minutes after
    shutdown.

    There's a patch for it that appears to work for at least some people,
    but it's too late to play around with this, so revert for now and try
    again in the next merge window.

    See for example

    http://bugs.debian.org/652869

    Reported-and-bisected-by: Andreas Friedrich (Toshiba Tecra)
    Reported-by: Antonio-M. Corbi Bellot (Toshiba Portege R500)
    Reported-by: Marco Santos (Toshiba Portege Z830)
    Reported-by: Christophe Vu-Brugier (Toshiba Portege R830)
    Cc: Jonathan Nieder
    Requested-by: John Stultz
    Cc: stable@kernel.org # for the versions that applied this
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • vfork parent uninterruptibly and unkillably waits for its child to
    exec/exit. This wait is of unbounded length. Ignore such waits
    in the hung_task detector.

    Signed-off-by: Mandeep Singh Baines
    Reported-by: Sasha Levin
    LKML-Reference:
    Cc: Linus Torvalds
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Andrew Morton
    Cc: John Kacur
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Mandeep Singh Baines
     
  • Commit 1e39f384bb01 ("evm: fix build problems") makes the stub version
    of security_old_inode_init_security() return 0 when CONFIG_SECURITY is
    not set.

    But that makes callers such as reiserfs_security_init() assume that
    security_old_inode_init_security() has set name, value, and len
    arguments properly - but security_old_inode_init_security() left them
    uninitialized which then results in interesting failures.

    Revert security_old_inode_init_security() to the old behavior of
    returning EOPNOTSUPP since both callers (reiserfs and ocfs2) handle this
    just fine.

    [ Also fixed the S_PRIVATE(inode) case of the actual non-stub
    security_old_inode_init_security() function to return EOPNOTSUPP
    for the same reason, as pointed out by Mimi Zohar.

    It got incorrectly changed to match the new function in commit
    fb88c2b6cbb1: "evm: fix security/security_old_init_security return
    code". - Linus ]

    Reported-by: Jorge Bastos
    Acked-by: James Morris
    Acked-by: Mimi Zohar
    Signed-off-by: Jan Kara
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • As pointed out by Joe Perches the SCM tree type was missing in my patch.

    Signed-off-by: Oliver Hartkopp

    CC: Oliver Hartkopp
    CC: Urs Thuermann
    CC: Wolfgang Grandegger
    CC: Marc Kleine-Budde
    CC: linux-can@vger.kernel.org

    Oliver Hartkopp
     
  • If 'iw connect' command is fired when driver is already busy in
    serving 'iw scan' command, ssid specific scan operation for connect
    is skipped. In this case cmd wait queue handler gets called with no
    command in queue (i.e. adapter->cmd_queued = NULL).

    This patch adds a NULL check in mwifiex_wait_queue_complete()
    routine to fix crash observed during simultaneous scan and assoc
    operations.

    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Bing Zhao
    Signed-off-by: John W. Linville

    Amitkumar Karwar
     
  • This patch fixes the regression, introduced by

    commit 17030f48e31adde5b043741c91ba143f5f7db0fd
    From: Rafał Miłecki
    Date: Thu, 11 Aug 2011 17:16:27 +0200
    Subject: [PATCH] b43: support new RX header, noticed to be used in 598.314+ fw

    in PIO case.

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: John W. Linville

    Guennadi Liakhovetski
     
  • don't do aggregation related stuff for 'AP mode client power save
    handling' if aggregation is not enabled in the driver, otherwise it
    will lead to panic because those data structures won't be never
    intialized in 'ath_tx_node_init' if aggregation is disabled

    EIP is at ath_tx_aggr_wakeup+0x37/0x80 [ath9k]
    EAX: e8c09a20 EBX: f2a304e8 ECX: 00000001 EDX: 00000000
    ESI: e8c085e0 EDI: f2a304ac EBP: f40e1ca4 ESP: f40e1c8c
    DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
    Process swapper/1 (pid: 0, ti=f40e0000 task=f408e860
    task.ti=f40dc000)
    Stack:
    0001e966 e8c09a20 00000000 f2a304ac e8c085e0 f2a304ac
    f40e1cb0 f8186741
    f8186700 f40e1d2c f922988d f2a304ac 00000202 00000001
    c0b4ba43 00000000
    0000000f e8eb75c0 e8c085e0 205b0001 34383220 f2a304ac
    f2a30000 00010020
    Call Trace:
    [] ath9k_sta_notify+0x41/0x50 [ath9k]
    [] ? ath9k_get_survey+0x110/0x110 [ath9k]
    [] ieee80211_sta_ps_deliver_wakeup+0x9d/0x350
    [mac80211]
    [] ? __module_address+0x95/0xb0
    [] ap_sta_ps_end+0x63/0xa0 [mac80211]
    [] ieee80211_rx_h_sta_process+0x156/0x2b0
    [mac80211]
    [] ieee80211_rx_handlers+0xce/0x510 [mac80211]
    [] ? trace_hardirqs_on+0xb/0x10
    [] ? skb_queue_tail+0x3e/0x50
    [] ieee80211_prepare_and_rx_handle+0x111/0x750
    [mac80211]
    [] ieee80211_rx+0x349/0xb20 [mac80211]
    [] ? ieee80211_rx+0x99/0xb20 [mac80211]
    [] ath_rx_tasklet+0x818/0x1d00 [ath9k]
    [] ? ath9k_tasklet+0x35/0x1c0 [ath9k]
    [] ? ath9k_tasklet+0x35/0x1c0 [ath9k]
    [] ath9k_tasklet+0xf3/0x1c0 [ath9k]
    [] tasklet_action+0xbe/0x180

    Cc: stable@kernel.org
    Cc: Senthil Balasubramanian
    Cc: Rajkumar Manoharan
    Reported-by: Ashwin Mendonca
    Tested-by: Ashwin Mendonca
    Signed-off-by: Mohammed Shafi Shajakhan
    Signed-off-by: John W. Linville

    Mohammed Shafi Shajakhan
     
  • John W. Linville
     
  • Update the CAN MAINTAINERS section:

    - point out active maintainers
    - pull the CAN driver discussion away from netdev ML
    - point to the new CAN web site on gitorious.org
    - add CAN development git repository URL to submit patches

    Signed-off-by: Oliver Hartkopp

    CC: Oliver Hartkopp
    CC: Urs Thuermann
    CC: Wolfgang Grandegger
    CC: Marc Kleine-Budde
    CC: linux-can@vger.kernel.org
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     
  • If one only selects mx23-based boards, compile fails:

    drivers/net/ethernet/freescale/fec.c:410:2: error: 'FEC_HASH_TABLE_HIGH' undeclared (first use in this function)
    drivers/net/ethernet/freescale/fec.c:411:2: error: 'FEC_HASH_TABLE_LOW' undeclared (first use in this function)

    This is because fec.h uses CONFIG_SOC_IMX28 to determine the register
    layout of the core which makes sense since the MX23 does not have a fec.
    However, Kconfig uses the broader ARCH_MXS symbol and this way even
    makes the fec-driver default for MX23. Adapt Kconfig to use the more
    precise SOC_IMX28 as well.

    Signed-off-by: Wolfram Sang
    Cc: Fabio Estevam
    Cc: Uwe Kleine-König
    Cc: Shawn Guo
    Cc: David S. Miller
    Acked-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Wolfram Sang
     
  • grp->slot_shift is between 22 and 41, so using 32bit wide variables is
    probably a typo.

    This could explain QFQ hangs Dave reported to me, after 2^23 packets ?

    (23 = 64 - 41)

    Reported-by: Dave Taht
    Signed-off-by: Eric Dumazet
    CC: Stephen Hemminger
    CC: Dave Taht
    Signed-off-by: David S. Miller

    Eric Dumazet
     

03 Jan, 2012

2 commits


02 Jan, 2012

1 commit


01 Jan, 2012

2 commits