Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Nov 2009 10:48:45 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r198981 - stable/8/sys/dev/ata
Message-ID:  <200911061048.nA6AmjMo014017@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Fri Nov  6 10:48:44 2009
New Revision: 198981
URL: http://svn.freebsd.org/changeset/base/198981

Log:
  MFC r198407:
  Do not differentiate 12/16 bytes ATAPI CCB formats when it is not needed.

Modified:
  stable/8/sys/dev/ata/ata-queue.c
  stable/8/sys/dev/ata/atapi-cd.c
  stable/8/sys/dev/ata/atapi-fd.c
  stable/8/sys/dev/ata/atapi-tape.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ata/ata-queue.c
==============================================================================
--- stable/8/sys/dev/ata/ata-queue.c	Fri Nov  6 10:45:37 2009	(r198980)
+++ stable/8/sys/dev/ata/ata-queue.c	Fri Nov  6 10:48:44 2009	(r198981)
@@ -150,15 +150,11 @@ ata_atapicmd(device_t dev, u_int8_t *ccb
 	     int count, int flags, int timeout)
 {
     struct ata_request *request = ata_alloc_request();
-    struct ata_device *atadev = device_get_softc(dev);
     int error = ENOMEM;
 
     if (request) {
 	request->dev = dev;
-	if ((atadev->param.config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_12)
-	    bcopy(ccb, request->u.atapi.ccb, 12);
-	else
-	    bcopy(ccb, request->u.atapi.ccb, 16);
+	bcopy(ccb, request->u.atapi.ccb, 16);
 	request->data = data;
 	request->bytecount = count;
 	request->transfersize = min(request->bytecount, 65534);

Modified: stable/8/sys/dev/ata/atapi-cd.c
==============================================================================
--- stable/8/sys/dev/ata/atapi-cd.c	Fri Nov  6 10:45:37 2009	(r198980)
+++ stable/8/sys/dev/ata/atapi-cd.c	Fri Nov  6 10:48:44 2009	(r198981)
@@ -863,9 +863,7 @@ acd_strategy(struct bio *bp)
     }
     request->dev = dev;
     request->bio = bp;
-    bcopy(ccb, request->u.atapi.ccb,
-	  (atadev->param.config & ATA_PROTO_MASK) == 
-	  ATA_PROTO_ATAPI_12 ? 16 : 12);
+    bcopy(ccb, request->u.atapi.ccb, 16);
     request->data = bp->bio_data;
     request->bytecount = count * blocksize;
     request->transfersize = min(request->bytecount, 65534);

Modified: stable/8/sys/dev/ata/atapi-fd.c
==============================================================================
--- stable/8/sys/dev/ata/atapi-fd.c	Fri Nov  6 10:45:37 2009	(r198980)
+++ stable/8/sys/dev/ata/atapi-fd.c	Fri Nov  6 10:48:44 2009	(r198981)
@@ -240,9 +240,7 @@ afd_strategy(struct bio *bp)
     }
     request->dev = dev;
     request->bio = bp;
-    bcopy(ccb, request->u.atapi.ccb,
-	  (atadev->param.config & ATA_PROTO_MASK) == 
-	  ATA_PROTO_ATAPI_12 ? 16 : 12);
+    bcopy(ccb, request->u.atapi.ccb, 16);
     request->data = bp->bio_data;
     request->bytecount = count * fdp->sectorsize;
     request->transfersize = min(request->bytecount, 65534);

Modified: stable/8/sys/dev/ata/atapi-tape.c
==============================================================================
--- stable/8/sys/dev/ata/atapi-tape.c	Fri Nov  6 10:45:37 2009	(r198980)
+++ stable/8/sys/dev/ata/atapi-tape.c	Fri Nov  6 10:48:44 2009	(r198981)
@@ -373,7 +373,6 @@ static void 
 ast_strategy(struct bio *bp)
 {
     device_t dev = bp->bio_dev->si_drv1;
-    struct ata_device *atadev = device_get_softc(dev);
     struct ast_softc *stp = device_get_ivars(dev);
     struct ata_request *request;
     u_int32_t blkcount;
@@ -426,9 +425,7 @@ ast_strategy(struct bio *bp)
     }
     request->dev = dev;
     request->driver = bp;
-    bcopy(ccb, request->u.atapi.ccb,
-	  (atadev->param.config & ATA_PROTO_MASK) == 
-	  ATA_PROTO_ATAPI_12 ? 16 : 12);
+    bcopy(ccb, request->u.atapi.ccb, 16);
     request->data = bp->bio_data;
     request->bytecount = blkcount * stp->blksize;
     request->transfersize = min(request->bytecount, 65534);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911061048.nA6AmjMo014017>