diff options
author | Mark Haverkamp <markh@osdl.org> | 2005-05-16 18:28:42 -0700 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-05-20 15:48:00 -0500 |
commit | 7c00ffa314bf0fb0e23858bbebad33b48b6abbb9 (patch) | |
tree | 4d6b65bb5a2c8fecf48a8c6402c2cc867aa2fe6c /drivers/scsi/aacraid/linit.c | |
parent | 672b2d38da4fff4c4452685a25fb88b65243d1a6 (diff) | |
download | blackbird-op-linux-7c00ffa314bf0fb0e23858bbebad33b48b6abbb9.tar.gz blackbird-op-linux-7c00ffa314bf0fb0e23858bbebad33b48b6abbb9.zip |
[SCSI] 2.6 aacraid: Variable FIB size (updated patch)
New code from the Adaptec driver. Performance enhancement for newer
adapters. I hope that this isn't too big for a single patch. I believe
that other than the few small cleanups mentioned, that the changes are
all related.
- Added Variable FIB size negotiation for new adapters.
- Added support to maximize scatter gather tables and thus permit
requests larger than 64KB/each.
- Limit Scatter Gather to 34 elements for ROMB platforms.
- aac_printf is only enabled with AAC_QUIRK_34SG
- Large FIB ioctl support
- some minor cleanup
Passes sparse check.
I have tested it on x86 and ppc64 machines.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 5fd8f3ee9804..6f05d86c7bb3 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -347,10 +347,16 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev, static int aac_slave_configure(struct scsi_device *sdev) { + struct Scsi_Host *host = sdev->host; + if (sdev->tagged_supported) scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, 128); else scsi_adjust_queue_depth(sdev, 0, 1); + + if (host->max_sectors < AAC_MAX_32BIT_SGBCOUNT) + blk_queue_max_segment_size(sdev->request_queue, 65536); + return 0; } @@ -439,11 +445,11 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) static int aac_cfg_open(struct inode *inode, struct file *file) { struct aac_dev *aac; - unsigned minor = iminor(inode); + unsigned minor_number = iminor(inode); int err = -ENODEV; list_for_each_entry(aac, &aac_devices, entry) { - if (aac->id == minor) { + if (aac->id == minor_number) { file->private_data = aac; err = 0; break; @@ -489,6 +495,7 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long case FSACTL_DELETE_DISK: case FSACTL_FORCE_DELETE_DISK: case FSACTL_GET_CONTAINERS: + case FSACTL_SEND_LARGE_FIB: ret = aac_do_ioctl(dev, cmd, (void __user *)arg); break; @@ -538,7 +545,7 @@ static struct file_operations aac_cfg_fops = { static struct scsi_host_template aac_driver_template = { .module = THIS_MODULE, .name = "AAC", - .proc_name = "aacraid", + .proc_name = AAC_DRIVERNAME, .info = aac_info, .ioctl = aac_ioctl, #ifdef CONFIG_COMPAT @@ -612,7 +619,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, aac->cardtype = index; INIT_LIST_HEAD(&aac->entry); - aac->fibs = kmalloc(sizeof(struct fib) * AAC_NUM_FIB, GFP_KERNEL); + aac->fibs = kmalloc(sizeof(struct fib) * (shost->can_queue + AAC_NUM_MGT_FIB), GFP_KERNEL); if (!aac->fibs) goto out_free_host; spin_lock_init(&aac->fib_lock); @@ -632,6 +639,24 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, aac_get_adapter_info(aac); /* + * Lets override negotiations and drop the maximum SG limit to 34 + */ + if ((aac_drivers[index].quirks & AAC_QUIRK_34SG) && + (aac->scsi_host_ptr->sg_tablesize > 34)) { + aac->scsi_host_ptr->sg_tablesize = 34; + aac->scsi_host_ptr->max_sectors + = (aac->scsi_host_ptr->sg_tablesize * 8) + 112; + } + + /* + * Firware printf works only with older firmware. + */ + if (aac_drivers[index].quirks & AAC_QUIRK_34SG) + aac->printf_enabled = 1; + else + aac->printf_enabled = 0; + + /* * max channel will be the physical channels plus 1 virtual channel * all containers are on the virtual channel 0 * physical channels are address by their actual physical number+1 |