Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114207
b: refs/heads/master
c: e415e49
h: refs/heads/master
i:
  114205: e2e5062
  114203: 2bfd5eb
  114199: 0bebe0b
  114191: fe18580
  114175: d406eed
v: v3
  • Loading branch information
Elias Oltmanns authored and Bartlomiej Zolnierkiewicz committed Oct 13, 2008
1 parent 3a7136f commit a08a7cc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 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: 06b89518fa69fb7243dc98c31f9a9cfa61bfe788
refs/heads/master: e415e495f8294e536e09e6a15fba897cce4c0748
5 changes: 1 addition & 4 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,10 +655,7 @@ int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting,
if (!(setting->flags & DS_SYNC))
return setting->set(drive, arg);

rq = blk_get_request(q, READ, GFP_KERNEL);
if (!rq)
return -ENOMEM;

rq = blk_get_request(q, READ, __GFP_WAIT);
rq->cmd_type = REQ_TYPE_SPECIAL;
rq->cmd_len = 5;
rq->cmd[0] = REQ_DEVSET_EXEC;
Expand Down
20 changes: 15 additions & 5 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,9 +958,9 @@ static void ide_add_drive_to_hwgroup(ide_drive_t *drive)
* - allocate the block device queue
* - link drive into the hwgroup
*/
static void ide_port_setup_devices(ide_hwif_t *hwif)
static int ide_port_setup_devices(ide_hwif_t *hwif)
{
int i;
int i, j = 0;

mutex_lock(&ide_cfg_mtx);
for (i = 0; i < MAX_DRIVES; i++) {
Expand All @@ -972,12 +972,19 @@ static void ide_port_setup_devices(ide_hwif_t *hwif)
if (ide_init_queue(drive)) {
printk(KERN_ERR "ide: failed to init %s\n",
drive->name);
kfree(drive->id);
drive->id = NULL;
drive->dev_flags &= ~IDE_DFLAG_PRESENT;
continue;
}

j++;

ide_add_drive_to_hwgroup(drive);
}
mutex_unlock(&ide_cfg_mtx);

return j;
}

static ide_hwif_t *ide_ports[MAX_HWIFS];
Expand Down Expand Up @@ -1663,10 +1670,13 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d,
continue;
}

j++;

if (hwif->present)
ide_port_setup_devices(hwif);
if (ide_port_setup_devices(hwif) == 0) {
hwif->present = 0;
continue;
}

j++;

ide_acpi_init(hwif);

Expand Down

0 comments on commit a08a7cc

Please sign in to comment.