07 Jul, 2007

2 commits

  • In 7d12e780e003f93433d49ce78cfedf4b4c52adc5 David Howells performed
    this evolution:
    "IRQ: Maintain regs pointer globally rather than passing to IRQ handlers"

    He correctly updated many of the function definitions that were using this
    extra regs pointer parameter but forgot to update some caller sites of
    those functions. The reason the modifications was not properly done on all
    drivers is that some drivers were rarely compiled because they are for
    AMIGA, or that some code sites were inside #ifdefs where the option is not
    set or inside #if 0.

    Here is the semantic patch that found the occurences
    and fixed the problem.

    @ rule1 @
    identifier fn;
    identifier irq, dev_id;
    typedef irqreturn_t;
    @@

    static irqreturn_t fn(int irq, void *dev_id)
    {
    ...
    }

    @@
    identifier rule1.fn;
    expression E1, E2, E3;
    @@

    fn(E1, E2
    - ,E3
    )

    Signed-off-by: Yoann Padioleau
    Cc: "David S. Miller"
    Cc: Jeff Garzik
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau
     
  • When we enable the SMCf010 IR device, the Toshiba Portege 4000 BIOS claims
    the device is working, but it really isn't configured correctly. The BIOS
    *will* configure it, but only if we call _SRS after (1) reversing the order
    of the SIR and FIR I/O port regions and (2) changing the IRQ from
    active-high to active-low.

    This patch addresses the 2.6.22 regression:
    "no irda0 interface (2.6.21 was OK), smsc does not find chip"

    I tested this on a Portege 4000. The smsc-ircc2 driver correctly detects
    the device, and "irattach irda0 -s && irdadump" shows transmitted and
    received packets.

    Signed-off-by: Bjorn Helgaas
    Cc: Andrey Borzenkov
    Cc: Samuel Ortiz
    Cc: "Linus Walleij (LD/EAB)"
    Cc: Michal Piotrowski
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

06 Jul, 2007

2 commits


05 Jul, 2007

1 commit

  • Yeah, we could have just disabled it, but there's work on a new one that
    isn't as fundamentally broken, so there really doesn't seem to be any
    point in keeping it around.

    The recent timer cleanup broke the only valid use, and when I say
    "valid", I obviously mean "totally broken". So it's not like it works,
    or really even can work in the current format that uses the unsafe
    "panic" LED blinking routines..

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

04 Jul, 2007

