1. 04 Aug, 2013 1 commit
  2. 25 Jul, 2013 1 commit
  3. 16 May, 2013 1 commit
  4. 14 May, 2013 1 commit
  5. 03 Apr, 2013 1 commit
    • Youquan Song's avatar
      ata_piix: Fix DVD not dectected at some Haswell platforms · b55f84e2
      Youquan Song authored
      There is a quirk patch 5e5a4f5d
      "ata_piix: make DVD Drive recognisable on systems with Intel Sandybridge
       chipsets(v2)" fixing the 4 ports IDE controller 32bit PIO mode.
      
      We've hit a problem with DVD not recognized on Haswell Desktop platform which
      includes Lynx Point 2-port SATA controller.
      
      This quirk patch disables 32bit PIO on this controller in IDE mode.
      
      v2: Change spelling error in statememnt pointed by Sergei Shtylyov.
      v3: Change comment statememnt and spliting line over 80 characters pointed by
          Libor Pechacek and also rebase the patch against 3.8-rc7 kernel.
      Tested-by: default avatarLee, Chun-Yi <jlee@suse.com>
      Signed-off-by: default avatarYouquan Song <youquan.song@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      b55f84e2
  6. 04 Mar, 2013 1 commit
  7. 20 Feb, 2013 1 commit
  8. 25 Jan, 2013 1 commit
  9. 03 Jan, 2013 1 commit
    • Greg Kroah-Hartman's avatar
      Drivers: ata: remove __dev* attributes. · 0ec24914
      Greg Kroah-Hartman authored
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Viresh Kumar <viresh.linux@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0ec24914
  10. 03 Dec, 2012 1 commit
  11. 28 Nov, 2012 1 commit
    • Olaf Hering's avatar
      ata_piix: reenable MS Virtual PC guests · d9904344
      Olaf Hering authored
      An earlier commit cd006086 ("ata_piix:
      defer disks to the Hyper-V drivers by default") broke MS Virtual PC
      guests. Hyper-V guests and Virtual PC guests have nearly identical DMI
      info. As a result the driver does currently ignore the emulated hardware
      in Virtual PC guests and defers the handling to hv_blkvsc. Since Virtual
      PC does not offer paravirtualized drivers no disks will be found in the
      guest.
      
      One difference in the DMI info is the product version. This patch adds a
      match for MS Virtual PC 2007 and "unignores" the emulated hardware.
      
      This was reported for openSuSE 12.1 in bugzilla:
      https://bugzilla.novell.com/show_bug.cgi?id=737532
      
      Here is a detailed list of DMI info from example guests:
      
      hwinfo --bios:
      
      virtual pc guest:
      
        System Info: #1
          Manufacturer: "Microsoft Corporation"
          Product: "Virtual Machine"
          Version: "VS2005R2"
          Serial: "3178-9905-1533-4840-9282-0569-59"
          UUID: undefined, but settable
          Wake-up: 0x06 (Power Switch)
        Board Info: #2
          Manufacturer: "Microsoft Corporation"
          Product: "Virtual Machine"
          Version: "5.0"
          Serial: "3178-9905-1533-4840-9282-0569-59"
        Chassis Info: #3
          Manufacturer: "Microsoft Corporation"
          Version: "5.0"
          Serial: "3178-9905-1533-4840-9282-0569-59"
          Asset Tag: "7188-3705-6309-9738-9645-0364-00"
          Type: 0x03 (Desktop)
          Bootup State: 0x03 (Safe)
          Power Supply State: 0x03 (Safe)
          Thermal State: 0x01 (Other)
          Security Status: 0x01 (Other)
      
      win2k8 guest:
      
        System Info: #1
          Manufacturer: "Microsoft Corporation"
          Product: "Virtual Machine"
          Version: "7.0"
          Serial: "9106-3420-9819-5495-1514-2075-48"
          UUID: undefined, but settable
          Wake-up: 0x06 (Power Switch)
        Board Info: #2
          Manufacturer: "Microsoft Corporation"
          Product: "Virtual Machine"
          Version: "7.0"
          Serial: "9106-3420-9819-5495-1514-2075-48"
        Chassis Info: #3
          Manufacturer: "Microsoft Corporation"
          Version: "7.0"
          Serial: "9106-3420-9819-5495-1514-2075-48"
          Asset Tag: "7076-9522-6699-1042-9501-1785-77"
          Type: 0x03 (Desktop)
          Bootup State: 0x03 (Safe)
          Power Supply State: 0x03 (Safe)
          Thermal State: 0x01 (Other)
          Security Status: 0x01 (Other)
      
      win2k12 guest:
      
        System Info: #1
          Manufacturer: "Microsoft Corporation"
          Product: "Virtual Machine"
          Version: "7.0"
          Serial: "8179-1954-0187-0085-3868-2270-14"
          UUID: undefined, but settable
          Wake-up: 0x06 (Power Switch)
        Board Info: #2
          Manufacturer: "Microsoft Corporation"
          Product: "Virtual Machine"
          Version: "7.0"
          Serial: "8179-1954-0187-0085-3868-2270-14"
        Chassis Info: #3
          Manufacturer: "Microsoft Corporation"
          Version: "7.0"
          Serial: "8179-1954-0187-0085-3868-2270-14"
          Asset Tag: "8374-0485-4557-6331-0620-5845-25"
          Type: 0x03 (Desktop)
          Bootup State: 0x03 (Safe)
          Power Supply State: 0x03 (Safe)
          Thermal State: 0x01 (Other)
          Security Status: 0x01 (Other)
      Signed-off-by: default avatarOlaf Hering <olaf@aepfle.de>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      d9904344
  12. 17 Aug, 2012 1 commit
  13. 07 May, 2012 1 commit
  14. 12 Apr, 2012 1 commit
  15. 13 Mar, 2012 1 commit
  16. 18 Jan, 2012 1 commit
  17. 14 Oct, 2011 2 commits
  18. 08 Oct, 2011 1 commit
  19. 23 Jul, 2011 2 commits
    • Joe Perches's avatar
      ata: Add and use ata_print_version_once · 06296a1e
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
      06296a1e
    • Joe Perches's avatar
      ata: Convert dev_printk(KERN_<LEVEL> to dev_<level>( · a44fec1f
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
      a44fec1f
  20. 24 Apr, 2011 1 commit
  21. 31 Mar, 2011 1 commit
  22. 02 Mar, 2011 1 commit
  23. 22 Oct, 2010 3 commits
  24. 10 Sep, 2010 1 commit
  25. 01 Aug, 2010 1 commit
  26. 25 May, 2010 2 commits
    • Tejun Heo's avatar
      libata-sff: separate out BMDMA init · 1c5afdf7
      Tejun Heo authored
      Separate out ata_pci_bmdma_prepare_host() and ata_pci_bmdma_init_one()
      from their SFF counterparts.  SFF ones no longer try to initialize
      BMDMA or set PCI master.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      1c5afdf7
    • Tejun Heo's avatar
      libata-sff: separate out BMDMA irq handler · c3b28894
      Tejun Heo authored
      Separate out BMDMA irq handler from SFF irq handler.  The misnamed
      host_intr() functions are renamed to ata_sff_port_intr() and
      ata_bmdma_port_intr().  Common parts are factored into
      __ata_sff_port_intr() and __ata_sff_interrupt() and used by sff and
      bmdma interrupt routines.
      
      All BMDMA drivers now use ata_bmdma_interrupt() or
      ata_bmdma_port_intr() while all non-BMDMA SFF ones use
      ata_sff_interrupt() or ata_sff_port_intr().
      
      For now, ata_pci_sff_init_one() uses ata_bmdma_interrupt() as it's
      used by both SFF and BMDMA drivers.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      c3b28894
  27. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  28. 16 Mar, 2010 1 commit
  29. 01 Mar, 2010 2 commits
    • Tejun Heo's avatar
      libata: implement spurious irq handling for SFF and apply it to piix · 27943620
      Tejun Heo authored
      Traditional IDE interface sucks in that it doesn't have a reliable IRQ
      pending bit, so if the controller raises IRQ while the driver is
      expecting it not to, the IRQ won't be cleared and eventually the IRQ
      line will be killed by interrupt subsystem.  Some controllers have
      non-standard mechanism to indicate IRQ pending so that this condition
      can be detected and worked around.
      
      This patch adds an optional operation ->sff_irq_check() which will be
      called for each port from the ata_sff_interrupt() if an unexpected
      interrupt is received.  If the operation returns %true,
      ->sff_check_status() and ->sff_irq_clear() will be cleared for the
      port.  Note that this doesn't mark the interrupt as handled so it
      won't prevent IRQ subsystem from killing the IRQ if this mechanism
      fails to clear the spurious IRQ.
      
      This patch also implements ->sff_irq_check() for ata_piix.  Note that
      this adds slight overhead to shared IRQ operation as IRQs which are
      destined for other controllers will trigger extra register accesses to
      check whether IDE interrupt is pending but this solves rare screaming
      IRQ cases and for some curious reason also helps weird BIOS related
      glitch on Samsung n130 as reported in bko#14314.
      
        http://bugzilla.kernel.org/show_bug.cgi?id=14314
      
      * piix_base_ops dropped as suggested by Sergei.
      
      * Spurious IRQ detection doesn't kick in anymore if polling qc is in
        progress.  This provides less protection but some controllers have
        possible data corruption issues if the wrong register is accessed
        while a command is in progress.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarJohannes Stezenbach <js@sig21.net>
      Reported-by: default avatarHans Werner <hwerner4@gmx.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      27943620
    • Seth Heasley's avatar
  30. 12 Jan, 2010 1 commit
  31. 04 Dec, 2009 1 commit
  32. 03 Dec, 2009 1 commit
  33. 01 Sep, 2009 1 commit
    • Bartlomiej Zolnierkiewicz's avatar
      ata_piix: parallel scanning on PATA needs an extra locking · 60c3be38
      Bartlomiej Zolnierkiewicz authored
      Commit log for commit 517d3cc1
      ("[libata] ata_piix: Enable parallel scan") says:
      
          This patch turns on parallel scanning for the ata_piix driver.
          This driver is used on most netbooks (no AHCI for cheap storage it seems).
          The scan is the dominating time factor in the kernel boot for these
          devices; with this flag it gets cut in half for the device I used
          for testing (eeepc).
          Alan took a look at the driver source and concluded that it ought to be safe
          to do for this driver.  Alan has also checked with the hardware team.
      
      and it is all true but once we put all things together additional
      constraints for PATA controllers show up (some hardware registers
      have per-host not per-port atomicity) and we risk misprogramming
      the controller.
      
      I used the following test to check whether the issue is real:
      
        @@ -736,8 +736,20 @@ static void piix_set_piomode(struct ata_
         			(timings[pio][1] << 8);
         	}
         	pci_write_config_word(dev, master_port, master_data);
        -	if (is_slave)
        +	if (is_slave) {
        +		if (ap->port_no == 0) {
        +			u8 tmp = slave_data;
        +
        +			while (slave_data == tmp) {
        +				pci_read_config_byte(dev, slave_port, &tmp);
        +				msleep(50);
        +			}
        +
        +			dev_printk(KERN_ERR, &dev->dev, "PATA parallel scan "
        +				   "race detected\n");
        +		}
         		pci_write_config_byte(dev, slave_port, slave_data);
        +	}
      
         	/* Ensure the UDMA bit is off - it will be turned back on if
         	   UDMA is selected */
      
      and it indeed triggered the error message.
      
      Lets fix all such races by adding an extra locking to ->set_piomode
      and ->set_dmamode methods for PATA controllers.
      
      [ Alan: would be better to take the host lock in libata-core for these
        cases so that we fix all the adapters in one swoop.  "Looks fine as a
        temproary quickfix tho" ]
      
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Acked-by: default avatarAlan Cox <alan@linux.intel.com>
      Cc: Jeff Garzik <jgarzik@redhat.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      60c3be38
  34. 29 Jul, 2009 1 commit