summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/wd_cd.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>1999-05-11 10:39:27 +0000
committersos <sos@FreeBSD.org>1999-05-11 10:39:27 +0000
commit9a5315b2f67f70d3521e675bb1981d9eef763873 (patch)
tree429c16fb86cb65d36b180e4301a97ac9682b743b /sys/i386/isa/wd_cd.c
parent3bda34bcf93e6cbb374650406bbe969a14f5ab1f (diff)
downloadFreeBSD-src-9a5315b2f67f70d3521e675bb1981d9eef763873.zip
FreeBSD-src-9a5315b2f67f70d3521e675bb1981d9eef763873.tar.gz
Make the driver work on HP8100 and the newer Philips that does not
support the rezero command.
Diffstat (limited to 'sys/i386/isa/wd_cd.c')
-rw-r--r--sys/i386/isa/wd_cd.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/sys/i386/isa/wd_cd.c b/sys/i386/isa/wd_cd.c
index 0e10e20..99333d4 100644
--- a/sys/i386/isa/wd_cd.c
+++ b/sys/i386/isa/wd_cd.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atapi-cd.c,v 1.16 1999/04/28 10:52:16 dt Exp $
+ * $Id: atapi-cd.c,v 1.17 1999/05/07 07:03:23 phk Exp $
*/
#include "wdc.h"
@@ -93,7 +93,6 @@ static void acd_describe(struct acd *);
static int acd_setchan(struct acd *, u_char, u_char, u_char, u_char);
static int acd_eject(struct acd *, int);
static void acd_select_slot(struct acd *);
-static int acd_rezero_unit(struct acd *);
static int acd_open_disk(struct acd *, int);
static int acd_open_track(struct acd *, struct wormio_prepare_track *);
static int acd_close_track(struct acd *);
@@ -411,21 +410,8 @@ acdopen(dev_t dev, int flags, int fmt, struct proc *p)
else
++cdp->refcnt;
- if ((flags & O_NONBLOCK) == 0) {
- if ((flags & FWRITE) != 0) {
- /* read/write */
- if (acd_rezero_unit(cdp)) {
- printf("wcd%d: rezero failed\n", lun);
- return EIO;
- }
- } else {
- /* read only */
- if (acd_read_toc(cdp) != 0) {
- printf("wcd%d: read_toc failed\n", lun);
- /* return EIO; */
- }
- }
- }
+ if (!(flags & O_NONBLOCK) && acd_read_toc(cdp) && !(flags & FWRITE))
+ printf("acd%d: read_toc failed\n", lun);
return 0;
}
@@ -1272,13 +1258,6 @@ acd_select_slot(struct acd *cdp)
}
static int
-acd_rezero_unit(struct acd *cdp)
-{
- return acd_request_wait(cdp, ATAPI_REZERO_UNIT, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0);
-}
-
-static int
acd_open_disk(struct acd *cdp, int test)
{
cdp->next_writeable_lba = 0;
OpenPOWER on IntegriCloud