public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/4] libertas: check for old, unsupported hardware
@ 2008-06-05 11:08 Holger Schurig
  2008-06-05 11:46 ` Dan Williams
  0 siblings, 1 reply; 4+ messages in thread
From: Holger Schurig @ 2008-06-05 11:08 UTC (permalink / raw)
  To: libertas-dev, Dan Williams, linux-wireless, John W. Linville

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>

--- linux.orig/drivers/net/wireless/libertas/if_cs.c
+++ linux/drivers/net/wireless/libertas/if_cs.c
@@ -268,6 +268,12 @@
 #define IF_CS_SCRATCH_BOOT_OK		0x00
 #define IF_CS_SCRATCH_HELPER_OK		0x5a
 
+/*
+ * Used to detect ancient chips:
+ */
+#define IF_CS_PRODUCT_ID		0x0000001C
+#define IF_CS_CF8385_B1_REV		0x12
+
 
 /********************************************************************/
 /* I/O and interrupt handling                                       */
@@ -864,6 +871,12 @@
 	       p_dev->irq.AssignedIRQ, p_dev->io.BasePort1,
 	       p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1);
 
+	/* Check if we have a current silicon */
+	if (if_cs_read8(card, IF_CS_PRODUCT_ID) < IF_CS_CF8385_B1_REV) {
+		lbs_pr_err("old chips like 8385 rev B1 aren't supported\n");
+		ret = -ENODEV;
+		goto out2;
+	}
 
 	/* Load the firmware early, before calling into libertas.ko */
 	ret = if_cs_prog_helper(card);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/4] libertas: check for old, unsupported hardware
  2008-06-05 11:08 [PATCH 3/4] libertas: check for old, unsupported hardware Holger Schurig
@ 2008-06-05 11:46 ` Dan Williams
  2008-06-05 12:02   ` Holger Schurig
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Williams @ 2008-06-05 11:46 UTC (permalink / raw)
  To: Holger Schurig; +Cc: libertas-dev, linux-wireless, John W. Linville

On Thu, 2008-06-05 at 13:08 +0200, Holger Schurig wrote:
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>

Looks OK to me; how old are the B1 and earlier chips?  Do we just not
have any samples to work with?

Acked-by: Dan Williams <dcbw@redhat.com>

> --- linux.orig/drivers/net/wireless/libertas/if_cs.c
> +++ linux/drivers/net/wireless/libertas/if_cs.c
> @@ -268,6 +268,12 @@
>  #define IF_CS_SCRATCH_BOOT_OK		0x00
>  #define IF_CS_SCRATCH_HELPER_OK		0x5a
>  
> +/*
> + * Used to detect ancient chips:
> + */
> +#define IF_CS_PRODUCT_ID		0x0000001C
> +#define IF_CS_CF8385_B1_REV		0x12
> +
>  
>  /********************************************************************/
>  /* I/O and interrupt handling                                       */
> @@ -864,6 +871,12 @@
>  	       p_dev->irq.AssignedIRQ, p_dev->io.BasePort1,
>  	       p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1);
>  
> +	/* Check if we have a current silicon */
> +	if (if_cs_read8(card, IF_CS_PRODUCT_ID) < IF_CS_CF8385_B1_REV) {
> +		lbs_pr_err("old chips like 8385 rev B1 aren't supported\n");
> +		ret = -ENODEV;
> +		goto out2;
> +	}
>  
>  	/* Load the firmware early, before calling into libertas.ko */
>  	ret = if_cs_prog_helper(card);


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/4] libertas: check for old, unsupported hardware
  2008-06-05 11:46 ` Dan Williams
@ 2008-06-05 12:02   ` Holger Schurig
  2008-08-19 19:44     ` Dan Williams
  0 siblings, 1 reply; 4+ messages in thread
From: Holger Schurig @ 2008-06-05 12:02 UTC (permalink / raw)
  To: linux-wireless; +Cc: Dan Williams, libertas-dev, John W. Linville

I got this piece of code from the 5.0.16 GPL driver, but 
implemented it differently. I mainly put it in to find out if 
YOU have such an old silicon. When people yell "my card isn't 
supported, I get this kernel error" we can still add the 
necessary support.

I don't want to add the support right now because I don't have 
this old hardware and don't know anyone with it. So no-one could 
test this.


The 5.0.16 source mentions two things needed for this old 
hardware:

* doing read-modify-write instead of just setting bits, this
  applies to IF_CS_HOST_STATUS and IF_CS_HOST_INT_CAUSE
* and an interrupt workaround

The interrupt workaround isn't in the 5.0.16 source.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/4] libertas: check for old, unsupported hardware
  2008-06-05 12:02   ` Holger Schurig
@ 2008-08-19 19:44     ` Dan Williams
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Williams @ 2008-08-19 19:44 UTC (permalink / raw)
  To: Holger Schurig; +Cc: linux-wireless, libertas-dev, John W. Linville

On Thu, 2008-06-05 at 14:02 +0200, Holger Schurig wrote:
> I got this piece of code from the 5.0.16 GPL driver, but 
> implemented it differently. I mainly put it in to find out if 
> YOU have such an old silicon. When people yell "my card isn't 
> supported, I get this kernel error" we can still add the 
> necessary support.
> 
> I don't want to add the support right now because I don't have 
> this old hardware and don't know anyone with it. So no-one could 
> test this.

So it turns out I have two of these cards, which are the ones I've been
using for testing since last year.  Which might explain why I've been
having so many problems that you're not having.  They are AmbiCom
WL54-CF rev 1.0 cards which I believe are B0 revision looking at the FCC
internal photos.  The card returns 0x10 as the revision.

> The 5.0.16 source mentions two things needed for this old 
> hardware:
> 
> * doing read-modify-write instead of just setting bits, this
>   applies to IF_CS_HOST_STATUS and IF_CS_HOST_INT_CAUSE

Any chance you could whip up a quick test patch for this one?

> * and an interrupt workaround

I'll try to figure out what needs to happen for this, lack of it might
be the cause of the hangs I've been seeing with my B0 hardware.

Dan



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-08-19 19:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-05 11:08 [PATCH 3/4] libertas: check for old, unsupported hardware Holger Schurig
2008-06-05 11:46 ` Dan Williams
2008-06-05 12:02   ` Holger Schurig
2008-08-19 19:44     ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox