staging: brcm80211: misc cleanups
cover staging: brcm80211: misc cleanups
These patches remove some unused declarations in include/linux_osl.h and unused bindings to SDIO controller devices in brcmfmac driver
Mike Rapoport (4):
staging: brcm80211: remove unused osl_pkt{get,free}_static
staging: brcm80211: brcmfmac: remove PCI SDIO controller binding
staging: brcm80211: brcmfmac: remove PXA SDIO controller binding
staging: brcm80211: brcmfmac: cleanup bcmsdh_(un)register
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 259 +-------------------- drivers/staging/brcm80211/include/linux_osl.h | 3 - 2 files changed, 1 insertions(+), 261 deletions(-)
PATCH 1/4 staging: brcm80211: remove unused osl_pkt{get,free}_static
--- drivers/staging/brcm80211/include/linux_osl.h | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/staging/brcm80211/include/linux_osl.h +0 -3
@@ -324,9 +324,6 @@ extern void *osl_pktget(osl_t *osh, uint len);extern void osl_pktfree (osl_t *osh,void *skb,bool send);#ifdef BRCM_FULLMAC -extern void *osl_pktget_static (osl_t *osh,uint len); -extern void osl_pktfree_static (osl_t *osh,void *skb,bool send); -static inline void *osl_pkt_frmnative (osl_pubinfo_t *osh,struct sk_buff *skb) {
Signature · 1 line
1.6.4.4
PATCH 2/4 staging: brcm80211: brcmfmac: remove PCI SDIO controller binding
In reply to Mike Rapoport--- drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 229 --------------------- 1 files changed, 0 insertions(+), 229 deletions(-)
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +0 -229
@@ -291,224 +291,6 @@ int bcmsdh_remove(struct device *dev) return 0; } - -#else /* BCMPLATFORM_BUS */ - -#if !defined(BCMLXSDMMC ) -/* forward declarations for PCI probe and remove functions. */ -static int __devinit bcmsdh_pci_probe (struct pci_dev *pdev, -const struct pci_device_id *ent); -static void __devexit bcmsdh_pci_remove(struct pci_dev *pdev); - -/** -* pci id table -*/ -static struct pci_device_id bcmsdh_pci_devid[]__devinitdata = { -{ - .vendor =PCI_ANY_ID , - .device =PCI_ANY_ID , - .subvendor =PCI_ANY_ID , - .subdevice =PCI_ANY_ID , - .class =0 , - .class_mask =0 , - .driver_data =0 , -}, -{0 ,} -}; - -MODULE_DEVICE_TABLE (pci, bcmsdh_pci_devid); - -/** -* SDIO Host Controller pci driver info -*/ -static struct pci_driver bcmsdh_pci_driver = { - .node = {}, - .name ="bcmsdh" , - .id_table = bcmsdh_pci_devid, - .probe = bcmsdh_pci_probe, - .remove = bcmsdh_pci_remove, - .suspend =NULL , - .resume =NULL , -}; - -extern uint sd_pci_slot;/* Force detection to a particular PCI */ -/* slot only . Allows for having multiple */ -/* WL devices at once in a PC */ -/* Only one instance of dhd will be */ -/* usable at a time */ -/* Upper word is bus number, */ -/* lower word is slot number */ -/* Default value of 0xFFFFffff turns this */ -/* off */ -module_param (sd_pci_slot, uint,0 ); - -/** -* Detect supported SDIO Host Controller and attach if found. -* -* Determine if the device described by pdev is a supported SDIO Host -* Controller. If so, attach to it and attach to the target device. -*/ -static int __devinit -bcmsdh_pci_probe (struct pci_dev *pdev,const struct pci_device_id *ent) -{ -osl_t *osh =NULL ; -bcmsdh_hc_t *sdhc =NULL ; -unsigned long regs; -bcmsdh_info_t *sdh =NULL ; -int rc; - -if (sd_pci_slot !=0xFFFFffff ) { -if (pdev->bus->number != (sd_pci_slot >>16 ) || -PCI_SLOT (pdev->devfn) != (sd_pci_slot &0xffff )) { -SDLX_MSG (("%s: %s: bus %X, slot %X, vend %X, dev %X\n" , - __func__, -bcmsdh_chipmatch (pdev->vendor, pdev->device) ? -"Found compatible SDIOHC" : -"Probing unknown device" , - pdev->bus->number,PCI_SLOT (pdev->devfn), - pdev->vendor, pdev->device)); -return -ENODEV ; - } -SDLX_MSG (("%s: %s: bus %X, slot %X, vendor %X, device %X " -"(good PCI location)\n" , __func__, -bcmsdh_chipmatch (pdev->vendor, pdev->device) ? -"Using compatible SDIOHC" :"WARNING, forced use " -"of unkown device" , - pdev->bus->number,PCI_SLOT (pdev->devfn), pdev->vendor, - pdev->device)); - } - -if ((pdev->vendor ==VENDOR_TI ) - && ((pdev->device ==PCIXX21_FLASHMEDIA_ID ) - || (pdev->device ==PCIXX21_FLASHMEDIA0_ID ))) { -u32 config_reg; - -SDLX_MSG (("%s: Disabling TI FlashMedia Controller.\n" , - __func__)); - osh =osl_attach (pdev,PCI_BUS , false); -if (!osh) { -SDLX_MSG (("%s: osl_attach failed\n" , __func__)); - goto err; - } - - config_reg =OSL_PCI_READ_CONFIG (osh,0x4c ,4 ); - -/* -* Set MMC_SD_DIS bit in FlashMedia Controller. -* Disbling the SD/MMC Controller in the FlashMedia Controller -* allows the Standard SD Host Controller to take over control -* of the SD Slot. -*/ - config_reg |=0x02 ; -OSL_PCI_WRITE_CONFIG (osh,0x4c ,4 , config_reg); -osl_detach (osh); - } -/* match this pci device with what we support */ -/* we can't solely rely on this to believe it is -our SDIO Host Controller! */ -if (!bcmsdh_chipmatch (pdev->vendor, pdev->device)) -return -ENODEV ; - -/* this is a pci device we might support */ -SDLX_MSG (("%s: Found possible SDIO Host Controller: " -"bus %d slot %d func %d irq %d\n" , __func__, - pdev->bus->number,PCI_SLOT (pdev->devfn), -PCI_FUNC (pdev->devfn), pdev->irq)); - -/* use bcmsdh_query_device() to get the vendor ID of the target device -* so it will eventually appear in the Broadcom string on the console -*/ - -/* allocate SDIO Host Controller state info */ - osh =osl_attach (pdev,PCI_BUS , false); -if (!osh) { -SDLX_MSG (("%s: osl_attach failed\n" , __func__)); - goto err; - } - sdhc =kzalloc (sizeof (bcmsdh_hc_t),GFP_ATOMIC ); -if (!sdhc) { -SDLX_MSG (("%s: out of memory\n" , __func__)); - goto err; - } - sdhc->osh = osh; - - sdhc->dev = pdev; - -/* map to address where host can access */ -pci_set_master (pdev); - rc =pci_enable_device (pdev); -if (rc) { -SDLX_MSG (("%s: Cannot enable PCI device\n" , __func__)); - goto err; - } - sdh =bcmsdh_attach (osh, (void *)(unsigned long )pci_resource_start (pdev,0 ), - (void **)®s, pdev->irq); -if (!sdh) { -SDLX_MSG (("%s: bcmsdh_attach failed\n" , __func__)); - goto err; - } - - sdhc->sdh = sdh; - -/* try to attach to the target device */ - sdhc->ch = drvinfo.attach (VENDOR_BROADCOM ,/* pdev->vendor, */ -bcmsdh_query_device (sdh) &0xFFFF ,0 ,0 ,0 ,0 , - (void *)regs,NULL , sdh); -if (!sdhc->ch) { -SDLX_MSG (("%s: device attach failed\n" , __func__)); - goto err; - } - -/* chain SDIO Host Controller info together */ - sdhc->next = sdhcinfo; - sdhcinfo = sdhc; - -return 0 ; - -/* error handling */ -err: -if (sdhc->sdh) -bcmsdh_detach (sdhc->osh, sdhc->sdh); -if (sdhc) -kfree (sdhc); -if (osh) -osl_detach (osh); -return -ENODEV ; -} - -/** -* Detach from target devices and SDIO Host Controller -*/ -static void __devexit bcmsdh_pci_remove(struct pci_dev *pdev) -{ -bcmsdh_hc_t *sdhc, *prev; -osl_t *osh; - -/* find the SDIO Host Controller state for this -pdev and take it out from the list */ -for (sdhc = sdhcinfo, prev =NULL ; sdhc; sdhc = sdhc->next) { -if (sdhc->dev == pdev) { -if (prev) - prev->next = sdhc->next; -else - sdhcinfo =NULL ; -break ; - } - prev = sdhc; - } -if (!sdhc) -return ; - - drvinfo.detach (sdhc->ch); - -bcmsdh_detach (sdhc->osh, sdhc->sdh); - -/* release SDIO Host Controller info */ - osh = sdhc->osh; -kfree (sdhc); -osl_detach (osh); -} -#endif /* BCMLXSDMMC */ #endif /* BCMPLATFORM_BUS */ extern int sdio_function_init (void );
@@ -530,14 +312,6 @@ int bcmsdh_register(bcmsdh_driver_t *driver)return error;#endif /* defined(BCMPLATFORM_BUS) */ -#if !defined(BCMPLATFORM_BUS ) && !defined(BCMLXSDMMC ) - error =pci_register_driver (&bcmsdh_pci_driver); -if (!error) -return 0 ; - -SDLX_MSG (("%s: pci_register_driver failed 0x%x\n" , __func__, error)); -#endif /* BCMPLATFORM_BUS */ -return error; }
@@ -551,9 +325,6 @@ void bcmsdh_unregister(void)#if defined(BCMLXSDMMC )sdio_function_cleanup ();#endif /* BCMLXSDMMC */ -#if !defined(BCMPLATFORM_BUS ) && !defined(BCMLXSDMMC ) -pci_unregister_driver (&bcmsdh_pci_driver); -#endif /* BCMPLATFORM_BUS */ }#if defined(OOB_INTR_ONLY )
Signature · 1 line
1.6.4.4
Re: [PATCH 2/4] staging: brcm80211: brcmfmac: remove PCI SDIO controller binding
Quoted 3 lines · Mike Rapoport
Signed-off-by Mike Rapoport <[email protected]>--- drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 229 ---------------------
This patch doesn't apply, care to redo it and resend it?
thanks,
greg k-h
PATCH 2/4 staging: brcm80211: brcmfmac: remove PCI SDIO controller binding
--- drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 229 --------------------- 1 files changed, 0 insertions(+), 229 deletions(-)
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +0 -229
@@ -279,224 +279,6 @@ int bcmsdh_remove(struct device *dev) return 0; } - -#else /* BCMPLATFORM_BUS */ - -#if !defined(BCMLXSDMMC ) -/* forward declarations for PCI probe and remove functions. */ -static int __devinit bcmsdh_pci_probe (struct pci_dev *pdev, -const struct pci_device_id *ent); -static void __devexit bcmsdh_pci_remove(struct pci_dev *pdev); - -/** -* pci id table -*/ -static struct pci_device_id bcmsdh_pci_devid[]__devinitdata = { -{ - .vendor =PCI_ANY_ID , - .device =PCI_ANY_ID , - .subvendor =PCI_ANY_ID , - .subdevice =PCI_ANY_ID , - .class =0 , - .class_mask =0 , - .driver_data =0 , -}, -{0 ,} -}; - -MODULE_DEVICE_TABLE (pci, bcmsdh_pci_devid); - -/** -* SDIO Host Controller pci driver info -*/ -static struct pci_driver bcmsdh_pci_driver = { - .node = {}, - .name ="bcmsdh" , - .id_table = bcmsdh_pci_devid, - .probe = bcmsdh_pci_probe, - .remove = bcmsdh_pci_remove, - .suspend =NULL , - .resume =NULL , -}; - -extern uint sd_pci_slot;/* Force detection to a particular PCI */ -/* slot only . Allows for having multiple */ -/* WL devices at once in a PC */ -/* Only one instance of dhd will be */ -/* usable at a time */ -/* Upper word is bus number, */ -/* lower word is slot number */ -/* Default value of 0xFFFFffff turns this */ -/* off */ -module_param (sd_pci_slot, uint,0 ); - -/** -* Detect supported SDIO Host Controller and attach if found. -* -* Determine if the device described by pdev is a supported SDIO Host -* Controller. If so, attach to it and attach to the target device. -*/ -static int __devinit -bcmsdh_pci_probe (struct pci_dev *pdev,const struct pci_device_id *ent) -{ -osl_t *osh =NULL ; -bcmsdh_hc_t *sdhc =NULL ; -unsigned long regs; -bcmsdh_info_t *sdh =NULL ; -int rc; - -if (sd_pci_slot !=0xFFFFffff ) { -if (pdev->bus->number != (sd_pci_slot >>16 ) || -PCI_SLOT (pdev->devfn) != (sd_pci_slot &0xffff )) { -SDLX_MSG (("%s: %s: bus %X, slot %X, vend %X, dev %X\n" , - __func__, -bcmsdh_chipmatch (pdev->vendor, pdev->device) ? -"Found compatible SDIOHC" : -"Probing unknown device" , - pdev->bus->number,PCI_SLOT (pdev->devfn), - pdev->vendor, pdev->device)); -return -ENODEV ; - } -SDLX_MSG (("%s: %s: bus %X, slot %X, vendor %X, device %X " -"(good PCI location)\n" , __func__, -bcmsdh_chipmatch (pdev->vendor, pdev->device) ? -"Using compatible SDIOHC" :"WARNING, forced use " -"of unkown device" , - pdev->bus->number,PCI_SLOT (pdev->devfn), pdev->vendor, - pdev->device)); - } - -if ((pdev->vendor ==VENDOR_TI ) - && ((pdev->device ==PCIXX21_FLASHMEDIA_ID ) - || (pdev->device ==PCIXX21_FLASHMEDIA0_ID ))) { -u32 config_reg; - -SDLX_MSG (("%s: Disabling TI FlashMedia Controller.\n" , - __func__)); - osh =osl_attach (pdev,PCI_BUS ); -if (!osh) { -SDLX_MSG (("%s: osl_attach failed\n" , __func__)); - goto err; - } - - config_reg =OSL_PCI_READ_CONFIG (osh,0x4c ,4 ); - -/* -* Set MMC_SD_DIS bit in FlashMedia Controller. -* Disbling the SD/MMC Controller in the FlashMedia Controller -* allows the Standard SD Host Controller to take over control -* of the SD Slot. -*/ - config_reg |=0x02 ; -OSL_PCI_WRITE_CONFIG (osh,0x4c ,4 , config_reg); -osl_detach (osh); - } -/* match this pci device with what we support */ -/* we can't solely rely on this to believe it is -our SDIO Host Controller! */ -if (!bcmsdh_chipmatch (pdev->vendor, pdev->device)) -return -ENODEV ; - -/* this is a pci device we might support */ -SDLX_MSG (("%s: Found possible SDIO Host Controller: " -"bus %d slot %d func %d irq %d\n" , __func__, - pdev->bus->number,PCI_SLOT (pdev->devfn), -PCI_FUNC (pdev->devfn), pdev->irq)); - -/* use bcmsdh_query_device() to get the vendor ID of the target device -* so it will eventually appear in the Broadcom string on the console -*/ - -/* allocate SDIO Host Controller state info */ - osh =osl_attach (pdev,PCI_BUS ); -if (!osh) { -SDLX_MSG (("%s: osl_attach failed\n" , __func__)); - goto err; - } - sdhc =kzalloc (sizeof (bcmsdh_hc_t),GFP_ATOMIC ); -if (!sdhc) { -SDLX_MSG (("%s: out of memory\n" , __func__)); - goto err; - } - sdhc->osh = osh; - - sdhc->dev = pdev; - -/* map to address where host can access */ -pci_set_master (pdev); - rc =pci_enable_device (pdev); -if (rc) { -SDLX_MSG (("%s: Cannot enable PCI device\n" , __func__)); - goto err; - } - sdh =bcmsdh_attach (osh, (void *)(unsigned long )pci_resource_start (pdev,0 ), - (void **)®s, pdev->irq); -if (!sdh) { -SDLX_MSG (("%s: bcmsdh_attach failed\n" , __func__)); - goto err; - } - - sdhc->sdh = sdh; - -/* try to attach to the target device */ - sdhc->ch = drvinfo.attach (VENDOR_BROADCOM ,/* pdev->vendor, */ -bcmsdh_query_device (sdh) &0xFFFF ,0 ,0 ,0 ,0 , - (void *)regs,NULL , sdh); -if (!sdhc->ch) { -SDLX_MSG (("%s: device attach failed\n" , __func__)); - goto err; - } - -/* chain SDIO Host Controller info together */ - sdhc->next = sdhcinfo; - sdhcinfo = sdhc; - -return 0 ; - -/* error handling */ -err: -if (sdhc->sdh) -bcmsdh_detach (sdhc->osh, sdhc->sdh); -if (sdhc) -kfree (sdhc); -if (osh) -osl_detach (osh); -return -ENODEV ; -} - -/** -* Detach from target devices and SDIO Host Controller -*/ -static void __devexit bcmsdh_pci_remove(struct pci_dev *pdev) -{ -bcmsdh_hc_t *sdhc, *prev; -osl_t *osh; - -/* find the SDIO Host Controller state for this -pdev and take it out from the list */ -for (sdhc = sdhcinfo, prev =NULL ; sdhc; sdhc = sdhc->next) { -if (sdhc->dev == pdev) { -if (prev) - prev->next = sdhc->next; -else - sdhcinfo =NULL ; -break ; - } - prev = sdhc; - } -if (!sdhc) -return ; - - drvinfo.detach (sdhc->ch); - -bcmsdh_detach (sdhc->osh, sdhc->sdh); - -/* release SDIO Host Controller info */ - osh = sdhc->osh; -kfree (sdhc); -osl_detach (osh); -} -#endif /* BCMLXSDMMC */ #endif /* BCMPLATFORM_BUS */ extern int sdio_function_init (void );
@@ -515,14 +297,6 @@ int bcmsdh_register(bcmsdh_driver_t *driver)return error;#endif /* defined(BCMPLATFORM_BUS) */ -#if !defined(BCMPLATFORM_BUS ) && !defined(BCMLXSDMMC ) - error =pci_register_driver (&bcmsdh_pci_driver); -if (!error) -return 0 ; - -SDLX_MSG (("%s: pci_register_driver failed 0x%x\n" , __func__, error)); -#endif /* BCMPLATFORM_BUS */ -return error; }
@@ -533,9 +307,6 @@ void bcmsdh_unregister(void)#if defined(BCMLXSDMMC )sdio_function_cleanup ();#endif /* BCMLXSDMMC */ -#if !defined(BCMPLATFORM_BUS ) && !defined(BCMLXSDMMC ) -pci_unregister_driver (&bcmsdh_pci_driver); -#endif /* BCMPLATFORM_BUS */ }#if defined(OOB_INTR_ONLY )
Signature · 1 line
1.6.4.4
Re: [PATCH 2/4] staging: brcm80211: brcmfmac: remove PCI SDIO controller binding
Quoted 4 lines · Mike Rapoport
Signed-off-by Mike Rapoport <[email protected]>--- drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 229 --------------------- 1 files changed, 0 insertions(+), 229 deletions(-)
Wait, is this really ok code to be removing from the driver?
Brett and Henry, any objections to this?
Mike, why do you think this is ok to remove? Is it because no one is ever calling this even for both types of config for this driver?
thanks,
greg k-h
Re: [PATCH 2/4] staging: brcm80211: brcmfmac: remove PCI SDIO controller binding
Quoted 6 lines · Greg KH
Quoted 4 lines · Mike Rapoport
Signed-off-by Mike Rapoport <[email protected]>---
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 229 ---------------------1 files changed, 0 insertions(+), 229 deletions(-)
Quoted 6 lines
Wait, is this really ok code to be removing from the driver?
Brett and Henry, any objections to this?
Mike, why do you think this is ok to remove? Is it because no one is ever calling this even for both types of config for this driver?
There's a lot of code in the brcmfmac part of the driver that tries to re-implement SDIO stack. In particular, the code removed by this patch registers a pci_driver for SDIO controller and then the brcmfmac driver accesses the WiFi device attached to that SDIO controller by means of custom re-implementation of SDHC.
Quoted 4 lines
thanks,
greg k-h
Signature · 2 lines
Sincerely Yours, Mike.
Re: [PATCH 2/4] staging: brcm80211: brcmfmac: remove PCI SDIO controller binding
Quoted 11 lines · Mike Rapoport
Quoted 10 lines · Greg KH
Quoted 4 lines · Mike Rapoport
Signed-off-by Mike Rapoport <[email protected]>---
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 229 ---------------------1 files changed, 0 insertions(+), 229 deletions(-)Wait, is this really ok code to be removing from the driver?
Brett and Henry, any objections to this?
Quoted 8 lines
Quoted 2 lines
Mike, why do you think this is ok to remove? Is it because no one is ever calling this even for both types of config for this driver?
There's a lot of code in the brcmfmac part of the driver that tries to re-implement SDIO stack. In particular, the code removed by this patch registers a
pci_driverfor SDIO controller and then the brcmfmac driver accesses the WiFi device attached to that SDIO controller by means of custom re-implementation of SDHC.
Ok, so even with this patch, it will still work properly in the SDIO mode?
Have you been able to test this?
Brett, Henry, I would like to get your ack on this before applying it.
thanks,
greg k-h
RE: [PATCH 2/4] staging: brcm80211: brcmfmac: remove PCI SDIO controller binding
I'm not familiar with the fullmac code so I am getting someone from fullmac team to answer...hang on just a little.
In the meantime Mike, does the driver still work with all your patches?
Thanks
Brett
Quoted 41 lines
-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Wednesday, November 17, 2010 2:11 PM
To: Mike Rapoport
Cc: Greg KH; Brett Rudley; Henry Ptasinski; Dowan Kim; linux- [email protected]
Subject: Re: [PATCH 2/4] staging: brcm80211: brcmfmac: remove PCI SDIO controller bindingQuoted 5 lines · Mike Rapoport
Quoted 4 lines · Greg KH
Quoted 3 lines · Mike Rapoport
Signed-off-by Mike Rapoport <[email protected]>---
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 229 ---------------------
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
1 files changed, 0 insertions(+), 229 deletions(-)Wait, is this really ok code to be removing from the driver?
Brett and Henry, any objections to this?
Quoted 8 lines
Quoted 2 lines
Mike, why do you think this is ok to remove? Is it because no one is ever calling this even for both types of config for this driver?
There's a lot of code in the brcmfmac part of the driver that tries to re-implement SDIO stack. In particular, the code removed by this patch registers a
pci_driverfor SDIO controller and then the brcmfmac driver accesses the WiFi device attached to that SDIO controller by means of custom re-implementation of SDHC.Ok, so even with this patch, it will still work properly in the SDIO mode?
Have you been able to test this?
Brett, Henry, I would like to get your ack on this before applying it.
thanks,
greg k-h
Re: [PATCH 2/4] staging: brcm80211: brcmfmac: remove PCI SDIO controller binding
Quoted 3 lines · Brett Rudley
I'm not familiar with the fullmac code so I am getting someone from fullmac team to answer...hang on just a little.
In the meantime Mike, does the driver still work with all your patches?
I was never able to connect to an access point with the hardware I have and the brcmfmac driver. However, there's no change in the driver behavior with all my patches.
cm-t35:~# modprobe brcmfmac firmware_path=4329/BCM43x9-FW.bin nvram_path=4329/nvram.txt [ 93.952331] brcmfmac: module is from the staging directory, the quality is unknown, you have been warned. [ 94.033081] F1 signature read @0x18000000=0x9934329 [ 94.039520] _sb_scan: scan bus 0x18000000 assume 1 cores [ 94.049743] _sb_scan: scan bus 0x18010000 assume 4 cores [ 94.057952] _sb_scan: found 4 cores on bus 0x18010000 [ 94.063049] _sb_scan: found 5 cores on bus 0x18000000 [ 94.075927] Buscore id/type/rev 6/0x829/1 [ 94.082244] No SDIO Drive strength init done for chip 4329 rev 3 pmurev 6 [ 94.096252] DHD: dongle ram size is set to 294912(orig 294912) [ 94.653472] dhdsdio_write_vars: Download/Upload/Compare of NVRAM ok. [ 94.752532] Firmware version = wl0: Jun 29 2009 17:26:41 version 4.218.97.0 [ 94.993255] eth1: Broadcom Dongle Host Driver [ 94.998474] [ 94.998474] Dongle Host Driver, version 4.218.248.5 [ 94.998504] Compiled in on Nov 18 2010 at 08:52:38
Quoted 47 lines
Thanks
BrettQuoted 41 lines
-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Wednesday, November 17, 2010 2:11 PM
To: Mike Rapoport
Cc: Greg KH; Brett Rudley; Henry Ptasinski; Dowan Kim; linux- [email protected]
Subject: Re: [PATCH 2/4] staging: brcm80211: brcmfmac: remove PCI SDIO controller bindingQuoted 5 lines · Mike Rapoport
Quoted 4 lines · Greg KH
Quoted 3 lines · Mike Rapoport
Signed-off-by Mike Rapoport <[email protected]>---
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 229 ---------------------
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
1 files changed, 0 insertions(+), 229 deletions(-)Wait, is this really ok code to be removing from the driver?
Brett and Henry, any objections to this?
Quoted 8 lines
Quoted 2 lines
Mike, why do you think this is ok to remove? Is it because no one is ever calling this even for both types of config for this driver?
There's a lot of code in the brcmfmac part of the driver that tries to re-implement SDIO stack. In particular, the code removed by this patch registers a
pci_driverfor SDIO controller and then the brcmfmac driver accesses the WiFi device attached to that SDIO controller by means of custom re-implementation of SDHC.Ok, so even with this patch, it will still work properly in the SDIO mode?
Have you been able to test this?
Brett, Henry, I would like to get your ack on this before applying it.
thanks,
greg k-h
Signature · 2 lines
Sincerely Yours, Mike.
Re: [PATCH 2/4] staging: brcm80211: brcmfmac: remove PCI SDIO controller binding
In reply to Greg KHQuoted 15 lines · Greg KH
Quoted 14 lines · Mike Rapoport
Quoted 12 lines · Greg KH
Quoted 4 lines · Mike Rapoport
Signed-off-by Mike Rapoport <[email protected]>---
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 229 ---------------------1 files changed, 0 insertions(+), 229 deletions(-)Wait, is this really ok code to be removing from the driver?
Brett and Henry, any objections to this?
Mike, why do you think this is ok to remove? Is it because no one is ever calling this even for both types of config for this driver?
Quoted 8 lines
Quoted 5 lines
There's a lot of code in the brcmfmac part of the driver that tries to re-implement SDIO stack. In particular, the code removed by this patch registers a
pci_driverfor SDIO controller and then the brcmfmac driver accesses the WiFi device attached to that SDIO controller by means of custom re-implementation of SDHC.Ok, so even with this patch, it will still work properly in the SDIO mode?
The driver binds to the device and it is able to download firmware and initialize the network interface.
Quoted 1 line
Have you been able to test this?
I was never able to have the radio working properly with this driver, both before and after my patches. However, the patches do not affect the driver initialization and firmware download.
Quoted 6 lines
Brett, Henry, I would like to get your ack on this before applying it.
thanks,
greg k-h
Signature · 2 lines
Sincerely Yours, Mike.
PATCH 3/4 staging: brcm80211: brcmfmac: remove PXA SDIO controller binding
In reply to Mike Rapoport--- drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 17 ----------------- 1 files changed, 0 insertions(+), 17 deletions(-)
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +0 -17
@@ -139,17 +139,6 @@ static int __devexit bcmsdh_remove(struct device *dev);#endif /* BCMLXSDMMC */ #ifndef BCMLXSDMMC -static struct device_driver bcmsdh_driver = { - .name ="pxa2xx-mci" , - .bus = &platform_bus_type, - .probe = bcmsdh_probe, - .remove = bcmsdh_remove, - .suspend =NULL , - .resume =NULL , -}; -#endif /* BCMLXSDMMC */ - -#ifndef BCMLXSDMMC static#endif /* BCMLXSDMMC */ int bcmsdh_probe (struct device *dev)
@@ -305,9 +294,6 @@ int bcmsdh_register(bcmsdh_driver_t *driver)#if defined(BCMLXSDMMC )SDLX_MSG (("Linux Kernel SDIO/MMC Driver\n" )); error =sdio_function_init (); -#else -SDLX_MSG (("Intel PXA270 SDIO Driver\n" )); - error =driver_register (&bcmsdh_driver);#endif /* defined(BCMLXSDMMC) */ return error;#endif /* defined(BCMPLATFORM_BUS) */
@@ -319,9 +305,6 @@ extern void sdio_function_cleanup(void);void bcmsdh_unregister (void ) { -#if defined(BCMPLATFORM_BUS ) && !defined(BCMLXSDMMC ) -driver_unregister (&bcmsdh_driver); -#endif #if defined(BCMLXSDMMC )sdio_function_cleanup ();#endif /* BCMLXSDMMC */
Signature · 1 line
1.6.4.4
PATCH 4/4 staging: brcm80211: brcmfmac: cleanup bcmsdh_(un)register
In reply to Mike Rapoport--- drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +1 -12
@@ -286,28 +286,17 @@ extern int sdio_function_init(void);int bcmsdh_register (bcmsdh_driver_t *driver) { -int error =0 ; - drvinfo = *driver; -#if defined(BCMPLATFORM_BUS ) -#if defined(BCMLXSDMMC )SDLX_MSG (("Linux Kernel SDIO/MMC Driver\n" )); - error =sdio_function_init (); -#endif /* defined(BCMLXSDMMC) */ -return error; -#endif /* defined(BCMPLATFORM_BUS) */ - -return error; +return sdio_function_init (); }extern void sdio_function_cleanup (void );void bcmsdh_unregister (void ) { -#if defined(BCMLXSDMMC )sdio_function_cleanup (); -#endif /* BCMLXSDMMC */ }#if defined(OOB_INTR_ONLY )
Signature · 1 line
1.6.4.4
Re: [PATCH 4/4] staging: brcm80211: brcmfmac: cleanup bcmsdh_(un)register
Quoted 3 lines · Mike Rapoport
Signed-off-by Mike Rapoport <[email protected]>--- drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 13 +------------
This patch doesn't apply, care to resend it?
thanks,
greg k-h
PATCH 4/4 staging: brcm80211: brcmfmac: cleanup bcmsdh_(un)register
--- drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +1 -12
@@ -285,28 +285,17 @@ extern int sdio_function_init(void);int bcmsdh_register (bcmsdh_driver_t *driver) { -int error =0 ; - drvinfo = *driver; -#if defined(BCMPLATFORM_BUS ) -#if defined(BCMLXSDMMC )SDLX_MSG (("Linux Kernel SDIO/MMC Driver\n" )); - error =sdio_function_init (); -#endif /* defined(BCMLXSDMMC) */ -return error; -#endif /* defined(BCMPLATFORM_BUS) */ - -return error; +return sdio_function_init (); }extern void sdio_function_cleanup (void );void bcmsdh_unregister (void ) { -#if defined(BCMLXSDMMC )sdio_function_cleanup (); -#endif /* BCMLXSDMMC */ }#if defined(OOB_INTR_ONLY )
Signature · 1 line
1.6.4.4
Re: [PATCH 4/4] staging: brcm80211: brcmfmac: cleanup bcmsdh_(un)register
Quoted 11 lines · Mike Rapoport
Signed-off-by Mike Rapoport <[email protected]>--- drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-)drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +0
-0@@ -285,28 +285,17 @@ extern int sdio_function_init(void);
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c extern int sdio_function_init(void); · line 295
Quoted 10 lines
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +0
-5int bcmsdh_register (bcmsdh_driver_t *driver) { -int error =0 ; - drvinfo = *driver; -#if defined(BCMPLATFORM_BUS ) -#if defined(BCMLXSDMMC )SDLX_MSG (("Linux Kernel SDIO/MMC Driver\n" )); - error =sdio_function_init ();
Same question here, are you sure we can remove this code?
just want to make sure.
thanks,
greg k-h
Re: [PATCH 4/4] staging: brcm80211: brcmfmac: cleanup bcmsdh_(un)register
Quoted 18 lines · Greg KH
Quoted 17 lines · Mike Rapoport
Signed-off-by Mike Rapoport <[email protected]>---
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 13 +------------1 files changed, 1 insertions(+), 12 deletions(-)drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +0
-2@@ -285,28 +285,17 @@ extern int sdio_function_init(void); int bcmsdh_register(bcmsdh_driver_t *driver) { - int error = 0; - drvinfo = *driver;
Quoted 6 lines
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c extern int sdio_function_init(void); · line 295
Quoted 4 lines
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +0
-3-#if defined(BCMPLATFORM_BUS ) -#if defined(BCMLXSDMMC ) SDLX_MSG(("Linux Kernel SDIO/MMC Driver\n")); - error = sdio_function_init();Same question here, are you sure we can remove this code?
I'm not removing sdio_function_init here. I've only replaced
error = sdio_function_init();
return error;
with
return sdio_function_init();Quoted 6 lines
just want to make sure.
thanks,
greg k-h
Signature · 2 lines
Sincerely Yours, Mike.
Re: [PATCH 4/4] staging: brcm80211: brcmfmac: cleanup bcmsdh_(un)register
Quoted 26 lines · Mike Rapoport
Quoted 18 lines · Greg KH
Quoted 17 lines · Mike Rapoport
Signed-off-by Mike Rapoport <[email protected]>---
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 13 +------------1 files changed, 1 insertions(+), 12 deletions(-)drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +0
-2@@ -285,28 +285,17 @@ extern int sdio_function_init(void); int bcmsdh_register(bcmsdh_driver_t *driver) { - int error = 0; - drvinfo = *driver;Quoted 6 lines
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c extern int sdio_function_init(void); · line 295
Quoted 4 lines
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +0
-3-#if defined(BCMPLATFORM_BUS ) -#if defined(BCMLXSDMMC ) SDLX_MSG(("Linux Kernel SDIO/MMC Driver\n")); - error = sdio_function_init();Same question here, are you sure we can remove this code?
Quoted 5 lines
I'm not removing
sdio_function_inithere. I've only replacederror = sdio_function_init(); return error; with return sdio_function_init();
Doh, you are right, sorry about that, I missread the patch.
thanks
greg k-h
There was a little confusion within our fullmac team but they say these are OK.
Thanks greg for asking.
Quoted 28 lines
-----Original Message-----
From: [email protected] [mailto:linux-wireless- [email protected]] On Behalf Of Mike Rapoport
Sent: Sunday, November 14, 2010 3:36 AM
To: Greg Kroah-Hartman
Cc: Brett Rudley; Henry Ptasinski; Dowan Kim; linux- [email protected]; Mike Rapoport
Subject: [PATCH 0/4] staging: brcm80211: misc cleanupsThese patches remove some unused declarations in
include/linux_osl.hand unused bindings to SDIO controller devices in brcmfmac driverMike Rapoport (4):
staging: brcm80211: remove unused osl_pkt{get,free}_static
staging: brcm80211: brcmfmac: remove PCI SDIO controller binding
staging: brcm80211: brcmfmac: remove PXA SDIO controller binding
staging: brcm80211: brcmfmac: cleanup bcmsdh_(un)registerdrivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 259 +-------------- ------ drivers/staging/brcm80211/include/linux_osl.h | 3 - 2 files changed, 1 insertions(+), 261 deletions(-)--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html