On Wednesday 18 November 2009 18:36:12 Oncaphillis wrote:
> > Index: wireless-testing/drivers/ssb/pci.c
> > ===================================================================
> > --- wireless-testing.orig/drivers/ssb/pci.c
> > +++ wireless-testing/drivers/ssb/pci.c
> > @@ -251,10 +251,16 @@ static int sprom_check_crc(const u16 *sp
> > static int sprom_do_read(struct ssb_bus *bus, u16 *sprom)
> > {
> > int i;
> > + u32 buf;
> >
> > - for (i = 0; i< bus->sprom_size; i++)
> > - sprom[i] = ioread16(bus->mmio + SSB_SPROM_BASE + (i * 2));
> > -
> > + printk(KERN_INFO "ssb: Entering %s\n", __func__);
> > + for (i = 0; i< bus->sprom_size; i = i + 2) {
> > + buf = ioread32(bus->mmio + SSB_SPROM_BASE + (i * 2));
> > + printk(KERN_INFO "ssb: Read 0x%.8X from SPROM\n", buf);
> > + sprom[i] = buf& 0x0000FFFF;
> > + sprom[i+1] = (buf>> 16)& 0x0000FFFF;
> > + }
> > + printk(KERN_INFO "ssb: Leaving %s\n", __func__);
> > return 0;
> > }
> >
> >
> u32 *my_buff = (u32 *)spromm;
> u32 dw;
>
> for (i = 0; i< bus->sprom_size/2; i = i++) {
> dw = ioread32(bus->mmio + SSB_SPROM_BASE + (i * 4));
> my_buff[i] = (dw<< 16) | (dw>> 16);
> }
>
> Is there something fishy in that approach ?
Yeah, completely wrong.
Use larry's patch.
I don't see why a 16bit access would hang. This code's been like this forever
and is tested on thousands of devices. We need to find out what's special about
your device. First being: Does your device actually _have_ an sprom? Or is
it some of these freaky built-in stripped-down save-two-cents devices?
So can you check what the first 16bit read returns? Just printk it.
If it returns all-ones, there's a good chance that there is no sprom at all.
--
Greetings, Michael.
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev