File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1044,6 +1044,8 @@ static void handle_error(struct mesh_state *ms)
1044
1044
while ((in_8 (& mr -> bus_status1 ) & BS1_RST ) != 0 )
1045
1045
udelay (1 );
1046
1046
printk ("done\n" );
1047
+ if (ms -> dma_started )
1048
+ halt_dma (ms );
1047
1049
handle_reset (ms );
1048
1050
/* request_q is empty, no point in mesh_start() */
1049
1051
return ;
@@ -1356,7 +1358,8 @@ static void halt_dma(struct mesh_state *ms)
1356
1358
ms -> conn_tgt , ms -> data_ptr , scsi_bufflen (cmd ),
1357
1359
ms -> tgts [ms -> conn_tgt ].data_goes_out );
1358
1360
}
1359
- scsi_dma_unmap (cmd );
1361
+ if (cmd )
1362
+ scsi_dma_unmap (cmd );
1360
1363
ms -> dma_started = 0 ;
1361
1364
}
1362
1365
@@ -1711,6 +1714,9 @@ static int mesh_host_reset(struct scsi_cmnd *cmd)
1711
1714
1712
1715
spin_lock_irqsave (ms -> host -> host_lock , flags );
1713
1716
1717
+ if (ms -> dma_started )
1718
+ halt_dma (ms );
1719
+
1714
1720
/* Reset the controller & dbdma channel */
1715
1721
out_le32 (& md -> control , (RUN |PAUSE |FLUSH |WAKE ) << 16 ); /* stop dma */
1716
1722
out_8 (& mr -> exception , 0xff ); /* clear all exception bits */
You can’t perform that action at this time.
0 commit comments