<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/ide/ide.c, branch linux-2.6.28.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>ide: Implement disk shock protection support (v4)</title>
<updated>2008-10-13T19:39:50+00:00</updated>
<author>
<name>Elias Oltmanns</name>
<email>eo@nebensachen.de</email>
</author>
<published>2008-10-13T19:39:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4abdc6ee7c47a1a6e12f95717e461baeebee5df7'/>
<id>4abdc6ee7c47a1a6e12f95717e461baeebee5df7</id>
<content type='text'>
On user request (through sysfs), the IDLE IMMEDIATE command with UNLOAD
FEATURE as specified in ATA-7 is issued to the device and processing of
the request queue is stopped thereafter until the specified timeout
expires or user space asks to resume normal operation. This is supposed
to prevent the heads of a hard drive from accidentally crashing onto the
platter when a heavy shock is anticipated (like a falling laptop expected
to hit the floor). Port resets are deferred whenever a device on that
port is in the parked state.

v3:
Elias Oltmanns &lt;eo@nebensachen.de&gt; wrote:
[...]
&gt; &gt;&gt; 1. Make sure that no negative value is being passed to
&gt; &gt;&gt;    jiffies_to_msecs() in ide_park_show().
&gt; &gt;&gt; 2. Drop the superfluous variable hwif in ide_special_rq().
&gt; &gt;&gt; 3. Skip initialisation of task and tf in ide_special_rq() if we are not
&gt; &gt;&gt;    handling a (un)park request.
&gt; &gt;
&gt; &gt; Well, #3 should have been done differently because we donn't want to
&gt; &gt; check for REQ_(UN)?PARK_HEADS more often than is necessary.
&gt; 
&gt; While preparing the backport to 2.6.27, it has just occurred to me that
&gt; we need to clear the IDE_DFLAG_PARKED flag in ide_disk_pre_reset()
&gt; because this flag must not be set after *any* sort of access to the
&gt; device.

v4:
Fix a memory leak due to a missing blk_put_request() in
issue_park_cmd(). Additionally, we should plug the queue when enqueueing
the unpark request because there is no guarantee that the park timeout
has not expired by then. Even though the chance for that to happen is
very slim, the request might end up hanging in the queue until the next
I/O operation is queued up. While at it, clean up the code a little:
- make issue_park_cmd() a function of type void since nobody cares for
  the return value anyway;
- use blk_start_queueing() instead of __blk_run_queue() since we don't
  have to worry about recursion;
- remove a superfluous pointer deference in task_no_data_intr().

Signed-off-by: Elias Oltmanns &lt;eo@nebensachen.de&gt;
Cc: Jeff Garzik &lt;jeff@garzik.org&gt;,
Cc: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On user request (through sysfs), the IDLE IMMEDIATE command with UNLOAD
FEATURE as specified in ATA-7 is issued to the device and processing of
the request queue is stopped thereafter until the specified timeout
expires or user space asks to resume normal operation. This is supposed
to prevent the heads of a hard drive from accidentally crashing onto the
platter when a heavy shock is anticipated (like a falling laptop expected
to hit the floor). Port resets are deferred whenever a device on that
port is in the parked state.

v3:
Elias Oltmanns &lt;eo@nebensachen.de&gt; wrote:
[...]
&gt; &gt;&gt; 1. Make sure that no negative value is being passed to
&gt; &gt;&gt;    jiffies_to_msecs() in ide_park_show().
&gt; &gt;&gt; 2. Drop the superfluous variable hwif in ide_special_rq().
&gt; &gt;&gt; 3. Skip initialisation of task and tf in ide_special_rq() if we are not
&gt; &gt;&gt;    handling a (un)park request.
&gt; &gt;
&gt; &gt; Well, #3 should have been done differently because we donn't want to
&gt; &gt; check for REQ_(UN)?PARK_HEADS more often than is necessary.
&gt; 
&gt; While preparing the backport to 2.6.27, it has just occurred to me that
&gt; we need to clear the IDE_DFLAG_PARKED flag in ide_disk_pre_reset()
&gt; because this flag must not be set after *any* sort of access to the
&gt; device.

v4:
Fix a memory leak due to a missing blk_put_request() in
issue_park_cmd(). Additionally, we should plug the queue when enqueueing
the unpark request because there is no guarantee that the park timeout
has not expired by then. Even though the chance for that to happen is
very slim, the request might end up hanging in the queue until the next
I/O operation is queued up. While at it, clean up the code a little:
- make issue_park_cmd() a function of type void since nobody cares for
  the return value anyway;
- use blk_start_queueing() instead of __blk_run_queue() since we don't
  have to worry about recursion;
