public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 11/11] ide: push local_irq_{save,restore}() to do_identify()
Date: Sun, 09 Nov 2008 17:23:31 +0100	[thread overview]
Message-ID: <20081109162331.18999.93299.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20081109162219.18999.74912.sendpatchset@localhost.localdomain>

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ide: push local_irq_{save,restore}() to do_identify()

Push local_irq_{save,restore}() from actual_try_to_identify()
to do_identify() and remove no longer needed local_irq_enable().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-probe.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

Index: b/drivers/ide/ide-probe.c
===================================================================
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -116,14 +116,16 @@ static inline void do_identify (ide_driv
 	ide_hwif_t *hwif = HWIF(drive);
 	u16 *id = drive->id;
 	char *m = (char *)&id[ATA_ID_PROD];
+	unsigned long flags;
 	int bswap = 1, is_cfa;
 
+	/* local CPU only; some systems need this */
+	local_irq_save(flags);
 	/* read 512 bytes of id info */
 	hwif->tp_ops->input_data(drive, NULL, id, SECTOR_SIZE);
+	local_irq_restore(flags);
 
 	drive->dev_flags |= IDE_DFLAG_ID_READ;
-
-	local_irq_enable();
 #ifdef DEBUG
 	printk(KERN_INFO "%s: dumping identify data\n", drive->name);
 	ide_dump_identify((u8 *)id);
@@ -305,17 +307,12 @@ static int actual_try_to_identify (ide_d
 	s = tp_ops->read_status(hwif);
 
 	if (OK_STAT(s, ATA_DRQ, BAD_R_STAT)) {
-		unsigned long flags;
-
-		/* local CPU only; some systems need this */
-		local_irq_save(flags);
 		/* drive returned ID */
 		do_identify(drive, cmd);
 		/* drive responded with ID */
 		rc = 0;
 		/* clear drive IRQ */
 		(void)tp_ops->read_status(hwif);
-		local_irq_restore(flags);
 	} else {
 		/* drive refused ID */
 		rc = 2;

  parent reply	other threads:[~2008-11-09 16:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-09 16:22 [PATCH 01/11] ide: respect current DMA setting during resume Bartlomiej Zolnierkiewicz
2008-11-09 16:22 ` [PATCH 02/11] ide: fix build for DEBUG_PM Bartlomiej Zolnierkiewicz
2008-11-09 16:22 ` [PATCH 03/11] ide: remove dead code from drive_is_ready() Bartlomiej Zolnierkiewicz
2008-11-09 17:15   ` Sergei Shtylyov
2008-11-09 16:22 ` [PATCH 04/11] ide: remove redundant code from ide_end_drive_cmd() Bartlomiej Zolnierkiewicz
2008-11-09 16:22 ` [PATCH 05/11] ide: remove inline tags from ide-probe.c Bartlomiej Zolnierkiewicz
2008-11-09 16:22 ` [PATCH 06/11] ide: checkpatch.pl fixes for ide-lib.c Bartlomiej Zolnierkiewicz
2008-11-09 16:23 ` [PATCH 07/11] ide: use ATA_DMA_* defines in ide-dma-sff.c Bartlomiej Zolnierkiewicz
2008-11-09 17:14   ` Sergei Shtylyov
2008-11-09 16:23 ` [PATCH 08/11] ide: move Power Management support to ide-pm.c Bartlomiej Zolnierkiewicz
2008-11-09 16:23 ` [PATCH 09/11] ide: move legacy ISA/VLB ports handling to ide-legacy.c Bartlomiej Zolnierkiewicz
2008-11-09 16:23 ` [PATCH 10/11] ide: remove superfluous local_irq_{save,restore}() from ide_dump_status() Bartlomiej Zolnierkiewicz
2008-11-09 16:23 ` Bartlomiej Zolnierkiewicz [this message]
2008-11-09 17:19   ` [PATCH 11/11] ide: push local_irq_{save,restore}() to do_identify() Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081109162331.18999.93299.sendpatchset@localhost.localdomain \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox