[SCSI] 3w-9xxx: eliminate missed map_single path
This removes the remaining unnecessary map_single path Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
5bc65793cb
commit
b1192d5eba
@ -1902,17 +1902,11 @@ static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id,
|
|||||||
static void twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int request_id)
|
static void twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int request_id)
|
||||||
{
|
{
|
||||||
struct scsi_cmnd *cmd = tw_dev->srb[request_id];
|
struct scsi_cmnd *cmd = tw_dev->srb[request_id];
|
||||||
int use_sg = scsi_sg_count(cmd);
|
|
||||||
|
|
||||||
if (scsi_bufflen(cmd) < TW_MIN_SGL_LENGTH &&
|
if (scsi_bufflen(cmd) < TW_MIN_SGL_LENGTH &&
|
||||||
(cmd->sc_data_direction == DMA_FROM_DEVICE ||
|
(cmd->sc_data_direction == DMA_FROM_DEVICE ||
|
||||||
cmd->sc_data_direction == DMA_BIDIRECTIONAL)) {
|
cmd->sc_data_direction == DMA_BIDIRECTIONAL)) {
|
||||||
if (!use_sg)
|
if (scsi_sg_count(cmd) == 1) {
|
||||||
memcpy(scsi_sglist(cmd),
|
|
||||||
tw_dev->generic_buffer_virt[request_id],
|
|
||||||
scsi_bufflen(cmd));
|
|
||||||
|
|
||||||
if (use_sg == 1) {
|
|
||||||
struct scatterlist *sg = scsi_sglist(tw_dev->srb[request_id]);
|
struct scatterlist *sg = scsi_sglist(tw_dev->srb[request_id]);
|
||||||
char *buf;
|
char *buf;
|
||||||
unsigned long flags = 0;
|
unsigned long flags = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user