[PATCH 1/1] aacraid: pci_set_dma_max_seg_size opened up for late model controllers

2008-02-06 Thread Salyzyn, Mark
This patch depends on 'RE: [patch 048/265] iommu sg merging: aacraid: use 
pci_set_dma_max_seg_size' and ensures that the modern adapters get a maximum sg 
segment size on par with the maximum transfer size. Added some localized 
janitor fixes to the discussion patch I used with Fujita.

FUJITA Tomonori [mailto:[EMAIL PROTECTED] sez:
 I think that setting the proper maximum segment size for the late
 model cards (as you did above) makes sense.

This attached patch is against current linux-2.6. It will not apply to current 
scsi-misc-2.6 without the above mentioned dependency.

ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling 
of patch attachments. Please use the attached file to patch

Signed-off-by: Mark Salyzyn [EMAIL PROTECTED]

 drivers/scsi/aacraid/linit.c |   28 +---
 1 file changed, 13 insertions(+), 15 deletions(-)

diff -ru a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
--- a/drivers/scsi/aacraid/linit.c  2008-02-06 11:35:55.111631591 -0500
+++ b/drivers/scsi/aacraid/linit.c  2008-02-06 11:52:11.095208736 -0500
@@ -1130,31 +1130,29 @@
if (error  0)
goto out_deinit;

-   if (!(aac-adapter_info.options  AAC_OPT_NEW_COMM)) {
-   error = pci_set_dma_max_seg_size(pdev, 65536);
-   if (error)
-   goto out_deinit;
-   }
-
/*
 * 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;
+   (shost-sg_tablesize  34)) {
+   shost-sg_tablesize = 34;
+   shost-max_sectors = (shost-sg_tablesize * 8) + 112;
}

if ((aac_drivers[index].quirks  AAC_QUIRK_17SG) 
-   (aac-scsi_host_ptr-sg_tablesize  17)) {
-   aac-scsi_host_ptr-sg_tablesize = 17;
-   aac-scsi_host_ptr-max_sectors
- = (aac-scsi_host_ptr-sg_tablesize * 8) + 112;
+   (shost-sg_tablesize  17)) {
+   shost-sg_tablesize = 17;
+   shost-max_sectors = (shost-sg_tablesize * 8) + 112;
}

+   error = pci_set_dma_max_seg_size(pdev,
+   (aac-adapter_info.options  AAC_OPT_NEW_COMM) ?
+   (shost-max_sectors  9) : 65536);
+   if (error)
+   goto out_deinit;
+
/*
-* Firware printf works only with older firmware.
+* Firmware printf works only with older firmware.
 */
if (aac_drivers[index].quirks  AAC_QUIRK_34SG)
aac-printf_enabled = 1;




aacraid_pci_set_dma.patch
Description: aacraid_pci_set_dma.patch


Re: [PATCH 1/1] aacraid: pci_set_dma_max_seg_size opened up for late model controllers

2008-02-06 Thread James Bottomley
On Wed, 2008-02-06 at 09:00 -0800, Salyzyn, Mark wrote:
 This patch depends on 'RE: [patch 048/265] iommu sg merging: aacraid: use 
 pci_set_dma_max_seg_size' and ensures that the modern adapters get a maximum 
 sg segment size on par with the maximum transfer size. Added some localized 
 janitor fixes to the discussion patch I used with Fujita.
 
 FUJITA Tomonori [mailto:[EMAIL PROTECTED] sez:
  I think that setting the proper maximum segment size for the late
  model cards (as you did above) makes sense.
 
 This attached patch is against current linux-2.6. It will not apply to 
 current scsi-misc-2.6 without the above mentioned dependency.
 
 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's 
 handling of patch attachments. Please use the attached file to patch
 
 Signed-off-by: Mark Salyzyn [EMAIL PROTECTED]

OK, I have this, but someone really needs to do a little more checkpatch
love:

[EMAIL PROTECTED] ./scripts/checkpatch.pl ~/tmp.mail
ERROR: use tabs not spaces
#44: FILE: drivers/scsi/aacraid/linit.c:1138:
+ ^I^Ishost-sg_tablesize = 34;$

ERROR: use tabs not spaces
#45: FILE: drivers/scsi/aacraid/linit.c:1139:
+ ^I^Ishost-max_sectors = (shost-sg_tablesize * 8) + 112;$

ERROR: use tabs not spaces
#54: FILE: drivers/scsi/aacraid/linit.c:1144:
+ ^I^Ishost-sg_tablesize = 17;$

ERROR: use tabs not spaces
#55: FILE: drivers/scsi/aacraid/linit.c:1145:
+ ^I^Ishost-max_sectors = (shost-sg_tablesize * 8) + 112;$

ERROR: use tabs not spaces
#60: FILE: drivers/scsi/aacraid/linit.c:1150:
+ ^I^I^I(shost-max_sectors  9) : 65536);$

total: 5 errors, 0 warnings, 44 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

James


-
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/1] aacraid: pci_set_dma_max_seg_size opened up for late model controllers (take 2)

