Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133404
b: refs/heads/master
c: 1bd4c1f
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Mar 24, 2009
1 parent c234ca1 commit 7535a67
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 552d3a99bdce8a0d7f9abe3766fb3655ef5757dc
refs/heads/master: 1bd4c1f4fe6607a0253d1318847b618a2a598612
26 changes: 13 additions & 13 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,6 @@ static void do_identify(ide_drive_t *drive, u8 cmd)
drive->dev_flags |= IDE_DFLAG_PRESENT;
drive->dev_flags &= ~IDE_DFLAG_DEAD;

/*
* Check for an ATAPI device
*/
if (cmd == ATA_CMD_ID_ATAPI)
ide_classify_atapi_dev(drive);
else
/*
* Not an ATAPI device: looks like a "regular" hard disk
*/
ide_classify_ata_dev(drive);
return;
err_misc:
kfree(id);
Expand Down Expand Up @@ -480,6 +470,8 @@ static int do_probe (ide_drive_t *drive, u8 cmd)
static u8 probe_for_drive(ide_drive_t *drive)
{
char *m;
int rc;
u8 cmd;

/*
* In order to keep things simple we have an id
Expand All @@ -504,9 +496,13 @@ static u8 probe_for_drive(ide_drive_t *drive)
/* skip probing? */
if ((drive->dev_flags & IDE_DFLAG_NOPROBE) == 0) {
/* if !(success||timed-out) */
if (do_probe(drive, ATA_CMD_ID_ATA) >= 2)
cmd = ATA_CMD_ID_ATA;
rc = do_probe(drive, cmd);
if (rc >= 2) {
/* look for ATAPI device */
(void)do_probe(drive, ATA_CMD_ID_ATAPI);
cmd = ATA_CMD_ID_ATAPI;
rc = do_probe(drive, cmd);
}

if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0)
/* drive not found */
Expand All @@ -525,8 +521,12 @@ static u8 probe_for_drive(ide_drive_t *drive)
printk(KERN_WARNING "%s: Unknown device on bus refused identification. Ignoring.\n", drive->name);
drive->dev_flags &= ~IDE_DFLAG_PRESENT;
}
} else {
if (cmd == ATA_CMD_ID_ATAPI)
ide_classify_atapi_dev(drive);
else
ide_classify_ata_dev(drive);
}
/* drive was found */
}

if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0)
Expand Down

0 comments on commit 7535a67

Please sign in to comment.