mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
ide: ide_dev_is_sata() -> ata_id_is_sata()
* Use optimized ATA version check from Sergei in ata_id_is_sata(). * ide_dev_is_sata() -> ata_id_is_sata() Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
5d5870f0a2
commit
367d7e78dd
4 changed files with 12 additions and 17 deletions
|
@ -1382,19 +1382,6 @@ const char *ide_xfer_verbose(u8 mode);
|
|||
extern void ide_toggle_bounce(ide_drive_t *drive, int on);
|
||||
extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
|
||||
|
||||
static inline int ide_dev_is_sata(u16 *id)
|
||||
{
|
||||
/*
|
||||
* See if word 93 is 0 AND drive is at least ATA-5 compatible
|
||||
* verifying that word 80 by casting it to a signed type --
|
||||
* this trick allows us to filter out the reserved values of
|
||||
* 0x0000 and 0xffff along with the earlier ATA revisions...
|
||||
*/
|
||||
if (id[ATA_ID_HW_CONFIG] == 0 && (short)id[ATA_ID_MAJOR_VER] >= 0x0020)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
u64 ide_get_lba_addr(struct ide_taskfile *, int);
|
||||
u8 ide_dump_status(ide_drive_t *, const char *, u8);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue