52
52
* You can tell if you have a device that supports tagged queueing my
53
53
* cating (eg) /proc/scsi/acornscsi/0 and see if the SCSI revision is reported
54
54
* 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.
59
55
*/
60
- #undef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
56
+
61
57
/*
62
58
* SCSI-II Synchronous transfer support.
63
59
*
@@ -171,7 +167,7 @@ static void acornscsi_done(AS_Host *host, struct scsi_cmnd **SCpntp,
171
167
unsigned int result );
172
168
static int acornscsi_reconnect_finish (AS_Host * host );
173
169
static 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 );
175
171
176
172
/* ====================================================================================
177
173
* Miscellaneous
@@ -741,17 +737,6 @@ intr_ret_t acornscsi_kick(AS_Host *host)
741
737
#endif
742
738
743
739
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
755
740
set_bit (SCpnt -> device -> id * 8 +
756
741
(u8 )(SCpnt -> device -> lun & 0x07 ), host -> busyluns );
757
742
@@ -1192,7 +1177,7 @@ void acornscsi_dma_intr(AS_Host *host)
1192
1177
* the device recognises the attention.
1193
1178
*/
1194
1179
if (dmac_read (host , DMAC_STATUS ) & STATUS_RQ0 ) {
1195
- acornscsi_abortcmd (host , host -> SCpnt -> tag );
1180
+ acornscsi_abortcmd (host );
1196
1181
1197
1182
dmac_write (host , DMAC_TXCNTLO , 0 );
1198
1183
dmac_write (host , DMAC_TXCNTHI , 0 );
@@ -1560,23 +1545,6 @@ void acornscsi_message(AS_Host *host)
1560
1545
acornscsi_sbic_issuecmd (host , CMND_ASSERTATN );
1561
1546
1562
1547
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
1580
1548
case EXTENDED_MESSAGE | (EXTENDED_SDTR << 8 ):
1581
1549
/*
1582
1550
* Target can't handle synchronous transfers
@@ -1687,24 +1655,11 @@ void acornscsi_buildmessages(AS_Host *host)
1687
1655
#if 0
1688
1656
/* does the device need the current command aborted */
1689
1657
if (cmd_aborted ) {
1690
- acornscsi_abortcmd (host -> SCpnt -> tag );
1658
+ acornscsi_abortcmd (host );
1691
1659
return ;
1692
1660
}
1693
1661
#endif
1694
1662
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
1708
1663
1709
1664
#ifdef CONFIG_SCSI_ACORNSCSI_SYNC
1710
1665
if (host -> device [host -> SCpnt -> device -> id ].sync_state == SYNC_NEGOCIATE ) {
@@ -1798,7 +1753,7 @@ int acornscsi_reconnect(AS_Host *host)
1798
1753
"to reconnect with\n" ,
1799
1754
host -> host -> host_no , '0' + target );
1800
1755
acornscsi_dumplog (host , target );
1801
- acornscsi_abortcmd (host , 0 );
1756
+ acornscsi_abortcmd (host );
1802
1757
if (host -> SCpnt ) {
1803
1758
queue_add_cmd_tail (& host -> queues .disconnected , host -> SCpnt );
1804
1759
host -> SCpnt = NULL ;
@@ -1821,7 +1776,7 @@ int acornscsi_reconnect_finish(AS_Host *host)
1821
1776
host -> scsi .disconnectable = 0 ;
1822
1777
if (host -> SCpnt -> device -> id == host -> scsi .reconnected .target &&
1823
1778
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 ) {
1825
1780
#if (DEBUG & (DEBUG_QUEUES |DEBUG_DISCON ))
1826
1781
DBG (host -> SCpnt , printk ("scsi%d.%c: reconnected" ,
1827
1782
host -> host -> host_no , acornscsi_target (host )));
@@ -1848,7 +1803,7 @@ int acornscsi_reconnect_finish(AS_Host *host)
1848
1803
}
1849
1804
1850
1805
if (!host -> SCpnt )
1851
- acornscsi_abortcmd (host , host -> scsi . reconnected . tag );
1806
+ acornscsi_abortcmd (host );
1852
1807
else {
1853
1808
/*
1854
1809
* Restore data pointer from SAVED pointers.
@@ -1889,21 +1844,15 @@ void acornscsi_disconnect_unexpected(AS_Host *host)
1889
1844
* Function: void acornscsi_abortcmd(AS_host *host, unsigned char tag)
1890
1845
* Purpose : abort a currently executing command
1891
1846
* Params : host - host with connected command to abort
1892
- * tag - tag to abort
1893
1847
*/
1894
1848
static
1895
- void acornscsi_abortcmd (AS_Host * host , unsigned char tag )
1849
+ void acornscsi_abortcmd (AS_Host * host )
1896
1850
{
1897
1851
host -> scsi .phase = PHASE_ABORTED ;
1898
1852
sbic_arm_write (host , SBIC_CMND , CMND_ASSERTATN );
1899
1853
1900
1854
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 );
1907
1856
}
1908
1857
1909
1858
/* ==========================================================================================
@@ -1993,7 +1942,7 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
1993
1942
printk (KERN_ERR "scsi%d.%c: PHASE_CONNECTING, SSR %02X?\n" ,
1994
1943
host -> host -> host_no , acornscsi_target (host ), ssr );
1995
1944
acornscsi_dumplog (host , host -> SCpnt ? host -> SCpnt -> device -> id : 8 );
1996
- acornscsi_abortcmd (host , host -> SCpnt -> tag );
1945
+ acornscsi_abortcmd (host );
1997
1946
}
1998
1947
return INTR_PROCESSING ;
1999
1948
@@ -2029,7 +1978,7 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
2029
1978
printk (KERN_ERR "scsi%d.%c: PHASE_CONNECTED, SSR %02X?\n" ,
2030
1979
host -> host -> host_no , acornscsi_target (host ), ssr );
2031
1980
acornscsi_dumplog (host , host -> SCpnt ? host -> SCpnt -> device -> id : 8 );
2032
- acornscsi_abortcmd (host , host -> SCpnt -> tag );
1981
+ acornscsi_abortcmd (host );
2033
1982
}
2034
1983
return INTR_PROCESSING ;
2035
1984
@@ -2075,20 +2024,20 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
2075
2024
case 0x18 : /* -> PHASE_DATAOUT */
2076
2025
/* COMMAND -> DATA OUT */
2077
2026
if (host -> scsi .SCp .sent_command != host -> SCpnt -> cmd_len )
2078
- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2027
+ acornscsi_abortcmd (host );
2079
2028
acornscsi_dma_setup (host , DMA_OUT );
2080
2029
if (!acornscsi_starttransfer (host ))
2081
- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2030
+ acornscsi_abortcmd (host );
2082
2031
host -> scsi .phase = PHASE_DATAOUT ;
2083
2032
return INTR_IDLE ;
2084
2033
2085
2034
case 0x19 : /* -> PHASE_DATAIN */
2086
2035
/* COMMAND -> DATA IN */
2087
2036
if (host -> scsi .SCp .sent_command != host -> SCpnt -> cmd_len )
2088
- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2037
+ acornscsi_abortcmd (host );
2089
2038
acornscsi_dma_setup (host , DMA_IN );
2090
2039
if (!acornscsi_starttransfer (host ))
2091
- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2040
+ acornscsi_abortcmd (host );
2092
2041
host -> scsi .phase = PHASE_DATAIN ;
2093
2042
return INTR_IDLE ;
2094
2043
@@ -2156,7 +2105,7 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
2156
2105
/* MESSAGE IN -> DATA OUT */
2157
2106
acornscsi_dma_setup (host , DMA_OUT );
2158
2107
if (!acornscsi_starttransfer (host ))
2159
- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2108
+ acornscsi_abortcmd (host );
2160
2109
host -> scsi .phase = PHASE_DATAOUT ;
2161
2110
return INTR_IDLE ;
2162
2111
@@ -2165,7 +2114,7 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
2165
2114
/* MESSAGE IN -> DATA IN */
2166
2115
acornscsi_dma_setup (host , DMA_IN );
2167
2116
if (!acornscsi_starttransfer (host ))
2168
- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2117
+ acornscsi_abortcmd (host );
2169
2118
host -> scsi .phase = PHASE_DATAIN ;
2170
2119
return INTR_IDLE ;
2171
2120
@@ -2206,7 +2155,7 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
2206
2155
switch (ssr ) {
2207
2156
case 0x19 : /* -> PHASE_DATAIN */
2208
2157
case 0x89 : /* -> PHASE_DATAIN */
2209
- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2158
+ acornscsi_abortcmd (host );
2210
2159
return INTR_IDLE ;
2211
2160
2212
2161
case 0x1b : /* -> PHASE_STATUSIN */
@@ -2255,7 +2204,7 @@ intr_ret_t acornscsi_sbicintr(AS_Host *host, int in_irq)
2255
2204
switch (ssr ) {
2256
2205
case 0x18 : /* -> PHASE_DATAOUT */
2257
2206
case 0x88 : /* -> PHASE_DATAOUT */
2258
- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2207
+ acornscsi_abortcmd (host );
2259
2208
return INTR_IDLE ;
2260
2209
2261
2210
case 0x1b : /* -> PHASE_STATUSIN */
@@ -2482,7 +2431,6 @@ static int acornscsi_queuecmd_lck(struct scsi_cmnd *SCpnt,
2482
2431
SCpnt -> scsi_done = done ;
2483
2432
SCpnt -> host_scribble = NULL ;
2484
2433
SCpnt -> result = 0 ;
2485
- SCpnt -> tag = 0 ;
2486
2434
SCpnt -> SCp .phase = (int )acornscsi_datadirection (SCpnt -> cmnd [0 ]);
2487
2435
SCpnt -> SCp .sent_command = 0 ;
2488
2436
SCpnt -> SCp .scsi_xferred = 0 ;
@@ -2581,7 +2529,7 @@ static enum res_abort acornscsi_do_abort(AS_Host *host, struct scsi_cmnd *SCpnt)
2581
2529
break ;
2582
2530
2583
2531
default :
2584
- acornscsi_abortcmd (host , host -> SCpnt -> tag );
2532
+ acornscsi_abortcmd (host );
2585
2533
res = res_snooze ;
2586
2534
}
2587
2535
local_irq_restore (flags );
@@ -2747,9 +2695,6 @@ char *acornscsi_info(struct Scsi_Host *host)
2747
2695
#ifdef CONFIG_SCSI_ACORNSCSI_SYNC
2748
2696
" SYNC"
2749
2697
#endif
2750
- #ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
2751
- " TAG"
2752
- #endif
2753
2698
#if (DEBUG & DEBUG_NO_WRITE )
2754
2699
" NOWRITE (" __stringify(NO_WRITE) " )"
2755
2700
#endif
@@ -2770,9 +2715,6 @@ static int acornscsi_show_info(struct seq_file *m, struct Scsi_Host *instance)
2770
2715
#ifdef CONFIG_SCSI_ACORNSCSI_SYNC
2771
2716
" SYNC"
2772
2717
#endif
2773
- #ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
2774
- " TAG"
2775
- #endif
2776
2718
#if (DEBUG & DEBUG_NO_WRITE )
2777
2719
" NOWRITE (" __stringify(NO_WRITE) " )"
2778
2720
#endif
@@ -2827,9 +2769,8 @@ static int acornscsi_show_info(struct seq_file *m, struct Scsi_Host *instance)
2827
2769
seq_printf (m , "Device/Lun TaggedQ Sync\n" );
2828
2770
seq_printf (m , " %d/%llu " , scd -> id , scd -> lun );
2829
2771
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" );
2833
2774
else
2834
2775
seq_printf (m , "unsupported " );
2835
2776
0 commit comments