From: Borislav Petkov <petkovbb@googlemail.com>
To: bzolnier@gmail.com
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
Borislav Petkov <petkovbb@gmail.com>
Subject: [PATCH 1/6] ide-atapi: add a dev_is_idecd-inline
Date: Thu, 4 Dec 2008 07:43:24 +0100 [thread overview]
Message-ID: <1228373010-20249-2-git-send-email-petkovbb@gmail.com> (raw)
In-Reply-To: <1228373010-20249-1-git-send-email-petkovbb@gmail.com>
There should be no functionality change resulting from this patch.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/ide-atapi.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 4e58b9e..33a1534 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -14,6 +14,12 @@
#define debug_log(fmt, args...) do {} while (0)
#endif
+static inline int dev_is_idecd(ide_drive_t *drive)
+{
+ return (drive->media == ide_cdrom || drive->media == ide_optical) &&
+ !(drive->dev_flags & IDE_DFLAG_SCSI);
+}
+
/*
* Check whether we can support a device,
* based on the ATAPI IDENTIFY command results.
@@ -577,7 +583,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
if (scsi)
tf_flags = 0;
- else if (drive->media == ide_cdrom || drive->media == ide_optical)
+ else if (dev_is_idecd(drive))
tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL;
else
tf_flags = IDE_TFLAG_OUT_DEVICE;
--
1.6.0.4
WARNING: multiple messages have this Message-ID (diff)
From: Borislav Petkov <petkovbb@googlemail.com>
To: <bzolnier@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
Borislav Petkov <petkovbb@gmail.com>
Subject: [PATCH 1/6] ide-atapi: add a dev_is_idecd-inline
Date: Thu, 4 Dec 2008 07:43:24 +0100 [thread overview]
Message-ID: <1228373010-20249-2-git-send-email-petkovbb@gmail.com> (raw)
In-Reply-To: <1228373010-20249-1-git-send-email-petkovbb@gmail.com>
There should be no functionality change resulting from this patch.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/ide-atapi.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 4e58b9e..33a1534 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -14,6 +14,12 @@
#define debug_log(fmt, args...) do {} while (0)
#endif
+static inline int dev_is_idecd(ide_drive_t *drive)
+{
+ return (drive->media == ide_cdrom || drive->media == ide_optical) &&
+ !(drive->dev_flags & IDE_DFLAG_SCSI);
+}
+
/*
* Check whether we can support a device,
* based on the ATAPI IDENTIFY command results.
@@ -577,7 +583,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
if (scsi)
tf_flags = 0;
- else if (drive->media == ide_cdrom || drive->media == ide_optical)
+ else if (dev_is_idecd(drive))
tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL;
else
tf_flags = IDE_TFLAG_OUT_DEVICE;
--
1.6.0.4
next prev parent reply other threads:[~2008-12-04 6:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-04 6:43 [PATCH 00/06] ide-atapi: more leftovers Borislav Petkov
2008-12-04 6:43 ` Borislav Petkov
2008-12-04 6:43 ` Borislav Petkov [this message]
2008-12-04 6:43 ` [PATCH 1/6] ide-atapi: add a dev_is_idecd-inline Borislav Petkov
2008-12-04 6:43 ` [PATCH 2/6] ide-atapi: combine drive-specific assignments Borislav Petkov
2008-12-04 6:43 ` Borislav Petkov
2008-12-04 6:43 ` [PATCH 3/6] ide-atapi: accomodate transfer length calculation for ide-cd Borislav Petkov
2008-12-04 6:43 ` Borislav Petkov
2008-12-04 6:43 ` [PATCH 4/6] ide-atapi: setup dma " Borislav Petkov
2008-12-04 6:43 ` Borislav Petkov
2008-12-04 6:43 ` [PATCH 5/6] ide-cd: move cdrom_timer_expiry to ide-atapi.c Borislav Petkov
2008-12-04 6:43 ` Borislav Petkov
2008-12-06 14:51 ` Bartlomiej Zolnierkiewicz
2008-12-06 20:03 ` Borislav Petkov
2008-12-07 13:56 ` Bartlomiej Zolnierkiewicz
2008-12-04 6:43 ` [PATCH 6/6] ide-atapi: teach ide atapi about drive->waiting_for_dma Borislav Petkov
2008-12-04 6:43 ` Borislav Petkov
2008-12-06 14:51 ` [PATCH 00/06] ide-atapi: more leftovers Bartlomiej Zolnierkiewicz
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=1228373010-20249-2-git-send-email-petkovbb@gmail.com \
--to=petkovbb@googlemail.com \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petkovbb@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.