Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116304
b: refs/heads/master
c: ae9f9f0
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 17, 2008
1 parent 1283962 commit 6265eb4
Show file tree
Hide file tree
Showing 3 changed files with 13 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: 81ee1bb51fff76aaa738668b92406b5117f125ed
refs/heads/master: ae9f9f073963c56dcc4601ed9a0921eda1e8fa9d
18 changes: 10 additions & 8 deletions trunk/drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,14 @@ static void idedisk_setup(ide_drive_t *drive)
drive->dev_flags |= IDE_DFLAG_WCACHE;

set_wcache(drive, 1);

if ((drive->dev_flags & IDE_DFLAG_LBA) == 0 &&
(drive->head == 0 || drive->head > 16)) {
printk(KERN_ERR "%s: invalid geometry: %d physical heads?\n",
drive->name, drive->head);
drive->dev_flags &= ~IDE_DFLAG_ATTACH;
} else
drive->dev_flags |= IDE_DFLAG_ATTACH;
}

static void ide_cacheflush_p(ide_drive_t *drive)
Expand Down Expand Up @@ -957,20 +965,14 @@ static int ide_disk_probe(ide_drive_t *drive)
drive->driver_data = idkp;

idedisk_setup(drive);
if ((drive->dev_flags & IDE_DFLAG_LBA) == 0 &&
(drive->head == 0 || drive->head > 16)) {
printk(KERN_ERR "%s: INVALID GEOMETRY: %d PHYSICAL HEADS?\n",
drive->name, drive->head);
drive->dev_flags &= ~IDE_DFLAG_ATTACH;
} else
drive->dev_flags |= IDE_DFLAG_ATTACH;

set_capacity(g, ide_disk_capacity(drive));

g->minors = IDE_DISK_MINORS;
g->driverfs_dev = &drive->gendev;
g->flags |= GENHD_FL_EXT_DEVT;
if (drive->dev_flags & IDE_DFLAG_REMOVABLE)
g->flags = GENHD_FL_REMOVABLE;
set_capacity(g, ide_disk_capacity(drive));
g->fops = &idedisk_ops;
add_disk(g);
return 0;
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,8 @@ static void idefloppy_setup(ide_drive_t *drive, idefloppy_floppy_t *floppy)
(void) ide_floppy_get_capacity(drive);

ide_proc_register_driver(drive, floppy->driver);

drive->dev_flags |= IDE_DFLAG_ATTACH;
}

static void ide_floppy_remove(ide_drive_t *drive)
Expand Down Expand Up @@ -807,7 +809,6 @@ static int ide_floppy_probe(ide_drive_t *drive)
drive->debug_mask = debug_mask;

idefloppy_setup(drive, floppy);
drive->dev_flags |= IDE_DFLAG_ATTACH;

g->minors = 1 << PARTN_BITS;
g->driverfs_dev = &drive->gendev;
Expand Down

0 comments on commit 6265eb4

Please sign in to comment.