Re: [PATCH] Bluetooth: btmrvl_sdio: look for sd8688 firmware in alternate place

2013-02-17 Thread Ben Hutchings
On Sun, 2013-01-27 at 12:21 +0100, Lubomir Rintel wrote:
> On Mon, 2013-01-21 at 01:12 +, Ben Hutchings wrote:
> > On Fri, 2013-01-18 at 08:33 +0100, Lubomir Rintel wrote:
> > > On Tue, 2013-01-08 at 22:35 -0800, Marcel Holtmann wrote:
> > > > Hi Lubomir,
> > > > 
> > > > > > > > linux-firmware ships the sd8688* firmware images that are 
> > > > > > > > shared with
> > > > > > > > libertas_sdio WiFi driver under libertas/. libertas_sdio looks 
> > > > > > > > in both places
> > > > > > > > and so should we.
> > > > > > > >
> > > > > > > > Signed-off-by: Lubomir Rintel 
> > > > > > > > ---
> > > > > > > >  drivers/bluetooth/btmrvl_sdio.c |   24 ++--
> > > > > > > >  drivers/bluetooth/btmrvl_sdio.h |6 --
> > > > > > > >  2 files changed, 26 insertions(+), 4 deletions(-)
> > > > > > > 
> > > > > > > NAK from me on this one. I do not want the driver to check two
> > > > > > > locations. That is what userspace can work around.
> > > > > > > 
> > > > > > > If we want to unify the location between the WiFi driver and the
> > > > > > > Bluetooth driver, I am fine with that, but seriously, just pick 
> > > > > > > one over
> > > > > > > the other. I do not care which one.
> > > > > > 
> > > > > > The unified location is mrvl/ directory.
> > > > > > 
> > > > > > We can probably move SD8688 firmware & helper binaries to mrvl/ and 
> > > > > > have both drivers grab the images there?
> > > > > 
> > > > > That would break existing setups, wouldn't it?
> > > > > 
> > > > > I was under impression (commit 3d32a58b) that we care about
> > > > > compatibility here. Do we?
> > > > 
> > > > that is what symlinks are for.
> > > 
> > > David, Ben: please pull the following branch then:
> > > git pull git://github.com/lkundrak/linux-firmware.git sd8688-move
> > > 
> > > Thank you!
> > 
> > The symlinks are broken, and you didn't update WHENCE.
> 
> Oops, sorry for that. Fixed now, please pull:
> git pull git://github.com/lkundrak/linux-firmware.git sd8688-move
> 
> Thank you!

Pulled and will be pushed out shortly.  Sorry for the delay.

Ben.

-- 
Ben Hutchings
Sturgeon's Law: Ninety percent of everything is crap.


signature.asc
Description: This is a digitally signed message part


Re: [PATCH] Bluetooth: btmrvl_sdio: look for sd8688 firmware in alternate place

2013-01-27 Thread Lubomir Rintel
On Mon, 2013-01-21 at 01:12 +, Ben Hutchings wrote:
> On Fri, 2013-01-18 at 08:33 +0100, Lubomir Rintel wrote:
> > On Tue, 2013-01-08 at 22:35 -0800, Marcel Holtmann wrote:
> > > Hi Lubomir,
> > > 
> > > > > > > linux-firmware ships the sd8688* firmware images that are shared 
> > > > > > > with
> > > > > > > libertas_sdio WiFi driver under libertas/. libertas_sdio looks in 
> > > > > > > both places
> > > > > > > and so should we.
> > > > > > >
> > > > > > > Signed-off-by: Lubomir Rintel 
> > > > > > > ---
> > > > > > >  drivers/bluetooth/btmrvl_sdio.c |   24 ++--
> > > > > > >  drivers/bluetooth/btmrvl_sdio.h |6 --
> > > > > > >  2 files changed, 26 insertions(+), 4 deletions(-)
> > > > > > 
> > > > > > NAK from me on this one. I do not want the driver to check two
> > > > > > locations. That is what userspace can work around.
> > > > > > 
> > > > > > If we want to unify the location between the WiFi driver and the
> > > > > > Bluetooth driver, I am fine with that, but seriously, just pick one 
> > > > > > over
> > > > > > the other. I do not care which one.
> > > > > 
> > > > > The unified location is mrvl/ directory.
> > > > > 
> > > > > We can probably move SD8688 firmware & helper binaries to mrvl/ and 
> > > > > have both drivers grab the images there?
> > > > 
> > > > That would break existing setups, wouldn't it?
> > > > 
> > > > I was under impression (commit 3d32a58b) that we care about
> > > > compatibility here. Do we?
> > > 
> > > that is what symlinks are for.
> > 
> > David, Ben: please pull the following branch then:
> > git pull git://github.com/lkundrak/linux-firmware.git sd8688-move
> > 
> > Thank you!
> 
> The symlinks are broken, and you didn't update WHENCE.

