/[linux-patches]/genpatches-2.6/tags/2.6.21-4/2116_libata-remove-spindown-compat.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.21-4/2116_libata-remove-spindown-compat.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 974 - (show annotations) (download)
Thu May 24 23:17:59 2007 UTC (11 years, 4 months ago) by dsd
File size: 3810 byte(s)
2.6.21-4 release
1 From d9aca22cf443f5ed77d15a320abbab055ae4a976 Mon Sep 17 00:00:00 2001
2 From: Tejun Heo <htejun@gmail.com>
3 Date: Thu, 17 May 2007 16:43:26 +0200
4 Subject: [PATCH] libata: remove libata.spindown_compat
5
6 With STANDBYDOWN tracking added, libata.spindown_compat isn't
7 necessary anymore. If userspace shutdown(8) issues STANDBYNOW, libata
8 warns. If userspace shutdown(8) doesn't issue STANDBYNOW, libata does
9 the right thing. Userspace can tell whether kernel supports spindown
10 by testing whether sysfs node manage_start_stop exists as before.
11
12 Signed-off-by: Tejun Heo <htejun@gmail.com>
13 Signed-off-by: Jeff Garzik <jeff@garzik.org>
14 ---
15 Documentation/feature-removal-schedule.txt | 25 ++++++++++++-------------
16 drivers/ata/libata-core.c | 6 ------
17 drivers/ata/libata-scsi.c | 9 ++++-----
18 drivers/ata/libata.h | 1 -
19 4 files changed, 16 insertions(+), 25 deletions(-)
20
21 Index: linux-2.6.21-gentoo-r1/drivers/ata/libata-core.c
22 ===================================================================
23 --- linux-2.6.21-gentoo-r1.orig/drivers/ata/libata-core.c
24 +++ linux-2.6.21-gentoo-r1/drivers/ata/libata-core.c
25 @@ -97,12 +97,6 @@ int libata_noacpi = 1;
26 module_param_named(noacpi, libata_noacpi, int, 0444);
27 MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when set");
28
29 -int ata_spindown_compat = 1;
30 -module_param_named(spindown_compat, ata_spindown_compat, int, 0644);
31 -MODULE_PARM_DESC(spindown_compat, "Enable backward compatible spindown "
32 - "behavior. Will be removed. More info can be found in "
33 - "Documentation/feature-removal-schedule.txt\n");
34 -
35 MODULE_AUTHOR("Jeff Garzik");
36 MODULE_DESCRIPTION("Library module for ATA devices");
37 MODULE_LICENSE("GPL");
38 Index: linux-2.6.21-gentoo-r1/drivers/ata/libata-scsi.c
39 ===================================================================
40 --- linux-2.6.21-gentoo-r1.orig/drivers/ata/libata-scsi.c
41 +++ linux-2.6.21-gentoo-r1/drivers/ata/libata-scsi.c
42 @@ -893,7 +893,7 @@ int ata_scsi_change_queue_depth(struct s
43 return queue_depth;
44 }
45
46 -/* XXX: for ata_spindown_compat */
47 +/* XXX: for spindown warning */
48 static void ata_delayed_done_timerfn(unsigned long arg)
49 {
50 struct scsi_cmnd *scmd = (void *)arg;
51 @@ -901,7 +901,7 @@ static void ata_delayed_done_timerfn(uns
52 scmd->scsi_done(scmd);
53 }
54
55 -/* XXX: for ata_spindown_compat */
56 +/* XXX: for spindown warning */
57 static void ata_delayed_done(struct scsi_cmnd *scmd)
58 {
59 static struct timer_list timer;
60 @@ -966,8 +966,7 @@ static unsigned int ata_scsi_start_stop_
61 * removed. Read Documentation/feature-removal-schedule.txt
62 * for more info.
63 */
64 - if (ata_spindown_compat &&
65 - (qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
66 + if ((qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
67 (system_state == SYSTEM_HALT ||
68 system_state == SYSTEM_POWER_OFF)) {
69 static unsigned long warned = 0;
70 @@ -1395,7 +1394,7 @@ static void ata_scsi_qc_complete(struct
71 }
72 }
73
74 - /* XXX: track spindown state for spindown_compat */
75 + /* XXX: track spindown state for spindown skipping and warning */
76 if (unlikely(qc->tf.command == ATA_CMD_STANDBY ||
77 qc->tf.command == ATA_CMD_STANDBYNOW1))
78 qc->dev->flags |= ATA_DFLAG_SPUNDOWN;
79 Index: linux-2.6.21-gentoo-r1/drivers/ata/libata.h
80 ===================================================================
81 --- linux-2.6.21-gentoo-r1.orig/drivers/ata/libata.h
82 +++ linux-2.6.21-gentoo-r1/drivers/ata/libata.h
83 @@ -57,7 +57,6 @@ extern int atapi_enabled;
84 extern int atapi_dmadir;
85 extern int libata_fua;
86 extern int libata_noacpi;
87 -extern int ata_spindown_compat;
88 extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
89 extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
90 u64 block, u32 n_block, unsigned int tf_flags,

  ViewVC Help
Powered by ViewVC 1.1.20