Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109810199
D48840.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D48840.diff
View Options
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -100,7 +100,6 @@
"\007RETRY_BUSY"
typedef enum {
- CD_FLAG_INVALID = 0x0001,
CD_FLAG_NEW_DISC = 0x0002,
CD_FLAG_DISC_LOCKED = 0x0004,
CD_FLAG_DISC_REMOVABLE = 0x0008,
@@ -376,8 +375,6 @@
*/
xpt_register_async(0, cdasync, periph, periph->path);
- softc->flags |= CD_FLAG_INVALID;
-
/*
* Return all queued I/O with ENXIO.
* XXX Handle any transactions queued to the card
@@ -740,23 +737,15 @@
cdopen(struct disk *dp)
{
struct cam_periph *periph;
- struct cd_softc *softc;
int error;
periph = (struct cam_periph *)dp->d_drv1;
- softc = (struct cd_softc *)periph->softc;
if (cam_periph_acquire(periph) != 0)
return(ENXIO);
cam_periph_lock(periph);
- if (softc->flags & CD_FLAG_INVALID) {
- cam_periph_release_locked(periph);
- cam_periph_unlock(periph);
- return(ENXIO);
- }
-
if ((error = cam_periph_hold(periph, PRIBIO | PCATCH)) != 0) {
cam_periph_release_locked(periph);
cam_periph_unlock(periph);
@@ -861,7 +850,7 @@
/*
* If the device has been made invalid, error out
*/
- if ((softc->flags & CD_FLAG_INVALID)) {
+ if ((periph->flags & CAM_PERIPH_INVALID) != 0) {
cam_periph_unlock(periph);
biofinish(bp, NULL, ENXIO);
return;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 10, 8:11 PM (1 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16478871
Default Alt Text
D48840.diff (1 KB)
Attached To
Mode
D48840: cam/cd: Simplify to remove invalid flag
Attached
Detach File
Event Timeline
Log In to Comment