Bugzilla – Attachment 59786 Details for
Bug 136866
IDE crashed on hdparm -U
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
ide-cd.diff
ide-cd.diff (text/plain), 2.08 KB, created by
Hannes Reinecke
on 2005-12-05 09:10:01 UTC
(
hide
)
Description:
ide-cd.diff
Filename:
MIME Type:
Creator:
Hannes Reinecke
Created:
2005-12-05 09:10:01 UTC
Size:
2.08 KB
patch
obsolete
>--- linux-2.6.14.2-20051122115441/drivers/ide/ide-cd.c.orig 2005-10-28 02:02:08.000000000 +0200 >+++ linux-2.6.14.2-20051122115441/drivers/ide/ide-cd.c 2005-12-02 15:11:48.000000000 +0100 >@@ -2081,9 +2081,17 @@ cdrom_lockdoor(ide_drive_t *drive, int l > if (sense == NULL) > sense = &my_sense; > >+ if (!drive->driver_data) { >+ printk (KERN_ERR "%s: no driver_data\n", drive->name); >+ return 0; >+ } >+ > /* If the drive cannot lock the door, just pretend. */ > if (CDROM_CONFIG_FLAGS(drive)->no_doorlock) { > stat = 0; >+ } else if (lockflag == CDROM_STATE_FLAGS(drive)->door_locked) { >+ /* Lock status has not changed */ >+ stat = 0; > } else { > cdrom_prepare_request(drive, &req); > req.sense = sense; >@@ -3270,6 +3278,10 @@ static int ide_cd_remove(struct device * > ide_drive_t *drive = to_ide_device(dev); > struct cdrom_info *info = drive->driver_data; > >+ if (unregister_cdrom(&info->devinfo)) >+ printk(KERN_ERR "%s: %s failed to unregister device from the cdrom " >+ "driver.\n", __FUNCTION__, drive->name); >+ > ide_unregister_subdriver(drive, info->driver); > > del_gendisk(info->disk); >@@ -3286,18 +3298,17 @@ static void ide_cd_release(struct kref * > ide_drive_t *drive = info->drive; > struct gendisk *g = info->disk; > >+ printk(KERN_ERR "%s: release IDE CD-ROM\n", drive->name); >+ > if (info->buffer != NULL) > kfree(info->buffer); > if (info->toc != NULL) > kfree(info->toc); > if (info->changer_info != NULL) > kfree(info->changer_info); >- if (devinfo->handle == drive && unregister_cdrom(devinfo)) >- printk(KERN_ERR "%s: %s failed to unregister device from the cdrom " >- "driver.\n", __FUNCTION__, drive->name); >+ > drive->dsc_overlap = 0; > drive->driver_data = NULL; >- blk_queue_prep_rq(drive->queue, NULL); > g->private_data = NULL; > put_disk(g); > kfree(info); >@@ -3374,6 +3385,10 @@ static int idecd_release(struct inode * > struct cdrom_info *info = ide_cd_g(disk); > ide_drive_t *drive = info->drive; > >+ if (!drive->driver_data) { >+ printk(KERN_ERR "%s: no driver_data, correcting\n", drive->name); >+ drive->driver_data = info; >+ } > cdrom_release (&info->devinfo, file); > drive->usage--; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 136866
:
59784
| 59786