1. 24 7月, 2011 5 次提交
    • T
      libata: leave port thawed after reset failure · 8ea7645c
      Tejun Heo 提交于
      libata EH intentionally left a port frozen if it failed
      ata_eh_reset().  The intention was avoiding continuous loop of resets
      when the controller or attached device is flaky and reporting spurious
      hotplug events.  Once port enters this state, it can be recovered with
      manual rescan, which seemed reasonable.
      
      However, outside of my convoluted test setup, there have been very few
      reports justifying this choice while there have been more cases where
      the automatic freezing of the port after hotplug attempt of a faulty
      device caused confusion and led to unnecessary resets.
      
      This patch changes the behavior so that the port is thawed after reset
      failure.  This change doesn't necessarily solve but makes it easier
      and more intuitive to work around hotplug related problems
      (ie. re-pluggin or power cycling the device) as reported in the
      followings.
      
        https://bugzilla.kernel.org/show_bug.cgi?id=34712
        http://thread.gmane.org/gmane.linux.kernel/1123265/focus=49548Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NReartes Guillermo <rtguille@gmail.com>
      Reported-by: NBruce Stenning <b.stenning@indigovision.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      8ea7645c
    • J
      ata: sata_via: Use dev_dbg · 5b933e63
      Joe Perches 提交于
      Use normal debugging path for dynamic debug capability.
      
      Convert dev_printk(KERN_DEBUG to dev_dbg(
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      5b933e63
    • J
      ata: Add and use ata_print_version_once · 06296a1e
      Joe Perches 提交于
      Use a single mechanism to show driver version.
      Reduces text a tiny bit too.
      
      Remove uses of static int printed_version
      Add and use ata_print_version(const struct device *, const char *ver)
      and ata_print_version_once.
      
      $ size drivers/ata/built-in.*
         text	   data	    bss	    dec	    hex	filename
       544969	  73893	 116584	 735446	  b38d6	drivers/ata/built-in.allyesconfig.ata.o
       543870	  73893	 116592	 734355	  b34ad	drivers/ata/built-in.allyesconfig.print_once.o
       141328	  14689	   4220	 160237	  271ed	drivers/ata/built-in.defconfig.ata.o
       141212	  14689	   4220	 160121	  27179	drivers/ata/built-in.defconfig.print_once.o
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      06296a1e
    • J
      ata: Convert ata_<foo>_printk(KERN_<LEVEL> to ata_<foo>_<level> · a9a79dfe
      Joe Perches 提交于
      Saves text by removing nearly duplicated text format strings by
      creating ata_<foo>_printk functions and printf extension %pV.
      
      ata defconfig size shrinks ~5% (~8KB), allyesconfig ~2.5% (~13KB)
      
      Format string duplication comes from:
      
       #define ata_link_printk(link, lv, fmt, args...) do { \
             if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link)    \
                     printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id,   \
                            (link)->pmp , ##args); \
             else \
                     printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
             } while(0)
      
      Coalesce long formats.
      
      $ size drivers/ata/built-in.*
         text	   data	    bss	    dec	    hex	filename
       544969	  73893	 116584	 735446	  b38d6	drivers/ata/built-in.allyesconfig.ata.o
       558429	  73893	 117864	 750186	  b726a	drivers/ata/built-in.allyesconfig.dev_level.o
       141328	  14689	   4220	 160237	  271ed	drivers/ata/built-in.defconfig.ata.o
       149567	  14689	   4220	 168476	  2921c	drivers/ata/built-in.defconfig.dev_level.o
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      a9a79dfe
    • J
      ata: Convert dev_printk(KERN_<LEVEL> to dev_<level>( · a44fec1f
      Joe Perches 提交于
      Saves a bit of text as the call takes fewer args.
      
      Coalesce a few formats.
      Convert a few bare printks to pr_cont.
      
      $ size drivers/ata/built-in.o*
         text	   data	    bss	    dec	    hex	filename
       558429	  73893	 117864	 750186	  b726a	drivers/ata/built-in.o.allyesconfig.new
       559574	  73893	 117888	 751355	  b76fb	drivers/ata/built-in.o.allyesconfig.old
       149567	  14689	   4220	 168476	  2921c	drivers/ata/built-in.o.defconfig.new
       149851	  14689	   4220	 168760	  29338	drivers/ata/built-in.o.defconfig.old
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      a44fec1f
  2. 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
  3. 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
  4. 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
  5. 20 5月, 2011 5 次提交
  6. 15 5月, 2011 5 次提交
    • I
      pata_at91: SMC settings calculation bugfixes, support for t6z and IORDY · 0144261f
      Igor Plyatov 提交于
      * New code correctly calculates SMC registers values, adjusts calculated
        to admissible ranges, enlarges cycles when required and converts values
        into SMC's format.
      * Support for TDF cycles (ATA t6z) and IORDY line added.
      * Eliminate need in the initial_timing structure.
      * Code cleanup.
      Signed-off-by: NIgor Plyatov <plyatov@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      0144261f
    • J
      libata-sff: prevent irq descriptions for dummy ports · af649a1b
      James Bottomley 提交于
      This is a cosmetic change to prevent libata-sff adding irq
      descriptions to dummy ports, since the information, while largely
      unused, is erroneous.
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      af649a1b
    • J
      pata_cm64x: fix boot crash on parisc · 9281b16c
      James Bottomley 提交于
      The old IDE cmd64x checks the status of the CNTRL register to see if
      the ports are enabled before probing them.  pata_cmd64x doesn't do
      this, which causes a HPMC on parisc when it tries to poke at the
      secondary port because apparently the BAR isn't wired up (and a
      non-responding piece of memory causes a HPMC).
      
      Fix this by porting the CNTRL register port detection logic from IDE
      cmd64x.  In addition, following converns from Alan Cox, add a check to
      see if a mobility electronics bridge is the immediate parent and forgo
      the check if it is (prevents problems on hotplug controllers).
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      9281b16c
    • T
      libata: fix oops when LPM is used with PMP · 5f6f12cc
      Tejun Heo 提交于
      ae01b249 (libata: Implement ATA_FLAG_NO_DIPM and apply it to mcp65)
      added ATA_FLAG_NO_DIPM and made ata_eh_set_lpm() check the flag.
      However, @ap is NULL if @link points to a PMP link and thus the
      unconditional @ap->flags dereference leads to the following oops.
      
        BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
        IP: [<ffffffff813f98e1>] ata_eh_recover+0x9a1/0x1510
        ...
        Pid: 295, comm: scsi_eh_4 Tainted: P            2.6.38.5-core2 #1 System76, Inc. Serval Professional/Serval Professional
        RIP: 0010:[<ffffffff813f98e1>]  [<ffffffff813f98e1>] ata_eh_recover+0x9a1/0x1510
        RSP: 0018:ffff880132defbf0  EFLAGS: 00010246
        RAX: 0000000000000000 RBX: ffff880132f40000 RCX: 0000000000000000
        RDX: ffff88013377c000 RSI: ffff880132f40000 RDI: 0000000000000000
        RBP: ffff880132defce0 R08: ffff88013377dc58 R09: ffff880132defd98
        R10: 0000000000000000 R11: 00000000ffffffff R12: 0000000000000000
        R13: 0000000000000000 R14: ffff88013377c000 R15: 0000000000000000
        FS:  0000000000000000(0000) GS:ffff8800bf700000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
        CR2: 0000000000000018 CR3: 0000000001a03000 CR4: 00000000000406e0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
        Process scsi_eh_4 (pid: 295, threadinfo ffff880132dee000, task ffff880133b416c0)
        Stack:
         0000000000000000 ffff880132defcc0 0000000000000000 ffff880132f42738
         ffffffff813ee8f0 ffffffff813eefe0 ffff880132defd98 ffff88013377f190
         ffffffffa00b3e30 ffffffff813ef030 0000000032defc60 ffff880100000000
        Call Trace:
         [<ffffffff81400867>] sata_pmp_error_handler+0x607/0xc30
         [<ffffffffa00b273f>] ahci_error_handler+0x1f/0x70 [libahci]
         [<ffffffff813faade>] ata_scsi_error+0x5be/0x900
         [<ffffffff813cf724>] scsi_error_handler+0x124/0x650
         [<ffffffff810834b6>] kthread+0x96/0xa0
         [<ffffffff8100cd64>] kernel_thread_helper+0x4/0x10
        Code: 8b 95 70 ff ff ff b8 00 00 00 00 48 3b 9a 10 2e 00 00 48 0f 44 c2 48 89 85 70 ff ff ff 48 8b 8d 70 ff ff ff f6 83 69 02 00 00 01 <48> 8b 41 18 0f 85 48 01 00 00 48 85 c9 74 12 48 8b 51 08 48 83
        RIP  [<ffffffff813f98e1>] ata_eh_recover+0x9a1/0x1510
         RSP <ffff880132defbf0>
        CR2: 0000000000000018
      
      Fix it by testing @link->ap->flags instead.
      
      stable: ATA_FLAG_NO_DIPM was added during 2.6.39 cycle but was
              backported to 2.6.37 and 38.  This is a fix for that and thus
              also applicable to 2.6.37 and 38.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: N"Nathan A. Mourey II" <nmoureyii@ne.rr.com>
      LKML-Reference: <1304555277.2059.2.camel@localhost.localdomain>
      Cc: Connor H <cmdkhh@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      5f6f12cc
    • T
      Revert "libata: ahci_start_engine compliant to AHCI spec" · 22fe9446
      Tejun Heo 提交于
      This reverts commit 270dac35.
      
      The commits causes command timeouts on AC plug/unplug.  It isn't yet
      clear why.  As the commit was for a single rather obscure controller,
      revert the change for now.
      
      The problem was reported and bisected by Gu Rui in bug#34692.
      
       https://bugzilla.kernel.org/show_bug.cgi?id=34692
      
      Also, reported by Rafael and Michael in the following thread.
      
       http://thread.gmane.org/gmane.linux.kernel/1138771Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NGu Rui <chaos.proton@gmail.com>
      Reported-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reported-by: NMichael Leun <lkml20100708@newton.leun.net>
      Cc: Jian Peng <jipeng2005@gmail.com>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      22fe9446
  7. 07 5月, 2011 1 次提交
  8. 06 5月, 2011 1 次提交
  9. 24 4月, 2011 9 次提交
  10. 31 3月, 2011 1 次提交
  11. 29 3月, 2011 1 次提交
  12. 16 3月, 2011 1 次提交
  13. 15 3月, 2011 2 次提交
  14. 14 3月, 2011 3 次提交