2008-02-06 Thread Salyzyn, Mark
Merde, excuse my english. No idea how those spaces snuck in, a last minute vi 
fumble finger?! Updated patch enclosed. My apologies for the gaff!

Signed-off-by: Mark Salyzyn [EMAIL PROTECTED]

 drivers/scsi/aacraid/linit.c |   42 --
 1 file changed, 20 insertions(+), 22 deletions(-)

Sincerely -- Mark Salyzyn

 -Original Message-
 From: James Bottomley [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 06, 2008 12:55 PM
 To: Salyzyn, Mark
 Cc: FUJITA Tomonori; [EMAIL PROTECTED];
 [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]; [EMAIL PROTECTED]; 'linux-scsi@vger.kernel.org'
 Subject: Re: [PATCH 1/1] aacraid: pci_set_dma_max_seg_size
 opened up for late model controllers

 On Wed, 2008-02-06 at 09:00 -0800, Salyzyn, Mark wrote:
  This patch depends on 'RE: [patch 048/265] iommu sg
 merging: aacraid: use pci_set_dma_max_seg_size' and ensures
 that the modern adapters get a maximum sg segment size on par
 with the maximum transfer size. Added some localized janitor
 fixes to the discussion patch I used with Fujita.
 
  FUJITA Tomonori [mailto:[EMAIL PROTECTED] sez:
   I think that setting the proper maximum segment size for the late
   model cards (as you did above) makes sense.
 
  This attached patch is against current linux-2.6. It will
 not apply to current scsi-misc-2.6 without the above
 mentioned dependency.
 
  ObligatoryDisclaimer: Please accept my condolences
 regarding Outlook's handling of patch attachments. Please use
 the attached file to patch
 
  Signed-off-by: Mark Salyzyn [EMAIL PROTECTED]

 OK, I have this, but someone really needs to do a little more
 checkpatch
 love:

 [EMAIL PROTECTED] ./scripts/checkpatch.pl ~/tmp.mail
 ERROR: use tabs not spaces
 #44: FILE: drivers/scsi/aacraid/linit.c:1138:
 + ^I^Ishost-sg_tablesize = 34;$

 ERROR: use tabs not spaces
 #45: FILE: drivers/scsi/aacraid/linit.c:1139:
 + ^I^Ishost-max_sectors = (shost-sg_tablesize * 8) + 112;$

 ERROR: use tabs not spaces
 #54: FILE: drivers/scsi/aacraid/linit.c:1144:
 + ^I^Ishost-sg_tablesize = 17;$

 ERROR: use tabs not spaces
 #55: FILE: drivers/scsi/aacraid/linit.c:1145:
 + ^I^Ishost-max_sectors = (shost-sg_tablesize * 8) + 112;$

 ERROR: use tabs not spaces
 #60: FILE: drivers/scsi/aacraid/linit.c:1150:
 + ^I^I^I(shost-max_sectors  9) : 65536);$

 total: 5 errors, 0 warnings, 44 lines checked

 Your patch has style problems, please review.  If any of these errors
 are false positives report them to the maintainer, see
 CHECKPATCH in MAINTAINERS.

 James


aacraid_pci_set_dma1.patch
Description: aacraid_pci_set_dma1.patch