13 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
    ide: ide_scan_pcibus(): check __pci_register_driver return value
    ide: pdc202xx_new PLL input clock fix
    it821x: fix incorrect SWDMA mask
    amd74xx: resume fix
    hpt366: use correct enablebits for HPT36x
    hpt366: blacklist MAXTOR STM3320620A for UltraDMA/66
    ide: Fix a theoretical Ooops case
    ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy

    Linus Torvalds
     
  • drivers/ide/setup-pci.c: In function 'ide_scan_pcibus':
    drivers/ide/setup-pci.c:879: warning: ignoring return value of '__pci_register_driver', declared with attribute warn_unused_result

    Signed-off-by: Andrew Morton
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Andrew Morton
     
  • Recently the PLL input clock of Promise 2027x is sometimes detected
    higher than expected (e.g. 20.027 MHz compared to 16.714 MHz).
    It seems sometimes the mdelay() function is not as precise as it
    used to be. Per Alan's advice, HT or power management might affect
    the precision of mdelay().

    This patch calls gettimeofday() to measure the time elapsed and
    calculate the PLL input clock accordingly.

    Signed-off-by: Albert Lee
    Cc: Alan Cox
    Cc: Bahadir Balban
    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Albert Lee
     
  • SWDMA modes are unsupported by it821x. Attempts to tune SWDMA modes always
    fail (due to sanity check in ->speedproc) and result in PIO being tuned.

    * Fix incorrect SWDMA mask so core code won't try these modes and will just
    tune PIO if no other DMA modes are available.

    * Bump driver version.

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Sergei Shtylyov

    Bartlomiej Zolnierkiewicz
     
  • * Driver can't skip programming transfer mode on the device in amd_set_drive()
    (similar fix has been applied to via82cxxx driver ages ago).

    * While at it remove redundant warning (ide_config_drive_speed() already
    produces more valuable one).

    * Bump driver version.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • The HPT36x chips finally turned out to have the channel enable bits -- however,
    badly implemented. Make use of them despite it's probably only going to burden
    the driver's code -- assuming both channels are always enabled by the HighPoint
    BIOS anyway...

    Signed-off-by: Sergei Shtylyov
    Acked-by: Linas Vepstas
    Cc: michal.kepien@poczta.onet.pl
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • Add the MAXTOR STM3320620A drive into the UltraDMA/66 mode blacklist
    for the HPT36x chips.

    Signed-off-by: Sergei Shtylyov
    Acked-by: Linas Vepstas
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • Found by a static analyser. It is in theory possible we dereference
    dev->id when it has become invalid. Re-order to avoid this.

    Not needed for new-ide as we no longer support the crazy exabyte nest stuff

    Signed-off-by: Alan Cox
    Cc: Andrew Morton
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Alan Cox
     
  • Look at wait_drive_not_busy in drivers/ide/ide-taskfile.c:

    static u8 wait_drive_not_busy(ide_drive_t *drive)
    {
    ide_hwif_t *hwif = HWIF(drive);
    int retries = 100;
    u8 stat;

    /*
    * Last sector was transfered, wait until drive is ready.
    * This can take up to 10 usec, but we will wait max 1 ms
    * (drive_cmd_intr() waits that long).
    */
    while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--)
    udelay(10);

    if (!retries)
    printk(KERN_ERR "%s: drive still BUSY!\n", drive->name);

    return stat;
    }

    `printk' is never called because `retries' never holds zero at the
    outside of `while' loop: when `retries' holds zero at the while's loop
    condition, `retries' will hold -1 at the if condition.

    Signed-off-by: Masatake YAMATO
    Cc: Chuck Ebbert
    Cc: joe@perches.com
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Masatake YAMATO
     
  • if the call to budget_register() fails in ttpci_budget_int(),
    ttpci_budget_init() returns success. The attached patch will
    fix this problem.

    Signed-off-by: Hartmut Birr
    Signed-off-by: Michael Krufky
    Signed-off-by: Mauro Carvalho Chehab

    Hartmut Birr
     
  • Spotted and tested by Thomas Sattler .

    cinergyT2.c does cancel_delayed_work() + flush_scheduled_work() while
    holding cinergyt2->sem. This leads to deadlock because work->func()
    needs the same mutex to complete. Another bug is that this code in fact
    can't reliably stop the re-arming delayed_work.

    Convert this code to use cancel_rearming_delayed_work() and move it
    out of ->sem. Another mutex, ->wq_sem, was added to protect against the
    concurrent open/resume.

    This patch is a horrible hack to fix the lockup which happens in practice.
    As Dmitry Torokhov pointed out this driver has other problems and needs
    further changes.

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Mauro Carvalho Chehab

    Oleg Nesterov
     
  • v4l-info and other programs would loop indefinitely while querying the
    tuners for cx88-blackbird cards.

    The cause was that vidioc_g_tuner didn't return an error value for
    qctrl->id != 0, making the application think there is a never ending
    list of tuners...

    This patch adds the same index check as done in vidioc_g_tuner() in
    cx88-video.

    Signed-off-by: Jelle Foks
    Signed-off-by: Michael Krufky
    Signed-off-by: Mauro Carvalho Chehab

    Jelle Foks
     
  • If one uses a V4L *one* application, such as vlc or mplayer's v4l driver, as
    the first user after the driver is loaded, the driver wedges itself and will
    never capture properly. Even if one uses a V4L2 application later, it still
    won't work.

    If one uses a V4L *two* application first, such as tvtime or mplayer's v4l2
    driver, then the driver will be ok. One can then run a V4L1 application, and
    it will work.

    It turns out the problem is with norm changing and the crop support that was
    added in 2.6.21. The driver defaults to PAL, and keeps the last norm it was
    set too across opens. If one changes the norm via V4L1, the cropping
    parameters are not reset like they should be, and they'll remain broken across
    device opens.

    This patch removes the direct setting of btv->tvnorm in the V4L1 ioctl
    VIDIOCSCHAN handler. The norm is set via the existing call to set_input(),
    which calls set_tvnorm(), which will reset the cropping values now that it is
    able to detect the norm change.

    Signed-off-by: Trent Piepho
    Signed-off-by: Michael Krufky
    Signed-off-by: Mauro Carvalho Chehab

    Trent Piepho
     

03 Jul, 2007

15 commits


02 Jul, 2007

7 commits

  • Russell King wrote:
    > Having upgraded from 2.6.16 to 2.6.22-rc6, I'm now seeing the following.
    >
    > Looks like netfilter is calling local_bh_enable() with IRQs disabled,
    > which would appear to be illegal. Thankfully, this is a warn-once
    > warning.
    >
    > WARNING: at /home/rmk/git/linux-2.6-rmk/kernel/softirq.c:138 local_bh_enable()
    > [...]
    > [] (nf_conntrack_destroy+0x0/0x2c) from [] (__kfree_skb+0xd0/0x100)
    > [] (__kfree_skb+0x0/0x100) from [] (kfree_skb+0x4c/0x50)
    > r5:c12a3800 r4:00000300
    > [] (kfree_skb+0x0/0x50) from [] (el3_start_xmit+0xb8/0xd0 [3c589_cs])
    > [] (el3_start_xmit+0x0/0xd0 [3c589_cs]) from [] (dev_hard_start_xmit+0x1a8/0x244)
    > r7:c12a3800 r6:c1a9aa00 r5:c1a9aa00 r4:c12a3800
    > [] (dev_hard_start_xmit+0x0/0x244) from [] (__qdisc_run+0xb0/0x198)

    Thats a bug in the 3c589_cs driver. Patch attached.

    Signed-off-by: Patrick McHardy
    Signed-off-by: Jeff Garzik

    Patrick McHardy
     
  • Changed PATA handler for PATA-ports used by sata_sis.
    This patch was originally submitted by Jeff Garzik.

    Added PCI-ID 1180 for SiS966 Controller in pata_sis.
    The 1180 mode is fully compatible to other SiS PATA-controller.

    The PCI-ID 1183 is SATA in PATA-emulation, but not fully compatible
    to SiS5513/5518. sata_sis.c is forwarding this ID to pata_sis.
    1183 is not working if simply added to pata_sis.
    This handling fixes issues with SiS968.

    Signed-off-by: Uwe Koziolek
    Signed-off-by: Jeff Garzik

    Uwe Koziolek
     
  • Another member of HTS5416* family doing spurious NCQ completion.

    Signed-off-by: Tejun Heo
    Cc: Enrico Sardi
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • The sata_nv driver was missing the change_queue_depth hook in the SCSI host
    template which the other NCQ-capable libata drivers had. This made it impossible
    to change the queue depth by user request. Add this in.

    Signed-off-by: Robert Hancock
    Signed-off-by: Jeff Garzik

    Robert Hancock
     
  • sata_inic162x can't do LBA48 properly yet and is likely to corrupt
    data on drives larger than LBA28 limit. Disable LBA48 devices during
    device configuration.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • In ata_hsm_qc_complete():
    Calling ata_altstatus() after the qc is completed might race with next qc. Remove it.

    Signed-off-by: Albert Lee
    Signed-off-by: Jeff Garzik

    Albert Lee
     
  • Recently the PLL input clock of pata_pdc2027x is sometimes detected
    higer than expected (e.g. 20.027 MHz compared to 16.714 MHz).
    It seems sometimes the mdelay() function is not as precise as it
    used to be. Per Alan's advice, HT or power management might affect
    the precision of mdelay().

    This patch calls gettimeofday() to mesure the time elapsed and
    calculate the PLL input clock accordingly.

    Signed-off-by: Albert Lee
    Cc: Alan Cox
    Signed-off-by: Jeff Garzik

    Albert Lee