login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
December
»
18
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I/O support properly
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Jeff Garzik
Subject:
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I/O support properly
Date: Thursday, December 18, 2008 - 10:08 am
Mario Schwalbe wrote:
quoted text
> This patch fixes ata_id_has_dword_io to return 1 (supported) if > the drive is compliant to ATA2 or newer and evaluates the config > word for older drives. > > Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de> > --- > include/linux/ata.h | 12 ++++++------ > 1 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/include/linux/ata.h b/include/linux/ata.h > index a53318b..d0d6a9c 100644 > --- a/include/linux/ata.h > +++ b/include/linux/ata.h > @@ -700,12 +700,12 @@ static inline int ata_id_has_tpm(const u16 *id) > > static inline int ata_id_has_dword_io(const u16 *id) > { > - /* ATA 8 reuses this flag for "trusted" computing */ > - if (ata_id_major_version(id) > 7) > - return 0; > - if (id[ATA_ID_DWORD_IO] & (1 << 0)) > - return 1; > - return 0; > + /* This flag is defined up to ATA1 and deprecated since then > + (ATA 8 reuses this flag for "trusted" computing). */ > + if (ata_id_major_version(id) <= 1) > + return (id[ATA_ID_DWORD_IO] & (1 << 0)) != 0; > + /* later revision drives support DWORD I/O just fine */ > + return 1;
This seems like a risky assumption... Jeff --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] ide: Fix ata_id_has_dword_io to return DWORD I/O s ...
, Mario Schwalbe
, (Thu Dec 18, 7:18 am)
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I ...
, Jeff Garzik
, (Thu Dec 18, 10:08 am)
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I ...
, Sergei Shtylyov
, (Thu Dec 18, 10:24 am)
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I ...
, Alan Cox
, (Thu Dec 18, 11:10 am)
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I ...
, Bartlomiej Zolnierki ...
, (Thu Dec 18, 1:42 pm)
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I ...
, Alan Cox
, (Thu Dec 18, 3:40 pm)
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I ...
, Bartlomiej Zolnierki ...
, (Thu Dec 18, 4:13 pm)
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I ...
, Alan Cox
, (Fri Dec 19, 3:50 am)
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I ...
, Sergei Shtylyov
, (Fri Dec 19, 4:31 am)
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I ...
, Sergei Shtylyov
, (Fri Dec 19, 4:34 am)
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I ...
, Bartlomiej Zolnierki ...
, (Fri Dec 19, 12:30 pm)
Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I ...
, Alan Cox
, (Fri Dec 19, 5:10 pm)