summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2003-08-22 16:35:53 +0000
committernjl <njl@FreeBSD.org>2003-08-22 16:35:53 +0000
commitf7301e0c6232b6cd2ab4f50f3a2020bf12277c0c (patch)
tree95b4f6eaa0c53979ec77f3d87b3a30844b156f38 /sys/cam
parent171bbbf23beae1779398b649cb98b0a463d390c3 (diff)
downloadFreeBSD-src-f7301e0c6232b6cd2ab4f50f3a2020bf12277c0c.zip
FreeBSD-src-f7301e0c6232b6cd2ab4f50f3a2020bf12277c0c.tar.gz
Add the DA_Q_NO_PREVENT quirk which keeps da(4) from sending PREVENT/ALLOW
commands. Add a quirk for the Creative Nomad MuVo USB device that uses it as well as NO_SYNCHRONIZE_CACHE. PR: kern/53094 Submitted by: Richard Nyberg <rnyberg@it.su.se> MFC after: 3 days
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_da.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 629f12c..de36121 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -94,7 +94,8 @@ typedef enum {
typedef enum {
DA_Q_NONE = 0x00,
DA_Q_NO_SYNC_CACHE = 0x01,
- DA_Q_NO_6_BYTE = 0x02
+ DA_Q_NO_6_BYTE = 0x02,
+ DA_Q_NO_PREVENT = 0x04
} da_quirks;
typedef enum {
@@ -222,9 +223,7 @@ static struct da_quirk_entry da_quirk_table[] =
/*quirks*/ DA_Q_NO_6_BYTE
},
{
- /*
- * See above.
- */
+ /* See above. */
{T_DIRECT, SIP_MEDIA_FIXED, quantum, "VIKING 2*", "*"},
/*quirks*/ DA_Q_NO_6_BYTE
},
@@ -381,6 +380,14 @@ static struct da_quirk_entry da_quirk_table[] =
{T_DIRECT, SIP_MEDIA_REMOVABLE, "JUNGSOFT", "NEXDISK*", "*"},
/*quirks*/ DA_Q_NO_SYNC_CACHE
},
+ {
+ /*
+ * Creative Nomad MUVO mp3 player (USB)
+ * PR: kern/53094
+ */
+ {T_DIRECT, SIP_MEDIA_REMOVABLE, "CREATIVE", "NOMAD_MUVO", "*"},
+ /*quirks*/ DA_Q_NO_SYNC_CACHE|DA_Q_NO_PREVENT
+ },
};
static disk_strategy_t dastrategy;
@@ -500,7 +507,8 @@ daopen(struct disk *dp)
}
if (error == 0) {
- if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0)
+ if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0 &&
+ (softc->quirks & DA_Q_NO_PREVENT) == 0)
daprevent(periph, PR_PREVENT);
} else {
softc->flags &= ~DA_FLAG_OPEN;
@@ -578,7 +586,8 @@ daclose(struct disk *dp)
}
if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0) {
- daprevent(periph, PR_ALLOW);
+ if ((softc->quirks & DA_Q_NO_PREVENT) == 0)
+ daprevent(periph, PR_ALLOW);
/*
* If we've got removeable media, mark the blocksize as
* unavailable, since it could change when new media is
OpenPOWER on IntegriCloud