- remove a superfluous pointer deference in task_no_data_intr().

Signed-off-by: Elias Oltmanns &lt;eo@nebensachen.de&gt;
Cc: Jeff Garzik &lt;jeff@garzik.org&gt;,
Cc: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide: switch to DMA-mapping API part #2</title>
<updated>2008-10-13T19:39:47+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2008-10-13T19:39:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2bbd57cad3d72334c9fcc4e229a5a5b04dc6aebc'/>
<id>2bbd57cad3d72334c9fcc4e229a5a5b04dc6aebc</id>
<content type='text'>
Follow-up to commit 5c05ff68b9a9b40a9be949497e0aa980185565cf
("ide: switch to DMA-mapping API"):

* pci_{alloc,free}_consistent() -&gt; dma_{alloc,free}_coherent()
  in ide_{allocate,release}_dma_engine().

* Add -&gt;prd_max_nents and -&gt;prd_ent_size fields to ide_hwif_t
  (+ set default values in ide_allocate_dma_engine()).

* Make ide_{allocate,release}_dma_engine() available also
  for CONFIG_BLK_DEV_IDEDMA_SFF=n.  Then convert au1xxx-ide.c,
  scc_pata.c and sgiioc4.c to use them.

* Add missing -&gt;init_dma method to scc_pata.

This patch also fixes:
- -&gt;dmatable_cpu leak for au1xxx-ide
- too early realease of -&gt;dmatable_cpu for scc_pata
- wrong amount of -&gt;dmatable_cpu memory being freed for sgiioc4

While at it:
- remove superfluous -&gt;dma_base check from ide_unregister()
- return -ENOMEM on error in ide_release_dma_engine()
- beautify error message in ide_release_dma_engine()

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow-up to commit 5c05ff68b9a9b40a9be949497e0aa980185565cf
("ide: switch to DMA-mapping API"):

* pci_{alloc,free}_consistent() -&gt; dma_{alloc,free}_coherent()
  in ide_{allocate,release}_dma_engine().

* Add -&gt;prd_max_nents and -&gt;prd_ent_size fields to ide_hwif_t
  (+ set default values in ide_allocate_dma_engine()).

* Make ide_{allocate,release}_dma_engine() available also
  for CONFIG_BLK_DEV_IDEDMA_SFF=n.  Then convert au1xxx-ide.c,
  scc_pata.c and sgiioc4.c to use them.

* Add missing -&gt;init_dma method to scc_pata.

This patch also fixes:
- -&gt;dmatable_cpu leak for au1xxx-ide
- too early realease of -&gt;dmatable_cpu for scc_pata
- wrong amount of -&gt;dmatable_cpu memory being freed for sgiioc4

While at it:
- remove superfluous -&gt;dma_base check from ide_unregister()
- return -ENOMEM on error in ide_release_dma_engine()
- beautify error message in ide_release_dma_engine()

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide-disk: move all ioctl handling to ide-disk_ioctl.c</title>
<updated>2008-10-13T19:39:45+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2008-10-13T19:39:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f87904898e91923a91b925078ac933f05076c7fd'/>
<id>f87904898e91923a91b925078ac933f05076c7fd</id>
<content type='text'>
While at it:
- idedisk_ioctl() -&gt; ide_disk_ioctl()

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While at it:
- idedisk_ioctl() -&gt; ide_disk_ioctl()

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide: convert 'pio_mode' device setting to use DS_SYNC flag</title>
<updated>2008-10-13T19:39:40+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2008-10-13T19:39:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6982daf71ca9a0b0c36043315e1968b3cb709b7c'/>
<id>6982daf71ca9a0b0c36043315e1968b3cb709b7c</id>
<content type='text'>
* Convert 'pio_mode' device setting to use DS_SYNC flag.

* Remove unused special_t.b.{set_tune,serviced} and ide_drive_t.tune_req.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Convert 'pio_mode' device setting to use DS_SYNC flag.

* Remove unused special_t.b.{set_tune,serviced} and ide_drive_t.tune_req.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide: remove [ata_]select_t</title>
<updated>2008-10-13T19:39:40+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2008-10-13T19:39:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7f612f272ad8abe82411f368bfacf793b466e1b3'/>
<id>7f612f272ad8abe82411f368bfacf793b466e1b3</id>
<content type='text'>
* Use 'drive-&gt;dn &amp; 1' in ide_init_disk().

* remove [ata_]select_t.

While at it:

* Use ATA_DEVICE_OBS define in ide_port_init_devices_data().

Acked-by: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Use 'drive-&gt;dn &amp; 1' in ide_init_disk().

