diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index fb0886140dd7..e80d2a0c46af 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -1130,31 +1130,29 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, | |||
1130 | if (error < 0) | 1130 | if (error < 0) |
1131 | goto out_deinit; | 1131 | goto out_deinit; |
1132 | 1132 | ||
1133 | if (!(aac->adapter_info.options & AAC_OPT_NEW_COMM)) { | ||
1134 | error = pci_set_dma_max_seg_size(pdev, 65536); | ||
1135 | if (error) | ||
1136 | goto out_deinit; | ||
1137 | } | ||
1138 | |||
1139 | /* | 1133 | /* |
1140 | * Lets override negotiations and drop the maximum SG limit to 34 | 1134 | * Lets override negotiations and drop the maximum SG limit to 34 |
1141 | */ | 1135 | */ |
1142 | if ((aac_drivers[index].quirks & AAC_QUIRK_34SG) && | 1136 | if ((aac_drivers[index].quirks & AAC_QUIRK_34SG) && |
1143 | (aac->scsi_host_ptr->sg_tablesize > 34)) { | 1137 | (shost->sg_tablesize > 34)) { |
1144 | aac->scsi_host_ptr->sg_tablesize = 34; | 1138 | shost->sg_tablesize = 34; |
1145 | aac->scsi_host_ptr->max_sectors | 1139 | shost->max_sectors = (shost->sg_tablesize * 8) + 112; |
1146 | = (aac->scsi_host_ptr->sg_tablesize * 8) + 112; | ||
1147 | } | 1140 | } |
1148 | 1141 | ||
1149 | if ((aac_drivers[index].quirks & AAC_QUIRK_17SG) && | 1142 | if ((aac_drivers[index].quirks & AAC_QUIRK_17SG) && |
1150 | (aac->scsi_host_ptr->sg_tablesize > 17)) { | 1143 | (shost->sg_tablesize > 17)) { |
1151 | aac->scsi_host_ptr->sg_tablesize = 17; | 1144 | shost->sg_tablesize = 17; |
1152 | aac->scsi_host_ptr->max_sectors | 1145 | shost->max_sectors = (shost->sg_tablesize * 8) + 112; |
1153 | = (aac->scsi_host_ptr->sg_tablesize * 8) + 112; | ||
1154 | } | 1146 | } |
1155 | 1147 | ||
1148 | error = pci_set_dma_max_seg_size(pdev, | ||
1149 | (aac->adapter_info.options & AAC_OPT_NEW_COMM) ? | ||
1150 | (shost->max_sectors << 9) : 65536); | ||
1151 | if (error) | ||
1152 | goto out_deinit; | ||
1153 | |||
1156 | /* | 1154 | /* |
1157 | * Firware printf works only with older firmware. | 1155 | * Firmware printf works only with older firmware. |
1158 | */ | 1156 | */ |
1159 | if (aac_drivers[index].quirks & AAC_QUIRK_34SG) | 1157 | if (aac_drivers[index].quirks & AAC_QUIRK_34SG) |
1160 | aac->printf_enabled = 1; | 1158 | aac->printf_enabled = 1; |