diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-15 19:51:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-15 19:51:54 -0400 |
commit | bc06cffdec85d487c77109dffcd2f285bdc502d3 (patch) | |
tree | adc6e6398243da87e66c56102840597a329183a0 /drivers/scsi/scsi_error.c | |
parent | d3502d7f25b22cfc9762bf1781faa9db1bb3be2e (diff) | |
parent | 9413d7b8aa777dd1fc7db9563ce5e80d769fe7b5 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (166 commits)
[SCSI] ibmvscsi: convert to use the data buffer accessors
[SCSI] dc395x: convert to use the data buffer accessors
[SCSI] ncr53c8xx: convert to use the data buffer accessors
[SCSI] sym53c8xx: convert to use the data buffer accessors
[SCSI] ppa: coding police and printk levels
[SCSI] aic7xxx_old: remove redundant GFP_ATOMIC from kmalloc
[SCSI] i2o: remove redundant GFP_ATOMIC from kmalloc from device.c
[SCSI] remove the dead CYBERSTORMIII_SCSI option
[SCSI] don't build scsi_dma_{map,unmap} for !HAS_DMA
[SCSI] Clean up scsi_add_lun a bit
[SCSI] 53c700: Remove printk, which triggers because of low scsi clock on SNI RMs
[SCSI] sni_53c710: Cleanup
[SCSI] qla4xxx: Fix underrun/overrun conditions
[SCSI] megaraid_mbox: use mutex instead of semaphore
[SCSI] aacraid: add 51245, 51645 and 52245 adapters to documentation.
[SCSI] qla2xxx: update version to 8.02.00-k1.
[SCSI] qla2xxx: add support for NPIV
[SCSI] stex: use resid for xfer len information
[SCSI] Add Brownie 1200U3P to blacklist
[SCSI] scsi.c: convert to use the data buffer accessors
...
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index e8350c562d24..9adb64ac054c 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -18,12 +18,12 @@ | |||
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/slab.h> | ||
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/kthread.h> | 22 | #include <linux/kthread.h> |
24 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
25 | #include <linux/blkdev.h> | 24 | #include <linux/blkdev.h> |
26 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/scatterlist.h> | ||
27 | 27 | ||
28 | #include <scsi/scsi.h> | 28 | #include <scsi/scsi.h> |
29 | #include <scsi/scsi_cmnd.h> | 29 | #include <scsi/scsi_cmnd.h> |
@@ -640,16 +640,8 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, | |||
640 | memcpy(scmd->cmnd, cmnd, cmnd_size); | 640 | memcpy(scmd->cmnd, cmnd, cmnd_size); |
641 | 641 | ||
642 | if (copy_sense) { | 642 | if (copy_sense) { |
643 | gfp_t gfp_mask = GFP_ATOMIC; | 643 | sg_init_one(&sgl, scmd->sense_buffer, |
644 | 644 | sizeof(scmd->sense_buffer)); | |
645 | if (shost->hostt->unchecked_isa_dma) | ||
646 | gfp_mask |= __GFP_DMA; | ||
647 | |||
648 | sgl.page = alloc_page(gfp_mask); | ||
649 | if (!sgl.page) | ||
650 | return FAILED; | ||
651 | sgl.offset = 0; | ||
652 | sgl.length = 252; | ||
653 | 645 | ||
654 | scmd->sc_data_direction = DMA_FROM_DEVICE; | 646 | scmd->sc_data_direction = DMA_FROM_DEVICE; |
655 | scmd->request_bufflen = sgl.length; | 647 | scmd->request_bufflen = sgl.length; |
@@ -720,18 +712,6 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, | |||
720 | 712 | ||
721 | 713 | ||
722 | /* | 714 | /* |
723 | * Last chance to have valid sense data. | ||
724 | */ | ||
725 | if (copy_sense) { | ||
726 | if (!SCSI_SENSE_VALID(scmd)) { | ||
727 | memcpy(scmd->sense_buffer, page_address(sgl.page), | ||
728 | sizeof(scmd->sense_buffer)); | ||
729 | } | ||
730 | __free_page(sgl.page); | ||
731 | } | ||
732 | |||
733 | |||
734 | /* | ||
735 | * Restore original data | 715 | * Restore original data |
736 | */ | 716 | */ |
737 | scmd->request_buffer = old_buffer; | 717 | scmd->request_buffer = old_buffer; |