Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964853AbWESV2v (ORCPT ); Fri, 19 May 2006 17:28:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964852AbWESV2t (ORCPT ); Fri, 19 May 2006 17:28:49 -0400 Received: from stat9.steeleye.com ([209.192.50.41]:58326 "EHLO hancock.sc.steeleye.com") by vger.kernel.org with ESMTP id S964849AbWESV2s (ORCPT ); Fri, 19 May 2006 17:28:48 -0400 Subject: Re: [PATCH 1/1] scsi : megaraid_{mm,mbox}: a fix on 64-bit DMA capability check From: James Bottomley To: "Ju, Seokmann" Cc: Vasily Averin , Andrew Morton , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <890BF3111FB9484E9526987D912B261901BD91@NAMAIL3.ad.lsil.com> References: <890BF3111FB9484E9526987D912B261901BD91@NAMAIL3.ad.lsil.com> Content-Type: text/plain Date: Fri, 19 May 2006 16:28:00 -0500 Message-Id: <1148074080.3410.105.camel@mulgrave.il.steeleye.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-4.fc4) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 976 Lines: 27 On Fri, 2006-05-19 at 09:09 -0600, Ju, Seokmann wrote: > + adapter->pdev->device == PCI_DEVICE_ID_LINDSAY)) { > + if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK) != > 0) { > + con_log(CL_ANN, (KERN_WARNING > + "megaraid: could not set DMA mask for > 64-bit.\n")); > > - goto out_free_sysfs_res; Well, this really isn't quite right. There are 32 bit platforms which will refuse a 64 bit DMA mask on principle. You need to retry with a 32 bit mask before erroring out, exactly like you've done in megaraid_sas.c Also, it's a bit strange having a 32 bit mask set initially in probe_one and then being reset in init_mbox. Why not just consolidate all the PCI register testing and mask setting in probe_one? James - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/