From: Larry Finger <larry.finger@lwfinger.net>
To: Michael Buesch <mb@bu3sch.de>
Cc: John Linville <linville@tuxdriver.com>,
netdev@vger.kernel.org, Bcm43xx-dev@lists.berlios.de
Subject: Re: [PATCH] bcm43xx: Fix problem with >1 GB RAM
Date: Mon, 22 Jan 2007 14:18:57 -0600 [thread overview]
Message-ID: <45B51C31.10000@lwfinger.net> (raw)
In-Reply-To: <200701221920.28938.mb@bu3sch.de>
Michael Buesch wrote:
> On Saturday 20 January 2007 17:18, Larry Finger wrote:
>> Some versions of the bcm43xx chips only support 30-bit DMA, which means
>> that the descriptors and buffers must be in the first 1 GB of RAM. On
>> the i386 and x86_64 architectures with more than 1 GB RAM, an incorrect
>> assignment may occur. This patch ensures that the various DMA addresses
>> are within the capability of the chip. Testing has been limited to x86_64
>> as no one has an i386 system with more than 1 GB RAM.
>>
>> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
>> ---
..snip..
>> assert(!ring->tx);
>>
>> - dma_sync_single_for_cpu(&ring->bcm->pci_dev->dev,
>> - addr, len, DMA_FROM_DEVICE);
>> + pci_dma_sync_single_for_cpu(ring->bcm->pci_dev,
>> + addr, len, PCI_DMA_FROMDEVICE);
>> }
>
> Any special reason why you convert the DMA operations to the PCI
> stuff? I ask, because if this makes a difference, it affects the
> new SSB subsystem as well.
When I looked at the b44 driver to see how that code handled the problem, it used the pci-form of
the calls rather than the dma-version. Thus I switched early in the debug process - even before I
had the necessary hardware. Once I got it working and understood the problem, I never tried
restoring the dma-forms.
At present, I have a problem getting NetworkManager to see the d80211 wireless interface. Once I get
that solved, I plan to use my system to test with > 1 GB RAM on your git tree. In that case, I'll
switch to the pci-form only if necessary.
>
>> static inline
>> @@ -194,8 +192,8 @@ void sync_descbuffer_for_device(struct b
..snip..
>> - goto out;
>> +no_dma:
>> +#ifdef CONFIG_BCM43XX_PIO
>> + printk(KERN_WARNING PFX "DMA not supported on this device."
>> + " Falling back to PIO.\n");
>> + bcm->__using_pio = 1;
>> + BUG();
>
> That isn't a BUG. Just remove this call, please.
It was accidentally left in from my debugging. I have already submitted a revised version to
Linville that removes this, and one other BUG statement that you didn't note.
>> + return -ENOSYS;
>> +#else
>> + printk(KERN_ERR PFX "FATAL: DMA not supported and PIO not configured. "
>> + "Please recompile the driver with PIO support.\n");
>> + return -ENODEV;
>> +#endif /* CONFIG_BCM43XX_PIO */
>> }
..snip..
>> u16 board_vendor;
>> u16 board_type;
>
> The rest is OK, I think.
> Thanks for the nice work.
Thank you. It certainly was a lot easier with the necessary hardware in house.
Larry
next prev parent reply other threads:[~2007-01-22 20:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-20 16:18 [PATCH] bcm43xx: Fix problem with >1 GB RAM Larry Finger
2007-01-22 18:20 ` Michael Buesch
2007-01-22 20:18 ` Larry Finger [this message]
2007-01-22 20:35 ` Michael Buesch
2007-01-23 15:18 ` Dan Williams
2007-01-23 15:22 ` Michael Buesch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45B51C31.10000@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=Bcm43xx-dev@lists.berlios.de \
--cc=linville@tuxdriver.com \
--cc=mb@bu3sch.de \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).