Oops, sorry for that. Fixed now, please pull:
git pull git://github.com/lkundrak/linux-firmware.git sd8688-move

Thank you!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Bluetooth: btmrvl_sdio: look for sd8688 firmware in alternate place

2013-01-20 Thread Ben Hutchings
On Fri, 2013-01-18 at 08:33 +0100, Lubomir Rintel wrote:
> On Tue, 2013-01-08 at 22:35 -0800, Marcel Holtmann wrote:
> > Hi Lubomir,
> > 
> > > > > > linux-firmware ships the sd8688* firmware images that are shared 
> > > > > > with
> > > > > > libertas_sdio WiFi driver under libertas/. libertas_sdio looks in 
> > > > > > both places
> > > > > > and so should we.
> > > > > >
> > > > > > Signed-off-by: Lubomir Rintel 
> > > > > > ---
> > > > > >  drivers/bluetooth/btmrvl_sdio.c |   24 ++--
> > > > > >  drivers/bluetooth/btmrvl_sdio.h |6 --
> > > > > >  2 files changed, 26 insertions(+), 4 deletions(-)
> > > > > 
> > > > > NAK from me on this one. I do not want the driver to check two
> > > > > locations. That is what userspace can work around.
> > > > > 
> > > > > If we want to unify the location between the WiFi driver and the
> > > > > Bluetooth driver, I am fine with that, but seriously, just pick one 
> > > > > over
> > > > > the other. I do not care which one.
> > > > 
> > > > The unified location is mrvl/ directory.
> > > > 
> > > > We can probably move SD8688 firmware & helper binaries to mrvl/ and 
> > > > have both drivers grab the images there?
> > > 
> > > That would break existing setups, wouldn't it?
> > > 
> > > I was under impression (commit 3d32a58b) that we care about
> > > compatibility here. Do we?
> > 
> > that is what symlinks are for.
> 
> David, Ben: please pull the following branch then:
> git pull git://github.com/lkundrak/linux-firmware.git sd8688-move
> 
> Thank you!

The symlinks are broken, and you didn't update WHENCE.

Ben.

-- 
Ben Hutchings
Q.  Which is the greater problem in the world today, ignorance or apathy?
A.  I don't know and I couldn't care less.


signature.asc
Description: This is a digitally signed message part


Re: [PATCH] Bluetooth: btmrvl_sdio: look for sd8688 firmware in alternate place

2013-01-17 Thread Lubomir Rintel
On Tue, 2013-01-08 at 22:35 -0800, Marcel Holtmann wrote:
> Hi Lubomir,
> 
> > > > > linux-firmware ships the sd8688* firmware images that are shared with
> > > > > libertas_sdio WiFi driver under libertas/. libertas_sdio looks in 
> > > > > both places
> > > > > and so should we.
> > > > >
> > > > > Signed-off-by: Lubomir Rintel 
> > > > > ---
> > > > >  drivers/bluetooth/btmrvl_sdio.c |   24 ++--
> > > > >  drivers/bluetooth/btmrvl_sdio.h |6 --
> > > > >  2 files changed, 26 insertions(+), 4 deletions(-)
> > > > 
> > > > NAK from me on this one. I do not want the driver to check two
> > > > locations. That is what userspace can work around.
> > > > 
> > > > If we want to unify the location between the WiFi driver and the
> > > > Bluetooth driver, I am fine with that, but seriously, just pick one over
> > > > the other. I do not care which one.
> > > 
> > > The unified location is mrvl/ directory.
> > > 
> > > We can probably move SD8688 firmware & helper binaries to mrvl/ and have 
> > > both drivers grab the images there?
> > 
> > That would break existing setups, wouldn't it?
> > 
> > I was under impression (commit 3d32a58b) that we care about
> > compatibility here. Do we?
> 
> that is what symlinks are for.

David, Ben: please pull the following branch then:
git pull git://github.com/lkundrak/linux-firmware.git sd8688-move

Thank you!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Bluetooth: btmrvl_sdio: look for sd8688 firmware in alternate place

2013-01-08 Thread Marcel Holtmann
Hi Lubomir,

> > > > linux-firmware ships the sd8688* firmware images that are shared with
> > > > libertas_sdio WiFi driver under libertas/. libertas_sdio looks in both 
> > > > places
> > > > and so should we.
> > > >
> > > > Signed-off-by: Lubomir Rintel 
> > > > ---
> > > >  drivers/bluetooth/btmrvl_sdio.c |   24 ++--
> > > >  drivers/bluetooth/btmrvl_sdio.h |6 --
> > > >  2 files changed, 26 insertions(+), 4 deletions(-)
> > > 
> > > NAK from me on this one. I do not want the driver to check two
> > > locations. That is what userspace can work around.
> > > 
> > > If we want to unify the location between the WiFi driver and the
> > > Bluetooth driver, I am fine with that, but seriously, just pick one over
> > > the other. I do not care which one.
> > 
> > The unified location is mrvl/ directory.
> > 
> > We can probably move SD8688 firmware & helper binaries to mrvl/ and have 
> > both drivers grab the images there?
> 
> That would break existing setups, wouldn't it?
> 
> I was under impression (commit 3d32a58b) that we care about
> compatibility here. Do we?

that is what symlinks are for.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] Bluetooth: btmrvl_sdio: look for sd8688 firmware in alternate place

2013-01-08 Thread Lubomir Rintel
On Tue, 2013-01-08 at 18:43 -0800, Bing Zhao wrote:
> > > linux-firmware ships the sd8688* firmware images that are shared with
> > > libertas_sdio WiFi driver under libertas/. libertas_sdio looks in both 
> > > places
> > > and so should we.
> > >
> > > Signed-off-by: Lubomir Rintel 
> > > ---
> > >  drivers/bluetooth/btmrvl_sdio.c |   24 ++--
> > >  drivers/bluetooth/btmrvl_sdio.h |6 --
> > >  2 files changed, 26 insertions(+), 4 deletions(-)
> > 
> > NAK from me on this one. I do not want the driver to check two
> > locations. That is what userspace can work around.
> > 
> > If we want to unify the location between the WiFi driver and the
> > Bluetooth driver, I am fine with that, but seriously, just pick one over
> > the other. I do not care which one.
> 
> The unified location is mrvl/ directory.
> 
> We can probably move SD8688 firmware & helper binaries to mrvl/ and have both 
> drivers grab the images there?

That would break existing setups, wouldn't it?

I was under impression (commit 3d32a58b) that we care about
compatibility here. Do we?

--
Lubomir Rintel

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] Bluetooth: btmrvl_sdio: look for sd8688 firmware in alternate place

2013-01-08 Thread Bing Zhao

> > linux-firmware ships the sd8688* firmware images that are shared with
> > libertas_sdio WiFi driver under libertas/. libertas_sdio looks in both 
> > places
> > and so should we.
> >
> > Signed-off-by: Lubomir Rintel 
> > ---
> >  drivers/bluetooth/btmrvl_sdio.c |   24 ++--
> >  drivers/bluetooth/btmrvl_sdio.h |6 --
> >  2 files changed, 26 insertions(+), 4 deletions(-)
> 
> NAK from me on this one. I do not want the driver to check two
> locations. That is what userspace can work around.
> 
> If we want to unify the location between the WiFi driver and the
> Bluetooth driver, I am fine with that, but seriously, just pick one over
> the other. I do not care which one.

The unified location is mrvl/ directory.

We can probably move SD8688 firmware & helper binaries to mrvl/ and have both 
drivers grab the images there?

Regards,
Bing



Re: [PATCH] Bluetooth: btmrvl_sdio: look for sd8688 firmware in alternate place

2013-01-08 Thread Marcel Holtmann
Hi Lubomir,

> linux-firmware ships the sd8688* firmware images that are shared with
> libertas_sdio WiFi driver under libertas/. libertas_sdio looks in both places
> and so should we.
> 
> Signed-off-by: Lubomir Rintel 
> ---
>  drivers/bluetooth/btmrvl_sdio.c |   24 ++--
>  drivers/bluetooth/btmrvl_sdio.h |6 --
>  2 files changed, 26 insertions(+), 4 deletions(-)

NAK from me on this one. I do not want the driver to check two
locations. That is what userspace can work around.

If we want to unify the location between the WiFi driver and the
Bluetooth driver, I am fine with that, but seriously, just pick one over
the other. I do not care which one.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Bluetooth: btmrvl_sdio: look for sd8688 firmware in alternate place

2013-01-08 Thread Lubomir Rintel
linux-firmware ships the sd8688* firmware images that are shared with
libertas_sdio WiFi driver under libertas/. libertas_sdio looks in both places
and so should we.

