<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/ide/ide.c, branch v3.4.33</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/ide/ide.c?h=v3.4.33</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/ide/ide.c?h=v3.4.33'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-08-11T13:34:39Z</updated>
<entry>
<title>ide: use module_param_named rather than module_param_call</title>
<updated>2010-08-11T13:34:39Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2010-08-12T05:04:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1a8bff5b404909436fcf03cac167a76ceaaa5547'/>
<id>urn:sha1:1a8bff5b404909436fcf03cac167a76ceaaa5547</id>
<content type='text'>
It has the additional benefit of typechecking (in this case, an unsigned int).

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Reviewed-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
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 -&gt; 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 &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>ide: preserve Host Protected Area by default (v2)</title>
<updated>2009-06-07T11:52:52Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-06-07T11:52:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=075affcbe01d4d7cefcd0e30a98df1253bcf8d92'/>
<id>urn:sha1:075affcbe01d4d7cefcd0e30a98df1253bcf8d92</id>
<content type='text'>
From the perspective of most users of recent systems, disabling Host
Protected Area (HPA) can break vendor RAID formats, GPT partitions and
risks corrupting firmware or overwriting vendor system recovery tools.

Unfortunately the original (kernels &lt; 2.6.30) behavior (unconditionally
disabling HPA and using full disk capacity) was introduced at the time
when the main use of HPA was to make the drive look small enough for the
BIOS to allow the system to boot with large capacity drives.

Thus to allow the maximum compatibility with the existing setups (using
HPA and partitioned with HPA disabled) we automically disable HPA if
any partitions overlapping HPA are detected.  Additionally HPA can also
be disabled using the "nohpa" module parameter (i.e. "ide_core.nohpa=0.0"
to disable HPA on /dev/hda).

v2:
Fix -&gt;resume HPA support.

While at it:
- remove stale "idebus=" entry from Documentation/kernel-parameters.txt

Cc: Robert Hancock &lt;hancockrwd@gmail.com&gt;
Cc: Frans Pop &lt;elendil@planet.nl&gt;
Cc: "Andries E. Brouwer" &lt;Andries.Brouwer@cwi.nl&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Acked-by: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
[patch description was based on input from Alan Cox and Frans Pop]
Emphatically-Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide: move device settings code to ide-devsets.c</title>
<updated>2009-03-24T22:22:44Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-03-24T22:22:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=11938c929022bb92b1a42f5e1289524a1e465dc0'/>
<id>urn:sha1:11938c929022bb92b1a42f5e1289524a1e465dc0</id>
<content type='text'>
Remove stale comment from ide.c while at it.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide: sanitize ACPI initialization</title>
<updated>2009-03-24T22:22:41Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-03-24T22:22:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8b803bd184e3f6892284d4b50801b9ec85cd9b96'/>
<id>urn:sha1:8b803bd184e3f6892284d4b50801b9ec85cd9b96</id>
<content type='text'>
* ide_acpi_init() -&gt; ide_acpi_init_port()

* ide_acpi_blacklist() -&gt; ide_acpi_init()

* Call ide_acpi_init() only once (do it during IDE core
  initialization) and cleanup the function accordingly.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide: ide.c 'clear' fix, update "ide=nodma" documentation</title>
<updated>2009-02-25T19:28:21Z</updated>
<author>
<name>David Fries</name>
<email>david@fries.net</email>
</author>
<published>2009-02-25T19:28:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0af80c04e2f2e45ae09fceb17df8050f828a5c40'/>
<id>urn:sha1:0af80c04e2f2e45ae09fceb17df8050f828a5c40</id>
<content type='text'>
Documentation/kernel-parameters.txt
- ide=nodma is no longer valid.

drivers/ide/Kconfig
- The module is ide-core.ko not ide.

drivers/ide/ide.c
- It took me a while to figure out what the arguments %d.%d:%d to nodma
  module parameter ment, so I added a comment to each.
- Added a comment to each of the sscanf lines.
- There is a bug, if j is 0 it would previously clear all the other bits
  except the current device, changed in three different places.
  mask &amp;= (1 &lt;&lt; i) should be mask &amp;= ~(1 &lt;&lt; i).

Signed-off-by: David Fries &lt;david@fries.net&gt;
[bart: s/disk/device/ in ide.c, beautify patch description]
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide: add port and host iterators</title>
<updated>2009-01-06T16:20:56Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-01-06T16:20:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2bd24a1cfc99d242c2cff9a6b74ca49fcaac3fb6'/>
<id>urn:sha1:2bd24a1cfc99d242c2cff9a6b74ca49fcaac3fb6</id>
<content type='text'>
Add ide_port_for_each_dev() / ide_host_for_each_port() iterators
and update IDE code to use them.

While at it:
- s/unit/i/ variable in ide_port_wait_ready(), ide_probe_port(),
  ide_port_tune_devices(), ide_port_init_devices_data(), do_reset1(),
  ide_acpi_set_state() and scc_dma_end()
- s/d/i/ variable in ide_proc_port_register_devices()

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide: dynamic allocation of device structures</title>
<updated>2009-01-06T16:20:56Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-01-06T16:20:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5e7f3a46690f7f6c9f2781c700ab4370874aa0e8'/>
<id>urn:sha1:5e7f3a46690f7f6c9f2781c700ab4370874aa0e8</id>
<content type='text'>
Allocate device structures dynamically instead of having them embedded
in ide_hwif_t:

* Remove needless zeroing of port structure from ide_init_port_data().

* Add ide_hwif_t.devices[MAX_DRIVES] (table of pointers to the devices).

* Add ide_port_{alloc,free}_devices() helpers and use them respectively
  in ide_{host,free}_alloc().

* Convert all users of -&gt;drives[] to use -&gt;devices[] instead.

While at it:

* Use drive-&gt;dn for the slave device check in scc_pata.c.

As a nice side-effect this patch cuts ~1kB (x86-32) from the resulting
code size:

   text    data     bss     dec     hex filename
  53963    1244     237   55444    d894 drivers/ide/ide-core.o.before
  52981    1244     237   54462    d4be drivers/ide/ide-core.o.after

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide: remove ide_driver_t typedef</title>
<updated>2009-01-06T16:20:53Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-01-06T16:20:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7f3c868ba78e486bd9d7569f884dd46d8f59bb18'/>
<id>urn:sha1:7f3c868ba78e486bd9d7569f884dd46d8f59bb18</id>
<content type='text'>
While at it:
- s/struct ide_driver_s/struct ide_driver/
- use to_ide_driver() macro in ide-proc.c

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide: move ide_init_port_data() and friends to ide-probe.c</title>
<updated>2009-01-06T16:20:51Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-01-06T16:20:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b40d1b88f1001f0224c63fa2c008914514bcef33'/>
<id>urn:sha1:b40d1b88f1001f0224c63fa2c008914514bcef33</id>
<content type='text'>
* Move IDE_DEFAULT_MAX_FAILURES to &lt;linux/ide.h&gt;.

* Move ide_cfg_mtx, ide_hwif_to_major[], ide_port_init_devices_data(),
  ide_init_port_data(), ide_init_port_hw() and ide_unregister() to
  ide-probe.c from ide.c.

* Make ide_unregister(), ide_init_port_data(), ide_init_port_hw()
  and ide_cfg_mtx static.

While at it:

* Remove stale ide_init_port_data() documentation and ide_lock extern.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
</feed>
