* You can tell if you have a device that supports tagged queueing my
  * cating (eg) /proc/scsi/acornscsi/0 and see if the SCSI revision is reported
  * as '2 TAG'.
- *
- * Also note that CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE is normally set in the config
- * scripts, but disabled here.  Once debugged, remove the #undef, otherwise to debug,
- * comment out the undef.
  */
-#undef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
+
 /*
  * SCSI-II Synchronous transfer support.
  *
                           unsigned int result);
 static int acornscsi_reconnect_finish(AS_Host *host);
 static void acornscsi_dma_cleanup(AS_Host *host);
-static void acornscsi_abortcmd(AS_Host *host, unsigned char tag);
+static void acornscsi_abortcmd(AS_Host *host);
 
 /* ====================================================================================
  * Miscellaneous
 #endif
 
     if (from_queue) {
-#ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
-       /*
-        * tagged queueing - allocate a new tag to this command
-        */
-       if (SCpnt->device->simple_tags) {
-           SCpnt->device->current_tag += 1;
-           if (SCpnt->device->current_tag == 0)
-               SCpnt->device->current_tag = 1;
-           SCpnt->tag = SCpnt->device->current_tag;
-       } else
-#endif
            set_bit(SCpnt->device->id * 8 +
                    (u8)(SCpnt->device->lun & 0x07), host->busyluns);
 
         * the device recognises the attention.
         */
        if (dmac_read(host, DMAC_STATUS) & STATUS_RQ0) {
-           acornscsi_abortcmd(host, host->SCpnt->tag);
+           acornscsi_abortcmd(host);
 
            dmac_write(host, DMAC_TXCNTLO, 0);
            dmac_write(host, DMAC_TXCNTHI, 0);
            acornscsi_sbic_issuecmd(host, CMND_ASSERTATN);
 
        switch (host->scsi.last_message) {
-#ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
-       case HEAD_OF_QUEUE_TAG:
-       case ORDERED_QUEUE_TAG:
-       case SIMPLE_QUEUE_TAG:
-           /*
-            * ANSI standard says: (Section SCSI-2 Rev. 10c Sect 5.6.17)
-            *  If a target does not implement tagged queuing and a queue tag
-            *  message is received, it shall respond with a MESSAGE REJECT
-            *  message and accept the I/O process as if it were untagged.
-            */
-           printk(KERN_NOTICE "scsi%d.%c: disabling tagged queueing\n",
-                   host->host->host_no, acornscsi_target(host));
-           host->SCpnt->device->simple_tags = 0;
-           set_bit(host->SCpnt->device->id * 8 +
-                   (u8)(host->SCpnt->device->lun & 0x7), host->busyluns);
-           break;
-#endif
        case EXTENDED_MESSAGE | (EXTENDED_SDTR << 8):
            /*
             * Target can't handle synchronous transfers
 #if 0
     /* does the device need the current command aborted */
     if (cmd_aborted) {
-       acornscsi_abortcmd(host->SCpnt->tag);
+       acornscsi_abortcmd(host);
        return;
     }
 #endif
 
-#ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
-    if (host->SCpnt->tag) {
-       unsigned int tag_type;
-
-       if (host->SCpnt->cmnd[0] == REQUEST_SENSE ||
-           host->SCpnt->cmnd[0] == TEST_UNIT_READY ||
-           host->SCpnt->cmnd[0] == INQUIRY)
-           tag_type = HEAD_OF_QUEUE_TAG;
-       else
-           tag_type = SIMPLE_QUEUE_TAG;
-       msgqueue_addmsg(&host->scsi.msgs, 2, tag_type, host->SCpnt->tag);
-    }
-#endif
 
 #ifdef CONFIG_SCSI_ACORNSCSI_SYNC
     if (host->device[host->SCpnt->device->id].sync_state == SYNC_NEGOCIATE) {
                "to reconnect with\n",
                host->host->host_no, '0' + target);
        acornscsi_dumplog(host, target);
-       acornscsi_abortcmd(host, 0);
+       acornscsi_abortcmd(host);
        if (host->SCpnt) {
            queue_add_cmd_tail(&host->queues.disconnected, host->SCpnt);
            host->SCpnt = NULL;
        host->scsi.disconnectable = 0;
        if (host->SCpnt->device->id  == host->scsi.reconnected.target &&
            host->SCpnt->device->lun == host->scsi.reconnected.lun &&
-           host->SCpnt->tag         == host->scsi.reconnected.tag) {
+           scsi_cmd_to_tag(host->SCpnt) == host->scsi.reconnected.tag) {
 #if (DEBUG & (DEBUG_QUEUES|DEBUG_DISCON))
            DBG(host->SCpnt, printk("scsi%d.%c: reconnected",
                    host->host->host_no, acornscsi_target(host)));
     }
 
     if (!host->SCpnt)
-       acornscsi_abortcmd(host, host->scsi.reconnected.tag);
+       acornscsi_abortcmd(host);
     else {
        /*
         * Restore data pointer from SAVED pointers.
  * Function: void acornscsi_abortcmd(AS_host *host, unsigned char tag)
  * Purpose : abort a currently executing command
  * Params  : host - host with connected command to abort
- *          tag  - tag to abort
  */
 static
-void acornscsi_abortcmd(AS_Host *host, unsigned char tag)
+void acornscsi_abortcmd(AS_Host *host)
 {
     host->scsi.phase = PHASE_ABORTED;
     sbic_arm_write(host, SBIC_CMND, CMND_ASSERTATN);
 
     msgqueue_flush(&host->scsi.msgs);
-#ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
-    if (tag)
-       msgqueue_addmsg(&host->scsi.msgs, 2, ABORT_TAG, tag);
-    else
-#endif
-       msgqueue_addmsg(&host->scsi.msgs, 1, ABORT);
+    msgqueue_addmsg(&host->scsi.msgs, 1, ABORT);
 }
 
 /* ==========================================================================================
            printk(KERN_ERR "scsi%d.%c: PHASE_CONNECTING, SSR %02X?\n",
                    host->host->host_no, acornscsi_target(host), ssr);
            acornscsi_dumplog(host, host->SCpnt ? host->SCpnt->device->id : 8);
-           acornscsi_abortcmd(host, host->SCpnt->tag);
+           acornscsi_abortcmd(host);
        }
        return INTR_PROCESSING;
 
            printk(KERN_ERR "scsi%d.%c: PHASE_CONNECTED, SSR %02X?\n",
                    host->host->host_no, acornscsi_target(host), ssr);
            acornscsi_dumplog(host, host->SCpnt ? host->SCpnt->device->id : 8);
-           acornscsi_abortcmd(host, host->SCpnt->tag);
+           acornscsi_abortcmd(host);
        }
        return INTR_PROCESSING;
 
        case 0x18:                      /* -> PHASE_DATAOUT                             */
            /* COMMAND -> DATA OUT */
            if (host->scsi.SCp.sent_command != host->SCpnt->cmd_len)
-               acornscsi_abortcmd(host, host->SCpnt->tag);
+               acornscsi_abortcmd(host);
            acornscsi_dma_setup(host, DMA_OUT);
            if (!acornscsi_starttransfer(host))
-               acornscsi_abortcmd(host, host->SCpnt->tag);
+               acornscsi_abortcmd(host);
            host->scsi.phase = PHASE_DATAOUT;
            return INTR_IDLE;
 
        case 0x19:                      /* -> PHASE_DATAIN                              */
            /* COMMAND -> DATA IN */
            if (host->scsi.SCp.sent_command != host->SCpnt->cmd_len)
-               acornscsi_abortcmd(host, host->SCpnt->tag);
+               acornscsi_abortcmd(host);
            acornscsi_dma_setup(host, DMA_IN);
            if (!acornscsi_starttransfer(host))
-               acornscsi_abortcmd(host, host->SCpnt->tag);
+               acornscsi_abortcmd(host);
            host->scsi.phase = PHASE_DATAIN;
            return INTR_IDLE;
 
            /* MESSAGE IN -> DATA OUT */
            acornscsi_dma_setup(host, DMA_OUT);
            if (!acornscsi_starttransfer(host))
-               acornscsi_abortcmd(host, host->SCpnt->tag);
+               acornscsi_abortcmd(host);
            host->scsi.phase = PHASE_DATAOUT;
            return INTR_IDLE;
 
            /* MESSAGE IN -> DATA IN */
            acornscsi_dma_setup(host, DMA_IN);
            if (!acornscsi_starttransfer(host))
-               acornscsi_abortcmd(host, host->SCpnt->tag);
+               acornscsi_abortcmd(host);
            host->scsi.phase = PHASE_DATAIN;
            return INTR_IDLE;
 
        switch (ssr) {
        case 0x19:                      /* -> PHASE_DATAIN                              */
        case 0x89:                      /* -> PHASE_DATAIN                              */
-           acornscsi_abortcmd(host, host->SCpnt->tag);
+           acornscsi_abortcmd(host);
            return INTR_IDLE;
 
        case 0x1b:                      /* -> PHASE_STATUSIN                            */
        switch (ssr) {
        case 0x18:                      /* -> PHASE_DATAOUT                             */
        case 0x88:                      /* -> PHASE_DATAOUT                             */
-           acornscsi_abortcmd(host, host->SCpnt->tag);
+           acornscsi_abortcmd(host);
            return INTR_IDLE;
 
        case 0x1b:                      /* -> PHASE_STATUSIN                            */
     SCpnt->scsi_done = done;
     SCpnt->host_scribble = NULL;
     SCpnt->result = 0;
-    SCpnt->tag = 0;
     SCpnt->SCp.phase = (int)acornscsi_datadirection(SCpnt->cmnd[0]);
     SCpnt->SCp.sent_command = 0;
     SCpnt->SCp.scsi_xferred = 0;
                        break;
 
                default:
-                       acornscsi_abortcmd(host, host->SCpnt->tag);
+                       acornscsi_abortcmd(host);
                        res = res_snooze;
                }
                local_irq_restore(flags);
 #ifdef CONFIG_SCSI_ACORNSCSI_SYNC
     " SYNC"
 #endif
-#ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
-    " TAG"
-#endif
 #if (DEBUG & DEBUG_NO_WRITE)
     " NOWRITE (" __stringify(NO_WRITE) ")"
 #endif
 #ifdef CONFIG_SCSI_ACORNSCSI_SYNC
     " SYNC"
 #endif
-#ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
-    " TAG"
-#endif
 #if (DEBUG & DEBUG_NO_WRITE)
     " NOWRITE (" __stringify(NO_WRITE) ")"
 #endif
        seq_printf(m, "Device/Lun TaggedQ      Sync\n");
        seq_printf(m, "     %d/%llu   ", scd->id, scd->lun);
        if (scd->tagged_supported)
-               seq_printf(m, "%3sabled(%3d) ",
-                            scd->simple_tags ? "en" : "dis",
-                            scd->current_tag);
+               seq_printf(m, "%3sabled ",
+                            scd->simple_tags ? "en" : "dis");
        else
                seq_printf(m, "unsupported  ");