diff options
Diffstat (limited to 'drivers/scsi/3w-xxxx.c')
-rw-r--r-- | drivers/scsi/3w-xxxx.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index d09532162217..adb98a297210 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c | |||
@@ -1463,18 +1463,10 @@ static void tw_transfer_internal(TW_Device_Extension *tw_dev, int request_id, | |||
1463 | void *data, unsigned int len) | 1463 | void *data, unsigned int len) |
1464 | { | 1464 | { |
1465 | struct scsi_cmnd *cmd = tw_dev->srb[request_id]; | 1465 | struct scsi_cmnd *cmd = tw_dev->srb[request_id]; |
1466 | void *buf; | 1466 | unsigned long flags; |
1467 | unsigned int transfer_len; | ||
1468 | unsigned long flags = 0; | ||
1469 | struct scatterlist *sg = scsi_sglist(cmd); | ||
1470 | 1467 | ||
1471 | local_irq_save(flags); | 1468 | local_irq_save(flags); |
1472 | buf = kmap_atomic(sg_page(sg), KM_IRQ0) + sg->offset; | 1469 | scsi_sg_copy_from_buffer(cmd, data, len); |
1473 | transfer_len = min(sg->length, len); | ||
1474 | |||
1475 | memcpy(buf, data, transfer_len); | ||
1476 | |||
1477 | kunmap_atomic(buf - sg->offset, KM_IRQ0); | ||
1478 | local_irq_restore(flags); | 1470 | local_irq_restore(flags); |
1479 | } | 1471 | } |
1480 | 1472 | ||
@@ -2294,8 +2286,6 @@ static int __devinit tw_probe(struct pci_dev *pdev, const struct pci_device_id * | |||
2294 | } | 2286 | } |
2295 | tw_dev = (TW_Device_Extension *)host->hostdata; | 2287 | tw_dev = (TW_Device_Extension *)host->hostdata; |
2296 | 2288 | ||
2297 | memset(tw_dev, 0, sizeof(TW_Device_Extension)); | ||
2298 | |||
2299 | /* Save values to device extension */ | 2289 | /* Save values to device extension */ |
2300 | tw_dev->host = host; | 2290 | tw_dev->host = host; |
2301 | tw_dev->tw_pci_dev = pdev; | 2291 | tw_dev->tw_pci_dev = pdev; |