* remove [ata_]select_t.

While at it:

* Use ATA_DEVICE_OBS define in ide_port_init_devices_data().

Acked-by: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide: use 'drive-&gt;dn &amp; 1' instead of drive-&gt;select.b.unit</title>
<updated>2008-10-13T19:39:40+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2008-10-13T19:39:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=123995b97136cb41fa282f0ed2385f2c8066df96'/>
<id>123995b97136cb41fa282f0ed2385f2c8066df96</id>
<content type='text'>
* Call ide_port_init_devices() in ide_host_register()
  also if 'struct ide_port_info *d' is not available.

* Init drive-&gt;dn in ide_port_init_devices() instead of
  ide_probe_port() so it is valid also in -&gt;init_dev.

* Pass device number to ide_dev_apply_params().

* Use 'drive-&gt;dn &amp; 1' instead of drive-&gt;select.b.unit.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Call ide_port_init_devices() in ide_host_register()
  also if 'struct ide_port_info *d' is not available.

* Init drive-&gt;dn in ide_port_init_devices() instead of
  ide_probe_port() so it is valid also in -&gt;init_dev.

* Pass device number to ide_dev_apply_params().

* Use 'drive-&gt;dn &amp; 1' instead of drive-&gt;select.b.unit.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide: sanitize ide*_pm_* enums</title>
<updated>2008-10-13T19:39:38+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2008-10-13T19:39:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0d346ba0730d84f04022f9f984d3f606f69cef37'/>
<id>0d346ba0730d84f04022f9f984d3f606f69cef37</id>
<content type='text'>
* Move ide*_pm_* enums from ide-io.c to &lt;linux/ide.h&gt;.

* idedisk_pm_* -&gt; ide_pm_*

* ide_pm_state_* -&gt; ide_pm_*

* No need to set ide_pm_* enums to the fixed values.

* Uppercase ide_pm_* enums.

* Fix/update comments.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Move ide*_pm_* enums from ide-io.c to &lt;linux/ide.h&gt;.

* idedisk_pm_* -&gt; ide_pm_*

* ide_pm_state_* -&gt; ide_pm_*

* No need to set ide_pm_* enums to the fixed values.

* Uppercase ide_pm_* enums.

* Fix/update comments.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide: add device flags</title>
<updated>2008-10-13T19:39:36+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2008-10-13T19:39:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=97100fc816badbbc162644cfde7ad39ae9211fb4'/>
<id>97100fc816badbbc162644cfde7ad39ae9211fb4</id>
<content type='text'>
Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields
to IDE_DFLAG_* flags.

While at it:
- IDE_DFLAG_ADDRESSING -&gt; IDE_DFLAG_LBA48
- fixup some comments
- remove needless g-&gt;flags zeroing from ide*_probe()

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields
to IDE_DFLAG_* flags.

While at it:
- IDE_DFLAG_ADDRESSING -&gt; IDE_DFLAG_LBA48
- fixup some comments
- remove needless g-&gt;flags zeroing from ide*_probe()

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide: fix IDE ACPI for slave device-only configurations</title>
<updated>2008-10-13T19:39:35+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2008-10-13T19:39:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1ea1031cf92b8b8bfbe796d8e8d38b68300475d2'/>
<id>1ea1031cf92b8b8bfbe796d8e8d38b68300475d2</id>
<content type='text'>
ACPI _GTM / _PS0 / _STM were not called if only slave device was present.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ACPI _GTM / _PS0 / _STM were not called if only slave device was present.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide: Remove ide_spin_wait_hwgroup() and use special requests instead</title>
<updated>2008-10-10T20:39:40+00:00</updated>
<author>
<name>Elias Oltmanns</name>
<email>eo@nebensachen.de</email>
</author>
<published>2008-10-10T20:39:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=92f1f8fd8040e7b50a67a850a935509bb01201bb'/>
<id>92f1f8fd8040e7b50a67a850a935509bb01201bb</id>
<content type='text'>
Use a special request for serialisation purposes and get rid of the
awkward ide_spin_wait_hwgroup(). This also involves converting the
ide_devset structure so it can be shared by the /proc and the ioctl code.

Signed-off-by: Elias Oltmanns &lt;eo@nebensachen.de&gt;
[bart: use rq-&gt;cmd[] directly]
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use a special request for serialisation purposes and get rid of the
awkward ide_spin_wait_hwgroup(). This also involves converting the
ide_devset structure so it can be shared by the /proc and the ioctl code.

Signed-off-by: Elias Oltmanns &lt;eo@nebensachen.de&gt;
[bart: use rq-&gt;cmd[] directly]
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
