5252 * You can tell if you have a device that supports tagged queueing my
5353 * cating (eg) /proc/scsi/acornscsi/0 and see if the SCSI revision is reported
5454 * as '2 TAG'.
55- *
56- * Also note that CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE is normally set in the config
57- * scripts, but disabled here. Once debugged, remove the #undef, otherwise to debug,
58- * comment out the undef.
5955 */
60- #undef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
56+
6157/*
6258 * SCSI-II Synchronous transfer support.
6359 *
@@ -171,7 +167,7 @@ static void acornscsi_done(AS_Host *host, struct scsi_cmnd **SCpntp,
171167 unsigned int result );
172168static int acornscsi_reconnect_finish (AS_Host * host );
173169static void acornscsi_dma_cleanup (AS_Host * host );
174- static void acornscsi_abortcmd (AS_Host * host , unsigned char tag );
170+ static void acornscsi_abortcmd (AS_Host * host );
175171
176172/* ====================================================================================
177173 * Miscellaneous
@@ -741,17 +737,6 @@ intr_ret_t acornscsi_kick(AS_Host *host)
741737#endif
742738
743739 if (from_queue ) {
744- #ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
745- /*
746- * tagged queueing - allocate a new tag to this command
747- */
748- if (SCpnt -> device -> simple_tags ) {
749- SCpnt -> device -> current_tag += 1 ;
750- if (SCpnt -> device -> current_tag == 0 )
751- SCpnt -> device -> current_tag = 1 ;
752- SCpnt -> tag = SCpnt -> device -> current_tag ;
753- } else
754- #endif
755740 set_bit (SCpnt -> device -> id * 8 +
756741 (u8 )(SCpnt -> device -> lun & 0x07 ), host -> busyluns );
757742
@@ -1192,7 +1177,7 @@ void acornscsi_dma_intr(AS_Host *host)
11921177 * the device recognises the attention.
11931178 */
11941179 if (dmac_read (host , DMAC_STATUS ) & STATUS_RQ0 ) {
1195- acornscsi_abortcmd (host , host -> SCpnt -> tag );
1180+ acornscsi_abortcmd (host );
11961181
11971182 dmac_write (host , DMAC_TXCNTLO , 0 );
11981183 dmac_write (host , DMAC_TXCNTHI , 0 );
@@ -1560,23 +1545,6 @@ void acornscsi_message(AS_Host *host)
15601545 acornscsi_sbic_issuecmd (host , CMND_ASSERTATN );
15611546
15621547 switch (host -> scsi .last_message ) {
1563- #ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
1564- case HEAD_OF_QUEUE_TAG :
1565- case ORDERED_QUEUE_TAG :
1566- case SIMPLE_QUEUE_TAG :
1567- /*
1568- * ANSI standard says: (Section SCSI-2 Rev. 10c Sect 5.6.17)
1569- * If a target does not implement tagged queuing and a queue tag
1570- * message is received, it shall respond with a MESSAGE REJECT
1571- * message and accept the I/O process as if it were untagged.
1572- */
1573- printk (KERN_NOTICE "scsi%d.%c: disabling tagged queueing\n" ,
1574- host -> host -> host_no , acornscsi_target (host ));
1575- host -> SCpnt -> device -> simple_tags = 0 ;
1576- set_bit (host -> SCpnt -> device -> id * 8 +
1577- (u8 )(host -> SCpnt -> device -> lun & 0x7 ), host -> busyluns );
1578- break ;
1579- #endif
15801548 case EXTENDED_MESSAGE | (EXTENDED_SDTR << 8 ):
15811549 /*
15821550 * Target can't handle synchronous transfers
@@ -1687,24 +1655,11 @@ void acornscsi_buildmessages(AS_Host *host)
16871655#if 0
16881656 /* does the device need the current command aborted */
16891657 if (cmd_aborted ) {
1690- acornscsi_abortcmd (host -> SCpnt -> tag );
1658+ acornscsi_abortcmd (host );
16911659 return ;
16921660 }
16931661#endif
16941662
1695- #ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
1696- if (host -> SCpnt -> tag ) {
1697- unsigned int tag_type ;
1698-
1699- if (host -> SCpnt -> cmnd [0 ] == REQUEST_SENSE ||
1700- host -> SCpnt -> cmnd [0 ] == TEST_UNIT_READY ||
1701- host -> SCpnt -> cmnd [0 ] == INQUIRY )
1702- tag_type = HEAD_OF_QUEUE_TAG ;
1703- else
1704- tag_type = SIMPLE_QUEUE_TAG ;
1705- msgqueue_addmsg (& host -> scsi .msgs , 2 , tag_type , host -> SCpnt -> tag );
1706- }
1707- #endif
17081663
17091664#ifdef CONFIG_SCSI_ACORNSCSI_SYNC
17101665 if (host -> device [host -> SCpnt -> device -> id ].sync_state == SYNC_NEGOCIATE ) {
@@ -1798,7 +1753,7 @@ int acornscsi_reconnect(AS_Host *host)
17981753 "to reconnect with\n" ,
17991754 host -> host -> host_no , '0' + target );
18001755 acornscsi_dumplog (host , target );
1801- acornscsi_abortcmd (host , 0 );
1756+ acornscsi_abortcmd (host );
18021757 if (host -> SCpnt ) {
18031758 queue_add_cmd_tail (& host -> queues .disconnected , host -> SCpnt );
18041759 host -> SCpnt = NULL ;
@@ -1821,7 +1776,7 @@ int acornscsi_reconnect_finish(AS_Host *host)
18211776 host -> scsi .disconnectable = 0 ;
18221777 if (host -> SCpnt -> device -> id == host -> scsi .reconnected .target &&
18231778 host -> SCpnt -> device -> lun == host -> scsi .reconnected .lun &&
1824- host -> SCpnt -> tag == host -> scsi .reconnected .tag ) {
1779+ scsi_cmd_to_tag ( host -> SCpnt ) == host -> scsi .reconnected .tag ) {
18251780#if (DEBUG & (DEBUG_QUEUES |DEBUG_DISCON ))
18261781 DBG (host -> SCpnt , printk ("scsi%d.%c: reconnected" ,
18271782 host -> host -> host_no , acornscsi_target (host )));
@@ -1848,7 +1803,7 @@ int acornscsi_reconnect_finish(AS_Host *host)
18481803 }
18491804
18501805 if (!host -> SCpnt )
1851- acornscsi_abortcmd (host , host -> scsi . reconnected . tag );
1806+ acornscsi_abortcmd (host );
18521807 else {
18531808 /*
18541809 * Restore data pointer from SAVED pointers.
@@ -1889,21 +1844,15 @@ void acornscsi_disconnect_unexpected(AS_Host *host)
18891844 * Function: void acornscsi_abortcmd(AS_host *host, unsigned char tag)
18901845 * Purpose : abort a currently executing command
18911846 * Params : host - host with connected command to abort
1892- * tag - tag to abort
18931847 */
18941848static
1895- void acornscsi_abortcmd (AS_Host * host , unsigned char tag )
1849+ void acornscsi_abortcmd (AS_Host * host )
18961850{
18971851 host -> scsi .phase = PHASE_ABORTED ;
18981852 sbic_arm_write (host , SBIC_CMND , CMND_ASSERTATN );
18991853
19001854 msgqueue_flush (& host -> scsi .msgs );
1901- #ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
1902- if (tag )
1903- msgqueue_addmsg (& host -> scsi .msgs , 2 , ABORT_TAG , tag );
1904- else
1905- #endif
1906- msgqueue_addmsg (& host -> scsi .msgs , 1 , ABORT );
1855+ msgqueue_addmsg (& host -> scsi .msgs , 1 , ABORT );
19071856}
19081857
19091858/* ==========================================================================================
@@ -1993,7 +1942,7 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
19931942 printk (KERN_ERR "scsi%d.%c: PHASE_CONNECTING, SSR %02X?\n" ,
19941943 host -> host -> host_no , acornscsi_target (host ), ssr );
19951944 acornscsi_dumplog (host , host -> SCpnt ? host -> SCpnt -> device -> id : 8 );
1996- acornscsi_abortcmd (host , host -> SCpnt -> tag );
1945+ acornscsi_abortcmd (host );
19971946 }
19981947 return INTR_PROCESSING ;
19991948
@@ -2029,7 +1978,7 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
20291978 printk (KERN_ERR "scsi%d.%c: PHASE_CONNECTED, SSR %02X?\n" ,
20301979 host -> host -> host_no , acornscsi_target (host ), ssr );
20311980 acornscsi_dumplog (host , host -> SCpnt ? host -> SCpnt -> device -> id : 8 );
2032- acornscsi_abortcmd (host , host -> SCpnt -> tag );
1981+ acornscsi_abortcmd (host );
20331982 }
20341983 return INTR_PROCESSING ;
20351984
@@ -2075,20 +2024,20 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
20752024 case 0x18 : /* -> PHASE_DATAOUT */
20762025 /* COMMAND -> DATA OUT */
20772026 if (host -> scsi .SCp .sent_command != host -> SCpnt -> cmd_len )
2078- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2027+ acornscsi_abortcmd (host );
20792028 acornscsi_dma_setup (host , DMA_OUT );
20802029 if (!acornscsi_starttransfer (host ))
2081- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2030+ acornscsi_abortcmd (host );
20822031 host -> scsi .phase = PHASE_DATAOUT ;
20832032 return INTR_IDLE ;
20842033
20852034 case 0x19 : /* -> PHASE_DATAIN */
20862035 /* COMMAND -> DATA IN */
20872036 if (host -> scsi .SCp .sent_command != host -> SCpnt -> cmd_len )
2088- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2037+ acornscsi_abortcmd (host );
20892038 acornscsi_dma_setup (host , DMA_IN );
20902039 if (!acornscsi_starttransfer (host ))
2091- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2040+ acornscsi_abortcmd (host );
20922041 host -> scsi .phase = PHASE_DATAIN ;
20932042 return INTR_IDLE ;
20942043
@@ -2156,7 +2105,7 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
21562105 /* MESSAGE IN -> DATA OUT */
21572106 acornscsi_dma_setup (host , DMA_OUT );
21582107 if (!acornscsi_starttransfer (host ))
2159- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2108+ acornscsi_abortcmd (host );
21602109 host -> scsi .phase = PHASE_DATAOUT ;
21612110 return INTR_IDLE ;
21622111
@@ -2165,7 +2114,7 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
21652114 /* MESSAGE IN -> DATA IN */
21662115 acornscsi_dma_setup (host , DMA_IN );
21672116 if (!acornscsi_starttransfer (host ))
2168- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2117+ acornscsi_abortcmd (host );
21692118 host -> scsi .phase = PHASE_DATAIN ;
21702119 return INTR_IDLE ;
21712120
@@ -2206,7 +2155,7 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
22062155 switch (ssr ) {
22072156 case 0x19 : /* -> PHASE_DATAIN */
22082157 case 0x89 : /* -> PHASE_DATAIN */
2209- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2158+ acornscsi_abortcmd (host );
22102159 return INTR_IDLE ;
22112160
22122161 case 0x1b : /* -> PHASE_STATUSIN */
@@ -2255,7 +2204,7 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
22552204 switch (ssr ) {
22562205 case 0x18 : /* -> PHASE_DATAOUT */
22572206 case 0x88 : /* -> PHASE_DATAOUT */
2258- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2207+ acornscsi_abortcmd (host );
22592208 return INTR_IDLE ;
22602209
22612210 case 0x1b : /* -> PHASE_STATUSIN */
@@ -2482,7 +2431,6 @@ static int acornscsi_queuecmd_lck(struct scsi_cmnd *SCpnt,
24822431 SCpnt -> scsi_done = done ;
24832432 SCpnt -> host_scribble = NULL ;
24842433 SCpnt -> result = 0 ;
2485- SCpnt -> tag = 0 ;
24862434 SCpnt -> SCp .phase = (int )acornscsi_datadirection (SCpnt -> cmnd [0 ]);
24872435 SCpnt -> SCp .sent_command = 0 ;
24882436 SCpnt -> SCp .scsi_xferred = 0 ;
@@ -2581,7 +2529,7 @@ static enum res_abort acornscsi_do_abort(AS_Host *host, struct scsi_cmnd *SCpnt)
25812529 break ;
25822530
25832531 default :
2584- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2532+ acornscsi_abortcmd (host );
25852533 res = res_snooze ;
25862534 }
25872535 local_irq_restore (flags );
@@ -2747,9 +2695,6 @@ char *acornscsi_info(struct Scsi_Host *host)
27472695#ifdef CONFIG_SCSI_ACORNSCSI_SYNC
27482696 " SYNC"
27492697#endif
2750- #ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
2751- " TAG"
2752- #endif
27532698#if (DEBUG & DEBUG_NO_WRITE )
27542699 " NOWRITE (" __stringify(NO_WRITE) " )"
27552700#endif
@@ -2770,9 +2715,6 @@ static int acornscsi_show_info(struct seq_file *m, struct Scsi_Host *instance)
27702715#ifdef CONFIG_SCSI_ACORNSCSI_SYNC
27712716 " SYNC"
27722717#endif
2773- #ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
2774- " TAG"
2775- #endif
27762718#if (DEBUG & DEBUG_NO_WRITE )
27772719 " NOWRITE (" __stringify(NO_WRITE) " )"
27782720#endif
@@ -2827,9 +2769,8 @@ static int acornscsi_show_info(struct seq_file *m, struct Scsi_Host *instance)
28272769 seq_printf (m , "Device/Lun TaggedQ Sync\n" );
28282770 seq_printf (m , " %d/%llu " , scd -> id , scd -> lun );
28292771 if (scd -> tagged_supported )
2830- seq_printf (m , "%3sabled(%3d) " ,
2831- scd -> simple_tags ? "en" : "dis" ,
2832- scd -> current_tag );
2772+ seq_printf (m , "%3sabled " ,
2773+ scd -> simple_tags ? "en" : "dis" );
28332774 else
28342775 seq_printf (m , "unsupported " );
28352776
0 commit comments