diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 21:58:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 21:58:04 -0400 |
commit | 89a93f2f4834f8c126e8d9dd6b368d0b9e21ec3d (patch) | |
tree | e731456fec0cab1225ad3e806dc8d3efefa0a78b /drivers/scsi/aacraid | |
parent | 260eddf4391f162a69d1d163729249635fa7a78f (diff) | |
parent | fe9233fb6914a0eb20166c967e3020f7f0fba2c9 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (102 commits)
[SCSI] scsi_dh: fix kconfig related build errors
[SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of
[SCSI] scsi_cmnd.h: remove double inclusion of linux/blkdev.h
[SCSI] make struct scsi_{host,target}_type static
[SCSI] fix locking in host use of blk_plug_device()
[SCSI] zfcp: Cleanup external header file
[SCSI] zfcp: Cleanup code in zfcp_erp.c
[SCSI] zfcp: zfcp_fsf cleanup.
[SCSI] zfcp: consolidate sysfs things into one file.
[SCSI] zfcp: Cleanup of code in zfcp_aux.c
[SCSI] zfcp: Cleanup of code in zfcp_scsi.c
[SCSI] zfcp: Move status accessors from zfcp to SCSI include file.
[SCSI] zfcp: Small QDIO cleanups
[SCSI] zfcp: Adapter reopen for large number of unsolicited status
[SCSI] zfcp: Fix error checking for ELS ADISC requests
[SCSI] zfcp: wait until adapter is finished with ERP during auto-port
[SCSI] ibmvfc: IBM Power Virtual Fibre Channel Adapter Client Driver
[SCSI] sg: Add target reset support
[SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRC
[SCSI] sd: Move scsi_disk() accessor function to sd.h
...
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r-- | drivers/scsi/aacraid/commctrl.c | 33 | ||||
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 2 |
2 files changed, 34 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 5fd83deab36c..a7355260cfcf 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/kthread.h> | 41 | #include <linux/kthread.h> |
42 | #include <linux/semaphore.h> | 42 | #include <linux/semaphore.h> |
43 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
44 | #include <scsi/scsi_host.h> | ||
44 | 45 | ||
45 | #include "aacraid.h" | 46 | #include "aacraid.h" |
46 | 47 | ||
@@ -581,6 +582,14 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) | |||
581 | for (i = 0; i < upsg->count; i++) { | 582 | for (i = 0; i < upsg->count; i++) { |
582 | u64 addr; | 583 | u64 addr; |
583 | void* p; | 584 | void* p; |
585 | if (upsg->sg[i].count > | ||
586 | (dev->adapter_info.options & | ||
587 | AAC_OPT_NEW_COMM) ? | ||
588 | (dev->scsi_host_ptr->max_sectors << 9) : | ||
589 | 65536) { | ||
590 | rcode = -EINVAL; | ||
591 | goto cleanup; | ||
592 | } | ||
584 | /* Does this really need to be GFP_DMA? */ | 593 | /* Does this really need to be GFP_DMA? */ |
585 | p = kmalloc(upsg->sg[i].count,GFP_KERNEL|__GFP_DMA); | 594 | p = kmalloc(upsg->sg[i].count,GFP_KERNEL|__GFP_DMA); |
586 | if(!p) { | 595 | if(!p) { |
@@ -625,6 +634,14 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) | |||
625 | for (i = 0; i < usg->count; i++) { | 634 | for (i = 0; i < usg->count; i++) { |
626 | u64 addr; | 635 | u64 addr; |
627 | void* p; | 636 | void* p; |
637 | if (usg->sg[i].count > | ||
638 | (dev->adapter_info.options & | ||
639 | AAC_OPT_NEW_COMM) ? | ||
640 | (dev->scsi_host_ptr->max_sectors << 9) : | ||
641 | 65536) { | ||
642 | rcode = -EINVAL; | ||
643 | goto cleanup; | ||
644 | } | ||
628 | /* Does this really need to be GFP_DMA? */ | 645 | /* Does this really need to be GFP_DMA? */ |
629 | p = kmalloc(usg->sg[i].count,GFP_KERNEL|__GFP_DMA); | 646 | p = kmalloc(usg->sg[i].count,GFP_KERNEL|__GFP_DMA); |
630 | if(!p) { | 647 | if(!p) { |
@@ -667,6 +684,14 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) | |||
667 | for (i = 0; i < upsg->count; i++) { | 684 | for (i = 0; i < upsg->count; i++) { |
668 | uintptr_t addr; | 685 | uintptr_t addr; |
669 | void* p; | 686 | void* p; |
687 | if (usg->sg[i].count > | ||
688 | (dev->adapter_info.options & | ||
689 | AAC_OPT_NEW_COMM) ? | ||
690 | (dev->scsi_host_ptr->max_sectors << 9) : | ||
691 | 65536) { | ||
692 | rcode = -EINVAL; | ||
693 | goto cleanup; | ||
694 | } | ||
670 | /* Does this really need to be GFP_DMA? */ | 695 | /* Does this really need to be GFP_DMA? */ |
671 | p = kmalloc(usg->sg[i].count,GFP_KERNEL|__GFP_DMA); | 696 | p = kmalloc(usg->sg[i].count,GFP_KERNEL|__GFP_DMA); |
672 | if(!p) { | 697 | if(!p) { |
@@ -698,6 +723,14 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) | |||
698 | for (i = 0; i < upsg->count; i++) { | 723 | for (i = 0; i < upsg->count; i++) { |
699 | dma_addr_t addr; | 724 | dma_addr_t addr; |
700 | void* p; | 725 | void* p; |
726 | if (upsg->sg[i].count > | ||
727 | (dev->adapter_info.options & | ||
728 | AAC_OPT_NEW_COMM) ? | ||
729 | (dev->scsi_host_ptr->max_sectors << 9) : | ||
730 | 65536) { | ||
731 | rcode = -EINVAL; | ||
732 | goto cleanup; | ||
733 | } | ||
701 | p = kmalloc(upsg->sg[i].count, GFP_KERNEL); | 734 | p = kmalloc(upsg->sg[i].count, GFP_KERNEL); |
702 | if (!p) { | 735 | if (!p) { |
703 | dprintk((KERN_DEBUG"aacraid: Could not allocate SG buffer - size = %d buffer number %d of %d\n", | 736 | dprintk((KERN_DEBUG"aacraid: Could not allocate SG buffer - size = %d buffer number %d of %d\n", |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 68c140e82673..9aa301c1ed07 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -865,7 +865,7 @@ static ssize_t aac_show_bios_version(struct device *device, | |||
865 | return len; | 865 | return len; |
866 | } | 866 | } |
867 | 867 | ||
868 | ssize_t aac_show_serial_number(struct device *device, | 868 | static ssize_t aac_show_serial_number(struct device *device, |
869 | struct device_attribute *attr, char *buf) | 869 | struct device_attribute *attr, char *buf) |
870 | { | 870 | { |
871 | struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; | 871 | struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; |