1. 08 10月, 2011 5 次提交
  2. 19 8月, 2011 4 次提交
    • J
      drivers/ata/sata_dwc_460ex.c: add missing kfree · a081da63
      Julia Lawall 提交于
      Currently, error handling code in this function calls the function
      sata_dwc_port_stop, but this function has essentially no effect if hsdevp
      has not been stored in ap, which is the case throughout this function.  The
      only effect is to print a debugging message including ap->print_id.
      
      The code is rewritten to not call sata_dwc_port_stop, but instead to jump
      to a local label that prints the original error message and the print_id
      information.  In the case where hsdevp has been already allocated (but not
      yet stored in ap), this value is freed as well.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @exists@
      local idexpression x;
      statement S,S1;
      expression E;
      identifier fl;
      expression *ptr != NULL;
      @@
      
      x = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      <... when != x
           when != if (...) { <+...kfree(x)...+> }
           when any
           when != true x == NULL
      x->fl
      ...>
      (
      if (x == NULL) S1
      |
      if (...) { ... when != x
                     when forall
      (
       return \(0\|<+...x...+>\|ptr\);
      |
      * return ...;
      )
      }
      )
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      a081da63
    • A
      ata: Add iMX pata support · e39c75cf
      Arnaud Patard (Rtp) 提交于
      Add basic support for pata on iMX. It has been tested only on imx51.
      SDMA support will probably be added later so this version supports only
      PIO.
      
      v2:
        - enable only when needed IORDY
        - use dev_get_drvdata
      v3:
        - add missing clk_put() calls
        - use platform_get_irq()
        - fix resume code to avoid disabling IORDY on resume
      v4:
        - Remove EXPERIMENTAL and switch to depends on ARCH_MXC
        - Use devm_kzalloc()
        - make clock a must-have
        - Use only 1 ioremap
      Signed-off-by: NArnaud Patard <arnaud.patard@rtp-net.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      e39c75cf
    • T
      pata_via: disable ATAPI DMA on AVERATEC 3200 · 6d0e194d
      Tejun Heo 提交于
      On AVERATEC 3200, pata_via causes memory corruption with ATAPI DMA,
      which often leads to random kernel oops.  The cause of the problem is
      not well understood yet and only small subset of machines using the
      controller seem affected.  Blacklist ATAPI DMA on the machine.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=11426Reported-and-tested-by: NJim Bray <jimsantelmo@gmail.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: stable@kernel.org
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      6d0e194d
    • J
      [libata] sata_sil: fix used-uninit warning · ebd1699e
      Jeff Garzik 提交于
      Init 'serror' to silence the following warning:
      
      drivers/ata/sata_sil.c: In function ‘sil_interrupt’:
      drivers/ata/sata_sil.c:453:14: warning: ‘serror’ may be used uninitialized in
      this function [-Wuninitialized]
      
      This is not a 'can never happen' but is nonetheless extremely unlikely.
      The easiest and cleanest warning fix is simply to init the var,
      rather than worry about marking the var uninit-ok.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ebd1699e
  3. 26 7月, 2011 1 次提交
  4. 24 7月, 2011 14 次提交
  5. 17 7月, 2011 1 次提交
  6. 30 6月, 2011 1 次提交
    • L
      ahci: change 'masking port_map' printk to KERN_WARNING level · 49743170
      Linus Torvalds 提交于
      It's not so much an error as a warning about normal Marvell crazines.
      So don't use KERN_ERR that ends up spamming the console even in quiet
      mode, it's not _that_ critical.
      
      Explained by Jeff:
      
       "Long explanation, it's a mess:
      
        Marvell took standard AHCI, and bastardized it to include a weird mode
        whereby PATA devices appear inside the AHCI DMA and interrupt
        infrastructure you're familiar with.
      
        So, PATA devices appear via pata_marvell driver, using basic legacy
        IDE programming interface.  But SATA devices, which might also be
        attached to this chip, either work in under-performing mode or
        simply don't work at all (e.g.  newer 6 Gbps devices or port
        multiplier attachments, NCQ, ...)
      
        On the other hand, 'ahci' driver loads and works with the chip's
        attached SATA devices quite beautifully, but is completely unable to
        drive any attached PATA devices, due to the Marvell-specific
        PATA-under-AHCI interface.
      
        The "masking port_map 0x7 -> 0x3" message is the ahci driver "hiding"
        the PATA port(s) from itself, making sure it will only drive the SATA
        ports it knows how to drive."
      Acked-by: NJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      49743170
  7. 27 6月, 2011 1 次提交
  8. 24 6月, 2011 4 次提交
    • P
      pata_marvell: Add support for 88SE91A0, 88SE91A4 · f920fe1c
      Paweł Drewniak 提交于
      This patch enables support for Marvell IDE PATA controllers found on
      Asus P8P67LE motherboard.
      
      The formatting has been corrected and I also received a report from two
      users of this motherboard that the patch works.
      Signed-off-by: NPaweł Drewniak <czajernia@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      f920fe1c
    • N
      libata/sas: only set FROZEN flag if new EH is supported · 3f1e046a
      Nishanth Aravamudan 提交于
      On 16.06.2011 [08:28:39 -0500], Brian King wrote:
      > On 06/16/2011 02:51 AM, Tejun Heo wrote:
      > > On Wed, Jun 15, 2011 at 04:34:17PM -0700, Nishanth Aravamudan wrote:
      > >>> That looks like the right thing to do. For ipr's usage of
      > >>> libata, we don't have the concept of a port frozen state, so this flag
      > >>> should really never get set. The alternate way to fix this would be to
      > >>> only set ATA_PFLAG_FROZEN in ata_port_alloc if ap->ops->error_handler
      > >>> is not NULL.
      > >>
      > >> It seemed like ipr is as you say, but I wasn't sure if it was
      > >> appropriate to make the change above in the common libata-scis code or
      > >> not. I don't want to break some other device on accident.
      > >>
      > >> Also, I tried your suggestion, but I don't think that can happen in
      > >> ata_port_alloc? ata_port_alloc is allocated ap itself, and it seems like
      > >> ap->ops typically gets set only after ata_port_alloc returns?
      > >
      > > Maybe we can test error_handler in ata_sas_port_start()?
      >
      > Good point. Since libsas is converted to the new eh now, we would need to have
      > this test.
      
      Commit 7b3a24c5 ("ahci: don't enable
      port irq before handler is registered") caused a regression for CD-ROMs
      attached to the IPR SATA bus on Power machines:
      
        ata_port_alloc: ENTER
        ata_port_probe: ata1: bus probe begin
        ata1.00: ata_dev_read_id: ENTER
        ata1.00: failed to IDENTIFY (I/O error, err_mask=0x40)
        ata1.00: ata_dev_read_id: ENTER
        ata1.00: failed to IDENTIFY (I/O error, err_mask=0x40)
        ata1.00: limiting speed to UDMA7:PIO5
        ata1.00: ata_dev_read_id: ENTER
        ata1.00: failed to IDENTIFY (I/O error, err_mask=0x40)
        ata1.00: disabled
        ata_port_probe: ata1: bus probe end
        scsi_alloc_sdev: Allocation failure during SCSI scanning, some SCSI devices might not be configured
      
      The FROZEN flag added in that commit is only cleared by the new EH code,
      which is not used by ipr. Clear this flag in the SAS code if we don't
      support new EH.
      Reported-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NNishanth Aravamudan <nacc@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      3f1e046a
    • T
      libata: apply NOSETXFER horkage to the affected Pioneer drives · cd691876
      Tejun Heo 提交于
      regardless of firmware revision
      
      It's unlikely NOSETXFER works for a revision of drive but doesn't for
      another and pioneer doesn't seem to be fixing firmwares for the
      affected drives.  Apply NOSETXFER to the affected pioneer drives
      regardless of firmware revision.
      
        http://article.gmane.org/gmane.linux.ide/49734Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: fl-00@gmx.de
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      cd691876
    • J
      drivers/ata/sata_dwc_460ex: Fix typo 'corrresponding' · 8618ccd3
      Justin P. Mattock 提交于
      The patch below fixes a typo.
      Signed-off-by: NJustin P. Mattock <justinmattock@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      8618ccd3
  9. 08 6月, 2011 1 次提交
    • T
      libata: fix unexpectedly frozen port after ata_eh_reset() · 8c56cacc
      Tejun Heo 提交于
      To work around controllers which can't properly plug events while
      reset, ata_eh_reset() clears error states and ATA_PFLAG_EH_PENDING
      after reset but before RESET is marked done.  As reset is the final
      recovery action and full verification of devices including onlineness
      and classfication match is done afterwards, this shouldn't lead to
      lost devices or missed hotplug events.
      
      Unfortunately, it forgot to thaw the port when clearing EH_PENDING, so
      if the condition happens after resetting an empty port, the port could
      be left frozen and EH will end without thawing it, making the port
      unresponsive to further hotplug events.
      
      Thaw if the port is frozen after clearing EH_PENDING.  This problem is
      reported by Bruce Stenning in the following thread.
      
       http://thread.gmane.org/gmane.linux.kernel/1123265
      
      stable: I think we should weather this patch a bit longer in -rcX
      	before sending it to -stable.  Please wait at least a month
      	after this patch makes upstream.  Thanks.
      
      -v2: Fixed spelling in the comment per Dave Howorth.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NBruce Stenning <b.stenning@indigovision.com>
      Cc: stable@kernel.org
      Cc: Dave Howorth <dhoworth@mrc-lmb.cam.ac.uk>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      8c56cacc
  10. 20 5月, 2011 5 次提交
  11. 15 5月, 2011 3 次提交