Signed-off-by: Lubomir Rintel 
---
 drivers/bluetooth/btmrvl_sdio.c |   24 ++--
 drivers/bluetooth/btmrvl_sdio.h |6 --
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index 9959d4c..494f921 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -83,22 +83,28 @@ static const struct btmrvl_sdio_card_reg btmrvl_reg_87xx = {
 };
 
 static const struct btmrvl_sdio_device btmrvl_sdio_sd8688 = {
-   .helper = "sd8688_helper.bin",
-   .firmware   = "sd8688.bin",
+   .helper = "libertas/sd8688_helper.bin",
+   .helper2= "sd8688_helper.bin",
+   .firmware   = "libertas/sd8688.bin",
+   .firmware2  = "sd8688.bin",
.reg= &btmrvl_reg_8688,
.sd_blksz_fw_dl = 64,
 };
 
 static const struct btmrvl_sdio_device btmrvl_sdio_sd8787 = {
.helper = NULL,
+   .helper2= NULL,
.firmware   = "mrvl/sd8787_uapsta.bin",
+   .firmware2  = NULL,
.reg= &btmrvl_reg_87xx,
.sd_blksz_fw_dl = 256,
 };
 
 static const struct btmrvl_sdio_device btmrvl_sdio_sd8797 = {
.helper = NULL,
+   .helper2= NULL,
.firmware   = "mrvl/sd8797_uapsta.bin",
+   .firmware2  = NULL,
.reg= &btmrvl_reg_87xx,
.sd_blksz_fw_dl = 256,
 };
@@ -260,6 +266,11 @@ static int btmrvl_sdio_download_helper(struct 
btmrvl_sdio_card *card)
 
ret = request_firmware(&fw_helper, card->helper,
&card->func->dev);
+   if (ret < 0 && card->helper2) {
+   release_firmware(fw_helper);
+   ret = request_firmware(&fw_helper, card->helper2,
+   &card->func->dev);
+   }
if ((ret < 0) || !fw_helper) {
BT_ERR("request_firmware(helper) failed, error code = %d",
ret);
@@ -360,6 +371,11 @@ static int btmrvl_sdio_download_fw_w_helper(struct 
btmrvl_sdio_card *card)
 
ret = request_firmware(&fw_firmware, card->firmware,
&card->func->dev);
+   if (ret < 0 && card->firmware2) {
+   release_firmware(fw_firmware);
+   ret = request_firmware(&fw_firmware, card->firmware2,
+   &card->func->dev);
+   }
if ((ret < 0) || !fw_firmware) {
BT_ERR("request_firmware(firmware) failed, error code = %d",
ret);
@@ -970,7 +986,9 @@ static int btmrvl_sdio_probe(struct sdio_func *func,
if (id->driver_data) {
struct btmrvl_sdio_device *data = (void *) id->driver_data;
card->helper = data->helper;
+   card->helper2 = data->helper2;
card->firmware = data->firmware;
+   card->firmware2 = data->firmware2;
card->reg = data->reg;
card->sd_blksz_fw_dl = data->sd_blksz_fw_dl;
}
@@ -1186,6 +1204,8 @@ MODULE_DESCRIPTION("Marvell BT-over-SDIO driver ver " 
VERSION);
 MODULE_VERSION(VERSION);
 MODULE_LICENSE("GPL v2");
 MODULE_FIRMWARE("sd8688_helper.bin");
+MODULE_FIRMWARE("libertas/sd8688_helper.bin");
 MODULE_FIRMWARE("sd8688.bin");
+MODULE_FIRMWARE("libertas/sd8688.bin");
 MODULE_FIRMWARE("mrvl/sd8787_uapsta.bin");
 MODULE_FIRMWARE("mrvl/sd8797_uapsta.bin");
diff --git a/drivers/bluetooth/btmrvl_sdio.h b/drivers/bluetooth/btmrvl_sdio.h
index 43d35a6..4a5a019 100644
--- a/drivers/bluetooth/btmrvl_sdio.h
+++ b/drivers/bluetooth/btmrvl_sdio.h
@@ -84,7 +84,9 @@ struct btmrvl_sdio_card {
struct sdio_func *func;
u32 ioport;
const char *helper;
+   const char *helper2;
const char *firmware;
+   const char *firmware2;
const struct btmrvl_sdio_card_reg *reg;
u16 sd_blksz_fw_dl;
u8 rx_unit;
@@ -92,8 +94,8 @@ struct btmrvl_sdio_card {
 };
 
 struct btmrvl_sdio_device {
-   const char *helper;
-   const char *firmware;
+   const char *helper, *helper2;
+   const char *firmware, *firmware2;
const struct btmrvl_sdio_card_reg *reg;
u16 sd_blksz_fw_dl;
 };
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/