Commit Graph

22 Commits

Author SHA1 Message Date
Greg Kroah-Hartman fe31edc8a3 Drivers: ide: remove __dev* attributes.
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,
__devinitconst, 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: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-03 15:57:03 -08:00
Andi Kleen e6b53703b9 sections: fix section conflicts in drivers/ide
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-06 03:04:41 +09:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Yann Dirson 2a800b7bd9 via82cxxx: fix typo for VT6415 PCIE PATA IDE Host Controller support.
Without this fix, init of the via82cxxx driver causes a oops with a
stack resembling the one below, and the boot blocks between init of
USB devices and launch of init (was easy to bisect by booting with
init=/bin/sh).

 Pid: 279, comm: work_for_cpu Not tainted 2.6.34.1-00003-ga42ea77 #2
 Call Trace:
  [<ffffffff81045691>] ? warn_slowpath_common+0x76/0x8c
  [<ffffffff810456f9>] ? warn_slowpath_fmt+0x40/0x45
  [<ffffffff812eb5a1>] ? printk+0x40/0x47
  [<ffffffff8108e1fd>] ? enable_irq+0x3e/0x64
  [<ffffffffa0003900>] ? ide_probe_port+0x55c/0x589 [ide_core]
  [<ffffffffa0003f22>] ? ide_host_register+0x273/0x628 [ide_core]
  [<ffffffffa00083e3>] ? ide_pci_init_two+0x4da/0x5c5 [ide_core]
  [<ffffffff8106117e>] ? up+0xe/0x36
  [<ffffffff81045d7e>] ? release_console_sem+0x17e/0x1ae
  [<ffffffff812d945b>] ? klist_iter_exit+0x14/0x1e
  [<ffffffff8120ed23>] ? bus_find_device+0x75/0x83
  [<ffffffffa0022832>] ? via_init_one+0x269/0x28a [via82cxxx]
  [<ffffffffa00223a2>] ? init_chipset_via82cxxx+0x0/0x1ea [via82cxxx]
  [<ffffffff81059f25>] ? do_work_for_cpu+0x0/0x1b
  [<ffffffff81190c65>] ? local_pci_probe+0x12/0x16
  [<ffffffff81059f30>] ? do_work_for_cpu+0xb/0x1b
  [<ffffffff8105d0dd>] ? kthread+0x75/0x7d
  [<ffffffff810097e4>] ? kernel_thread_helper+0x4/0x10
  [<ffffffff8105d068>] ? kthread+0x0/0x7d
  [<ffffffff810097e0>] ? kernel_thread_helper+0x0/0x10
 ---[ end trace 89c8cb70379b5bda ]---

The typo was introduced in a354ae8747,
and affects 2.6.33-rc4 and later.

Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-09 03:17:51 -07:00
Tejun Heo 5a0e3ad6af 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: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
David S. Miller e4afb29fa3 Revert "via82cxxx: workaround h/w bugs"
This reverts commit f931a5d578.

It causes regressions for some users.

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27 07:55:58 -07:00
Bartlomiej Zolnierkiewicz f0e5f62d92 via82cxxx: use ->pio_mode value to determine pair device speed
Use the current PIO mode value instead of the current transfer speed
of the pair device on the port to determine PIO commmand timings used
for both devices on the port.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-19 01:52:36 -08:00
Bartlomiej Zolnierkiewicz 8776168ca2 ide: change ->set_dma_mode method parameters
Change ->set_dma_mode method parameters to match ->set_dmamode method
used in struct ata_port_operations.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2010-01-19 01:45:29 -08:00
Bartlomiej Zolnierkiewicz e085b3cae8 ide: change ->set_pio_mode method parameters
Change ->set_pio_mode method parameters to match ->set_piomode method
used in struct ata_port_operations.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-19 01:44:41 -08:00
Bartlomiej Zolnierkiewicz 68d0a03616 via82cxxx: fix UDMA settings programming
* preserve 80-wire cable detection bit
* don't clear UDMA settings when programming PIO/MWDMA modes

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-19 01:42:00 -08:00
Bartlomiej Zolnierkiewicz a354ae8747 via82cxxx: add support for VT6415 PCIE PATA IDE Host Controller
Based on commits 5955c7a and 7d948b1 for pata_via host driver.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-19 01:41:59 -08:00
Bartlomiej Zolnierkiewicz 5b6c82ea0f via82cxxx: add support for vt8261 and future chips
Based on commit e4d866c for pata_via host driver.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-19 01:41:59 -08:00
Bartlomiej Zolnierkiewicz f931a5d578 via82cxxx: workaround h/w bugs
Add custom struct ide_tp_ops instance to fix the internal bug of some VIA
chipsets which will reset the device register after changing the nIEN bit
in the device control register.

Based on commit bfce5e0 for pata_via host driver.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-19 01:41:58 -08:00
Bartlomiej Zolnierkiewicz a13e4865fa via82cxxx: fix SATA cable detection
Add VIA_SATA_PATA flag for cx700, vx800 and vx855 chipsets
(the first port is SATA).

Based on commits 7585eb1, bfce5e0 and e4d866c for pata_via
host driver.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-19 01:41:58 -08:00
Bartlomiej Zolnierkiewicz 42036c85a6 via82cxxx: vx855 is a single channel controller
Based on commit e4d866c for pata_via host driver
(PCI ID was later changed by commit 5993856).

Update my credits while at it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-19 01:25:02 -08:00
Harald Welte 5993856e53 via82cxxx: Add VIA VX855 PCI Device ID
This patch adds the PCI Device ID 0xc409 to the PCI ID table of via82cxxx.c,
as well as the 0x8409 south bridge ID.

This is required to make the IDE driver work on the VX855/VX875 integrated
chipset.

Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Bruce Chang <BruceChang@via.com.tw>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-05-22 16:23:39 +02:00
Bartlomiej Zolnierkiewicz 2ed0ef543a ide: fix ->init_chipset method to return 'int' value
* Return 0 instead of dev->irq in ->init_chipset implementations.

* Fix ->init_chipset method to return 'int' value instead of
  'unsigned int' one.

This fixes ->init_chipset handling for host drivers (cs5530, hpt366
and pdc202xx_new) for which it is possible for this method to fail.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:53 +01:00
Bartlomiej Zolnierkiewicz 2467922a56 ide: remove no longer needed IDE_HFLAG[_FORCE]_LEGACY_IRQS
There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:52 +01:00
Gerhard Pircher 9f6514c1c5 ide: Force VIA IDE legacy interrupts for AmigaOne boards
The AmigaOne uses the onboard VIA IDE controller in legacy mode (like the
Pegasos).

Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
Cc: "Grant Likely" <grant.likely@secretlab.ca>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-02-02 20:12:22 +01:00
Bartlomiej Zolnierkiewicz 4180e8334c via82cxxx: fix cable warning message
Remove reference to the removed old-style kernel parameter.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-14 19:19:03 +01:00
Bartlomiej Zolnierkiewicz 898ec223fe ide: remove HWIF() macro
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06 17:20:52 +01:00
Bartlomiej Zolnierkiewicz 2bfba3c444 ide: remove useless subdirs from drivers/ide/
Suggested-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-21 20:57:23 +02:00