]> err.no Git - linux-2.6/blobdiff - drivers/scsi/scsi_lib.c
[PATCH] parport: add NetMOS 9805 support
[linux-2.6] / drivers / scsi / scsi_lib.c
index 912cea08111957ee20ceffb8b895ea33edb62834..7a91ca3d32a6cb343a8a533368a5956afbea18d6 100644 (file)
@@ -145,11 +145,6 @@ int scsi_queue_insert(struct scsi_cmnd *cmd, int reason)
        else if (reason == SCSI_MLQUEUE_DEVICE_BUSY)
                device->device_blocked = device->max_device_blocked;
 
-       /*
-        * Register the fact that we own the thing for now.
-        */
-       cmd->state = SCSI_STATE_MLQUEUE;
-
        /*
         * Decrement the counters, since these commands are no longer
         * active on the host/device.
@@ -619,8 +614,6 @@ static struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, int gfp_mas
 
        sgp = scsi_sg_pools + cmd->sglist_len;
        sgl = mempool_alloc(sgp->pool, gfp_mask);
-       if (sgl)
-               memset(sgl, 0, sgp->size);
        return sgl;
 }
 
@@ -628,7 +621,7 @@ static void scsi_free_sgtable(struct scatterlist *sgl, int index)
 {
        struct scsi_host_sg_pool *sgp;
 
-       BUG_ON(index > SG_MEMPOOL_NR);
+       BUG_ON(index >= SG_MEMPOOL_NR);
 
        sgp = scsi_sg_pools + index;
        mempool_free(sgl, sgp->pool);